Type Alias Endpoint

Source
pub type Endpoint<T> = HandleType<T, { _ }, { _ }>;
Expand description

An abbreviation of HandleType that for channels with default rights, used for the FIDL types client_end:P and server_end:P.

Aliased Type§

struct Endpoint<T>(/* private fields */);

Trait Implementations

Source§

impl<T: 'static + EncodableAsHandle, const OBJECT_TYPE: u32, const RIGHTS: u32> Decode<HandleType<T, OBJECT_TYPE, RIGHTS>, <T as EncodableAsHandle>::Dialect> for T

Source§

fn new_empty() -> Self

Creates a valid instance of Self. The specific value does not matter, since it will be overwritten by decode.
Source§

unsafe fn decode( &mut self, decoder: &mut Decoder<'_, T::Dialect>, offset: usize, _depth: Depth, ) -> Result<()>

Decodes an object of type T from the decoder’s buffers into self. Read more
Source§

impl<T: 'static + EncodableAsHandle, const OBJECT_TYPE: u32, const RIGHTS: u32> Encode<HandleType<T, OBJECT_TYPE, RIGHTS>, <T as EncodableAsHandle>::Dialect> for T

Source§

unsafe fn encode( self, encoder: &mut Encoder<'_, T::Dialect>, offset: usize, _depth: Depth, ) -> Result<()>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T: 'static + EncodableAsHandle, const OBJECT_TYPE: u32, const RIGHTS: u32> ResourceTypeMarker for HandleType<T, OBJECT_TYPE, RIGHTS>

Source§

type Borrowed<'a> = T

The Rust type to use for encoding. This is a particular Encode<Self> type cheaply obtainable from &mut Self::Owned. There are three cases: Read more
Source§

fn take_or_borrow(value: &mut <Self as TypeMarker>::Owned) -> Self::Borrowed<'_>

Cheaply converts from &mut Self::Owned to Self::Borrowed. For HandleBased types this is “take” (it returns an owned handle and replaces value with Handle::invalid), and for all other types it is “borrow” (just converts from one reference to another).
Source§

impl<T: 'static + EncodableAsHandle, const OBJECT_TYPE: u32, const RIGHTS: u32> TypeMarker for HandleType<T, OBJECT_TYPE, RIGHTS>

Source§

type Owned = T

The owned Rust type which this FIDL type decodes into.
Source§

fn inline_align(_context: Context) -> usize

Returns the minimum required alignment of the inline portion of the encoded object. It must be a (nonzero) power of two.
Source§

fn inline_size(_context: Context) -> usize

Returns the size of the inline portion of the encoded object, including padding for alignment. Must be a multiple of inline_align.
Source§

fn encode_is_copy() -> bool

Returns true if the memory layout of Self::Owned matches the FIDL wire format and encoding requires no validation. When true, we can optimize encoding arrays and vectors of Self::Owned to a single memcpy. Read more
Source§

fn decode_is_copy() -> bool

Returns true if the memory layout of Self::Owned matches the FIDL wire format and decoding requires no validation. When true, we can optimize decoding arrays and vectors of Self::Owned to a single memcpy.