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 [behavior!] 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. A behavior 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.