pub struct EndpointDescriptor {
pub address: EndpointAddress,
pub attributes: u8,
pub max_packet: u16,
pub interval: u8,
}Expand description
A standard endpoint descriptor (USB 2.0 §9.6.6).
Fields§
§address: EndpointAddressbEndpointAddress: number and direction.
attributes: u8bmAttributes.
max_packet: u16wMaxPacketSize without the high-bandwidth bits.
interval: u8bInterval.
Implementations§
Source§impl EndpointDescriptor
impl EndpointDescriptor
Sourcepub fn parse(bytes: &[u8]) -> HostResult<Self>
pub fn parse(bytes: &[u8]) -> HostResult<Self>
Parse seven bytes of an endpoint descriptor.
Sourcepub fn transfer_type(&self) -> EndpointType
pub fn transfer_type(&self) -> EndpointType
Transfer type encoded in bmAttributes.
Trait Implementations§
Source§impl Clone for EndpointDescriptor
impl Clone for EndpointDescriptor
impl Copy for EndpointDescriptor
Source§impl Debug for EndpointDescriptor
impl Debug for EndpointDescriptor
impl Eq for EndpointDescriptor
Source§impl Format for EndpointDescriptorwhere
EndpointAddress: Format,
impl Format for EndpointDescriptorwhere
EndpointAddress: Format,
Source§impl PartialEq for EndpointDescriptor
impl PartialEq for EndpointDescriptor
impl StructuralPartialEq for EndpointDescriptor
Auto Trait Implementations§
impl Forget for EndpointDescriptor
impl Freeze for EndpointDescriptor
impl Move for EndpointDescriptor
impl RefUnwindSafe for EndpointDescriptor
impl Send for EndpointDescriptor
impl Sync for EndpointDescriptor
impl Unpin for EndpointDescriptor
impl UnsafeUnpin for EndpointDescriptor
impl UnwindSafe for EndpointDescriptor
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