pub trait WireAdapter<Src: WireSource, S, B> {
// Required method
fn decode(
&self,
payload: Src::Payload<'_>,
) -> Result<Value<S, B>, DecodeError>;
}Expand description
Decodes one per-column payload into a Value.
Object-safe: dyn WireAdapter<Src, S, B> works. The primary
implementation is TypeMap<Src, S, B>, which
dispatches on Src::TypeKey via a hashmap.
Required Methods§
Sourcefn decode(&self, payload: Src::Payload<'_>) -> Result<Value<S, B>, DecodeError>
fn decode(&self, payload: Src::Payload<'_>) -> Result<Value<S, B>, DecodeError>
Decode one column payload.
§Errors
Returns DecodeError::NoDecoderForType when the underlying
registry has no decoder for the payload’s type key, or the
specific decoder’s own failure mode when it does.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".