pub struct FileLease { /* private fields */ }Expand description
Places taken from a budget in one wait, for one piece of work. The work’s openers share it by cloning it. The places go back to the budget once the lease, every place taken from it and every file opened in one are gone.
Implementations§
Source§impl FileLease
impl FileLease
Sourcepub async fn place(&self) -> LeasePlace
pub async fn place(&self) -> LeasePlace
One place of this lease, for one open. It waits only for a place the work’s own files give back, never for the budget.
Sourcepub fn place_blocking(&self) -> LeasePlace
pub fn place_blocking(&self) -> LeasePlace
Self::place, blocking this thread. Call it only off the async
workers: on the blocking pool or a thread of the caller’s own.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileLease
impl RefUnwindSafe for FileLease
impl Send for FileLease
impl Sync for FileLease
impl Unpin for FileLease
impl UnsafeUnpin for FileLease
impl UnwindSafe for FileLease
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.