Struct InterfaceBuilder
pub struct InterfaceBuilder<'a, 'd, D>where
D: Driver<'d>,{ /* private fields */ }
Expand description
Interface builder.
Implementations§
§impl<'a, 'd, D> InterfaceBuilder<'a, 'd, D>where
D: Driver<'d>,
impl<'a, 'd, D> InterfaceBuilder<'a, 'd, D>where
D: Driver<'d>,
pub const fn interface_number(&self) -> InterfaceNumber
pub const fn interface_number(&self) -> InterfaceNumber
Get the interface number.
pub fn string(&mut self) -> StringIndex
pub fn string(&mut self) -> StringIndex
Allocates a new string index.
pub fn alt_setting(
&mut self,
class: u8,
subclass: u8,
protocol: u8,
interface_string: Option<StringIndex>,
) -> InterfaceAltBuilder<'_, 'd, D>
pub fn alt_setting( &mut self, class: u8, subclass: u8, protocol: u8, interface_string: Option<StringIndex>, ) -> InterfaceAltBuilder<'_, 'd, D>
Add an alternate setting to the interface and write its descriptor.
Alternate setting numbers are guaranteed to be allocated consecutively, starting from 0.
The first alternate setting, with number 0, is the default one.
Auto Trait Implementations§
impl<'a, 'd, D> Freeze for InterfaceBuilder<'a, 'd, D>
impl<'a, 'd, D> !RefUnwindSafe for InterfaceBuilder<'a, 'd, D>
impl<'a, 'd, D> !Send for InterfaceBuilder<'a, 'd, D>
impl<'a, 'd, D> !Sync for InterfaceBuilder<'a, 'd, D>
impl<'a, 'd, D> Unpin for InterfaceBuilder<'a, 'd, D>
impl<'a, 'd, D> !UnwindSafe for InterfaceBuilder<'a, 'd, D>
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