pub struct FakeEndpointProxy { /* private fields */ }
Implementations§
source§impl FakeEndpointProxy
impl FakeEndpointProxy
sourcepub fn take_event_stream(&self) -> FakeEndpointEventStream
pub fn take_event_stream(&self) -> FakeEndpointEventStream
Get a Stream of events from the remote end of the FakeEndpoint protocol
Panics
Panics if the event stream was already taken.
sourcepub fn read(&self) -> QueryResponseFut<(Vec<u8>, u64)>
pub fn read(&self) -> QueryResponseFut<(Vec<u8>, u64)>
Reads a single frame from the network.
Blocks until new data is available to be read. FakeEndpoint will keep a limited amount of
frames to be read, dropping the oldest ones if the data is not fetched fast enough. The
number of dropped frames since the last call to Read
is returned in dropped_frames
.
Issuing a second Read
request when the first one is still pending will cause the channel
to be closed with ZX_ERR_BAD_STATE
.
Trait Implementations§
source§impl Clone for FakeEndpointProxy
impl Clone for FakeEndpointProxy
source§fn clone(&self) -> FakeEndpointProxy
fn clone(&self) -> FakeEndpointProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FakeEndpointProxy
impl Debug for FakeEndpointProxy
source§impl FakeEndpointProxyInterface for FakeEndpointProxy
impl FakeEndpointProxyInterface for FakeEndpointProxy
type WriteResponseFut = QueryResponseFut<()>
fn write(&self, data: &[u8]) -> Self::WriteResponseFut
type ReadResponseFut = QueryResponseFut<(Vec<u8, Global>, u64)>
fn read(&self) -> Self::ReadResponseFut
source§impl Proxy for FakeEndpointProxy
impl Proxy for FakeEndpointProxy
§type Protocol = FakeEndpointMarker
type Protocol = FakeEndpointMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more