Struct assert_fs::ChildPath [−][src]
pub struct ChildPath { /* fields omitted */ }A path within a TempDir
See Trait Implementations.
Examples
use assert_fs::prelude::*; let temp = assert_fs::TempDir::new().unwrap(); let input_file = temp.child("foo.txt"); input_file.touch().unwrap(); temp.child("bar.txt").touch().unwrap(); temp.close().unwrap();
Methods
impl ChildPath[src]
impl ChildPathpub fn new<P>(path: P) -> Self where
P: Into<PathBuf>, [src]
pub fn new<P>(path: P) -> Self where
P: Into<PathBuf>, Wrap a path for use with special built extension traits.
See trait implementations or PathChild for more details.
pub fn path(&self) -> &Path[src]
pub fn path(&self) -> &PathAccess the path.
Trait Implementations
impl PathAssert for ChildPath[src]
impl PathAssert for ChildPathⓘImportant traits for &'a mut Rfn assert<I, P>(&self, pred: I) -> &Self where
I: IntoPathPredicate<P>,
P: Predicate<Path>, [src]
ⓘImportant traits for &'a mut R
fn assert<I, P>(&self, pred: I) -> &Self where
I: IntoPathPredicate<P>,
P: Predicate<Path>, Wrap with an interface for that provides assertions on the TempDir.
impl FileTouch for ChildPath[src]
impl FileTouch for ChildPathimpl FileWriteBin for ChildPath[src]
impl FileWriteBin for ChildPathimpl FileWriteStr for ChildPath[src]
impl FileWriteStr for ChildPathimpl PathCopy for ChildPath[src]
impl PathCopy for ChildPath