pub trait EncodeOption<E: ?Sized>: EncodableOption {
// Required method
fn encode_option(
this: Option<&mut Self>,
encoder: &mut E,
slot: Slot<'_, Self::EncodedOption<'_>>,
) -> Result<(), EncodeError>;
}
Expand description
Encodes an optional value.
Required Methods§
Sourcefn encode_option(
this: Option<&mut Self>,
encoder: &mut E,
slot: Slot<'_, Self::EncodedOption<'_>>,
) -> Result<(), EncodeError>
fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and slot.
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.