fidl_next

Trait 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.

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.

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 ()

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>

Source§

impl<E: HandleEncoder + ?Sized> EncodeOption<E> for Channel

Source§

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

Source§

impl<E: HandleEncoder + ?Sized> EncodeOption<E> for Handle

Source§

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

Implementors§

Source§

impl<E, T, P> EncodeOption<E> for ClientEnd<T, P>
where E: ?Sized, T: EncodeOption<E>,

Source§

impl<E, T, P> EncodeOption<E> for ServerEnd<T, P>
where E: ?Sized, T: EncodeOption<E>,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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