Struct heph::rt::RuntimeRef [−][src]
pub struct RuntimeRef { /* fields omitted */ }
Expand description
A reference to a Runtime
.
This reference refers to the thread-local runtime, and thus can’t be shared across thread bounds. To share this reference (within the same thread) it can be cloned.
Implementations
pub fn try_spawn_local<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA> + 'static,
NA: NewActor<RuntimeAccess = ThreadLocal> + 'static,
NA::Actor: 'static,
pub fn try_spawn_local<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA> + 'static,
NA: NewActor<RuntimeAccess = ThreadLocal> + 'static,
NA::Actor: 'static,
Attempt to spawn a new thread-local actor.
See the Spawn
trait for more information.
pub fn spawn_local<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA> + 'static,
NA: NewActor<Error = !, RuntimeAccess = ThreadLocal> + 'static,
NA::Actor: 'static,
pub fn spawn_local<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA> + 'static,
NA: NewActor<Error = !, RuntimeAccess = ThreadLocal> + 'static,
NA::Actor: 'static,
Spawn a new thread-local actor.
See the Spawn
trait for more information.
pub fn try_spawn<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Sync + Send + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
pub fn try_spawn<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> Result<ActorRef<NA::Message>, NA::Error> where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<RuntimeAccess = ThreadSafe> + Sync + Send + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
Attempt to spawn a new thread-safe actor.
See the Spawn
trait for more information.
pub fn spawn<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<Error = !, RuntimeAccess = ThreadSafe> + Sync + Send + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
pub fn spawn<S, NA>(
&mut self,
supervisor: S,
new_actor: NA,
arg: NA::Argument,
options: ActorOptions
) -> ActorRef<NA::Message> where
S: Supervisor<NA> + Send + Sync + 'static,
NA: NewActor<Error = !, RuntimeAccess = ThreadSafe> + Sync + Send + 'static,
NA::Actor: Send + Sync + 'static,
NA::Message: Send,
Spawn a new thread-safe actor.
See the Spawn
trait for more information.
pub fn spawn_local_future<Fut>(&mut self, future: Fut, options: FutureOptions) where
Fut: Future<Output = ()> + 'static,
pub fn spawn_local_future<Fut>(&mut self, future: Fut, options: FutureOptions) where
Fut: Future<Output = ()> + 'static,
pub 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,
Receive process signals as messages.
This adds the actor_ref
to the list of actor references that will
receive a process signal.
Trait Implementations
impl<S, NA> Spawn<S, NA, ThreadLocal> for RuntimeRef where
S: Supervisor<NA> + 'static,
NA: NewActor<RuntimeAccess = ThreadLocal> + 'static,
NA::Actor: 'static,
impl<S, NA> Spawn<S, NA, ThreadLocal> for RuntimeRef where
S: Supervisor<NA> + 'static,
NA: NewActor<RuntimeAccess = ThreadLocal> + 'static,
NA::Actor: 'static,
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>,
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
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>,
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<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,
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>,
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
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>,
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
Auto Trait Implementations
impl !RefUnwindSafe for RuntimeRef
impl !Send for RuntimeRef
impl !Sync for RuntimeRef
impl Unpin for RuntimeRef
impl !UnwindSafe for RuntimeRef
Blanket Implementations
Mutably borrows from an owned value. Read more