Skip to main content

ActorRefFactory

Trait ActorRefFactory 

Source
pub trait ActorRefFactory {
    type Message: MessageBounds;

    // Required method
    fn actor_ref(&self) -> ActorRef<Self::Message>;
}
Expand description

A trait for things that have associated actor references

Required Associated Types§

Source

type Message: MessageBounds

The type of messages carried by references produced by this factory

Required Methods§

Source

fn actor_ref(&self) -> ActorRef<Self::Message>

Returns the associated actor reference

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<CD: ComponentTraits> ActorRefFactory for Arc<Component<CD>>

Source§

impl<M: MessageBounds> ActorRefFactory for Arc<dyn AbstractComponent<Message = M>>

Implementors§