pub struct PathList(Vec<PathBuf>);Expand description
PathList is a rustic-internal list of PathBufs. It is used in the crate::Repository::backup command.
Tuple Fields§
§0: Vec<PathBuf>Implementations§
Source§impl PathList
impl PathList
Sourcepub fn from_string(source: &str) -> RusticResult<Self>
pub fn from_string(source: &str) -> RusticResult<Self>
Create a PathList from a String containing a single path
Note: for multiple paths, use PathList::from_iter.
§Arguments
source- The String to parse
§Errors
- no errors can occur here
RusticResultis used for consistency and future compatibility
Sourcepub fn sanitize(self) -> Result<Self, SnapshotFileErrorKind>
pub fn sanitize(self) -> Result<Self, SnapshotFileErrorKind>
Sanitize paths: Parse dots, absolutize if needed and merge paths.
§Errors
- If removing dots from path failed
- If canonicalizing path failed
Trait Implementations§
Source§impl<T: Into<PathBuf>> FromIterator<T> for PathList
impl<T: Into<PathBuf>> FromIterator<T> for PathList
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl Ord for PathList
impl Ord for PathList
Source§impl PartialOrd for PathList
impl PartialOrd for PathList
impl Eq for PathList
impl StructuralPartialEq 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 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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CustomError for T
impl<T> CustomError for T
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§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