pub struct SpawnBuilderWithAddress<'a, A: Actor, F: FnOnce() -> A> { /* private fields */ }Expand description
After having configured the builder with an address
it is possible to create and run the actor either on a new thread with Self::spawn()
or on the current thread with Self::run_and_block().
Implementations§
Source§impl<A: Actor<Context = Context<<A as Actor>::Message>>, F: FnOnce() -> A> SpawnBuilderWithAddress<'_, A, F>
impl<A: Actor<Context = Context<<A as Actor>::Message>>, F: FnOnce() -> A> SpawnBuilderWithAddress<'_, A, F>
Sourcepub fn run_and_block(self) -> Result<(), ActorError>
pub fn run_and_block(self) -> Result<(), ActorError>
Run this Actor on the current calling thread. This is a blocking call. This function will return when the Actor has stopped.
Auto Trait Implementations§
impl<'a, A, F> Freeze for SpawnBuilderWithAddress<'a, A, F>where
F: Freeze,
impl<'a, A, F> !RefUnwindSafe for SpawnBuilderWithAddress<'a, A, F>
impl<'a, A, F> Send for SpawnBuilderWithAddress<'a, A, F>where
F: Send,
impl<'a, A, F> Sync for SpawnBuilderWithAddress<'a, A, F>where
F: Sync,
impl<'a, A, F> Unpin for SpawnBuilderWithAddress<'a, A, F>where
F: Unpin,
impl<'a, A, F> !UnwindSafe for SpawnBuilderWithAddress<'a, A, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more