blob: 23f8a2f1cbbf8f6dd8196e3a9a35254336824af4 [file] [log] [blame]
// DO NOT EDIT: This file is machine-generated by fidlgen
#![warn(clippy::all)]
#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
#[derive(PartialEq, Clone, Debug)]
pub struct SuperFooRequest {
pub s: ::std::string::String,
}
impl ::fidl_next::Encodable for SuperFooRequest {
type Encoded = WireSuperFooRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for SuperFooRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let Self::Encoded {
s,
} = out_;
}
::fidl_next::Encode::encode(self.s, encoder_, s)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SuperFooRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let Self::Encoded {
s,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.s, encoder_, s)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for SuperFooRequest {
type EncodedOption = ::fidl_next::WireBox<'static, WireSuperFooRequest<'static>>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E> for SuperFooRequest
where
___E: ::fidl_next::Encoder + ?Sized,
SuperFooRequest: ::fidl_next::Encode<___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
if let Some(inner) = this {
::fidl_next::EncoderExt::encode_next(encoder, inner)?;
::fidl_next::WireBox::encode_present(out);
} else {
::fidl_next::WireBox::encode_absent(out);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for SuperFooRequest
where
___E: ::fidl_next::Encoder + ?Sized,
SuperFooRequest: ::fidl_next::EncodeRef<___E>,
{
#[inline]
fn encode_option_ref(
this: ::core::option::Option<&Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
if let Some(inner) = this {
::fidl_next::EncoderExt::encode_next(encoder, inner)?;
::fidl_next::WireBox::encode_present(out);
} else {
::fidl_next::WireBox::encode_absent(out);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireSuperFooRequest<'de>> for SuperFooRequest {
#[inline]
fn from_wire(wire: WireSuperFooRequest<'de>) -> Self {
Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
}
}
impl<'de> ::fidl_next::IntoNatural for WireSuperFooRequest<'de> {
type Natural = SuperFooRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireSuperFooRequest<'de>> for SuperFooRequest {
#[inline]
fn from_wire_ref(wire: &WireSuperFooRequest<'de>) -> Self {
Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
}
}
/// The wire type corresponding to [`SuperFooRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct WireSuperFooRequest<'de> {
pub s: ::fidl_next::WireString<'de>,
}
unsafe impl ::fidl_next::Wire for WireSuperFooRequest<'static> {
type Decoded<'de> = WireSuperFooRequest<'de>;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
s,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(s);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WireSuperFooRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut s,
} = slot_;
}
::fidl_next::Decode::decode(s.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct SuperFooResponse {
pub y: i64,
}
impl ::fidl_next::Encodable for SuperFooResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireSuperFooResponse> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireSuperFooResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for SuperFooResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let Self::Encoded {
y,
} = out_;
}
::fidl_next::Encode::encode(self.y, encoder_, y)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SuperFooResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
{
#[inline]
fn encode_ref(
&self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let Self::Encoded {
y,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.y, encoder_, y)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for SuperFooResponse {
type EncodedOption = ::fidl_next::WireBox<'static, WireSuperFooResponse>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E> for SuperFooResponse
where
___E: ::fidl_next::Encoder + ?Sized,
SuperFooResponse: ::fidl_next::Encode<___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
if let Some(inner) = this {
::fidl_next::EncoderExt::encode_next(encoder, inner)?;
::fidl_next::WireBox::encode_present(out);
} else {
::fidl_next::WireBox::encode_absent(out);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for SuperFooResponse
where
___E: ::fidl_next::Encoder + ?Sized,
SuperFooResponse: ::fidl_next::EncodeRef<___E>,
{
#[inline]
fn encode_option_ref(
this: ::core::option::Option<&Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
if let Some(inner) = this {
::fidl_next::EncoderExt::encode_next(encoder, inner)?;
::fidl_next::WireBox::encode_present(out);
} else {
::fidl_next::WireBox::encode_absent(out);
}
Ok(())
}
}
impl ::fidl_next::FromWire<WireSuperFooResponse> for SuperFooResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireSuperFooResponse, Self> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireSuperFooResponse) -> Self {
Self { y: ::fidl_next::FromWire::from_wire(wire.y) }
}
}
impl ::fidl_next::IntoNatural for WireSuperFooResponse {
type Natural = SuperFooResponse;
}
impl ::fidl_next::FromWireRef<WireSuperFooResponse> for SuperFooResponse {
#[inline]
fn from_wire_ref(wire: &WireSuperFooResponse) -> Self {
Self { y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y) }
}
}
/// The wire type corresponding to [`SuperFooResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireSuperFooResponse {
pub y: ::fidl_next::WireI64,
}
unsafe impl ::fidl_next::Wire for WireSuperFooResponse {
type Decoded<'de> = WireSuperFooResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
y,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(y);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WireSuperFooResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut y,
} = slot_;
}
::fidl_next::Decode::decode(y.as_mut(), decoder_)?;
Ok(())
}
}
/// The type corresponding to the super protocol.
#[derive(PartialEq, Debug)]
pub struct Super;
pub mod super_ {
pub mod prelude {
pub use crate::{Super, SuperClientHandler, SuperServerHandler, super_};
pub use crate::SuperFooRequest;
pub use crate::SuperFooResponse;
}
pub struct Foo;
impl ::fidl_next::Method for Foo {
const ORDINAL: u64 = 7540745593380780216;
type Protocol = crate::Super;
type Request = crate::WireSuperFooRequest<'static>;
type Response = crate::WireSuperFooResponse;
}
mod ___detail {
pub struct Foo<T0> {
s: T0,
}
impl<T0> ::fidl_next::Encodable for Foo<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
{
type Encoded = crate::WireSuperFooRequest<'static>;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Foo<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let Self::Encoded {
s,
} = out_;
}
::fidl_next::Encode::encode(self.s, encoder_, s)?;
Ok(())
}
}
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Super
where
___T: ::fidl_next::Transport,
{
type Client = SuperClient<___T>;
type Server = SuperServer<___T>;
}
/// The client for the `super` protocol.
#[repr(transparent)]
pub struct SuperClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> SuperClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn foo(
&self,
s: impl ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = ::fidl_next::WireString<'static>,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::Foo, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
{
self.foo_with(Foo { s })
}
pub fn foo_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::Foo, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = crate::WireSuperFooRequest<'static>,
>,
{
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7540745593380780216, request),
)
}
}
/// The server for the `super` protocol.
#[repr(transparent)]
pub struct SuperServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> SuperServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the super protocol.
///
/// See [`Super`] for more details.
pub trait SuperClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Super
where
___H: SuperClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<super_::Foo as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
client: &::fidl_next::Client<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => client.close(),
}
}
}
/// A server handler for the super protocol.
///
/// See [`Super`] for more details.
pub trait SuperServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn foo(
&mut self,
request: ::fidl_next::Request<super_::Foo, ___T>,
responder: ::fidl_next::Responder<super_::Foo, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Super
where
___H: SuperServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<super_::Foo as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => server.close(),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
7540745593380780216 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.foo(decoded, responder).await,
Err(e) => drop(responder),
}
}
ordinal => responder.server().close(),
}
}
}
/// The type corresponding to the sub protocol.
#[derive(PartialEq, Debug)]
pub struct Sub;
pub mod sub {
pub mod prelude {
pub use crate::{Sub, SubClientHandler, SubServerHandler, sub};
pub use crate::SuperFooRequest;
pub use crate::SuperFooResponse;
}
pub struct Foo;
impl ::fidl_next::Method for Foo {
const ORDINAL: u64 = 7540745593380780216;
type Protocol = crate::Sub;
type Request = crate::WireSuperFooRequest<'static>;
type Response = crate::WireSuperFooResponse;
}
mod ___detail {
pub struct Foo<T0> {
s: T0,
}
impl<T0> ::fidl_next::Encodable for Foo<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
{
type Encoded = crate::WireSuperFooRequest<'static>;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Foo<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let Self::Encoded {
s,
} = out_;
}
::fidl_next::Encode::encode(self.s, encoder_, s)?;
Ok(())
}
}
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Sub
where
___T: ::fidl_next::Transport,
{
type Client = SubClient<___T>;
type Server = SubServer<___T>;
}
/// The client for the `sub` protocol.
#[repr(transparent)]
pub struct SubClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> SubClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn foo(
&self,
s: impl ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = ::fidl_next::WireString<'static>,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::Foo, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
{
self.foo_with(Foo { s })
}
pub fn foo_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::Foo, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = crate::WireSuperFooRequest<'static>,
>,
{
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7540745593380780216, request),
)
}
}
/// The server for the `sub` protocol.
#[repr(transparent)]
pub struct SubServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> SubServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the sub protocol.
///
/// See [`Sub`] for more details.
pub trait SubClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Sub
where
___H: SubClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<sub::Foo as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
client: &::fidl_next::Client<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => client.close(),
}
}
}
/// A server handler for the sub protocol.
///
/// See [`Sub`] for more details.
pub trait SubServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn foo(
&mut self,
request: ::fidl_next::Request<sub::Foo, ___T>,
responder: ::fidl_next::Responder<sub::Foo, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Sub
where
___H: SubServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<sub::Foo as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => server.close(),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
7540745593380780216 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.foo(decoded, responder).await,
Err(e) => drop(responder),
}
}
ordinal => responder.server().close(),
}
}
}
/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
pub mod compat {
impl ::fidl_next::CompatFrom<crate::SuperFooRequest> for ::fidl_test_inheritance::SuperFooRequest {
#[inline]
fn compat_from(value: crate::SuperFooRequest) -> Self {
Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_inheritance::SuperFooRequest> for crate::SuperFooRequest {
#[inline]
fn compat_from(value: ::fidl_test_inheritance::SuperFooRequest) -> Self {
Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
}
}
impl ::fidl_next::CompatFrom<crate::SuperFooResponse>
for ::fidl_test_inheritance::SuperFooResponse
{
#[inline]
fn compat_from(value: crate::SuperFooResponse) -> Self {
Self { y: ::fidl_next::CompatFrom::compat_from(value.y) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_inheritance::SuperFooResponse>
for crate::SuperFooResponse
{
#[inline]
fn compat_from(value: ::fidl_test_inheritance::SuperFooResponse) -> Self {
Self { y: ::fidl_next::CompatFrom::compat_from(value.y) }
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `Super`
/// protocol.
pub type SuperProxy = ::fidl_next::Client<crate::Super>;
impl ::fidl_next::CompatFrom<crate::Super> for ::fidl_test_inheritance::Super_Marker {
fn compat_from(_: crate::Super) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_inheritance::Super_Marker> for crate::Super {
fn compat_from(_: ::fidl_test_inheritance::Super_Marker) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::ClientCompatFrom<::fidl_test_inheritance::Super_Proxy> for crate::Super {
fn client_compat_from(
proxy: ::fidl_test_inheritance::Super_Proxy,
) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
::fidl_next::ClientDispatcher::new(client_end)
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `Sub`
/// protocol.
pub type SubProxy = ::fidl_next::Client<crate::Sub>;
impl ::fidl_next::CompatFrom<crate::Sub> for ::fidl_test_inheritance::SubMarker {
fn compat_from(_: crate::Sub) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_inheritance::SubMarker> for crate::Sub {
fn compat_from(_: ::fidl_test_inheritance::SubMarker) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::ClientCompatFrom<::fidl_test_inheritance::SubProxy> for crate::Sub {
fn client_compat_from(
proxy: ::fidl_test_inheritance::SubProxy,
) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
::fidl_next::ClientDispatcher::new(client_end)
}
}
}