pub trait SerializeOption: Serialize {
// Provided method
fn serialize_option(
this: Option<&Self>,
parcel: &mut BorrowedParcel<'_>,
) -> Result<(), StatusCode> { ... }
}Expand description
Helper trait for types that can be nullable when serialized.
Provided Methods§
Sourcefn serialize_option(
this: Option<&Self>,
parcel: &mut BorrowedParcel<'_>,
) -> Result<(), StatusCode>
fn serialize_option( this: Option<&Self>, parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>
Serialize an Option of this type into the given parcel.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".