pub struct ManagedTempDir { /* private fields */ }Expand description
Default temporary directory backed by an Arc filesystem and path.
Implementations§
Trait Implementations§
Source§impl Debug for ManagedTempDir
impl Debug for ManagedTempDir
Source§impl Drop for ManagedTempDir
impl Drop for ManagedTempDir
Source§impl TempDir for ManagedTempDir
impl TempDir for ManagedTempDir
Source§fn persist(
self: Box<Self>,
target: &FsPath,
options: &PersistOptions,
) -> FsResult<()>
fn persist( self: Box<Self>, target: &FsPath, options: &PersistOptions, ) -> FsResult<()>
Persists the temporary directory to a target path. Read more
Source§fn list(&self, options: &ListOptions) -> FsResult<Box<dyn DirectoryStream>>
fn list(&self, options: &ListOptions) -> FsResult<Box<dyn DirectoryStream>>
Lists child entries under the temporary directory. Read more
Source§fn child(&self, name: &str) -> FsResult<FileResource>
fn child(&self, name: &str) -> FsResult<FileResource>
Builds a child resource under the temporary directory. Read more
Source§fn create_child_dir(
&self,
name: &str,
options: &CreateDirOptions,
) -> FsResult<FileResource>
fn create_child_dir( &self, name: &str, options: &CreateDirOptions, ) -> FsResult<FileResource>
Creates and returns a child directory under this temporary directory. Read more
Source§impl TempResource for ManagedTempDir
impl TempResource for ManagedTempDir
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 ManagedTempDir
impl !RefUnwindSafe for ManagedTempDir
impl Send for ManagedTempDir
impl Sync for ManagedTempDir
impl Unpin for ManagedTempDir
impl UnsafeUnpin for ManagedTempDir
impl !UnwindSafe for ManagedTempDir
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.