Struct wactor::Bridge[][src]

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

Bridge to an actor. Can be cloned for multiple owners. Actor is dropped when all bridges have been dropped.

Implementations

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

pub fn send(&self, msg: A::Input) -> Result<(), ()>[src]

Send input message. This fails if the actor has panicked.

pub fn receive(&self) -> Result<A::Output, ()>[src]

Block until a response is received. This fails if the actor has panicked.

Trait Implementations

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

impl<'de, A: Actor> Deserialize<'de> for Bridge<A>[src]

impl<A: Actor> Serialize for Bridge<A>[src]

Auto Trait Implementations

impl<A> !RefUnwindSafe for Bridge<A>

impl<A> !Send for Bridge<A>

impl<A> !Sync for Bridge<A>

impl<A> Unpin for Bridge<A> where
    <A as Actor>::Input: Unpin,
    <A as Actor>::Output: Unpin

impl<A> UnwindSafe for Bridge<A> where
    <A as Actor>::Input: UnwindSafe,
    <A as Actor>::Output: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.