pub enum SystemType {
Device,
Recovery,
Sideload,
Rescue,
Bootloader,
// some variants omitted
}Expand description
Represents the device’s system type sent during the ADB connection handshake (A_CNXN). This identifies the mode the device is currently operating in to the ADB host.
The connection string in ADB, sent during the A_CNXN handshake, is structured as
<systemtype>:<serialno>:<banner>.
<systemtype>: Identifies the device’s mode and corresponds to the values inSystemType.<serialno>: The device’s serial number. This field is commonly empty.<banner>: Contains metadata about the device, such as properties like product name, model, and supported features (e.g., “ro.product.name=…”, “features=…”).
Variants§
Device
The device is in normal boot.
Recovery
The device is in recovery.
Sideload
The device is in recovery sideload mode.
Rescue
The device is in recovery rescue mode.
Bootloader
The device is in bootloader.
Implementations§
Source§impl SystemType
impl SystemType
pub fn from_primitive(prim: u32) -> Option<SystemType>
pub fn from_primitive_allow_unknown(prim: u32) -> SystemType
pub fn unknown() -> SystemType
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for SystemType
impl Clone for SystemType
Source§fn clone(&self) -> SystemType
fn clone(&self) -> SystemType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemType
impl Debug for SystemType
Source§impl<D> Decode<SystemType, D> for SystemTypewhere
D: ResourceDialect,
impl<D> Decode<SystemType, D> for SystemTypewhere
D: ResourceDialect,
Source§fn new_empty() -> SystemType
fn new_empty() -> SystemType
Creates a valid instance of
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<SystemType, D> for SystemTypewhere
D: ResourceDialect,
impl<D> Encode<SystemType, D> for SystemTypewhere
D: ResourceDialect,
Source§impl Hash for SystemType
impl Hash for SystemType
Source§impl Ord for SystemType
impl Ord for SystemType
Source§fn cmp(&self, other: &SystemType) -> Ordering
fn cmp(&self, other: &SystemType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SystemType
impl PartialEq for SystemType
Source§impl PartialOrd for SystemType
impl PartialOrd for SystemType
Source§impl TypeMarker for SystemType
impl TypeMarker for SystemType
Source§type Owned = SystemType
type Owned = SystemType
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for SystemType
impl ValueTypeMarker for SystemType
Source§type Borrowed<'a> = SystemType
type Borrowed<'a> = SystemType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<SystemType as TypeMarker>::Owned,
) -> <SystemType as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<SystemType as TypeMarker>::Owned, ) -> <SystemType as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.impl Copy for SystemType
impl Eq for SystemType
impl StructuralPartialEq for SystemType
Auto Trait Implementations§
impl Freeze for SystemType
impl RefUnwindSafe for SystemType
impl Send for SystemType
impl Sync for SystemType
impl Unpin for SystemType
impl UnsafeUnpin for SystemType
impl UnwindSafe for SystemType
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