Struct heph_inbox::Id
source · [−]pub struct Id(_);
Expand description
Identifier of a channel.
This type can be created by calling Sender::id
or Receiver::id
and
be used to identify channels. It only use case is to compare two ids with
one another, if two id are the same the sender(s) and receiver(s) point to
the same channel.
Notes
The id is only valid for the lifetime of the channel. Once the channel is dropped all ids of the channel are invalidated and might return incorrect results after.
The methods Sender::same_channel
and Sender::sends_to
should be
preferred over using this type as they are less error-prone.
Trait Implementations
sourceimpl PartialEq<Id> for Id
impl PartialEq<Id> for Id
impl Copy for Id
impl Eq for Id
impl StructuralEq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more