pub enum PushSourceRequest {
UpdateDeviceProperties {
properties: Properties,
control_handle: PushSourceControlHandle,
},
WatchSample {
responder: PushSourceWatchSampleResponder,
},
WatchStatus {
responder: PushSourceWatchStatusResponder,
},
}
Expand description
A protocol for time sources that produce time samples on a schedule that it
dictates. A PushSource does not report errors to clients as it is
responsible for handling them internally. Instead, a PushSource reports a
general health indication through the WatchHealth
method to reflect
whether or not it expects to successfully produce time samples.
Variants§
UpdateDeviceProperties
Notifies the time source of changes to global properties of the device that it may use to increase accuracy of time measurements.
WatchSample
Watch for new time samples from the time source. This method is a hanging get and returns the latest time sample if one is available and has not already been returned to the client. If no such sample is available, the method will hang until one is produced and return it then.
Note that it is entirely at the discretion of the PushSource implementation when to produce a sample; a call to WatchSample does not necessarily trigger sample collection.
In the case a client sends a second WatchSample request while another request is active, the channel is closed with a ZX_ERR_BAD_STATE epitaph.
Fields
responder: PushSourceWatchSampleResponder
WatchStatus
Watch for changes in the status of the time source.
This method is a hanging get that returns when the status changes from the last status reported to the client.
In the case a client sends a second WatchStatus request while another request is active, the channel is closed with a ZX_ERR_BAD_STATE epitaph.
Fields
responder: PushSourceWatchStatusResponder
Implementations§
Source§impl PushSourceRequest
impl PushSourceRequest
pub fn into_update_device_properties( self, ) -> Option<(Properties, PushSourceControlHandle)>
pub fn into_watch_sample(self) -> Option<PushSourceWatchSampleResponder>
pub fn into_watch_status(self) -> Option<PushSourceWatchStatusResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL