pub struct TokioFileSystem;Expand description
Production implementation of FileSystem using tokio::fs.
Trait Implementations§
Source§impl Clone for TokioFileSystem
impl Clone for TokioFileSystem
Source§fn clone(&self) -> TokioFileSystem
fn clone(&self) -> TokioFileSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TokioFileSystem
impl Default for TokioFileSystem
Source§fn default() -> TokioFileSystem
fn default() -> TokioFileSystem
Returns the “default value” for a type. Read more
Source§impl FileSystem for TokioFileSystem
impl FileSystem for TokioFileSystem
Source§fn read(
&self,
path: &Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'static>>
fn read( &self, path: &Path, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'static>>
Read the entire contents of a file into a vector of bytes.
Source§fn write(
&self,
path: &Path,
contents: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>
fn write( &self, path: &Path, contents: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>
Write a slice as the entire contents of a file.
Source§fn remove_file(
&self,
path: &Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>
fn remove_file( &self, path: &Path, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>
Remove a file from the filesystem.
Auto Trait Implementations§
impl Freeze for TokioFileSystem
impl RefUnwindSafe for TokioFileSystem
impl Send for TokioFileSystem
impl Sync for TokioFileSystem
impl Unpin for TokioFileSystem
impl UnsafeUnpin for TokioFileSystem
impl UnwindSafe for TokioFileSystem
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