[][src]Struct lib3h_zombie_actor::GhostMessage

pub struct GhostMessage<MessageToSelf: 'static, MessageToOther: 'static, MessageToSelfResponse: 'static, Error: 'static> { /* fields omitted */ }

GhostContextEndpoints allow you to drain these incoming GhostMessages A GhostMessage contains the incoming request, as well as a hook to allow a response to automatically be returned.

Methods

impl<RequestToSelf: 'static, RequestToOther: 'static, RequestToSelfResponse: 'static, Error: 'static + Debug> GhostMessage<RequestToSelf, RequestToOther, RequestToSelfResponse, Error>[src]

pub fn test_constructor() -> Self[src]

pub fn take_message(&mut self) -> Option<RequestToSelf>[src]

most often you will want to consume the contents of the request using take prevents a clone

pub fn put_message(&mut self, msg: RequestToSelf)[src]

pub fn respond(
    self,
    payload: Result<RequestToSelfResponse, Error>
) -> GhostResult<()>
[src]

send a response back to the origin of this request

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

pub fn span(&self) -> &Span[src]

pub fn backtrace(&self) -> &Backtwrap[src]

Trait Implementations

impl<RequestToSelf: 'static, RequestToOther: 'static, RequestToSelfResponse: 'static, Error: 'static> Debug for GhostMessage<RequestToSelf, RequestToOther, RequestToSelfResponse, Error>[src]

Auto Trait Implementations

impl<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> RefUnwindSafe for GhostMessage<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> where
    MessageToSelf: RefUnwindSafe

impl<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> Send for GhostMessage<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> where
    Error: Send,
    MessageToOther: Send,
    MessageToSelf: Send,
    MessageToSelfResponse: Send

impl<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> Sync for GhostMessage<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> where
    Error: Send,
    MessageToOther: Send,
    MessageToSelf: Sync,
    MessageToSelfResponse: Send

impl<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> Unpin for GhostMessage<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> where
    MessageToSelf: Unpin

impl<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> UnwindSafe for GhostMessage<MessageToSelf, MessageToOther, MessageToSelfResponse, Error> where
    MessageToSelf: 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> Erased for T

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

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,