#[repr(transparent)]pub struct SetupStage(_);
Expand description
Setup Stage TRB
Implementations§
source§impl SetupStage
impl SetupStage
source§impl SetupStage
impl SetupStage
sourcepub fn interrupt_on_completion(self) -> bool
pub fn interrupt_on_completion(self) -> bool
Returns the Interrupt On Completion bit.
sourcepub fn set_interrupt_on_completion(&mut self) -> &mut Self
pub fn set_interrupt_on_completion(&mut self) -> &mut Self
Sets the Interrupt On Completion bit.
sourcepub fn clear_interrupt_on_completion(&mut self) -> &mut Self
pub fn clear_interrupt_on_completion(&mut self) -> &mut Self
Clears the Interrupt On Completion bit.
source§impl SetupStage
impl SetupStage
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new Setup Stage TRB.
This method sets the value of the TRB Type, TRB Transfer Length, and the Immediate Data field properly. All the other fields are set to 0.
sourcepub fn request_type(self) -> u8
pub fn request_type(self) -> u8
Returns the value of the bmRequestType field.
sourcepub fn set_request_type(&mut self, value: u8) -> &mut Self
pub fn set_request_type(&mut self, value: u8) -> &mut Self
Sets the value of the bmRequestType field.
sourcepub fn set_request(&mut self, value: u8) -> &mut Self
pub fn set_request(&mut self, value: u8) -> &mut Self
Sets the value of the bRequest field.
sourcepub fn set_length(&mut self, value: u16) -> &mut Self
pub fn set_length(&mut self, value: u16) -> &mut Self
Sets the value of the wLength field.
sourcepub fn interrupter_target(self) -> u16
pub fn interrupter_target(self) -> u16
Returns the value of the Interrupter Target field.
sourcepub fn set_interrupter_target(&mut self, value: u16) -> &mut Self
pub fn set_interrupter_target(&mut self, value: u16) -> &mut Self
Sets the value of the Interrupter Target field.
sourcepub fn set_transfer_type(&mut self, t: TransferType) -> &mut Self
pub fn set_transfer_type(&mut self, t: TransferType) -> &mut Self
Sets the value of the Transfer Type field.
sourcepub fn transfer_type(&self) -> TransferType
pub fn transfer_type(&self) -> TransferType
Returns the value of the Transfer Type field.
Panics
This method panics if the Transfer Type field contains 1 which is reserved.
Trait Implementations§
source§impl AsRef<[u32]> for SetupStage
impl AsRef<[u32]> for SetupStage
source§impl Clone for SetupStage
impl Clone for SetupStage
source§fn clone(&self) -> SetupStage
fn clone(&self) -> SetupStage
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 moresource§impl Debug for SetupStage
impl Debug for SetupStage
source§impl Default for SetupStage
impl Default for SetupStage
source§impl From<SetupStage> for [u32; 4]
impl From<SetupStage> for [u32; 4]
source§fn from(t: SetupStage) -> Self
fn from(t: SetupStage) -> Self
Converts to this type from the input type.
source§impl From<SetupStage> for Allowed
impl From<SetupStage> for Allowed
source§fn from(v: SetupStage) -> Self
fn from(v: SetupStage) -> Self
Converts to this type from the input type.
source§impl Hash for SetupStage
impl Hash for SetupStage
source§impl Ord for SetupStage
impl Ord for SetupStage
source§fn cmp(&self, other: &SetupStage) -> Ordering
fn cmp(&self, other: &SetupStage) -> 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<SetupStage> for SetupStage
impl PartialEq<SetupStage> for SetupStage
source§fn eq(&self, other: &SetupStage) -> bool
fn eq(&self, other: &SetupStage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SetupStage> for SetupStage
impl PartialOrd<SetupStage> for SetupStage
source§fn partial_cmp(&self, other: &SetupStage) -> Option<Ordering>
fn partial_cmp(&self, other: &SetupStage) -> 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 moreimpl Copy for SetupStage
impl Eq for SetupStage
impl StructuralEq for SetupStage
impl StructuralPartialEq for SetupStage
Auto Trait Implementations§
impl RefUnwindSafe for SetupStage
impl Send for SetupStage
impl Sync for SetupStage
impl Unpin for SetupStage
impl UnwindSafe for SetupStage
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