pub struct OrphanGuard { /* private fields */ }Expand description
A running watch on a supervising process.
Implementations§
Source§impl OrphanGuard
impl OrphanGuard
Sourcepub fn watch(
parent: u32,
runtime: &NodeRuntime,
source: Arc<EventSource>,
interval: Duration,
) -> Self
pub fn watch( parent: u32, runtime: &NodeRuntime, source: Arc<EventSource>, interval: Duration, ) -> Self
Starts watching parent, stopping source when it disappears.
Sourcepub fn maybe_watch(
parent: Option<u32>,
runtime: &NodeRuntime,
source: Arc<EventSource>,
interval: Duration,
) -> Option<Self>
pub fn maybe_watch( parent: Option<u32>, runtime: &NodeRuntime, source: Arc<EventSource>, interval: Duration, ) -> Option<Self>
Starts a guard only if parent is set (§4.2: the guard is optional).
Sourcepub fn poll_count(&self) -> u64
pub fn poll_count(&self) -> u64
How many polls the watch has performed.
Trait Implementations§
Source§impl Debug for OrphanGuard
impl Debug for OrphanGuard
Source§impl Drop for OrphanGuard
impl Drop for OrphanGuard
Auto Trait Implementations§
impl Freeze for OrphanGuard
impl RefUnwindSafe for OrphanGuard
impl Send for OrphanGuard
impl Sync for OrphanGuard
impl Unpin for OrphanGuard
impl UnsafeUnpin for OrphanGuard
impl UnwindSafe for OrphanGuard
Blanket Implementations§
impl<T> Allocation for T
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