pub struct ControllerProxy { /* private fields */ }
Implementations§
Source§impl ControllerProxy
impl ControllerProxy
Sourcepub fn take_event_stream(&self) -> ControllerEventStream
pub fn take_event_stream(&self) -> ControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn request_send_soon(
&self,
) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
pub fn request_send_soon( &self, ) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
Requests that the collection of Observations that are currently cached locally be sent to the Cobalt server soon. Cobalt will send the Observations in one or more batches and will retry several times upon failure. The response occurs only after that procedure is completed. A return value of true indicates that all Observations were successfully sent. A return value of false indicates otherwise.
Sourcepub fn generate_aggregated_observations(
&self,
day_index: u32,
report_specs: &[ReportSpec],
) -> QueryResponseFut<Vec<u64>, DefaultFuchsiaResourceDialect>
pub fn generate_aggregated_observations( &self, day_index: u32, report_specs: &[ReportSpec], ) -> QueryResponseFut<Vec<u64>, DefaultFuchsiaResourceDialect>
Triggers Cobalt to generate Observations based on locally aggregated event data and write them to the local ObservationStore. In a non-test environment this would normally be done periodically by a background thread. In a test environment this method should be invoked against an instance of the Cobalt FIDL service that was passed the flag –start_event_aggregator_worker=false.
day_index
The index of the day for which locally aggregated
Observations should be generated.
report_specs
A vector of specifications identifying the reports to
return the number of observations for.
Returns a vector whose k-th element is the number of observations
generated for the k-th element of report_specs
. If report_specs
is the empty vector, then an empty vector is returned.
Sourcepub fn listen_for_initialized(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn listen_for_initialized( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Requests that the caller be notified after the Cobalt FIDL service is in the fully-initialized state.
Cobalt starts serving requests before it is fully initialized. In this pre-initialized state it will buffer incoming log events in memory but not complete their processing. After Cobalt becomes fully initialized the events in the bufer are fully processed.
A partial list of things that must happen before Cobalt enters the fully-initialized state are:
- Cobalt must by notified by the timekeeper service that the system clock has become accurate–usually because the time has been fetched from a trusted network resource.
The callback to this method will be invoked after Cobalt transistions
Trait Implementations§
Source§impl Clone for ControllerProxy
impl Clone for ControllerProxy
Source§fn clone(&self) -> ControllerProxy
fn clone(&self) -> ControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl ControllerProxyInterface for ControllerProxy
impl ControllerProxyInterface for ControllerProxy
type RequestSendSoonResponseFut = QueryResponseFut<bool>
type GenerateAggregatedObservationsResponseFut = QueryResponseFut<Vec<u64>>
type ListenForInitializedResponseFut = QueryResponseFut<()>
fn request_send_soon(&self) -> Self::RequestSendSoonResponseFut
fn generate_aggregated_observations( &self, day_index: u32, report_specs: &[ReportSpec], ) -> Self::GenerateAggregatedObservationsResponseFut
fn listen_for_initialized(&self) -> Self::ListenForInitializedResponseFut
Source§impl Debug for ControllerProxy
impl Debug for ControllerProxy
Source§impl Proxy for ControllerProxy
impl Proxy for ControllerProxy
Source§type Protocol = ControllerMarker
type Protocol = ControllerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ControllerProxy
impl !RefUnwindSafe for ControllerProxy
impl Send for ControllerProxy
impl Sync for ControllerProxy
impl Unpin for ControllerProxy
impl !UnwindSafe for ControllerProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)