Trait FileWriteBin
assert_fs
pub trait FileWriteBin { fn write_binary(&self, data: &[u8]) -> Result<()>; }
Write a binary file at ChildPath.
ChildPath
fn write_binary(&self, data: &[u8]) -> Result<()>
use assert_fs::prelude::*; let temp = assert_fs::TempDir::new().unwrap(); temp .child("foo.txt") .write_binary(b"To be or not to be...") .unwrap(); temp.close().unwrap();
impl FileWriteBin for ChildPath