Struct kabuki::Builder
[−]
[src]
pub struct Builder { /* fields omitted */ }
Builds an actor
Methods
impl Builder
[src]
fn new() -> Builder
Returns a new actor Builder
with default settings
fn inbox_capacity(self, n: usize) -> Self
Sets the actor's inbox queue capacity.
The default value is 1024.
fn max_in_flight(self, n: usize) -> Self
Sets the max number of in-flight requests the actor can process concurrently.
The default value is 16
fn spawn<A, S>(self,
s: &S,
actor: A)
-> ActorRef<A::Request, A::Response, A::Error> where A: Actor, S: Spawn<ActorCell<A>>
s: &S,
actor: A)
-> ActorRef<A::Request, A::Response, A::Error> where A: Actor, S: Spawn<ActorCell<A>>
Spawn a new actor
fn spawn_fn<F, T, U, S>(self, s: &S, f: F) -> ActorRef<T, U::Item, U::Error> where F: FnMut(T) -> U, U: IntoFuture, S: Spawn<ActorCell<ActorFn<F, T>>>
Spawn the given closure as an actor