Struct push_source::PushSource
source · pub struct PushSource<UA: UpdateAlgorithm> { /* private fields */ }
Expand description
An implementation of |fuchsia.time.external.PushSource| that routes time updates from an |UpdateAlgorithm| to clients of the fidl protocol and routes device property updates from fidl clients to the |UpdateAlgorithm|.
Implementations§
source§impl<UA: UpdateAlgorithm> PushSource<UA>
impl<UA: UpdateAlgorithm> PushSource<UA>
sourcepub fn new(update_algorithm: UA, initial_status: Status) -> Result<Self, Error>
pub fn new(update_algorithm: UA, initial_status: Status) -> Result<Self, Error>
Create a new |PushSource| that polls |update_algorithm| for time updates and starts in the |initial_status| status.
sourcepub async fn poll_updates(&self) -> Result<(), Error>
pub async fn poll_updates(&self) -> Result<(), Error>
Polls updates received on |update_algorithm| and pushes them to bound clients.
sourcepub async fn handle_requests_for_stream(
&self,
request_stream: PushSourceRequestStream
) -> Result<(), Error>
pub async fn handle_requests_for_stream( &self, request_stream: PushSourceRequestStream ) -> Result<(), Error>
Handle a single client’s requests received on the given |request_stream|.