pub struct Monitor { /* private fields */ }Implementations§
Source§impl Monitor
impl Monitor
pub fn new(name: &str) -> Self
pub fn with_trigger( self, trigger: (Arc<Sender<()>>, Arc<Mutex<Receiver<()>>>), ) -> Self
pub fn with_on_start<F, Fut>(self, task: F) -> Self
pub fn with_on_exit<F, Fut>(self, task: F) -> Self
pub async fn run<F, Fut>(&self, task: F)
pub async fn stop(&self) -> Result<(), SendError<()>>
pub fn name(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Monitor
impl !UnwindSafe for Monitor
impl Freeze for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin for Monitor
impl UnsafeUnpin for Monitor
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