#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct CreateDirectoryOutcome {
already_existed: bool,
created_ancestors: Option<u64>,
}
impl CreateDirectoryOutcome {
#[inline]
#[must_use]
pub const fn new(already_existed: bool) -> Self {
Self {
already_existed,
created_ancestors: None,
}
}
#[inline]
#[must_use]
pub const fn already_existed(self) -> bool {
self.already_existed
}
#[inline]
#[must_use]
pub const fn with_created_ancestors(mut self, count: u64) -> Self {
self.created_ancestors = Some(count);
self
}
#[inline]
pub const fn created_ancestors(self) -> Option<u64> {
self.created_ancestors
}
}