pub struct Device<'a> { /* private fields */ }
Implementations§
source§impl Device<'_>
impl Device<'_>
sourcepub fn provides(&self, feature: Feature) -> bool
pub fn provides(&self, feature: Feature) -> bool
Returns the list of features supported by the device.
pub fn identifier(&self) -> &str
sourcepub fn access_token(&self) -> Option<&str>
pub fn access_token(&self) -> Option<&str>
Returns the authentication token that should be used when connecting to the device. If it’s a shared device, the main authentication token will no be accepted.
sourcepub async fn connect(&self) -> Result<DeviceConnection>
pub async fn connect(&self) -> Result<DeviceConnection>
Connect to the device.
sourcepub async fn connect_via(&self, server: &Server) -> Result<DeviceConnection>
pub async fn connect_via(&self, server: &Server) -> Result<DeviceConnection>
Establish a connection to the device using server as a proxy.