pub struct DeviceManager { /* private fields */ }Expand description
Manages WDM device registration lifecycle.
Implementations§
Source§impl DeviceManager
impl DeviceManager
pub fn new(http_do: FetchFn) -> Self
Sourcepub async fn register(&mut self, token: &str) -> Result<DeviceRegistration>
pub async fn register(&mut self, token: &str) -> Result<DeviceRegistration>
Register a new device with WDM.
Sourcepub async fn refresh(&self, token: &str) -> Result<DeviceRegistration>
pub async fn refresh(&self, token: &str) -> Result<DeviceRegistration>
Refresh an existing device registration.
Sourcepub async fn unregister(&mut self, token: &str) -> Result<()>
pub async fn unregister(&mut self, token: &str) -> Result<()>
Unregister the device from WDM.
Auto Trait Implementations§
impl Freeze for DeviceManager
impl !RefUnwindSafe for DeviceManager
impl Send for DeviceManager
impl Sync for DeviceManager
impl Unpin for DeviceManager
impl UnsafeUnpin for DeviceManager
impl !UnwindSafe for DeviceManager
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