pub struct ManagerApi {
pub salt: String,
/* private fields */
}Available on crate feature
manager-api and (crate features hsm or manager-api) only.Expand description
Manager API client.
Fields§
§salt: StringFirmware distribution salt (staged rollouts). "0" by default.
Implementations§
Source§impl ManagerApi
impl ManagerApi
pub fn new(base_url: impl Into<String>) -> Self
pub fn base_url(&self) -> &str
Sourcepub async fn get_device_version(
&self,
target_id: u32,
provider: u32,
) -> Result<DeviceVersion>
pub async fn get_device_version( &self, target_id: u32, provider: u32, ) -> Result<DeviceVersion>
Device version from a target id.
Sourcepub async fn get_firmware_version(
&self,
device_version: u32,
version_name: &str,
provider: u32,
) -> Result<FinalFirmware>
pub async fn get_firmware_version( &self, device_version: u32, version_name: &str, provider: u32, ) -> Result<FinalFirmware>
Final firmware from its version name (e.g. 1.4.1).
Sourcepub async fn get_osu_version(
&self,
device_version: u32,
version_name: &str,
provider: u32,
) -> Result<OsuFirmware>
pub async fn get_osu_version( &self, device_version: u32, version_name: &str, provider: u32, ) -> Result<OsuFirmware>
OSU from its version name (e.g. 1.4.1-osu).
Sourcepub async fn get_final_firmware_by_id(&self, id: u32) -> Result<FinalFirmware>
pub async fn get_final_firmware_by_id(&self, id: u32) -> Result<FinalFirmware>
Final firmware by id.
Sourcepub async fn get_latest_firmware(
&self,
current_final_id: u32,
device_version: u32,
provider: u32,
) -> Result<Option<OsuFirmware>>
pub async fn get_latest_firmware( &self, current_final_id: u32, device_version: u32, provider: u32, ) -> Result<Option<OsuFirmware>>
Latest available OSU for a device, None when up to date.
Sourcepub async fn get_mcu_versions(&self) -> Result<Vec<McuVersion>>
pub async fn get_mcu_versions(&self) -> Result<Vec<McuVersion>>
All MCU versions.
Sourcepub async fn get_apps_by_target(
&self,
target_id: u32,
firmware_version_name: &str,
provider: u32,
) -> Result<Vec<Application>>
pub async fn get_apps_by_target( &self, target_id: u32, firmware_version_name: &str, provider: u32, ) -> Result<Vec<Application>>
App catalog for a device / firmware.
Sourcepub async fn get_language_packages(
&self,
device_version: u32,
final_firmware_id: u32,
) -> Result<Vec<LanguagePackage>>
pub async fn get_language_packages( &self, device_version: u32, final_firmware_id: u32, ) -> Result<Vec<LanguagePackage>>
Language packs available for a device version and final firmware.
Sourcepub async fn fetch_text(&self, url: &str) -> Result<String>
pub async fn fetch_text(&self, url: &str) -> Result<String>
Download a text resource (APDU scripts).
Sourcepub async fn get_apps_by_hash(
&self,
hashes: &[String],
) -> Result<Vec<Option<Application>>>
pub async fn get_apps_by_hash( &self, hashes: &[String], ) -> Result<Vec<Option<Application>>>
Resolve installed app hashes to catalog entries.
Trait Implementations§
Source§impl Clone for ManagerApi
impl Clone for ManagerApi
Source§impl Debug for ManagerApi
impl Debug for ManagerApi
Auto Trait Implementations§
impl !RefUnwindSafe for ManagerApi
impl !UnwindSafe for ManagerApi
impl Forget for ManagerApi
impl Freeze for ManagerApi
impl Send for ManagerApi
impl Sync for ManagerApi
impl Unpin for ManagerApi
impl UnsafeUnpin for ManagerApi
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