pub struct DeviceInfo {
pub min_descriptor_length: u8,
pub descriptor_version: u8,
pub base_info: DeviceBaseInfo,
}
Expand description
Network device information with all required fields.
Fields§
§min_descriptor_length: u8
Minimum descriptor length, in 64-bit words.
descriptor_version: u8
Accepted descriptor version.
base_info: DeviceBaseInfo
Device base info.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub fn make_config(&self, config: DerivableConfig) -> Result<Config>
pub fn make_config(&self, config: DerivableConfig) -> Result<Config>
Create a new session config from the device information.
This method also does the boundary checks so that data_length/offset fields read
from descriptors are safe to convert to usize
.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceInfo
impl Debug for DeviceInfo
Source§impl From<DeviceInfo> for DeviceInfo
impl From<DeviceInfo> for DeviceInfo
Source§fn from(src: DeviceInfo) -> DeviceInfo
fn from(src: DeviceInfo) -> DeviceInfo
Converts to this type from the input type.
Source§impl TryFrom<DeviceInfo> for DeviceInfo
impl TryFrom<DeviceInfo> for DeviceInfo
Source§type Error = DeviceInfoValidationError
type Error = DeviceInfoValidationError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)