pub struct ChanHandle(/* private fields */);
Expand description
Represents an open channel, owned by the application.
Must be released by calling Runner::channel_done()
Implementations§
Source§impl ChanHandle
impl ChanHandle
Sourcepub fn num(&self) -> ChanNum
pub fn num(&self) -> ChanNum
Returns the channel number
This can be used by applications as an index.
Channel numbers satisfy
0 <= num < sunset::config::MAX_CHANNELS
.
An index may be reused after a call to Runner::channel_done()
,
applications must take care not to keep using this num()
index after
that.
Trait Implementations§
Source§impl Debug for ChanHandle
impl Debug for ChanHandle
Source§impl Hash for ChanHandle
impl Hash for ChanHandle
Source§impl Ord for ChanHandle
impl Ord for ChanHandle
Source§fn cmp(&self, other: &ChanHandle) -> Ordering
fn cmp(&self, other: &ChanHandle) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ChanHandle
impl PartialEq for ChanHandle
Source§impl PartialOrd for ChanHandle
impl PartialOrd for ChanHandle
impl Eq for ChanHandle
impl StructuralPartialEq for ChanHandle
Auto Trait Implementations§
impl Freeze for ChanHandle
impl RefUnwindSafe for ChanHandle
impl Send for ChanHandle
impl Sync for ChanHandle
impl Unpin for ChanHandle
impl UnwindSafe for ChanHandle
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