| // DO NOT EDIT: This file is machine-generated by fidlgen |
| #![warn(clippy::all)] |
| #![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)] |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct LocalStructPayload { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for LocalStructPayload { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireLocalStructPayload> = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireLocalStructPayload; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for LocalStructPayload |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for LocalStructPayload |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for LocalStructPayload { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireLocalStructPayload>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LocalStructPayload |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| LocalStructPayload: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for LocalStructPayload |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| LocalStructPayload: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireLocalStructPayload> for LocalStructPayload { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireLocalStructPayload, 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: WireLocalStructPayload) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireLocalStructPayload { |
| type Natural = LocalStructPayload; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireLocalStructPayload> for LocalStructPayload { |
| #[inline] |
| fn from_wire_ref(wire: &WireLocalStructPayload) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`LocalStructPayload`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireLocalStructPayload { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!(std::mem::size_of::<WireLocalStructPayload>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<WireLocalStructPayload>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireLocalStructPayload, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireLocalStructPayload, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for WireLocalStructPayload { |
| type Decoded<'de> = WireLocalStructPayload; |
| |
| #[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 WireLocalStructPayload |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolOneWayAnonRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for MainProtocolOneWayAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| WireMainProtocolOneWayAnonRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireMainProtocolOneWayAnonRequest; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for MainProtocolOneWayAnonRequest { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireMainProtocolOneWayAnonRequest>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolOneWayAnonRequest: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for MainProtocolOneWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolOneWayAnonRequest: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireMainProtocolOneWayAnonRequest> for MainProtocolOneWayAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| WireMainProtocolOneWayAnonRequest, |
| 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: WireMainProtocolOneWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireMainProtocolOneWayAnonRequest { |
| type Natural = MainProtocolOneWayAnonRequest; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireMainProtocolOneWayAnonRequest> for MainProtocolOneWayAnonRequest { |
| #[inline] |
| fn from_wire_ref(wire: &WireMainProtocolOneWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`MainProtocolOneWayAnonRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireMainProtocolOneWayAnonRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!(std::mem::size_of::<WireMainProtocolOneWayAnonRequest>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<WireMainProtocolOneWayAnonRequest>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolOneWayAnonRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolOneWayAnonRequest, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for WireMainProtocolOneWayAnonRequest { |
| type Decoded<'de> = WireMainProtocolOneWayAnonRequest; |
| |
| #[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 WireMainProtocolOneWayAnonRequest |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for MainProtocolTwoWayAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| WireMainProtocolTwoWayAnonRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireMainProtocolTwoWayAnonRequest; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for MainProtocolTwoWayAnonRequest { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireMainProtocolTwoWayAnonRequest>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonRequest: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for MainProtocolTwoWayAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonRequest: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireMainProtocolTwoWayAnonRequest> for MainProtocolTwoWayAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| WireMainProtocolTwoWayAnonRequest, |
| 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: WireMainProtocolTwoWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireMainProtocolTwoWayAnonRequest { |
| type Natural = MainProtocolTwoWayAnonRequest; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireMainProtocolTwoWayAnonRequest> for MainProtocolTwoWayAnonRequest { |
| #[inline] |
| fn from_wire_ref(wire: &WireMainProtocolTwoWayAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireMainProtocolTwoWayAnonRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!(std::mem::size_of::<WireMainProtocolTwoWayAnonRequest>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<WireMainProtocolTwoWayAnonRequest>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolTwoWayAnonRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolTwoWayAnonRequest, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for WireMainProtocolTwoWayAnonRequest { |
| type Decoded<'de> = WireMainProtocolTwoWayAnonRequest; |
| |
| #[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 WireMainProtocolTwoWayAnonRequest |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonResponse { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for MainProtocolTwoWayAnonResponse { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| WireMainProtocolTwoWayAnonResponse, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireMainProtocolTwoWayAnonResponse; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for MainProtocolTwoWayAnonResponse { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireMainProtocolTwoWayAnonResponse>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonResponse: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for MainProtocolTwoWayAnonResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonResponse: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireMainProtocolTwoWayAnonResponse> for MainProtocolTwoWayAnonResponse { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| WireMainProtocolTwoWayAnonResponse, |
| 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: WireMainProtocolTwoWayAnonResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireMainProtocolTwoWayAnonResponse { |
| type Natural = MainProtocolTwoWayAnonResponse; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireMainProtocolTwoWayAnonResponse> |
| for MainProtocolTwoWayAnonResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &WireMainProtocolTwoWayAnonResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireMainProtocolTwoWayAnonResponse { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!(std::mem::size_of::<WireMainProtocolTwoWayAnonResponse>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<WireMainProtocolTwoWayAnonResponse>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolTwoWayAnonResponse, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolTwoWayAnonResponse, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for WireMainProtocolTwoWayAnonResponse { |
| type Decoded<'de> = WireMainProtocolTwoWayAnonResponse; |
| |
| #[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 WireMainProtocolTwoWayAnonResponse |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonWithErrorRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for MainProtocolTwoWayAnonWithErrorRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| WireMainProtocolTwoWayAnonWithErrorRequest, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireMainProtocolTwoWayAnonWithErrorRequest; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for MainProtocolTwoWayAnonWithErrorRequest { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireMainProtocolTwoWayAnonWithErrorRequest>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonWithErrorRequest: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for MainProtocolTwoWayAnonWithErrorRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonWithErrorRequest: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireMainProtocolTwoWayAnonWithErrorRequest> |
| for MainProtocolTwoWayAnonWithErrorRequest |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| WireMainProtocolTwoWayAnonWithErrorRequest, |
| 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: WireMainProtocolTwoWayAnonWithErrorRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireMainProtocolTwoWayAnonWithErrorRequest { |
| type Natural = MainProtocolTwoWayAnonWithErrorRequest; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireMainProtocolTwoWayAnonWithErrorRequest> |
| for MainProtocolTwoWayAnonWithErrorRequest |
| { |
| #[inline] |
| fn from_wire_ref(wire: &WireMainProtocolTwoWayAnonWithErrorRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonWithErrorRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireMainProtocolTwoWayAnonWithErrorRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WireMainProtocolTwoWayAnonWithErrorRequest>(), |
| 8 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WireMainProtocolTwoWayAnonWithErrorRequest>(), |
| 4 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WireMainProtocolTwoWayAnonWithErrorRequest, a), |
| 0 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WireMainProtocolTwoWayAnonWithErrorRequest, b), |
| 4 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for WireMainProtocolTwoWayAnonWithErrorRequest { |
| type Decoded<'de> = WireMainProtocolTwoWayAnonWithErrorRequest; |
| |
| #[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 WireMainProtocolTwoWayAnonWithErrorRequest |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolTwoWayAnonWithErrorResponse { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for MainProtocolTwoWayAnonWithErrorResponse { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| Self, |
| WireMainProtocolTwoWayAnonWithErrorResponse, |
| > = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireMainProtocolTwoWayAnonWithErrorResponse; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for MainProtocolTwoWayAnonWithErrorResponse { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireMainProtocolTwoWayAnonWithErrorResponse>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonWithErrorResponse: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for MainProtocolTwoWayAnonWithErrorResponse |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolTwoWayAnonWithErrorResponse: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireMainProtocolTwoWayAnonWithErrorResponse> |
| for MainProtocolTwoWayAnonWithErrorResponse |
| { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization< |
| WireMainProtocolTwoWayAnonWithErrorResponse, |
| 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: WireMainProtocolTwoWayAnonWithErrorResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireMainProtocolTwoWayAnonWithErrorResponse { |
| type Natural = MainProtocolTwoWayAnonWithErrorResponse; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireMainProtocolTwoWayAnonWithErrorResponse> |
| for MainProtocolTwoWayAnonWithErrorResponse |
| { |
| #[inline] |
| fn from_wire_ref(wire: &WireMainProtocolTwoWayAnonWithErrorResponse) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`MainProtocolTwoWayAnonWithErrorResponse`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireMainProtocolTwoWayAnonWithErrorResponse { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!( |
| std::mem::size_of::<WireMainProtocolTwoWayAnonWithErrorResponse>(), |
| 8 |
| ); |
| static_assertions::const_assert_eq!( |
| std::mem::align_of::<WireMainProtocolTwoWayAnonWithErrorResponse>(), |
| 4 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WireMainProtocolTwoWayAnonWithErrorResponse, a), |
| 0 |
| ); |
| |
| static_assertions::const_assert_eq!( |
| std::mem::offset_of!(WireMainProtocolTwoWayAnonWithErrorResponse, b), |
| 4 |
| ); |
| |
| unsafe impl ::fidl_next::Wire for WireMainProtocolTwoWayAnonWithErrorResponse { |
| type Decoded<'de> = WireMainProtocolTwoWayAnonWithErrorResponse; |
| |
| #[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 WireMainProtocolTwoWayAnonWithErrorResponse |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| #[derive(PartialEq, Clone, Debug)] |
| #[repr(C)] |
| pub struct MainProtocolOnAnonRequest { |
| pub a: u32, |
| |
| pub b: u32, |
| } |
| |
| impl ::fidl_next::Encodable for MainProtocolOnAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireMainProtocolOnAnonRequest> = unsafe { |
| ::fidl_next::CopyOptimization::enable_if( |
| true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled() |
| && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(), |
| ) |
| }; |
| |
| type Encoded = WireMainProtocolOnAnonRequest; |
| } |
| |
| unsafe impl<___E> ::fidl_next::Encode<___E> for MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| { |
| #[inline] |
| fn encode_ref( |
| &self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.a, encoder_, a)?; |
| |
| ::fidl_next::EncodeRef::encode_ref(&self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::EncodableOption for MainProtocolOnAnonRequest { |
| type EncodedOption = ::fidl_next::WireBox<'static, WireMainProtocolOnAnonRequest>; |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOption<___E> for MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolOnAnonRequest: ::fidl_next::Encode<___E>, |
| { |
| #[inline] |
| fn encode_option( |
| this: ::core::option::Option<Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for MainProtocolOnAnonRequest |
| where |
| ___E: ::fidl_next::Encoder + ?Sized, |
| MainProtocolOnAnonRequest: ::fidl_next::EncodeRef<___E>, |
| { |
| #[inline] |
| fn encode_option_ref( |
| this: ::core::option::Option<&Self>, |
| encoder: &mut ___E, |
| out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| if let Some(inner) = this { |
| ::fidl_next::EncoderExt::encode_next(encoder, inner)?; |
| ::fidl_next::WireBox::encode_present(out); |
| } else { |
| ::fidl_next::WireBox::encode_absent(out); |
| } |
| |
| Ok(()) |
| } |
| } |
| |
| impl ::fidl_next::FromWire<WireMainProtocolOnAnonRequest> for MainProtocolOnAnonRequest { |
| const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireMainProtocolOnAnonRequest, 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: WireMainProtocolOnAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWire::from_wire(wire.a), |
| |
| b: ::fidl_next::FromWire::from_wire(wire.b), |
| } |
| } |
| } |
| |
| impl ::fidl_next::IntoNatural for WireMainProtocolOnAnonRequest { |
| type Natural = MainProtocolOnAnonRequest; |
| } |
| |
| impl ::fidl_next::FromWireRef<WireMainProtocolOnAnonRequest> for MainProtocolOnAnonRequest { |
| #[inline] |
| fn from_wire_ref(wire: &WireMainProtocolOnAnonRequest) -> Self { |
| Self { |
| a: ::fidl_next::FromWireRef::from_wire_ref(&wire.a), |
| |
| b: ::fidl_next::FromWireRef::from_wire_ref(&wire.b), |
| } |
| } |
| } |
| |
| /// The wire type corresponding to [`MainProtocolOnAnonRequest`]. |
| #[derive(Clone, Debug)] |
| #[repr(C)] |
| pub struct WireMainProtocolOnAnonRequest { |
| pub a: ::fidl_next::WireU32, |
| |
| pub b: ::fidl_next::WireU32, |
| } |
| static_assertions::const_assert_eq!(std::mem::size_of::<WireMainProtocolOnAnonRequest>(), 8); |
| static_assertions::const_assert_eq!(std::mem::align_of::<WireMainProtocolOnAnonRequest>(), 4); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolOnAnonRequest, a), 0); |
| |
| static_assertions::const_assert_eq!(std::mem::offset_of!(WireMainProtocolOnAnonRequest, b), 4); |
| |
| unsafe impl ::fidl_next::Wire for WireMainProtocolOnAnonRequest { |
| type Decoded<'de> = WireMainProtocolOnAnonRequest; |
| |
| #[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 WireMainProtocolOnAnonRequest |
| 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_; |
| } |
| |
| ::fidl_next::Decode::decode(a.as_mut(), decoder_)?; |
| |
| ::fidl_next::Decode::decode(b.as_mut(), decoder_)?; |
| |
| Ok(()) |
| } |
| } |
| |
| /// The type corresponding to the MainProtocol protocol. |
| #[derive(PartialEq, Debug)] |
| pub struct MainProtocol; |
| |
| pub mod main_protocol { |
| pub mod prelude { |
| pub use crate::{ |
| MainProtocol, MainProtocolClientHandler, MainProtocolServerHandler, main_protocol, |
| }; |
| |
| pub use ::fidl_next_test_protocolpayloads_imported::ImportStructPayload; |
| |
| pub use crate::LocalStructPayload; |
| |
| pub use crate::MainProtocolOnAnonRequest; |
| |
| pub use crate::MainProtocolOneWayAnonRequest; |
| |
| pub use crate::MainProtocolTwoWayAnonRequest; |
| |
| pub use crate::MainProtocolTwoWayAnonResponse; |
| |
| pub use crate::MainProtocolTwoWayAnonWithErrorRequest; |
| |
| pub use crate::MainProtocolTwoWayAnonWithErrorResponse; |
| } |
| |
| pub struct OneWayComposed; |
| |
| impl ::fidl_next::Method for OneWayComposed { |
| const ORDINAL: u64 = 2602591870026304272; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| |
| type Response = ::fidl_next::Never; |
| } |
| |
| pub struct TwoWayComposed; |
| |
| impl ::fidl_next::Method for TwoWayComposed { |
| const ORDINAL: u64 = 2542459230546612144; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| |
| type Response = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| pub struct TwoWayComposedWithError; |
| |
| impl ::fidl_next::Method for TwoWayComposedWithError { |
| const ORDINAL: u64 = 7681984876526769495; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| |
| type Response = ::fidl_next::WireResult< |
| 'static, |
| ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| ::fidl_next::WireU32, |
| >; |
| } |
| |
| pub struct OnComposed; |
| |
| impl ::fidl_next::Method for OnComposed { |
| const ORDINAL: u64 = 1872339328378152762; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next::Never; |
| |
| type Response = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| pub struct OneWayLocal; |
| |
| impl ::fidl_next::Method for OneWayLocal { |
| const ORDINAL: u64 = 7755175439334311701; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = crate::WireLocalStructPayload; |
| |
| type Response = ::fidl_next::Never; |
| } |
| |
| pub struct TwoWayLocal; |
| |
| impl ::fidl_next::Method for TwoWayLocal { |
| const ORDINAL: u64 = 8374292137648566031; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = crate::WireLocalStructPayload; |
| |
| type Response = crate::WireLocalStructPayload; |
| } |
| |
| pub struct TwoWayLocalWithError; |
| |
| impl ::fidl_next::Method for TwoWayLocalWithError { |
| const ORDINAL: u64 = 2898559119954589948; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = crate::WireLocalStructPayload; |
| |
| type Response = |
| ::fidl_next::WireResult<'static, crate::WireLocalStructPayload, ::fidl_next::WireU32>; |
| } |
| |
| pub struct OnLocal; |
| |
| impl ::fidl_next::Method for OnLocal { |
| const ORDINAL: u64 = 5135782819583756313; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next::Never; |
| |
| type Response = crate::WireLocalStructPayload; |
| } |
| |
| pub struct OneWayImport; |
| |
| impl ::fidl_next::Method for OneWayImport { |
| const ORDINAL: u64 = 3344777159365288972; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| |
| type Response = ::fidl_next::Never; |
| } |
| |
| pub struct TwoWayImport; |
| |
| impl ::fidl_next::Method for TwoWayImport { |
| const ORDINAL: u64 = 2374708679656510579; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| |
| type Response = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| pub struct TwoWayImportWithError; |
| |
| impl ::fidl_next::Method for TwoWayImportWithError { |
| const ORDINAL: u64 = 4286143084949642173; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| |
| type Response = ::fidl_next::WireResult< |
| 'static, |
| ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| ::fidl_next::WireU32, |
| >; |
| } |
| |
| pub struct OnImport; |
| |
| impl ::fidl_next::Method for OnImport { |
| const ORDINAL: u64 = 1996489653379631369; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next::Never; |
| |
| type Response = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| pub struct OneWayAnon; |
| |
| impl ::fidl_next::Method for OneWayAnon { |
| const ORDINAL: u64 = 811587311021806764; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = crate::WireMainProtocolOneWayAnonRequest; |
| |
| type Response = ::fidl_next::Never; |
| } |
| |
| pub struct TwoWayAnon; |
| |
| impl ::fidl_next::Method for TwoWayAnon { |
| const ORDINAL: u64 = 629880979996923737; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = crate::WireMainProtocolTwoWayAnonRequest; |
| |
| type Response = crate::WireMainProtocolTwoWayAnonResponse; |
| } |
| |
| pub struct TwoWayAnonWithError; |
| |
| impl ::fidl_next::Method for TwoWayAnonWithError { |
| const ORDINAL: u64 = 6368863385719175734; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = crate::WireMainProtocolTwoWayAnonWithErrorRequest; |
| |
| type Response = ::fidl_next::WireResult< |
| 'static, |
| crate::WireMainProtocolTwoWayAnonWithErrorResponse, |
| ::fidl_next::WireU32, |
| >; |
| } |
| |
| pub struct OnAnon; |
| |
| impl ::fidl_next::Method for OnAnon { |
| const ORDINAL: u64 = 4815229650203439104; |
| |
| type Protocol = crate::MainProtocol; |
| |
| type Request = ::fidl_next::Never; |
| |
| type Response = crate::WireMainProtocolOnAnonRequest; |
| } |
| |
| mod ___detail { |
| |
| pub struct OneWayComposed<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for OneWayComposed<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OneWayComposed<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayComposed<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for TwoWayComposed<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for TwoWayComposed<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayComposedWithError<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for TwoWayComposedWithError<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for TwoWayComposedWithError<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OnComposed<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for OnComposed<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OnComposed<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OneWayLocal<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for OneWayLocal<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireLocalStructPayload; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OneWayLocal<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayLocal<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for TwoWayLocal<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireLocalStructPayload; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for TwoWayLocal<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayLocalWithError<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for TwoWayLocalWithError<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireLocalStructPayload; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for TwoWayLocalWithError<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OnLocal<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for OnLocal<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireLocalStructPayload; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OnLocal<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OneWayImport<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for OneWayImport<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OneWayImport<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayImport<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for TwoWayImport<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for TwoWayImport<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayImportWithError<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for TwoWayImportWithError<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for TwoWayImportWithError<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OnImport<T0> { |
| a: T0, |
| } |
| |
| impl<T0> ::fidl_next::Encodable for OnImport<T0> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>, |
| { |
| type Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload; |
| } |
| |
| unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OnImport<T0> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireI32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OneWayAnon<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for OneWayAnon<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireMainProtocolOneWayAnonRequest; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OneWayAnon<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayAnon<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for TwoWayAnon<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireMainProtocolTwoWayAnonRequest; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for TwoWayAnon<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct TwoWayAnonWithError<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for TwoWayAnonWithError<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireMainProtocolTwoWayAnonWithErrorRequest; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for TwoWayAnonWithError<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| pub struct OnAnon<T0, T1> { |
| a: T0, |
| |
| b: T1, |
| } |
| |
| impl<T0, T1> ::fidl_next::Encodable for OnAnon<T0, T1> |
| where |
| T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>, |
| { |
| type Encoded = crate::WireMainProtocolOnAnonRequest; |
| } |
| |
| unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OnAnon<T0, T1> |
| where |
| ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized, |
| T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>, |
| { |
| #[inline] |
| fn encode( |
| self, |
| encoder_: &mut ___E, |
| out_: &mut ::core::mem::MaybeUninit<Self::Encoded>, |
| ) -> ::core::result::Result<(), ::fidl_next::EncodeError> { |
| ::fidl_next::munge! { |
| let Self::Encoded { |
| a, |
| b, |
| |
| } = out_; |
| } |
| |
| ::fidl_next::Encode::encode(self.a, encoder_, a)?; |
| |
| ::fidl_next::Encode::encode(self.b, encoder_, b)?; |
| |
| Ok(()) |
| } |
| } |
| |
| unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::MainProtocol |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| type Client = MainProtocolClient<___T>; |
| type Server = MainProtocolServer<___T>; |
| } |
| |
| /// The client for the `MainProtocol` protocol. |
| #[repr(transparent)] |
| pub struct MainProtocolClient<___T: ::fidl_next::Transport> { |
| #[allow(dead_code)] |
| client: ::fidl_next::protocol::Client<___T>, |
| } |
| |
| impl<___T> MainProtocolClient<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn one_way_composed( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.one_way_composed_with(OneWayComposed { a }) |
| } |
| |
| |
| |
| pub fn one_way_composed_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.client.send_one_way(2602591870026304272, request), |
| ) |
| } |
| |
| pub fn two_way_composed( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayComposed, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_composed_with(TwoWayComposed { a }) |
| } |
| |
| |
| |
| pub fn two_way_composed_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayComposed, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(2542459230546612144, request), |
| ) |
| } |
| |
| pub fn two_way_composed_with_error( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayComposedWithError, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_composed_with_error_with(TwoWayComposedWithError { a }) |
| } |
| |
| |
| |
| pub fn two_way_composed_with_error_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayComposedWithError, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(7681984876526769495, request), |
| ) |
| } |
| |
| pub fn one_way_local( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.one_way_local_with(OneWayLocal { a, b }) |
| } |
| |
| pub fn one_way_local_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = crate::WireLocalStructPayload, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.client.send_one_way(7755175439334311701, request), |
| ) |
| } |
| |
| pub fn two_way_local( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayLocal, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_local_with(TwoWayLocal { a, b }) |
| } |
| |
| pub fn two_way_local_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayLocal, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = crate::WireLocalStructPayload, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(8374292137648566031, request), |
| ) |
| } |
| |
| pub fn two_way_local_with_error( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayLocalWithError, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_local_with_error_with(TwoWayLocalWithError { a, b }) |
| } |
| |
| pub fn two_way_local_with_error_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayLocalWithError, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = crate::WireLocalStructPayload, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(2898559119954589948, request), |
| ) |
| } |
| |
| pub fn one_way_import( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.one_way_import_with(OneWayImport { a }) |
| } |
| |
| |
| |
| pub fn one_way_import_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.client.send_one_way(3344777159365288972, request), |
| ) |
| } |
| |
| pub fn two_way_import( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayImport, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_import_with(TwoWayImport { a }) |
| } |
| |
| |
| |
| pub fn two_way_import_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayImport, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(2374708679656510579, request), |
| ) |
| } |
| |
| pub fn two_way_import_with_error( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayImportWithError, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_import_with_error_with(TwoWayImportWithError { a }) |
| } |
| |
| |
| |
| pub fn two_way_import_with_error_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayImportWithError, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next_test_protocolpayloads_imported::WireImportStructPayload, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(4286143084949642173, request), |
| ) |
| } |
| |
| pub fn one_way_anon( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.one_way_anon_with(OneWayAnon { a, b }) |
| } |
| |
| pub fn one_way_anon_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = crate::WireMainProtocolOneWayAnonRequest, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.client.send_one_way(811587311021806764, request), |
| ) |
| } |
| |
| pub fn two_way_anon( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayAnon, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_anon_with(TwoWayAnon { a, b }) |
| } |
| |
| pub fn two_way_anon_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayAnon, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = crate::WireMainProtocolTwoWayAnonRequest, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(629880979996923737, request), |
| ) |
| } |
| |
| pub fn two_way_anon_with_error( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayAnonWithError, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.two_way_anon_with_error_with(TwoWayAnonWithError { a, b }) |
| } |
| |
| pub fn two_way_anon_with_error_with<___R>( |
| &self, |
| request: ___R, |
| ) -> ::fidl_next::TwoWayFuture<'_, super::TwoWayAnonWithError, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = crate::WireMainProtocolTwoWayAnonWithErrorRequest, |
| >, |
| { |
| ::fidl_next::TwoWayFuture::from_untyped( |
| self.client.send_two_way(6368863385719175734, request), |
| ) |
| } |
| } |
| |
| /// The server for the `MainProtocol` protocol. |
| #[repr(transparent)] |
| pub struct MainProtocolServer<___T: ::fidl_next::Transport> { |
| server: ::fidl_next::protocol::Server<___T>, |
| } |
| |
| impl<___T> MainProtocolServer<___T> |
| where |
| ___T: ::fidl_next::Transport, |
| { |
| pub fn on_composed( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.on_composed_with(OnComposed { a }) |
| } |
| |
| pub fn on_composed_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = <super::OnComposed as ::fidl_next::Method>::Response, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.server.send_event(1872339328378152762, request), |
| ) |
| } |
| |
| pub fn on_local( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.on_local_with(OnLocal { a, b }) |
| } |
| |
| pub fn on_local_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = <super::OnLocal as ::fidl_next::Method>::Response, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.server.send_event(5135782819583756313, request), |
| ) |
| } |
| |
| pub fn on_import( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireI32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.on_import_with(OnImport { a }) |
| } |
| |
| pub fn on_import_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = <super::OnImport as ::fidl_next::Method>::Response, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.server.send_event(1996489653379631369, request), |
| ) |
| } |
| |
| pub fn on_anon( |
| &self, |
| |
| a: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| |
| b: impl ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = ::fidl_next::WireU32, |
| >, |
| ) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| <___T as ::fidl_next::Transport>::SendBuffer: |
| ::fidl_next::encoder::InternalHandleEncoder, |
| { |
| self.on_anon_with(OnAnon { a, b }) |
| } |
| |
| pub fn on_anon_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T> |
| where |
| ___R: ::fidl_next::Encode< |
| <___T as ::fidl_next::Transport>::SendBuffer, |
| Encoded = <super::OnAnon as ::fidl_next::Method>::Response, |
| >, |
| { |
| ::fidl_next::SendFuture::from_untyped( |
| self.server.send_event(4815229650203439104, request), |
| ) |
| } |
| } |
| } |
| } |
| |
| /// A client handler for the MainProtocol protocol. |
| /// |
| /// See [`MainProtocol`] for more details. |
| pub trait MainProtocolClientHandler< |
| #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport, |
| #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| > |
| { |
| fn on_composed( |
| &mut self, |
| client: &::fidl_next::Client<MainProtocol, ___T>, |
| |
| event: ::fidl_next::Response<main_protocol::OnComposed, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn on_local( |
| &mut self, |
| client: &::fidl_next::Client<MainProtocol, ___T>, |
| |
| event: ::fidl_next::Response<main_protocol::OnLocal, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn on_import( |
| &mut self, |
| client: &::fidl_next::Client<MainProtocol, ___T>, |
| |
| event: ::fidl_next::Response<main_protocol::OnImport, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn on_anon( |
| &mut self, |
| client: &::fidl_next::Client<MainProtocol, ___T>, |
| |
| event: ::fidl_next::Response<main_protocol::OnAnon, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for MainProtocol |
| where |
| ___H: MainProtocolClientHandler<___T> + ::core::marker::Send, |
| ___T: ::fidl_next::Transport, |
| <main_protocol::TwoWayComposed as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayComposedWithError as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OnComposed as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayLocal as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayLocalWithError as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OnLocal as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayImport as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayImportWithError as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OnImport as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayAnon as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayAnonWithError as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OnAnon as ::fidl_next::Method>::Response: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| { |
| async fn on_event( |
| handler: &mut ___H, |
| client: &::fidl_next::Client<Self, ___T>, |
| ordinal: u64, |
| buffer: ___T::RecvBuffer, |
| ) { |
| match ordinal { |
| 1872339328378152762 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.on_composed(client, decoded).await, |
| Err(e) => client.close(), |
| }, |
| |
| 5135782819583756313 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.on_local(client, decoded).await, |
| Err(e) => client.close(), |
| }, |
| |
| 1996489653379631369 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.on_import(client, decoded).await, |
| Err(e) => client.close(), |
| }, |
| |
| 4815229650203439104 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.on_anon(client, decoded).await, |
| Err(e) => client.close(), |
| }, |
| |
| ordinal => client.close(), |
| } |
| } |
| } |
| |
| /// A server handler for the MainProtocol protocol. |
| /// |
| /// See [`MainProtocol`] for more details. |
| pub trait MainProtocolServerHandler< |
| #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport, |
| #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel, |
| > |
| { |
| fn one_way_composed( |
| &mut self, |
| server: &::fidl_next::Server<MainProtocol, ___T>, |
| |
| request: ::fidl_next::Request<main_protocol::OneWayComposed, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_composed( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayComposed, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayComposed, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_composed_with_error( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayComposedWithError, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayComposedWithError, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn one_way_local( |
| &mut self, |
| server: &::fidl_next::Server<MainProtocol, ___T>, |
| |
| request: ::fidl_next::Request<main_protocol::OneWayLocal, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_local( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayLocal, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayLocal, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_local_with_error( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayLocalWithError, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayLocalWithError, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn one_way_import( |
| &mut self, |
| server: &::fidl_next::Server<MainProtocol, ___T>, |
| |
| request: ::fidl_next::Request<main_protocol::OneWayImport, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_import( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayImport, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayImport, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_import_with_error( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayImportWithError, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayImportWithError, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn one_way_anon( |
| &mut self, |
| server: &::fidl_next::Server<MainProtocol, ___T>, |
| |
| request: ::fidl_next::Request<main_protocol::OneWayAnon, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_anon( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayAnon, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayAnon, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| |
| fn two_way_anon_with_error( |
| &mut self, |
| |
| request: ::fidl_next::Request<main_protocol::TwoWayAnonWithError, ___T>, |
| |
| responder: ::fidl_next::Responder<main_protocol::TwoWayAnonWithError, ___T>, |
| ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send; |
| } |
| |
| impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for MainProtocol |
| where |
| ___H: MainProtocolServerHandler<___T> + ::core::marker::Send, |
| ___T: ::fidl_next::Transport, |
| <main_protocol::OneWayComposed as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayComposed as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayComposedWithError as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OneWayLocal as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayLocal as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayLocalWithError as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OneWayImport as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayImport as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayImportWithError as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::OneWayAnon as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayAnon as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| <main_protocol::TwoWayAnonWithError as ::fidl_next::Method>::Request: |
| ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>, |
| { |
| async fn on_one_way( |
| handler: &mut ___H, |
| server: &::fidl_next::Server<Self, ___T>, |
| ordinal: u64, |
| buffer: ___T::RecvBuffer, |
| ) { |
| match ordinal { |
| 2602591870026304272 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.one_way_composed(server, decoded).await, |
| Err(e) => server.close(), |
| }, |
| |
| 7755175439334311701 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.one_way_local(server, decoded).await, |
| Err(e) => server.close(), |
| }, |
| |
| 3344777159365288972 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.one_way_import(server, decoded).await, |
| Err(e) => server.close(), |
| }, |
| |
| 811587311021806764 => match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.one_way_anon(server, decoded).await, |
| Err(e) => server.close(), |
| }, |
| |
| ordinal => server.close(), |
| } |
| } |
| |
| async fn on_two_way( |
| handler: &mut ___H, |
| ordinal: u64, |
| buffer: ___T::RecvBuffer, |
| responder: ::fidl_next::protocol::Responder<___T>, |
| ) { |
| match ordinal { |
| 2542459230546612144 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_composed(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 7681984876526769495 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_composed_with_error(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 8374292137648566031 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_local(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 2898559119954589948 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_local_with_error(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 2374708679656510579 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_import(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 4286143084949642173 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_import_with_error(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 629880979996923737 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_anon(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| 6368863385719175734 => { |
| let responder = ::fidl_next::Responder::from_untyped(responder); |
| |
| match ::fidl_next::DecoderExt::decode(buffer) { |
| Ok(decoded) => handler.two_way_anon_with_error(decoded, responder).await, |
| Err(e) => drop(responder), |
| } |
| } |
| |
| ordinal => responder.server().close(), |
| } |
| } |
| } |
| |
| /// Compatibility shims which mimic some API surfaces of the current Rust bindings. |
| pub mod compat { |
| |
| impl ::fidl_next::CompatFrom<crate::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), |
| } |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| /// An alias for a client over `zx::Channel` for the `MainProtocol` |
| /// protocol. |
| pub type MainProtocolProxy = ::fidl_next::Client<crate::MainProtocol>; |
| |
| impl ::fidl_next::CompatFrom<crate::MainProtocol> |
| for ::fidl_test_protocolpayloads::MainProtocolMarker |
| { |
| fn compat_from(_: crate::MainProtocol) -> Self { |
| Self |
| } |
| } |
| |
| impl ::fidl_next::CompatFrom<::fidl_test_protocolpayloads::MainProtocolMarker> |
| for crate::MainProtocol |
| { |
| fn compat_from(_: ::fidl_test_protocolpayloads::MainProtocolMarker) -> Self { |
| Self |
| } |
| } |
| |
| #[cfg(target_os = "fuchsia")] |
| |
| impl ::fidl_next::ClientCompatFrom<::fidl_test_protocolpayloads::MainProtocolProxy> |
| for crate::MainProtocol |
| { |
| fn client_compat_from( |
| proxy: ::fidl_test_protocolpayloads::MainProtocolProxy, |
| ) -> ::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) |
| } |
| } |
| } |