| // 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 { |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolMethodARequest { |
| pub a: i64, |
| |
| pub b: i64, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodARequest, ___E> |
| for ChannelProtocolMethodARequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::ChannelProtocolMethodARequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodARequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodARequest { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodARequest, ___E> |
| for &'a ChannelProtocolMethodARequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodARequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodARequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::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::ChannelProtocolMethodARequest>, |
| ___E, |
| > for ChannelProtocolMethodARequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| ChannelProtocolMethodARequest: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolMethodARequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodARequest>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodARequest>, |
| ___E, |
| > for &'a ChannelProtocolMethodARequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a ChannelProtocolMethodARequest: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolMethodARequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodARequest>, |
| >, |
| _: (), |
| ) -> ::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::ChannelProtocolMethodARequest> |
| for ChannelProtocolMethodARequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::ChannelProtocolMethodARequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::ChannelProtocolMethodARequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::ChannelProtocolMethodARequest> |
| for ChannelProtocolMethodARequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::ChannelProtocolMethodARequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolEventARequest { |
| pub a: i64, |
| |
| pub b: i64, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolEventARequest, ___E> |
| for ChannelProtocolEventARequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::ChannelProtocolEventARequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolEventARequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolEventARequest { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelProtocolEventARequest, ___E> |
| for &'a ChannelProtocolEventARequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolEventARequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolEventARequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::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::ChannelProtocolEventARequest>, |
| ___E, |
| > for ChannelProtocolEventARequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| ChannelProtocolEventARequest: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolEventARequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolEventARequest>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolEventARequest>, |
| ___E, |
| > for &'a ChannelProtocolEventARequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a ChannelProtocolEventARequest: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolEventARequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolEventARequest>, |
| >, |
| _: (), |
| ) -> ::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::ChannelProtocolEventARequest> |
| for ChannelProtocolEventARequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::ChannelProtocolEventARequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::ChannelProtocolEventARequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::ChannelProtocolEventARequest> |
| for ChannelProtocolEventARequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::ChannelProtocolEventARequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolMethodBRequest { |
| pub a: i64, |
| |
| pub b: i64, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBRequest, ___E> |
| for ChannelProtocolMethodBRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::ChannelProtocolMethodBRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodBRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodBRequest { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBRequest, ___E> |
| for &'a ChannelProtocolMethodBRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodBRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodBRequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::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::ChannelProtocolMethodBRequest>, |
| ___E, |
| > for ChannelProtocolMethodBRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| ChannelProtocolMethodBRequest: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBRequest>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBRequest>, |
| ___E, |
| > for &'a ChannelProtocolMethodBRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a ChannelProtocolMethodBRequest: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBRequest>, |
| >, |
| _: (), |
| ) -> ::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::ChannelProtocolMethodBRequest> |
| for ChannelProtocolMethodBRequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::ChannelProtocolMethodBRequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::ChannelProtocolMethodBRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::ChannelProtocolMethodBRequest> |
| for ChannelProtocolMethodBRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::ChannelProtocolMethodBRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolMethodBResponse { |
| pub result: i64, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBResponse, ___E> |
| for ChannelProtocolMethodBResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::ChannelProtocolMethodBResponse, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodBResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodBResponse { |
| result, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.result, encoder_, result, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(result.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBResponse, ___E> |
| for &'a ChannelProtocolMethodBResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodBResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodBResponse { |
| |
| result, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.result, encoder_, result, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(result.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBResponse>, |
| ___E, |
| > for ChannelProtocolMethodBResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| ChannelProtocolMethodBResponse: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBResponse>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBResponse>, |
| ___E, |
| > for &'a ChannelProtocolMethodBResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a ChannelProtocolMethodBResponse: |
| ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ChannelProtocolMethodBResponse>, |
| >, |
| _: (), |
| ) -> ::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::ChannelProtocolMethodBResponse> |
| for ChannelProtocolMethodBResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::ChannelProtocolMethodBResponse, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::ChannelProtocolMethodBResponse) -> Self { |
| Self { result: ::fidl_next::FromWire::from_wire(wire.result) } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::ChannelProtocolMethodBResponse> |
| for ChannelProtocolMethodBResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::ChannelProtocolMethodBResponse) -> Self { |
| Self { result: ::fidl_next::FromWireRef::from_wire_ref(&wire.result) } |
| } |
| } |
| |
| #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
| #[repr(u32)] |
| pub enum ErrorEnum { |
| ErrFoo = 1, |
| ErrBar = 2, |
| } |
| impl ::core::convert::TryFrom<u32> for ErrorEnum { |
| type Error = ::fidl_next::UnknownStrictEnumMemberError; |
| fn try_from( |
| value: u32, |
| ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> { |
| match value { |
| 1 => Ok(Self::ErrFoo), |
| 2 => Ok(Self::ErrBar), |
| |
| _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())), |
| } |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::ErrorEnum, ___E> for ErrorEnum |
| where |
| ___E: ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<crate::wire::ErrorEnum>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::Encode::encode(&self, encoder, out, ()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ErrorEnum, ___E> for &'a ErrorEnum |
| where |
| ___E: ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<crate::wire::ErrorEnum>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge!(let crate::wire::ErrorEnum { value } = out); |
| let _ = value.write(::fidl_next::WireU32::from(match *self { |
| ErrorEnum::ErrFoo => 1, |
| |
| ErrorEnum::ErrBar => 2, |
| })); |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::core::convert::From<crate::wire::ErrorEnum> for ErrorEnum { |
| fn from(wire: crate::wire::ErrorEnum) -> Self { |
| match u32::from(wire.value) { |
| 1 => Self::ErrFoo, |
| |
| 2 => Self::ErrBar, |
| |
| _ => unsafe { ::core::hint::unreachable_unchecked() }, |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWire<crate::wire::ErrorEnum> for ErrorEnum { |
| #[inline] |
| fn from_wire(wire: crate::wire::ErrorEnum) -> Self { |
| Self::from(wire) |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::ErrorEnum> for ErrorEnum { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::ErrorEnum) -> Self { |
| Self::from(*wire) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct ManyParametersFifteenRequest { |
| pub p1: bool, |
| |
| pub p2: bool, |
| |
| pub p3: bool, |
| |
| pub p4: bool, |
| |
| pub p5: bool, |
| |
| pub p6: bool, |
| |
| pub p7: bool, |
| |
| pub p8: bool, |
| |
| pub p9: bool, |
| |
| pub p10: bool, |
| |
| pub p11: bool, |
| |
| pub p12: bool, |
| |
| pub p13: bool, |
| |
| pub p14: bool, |
| |
| pub p15: bool, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::ManyParametersFifteenRequest, ___E> |
| for ManyParametersFifteenRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::ManyParametersFifteenRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ManyParametersFifteenRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ManyParametersFifteenRequest { |
| p1, |
| p2, |
| p3, |
| p4, |
| p5, |
| p6, |
| p7, |
| p8, |
| p9, |
| p10, |
| p11, |
| p12, |
| p13, |
| p14, |
| p15, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.p1, encoder_, p1, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p1.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p2, encoder_, p2, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p2.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p3, encoder_, p3, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p3.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p4, encoder_, p4, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p4.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p5, encoder_, p5, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p5.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p6, encoder_, p6, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p6.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p7, encoder_, p7, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p7.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p8, encoder_, p8, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p8.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p9, encoder_, p9, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p9.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p10, encoder_, p10, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p10.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p11, encoder_, p11, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p11.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p12, encoder_, p12, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p12.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p13, encoder_, p13, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p13.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p14, encoder_, p14, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p14.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.p15, encoder_, p15, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p15.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ManyParametersFifteenRequest, ___E> |
| for &'a ManyParametersFifteenRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ManyParametersFifteenRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ManyParametersFifteenRequest { |
| |
| p1, |
| p2, |
| p3, |
| p4, |
| p5, |
| p6, |
| p7, |
| p8, |
| p9, |
| p10, |
| p11, |
| p12, |
| p13, |
| p14, |
| p15, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.p1, encoder_, p1, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p1.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p2, encoder_, p2, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p2.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p3, encoder_, p3, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p3.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p4, encoder_, p4, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p4.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p5, encoder_, p5, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p5.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p6, encoder_, p6, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p6.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p7, encoder_, p7, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p7.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p8, encoder_, p8, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p8.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p9, encoder_, p9, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p9.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p10, encoder_, p10, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p10.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p11, encoder_, p11, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p11.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p12, encoder_, p12, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p12.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p13, encoder_, p13, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p13.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p14, encoder_, p14, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p14.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.p15, encoder_, p15, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(p15.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ManyParametersFifteenRequest>, |
| ___E, |
| > for ManyParametersFifteenRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| ManyParametersFifteenRequest: |
| ::fidl_next::Encode<crate::wire::ManyParametersFifteenRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ManyParametersFifteenRequest>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::ManyParametersFifteenRequest>, |
| ___E, |
| > for &'a ManyParametersFifteenRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a ManyParametersFifteenRequest: |
| ::fidl_next::Encode<crate::wire::ManyParametersFifteenRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::ManyParametersFifteenRequest>, |
| >, |
| _: (), |
| ) -> ::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::ManyParametersFifteenRequest> |
| for ManyParametersFifteenRequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::ManyParametersFifteenRequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled() |
| && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::ManyParametersFifteenRequest) -> Self { |
| Self { |
| p1: ::fidl_next::FromWire::from_wire(wire.p1), |
| |
| p2: ::fidl_next::FromWire::from_wire(wire.p2), |
| |
| p3: ::fidl_next::FromWire::from_wire(wire.p3), |
| |
| p4: ::fidl_next::FromWire::from_wire(wire.p4), |
| |
| p5: ::fidl_next::FromWire::from_wire(wire.p5), |
| |
| p6: ::fidl_next::FromWire::from_wire(wire.p6), |
| |
| p7: ::fidl_next::FromWire::from_wire(wire.p7), |
| |
| p8: ::fidl_next::FromWire::from_wire(wire.p8), |
| |
| p9: ::fidl_next::FromWire::from_wire(wire.p9), |
| |
| p10: ::fidl_next::FromWire::from_wire(wire.p10), |
| |
| p11: ::fidl_next::FromWire::from_wire(wire.p11), |
| |
| p12: ::fidl_next::FromWire::from_wire(wire.p12), |
| |
| p13: ::fidl_next::FromWire::from_wire(wire.p13), |
| |
| p14: ::fidl_next::FromWire::from_wire(wire.p14), |
| |
| p15: ::fidl_next::FromWire::from_wire(wire.p15), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::ManyParametersFifteenRequest> |
| for ManyParametersFifteenRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::ManyParametersFifteenRequest) -> Self { |
| Self { |
| p1: ::fidl_next::FromWireRef::from_wire_ref(&wire.p1), |
| |
| p2: ::fidl_next::FromWireRef::from_wire_ref(&wire.p2), |
| |
| p3: ::fidl_next::FromWireRef::from_wire_ref(&wire.p3), |
| |
| p4: ::fidl_next::FromWireRef::from_wire_ref(&wire.p4), |
| |
| p5: ::fidl_next::FromWireRef::from_wire_ref(&wire.p5), |
| |
| p6: ::fidl_next::FromWireRef::from_wire_ref(&wire.p6), |
| |
| p7: ::fidl_next::FromWireRef::from_wire_ref(&wire.p7), |
| |
| p8: ::fidl_next::FromWireRef::from_wire_ref(&wire.p8), |
| |
| p9: ::fidl_next::FromWireRef::from_wire_ref(&wire.p9), |
| |
| p10: ::fidl_next::FromWireRef::from_wire_ref(&wire.p10), |
| |
| p11: ::fidl_next::FromWireRef::from_wire_ref(&wire.p11), |
| |
| p12: ::fidl_next::FromWireRef::from_wire_ref(&wire.p12), |
| |
| p13: ::fidl_next::FromWireRef::from_wire_ref(&wire.p13), |
| |
| p14: ::fidl_next::FromWireRef::from_wire_ref(&wire.p14), |
| |
| p15: ::fidl_next::FromWireRef::from_wire_ref(&wire.p15), |
| } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub enum TheUnion { |
| V(u32), |
| |
| UnknownOrdinal_(u64), |
| } |
| |
| impl TheUnion { |
| pub fn is_unknown(&self) -> bool { |
| #[allow(unreachable_patterns)] |
| match self { |
| Self::UnknownOrdinal_(_) => true, |
| _ => false, |
| } |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::TheUnion<'static>, ___E> for TheUnion |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<crate::wire::TheUnion<'static>>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge!(let crate::wire::TheUnion { raw, _phantom: _ } = out); |
| |
| match self { |
| Self::V(value) => { |
| ::fidl_next::RawWireUnion::encode_as::<___E, ::fidl_next::WireU32>( |
| value, |
| 1, |
| encoder, |
| raw, |
| (), |
| )? |
| } |
| |
| Self::UnknownOrdinal_(ordinal) => { |
| return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize)); |
| } |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TheUnion<'static>, ___E> for &'a TheUnion |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<crate::wire::TheUnion<'static>>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge!(let crate::wire::TheUnion { raw, _phantom: _ } = out); |
| |
| match self { |
| TheUnion::V(value) => ::fidl_next::RawWireUnion::encode_as::< |
| ___E, |
| ::fidl_next::WireU32, |
| >(value, 1, encoder, raw, ())?, |
| |
| TheUnion::UnknownOrdinal_(ordinal) => { |
| return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize)); |
| } |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::TheUnion<'static>, ___E> |
| for TheUnion |
| where |
| ___E: ?Sized, |
| TheUnion: ::fidl_next::Encode<crate::wire::TheUnion<'static>, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<crate::wire_optional::TheUnion<'static>>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge!(let crate::wire_optional::TheUnion { raw, _phantom: _ } = &mut *out); |
| |
| if let Some(inner) = this { |
| let value_out = unsafe { &mut *out.as_mut_ptr().cast() }; |
| ::fidl_next::Encode::encode(inner, encoder, value_out, ())?; |
| } else { |
| ::fidl_next::RawWireUnion::encode_absent(raw); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::EncodeOption<crate::wire_optional::TheUnion<'static>, ___E> |
| for &'a TheUnion |
| where |
| ___E: ?Sized, |
| &'a TheUnion: ::fidl_next::Encode<crate::wire::TheUnion<'static>, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<crate::wire_optional::TheUnion<'static>>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge!(let crate::wire_optional::TheUnion { raw, _phantom: _ } = &mut *out); |
| |
| if let Some(inner) = this { |
| let value_out = unsafe { &mut *out.as_mut_ptr().cast() }; |
| ::fidl_next::Encode::encode(inner, encoder, value_out, ())?; |
| } else { |
| ::fidl_next::RawWireUnion::encode_absent(raw); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWire<crate::wire::TheUnion<'de>> for TheUnion { |
| #[inline] |
| fn from_wire(wire: crate::wire::TheUnion<'de>) -> Self { |
| let wire = ::core::mem::ManuallyDrop::new(wire); |
| match wire.raw.ordinal() { |
| 1 => Self::V(::fidl_next::FromWire::from_wire(unsafe { |
| wire.raw.get().read_unchecked::<::fidl_next::WireU32>() |
| })), |
| |
| ord => return Self::UnknownOrdinal_(ord as u64), |
| } |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWireRef<crate::wire::TheUnion<'de>> for TheUnion { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::TheUnion<'de>) -> Self { |
| match wire.raw.ordinal() { |
| 1 => Self::V(::fidl_next::FromWireRef::from_wire_ref(unsafe { |
| wire.raw.get().deref_unchecked::<::fidl_next::WireU32>() |
| })), |
| |
| ord => return Self::UnknownOrdinal_(ord as u64), |
| } |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::TheUnion<'de>> for TheUnion { |
| #[inline] |
| fn from_wire_option( |
| wire: crate::wire_optional::TheUnion<'de>, |
| ) -> ::core::option::Option<Self> { |
| if let Some(inner) = wire.into_option() { |
| Some(::fidl_next::FromWire::from_wire(inner)) |
| } else { |
| None |
| } |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::TheUnion<'de>> for Box<TheUnion> { |
| #[inline] |
| fn from_wire_option( |
| wire: crate::wire_optional::TheUnion<'de>, |
| ) -> ::core::option::Option<Self> { |
| < |
| TheUnion as ::fidl_next::FromWireOption<crate::wire_optional::TheUnion<'de>> |
| >::from_wire_option(wire).map(Box::new) |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::TheUnion<'de>> for Box<TheUnion> { |
| #[inline] |
| fn from_wire_option_ref( |
| wire: &crate::wire_optional::TheUnion<'de>, |
| ) -> ::core::option::Option<Self> { |
| if let Some(inner) = wire.as_ref() { |
| Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner))) |
| } else { |
| None |
| } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct MethodWithUnionUnionMethodRequest { |
| pub u: crate::natural::TheUnion, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodRequest<'static>, ___E> |
| for MethodWithUnionUnionMethodRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MethodWithUnionUnionMethodRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MethodWithUnionUnionMethodRequest { |
| u, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.u, encoder_, u, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodRequest<'static>, ___E> |
| for &'a MethodWithUnionUnionMethodRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MethodWithUnionUnionMethodRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MethodWithUnionUnionMethodRequest { |
| |
| u, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::MethodWithUnionUnionMethodRequest<'static>>, |
| ___E, |
| > for MethodWithUnionUnionMethodRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MethodWithUnionUnionMethodRequest: |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodRequest<'static>, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::MethodWithUnionUnionMethodRequest<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::MethodWithUnionUnionMethodRequest<'static>>, |
| ___E, |
| > for &'a MethodWithUnionUnionMethodRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MethodWithUnionUnionMethodRequest: |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodRequest<'static>, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::MethodWithUnionUnionMethodRequest<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWire<crate::wire::MethodWithUnionUnionMethodRequest<'de>> |
| for MethodWithUnionUnionMethodRequest |
| { |
| #[inline] |
| fn from_wire(wire: crate::wire::MethodWithUnionUnionMethodRequest<'de>) -> Self { |
| Self { u: ::fidl_next::FromWire::from_wire(wire.u) } |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWireRef<crate::wire::MethodWithUnionUnionMethodRequest<'de>> |
| for MethodWithUnionUnionMethodRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MethodWithUnionUnionMethodRequest<'de>) -> Self { |
| Self { u: ::fidl_next::FromWireRef::from_wire_ref(&wire.u) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct MethodWithUnionUnionMethodResponse { |
| pub u: ::core::option::Option<::std::boxed::Box<crate::natural::TheUnion>>, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodResponse<'static>, ___E> |
| for MethodWithUnionUnionMethodResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MethodWithUnionUnionMethodResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MethodWithUnionUnionMethodResponse { |
| u, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.u, encoder_, u, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodResponse<'static>, ___E> |
| for &'a MethodWithUnionUnionMethodResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MethodWithUnionUnionMethodResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MethodWithUnionUnionMethodResponse { |
| |
| u, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::MethodWithUnionUnionMethodResponse<'static>>, |
| ___E, |
| > for MethodWithUnionUnionMethodResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MethodWithUnionUnionMethodResponse: |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodResponse<'static>, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::MethodWithUnionUnionMethodResponse<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::MethodWithUnionUnionMethodResponse<'static>>, |
| ___E, |
| > for &'a MethodWithUnionUnionMethodResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MethodWithUnionUnionMethodResponse: |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodResponse<'static>, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::MethodWithUnionUnionMethodResponse<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWire<crate::wire::MethodWithUnionUnionMethodResponse<'de>> |
| for MethodWithUnionUnionMethodResponse |
| { |
| #[inline] |
| fn from_wire(wire: crate::wire::MethodWithUnionUnionMethodResponse<'de>) -> Self { |
| Self { u: ::fidl_next::FromWire::from_wire(wire.u) } |
| } |
| } |
| |
| impl<'de> ::fidl_next::FromWireRef<crate::wire::MethodWithUnionUnionMethodResponse<'de>> |
| for MethodWithUnionUnionMethodResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MethodWithUnionUnionMethodResponse<'de>) -> Self { |
| Self { u: ::fidl_next::FromWireRef::from_wire_ref(&wire.u) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct WithAndWithoutRequestResponseNoRequestWithResponseResponse { |
| pub ret: ::std::string::String, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse { |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.ret, encoder_, ret, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ret.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse { |
| |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.ret, encoder_, ret, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ret.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| >, |
| ___E, |
| > for WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithAndWithoutRequestResponseNoRequestWithResponseResponse: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| >, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithAndWithoutRequestResponseNoRequestWithResponseResponse: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWire< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de>, |
| > for WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| { |
| #[inline] |
| fn from_wire( |
| wire: crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de>, |
| ) -> Self { |
| Self { ret: ::fidl_next::FromWire::from_wire(wire.ret) } |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWireRef< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de>, |
| > for WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| { |
| #[inline] |
| fn from_wire_ref( |
| wire: &crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de>, |
| ) -> Self { |
| Self { ret: ::fidl_next::FromWireRef::from_wire_ref(&wire.ret) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct WithAndWithoutRequestResponseWithRequestNoResponseRequest { |
| pub arg: ::std::string::String, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest { |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.arg, encoder_, arg, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest { |
| |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.arg, encoder_, arg, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithAndWithoutRequestResponseWithRequestNoResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithAndWithoutRequestResponseWithRequestNoResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWire< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| { |
| #[inline] |
| fn from_wire( |
| wire: crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de>, |
| ) -> Self { |
| Self { arg: ::fidl_next::FromWire::from_wire(wire.arg) } |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWireRef< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| { |
| #[inline] |
| fn from_wire_ref( |
| wire: &crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de>, |
| ) -> Self { |
| Self { arg: ::fidl_next::FromWireRef::from_wire_ref(&wire.arg) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct WithAndWithoutRequestResponseWithRequestEmptyResponseRequest { |
| pub arg: ::std::string::String, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest { |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.arg, encoder_, arg, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest { |
| |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.arg, encoder_, arg, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| >, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithAndWithoutRequestResponseWithRequestEmptyResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| >, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithAndWithoutRequestResponseWithRequestEmptyResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWire< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| { |
| #[inline] |
| fn from_wire( |
| wire: crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de>, |
| ) -> Self { |
| Self { arg: ::fidl_next::FromWire::from_wire(wire.arg) } |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWireRef< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| { |
| #[inline] |
| fn from_wire_ref( |
| wire: &crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de>, |
| ) -> Self { |
| Self { arg: ::fidl_next::FromWireRef::from_wire_ref(&wire.arg) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct WithAndWithoutRequestResponseWithRequestWithResponseRequest { |
| pub arg: ::std::string::String, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest { |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.arg, encoder_, arg, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest { |
| |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.arg, encoder_, arg, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| >, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithAndWithoutRequestResponseWithRequestWithResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| >, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithAndWithoutRequestResponseWithRequestWithResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWire< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| { |
| #[inline] |
| fn from_wire( |
| wire: crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de>, |
| ) -> Self { |
| Self { arg: ::fidl_next::FromWire::from_wire(wire.arg) } |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWireRef< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| { |
| #[inline] |
| fn from_wire_ref( |
| wire: &crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de>, |
| ) -> Self { |
| Self { arg: ::fidl_next::FromWireRef::from_wire_ref(&wire.arg) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct WithAndWithoutRequestResponseWithRequestWithResponseResponse { |
| pub ret: ::std::string::String, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse { |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.ret, encoder_, ret, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ret.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse { |
| |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.ret, encoder_, ret, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ret.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| >, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithAndWithoutRequestResponseWithRequestWithResponseResponse: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| >, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithAndWithoutRequestResponseWithRequestWithResponseResponse: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse< |
| 'static, |
| >, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWire< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de>, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| { |
| #[inline] |
| fn from_wire( |
| wire: crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de>, |
| ) -> Self { |
| Self { ret: ::fidl_next::FromWire::from_wire(wire.ret) } |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWireRef< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de>, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| { |
| #[inline] |
| fn from_wire_ref( |
| wire: &crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de>, |
| ) -> Self { |
| Self { ret: ::fidl_next::FromWireRef::from_wire_ref(&wire.ret) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| pub struct WithAndWithoutRequestResponseOnWithResponseRequest { |
| pub ret: ::std::string::String, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseOnWithResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest { |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.ret, encoder_, ret, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ret.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseOnWithResponseRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest { |
| |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.ret, encoder_, ret, 4294967295)?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ret.as_mut_ptr()) }; |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| ___E, |
| > for WithAndWithoutRequestResponseOnWithResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithAndWithoutRequestResponseOnWithResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| ___E, |
| > for &'a WithAndWithoutRequestResponseOnWithResponseRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithAndWithoutRequestResponseOnWithResponseRequest: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| ___E, |
| >, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox< |
| 'static, |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWire<crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'de>> |
| for WithAndWithoutRequestResponseOnWithResponseRequest |
| { |
| #[inline] |
| fn from_wire( |
| wire: crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'de>, |
| ) -> Self { |
| Self { ret: ::fidl_next::FromWire::from_wire(wire.ret) } |
| } |
| } |
| |
| impl<'de> |
| ::fidl_next::FromWireRef< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'de>, |
| > for WithAndWithoutRequestResponseOnWithResponseRequest |
| { |
| #[inline] |
| fn from_wire_ref( |
| wire: &crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'de>, |
| ) -> Self { |
| Self { ret: ::fidl_next::FromWireRef::from_wire_ref(&wire.ret) } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct WithErrorSyntaxResponseAsStructResponse { |
| pub a: i64, |
| |
| pub b: i64, |
| |
| pub c: i64, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxResponseAsStructResponse, ___E> |
| for WithErrorSyntaxResponseAsStructResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::WithErrorSyntaxResponseAsStructResponse, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::Encode<::fidl_next::WireI64, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithErrorSyntaxResponseAsStructResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithErrorSyntaxResponseAsStructResponse { |
| a, |
| b, |
| c, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(self.c, encoder_, c, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(c.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxResponseAsStructResponse, ___E> |
| for &'a WithErrorSyntaxResponseAsStructResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithErrorSyntaxResponseAsStructResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithErrorSyntaxResponseAsStructResponse { |
| |
| a, |
| b, |
| c, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(&self.a, encoder_, a, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.b, encoder_, b, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) }; |
| |
| ::fidl_next::Encode::encode(&self.c, encoder_, c, ())?; |
| |
| let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(c.as_mut_ptr()) }; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxResponseAsStructResponse>, |
| ___E, |
| > for WithErrorSyntaxResponseAsStructResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithErrorSyntaxResponseAsStructResponse: |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxResponseAsStructResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxResponseAsStructResponse>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxResponseAsStructResponse>, |
| ___E, |
| > for &'a WithErrorSyntaxResponseAsStructResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithErrorSyntaxResponseAsStructResponse: |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxResponseAsStructResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxResponseAsStructResponse>, |
| >, |
| _: (), |
| ) -> ::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::WithErrorSyntaxResponseAsStructResponse> |
| for WithErrorSyntaxResponseAsStructResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::WithErrorSyntaxResponseAsStructResponse, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <i64 as ::fidl_next::FromWire<::fidl_next::WireI64>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::WithErrorSyntaxResponseAsStructResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| |
| c: ::fidl_next::FromWire::from_wire(wire.c), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::WithErrorSyntaxResponseAsStructResponse> |
| for WithErrorSyntaxResponseAsStructResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::WithErrorSyntaxResponseAsStructResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| |
| c: ::fidl_next::FromWireRef::from_wire_ref(&wire.c), |
| } |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct WithErrorSyntaxErrorAsPrimitiveResponse {} |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, ___E> |
| for WithErrorSyntaxErrorAsPrimitiveResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| *out_ = ::core::mem::MaybeUninit::zeroed(); |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, ___E> |
| for &'a WithErrorSyntaxErrorAsPrimitiveResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse { |
| |
| _empty, |
| |
| |
| } = out_; |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse>, |
| ___E, |
| > for WithErrorSyntaxErrorAsPrimitiveResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithErrorSyntaxErrorAsPrimitiveResponse: |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse>, |
| ___E, |
| > for &'a WithErrorSyntaxErrorAsPrimitiveResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithErrorSyntaxErrorAsPrimitiveResponse: |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse>, |
| >, |
| _: (), |
| ) -> ::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::WithErrorSyntaxErrorAsPrimitiveResponse> |
| for WithErrorSyntaxErrorAsPrimitiveResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse, |
| Self, |
| > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse) -> Self { |
| Self {} |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse> |
| for WithErrorSyntaxErrorAsPrimitiveResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::WithErrorSyntaxErrorAsPrimitiveResponse) -> Self { |
| Self {} |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct WithErrorSyntaxErrorAsEnumResponse {} |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsEnumResponse, ___E> |
| for WithErrorSyntaxErrorAsEnumResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::WithErrorSyntaxErrorAsEnumResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| *out_ = ::core::mem::MaybeUninit::zeroed(); |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsEnumResponse, ___E> |
| for &'a WithErrorSyntaxErrorAsEnumResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::WithErrorSyntaxErrorAsEnumResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithErrorSyntaxErrorAsEnumResponse { |
| |
| _empty, |
| |
| |
| } = out_; |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsEnumResponse>, |
| ___E, |
| > for WithErrorSyntaxErrorAsEnumResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| WithErrorSyntaxErrorAsEnumResponse: |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsEnumResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsEnumResponse>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<'a, ___E> |
| ::fidl_next::EncodeOption< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsEnumResponse>, |
| ___E, |
| > for &'a WithErrorSyntaxErrorAsEnumResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a WithErrorSyntaxErrorAsEnumResponse: |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxErrorAsEnumResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::WithErrorSyntaxErrorAsEnumResponse>, |
| >, |
| _: (), |
| ) -> ::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::WithErrorSyntaxErrorAsEnumResponse> |
| for WithErrorSyntaxErrorAsEnumResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::WithErrorSyntaxErrorAsEnumResponse, |
| Self, |
| > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::WithErrorSyntaxErrorAsEnumResponse) -> Self { |
| Self {} |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::WithErrorSyntaxErrorAsEnumResponse> |
| for WithErrorSyntaxErrorAsEnumResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::WithErrorSyntaxErrorAsEnumResponse) -> Self { |
| Self {} |
| } |
| } |
| } |
| |
| pub mod wire { |
| |
| /// The wire type corresponding to [`ChannelProtocolMethodARequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolMethodARequest { |
| pub a: ::fidl_next::WireI64, |
| |
| pub b: ::fidl_next::WireI64, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<ChannelProtocolMethodARequest>(), 16); |
| static_assertions::const_assert_eq!(std::mem::align_of::<ChannelProtocolMethodARequest>(), 8); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelProtocolMethodARequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelProtocolMethodARequest, b), 8); |
| |
| unsafe impl ::fidl_next::Wire for ChannelProtocolMethodARequest { |
| type Owned<'de> = ChannelProtocolMethodARequest; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| a, |
| b, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(a); |
| |
| ::fidl_next::Wire::zero_padding(b); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolMethodARequest |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut a, |
| mut b, |
| |
| } = slot_; |
| } |
| |
| let _field = a.as_mut(); |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?; |
| |
| let _field = b.as_mut(); |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for ChannelProtocolMethodARequest { |
| type Natural = crate::natural::ChannelProtocolMethodARequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for ChannelProtocolMethodARequest {} |
| |
| /// The wire type corresponding to [`ChannelProtocolEventARequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolEventARequest { |
| pub a: ::fidl_next::WireI64, |
| |
| pub b: ::fidl_next::WireI64, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<ChannelProtocolEventARequest>(), 16); |
| static_assertions::const_assert_eq!(std::mem::align_of::<ChannelProtocolEventARequest>(), 8); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelProtocolEventARequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelProtocolEventARequest, b), 8); |
| |
| unsafe impl ::fidl_next::Wire for ChannelProtocolEventARequest { |
| type Owned<'de> = ChannelProtocolEventARequest; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| a, |
| b, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(a); |
| |
| ::fidl_next::Wire::zero_padding(b); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolEventARequest |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut a, |
| mut b, |
| |
| } = slot_; |
| } |
| |
| let _field = a.as_mut(); |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?; |
| |
| let _field = b.as_mut(); |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for ChannelProtocolEventARequest { |
| type Natural = crate::natural::ChannelProtocolEventARequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for ChannelProtocolEventARequest {} |
| |
| /// The wire type corresponding to [`ChannelProtocolMethodBRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolMethodBRequest { |
| pub a: ::fidl_next::WireI64, |
| |
| pub b: ::fidl_next::WireI64, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<ChannelProtocolMethodBRequest>(), 16); |
| static_assertions::const_assert_eq!(std::mem::align_of::<ChannelProtocolMethodBRequest>(), 8); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelProtocolMethodBRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelProtocolMethodBRequest, b), 8); |
| |
| unsafe impl ::fidl_next::Wire for ChannelProtocolMethodBRequest { |
| type Owned<'de> = ChannelProtocolMethodBRequest; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| a, |
| b, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(a); |
| |
| ::fidl_next::Wire::zero_padding(b); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolMethodBRequest |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut a, |
| mut b, |
| |
| } = slot_; |
| } |
| |
| let _field = a.as_mut(); |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?; |
| |
| let _field = b.as_mut(); |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for ChannelProtocolMethodBRequest { |
| type Natural = crate::natural::ChannelProtocolMethodBRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for ChannelProtocolMethodBRequest {} |
| |
| /// The wire type corresponding to [`ChannelProtocolMethodBResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct ChannelProtocolMethodBResponse { |
| pub result: ::fidl_next::WireI64, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<ChannelProtocolMethodBResponse>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<ChannelProtocolMethodBResponse>(), 8); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(ChannelProtocolMethodBResponse, result), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for ChannelProtocolMethodBResponse { |
| type Owned<'de> = ChannelProtocolMethodBResponse; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| result, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(result); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelProtocolMethodBResponse |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut result, |
| |
| } = slot_; |
| } |
| |
| let _field = result.as_mut(); |
| |
| ::fidl_next::Decode::decode(result.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for ChannelProtocolMethodBResponse { |
| type Natural = crate::natural::ChannelProtocolMethodBResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for ChannelProtocolMethodBResponse {} |
| |
| /// The wire type corresponding to [`ErrorEnum`]. |
| #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
| #[repr(transparent)] |
| pub struct ErrorEnum { |
| pub(crate) value: ::fidl_next::WireU32, |
| } |
| |
| unsafe impl ::fidl_next::Wire for ErrorEnum { |
| type Owned<'de> = Self; |
| |
| #[inline] |
| fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) { |
| // Wire enums have no padding |
| } |
| } |
| |
| impl ErrorEnum { |
| pub const ERR_FOO: ErrorEnum = ErrorEnum { value: ::fidl_next::WireU32(1) }; |
| |
| pub const ERR_BAR: ErrorEnum = ErrorEnum { value: ::fidl_next::WireU32(2) }; |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for ErrorEnum |
| where |
| ___D: ?Sized, |
| { |
| fn decode( |
| slot: ::fidl_next::Slot<'_, Self>, |
| _: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge!(let Self { value } = slot); |
| |
| match u32::from(*value) { |
| 1 | 2 => (), |
| unknown => { |
| return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)); |
| } |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::core::convert::From<crate::natural::ErrorEnum> for ErrorEnum { |
| fn from(natural: crate::natural::ErrorEnum) -> Self { |
| match natural { |
| crate::natural::ErrorEnum::ErrFoo => ErrorEnum::ERR_FOO, |
| |
| crate::natural::ErrorEnum::ErrBar => ErrorEnum::ERR_BAR, |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for ErrorEnum { |
| type Natural = crate::natural::ErrorEnum; |
| } |
| |
| impl ::fidl_next::Unconstrained for ErrorEnum {} |
| |
| /// The wire type corresponding to [`ManyParametersFifteenRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct ManyParametersFifteenRequest { |
| pub p1: bool, |
| |
| pub p2: bool, |
| |
| pub p3: bool, |
| |
| pub p4: bool, |
| |
| pub p5: bool, |
| |
| pub p6: bool, |
| |
| pub p7: bool, |
| |
| pub p8: bool, |
| |
| pub p9: bool, |
| |
| pub p10: bool, |
| |
| pub p11: bool, |
| |
| pub p12: bool, |
| |
| pub p13: bool, |
| |
| pub p14: bool, |
| |
| pub p15: bool, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<ManyParametersFifteenRequest>(), 15); |
| static_assertions::const_assert_eq!(std::mem::align_of::<ManyParametersFifteenRequest>(), 1); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p1), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p2), 1); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p3), 2); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p4), 3); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p5), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p6), 5); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p7), 6); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p8), 7); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p9), 8); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(ManyParametersFifteenRequest, p10), 9); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(ManyParametersFifteenRequest, p11), |
| 10 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(ManyParametersFifteenRequest, p12), |
| 11 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(ManyParametersFifteenRequest, p13), |
| 12 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(ManyParametersFifteenRequest, p14), |
| 13 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(ManyParametersFifteenRequest, p15), |
| 14 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for ManyParametersFifteenRequest { |
| type Owned<'de> = ManyParametersFifteenRequest; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| p1, |
| p2, |
| p3, |
| p4, |
| p5, |
| p6, |
| p7, |
| p8, |
| p9, |
| p10, |
| p11, |
| p12, |
| p13, |
| p14, |
| p15, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(p1); |
| |
| ::fidl_next::Wire::zero_padding(p2); |
| |
| ::fidl_next::Wire::zero_padding(p3); |
| |
| ::fidl_next::Wire::zero_padding(p4); |
| |
| ::fidl_next::Wire::zero_padding(p5); |
| |
| ::fidl_next::Wire::zero_padding(p6); |
| |
| ::fidl_next::Wire::zero_padding(p7); |
| |
| ::fidl_next::Wire::zero_padding(p8); |
| |
| ::fidl_next::Wire::zero_padding(p9); |
| |
| ::fidl_next::Wire::zero_padding(p10); |
| |
| ::fidl_next::Wire::zero_padding(p11); |
| |
| ::fidl_next::Wire::zero_padding(p12); |
| |
| ::fidl_next::Wire::zero_padding(p13); |
| |
| ::fidl_next::Wire::zero_padding(p14); |
| |
| ::fidl_next::Wire::zero_padding(p15); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for ManyParametersFifteenRequest |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut p1, |
| mut p2, |
| mut p3, |
| mut p4, |
| mut p5, |
| mut p6, |
| mut p7, |
| mut p8, |
| mut p9, |
| mut p10, |
| mut p11, |
| mut p12, |
| mut p13, |
| mut p14, |
| mut p15, |
| |
| } = slot_; |
| } |
| |
| let _field = p1.as_mut(); |
| |
| ::fidl_next::Decode::decode(p1.as_mut(), decoder_, ())?; |
| |
| let _field = p2.as_mut(); |
| |
| ::fidl_next::Decode::decode(p2.as_mut(), decoder_, ())?; |
| |
| let _field = p3.as_mut(); |
| |
| ::fidl_next::Decode::decode(p3.as_mut(), decoder_, ())?; |
| |
| let _field = p4.as_mut(); |
| |
| ::fidl_next::Decode::decode(p4.as_mut(), decoder_, ())?; |
| |
| let _field = p5.as_mut(); |
| |
| ::fidl_next::Decode::decode(p5.as_mut(), decoder_, ())?; |
| |
| let _field = p6.as_mut(); |
| |
| ::fidl_next::Decode::decode(p6.as_mut(), decoder_, ())?; |
| |
| let _field = p7.as_mut(); |
| |
| ::fidl_next::Decode::decode(p7.as_mut(), decoder_, ())?; |
| |
| let _field = p8.as_mut(); |
| |
| ::fidl_next::Decode::decode(p8.as_mut(), decoder_, ())?; |
| |
| let _field = p9.as_mut(); |
| |
| ::fidl_next::Decode::decode(p9.as_mut(), decoder_, ())?; |
| |
| let _field = p10.as_mut(); |
| |
| ::fidl_next::Decode::decode(p10.as_mut(), decoder_, ())?; |
| |
| let _field = p11.as_mut(); |
| |
| ::fidl_next::Decode::decode(p11.as_mut(), decoder_, ())?; |
| |
| let _field = p12.as_mut(); |
| |
| ::fidl_next::Decode::decode(p12.as_mut(), decoder_, ())?; |
| |
| let _field = p13.as_mut(); |
| |
| ::fidl_next::Decode::decode(p13.as_mut(), decoder_, ())?; |
| |
| let _field = p14.as_mut(); |
| |
| ::fidl_next::Decode::decode(p14.as_mut(), decoder_, ())?; |
| |
| let _field = p15.as_mut(); |
| |
| ::fidl_next::Decode::decode(p15.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for ManyParametersFifteenRequest { |
| type Natural = crate::natural::ManyParametersFifteenRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for ManyParametersFifteenRequest {} |
| |
| /// The wire type corresponding to [`TheUnion`]. |
| #[repr(transparent)] |
| pub struct TheUnion<'de> { |
| pub(crate) raw: ::fidl_next::RawWireUnion, |
| pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>, |
| } |
| |
| impl<'de> Drop for TheUnion<'de> { |
| fn drop(&mut self) { |
| match self.raw.ordinal() { |
| 1 => { |
| let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireU32>() }; |
| } |
| |
| _ => (), |
| } |
| } |
| } |
| |
| unsafe impl ::fidl_next::Wire for TheUnion<'static> { |
| type Owned<'de> = TheUnion<'de>; |
| |
| #[inline] |
| fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge!(let Self { raw, _phantom: _ } = out); |
| ::fidl_next::RawWireUnion::zero_padding(raw); |
| } |
| } |
| |
| pub mod the_union { |
| pub enum Ref<'de> { |
| V(&'de ::fidl_next::WireU32), |
| |
| UnknownOrdinal_(u64), |
| } |
| } |
| |
| impl<'de> TheUnion<'de> { |
| pub fn as_ref(&self) -> crate::wire::the_union::Ref<'_> { |
| match self.raw.ordinal() { |
| 1 => crate::wire::the_union::Ref::V(unsafe { |
| self.raw.get().deref_unchecked::<::fidl_next::WireU32>() |
| }), |
| |
| unknown => crate::wire::the_union::Ref::UnknownOrdinal_(unknown), |
| } |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for TheUnion<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| mut slot: ::fidl_next::Slot<'_, Self>, |
| decoder: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut()); |
| match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) { |
| 1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireU32>( |
| raw, |
| decoder, |
| (), |
| )?, |
| |
| _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?, |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::core::fmt::Debug for TheUnion<'de> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| match self.raw.ordinal() { |
| 1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireU32>().fmt(f) }, |
| _ => unsafe { ::core::hint::unreachable_unchecked() }, |
| } |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural for TheUnion<'de> { |
| type Natural = crate::natural::TheUnion; |
| } |
| |
| impl ::fidl_next::Unconstrained for TheUnion<'static> {} |
| |
| /// The wire type corresponding to [`MethodWithUnionUnionMethodRequest`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct MethodWithUnionUnionMethodRequest<'de> { |
| pub u: crate::wire::TheUnion<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<MethodWithUnionUnionMethodRequest<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<MethodWithUnionUnionMethodRequest<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(MethodWithUnionUnionMethodRequest<'_>, u), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for MethodWithUnionUnionMethodRequest<'static> { |
| type Owned<'de> = MethodWithUnionUnionMethodRequest<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| u, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(u); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for MethodWithUnionUnionMethodRequest<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut u, |
| |
| } = slot_; |
| } |
| |
| let _field = u.as_mut(); |
| |
| ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural for MethodWithUnionUnionMethodRequest<'de> { |
| type Natural = crate::natural::MethodWithUnionUnionMethodRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for MethodWithUnionUnionMethodRequest<'static> {} |
| |
| /// The wire type corresponding to [`MethodWithUnionUnionMethodResponse`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct MethodWithUnionUnionMethodResponse<'de> { |
| pub u: crate::wire_optional::TheUnion<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<MethodWithUnionUnionMethodResponse<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<MethodWithUnionUnionMethodResponse<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(MethodWithUnionUnionMethodResponse<'_>, u), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for MethodWithUnionUnionMethodResponse<'static> { |
| type Owned<'de> = MethodWithUnionUnionMethodResponse<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| u, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(u); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for MethodWithUnionUnionMethodResponse<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut u, |
| |
| } = slot_; |
| } |
| |
| let _field = u.as_mut(); |
| |
| ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural for MethodWithUnionUnionMethodResponse<'de> { |
| type Natural = crate::natural::MethodWithUnionUnionMethodResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for MethodWithUnionUnionMethodResponse<'static> {} |
| |
| /// The wire type corresponding to [`WithAndWithoutRequestResponseNoRequestWithResponseResponse`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de> { |
| pub ret: ::fidl_next::WireString<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithAndWithoutRequestResponseNoRequestWithResponseResponse<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithAndWithoutRequestResponseNoRequestWithResponseResponse<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithAndWithoutRequestResponseNoRequestWithResponseResponse<'_>, ret), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire |
| for WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static> |
| { |
| type Owned<'de> = WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| ret, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(ret); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> |
| for WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut ret, |
| |
| } = slot_; |
| } |
| |
| let _field = ret.as_mut(); |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| ::fidl_next::Decode::decode(ret.as_mut(), decoder_, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural |
| for WithAndWithoutRequestResponseNoRequestWithResponseResponse<'de> |
| { |
| type Natural = crate::natural::WithAndWithoutRequestResponseNoRequestWithResponseResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained |
| for WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static> |
| { |
| } |
| |
| /// The wire type corresponding to [`WithAndWithoutRequestResponseWithRequestNoResponseRequest`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de> { |
| pub arg: ::fidl_next::WireString<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithAndWithoutRequestResponseWithRequestNoResponseRequest<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithAndWithoutRequestResponseWithRequestNoResponseRequest<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithAndWithoutRequestResponseWithRequestNoResponseRequest<'_>, arg), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire |
| for WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static> |
| { |
| type Owned<'de> = WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| arg, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(arg); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> |
| for WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut arg, |
| |
| } = slot_; |
| } |
| |
| let _field = arg.as_mut(); |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| ::fidl_next::Decode::decode(arg.as_mut(), decoder_, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural |
| for WithAndWithoutRequestResponseWithRequestNoResponseRequest<'de> |
| { |
| type Natural = crate::natural::WithAndWithoutRequestResponseWithRequestNoResponseRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained |
| for WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static> |
| { |
| } |
| |
| /// The wire type corresponding to [`WithAndWithoutRequestResponseWithRequestEmptyResponseRequest`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de> { |
| pub arg: ::fidl_next::WireString<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'_>, arg), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire |
| for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static> |
| { |
| type Owned<'de> = WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| arg, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(arg); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> |
| for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut arg, |
| |
| } = slot_; |
| } |
| |
| let _field = arg.as_mut(); |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| ::fidl_next::Decode::decode(arg.as_mut(), decoder_, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural |
| for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'de> |
| { |
| type Natural = crate::natural::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained |
| for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static> |
| { |
| } |
| |
| /// The wire type corresponding to [`WithAndWithoutRequestResponseWithRequestWithResponseRequest`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de> { |
| pub arg: ::fidl_next::WireString<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithAndWithoutRequestResponseWithRequestWithResponseRequest<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithAndWithoutRequestResponseWithRequestWithResponseRequest<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithAndWithoutRequestResponseWithRequestWithResponseRequest<'_>, arg), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire |
| for WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static> |
| { |
| type Owned<'de> = WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| arg, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(arg); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> |
| for WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut arg, |
| |
| } = slot_; |
| } |
| |
| let _field = arg.as_mut(); |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| ::fidl_next::Decode::decode(arg.as_mut(), decoder_, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural |
| for WithAndWithoutRequestResponseWithRequestWithResponseRequest<'de> |
| { |
| type Natural = crate::natural::WithAndWithoutRequestResponseWithRequestWithResponseRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained |
| for WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static> |
| { |
| } |
| |
| /// The wire type corresponding to [`WithAndWithoutRequestResponseWithRequestWithResponseResponse`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de> { |
| pub ret: ::fidl_next::WireString<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithAndWithoutRequestResponseWithRequestWithResponseResponse<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithAndWithoutRequestResponseWithRequestWithResponseResponse<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithAndWithoutRequestResponseWithRequestWithResponseResponse<'_>, ret), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire |
| for WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static> |
| { |
| type Owned<'de> = WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| ret, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(ret); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> |
| for WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut ret, |
| |
| } = slot_; |
| } |
| |
| let _field = ret.as_mut(); |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| ::fidl_next::Decode::decode(ret.as_mut(), decoder_, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural |
| for WithAndWithoutRequestResponseWithRequestWithResponseResponse<'de> |
| { |
| type Natural = crate::natural::WithAndWithoutRequestResponseWithRequestWithResponseResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained |
| for WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static> |
| { |
| } |
| |
| /// The wire type corresponding to [`WithAndWithoutRequestResponseOnWithResponseRequest`]. |
| #[derive(Debug)] |
| #[repr(C)] |
| pub struct WithAndWithoutRequestResponseOnWithResponseRequest<'de> { |
| pub ret: ::fidl_next::WireString<'de>, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithAndWithoutRequestResponseOnWithResponseRequest<'_>>(), |
| 16 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithAndWithoutRequestResponseOnWithResponseRequest<'_>>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithAndWithoutRequestResponseOnWithResponseRequest<'_>, ret), |
| 0 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for WithAndWithoutRequestResponseOnWithResponseRequest<'static> { |
| type Owned<'de> = WithAndWithoutRequestResponseOnWithResponseRequest<'de>; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| ret, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(ret); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> |
| for WithAndWithoutRequestResponseOnWithResponseRequest<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut ret, |
| |
| } = slot_; |
| } |
| |
| let _field = ret.as_mut(); |
| ::fidl_next::Constrained::validate(_field, 4294967295)?; |
| ::fidl_next::Decode::decode(ret.as_mut(), decoder_, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural for WithAndWithoutRequestResponseOnWithResponseRequest<'de> { |
| type Natural = crate::natural::WithAndWithoutRequestResponseOnWithResponseRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for WithAndWithoutRequestResponseOnWithResponseRequest<'static> {} |
| |
| /// The wire type corresponding to [`WithErrorSyntaxResponseAsStructResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WithErrorSyntaxResponseAsStructResponse { |
| pub a: ::fidl_next::WireI64, |
| |
| pub b: ::fidl_next::WireI64, |
| |
| pub c: ::fidl_next::WireI64, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithErrorSyntaxResponseAsStructResponse>(), |
| 24 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithErrorSyntaxResponseAsStructResponse>(), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithErrorSyntaxResponseAsStructResponse, a), |
| 0 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithErrorSyntaxResponseAsStructResponse, b), |
| 8 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WithErrorSyntaxResponseAsStructResponse, c), |
| 16 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for WithErrorSyntaxResponseAsStructResponse { |
| type Owned<'de> = WithErrorSyntaxResponseAsStructResponse; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| a, |
| b, |
| c, |
| |
| } = &mut *out_; |
| } |
| |
| ::fidl_next::Wire::zero_padding(a); |
| |
| ::fidl_next::Wire::zero_padding(b); |
| |
| ::fidl_next::Wire::zero_padding(c); |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for WithErrorSyntaxResponseAsStructResponse |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut a, |
| mut b, |
| mut c, |
| |
| } = slot_; |
| } |
| |
| let _field = a.as_mut(); |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?; |
| |
| let _field = b.as_mut(); |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?; |
| |
| let _field = c.as_mut(); |
| |
| ::fidl_next::Decode::decode(c.as_mut(), decoder_, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WithErrorSyntaxResponseAsStructResponse { |
| type Natural = crate::natural::WithErrorSyntaxResponseAsStructResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for WithErrorSyntaxResponseAsStructResponse {} |
| |
| /// The wire type corresponding to [`WithErrorSyntaxErrorAsPrimitiveResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WithErrorSyntaxErrorAsPrimitiveResponse { |
| pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithErrorSyntaxErrorAsPrimitiveResponse>(), |
| 1 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithErrorSyntaxErrorAsPrimitiveResponse>(), |
| 1 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for WithErrorSyntaxErrorAsPrimitiveResponse { |
| type Owned<'de> = WithErrorSyntaxErrorAsPrimitiveResponse; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| _empty, |
| |
| |
| } = &mut *out_; |
| } |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for WithErrorSyntaxErrorAsPrimitiveResponse |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut _empty, |
| |
| |
| } = slot_; |
| } |
| |
| if _empty.as_bytes() != &[0u8] { |
| return Err(::fidl_next::DecodeError::InvalidEmptyStruct); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WithErrorSyntaxErrorAsPrimitiveResponse { |
| type Natural = crate::natural::WithErrorSyntaxErrorAsPrimitiveResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for WithErrorSyntaxErrorAsPrimitiveResponse {} |
| |
| /// The wire type corresponding to [`WithErrorSyntaxErrorAsEnumResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WithErrorSyntaxErrorAsEnumResponse { |
| pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WithErrorSyntaxErrorAsEnumResponse>(), |
| 1 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WithErrorSyntaxErrorAsEnumResponse>(), |
| 1 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for WithErrorSyntaxErrorAsEnumResponse { |
| type Owned<'de> = WithErrorSyntaxErrorAsEnumResponse; |
| |
| #[inline] |
| fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge! { |
| let Self { |
| |
| _empty, |
| |
| |
| } = &mut *out_; |
| } |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for WithErrorSyntaxErrorAsEnumResponse |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| { |
| fn decode( |
| slot_: ::fidl_next::Slot<'_, Self>, |
| decoder_: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge! { |
| let Self { |
| |
| mut _empty, |
| |
| |
| } = slot_; |
| } |
| |
| if _empty.as_bytes() != &[0u8] { |
| return Err(::fidl_next::DecodeError::InvalidEmptyStruct); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WithErrorSyntaxErrorAsEnumResponse { |
| type Natural = crate::natural::WithErrorSyntaxErrorAsEnumResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for WithErrorSyntaxErrorAsEnumResponse {} |
| } |
| |
| pub mod wire_optional { |
| |
| #[repr(transparent)] |
| pub struct TheUnion<'de> { |
| pub(crate) raw: ::fidl_next::RawWireUnion, |
| pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>, |
| } |
| |
| unsafe impl ::fidl_next::Wire for TheUnion<'static> { |
| type Owned<'de> = TheUnion<'de>; |
| |
| #[inline] |
| fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) { |
| ::fidl_next::munge!(let Self { raw, _phantom: _ } = out); |
| ::fidl_next::RawWireUnion::zero_padding(raw); |
| } |
| } |
| |
| impl<'de> TheUnion<'de> { |
| pub fn is_some(&self) -> bool { |
| self.raw.is_some() |
| } |
| |
| pub fn is_none(&self) -> bool { |
| self.raw.is_none() |
| } |
| |
| pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::TheUnion<'de>> { |
| if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None } |
| } |
| |
| pub fn into_option(self) -> ::core::option::Option<crate::wire::TheUnion<'de>> { |
| if self.is_some() { |
| Some(crate::wire::TheUnion { raw: self.raw, _phantom: ::core::marker::PhantomData }) |
| } else { |
| None |
| } |
| } |
| } |
| |
| unsafe impl<___D> ::fidl_next::Decode<___D> for TheUnion<'static> |
| where |
| ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized, |
| ___D: ::fidl_next::Decoder, |
| { |
| fn decode( |
| mut slot: ::fidl_next::Slot<'_, Self>, |
| decoder: &mut ___D, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::DecodeError> { |
| ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut()); |
| match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) { |
| 1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireU32>( |
| raw, |
| decoder, |
| (), |
| )?, |
| |
| 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?, |
| _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?, |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl<'de> ::core::fmt::Debug for TheUnion<'de> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| self.as_ref().fmt(f) |
| } |
| } |
| |
| impl<'de> ::fidl_next::IntoNatural for TheUnion<'de> { |
| type Natural = ::core::option::Option<crate::natural::TheUnion>; |
| } |
| |
| impl ::fidl_next::Unconstrained for TheUnion<'static> {} |
| } |
| |
| pub mod generic { |
| |
| pub struct ChannelProtocolMethodARequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodARequest, ___E> |
| for ChannelProtocolMethodARequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodARequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodARequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct ChannelProtocolEventARequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ChannelProtocolEventARequest, ___E> |
| for ChannelProtocolEventARequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolEventARequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolEventARequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct ChannelProtocolMethodBRequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBRequest, ___E> |
| for ChannelProtocolMethodBRequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodBRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodBRequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct ChannelProtocolMethodBResponse<T0> { |
| pub result: T0, |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ChannelProtocolMethodBResponse, ___E> |
| for ChannelProtocolMethodBResponse<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelProtocolMethodBResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ChannelProtocolMethodBResponse { |
| |
| result, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.result, encoder_, result, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct ManyParametersFifteenRequest< |
| T0, |
| T1, |
| T2, |
| T3, |
| T4, |
| T5, |
| T6, |
| T7, |
| T8, |
| T9, |
| T10, |
| T11, |
| T12, |
| T13, |
| T14, |
| > { |
| pub p1: T0, |
| |
| pub p2: T1, |
| |
| pub p3: T2, |
| |
| pub p4: T3, |
| |
| pub p5: T4, |
| |
| pub p6: T5, |
| |
| pub p7: T6, |
| |
| pub p8: T7, |
| |
| pub p9: T8, |
| |
| pub p10: T9, |
| |
| pub p11: T10, |
| |
| pub p12: T11, |
| |
| pub p13: T12, |
| |
| pub p14: T13, |
| |
| pub p15: T14, |
| } |
| |
| unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> |
| ::fidl_next::Encode<crate::wire::ManyParametersFifteenRequest, ___E> |
| for ManyParametersFifteenRequest< |
| T0, |
| T1, |
| T2, |
| T3, |
| T4, |
| T5, |
| T6, |
| T7, |
| T8, |
| T9, |
| T10, |
| T11, |
| T12, |
| T13, |
| T14, |
| > |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<bool, ___E>, |
| T1: ::fidl_next::Encode<bool, ___E>, |
| T2: ::fidl_next::Encode<bool, ___E>, |
| T3: ::fidl_next::Encode<bool, ___E>, |
| T4: ::fidl_next::Encode<bool, ___E>, |
| T5: ::fidl_next::Encode<bool, ___E>, |
| T6: ::fidl_next::Encode<bool, ___E>, |
| T7: ::fidl_next::Encode<bool, ___E>, |
| T8: ::fidl_next::Encode<bool, ___E>, |
| T9: ::fidl_next::Encode<bool, ___E>, |
| T10: ::fidl_next::Encode<bool, ___E>, |
| T11: ::fidl_next::Encode<bool, ___E>, |
| T12: ::fidl_next::Encode<bool, ___E>, |
| T13: ::fidl_next::Encode<bool, ___E>, |
| T14: ::fidl_next::Encode<bool, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::ManyParametersFifteenRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::ManyParametersFifteenRequest { |
| |
| p1, |
| p2, |
| p3, |
| p4, |
| p5, |
| p6, |
| p7, |
| p8, |
| p9, |
| p10, |
| p11, |
| p12, |
| p13, |
| p14, |
| p15, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.p1, encoder_, p1, ())?; |
| |
| ::fidl_next::Encode::encode(self.p2, encoder_, p2, ())?; |
| |
| ::fidl_next::Encode::encode(self.p3, encoder_, p3, ())?; |
| |
| ::fidl_next::Encode::encode(self.p4, encoder_, p4, ())?; |
| |
| ::fidl_next::Encode::encode(self.p5, encoder_, p5, ())?; |
| |
| ::fidl_next::Encode::encode(self.p6, encoder_, p6, ())?; |
| |
| ::fidl_next::Encode::encode(self.p7, encoder_, p7, ())?; |
| |
| ::fidl_next::Encode::encode(self.p8, encoder_, p8, ())?; |
| |
| ::fidl_next::Encode::encode(self.p9, encoder_, p9, ())?; |
| |
| ::fidl_next::Encode::encode(self.p10, encoder_, p10, ())?; |
| |
| ::fidl_next::Encode::encode(self.p11, encoder_, p11, ())?; |
| |
| ::fidl_next::Encode::encode(self.p12, encoder_, p12, ())?; |
| |
| ::fidl_next::Encode::encode(self.p13, encoder_, p13, ())?; |
| |
| ::fidl_next::Encode::encode(self.p14, encoder_, p14, ())?; |
| |
| ::fidl_next::Encode::encode(self.p15, encoder_, p15, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MethodWithUnionUnionMethodRequest<T0> { |
| pub u: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodRequest<'static>, ___E> |
| for MethodWithUnionUnionMethodRequest<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<crate::wire::TheUnion<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MethodWithUnionUnionMethodRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MethodWithUnionUnionMethodRequest { |
| |
| u, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.u, encoder_, u, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MethodWithUnionUnionMethodResponse<T0> { |
| pub u: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode<crate::wire::MethodWithUnionUnionMethodResponse<'static>, ___E> |
| for MethodWithUnionUnionMethodResponse<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<crate::wire_optional::TheUnion<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MethodWithUnionUnionMethodResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MethodWithUnionUnionMethodResponse { |
| |
| u, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.u, encoder_, u, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithAndWithoutRequestResponseNoRequestWithResponseResponse<T0> { |
| pub ret: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseNoRequestWithResponseResponse<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse { |
| |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.ret, encoder_, ret, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithAndWithoutRequestResponseWithRequestNoResponseRequest<T0> { |
| pub arg: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestNoResponseRequest<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest { |
| |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.arg, encoder_, arg, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<T0> { |
| pub arg: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest { |
| |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.arg, encoder_, arg, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithAndWithoutRequestResponseWithRequestWithResponseRequest<T0> { |
| pub arg: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseRequest<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest { |
| |
| arg, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.arg, encoder_, arg, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithAndWithoutRequestResponseWithRequestWithResponseResponse<T0> { |
| pub ret: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseWithRequestWithResponseResponse<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse { |
| |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.ret, encoder_, ret, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithAndWithoutRequestResponseOnWithResponseRequest<T0> { |
| pub ret: T0, |
| } |
| |
| unsafe impl<___E, T0> |
| ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| ___E, |
| > for WithAndWithoutRequestResponseOnWithResponseRequest<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| ___E: ::fidl_next::Encoder, |
| T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest { |
| |
| ret, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.ret, encoder_, ret, 4294967295)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct WithErrorSyntaxResponseAsStructResponse<T0, T1, T2> { |
| pub a: T0, |
| |
| pub b: T1, |
| |
| pub c: T2, |
| } |
| |
| unsafe impl<___E, T0, T1, T2> |
| ::fidl_next::Encode<crate::wire::WithErrorSyntaxResponseAsStructResponse, ___E> |
| for WithErrorSyntaxResponseAsStructResponse<T0, T1, T2> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| T2: ::fidl_next::Encode<::fidl_next::WireI64, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::WithErrorSyntaxResponseAsStructResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::WithErrorSyntaxResponseAsStructResponse { |
| |
| a, |
| b, |
| c, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| ::fidl_next::Encode::encode(self.c, encoder_, c, ())?; |
| |
| Ok(()) |
| } |
| } |
| } |
| |
| pub use self::natural::*; |
| |
| /// The type corresponding to the AnotherDiscoverableProtocol protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct AnotherDiscoverableProtocol; |
| |
| impl ::fidl_next::Discoverable for AnotherDiscoverableProtocol { |
| const PROTOCOL_NAME: &'static str = "fake.library.FakeProtocol"; |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| impl ::fidl_next::HasTransport for AnotherDiscoverableProtocol { |
| type Transport = ::fidl_next::fuchsia::zx::Channel; |
| } |
| |
| pub mod another_discoverable_protocol { |
| pub mod prelude { |
| pub use crate::{ |
| AnotherDiscoverableProtocol, AnotherDiscoverableProtocolClientHandler, |
| AnotherDiscoverableProtocolServerHandler, another_discoverable_protocol, |
| }; |
| } |
| |
| mod ___detail { |
| unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::AnotherDiscoverableProtocol |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = AnotherDiscoverableProtocolClient<___T>; |
| type Server = AnotherDiscoverableProtocolServer<___T>; |
| } |
| |
| /// The client for the `AnotherDiscoverableProtocol` protocol. |
| #[repr(transparent)] |
| pub struct AnotherDiscoverableProtocolClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> AnotherDiscoverableProtocolClient<___T> where ___T: ::fidl_next::Transport {} |
| |
| /// The server for the `AnotherDiscoverableProtocol` protocol. |
| #[repr(transparent)] |
| pub struct AnotherDiscoverableProtocolServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> AnotherDiscoverableProtocolServer<___T> where ___T: ::fidl_next::Transport {} |
| } |
| } |
| |
| /// A client handler for the AnotherDiscoverableProtocol protocol. |
| /// |
| /// See [`AnotherDiscoverableProtocol`] for more details. |
| pub trait AnotherDiscoverableProtocolClientHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___T> AnotherDiscoverableProtocolClientHandler<___T> for ::fidl_next::IgnoreEvents where |
| ___T: ::fidl_next::Transport |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for AnotherDiscoverableProtocol |
| where |
| ___H: AnotherDiscoverableProtocolClientHandler<___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 AnotherDiscoverableProtocol protocol. |
| /// |
| /// See [`AnotherDiscoverableProtocol`] for more details. |
| pub trait AnotherDiscoverableProtocolServerHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for AnotherDiscoverableProtocol |
| where |
| ___H: AnotherDiscoverableProtocolServerHandler<___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 { |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// The type corresponding to the DiscoverableProtocol protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct DiscoverableProtocol; |
| |
| impl ::fidl_next::Discoverable for DiscoverableProtocol { |
| const PROTOCOL_NAME: &'static str = "test.protocols.DiscoverableProtocol"; |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| impl ::fidl_next::HasTransport for DiscoverableProtocol { |
| type Transport = ::fidl_next::fuchsia::zx::Channel; |
| } |
| |
| pub mod discoverable_protocol { |
| pub mod prelude { |
| pub use crate::{ |
| DiscoverableProtocol, DiscoverableProtocolClientHandler, |
| DiscoverableProtocolServerHandler, discoverable_protocol, |
| }; |
| } |
| |
| pub struct Method; |
| |
| impl ::fidl_next::Method for Method { |
| const ORDINAL: u64 = 3455873048082739435; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::DiscoverableProtocol; |
| |
| type Request = (); |
| } |
| |
| mod ___detail { |
| unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DiscoverableProtocol |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = DiscoverableProtocolClient<___T>; |
| type Server = DiscoverableProtocolServer<___T>; |
| } |
| |
| /// The client for the `DiscoverableProtocol` protocol. |
| #[repr(transparent)] |
| pub struct DiscoverableProtocolClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> DiscoverableProtocolClient<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn method(&self) -> ::fidl_next::SendFuture<'_, ___T> { |
| ::fidl_next::SendFuture::from_untyped(self.client.send_one_way( |
| 3455873048082739435, |
| <super::Method as ::fidl_next::Method>::FLEXIBILITY, |
| (), |
| )) |
| } |
| } |
| |
| /// The server for the `DiscoverableProtocol` protocol. |
| #[repr(transparent)] |
| pub struct DiscoverableProtocolServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> DiscoverableProtocolServer<___T> where ___T: ::fidl_next::Transport {} |
| } |
| } |
| |
| /// A client handler for the DiscoverableProtocol protocol. |
| /// |
| /// See [`DiscoverableProtocol`] for more details. |
| pub trait DiscoverableProtocolClientHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___T> DiscoverableProtocolClientHandler<___T> for ::fidl_next::IgnoreEvents where |
| ___T: ::fidl_next::Transport |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DiscoverableProtocol |
| where |
| ___H: DiscoverableProtocolClientHandler<___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 DiscoverableProtocol protocol. |
| /// |
| /// See [`DiscoverableProtocol`] for more details. |
| pub trait DiscoverableProtocolServerHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| fn method(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DiscoverableProtocol |
| where |
| ___H: DiscoverableProtocolServerHandler<___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 { |
| 3455873048082739435 => { |
| handler.method().await; |
| Ok(()) |
| } |
| |
| 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 { |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// The type corresponding to the ManyParameters protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct ManyParameters; |
| |
| #[cfg(target_os = "fuchsia")] |
| impl ::fidl_next::HasTransport for ManyParameters { |
| type Transport = ::fidl_next::fuchsia::zx::Channel; |
| } |
| |
| pub mod many_parameters { |
| pub mod prelude { |
| pub use crate::{ |
| ManyParameters, ManyParametersClientHandler, ManyParametersServerHandler, |
| many_parameters, |
| }; |
| |
| pub use crate::natural::ManyParametersFifteenRequest; |
| } |
| |
| pub struct Fifteen; |
| |
| impl ::fidl_next::Method for Fifteen { |
| const ORDINAL: u64 = 6423043252952467815; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::ManyParameters; |
| |
| type Request = crate::wire::ManyParametersFifteenRequest; |
| } |
| |
| mod ___detail { |
| unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ManyParameters |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = ManyParametersClient<___T>; |
| type Server = ManyParametersServer<___T>; |
| } |
| |
| /// The client for the `ManyParameters` protocol. |
| #[repr(transparent)] |
| pub struct ManyParametersClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> ManyParametersClient<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn fifteen( |
| &self, |
| |
| p1: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p2: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p3: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p4: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p5: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p6: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p7: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p8: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p9: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p10: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p11: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p12: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p13: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p14: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| |
| p15: impl ::fidl_next::Encode<bool, <___T as ::fidl_next::Transport>::SendBuffer>, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.fifteen_with(crate::generic::ManyParametersFifteenRequest { |
| p1, |
| |
| p2, |
| |
| p3, |
| |
| p4, |
| |
| p5, |
| |
| p6, |
| |
| p7, |
| |
| p8, |
| |
| p9, |
| |
| p10, |
| |
| p11, |
| |
| p12, |
| |
| p13, |
| |
| p14, |
| |
| p15, |
| }) |
| } |
| |
| pub fn fifteen_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| crate::wire::ManyParametersFifteenRequest, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped(self.client.send_one_way( |
| 6423043252952467815, |
| <super::Fifteen as ::fidl_next::Method>::FLEXIBILITY, |
| request, |
| )) |
| } |
| } |
| |
| /// The server for the `ManyParameters` protocol. |
| #[repr(transparent)] |
| pub struct ManyParametersServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> ManyParametersServer<___T> where ___T: ::fidl_next::Transport {} |
| } |
| } |
| |
| /// A client handler for the ManyParameters protocol. |
| /// |
| /// See [`ManyParameters`] for more details. |
| pub trait ManyParametersClientHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___T> ManyParametersClientHandler<___T> for ::fidl_next::IgnoreEvents where |
| ___T: ::fidl_next::Transport |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ManyParameters |
| where |
| ___H: ManyParametersClientHandler<___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 ManyParameters protocol. |
| /// |
| /// See [`ManyParameters`] for more details. |
| pub trait ManyParametersServerHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| fn fifteen( |
| &mut self, |
| |
| request: ::fidl_next::Request<many_parameters::Fifteen, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ManyParameters |
| where |
| ___H: ManyParametersServerHandler<___T> + ::core::marker::Send, |
| ___T: ::fidl_next::Transport, |
| <many_parameters::Fifteen 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 { |
| 6423043252952467815 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => { |
| handler.fifteen(::fidl_next::Request::from_decoded(decoded)).await; |
| Ok(()) |
| } |
| Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage { |
| ordinal: 6423043252952467815, |
| 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 { |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// The type corresponding to the MethodWithUnion protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct MethodWithUnion; |
| |
| #[cfg(target_os = "fuchsia")] |
| impl ::fidl_next::HasTransport for MethodWithUnion { |
| type Transport = ::fidl_next::fuchsia::zx::Channel; |
| } |
| |
| pub mod method_with_union { |
| pub mod prelude { |
| pub use crate::{ |
| MethodWithUnion, MethodWithUnionClientHandler, MethodWithUnionServerHandler, |
| method_with_union, |
| }; |
| |
| pub use crate::natural::MethodWithUnionUnionMethodRequest; |
| |
| pub use crate::natural::MethodWithUnionUnionMethodResponse; |
| } |
| |
| pub struct UnionMethod; |
| |
| impl ::fidl_next::Method for UnionMethod { |
| const ORDINAL: u64 = 4124874338266649112; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::MethodWithUnion; |
| |
| type Request = crate::wire::MethodWithUnionUnionMethodRequest<'static>; |
| } |
| |
| impl ::fidl_next::TwoWayMethod for UnionMethod { |
| type Response = crate::wire::MethodWithUnionUnionMethodResponse<'static>; |
| } |
| |
| impl<___R> ::fidl_next::Respond<___R> for UnionMethod { |
| type Output = crate::generic::MethodWithUnionUnionMethodResponse<___R>; |
| |
| fn respond(response: ___R) -> Self::Output { |
| crate::generic::MethodWithUnionUnionMethodResponse { u: response } |
| } |
| } |
| |
| mod ___detail { |
| unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::MethodWithUnion |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = MethodWithUnionClient<___T>; |
| type Server = MethodWithUnionServer<___T>; |
| } |
| |
| /// The client for the `MethodWithUnion` protocol. |
| #[repr(transparent)] |
| pub struct MethodWithUnionClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> MethodWithUnionClient<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn union_method( |
| &self, |
| |
| u: impl ::fidl_next::Encode< |
| crate::wire::TheUnion<'static>, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::UnionMethod, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder, |
| { |
| self.union_method_with(crate::generic::MethodWithUnionUnionMethodRequest { u }) |
| } |
| |
| pub fn union_method_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::UnionMethod, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| crate::wire::MethodWithUnionUnionMethodRequest<'static>, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way( |
| 4124874338266649112, |
| <super::UnionMethod as ::fidl_next::Method>::FLEXIBILITY, |
| request, |
| )) |
| } |
| } |
| |
| /// The server for the `MethodWithUnion` protocol. |
| #[repr(transparent)] |
| pub struct MethodWithUnionServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> MethodWithUnionServer<___T> where ___T: ::fidl_next::Transport {} |
| } |
| } |
| |
| /// A client handler for the MethodWithUnion protocol. |
| /// |
| /// See [`MethodWithUnion`] for more details. |
| pub trait MethodWithUnionClientHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___T> MethodWithUnionClientHandler<___T> for ::fidl_next::IgnoreEvents where |
| ___T: ::fidl_next::Transport |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for MethodWithUnion |
| where |
| ___H: MethodWithUnionClientHandler<___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 MethodWithUnion protocol. |
| /// |
| /// See [`MethodWithUnion`] for more details. |
| pub trait MethodWithUnionServerHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| fn union_method( |
| &mut self, |
| |
| request: ::fidl_next::Request<method_with_union::UnionMethod, ___T>, |
| |
| responder: ::fidl_next::Responder<method_with_union::UnionMethod, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for MethodWithUnion |
| where |
| ___H: MethodWithUnionServerHandler<___T> + ::core::marker::Send, |
| ___T: ::fidl_next::Transport, |
| <method_with_union::UnionMethod 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 { |
| 4124874338266649112 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => { |
| handler |
| .union_method(::fidl_next::Request::from_decoded(decoded), responder) |
| .await; |
| Ok(()) |
| } |
| Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage { |
| ordinal: 4124874338266649112, |
| error, |
| }), |
| } |
| } |
| |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// The type corresponding to the PlatformServer protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct PlatformServer; |
| |
| impl ::fidl_next::Discoverable for PlatformServer { |
| const PROTOCOL_NAME: &'static str = "test.protocols.PlatformServer"; |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| impl ::fidl_next::HasTransport for PlatformServer { |
| type Transport = ::fidl_next::fuchsia::zx::Channel; |
| } |
| |
| pub mod platform_server { |
| pub mod prelude { |
| pub use crate::{ |
| PlatformServer, PlatformServerClientHandler, PlatformServerServerHandler, |
| platform_server, |
| }; |
| } |
| |
| mod ___detail { |
| unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::PlatformServer |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = PlatformServerClient<___T>; |
| type Server = PlatformServerServer<___T>; |
| } |
| |
| /// The client for the `PlatformServer` protocol. |
| #[repr(transparent)] |
| pub struct PlatformServerClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> PlatformServerClient<___T> where ___T: ::fidl_next::Transport {} |
| |
| /// The server for the `PlatformServer` protocol. |
| #[repr(transparent)] |
| pub struct PlatformServerServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> PlatformServerServer<___T> where ___T: ::fidl_next::Transport {} |
| } |
| } |
| |
| /// A client handler for the PlatformServer protocol. |
| /// |
| /// See [`PlatformServer`] for more details. |
| pub trait PlatformServerClientHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___T> PlatformServerClientHandler<___T> for ::fidl_next::IgnoreEvents where |
| ___T: ::fidl_next::Transport |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for PlatformServer |
| where |
| ___H: PlatformServerClientHandler<___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 PlatformServer protocol. |
| /// |
| /// See [`PlatformServer`] for more details. |
| pub trait PlatformServerServerHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for PlatformServer |
| where |
| ___H: PlatformServerServerHandler<___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 { |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// The type corresponding to the WithAndWithoutRequestResponse protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct WithAndWithoutRequestResponse; |
| |
| #[cfg(target_os = "fuchsia")] |
| impl ::fidl_next::HasTransport for WithAndWithoutRequestResponse { |
| type Transport = ::fidl_next::fuchsia::zx::Channel; |
| } |
| |
| pub mod with_and_without_request_response { |
| pub mod prelude { |
| pub use crate::{ |
| WithAndWithoutRequestResponse, WithAndWithoutRequestResponseClientHandler, |
| WithAndWithoutRequestResponseServerHandler, with_and_without_request_response, |
| }; |
| |
| pub use crate::natural::WithAndWithoutRequestResponseNoRequestWithResponseResponse; |
| |
| pub use crate::natural::WithAndWithoutRequestResponseOnWithResponseRequest; |
| |
| pub use crate::natural::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest; |
| |
| pub use crate::natural::WithAndWithoutRequestResponseWithRequestNoResponseRequest; |
| |
| pub use crate::natural::WithAndWithoutRequestResponseWithRequestWithResponseRequest; |
| |
| pub use crate::natural::WithAndWithoutRequestResponseWithRequestWithResponseResponse; |
| } |
| |
| pub struct NoRequestNoResponse; |
| |
| impl ::fidl_next::Method for NoRequestNoResponse { |
| const ORDINAL: u64 = 5413654872775949227; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = (); |
| } |
| |
| pub struct NoRequestEmptyResponse; |
| |
| impl ::fidl_next::Method for NoRequestEmptyResponse { |
| const ORDINAL: u64 = 1631193469798418024; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = (); |
| } |
| |
| impl ::fidl_next::TwoWayMethod for NoRequestEmptyResponse { |
| type Response = (); |
| } |
| |
| impl<___R> ::fidl_next::Respond<___R> for NoRequestEmptyResponse { |
| type Output = ___R; |
| |
| fn respond(response: ___R) -> Self::Output { |
| response |
| } |
| } |
| |
| pub struct NoRequestWithResponse; |
| |
| impl ::fidl_next::Method for NoRequestWithResponse { |
| const ORDINAL: u64 = 9037369643591427517; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = (); |
| } |
| |
| impl ::fidl_next::TwoWayMethod for NoRequestWithResponse { |
| type Response = |
| crate::wire::WithAndWithoutRequestResponseNoRequestWithResponseResponse<'static>; |
| } |
| |
| impl<___R> ::fidl_next::Respond<___R> for NoRequestWithResponse { |
| type Output = |
| crate::generic::WithAndWithoutRequestResponseNoRequestWithResponseResponse<___R>; |
| |
| fn respond(response: ___R) -> Self::Output { |
| crate::generic::WithAndWithoutRequestResponseNoRequestWithResponseResponse { |
| ret: response, |
| } |
| } |
| } |
| |
| pub struct WithRequestNoResponse; |
| |
| impl ::fidl_next::Method for WithRequestNoResponse { |
| const ORDINAL: u64 = 7326057319832554103; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest<'static>; |
| } |
| |
| pub struct WithRequestEmptyResponse; |
| |
| impl ::fidl_next::Method for WithRequestEmptyResponse { |
| const ORDINAL: u64 = 2877322062572412767; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest<'static>; |
| } |
| |
| impl ::fidl_next::TwoWayMethod for WithRequestEmptyResponse { |
| type Response = (); |
| } |
| |
| impl<___R> ::fidl_next::Respond<___R> for WithRequestEmptyResponse { |
| type Output = ___R; |
| |
| fn respond(response: ___R) -> Self::Output { |
| response |
| } |
| } |
| |
| pub struct WithRequestWithResponse; |
| |
| impl ::fidl_next::Method for WithRequestWithResponse { |
| const ORDINAL: u64 = 6417226585456833969; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest<'static>; |
| } |
| |
| impl ::fidl_next::TwoWayMethod for WithRequestWithResponse { |
| type Response = |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseResponse<'static>; |
| } |
| |
| impl<___R> ::fidl_next::Respond<___R> for WithRequestWithResponse { |
| type Output = |
| crate::generic::WithAndWithoutRequestResponseWithRequestWithResponseResponse<___R>; |
| |
| fn respond(response: ___R) -> Self::Output { |
| crate::generic::WithAndWithoutRequestResponseWithRequestWithResponseResponse { |
| ret: response, |
| } |
| } |
| } |
| |
| pub struct OnEmptyResponse; |
| |
| impl ::fidl_next::Method for OnEmptyResponse { |
| const ORDINAL: u64 = 5397663296507358806; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = (); |
| } |
| |
| pub struct OnWithResponse; |
| |
| impl ::fidl_next::Method for OnWithResponse { |
| const ORDINAL: u64 = 5811598563493228968; |
| const FLEXIBILITY: ::fidl_next::protocol::Flexibility = |
| ::fidl_next::protocol::Flexibility::Strict; |
| |
| type Protocol = crate::WithAndWithoutRequestResponse; |
| |
| type Request = crate::wire::WithAndWithoutRequestResponseOnWithResponseRequest<'static>; |
| } |
| |
| mod ___detail { |
| unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WithAndWithoutRequestResponse |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = WithAndWithoutRequestResponseClient<___T>; |
| type Server = WithAndWithoutRequestResponseServer<___T>; |
| } |
| |
| /// The client for the `WithAndWithoutRequestResponse` protocol. |
| #[repr(transparent)] |
| pub struct WithAndWithoutRequestResponseClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> WithAndWithoutRequestResponseClient<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn no_request_no_response(&self) -> ::fidl_next::SendFuture<'_, ___T> { |
| ::fidl_next::SendFuture::from_untyped(self.client.send_one_way( |
| 5413654872775949227, |
| <super::NoRequestNoResponse as ::fidl_next::Method>::FLEXIBILITY, |
| (), |
| )) |
| } |
| |
| pub fn no_request_empty_response( |
| &self, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::NoRequestEmptyResponse, ___T> { |
| ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way( |
| 1631193469798418024, |
| <super::NoRequestEmptyResponse as ::fidl_next::Method>::FLEXIBILITY, |
| (), |
| )) |
| } |
| |
| pub fn no_request_with_response( |
| &self, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::NoRequestWithResponse, ___T> { |
| ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way( |
| 9037369643591427517, |
| <super::NoRequestWithResponse as ::fidl_next::Method>::FLEXIBILITY, |
| (), |
| )) |
| } |
| |
| pub fn with_request_no_response( |
| &self, |
| |
| arg: impl ::fidl_next::Encode< |
| ::fidl_next::WireString<'static>, |
| <___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::Encoder, |
| { |
| self.with_request_no_response_with( |
| crate::generic::WithAndWithoutRequestResponseWithRequestNoResponseRequest { |
| arg, |
| }, |
| ) |
| } |
| |
| pub fn with_request_no_response_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestNoResponseRequest< |
| 'static, |
| >, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped(self.client.send_one_way( |
| 7326057319832554103, |
| <super::WithRequestNoResponse as ::fidl_next::Method>::FLEXIBILITY, |
| request, |
| )) |
| } |
| |
| pub fn with_request_empty_response( |
| &self, |
| |
| arg: impl ::fidl_next::Encode< |
| ::fidl_next::WireString<'static>, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::WithRequestEmptyResponse, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder, |
| { |
| self.with_request_empty_response_with( |
| crate::generic::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest { |
| arg, |
| }, |
| ) |
| } |
| |
| pub fn with_request_empty_response_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::WithRequestEmptyResponse, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest< |
| 'static, |
| >, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way( |
| 2877322062572412767, |
| <super::WithRequestEmptyResponse as ::fidl_next::Method>::FLEXIBILITY, |
| request, |
| )) |
| } |
| |
| pub fn with_request_with_response( |
| &self, |
| |
| arg: impl ::fidl_next::Encode< |
| ::fidl_next::WireString<'static>, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::WithRequestWithResponse, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder, |
| { |
| self.with_request_with_response_with( |
| crate::generic::WithAndWithoutRequestResponseWithRequestWithResponseRequest { |
| arg, |
| }, |
| ) |
| } |
| |
| pub fn with_request_with_response_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::WithRequestWithResponse, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| crate::wire::WithAndWithoutRequestResponseWithRequestWithResponseRequest< |
| 'static, |
| >, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way( |
| 6417226585456833969, |
| <super::WithRequestWithResponse as ::fidl_next::Method>::FLEXIBILITY, |
| request, |
| )) |
| } |
| } |
| |
| /// The server for the `WithAndWithoutRequestResponse` protocol. |
| #[repr(transparent)] |
| pub struct WithAndWithoutRequestResponseServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> WithAndWithoutRequestResponseServer<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn on_empty_response(&self) -> ::fidl_next::SendFuture<'_, ___T> { |
| ::fidl_next::SendFuture::from_untyped(self.server.send_event( |
| 5397663296507358806, |
| <super::OnEmptyResponse as ::fidl_next::Method>::FLEXIBILITY, |
| (), |
| )) |
| } |
| |
| pub fn on_with_response( |
| &self, |
| |
| ret: impl ::fidl_next::Encode< |
| ::fidl_next::WireString<'static>, |
| <___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::Encoder, |
| { |
| self.on_with_response_with( |
| crate::generic::WithAndWithoutRequestResponseOnWithResponseRequest { ret }, |
| ) |
| } |
| |
| pub fn on_with_response_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <super::OnWithResponse as ::fidl_next::Method>::Request, |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped(self.server.send_event( |
| 5811598563493228968, |
| <super::OnWithResponse as ::fidl_next::Method>::FLEXIBILITY, |
| request, |
| )) |
| } |
| } |
| } |
| } |
| |
| /// A client handler for the WithAndWithoutRequestResponse protocol. |
| /// |
| /// See [`WithAndWithoutRequestResponse`] for more details. |
| pub trait WithAndWithoutRequestResponseClientHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| fn on_empty_response( |
| &mut self, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn on_with_response( |
| &mut self, |
| |
| request: ::fidl_next::Request<with_and_without_request_response::OnWithResponse, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___T> WithAndWithoutRequestResponseClientHandler<___T> for ::fidl_next::IgnoreEvents |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| async fn on_empty_response(&mut self) {} |
| |
| async fn on_with_response( |
| &mut self, |
| |
| _: ::fidl_next::Request<with_and_without_request_response::OnWithResponse, ___T>, |
| ) { |
| } |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WithAndWithoutRequestResponse |
| where |
| ___H: WithAndWithoutRequestResponseClientHandler<___T> + ::core::marker::Send, |
| ___T: ::fidl_next::Transport, |
| <with_and_without_request_response::OnWithResponse 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 { |
| 5397663296507358806 => { |
| handler.on_empty_response().await; |
| Ok(()) |
| } |
| |
| 5811598563493228968 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => { |
| handler.on_with_response(::fidl_next::Request::from_decoded(decoded)).await; |
| Ok(()) |
| } |
| Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage { |
| ordinal: 5811598563493228968, |
| error, |
| }), |
| }, |
| |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// A server handler for the WithAndWithoutRequestResponse protocol. |
| /// |
| /// See [`WithAndWithoutRequestResponse`] for more details. |
| pub trait WithAndWithoutRequestResponseServerHandler< |
| #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport, |
| > |
| { |
| fn no_request_no_response( |
| &mut self, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn no_request_empty_response( |
| &mut self, |
| |
| responder: ::fidl_next::Responder< |
| with_and_without_request_response::NoRequestEmptyResponse, |
| ___T, |
| >, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn no_request_with_response( |
| &mut self, |
| |
| responder: ::fidl_next::Responder< |
| with_and_without_request_response::NoRequestWithResponse, |
| ___T, |
| >, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn with_request_no_response( |
| &mut self, |
| |
| request: ::fidl_next::Request< |
| with_and_without_request_response::WithRequestNoResponse, |
| ___T, |
| >, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn with_request_empty_response( |
| &mut self, |
| |
| request: ::fidl_next::Request< |
| with_and_without_request_response::WithRequestEmptyResponse, |
| ___T, |
| >, |
| |
| responder: ::fidl_next::Responder< |
| with_and_without_request_response::WithRequestEmptyResponse, |
| ___T, |
| >, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn with_request_with_response( |
| &mut self, |
| |
| request: ::fidl_next::Request< |
| with_and_without_request_response::WithRequestWithResponse, |
| ___T, |
| >, |
| |
| responder: ::fidl_next::Responder< |
| with_and_without_request_response::WithRequestWithResponse, |
| ___T, |
| >, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WithAndWithoutRequestResponse |
| where |
| ___H: WithAndWithoutRequestResponseServerHandler<___T> + ::core::marker::Send, |
| ___T: ::fidl_next::Transport, |
| <with_and_without_request_response::WithRequestNoResponse as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <with_and_without_request_response::WithRequestEmptyResponse as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <with_and_without_request_response::WithRequestWithResponse 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 { |
| 5413654872775949227 => { |
| handler.no_request_no_response().await; |
| Ok(()) |
| } |
| |
| 7326057319832554103 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => { |
| handler |
| .with_request_no_response(::fidl_next::Request::from_decoded(decoded)) |
| .await; |
| Ok(()) |
| } |
| Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage { |
| ordinal: 7326057319832554103, |
| 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 { |
| 1631193469798418024 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| handler.no_request_empty_response(responder).await; |
| Ok(()) |
| } |
| |
| 9037369643591427517 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| handler.no_request_with_response(responder).await; |
| Ok(()) |
| } |
| |
| 2877322062572412767 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => { |
| handler |
| .with_request_empty_response( |
| ::fidl_next::Request::from_decoded(decoded), |
| responder, |
| ) |
| .await; |
| Ok(()) |
| } |
| Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage { |
| ordinal: 2877322062572412767, |
| error, |
| }), |
| } |
| } |
| |
| 6417226585456833969 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => { |
| handler |
| .with_request_with_response( |
| ::fidl_next::Request::from_decoded(decoded), |
| responder, |
| ) |
| .await; |
| Ok(()) |
| } |
| Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage { |
| ordinal: 6417226585456833969, |
| error, |
| }), |
| } |
| } |
| |
| ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)), |
| } |
| } |
| } |
| |
| /// Compatibility shims which mimic some API surfaces of the current Rust bindings. |
| pub mod compat { |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `AnotherDiscoverableProtocol` |
| /// protocol. |
| pub type AnotherDiscoverableProtocolProxy = |
| ::fidl_next::Client<crate::AnotherDiscoverableProtocol>; |
| |
| impl ::fidl_next::CompatFrom<crate::AnotherDiscoverableProtocol> |
| for ::fidl_test_protocols::AnotherDiscoverableProtocolMarker |
| { |
| fn compat_from(_: crate::AnotherDiscoverableProtocol) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::AnotherDiscoverableProtocolMarker> |
| for crate::AnotherDiscoverableProtocol |
| { |
| fn compat_from(_: ::fidl_test_protocols::AnotherDiscoverableProtocolMarker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::AnotherDiscoverableProtocolProxy> |
| for crate::AnotherDiscoverableProtocol |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocols::AnotherDiscoverableProtocolProxy, |
| ) -> ::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::ChannelProtocolMethodARequest> |
| for ::fidl_test_protocols::ChannelProtocolMethodARequest |
| { |
| #[inline] |
| fn compat_from(value: crate::ChannelProtocolMethodARequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolMethodARequest> |
| for crate::ChannelProtocolMethodARequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::ChannelProtocolMethodARequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::ChannelProtocolEventARequest> |
| for ::fidl_test_protocols::ChannelProtocolEventARequest |
| { |
| #[inline] |
| fn compat_from(value: crate::ChannelProtocolEventARequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolEventARequest> |
| for crate::ChannelProtocolEventARequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::ChannelProtocolEventARequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::ChannelProtocolMethodBRequest> |
| for ::fidl_test_protocols::ChannelProtocolMethodBRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::ChannelProtocolMethodBRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolMethodBRequest> |
| for crate::ChannelProtocolMethodBRequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::ChannelProtocolMethodBRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::ChannelProtocolMethodBResponse> |
| for ::fidl_test_protocols::ChannelProtocolMethodBResponse |
| { |
| #[inline] |
| fn compat_from(value: crate::ChannelProtocolMethodBResponse) -> Self { |
| Self { result: ::fidl_next::CompatFrom::compat_from(value.result) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ChannelProtocolMethodBResponse> |
| for crate::ChannelProtocolMethodBResponse |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::ChannelProtocolMethodBResponse) -> Self { |
| Self { result: ::fidl_next::CompatFrom::compat_from(value.result) } |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `DiscoverableProtocol` |
| /// protocol. |
| pub type DiscoverableProtocolProxy = ::fidl_next::Client<crate::DiscoverableProtocol>; |
| |
| impl ::fidl_next::CompatFrom<crate::DiscoverableProtocol> |
| for ::fidl_test_protocols::DiscoverableProtocolMarker |
| { |
| fn compat_from(_: crate::DiscoverableProtocol) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::DiscoverableProtocolMarker> |
| for crate::DiscoverableProtocol |
| { |
| fn compat_from(_: ::fidl_test_protocols::DiscoverableProtocolMarker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::DiscoverableProtocolProxy> |
| for crate::DiscoverableProtocol |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocols::DiscoverableProtocolProxy, |
| ) -> ::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::ErrorEnum> for ::fidl_test_protocols::ErrorEnum { |
| fn compat_from(value: crate::ErrorEnum) -> Self { |
| match value { |
| crate::ErrorEnum::ErrFoo => Self::ErrFoo, |
| |
| crate::ErrorEnum::ErrBar => Self::ErrBar, |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ErrorEnum> for crate::ErrorEnum { |
| fn compat_from(value: ::fidl_test_protocols::ErrorEnum) -> Self { |
| match value { |
| ::fidl_test_protocols::ErrorEnum::ErrFoo => Self::ErrFoo, |
| |
| ::fidl_test_protocols::ErrorEnum::ErrBar => Self::ErrBar, |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::ManyParametersFifteenRequest> |
| for ::fidl_test_protocols::ManyParametersFifteenRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::ManyParametersFifteenRequest) -> Self { |
| Self { |
| p1: ::fidl_next::CompatFrom::compat_from(value.p1), |
| |
| p2: ::fidl_next::CompatFrom::compat_from(value.p2), |
| |
| p3: ::fidl_next::CompatFrom::compat_from(value.p3), |
| |
| p4: ::fidl_next::CompatFrom::compat_from(value.p4), |
| |
| p5: ::fidl_next::CompatFrom::compat_from(value.p5), |
| |
| p6: ::fidl_next::CompatFrom::compat_from(value.p6), |
| |
| p7: ::fidl_next::CompatFrom::compat_from(value.p7), |
| |
| p8: ::fidl_next::CompatFrom::compat_from(value.p8), |
| |
| p9: ::fidl_next::CompatFrom::compat_from(value.p9), |
| |
| p10: ::fidl_next::CompatFrom::compat_from(value.p10), |
| |
| p11: ::fidl_next::CompatFrom::compat_from(value.p11), |
| |
| p12: ::fidl_next::CompatFrom::compat_from(value.p12), |
| |
| p13: ::fidl_next::CompatFrom::compat_from(value.p13), |
| |
| p14: ::fidl_next::CompatFrom::compat_from(value.p14), |
| |
| p15: ::fidl_next::CompatFrom::compat_from(value.p15), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ManyParametersFifteenRequest> |
| for crate::ManyParametersFifteenRequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::ManyParametersFifteenRequest) -> Self { |
| Self { |
| p1: ::fidl_next::CompatFrom::compat_from(value.p1), |
| |
| p2: ::fidl_next::CompatFrom::compat_from(value.p2), |
| |
| p3: ::fidl_next::CompatFrom::compat_from(value.p3), |
| |
| p4: ::fidl_next::CompatFrom::compat_from(value.p4), |
| |
| p5: ::fidl_next::CompatFrom::compat_from(value.p5), |
| |
| p6: ::fidl_next::CompatFrom::compat_from(value.p6), |
| |
| p7: ::fidl_next::CompatFrom::compat_from(value.p7), |
| |
| p8: ::fidl_next::CompatFrom::compat_from(value.p8), |
| |
| p9: ::fidl_next::CompatFrom::compat_from(value.p9), |
| |
| p10: ::fidl_next::CompatFrom::compat_from(value.p10), |
| |
| p11: ::fidl_next::CompatFrom::compat_from(value.p11), |
| |
| p12: ::fidl_next::CompatFrom::compat_from(value.p12), |
| |
| p13: ::fidl_next::CompatFrom::compat_from(value.p13), |
| |
| p14: ::fidl_next::CompatFrom::compat_from(value.p14), |
| |
| p15: ::fidl_next::CompatFrom::compat_from(value.p15), |
| } |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `ManyParameters` |
| /// protocol. |
| pub type ManyParametersProxy = ::fidl_next::Client<crate::ManyParameters>; |
| |
| impl ::fidl_next::CompatFrom<crate::ManyParameters> |
| for ::fidl_test_protocols::ManyParametersMarker |
| { |
| fn compat_from(_: crate::ManyParameters) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::ManyParametersMarker> |
| for crate::ManyParameters |
| { |
| fn compat_from(_: ::fidl_test_protocols::ManyParametersMarker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::ManyParametersProxy> |
| for crate::ManyParameters |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocols::ManyParametersProxy, |
| ) -> ::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::TheUnion> for ::fidl_test_protocols::TheUnion { |
| fn compat_from(value: crate::TheUnion) -> Self { |
| match value { |
| crate::TheUnion::V(value) => Self::V(::fidl_next::CompatFrom::compat_from(value)), |
| |
| crate::TheUnion::UnknownOrdinal_(unknown_ordinal) => { |
| Self::__SourceBreaking { unknown_ordinal } |
| } |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::TheUnion> for crate::TheUnion { |
| fn compat_from(value: ::fidl_test_protocols::TheUnion) -> Self { |
| match value { |
| ::fidl_test_protocols::TheUnion::V(value) => { |
| Self::V(::fidl_next::CompatFrom::compat_from(value)) |
| } |
| |
| ::fidl_test_protocols::TheUnion::__SourceBreaking { unknown_ordinal } => { |
| Self::UnknownOrdinal_(unknown_ordinal) |
| } |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MethodWithUnionUnionMethodRequest> |
| for ::fidl_test_protocols::MethodWithUnionUnionMethodRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::MethodWithUnionUnionMethodRequest) -> Self { |
| Self { u: ::fidl_next::CompatFrom::compat_from(value.u) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::MethodWithUnionUnionMethodRequest> |
| for crate::MethodWithUnionUnionMethodRequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::MethodWithUnionUnionMethodRequest) -> Self { |
| Self { u: ::fidl_next::CompatFrom::compat_from(value.u) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MethodWithUnionUnionMethodResponse> |
| for ::fidl_test_protocols::MethodWithUnionUnionMethodResponse |
| { |
| #[inline] |
| fn compat_from(value: crate::MethodWithUnionUnionMethodResponse) -> Self { |
| Self { u: ::fidl_next::CompatFrom::compat_from(value.u) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::MethodWithUnionUnionMethodResponse> |
| for crate::MethodWithUnionUnionMethodResponse |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocols::MethodWithUnionUnionMethodResponse) -> Self { |
| Self { u: ::fidl_next::CompatFrom::compat_from(value.u) } |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `MethodWithUnion` |
| /// protocol. |
| pub type MethodWithUnionProxy = ::fidl_next::Client<crate::MethodWithUnion>; |
| |
| impl ::fidl_next::CompatFrom<crate::MethodWithUnion> |
| for ::fidl_test_protocols::MethodWithUnionMarker |
| { |
| fn compat_from(_: crate::MethodWithUnion) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::MethodWithUnionMarker> |
| for crate::MethodWithUnion |
| { |
| fn compat_from(_: ::fidl_test_protocols::MethodWithUnionMarker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::MethodWithUnionProxy> |
| for crate::MethodWithUnion |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocols::MethodWithUnionProxy, |
| ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> { |
| let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel(); |
| let client_end = ::fidl_next::ClientEnd::from_untyped(channel); |
| ::fidl_next::ClientDispatcher::new(client_end) |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `PlatformServer` |
| /// protocol. |
| pub type PlatformServerProxy = ::fidl_next::Client<crate::PlatformServer>; |
| |
| impl ::fidl_next::CompatFrom<crate::PlatformServer> |
| for ::fidl_test_protocols::PlatformServer_Marker |
| { |
| fn compat_from(_: crate::PlatformServer) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::PlatformServer_Marker> |
| for crate::PlatformServer |
| { |
| fn compat_from(_: ::fidl_test_protocols::PlatformServer_Marker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::PlatformServer_Proxy> |
| for crate::PlatformServer |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocols::PlatformServer_Proxy, |
| ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> { |
| let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel(); |
| let client_end = ::fidl_next::ClientEnd::from_untyped(channel); |
| ::fidl_next::ClientDispatcher::new(client_end) |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponseNoRequestWithResponseResponse> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: crate::WithAndWithoutRequestResponseNoRequestWithResponseResponse, |
| ) -> Self { |
| Self { ret: ::fidl_next::CompatFrom::compat_from(value.ret) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocols::WithAndWithoutRequestResponseNoRequestWithResponseResponse, |
| > for crate::WithAndWithoutRequestResponseNoRequestWithResponseResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithAndWithoutRequestResponseNoRequestWithResponseResponse, |
| ) -> Self { |
| Self { ret: ::fidl_next::CompatFrom::compat_from(value.ret) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponseWithRequestNoResponseRequest> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: crate::WithAndWithoutRequestResponseWithRequestNoResponseRequest, |
| ) -> Self { |
| Self { arg: ::fidl_next::CompatFrom::compat_from(value.arg) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest, |
| > for crate::WithAndWithoutRequestResponseWithRequestNoResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest, |
| ) -> Self { |
| Self { arg: ::fidl_next::CompatFrom::compat_from(value.arg) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: crate::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest, |
| ) -> Self { |
| Self { arg: ::fidl_next::CompatFrom::compat_from(value.arg) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest, |
| > for crate::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest, |
| ) -> Self { |
| Self { arg: ::fidl_next::CompatFrom::compat_from(value.arg) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponseWithRequestWithResponseRequest> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: crate::WithAndWithoutRequestResponseWithRequestWithResponseRequest, |
| ) -> Self { |
| Self { arg: ::fidl_next::CompatFrom::compat_from(value.arg) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest, |
| > for crate::WithAndWithoutRequestResponseWithRequestWithResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest, |
| ) -> Self { |
| Self { arg: ::fidl_next::CompatFrom::compat_from(value.arg) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponseWithRequestWithResponseResponse> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: crate::WithAndWithoutRequestResponseWithRequestWithResponseResponse, |
| ) -> Self { |
| Self { ret: ::fidl_next::CompatFrom::compat_from(value.ret) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseResponse, |
| > for crate::WithAndWithoutRequestResponseWithRequestWithResponseResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseResponse, |
| ) -> Self { |
| Self { ret: ::fidl_next::CompatFrom::compat_from(value.ret) } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponseOnWithResponseRequest> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::WithAndWithoutRequestResponseOnWithResponseRequest) -> Self { |
| Self { ret: ::fidl_next::CompatFrom::compat_from(value.ret) } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest, |
| > for crate::WithAndWithoutRequestResponseOnWithResponseRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest, |
| ) -> Self { |
| Self { ret: ::fidl_next::CompatFrom::compat_from(value.ret) } |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `WithAndWithoutRequestResponse` |
| /// protocol. |
| pub type WithAndWithoutRequestResponseProxy = |
| ::fidl_next::Client<crate::WithAndWithoutRequestResponse>; |
| |
| impl ::fidl_next::CompatFrom<crate::WithAndWithoutRequestResponse> |
| for ::fidl_test_protocols::WithAndWithoutRequestResponseMarker |
| { |
| fn compat_from(_: crate::WithAndWithoutRequestResponse) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithAndWithoutRequestResponseMarker> |
| for crate::WithAndWithoutRequestResponse |
| { |
| fn compat_from(_: ::fidl_test_protocols::WithAndWithoutRequestResponseMarker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocols::WithAndWithoutRequestResponseProxy> |
| for crate::WithAndWithoutRequestResponse |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocols::WithAndWithoutRequestResponseProxy, |
| ) -> ::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::WithErrorSyntaxResponseAsStructResponse> |
| for ::fidl_test_protocols::WithErrorSyntaxResponseAsStructResponse |
| { |
| #[inline] |
| fn compat_from(value: crate::WithErrorSyntaxResponseAsStructResponse) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| |
| c: ::fidl_next::CompatFrom::compat_from(value.c), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocols::WithErrorSyntaxResponseAsStructResponse> |
| for crate::WithErrorSyntaxResponseAsStructResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocols::WithErrorSyntaxResponseAsStructResponse, |
| ) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| |
| c: ::fidl_next::CompatFrom::compat_from(value.c), |
| } |
| } |
| } |
| } |