#[non_exhaustive]pub struct Ability {Show 21 fields
pub kind: AbilityKind,
pub name: Option<String>,
pub src_entry: Option<String>,
pub extension_type: Option<String>,
pub exported: Option<bool>,
pub permissions: Vec<String>,
pub skills: Vec<Skill>,
pub launch_type: Option<String>,
pub process: Option<String>,
pub label: Option<String>,
pub description: Option<String>,
pub background_modes: Vec<String>,
pub continuable: Option<bool>,
pub metadata: Vec<Metadata>,
pub uri: Option<String>,
pub read_permission: Option<String>,
pub write_permission: Option<String>,
pub extension_process_mode: Option<String>,
pub data_group_ids: Vec<String>,
pub remove_mission_after_terminate: Option<bool>,
pub raw: Value,
}Expand description
An entry of abilities or extensionAbilities.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: AbilityKindWhich array the entry comes from.
name: Option<String>name: the class name of the ability.
src_entry: Option<String>Source file relative to the module (./ets/entryability/EntryAbility.ets);
see ModuleJson::record_names.
extension_type: Option<String>type of an extension ability (form, service, dataShare…).
exported: Option<bool>As written; None when the field is absent.
permissions: Vec<String>Permissions a caller must hold.
skills: Vec<Skill>skills: the implicit wants the ability accepts.
launch_type: Option<String>launchType: singleton, multiton, specified or standard.
process: Option<String>process: the process name the ability runs in.
label: Option<String>label: usually a $string: resource reference.
description: Option<String>description: usually a $string: resource reference.
background_modes: Vec<String>backgroundModes: long-running task types the ability may start.
continuable: Option<bool>continuable: whether the ability may migrate to another device.
metadata: Vec<Metadata>metadata: custom key/value entries of the ability.
uri: Option<String>Data URI served by a data extension.
read_permission: Option<String>readPermission: permission a caller needs to read from uri.
write_permission: Option<String>writePermission: permission a caller needs to write to uri.
extension_process_mode: Option<String>extensionProcessMode: instance, type or bundle.
data_group_ids: Vec<String>dataGroupIds: data groups the extension may share files with.
remove_mission_after_terminate: Option<bool>removeMissionAfterTerminate: whether the mission is dropped from recents when the ability ends.
raw: ValueThe entry as written, for fields not modelled here.
Implementations§
Source§impl Ability
impl Ability
Sourcepub fn is_exported(&self) -> bool
pub fn is_exported(&self) -> bool
The exported flag in effect: an absent field means not exported.
Sourcepub fn deep_links(&self) -> Vec<String>
pub fn deep_links(&self) -> Vec<String>
URL patterns of every skill URI that names a scheme, in document order without repeats.