pub struct Discovery {
pub pid: Option<u32>,
pub console_port: Option<u16>,
pub adb_port: Option<u16>,
pub avd_name: Option<String>,
pub emulator_version: Option<String>,
pub grpc_port: Option<u16>,
pub grpc_token: Option<String>,
pub entries: BTreeMap<String, String>,
}Expand description
Parsed contents of one discovery file.
Fields§
§pid: Option<u32>Emulator process id, from the pid_<pid>.ini file name.
console_port: Option<u16>Console port (port.serial); the adb serial is emulator-<port>.
adb_port: Option<u16>adb port of the emulated device (port.adb).
avd_name: Option<String>AVD name (avd.name).
emulator_version: Option<String>Emulator version (emulator.version).
grpc_port: Option<u16>gRPC controller port (grpc.port); absent without -grpc.
grpc_token: Option<String>Bearer token (grpc.token); absent without -grpc-use-token.
entries: BTreeMap<String, String>Every key and value as written, including keys not modelled above.
Implementations§
Source§impl Discovery
impl Discovery
Sourcepub fn parse(contents: &str, pid: Option<u32>) -> Result<Self, DiscoveryError>
pub fn parse(contents: &str, pid: Option<u32>) -> Result<Self, DiscoveryError>
Parses the text of a discovery file; pid comes from the file name.
Sourcepub fn serial(&self) -> Option<String>
pub fn serial(&self) -> Option<String>
The adb serial of this emulator, emulator-<console port>.
Sourcepub fn grpc_endpoint(&self) -> Option<String>
pub fn grpc_endpoint(&self) -> Option<String>
The controller endpoint on loopback, when the file names a gRPC port.
Trait Implementations§
impl Eq for Discovery
impl StructuralPartialEq for Discovery
Auto Trait Implementations§
impl Freeze for Discovery
impl RefUnwindSafe for Discovery
impl Send for Discovery
impl Sync for Discovery
impl Unpin for Discovery
impl UnsafeUnpin for Discovery
impl UnwindSafe for Discovery
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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