pub struct ShelfDevicesApi<'a, V> { /* private fields */ }
Expand description
“Shelf Devices” section of the devices API.
Implementations§
Source§impl<'a, V> ShelfDevicesApi<'a, V>
impl<'a, V> ShelfDevicesApi<'a, V>
Sourcepub fn new(client: &'a SdkClient, config: &ShelfDevicesApiConfig) -> Self
pub fn new(client: &'a SdkClient, config: &ShelfDevicesApiConfig) -> Self
Create a new interface for “Shelf Devices” API.
Sourcepub async fn get(
&self,
serial_number: impl Into<String> + Send + Clone,
) -> Result<GetShelfDeviceResponse, SdkClientError>
pub async fn get( &self, serial_number: impl Into<String> + Send + Clone, ) -> Result<GetShelfDeviceResponse, SdkClientError>
Sourcepub async fn get_registry_id(
&self,
serial_number: impl Into<String> + Send + Clone,
) -> Result<GetShelfDeviceResponse, SdkClientError>
pub async fn get_registry_id( &self, serial_number: impl Into<String> + Send + Clone, ) -> Result<GetShelfDeviceResponse, SdkClientError>
Get a Shelf Device’s registry ID.
After a device has been registered as shelf, it must periodically poll this route to check if it has been provisioned to a registry.
This route requires a JWT generated from the private key.
§Errors
There may be an error to get the HTTP Response, to interpret its Json
body into the Response
.
Sourcepub async fn store(
&self,
serial_number: impl Into<String> + Send + Clone,
secret: impl Into<String> + Send + Clone,
) -> Result<StoreShelfDeviceResponse, SdkClientError>
pub async fn store( &self, serial_number: impl Into<String> + Send + Clone, secret: impl Into<String> + Send + Clone, ) -> Result<StoreShelfDeviceResponse, SdkClientError>
Sourcepub async fn provision(
&self,
serial_number: impl Into<String> + Send + Clone,
registry_id: u32,
) -> Result<ProvisionShelfDeviceResponse, SdkClientError>
pub async fn provision( &self, serial_number: impl Into<String> + Send + Clone, registry_id: u32, ) -> Result<ProvisionShelfDeviceResponse, SdkClientError>
Sourcepub async fn deprovision(
&self,
serial_number: impl Into<String> + Send + Clone,
) -> Result<DeprovisionShelfDeviceResponse, SdkClientError>
pub async fn deprovision( &self, serial_number: impl Into<String> + Send + Clone, ) -> Result<DeprovisionShelfDeviceResponse, SdkClientError>
Auto Trait Implementations§
impl<'a, V> Freeze for ShelfDevicesApi<'a, V>
impl<'a, V> !RefUnwindSafe for ShelfDevicesApi<'a, V>
impl<'a, V> Send for ShelfDevicesApi<'a, V>
impl<'a, V> Sync for ShelfDevicesApi<'a, V>
impl<'a, V> Unpin for ShelfDevicesApi<'a, V>
impl<'a, V> !UnwindSafe for ShelfDevicesApi<'a, V>
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