pub struct IOAgent { /* private fields */ }Expand description
The UI gateway actor.
Implementations§
Source§impl IOAgent
impl IOAgent
pub fn new(config: ActorConfig, system: ActorSystem) -> Self
Sourcepub fn with_publisher(self, p: EventPublisher) -> Self
pub fn with_publisher(self, p: EventPublisher) -> Self
Attach an EventPublisher for MQTT output.
Trait Implementations§
Source§impl Actor for IOAgent
impl Actor for IOAgent
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 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<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called once after the actor is created, before the message loop starts.
Source§fn handle_message<'life0, 'async_trait>(
&'life0 mut self,
message: 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,
message: 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 on_heartbeat<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_heartbeat<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called on heartbeat tick; default implementation is a no-op.
Auto Trait Implementations§
impl Freeze for IOAgent
impl !RefUnwindSafe for IOAgent
impl Send for IOAgent
impl Sync for IOAgent
impl Unpin for IOAgent
impl !UnwindSafe for IOAgent
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