pub(crate) struct ProbeActor {
pub(crate) config: ActorConfig,
pub(crate) mailbox_tx: Sender<Message>,
pub(crate) mailbox_rx: Option<Receiver<Message>>,
pub(crate) metrics: Arc<ActorMetrics>,
pub(crate) starts: Arc<AtomicU64>,
pub(crate) crash_remaining: Arc<AtomicU64>,
}Fields§
§config: ActorConfig§mailbox_tx: Sender<Message>§mailbox_rx: Option<Receiver<Message>>§metrics: Arc<ActorMetrics>§starts: Arc<AtomicU64>§crash_remaining: Arc<AtomicU64>Implementations§
Trait Implementations§
Source§impl Actor for ProbeActor
impl Actor for ProbeActor
Source§fn state(&self) -> ActorState
fn state(&self) -> ActorState
Return the current lifecycle state.
Source§fn metrics(&self) -> Arc<ActorMetrics>
fn metrics(&self) -> Arc<ActorMetrics>
Return a reference to this actor’s metrics.
Source§fn handle_message<'life0, 'async_trait>(
&'life0 mut self,
_msg: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_message<'life0, 'async_trait>(
&'life0 mut self,
_msg: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called with each incoming message from the mailbox.
Source§fn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Drive the actor’s main loop. Read more
Source§fn is_protected(&self) -> bool
fn is_protected(&self) -> bool
Return whether this actor is protected from external kill commands.
Source§fn on_start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called once after the actor is created, before the message loop starts.
Auto Trait Implementations§
impl Freeze for ProbeActor
impl RefUnwindSafe for ProbeActor
impl Send for ProbeActor
impl Sync for ProbeActor
impl Unpin for ProbeActor
impl UnwindSafe for ProbeActor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more