pub struct LeasePlace { /* private fields */ }Expand description
One place of a lease, taken for one open: a file of a user, or a stream whose bytes come from no such file. It goes back to its lease when it drops.
Implementations§
Source§impl LeasePlace
impl LeasePlace
Sourcepub async fn for_test() -> LeasePlace
pub async fn for_test() -> LeasePlace
One place of a budget of its own, for a test that opens a file without a budget to watch.
Source§impl LeasePlace
impl LeasePlace
Sourcepub fn open(self, path: &Path) -> Result<LeasedFile<File>, Error>
pub fn open(self, path: &Path) -> Result<LeasedFile<File>, Error>
Open the file at path in this place. A failed open gives the place
back.
Sourcepub async fn open_async(self, path: &Path) -> Result<LeasedFile<File>, Error>
pub async fn open_async(self, path: &Path) -> Result<LeasedFile<File>, Error>
Open the file at path in this place, as Self::open.
Trait Implementations§
Source§impl Drop for LeasePlace
impl Drop for LeasePlace
Auto Trait Implementations§
impl Freeze for LeasePlace
impl RefUnwindSafe for LeasePlace
impl Send for LeasePlace
impl Sync for LeasePlace
impl Unpin for LeasePlace
impl UnsafeUnpin for LeasePlace
impl UnwindSafe for LeasePlace
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
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.