Trait build_fs_tree::Build [−][src]
pub trait Build<Name, Error>: Node + Sized where
Self::DirectoryContent: IntoIterator<Item = (Name, Self)>, { type Path: Clone; fn join(prefix: &Self::Path, name: &Name) -> Self::Path; fn write_file(
path: &Self::Path,
content: &Self::FileContent
) -> Result<(), Error>; fn create_dir(path: &Self::Path) -> Result<(), Error>; fn build(
self,
path: &Self::Path
) -> Result<(), BuildError<Self::Path, Error>> { ... } }
Expand description
Applying FileSystemTree
to the filesystem.
Generic parameters:
Name
: Identification of a child item.Error
: Error type used by the other functions.
Associated Types
Required methods
fn join(prefix: &Self::Path, name: &Name) -> Self::Path
[src]
Expand description
Add prefix to the root of the tree.
fn write_file(
path: &Self::Path,
content: &Self::FileContent
) -> Result<(), Error>
[src]
path: &Self::Path,
content: &Self::FileContent
) -> Result<(), Error>
Expand description
Write content to a file.
fn create_dir(path: &Self::Path) -> Result<(), Error>
[src]
Expand description
Create a directory at root.
Provided methods
fn build(self, path: &Self::Path) -> Result<(), BuildError<Self::Path, Error>>
[src]
Expand description
Build the tree into the filesystem.