pub enum Codec {
ArrayToArray(Arc<dyn ArrayToArrayCodecTraits>),
ArrayToBytes(Arc<dyn ArrayToBytesCodecTraits>),
BytesToBytes(Arc<dyn BytesToBytesCodecTraits>),
}Expand description
A generic array to array, array to bytes, or bytes to bytes codec.
Variants§
ArrayToArray(Arc<dyn ArrayToArrayCodecTraits>)
An array to array codec.
ArrayToBytes(Arc<dyn ArrayToBytesCodecTraits>)
An array to bytes codec.
BytesToBytes(Arc<dyn BytesToBytesCodecTraits>)
A bytes to bytes codec.
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn from_metadata<'a>(
metadata: impl Into<CodecMetadata<'a>>,
) -> Result<Codec, PluginCreateError>
pub fn from_metadata<'a>( metadata: impl Into<CodecMetadata<'a>>, ) -> Result<Codec, PluginCreateError>
Create a codec from metadata.
§Errors
Returns PluginCreateError if the metadata is invalid or not associated with a registered codec plugin.
Sourcepub fn configuration(
&self,
version: ZarrVersion,
options: &CodecMetadataOptions,
) -> Option<Configuration>
pub fn configuration( &self, version: ZarrVersion, options: &CodecMetadataOptions, ) -> Option<Configuration>
Create the codec configuration.
Sourcepub fn configuration_v3(
&self,
options: &CodecMetadataOptions,
) -> Option<Configuration>
pub fn configuration_v3( &self, options: &CodecMetadataOptions, ) -> Option<Configuration>
Create the Zarr V3 codec configuration.
Sourcepub fn configuration_v2(
&self,
options: &CodecMetadataOptions,
) -> Option<Configuration>
pub fn configuration_v2( &self, options: &CodecMetadataOptions, ) -> Option<Configuration>
Create the Zarr V2 codec configuration.
Trait Implementations§
Source§impl ExtensionName for Codec
impl ExtensionName for Codec
Auto Trait Implementations§
impl Freeze for Codec
impl Send for Codec
impl Sync for Codec
impl !RefUnwindSafe for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl !UnwindSafe for Codec
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