Struct heph_rt::access::ThreadSafe
source · [−]pub struct ThreadSafe { /* private fields */ }Expand description
Provides access to the thread-safe parts of the runtime.
This implements the Access trait, which is required by various APIs to
get access to the runtime.
This is usually a part of the actor::Context, see it for more
information.
Implementations
sourceimpl ThreadSafe
impl ThreadSafe
sourcepub fn spawn_future<Fut>(&mut self, future: Fut, options: FutureOptions) where
Fut: Future<Output = ()> + Send + Sync + 'static,
pub fn spawn_future<Fut>(&mut self, future: Fut, options: FutureOptions) where
Fut: Future<Output = ()> + Send + Sync + 'static,
Spawn a thread-safe Future.
See RuntimeRef::spawn_future for more documentation.
Trait Implementations
sourceimpl Clone for ThreadSafe
impl Clone for ThreadSafe
sourcefn clone(&self) -> ThreadSafe
fn clone(&self) -> ThreadSafe
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ThreadSafe
impl Debug for ThreadSafe
sourceimpl<S, NA> Spawn<S, NA, ThreadSafe> for ThreadLocal where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
impl<S, NA> Spawn<S, NA, ThreadSafe> for ThreadLocal where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
sourcefn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
fn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
Attempts to spawn an actor. Read more
sourcefn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
fn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
Spawn an actor. Read more
sourceimpl<S, NA> Spawn<S, NA, ThreadSafe> for ThreadSafe where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
impl<S, NA> Spawn<S, NA, ThreadSafe> for ThreadSafe where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
sourcefn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
fn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
Attempts to spawn an actor. Read more
sourcefn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
fn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
Spawn an actor. Read more
sourceimpl<S, NA> Spawn<S, NA, ThreadSafe> for Sync where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
impl<S, NA> Spawn<S, NA, ThreadSafe> for Sync where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
sourcefn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
fn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
Attempts to spawn an actor. Read more
sourcefn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
fn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
Spawn an actor. Read more
sourceimpl<S, NA> Spawn<S, NA, ThreadSafe> for Runtime where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
impl<S, NA> Spawn<S, NA, ThreadSafe> for Runtime where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
sourcefn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
fn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
Attempts to spawn an actor. Read more
sourcefn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
fn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
Spawn an actor. Read more
sourceimpl<S, NA> Spawn<S, NA, ThreadSafe> for RuntimeRef where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
impl<S, NA> Spawn<S, NA, ThreadSafe> for RuntimeRef where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Send + Sync + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
sourcefn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
fn try_spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA>,
NA: NewActor<RuntimeAccess = RT>,
Attempts to spawn an actor. Read more
sourcefn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
fn spawn(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA>,
NA: NewActor<Error = !, RuntimeAccess = RT>,
Spawn an actor. Read more
impl Access for ThreadSafe
Auto Trait Implementations
impl RefUnwindSafe for ThreadSafe
impl Send for ThreadSafe
impl Sync for ThreadSafe
impl Unpin for ThreadSafe
impl UnwindSafe for ThreadSafe
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more