pub type EncodeUnencodableActionOf<C> = EncodeUnencodableAction<<C as Codec>::Value>;Expand description
Unencodable-value action for a codec-backed encode hook.
This alias uses the codec’s Codec::Value as the replacement payload
type, keeping hook signatures tied to the codec they serve.
§Type Parameters
C: Codec whose associatedValueis carried by replacement actions.
Aliased Type§
pub enum EncodeUnencodableActionOf<C> {
Reject,
Skip,
Replace {
value: <C as Codec>::Value,
},
}Variants§
Reject
Reject the current input value.
The encode engine reports crate::TranscodeEncodeError::Unencodable
at the current input index.
Skip
Consume the current input value without producing output.
Replace
Encode a replacement value and consume the current input value.
The replacement must be encodable by the same codec. Returning an unencodable replacement is a hook contract violation and panics in the encode engine.