pub struct BinderProbe { /* private fields */ }Expand description
Binder 探针 — 订阅 Binder 事务事件
Implementations§
Source§impl BinderProbe
impl BinderProbe
Sourcepub fn new() -> Self
pub fn new() -> Self
创建新的 Binder 探针
在 Linux 上: 返回一个标记为未初始化的实例。 在 Android (root/system daemon) 上: 加载 BPF 程序并 attach 到 tracepoint。
Sourcepub fn try_init(&mut self) -> Result<bool, ProbeError>
pub fn try_init(&mut self) -> Result<bool, ProbeError>
尝试初始化 eBPF 程序
返回 Ok(true) 表示 BPF 程序已加载并 attach。 返回 Ok(false) 表示当前平台不支持 (Linux 桌面 / 无权限)。
Sourcepub fn poll(&self) -> Vec<BinderTransaction>
pub fn poll(&self) -> Vec<BinderTransaction>
轮询 Binder 事件
返回自上次 poll 以来的所有新事务。 在 Linux 桌面环境下始终返回空。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinderProbe
impl RefUnwindSafe for BinderProbe
impl Send for BinderProbe
impl Sync for BinderProbe
impl Unpin for BinderProbe
impl UnsafeUnpin for BinderProbe
impl UnwindSafe for BinderProbe
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