pub struct ChannelSettings {
pub mode: ChannelMode,
pub direction: ChannelDirection,
pub criticality: ChannelCriticality,
}Expand description
Configuration for a channel: delivery mode, traffic direction, and priority criticality.
Fields§
§mode: ChannelModeDelivery semantics (ordered/unordered, reliable/unreliable, or tick-buffered).
direction: ChannelDirectionWhich endpoint(s) may send on this channel.
criticality: ChannelCriticalityPriority tier used by the unified priority-sort send loop. Contributes
base_gain() per tick of message age to each message’s on-the-fly
accumulator. Defaults via ChannelCriticality::default_for(&mode).
Implementations§
Source§impl ChannelSettings
impl ChannelSettings
Sourcepub fn new(mode: ChannelMode, direction: ChannelDirection) -> Self
pub fn new(mode: ChannelMode, direction: ChannelDirection) -> Self
Creates a ChannelSettings with the given mode and direction, deriving default criticality from the mode.
Sourcepub fn with_criticality(self, criticality: ChannelCriticality) -> Self
pub fn with_criticality(self, criticality: ChannelCriticality) -> Self
Override the channel’s priority tier. Builder-style.
Sourcepub fn reliable(&self) -> bool
pub fn reliable(&self) -> bool
Returns true if this channel guarantees delivery (all reliable modes).
Sourcepub fn tick_buffered(&self) -> bool
pub fn tick_buffered(&self) -> bool
Returns true if this channel uses tick-buffered delivery.
Sourcepub fn can_send_to_server(&self) -> bool
pub fn can_send_to_server(&self) -> bool
Returns true if the client may send on this channel.
Sourcepub fn can_send_to_client(&self) -> bool
pub fn can_send_to_client(&self) -> bool
Returns true if the server may send on this channel.
Sourcepub fn can_request_and_respond(&self) -> bool
pub fn can_request_and_respond(&self) -> bool
Returns true if this channel supports bidirectional reliable request/response messaging.
Trait Implementations§
Source§impl Clone for ChannelSettings
impl Clone for ChannelSettings
Source§fn clone(&self) -> ChannelSettings
fn clone(&self) -> ChannelSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more