pub trait OutputCodec<V: ?Sized> {
type Output;
// Required methods
fn metadata(&self) -> &'static CodecMetadata;
fn encode(&self, value: &V) -> Self::Output;
}Expand description
Encode a public algebra value of type V.
Textual codecs use Output = String; algebra-owned display codecs use
Output = VisualRepresentation.
Required Associated Types§
Required Methods§
Sourcefn metadata(&self) -> &'static CodecMetadata
fn metadata(&self) -> &'static CodecMetadata
Return static codec metadata. This must not inspect or encode a value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".