pub struct AgentJar { /* private fields */ }Expand description
The agent’s jar, read into memory, and the version its hello must name.
Implementations§
Source§impl AgentJar
impl AgentJar
Sourcepub fn locate() -> Result<AgentJar, JarError>
pub fn locate() -> Result<AgentJar, JarError>
The jar at $MOBILE_AGENT_JAR, else at default_jar_path, expected
to report AGENT_VERSION.
Sourcepub fn from_path(path: &Path) -> Result<AgentJar, JarError>
pub fn from_path(path: &Path) -> Result<AgentJar, JarError>
The jar at path, expected to report AGENT_VERSION.
Sourcepub fn from_bytes(bytes: impl Into<Arc<[u8]>>, version: &str) -> AgentJar
pub fn from_bytes(bytes: impl Into<Arc<[u8]>>, version: &str) -> AgentJar
A jar (or a bare dex, which app_process also loads) held in memory
that reports version.
Sourcepub fn build(&self) -> String
pub fn build(&self) -> String
The build: the first 12 hex digits of an xxh3 digest of the jar’s bytes. Two jars that report the same version but differ, such as the agent before and after a change to its payload, are two builds.
Sourcepub fn agent_name(&self) -> String
pub fn agent_name(&self) -> String
The agent name and version its hello carries:
mobile-agent-android <version>.
pub fn bytes(&self) -> &[u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentJar
impl RefUnwindSafe for AgentJar
impl Send for AgentJar
impl Sync for AgentJar
impl Unpin for AgentJar
impl UnsafeUnpin for AgentJar
impl UnwindSafe for AgentJar
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request