DeviceInfo

Struct DeviceInfo 

Source
pub struct DeviceInfo { /* private fields */ }
Expand description

Description of the media device.

Implementations§

Source§

impl DeviceInfo

Source

pub fn driver(&self) -> &str

Name of the driver implementing the media API as an ASCII string. The driver version is stored in the driver_version field.

Driver specific applications can use this information to verify the driver identity. It is also useful to work around known bugs, or to identify drivers in error reports.

Source

pub fn model(&self) -> &str

Device model name as an UTF-8 string. The device version is stored in the device_version field and is not be appended to the model name.

Source

pub fn serial(&self) -> &str

Serial number as an ASCII string.

Source

pub fn bus_info(&self) -> &str

Location of the device in the system as an ASCII string. This includes the bus type name (PCI, USB, …) and a bus-specific identifier.

Source

pub fn media_version(&self) -> String

Media API version, already formatted as a kernel version.

Source

pub fn hw_revision(&self) -> u32

Hardware device revision in a driver-specific format.

Source

pub fn driver_version(&self) -> String

Media device driver version, already formatted as a kernel version. Together with the driver field this identifies a particular driver.

Trait Implementations§

Source§

impl Debug for DeviceInfo

Source§

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

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

impl Default for DeviceInfo

Source§

fn default() -> DeviceInfo

Returns the “default value” for a type. Read more

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> 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, 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.