pub struct LocalStorage { /* private fields */ }Expand description
Local file system storage backend
This implementation stores packages in a local directory structure. It’s useful for development, testing, and single-machine deployments.
Implementations§
Trait Implementations§
Source§impl StorageBackend for LocalStorage
impl StorageBackend for LocalStorage
Source§fn put(&mut self, key: &str, data: &[u8]) -> Result<()>
fn put(&mut self, key: &str, data: &[u8]) -> Result<()>
Store data at the specified key Read more
Source§fn list(&self, prefix: &str) -> Result<Vec<StorageObject>>
fn list(&self, prefix: &str) -> Result<Vec<StorageObject>>
List all keys with the specified prefix Read more
Source§fn get_metadata(&self, key: &str) -> Result<StorageObject>
fn get_metadata(&self, key: &str) -> Result<StorageObject>
Get metadata about a stored object Read more
Source§fn backend_type(&self) -> &str
fn backend_type(&self) -> &str
Get the storage backend type
Auto Trait Implementations§
impl Freeze for LocalStorage
impl RefUnwindSafe for LocalStorage
impl Send for LocalStorage
impl Sync for LocalStorage
impl Unpin for LocalStorage
impl UnsafeUnpin 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> 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 more