pub struct ManagedTempFile { /* private fields */ }Expand description
Default temporary file backed by an Arc filesystem and path.
Implementations§
Trait Implementations§
Source§impl Debug for ManagedTempFile
impl Debug for ManagedTempFile
Source§impl Drop for ManagedTempFile
impl Drop for ManagedTempFile
Source§impl TempFile for ManagedTempFile
impl TempFile for ManagedTempFile
Source§fn persist(
self: Box<Self>,
target: &FsPath,
options: &PersistOptions,
) -> FsResult<WriteOutcome>
fn persist( self: Box<Self>, target: &FsPath, options: &PersistOptions, ) -> FsResult<WriteOutcome>
Persists the temporary file to a target path. Read more
Source§fn open_reader(&self, options: &ReadOptions) -> FsResult<Box<dyn FileReader>>
fn open_reader(&self, options: &ReadOptions) -> FsResult<Box<dyn FileReader>>
Opens the temporary file for reading. Read more
Source§fn open_writer(&self, options: &WriteOptions) -> FsResult<Box<dyn FileWriter>>
fn open_writer(&self, options: &WriteOptions) -> FsResult<Box<dyn FileWriter>>
Opens the temporary file for writing. Read more
Source§impl TempResource for ManagedTempFile
impl TempResource for ManagedTempFile
Source§fn fs(&self) -> Arc<dyn FileSystem>
fn fs(&self) -> Arc<dyn FileSystem>
Returns the filesystem that owns this temporary resource. Read more
Source§fn cleanup(self: Box<Self>) -> FsResult<()>
fn cleanup(self: Box<Self>) -> FsResult<()>
Explicitly cleans up the temporary resource. Read more
Source§fn keep(self: Box<Self>) -> FsResult<FsPath>
fn keep(self: Box<Self>) -> FsResult<FsPath>
Keeps the temporary resource and disables automatic cleanup. Read more
Source§fn resource(&self) -> FileResource
fn resource(&self) -> FileResource
Converts this temporary handle to an ordinary bound file resource. Read more
Auto Trait Implementations§
impl Freeze for ManagedTempFile
impl !RefUnwindSafe for ManagedTempFile
impl Send for ManagedTempFile
impl Sync for ManagedTempFile
impl Unpin for ManagedTempFile
impl UnsafeUnpin for ManagedTempFile
impl !UnwindSafe for ManagedTempFile
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> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.