pub struct SmbPath { /* private fields */ }Expand description
A validated, component-list path. No .., no Windows-forbidden chars, no
alternate streams. Always relative to the share root; the empty path is
the root.
Implementations§
Source§impl SmbPath
impl SmbPath
Sourcepub fn from_utf16(units: &[u16]) -> SmbResult<Self>
pub fn from_utf16(units: &[u16]) -> SmbResult<Self>
Construct from a UTF-16 code-unit slice (already decoded from UTF-16LE wire bytes).
Sourcepub fn components(&self) -> &[String]
pub fn components(&self) -> &[String]
Path components in order. Empty for the root.
Sourcepub fn join(&self, last: &str) -> SmbResult<SmbPath>
pub fn join(&self, last: &str) -> SmbResult<SmbPath>
Validate last and append its components to this path.
Sourcepub fn display_backslash(&self) -> String
pub fn display_backslash(&self) -> String
Render as a backslash-separated string. Empty for root.
Trait Implementations§
impl Eq for SmbPath
impl StructuralPartialEq for SmbPath
Auto Trait Implementations§
impl Freeze for SmbPath
impl RefUnwindSafe for SmbPath
impl Send for SmbPath
impl Sync for SmbPath
impl Unpin for SmbPath
impl UnsafeUnpin for SmbPath
impl UnwindSafe for SmbPath
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