pub struct Condition(/* private fields */);
Expand description
A condition that a cache can depend on. Is automatically invalidated when dropped.
let cond = Condition::new();
let token = cond.token();
assert!(token.is_valid());
drop(cond);
assert!(!token.is_valid());
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl !UnwindSafe for Condition
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