pub struct PortablePath(/* private fields */);Expand description
Canonical absolute path with / separators and no relative components.
Implementations§
Source§impl PortablePath
impl PortablePath
Sourcepub fn parse(value: &str, limits: VolumeLimits) -> Result<Self, PathError>
pub fn parse(value: &str, limits: VolumeLimits) -> Result<Self, PathError>
Parses and bounds one canonical absolute path.
§Errors
Rejects relative, repeated-separator, dot, parent, NUL, trailing separator, or over-limit paths. Host adapters parse native paths before this portable boundary.
Sourcepub fn is_within(&self, ancestor: &Self) -> bool
pub fn is_within(&self, ancestor: &Self) -> bool
Returns whether this path is the same as or lies below ancestor.
Sourcepub fn components(&self) -> impl Iterator<Item = &str>
pub fn components(&self) -> impl Iterator<Item = &str>
Iterates canonical components without allocating.
Trait Implementations§
Source§impl Clone for PortablePath
impl Clone for PortablePath
Source§impl Debug for PortablePath
impl Debug for PortablePath
Source§impl<'de> Deserialize<'de> for PortablePath
impl<'de> Deserialize<'de> for PortablePath
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PortablePath
impl Display for PortablePath
impl Eq for PortablePath
Source§impl Hash for PortablePath
impl Hash for PortablePath
Source§impl Ord for PortablePath
impl Ord for PortablePath
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PortablePath
impl PartialEq for PortablePath
Source§impl PartialOrd for PortablePath
impl PartialOrd for PortablePath
Source§impl Serialize for PortablePath
impl Serialize for PortablePath
impl StructuralPartialEq for PortablePath
Auto Trait Implementations§
impl Freeze for PortablePath
impl RefUnwindSafe for PortablePath
impl Send for PortablePath
impl Sync for PortablePath
impl Unpin for PortablePath
impl UnsafeUnpin for PortablePath
impl UnwindSafe for PortablePath
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
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
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>
Wrap the input message
T in a tonic::Request