Struct ModemProxy
pub struct ModemProxy<'p>(Proxy<'p>);Expand description
Client for a modem.
The service exports one object per modem. Build the proxy with the object path of the modem. The object exists as long as the modem is valid.
Upstream documentation: https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.html.
Tuple Fields§
§0: Proxy<'p>Implementations§
§impl<'p> ModemProxy<'p>
impl<'p> ModemProxy<'p>
pub async fn new<P>(conn: &Connection, path: P) -> Result<ModemProxy<'p>>
pub async fn new<P>(conn: &Connection, path: P) -> Result<ModemProxy<'p>>
Creates a new proxy with the given path, and the default destination.
pub fn builder(conn: &Connection) -> Builder<'p, Self>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
pub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
pub fn inner(&self) -> &Proxy<'p>
pub fn inner(&self) -> &Proxy<'p>
The reference to the underlying zbus::Proxy.
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
The mutable reference to the underlying zbus::Proxy.
pub async fn enable(&self, enable: bool) -> Result<()>
pub async fn enable(&self, enable: bool) -> Result<()>
Powers the radio on or off.
A disabled modem is in a low-power state and cannot use the network.
pub async fn list_bearers(&self) -> Result<Vec<OwnedObjectPath>>
👎Deprecated: Deprecated in ModemManager 1.10. Use the bearers property instead.
pub async fn list_bearers(&self) -> Result<Vec<OwnedObjectPath>>
Deprecated in ModemManager 1.10. Use the bearers property instead.
Returns the bearer object paths.
pub async fn create_bearer(
&self,
properties: &BearerProperties,
) -> Result<OwnedObjectPath>
pub async fn create_bearer( &self, properties: &BearerProperties, ) -> Result<OwnedObjectPath>
Creates a bearer from the settings.
The call fails if the modem has no room for more bearers or if the settings are not valid.
pub async fn delete_bearer(&self, path: &ObjectPath<'_>) -> Result<()>
pub async fn delete_bearer(&self, path: &ObjectPath<'_>) -> Result<()>
Deletes a bearer.
The service disconnects an active bearer first.
pub async fn reset(&self) -> Result<()>
pub async fn reset(&self) -> Result<()>
Clears the non-persistent state and returns the device to its power-on state.
The device may power-cycle.
pub async fn factory_reset(&self, code: &str) -> Result<()>
pub async fn factory_reset(&self, code: &str) -> Result<()>
Clears all configuration and returns the device to its factory defaults.
The service ignores the carrier code if the modem does not need it.
pub async fn set_power_state(&self, state: ModemPowerState) -> Result<()>
pub async fn set_power_state(&self, state: ModemPowerState) -> Result<()>
Sets the power state.
The modem must be in the disabled state.
pub async fn set_current_capabilities(
&self,
capabilities: ModemCapability,
) -> Result<()>
pub async fn set_current_capabilities( &self, capabilities: ModemCapability, ) -> Result<()>
Sets the capabilities to use.
The value must be one of the supported capabilities. The device may power-cycle.
pub async fn set_current_modes(
&self,
modes: (ModemMode, ModemMode),
) -> Result<()>
pub async fn set_current_modes( &self, modes: (ModemMode, ModemMode), ) -> Result<()>
Sets the allowed and the preferred access technology generations.
The first value is the allowed modes. The second value is the preferred mode. The pair must be one of the supported modes.
pub async fn set_current_bands(&self, bands: &[ModemBand]) -> Result<()>
pub async fn set_current_bands(&self, bands: &[ModemBand]) -> Result<()>
Sets the bands that the modem may use.
pub async fn set_primary_sim_slot(&self, sim_slot: u32) -> Result<()>
pub async fn set_primary_sim_slot(&self, sim_slot: u32) -> Result<()>
Selects the primary SIM slot.
The modem object can disappear and return once the slot is in use, and the slot does not need a SIM.
Added in ModemManager 1.16.
pub async fn get_cell_info(&self) -> Result<Vec<CellInfo>>
pub async fn get_cell_info(&self) -> Result<Vec<CellInfo>>
Returns the serving and neighbor cells with their radio information.
Added in ModemManager 1.20.
pub async fn command(&self, cmd: &str, timeout: u32) -> Result<String>
pub async fn command(&self, cmd: &str, timeout: u32) -> Result<String>
Sends an AT command to the modem and returns the answer.
The daemon only allows this in debug mode or if it was built with the AT command option.
pub async fn receive_state_transition(&self) -> Result<StateChangedStream>
pub async fn receive_state_transition(&self) -> Result<StateChangedStream>
Create a stream that receives StateChanged signals.
This a convenient wrapper around zbus::Proxy::receive_signal.
Sent when the state of the modem changes.
This is the D-Bus signal StateChanged. The method is
receive_state_transition because receive_state_changed is the
change stream of the State property.
pub async fn receive_state_transition_with_args(
&self,
args: &[(u8, &str)],
) -> Result<StateChangedStream>
pub async fn receive_state_transition_with_args( &self, args: &[(u8, &str)], ) -> Result<StateChangedStream>
Create a stream that receives StateChanged signals.
This a convenient wrapper around zbus::Proxy::receive_signal_with_args.
Sent when the state of the modem changes.
This is the D-Bus signal StateChanged. The method is
receive_state_transition because receive_state_changed is the
change stream of the State property.
pub async fn sim(&self) -> Result<OwnedObjectPath>
pub async fn sim(&self) -> Result<OwnedObjectPath>
The primary active SIM, or the empty path /.
The daemon uses this SIM for registration and data.
pub fn cached_sim(
&self,
) -> Result<Option<<Result<OwnedObjectPath> as ResultAdapter>::Ok>, <Result<OwnedObjectPath> as ResultAdapter>::Err>
pub fn cached_sim( &self, ) -> Result<Option<<Result<OwnedObjectPath> as ResultAdapter>::Ok>, <Result<OwnedObjectPath> as ResultAdapter>::Err>
The primary active SIM, or the empty path /.
The daemon uses this SIM for registration and data.
Get the cached value of the Sim property, or None if the property is not cached.
pub async fn receive_sim_changed(
&self,
) -> PropertyStream<'p, <Result<OwnedObjectPath> as ResultAdapter>::Ok>
pub async fn receive_sim_changed( &self, ) -> PropertyStream<'p, <Result<OwnedObjectPath> as ResultAdapter>::Ok>
The primary active SIM, or the empty path /.
The daemon uses this SIM for registration and data.
Create a stream for the Sim property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn sim_slots(&self) -> Result<Vec<OwnedObjectPath>>
pub async fn sim_slots(&self) -> Result<Vec<OwnedObjectPath>>
The SIM slots. An empty slot has the path /.
The position in the list is the slot index.
Added in ModemManager 1.16.
pub fn cached_sim_slots(
&self,
) -> Result<Option<<Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Err>
pub fn cached_sim_slots( &self, ) -> Result<Option<<Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Err>
The SIM slots. An empty slot has the path /.
The position in the list is the slot index.
Added in ModemManager 1.16.
Get the cached value of the SimSlots property, or None if the property is not cached.
pub async fn receive_sim_slots_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>
pub async fn receive_sim_slots_changed( &self, ) -> PropertyStream<'p, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>
The SIM slots. An empty slot has the path /.
The position in the list is the slot index.
Added in ModemManager 1.16.
Create a stream for the SimSlots property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn primary_sim_slot(&self) -> Result<u32>
pub async fn primary_sim_slot(&self) -> Result<u32>
The 1-based index of the primary SIM slot.
The value is 0 if the modem has only one slot.
Added in ModemManager 1.16.
pub fn cached_primary_sim_slot(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_primary_sim_slot( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
The 1-based index of the primary SIM slot.
The value is 0 if the modem has only one slot.
Added in ModemManager 1.16.
Get the cached value of the PrimarySimSlot property, or None if the property is not cached.
pub async fn receive_primary_sim_slot_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_primary_sim_slot_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
The 1-based index of the primary SIM slot.
The value is 0 if the modem has only one slot.
Added in ModemManager 1.16.
Create a stream for the PrimarySimSlot property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn bearers(&self) -> Result<Vec<OwnedObjectPath>>
pub async fn bearers(&self) -> Result<Vec<OwnedObjectPath>>
The bearers that the user created.
The list does not hold the initial EPS bearer.
pub fn cached_bearers(
&self,
) -> Result<Option<<Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Err>
pub fn cached_bearers( &self, ) -> Result<Option<<Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Err>
The bearers that the user created.
The list does not hold the initial EPS bearer.
Get the cached value of the Bearers property, or None if the property is not cached.
pub async fn receive_bearers_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>
pub async fn receive_bearers_changed( &self, ) -> PropertyStream<'p, <Result<Vec<OwnedObjectPath>> as ResultAdapter>::Ok>
The bearers that the user created.
The list does not hold the initial EPS bearer.
Create a stream for the Bearers property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn supported_capabilities(&self) -> Result<Vec<ModemCapability>>
pub async fn supported_capabilities(&self) -> Result<Vec<ModemCapability>>
The capability combinations that the modem supports.
pub fn cached_supported_capabilities(
&self,
) -> Result<Option<<Result<Vec<ModemCapability>> as ResultAdapter>::Ok>, <Result<Vec<ModemCapability>> as ResultAdapter>::Err>
pub fn cached_supported_capabilities( &self, ) -> Result<Option<<Result<Vec<ModemCapability>> as ResultAdapter>::Ok>, <Result<Vec<ModemCapability>> as ResultAdapter>::Err>
The capability combinations that the modem supports.
Get the cached value of the SupportedCapabilities property, or None if the property is not cached.
pub async fn receive_supported_capabilities_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<ModemCapability>> as ResultAdapter>::Ok>
pub async fn receive_supported_capabilities_changed( &self, ) -> PropertyStream<'p, <Result<Vec<ModemCapability>> as ResultAdapter>::Ok>
The capability combinations that the modem supports.
Create a stream for the SupportedCapabilities property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn current_capabilities(&self) -> Result<ModemCapability>
pub async fn current_capabilities(&self) -> Result<ModemCapability>
The capabilities in use.
pub fn cached_current_capabilities(
&self,
) -> Result<Option<<Result<ModemCapability> as ResultAdapter>::Ok>, <Result<ModemCapability> as ResultAdapter>::Err>
pub fn cached_current_capabilities( &self, ) -> Result<Option<<Result<ModemCapability> as ResultAdapter>::Ok>, <Result<ModemCapability> as ResultAdapter>::Err>
The capabilities in use.
Get the cached value of the CurrentCapabilities property, or None if the property is not cached.
pub async fn receive_current_capabilities_changed(
&self,
) -> PropertyStream<'p, <Result<ModemCapability> as ResultAdapter>::Ok>
pub async fn receive_current_capabilities_changed( &self, ) -> PropertyStream<'p, <Result<ModemCapability> as ResultAdapter>::Ok>
The capabilities in use.
Create a stream for the CurrentCapabilities property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn max_bearers(&self) -> Result<u32>
👎Deprecated: Deprecated in ModemManager 1.18. Use max_active_bearers, which always has the same value.
pub async fn max_bearers(&self) -> Result<u32>
Deprecated in ModemManager 1.18. Use max_active_bearers, which always has the same value.
The number of bearers that the modem can define.
pub fn cached_max_bearers(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
👎Deprecated: Deprecated in ModemManager 1.18. Use max_active_bearers, which always has the same value.
pub fn cached_max_bearers( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
Deprecated in ModemManager 1.18. Use max_active_bearers, which always has the same value.
The number of bearers that the modem can define.
Get the cached value of the MaxBearers property, or None if the property is not cached.
pub async fn receive_max_bearers_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
👎Deprecated: Deprecated in ModemManager 1.18. Use max_active_bearers, which always has the same value.
pub async fn receive_max_bearers_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
Deprecated in ModemManager 1.18. Use max_active_bearers, which always has the same value.
The number of bearers that the modem can define.
Create a stream for the MaxBearers property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn max_active_bearers(&self) -> Result<u32>
pub async fn max_active_bearers(&self) -> Result<u32>
The number of default bearers that can be active without multiplexing.
pub fn cached_max_active_bearers(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_max_active_bearers( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
The number of default bearers that can be active without multiplexing.
Get the cached value of the MaxActiveBearers property, or None if the property is not cached.
pub async fn receive_max_active_bearers_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_max_active_bearers_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
The number of default bearers that can be active without multiplexing.
Create a stream for the MaxActiveBearers property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn max_active_multiplexed_bearers(&self) -> Result<u32>
pub async fn max_active_multiplexed_bearers(&self) -> Result<u32>
The number of default bearers that can be active on one multiplexed network link.
The value is 0 if the modem has no multiplexing.
Added in ModemManager 1.18.
pub fn cached_max_active_multiplexed_bearers(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_max_active_multiplexed_bearers( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
The number of default bearers that can be active on one multiplexed network link.
The value is 0 if the modem has no multiplexing.
Added in ModemManager 1.18.
Get the cached value of the MaxActiveMultiplexedBearers property, or None if the property is not cached.
pub async fn receive_max_active_multiplexed_bearers_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_max_active_multiplexed_bearers_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
The number of default bearers that can be active on one multiplexed network link.
The value is 0 if the modem has no multiplexing.
Added in ModemManager 1.18.
Create a stream for the MaxActiveMultiplexedBearers property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn manufacturer(&self) -> Result<String>
pub async fn manufacturer(&self) -> Result<String>
The manufacturer that the modem reports.
pub fn cached_manufacturer(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_manufacturer( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The manufacturer that the modem reports.
Get the cached value of the Manufacturer property, or None if the property is not cached.
pub async fn receive_manufacturer_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_manufacturer_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The manufacturer that the modem reports.
Create a stream for the Manufacturer property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub fn cached_model(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_model( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The model that the modem reports.
Get the cached value of the Model property, or None if the property is not cached.
pub async fn receive_model_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_model_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The model that the modem reports.
Create a stream for the Model property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub fn cached_revision(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_revision( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The software revision that the modem reports.
Get the cached value of the Revision property, or None if the property is not cached.
pub async fn receive_revision_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_revision_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The software revision that the modem reports.
Create a stream for the Revision property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn carrier_configuration(&self) -> Result<String>
pub async fn carrier_configuration(&self) -> Result<String>
The carrier-specific configuration in use.
Added in ModemManager 1.12.
pub fn cached_carrier_configuration(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_carrier_configuration( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The carrier-specific configuration in use.
Added in ModemManager 1.12.
Get the cached value of the CarrierConfiguration property, or None if the property is not cached.
pub async fn receive_carrier_configuration_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_carrier_configuration_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The carrier-specific configuration in use.
Added in ModemManager 1.12.
Create a stream for the CarrierConfiguration property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn carrier_configuration_revision(&self) -> Result<String>
pub async fn carrier_configuration_revision(&self) -> Result<String>
The revision of the carrier-specific configuration in use.
Added in ModemManager 1.12.
pub fn cached_carrier_configuration_revision(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_carrier_configuration_revision( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The revision of the carrier-specific configuration in use.
Added in ModemManager 1.12.
Get the cached value of the CarrierConfigurationRevision property, or None if the property is not cached.
pub async fn receive_carrier_configuration_revision_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_carrier_configuration_revision_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The revision of the carrier-specific configuration in use.
Added in ModemManager 1.12.
Create a stream for the CarrierConfigurationRevision property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn hardware_revision(&self) -> Result<String>
pub async fn hardware_revision(&self) -> Result<String>
The hardware revision that the modem reports.
pub fn cached_hardware_revision(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_hardware_revision( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The hardware revision that the modem reports.
Get the cached value of the HardwareRevision property, or None if the property is not cached.
pub async fn receive_hardware_revision_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_hardware_revision_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The hardware revision that the modem reports.
Create a stream for the HardwareRevision property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn device_identifier(&self) -> Result<String>
pub async fn device_identifier(&self) -> Result<String>
A best-effort identifier built from the model, firmware and bus IDs.
Identical devices can share it. It is not the IMEI.
pub fn cached_device_identifier(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_device_identifier( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
A best-effort identifier built from the model, firmware and bus IDs.
Identical devices can share it. It is not the IMEI.
Get the cached value of the DeviceIdentifier property, or None if the property is not cached.
pub async fn receive_device_identifier_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_device_identifier_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
A best-effort identifier built from the model, firmware and bus IDs.
Identical devices can share it. It is not the IMEI.
Create a stream for the DeviceIdentifier property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn device(&self) -> Result<String>
pub async fn device(&self) -> Result<String>
The physical device, for example a sysfs path.
A udev tag can override it.
pub fn cached_device(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_device( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The physical device, for example a sysfs path.
A udev tag can override it.
Get the cached value of the Device property, or None if the property is not cached.
pub async fn receive_device_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_device_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The physical device, for example a sysfs path.
A udev tag can override it.
Create a stream for the Device property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn physdev(&self) -> Result<String>
pub async fn physdev(&self) -> Result<String>
The sysfs path of the physical device.
Added in ModemManager 1.22.
pub fn cached_physdev(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_physdev( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The sysfs path of the physical device.
Added in ModemManager 1.22.
Get the cached value of the Physdev property, or None if the property is not cached.
pub async fn receive_physdev_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_physdev_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The sysfs path of the physical device.
Added in ModemManager 1.22.
Create a stream for the Physdev property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub fn cached_drivers(
&self,
) -> Result<Option<<Result<Vec<String>> as ResultAdapter>::Ok>, <Result<Vec<String>> as ResultAdapter>::Err>
pub fn cached_drivers( &self, ) -> Result<Option<<Result<Vec<String>> as ResultAdapter>::Ok>, <Result<Vec<String>> as ResultAdapter>::Err>
The kernel drivers that handle the modem.
Get the cached value of the Drivers property, or None if the property is not cached.
pub async fn receive_drivers_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<String>> as ResultAdapter>::Ok>
pub async fn receive_drivers_changed( &self, ) -> PropertyStream<'p, <Result<Vec<String>> as ResultAdapter>::Ok>
The kernel drivers that handle the modem.
Create a stream for the Drivers property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub fn cached_plugin(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_plugin( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The name of the daemon plugin that handles the modem.
Get the cached value of the Plugin property, or None if the property is not cached.
pub async fn receive_plugin_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_plugin_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The name of the daemon plugin that handles the modem.
Create a stream for the Plugin property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn primary_port(&self) -> Result<String>
pub async fn primary_port(&self) -> Result<String>
The name of the port that controls the modem.
pub fn cached_primary_port(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_primary_port( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The name of the port that controls the modem.
Get the cached value of the PrimaryPort property, or None if the property is not cached.
pub async fn receive_primary_port_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_primary_port_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The name of the port that controls the modem.
Create a stream for the PrimaryPort property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn ports(&self) -> Result<Vec<(String, ModemPortType)>>
pub async fn ports(&self) -> Result<Vec<(String, ModemPortType)>>
The ports of the modem with their types.
pub fn cached_ports(
&self,
) -> Result<Option<<Result<Vec<(String, ModemPortType)>> as ResultAdapter>::Ok>, <Result<Vec<(String, ModemPortType)>> as ResultAdapter>::Err>
pub fn cached_ports( &self, ) -> Result<Option<<Result<Vec<(String, ModemPortType)>> as ResultAdapter>::Ok>, <Result<Vec<(String, ModemPortType)>> as ResultAdapter>::Err>
The ports of the modem with their types.
Get the cached value of the Ports property, or None if the property is not cached.
pub async fn receive_ports_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<(String, ModemPortType)>> as ResultAdapter>::Ok>
pub async fn receive_ports_changed( &self, ) -> PropertyStream<'p, <Result<Vec<(String, ModemPortType)>> as ResultAdapter>::Ok>
The ports of the modem with their types.
Create a stream for the Ports property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn equipment_identifier(&self) -> Result<String>
pub async fn equipment_identifier(&self) -> Result<String>
The IMEI of a GSM device or the ESN or MEID of a CDMA device.
pub fn cached_equipment_identifier(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_equipment_identifier( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
The IMEI of a GSM device or the ESN or MEID of a CDMA device.
Get the cached value of the EquipmentIdentifier property, or None if the property is not cached.
pub async fn receive_equipment_identifier_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_equipment_identifier_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
The IMEI of a GSM device or the ESN or MEID of a CDMA device.
Create a stream for the EquipmentIdentifier property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn unlock_required(&self) -> Result<ModemLock>
pub async fn unlock_required(&self) -> Result<ModemLock>
The lock that the modem waits for.
pub fn cached_unlock_required(
&self,
) -> Result<Option<<Result<ModemLock> as ResultAdapter>::Ok>, <Result<ModemLock> as ResultAdapter>::Err>
pub fn cached_unlock_required( &self, ) -> Result<Option<<Result<ModemLock> as ResultAdapter>::Ok>, <Result<ModemLock> as ResultAdapter>::Err>
The lock that the modem waits for.
Get the cached value of the UnlockRequired property, or None if the property is not cached.
pub async fn receive_unlock_required_changed(
&self,
) -> PropertyStream<'p, <Result<ModemLock> as ResultAdapter>::Ok>
pub async fn receive_unlock_required_changed( &self, ) -> PropertyStream<'p, <Result<ModemLock> as ResultAdapter>::Ok>
The lock that the modem waits for.
Create a stream for the UnlockRequired property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn unlock_retries(&self) -> Result<HashMap<u32, u32>>
pub async fn unlock_retries(&self) -> Result<HashMap<u32, u32>>
The remaining tries for the locks that have a count.
The keys are ModemLock values. The property is raw because zvariant
needs the Basic trait for map keys and the derive does not implement
it.
pub fn cached_unlock_retries(
&self,
) -> Result<Option<<Result<HashMap<u32, u32>> as ResultAdapter>::Ok>, <Result<HashMap<u32, u32>> as ResultAdapter>::Err>
pub fn cached_unlock_retries( &self, ) -> Result<Option<<Result<HashMap<u32, u32>> as ResultAdapter>::Ok>, <Result<HashMap<u32, u32>> as ResultAdapter>::Err>
The remaining tries for the locks that have a count.
The keys are ModemLock values. The property is raw because zvariant
needs the Basic trait for map keys and the derive does not implement
it.
Get the cached value of the UnlockRetries property, or None if the property is not cached.
pub async fn receive_unlock_retries_changed(
&self,
) -> PropertyStream<'p, <Result<HashMap<u32, u32>> as ResultAdapter>::Ok>
pub async fn receive_unlock_retries_changed( &self, ) -> PropertyStream<'p, <Result<HashMap<u32, u32>> as ResultAdapter>::Ok>
The remaining tries for the locks that have a count.
The keys are ModemLock values. The property is raw because zvariant
needs the Basic trait for map keys and the derive does not implement
it.
Create a stream for the UnlockRetries property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn state(&self) -> Result<ModemState>
pub async fn state(&self) -> Result<ModemState>
The overall state of the modem.
pub fn cached_state(
&self,
) -> Result<Option<<Result<ModemState> as ResultAdapter>::Ok>, <Result<ModemState> as ResultAdapter>::Err>
pub fn cached_state( &self, ) -> Result<Option<<Result<ModemState> as ResultAdapter>::Ok>, <Result<ModemState> as ResultAdapter>::Err>
The overall state of the modem.
Get the cached value of the State property, or None if the property is not cached.
pub async fn receive_state_changed(
&self,
) -> PropertyStream<'p, <Result<ModemState> as ResultAdapter>::Ok>
pub async fn receive_state_changed( &self, ) -> PropertyStream<'p, <Result<ModemState> as ResultAdapter>::Ok>
The overall state of the modem.
Create a stream for the State property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn state_failed_reason(&self) -> Result<ModemStateFailedReason>
pub async fn state_failed_reason(&self) -> Result<ModemStateFailedReason>
The reason for the failed state.
pub fn cached_state_failed_reason(
&self,
) -> Result<Option<<Result<ModemStateFailedReason> as ResultAdapter>::Ok>, <Result<ModemStateFailedReason> as ResultAdapter>::Err>
pub fn cached_state_failed_reason( &self, ) -> Result<Option<<Result<ModemStateFailedReason> as ResultAdapter>::Ok>, <Result<ModemStateFailedReason> as ResultAdapter>::Err>
The reason for the failed state.
Get the cached value of the StateFailedReason property, or None if the property is not cached.
pub async fn receive_state_failed_reason_changed(
&self,
) -> PropertyStream<'p, <Result<ModemStateFailedReason> as ResultAdapter>::Ok>
pub async fn receive_state_failed_reason_changed( &self, ) -> PropertyStream<'p, <Result<ModemStateFailedReason> as ResultAdapter>::Ok>
The reason for the failed state.
Create a stream for the StateFailedReason property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn access_technologies(&self) -> Result<ModemAccessTechnology>
pub async fn access_technologies(&self) -> Result<ModemAccessTechnology>
The access technologies in use.
pub fn cached_access_technologies(
&self,
) -> Result<Option<<Result<ModemAccessTechnology> as ResultAdapter>::Ok>, <Result<ModemAccessTechnology> as ResultAdapter>::Err>
pub fn cached_access_technologies( &self, ) -> Result<Option<<Result<ModemAccessTechnology> as ResultAdapter>::Ok>, <Result<ModemAccessTechnology> as ResultAdapter>::Err>
The access technologies in use.
Get the cached value of the AccessTechnologies property, or None if the property is not cached.
pub async fn receive_access_technologies_changed(
&self,
) -> PropertyStream<'p, <Result<ModemAccessTechnology> as ResultAdapter>::Ok>
pub async fn receive_access_technologies_changed( &self, ) -> PropertyStream<'p, <Result<ModemAccessTechnology> as ResultAdapter>::Ok>
The access technologies in use.
Create a stream for the AccessTechnologies property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn signal_quality(&self) -> Result<(u32, bool)>
pub async fn signal_quality(&self) -> Result<(u32, bool)>
The signal quality in percent and whether the value is recent.
pub fn cached_signal_quality(
&self,
) -> Result<Option<<Result<(u32, bool)> as ResultAdapter>::Ok>, <Result<(u32, bool)> as ResultAdapter>::Err>
pub fn cached_signal_quality( &self, ) -> Result<Option<<Result<(u32, bool)> as ResultAdapter>::Ok>, <Result<(u32, bool)> as ResultAdapter>::Err>
The signal quality in percent and whether the value is recent.
Get the cached value of the SignalQuality property, or None if the property is not cached.
pub async fn receive_signal_quality_changed(
&self,
) -> PropertyStream<'p, <Result<(u32, bool)> as ResultAdapter>::Ok>
pub async fn receive_signal_quality_changed( &self, ) -> PropertyStream<'p, <Result<(u32, bool)> as ResultAdapter>::Ok>
The signal quality in percent and whether the value is recent.
Create a stream for the SignalQuality property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn own_numbers(&self) -> Result<Vec<String>>
pub async fn own_numbers(&self) -> Result<Vec<String>>
The numbers of this modem, for example the MSISDN.
pub fn cached_own_numbers(
&self,
) -> Result<Option<<Result<Vec<String>> as ResultAdapter>::Ok>, <Result<Vec<String>> as ResultAdapter>::Err>
pub fn cached_own_numbers( &self, ) -> Result<Option<<Result<Vec<String>> as ResultAdapter>::Ok>, <Result<Vec<String>> as ResultAdapter>::Err>
The numbers of this modem, for example the MSISDN.
Get the cached value of the OwnNumbers property, or None if the property is not cached.
pub async fn receive_own_numbers_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<String>> as ResultAdapter>::Ok>
pub async fn receive_own_numbers_changed( &self, ) -> PropertyStream<'p, <Result<Vec<String>> as ResultAdapter>::Ok>
The numbers of this modem, for example the MSISDN.
Create a stream for the OwnNumbers property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn power_state(&self) -> Result<ModemPowerState>
pub async fn power_state(&self) -> Result<ModemPowerState>
The power state.
pub fn cached_power_state(
&self,
) -> Result<Option<<Result<ModemPowerState> as ResultAdapter>::Ok>, <Result<ModemPowerState> as ResultAdapter>::Err>
pub fn cached_power_state( &self, ) -> Result<Option<<Result<ModemPowerState> as ResultAdapter>::Ok>, <Result<ModemPowerState> as ResultAdapter>::Err>
The power state.
Get the cached value of the PowerState property, or None if the property is not cached.
pub async fn receive_power_state_changed(
&self,
) -> PropertyStream<'p, <Result<ModemPowerState> as ResultAdapter>::Ok>
pub async fn receive_power_state_changed( &self, ) -> PropertyStream<'p, <Result<ModemPowerState> as ResultAdapter>::Ok>
The power state.
Create a stream for the PowerState property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn supported_modes(&self) -> Result<Vec<(ModemMode, ModemMode)>>
pub async fn supported_modes(&self) -> Result<Vec<(ModemMode, ModemMode)>>
The supported mode combinations.
Each pair is the allowed modes and the preferred mode.
pub fn cached_supported_modes(
&self,
) -> Result<Option<<Result<Vec<(ModemMode, ModemMode)>> as ResultAdapter>::Ok>, <Result<Vec<(ModemMode, ModemMode)>> as ResultAdapter>::Err>
pub fn cached_supported_modes( &self, ) -> Result<Option<<Result<Vec<(ModemMode, ModemMode)>> as ResultAdapter>::Ok>, <Result<Vec<(ModemMode, ModemMode)>> as ResultAdapter>::Err>
The supported mode combinations.
Each pair is the allowed modes and the preferred mode.
Get the cached value of the SupportedModes property, or None if the property is not cached.
pub async fn receive_supported_modes_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<(ModemMode, ModemMode)>> as ResultAdapter>::Ok>
pub async fn receive_supported_modes_changed( &self, ) -> PropertyStream<'p, <Result<Vec<(ModemMode, ModemMode)>> as ResultAdapter>::Ok>
The supported mode combinations.
Each pair is the allowed modes and the preferred mode.
Create a stream for the SupportedModes property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn current_modes(&self) -> Result<(ModemMode, ModemMode)>
pub async fn current_modes(&self) -> Result<(ModemMode, ModemMode)>
The allowed and the preferred modes in use.
pub fn cached_current_modes(
&self,
) -> Result<Option<<Result<(ModemMode, ModemMode)> as ResultAdapter>::Ok>, <Result<(ModemMode, ModemMode)> as ResultAdapter>::Err>
pub fn cached_current_modes( &self, ) -> Result<Option<<Result<(ModemMode, ModemMode)> as ResultAdapter>::Ok>, <Result<(ModemMode, ModemMode)> as ResultAdapter>::Err>
The allowed and the preferred modes in use.
Get the cached value of the CurrentModes property, or None if the property is not cached.
pub async fn receive_current_modes_changed(
&self,
) -> PropertyStream<'p, <Result<(ModemMode, ModemMode)> as ResultAdapter>::Ok>
pub async fn receive_current_modes_changed( &self, ) -> PropertyStream<'p, <Result<(ModemMode, ModemMode)> as ResultAdapter>::Ok>
The allowed and the preferred modes in use.
Create a stream for the CurrentModes property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn supported_bands(&self) -> Result<Vec<ModemBand>>
pub async fn supported_bands(&self) -> Result<Vec<ModemBand>>
The bands that the modem supports.
pub fn cached_supported_bands(
&self,
) -> Result<Option<<Result<Vec<ModemBand>> as ResultAdapter>::Ok>, <Result<Vec<ModemBand>> as ResultAdapter>::Err>
pub fn cached_supported_bands( &self, ) -> Result<Option<<Result<Vec<ModemBand>> as ResultAdapter>::Ok>, <Result<Vec<ModemBand>> as ResultAdapter>::Err>
The bands that the modem supports.
Get the cached value of the SupportedBands property, or None if the property is not cached.
pub async fn receive_supported_bands_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<ModemBand>> as ResultAdapter>::Ok>
pub async fn receive_supported_bands_changed( &self, ) -> PropertyStream<'p, <Result<Vec<ModemBand>> as ResultAdapter>::Ok>
The bands that the modem supports.
Create a stream for the SupportedBands property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn current_bands(&self) -> Result<Vec<ModemBand>>
pub async fn current_bands(&self) -> Result<Vec<ModemBand>>
The bands in use.
pub fn cached_current_bands(
&self,
) -> Result<Option<<Result<Vec<ModemBand>> as ResultAdapter>::Ok>, <Result<Vec<ModemBand>> as ResultAdapter>::Err>
pub fn cached_current_bands( &self, ) -> Result<Option<<Result<Vec<ModemBand>> as ResultAdapter>::Ok>, <Result<Vec<ModemBand>> as ResultAdapter>::Err>
The bands in use.
Get the cached value of the CurrentBands property, or None if the property is not cached.
pub async fn receive_current_bands_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<ModemBand>> as ResultAdapter>::Ok>
pub async fn receive_current_bands_changed( &self, ) -> PropertyStream<'p, <Result<Vec<ModemBand>> as ResultAdapter>::Ok>
The bands in use.
Create a stream for the CurrentBands property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn supported_ip_families(&self) -> Result<BearerIpFamily>
pub async fn supported_ip_families(&self) -> Result<BearerIpFamily>
The IP families that the modem supports.
pub fn cached_supported_ip_families(
&self,
) -> Result<Option<<Result<BearerIpFamily> as ResultAdapter>::Ok>, <Result<BearerIpFamily> as ResultAdapter>::Err>
pub fn cached_supported_ip_families( &self, ) -> Result<Option<<Result<BearerIpFamily> as ResultAdapter>::Ok>, <Result<BearerIpFamily> as ResultAdapter>::Err>
The IP families that the modem supports.
Get the cached value of the SupportedIpFamilies property, or None if the property is not cached.
pub async fn receive_supported_ip_families_changed(
&self,
) -> PropertyStream<'p, <Result<BearerIpFamily> as ResultAdapter>::Ok>
pub async fn receive_supported_ip_families_changed( &self, ) -> PropertyStream<'p, <Result<BearerIpFamily> as ResultAdapter>::Ok>
The IP families that the modem supports.
Create a stream for the SupportedIpFamilies property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
Trait Implementations§
§impl<'p> AsMut<Proxy<'p>> for ModemProxy<'p>
impl<'p> AsMut<Proxy<'p>> for ModemProxy<'p>
§impl<'p> AsRef<Proxy<'p>> for ModemProxy<'p>
impl<'p> AsRef<Proxy<'p>> for ModemProxy<'p>
§impl<'p> Clone for ModemProxy<'p>
impl<'p> Clone for ModemProxy<'p>
§fn clone(&self) -> ModemProxy<'p>
fn clone(&self) -> ModemProxy<'p>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more