[][src]Struct actix::actors::mocker::Mocker

pub struct Mocker<T: Sized + Unpin + 'static> { /* fields omitted */ }

This actor is able to wrap another actor and accept all the messages the wrapped actor can, passing it to a closure which can mock the response of the actor.

Implementations

impl<T: Unpin> Mocker<T>[src]

pub fn mock(
    mock: Box<dyn FnMut(Box<dyn Any>, &mut Context<Mocker<T>>) -> Box<dyn Any>>
) -> Mocker<T>
[src]

Trait Implementations

impl<T: Sized + Unpin + 'static> Actor for Mocker<T>[src]

type Context = Context<Self>

Actor execution context type

impl<T: ArbiterService> ArbiterService for Mocker<T>[src]

impl<T: Unpin> Default for Mocker<T>[src]

impl<M: 'static, T: Sized + Unpin + 'static> Handler<M> for Mocker<T> where
    M: Message,
    <M as Message>::Result: MessageResponse<Mocker<T>, M>, 
[src]

type Result = M::Result

The type of value that this handler will return. Read more

impl<T: Unpin> Supervised for Mocker<T>[src]

impl<T: SystemService> SystemService for Mocker<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Mocker<T>

impl<T> !Send for Mocker<T>

impl<T> !Sync for Mocker<T>

impl<T> Unpin for Mocker<T>

impl<T> !UnwindSafe for Mocker<T>

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, 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>,