Struct iron_test::ProjectBuilder
[−]
[src]
pub struct ProjectBuilder { /* fields omitted */ }
An RAII guard that controls a temporary directory of test files.
It is also a builder and is used to build up the temporary files, which are then deleted on drop.
Methods
impl ProjectBuilder
[src]
fn new(name: &str) -> ProjectBuilder
[src]
Create a ProjectBuilder that will manage a new temporary directory making use of the current name.
fn root(&self) -> &Path
[src]
Get the root path of the temporary directory.
fn file<P, B>(self, path: P, body: B) -> ProjectBuilder where
P: AsRef<Path>,
B: Into<Vec<u8>>,
[src]
P: AsRef<Path>,
B: Into<Vec<u8>>,
Add a new file to the temporary directory with the given contents.
fn build(&self) -> &ProjectBuilder
[src]
Creates the project layout, based on current state of the builder
fn build_with_result(&self) -> Result<(), String>
[src]
Creates the project layout, based on current state of the builder
Trait Implementations
impl Debug for ProjectBuilder
[src]
impl Clone for ProjectBuilder
[src]
fn clone(&self) -> ProjectBuilder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for ProjectBuilder
[src]
fn eq(&self, other: &ProjectBuilder) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.