struct
Cancel
pub struct Cancel(/* private */);Stops something when dropped.
Methods
new
pub fn new(f: impl FnOnce() + 'static) -> CancelA cancel that runs f, once, when cancelled or dropped.
struct
pub struct Cancel(/* private */);Stops something when dropped.
pub fn new(f: impl FnOnce() + 'static) -> CancelA cancel that runs f, once, when cancelled or dropped.