fidl_next

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

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> 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: HandleEncoder + ?Sized> Encode<E> for Channel

Source§

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

Source§

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

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> Encode<E> for ()

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, T, P> Encode<E> for ClientEnd<T, P>
where E: ?Sized, T: Encode<E>,

Source§

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

Source§

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

Source§

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

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