Struct RelativePath

Source
pub struct RelativePath { /* private fields */ }
Expand description

A wrapper for BStr. It is used to enforce the following constraints:

  • The path separator always is /, independent of the platform.
  • Only normal components are allowed.
  • It is always represented as a bunch of bytes.

Trait Implementations§

Source§

impl AsRef<[u8]> for RelativePath

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a> TryFrom<&'a [u8]> for &'a RelativePath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a [u8]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a, const N: usize> TryFrom<&'a [u8; N]> for &'a RelativePath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a [u8; N]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a BStr> for &'a RelativePath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a BStr) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a BString> for &'a RelativePath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a BString) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a str> for &'a RelativePath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a str) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more