pub enum Codec {
ArrayToArray(Box<dyn ArrayToArrayCodecTraits>),
ArrayToBytes(Box<dyn ArrayToBytesCodecTraits>),
BytesToBytes(Box<dyn BytesToBytesCodecTraits>),
}
Expand description
A generic array to array, array to bytes, or bytes to bytes codec.
Variants§
ArrayToArray(Box<dyn ArrayToArrayCodecTraits>)
An array to array codec.
ArrayToBytes(Box<dyn ArrayToBytesCodecTraits>)
An array to bytes codec.
BytesToBytes(Box<dyn BytesToBytesCodecTraits>)
A bytes to bytes codec.
Implementations§
source§impl Codec
impl Codec
sourcepub fn from_metadata(metadata: &Metadata) -> Result<Self, PluginCreateError>
pub fn from_metadata(metadata: &Metadata) -> Result<Self, PluginCreateError>
Create a codec from metadata.
§Errors
Returns PluginCreateError
if the metadata is invalid or not associated with a registered codec plugin.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Codec
impl !RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin 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