[−][src]Struct actix_rt::Arbiter
Methods
impl Arbiter
[src]
pub fn current() -> Arbiter
[src]
Returns current arbiter's address
pub fn stop(&self)
[src]
Stop arbiter
pub fn new() -> Arbiter
[src]
Spawn new thread and run event loop in spawned thread. Returns address of newly created arbiter.
pub fn spawn<F>(future: F) where
F: Future<Item = (), Error = ()> + 'static,
[src]
F: Future<Item = (), Error = ()> + 'static,
Spawn a future on the current thread.
pub fn spawn_fn<F, R>(f: F) where
F: FnOnce() -> R + 'static,
R: IntoFuture<Item = (), Error = ()> + 'static,
[src]
F: FnOnce() -> R + 'static,
R: IntoFuture<Item = (), Error = ()> + 'static,
Executes a future on the current thread.
pub fn send<F>(&self, future: F) where
F: Future<Item = (), Error = ()> + Send + 'static,
[src]
F: Future<Item = (), Error = ()> + Send + 'static,
Send a future on the arbiter's thread and spawn.
pub fn exec_fn<F>(&self, f: F) where
F: FnOnce() + Send + 'static,
[src]
F: FnOnce() + Send + 'static,
Send a function to the arbiter's thread and exeute.
pub fn exec<F, R>(&self, f: F) -> impl Future<Item = R, Error = Canceled> where
F: FnOnce() -> R + Send + 'static,
R: Send + 'static,
[src]
F: FnOnce() -> R + Send + 'static,
R: Send + 'static,
Send a function to the arbiter's thread, exeute and return result.
Trait Implementations
impl Clone for Arbiter
[src]
fn clone(&self) -> Arbiter
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Arbiter
[src]
impl Debug for Arbiter
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.