pub struct ServiceAdapterFactory;Expand description
Generic factory for creating any service adapter
Implementations§
Source§impl ServiceAdapterFactory
impl ServiceAdapterFactory
Sourcepub fn create_compression_adapter(
service: Arc<dyn CompressionService>,
compression_config: CompressionConfig,
) -> Box<dyn ChunkProcessor>
pub fn create_compression_adapter( service: Arc<dyn CompressionService>, compression_config: CompressionConfig, ) -> Box<dyn ChunkProcessor>
Create a compression chunk adapter with required configuration
§Arguments
service- The compression service implementationcompression_config- Compression algorithm and parameters
Sourcepub fn create_encryption_adapter(
service: Arc<dyn EncryptionService>,
encryption_config: EncryptionConfig,
key_material: KeyMaterial,
) -> Box<dyn ChunkProcessor>
pub fn create_encryption_adapter( service: Arc<dyn EncryptionService>, encryption_config: EncryptionConfig, key_material: KeyMaterial, ) -> Box<dyn ChunkProcessor>
Create an encryption chunk adapter with required configuration
§Security
Caller MUST provide secure key material. This factory will NOT generate insecure defaults.
§Arguments
service- The encryption service implementationencryption_config- Encryption algorithm and parameterskey_material- Cryptographic key material (must be secure!)
Sourcepub fn create_custom_adapter<T: Send + Sync + 'static>(
service: Arc<T>,
name: String,
config: AdapterConfig,
) -> ServiceChunkAdapter<T>
pub fn create_custom_adapter<T: Send + Sync + 'static>( service: Arc<T>, name: String, config: AdapterConfig, ) -> ServiceChunkAdapter<T>
Create a custom service adapter with specific configuration
Auto Trait Implementations§
impl Freeze for ServiceAdapterFactory
impl RefUnwindSafe for ServiceAdapterFactory
impl Send for ServiceAdapterFactory
impl Sync for ServiceAdapterFactory
impl Unpin for ServiceAdapterFactory
impl UnwindSafe for ServiceAdapterFactory
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> 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 more