pub struct NamespacePath { /* private fields */ }Expand description
Canonical absolute path represented as exact logical-name components.
An empty component vector denotes the volume root. Unlike
PortablePath, this type preserves raw POSIX bytes and Windows UTF-16LE
names. A volume executor additionally checks that every component encoding
is admitted by that volume’s filesystem profile.
Implementations§
Source§impl NamespacePath
impl NamespacePath
Sourcepub fn new(
components: Vec<LogicalName>,
limits: VolumeLimits,
) -> Result<Self, NamespacePathError>
pub fn new( components: Vec<LogicalName>, limits: VolumeLimits, ) -> Result<Self, NamespacePathError>
Constructs one bounded absolute namespace path.
§Errors
Rejects excessive depth, component bytes, total bytes, or arithmetic overflow before the path reaches a storage backend.
Sourcepub fn from_portable(
path: &PortablePath,
limits: VolumeLimits,
) -> Result<Self, NamespacePathError>
pub fn from_portable( path: &PortablePath, limits: VolumeLimits, ) -> Result<Self, NamespacePathError>
Sourcepub fn from_portable_in_profile(
path: &PortablePath,
profile: FilesystemProfile,
limits: VolumeLimits,
) -> Result<Self, NamespacePathError>
pub fn from_portable_in_profile( path: &PortablePath, profile: FilesystemProfile, limits: VolumeLimits, ) -> Result<Self, NamespacePathError>
Converts a portable path to the canonical names of one volume profile.
The string API can address names representable as Unicode; native capture APIs retain raw POSIX bytes or UTF-16 units outside that subset.
§Errors
Returns bounded-name or path errors when the encoded host names exceed the volume limits.
Sourcepub const fn encoded_bytes(&self) -> u32
pub const fn encoded_bytes(&self) -> u32
Canonical encoded bytes including separators and the leading root mark.
Sourcepub fn components(&self) -> &[LogicalName]
pub fn components(&self) -> &[LogicalName]
Borrows exact logical-name components in root-to-leaf order.
Sourcepub fn split_last(&self) -> Option<(&[LogicalName], &LogicalName)>
pub fn split_last(&self) -> Option<(&[LogicalName], &LogicalName)>
Returns the parent path and final name, or None for root.
Trait Implementations§
Source§impl Clone for NamespacePath
impl Clone for NamespacePath
Source§impl Debug for NamespacePath
impl Debug for NamespacePath
impl Eq for NamespacePath
Source§impl Ord for NamespacePath
impl Ord for NamespacePath
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NamespacePath
impl PartialEq for NamespacePath
Source§impl PartialOrd for NamespacePath
impl PartialOrd for NamespacePath
impl StructuralPartialEq for NamespacePath
Auto Trait Implementations§
impl Freeze for NamespacePath
impl RefUnwindSafe for NamespacePath
impl Send for NamespacePath
impl Sync for NamespacePath
impl Unpin for NamespacePath
impl UnsafeUnpin for NamespacePath
impl UnwindSafe for NamespacePath
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request