Trait Referable

Source
pub trait Referable:
    Named
    + Send
    + Sync { }
Expand description

Referable is a marker trait for types that can appear as remote references across process boundaries.

It is not limited to concrete Actor implementations. For example, façade types generated by [alias!] implement Referable so that you can hand out restricted or stable APIs while still using the same remote messaging machinery.

Implementing this trait means the type:

  • can be identified (Named) so the runtime knows what it is,
  • is safe to pass across threads (Send + Sync),
  • and can be carried in ActorRef<T> values across process boundaries.

In contrast, RemotableActor is the trait that marks actors that can actually be spawned remotely. An alias type may be a Referable but is never a RemotableActor.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Referable for ()

Source§

impl Referable for TestActor

Source§

impl Referable for CommActor

Source§

impl Referable for TestActor

Source§

impl Referable for LogClientActor

Source§

impl Referable for LogForwardActor

Source§

impl Referable for ProcMeshAgent

Source§

impl Referable for EmptyActor

Source§

impl Referable for HostMeshAgent

Source§

impl Referable for FailingCreateTestActor

Source§

impl Referable for TestActor

Source§

impl Referable for TestActorWithSupervisionHandling

Implementors§