pub struct DefaultContentStorage;Expand description
Default content storage implementation.
Stores content to local filesystem, creating parent directories as needed. Binary content is written as-is, text content is written as UTF-8.
§Examples
ⓘ
use genfile_core::{ DefaultContentStorage, ContentStorage, FileContent };
use std::path::Path;
let mut storage = DefaultContentStorage::new();
storage.store(
Path::new( "output.txt" ),
&FileContent::Text( "Hello".into() )
).unwrap();Implementations§
Trait Implementations§
Source§impl Debug for DefaultContentStorage
impl Debug for DefaultContentStorage
Auto Trait Implementations§
impl Freeze for DefaultContentStorage
impl RefUnwindSafe for DefaultContentStorage
impl Send for DefaultContentStorage
impl Sync for DefaultContentStorage
impl Unpin for DefaultContentStorage
impl UnwindSafe for DefaultContentStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more