pub struct CreateDirectoryOutcome { /* private fields */ }Expand description
Result returned after a directory creation request.
§Examples
use qubit_fs::directory::CreateDirectoryOutcome;
let outcome = CreateDirectoryOutcome::new(false);
assert!(!outcome.already_existed());Implementations§
Source§impl CreateDirectoryOutcome
impl CreateDirectoryOutcome
Sourcepub const fn new(already_existed: bool) -> Self
pub const fn new(already_existed: bool) -> Self
Creates an outcome. already_existed reports an accepted existing
directory.
Sourcepub const fn already_existed(self) -> bool
pub const fn already_existed(self) -> bool
Returns whether an existing directory satisfied the request.
Sourcepub const fn with_created_ancestors(self, count: u64) -> Self
pub const fn with_created_ancestors(self, count: u64) -> Self
Attaches the number of ancestor directories created, when known.
Sourcepub const fn created_ancestors(self) -> Option<u64>
pub const fn created_ancestors(self) -> Option<u64>
Returns the number of created ancestor directories, when reported.
Trait Implementations§
Source§impl Clone for CreateDirectoryOutcome
impl Clone for CreateDirectoryOutcome
Source§fn clone(&self) -> CreateDirectoryOutcome
fn clone(&self) -> CreateDirectoryOutcome
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 moreimpl Copy for CreateDirectoryOutcome
Source§impl Debug for CreateDirectoryOutcome
impl Debug for CreateDirectoryOutcome
impl Eq for CreateDirectoryOutcome
Source§impl PartialEq for CreateDirectoryOutcome
impl PartialEq for CreateDirectoryOutcome
impl StructuralPartialEq for CreateDirectoryOutcome
Auto Trait Implementations§
impl Freeze for CreateDirectoryOutcome
impl RefUnwindSafe for CreateDirectoryOutcome
impl Send for CreateDirectoryOutcome
impl Sync for CreateDirectoryOutcome
impl Unpin for CreateDirectoryOutcome
impl UnsafeUnpin for CreateDirectoryOutcome
impl UnwindSafe for CreateDirectoryOutcome
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