| // 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 LocalStructPayload { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::LocalStructPayload, ___E> for LocalStructPayload |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::LocalStructPayload, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::LocalStructPayload>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::LocalStructPayload { |
| 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::LocalStructPayload, ___E> |
| for &'a LocalStructPayload |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::LocalStructPayload>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::LocalStructPayload { |
| |
| 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::LocalStructPayload>, |
| ___E, |
| > for LocalStructPayload |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| LocalStructPayload: ::fidl_next::Encode<crate::wire::LocalStructPayload, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::LocalStructPayload>, |
| >, |
| _: (), |
| ) -> ::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::LocalStructPayload>, |
| ___E, |
| > for &'a LocalStructPayload |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a LocalStructPayload: ::fidl_next::Encode<crate::wire::LocalStructPayload, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::LocalStructPayload>, |
| >, |
| _: (), |
| ) -> ::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::LocalStructPayload> for LocalStructPayload { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::LocalStructPayload, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::LocalStructPayload) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::LocalStructPayload> for LocalStructPayload { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::LocalStructPayload) -> 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 MainProtocolOneWayAnonRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::MainProtocolOneWayAnonRequest, ___E> |
| for MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::MainProtocolOneWayAnonRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolOneWayAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolOneWayAnonRequest { |
| 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::MainProtocolOneWayAnonRequest, ___E> |
| for &'a MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolOneWayAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolOneWayAnonRequest { |
| |
| 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::MainProtocolOneWayAnonRequest>, |
| ___E, |
| > for MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolOneWayAnonRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolOneWayAnonRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolOneWayAnonRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolOneWayAnonRequest>, |
| ___E, |
| > for &'a MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MainProtocolOneWayAnonRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolOneWayAnonRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolOneWayAnonRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolOneWayAnonRequest> |
| for MainProtocolOneWayAnonRequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::MainProtocolOneWayAnonRequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::MainProtocolOneWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::MainProtocolOneWayAnonRequest> |
| for MainProtocolOneWayAnonRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MainProtocolOneWayAnonRequest) -> 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 MainProtocolTwoWayAnonRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonRequest, ___E> |
| for MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::MainProtocolTwoWayAnonRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolTwoWayAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonRequest { |
| 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::MainProtocolTwoWayAnonRequest, ___E> |
| for &'a MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolTwoWayAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonRequest { |
| |
| 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::MainProtocolTwoWayAnonRequest>, |
| ___E, |
| > for MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonRequest>, |
| ___E, |
| > for &'a MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MainProtocolTwoWayAnonRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonRequest> |
| for MainProtocolTwoWayAnonRequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::MainProtocolTwoWayAnonRequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::MainProtocolTwoWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::MainProtocolTwoWayAnonRequest> |
| for MainProtocolTwoWayAnonRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MainProtocolTwoWayAnonRequest) -> 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 MainProtocolTwoWayAnonResponse { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonResponse, ___E> |
| for MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::MainProtocolTwoWayAnonResponse, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolTwoWayAnonResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonResponse { |
| 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::MainProtocolTwoWayAnonResponse, ___E> |
| for &'a MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolTwoWayAnonResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonResponse { |
| |
| 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::MainProtocolTwoWayAnonResponse>, |
| ___E, |
| > for MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonResponse: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonResponse>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonResponse>, |
| ___E, |
| > for &'a MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MainProtocolTwoWayAnonResponse: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonResponse>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonResponse> |
| for MainProtocolTwoWayAnonResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::MainProtocolTwoWayAnonResponse, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::MainProtocolTwoWayAnonResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::MainProtocolTwoWayAnonResponse> |
| for MainProtocolTwoWayAnonResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MainProtocolTwoWayAnonResponse) -> 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 MainProtocolTwoWayAnonWithErrorRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorRequest, ___E> |
| for MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::MainProtocolTwoWayAnonWithErrorRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MainProtocolTwoWayAnonWithErrorRequest, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonWithErrorRequest { |
| 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::MainProtocolTwoWayAnonWithErrorRequest, ___E> |
| for &'a MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MainProtocolTwoWayAnonWithErrorRequest, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonWithErrorRequest { |
| |
| 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::MainProtocolTwoWayAnonWithErrorRequest>, |
| ___E, |
| > for MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonWithErrorRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonWithErrorRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonWithErrorRequest>, |
| ___E, |
| > for &'a MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MainProtocolTwoWayAnonWithErrorRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonWithErrorRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonWithErrorRequest> |
| for MainProtocolTwoWayAnonWithErrorRequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::MainProtocolTwoWayAnonWithErrorRequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::MainProtocolTwoWayAnonWithErrorRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::MainProtocolTwoWayAnonWithErrorRequest> |
| for MainProtocolTwoWayAnonWithErrorRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MainProtocolTwoWayAnonWithErrorRequest) -> 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 MainProtocolTwoWayAnonWithErrorResponse { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorResponse, ___E> |
| for MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::MainProtocolTwoWayAnonWithErrorResponse, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MainProtocolTwoWayAnonWithErrorResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonWithErrorResponse { |
| 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::MainProtocolTwoWayAnonWithErrorResponse, ___E> |
| for &'a MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MainProtocolTwoWayAnonWithErrorResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonWithErrorResponse { |
| |
| 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::MainProtocolTwoWayAnonWithErrorResponse>, |
| ___E, |
| > for MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonWithErrorResponse: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonWithErrorResponse>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonWithErrorResponse>, |
| ___E, |
| > for &'a MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MainProtocolTwoWayAnonWithErrorResponse: |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorResponse, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolTwoWayAnonWithErrorResponse>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolTwoWayAnonWithErrorResponse> |
| for MainProtocolTwoWayAnonWithErrorResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::MainProtocolTwoWayAnonWithErrorResponse, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::MainProtocolTwoWayAnonWithErrorResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::MainProtocolTwoWayAnonWithErrorResponse> |
| for MainProtocolTwoWayAnonWithErrorResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MainProtocolTwoWayAnonWithErrorResponse) -> 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 MainProtocolOnAnonRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<crate::wire::MainProtocolOnAnonRequest, ___E> |
| for MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| crate::wire::MainProtocolOnAnonRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolOnAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolOnAnonRequest { |
| 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::MainProtocolOnAnonRequest, ___E> |
| for &'a MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolOnAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolOnAnonRequest { |
| |
| 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::MainProtocolOnAnonRequest>, |
| ___E, |
| > for MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolOnAnonRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolOnAnonRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolOnAnonRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolOnAnonRequest>, |
| ___E, |
| > for &'a MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| &'a MainProtocolOnAnonRequest: |
| ::fidl_next::Encode<crate::wire::MainProtocolOnAnonRequest, ___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit< |
| ::fidl_next::WireBox<'static, crate::wire::MainProtocolOnAnonRequest>, |
| >, |
| _: (), |
| ) -> ::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::MainProtocolOnAnonRequest> for MainProtocolOnAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| crate::wire::MainProtocolOnAnonRequest, |
| Self, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled() |
| && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION |
| .is_enabled(), |
| ) |
| }; |
| |
| #[inline] |
| fn from_wire(wire: crate::wire::MainProtocolOnAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::FromWireRef<crate::wire::MainProtocolOnAnonRequest> |
| for MainProtocolOnAnonRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &crate::wire::MainProtocolOnAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| } |
| |
| pub mod wire { |
| |
| /// The wire type corresponding to [`LocalStructPayload`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct LocalStructPayload { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<LocalStructPayload>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<LocalStructPayload>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(LocalStructPayload, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(LocalStructPayload, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for LocalStructPayload { |
| type Owned<'de> = LocalStructPayload; |
| |
| #[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 LocalStructPayload |
| 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 LocalStructPayload { |
| type Natural = crate::natural::LocalStructPayload; |
| } |
| |
| impl ::fidl_next::Unconstrained for LocalStructPayload {} |
| |
| /// The wire type corresponding to [`MainProtocolOneWayAnonRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolOneWayAnonRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<MainProtocolOneWayAnonRequest>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<MainProtocolOneWayAnonRequest>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolOneWayAnonRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolOneWayAnonRequest, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for MainProtocolOneWayAnonRequest { |
| type Owned<'de> = MainProtocolOneWayAnonRequest; |
| |
| #[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 MainProtocolOneWayAnonRequest |
| 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 MainProtocolOneWayAnonRequest { |
| type Natural = crate::natural::MainProtocolOneWayAnonRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for MainProtocolOneWayAnonRequest {} |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<MainProtocolTwoWayAnonRequest>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<MainProtocolTwoWayAnonRequest>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolTwoWayAnonRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolTwoWayAnonRequest, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for MainProtocolTwoWayAnonRequest { |
| type Owned<'de> = MainProtocolTwoWayAnonRequest; |
| |
| #[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 MainProtocolTwoWayAnonRequest |
| 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 MainProtocolTwoWayAnonRequest { |
| type Natural = crate::natural::MainProtocolTwoWayAnonRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for MainProtocolTwoWayAnonRequest {} |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonResponse { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<MainProtocolTwoWayAnonResponse>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<MainProtocolTwoWayAnonResponse>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolTwoWayAnonResponse, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolTwoWayAnonResponse, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for MainProtocolTwoWayAnonResponse { |
| type Owned<'de> = MainProtocolTwoWayAnonResponse; |
| |
| #[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 MainProtocolTwoWayAnonResponse |
| 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 MainProtocolTwoWayAnonResponse { |
| type Natural = crate::natural::MainProtocolTwoWayAnonResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for MainProtocolTwoWayAnonResponse {} |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonWithErrorRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonWithErrorRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<MainProtocolTwoWayAnonWithErrorRequest>(), |
| 8 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<MainProtocolTwoWayAnonWithErrorRequest>(), |
| 4 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(MainProtocolTwoWayAnonWithErrorRequest, a), |
| 0 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(MainProtocolTwoWayAnonWithErrorRequest, b), |
| 4 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for MainProtocolTwoWayAnonWithErrorRequest { |
| type Owned<'de> = MainProtocolTwoWayAnonWithErrorRequest; |
| |
| #[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 MainProtocolTwoWayAnonWithErrorRequest |
| 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 MainProtocolTwoWayAnonWithErrorRequest { |
| type Natural = crate::natural::MainProtocolTwoWayAnonWithErrorRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for MainProtocolTwoWayAnonWithErrorRequest {} |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonWithErrorResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonWithErrorResponse { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<MainProtocolTwoWayAnonWithErrorResponse>(), |
| 8 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<MainProtocolTwoWayAnonWithErrorResponse>(), |
| 4 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(MainProtocolTwoWayAnonWithErrorResponse, a), |
| 0 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(MainProtocolTwoWayAnonWithErrorResponse, b), |
| 4 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for MainProtocolTwoWayAnonWithErrorResponse { |
| type Owned<'de> = MainProtocolTwoWayAnonWithErrorResponse; |
| |
| #[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 MainProtocolTwoWayAnonWithErrorResponse |
| 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 MainProtocolTwoWayAnonWithErrorResponse { |
| type Natural = crate::natural::MainProtocolTwoWayAnonWithErrorResponse; |
| } |
| |
| impl ::fidl_next::Unconstrained for MainProtocolTwoWayAnonWithErrorResponse {} |
| |
| /// The wire type corresponding to [`MainProtocolOnAnonRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolOnAnonRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| |
| static_assertions::const_assert_eq!(std::mem::size_of::<MainProtocolOnAnonRequest>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<MainProtocolOnAnonRequest>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolOnAnonRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(MainProtocolOnAnonRequest, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for MainProtocolOnAnonRequest { |
| type Owned<'de> = MainProtocolOnAnonRequest; |
| |
| #[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 MainProtocolOnAnonRequest |
| 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 MainProtocolOnAnonRequest { |
| type Natural = crate::natural::MainProtocolOnAnonRequest; |
| } |
| |
| impl ::fidl_next::Unconstrained for MainProtocolOnAnonRequest {} |
| } |
| |
| pub mod wire_optional {} |
| |
| pub mod generic { |
| |
| pub struct LocalStructPayload<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::LocalStructPayload, ___E> |
| for LocalStructPayload<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::LocalStructPayload>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::LocalStructPayload { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MainProtocolOneWayAnonRequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::MainProtocolOneWayAnonRequest, ___E> |
| for MainProtocolOneWayAnonRequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolOneWayAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolOneWayAnonRequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MainProtocolTwoWayAnonRequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonRequest, ___E> |
| for MainProtocolTwoWayAnonRequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolTwoWayAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonRequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MainProtocolTwoWayAnonResponse<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonResponse, ___E> |
| for MainProtocolTwoWayAnonResponse<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolTwoWayAnonResponse>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonResponse { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MainProtocolTwoWayAnonWithErrorRequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorRequest, ___E> |
| for MainProtocolTwoWayAnonWithErrorRequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MainProtocolTwoWayAnonWithErrorRequest, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonWithErrorRequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MainProtocolTwoWayAnonWithErrorResponse<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> |
| ::fidl_next::Encode<crate::wire::MainProtocolTwoWayAnonWithErrorResponse, ___E> |
| for MainProtocolTwoWayAnonWithErrorResponse<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit< |
| crate::wire::MainProtocolTwoWayAnonWithErrorResponse, |
| >, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolTwoWayAnonWithErrorResponse { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct MainProtocolOnAnonRequest<T0, T1> { |
| pub a: T0, |
| |
| pub b: T1, |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::MainProtocolOnAnonRequest, ___E> |
| for MainProtocolOnAnonRequest<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| T1: ::fidl_next::Encode<::fidl_next::WireU32, ___E>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<crate::wire::MainProtocolOnAnonRequest>, |
| _: (), |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let crate::wire::MainProtocolOnAnonRequest { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a, ())?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b, ())?; |
| |
| Ok(()) |
| } |
| } |
| } |
| |
| pub use self::natural::*; |
| |
| /// Compatibility shims which mimic some API surfaces of the current Rust bindings. |
| pub mod compat { |
| |
| impl ::fidl_next::CompatFrom<crate::LocalStructPayload> |
| for ::fidl_test_protocolpayloads::LocalStructPayload |
| { |
| #[inline] |
| fn compat_from(value: crate::LocalStructPayload) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocolpayloads::LocalStructPayload> |
| for crate::LocalStructPayload |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocolpayloads::LocalStructPayload) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocolOneWayAnonRequest> |
| for ::fidl_test_protocolpayloads::MainProtocolOneWayAnonRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::MainProtocolOneWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocolpayloads::MainProtocolOneWayAnonRequest> |
| for crate::MainProtocolOneWayAnonRequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocolpayloads::MainProtocolOneWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocolTwoWayAnonRequest> |
| for ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::MainProtocolTwoWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocolpayloads::MainProtocolTwoWayAnonRequest> |
| for crate::MainProtocolTwoWayAnonRequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocolTwoWayAnonResponse> |
| for ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonResponse |
| { |
| #[inline] |
| fn compat_from(value: crate::MainProtocolTwoWayAnonResponse) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocolpayloads::MainProtocolTwoWayAnonResponse> |
| for crate::MainProtocolTwoWayAnonResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonResponse, |
| ) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocolTwoWayAnonWithErrorRequest> |
| for ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonWithErrorRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::MainProtocolTwoWayAnonWithErrorRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonWithErrorRequest, |
| > for crate::MainProtocolTwoWayAnonWithErrorRequest |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonWithErrorRequest, |
| ) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocolTwoWayAnonWithErrorResponse> |
| for ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonWithErrorResponse |
| { |
| #[inline] |
| fn compat_from(value: crate::MainProtocolTwoWayAnonWithErrorResponse) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl |
| ::fidl_next::CompatFrom< |
| ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonWithErrorResponse, |
| > for crate::MainProtocolTwoWayAnonWithErrorResponse |
| { |
| #[inline] |
| fn compat_from( |
| value: ::fidl_test_protocolpayloads::MainProtocolTwoWayAnonWithErrorResponse, |
| ) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocolOnAnonRequest> |
| for ::fidl_test_protocolpayloads::MainProtocolOnAnonRequest |
| { |
| #[inline] |
| fn compat_from(value: crate::MainProtocolOnAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocolpayloads::MainProtocolOnAnonRequest> |
| for crate::MainProtocolOnAnonRequest |
| { |
| #[inline] |
| fn compat_from(value: ::fidl_test_protocolpayloads::MainProtocolOnAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::CompatFrom::compat_from(value.a), |
| |
| b: ::fidl_next::CompatFrom::compat_from(value.b), |
| } |
| } |
| } |
| } |