pub enum TestVendorProtocol {
TestFtdi,
TestHidOneEndpoint,
TestHidTwoEndpoint,
Undefined,
// some variants omitted
}Expand description
USB Test/Vendor protocol codes (for VendorSubclass.VENDOR 0xff).
Variants§
Implementations§
Source§impl TestVendorProtocol
impl TestVendorProtocol
pub fn from_primitive(prim: u8) -> Option<TestVendorProtocol>
pub fn from_primitive_allow_unknown(prim: u8) -> TestVendorProtocol
pub fn unknown() -> TestVendorProtocol
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for TestVendorProtocol
impl Clone for TestVendorProtocol
Source§fn clone(&self) -> TestVendorProtocol
fn clone(&self) -> TestVendorProtocol
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 TestVendorProtocol
Source§impl Debug for TestVendorProtocol
impl Debug for TestVendorProtocol
Source§impl<D> Decode<TestVendorProtocol, D> for TestVendorProtocolwhere
D: ResourceDialect,
impl<D> Decode<TestVendorProtocol, D> for TestVendorProtocolwhere
D: ResourceDialect,
Source§fn new_empty() -> TestVendorProtocol
fn new_empty() -> TestVendorProtocol
Creates a valid instance of
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<TestVendorProtocol, D> for TestVendorProtocolwhere
D: ResourceDialect,
impl<D> Encode<TestVendorProtocol, D> for TestVendorProtocolwhere
D: ResourceDialect,
impl Eq for TestVendorProtocol
Source§impl Hash for TestVendorProtocol
impl Hash for TestVendorProtocol
Source§impl Ord for TestVendorProtocol
impl Ord for TestVendorProtocol
Source§fn cmp(&self, other: &TestVendorProtocol) -> Ordering
fn cmp(&self, other: &TestVendorProtocol) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for TestVendorProtocol
impl PartialEq for TestVendorProtocol
Source§impl PartialOrd for TestVendorProtocol
impl PartialOrd for TestVendorProtocol
impl StructuralPartialEq for TestVendorProtocol
Source§impl TypeMarker for TestVendorProtocol
impl TypeMarker for TestVendorProtocol
Source§type Owned = TestVendorProtocol
type Owned = TestVendorProtocol
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 TestVendorProtocol
impl ValueTypeMarker for TestVendorProtocol
Source§type Borrowed<'a> = TestVendorProtocol
type Borrowed<'a> = TestVendorProtocol
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: &<TestVendorProtocol as TypeMarker>::Owned,
) -> <TestVendorProtocol as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<TestVendorProtocol as TypeMarker>::Owned, ) -> <TestVendorProtocol as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.Auto Trait Implementations§
impl Freeze for TestVendorProtocol
impl RefUnwindSafe for TestVendorProtocol
impl Send for TestVendorProtocol
impl Sync for TestVendorProtocol
impl Unpin for TestVendorProtocol
impl UnsafeUnpin for TestVendorProtocol
impl UnwindSafe for TestVendorProtocol
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