Struct netdevice_client::session::DeviceInfo
source · 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,
default_buffer_length: usize,
options: SessionFlags
) -> Result<Config>
pub fn make_config( &self, default_buffer_length: usize, options: SessionFlags ) -> 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
.
sourcepub fn primary_config(&self, default_buffer_length: usize) -> Result<Config>
pub fn primary_config(&self, default_buffer_length: usize) -> Result<Config>
Create a config for a primary session.
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
§type Error = DeviceInfoValidationError
type Error = DeviceInfoValidationError
The type returned in the event of a conversion error.
Auto Trait Implementations§
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