Struct heph::rt::ThreadLocal[][src]

pub struct ThreadLocal { /* fields omitted */ }
Expand description

Provides access to the thread-local runtime.

This implements the Access trait, which is required by various APIs to get access to the runtime. Furthermore this gives access to a RuntimeRef for users.

This is usually a part of the actor::Context, see it for more information.

This is an optimised version of ThreadSafe, but doesn’t allow the actor to move between threads.

Methods from Deref<Target = RuntimeRef>

Attempt to spawn a new thread-local actor.

See the Spawn trait for more information.

Spawn a new thread-local actor.

See the Spawn trait for more information.

Attempt to spawn a new thread-safe actor.

See the Spawn trait for more information.

Spawn a new thread-safe actor.

See the Spawn trait for more information.

Spawn a thread-local Future.

Similar to thread-local actors this will only run on a single thread. See the discussion of thread-local vs. thread-safe actors in the actor module for additional information.

Spawn a thread-safe Future.

Similar to thread-safe actors this can run on any of the workers threads. See the discussion of thread-local vs. thread-safe actors in the actor module for additional information.

Receive process signals as messages.

This adds the actor_ref to the list of actor references that will receive a process signal.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Attempts to spawn an actor. Read more

Spawn an actor. Read more

Attempts to spawn an actor. Read more

Spawn an actor. Read more

Attempts to spawn an actor. Read more

Spawn an actor. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.