pub struct DirChildren<T, F: Filter<P> = NoFilter, P: PathType + ?Sized = Path> {
pub children: Vec<DirChild<T, P>>,
/* private fields */
}Expand description
A directory structure where we don’t know the names of the folders at compile-time, and as such we cannot use the derive macro.
Instead we know that all the entries in the directory are folders,
and that they all have the same structure inside (defined by the T type parameter),
or they are all files (which can be read with DirChildren<String> for example).
In either case, ReadFrom::read_from must be able to read all the entries in
the directory.
The WriteTo implementation will directly write the children to the directory it
is passed, with no regards to the path stored in self_path.
Fields§
§children: Vec<DirChild<T, P>>The children of the root directory.
Implementations§
Source§impl<T, F: Filter<P>, P: PathType + ?Sized> DirChildren<T, F, P>
impl<T, F: Filter<P>, P: PathType + ?Sized> DirChildren<T, F, P>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty DirChildren, with no children.
§Examples
use std::path::PathBuf;
use dir_structure::{dir_children::DirChildren, NoFilter};
let d = DirChildren::<String, NoFilter>::new();
assert!(d.is_empty());Sourcepub fn with_children_from_iter(
children: impl IntoIterator<Item = DirChild<T, P>>,
) -> Self
pub fn with_children_from_iter( children: impl IntoIterator<Item = DirChild<T, P>>, ) -> Self
Creates a DirChildren with the given path and children.
§Examples
use dir_structure::{dir_children::{DirChildren, DirChild}, NoFilter};
let d = DirChildren::<String, NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert!(!d.is_empty());Sourcepub fn map<U, MapF, F2, P2>(self, f: MapF) -> DirChildren<U, F2, P2>
pub fn map<U, MapF, F2, P2>(self, f: MapF) -> DirChildren<U, F2, P2>
Maps the children of this DirChildren to a new type.
This is useful for converting the children to a different type,
for example, if you want to convert the children to a different
type of DirStructureItem.
This is a convenience method that allows you to use the
map method on the children of this DirChildren.
§Examples
use std::path::Path;
use std::pin::Pin;
use dir_structure::{dir_children::{DirChildren, DirChild}, prelude::*};
#[derive(Debug, PartialEq, Eq)]
struct NewType(String);
let dir = DirChildren::<_, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
DirChild::new("file3.txt", "file3".to_owned()),
],
);
let dir = dir.map::<_, _, dir_structure::NoFilter, Path>(|child| child.map_value(NewType));
assert_eq!(
dir,
DirChildren::with_children_from_iter(
vec![
DirChild::new("file1.txt", NewType("file1".to_owned())),
DirChild::new("file2.txt", NewType("file2".to_owned())),
DirChild::new("file3.txt", NewType("file3".to_owned())),
],
)
);Sourcepub fn map_filter<NewF>(self) -> DirChildren<T, NewF, P>where
NewF: Filter<P>,
pub fn map_filter<NewF>(self) -> DirChildren<T, NewF, P>where
NewF: Filter<P>,
Maps the filter type. The children remain unchanged.
This is useful if you are trying to pass a DirChildren<T, F1> to
a function requiring a DirChildren<T, F2>, where F1 and F2 are two
distinct types implementing Filter.
§Examples
use std::path::Path;
use dir_structure::traits::vfs::PathType;
use dir_structure::dir_children::{Filter, DirChildren};
struct NewFilter;
impl<P: PathType + ?Sized> Filter<P> for NewFilter {
fn allows(_path: &P) -> bool {
true
}
}
let d = DirChildren::<String, dir_structure::NoFilter>::new();
let d2: DirChildren<String, NewFilter> = d.map_filter::<NewFilter>();Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of children.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.len(), 0);
let d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.len(), 2);Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if there are no children.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let d = DirChildren::<String, dir_structure::NoFilter>::new();
assert!(d.is_empty());
let d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert!(!d.is_empty());Sourcepub fn get(&self, index: usize) -> Option<&DirChild<T, P>>
pub fn get(&self, index: usize) -> Option<&DirChild<T, P>>
Gets the child at the specified index.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.get(0), None);
assert_eq!(d.get(1), None);
assert_eq!(d.get(100), None);
let d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.get(0), Some(&DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(d.get(1), Some(&DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(d.get(2), None);
assert_eq!(d.get(100), None);Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut DirChild<T, P>>
pub fn get_mut(&mut self, index: usize) -> Option<&mut DirChild<T, P>>
Gets a mutable reference to the child at the specified index.
This is a mutable version of get.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.get_mut(0), None);
assert_eq!(d.get_mut(1), None);
assert_eq!(d.get_mut(100), None);
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.get_mut(0), Some(&mut DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(d.get_mut(1), Some(&mut DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(d.get_mut(2), None);
assert_eq!(d.get_mut(100), None);Sourcepub fn get_name(
&self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&DirChild<T, P>>where
P::PathSegmentRef: PartialEq,
pub fn get_name(
&self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&DirChild<T, P>>where
P::PathSegmentRef: PartialEq,
Gets the child with the specified “file” name (last segment of path).
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.get_name(""), None);
assert_eq!(d.get_name("any_name"), None);
assert_eq!(d.get_name("aaaa"), None);
let d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.get_name("file1.txt"), Some(&DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(d.get_name("file2.txt"), Some(&DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(d.get_name("any_name"), None);
assert_eq!(d.get_name("aaaa"), None);Sourcepub fn get_name_mut(
&mut self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&mut DirChild<T, P>>where
P::PathSegmentRef: PartialEq,
pub fn get_name_mut(
&mut self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&mut DirChild<T, P>>where
P::PathSegmentRef: PartialEq,
Gets the child with the specified “file” name (last segment of path).
This is a mutable version of get_name.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.get_name_mut(""), None);
assert_eq!(d.get_name_mut("any_name"), None);
assert_eq!(d.get_name_mut("aaaa"), None);
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.get_name_mut("file1.txt"), Some(&mut DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(d.get_name_mut("file2.txt"), Some(&mut DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(d.get_name_mut("any_name"), None);
assert_eq!(d.get_name_mut("aaaa"), None);Sourcepub fn get_value_by_name(
&self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&T>where
P::PathSegmentRef: PartialEq,
pub fn get_value_by_name(
&self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&T>where
P::PathSegmentRef: PartialEq,
Gets the value of the child with the specified “file” name (last segment of path).
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.get_value_by_name(""), None);
assert_eq!(d.get_value_by_name("any_name"), None);
assert_eq!(d.get_value_by_name("aaaa"), None);
let d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.get_value_by_name("file1.txt"), Some(&"file1".to_owned()));
assert_eq!(d.get_value_by_name("file2.txt"), Some(&"file2".to_owned()));
assert_eq!(d.get_value_by_name("any_name"), None);
assert_eq!(d.get_value_by_name("aaaa"), None);Sourcepub fn get_value_by_name_mut(
&mut self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&mut T>where
P::PathSegmentRef: PartialEq,
pub fn get_value_by_name_mut(
&mut self,
name: impl AsRef<P::PathSegmentRef>,
) -> Option<&mut T>where
P::PathSegmentRef: PartialEq,
Gets the value of the child with the specified “file” name (last segment of path).
This is a mutable version of get_value_by_name.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::new();
assert_eq!(d.get_value_by_name_mut(""), None);
assert_eq!(d.get_value_by_name_mut("any_name"), None);
assert_eq!(d.get_value_by_name_mut("aaaa"), None);
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
assert_eq!(d.get_value_by_name_mut("file1.txt"), Some(&mut "file1".to_owned()));
assert_eq!(d.get_value_by_name_mut("file2.txt"), Some(&mut "file2".to_owned()));
assert_eq!(d.get_value_by_name_mut("any_name"), None);
assert_eq!(d.get_value_by_name_mut("aaaa"), None);Sourcepub fn iter(&self) -> DirChildrenIter<'_, T, P> ⓘ
pub fn iter(&self) -> DirChildrenIter<'_, T, P> ⓘ
Returns an iterator over the children.
§Examples
use std::path::{Path, PathBuf};
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let d = DirChildren::<String, dir_structure::NoFilter>::new();
let mut i = d.iter();
assert_eq!(i.next(), None);
let d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(i.next(), Some(&DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(i.next(), None);Sourcepub fn iter_mut(&mut self) -> DirChildrenIterMut<'_, T, P> ⓘ
pub fn iter_mut(&mut self) -> DirChildrenIterMut<'_, T, P> ⓘ
Returns a mutable iterator over the children.
§Examples
use std::path::{Path, PathBuf};
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
let mut i = d.iter_mut();
assert_eq!(i.next(), Some(&mut DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(i.next(), Some(&mut DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(i.next(), None);Modifying the children is also possible:
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
d.iter_mut().for_each(|child| *child.value_mut() = "modified".to_owned());
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file1.txt", "modified".to_owned())));
assert_eq!(i.next(), Some(&DirChild::new("file2.txt", "modified".to_owned())));
assert_eq!(i.next(), None);Sourcepub fn push(&mut self, file_name: impl Into<P::PathSegmentOwned>, value: T)
pub fn push(&mut self, file_name: impl Into<P::PathSegmentOwned>, value: T)
Pushes a new child to the end of the children list.
This method takes a file name and a value, and creates a new DirChild
with the given file name and value, then pushes it to the end of the children
list.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::new();
d.push("file1.txt", "file1".to_owned());
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(i.next(), None);
d.push("file2.txt", "file2".to_owned());
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(i.next(), Some(&DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(i.next(), None);Sourcepub fn retain(&mut self, f: impl FnMut(&DirChild<T, P>) -> bool)
pub fn retain(&mut self, f: impl FnMut(&DirChild<T, P>) -> bool)
Retains only the children specified by the predicate.
The predicate is a closure that takes a reference to a DirChild<T>
and returns true if the child should be kept, or false if it should be removed.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
],
);
d.retain(|child| child.file_name() != "file1.txt");
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(i.next(), None);Sourcepub fn drain(
&mut self,
range: impl RangeBounds<usize>,
) -> DirChildrenDrain<'_, T, P> ⓘ
pub fn drain( &mut self, range: impl RangeBounds<usize>, ) -> DirChildrenDrain<'_, T, P> ⓘ
Drains the children in the specified range, returning an iterator over the removed children. The range is specified using the standard Rust range syntax.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
DirChild::new("file3.txt", "file3".to_owned()),
],
);
let drained: Vec<_> = d.drain(0..1).collect();
assert_eq!(drained, vec![DirChild::new("file1.txt", "file1".to_owned())]);
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file2.txt", "file2".to_owned())));
assert_eq!(i.next(), Some(&DirChild::new("file3.txt", "file3".to_owned())));
assert_eq!(i.next(), None);Sourcepub fn extract_if<'a, Fi>(
&'a mut self,
range: impl RangeBounds<usize>,
filter: Fi,
) -> DirChildrenExtractIf<'a, T, P, Fi> ⓘ
pub fn extract_if<'a, Fi>( &'a mut self, range: impl RangeBounds<usize>, filter: Fi, ) -> DirChildrenExtractIf<'a, T, P, Fi> ⓘ
Extracts the children in the specified range that satisfy the given predicate, returning an iterator over the removed children.
The range is specified using the standard Rust range syntax.
The predicate is a closure that takes a mutable reference to a DirChild<T>
and returns true if the child should be removed, or false if it should be kept.
§Examples
use dir_structure::{traits::sync::{DirStructure, DirStructureItem}, dir_children::{DirChildren, DirChild}};
let mut d = DirChildren::<String, dir_structure::NoFilter>::with_children_from_iter(
vec![
DirChild::new("file1.txt", "file1".to_owned()),
DirChild::new("file2.txt", "file2".to_owned()),
DirChild::new("file3.txt", "file3".to_owned()),
DirChild::new("file4.txt", "file4".to_owned()),
],
);
let extracted: Vec<_> = d.extract_if(1..3, |child| child.file_name() == "file2.txt").collect();
assert_eq!(extracted, vec![DirChild::new("file2.txt", "file2".to_owned())]);
let mut i = d.iter();
assert_eq!(i.next(), Some(&DirChild::new("file1.txt", "file1".to_owned())));
assert_eq!(i.next(), Some(&DirChild::new("file3.txt", "file3".to_owned())));
assert_eq!(i.next(), Some(&DirChild::new("file4.txt", "file4".to_owned())));
assert_eq!(i.next(), None);Trait Implementations§
Source§impl<T, F, P: PathType + ?Sized> AsMut<DirChildren<T, F, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> AsMut<DirChildren<T, F, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Source§fn as_mut(&mut self) -> &mut DirChildren<T, F, P>
fn as_mut(&mut self) -> &mut DirChildren<T, F, P>
Source§impl<T, F, P: PathType + ?Sized> AsRef<DirChildren<T, F, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> AsRef<DirChildren<T, F, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Source§fn as_ref(&self) -> &DirChildren<T, F, P>
fn as_ref(&self) -> &DirChildren<T, F, P>
Source§impl<T, F, P: PathType + ?Sized> DynamicHasField for DirChildren<T, F, P>where
F: Filter<P>,
Available on crate feature resolve-path only.
impl<T, F, P: PathType + ?Sized> DynamicHasField for DirChildren<T, F, P>where
F: Filter<P>,
resolve-path only.Source§fn resolve_path<Pt: OwnedPathType>(p: Pt, name: &str) -> Pt
fn resolve_path<Pt: OwnedPathType>(p: Pt, name: &str) -> Pt
Self, given the name
passed into the resolve_path! macro.Source§impl<T, P: PathType + ?Sized, F> Extend<DirChild<T, P>> for DirChildren<T, F, P>where
F: Filter<P>,
impl<T, P: PathType + ?Sized, F> Extend<DirChild<T, P>> for DirChildren<T, F, P>where
F: Filter<P>,
Source§fn extend<I: IntoIterator<Item = DirChild<T, P>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = DirChild<T, P>>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<T, F, P: PathType + ?Sized> From<DirChildren<T, F, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> From<DirChildren<T, F, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Source§fn from(children: DirChildren<T, F, P>) -> Self
fn from(children: DirChildren<T, F, P>) -> Self
Source§impl<T, F, P: PathType + ?Sized> From<ForceCreateDirChildren<T, F, P>> for DirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> From<ForceCreateDirChildren<T, F, P>> for DirChildren<T, F, P>where
F: Filter<P>,
Source§fn from(force_create: ForceCreateDirChildren<T, F, P>) -> Self
fn from(force_create: ForceCreateDirChildren<T, F, P>) -> Self
Source§impl<T, P: PathType + ?Sized, F> From<Vec<DirChild<T, P>>> for DirChildren<T, F, P>where
F: Filter<P>,
impl<T, P: PathType + ?Sized, F> From<Vec<DirChild<T, P>>> for DirChildren<T, F, P>where
F: Filter<P>,
Source§impl<T, P: PathType + ?Sized, F> FromIterator<DirChild<T, P>> for DirChildren<T, F, P>where
F: Filter<P>,
impl<T, P: PathType + ?Sized, F> FromIterator<DirChild<T, P>> for DirChildren<T, F, P>where
F: Filter<P>,
Source§impl<'a, T, F, P: PathType + ?Sized> IntoIterator for &'a DirChildren<T, F, P>where
F: Filter<P>,
impl<'a, T, F, P: PathType + ?Sized> IntoIterator for &'a DirChildren<T, F, P>where
F: Filter<P>,
Source§impl<'a, T, F, P: PathType + ?Sized> IntoIterator for &'a mut DirChildren<T, F, P>where
F: Filter<P>,
impl<'a, T, F, P: PathType + ?Sized> IntoIterator for &'a mut DirChildren<T, F, P>where
F: Filter<P>,
Source§impl<T, F, P: ?Sized + PathType> IntoIterator for DirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: ?Sized + PathType> IntoIterator for DirChildren<T, F, P>where
F: Filter<P>,
Source§impl<T: PartialEq, F: PartialEq + Filter<P>, P: PartialEq + PathType + ?Sized> PartialEq for DirChildren<T, F, P>
impl<T: PartialEq, F: PartialEq + Filter<P>, P: PartialEq + PathType + ?Sized> PartialEq for DirChildren<T, F, P>
Source§impl<'a, T, P: PathType + ?Sized + 'a, F, Vfs: Vfs<'a, Path = P>> ReadFrom<'a, Vfs> for DirChildren<T, F, P>
impl<'a, T, P: PathType + ?Sized + 'a, F, Vfs: Vfs<'a, Path = P>> ReadFrom<'a, Vfs> for DirChildren<T, F, P>
Source§impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
Available on crate feature async only.
impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
async only.Source§impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for DirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for DirChildren<T, F, Vfs::Path>
Source§impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
Available on crate feature async only.
impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
async only.Source§impl<'r, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'r, Vfs> for DirChildren<T, F, Vfs::Path>
Available on crate feature async only.
impl<'r, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'r, Vfs> for DirChildren<T, F, Vfs::Path>
async only.impl<T: Eq, F: Eq + Filter<P>, P: Eq + PathType + ?Sized> Eq for DirChildren<T, F, P>
impl<T, F: Filter<P>, P: PathType + ?Sized> StructuralPartialEq for DirChildren<T, F, P>
Auto Trait Implementations§
impl<T, F, P> Freeze for DirChildren<T, F, P>where
P: ?Sized,
impl<T, F, P> RefUnwindSafe for DirChildren<T, F, P>where
F: RefUnwindSafe,
P: RefUnwindSafe + ?Sized,
<P as PathType>::PathSegmentOwned: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F, P> Send for DirChildren<T, F, P>
impl<T, F, P> Sync for DirChildren<T, F, P>
impl<T, F, P> Unpin for DirChildren<T, F, P>
impl<T, F, P> UnwindSafe for DirChildren<T, F, P>where
F: UnwindSafe,
P: UnwindSafe + ?Sized,
<P as PathType>::PathSegmentOwned: UnwindSafe,
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DirStructureItem for T
impl<T> DirStructureItem 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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 moreSource§impl<'data, I> IntoParallelRefMutIterator<'data> for I
impl<'data, I> IntoParallelRefMutIterator<'data> for I
type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Item = <&'data mut I as IntoParallelIterator>::Item
fn par_iter_mut( &'data mut self, ) -> <I as IntoParallelRefMutIterator<'data>>::Iter
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().