pub struct AndroidScope {
pub level: Vec<i32>,
pub group: Vec<i32>,
pub package_name: Vec<String>,
pub target_cmdline: Vec<String>,
pub uid: Vec<u32>,
pub pid: Vec<u32>,
}Expand description
Filters cgroups in the hierarchy created by android’s libprocessgroup.
Each scope maps onto a set of cgroup paths
({apps,system}/uid_
- {package_name: “com.example.app”, level: LEVEL_UID} -> apps/uid_10123
- {package_name: “com.example.app”, level: LEVEL_PID} -> apps/uid_10123/pid_* (all of the app’s processes)
- {target_cmdline: “surfaceflinger”, level: LEVEL_PID} -> system/uid_1000/pid_597
- {target_cmdline: “surfaceflinger”, level: LEVEL_UID} -> system/uid_1000 (all of uid 1000, not just surfaceflinger)
- {level: LEVEL_UID} -> {apps,system}/uid_*
Fields§
§level: Vec<i32>If empty, the implementation chooses a level corresponding to the narrowest scope filter below (e.g. target_cmdline -> LEVEL_PID).
group: Vec<i32>Matches the top-level groups.
package_name: Vec<String>Matches the uid cgroups of the given packages, resolved when the data source starts (packages installed later aren’t matched). Note: a package matches in all users/profiles, e.g. both uid_10123 and uid_1010123 for a package with uid 10123.
target_cmdline: Vec<String>Matches the pid cgroups of processes whose /proc/
- a pattern can contain a single wildcard (*).
- if the pattern starts with a ‘/’, it’s matched against the first segment of the cmdline (argv0). E.g. “/system/bin/surface*”.
- otherwise, it’s matched against the binary name part of argv0. E.g. “top” or “com.example.app:*”.
uid: Vec<u32>Exact uid, without matching across users/profiles.
pid: Vec<u32>Exact pid.
Implementations§
Source§impl AndroidScope
impl AndroidScope
Sourcepub fn level(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<Level>> ⓘ
pub fn level( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<Level>> ⓘ
Returns an iterator which yields the valid enum values contained in level.
Sourcepub fn push_level(&mut self, value: Level)
pub fn push_level(&mut self, value: Level)
Appends the provided enum value to level.
Sourcepub fn group(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<Group>> ⓘ
pub fn group( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<Group>> ⓘ
Returns an iterator which yields the valid enum values contained in group.
Sourcepub fn push_group(&mut self, value: Group)
pub fn push_group(&mut self, value: Group)
Appends the provided enum value to group.
Trait Implementations§
Source§impl Clone for AndroidScope
impl Clone for AndroidScope
Source§impl Debug for AndroidScope
impl Debug for AndroidScope
Source§impl Default for AndroidScope
impl Default for AndroidScope
impl Eq for AndroidScope
Source§impl Hash for AndroidScope
impl Hash for AndroidScope
Source§impl Message for AndroidScope
impl Message for AndroidScope
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.