[][src]Struct actix::sync::SyncArbiter

pub struct SyncArbiter<A> where
    A: Actor<Context = SyncContext<A>>, 
{ /* fields omitted */ }

Sync arbiter

Methods

impl<A> SyncArbiter<A> where
    A: Actor<Context = SyncContext<A>>, 
[src]

pub fn start<F>(threads: usize, factory: F) -> Addr<A> where
    F: Fn() -> A + Send + Sync + 'static, 
[src]

Start new sync arbiter with specified number of worker threads. Returns address of the started actor.

Trait Implementations

impl<A> Actor for SyncArbiter<A> where
    A: Actor<Context = SyncContext<A>>, 
[src]

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
    Self: Actor<Context = Context<Self>>, 
[src]

Start a new asynchronous actor, returning its address. Read more

fn start_default() -> Addr<Self> where
    Self: Actor<Context = Context<Self>> + Default
[src]

Construct and start a new asynchronous actor, returning its address. Read more

fn create<F>(f: F) -> Addr<Self> where
    Self: Actor<Context = Context<Self>>,
    F: FnOnce(&mut Context<Self>) -> Self + 'static, 
[src]

Start a new asynchronous actor given a Context. Read more

Auto Trait Implementations

impl<A> Send for SyncArbiter<A>

impl<A> Sync for SyncArbiter<A>

Blanket Implementations

impl<F, A> WrapFuture for F where
    A: Actor,
    F: Future
[src]

type Future = FutureWrap<F, A>

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<F> IntoFuture for F where
    F: Future
[src]

type Future = F

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

fn timeout(self, timeout: Duration) -> Timeout<Self>
[src]

Creates a new future which allows self until timeout. Read more