[−][src]Struct maxim::actors::ActorBuilder
A builder that can be used to create and spawn an actor. To get a builder, the user would ask
the actor system to create one using system.spawn()
and then to spawn the actor by means of
the the with
method on the builder. See ActorSystem::spawn
for more information.
Fields
name: Option<String>
The optional name of the actor which defaults to None
meaning the actor will be unnamed.
channel_size: Option<u16>
The size of the message channel for the actor which defaults to None
; meaning the
default for the actor system will be used for the message channel.
Methods
impl ActorBuilder
[src]
pub fn with<F, S, R>(self, state: S, processor: F) -> Result<Aid, SystemError> where
S: Send + Sync + 'static,
R: Future<Output = ActorResult<S>> + Send + 'static,
F: Processor<S, R> + 'static,
[src]
S: Send + Sync + 'static,
R: Future<Output = ActorResult<S>> + Send + 'static,
F: Processor<S, R> + 'static,
Completes the spawning of the the actor configured with this builder on the system,
consuming the builder in the process and using the provided state and handler. See
ActorSystem::spawn
for more information and examples.
pub fn name(self, name: impl Into<String>) -> Self
[src]
Set the name of the actor to the given string.
pub fn channel_size(self, size: u16) -> Self
[src]
Set the size of the channel to the given value instead of the default for the actor system that the actor is spawned on. Note that passing a value less than 1 will cause a panic and there would be little reason to do so anyway.
Trait Implementations
impl Clone for ActorBuilder
[src]
fn clone(&self) -> ActorBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for ActorBuilder
impl Send for ActorBuilder
impl Sync for ActorBuilder
impl Unpin for ActorBuilder
impl !UnwindSafe for ActorBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,