Struct heph_inbox::Sender [−][src]
Sending side of the channel.
Implementations
impl<T> Sender<T>
[src]
pub fn try_send(&self, value: T) -> Result<(), SendError<T>>
[src]
Attempts to send the value
into the channel.
pub fn send<'s>(&'s self, value: T) -> SendValue<'s, T>ⓘ
[src]
Returns a future that sends a value into the channel, waiting if the channel is full.
If the returned Future
returns an error it means the Receiver
and Manager
are disconnected and no more values will be read from
the channel. This is the same error as SendError::Disconnected
.
SendError::Full
will never be returned, the Future
will return
Poll::Pending
instead.
pub fn capacity(&self) -> usize
[src]
Returns the capacity of the channel.
pub fn is_connected(&self) -> bool
[src]
Returns true
if the Receiver
and or the Manager
are connected.
Notes
Unlike Receiver::is_connected
this method takes the Manager
into
account. This is done to support the use case in which an actor is
restarted and a new receiver is created for it.
pub fn has_manager(&self) -> bool
[src]
Returns true
if the Manager
is connected.
pub fn same_channel(&self, other: &Sender<T>) -> bool
[src]
Returns true
if senders send into the same channel.
pub fn sends_to(&self, receiver: &Receiver<T>) -> bool
[src]
Returns true
if this sender sends to the receiver
.
pub fn id(&self) -> Id
[src]
Returns the id of this sender.
Trait Implementations
impl<T> Clone for Sender<T>
[src]
Safety
Only 2 ^ 30
(a billion) Sender
s may be alive concurrently, more then
enough for all practical use cases.
impl<T> Debug for Sender<T>
[src]
impl<T> Drop for Sender<T>
[src]
impl<T: Send> Send for Sender<T>
[src]
impl<T> Sync for Sender<T>
[src]
impl<T> Unpin for Sender<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
impl<T> !UnwindSafe for Sender<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,