pub struct ChannelManager { /* private fields */ }Expand description
Manages multiple channels for a connection. Supports up to 255 channels per peer.
Implementations§
Source§impl ChannelManager
impl ChannelManager
Sourcepub fn new(channel_count: u8) -> Self
pub fn new(channel_count: u8) -> Self
Creates a new channel manager with the specified number of channels.
Sourcepub fn default_channels() -> Self
pub fn default_channels() -> Self
Creates a channel manager with default configuration (1 reliable ordered channel).
Sourcepub fn configure_channel(
&mut self,
id: u8,
delivery: DeliveryGuarantee,
ordering: OrderingGuarantee,
)
pub fn configure_channel( &mut self, id: u8, delivery: DeliveryGuarantee, ordering: OrderingGuarantee, )
Sets the configuration for a specific channel.
Sourcepub fn get_channel(&self, id: u8) -> Option<&Channel>
pub fn get_channel(&self, id: u8) -> Option<&Channel>
Gets a reference to a channel by ID.
Sourcepub fn channel_count(&self) -> u8
pub fn channel_count(&self) -> u8
Returns the total number of channels.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChannelManager
impl RefUnwindSafe for ChannelManager
impl Send for ChannelManager
impl Sync for ChannelManager
impl Unpin for ChannelManager
impl UnwindSafe for ChannelManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more