[−][src]Struct actix::actors::mocker::Mocker
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.
Methods
impl<T> Mocker<T>
[src]
impl<T> Mocker<T>
pub fn mock( | [src] |
Trait Implementations
impl<T: Sized + 'static> Actor for Mocker<T>
[src]
impl<T: Sized + 'static> Actor for Mocker<T>
type Context = Context<Self>
Actor execution context type
fn started(&mut self, ctx: &mut Self::Context) | [src] |
Called when an actor gets polled the first time.
fn stopping(&mut self, ctx: &mut Self::Context) -> Running | [src] |
Called after an actor is in Actor::Stopping
state. Read more
fn stopped(&mut self, ctx: &mut Self::Context) | [src] |
Called after an actor is stopped. Read more
fn start(self) -> Addr<Self> where | [src] |
Start a new asynchronous actor, returning its address. Read more
fn start_default() -> Addr<Self> where | [src] |
Construct and start a new asynchronous actor, returning its address. Read more
fn create<F>(f: F) -> Addr<Self> where | [src] |
Start a new asynchronous actor given a Context
. Read more
impl<T> Supervised for Mocker<T>
[src]
impl<T> Supervised for Mocker<T>
fn restarting(&mut self, ctx: &mut Self::Context) | [src] |
Called when the supervisor restarts a failed actor.
impl<M: 'static, T: Sized + 'static> Handler<M> for Mocker<T> where
M: Message,
<M as Message>::Result: MessageResponse<Mocker<T>, M>,
[src]
impl<M: 'static, T: Sized + 'static> Handler<M> for Mocker<T> where
M: Message,
<M as Message>::Result: MessageResponse<Mocker<T>, M>,
type Result = M::Result
The type of value that this handler will return.
fn handle(&mut self, msg: M, ctx: &mut Self::Context) -> M::Result | [src] |
impl<T: ArbiterService> ArbiterService for Mocker<T>
[src]
impl<T: ArbiterService> ArbiterService for Mocker<T>
fn start_service() -> Addr<Self> | [src] |
Construct and start arbiter service
fn service_started(&mut self, ctx: &mut Context<Self>) | [src] |
Method is called during service initialization.
fn from_registry() -> Addr<Self> | [src] |
Get actor's address from arbiter registry
impl<T: SystemService> SystemService for Mocker<T>
[src]
impl<T: SystemService> SystemService for Mocker<T>
fn start_service(sys: &Addr<Arbiter>) -> Addr<Self> | [src] |
Construct and start system service
fn service_started(&mut self, ctx: &mut Context<Self>) | [src] |
Method is called during service initialization.
fn from_registry() -> Addr<Self> | [src] |
Get actor's address from system registry
impl<T> Default for Mocker<T>
[src]
impl<T> Default for Mocker<T>
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Erased for T
impl<T> Erased for T