#[repr(u8)]pub enum RequestType {
Operation = 0,
Status = 16,
SetFeature = 32,
Reserved = 255,
}Expand description
Represents the type of host-to-device request message.
Variants§
Implementations§
Source§impl RequestType
impl RequestType
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new RequestType.
Sourcepub const fn from_u8(val: u8) -> Self
pub const fn from_u8(val: u8) -> Self
Infallible conversion from a u8 into a RequestType.
Sourcepub const fn to_u8(&self) -> u8
pub const fn to_u8(&self) -> u8
Converts the RequestType to a u8.
Sourcepub const fn len() -> usize
pub const fn len() -> usize
Gets the length of the RequestType.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Gets whether the RequestType contains a reserved variant.
Sourcepub const fn is_valid(&self) -> bool
pub const fn is_valid(&self) -> bool
Gets whether the RequestType is a valid variant.
Trait Implementations§
Source§impl Clone for RequestType
impl Clone for RequestType
Source§fn clone(&self) -> RequestType
fn clone(&self) -> RequestType
Returns a duplicate 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 moreSource§impl Debug for RequestType
impl Debug for RequestType
Source§impl Default for RequestType
impl Default for RequestType
Source§impl Display for RequestType
impl Display for RequestType
Source§impl From<&RequestType> for &'static str
impl From<&RequestType> for &'static str
Source§fn from(val: &RequestType) -> Self
fn from(val: &RequestType) -> Self
Converts to this type from the input type.
Source§impl From<RequestType> for &'static str
impl From<RequestType> for &'static str
Source§fn from(val: RequestType) -> Self
fn from(val: RequestType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RequestType
impl PartialEq for RequestType
Source§impl TryFrom<&DenominationDisableMode> for RequestType
impl TryFrom<&DenominationDisableMode> for RequestType
Source§impl TryFrom<&DirectionDisableMode> for RequestType
impl TryFrom<&DirectionDisableMode> for RequestType
Source§impl TryFrom<&RequestType> for DenominationDisableMode
impl TryFrom<&RequestType> for DenominationDisableMode
Source§impl TryFrom<&RequestType> for DirectionDisableMode
impl TryFrom<&RequestType> for DirectionDisableMode
Source§impl TryFrom<DenominationDisableMode> for RequestType
impl TryFrom<DenominationDisableMode> for RequestType
Source§impl TryFrom<DirectionDisableMode> for RequestType
impl TryFrom<DirectionDisableMode> for RequestType
Source§impl TryFrom<RequestType> for DenominationDisableMode
impl TryFrom<RequestType> for DenominationDisableMode
Source§impl TryFrom<RequestType> for DirectionDisableMode
impl TryFrom<RequestType> for DirectionDisableMode
Source§impl TryFrom<u8> for RequestType
impl TryFrom<u8> for RequestType
impl Copy for RequestType
impl Eq for RequestType
impl StructuralPartialEq for RequestType
Auto Trait Implementations§
impl Freeze for RequestType
impl RefUnwindSafe for RequestType
impl Send for RequestType
impl Sync for RequestType
impl Unpin for RequestType
impl UnwindSafe for RequestType
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