pub struct ChannelPolicy {
pub channel_id: ChannelId,
pub require_unencrypted: bool,
pub require_full_source: bool,
pub max_flood_hops: Option<u8>,
}Expand description
Per-channel operating-policy overrides enforced on outgoing traffic.
OperatingPolicy holds a small list of ChannelPolicy entries, one per channel that
requires non-default behavior. When the coordinator builds a multicast or blind-unicast
frame, it checks whether the target channel_id appears in this list and applies any
overrides before sealing the packet.
Typical use cases:
- Unlicensed spectrum compliance — force
require_unencrypted = truefor channels that must operate under Part 15 / ISM-band rules where encryption is permissible but the channel operator has chosen to run openly. - Metadata reduction — force
require_full_source = truewhen receiving nodes need to resolve the sender without a prior key-exchange round-trip (e.g., a public beacon channel where all senders are first-contact). - Propagation budget — set
max_flood_hopsfor high-density channels where uncontrolled flooding would waste airtime.
Channels absent from the policy list use the permissive defaults inherited from
SendOptions.
Fields§
§channel_id: ChannelIdChannel to which this policy applies.
require_unencrypted: boolWhether the channel must be sent unencrypted.
require_full_source: boolWhether the channel requires the full source public key.
max_flood_hops: Option<u8>Optional maximum flood-hop budget.
Trait Implementations§
Source§impl Clone for ChannelPolicy
impl Clone for ChannelPolicy
Source§fn clone(&self) -> ChannelPolicy
fn clone(&self) -> ChannelPolicy
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelPolicy
impl Debug for ChannelPolicy
Source§impl PartialEq for ChannelPolicy
impl PartialEq for ChannelPolicy
impl Eq for ChannelPolicy
impl StructuralPartialEq for ChannelPolicy
Auto Trait Implementations§
impl Freeze for ChannelPolicy
impl RefUnwindSafe for ChannelPolicy
impl Send for ChannelPolicy
impl Sync for ChannelPolicy
impl Unpin for ChannelPolicy
impl UnwindSafe for ChannelPolicy
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)