Skip to main content

ActorSlot

Struct ActorSlot 

Source
pub struct ActorSlot<R: Reactor> {
    pub path: ActorPath,
    pub addr: AddrHash,
    pub mailbox_tx: MailboxSender,
    pub ctrl_tx: UnboundedSender<LifecycleSignal<R>>,
    pub task_handle: Arc<Mutex<Option<Box<dyn SpawnHandle>>>>,
    pub supervisor_addr: Option<AddrHash>,
    pub running: Arc<AtomicBool>,
    pub restart_count: Arc<AtomicU32>,
    pub message_count: Arc<AtomicU64>,
    pub compute_time_ns: Arc<AtomicU64>,
}
Expand description

A slot in the actor registry.

Fields§

§path: ActorPath§addr: AddrHash§mailbox_tx: MailboxSender§ctrl_tx: UnboundedSender<LifecycleSignal<R>>§task_handle: Arc<Mutex<Option<Box<dyn SpawnHandle>>>>§supervisor_addr: Option<AddrHash>§running: Arc<AtomicBool>§restart_count: Arc<AtomicU32>

Times this actor path has been restarted by its supervisor.

§message_count: Arc<AtomicU64>

Total successful on_message completions. Shared with the actor task so the task can increment without holding the registry lock.

§compute_time_ns: Arc<AtomicU64>

Total wall-clock nanoseconds spent in lifecycle hooks.

Auto Trait Implementations§

§

impl<R> Freeze for ActorSlot<R>

§

impl<R> !RefUnwindSafe for ActorSlot<R>

§

impl<R> Send for ActorSlot<R>

§

impl<R> Sync for ActorSlot<R>

§

impl<R> Unpin for ActorSlot<R>

§

impl<R> UnsafeUnpin for ActorSlot<R>

§

impl<R> !UnwindSafe for ActorSlot<R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

Source§

fn upcast(self) -> T

Source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

Source§

fn upcast_from(value: Counter<T, B>) -> T

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V