Struct actix::dev::channel::AddressSender[][src]

pub struct AddressSender<A: Actor> { /* fields omitted */ }

The transmission end of a channel which is used to send values.

This is created by the channel method.

Implementations

impl<A: Actor> AddressSender<A>[src]

pub fn connected(&self) -> bool[src]

Is the channel still open

pub fn send<M>(
    &self,
    msg: M
) -> Result<OneshotReceiver<M::Result>, SendError<M>> where
    A: Handler<M>,
    A::Context: ToEnvelope<A, M>,
    M::Result: Send,
    M: Message + Send
[src]

Attempts to send a message on this Sender<A> with blocking.

This function must be called from inside of a task.

pub fn try_send<M>(&self, msg: M, park: bool) -> Result<(), SendError<M>> where
    A: Handler<M>,
    <A as Actor>::Context: ToEnvelope<A, M>,
    M::Result: Send,
    M: Message + Send + 'static, 
[src]

Attempts to send a message on this Sender<A> without blocking.

pub fn do_send<M>(&self, msg: M) -> Result<(), SendError<M>> where
    A: Handler<M>,
    <A as Actor>::Context: ToEnvelope<A, M>,
    M::Result: Send,
    M: Message + Send
[src]

Send a message on this Sender<A> without blocking.

This function does not park current task.

pub fn downgrade(&self) -> WeakAddressSender<A>[src]

Downgrade to WeakAddressSender which can later be upgraded

Trait Implementations

impl<A: Actor> Clone for AddressSender<A>[src]

impl<A: Actor> Debug for AddressSender<A>[src]

impl<A: Actor> Drop for AddressSender<A>[src]

impl<A: Actor> Eq for AddressSender<A>[src]

impl<A: Actor> Hash for AddressSender<A>[src]

impl<A: Actor> PartialEq<AddressSender<A>> for AddressSender<A>[src]

Auto Trait Implementations

impl<A> !RefUnwindSafe for AddressSender<A>

impl<A> Send for AddressSender<A>

impl<A> Sync for AddressSender<A>

impl<A> Unpin for AddressSender<A>

impl<A> !UnwindSafe for AddressSender<A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.