pub struct PathList { /* private fields */ }Expand description
A list of absolute paths, with an associated display order.
Two PathList values are considered equal if they contain the same paths,
regardless of the order in which those paths were originally provided.
The paths can be retrieved in the original order using ordered_paths().
Implementations§
Source§impl PathList
impl PathList
pub fn new<P: AsRef<Path>>(paths: &[P]) -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn without_path(&self, path_to_remove: &Path) -> PathList
pub fn without_path(&self, path_to_remove: &Path) -> PathList
Returns a new PathList with the given path removed.
Sourcepub fn paths_owned(&self) -> Arc<[PathBuf]>
pub fn paths_owned(&self) -> Arc<[PathBuf]>
Get the paths in the lexicographic order.
Sourcepub fn ordered_paths(&self) -> impl Iterator<Item = &PathBuf>
pub fn ordered_paths(&self) -> impl Iterator<Item = &PathBuf>
Get the paths in the original order.
pub fn is_lexicographically_ordered(&self) -> bool
pub fn deserialize(serialized: &SerializedPathList) -> Self
pub fn serialize(&self) -> SerializedPathList
Trait Implementations§
impl Eq for PathList
Auto Trait Implementations§
impl Freeze for PathList
impl RefUnwindSafe for PathList
impl Send for PathList
impl Sync for PathList
impl Unpin for PathList
impl UnsafeUnpin for PathList
impl UnwindSafe for PathList
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more