pub struct StorageTransformerChain(/* private fields */);Expand description
Configuration for a storage transformer chain.
Implementations§
Source§impl StorageTransformerChain
impl StorageTransformerChain
Sourcepub fn new(storage_transformers: Vec<StorageTransformer>) -> Self
pub fn new(storage_transformers: Vec<StorageTransformer>) -> Self
Create a storage transformer chain from a list of storage transformers.
Sourcepub fn from_metadata(
metadatas: &[MetadataV3],
path: &NodePath,
) -> Result<Self, PluginCreateError>
pub fn from_metadata( metadatas: &[MetadataV3], path: &NodePath, ) -> Result<Self, PluginCreateError>
Create a storage transformer chain from configurations.
§Errors
Returns PluginCreateError if there is a configuration issue or attempt to create an unregistered storage transformer.
Sourcepub fn create_metadatas(&self) -> Vec<MetadataV3>
pub fn create_metadatas(&self) -> Vec<MetadataV3>
Create storage transformer chain metadata.
§Panics
Panics if any storage transformer does not have a V3 name.
Source§impl StorageTransformerChain
impl StorageTransformerChain
Sourcepub fn create_readable_transformer(
&self,
storage: ReadableStorage,
) -> Result<ReadableStorage, StorageError>
pub fn create_readable_transformer( &self, storage: ReadableStorage, ) -> Result<ReadableStorage, StorageError>
Sourcepub fn create_writable_transformer(
&self,
storage: WritableStorage,
) -> Result<WritableStorage, StorageError>
pub fn create_writable_transformer( &self, storage: WritableStorage, ) -> Result<WritableStorage, StorageError>
Sourcepub fn create_readable_writable_transformer(
&self,
storage: ReadableWritableStorage,
) -> Result<ReadableWritableStorage, StorageError>
pub fn create_readable_writable_transformer( &self, storage: ReadableWritableStorage, ) -> Result<ReadableWritableStorage, StorageError>
Sourcepub fn create_listable_transformer(
&self,
storage: ListableStorage,
) -> Result<ListableStorage, StorageError>
pub fn create_listable_transformer( &self, storage: ListableStorage, ) -> Result<ListableStorage, StorageError>
Sourcepub async fn create_async_readable_transformer(
&self,
storage: AsyncReadableStorage,
) -> Result<AsyncReadableStorage, StorageError>
Available on crate feature async only.
pub async fn create_async_readable_transformer( &self, storage: AsyncReadableStorage, ) -> Result<AsyncReadableStorage, StorageError>
async only.Sourcepub async fn create_async_writable_transformer(
&self,
storage: AsyncWritableStorage,
) -> Result<AsyncWritableStorage, StorageError>
Available on crate feature async only.
pub async fn create_async_writable_transformer( &self, storage: AsyncWritableStorage, ) -> Result<AsyncWritableStorage, StorageError>
async only.Sourcepub async fn create_async_readable_writable_transformer(
&self,
storage: AsyncReadableWritableStorage,
) -> Result<AsyncReadableWritableStorage, StorageError>
Available on crate feature async only.
pub async fn create_async_readable_writable_transformer( &self, storage: AsyncReadableWritableStorage, ) -> Result<AsyncReadableWritableStorage, StorageError>
async only.Create an asynchronous redable and writable storage transformer.
§Errors
Returns an error if creation fails.
Sourcepub async fn create_async_listable_transformer(
&self,
storage: AsyncListableStorage,
) -> Result<AsyncListableStorage, StorageError>
Available on crate feature async only.
pub async fn create_async_listable_transformer( &self, storage: AsyncListableStorage, ) -> Result<AsyncListableStorage, StorageError>
async only.Trait Implementations§
Source§impl Clone for StorageTransformerChain
impl Clone for StorageTransformerChain
Source§fn clone(&self) -> StorageTransformerChain
fn clone(&self) -> StorageTransformerChain
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 StorageTransformerChain
impl Debug for StorageTransformerChain
Source§impl Default for StorageTransformerChain
impl Default for StorageTransformerChain
Source§fn default() -> StorageTransformerChain
fn default() -> StorageTransformerChain
Returns the “default value” for a type. Read more
Source§impl From<Vec<Arc<dyn StorageTransformerTraits>>> for StorageTransformerChain
impl From<Vec<Arc<dyn StorageTransformerTraits>>> for StorageTransformerChain
Source§fn from(value: Vec<StorageTransformer>) -> Self
fn from(value: Vec<StorageTransformer>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StorageTransformerChain
impl Send for StorageTransformerChain
impl Sync for StorageTransformerChain
impl !RefUnwindSafe for StorageTransformerChain
impl Unpin for StorageTransformerChain
impl UnsafeUnpin for StorageTransformerChain
impl !UnwindSafe for StorageTransformerChain
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> 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