Trait fidl_next::encode::EncodeOption

source ·
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§

source

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for bool

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for f32

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for f64

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for i8

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for i16

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for i32

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for i64

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for u8

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for u16

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for u32

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for u64

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized> EncodeOption<E> for String

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: Encoder + ?Sized, T: Encode<E>> EncodeOption<E> for Vec<T>

source§

fn encode_option( this: Option<&mut Self>, encoder: &mut E, slot: Slot<'_, Self::EncodedOption<'_>>, ) -> Result<(), EncodeError>

Implementors§