pub struct ForceCreateDirChildren<T, F = NoFilter, P: PathType + ?Sized = Path>where
F: Filter<P>,{ /* private fields */ }Expand description
A wrapper around DirChildren that forces the creation of the directory, even if there are no children to write.
Implementations§
Source§impl<T, F, P> ForceCreateDirChildren<T, F, P>
impl<T, F, P> ForceCreateDirChildren<T, F, P>
Sourcepub fn new(children: DirChildren<T, F, P>) -> Self
pub fn new(children: DirChildren<T, F, P>) -> Self
Creates a new ForceCreateDirChildren with the specified children.
§Examples
use dir_structure::dir_children::{ForceCreateDirChildren, DirChildren};
use dir_structure::NoFilter;
let force_create = ForceCreateDirChildren::new(DirChildren::<String, NoFilter>::new());
assert_eq!(force_create.len(), 0);Sourcepub fn with_children_from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = DirChild<T, P>>,
pub fn with_children_from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = DirChild<T, P>>,
Creates a new ForceCreateDirChildren from an iterator of DirChilds.
§Examples
use dir_structure::dir_children::{ForceCreateDirChildren, DirChild, DirChildren};
use dir_structure::NoFilter;
let children = vec![
DirChild::new("file1.txt", "content1".to_owned()),
DirChild::new("file2.txt", "content2".to_owned()),
];
let force_create = ForceCreateDirChildren::<_, NoFilter>::with_children_from_iter(children);
assert_eq!(force_create.len(), 2);Methods from Deref<Target = DirChildren<T, F, P>>§
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: Clone, F, P: Clone + PathType + ?Sized> Clone for ForceCreateDirChildren<T, F, P>
impl<T: Clone, F, P: Clone + PathType + ?Sized> Clone for ForceCreateDirChildren<T, F, P>
Source§fn clone(&self) -> ForceCreateDirChildren<T, F, P>
fn clone(&self) -> ForceCreateDirChildren<T, F, P>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T, F, P: PathType + ?Sized> Deref for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> Deref for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Source§impl<T, F, P: PathType + ?Sized> DerefMut for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> DerefMut for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Source§impl<T, F, P: PathType + ?Sized> DynamicHasField for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Available on crate feature resolve-path only.
impl<T, F, P: PathType + ?Sized> DynamicHasField for ForceCreateDirChildren<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, 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, F, P: PathType + ?Sized> FromIterator<DirChild<T, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
impl<T, F, P: PathType + ?Sized> FromIterator<DirChild<T, P>> for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Source§impl<T: PartialEq, F, P: PartialEq + PathType + ?Sized> PartialEq for ForceCreateDirChildren<T, F, P>
impl<T: PartialEq, F, P: PartialEq + PathType + ?Sized> PartialEq for ForceCreateDirChildren<T, F, P>
Source§fn eq(&self, other: &ForceCreateDirChildren<T, F, P>) -> bool
fn eq(&self, other: &ForceCreateDirChildren<T, F, P>) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
Available on crate feature async only.
impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
async only.Source§impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
Source§impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
Available on crate feature async only.
impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
async only.impl<T: Eq, F, P: Eq + PathType + ?Sized> Eq for ForceCreateDirChildren<T, F, P>
impl<T, F, P: PathType + ?Sized> StructuralPartialEq for ForceCreateDirChildren<T, F, P>where
F: Filter<P>,
Auto Trait Implementations§
impl<T, F, P> Freeze for ForceCreateDirChildren<T, F, P>where
P: ?Sized,
impl<T, F, P> RefUnwindSafe for ForceCreateDirChildren<T, F, P>where
F: RefUnwindSafe,
P: RefUnwindSafe + ?Sized,
<P as PathType>::PathSegmentOwned: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F, P> Send for ForceCreateDirChildren<T, F, P>
impl<T, F, P> Sync for ForceCreateDirChildren<T, F, P>
impl<T, F, P> Unpin for ForceCreateDirChildren<T, F, P>
impl<T, F, P> UnwindSafe for ForceCreateDirChildren<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 more