pub struct EndpointDescriptor<'a> { /* private fields */ }
Expand description

Describes an endpoint.

Implementations§

source§

impl<'a> EndpointDescriptor<'a>

source

pub fn address(&self) -> u8

Returns the endpoint’s address.

source

pub fn number(&self) -> u8

Returns the endpoint number.

source

pub fn direction(&self) -> Direction

Returns the endpoint’s direction.

source

pub fn transfer_type(&self) -> TransferType

Returns the endpoint’s transfer type.

source

pub fn sync_type(&self) -> SyncType

Returns the endpoint’s synchronisation mode.

The return value of this method is only valid for isochronous endpoints.

source

pub fn usage_type(&self) -> UsageType

Returns the endpoint’s usage type.

The return value of this method is only valid for isochronous endpoints.

source

pub fn max_packet_size(&self) -> u16

Returns the endpoint’s maximum packet size.

source

pub fn interval(&self) -> u8

Returns the endpoint’s polling interval.

source

pub fn extra(&'a self) -> Option<&'a [u8]>

Returns the unknown ‘extra’ bytes that libusb does not understand.

source

pub fn refresh(&self) -> u8

For audio devices only: return the rate at which synchronization feedback is provided.

source

pub fn synch_address(&self) -> u8

For audio devices only: return the address if the synch endpoint.

Trait Implementations§

source§

impl<'a> Debug for EndpointDescriptor<'a>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for EndpointDescriptor<'a>

§

impl<'a> !Send for EndpointDescriptor<'a>

§

impl<'a> !Sync for EndpointDescriptor<'a>

§

impl<'a> Unpin for EndpointDescriptor<'a>

§

impl<'a> UnwindSafe for EndpointDescriptor<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.