pub struct RuntimePath<'a> { /* private fields */ }Implementations§
Source§impl<'a> RuntimePath<'a>
impl<'a> RuntimePath<'a>
pub fn new(path: &'a str) -> Self
pub fn flavor(&self) -> RuntimePathFlavor
pub fn as_str(&self) -> &'a str
pub fn starts_with(&self, base: RuntimePath<'_>) -> bool
pub fn starts_with_case_sensitive(&self, base: RuntimePath<'_>) -> bool
pub fn starts_with_ascii_case_insensitive(&self, base: RuntimePath<'_>) -> bool
Sourcepub fn equals(&self, other: RuntimePath<'_>) -> bool
pub fn equals(&self, other: RuntimePath<'_>) -> bool
Not PartialEq: applies flavor-dependent case folding (ASCII-insensitive
on Windows), so callers opt in by name instead of via ==.
pub fn component_count(&self) -> usize
pub fn normal_components(&self) -> impl DoubleEndedIterator<Item = &str> + '_
pub fn file_name(&self) -> Option<&str>
Sourcepub fn is_file(&self) -> bool
pub fn is_file(&self) -> bool
Syntactic check on the path string, not a filesystem stat; can’t
distinguish an extension-less file from a dir like Season.1.
pub fn is_directory(&self) -> bool
Sourcepub fn parent_or_self(&self) -> RuntimePath<'a>
pub fn parent_or_self(&self) -> RuntimePath<'a>
Slices source instead of using Utf8TypedPath::parent() directly,
to keep the 'a borrow and the original (non-re-serialized) rendering.
Trait Implementations§
Source§impl<'a> Clone for RuntimePath<'a>
impl<'a> Clone for RuntimePath<'a>
Source§fn clone(&self) -> RuntimePath<'a>
fn clone(&self) -> RuntimePath<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for RuntimePath<'a>
Source§impl<'a> Debug for RuntimePath<'a>
impl<'a> Debug for RuntimePath<'a>
Auto Trait Implementations§
impl<'a> Freeze for RuntimePath<'a>
impl<'a> RefUnwindSafe for RuntimePath<'a>
impl<'a> Send for RuntimePath<'a>
impl<'a> Sync for RuntimePath<'a>
impl<'a> Unpin for RuntimePath<'a>
impl<'a> UnsafeUnpin for RuntimePath<'a>
impl<'a> UnwindSafe for RuntimePath<'a>
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