pub struct Shutter { /* private fields */ }
Expand description
Examples
use std::thread;
use std::time::Duration;
#[test]
fn test_func() {
let shutter = Shutter::new();
shutter.spawn(|| println!("testing"));
shutter.spawn(|| thread::sleep(Duration::from_millis(300)));
shutter.timeout(Duration::from_millis(500));
}
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Shutter
impl !RefUnwindSafe for Shutter
impl Send for Shutter
impl !Sync for Shutter
impl Unpin for Shutter
impl UnwindSafe for Shutter
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