pub struct Config<'d> {
pub interface_name: Option<&'d str>,
pub msos_descriptor: bool,
pub interrupt_poll_ms: u8,
pub interrupt_max_packet_size: u16,
pub out_endpoint_options: EndpointOptions,
pub in_endpoint_options: EndpointOptions,
}Expand description
Configuration for the MTP device class.
Fields§
§interface_name: Option<&'d str>Optional interface string descriptor. Defaults to Some("MTP").
msos_descriptor: boolWhether to emit an MS OS 2.0 Compatible ID ("MTP") descriptor so Windows
binds its native MTP/WPD driver automatically.
When enabled, the Builder must be supplied with a non-empty msos_descriptor_buf.
interrupt_poll_ms: u8Polling interval in ms for the Interrupt-IN event endpoint. Defaults to 16.
interrupt_max_packet_size: u16Max packet size for the Interrupt-IN event endpoint (must be >= 24). Defaults to 64.
out_endpoint_options: EndpointOptionsOptions for the Bulk-OUT endpoint.
in_endpoint_options: EndpointOptionsOptions for the Bulk-IN endpoint.
Implementations§
Trait Implementations§
impl<'d> Copy for Config<'d>
Auto Trait Implementations§
impl<'d> Forget for Config<'d>
impl<'d> Freeze for Config<'d>
impl<'d> Move for Config<'d>
impl<'d> RefUnwindSafe for Config<'d>
impl<'d> Send for Config<'d>
impl<'d> Sync for Config<'d>
impl<'d> Unpin for Config<'d>
impl<'d> UnsafeUnpin for Config<'d>
impl<'d> UnwindSafe for Config<'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