Trait fidl_next::encode::Encode

source ·
pub trait Encode<E: ?Sized>: Encodable {
    // Required method
    fn encode(
        &mut self,
        encoder: &mut E,
        slot: Slot<'_, Self::Encoded<'_>>,
    ) -> Result<(), EncodeError>;
}
Expand description

Encodes a value.

Required Methods§

source

fn encode( &mut self, encoder: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

Encodes this value into an encoder and slot.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

fn encode( &mut self, encoder: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

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

source§

fn encode( &mut self, encoder: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for bool

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for f32

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for f64

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for i8

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for i16

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for i32

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for i64

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for u8

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for u16

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for u32

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized> Encode<E> for u64

source§

fn encode( &mut self, _: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized, T: Encode<E>> Encode<E> for Box<T>

source§

fn encode( &mut self, encoder: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized, T: Encode<E>, const N: usize> Encode<E> for [T; N]

source§

fn encode( &mut self, encoder: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

source§

impl<E: ?Sized, T: EncodeOption<E>> Encode<E> for Option<T>

source§

fn encode( &mut self, encoder: &mut E, slot: Slot<'_, Self::Encoded<'_>>, ) -> Result<(), EncodeError>

Implementors§

source§

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

source§

impl<E: ?Sized> Encode<E> for f32_le

source§

impl<E: ?Sized> Encode<E> for f64_le

source§

impl<E: ?Sized> Encode<E> for i16_le

source§

impl<E: ?Sized> Encode<E> for i32_le

source§

impl<E: ?Sized> Encode<E> for i64_le

source§

impl<E: ?Sized> Encode<E> for u16_le

source§

impl<E: ?Sized> Encode<E> for u32_le

source§

impl<E: ?Sized> Encode<E> for u64_le