pub struct BatchIteratorSynchronousProxy { /* private fields */ }
Implementations§
Source§impl BatchIteratorSynchronousProxy
impl BatchIteratorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<BatchIteratorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<BatchIteratorEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_next(
&self,
___deadline: MonotonicInstant,
) -> Result<BatchIteratorGetNextResult, Error>
pub fn get_next( &self, ___deadline: MonotonicInstant, ) -> Result<BatchIteratorGetNextResult, Error>
Returns a vector of [fuchsia.diagnostics/FormattedContent] structs with a format dictated by the format_settings argument provided to the Reader protocol which spawned this BatchIterator.
An empty vector implies that the data hierarchy has been fully iterated, and subsequent GetNext calls will always return the empty vector.
When the BatchIterator is serving results via subscription model, calls to GetNext will hang until there is new data available, it will not return an empty vector.
- returns a vector of FormattedContent structs. Clients connected to a Batch are expected to call GetNext() until an empty vector is returned, denoting that the entire data hierarchy has been read.
- error a [fuchsia.diagnostics/ReaderError]
value indicating that there was an issue reading the underlying data hierarchies
or formatting those hierarchies to populate the
batch
. Note, these issues do not include a single component’s data hierarchy failing to be read. The iterator is tolerant of individual component data sources failing to be read, whether that failure is a timeout or a malformed binary file. In the event that a GetNext call fails, that subset of the data hierarchy results is dropped, but future calls to GetNext will provide new subsets of FormattedDataHierarchies.
Sourcepub fn wait_for_ready(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn wait_for_ready(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Indiciates that the BatchIterator has been connected. If the BatchIterator hasn’t been connected, this method will hang until it is.
Trait Implementations§
Source§impl SynchronousProxy for BatchIteratorSynchronousProxy
impl SynchronousProxy for BatchIteratorSynchronousProxy
Source§type Proxy = BatchIteratorProxy
type Proxy = BatchIteratorProxy
The async proxy for the same protocol.
Source§type Protocol = BatchIteratorMarker
type Protocol = BatchIteratorMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for BatchIteratorSynchronousProxy
impl RefUnwindSafe for BatchIteratorSynchronousProxy
impl Send for BatchIteratorSynchronousProxy
impl Sync for BatchIteratorSynchronousProxy
impl Unpin for BatchIteratorSynchronousProxy
impl UnwindSafe for BatchIteratorSynchronousProxy
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