#[repr(u8)]pub enum EndpointDirection {
Out = 0,
In = 128,
}Expand description
Endpoint transfer direction (IN from device to host, or OUT from host to device)
encoded in bit 7 of the endpoint address (bEndpointAddress), as defined in
USB 2.0 specification section 9.6.6.
Variants§
Implementations§
Source§impl EndpointDirection
impl EndpointDirection
pub fn from_primitive(prim: u8) -> Option<EndpointDirection>
pub const fn into_primitive(self) -> u8
Trait Implementations§
Source§impl Clone for EndpointDirection
impl Clone for EndpointDirection
Source§fn clone(&self) -> EndpointDirection
fn clone(&self) -> EndpointDirection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EndpointDirection
Source§impl Debug for EndpointDirection
impl Debug for EndpointDirection
Source§impl<D> Decode<EndpointDirection, D> for EndpointDirectionwhere
D: ResourceDialect,
impl<D> Decode<EndpointDirection, D> for EndpointDirectionwhere
D: ResourceDialect,
Source§fn new_empty() -> EndpointDirection
fn new_empty() -> EndpointDirection
Creates a valid instance of
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<EndpointDirection, D> for EndpointDirectionwhere
D: ResourceDialect,
impl<D> Encode<EndpointDirection, D> for EndpointDirectionwhere
D: ResourceDialect,
impl Eq for EndpointDirection
Source§impl Hash for EndpointDirection
impl Hash for EndpointDirection
Source§impl Ord for EndpointDirection
impl Ord for EndpointDirection
Source§fn cmp(&self, other: &EndpointDirection) -> Ordering
fn cmp(&self, other: &EndpointDirection) -> Ordering
1.21.0 (const: unstable) · 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 for EndpointDirection
impl PartialEq for EndpointDirection
Source§fn eq(&self, other: &EndpointDirection) -> bool
fn eq(&self, other: &EndpointDirection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EndpointDirection
impl PartialOrd for EndpointDirection
impl StructuralPartialEq for EndpointDirection
Source§impl TypeMarker for EndpointDirection
impl TypeMarker for EndpointDirection
Source§type Owned = EndpointDirection
type Owned = EndpointDirection
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.Source§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 moreSource§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.Source§impl ValueTypeMarker for EndpointDirection
impl ValueTypeMarker for EndpointDirection
Source§type Borrowed<'a> = EndpointDirection
type Borrowed<'a> = EndpointDirection
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<EndpointDirection as TypeMarker>::Owned,
) -> <EndpointDirection as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<EndpointDirection as TypeMarker>::Owned, ) -> <EndpointDirection as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.Auto Trait Implementations§
impl Freeze for EndpointDirection
impl RefUnwindSafe for EndpointDirection
impl Send for EndpointDirection
impl Sync for EndpointDirection
impl Unpin for EndpointDirection
impl UnsafeUnpin for EndpointDirection
impl UnwindSafe for EndpointDirection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more