Struct elfo_core::Context[][src]

pub struct Context<C = (), K = Singleton, S = ()> { /* fields omitted */ }

Implementations

impl<C, K, S> Context<C, K, S>[src]

pub fn addr(&self) -> Addr[src]

pub fn config(&self) -> &C[src]

pub fn key(&self) -> &K[src]

pub fn with<S1>(self, source: S1) -> Context<C, K, Combined<S, S1>>[src]

pub fn set_status(&self, status: ActorStatus)[src]

pub async fn send<M: Message>(&self, message: M) -> Result<(), SendError<M>>[src]

pub fn request<R: Request>(
    &self,
    request: R
) -> RequestBuilder<'_, C, K, S, R, Any>
[src]

pub async fn send_to<M: Message>(
    &self,
    recipient: Addr,
    message: M
) -> Result<(), SendError<M>>
[src]

pub fn try_send_to<M: Message>(
    &self,
    recipient: Addr,
    message: M
) -> Result<(), TrySendError<M>>
[src]

pub fn respond<R: Request>(&self, token: ResponseToken<R>, message: R::Response)[src]

pub async fn recv(&mut self) -> Option<Envelope> where
    C: 'static,
    S: Source, 
[src]

pub fn try_recv(&mut self) -> Result<Envelope, TryRecvError> where
    C: 'static, 
[src]

pub fn unpack_config<'c>(&self, config: &'c AnyConfig) -> &'c C where
    C: for<'de> Deserialize<'de> + 'static, 
[src]

XXX: mb BoundEnvelope<C>?

pub fn pruned(&self) -> Context[src]

Trait Implementations

impl<C, K: Clone> Clone for Context<C, K>[src]

Auto Trait Implementations

impl<C = (), K = Singleton, S = ()> !RefUnwindSafe for Context<C, K, S>

impl<C, K, S> Send for Context<C, K, S> where
    C: Send + Sync,
    K: Send,
    S: Send

impl<C, K, S> Sync for Context<C, K, S> where
    C: Send + Sync,
    K: Sync,
    S: Sync

impl<C, K, S> Unpin for Context<C, K, S> where
    K: Unpin,
    S: Unpin

impl<C = (), K = Singleton, S = ()> !UnwindSafe for Context<C, K, S>

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> Instrument 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.