Struct better_path::Path
source · #[repr(transparent)]pub struct Path<PF: PathFlavour = Unknown>(_, _);Implementations§
source§impl<BF: PathFlavour> Path<BF>
impl<BF: PathFlavour> Path<BF>
source§impl<BF: PathFlavour> Path<BF>
impl<BF: PathFlavour> Path<BF>
pub fn join<OF: PathFlavour>( &self, other: &Path<OF> ) -> PathBuf<<Self as Join<OF>>::ResultFlavour>where Path<BF>: Join<OF>,
source§impl<BF: PathFlavour> Path<BF>
impl<BF: PathFlavour> Path<BF>
pub fn starts_with<OF: PathFlavour>(&self, other: &Path<OF>) -> boolwhere Path<BF>: StartsWith<OF>,
source§impl<PF: PathFlavour> Path<PF>
impl<PF: PathFlavour> Path<PF>
pub fn new<S: AsRef<OsStr> + ?Sized>( string: &S ) -> Result<&Self, PF::ParseError>
pub fn ancestors(&self) -> Ancestors<'_, PF> ⓘ
pub fn components(&self) -> Components<'_>
pub fn display(&self) -> Display<'_>
pub fn extension(&self) -> Option<&OsStr>
pub fn file_name(&self) -> Option<&OsStr>
pub fn file_stem(&self) -> Option<&OsStr>
pub fn with_extension<S: AsRef<OsStr>>(&self, extension: S) -> PathBuf<PF>
pub fn with_file_name<S: AsRef<OsStr>>(&self, file_name: S) -> PathBuf<PF>
pub fn as_std(&self) -> &Path
Trait Implementations§
source§impl EndsWith<Absolute> for Path<Absolute>
impl EndsWith<Absolute> for Path<Absolute>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Absolute> for Path<Unknown>
impl EndsWith<Absolute> for Path<Unknown>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Relative> for Path<Absolute>
impl EndsWith<Relative> for Path<Absolute>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Relative> for Path<Relative>
impl EndsWith<Relative> for Path<Relative>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Relative> for Path<Unknown>
impl EndsWith<Relative> for Path<Unknown>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Unknown> for Path<Absolute>
impl EndsWith<Unknown> for Path<Absolute>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Unknown> for Path<Relative>
impl EndsWith<Unknown> for Path<Relative>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl EndsWith<Unknown> for Path<Unknown>
impl EndsWith<Unknown> for Path<Unknown>
fn ends_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl Join<Absolute> for Path<Absolute>
impl Join<Absolute> for Path<Absolute>
type ResultFlavour = Absolute
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Absolute> for Path<Relative>
impl Join<Absolute> for Path<Relative>
type ResultFlavour = Absolute
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Absolute> for Path<Unknown>
impl Join<Absolute> for Path<Unknown>
type ResultFlavour = Absolute
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Relative> for Path<Absolute>
impl Join<Relative> for Path<Absolute>
type ResultFlavour = Absolute
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Relative> for Path<Relative>
impl Join<Relative> for Path<Relative>
type ResultFlavour = Relative
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Relative> for Path<Unknown>
impl Join<Relative> for Path<Unknown>
type ResultFlavour = Unknown
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Unknown> for Path<Absolute>
impl Join<Unknown> for Path<Absolute>
type ResultFlavour = Absolute
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Unknown> for Path<Relative>
impl Join<Unknown> for Path<Relative>
type ResultFlavour = Unknown
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl Join<Unknown> for Path<Unknown>
impl Join<Unknown> for Path<Unknown>
type ResultFlavour = Unknown
fn join_internal( &self, operand: &Path<OperandFlavour> ) -> PathBuf<Self::ResultFlavour>
source§impl<PF: PathFlavour> PathInternals for Path<PF>
impl<PF: PathFlavour> PathInternals for Path<PF>
source§impl<PF: PathFlavour> RefCast for Path<PF>
impl<PF: PathFlavour> RefCast for Path<PF>
source§impl StartsWith<Absolute> for Path<Absolute>
impl StartsWith<Absolute> for Path<Absolute>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl StartsWith<Absolute> for Path<Unknown>
impl StartsWith<Absolute> for Path<Unknown>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl StartsWith<Relative> for Path<Relative>
impl StartsWith<Relative> for Path<Relative>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl StartsWith<Relative> for Path<Unknown>
impl StartsWith<Relative> for Path<Unknown>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl StartsWith<Unknown> for Path<Absolute>
impl StartsWith<Unknown> for Path<Absolute>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl StartsWith<Unknown> for Path<Relative>
impl StartsWith<Unknown> for Path<Relative>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
source§impl StartsWith<Unknown> for Path<Unknown>
impl StartsWith<Unknown> for Path<Unknown>
fn starts_with_internal(&self, operand: &Path<OperandFlavour>) -> bool
Auto Trait Implementations§
impl<PF> RefUnwindSafe for Path<PF>where PF: RefUnwindSafe,
impl<PF> Send for Path<PF>where PF: Send,
impl<PF = Unknown> !Sized for Path<PF>
impl<PF> Sync for Path<PF>where PF: Sync,
impl<PF> Unpin for Path<PF>where PF: Unpin,
impl<PF> UnwindSafe for Path<PF>where PF: UnwindSafe,
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