pub struct WritePermit { /* private fields */ }Expand description
WritePermit: requires who get it need to populate the cache and then release it
Implementations§
Source§impl WritePermit
impl WritePermit
Sourcepub fn new(
timeout: Duration,
stale_writer: bool,
extensions: Extensions,
) -> (WritePermit, LockStub)
pub fn new( timeout: Duration, stale_writer: bool, extensions: Extensions, ) -> (WritePermit, LockStub)
Create a new lock, with a permit to be given to the associated writer.
Sourcepub fn stale_writer(&self) -> bool
pub fn stale_writer(&self) -> bool
Was this lock for a stale cache fetch writer?
pub fn unlock(&mut self, reason: LockStatus)
pub fn lock_status(&self) -> LockStatus
pub fn extensions(&self) -> &Extensions
Trait Implementations§
Source§impl Debug for WritePermit
impl Debug for WritePermit
Auto Trait Implementations§
impl Freeze for WritePermit
impl !RefUnwindSafe for WritePermit
impl Send for WritePermit
impl Sync for WritePermit
impl Unpin for WritePermit
impl !UnwindSafe for WritePermit
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