Struct TimeProxy
pub struct TimeProxy<'p>(Proxy<'p>);Expand description
Client for the network time of a modem.
The interface appears once the modem can register. A 3GPP modem needs an unlocked SIM first.
Upstream documentation: https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.Time.html.
Tuple Fields§
§0: Proxy<'p>Implementations§
§impl<'p> TimeProxy<'p>
impl<'p> TimeProxy<'p>
pub async fn new<P>(conn: &Connection, path: P) -> Result<TimeProxy<'p>>
pub async fn new<P>(conn: &Connection, path: P) -> Result<TimeProxy<'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 get_network_time(&self) -> Result<String>
pub async fn get_network_time(&self) -> Result<String>
Returns the network time as an ISO 8601 string.
The call fails with a D-Bus error if the modem has no network time or does not support the call. It does not return an empty string.
pub async fn receive_network_time_changed(
&self,
) -> Result<NetworkTimeChangedStream>
pub async fn receive_network_time_changed( &self, ) -> Result<NetworkTimeChangedStream>
Create a stream that receives NetworkTimeChanged signals.
This a convenient wrapper around zbus::Proxy::receive_signal.
Sent when the network time was updated.
pub async fn receive_network_time_changed_with_args(
&self,
args: &[(u8, &str)],
) -> Result<NetworkTimeChangedStream>
pub async fn receive_network_time_changed_with_args( &self, args: &[(u8, &str)], ) -> Result<NetworkTimeChangedStream>
Create a stream that receives NetworkTimeChanged signals.
This a convenient wrapper around zbus::Proxy::receive_signal_with_args.
Sent when the network time was updated.
pub async fn network_timezone(&self) -> Result<NetworkTimezone>
pub async fn network_timezone(&self) -> Result<NetworkTimezone>
The timezone that the network reports.
pub fn cached_network_timezone(
&self,
) -> Result<Option<<Result<NetworkTimezone> as ResultAdapter>::Ok>, <Result<NetworkTimezone> as ResultAdapter>::Err>
pub fn cached_network_timezone( &self, ) -> Result<Option<<Result<NetworkTimezone> as ResultAdapter>::Ok>, <Result<NetworkTimezone> as ResultAdapter>::Err>
The timezone that the network reports.
Get the cached value of the NetworkTimezone property, or None if the property is not cached.
pub async fn receive_network_timezone_changed(
&self,
) -> PropertyStream<'p, <Result<NetworkTimezone> as ResultAdapter>::Ok>
pub async fn receive_network_timezone_changed( &self, ) -> PropertyStream<'p, <Result<NetworkTimezone> as ResultAdapter>::Ok>
The timezone that the network reports.
Create a stream for the NetworkTimezone property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].