Trait Wire

Source
pub unsafe trait Wire: 'static + Sized {
    type Decoded<'de>: 'de;

    // Required method
    fn zero_padding(out: &mut MaybeUninit<Self>);
}
Expand description

A FIDL wire type.

§Safety

  • References to decoded data yielded by Self::Decoded<'de> must not outlive 'de.
  • zero_padding must write zeroes to (at least) the padding bytes of out.

Required Associated Types§

Source

type Decoded<'de>: 'de

The decoded wire type, restricted to the 'de lifetime.

Required Methods§

Source

fn zero_padding(out: &mut MaybeUninit<Self>)

Writes zeroes to the padding for this type, if any.

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 Wire for bool

Source§

impl Wire for i8

Source§

type Decoded<'de> = i8

Source§

fn zero_padding(_: &mut MaybeUninit<Self>)

Source§

impl Wire for u8

Source§

type Decoded<'de> = u8

Source§

fn zero_padding(_: &mut MaybeUninit<Self>)

Source§

impl Wire for ()

Source§

type Decoded<'de> = ()

Source§

fn zero_padding(_: &mut MaybeUninit<Self>)

Source§

impl<T: Wire, const N: usize> Wire for [T; N]

Source§

type Decoded<'de> = [<T as Wire>::Decoded<'de>; N]

Source§

fn zero_padding(out: &mut MaybeUninit<Self>)

Implementors§

Source§

impl Wire for WireChannel

Source§

impl Wire for WireOptionalChannel

Source§

impl Wire for WireOptionalHandle

Source§

impl Wire for RawWireUnion

Source§

impl Wire for WireF32

Source§

impl Wire for WireF64

Source§

impl Wire for WireI16

Source§

impl Wire for WireI32

Source§

impl Wire for WireI64

Source§

impl Wire for WireOptionalString<'static>

Source§

impl Wire for WireString<'static>

Source§

type Decoded<'de> = WireString<'de>

Source§

impl Wire for WireTable<'static>

Source§

type Decoded<'de> = WireTable<'de>

Source§

impl Wire for WireU16

Source§

impl Wire for WireU32

Source§

impl Wire for WireU64

Source§

impl Wire for WireHandle

Source§

impl Wire for WireEnvelope

Source§

impl<T: Wire> Wire for WireBox<'static, T>

Source§

type Decoded<'de> = WireBox<'de, <T as Wire>::Decoded<'de>>

Source§

impl<T: Wire> Wire for WireOptionalVector<'static, T>

Source§

type Decoded<'de> = WireOptionalVector<'de, <T as Wire>::Decoded<'de>>

Source§

impl<T: Wire> Wire for WireVector<'static, T>

Source§

type Decoded<'de> = WireVector<'de, <T as Wire>::Decoded<'de>>

Source§

impl<T: Wire, E: Wire> Wire for WireResult<'static, T, E>

Source§

type Decoded<'de> = WireResult<'de, <T as Wire>::Decoded<'de>, <E as Wire>::Decoded<'de>>