Struct linux_info::network::modem_manager::Modem
source · [−]pub struct Modem { /* private fields */ }Implementations
sourceimpl Modem
impl Modem
sourcepub fn manufacturer(&self) -> Result<String, Error>
pub fn manufacturer(&self) -> Result<String, Error>
The equipment manufacturer, as reported by the modem.
sourcepub fn carrier_configuration(&self) -> Result<String, Error>
pub fn carrier_configuration(&self) -> Result<String, Error>
The description of the carrier-specific configuration (MCFG) in use by the modem.
sourcepub fn device(&self) -> Result<String, Error>
pub fn device(&self) -> Result<String, Error>
The physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.
In Linux for example, this points to a sysfs path of the usb_device object.
This value may also be set by the user using the MM_ID_PHYSDEV_UID udev tag (e.g. binding the tag to a specific sysfs path).
sourcepub fn state(&self) -> Result<ModemState, Error>
pub fn state(&self) -> Result<ModemState, Error>
Overall state of the modem, given as a MMModemState value.
If the device’s state cannot be determined, MM_MODEM_STATE_UNKNOWN will be reported.
sourcepub fn signal_quality(&self) -> Result<(u32, bool), Error>
pub fn signal_quality(&self) -> Result<(u32, bool), Error>
Signal quality in percent (0 - 100) of the dominant access technology
the device is using to communicate with the network. Always 0 for
POTS devices.
The additional boolean value indicates if the quality value given was
recently taken.
sourcepub fn current_modes(&self) -> Result<(ModemMode, ModemMode), Error>
pub fn current_modes(&self) -> Result<(ModemMode, ModemMode), Error>
A pair of MMModemMode values, where the first one is a bitmask specifying the access technologies (eg 2G/3G/4G) the device is currently allowed to use when connecting to a network, and the second one is the preferred mode of those specified as allowed.
sourcepub fn current_bands(&self) -> Result<Vec<ModemBand>, Error>
pub fn current_bands(&self) -> Result<Vec<ModemBand>, Error>
List of MMModemBand values, specifying the radio frequency and technology bands the device is currently using when connecting to a network.
It must be a subset of “SupportedBands”.
pub fn signal_setup(&self, rate: u32) -> Result<(), Error>
sourcepub fn signal_cdma(&self) -> Result<SignalCdma, Error>
pub fn signal_cdma(&self) -> Result<SignalCdma, Error>
Available signal information for the CDMA1x access technology.
sourcepub fn signal_evdo(&self) -> Result<SignalEvdo, Error>
pub fn signal_evdo(&self) -> Result<SignalEvdo, Error>
Available signal information for the CDMA EV-DO access technology.
sourcepub fn signal_gsm(&self) -> Result<SignalGsm, Error>
pub fn signal_gsm(&self) -> Result<SignalGsm, Error>
Available signal information for the GSM/GPRS access technology.
sourcepub fn signal_umts(&self) -> Result<SignalUmts, Error>
pub fn signal_umts(&self) -> Result<SignalUmts, Error>
Available signal information for the UMTS (WCDMA) access technology.
sourcepub fn signal_lte(&self) -> Result<SignalLte, Error>
pub fn signal_lte(&self) -> Result<SignalLte, Error>
Available signal information for the LTE access technology.
sourcepub fn signal_nr5g(&self) -> Result<SignalNr5g, Error>
pub fn signal_nr5g(&self) -> Result<SignalNr5g, Error>
Available signal information for the 5G access technology.
Auto Trait Implementations
impl !RefUnwindSafe for Modem
impl !Send for Modem
impl !Sync for Modem
impl Unpin for Modem
impl !UnwindSafe for Modem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more