Trait fidl::encoding::ProxyChannelBox
source · pub trait ProxyChannelBox<D: ResourceDialect>: Debug + Send + Sync {
// Required methods
fn recv_etc_from(
&self,
ctx: &mut Context<'_>,
buf: &mut D::MessageBufEtc,
) -> Poll<Result<(), Option<<D::ProxyChannel as ProxyChannelFor<D>>::Error>>>;
fn as_channel(&self) -> &D::ProxyChannel;
fn write_etc(
&self,
bytes: &[u8],
handles: &mut [<D::ProxyChannel as ProxyChannelFor<D>>::HandleDisposition],
) -> Result<(), Option<<D::ProxyChannel as ProxyChannelFor<D>>::Error>>;
fn is_closed(&self) -> bool;
fn unbox(self) -> D::ProxyChannel;
}
Expand description
Trait for a “Box” that wraps a handle when it’s inside a client. Useful when we need some infrastructure to make our underlying channels work the way the client code expects.
Required Methods§
sourcefn recv_etc_from(
&self,
ctx: &mut Context<'_>,
buf: &mut D::MessageBufEtc,
) -> Poll<Result<(), Option<<D::ProxyChannel as ProxyChannelFor<D>>::Error>>>
fn recv_etc_from( &self, ctx: &mut Context<'_>, buf: &mut D::MessageBufEtc, ) -> Poll<Result<(), Option<<D::ProxyChannel as ProxyChannelFor<D>>::Error>>>
Receives a message on the channel and registers this Channel
as
needing a read on receiving a io::std::ErrorKind::WouldBlock
.
sourcefn as_channel(&self) -> &D::ProxyChannel
fn as_channel(&self) -> &D::ProxyChannel
Get a reference to the boxed channel.
sourcefn write_etc(
&self,
bytes: &[u8],
handles: &mut [<D::ProxyChannel as ProxyChannelFor<D>>::HandleDisposition],
) -> Result<(), Option<<D::ProxyChannel as ProxyChannelFor<D>>::Error>>
fn write_etc( &self, bytes: &[u8], handles: &mut [<D::ProxyChannel as ProxyChannelFor<D>>::HandleDisposition], ) -> Result<(), Option<<D::ProxyChannel as ProxyChannelFor<D>>::Error>>
Write data to a Proxy channel
sourcefn unbox(self) -> D::ProxyChannel
fn unbox(self) -> D::ProxyChannel
Unbox this channel