pub struct Channel<M> { /* private fields */ }Expand description
Contains all data that should be shared between Addresses, Inboxes and the Child.
Implementations§
Trait Implementations§
Source§impl<M: Send + 'static> AnyChannel for Channel<M>
impl<M: Send + 'static> AnyChannel for Channel<M>
Source§impl<M> DynChannel for Channel<M>
impl<M> DynChannel for Channel<M>
Source§fn close(&self) -> bool
fn close(&self) -> bool
Close the channel. Returns true if the channel was not closed before this.
Otherwise, this returns false.
§Notifies
- if
true-> all send_listeners & recv_listeners
Source§fn halt_some(&self, n: u32)
fn halt_some(&self, n: u32)
Halt n inboxes associated with this channel. If n >= #inboxes, all inboxes
will be halted. This might leave halt-count > inbox-count, however that’s not
a problem. If n > i32::MAX, n = i32::MAX.
§Notifies
- all recv-listeners
Source§fn process_count(&self) -> usize
fn process_count(&self) -> usize
Returns the amount of inboxes this channel has.
Source§fn address_count(&self) -> usize
fn address_count(&self) -> usize
Returns the amount of addresses this channel has.
Source§fn has_exited(&self) -> bool
fn has_exited(&self) -> bool
Whether all inboxes linked to this channel have exited.
Source§fn add_address(&self) -> usize
fn add_address(&self) -> usize
Add an Address to the channel, incrementing address-count by 1. Afterwards, a new Address may be created from this channel.
Returns the previous inbox-count
Source§fn remove_address(&self) -> usize
fn remove_address(&self) -> usize
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Whether the channel is bounded.
fn get_exit_listener(&self) -> EventListener
fn halt(&self)
Auto Trait Implementations§
impl<M> !Freeze for Channel<M>
impl<M> RefUnwindSafe for Channel<M>
impl<M> Send for Channel<M>where
M: Send,
impl<M> Sync for Channel<M>where
M: Send,
impl<M> Unpin for Channel<M>where
M: Unpin,
impl<M> UnwindSafe for Channel<M>
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