pub struct Registry { /* private fields */ }
Implementations§
Source§impl Registry
impl Registry
pub fn new(proxy: RegistryProxy) -> Self
Sourcepub async fn device_info(&self, token_id: TokenId) -> Option<DeviceInfo>
pub async fn device_info(&self, token_id: TokenId) -> Option<DeviceInfo>
Returns information about the device with the given token_id
.
Returns None if there is no device with the given ID.
Sourcepub async fn device_infos(&self) -> BTreeMap<TokenId, DeviceInfo>
pub async fn device_infos(&self) -> BTreeMap<TokenId, DeviceInfo>
Returns information about all devices in the registry.
Sourcepub async fn observe(&self, token_id: TokenId) -> Result<RegistryDevice, Error>
pub async fn observe(&self, token_id: TokenId) -> Result<RegistryDevice, Error>
Returns a RegistryDevice that observes the device with the given token_id
.
Returns an error if there is no device with the given token ID.
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl !UnwindSafe for Registry
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