pub struct DirectoryEntry { /* private fields */ }
Expand description
A directory entry in the generated tree. Contains a randomly generated u64 for a name and a
vector of randomly generated directory entries, with a number of entries somewhere in the range
of [0, 6). The sample function generates the entire subtree depth-first before returning, and is
mutually recursive with the Entry
sample function.
Implementations§
Source§impl DirectoryEntry
impl DirectoryEntry
Sourcepub fn get_name(&self) -> String
pub fn get_name(&self) -> String
get the path the directory entry will be written to relative to a given root.
Sourcepub fn write_tree_at<'a>(
self,
root: &'a DirectoryProxy,
) -> BoxFuture<'a, Result<(), Error>>
pub fn write_tree_at<'a>( self, root: &'a DirectoryProxy, ) -> BoxFuture<'a, Result<(), Error>>
Take the entire randomly generated tree and commit it to disk.
Trait Implementations§
Source§impl Clone for DirectoryEntry
impl Clone for DirectoryEntry
Source§fn clone(&self) -> DirectoryEntry
fn clone(&self) -> DirectoryEntry
Returns a copy 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 DirectoryEntry
impl Debug for DirectoryEntry
Source§impl Distribution<DirectoryEntry> for EntryDistribution
impl Distribution<DirectoryEntry> for EntryDistribution
Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> DirectoryEntry
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> DirectoryEntry
Generate a random value of
T
, using rng
as the source of randomness.Source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
Create an iterator that generates random values of
T
, using rng
as
the source of randomness. Read moreSource§impl PartialEq for DirectoryEntry
impl PartialEq for DirectoryEntry
impl Eq for DirectoryEntry
impl StructuralPartialEq for DirectoryEntry
Auto Trait Implementations§
impl Freeze for DirectoryEntry
impl RefUnwindSafe for DirectoryEntry
impl Send for DirectoryEntry
impl Sync for DirectoryEntry
impl Unpin for DirectoryEntry
impl UnwindSafe for DirectoryEntry
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)