Enum HeaderType
pub enum HeaderType {
Standard,
Bridge,
CardBus,
Mask,
MultiFn,
// some variants omitted
}
Variants§
Implementations§
§impl HeaderType
impl HeaderType
pub fn from_primitive(prim: u8) -> Option<HeaderType>
pub fn from_primitive_allow_unknown(prim: u8) -> HeaderType
pub fn unknown() -> HeaderType
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for HeaderType
impl Clone for HeaderType
§fn clone(&self) -> HeaderType
fn clone(&self) -> HeaderType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for HeaderType
impl Debug for HeaderType
§impl<D> Decode<HeaderType, D> for HeaderTypewhere
D: ResourceDialect,
impl<D> Decode<HeaderType, D> for HeaderTypewhere
D: ResourceDialect,
§fn new_empty() -> HeaderType
fn new_empty() -> HeaderType
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<HeaderType, D> for HeaderTypewhere
D: ResourceDialect,
impl<D> Encode<HeaderType, D> for HeaderTypewhere
D: ResourceDialect,
§impl Hash for HeaderType
impl Hash for HeaderType
§impl Ord for HeaderType
impl Ord for HeaderType
§impl PartialEq for HeaderType
impl PartialEq for HeaderType
§impl PartialOrd for HeaderType
impl PartialOrd for HeaderType
§impl TypeMarker for HeaderType
impl TypeMarker for HeaderType
§type Owned = HeaderType
type Owned = HeaderType
The owned Rust type which this FIDL type decodes into.
§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.
§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.§impl ValueTypeMarker for HeaderType
impl ValueTypeMarker for HeaderType
§type Borrowed<'a> = HeaderType
type Borrowed<'a> = HeaderType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<HeaderType as TypeMarker>::Owned,
) -> <HeaderType as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<HeaderType as TypeMarker>::Owned, ) -> <HeaderType as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for HeaderType
impl Eq for HeaderType
impl StructuralPartialEq for HeaderType
Auto Trait Implementations§
impl Freeze for HeaderType
impl RefUnwindSafe for HeaderType
impl Send for HeaderType
impl Sync for HeaderType
impl Unpin for HeaderType
impl UnwindSafe for HeaderType
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