Trait AppManager

Source
pub trait AppManager {
    // Required methods
    fn enumerate_app_name(&self) -> Result<Vec<String>>;
    fn create_app(&self, name: &str, attr: &AppAttr) -> Result<Box<dyn SkfApp>>;
    fn open_app(&self, name: &str) -> Result<Box<dyn SkfApp>>;
    fn delete_app(&self, name: &str) -> Result<()>;
}
Expand description

Application management

Required Methods§

Source

fn enumerate_app_name(&self) -> Result<Vec<String>>

Enumerate all apps in the device,return app names

Source

fn create_app(&self, name: &str, attr: &AppAttr) -> Result<Box<dyn SkfApp>>

Create app in the device

[name] - The app name

[attr] - The attribute of app

§Owner object lifetime requirement

If owner object(SkfDevice) is dropped, the SkfApp object will be invalid

Source

fn open_app(&self, name: &str) -> Result<Box<dyn SkfApp>>

Open app

[name] - The app name to open

§Owner object lifetime requirement

If owner object(SkfDevice) is dropped, the SkfApp object will be invalid

Source

fn delete_app(&self, name: &str) -> Result<()>

Delete app

[name] - The app name to delete

Implementors§