pub struct PullSource<UA: UpdateAlgorithm> { /* private fields */ }Expand description
An implementation of |fuchsia.time.external.PullSource| that routes time updates from an |UpdateAlgorithm| to clients of the fidl protocol and routes device property updates from fidl clients to the |UpdateAlgorithm|. This implementation is based on assumption that there’s only one client.
Implementations§
Source§impl<UA: UpdateAlgorithm> PullSource<UA>
impl<UA: UpdateAlgorithm> PullSource<UA>
Sourcepub fn new(update_algorithm: UA) -> Result<Self, Error>
pub fn new(update_algorithm: UA) -> Result<Self, Error>
Create a new |PullSource| that polls |update_algorithm| for time updates and starts in the |initial_status| status.
Sourcepub async fn handle_requests_for_stream(
&self,
request_stream: PullSourceRequestStream,
inspect_controller: Arc<Mutex<Option<PublishedInspectController>>>,
) -> Result<(), Error>
pub async fn handle_requests_for_stream( &self, request_stream: PullSourceRequestStream, inspect_controller: Arc<Mutex<Option<PublishedInspectController>>>, ) -> Result<(), Error>
Handle a single client’s requests received on the given |request_stream|.
Auto Trait Implementations§
impl<UA> Freeze for PullSource<UA>where
UA: Freeze,
impl<UA> RefUnwindSafe for PullSource<UA>where
UA: RefUnwindSafe,
impl<UA> Send for PullSource<UA>where
UA: Send,
impl<UA> Sync for PullSource<UA>where
UA: Sync,
impl<UA> Unpin for PullSource<UA>where
UA: Unpin,
impl<UA> UnsafeUnpin for PullSource<UA>where
UA: UnsafeUnpin,
impl<UA> UnwindSafe for PullSource<UA>where
UA: UnwindSafe,
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more