SignalStrength

Enum SignalStrength 

pub enum SignalStrength {
    Gsm {
        rssi: i8,
    },
    Wcdma {
        rssi: i8,
        ecio: i16,
    },
    Tdscdma {
        rssi: i8,
        rscp: i8,
        ecio: i16,
        sinr: i8,
    },
    Lte {
        rssi: i8,
        rsrq: i8,
        rsrp: i16,
        snr: i16,
    },
    Cdma {
        rssi: i8,
        ecio: i16,
    },
    Hdr {
        rssi: i8,
        ecio: i16,
        sinr: i8,
        io: i32,
    },
}
Expand description

Signal strength information.

Returned by Client::get_signal_strength.

Only the rssi field is guaranteed to be present. Everything else depends on the network type.

Variants§

§

Gsm

Fields

§rssi: i8

RSSI in dBm. Indicates received signal strength. A signed value; -125 or lower indicates no signal.

§

Wcdma

Fields

§rssi: i8

RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.

§ecio: i16

Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.

§

Tdscdma

Fields

§rssi: i8

RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.

§rscp: i8

RSCP in dBm.

§ecio: i16

Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.

§sinr: i8

Measured SINR in dB.

§

Lte

Fields

§rssi: i8

RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.

§rsrq: i8

RSRQ value in dB (signed integer value), as measured by L1. Range: -3 to -20 (-3 equals -3 dB, -20 equals -20 dB).

§rsrp: i16

Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).

§snr: i16

SNR level as a scaled integer in units of 0.1 dB; e.g., -16 dB has a value of -160 and 24.6 dB has a value of 246.

§

Cdma

Fields

§rssi: i8

RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.

§ecio: i16

Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.

§

Hdr

Fields

§rssi: i8

RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.

§ecio: i16

Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.

§sinr: i8

SINR level.

§io: i32

Received IO in dBm.

Implementations§

§

impl SignalStrength

pub fn rssi(&self) -> i8

Returns the RSSI in dBm.

The exact meaning of this value depends on the network type.

fn from_sys(info: &SignalStrengthInfo) -> Option<Self>

fn from_sys_gsm(info: &GsmSignalInfo) -> Self

fn from_sys_wcdma(info: &WcdmaSignalInfo) -> Self

fn from_sys_tdscdma(info: &TdscdmaSignalInfo) -> Self

fn from_sys_lte(info: &LteSignalInfo) -> Self

fn from_sys_cdma(info: &CdmaSignalInfo) -> Self

fn from_sys_hdr(info: &HdrSignalInfo) -> Self

Trait Implementations§

§

impl Clone for SignalStrength

§

fn clone(&self) -> SignalStrength

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SignalStrength

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more