#[non_exhaustive]pub enum ListScope {
Path(Path),
Namespace,
}Expand description
Selects the portion of one configured filesystem to enumerate.
A flat Path scope is a raw key prefix. A hierarchical path
denotes a directory. Namespace is available only for
flat path semantics and never expands beyond the configured filesystem.
§Examples
use qubit_fs::Path;
use qubit_fs::directory::ListScope;
let scope = ListScope::Path(Path::parse_literal("reports/")?);
assert_eq!(scope.path().map(Path::as_str), Some("reports/"));
assert!(ListScope::Namespace.path().is_none());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Path(Path)
Enumerates a directory or raw key prefix using its existing path rules.
Namespace
Enumerates the entire configured flat namespace without an empty path.
Implementations§
Trait Implementations§
impl Eq for ListScope
impl StructuralPartialEq for ListScope
Auto Trait Implementations§
impl Freeze for ListScope
impl RefUnwindSafe for ListScope
impl Send for ListScope
impl Sync for ListScope
impl Unpin for ListScope
impl UnsafeUnpin for ListScope
impl UnwindSafe for ListScope
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