pub struct LocalStorage {}
Expand description
Implementation of the Storage
trait for the local filesystem
Implementations§
Source§impl LocalStorage
impl LocalStorage
Trait Implementations§
Source§impl Clone for LocalStorage
impl Clone for LocalStorage
Source§fn clone(&self) -> LocalStorage
fn clone(&self) -> LocalStorage
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 Debug for LocalStorage
impl Debug for LocalStorage
Source§impl Default for LocalStorage
impl Default for LocalStorage
Source§impl Storage for LocalStorage
impl Storage for LocalStorage
Source§async fn copy(&self, from: impl AsRef<Path>, to: impl AsRef<Path>) -> Res<u64>
async fn copy(&self, from: impl AsRef<Path>, to: impl AsRef<Path>) -> Res<u64>
Copy a file from one location to another.
Source§async fn create_dir_all(&self, path: impl AsRef<Path>) -> Res
async fn create_dir_all(&self, path: impl AsRef<Path>) -> Res
Recursively creates a directory and all of its parent components if they
are missing.
Source§async fn exists(&self, path: impl AsRef<Path>) -> bool
async fn exists(&self, path: impl AsRef<Path>) -> bool
Check if a path exists in the filesystem.
Source§async fn get_object_attributes(
&self,
stream: RemoteObjectStream,
listing_uri: &S3Uri,
object: &Object,
) -> Res<S3Attributes>
async fn get_object_attributes( &self, stream: RemoteObjectStream, listing_uri: &S3Uri, object: &Object, ) -> Res<S3Attributes>
Get the same attributes including checskum as from S3
Source§async fn modified_timestamp(&self, path: impl AsRef<Path>) -> Res<DateTime<Utc>>
async fn modified_timestamp(&self, path: impl AsRef<Path>) -> Res<DateTime<Utc>>
Get the timestamp of the last modification of a file.
Source§async fn open_file(&self, path: impl AsRef<Path>) -> Res<File>
async fn open_file(&self, path: impl AsRef<Path>) -> Res<File>
Opens file (doesn’t read contents)
Source§async fn read_byte_stream(
&self,
path: impl AsRef<Path> + Send + Sync,
) -> Res<ByteStream>
async fn read_byte_stream( &self, path: impl AsRef<Path> + Send + Sync, ) -> Res<ByteStream>
Reads the entire contents of a file into a stream.
Source§async fn read_dir(&self, path: impl AsRef<Path>) -> Res<ReadDir>
async fn read_dir(&self, path: impl AsRef<Path>) -> Res<ReadDir>
Returns a stream over the entries within a directory.
Not recursive.
Source§async fn read_file(&self, path: impl AsRef<Path>) -> Res<Vec<u8>>
async fn read_file(&self, path: impl AsRef<Path>) -> Res<Vec<u8>>
Reads the entire contents of a file into a bytes vector.
Prefer using
read_byte_stream
.Source§async fn remove_dir_all(&self, path: impl AsRef<Path>) -> Res
async fn remove_dir_all(&self, path: impl AsRef<Path>) -> Res
Removes a directory at this path, after removing all its contents.
Source§async fn remove_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
async fn remove_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
Remove a file from the filesystem.
Source§async fn rename(&self, from: impl AsRef<Path>, to: impl AsRef<Path>) -> Res
async fn rename(&self, from: impl AsRef<Path>, to: impl AsRef<Path>) -> Res
Rename/move a file from one location to another.
Source§async fn write_byte_stream(
&self,
path: impl AsRef<Path> + Send + Sync,
body: ByteStream,
) -> Res
async fn write_byte_stream( &self, path: impl AsRef<Path> + Send + Sync, body: ByteStream, ) -> Res
Writes bytes srteam to a file
Auto Trait Implementations§
impl Freeze for LocalStorage
impl RefUnwindSafe for LocalStorage
impl Send for LocalStorage
impl Sync for LocalStorage
impl Unpin for LocalStorage
impl UnwindSafe for LocalStorage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.