Trait fidl_next::decode::Decode

source ·
pub unsafe trait Decode<D: ?Sized> {
    // Required method
    fn decode(slot: Slot<'_, Self>, decoder: &mut D) -> Result<(), DecodeError>;
}
Expand description

Decodes a value from the given slot.

§Safety

If decode returns Ok, then the provided slot must now contain a valid value of the implementing type.

Required Methods§

source

fn decode(slot: Slot<'_, Self>, decoder: &mut D) -> Result<(), DecodeError>

Decodes a value into a slot using a decoder.

If decoding succeeds, slot will contain a valid value. If decoding fails, an error will be returned.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<D: ?Sized> Decode<D> for bool

source§

fn decode(slot: Slot<'_, Self>, _: &mut D) -> Result<(), DecodeError>

source§

impl<D: ?Sized> Decode<D> for i8

source§

fn decode(_: Slot<'_, Self>, _: &mut D) -> Result<(), DecodeError>

source§

impl<D: ?Sized> Decode<D> for u8

source§

fn decode(_: Slot<'_, Self>, _: &mut D) -> Result<(), DecodeError>

source§

impl<D: ?Sized, T: Decode<D>, const N: usize> Decode<D> for [T; N]

source§

fn decode(slot: Slot<'_, Self>, decoder: &mut D) -> Result<(), DecodeError>

Implementors§

source§

impl<'buf, D: Decoder<'buf> + ?Sized> Decode<D> for WireOptionalString<'buf>

source§

impl<'buf, D: Decoder<'buf> + ?Sized> Decode<D> for WireString<'buf>

source§

impl<'buf, D: Decoder<'buf> + ?Sized, T: Decode<D>> Decode<D> for WireBox<'buf, T>

source§

impl<'buf, D: Decoder<'buf> + ?Sized, T: Decode<D>> Decode<D> for WireOptionalVector<'buf, T>

source§

impl<'buf, D: Decoder<'buf> + ?Sized, T: Decode<D>> Decode<D> for WireVector<'buf, T>

source§

impl<D: HandleDecoder + ?Sized> Decode<D> for WireHandle

source§

impl<D: ?Sized> Decode<D> for f32_le

source§

impl<D: ?Sized> Decode<D> for f64_le

source§

impl<D: ?Sized> Decode<D> for i16_le

source§

impl<D: ?Sized> Decode<D> for i32_le

source§

impl<D: ?Sized> Decode<D> for i64_le

source§

impl<D: ?Sized> Decode<D> for u16_le

source§

impl<D: ?Sized> Decode<D> for u32_le

source§

impl<D: ?Sized> Decode<D> for u64_le