pub struct TemporaryWorkspace { /* private fields */ }Expand description
Private native-tool files retaining one shared temporary-storage reservation.
External writers cannot be prevented portably from exceeding a reservation.
Hosts must call check_size while the tool runs, terminate an offending
writer, and check again before consuming its outputs.
Implementations§
Source§impl TemporaryWorkspace
impl TemporaryWorkspace
Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
Directory owned by this reservation, never a caller’s existing directory.
Sourcepub fn check_size(&self) -> Result<u64, SpillError>
pub fn check_size(&self) -> Result<u64, SpillError>
Checks regular files against the retained byte and file-count reservations. Subdirectories and symlinks are refused rather than traversed.
§Errors
Returns a disk-budget or I/O error for oversized or unsupported output.
Trait Implementations§
Source§impl Debug for TemporaryWorkspace
impl Debug for TemporaryWorkspace
Source§impl Drop for TemporaryWorkspace
impl Drop for TemporaryWorkspace
Auto Trait Implementations§
impl Freeze for TemporaryWorkspace
impl RefUnwindSafe for TemporaryWorkspace
impl Send for TemporaryWorkspace
impl Sync for TemporaryWorkspace
impl Unpin for TemporaryWorkspace
impl UnsafeUnpin for TemporaryWorkspace
impl UnwindSafe for TemporaryWorkspace
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
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 more