pub struct RelativePath(/* private fields */);Expand description
A path below a folder, as the names the app gives, outermost first: an
album’s name, then a track’s. Each name is one name on every platform,
whatever it holds, / and \ included. Coven writes each through one
rule that makes it valid on any volume (§17.3), so joined to the folder
the path stays inside it.
Implementations§
Source§impl RelativePath
impl RelativePath
Sourcepub fn new<S: Into<String>>(
names: impl IntoIterator<Item = S>,
) -> Result<Self, RelativePathError>
pub fn new<S: Into<String>>( names: impl IntoIterator<Item = S>, ) -> Result<Self, RelativePathError>
The path of names, outermost first. Each must be non-empty.
Sourcepub fn names(&self) -> impl Iterator<Item = &str>
pub fn names(&self) -> impl Iterator<Item = &str>
Its names as the app gave them, outermost first.
Sourcepub fn local_path(&self) -> PathBuf
pub fn local_path(&self) -> PathBuf
The path coven writes for it below a folder: each name as the one rule for every platform makes it (§17.3), joined by this platform’s separator. An app writing a file of its own under a name it stores writes it here, so its names land as coven’s copies do.
Trait Implementations§
Source§impl Clone for RelativePath
impl Clone for RelativePath
Source§fn clone(&self) -> RelativePath
fn clone(&self) -> RelativePath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelativePath
impl Debug for RelativePath
Source§impl Display for RelativePath
The names joined by /, for showing only: a name may hold / itself.
impl Display for RelativePath
The names joined by /, for showing only: a name may hold / itself.
Source§impl Ord for RelativePath
impl Ord for RelativePath
Source§fn cmp(&self, other: &RelativePath) -> Ordering
fn cmp(&self, other: &RelativePath) -> Ordering
1.21.0 · 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
Source§impl PartialEq for RelativePath
impl PartialEq for RelativePath
Source§impl PartialOrd for RelativePath
impl PartialOrd for RelativePath
impl Eq for RelativePath
impl StructuralPartialEq for RelativePath
Auto Trait Implementations§
impl Freeze for RelativePath
impl RefUnwindSafe for RelativePath
impl Send for RelativePath
impl Sync for RelativePath
impl Unpin for RelativePath
impl UnsafeUnpin for RelativePath
impl UnwindSafe for RelativePath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more