blob: 6bc841c53ab33171e164e65d304ee7be1ad37e6d [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)]
pub mod natural {
pub use fidl_next_common_test_protocols::natural::*;
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct ChannelProtocolTakeHandleRequest {
pub h: ::fidl_next::fuchsia::zx::Handle,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolTakeHandleRequest, ___E>
for ChannelProtocolTakeHandleRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::ChannelProtocolTakeHandleRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encode<
::fidl_next::fuchsia::WireHandle,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolTakeHandleRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ChannelProtocolTakeHandleRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::ChannelProtocolTakeHandleRequest>,
___E,
> for ChannelProtocolTakeHandleRequest
where
___E: ::fidl_next::Encoder + ?Sized,
ChannelProtocolTakeHandleRequest:
::fidl_next::Encode<crate::wire::ChannelProtocolTakeHandleRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::ChannelProtocolTakeHandleRequest>,
>,
_: (),
) -> ::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<crate::wire::ChannelProtocolTakeHandleRequest>
for ChannelProtocolTakeHandleRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::ChannelProtocolTakeHandleRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireHandle,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::ChannelProtocolTakeHandleRequest) -> Self {
Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct ChannelProtocolMutateSocketRequest {
pub a: ::fidl_next::fuchsia::zx::Socket,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMutateSocketRequest, ___E>
for ChannelProtocolMutateSocketRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::ChannelProtocolMutateSocketRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMutateSocketRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ChannelProtocolMutateSocketRequest {
a,
} = out_;
}
::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMutateSocketRequest>,
___E,
> for ChannelProtocolMutateSocketRequest
where
___E: ::fidl_next::Encoder + ?Sized,
ChannelProtocolMutateSocketRequest:
::fidl_next::Encode<crate::wire::ChannelProtocolMutateSocketRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMutateSocketRequest>,
>,
_: (),
) -> ::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<crate::wire::ChannelProtocolMutateSocketRequest>
for ChannelProtocolMutateSocketRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::ChannelProtocolMutateSocketRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireSocket,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::ChannelProtocolMutateSocketRequest) -> Self {
Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct ChannelProtocolMutateSocketResponse {
pub b: ::fidl_next::fuchsia::zx::Socket,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMutateSocketResponse, ___E>
for ChannelProtocolMutateSocketResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::ChannelProtocolMutateSocketResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMutateSocketResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ChannelProtocolMutateSocketResponse {
b,
} = out_;
}
::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMutateSocketResponse>,
___E,
> for ChannelProtocolMutateSocketResponse
where
___E: ::fidl_next::Encoder + ?Sized,
ChannelProtocolMutateSocketResponse:
::fidl_next::Encode<crate::wire::ChannelProtocolMutateSocketResponse, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMutateSocketResponse>,
>,
_: (),
) -> ::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<crate::wire::ChannelProtocolMutateSocketResponse>
for ChannelProtocolMutateSocketResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::ChannelProtocolMutateSocketResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireSocket,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::ChannelProtocolMutateSocketResponse) -> Self {
Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct HandleRightsProtocolNoResponseMethodRequest {
pub h: ::fidl_next::fuchsia::zx::Socket,
}
unsafe impl<___E>
::fidl_next::Encode<crate::wire::HandleRightsProtocolNoResponseMethodRequest, ___E>
for HandleRightsProtocolNoResponseMethodRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::HandleRightsProtocolNoResponseMethodRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::HandleRightsProtocolNoResponseMethodRequest,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolNoResponseMethodRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::HandleRightsProtocolNoResponseMethodRequest>,
___E,
> for HandleRightsProtocolNoResponseMethodRequest
where
___E: ::fidl_next::Encoder + ?Sized,
HandleRightsProtocolNoResponseMethodRequest:
::fidl_next::Encode<crate::wire::HandleRightsProtocolNoResponseMethodRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<
'static,
crate::wire::HandleRightsProtocolNoResponseMethodRequest,
>,
>,
_: (),
) -> ::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<crate::wire::HandleRightsProtocolNoResponseMethodRequest>
for HandleRightsProtocolNoResponseMethodRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::HandleRightsProtocolNoResponseMethodRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireSocket,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::HandleRightsProtocolNoResponseMethodRequest) -> Self {
Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct HandleRightsProtocolResponseMethodRequest {
pub h: ::fidl_next::fuchsia::zx::Socket,
}
unsafe impl<___E>
::fidl_next::Encode<crate::wire::HandleRightsProtocolResponseMethodRequest, ___E>
for HandleRightsProtocolResponseMethodRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::HandleRightsProtocolResponseMethodRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::HandleRightsProtocolResponseMethodRequest,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolResponseMethodRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::HandleRightsProtocolResponseMethodRequest>,
___E,
> for HandleRightsProtocolResponseMethodRequest
where
___E: ::fidl_next::Encoder + ?Sized,
HandleRightsProtocolResponseMethodRequest:
::fidl_next::Encode<crate::wire::HandleRightsProtocolResponseMethodRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<
'static,
crate::wire::HandleRightsProtocolResponseMethodRequest,
>,
>,
_: (),
) -> ::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<crate::wire::HandleRightsProtocolResponseMethodRequest>
for HandleRightsProtocolResponseMethodRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::HandleRightsProtocolResponseMethodRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireSocket,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::HandleRightsProtocolResponseMethodRequest) -> Self {
Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct HandleRightsProtocolResponseMethodResponse {
pub h: ::fidl_next::fuchsia::zx::Socket,
}
unsafe impl<___E>
::fidl_next::Encode<crate::wire::HandleRightsProtocolResponseMethodResponse, ___E>
for HandleRightsProtocolResponseMethodResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::HandleRightsProtocolResponseMethodResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::HandleRightsProtocolResponseMethodResponse,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolResponseMethodResponse {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::HandleRightsProtocolResponseMethodResponse>,
___E,
> for HandleRightsProtocolResponseMethodResponse
where
___E: ::fidl_next::Encoder + ?Sized,
HandleRightsProtocolResponseMethodResponse:
::fidl_next::Encode<crate::wire::HandleRightsProtocolResponseMethodResponse, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<
'static,
crate::wire::HandleRightsProtocolResponseMethodResponse,
>,
>,
_: (),
) -> ::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<crate::wire::HandleRightsProtocolResponseMethodResponse>
for HandleRightsProtocolResponseMethodResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::HandleRightsProtocolResponseMethodResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireSocket,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::HandleRightsProtocolResponseMethodResponse) -> Self {
Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct HandleRightsProtocolAnEventRequest {
pub h: ::fidl_next::fuchsia::zx::Socket,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::HandleRightsProtocolAnEventRequest, ___E>
for HandleRightsProtocolAnEventRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::HandleRightsProtocolAnEventRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::HandleRightsProtocolAnEventRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolAnEventRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::HandleRightsProtocolAnEventRequest>,
___E,
> for HandleRightsProtocolAnEventRequest
where
___E: ::fidl_next::Encoder + ?Sized,
HandleRightsProtocolAnEventRequest:
::fidl_next::Encode<crate::wire::HandleRightsProtocolAnEventRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::HandleRightsProtocolAnEventRequest>,
>,
_: (),
) -> ::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<crate::wire::HandleRightsProtocolAnEventRequest>
for HandleRightsProtocolAnEventRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::HandleRightsProtocolAnEventRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireSocket,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::HandleRightsProtocolAnEventRequest) -> Self {
Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct ProtocolEnds {
pub client:
::fidl_next::ClientEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
pub server:
::fidl_next::ServerEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
pub client_opt: ::core::option::Option<
::fidl_next::ClientEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
>,
pub server_opt: ::core::option::Option<
::fidl_next::ServerEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
>,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::ProtocolEnds, ___E> for ProtocolEnds
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ProtocolEnds> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled()
&& <::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled()
&& <::core::option::Option<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled()
&& <::core::option::Option<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolEnds>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ProtocolEnds {
client,
server,
client_opt,
server_opt,
} = out_;
}
::fidl_next::Encode::encode(self.client, encoder_, client, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client.as_mut_ptr()) };
::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server.as_mut_ptr()) };
::fidl_next::Encode::encode(self.client_opt, encoder_, client_opt, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_opt.as_mut_ptr()) };
::fidl_next::Encode::encode(self.server_opt, encoder_, server_opt, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_opt.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::ProtocolEnds>, ___E>
for ProtocolEnds
where
___E: ::fidl_next::Encoder + ?Sized,
ProtocolEnds: ::fidl_next::Encode<crate::wire::ProtocolEnds, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::ProtocolEnds>,
>,
_: (),
) -> ::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<crate::wire::ProtocolEnds> for ProtocolEnds {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ProtocolEnds, Self> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::FromWire<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled()
&& <::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::FromWire<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled()
&& <::core::option::Option<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::FromWire<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled()
&& <::core::option::Option<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::FromWire<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::ProtocolEnds) -> Self {
Self {
client: ::fidl_next::FromWire::from_wire(wire.client),
server: ::fidl_next::FromWire::from_wire(wire.server),
client_opt: ::fidl_next::FromWire::from_wire(wire.client_opt),
server_opt: ::fidl_next::FromWire::from_wire(wire.server_opt),
}
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithErrorSyntaxHandleInResultResponse {
pub h: ::fidl_next::fuchsia::zx::Handle,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::WithErrorSyntaxHandleInResultResponse, ___E>
for WithErrorSyntaxHandleInResultResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithErrorSyntaxHandleInResultResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encode<
::fidl_next::fuchsia::WireHandle,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithErrorSyntaxHandleInResultResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithErrorSyntaxHandleInResultResponse {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxHandleInResultResponse>,
___E,
> for WithErrorSyntaxHandleInResultResponse
where
___E: ::fidl_next::Encoder + ?Sized,
WithErrorSyntaxHandleInResultResponse:
::fidl_next::Encode<crate::wire::WithErrorSyntaxHandleInResultResponse, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxHandleInResultResponse>,
>,
_: (),
) -> ::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<crate::wire::WithErrorSyntaxHandleInResultResponse>
for WithErrorSyntaxHandleInResultResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithErrorSyntaxHandleInResultResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::FromWire<
::fidl_next::fuchsia::WireHandle,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithErrorSyntaxHandleInResultResponse) -> Self {
Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithProtocolEndsClientEndsRequest {
pub in_:
::fidl_next::ClientEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::WithProtocolEndsClientEndsRequest, ___E>
for WithProtocolEndsClientEndsRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithProtocolEndsClientEndsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsClientEndsRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsClientEndsRequest {
in_,
} = out_;
}
::fidl_next::Encode::encode(self.in_, encoder_, in_, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(in_.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsClientEndsRequest>,
___E,
> for WithProtocolEndsClientEndsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
WithProtocolEndsClientEndsRequest:
::fidl_next::Encode<crate::wire::WithProtocolEndsClientEndsRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsClientEndsRequest>,
>,
_: (),
) -> ::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<crate::wire::WithProtocolEndsClientEndsRequest>
for WithProtocolEndsClientEndsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithProtocolEndsClientEndsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::FromWire<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithProtocolEndsClientEndsRequest) -> Self {
Self { in_: ::fidl_next::FromWire::from_wire(wire.in_) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithProtocolEndsClientEndsResponse {
pub out: ::core::option::Option<
::fidl_next::ClientEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
>,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::WithProtocolEndsClientEndsResponse, ___E>
for WithProtocolEndsClientEndsResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithProtocolEndsClientEndsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::core::option::Option<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsClientEndsResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsClientEndsResponse {
out,
} = out_;
}
::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(out.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsClientEndsResponse>,
___E,
> for WithProtocolEndsClientEndsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
WithProtocolEndsClientEndsResponse:
::fidl_next::Encode<crate::wire::WithProtocolEndsClientEndsResponse, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsClientEndsResponse>,
>,
_: (),
) -> ::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<crate::wire::WithProtocolEndsClientEndsResponse>
for WithProtocolEndsClientEndsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithProtocolEndsClientEndsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::core::option::Option<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::FromWire<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithProtocolEndsClientEndsResponse) -> Self {
Self { out: ::fidl_next::FromWire::from_wire(wire.out) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithProtocolEndsServerEndsRequest {
pub in_: ::core::option::Option<
::fidl_next::ServerEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
>,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::WithProtocolEndsServerEndsRequest, ___E>
for WithProtocolEndsServerEndsRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithProtocolEndsServerEndsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::core::option::Option<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsServerEndsRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsServerEndsRequest {
in_,
} = out_;
}
::fidl_next::Encode::encode(self.in_, encoder_, in_, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(in_.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsServerEndsRequest>,
___E,
> for WithProtocolEndsServerEndsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
WithProtocolEndsServerEndsRequest:
::fidl_next::Encode<crate::wire::WithProtocolEndsServerEndsRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsServerEndsRequest>,
>,
_: (),
) -> ::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<crate::wire::WithProtocolEndsServerEndsRequest>
for WithProtocolEndsServerEndsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithProtocolEndsServerEndsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::core::option::Option<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
>,
> as ::fidl_next::FromWire<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithProtocolEndsServerEndsRequest) -> Self {
Self { in_: ::fidl_next::FromWire::from_wire(wire.in_) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithProtocolEndsServerEndsResponse {
pub out:
::fidl_next::ServerEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::zx::Channel>,
}
unsafe impl<___E> ::fidl_next::Encode<crate::wire::WithProtocolEndsServerEndsResponse, ___E>
for WithProtocolEndsServerEndsResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithProtocolEndsServerEndsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsServerEndsResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsServerEndsResponse {
out,
} = out_;
}
::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(out.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsServerEndsResponse>,
___E,
> for WithProtocolEndsServerEndsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
WithProtocolEndsServerEndsResponse:
::fidl_next::Encode<crate::wire::WithProtocolEndsServerEndsResponse, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsServerEndsResponse>,
>,
_: (),
) -> ::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<crate::wire::WithProtocolEndsServerEndsResponse>
for WithProtocolEndsServerEndsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithProtocolEndsServerEndsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::zx::Channel,
> as ::fidl_next::FromWire<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithProtocolEndsServerEndsResponse) -> Self {
Self { out: ::fidl_next::FromWire::from_wire(wire.out) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithProtocolEndsStructContainingEndsRequest {
pub in_: crate::natural::ProtocolEnds,
}
unsafe impl<___E>
::fidl_next::Encode<crate::wire::WithProtocolEndsStructContainingEndsRequest, ___E>
for WithProtocolEndsStructContainingEndsRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithProtocolEndsStructContainingEndsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <crate::natural::ProtocolEnds as ::fidl_next::Encode<
crate::wire::ProtocolEnds,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::WithProtocolEndsStructContainingEndsRequest,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsStructContainingEndsRequest {
in_,
} = out_;
}
::fidl_next::Encode::encode(self.in_, encoder_, in_, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(in_.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<'static, crate::wire::WithProtocolEndsStructContainingEndsRequest>,
___E,
> for WithProtocolEndsStructContainingEndsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
WithProtocolEndsStructContainingEndsRequest:
::fidl_next::Encode<crate::wire::WithProtocolEndsStructContainingEndsRequest, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<
'static,
crate::wire::WithProtocolEndsStructContainingEndsRequest,
>,
>,
_: (),
) -> ::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<crate::wire::WithProtocolEndsStructContainingEndsRequest>
for WithProtocolEndsStructContainingEndsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithProtocolEndsStructContainingEndsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <crate::natural::ProtocolEnds as ::fidl_next::FromWire<
crate::wire::ProtocolEnds,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithProtocolEndsStructContainingEndsRequest) -> Self {
Self { in_: ::fidl_next::FromWire::from_wire(wire.in_) }
}
}
#[derive(PartialEq, Debug)]
#[repr(C)]
pub struct WithProtocolEndsStructContainingEndsResponse {
pub out: crate::natural::ProtocolEnds,
}
unsafe impl<___E>
::fidl_next::Encode<crate::wire::WithProtocolEndsStructContainingEndsResponse, ___E>
for WithProtocolEndsStructContainingEndsResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
crate::wire::WithProtocolEndsStructContainingEndsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <crate::natural::ProtocolEnds as ::fidl_next::Encode<
crate::wire::ProtocolEnds,
___E,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::WithProtocolEndsStructContainingEndsResponse,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsStructContainingEndsResponse {
out,
} = out_;
}
::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(out.as_mut_ptr()) };
Ok(())
}
}
unsafe impl<___E>
::fidl_next::EncodeOption<
::fidl_next::WireBox<
'static,
crate::wire::WithProtocolEndsStructContainingEndsResponse,
>,
___E,
> for WithProtocolEndsStructContainingEndsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
WithProtocolEndsStructContainingEndsResponse:
::fidl_next::Encode<crate::wire::WithProtocolEndsStructContainingEndsResponse, ___E>,
{
#[inline]
fn encode_option(
this: ::core::option::Option<Self>,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<
::fidl_next::WireBox<
'static,
crate::wire::WithProtocolEndsStructContainingEndsResponse,
>,
>,
_: (),
) -> ::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<crate::wire::WithProtocolEndsStructContainingEndsResponse>
for WithProtocolEndsStructContainingEndsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
crate::wire::WithProtocolEndsStructContainingEndsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <crate::natural::ProtocolEnds as ::fidl_next::FromWire<
crate::wire::ProtocolEnds,
>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: crate::wire::WithProtocolEndsStructContainingEndsResponse) -> Self {
Self { out: ::fidl_next::FromWire::from_wire(wire.out) }
}
}
}
pub mod wire {
pub use fidl_next_common_test_protocols::wire::*;
/// The wire type corresponding to [`ChannelProtocolTakeHandleRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct ChannelProtocolTakeHandleRequest {
pub h: ::fidl_next::fuchsia::WireHandle,
}
static_assertions::const_assert_eq!(std::mem::size_of::<ChannelProtocolTakeHandleRequest>(), 4);
static_assertions::const_assert_eq!(
std::mem::align_of::<ChannelProtocolTakeHandleRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(ChannelProtocolTakeHandleRequest, h),
0
);
unsafe impl ::fidl_next::Wire for ChannelProtocolTakeHandleRequest {
type Owned<'de> = ChannelProtocolTakeHandleRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
h,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(h);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolTakeHandleRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut h,
} = slot_;
}
let _field = h.as_mut();
::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for ChannelProtocolTakeHandleRequest {
type Natural = crate::natural::ChannelProtocolTakeHandleRequest;
}
impl ::fidl_next::Unconstrained for ChannelProtocolTakeHandleRequest {}
/// The wire type corresponding to [`ChannelProtocolMutateSocketRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct ChannelProtocolMutateSocketRequest {
pub a: ::fidl_next::fuchsia::WireSocket,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<ChannelProtocolMutateSocketRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<ChannelProtocolMutateSocketRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(ChannelProtocolMutateSocketRequest, a),
0
);
unsafe impl ::fidl_next::Wire for ChannelProtocolMutateSocketRequest {
type Owned<'de> = ChannelProtocolMutateSocketRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
a,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(a);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolMutateSocketRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut a,
} = slot_;
}
let _field = a.as_mut();
::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for ChannelProtocolMutateSocketRequest {
type Natural = crate::natural::ChannelProtocolMutateSocketRequest;
}
impl ::fidl_next::Unconstrained for ChannelProtocolMutateSocketRequest {}
/// The wire type corresponding to [`ChannelProtocolMutateSocketResponse`].
#[derive(Debug)]
#[repr(C)]
pub struct ChannelProtocolMutateSocketResponse {
pub b: ::fidl_next::fuchsia::WireSocket,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<ChannelProtocolMutateSocketResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<ChannelProtocolMutateSocketResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(ChannelProtocolMutateSocketResponse, b),
0
);
unsafe impl ::fidl_next::Wire for ChannelProtocolMutateSocketResponse {
type Owned<'de> = ChannelProtocolMutateSocketResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
b,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(b);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolMutateSocketResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut b,
} = slot_;
}
let _field = b.as_mut();
::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for ChannelProtocolMutateSocketResponse {
type Natural = crate::natural::ChannelProtocolMutateSocketResponse;
}
impl ::fidl_next::Unconstrained for ChannelProtocolMutateSocketResponse {}
/// The wire type corresponding to [`HandleRightsProtocolNoResponseMethodRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct HandleRightsProtocolNoResponseMethodRequest {
pub h: ::fidl_next::fuchsia::WireSocket,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<HandleRightsProtocolNoResponseMethodRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<HandleRightsProtocolNoResponseMethodRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(HandleRightsProtocolNoResponseMethodRequest, h),
0
);
unsafe impl ::fidl_next::Wire for HandleRightsProtocolNoResponseMethodRequest {
type Owned<'de> = HandleRightsProtocolNoResponseMethodRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
h,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(h);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for HandleRightsProtocolNoResponseMethodRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut h,
} = slot_;
}
let _field = h.as_mut();
::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for HandleRightsProtocolNoResponseMethodRequest {
type Natural = crate::natural::HandleRightsProtocolNoResponseMethodRequest;
}
impl ::fidl_next::Unconstrained for HandleRightsProtocolNoResponseMethodRequest {}
/// The wire type corresponding to [`HandleRightsProtocolResponseMethodRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct HandleRightsProtocolResponseMethodRequest {
pub h: ::fidl_next::fuchsia::WireSocket,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<HandleRightsProtocolResponseMethodRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<HandleRightsProtocolResponseMethodRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(HandleRightsProtocolResponseMethodRequest, h),
0
);
unsafe impl ::fidl_next::Wire for HandleRightsProtocolResponseMethodRequest {
type Owned<'de> = HandleRightsProtocolResponseMethodRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
h,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(h);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for HandleRightsProtocolResponseMethodRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut h,
} = slot_;
}
let _field = h.as_mut();
::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for HandleRightsProtocolResponseMethodRequest {
type Natural = crate::natural::HandleRightsProtocolResponseMethodRequest;
}
impl ::fidl_next::Unconstrained for HandleRightsProtocolResponseMethodRequest {}
/// The wire type corresponding to [`HandleRightsProtocolResponseMethodResponse`].
#[derive(Debug)]
#[repr(C)]
pub struct HandleRightsProtocolResponseMethodResponse {
pub h: ::fidl_next::fuchsia::WireSocket,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<HandleRightsProtocolResponseMethodResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<HandleRightsProtocolResponseMethodResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(HandleRightsProtocolResponseMethodResponse, h),
0
);
unsafe impl ::fidl_next::Wire for HandleRightsProtocolResponseMethodResponse {
type Owned<'de> = HandleRightsProtocolResponseMethodResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
h,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(h);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for HandleRightsProtocolResponseMethodResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut h,
} = slot_;
}
let _field = h.as_mut();
::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for HandleRightsProtocolResponseMethodResponse {
type Natural = crate::natural::HandleRightsProtocolResponseMethodResponse;
}
impl ::fidl_next::Unconstrained for HandleRightsProtocolResponseMethodResponse {}
/// The wire type corresponding to [`HandleRightsProtocolAnEventRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct HandleRightsProtocolAnEventRequest {
pub h: ::fidl_next::fuchsia::WireSocket,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<HandleRightsProtocolAnEventRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<HandleRightsProtocolAnEventRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(HandleRightsProtocolAnEventRequest, h),
0
);
unsafe impl ::fidl_next::Wire for HandleRightsProtocolAnEventRequest {
type Owned<'de> = HandleRightsProtocolAnEventRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
h,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(h);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for HandleRightsProtocolAnEventRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut h,
} = slot_;
}
let _field = h.as_mut();
::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for HandleRightsProtocolAnEventRequest {
type Natural = crate::natural::HandleRightsProtocolAnEventRequest;
}
impl ::fidl_next::Unconstrained for HandleRightsProtocolAnEventRequest {}
/// The wire type corresponding to [`ProtocolEnds`].
#[derive(Debug)]
#[repr(C)]
pub struct ProtocolEnds {
pub client:
::fidl_next::ClientEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::WireChannel>,
pub server:
::fidl_next::ServerEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::WireChannel>,
pub client_opt: ::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
pub server_opt: ::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
}
static_assertions::const_assert_eq!(std::mem::size_of::<ProtocolEnds>(), 16);
static_assertions::const_assert_eq!(std::mem::align_of::<ProtocolEnds>(), 4);
static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolEnds, client), 0);
static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolEnds, server), 4);
static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolEnds, client_opt), 8);
static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolEnds, server_opt), 12);
unsafe impl ::fidl_next::Wire for ProtocolEnds {
type Owned<'de> = ProtocolEnds;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
client,
server,
client_opt,
server_opt,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(client);
::fidl_next::Wire::zero_padding(server);
::fidl_next::Wire::zero_padding(client_opt);
::fidl_next::Wire::zero_padding(server_opt);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for ProtocolEnds
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut client,
mut server,
mut client_opt,
mut server_opt,
} = slot_;
}
let _field = client.as_mut();
::fidl_next::Decode::decode(client.as_mut(), decoder_, ())?;
let _field = server.as_mut();
::fidl_next::Decode::decode(server.as_mut(), decoder_, ())?;
let _field = client_opt.as_mut();
::fidl_next::Decode::decode(client_opt.as_mut(), decoder_, ())?;
let _field = server_opt.as_mut();
::fidl_next::Decode::decode(server_opt.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for ProtocolEnds {
type Natural = crate::natural::ProtocolEnds;
}
impl ::fidl_next::Unconstrained for ProtocolEnds {}
/// The wire type corresponding to [`WithErrorSyntaxHandleInResultResponse`].
#[derive(Debug)]
#[repr(C)]
pub struct WithErrorSyntaxHandleInResultResponse {
pub h: ::fidl_next::fuchsia::WireHandle,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithErrorSyntaxHandleInResultResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithErrorSyntaxHandleInResultResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithErrorSyntaxHandleInResultResponse, h),
0
);
unsafe impl ::fidl_next::Wire for WithErrorSyntaxHandleInResultResponse {
type Owned<'de> = WithErrorSyntaxHandleInResultResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
h,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(h);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithErrorSyntaxHandleInResultResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut h,
} = slot_;
}
let _field = h.as_mut();
::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithErrorSyntaxHandleInResultResponse {
type Natural = crate::natural::WithErrorSyntaxHandleInResultResponse;
}
impl ::fidl_next::Unconstrained for WithErrorSyntaxHandleInResultResponse {}
/// The wire type corresponding to [`WithProtocolEndsClientEndsRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct WithProtocolEndsClientEndsRequest {
pub in_:
::fidl_next::ClientEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::WireChannel>,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithProtocolEndsClientEndsRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithProtocolEndsClientEndsRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithProtocolEndsClientEndsRequest, in_),
0
);
unsafe impl ::fidl_next::Wire for WithProtocolEndsClientEndsRequest {
type Owned<'de> = WithProtocolEndsClientEndsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
in_,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(in_);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithProtocolEndsClientEndsRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut in_,
} = slot_;
}
let _field = in_.as_mut();
::fidl_next::Decode::decode(in_.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithProtocolEndsClientEndsRequest {
type Natural = crate::natural::WithProtocolEndsClientEndsRequest;
}
impl ::fidl_next::Unconstrained for WithProtocolEndsClientEndsRequest {}
/// The wire type corresponding to [`WithProtocolEndsClientEndsResponse`].
#[derive(Debug)]
#[repr(C)]
pub struct WithProtocolEndsClientEndsResponse {
pub out: ::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithProtocolEndsClientEndsResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithProtocolEndsClientEndsResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithProtocolEndsClientEndsResponse, out),
0
);
unsafe impl ::fidl_next::Wire for WithProtocolEndsClientEndsResponse {
type Owned<'de> = WithProtocolEndsClientEndsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
out,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(out);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithProtocolEndsClientEndsResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut out,
} = slot_;
}
let _field = out.as_mut();
::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithProtocolEndsClientEndsResponse {
type Natural = crate::natural::WithProtocolEndsClientEndsResponse;
}
impl ::fidl_next::Unconstrained for WithProtocolEndsClientEndsResponse {}
/// The wire type corresponding to [`WithProtocolEndsServerEndsRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct WithProtocolEndsServerEndsRequest {
pub in_: ::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithProtocolEndsServerEndsRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithProtocolEndsServerEndsRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithProtocolEndsServerEndsRequest, in_),
0
);
unsafe impl ::fidl_next::Wire for WithProtocolEndsServerEndsRequest {
type Owned<'de> = WithProtocolEndsServerEndsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
in_,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(in_);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithProtocolEndsServerEndsRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut in_,
} = slot_;
}
let _field = in_.as_mut();
::fidl_next::Decode::decode(in_.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithProtocolEndsServerEndsRequest {
type Natural = crate::natural::WithProtocolEndsServerEndsRequest;
}
impl ::fidl_next::Unconstrained for WithProtocolEndsServerEndsRequest {}
/// The wire type corresponding to [`WithProtocolEndsServerEndsResponse`].
#[derive(Debug)]
#[repr(C)]
pub struct WithProtocolEndsServerEndsResponse {
pub out:
::fidl_next::ServerEnd<crate::DiscoverableProtocol, ::fidl_next::fuchsia::WireChannel>,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithProtocolEndsServerEndsResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithProtocolEndsServerEndsResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithProtocolEndsServerEndsResponse, out),
0
);
unsafe impl ::fidl_next::Wire for WithProtocolEndsServerEndsResponse {
type Owned<'de> = WithProtocolEndsServerEndsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
out,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(out);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithProtocolEndsServerEndsResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut out,
} = slot_;
}
let _field = out.as_mut();
::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithProtocolEndsServerEndsResponse {
type Natural = crate::natural::WithProtocolEndsServerEndsResponse;
}
impl ::fidl_next::Unconstrained for WithProtocolEndsServerEndsResponse {}
/// The wire type corresponding to [`WithProtocolEndsStructContainingEndsRequest`].
#[derive(Debug)]
#[repr(C)]
pub struct WithProtocolEndsStructContainingEndsRequest {
pub in_: crate::wire::ProtocolEnds,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithProtocolEndsStructContainingEndsRequest>(),
16
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithProtocolEndsStructContainingEndsRequest>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithProtocolEndsStructContainingEndsRequest, in_),
0
);
unsafe impl ::fidl_next::Wire for WithProtocolEndsStructContainingEndsRequest {
type Owned<'de> = WithProtocolEndsStructContainingEndsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
in_,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(in_);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithProtocolEndsStructContainingEndsRequest
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut in_,
} = slot_;
}
let _field = in_.as_mut();
::fidl_next::Decode::decode(in_.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithProtocolEndsStructContainingEndsRequest {
type Natural = crate::natural::WithProtocolEndsStructContainingEndsRequest;
}
impl ::fidl_next::Unconstrained for WithProtocolEndsStructContainingEndsRequest {}
/// The wire type corresponding to [`WithProtocolEndsStructContainingEndsResponse`].
#[derive(Debug)]
#[repr(C)]
pub struct WithProtocolEndsStructContainingEndsResponse {
pub out: crate::wire::ProtocolEnds,
}
static_assertions::const_assert_eq!(
std::mem::size_of::<WithProtocolEndsStructContainingEndsResponse>(),
16
);
static_assertions::const_assert_eq!(
std::mem::align_of::<WithProtocolEndsStructContainingEndsResponse>(),
4
);
static_assertions::const_assert_eq!(
std::mem::offset_of!(WithProtocolEndsStructContainingEndsResponse, out),
0
);
unsafe impl ::fidl_next::Wire for WithProtocolEndsStructContainingEndsResponse {
type Owned<'de> = WithProtocolEndsStructContainingEndsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
out,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(out);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D> for WithProtocolEndsStructContainingEndsResponse
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::fuchsia::HandleDecoder,
{
fn decode(
slot_: ::fidl_next::Slot<'_, Self>,
decoder_: &mut ___D,
_: (),
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge! {
let Self {
mut out,
} = slot_;
}
let _field = out.as_mut();
::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
Ok(())
}
}
impl ::fidl_next::IntoNatural for WithProtocolEndsStructContainingEndsResponse {
type Natural = crate::natural::WithProtocolEndsStructContainingEndsResponse;
}
impl ::fidl_next::Unconstrained for WithProtocolEndsStructContainingEndsResponse {}
}
pub mod wire_optional {
pub use fidl_next_common_test_protocols::wire_optional::*;
}
pub mod generic {
pub use fidl_next_common_test_protocols::generic::*;
pub struct ChannelProtocolTakeHandleRequest<T0> {
pub h: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ChannelProtocolTakeHandleRequest, ___E>
for ChannelProtocolTakeHandleRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireHandle, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolTakeHandleRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ChannelProtocolTakeHandleRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
Ok(())
}
}
pub struct ChannelProtocolMutateSocketRequest<T0> {
pub a: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ChannelProtocolMutateSocketRequest, ___E>
for ChannelProtocolMutateSocketRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireSocket, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMutateSocketRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ChannelProtocolMutateSocketRequest {
a,
} = out_;
}
::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
Ok(())
}
}
pub struct ChannelProtocolMutateSocketResponse<T0> {
pub b: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::ChannelProtocolMutateSocketResponse, ___E>
for ChannelProtocolMutateSocketResponse<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireSocket, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMutateSocketResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ChannelProtocolMutateSocketResponse {
b,
} = out_;
}
::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
Ok(())
}
}
pub struct HandleRightsProtocolNoResponseMethodRequest<T0> {
pub h: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::HandleRightsProtocolNoResponseMethodRequest, ___E>
for HandleRightsProtocolNoResponseMethodRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireSocket, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::HandleRightsProtocolNoResponseMethodRequest,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolNoResponseMethodRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
Ok(())
}
}
pub struct HandleRightsProtocolResponseMethodRequest<T0> {
pub h: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::HandleRightsProtocolResponseMethodRequest, ___E>
for HandleRightsProtocolResponseMethodRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireSocket, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::HandleRightsProtocolResponseMethodRequest,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolResponseMethodRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
Ok(())
}
}
pub struct HandleRightsProtocolResponseMethodResponse<T0> {
pub h: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::HandleRightsProtocolResponseMethodResponse, ___E>
for HandleRightsProtocolResponseMethodResponse<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireSocket, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::HandleRightsProtocolResponseMethodResponse,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolResponseMethodResponse {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
Ok(())
}
}
pub struct HandleRightsProtocolAnEventRequest<T0> {
pub h: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::HandleRightsProtocolAnEventRequest, ___E>
for HandleRightsProtocolAnEventRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireSocket, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::HandleRightsProtocolAnEventRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::HandleRightsProtocolAnEventRequest {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
Ok(())
}
}
pub struct ProtocolEnds<T0, T1, T2, T3> {
pub client: T0,
pub server: T1,
pub client_opt: T2,
pub server_opt: T3,
}
unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::ProtocolEnds, ___E>
for ProtocolEnds<T0, T1, T2, T3>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>,
T1: ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>,
T2: ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>,
T3: ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolEnds>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::ProtocolEnds {
client,
server,
client_opt,
server_opt,
} = out_;
}
::fidl_next::Encode::encode(self.client, encoder_, client, ())?;
::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
::fidl_next::Encode::encode(self.client_opt, encoder_, client_opt, ())?;
::fidl_next::Encode::encode(self.server_opt, encoder_, server_opt, ())?;
Ok(())
}
}
pub struct WithErrorSyntaxHandleInResultResponse<T0> {
pub h: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::WithErrorSyntaxHandleInResultResponse, ___E>
for WithErrorSyntaxHandleInResultResponse<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireHandle, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithErrorSyntaxHandleInResultResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithErrorSyntaxHandleInResultResponse {
h,
} = out_;
}
::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
Ok(())
}
}
pub struct WithProtocolEndsClientEndsRequest<T0> {
pub in_: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WithProtocolEndsClientEndsRequest, ___E>
for WithProtocolEndsClientEndsRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsClientEndsRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsClientEndsRequest {
in_,
} = out_;
}
::fidl_next::Encode::encode(self.in_, encoder_, in_, ())?;
Ok(())
}
}
pub struct WithProtocolEndsClientEndsResponse<T0> {
pub out: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WithProtocolEndsClientEndsResponse, ___E>
for WithProtocolEndsClientEndsResponse<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsClientEndsResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsClientEndsResponse {
out,
} = out_;
}
::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
Ok(())
}
}
pub struct WithProtocolEndsServerEndsRequest<T0> {
pub in_: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WithProtocolEndsServerEndsRequest, ___E>
for WithProtocolEndsServerEndsRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
___E,
>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsServerEndsRequest>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsServerEndsRequest {
in_,
} = out_;
}
::fidl_next::Encode::encode(self.in_, encoder_, in_, ())?;
Ok(())
}
}
pub struct WithProtocolEndsServerEndsResponse<T0> {
pub out: T0,
}
unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WithProtocolEndsServerEndsResponse, ___E>
for WithProtocolEndsServerEndsResponse<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
___E,
>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<crate::wire::WithProtocolEndsServerEndsResponse>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsServerEndsResponse {
out,
} = out_;
}
::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
Ok(())
}
}
pub struct WithProtocolEndsStructContainingEndsRequest<T0> {
pub in_: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::WithProtocolEndsStructContainingEndsRequest, ___E>
for WithProtocolEndsStructContainingEndsRequest<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<crate::wire::ProtocolEnds, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::WithProtocolEndsStructContainingEndsRequest,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsStructContainingEndsRequest {
in_,
} = out_;
}
::fidl_next::Encode::encode(self.in_, encoder_, in_, ())?;
Ok(())
}
}
pub struct WithProtocolEndsStructContainingEndsResponse<T0> {
pub out: T0,
}
unsafe impl<___E, T0>
::fidl_next::Encode<crate::wire::WithProtocolEndsStructContainingEndsResponse, ___E>
for WithProtocolEndsStructContainingEndsResponse<T0>
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::fuchsia::HandleEncoder,
T0: ::fidl_next::Encode<crate::wire::ProtocolEnds, ___E>,
{
#[inline]
fn encode(
self,
encoder_: &mut ___E,
out_: &mut ::core::mem::MaybeUninit<
crate::wire::WithProtocolEndsStructContainingEndsResponse,
>,
_: (),
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge! {
let crate::wire::WithProtocolEndsStructContainingEndsResponse {
out,
} = out_;
}
::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
Ok(())
}
}
}
pub use self::natural::*;
/// The type corresponding to the ChannelProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct ChannelProtocol;
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::HasTransport for ChannelProtocol {
type Transport = ::fidl_next::fuchsia::zx::Channel;
}
pub mod channel_protocol {
pub mod prelude {
pub use crate::{
ChannelProtocol, ChannelProtocolClientHandler, ChannelProtocolServerHandler,
channel_protocol,
};
pub use crate::natural::ChannelProtocolEventARequest;
pub use crate::natural::ChannelProtocolMethodARequest;
pub use crate::natural::ChannelProtocolMethodBRequest;
pub use crate::natural::ChannelProtocolMethodBResponse;
pub use crate::natural::ChannelProtocolMutateSocketRequest;
pub use crate::natural::ChannelProtocolMutateSocketResponse;
pub use crate::natural::ChannelProtocolTakeHandleRequest;
}
pub struct MethodA;
impl ::fidl_next::Method for MethodA {
const ORDINAL: u64 = 3155008840945527714;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::ChannelProtocol;
type Request = crate::wire::ChannelProtocolMethodARequest;
}
pub struct EventA;
impl ::fidl_next::Method for EventA {
const ORDINAL: u64 = 2220452875311597006;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::ChannelProtocol;
type Request = crate::wire::ChannelProtocolEventARequest;
}
pub struct MethodB;
impl ::fidl_next::Method for MethodB {
const ORDINAL: u64 = 8903004957800778182;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::ChannelProtocol;
type Request = crate::wire::ChannelProtocolMethodBRequest;
}
impl ::fidl_next::TwoWayMethod for MethodB {
type Response = crate::wire::ChannelProtocolMethodBResponse;
}
impl<___R> ::fidl_next::Respond<___R> for MethodB {
type Output = crate::generic::ChannelProtocolMethodBResponse<___R>;
fn respond(response: ___R) -> Self::Output {
crate::generic::ChannelProtocolMethodBResponse { result: response }
}
}
pub struct TakeHandle;
impl ::fidl_next::Method for TakeHandle {
const ORDINAL: u64 = 591935489944717925;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::ChannelProtocol;
type Request = crate::wire::ChannelProtocolTakeHandleRequest;
}
impl ::fidl_next::TwoWayMethod for TakeHandle {
type Response = ();
}
impl<___R> ::fidl_next::Respond<___R> for TakeHandle {
type Output = ___R;
fn respond(response: ___R) -> Self::Output {
response
}
}
pub struct MutateSocket;
impl ::fidl_next::Method for MutateSocket {
const ORDINAL: u64 = 7411742788430590287;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::ChannelProtocol;
type Request = crate::wire::ChannelProtocolMutateSocketRequest;
}
impl ::fidl_next::TwoWayMethod for MutateSocket {
type Response = crate::wire::ChannelProtocolMutateSocketResponse;
}
impl<___R> ::fidl_next::Respond<___R> for MutateSocket {
type Output = crate::generic::ChannelProtocolMutateSocketResponse<___R>;
fn respond(response: ___R) -> Self::Output {
crate::generic::ChannelProtocolMutateSocketResponse { b: response }
}
}
mod ___detail {
unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ChannelProtocol
where
___T: ::fidl_next::Transport,
{
type Client = ChannelProtocolClient<___T>;
type Server = ChannelProtocolServer<___T>;
}
/// The client for the `ChannelProtocol` protocol.
#[repr(transparent)]
pub struct ChannelProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> ChannelProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn method_a(
&self,
a: impl ::fidl_next::Encode<
::fidl_next::WireI64,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
b: impl ::fidl_next::Encode<
::fidl_next::WireI64,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::SendFuture<'_, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
{
self.method_a_with(crate::generic::ChannelProtocolMethodARequest { a, b })
}
pub fn method_a_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::ChannelProtocolMethodARequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3155008840945527714,
<super::MethodA as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
pub fn method_b(
&self,
a: impl ::fidl_next::Encode<
::fidl_next::WireI64,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
b: impl ::fidl_next::Encode<
::fidl_next::WireI64,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::MethodB, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
{
self.method_b_with(crate::generic::ChannelProtocolMethodBRequest { a, b })
}
pub fn method_b_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::MethodB, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::ChannelProtocolMethodBRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8903004957800778182,
<super::MethodB as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
pub fn take_handle(
&self,
h: impl ::fidl_next::Encode<
::fidl_next::fuchsia::WireHandle,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::TakeHandle, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.take_handle_with(crate::generic::ChannelProtocolTakeHandleRequest { h })
}
pub fn take_handle_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::TakeHandle, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::ChannelProtocolTakeHandleRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
591935489944717925,
<super::TakeHandle as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
pub fn mutate_socket(
&self,
a: impl ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::MutateSocket, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.mutate_socket_with(crate::generic::ChannelProtocolMutateSocketRequest { a })
}
pub fn mutate_socket_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::MutateSocket, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::ChannelProtocolMutateSocketRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7411742788430590287,
<super::MutateSocket as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
}
/// The server for the `ChannelProtocol` protocol.
#[repr(transparent)]
pub struct ChannelProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> ChannelProtocolServer<___T>
where
___T: ::fidl_next::Transport,
{
pub fn event_a(
&self,
a: impl ::fidl_next::Encode<
::fidl_next::WireI64,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
b: impl ::fidl_next::Encode<
::fidl_next::WireI64,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::SendFuture<'_, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
{
self.event_a_with(crate::generic::ChannelProtocolEventARequest { a, b })
}
pub fn event_a_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<super::EventA as ::fidl_next::Method>::Request,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::SendFuture::from_untyped(self.server.send_event(
2220452875311597006,
<super::EventA as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
}
}
}
/// A client handler for the ChannelProtocol protocol.
///
/// See [`ChannelProtocol`] for more details.
pub trait ChannelProtocolClientHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
fn event_a(
&mut self,
request: ::fidl_next::Request<channel_protocol::EventA, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___T> ChannelProtocolClientHandler<___T> for ::fidl_next::IgnoreEvents
where
___T: ::fidl_next::Transport,
{
async fn event_a(&mut self, _: ::fidl_next::Request<channel_protocol::EventA, ___T>) {}
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ChannelProtocol
where
___H: ChannelProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<channel_protocol::EventA as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
match ordinal {
2220452875311597006 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler.event_a(::fidl_next::Request::from_decoded(decoded)).await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 2220452875311597006,
error,
}),
},
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// A server handler for the ChannelProtocol protocol.
///
/// See [`ChannelProtocol`] for more details.
pub trait ChannelProtocolServerHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
fn method_a(
&mut self,
request: ::fidl_next::Request<channel_protocol::MethodA, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn method_b(
&mut self,
request: ::fidl_next::Request<channel_protocol::MethodB, ___T>,
responder: ::fidl_next::Responder<channel_protocol::MethodB, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn take_handle(
&mut self,
request: ::fidl_next::Request<channel_protocol::TakeHandle, ___T>,
responder: ::fidl_next::Responder<channel_protocol::TakeHandle, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn mutate_socket(
&mut self,
request: ::fidl_next::Request<channel_protocol::MutateSocket, ___T>,
responder: ::fidl_next::Responder<channel_protocol::MutateSocket, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ChannelProtocol
where
___H: ChannelProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<channel_protocol::MethodA as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<channel_protocol::MethodB as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<channel_protocol::TakeHandle as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<channel_protocol::MutateSocket as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_one_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
3155008840945527714 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler.method_a(::fidl_next::Request::from_decoded(decoded)).await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 3155008840945527714,
error,
}),
},
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
8903004957800778182 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.method_b(::fidl_next::Request::from_decoded(decoded), responder)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 8903004957800778182,
error,
}),
}
}
591935489944717925 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.take_handle(::fidl_next::Request::from_decoded(decoded), responder)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 591935489944717925,
error,
}),
}
}
7411742788430590287 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.mutate_socket(::fidl_next::Request::from_decoded(decoded), responder)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 7411742788430590287,
error,
}),
}
}
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// The type corresponding to the HandleRightsProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct HandleRightsProtocol;
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::HasTransport for HandleRightsProtocol {
type Transport = ::fidl_next::fuchsia::zx::Channel;
}
pub mod handle_rights_protocol {
pub mod prelude {
pub use crate::{
HandleRightsProtocol, HandleRightsProtocolClientHandler,
HandleRightsProtocolServerHandler, handle_rights_protocol,
};
pub use crate::natural::HandleRightsProtocolAnEventRequest;
pub use crate::natural::HandleRightsProtocolNoResponseMethodRequest;
pub use crate::natural::HandleRightsProtocolResponseMethodRequest;
pub use crate::natural::HandleRightsProtocolResponseMethodResponse;
}
pub struct NoResponseMethod;
impl ::fidl_next::Method for NoResponseMethod {
const ORDINAL: u64 = 1155044649514904573;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::HandleRightsProtocol;
type Request = crate::wire::HandleRightsProtocolNoResponseMethodRequest;
}
pub struct ResponseMethod;
impl ::fidl_next::Method for ResponseMethod {
const ORDINAL: u64 = 5956276128041940295;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::HandleRightsProtocol;
type Request = crate::wire::HandleRightsProtocolResponseMethodRequest;
}
impl ::fidl_next::TwoWayMethod for ResponseMethod {
type Response = crate::wire::HandleRightsProtocolResponseMethodResponse;
}
impl<___R> ::fidl_next::Respond<___R> for ResponseMethod {
type Output = crate::generic::HandleRightsProtocolResponseMethodResponse<___R>;
fn respond(response: ___R) -> Self::Output {
crate::generic::HandleRightsProtocolResponseMethodResponse { h: response }
}
}
pub struct AnEvent;
impl ::fidl_next::Method for AnEvent {
const ORDINAL: u64 = 476727631355490611;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::HandleRightsProtocol;
type Request = crate::wire::HandleRightsProtocolAnEventRequest;
}
mod ___detail {
unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::HandleRightsProtocol
where
___T: ::fidl_next::Transport,
{
type Client = HandleRightsProtocolClient<___T>;
type Server = HandleRightsProtocolServer<___T>;
}
/// The client for the `HandleRightsProtocol` protocol.
#[repr(transparent)]
pub struct HandleRightsProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> HandleRightsProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn no_response_method(
&self,
h: impl ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::SendFuture<'_, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.no_response_method_with(
crate::generic::HandleRightsProtocolNoResponseMethodRequest { h },
)
}
pub fn no_response_method_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::HandleRightsProtocolNoResponseMethodRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
1155044649514904573,
<super::NoResponseMethod as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
pub fn response_method(
&self,
h: impl ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::ResponseMethod, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.response_method_with(
crate::generic::HandleRightsProtocolResponseMethodRequest { h },
)
}
pub fn response_method_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::ResponseMethod, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::HandleRightsProtocolResponseMethodRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5956276128041940295,
<super::ResponseMethod as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
}
/// The server for the `HandleRightsProtocol` protocol.
#[repr(transparent)]
pub struct HandleRightsProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> HandleRightsProtocolServer<___T>
where
___T: ::fidl_next::Transport,
{
pub fn an_event(
&self,
h: impl ::fidl_next::Encode<
::fidl_next::fuchsia::WireSocket,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::SendFuture<'_, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.an_event_with(crate::generic::HandleRightsProtocolAnEventRequest { h })
}
pub fn an_event_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<super::AnEvent as ::fidl_next::Method>::Request,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::SendFuture::from_untyped(self.server.send_event(
476727631355490611,
<super::AnEvent as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
}
}
}
/// A client handler for the HandleRightsProtocol protocol.
///
/// See [`HandleRightsProtocol`] for more details.
pub trait HandleRightsProtocolClientHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
fn an_event(
&mut self,
request: ::fidl_next::Request<handle_rights_protocol::AnEvent, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___T> HandleRightsProtocolClientHandler<___T> for ::fidl_next::IgnoreEvents
where
___T: ::fidl_next::Transport,
{
async fn an_event(&mut self, _: ::fidl_next::Request<handle_rights_protocol::AnEvent, ___T>) {}
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for HandleRightsProtocol
where
___H: HandleRightsProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<handle_rights_protocol::AnEvent as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
match ordinal {
476727631355490611 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler.an_event(::fidl_next::Request::from_decoded(decoded)).await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 476727631355490611,
error,
}),
},
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// A server handler for the HandleRightsProtocol protocol.
///
/// See [`HandleRightsProtocol`] for more details.
pub trait HandleRightsProtocolServerHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
fn no_response_method(
&mut self,
request: ::fidl_next::Request<handle_rights_protocol::NoResponseMethod, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn response_method(
&mut self,
request: ::fidl_next::Request<handle_rights_protocol::ResponseMethod, ___T>,
responder: ::fidl_next::Responder<handle_rights_protocol::ResponseMethod, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for HandleRightsProtocol
where
___H: HandleRightsProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<handle_rights_protocol::NoResponseMethod as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<handle_rights_protocol::ResponseMethod as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_one_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
1155044649514904573 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler.no_response_method(::fidl_next::Request::from_decoded(decoded)).await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 1155044649514904573,
error,
}),
},
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
5956276128041940295 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.response_method(::fidl_next::Request::from_decoded(decoded), responder)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 5956276128041940295,
error,
}),
}
}
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// The type corresponding to the WithErrorSyntax protocol.
#[derive(PartialEq, Debug)]
pub struct WithErrorSyntax;
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::HasTransport for WithErrorSyntax {
type Transport = ::fidl_next::fuchsia::zx::Channel;
}
pub mod with_error_syntax {
pub mod prelude {
pub use crate::{
WithErrorSyntax, WithErrorSyntaxClientHandler, WithErrorSyntaxServerHandler,
with_error_syntax,
};
pub use crate::natural::ErrorEnum;
pub use crate::natural::WithErrorSyntaxErrorAsEnumResponse;
pub use crate::natural::WithErrorSyntaxErrorAsPrimitiveResponse;
pub use crate::natural::WithErrorSyntaxHandleInResultResponse;
pub use crate::natural::WithErrorSyntaxResponseAsStructResponse;
}
pub struct ResponseAsStruct;
impl ::fidl_next::Method for ResponseAsStruct {
const ORDINAL: u64 = 268248568430741139;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithErrorSyntax;
type Request = ();
}
impl ::fidl_next::TwoWayMethod for ResponseAsStruct {
type Response = ::fidl_next::WireResult<
'static,
crate::wire::WithErrorSyntaxResponseAsStructResponse,
::fidl_next::WireU32,
>;
}
impl<___R> ::fidl_next::Respond<___R> for ResponseAsStruct {
type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
fn respond(response: ___R) -> Self::Output {
::core::result::Result::Ok(response)
}
}
impl<___R> ::fidl_next::RespondErr<___R> for ResponseAsStruct {
type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
fn respond_err(response: ___R) -> Self::Output {
::core::result::Result::Err(response)
}
}
pub struct ErrorAsPrimitive;
impl ::fidl_next::Method for ErrorAsPrimitive {
const ORDINAL: u64 = 6930994461233198567;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithErrorSyntax;
type Request = ();
}
impl ::fidl_next::TwoWayMethod for ErrorAsPrimitive {
type Response = ::fidl_next::WireResult<
'static,
crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse,
::fidl_next::WireU32,
>;
}
impl<___R> ::fidl_next::Respond<___R> for ErrorAsPrimitive {
type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
fn respond(response: ___R) -> Self::Output {
::core::result::Result::Ok(response)
}
}
impl<___R> ::fidl_next::RespondErr<___R> for ErrorAsPrimitive {
type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
fn respond_err(response: ___R) -> Self::Output {
::core::result::Result::Err(response)
}
}
pub struct ErrorAsEnum;
impl ::fidl_next::Method for ErrorAsEnum {
const ORDINAL: u64 = 5491891352371277635;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithErrorSyntax;
type Request = ();
}
impl ::fidl_next::TwoWayMethod for ErrorAsEnum {
type Response = ::fidl_next::WireResult<
'static,
crate::wire::WithErrorSyntaxErrorAsEnumResponse,
crate::wire::ErrorEnum,
>;
}
impl<___R> ::fidl_next::Respond<___R> for ErrorAsEnum {
type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
fn respond(response: ___R) -> Self::Output {
::core::result::Result::Ok(response)
}
}
impl<___R> ::fidl_next::RespondErr<___R> for ErrorAsEnum {
type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
fn respond_err(response: ___R) -> Self::Output {
::core::result::Result::Err(response)
}
}
pub struct HandleInResult;
impl ::fidl_next::Method for HandleInResult {
const ORDINAL: u64 = 1371676333068455103;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithErrorSyntax;
type Request = ();
}
impl ::fidl_next::TwoWayMethod for HandleInResult {
type Response = ::fidl_next::WireResult<
'static,
crate::wire::WithErrorSyntaxHandleInResultResponse,
::fidl_next::WireU32,
>;
}
impl<___R> ::fidl_next::Respond<___R> for HandleInResult {
type Output = ::core::result::Result<
crate::generic::WithErrorSyntaxHandleInResultResponse<___R>,
::fidl_next::util::Never,
>;
fn respond(response: ___R) -> Self::Output {
::core::result::Result::Ok(crate::generic::WithErrorSyntaxHandleInResultResponse {
h: response,
})
}
}
impl<___R> ::fidl_next::RespondErr<___R> for HandleInResult {
type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
fn respond_err(response: ___R) -> Self::Output {
::core::result::Result::Err(response)
}
}
mod ___detail {
unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WithErrorSyntax
where
___T: ::fidl_next::Transport,
{
type Client = WithErrorSyntaxClient<___T>;
type Server = WithErrorSyntaxServer<___T>;
}
/// The client for the `WithErrorSyntax` protocol.
#[repr(transparent)]
pub struct WithErrorSyntaxClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> WithErrorSyntaxClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn response_as_struct(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::ResponseAsStruct, ___T> {
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
268248568430741139,
<super::ResponseAsStruct as ::fidl_next::Method>::FLEXIBILITY,
(),
))
}
pub fn error_as_primitive(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::ErrorAsPrimitive, ___T> {
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6930994461233198567,
<super::ErrorAsPrimitive as ::fidl_next::Method>::FLEXIBILITY,
(),
))
}
pub fn error_as_enum(&self) -> ::fidl_next::TwoWayFuture<'_, super::ErrorAsEnum, ___T> {
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5491891352371277635,
<super::ErrorAsEnum as ::fidl_next::Method>::FLEXIBILITY,
(),
))
}
pub fn handle_in_result(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::HandleInResult, ___T> {
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1371676333068455103,
<super::HandleInResult as ::fidl_next::Method>::FLEXIBILITY,
(),
))
}
}
/// The server for the `WithErrorSyntax` protocol.
#[repr(transparent)]
pub struct WithErrorSyntaxServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> WithErrorSyntaxServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the WithErrorSyntax protocol.
///
/// See [`WithErrorSyntax`] for more details.
pub trait WithErrorSyntaxClientHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
}
impl<___T> WithErrorSyntaxClientHandler<___T> for ::fidl_next::IgnoreEvents where
___T: ::fidl_next::Transport
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WithErrorSyntax
where
___H: WithErrorSyntaxClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_event(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// A server handler for the WithErrorSyntax protocol.
///
/// See [`WithErrorSyntax`] for more details.
pub trait WithErrorSyntaxServerHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
fn response_as_struct(
&mut self,
responder: ::fidl_next::Responder<with_error_syntax::ResponseAsStruct, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn error_as_primitive(
&mut self,
responder: ::fidl_next::Responder<with_error_syntax::ErrorAsPrimitive, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn error_as_enum(
&mut self,
responder: ::fidl_next::Responder<with_error_syntax::ErrorAsEnum, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn handle_in_result(
&mut self,
responder: ::fidl_next::Responder<with_error_syntax::HandleInResult, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WithErrorSyntax
where
___H: WithErrorSyntaxServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
268248568430741139 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.response_as_struct(responder).await;
Ok(())
}
6930994461233198567 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.error_as_primitive(responder).await;
Ok(())
}
5491891352371277635 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.error_as_enum(responder).await;
Ok(())
}
1371676333068455103 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.handle_in_result(responder).await;
Ok(())
}
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// The type corresponding to the WithProtocolEnds protocol.
#[derive(PartialEq, Debug)]
pub struct WithProtocolEnds;
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::HasTransport for WithProtocolEnds {
type Transport = ::fidl_next::fuchsia::zx::Channel;
}
pub mod with_protocol_ends {
pub mod prelude {
pub use crate::{
WithProtocolEnds, WithProtocolEndsClientHandler, WithProtocolEndsServerHandler,
with_protocol_ends,
};
pub use crate::natural::WithProtocolEndsClientEndsRequest;
pub use crate::natural::WithProtocolEndsClientEndsResponse;
pub use crate::natural::WithProtocolEndsServerEndsRequest;
pub use crate::natural::WithProtocolEndsServerEndsResponse;
pub use crate::natural::WithProtocolEndsStructContainingEndsRequest;
pub use crate::natural::WithProtocolEndsStructContainingEndsResponse;
}
pub struct ClientEnds;
impl ::fidl_next::Method for ClientEnds {
const ORDINAL: u64 = 5870448041025163330;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithProtocolEnds;
type Request = crate::wire::WithProtocolEndsClientEndsRequest;
}
impl ::fidl_next::TwoWayMethod for ClientEnds {
type Response = crate::wire::WithProtocolEndsClientEndsResponse;
}
impl<___R> ::fidl_next::Respond<___R> for ClientEnds {
type Output = crate::generic::WithProtocolEndsClientEndsResponse<___R>;
fn respond(response: ___R) -> Self::Output {
crate::generic::WithProtocolEndsClientEndsResponse { out: response }
}
}
pub struct ServerEnds;
impl ::fidl_next::Method for ServerEnds {
const ORDINAL: u64 = 8115535094437022259;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithProtocolEnds;
type Request = crate::wire::WithProtocolEndsServerEndsRequest;
}
impl ::fidl_next::TwoWayMethod for ServerEnds {
type Response = crate::wire::WithProtocolEndsServerEndsResponse;
}
impl<___R> ::fidl_next::Respond<___R> for ServerEnds {
type Output = crate::generic::WithProtocolEndsServerEndsResponse<___R>;
fn respond(response: ___R) -> Self::Output {
crate::generic::WithProtocolEndsServerEndsResponse { out: response }
}
}
pub struct StructContainingEnds;
impl ::fidl_next::Method for StructContainingEnds {
const ORDINAL: u64 = 4076866772260025813;
const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
::fidl_next::protocol::Flexibility::Strict;
type Protocol = crate::WithProtocolEnds;
type Request = crate::wire::WithProtocolEndsStructContainingEndsRequest;
}
impl ::fidl_next::TwoWayMethod for StructContainingEnds {
type Response = crate::wire::WithProtocolEndsStructContainingEndsResponse;
}
impl<___R> ::fidl_next::Respond<___R> for StructContainingEnds {
type Output = crate::generic::WithProtocolEndsStructContainingEndsResponse<___R>;
fn respond(response: ___R) -> Self::Output {
crate::generic::WithProtocolEndsStructContainingEndsResponse { out: response }
}
}
mod ___detail {
unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WithProtocolEnds
where
___T: ::fidl_next::Transport,
{
type Client = WithProtocolEndsClient<___T>;
type Server = WithProtocolEndsServer<___T>;
}
/// The client for the `WithProtocolEnds` protocol.
#[repr(transparent)]
pub struct WithProtocolEndsClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> WithProtocolEndsClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn client_ends(
&self,
in_: impl ::fidl_next::Encode<
::fidl_next::ClientEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireChannel,
>,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::ClientEnds, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.client_ends_with(crate::generic::WithProtocolEndsClientEndsRequest { in_ })
}
pub fn client_ends_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::ClientEnds, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::WithProtocolEndsClientEndsRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5870448041025163330,
<super::ClientEnds as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
pub fn server_ends(
&self,
in_: impl ::fidl_next::Encode<
::fidl_next::ServerEnd<
crate::DiscoverableProtocol,
::fidl_next::fuchsia::WireOptionalChannel,
>,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::ServerEnds, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.server_ends_with(crate::generic::WithProtocolEndsServerEndsRequest { in_ })
}
pub fn server_ends_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::ServerEnds, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::WithProtocolEndsServerEndsRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8115535094437022259,
<super::ServerEnds as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
pub fn struct_containing_ends(
&self,
in_: impl ::fidl_next::Encode<
crate::wire::ProtocolEnds,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
) -> ::fidl_next::TwoWayFuture<'_, super::StructContainingEnds, ___T>
where
<___T as ::fidl_next::Transport>::SendBuffer:
::fidl_next::encoder::InternalHandleEncoder,
<___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
{
self.struct_containing_ends_with(
crate::generic::WithProtocolEndsStructContainingEndsRequest { in_ },
)
}
pub fn struct_containing_ends_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::TwoWayFuture<'_, super::StructContainingEnds, ___T>
where
___R: ::fidl_next::Encode<
crate::wire::WithProtocolEndsStructContainingEndsRequest,
<___T as ::fidl_next::Transport>::SendBuffer,
>,
{
::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4076866772260025813,
<super::StructContainingEnds as ::fidl_next::Method>::FLEXIBILITY,
request,
))
}
}
/// The server for the `WithProtocolEnds` protocol.
#[repr(transparent)]
pub struct WithProtocolEndsServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> WithProtocolEndsServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the WithProtocolEnds protocol.
///
/// See [`WithProtocolEnds`] for more details.
pub trait WithProtocolEndsClientHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
}
impl<___T> WithProtocolEndsClientHandler<___T> for ::fidl_next::IgnoreEvents where
___T: ::fidl_next::Transport
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WithProtocolEnds
where
___H: WithProtocolEndsClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_event(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// A server handler for the WithProtocolEnds protocol.
///
/// See [`WithProtocolEnds`] for more details.
pub trait WithProtocolEndsServerHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
fn client_ends(
&mut self,
request: ::fidl_next::Request<with_protocol_ends::ClientEnds, ___T>,
responder: ::fidl_next::Responder<with_protocol_ends::ClientEnds, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn server_ends(
&mut self,
request: ::fidl_next::Request<with_protocol_ends::ServerEnds, ___T>,
responder: ::fidl_next::Responder<with_protocol_ends::ServerEnds, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn struct_containing_ends(
&mut self,
request: ::fidl_next::Request<with_protocol_ends::StructContainingEnds, ___T>,
responder: ::fidl_next::Responder<with_protocol_ends::StructContainingEnds, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WithProtocolEnds
where
___H: WithProtocolEndsServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<with_protocol_ends::ClientEnds as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<with_protocol_ends::ServerEnds as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<with_protocol_ends::StructContainingEnds as ::fidl_next::Method>::Request:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_one_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
5870448041025163330 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.client_ends(::fidl_next::Request::from_decoded(decoded), responder)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 5870448041025163330,
error,
}),
}
}
8115535094437022259 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.server_ends(::fidl_next::Request::from_decoded(decoded), responder)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 8115535094437022259,
error,
}),
}
}
4076866772260025813 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => {
handler
.struct_containing_ends(
::fidl_next::Request::from_decoded(decoded),
responder,
)
.await;
Ok(())
}
Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
ordinal: 4076866772260025813,
error,
}),
}
}
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
pub use fidl_next_common_test_protocols::*;
/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
pub mod compat {
pub use fidl_next_common_test_protocols::compat::*;
impl ::fidl_next::CompatFrom<crate::ChannelProtocolTakeHandleRequest>
for ::fidl_test_protocols::ChannelProtocolTakeHandleRequest
{
#[inline]
fn compat_from(value: crate::ChannelProtocolTakeHandleRequest) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolTakeHandleRequest>
for crate::ChannelProtocolTakeHandleRequest
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::ChannelProtocolTakeHandleRequest) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<crate::ChannelProtocolMutateSocketRequest>
for ::fidl_test_protocols::ChannelProtocolMutateSocketRequest
{
#[inline]
fn compat_from(value: crate::ChannelProtocolMutateSocketRequest) -> Self {
Self { a: ::fidl_next::CompatFrom::compat_from(value.a) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolMutateSocketRequest>
for crate::ChannelProtocolMutateSocketRequest
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::ChannelProtocolMutateSocketRequest) -> Self {
Self { a: ::fidl_next::CompatFrom::compat_from(value.a) }
}
}
impl ::fidl_next::CompatFrom<crate::ChannelProtocolMutateSocketResponse>
for ::fidl_test_protocols::ChannelProtocolMutateSocketResponse
{
#[inline]
fn compat_from(value: crate::ChannelProtocolMutateSocketResponse) -> Self {
Self { b: ::fidl_next::CompatFrom::compat_from(value.b) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolMutateSocketResponse>
for crate::ChannelProtocolMutateSocketResponse
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::ChannelProtocolMutateSocketResponse) -> Self {
Self { b: ::fidl_next::CompatFrom::compat_from(value.b) }
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `ChannelProtocol`
/// protocol.
pub type ChannelProtocolProxy = ::fidl_next::Client<crate::ChannelProtocol>;
impl ::fidl_next::CompatFrom<crate::ChannelProtocol>
for ::fidl_test_protocols::ChannelProtocolMarker
{
fn compat_from(_: crate::ChannelProtocol) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolMarker>
for crate::ChannelProtocol
{
fn compat_from(_: ::fidl_test_protocols::ChannelProtocolMarker) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::ChannelProtocolProxy>
for crate::ChannelProtocol
{
fn client_compat_from(
proxy: ::fidl_test_protocols::ChannelProtocolProxy,
) -> ::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)
}
}
impl ::fidl_next::CompatFrom<crate::HandleRightsProtocolNoResponseMethodRequest>
for ::fidl_test_protocols::HandleRightsProtocolNoResponseMethodRequest
{
#[inline]
fn compat_from(value: crate::HandleRightsProtocolNoResponseMethodRequest) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::HandleRightsProtocolNoResponseMethodRequest>
for crate::HandleRightsProtocolNoResponseMethodRequest
{
#[inline]
fn compat_from(
value: ::fidl_test_protocols::HandleRightsProtocolNoResponseMethodRequest,
) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<crate::HandleRightsProtocolResponseMethodRequest>
for ::fidl_test_protocols::HandleRightsProtocolResponseMethodRequest
{
#[inline]
fn compat_from(value: crate::HandleRightsProtocolResponseMethodRequest) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::HandleRightsProtocolResponseMethodRequest>
for crate::HandleRightsProtocolResponseMethodRequest
{
#[inline]
fn compat_from(
value: ::fidl_test_protocols::HandleRightsProtocolResponseMethodRequest,
) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<crate::HandleRightsProtocolResponseMethodResponse>
for ::fidl_test_protocols::HandleRightsProtocolResponseMethodResponse
{
#[inline]
fn compat_from(value: crate::HandleRightsProtocolResponseMethodResponse) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::HandleRightsProtocolResponseMethodResponse>
for crate::HandleRightsProtocolResponseMethodResponse
{
#[inline]
fn compat_from(
value: ::fidl_test_protocols::HandleRightsProtocolResponseMethodResponse,
) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<crate::HandleRightsProtocolAnEventRequest>
for ::fidl_test_protocols::HandleRightsProtocolAnEventRequest
{
#[inline]
fn compat_from(value: crate::HandleRightsProtocolAnEventRequest) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::HandleRightsProtocolAnEventRequest>
for crate::HandleRightsProtocolAnEventRequest
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::HandleRightsProtocolAnEventRequest) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `HandleRightsProtocol`
/// protocol.
pub type HandleRightsProtocolProxy = ::fidl_next::Client<crate::HandleRightsProtocol>;
impl ::fidl_next::CompatFrom<crate::HandleRightsProtocol>
for ::fidl_test_protocols::HandleRightsProtocolMarker
{
fn compat_from(_: crate::HandleRightsProtocol) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::HandleRightsProtocolMarker>
for crate::HandleRightsProtocol
{
fn compat_from(_: ::fidl_test_protocols::HandleRightsProtocolMarker) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::HandleRightsProtocolProxy>
for crate::HandleRightsProtocol
{
fn client_compat_from(
proxy: ::fidl_test_protocols::HandleRightsProtocolProxy,
) -> ::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)
}
}
impl ::fidl_next::CompatFrom<crate::ProtocolEnds> for ::fidl_test_protocols::ProtocolEnds {
#[inline]
fn compat_from(value: crate::ProtocolEnds) -> Self {
Self {
client: ::fidl_next::CompatFrom::compat_from(value.client),
server: ::fidl_next::CompatFrom::compat_from(value.server),
client_opt: ::fidl_next::CompatFrom::compat_from(value.client_opt),
server_opt: ::fidl_next::CompatFrom::compat_from(value.server_opt),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::ProtocolEnds> for crate::ProtocolEnds {
#[inline]
fn compat_from(value: ::fidl_test_protocols::ProtocolEnds) -> Self {
Self {
client: ::fidl_next::CompatFrom::compat_from(value.client),
server: ::fidl_next::CompatFrom::compat_from(value.server),
client_opt: ::fidl_next::CompatFrom::compat_from(value.client_opt),
server_opt: ::fidl_next::CompatFrom::compat_from(value.server_opt),
}
}
}
impl ::fidl_next::CompatFrom<crate::WithErrorSyntaxHandleInResultResponse>
for ::fidl_test_protocols::WithErrorSyntaxHandleInResultResponse
{
#[inline]
fn compat_from(value: crate::WithErrorSyntaxHandleInResultResponse) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithErrorSyntaxHandleInResultResponse>
for crate::WithErrorSyntaxHandleInResultResponse
{
#[inline]
fn compat_from(
value: ::fidl_test_protocols::WithErrorSyntaxHandleInResultResponse,
) -> Self {
Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `WithErrorSyntax`
/// protocol.
pub type WithErrorSyntaxProxy = ::fidl_next::Client<crate::WithErrorSyntax>;
impl ::fidl_next::CompatFrom<crate::WithErrorSyntax>
for ::fidl_test_protocols::WithErrorSyntaxMarker
{
fn compat_from(_: crate::WithErrorSyntax) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithErrorSyntaxMarker>
for crate::WithErrorSyntax
{
fn compat_from(_: ::fidl_test_protocols::WithErrorSyntaxMarker) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::WithErrorSyntaxProxy>
for crate::WithErrorSyntax
{
fn client_compat_from(
proxy: ::fidl_test_protocols::WithErrorSyntaxProxy,
) -> ::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)
}
}
impl ::fidl_next::CompatFrom<crate::WithProtocolEndsClientEndsRequest>
for ::fidl_test_protocols::WithProtocolEndsClientEndsRequest
{
#[inline]
fn compat_from(value: crate::WithProtocolEndsClientEndsRequest) -> Self {
Self { in_: ::fidl_next::CompatFrom::compat_from(value.in_) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsClientEndsRequest>
for crate::WithProtocolEndsClientEndsRequest
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::WithProtocolEndsClientEndsRequest) -> Self {
Self { in_: ::fidl_next::CompatFrom::compat_from(value.in_) }
}
}
impl ::fidl_next::CompatFrom<crate::WithProtocolEndsClientEndsResponse>
for ::fidl_test_protocols::WithProtocolEndsClientEndsResponse
{
#[inline]
fn compat_from(value: crate::WithProtocolEndsClientEndsResponse) -> Self {
Self { out: ::fidl_next::CompatFrom::compat_from(value.out) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsClientEndsResponse>
for crate::WithProtocolEndsClientEndsResponse
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::WithProtocolEndsClientEndsResponse) -> Self {
Self { out: ::fidl_next::CompatFrom::compat_from(value.out) }
}
}
impl ::fidl_next::CompatFrom<crate::WithProtocolEndsServerEndsRequest>
for ::fidl_test_protocols::WithProtocolEndsServerEndsRequest
{
#[inline]
fn compat_from(value: crate::WithProtocolEndsServerEndsRequest) -> Self {
Self { in_: ::fidl_next::CompatFrom::compat_from(value.in_) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsServerEndsRequest>
for crate::WithProtocolEndsServerEndsRequest
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::WithProtocolEndsServerEndsRequest) -> Self {
Self { in_: ::fidl_next::CompatFrom::compat_from(value.in_) }
}
}
impl ::fidl_next::CompatFrom<crate::WithProtocolEndsServerEndsResponse>
for ::fidl_test_protocols::WithProtocolEndsServerEndsResponse
{
#[inline]
fn compat_from(value: crate::WithProtocolEndsServerEndsResponse) -> Self {
Self { out: ::fidl_next::CompatFrom::compat_from(value.out) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsServerEndsResponse>
for crate::WithProtocolEndsServerEndsResponse
{
#[inline]
fn compat_from(value: ::fidl_test_protocols::WithProtocolEndsServerEndsResponse) -> Self {
Self { out: ::fidl_next::CompatFrom::compat_from(value.out) }
}
}
impl ::fidl_next::CompatFrom<crate::WithProtocolEndsStructContainingEndsRequest>
for ::fidl_test_protocols::WithProtocolEndsStructContainingEndsRequest
{
#[inline]
fn compat_from(value: crate::WithProtocolEndsStructContainingEndsRequest) -> Self {
Self { in_: ::fidl_next::CompatFrom::compat_from(value.in_) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsStructContainingEndsRequest>
for crate::WithProtocolEndsStructContainingEndsRequest
{
#[inline]
fn compat_from(
value: ::fidl_test_protocols::WithProtocolEndsStructContainingEndsRequest,
) -> Self {
Self { in_: ::fidl_next::CompatFrom::compat_from(value.in_) }
}
}
impl ::fidl_next::CompatFrom<crate::WithProtocolEndsStructContainingEndsResponse>
for ::fidl_test_protocols::WithProtocolEndsStructContainingEndsResponse
{
#[inline]
fn compat_from(value: crate::WithProtocolEndsStructContainingEndsResponse) -> Self {
Self { out: ::fidl_next::CompatFrom::compat_from(value.out) }
}
}
impl
::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsStructContainingEndsResponse>
for crate::WithProtocolEndsStructContainingEndsResponse
{
#[inline]
fn compat_from(
value: ::fidl_test_protocols::WithProtocolEndsStructContainingEndsResponse,
) -> Self {
Self { out: ::fidl_next::CompatFrom::compat_from(value.out) }
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `WithProtocolEnds`
/// protocol.
pub type WithProtocolEndsProxy = ::fidl_next::Client<crate::WithProtocolEnds>;
impl ::fidl_next::CompatFrom<crate::WithProtocolEnds>
for ::fidl_test_protocols::WithProtocolEndsMarker
{
fn compat_from(_: crate::WithProtocolEnds) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithProtocolEndsMarker>
for crate::WithProtocolEnds
{
fn compat_from(_: ::fidl_test_protocols::WithProtocolEndsMarker) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::WithProtocolEndsProxy>
for crate::WithProtocolEnds
{
fn client_compat_from(
proxy: ::fidl_test_protocols::WithProtocolEndsProxy,
) -> ::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)
}
}
}