pub struct FunctionBuilder<'a, 'd, D: Driver<'d>> { /* private fields */ }
Expand description
Function builder.
A function is a logical grouping of interfaces that perform a given USB function.
If Config::composite_with_iads
is set, each function will have an IAD descriptor.
If not, functions will not be visible as descriptors.
Implementations§
Source§impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D>
impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D>
Sourcepub fn interface(&mut self) -> InterfaceBuilder<'_, 'd, D>
pub fn interface(&mut self) -> InterfaceBuilder<'_, 'd, D>
Add an interface to the function.
Interface numbers are guaranteed to be allocated consecutively, starting from 0.
Sourcepub fn msos_feature<T: FunctionLevelDescriptor>(&mut self, desc: T)
pub fn msos_feature<T: FunctionLevelDescriptor>(&mut self, desc: T)
Add an MS OS 2.0 Function Level Feature Descriptor.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'd, D> Freeze for FunctionBuilder<'a, 'd, D>
impl<'a, 'd, D> !RefUnwindSafe for FunctionBuilder<'a, 'd, D>
impl<'a, 'd, D> !Send for FunctionBuilder<'a, 'd, D>
impl<'a, 'd, D> !Sync for FunctionBuilder<'a, 'd, D>
impl<'a, 'd, D> Unpin for FunctionBuilder<'a, 'd, D>
impl<'a, 'd, D> !UnwindSafe for FunctionBuilder<'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