Skip to main content

Wire

Trait Wire 

Source
pub unsafe trait Wire:
    'static
    + Sized
    + Constrained {
    type Narrowed<'de>: Constrained<Constraint = Self::Constraint>;

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

A FIDL wire type.

§Safety

§Lifetime erasure

Wire types allow for lifetime erasure and restoration. A type that implements Wire may have an instance of its Narrowed type erased by transmuting to an instance of itself.

It is only safe to expose values and mutable reference to the narrowed versions of wire types. While type erased, it is only safe to expose shared references to the implementing type (i.e. &'de Foo<'static>).

§Padding

zero_padding must write zeroes to (at least) the padding bytes of out.

Required Associated Types§

Source

type Narrowed<'de>: Constrained<Constraint = Self::Constraint>

The narrowed 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§

impl Wire for u8

Source§

impl Wire for ()

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl Wire for EmptyStruct

Source§

impl Wire for Bti

Source§

type Narrowed<'de> = Bti

Source§

impl Wire for Channel

Source§

impl Wire for Clock

Source§

impl Wire for Counter

Source§

impl Wire for DebugLog

Source§

impl Wire for Event

Source§

impl Wire for EventPair

Source§

impl Wire for Exception

Source§

impl Wire for Fifo

Source§

impl Wire for Guest

Source§

impl Wire for Interrupt

Source§

impl Wire for Iob

Source§

type Narrowed<'de> = Iob

Source§

impl Wire for Iommu

Source§

impl Wire for Job

Source§

type Narrowed<'de> = Job

Source§

impl Wire for ObjectType

Source§

impl Wire for OptionalBti

Source§

impl Wire for OptionalChannel

Source§

impl Wire for OptionalClock

Source§

impl Wire for OptionalCounter

Source§

impl Wire for OptionalDebugLog

Source§

impl Wire for OptionalEvent

Source§

impl Wire for OptionalEventPair

Source§

impl Wire for OptionalException

Source§

impl Wire for OptionalFifo

Source§

impl Wire for OptionalGuest

Source§

impl Wire for OptionalHandle

Source§

impl Wire for OptionalInterrupt

Source§

impl Wire for OptionalIob

Source§

impl Wire for OptionalIommu

Source§

impl Wire for OptionalJob

Source§

impl Wire for OptionalPager

Source§

impl Wire for OptionalPmt

Source§

impl Wire for OptionalPort

Source§

impl Wire for OptionalProcess

Source§

impl Wire for OptionalProfile

Source§

impl Wire for OptionalResource

Source§

impl Wire for OptionalSocket

Source§

impl Wire for OptionalStream

Source§

impl Wire for OptionalThread

Source§

impl Wire for OptionalTimer

Source§

impl Wire for OptionalVcpu

Source§

impl Wire for OptionalVmar

Source§

impl Wire for OptionalVmo

Source§

impl Wire for Pager

Source§

impl Wire for Pmt

Source§

type Narrowed<'de> = Pmt

Source§

impl Wire for Port

Source§

impl Wire for Process

Source§

impl Wire for Profile

Source§

impl Wire for Resource

Source§

impl Wire for Rights

Source§

impl Wire for Socket

Source§

impl Wire for Stream

Source§

impl Wire for Thread

Source§

impl Wire for Timer

Source§

impl Wire for Vcpu

Source§

impl Wire for Vmar

Source§

impl Wire for Vmo

Source§

type Narrowed<'de> = Vmo

Source§

impl Wire for Float32

Source§

impl Wire for Float64

Source§

impl Wire for Int16

Source§

impl Wire for Int32

Source§

impl Wire for Int64

Source§

impl Wire for OptionalString<'static>

Source§

impl Wire for String<'static>

Source§

type Narrowed<'de> = String<'de>

Source§

impl Wire for Table<'static>

Source§

type Narrowed<'de> = Table<'de>

Source§

impl Wire for Uint16

Source§

impl Wire for Uint32

Source§

impl Wire for Uint64

Source§

impl Wire for Union

Source§

impl Wire for Handle

Source§

impl Wire for Envelope

Source§

impl<T, E> Wire for Result<'static, T, E>
where T: Wire<Constraint = ()>, E: Wire<Constraint = ()>,

Source§

type Narrowed<'de> = Result<'de, <T as Wire>::Narrowed<'de>, <E as Wire>::Narrowed<'de>>

Source§

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

Source§

type Narrowed<'de> = Box<'de, <T as Wire>::Narrowed<'de>>

Source§

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

Source§

type Narrowed<'de> = OptionalVector<'de, <T as Wire>::Narrowed<'de>>

Source§

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

Source§

type Narrowed<'de> = Vector<'de, <T as Wire>::Narrowed<'de>>