pub struct FileSystemInfo { /* private fields */ }Expand description
Construction-time local snapshot describing one filesystem object.
§Examples
use qubit_fs::metadata::FileSystemId;
use qubit_fs::metadata::FileSystemInfo;
use qubit_fs::path::PathSemantics;
let info = FileSystemInfo::new(
FileSystemId::new("local-instance")?,
"local",
PathSemantics::Hierarchical,
);
assert_eq!("local", info.provider_id());Implementations§
Source§impl FileSystemInfo
impl FileSystemInfo
Sourcepub fn new(
id: FileSystemId,
provider_id: impl Display,
path_semantics: PathSemantics,
) -> Self
pub fn new( id: FileSystemId, provider_id: impl Display, path_semantics: PathSemantics, ) -> Self
Creates a filesystem information snapshot without scheme aliases.
Sourcepub fn with_scheme(self, scheme: &str) -> FsResult<Self>
pub fn with_scheme(self, scheme: &str) -> FsResult<Self>
Adds one validated supported URI scheme.
§Errors
Returns an invalid-URI error when scheme is not a valid URI scheme.
Sourcepub fn with_provider_metadata(self, metadata: UserMetadata) -> Self
pub fn with_provider_metadata(self, metadata: UserMetadata) -> Self
Replaces the scrubbed provider metadata snapshot.
metadata has already rejected credential-like keys. Providers must
expose secrets only through an external credential boundary, never
through this debug-visible local snapshot.
Sourcepub const fn id(&self) -> &FileSystemId
pub const fn id(&self) -> &FileSystemId
Returns the configured filesystem identity.
Sourcepub const fn provider_id(&self) -> &str
pub const fn provider_id(&self) -> &str
Returns the provider identity that created this filesystem.
Sourcepub const fn path_semantics(&self) -> PathSemantics
pub const fn path_semantics(&self) -> PathSemantics
Returns the provider-local path semantics.
Sourcepub const fn provider_metadata(&self) -> &NonSensitiveMetadata
pub const fn provider_metadata(&self) -> &NonSensitiveMetadata
Returns scrubbed provider-specific information.
Trait Implementations§
Source§impl Clone for FileSystemInfo
impl Clone for FileSystemInfo
Source§fn clone(&self) -> FileSystemInfo
fn clone(&self) -> FileSystemInfo
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 FileSystemInfo
impl Debug for FileSystemInfo
Source§impl PartialEq for FileSystemInfo
impl PartialEq for FileSystemInfo
impl StructuralPartialEq for FileSystemInfo
Auto Trait Implementations§
impl Freeze for FileSystemInfo
impl RefUnwindSafe for FileSystemInfo
impl Send for FileSystemInfo
impl Sync for FileSystemInfo
impl Unpin for FileSystemInfo
impl UnsafeUnpin for FileSystemInfo
impl UnwindSafe for FileSystemInfo
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