Skip to main content

FileSystemStorageProvider

Struct FileSystemStorageProvider 

Source
pub struct FileSystemStorageProvider { /* private fields */ }
Expand description

Simple file system storage provider implementation.

Implementations§

Source§

impl FileSystemStorageProvider

Source

pub fn new(root_dir: String) -> Self

Create a new file system storage provider.

Trait Implementations§

Source§

impl Clone for FileSystemStorageProvider

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl HTTExtensionBase for FileSystemStorageProvider

Source§

fn name(&self) -> &str

Get the extension name.
Source§

fn version(&self) -> &str

Get the extension version.
Source§

fn description(&self) -> &str

Get the extension description.
Source§

fn capabilities(&self) -> ExtensionCapabilities

Get the extension capabilities.
Source§

fn metadata(&self) -> HashMap<String, String>

Get extension metadata.
Source§

fn initialize(&mut self) -> ExtensionResult<()>

Initialize the extension.
Source§

fn shutdown(&mut self) -> ExtensionResult<()>

Shut down the extension.
Source§

fn is_compatible_with(&self, data_type: &str) -> bool

Check if the extension is compatible with the given data type.
Source§

fn as_any(&self) -> &dyn Any

Convert the extension to Any for downcasting.
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Convert the extension to mutable Any for downcasting.
Source§

impl HTTStorageProvider for FileSystemStorageProvider

Source§

fn store(&mut self, path: &str, data: &[u8]) -> ExtensionResult<()>

Store data at the given path.
Source§

fn retrieve(&self, path: &str) -> ExtensionResult<Vec<u8>>

Retrieve data from the given path.
Source§

fn delete(&mut self, path: &str) -> ExtensionResult<()>

Delete data at the given path.
Source§

fn exists(&self, path: &str) -> ExtensionResult<bool>

Check if data exists at the given path.
Source§

fn list(&self, prefix: &str) -> ExtensionResult<Vec<String>>

List paths matching the given prefix.
Source§

fn get_metadata(&self, path: &str) -> ExtensionResult<HashMap<String, String>>

Get metadata for the given path.
Source§

fn set_metadata( &mut self, path: &str, key: &str, value: &str, ) -> ExtensionResult<()>

Set metadata for the given path.
Source§

fn flush(&mut self) -> ExtensionResult<()>

Flush any pending changes to durable storage.
Source§

fn begin_transaction(&mut self) -> ExtensionResult<()>

Begin a transaction.
Source§

fn commit_transaction(&mut self) -> ExtensionResult<()>

Commit a transaction.
Source§

fn rollback_transaction(&mut self) -> ExtensionResult<()>

Rollback a transaction.
Source§

fn supports_transactions(&self) -> bool

Check if the provider supports transactions.
Source§

fn is_available(&self) -> bool

Check if the provider is available.
Source§

fn stats(&self) -> ExtensionResult<HashMap<String, String>>

Get provider statistics.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.