IOUSBEndpointProperties

Struct IOUSBEndpointProperties 

Source
#[repr(C, packed(1))]
pub struct IOUSBEndpointProperties {
Show 13 fields pub bVersion: u8, pub bAlternateSetting: u8, pub bDirection: u8, pub bEndpointNumber: u8, pub bTransferType: u8, pub bUsageType: u8, pub bSyncType: u8, pub bInterval: u8, pub wMaxPacketSize: u16, pub bMaxBurst: u8, pub bMaxStreams: u8, pub bMult: u8, pub wBytesPerInterval: u16,
}
Available on crate feature USB only.
Expand description

Structure used with the IOUSBLib GetEndpointPropertiesV3 and GetPipePropertiesV3 API. Most of the fields are taken directly from corresponding Standard Endpoint Descriptor and SuperSpeed Endpoint Companion Descriptor. wBytesPerInterval will be synthesized for High Speed High Bandwidth Isochronous endpoints. Field: bVersion Version of the structure. Currently kUSBEndpointPropertiesVersion3. Need to set this when using this structure Field: bAlternateSetting Used as an input for GetEndpointPropertiesV3. Used as an output for GetPipePropertiesV3 Field: bDirection Used as an input for GetEndpointPropertiesV3. Used as an output for GetPipePropertiesV3. One of kUSBIn or kUSBOut. Field: bEndpointNumber Used as an input for GetEndpointPropertiesV3. Used as an output for GetPipePropertiesV3 Field: bTransferType One of kUSBControl, kUSBBulk, kUSBIsoc, or kUSBInterrupt Field: bUsageType For interrupt and isoc endpoints, the usage type. For Bulk endpoints of the UAS Mass Storage Protocol, the pipe ID. Field: bSyncType For isoc endpoints only Field: bInterval The bInterval field from the Standard Endpoint descriptor. Field: wMaxPacketSize The meaning of this value depends on whether this is called with GetPipePropertiesV3 or GetEndpointPropertiesV3. See the documentation of those calls for more info. Field: bMaxBurst For SuperSpeed endpoints, maximum number of packets the endpoint can send or receive as part of a burst Field: bMaxStreams For SuperSpeed bulk endpoints, maximum number of streams this endpoint supports. Field: bMult For SuperSpeed isoc endpoints, this is the mult value from the SuperSpeed Endpoint Companion Descriptor. For High Speed isoc and interrupt endpoints, this is bits 11 and 12 of the Standard Endpoint Descriptor, which represents a similar value. Field: wBytesPerInterval For SuperSpeed interrupt and isoc endpoints, this is the wBytesPerInterval from the SuperSpeed Endpoint Companion Descriptor. For High Speed High Bandwidth isoc endpoints, this will be equal to wMaxPacketSize * (bMult+1).

See also Apple’s documentation

Fields§

§bVersion: u8§bAlternateSetting: u8§bDirection: u8§bEndpointNumber: u8§bTransferType: u8§bUsageType: u8§bSyncType: u8§bInterval: u8§wMaxPacketSize: u16§bMaxBurst: u8§bMaxStreams: u8§bMult: u8§wBytesPerInterval: u16

Trait Implementations§

Source§

impl Clone for IOUSBEndpointProperties

Available on crate feature usb only.
Source§

fn clone(&self) -> IOUSBEndpointProperties

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IOUSBEndpointProperties

Available on crate feature usb only.
Source§

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

Formats the value using the given formatter. Read more
Source§

impl Encode for IOUSBEndpointProperties

Available on crate features usb and objc2 only.
Source§

const ENCODING: Encoding

The Objective-C type-encoding for this type.
Source§

impl PartialEq for IOUSBEndpointProperties

Available on crate feature usb only.
Source§

fn eq(&self, other: &IOUSBEndpointProperties) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RefEncode for IOUSBEndpointProperties

Available on crate features usb and objc2 only.
Source§

const ENCODING_REF: Encoding

The Objective-C type-encoding for a reference of this type. Read more
Source§

impl Copy for IOUSBEndpointProperties

Available on crate feature usb only.
Source§

impl StructuralPartialEq for IOUSBEndpointProperties

Available on crate feature usb only.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> EncodeArgument for T
where T: Encode,

Source§

const ENCODING_ARGUMENT: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> EncodeReturn for T
where T: Encode,

Source§

const ENCODING_RETURN: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,