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>
pub fn new(update_algorithm: UA, initial_status: Status) -> Result<Self>
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<()>
pub async fn poll_updates(&self) -> Result<()>
Polls updates received on |update_algorithm| and pushes them to bound clients.
Sourcepub async fn handle_requests_for_stream(
&self,
request_stream: PushSourceRequestStream,
) -> Result<()>
pub async fn handle_requests_for_stream( &self, request_stream: PushSourceRequestStream, ) -> Result<()>
Handle a single client’s requests received on the given |request_stream|.
Auto Trait Implementations§
impl<UA> !Freeze for PushSource<UA>
impl<UA> !RefUnwindSafe for PushSource<UA>
impl<UA> Send for PushSource<UA>where
UA: Send,
impl<UA> Sync for PushSource<UA>where
UA: Sync,
impl<UA> Unpin for PushSource<UA>where
UA: Unpin,
impl<UA> !UnwindSafe for PushSource<UA>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more