fidl_next_bind/
fuchsia.rs1use zx::Channel;
8
9use crate::{ClientEnd, ServerEnd};
10#[cfg(feature = "fasync")]
11use crate::{HasExecutor, RunsTransport, fuchsia_async::FuchsiaAsync};
12
13pub fn create_channel<P>() -> (ClientEnd<P, zx::Channel>, ServerEnd<P, zx::Channel>) {
15 let (client_end, server_end) = Channel::create();
16 (ClientEnd::from_untyped(client_end), ServerEnd::from_untyped(server_end))
17}
18
19#[cfg(feature = "fasync")]
20impl RunsTransport<Channel> for FuchsiaAsync {}
21
22#[cfg(feature = "fasync")]
23impl HasExecutor for Channel {
24 type Executor = FuchsiaAsync;
25
26 fn executor(&self) -> Self::Executor {
27 FuchsiaAsync
28 }
29}