[][src]Trait assert_fs::fixture::FileWriteStr

pub trait FileWriteStr {
    fn write_str(&self, data: &str) -> Result<(), FixtureError>;
}

Write a text file at ChildPath.

Required methods

fn write_str(&self, data: &str) -> Result<(), FixtureError>

Write a text file at ChildPath.

Examples

use assert_fs::prelude::*;

let temp = assert_fs::TempDir::new().unwrap();
temp
   .child("foo.txt")
   .write_str("To be or not to be...")
   .unwrap();
temp.close().unwrap();
Loading content...

Implementors

impl FileWriteStr for ChildPath[src]

impl FileWriteStr for NamedTempFile[src]

Loading content...