pub struct AsyncChannel<D> { /* private fields */ }Expand description
A fidl-compatible channel that uses a libasync dispatcher.
Implementations§
Source§impl<D> AsyncChannel<D>
impl<D> AsyncChannel<D>
Sourcepub fn new_on_dispatcher(dispatcher: D, channel: Channel) -> Self
pub fn new_on_dispatcher(dispatcher: D, channel: Channel) -> Self
Creates an async channel bound to the dispatcher d that can be used with fidl bindings.
Sourcepub fn client_from_zx_channel_on_dispatcher<P>(
from: ClientEnd<P, Channel>,
dispatcher: D,
) -> ClientEnd<P, Self>
pub fn client_from_zx_channel_on_dispatcher<P>( from: ClientEnd<P, Channel>, dispatcher: D, ) -> ClientEnd<P, Self>
Sourcepub fn server_from_zx_channel_on_dispatcher<P>(
from: ServerEnd<P, Channel>,
dispatcher: D,
) -> ServerEnd<P, Self>
pub fn server_from_zx_channel_on_dispatcher<P>( from: ServerEnd<P, Channel>, dispatcher: D, ) -> ServerEnd<P, Self>
Source§impl<D: Default> AsyncChannel<D>
impl<D: Default> AsyncChannel<D>
Sourcepub fn new(channel: Channel) -> Self
pub fn new(channel: Channel) -> Self
Creates an async channel bound to the Default instance of dispatcher D that can
be used with fidl bindings.
Sourcepub fn client_from_zx_channel<P>(
from: ClientEnd<P, Channel>,
) -> ClientEnd<P, Self>
pub fn client_from_zx_channel<P>( from: ClientEnd<P, Channel>, ) -> ClientEnd<P, Self>
Sourcepub fn server_from_zx_channel<P>(
from: ServerEnd<P, Channel>,
) -> ServerEnd<P, Self>
pub fn server_from_zx_channel<P>( from: ServerEnd<P, Channel>, ) -> ServerEnd<P, Self>
Trait Implementations§
Source§impl<D: Debug> Debug for AsyncChannel<D>
impl<D: Debug> Debug for AsyncChannel<D>
Source§impl<D: OnDispatcher + 'static> HasExecutor for AsyncChannel<D>
impl<D: OnDispatcher + 'static> HasExecutor for AsyncChannel<D>
Source§impl<D: OnDispatcher> NonBlockingTransport for AsyncChannel<D>
impl<D: OnDispatcher> NonBlockingTransport for AsyncChannel<D>
Source§impl<D: PartialEq> PartialEq for AsyncChannel<D>
impl<D: PartialEq> PartialEq for AsyncChannel<D>
Source§impl<D: OnDispatcher> Transport for AsyncChannel<D>
impl<D: OnDispatcher> Transport for AsyncChannel<D>
The shared part of the transport. It is provided by shared reference
while sending and receiving. For an MPSC, this would contain a sender.
Source§type Exclusive = Exclusive<D>
type Exclusive = Exclusive<D>
The exclusive part of the transport. It is provided by mutable reference
only while receiving. For an MPSC, this would contain a receiver.
Source§type SendBuffer = Buffer
type SendBuffer = Buffer
The buffer type for sending.
Source§type SendFutureState = SendFutureState
type SendFutureState = SendFutureState
The future state for send operations.
Source§type RecvFutureState = RecvFutureState
type RecvFutureState = RecvFutureState
The future state for receive operations.
Source§type RecvBuffer = RecvBuffer
type RecvBuffer = RecvBuffer
The buffer type for receivers.
Source§fn split(self) -> (Self::Shared, Self::Exclusive)
fn split(self) -> (Self::Shared, Self::Exclusive)
Splits the transport into shared and exclusive pieces.
Source§fn acquire(_shared: &Self::Shared) -> Self::SendBuffer
fn acquire(_shared: &Self::Shared) -> Self::SendBuffer
Acquires an empty send buffer for the transport.
Source§fn begin_send(
_: &Self::Shared,
buffer: Self::SendBuffer,
) -> Self::SendFutureState
fn begin_send( _: &Self::Shared, buffer: Self::SendBuffer, ) -> Self::SendFutureState
Begins sending a
SendBuffer over this transport. Read moreSource§fn poll_send(
future_state: Pin<&mut Self::SendFutureState>,
_: &mut Context<'_>,
shared: &Self::Shared,
) -> Poll<Result<(), Option<Self::Error>>>
fn poll_send( future_state: Pin<&mut Self::SendFutureState>, _: &mut Context<'_>, shared: &Self::Shared, ) -> Poll<Result<(), Option<Self::Error>>>
Polls a
SendFutureState for completion with the shared part of the
transport. Read moreSource§fn begin_recv(
_shared: &Self::Shared,
exclusive: &mut Self::Exclusive,
) -> Self::RecvFutureState
fn begin_recv( _shared: &Self::Shared, exclusive: &mut Self::Exclusive, ) -> Self::RecvFutureState
Begins receiving a
RecvBuffer over this transport. Read moreimpl<D: OnDispatcher> RunsTransport<AsyncChannel<D>> for FidlExecutor<D>
impl<D> StructuralPartialEq for AsyncChannel<D>
Auto Trait Implementations§
impl<D> Freeze for AsyncChannel<D>where
D: Freeze,
impl<D> RefUnwindSafe for AsyncChannel<D>where
D: RefUnwindSafe,
impl<D> Send for AsyncChannel<D>where
D: Send,
impl<D> Sync for AsyncChannel<D>where
D: Sync,
impl<D> Unpin for AsyncChannel<D>where
D: Unpin,
impl<D> UnwindSafe for AsyncChannel<D>where
D: UnwindSafe,
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]