Struct MsOsDescriptorWriter
pub struct MsOsDescriptorWriter<'d> { /* private fields */ }
Expand description
Writes a Microsoft OS 2.0 Descriptor set into a buffer.
Implementations§
§impl<'d> MsOsDescriptorWriter<'d>
impl<'d> MsOsDescriptorWriter<'d>
pub fn is_in_config_subset(&self) -> bool
pub fn is_in_config_subset(&self) -> bool
Returns true
if a configuration subset header has been started
pub fn is_in_function_subset(&self) -> bool
pub fn is_in_function_subset(&self) -> bool
Returns true
if a function subset header has been started and not yet ended
pub fn header(&mut self, windows_version: u32, vendor_code: u8)
pub fn header(&mut self, windows_version: u32, vendor_code: u8)
Write the MS OS descriptor set header.
windows_version
is an NTDDI version constant that describes a windows version. See thewindows_version
module.vendor_code
is the vendor request code used to read the MS OS descriptor set.
pub fn device_feature<T>(&mut self, desc: T)where
T: DeviceLevelDescriptor,
pub fn device_feature<T>(&mut self, desc: T)where
T: DeviceLevelDescriptor,
Add a device level feature descriptor.
Note that some feature descriptors may only be used at the device level in non-composite devices.
Those features must be written before the first call to Self::configuration
.
pub fn configuration(&mut self, config: u8)
pub fn configuration(&mut self, config: u8)
Add a configuration subset.
pub fn function(&mut self, first_interface: InterfaceNumber)
pub fn function(&mut self, first_interface: InterfaceNumber)
Add a function subset.
pub fn function_feature<T>(&mut self, desc: T)where
T: FunctionLevelDescriptor,
pub fn function_feature<T>(&mut self, desc: T)where
T: FunctionLevelDescriptor,
Add a function level feature descriptor.
Note that some features may only be used at the function level. Those features must be written after a call
to Self::function
.
pub fn end_function(&mut self)
pub fn end_function(&mut self)
Ends the current function subset (if any)
Auto Trait Implementations§
impl<'d> Freeze for MsOsDescriptorWriter<'d>
impl<'d> RefUnwindSafe for MsOsDescriptorWriter<'d>
impl<'d> Send for MsOsDescriptorWriter<'d>
impl<'d> Sync for MsOsDescriptorWriter<'d>
impl<'d> Unpin for MsOsDescriptorWriter<'d>
impl<'d> !UnwindSafe for MsOsDescriptorWriter<'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