pub struct ChannelState {
pub lifecycle: ChannelLifecycle,
pub send_credits: u32,
pub cancelled: bool,
pub frames_sent: u64,
pub frames_received: u64,
}Expand description
Per-channel state tracked by the session.
Fields§
§lifecycle: ChannelLifecycleChannel lifecycle state.
send_credits: u32Available credits for sending on this channel.
cancelled: boolWhether this channel has been cancelled.
frames_sent: u64Number of data frames sent.
frames_received: u64Number of data frames received.
Implementations§
Source§impl ChannelState
impl ChannelState
Sourcepub fn can_receive(&self) -> bool
pub fn can_receive(&self) -> bool
Check if we can receive on this channel.
Sourcepub fn mark_local_eos(&mut self)
pub fn mark_local_eos(&mut self)
Transition state after we send EOS.
Sourcepub fn mark_remote_eos(&mut self)
pub fn mark_remote_eos(&mut self)
Transition state after receiving EOS from peer.
Trait Implementations§
Source§impl Clone for ChannelState
impl Clone for ChannelState
Source§fn clone(&self) -> ChannelState
fn clone(&self) -> ChannelState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelState
impl Debug for ChannelState
Auto Trait Implementations§
impl Freeze for ChannelState
impl RefUnwindSafe for ChannelState
impl Send for ChannelState
impl Sync for ChannelState
impl Unpin for ChannelState
impl UnwindSafe for ChannelState
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