pub struct ChannelSynchronousProxy { /* private fields */ }Implementations§
Source§impl ChannelSynchronousProxy
impl ChannelSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ChannelEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ChannelEvent, 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 create_channel(
&self,
handles: &[NewHandleId; 2],
___deadline: MonotonicInstant,
) -> Result<ChannelCreateChannelResult, Error>
pub fn create_channel( &self, handles: &[NewHandleId; 2], ___deadline: MonotonicInstant, ) -> Result<ChannelCreateChannelResult, Error>
Create a new channel in this FDomain and return both its ends.
Sourcepub fn read_channel(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<ChannelReadChannelResult, Error>
pub fn read_channel( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<ChannelReadChannelResult, Error>
Read a message from a channel. This method will fail if the channel is currently being read using the streaming read functions.
Note that this method is not like zx_channel_read in that it will not
return SHOULD_WAIT but will instead delay returning until there is data
to return.
Sourcepub fn write_channel(
&self,
handle: &HandleId,
data: &[u8],
handles: &Handles,
___deadline: MonotonicInstant,
) -> Result<ChannelWriteChannelResult, Error>
pub fn write_channel( &self, handle: &HandleId, data: &[u8], handles: &Handles, ___deadline: MonotonicInstant, ) -> Result<ChannelWriteChannelResult, Error>
Write to a channel. Handles are always consumed.
Sourcepub fn read_channel_streaming_start(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<ChannelReadChannelStreamingStartResult, Error>
pub fn read_channel_streaming_start( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<ChannelReadChannelStreamingStartResult, Error>
Starts reading from the given channel. Data is returned via the ChannelStreamingData event.
That event will occur repeatedly until ReadChannelStreamingStop is called for the same handle
or the event indicates the handle is closed.
Sourcepub fn read_channel_streaming_stop(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<ChannelReadChannelStreamingStopResult, Error>
pub fn read_channel_streaming_stop( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<ChannelReadChannelStreamingStopResult, Error>
Stop asynchronous reading from the given channel.
Trait Implementations§
Source§impl Debug for ChannelSynchronousProxy
impl Debug for ChannelSynchronousProxy
Source§impl From<Channel> for ChannelSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ChannelSynchronousProxy
Source§impl From<ChannelSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<ChannelSynchronousProxy> for NullableHandle
Source§fn from(value: ChannelSynchronousProxy) -> Self
fn from(value: ChannelSynchronousProxy) -> Self
Source§impl FromClient for ChannelSynchronousProxy
Available on Fuchsia only.
impl FromClient for ChannelSynchronousProxy
Source§type Protocol = ChannelMarker
type Protocol = ChannelMarker
Source§fn from_client(value: ClientEnd<ChannelMarker>) -> Self
fn from_client(value: ClientEnd<ChannelMarker>) -> Self
Source§impl SynchronousProxy for ChannelSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ChannelSynchronousProxy
Source§type Proxy = ChannelProxy
type Proxy = ChannelProxy
Source§type Protocol = ChannelMarker
type Protocol = ChannelMarker
Proxy controls.