pub struct Device<T: Connection> { /* private fields */ }Available on crate feature
host only.Expand description
Connection with a cached API version.
Implementations§
Source§impl<T: Connection> Device<T>
impl<T: Connection> Device<T>
Sourcepub async fn new(connection: T) -> Result<Self>
pub async fn new(connection: T) -> Result<Self>
Checks whether the device is supported and caches the API version.
Sourcepub fn connection(self) -> T
pub fn connection(self) -> T
Extracts the connection.
pub async fn platform_info(&self) -> Result<DynInfo>
Trait Implementations§
Source§impl<T: Connection> Deref for Device<T>
impl<T: Connection> Deref for Device<T>
impl<T: Eq + Connection> Eq for Device<T>
impl<T: PartialEq + Connection> StructuralPartialEq for Device<T>
Auto Trait Implementations§
impl<T> Freeze for Device<T>where
T: Freeze,
impl<T> RefUnwindSafe for Device<T>where
T: RefUnwindSafe,
impl<T> Send for Device<T>where
T: Send,
impl<T> Sync for Device<T>where
T: Sync,
impl<T> Unpin for Device<T>where
T: Unpin,
impl<T> UnsafeUnpin for Device<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Device<T>where
T: UnwindSafe,
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