pub struct MetricEventLoggerQuerierProxy { /* private fields */ }
Implementations§
source§impl MetricEventLoggerQuerierProxy
impl MetricEventLoggerQuerierProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.metrics.test/MetricEventLoggerQuerier.
sourcepub fn take_event_stream(&self) -> MetricEventLoggerQuerierEventStream
pub fn take_event_stream(&self) -> MetricEventLoggerQuerierEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn watch_logs(
&self,
project_id: u32,
method: LogMethod,
) -> QueryResponseFut<(Vec<MetricEvent>, bool)>
pub fn watch_logs( &self, project_id: u32, method: LogMethod, ) -> QueryResponseFut<(Vec<MetricEvent>, bool)>
Returns the first N events that were logged for the logger with the
given project_id
and a more
flag indicating whether there were
more than N events logged. There is no way to retrieve events logged
after the first N events.
Will hang until at least one metrics metric is recorded for the given
project_id
and method
.
Repeated calls to WatchLogs for a given LogMethod will block until new events are logged with that method, enabling tests to synchronize without sleeps or timeouts.
sourcepub fn reset_logger(
&self,
project_id: u32,
method: LogMethod,
) -> Result<(), Error>
pub fn reset_logger( &self, project_id: u32, method: LogMethod, ) -> Result<(), Error>
Clear all logged events by logging method
for the logger with the
given project_id
.
This is a no-op if a logger for the given project_id
does not exist.
Notably, it does not create a new logger with project_id
if one
does not already exist.
Trait Implementations§
source§impl Clone for MetricEventLoggerQuerierProxy
impl Clone for MetricEventLoggerQuerierProxy
source§fn clone(&self) -> MetricEventLoggerQuerierProxy
fn clone(&self) -> MetricEventLoggerQuerierProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl MetricEventLoggerQuerierProxyInterface for MetricEventLoggerQuerierProxy
impl MetricEventLoggerQuerierProxyInterface for MetricEventLoggerQuerierProxy
type WatchLogsResponseFut = QueryResponseFut<(Vec<MetricEvent>, bool)>
fn watch_logs( &self, project_id: u32, method: LogMethod, ) -> Self::WatchLogsResponseFut
fn reset_logger(&self, project_id: u32, method: LogMethod) -> Result<(), Error>
source§impl Proxy for MetricEventLoggerQuerierProxy
impl Proxy for MetricEventLoggerQuerierProxy
§type Protocol = MetricEventLoggerQuerierMarker
type Protocol = MetricEventLoggerQuerierMarker
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 MetricEventLoggerQuerierProxy
impl !RefUnwindSafe for MetricEventLoggerQuerierProxy
impl Send for MetricEventLoggerQuerierProxy
impl Sync for MetricEventLoggerQuerierProxy
impl Unpin for MetricEventLoggerQuerierProxy
impl !UnwindSafe for MetricEventLoggerQuerierProxy
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)