pub struct DaemonHandle {
pub origin_hash: u64,
pub entity_id: EntityId,
/* private fields */
}Expand description
Handle to a running daemon. Clone-safe; dropping does not stop
the daemon — call DaemonRuntime::stop explicitly.
Fields§
§origin_hash: u64Daemon’s 64-bit origin hash. Stable for the daemon’s lifetime and across migrations.
entity_id: EntityIdDaemon’s full 32-byte entity id.
Implementations§
Source§impl DaemonHandle
impl DaemonHandle
Sourcepub fn stats(&self) -> Result<DaemonStats, DaemonError>
pub fn stats(&self) -> Result<DaemonStats, DaemonError>
Read the daemon’s current stats.
Sourcepub async fn snapshot(&self) -> Result<Option<StateSnapshot>, DaemonError>
pub async fn snapshot(&self) -> Result<Option<StateSnapshot>, DaemonError>
Take a snapshot of the daemon’s current state. Ok(None) for
stateless daemons.
Trait Implementations§
Source§impl Clone for DaemonHandle
impl Clone for DaemonHandle
Source§fn clone(&self) -> DaemonHandle
fn clone(&self) -> DaemonHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DaemonHandle
impl !UnwindSafe for DaemonHandle
impl Freeze for DaemonHandle
impl Send for DaemonHandle
impl Sync for DaemonHandle
impl Unpin for DaemonHandle
impl UnsafeUnpin for DaemonHandle
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