Trait Encoder

Source
pub trait Encoder<Encoding, Strategy, Value>
where Encoding: HasEncodedType + HasErrorType,
{ // Required method fn encode( encoding: &Encoding, value: &Value, ) -> Result<Encoding::Encoded, Encoding::Error>; }

Required Methods§

Source

fn encode( encoding: &Encoding, value: &Value, ) -> Result<Encoding::Encoded, Encoding::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Component, Encoding, Strategy, Value> Encoder<Encoding, Strategy, Value> for Component
where Encoding: HasEncodedType + HasErrorType, Component: DelegateComponent<EncoderComponent>, Component::Delegate: Encoder<Encoding, Strategy, Value>,

Source§

impl<Encoding, Strategy, InStrategy, Value> Encoder<Encoding, Strategy, Value> for EncodeUsingStrategy<InStrategy>
where Encoding: CanEncode<InStrategy, Value>, InStrategy: Async,

Source§

impl<Encoding, Strategy, Value> Encoder<Encoding, Strategy, Value> for ReturnEncoded
where Encoding: HasEncodedType<Encoded = Value> + HasErrorType, Value: Clone,

Source§

impl<Encoding, Strategy, Value, Components, Delegate> Encoder<Encoding, Strategy, Value> for DelegateEncoding<Components>
where Encoding: HasEncodedType + HasErrorType, Components: DelegateComponent<(Strategy, Value), Delegate = Delegate>, Delegate: Encoder<Encoding, Strategy, Value>,

Source§

impl<Encoding, Strategy, Value, Raw> Encoder<Encoding, Strategy, Value> for ConvertAndEncode<Raw>
where Encoding: CanEncode<Strategy, Raw> + CanConvert<Value, Raw>, Raw: Async,