pub struct Flag {
pub flag_namespace: Option<String>,
pub name: Option<String>,
pub pkg: Option<String>,
pub container: Option<String>,
pub value: Option<String>,
pub staged_value: Option<String>,
pub permission: Option<i32>,
pub value_picked_from: Option<i32>,
pub storage_backend: Option<i32>,
}Expand description
Representation of an aconfig flag and its metadata.
Fields§
§flag_namespace: Option<String>§name: Option<String>§pkg: Option<String>The aconfig package (e.g. “com.android.foo”). These are system-level identifiers and not privacy-impacting.
container: Option<String>The container where the flag lives (e.g. “system”, “vendor”, or mainline module name).
value: Option<String>The flag value as a string to support different future data types.
staged_value: Option<String>The value that will be applied after the next reboot, if different from the current value.
permission: Option<i32>§value_picked_from: Option<i32>§storage_backend: Option<i32>Implementations§
Source§impl Flag
impl Flag
Sourcepub fn flag_namespace(&self) -> &str
pub fn flag_namespace(&self) -> &str
Returns the value of flag_namespace, or the default value if flag_namespace is unset.
Sourcepub fn container(&self) -> &str
pub fn container(&self) -> &str
Returns the value of container, or the default value if container is unset.
Sourcepub fn value(&self) -> &str
pub fn value(&self) -> &str
Returns the value of value, or the default value if value is unset.
Sourcepub fn staged_value(&self) -> &str
pub fn staged_value(&self) -> &str
Returns the value of staged_value, or the default value if staged_value is unset.
Sourcepub fn permission(&self) -> FlagPermission
pub fn permission(&self) -> FlagPermission
Returns the enum value of permission, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_permission(&mut self, value: FlagPermission)
pub fn set_permission(&mut self, value: FlagPermission)
Sets permission to the provided enum value.
Sourcepub fn value_picked_from(&self) -> ValuePickedFrom
pub fn value_picked_from(&self) -> ValuePickedFrom
Returns the enum value of value_picked_from, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_value_picked_from(&mut self, value: ValuePickedFrom)
pub fn set_value_picked_from(&mut self, value: ValuePickedFrom)
Sets value_picked_from to the provided enum value.
Sourcepub fn storage_backend(&self) -> FlagStorageBackend
pub fn storage_backend(&self) -> FlagStorageBackend
Returns the enum value of storage_backend, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_storage_backend(&mut self, value: FlagStorageBackend)
pub fn set_storage_backend(&mut self, value: FlagStorageBackend)
Sets storage_backend to the provided enum value.
Trait Implementations§
Source§impl Message for Flag
impl Message for Flag
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self.