#[non_exhaustive]pub struct TempOptions { /* private fields */ }Expand description
Options shared by temporary file and temporary directory creation.
§Examples
use qubit_fs::temp::TempOptions;
assert_eq!(TempOptions::default(), TempOptions::new());Implementations§
Source§impl TempOptions
impl TempOptions
Sourcepub const fn creates_parent(&self) -> bool
pub const fn creates_parent(&self) -> bool
Returns whether missing parent directories are created.
Sourcepub fn with_parent(self, parent: Option<Path>) -> Self
pub fn with_parent(self, parent: Option<Path>) -> Self
Replaces the optional parent directory or prefix.
Sourcepub fn with_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_prefix(self, prefix: impl Into<String>) -> Self
Replaces the generated resource name prefix.
Sourcepub fn with_suffix(self, suffix: impl Into<String>) -> Self
pub fn with_suffix(self, suffix: impl Into<String>) -> Self
Replaces the generated resource name suffix.
Sourcepub const fn with_create_parent(self, create: bool) -> Self
pub const fn with_create_parent(self, create: bool) -> Self
Replaces whether missing parent directories are created.
Trait Implementations§
Source§impl Clone for TempOptions
impl Clone for TempOptions
Source§fn clone(&self) -> TempOptions
fn clone(&self) -> TempOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TempOptions
impl Debug for TempOptions
Source§impl Default for TempOptions
impl Default for TempOptions
impl Eq for TempOptions
Source§impl PartialEq for TempOptions
impl PartialEq for TempOptions
impl StructuralPartialEq for TempOptions
Auto Trait Implementations§
impl Freeze for TempOptions
impl RefUnwindSafe for TempOptions
impl Send for TempOptions
impl Sync for TempOptions
impl Unpin for TempOptions
impl UnsafeUnpin for TempOptions
impl UnwindSafe for TempOptions
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