#[non_exhaustive]pub struct PersistOptions { /* private fields */ }Expand description
Options controlling temporary resource persistence.
§Examples
use qubit_fs::temp::PersistOptions;
assert!(!PersistOptions::default().overwrite());Implementations§
Source§impl PersistOptions
impl PersistOptions
Sourcepub const fn atomicity(&self) -> AtomicityRequirement
pub const fn atomicity(&self) -> AtomicityRequirement
Returns the required atomicity level.
Sourcepub const fn preserve_metadata(&self) -> MetadataPreservePolicy
pub const fn preserve_metadata(&self) -> MetadataPreservePolicy
Returns the metadata preservation policy.
Sourcepub const fn creates_parent(&self) -> bool
pub const fn creates_parent(&self) -> bool
Returns whether missing destination parents are created.
Sourcepub const fn with_create_parent(self) -> Self
pub const fn with_create_parent(self) -> Self
Enables recursive creation of a missing destination parent.
Sourcepub const fn with_overwrite(self, overwrite: bool) -> Self
pub const fn with_overwrite(self, overwrite: bool) -> Self
Replaces whether the destination may be overwritten.
Sourcepub const fn with_atomicity(self, atomicity: AtomicityRequirement) -> Self
pub const fn with_atomicity(self, atomicity: AtomicityRequirement) -> Self
Replaces the required atomicity level.
Sourcepub const fn with_preserve_metadata(
self,
preserve_metadata: MetadataPreservePolicy,
) -> Self
pub const fn with_preserve_metadata( self, preserve_metadata: MetadataPreservePolicy, ) -> Self
Replaces the metadata preservation policy.
Sourcepub fn validate_against(
&self,
capabilities: FileSystemCapabilities,
) -> Result<(), FsError>
pub fn validate_against( &self, capabilities: FileSystemCapabilities, ) -> Result<(), FsError>
Validates required persistence guarantees before provider side effects.
§Errors
Returns FsErrorKind::RequirementNotMet when atomic persistence is
required but the configured filesystem does not guarantee it.
Trait Implementations§
Source§impl Clone for PersistOptions
impl Clone for PersistOptions
Source§impl Debug for PersistOptions
impl Debug for PersistOptions
Source§impl Default for PersistOptions
impl Default for PersistOptions
impl Eq for PersistOptions
Source§impl PartialEq for PersistOptions
impl PartialEq for PersistOptions
impl StructuralPartialEq for PersistOptions
Auto Trait Implementations§
impl Freeze for PersistOptions
impl RefUnwindSafe for PersistOptions
impl Send for PersistOptions
impl Sync for PersistOptions
impl Unpin for PersistOptions
impl UnsafeUnpin for PersistOptions
impl UnwindSafe for PersistOptions
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