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), DefaultFuchsiaResourceDialect>
pub fn watch_logs( &self, project_id: u32, method: LogMethod, ) -> QueryResponseFut<(Vec<MetricEvent>, bool), DefaultFuchsiaResourceDialect>
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
Source§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)