pub enum DeviceType {
Stub(StubDevice),
Proxy(ProxyDevice),
FidlProxy(FidlProxyDevice),
Composite(CompositeDevice),
}
Variants§
Stub(StubDevice)
The device has no parent to communicate with and no driver to load.
Proxy(ProxyDevice)
The device acts as a proxy for its parent and talks to it via its proxy channel.
FidlProxy(FidlProxyDevice)
This device is a proxy for its parent which lives in another driver host. The parent exposes FIDL protocols in its outgoing directory, which have been routed to this device.
Composite(CompositeDevice)
The device is a composite device with several parents, referred to as fragments. The device aggregates all parent devices together. The order of the fragments will match the original composite creation request.
Implementations§
source§impl DeviceType
impl DeviceType
Trait Implementations§
source§impl Debug for DeviceType
impl Debug for DeviceType
source§impl Decode<DeviceType> for DeviceType
impl Decode<DeviceType> for DeviceType
source§impl Encode<DeviceType> for &mut DeviceType
impl Encode<DeviceType> for &mut DeviceType
source§impl Hash for DeviceType
impl Hash for DeviceType
source§impl Ord for DeviceType
impl Ord for DeviceType
source§fn cmp(&self, other: &DeviceType) -> Ordering
fn cmp(&self, other: &DeviceType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<DeviceType> for DeviceType
impl PartialEq<DeviceType> for DeviceType
source§fn eq(&self, other: &DeviceType) -> bool
fn eq(&self, other: &DeviceType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DeviceType> for DeviceType
impl PartialOrd<DeviceType> for DeviceType
source§fn partial_cmp(&self, other: &DeviceType) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ResourceTypeMarker for DeviceType
impl ResourceTypeMarker for DeviceType
§type Borrowed<'a> = &'a mut DeviceType
type Borrowed<'a> = &'a mut DeviceType
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 moresource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned ) -> Self::Borrowed<'a>
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 TypeMarker for DeviceType
impl TypeMarker for DeviceType
§type Owned = DeviceType
type Owned = DeviceType
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(_context: Context) -> usize
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
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
.§fn encode_is_copy() -> bool
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§fn decode_is_copy() -> bool
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.