blob: bd70dd3973801fee1e35e04c29338785c30c1640 [file] [log] [blame]
// DO NOT EDIT: This file is machine-generated by fidlgen
#![warn(clippy::all)]
#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse: ::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 UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse: ::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<WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(
wire: WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
{
type Natural = UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
{
type Decoded<'de> = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_ajar_driver_protocol_strict_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_ajar_driver_protocol_strict_two_way_union_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_ajar_driver_protocol_strict_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_ajar_driver_protocol_strict_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse {
type Encoded = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsAjarDriverProtocolStrictTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayErrResponse`].
pub type WireUnknownInteractionsAjarDriverProtocolStrictTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse: ::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 UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse:
::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<WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(
wire: WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
{
type Natural = UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse;
}
impl
::fidl_next::FromWireRef<WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
{
type Decoded<'de> = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_ajar_driver_protocol_strict_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_ajar_driver_protocol_strict_two_way_union_err_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_ajar_driver_protocol_strict_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_ajar_driver_protocol_strict_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>,
> for UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
/// The type corresponding to the UnknownInteractionsAjarDriverProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct UnknownInteractionsAjarDriverProtocol;
pub mod unknown_interactions_ajar_driver_protocol {
pub mod prelude {
pub use crate::{
UnknownInteractionsAjarDriverProtocol,
UnknownInteractionsAjarDriverProtocolClientHandler,
UnknownInteractionsAjarDriverProtocolServerHandler,
unknown_interactions_ajar_driver_protocol,
};
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse;
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse;
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse;
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayErrResponse;
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse;
pub use crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse;
}
pub struct StrictOneWay;
impl ::fidl_next::Method for StrictOneWay {
const ORDINAL: u64 = 200845620698173917;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct FlexibleOneWay;
impl ::fidl_next::Method for FlexibleOneWay {
const ORDINAL: u64 = 3790953144423004126;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct StrictTwoWay;
impl ::fidl_next::Method for StrictTwoWay {
const ORDINAL: u64 = 523076268125513549;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ();
}
pub struct StrictTwoWayFields;
impl ::fidl_next::Method for StrictTwoWayFields {
const ORDINAL: u64 = 902155904889801604;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse;
}
pub struct StrictTwoWayUnion;
impl ::fidl_next::Method for StrictTwoWayUnion {
const ORDINAL: u64 = 8952307689721713673;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse<'static>;
}
pub struct StrictTwoWayTable;
impl ::fidl_next::Method for StrictTwoWayTable {
const ORDINAL: u64 = 3114064683372134045;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse<'static>;
}
pub struct StrictTwoWayErr;
impl ::fidl_next::Method for StrictTwoWayErr {
const ORDINAL: u64 = 7057260423103547829;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayFieldsErr;
impl ::fidl_next::Method for StrictTwoWayFieldsErr {
const ORDINAL: u64 = 6490530264582540031;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayUnionErr;
impl ::fidl_next::Method for StrictTwoWayUnionErr {
const ORDINAL: u64 = 2319476129312263555;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayTableErr;
impl ::fidl_next::Method for StrictTwoWayTableErr {
const ORDINAL: u64 = 6883106306697493305;
type Protocol = crate::UnknownInteractionsAjarDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
mod ___detail {
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::UnknownInteractionsAjarDriverProtocol
where
___T: ::fidl_next::Transport,
{
type Client = UnknownInteractionsAjarDriverProtocolClient<___T>;
type Server = UnknownInteractionsAjarDriverProtocolServer<___T>;
}
/// The client for the `UnknownInteractionsAjarDriverProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsAjarDriverProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> UnknownInteractionsAjarDriverProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(200845620698173917, ()),
)
}
pub fn flexible_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(3790953144423004126, ()),
)
}
pub fn strict_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(523076268125513549, ()),
)
}
pub fn strict_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(902155904889801604, ()),
)
}
pub fn strict_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8952307689721713673, ()),
)
}
pub fn strict_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3114064683372134045, ()),
)
}
pub fn strict_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7057260423103547829, ()),
)
}
pub fn strict_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6490530264582540031, ()),
)
}
pub fn strict_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(2319476129312263555, ()),
)
}
pub fn strict_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6883106306697493305, ()),
)
}
}
/// The server for the `UnknownInteractionsAjarDriverProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsAjarDriverProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> UnknownInteractionsAjarDriverProtocolServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the UnknownInteractionsAjarDriverProtocol protocol.
///
/// See [`UnknownInteractionsAjarDriverProtocol`] for more details.
pub trait UnknownInteractionsAjarDriverProtocolClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn on_unknown_interaction(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarDriverProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
client.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for UnknownInteractionsAjarDriverProtocol
where
___H: UnknownInteractionsAjarDriverProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_driver_protocol::StrictTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
client: &::fidl_next::Client<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => handler.on_unknown_interaction(client, ordinal).await,
}
}
}
/// A server handler for the UnknownInteractionsAjarDriverProtocol protocol.
///
/// See [`UnknownInteractionsAjarDriverProtocol`] for more details.
pub trait UnknownInteractionsAjarDriverProtocolServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsAjarDriverProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsAjarDriverProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWay,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayUnion,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayTable,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_driver_protocol::StrictTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn on_unknown_interaction(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsAjarDriverProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
server.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T>
for UnknownInteractionsAjarDriverProtocol
where
___H: UnknownInteractionsAjarDriverProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
200845620698173917 => {
handler.strict_one_way(server).await;
}
3790953144423004126 => {
handler.flexible_one_way(server).await;
}
ordinal => handler.on_unknown_interaction(server, ordinal).await,
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
523076268125513549 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way(responder).await;
}
902155904889801604 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields(responder).await;
}
8952307689721713673 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union(responder).await;
}
3114064683372134045 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table(responder).await;
}
7057260423103547829 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_err(responder).await;
}
6490530264582540031 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields_err(responder).await;
}
2319476129312263555 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union_err(responder).await;
}
6883106306697493305 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table_err(responder).await;
}
ordinal => {
let server = ::fidl_next::Server::wrap_untyped(responder.server());
handler.on_unknown_interaction(server, ordinal).await;
}
}
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse: ::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 UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse: ::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<WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
type Natural = UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse {
type EncodedOption =
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_ajar_protocol_strict_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_ajar_protocol_strict_two_way_union_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_ajar_protocol_strict_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_ajar_protocol_strict_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsAjarProtocolStrictTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsAjarProtocolStrictTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictTwoWayTableResponse {
type Encoded = WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsAjarProtocolStrictTwoWayTableResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsAjarProtocolStrictTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsAjarProtocolStrictTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayErrResponse`].
pub type WireUnknownInteractionsAjarProtocolStrictTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse: ::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 UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse: ::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<WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
type Natural = UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse {
type EncodedOption =
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_ajar_protocol_strict_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_ajar_protocol_strict_two_way_union_err_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_ajar_protocol_strict_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_ajar_protocol_strict_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsAjarProtocolStrictEventFieldsRequest {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictEventFieldsRequest {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolStrictEventFieldsRequest {
type EncodedOption =
::fidl_next::WireBox<'static, WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolStrictEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolStrictEventFieldsRequest: ::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 UnknownInteractionsAjarProtocolStrictEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolStrictEventFieldsRequest: ::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<WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest>
for UnknownInteractionsAjarProtocolStrictEventFieldsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest {
type Natural = UnknownInteractionsAjarProtocolStrictEventFieldsRequest;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest>
for UnknownInteractionsAjarProtocolStrictEventFieldsRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictEventFieldsRequest`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest {
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsAjarProtocolStrictEventUnionRequest {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictEventUnionRequest {
type Encoded = WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolStrictEventUnionRequest {
type EncodedOption =
WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolStrictEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsAjarProtocolStrictEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsAjarProtocolStrictEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsAjarProtocolStrictEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsAjarProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>
{
type Natural = UnknownInteractionsAjarProtocolStrictEventUnionRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsAjarProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
> for UnknownInteractionsAjarProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsAjarProtocolStrictEventUnionRequest>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
> for Box<UnknownInteractionsAjarProtocolStrictEventUnionRequest>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsAjarProtocolStrictEventUnionRequest as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
> for Box<UnknownInteractionsAjarProtocolStrictEventUnionRequest>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictEventUnionRequest`].
#[repr(transparent)]
pub struct WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_ajar_protocol_strict_event_union_request {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_ajar_protocol_strict_event_union_request::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_ajar_protocol_strict_event_union_request::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_ajar_protocol_strict_event_union_request::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsAjarProtocolStrictEventUnionRequest {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsAjarProtocolStrictEventUnionRequest<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsAjarProtocolStrictEventTableRequest {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsAjarProtocolStrictEventTableRequest {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolStrictEventTableRequest {
type Encoded = WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolStrictEventTableRequest
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolStrictEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolStrictEventTableRequest
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsAjarProtocolStrictEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de>>
for UnknownInteractionsAjarProtocolStrictEventTableRequest
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de>
{
type Natural = UnknownInteractionsAjarProtocolStrictEventTableRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de>>
for UnknownInteractionsAjarProtocolStrictEventTableRequest
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolStrictEventTableRequest`].
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsAjarProtocolStrictEventTableRequest")
.field("some_field", &self.some_field())
.finish()
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest: ::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 UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest: ::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<WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest>
for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
type Natural = UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest>
for UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
type Decoded<'de> = WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsAjarProtocolFlexibleEventUnionRequest {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest {
type Encoded = WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest {
type EncodedOption =
WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsAjarProtocolFlexibleEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsAjarProtocolFlexibleEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>>
for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>
{
type Natural = UnknownInteractionsAjarProtocolFlexibleEventUnionRequest;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>>
for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
> for UnknownInteractionsAjarProtocolFlexibleEventUnionRequest
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsAjarProtocolFlexibleEventUnionRequest>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
> for Box<UnknownInteractionsAjarProtocolFlexibleEventUnionRequest>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsAjarProtocolFlexibleEventUnionRequest as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
> for Box<UnknownInteractionsAjarProtocolFlexibleEventUnionRequest>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolFlexibleEventUnionRequest`].
#[repr(transparent)]
pub struct WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_ajar_protocol_flexible_event_union_request {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_ajar_protocol_flexible_event_union_request::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_ajar_protocol_flexible_event_union_request::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_ajar_protocol_flexible_event_union_request::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsAjarProtocolFlexibleEventTableRequest {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsAjarProtocolFlexibleEventTableRequest {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsAjarProtocolFlexibleEventTableRequest {
type Encoded = WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsAjarProtocolFlexibleEventTableRequest
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsAjarProtocolFlexibleEventTableRequest
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de>>
for UnknownInteractionsAjarProtocolFlexibleEventTableRequest
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de>
{
type Natural = UnknownInteractionsAjarProtocolFlexibleEventTableRequest;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de>>
for UnknownInteractionsAjarProtocolFlexibleEventTableRequest
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsAjarProtocolFlexibleEventTableRequest`].
#[repr(C)]
pub struct WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsAjarProtocolFlexibleEventTableRequest")
.field("some_field", &self.some_field())
.finish()
}
}
/// The type corresponding to the UnknownInteractionsAjarProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct UnknownInteractionsAjarProtocol;
pub mod unknown_interactions_ajar_protocol {
pub mod prelude {
pub use crate::{
UnknownInteractionsAjarProtocol, UnknownInteractionsAjarProtocolClientHandler,
UnknownInteractionsAjarProtocolServerHandler, unknown_interactions_ajar_protocol,
};
pub use crate::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest;
pub use crate::UnknownInteractionsAjarProtocolFlexibleEventTableRequest;
pub use crate::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest;
pub use crate::UnknownInteractionsAjarProtocolStrictEventFieldsRequest;
pub use crate::UnknownInteractionsAjarProtocolStrictEventTableRequest;
pub use crate::UnknownInteractionsAjarProtocolStrictEventUnionRequest;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayErrResponse;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse;
pub use crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse;
}
pub struct StrictOneWay;
impl ::fidl_next::Method for StrictOneWay {
const ORDINAL: u64 = 956561744635167883;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct FlexibleOneWay;
impl ::fidl_next::Method for FlexibleOneWay {
const ORDINAL: u64 = 2483093178939638607;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct StrictTwoWay;
impl ::fidl_next::Method for StrictTwoWay {
const ORDINAL: u64 = 364341676962177080;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ();
}
pub struct StrictTwoWayFields;
impl ::fidl_next::Method for StrictTwoWayFields {
const ORDINAL: u64 = 1821674633227946298;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse;
}
pub struct StrictTwoWayUnion;
impl ::fidl_next::Method for StrictTwoWayUnion {
const ORDINAL: u64 = 5870221221557233361;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsAjarProtocolStrictTwoWayUnionResponse<'static>;
}
pub struct StrictTwoWayTable;
impl ::fidl_next::Method for StrictTwoWayTable {
const ORDINAL: u64 = 8038805778859962068;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsAjarProtocolStrictTwoWayTableResponse<'static>;
}
pub struct StrictTwoWayErr;
impl ::fidl_next::Method for StrictTwoWayErr {
const ORDINAL: u64 = 6577335136969723910;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarProtocolStrictTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayFieldsErr;
impl ::fidl_next::Method for StrictTwoWayFieldsErr {
const ORDINAL: u64 = 595881957484758745;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayUnionErr;
impl ::fidl_next::Method for StrictTwoWayUnionErr {
const ORDINAL: u64 = 3224530777258896533;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayTableErr;
impl ::fidl_next::Method for StrictTwoWayTableErr {
const ORDINAL: u64 = 3515589146717969463;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictEvent;
impl ::fidl_next::Method for StrictEvent {
const ORDINAL: u64 = 6927291151663612592;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response = ();
}
pub struct StrictEventFields;
impl ::fidl_next::Method for StrictEventFields {
const ORDINAL: u64 = 5838220329633564521;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest;
}
pub struct StrictEventUnion;
impl ::fidl_next::Method for StrictEventUnion {
const ORDINAL: u64 = 6303151946645602671;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsAjarProtocolStrictEventUnionRequest<'static>;
}
pub struct StrictEventTable;
impl ::fidl_next::Method for StrictEventTable {
const ORDINAL: u64 = 659277224687564957;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsAjarProtocolStrictEventTableRequest<'static>;
}
pub struct FlexibleEvent;
impl ::fidl_next::Method for FlexibleEvent {
const ORDINAL: u64 = 1281760452005010931;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response = ();
}
pub struct FlexibleEventFields;
impl ::fidl_next::Method for FlexibleEventFields {
const ORDINAL: u64 = 4298964238728681570;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest;
}
pub struct FlexibleEventUnion;
impl ::fidl_next::Method for FlexibleEventUnion {
const ORDINAL: u64 = 8950943792372972717;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response =
crate::WireUnknownInteractionsAjarProtocolFlexibleEventUnionRequest<'static>;
}
pub struct FlexibleEventTable;
impl ::fidl_next::Method for FlexibleEventTable {
const ORDINAL: u64 = 705539350563403440;
type Protocol = crate::UnknownInteractionsAjarProtocol;
type Request = ::fidl_next::Never;
type Response =
crate::WireUnknownInteractionsAjarProtocolFlexibleEventTableRequest<'static>;
}
mod ___detail {
pub struct StrictEventFields<T0> {
some_field: T0,
}
impl<T0> ::fidl_next::Encodable for StrictEventFields<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>,
{
type Encoded = crate::WireUnknownInteractionsAjarProtocolStrictEventFieldsRequest;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for StrictEventFields<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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
pub struct FlexibleEventFields<T0> {
some_field: T0,
}
impl<T0> ::fidl_next::Encodable for FlexibleEventFields<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>,
{
type Encoded = crate::WireUnknownInteractionsAjarProtocolFlexibleEventFieldsRequest;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for FlexibleEventFields<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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::UnknownInteractionsAjarProtocol
where
___T: ::fidl_next::Transport,
{
type Client = UnknownInteractionsAjarProtocolClient<___T>;
type Server = UnknownInteractionsAjarProtocolServer<___T>;
}
/// The client for the `UnknownInteractionsAjarProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsAjarProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> UnknownInteractionsAjarProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(956561744635167883, ()),
)
}
pub fn flexible_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(2483093178939638607, ()),
)
}
pub fn strict_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(364341676962177080, ()),
)
}
pub fn strict_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1821674633227946298, ()),
)
}
pub fn strict_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(5870221221557233361, ()),
)
}
pub fn strict_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8038805778859962068, ()),
)
}
pub fn strict_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6577335136969723910, ()),
)
}
pub fn strict_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(595881957484758745, ()),
)
}
pub fn strict_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3224530777258896533, ()),
)
}
pub fn strict_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3515589146717969463, ()),
)
}
}
/// The server for the `UnknownInteractionsAjarProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsAjarProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> UnknownInteractionsAjarProtocolServer<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_event(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.server.send_event(6927291151663612592, ()),
)
}
pub fn strict_event_fields(
&self,
some_field: 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.strict_event_fields_with(StrictEventFields { some_field })
}
pub fn strict_event_fields_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventFields as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(5838220329633564521, request),
)
}
pub fn strict_event_union_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventUnion as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(6303151946645602671, request),
)
}
pub fn strict_event_table_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventTable as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(659277224687564957, request),
)
}
pub fn flexible_event(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.server.send_event(1281760452005010931, ()),
)
}
pub fn flexible_event_fields(
&self,
some_field: 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.flexible_event_fields_with(FlexibleEventFields { some_field })
}
pub fn flexible_event_fields_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::FlexibleEventFields as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(4298964238728681570, request),
)
}
pub fn flexible_event_union_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::FlexibleEventUnion as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(8950943792372972717, request),
)
}
pub fn flexible_event_table_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::FlexibleEventTable as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(705539350563403440, request),
)
}
}
}
}
/// A client handler for the UnknownInteractionsAjarProtocol protocol.
///
/// See [`UnknownInteractionsAjarProtocol`] for more details.
pub trait UnknownInteractionsAjarProtocolClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_event(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_fields(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_ajar_protocol::StrictEventFields, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_union(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_ajar_protocol::StrictEventUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_table(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_ajar_protocol::StrictEventTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event_fields(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_ajar_protocol::FlexibleEventFields, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event_union(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_ajar_protocol::FlexibleEventUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event_table(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_ajar_protocol::FlexibleEventTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn on_unknown_interaction(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsAjarProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
client.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for UnknownInteractionsAjarProtocol
where
___H: UnknownInteractionsAjarProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<unknown_interactions_ajar_protocol::StrictTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictEventFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictEventUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::StrictEventTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::FlexibleEventFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::FlexibleEventUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_ajar_protocol::FlexibleEventTable 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 {
6927291151663612592 => {
handler.strict_event(client).await;
}
5838220329633564521 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_fields(client, decoded).await,
Err(e) => client.close(),
},
6303151946645602671 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_union(client, decoded).await,
Err(e) => client.close(),
},
659277224687564957 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_table(client, decoded).await,
Err(e) => client.close(),
},
1281760452005010931 => {
handler.flexible_event(client).await;
}
4298964238728681570 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.flexible_event_fields(client, decoded).await,
Err(e) => client.close(),
},
8950943792372972717 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.flexible_event_union(client, decoded).await,
Err(e) => client.close(),
},
705539350563403440 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.flexible_event_table(client, decoded).await,
Err(e) => client.close(),
},
ordinal => handler.on_unknown_interaction(client, ordinal).await,
}
}
}
/// A server handler for the UnknownInteractionsAjarProtocol protocol.
///
/// See [`UnknownInteractionsAjarProtocol`] for more details.
pub trait UnknownInteractionsAjarProtocolServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsAjarProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsAjarProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_ajar_protocol::StrictTwoWay, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayUnion,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayTable,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_ajar_protocol::StrictTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn on_unknown_interaction(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsAjarProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
server.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for UnknownInteractionsAjarProtocol
where
___H: UnknownInteractionsAjarProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
956561744635167883 => {
handler.strict_one_way(server).await;
}
2483093178939638607 => {
handler.flexible_one_way(server).await;
}
ordinal => handler.on_unknown_interaction(server, ordinal).await,
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
364341676962177080 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way(responder).await;
}
1821674633227946298 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields(responder).await;
}
5870221221557233361 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union(responder).await;
}
8038805778859962068 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table(responder).await;
}
6577335136969723910 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_err(responder).await;
}
595881957484758745 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields_err(responder).await;
}
3224530777258896533 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union_err(responder).await;
}
3515589146717969463 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table_err(responder).await;
}
ordinal => {
let server = ::fidl_next::Server::wrap_untyped(responder.server());
handler.on_unknown_interaction(server, ordinal).await;
}
}
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse: ::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 UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse: ::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<WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(
wire: WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
{
type Natural = UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
{
type Decoded<'de> = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_closed_driver_protocol_strict_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_closed_driver_protocol_strict_two_way_union_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_closed_driver_protocol_strict_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_closed_driver_protocol_strict_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse {
type Encoded = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsClosedDriverProtocolStrictTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayErrResponse`].
pub type WireUnknownInteractionsClosedDriverProtocolStrictTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse: ::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 UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse:
::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<WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(
wire: WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
{
type Natural = UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse;
}
impl
::fidl_next::FromWireRef<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
{
type Decoded<'de> = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
{
type Encoded = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse:
::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_closed_driver_protocol_strict_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_closed_driver_protocol_strict_two_way_union_err_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_closed_driver_protocol_strict_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_closed_driver_protocol_strict_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable
for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse
{
type Encoded = WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>,
> for UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'static>
{
type Decoded<'de> =
WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
/// The type corresponding to the UnknownInteractionsClosedDriverProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct UnknownInteractionsClosedDriverProtocol;
pub mod unknown_interactions_closed_driver_protocol {
pub mod prelude {
pub use crate::{
UnknownInteractionsClosedDriverProtocol,
UnknownInteractionsClosedDriverProtocolClientHandler,
UnknownInteractionsClosedDriverProtocolServerHandler,
unknown_interactions_closed_driver_protocol,
};
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse;
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse;
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse;
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayErrResponse;
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse;
pub use crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse;
}
pub struct StrictOneWay;
impl ::fidl_next::Method for StrictOneWay {
const ORDINAL: u64 = 9111839835597799810;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct StrictTwoWay;
impl ::fidl_next::Method for StrictTwoWay {
const ORDINAL: u64 = 2815690661228737027;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response = ();
}
pub struct StrictTwoWayFields;
impl ::fidl_next::Method for StrictTwoWayFields {
const ORDINAL: u64 = 5761316743698652038;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse;
}
pub struct StrictTwoWayUnion;
impl ::fidl_next::Method for StrictTwoWayUnion {
const ORDINAL: u64 = 7235351480214368636;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse<'static>;
}
pub struct StrictTwoWayTable;
impl ::fidl_next::Method for StrictTwoWayTable {
const ORDINAL: u64 = 1839495150551777151;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse<'static>;
}
pub struct StrictTwoWayErr;
impl ::fidl_next::Method for StrictTwoWayErr {
const ORDINAL: u64 = 4350840352076287137;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayFieldsErr;
impl ::fidl_next::Method for StrictTwoWayFieldsErr {
const ORDINAL: u64 = 3933117456632607830;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayUnionErr;
impl ::fidl_next::Method for StrictTwoWayUnionErr {
const ORDINAL: u64 = 4598950031783776653;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayTableErr;
impl ::fidl_next::Method for StrictTwoWayTableErr {
const ORDINAL: u64 = 1456858375973362525;
type Protocol = crate::UnknownInteractionsClosedDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
mod ___detail {
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::UnknownInteractionsClosedDriverProtocol
where
___T: ::fidl_next::Transport,
{
type Client = UnknownInteractionsClosedDriverProtocolClient<___T>;
type Server = UnknownInteractionsClosedDriverProtocolServer<___T>;
}
/// The client for the `UnknownInteractionsClosedDriverProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsClosedDriverProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> UnknownInteractionsClosedDriverProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(9111839835597799810, ()),
)
}
pub fn strict_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(2815690661228737027, ()),
)
}
pub fn strict_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(5761316743698652038, ()),
)
}
pub fn strict_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7235351480214368636, ()),
)
}
pub fn strict_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1839495150551777151, ()),
)
}
pub fn strict_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(4350840352076287137, ()),
)
}
pub fn strict_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3933117456632607830, ()),
)
}
pub fn strict_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(4598950031783776653, ()),
)
}
pub fn strict_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1456858375973362525, ()),
)
}
}
/// The server for the `UnknownInteractionsClosedDriverProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsClosedDriverProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> UnknownInteractionsClosedDriverProtocolServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the UnknownInteractionsClosedDriverProtocol protocol.
///
/// See [`UnknownInteractionsClosedDriverProtocol`] for more details.
pub trait UnknownInteractionsClosedDriverProtocolClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for UnknownInteractionsClosedDriverProtocol
where
___H: UnknownInteractionsClosedDriverProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<unknown_interactions_closed_driver_protocol::StrictTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_driver_protocol::StrictTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_driver_protocol::StrictTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_driver_protocol::StrictTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_driver_protocol::StrictTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_driver_protocol::StrictTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_driver_protocol::StrictTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
client: &::fidl_next::Client<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => client.close(),
}
}
}
/// A server handler for the UnknownInteractionsClosedDriverProtocol protocol.
///
/// See [`UnknownInteractionsClosedDriverProtocol`] for more details.
pub trait UnknownInteractionsClosedDriverProtocolServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsClosedDriverProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWay,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayUnion,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayTable,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_driver_protocol::StrictTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T>
for UnknownInteractionsClosedDriverProtocol
where
___H: UnknownInteractionsClosedDriverProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
9111839835597799810 => {
handler.strict_one_way(server).await;
}
ordinal => server.close(),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
2815690661228737027 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way(responder).await;
}
5761316743698652038 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields(responder).await;
}
7235351480214368636 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union(responder).await;
}
1839495150551777151 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table(responder).await;
}
4350840352076287137 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_err(responder).await;
}
3933117456632607830 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields_err(responder).await;
}
4598950031783776653 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union_err(responder).await;
}
1456858375973362525 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table_err(responder).await;
}
ordinal => responder.server().close(),
}
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse: ::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 UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse: ::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<WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
type Natural = UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse {
type EncodedOption =
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_closed_protocol_strict_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_closed_protocol_strict_two_way_union_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_closed_protocol_strict_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_closed_protocol_strict_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsClosedProtocolStrictTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsClosedProtocolStrictTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictTwoWayTableResponse {
type Encoded = WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsClosedProtocolStrictTwoWayTableResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsClosedProtocolStrictTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsClosedProtocolStrictTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayErrResponse`].
pub type WireUnknownInteractionsClosedProtocolStrictTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse: ::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 UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse: ::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<WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
{
type Natural = UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_closed_protocol_strict_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_closed_protocol_strict_two_way_union_err_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_closed_protocol_strict_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_closed_protocol_strict_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsClosedProtocolStrictEventFieldsRequest {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictEventFieldsRequest {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsClosedProtocolStrictEventFieldsRequest {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedProtocolStrictEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedProtocolStrictEventFieldsRequest: ::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 UnknownInteractionsClosedProtocolStrictEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsClosedProtocolStrictEventFieldsRequest: ::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<WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest>
for UnknownInteractionsClosedProtocolStrictEventFieldsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest {
type Natural = UnknownInteractionsClosedProtocolStrictEventFieldsRequest;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest>
for UnknownInteractionsClosedProtocolStrictEventFieldsRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictEventFieldsRequest`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest {
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsClosedProtocolStrictEventUnionRequest {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictEventUnionRequest {
type Encoded = WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsClosedProtocolStrictEventUnionRequest {
type EncodedOption =
WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsClosedProtocolStrictEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsClosedProtocolStrictEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsClosedProtocolStrictEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsClosedProtocolStrictEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsClosedProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>
{
type Natural = UnknownInteractionsClosedProtocolStrictEventUnionRequest;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsClosedProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
> for UnknownInteractionsClosedProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsClosedProtocolStrictEventUnionRequest>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
> for Box<UnknownInteractionsClosedProtocolStrictEventUnionRequest>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsClosedProtocolStrictEventUnionRequest as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
> for Box<UnknownInteractionsClosedProtocolStrictEventUnionRequest>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictEventUnionRequest`].
#[repr(transparent)]
pub struct WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_closed_protocol_strict_event_union_request {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_closed_protocol_strict_event_union_request::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_closed_protocol_strict_event_union_request::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_closed_protocol_strict_event_union_request::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsClosedProtocolStrictEventUnionRequest {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsClosedProtocolStrictEventUnionRequest<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsClosedProtocolStrictEventTableRequest {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsClosedProtocolStrictEventTableRequest {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsClosedProtocolStrictEventTableRequest {
type Encoded = WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsClosedProtocolStrictEventTableRequest
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsClosedProtocolStrictEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsClosedProtocolStrictEventTableRequest
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsClosedProtocolStrictEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de>>
for UnknownInteractionsClosedProtocolStrictEventTableRequest
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de>
{
type Natural = UnknownInteractionsClosedProtocolStrictEventTableRequest;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de>>
for UnknownInteractionsClosedProtocolStrictEventTableRequest
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsClosedProtocolStrictEventTableRequest`].
#[repr(C)]
pub struct WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsClosedProtocolStrictEventTableRequest")
.field("some_field", &self.some_field())
.finish()
}
}
/// The type corresponding to the UnknownInteractionsClosedProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct UnknownInteractionsClosedProtocol;
pub mod unknown_interactions_closed_protocol {
pub mod prelude {
pub use crate::{
UnknownInteractionsClosedProtocol, UnknownInteractionsClosedProtocolClientHandler,
UnknownInteractionsClosedProtocolServerHandler, unknown_interactions_closed_protocol,
};
pub use crate::UnknownInteractionsClosedProtocolStrictEventFieldsRequest;
pub use crate::UnknownInteractionsClosedProtocolStrictEventTableRequest;
pub use crate::UnknownInteractionsClosedProtocolStrictEventUnionRequest;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayErrResponse;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse;
pub use crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse;
}
pub struct StrictOneWay;
impl ::fidl_next::Method for StrictOneWay {
const ORDINAL: u64 = 401526495318825508;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct StrictTwoWay;
impl ::fidl_next::Method for StrictTwoWay {
const ORDINAL: u64 = 6834828562275693047;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = ();
}
pub struct StrictTwoWayFields;
impl ::fidl_next::Method for StrictTwoWayFields {
const ORDINAL: u64 = 1379139029283639891;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse;
}
pub struct StrictTwoWayUnion;
impl ::fidl_next::Method for StrictTwoWayUnion {
const ORDINAL: u64 = 7544414847426850727;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsClosedProtocolStrictTwoWayUnionResponse<'static>;
}
pub struct StrictTwoWayTable;
impl ::fidl_next::Method for StrictTwoWayTable {
const ORDINAL: u64 = 7947328131967870853;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsClosedProtocolStrictTwoWayTableResponse<'static>;
}
pub struct StrictTwoWayErr;
impl ::fidl_next::Method for StrictTwoWayErr {
const ORDINAL: u64 = 5738532966428790074;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedProtocolStrictTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayFieldsErr;
impl ::fidl_next::Method for StrictTwoWayFieldsErr {
const ORDINAL: u64 = 802395819586836733;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayUnionErr;
impl ::fidl_next::Method for StrictTwoWayUnionErr {
const ORDINAL: u64 = 925029359463709824;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayTableErr;
impl ::fidl_next::Method for StrictTwoWayTableErr {
const ORDINAL: u64 = 1260407702860823440;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictEvent;
impl ::fidl_next::Method for StrictEvent {
const ORDINAL: u64 = 760799297757210939;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ::fidl_next::Never;
type Response = ();
}
pub struct StrictEventFields;
impl ::fidl_next::Method for StrictEventFields {
const ORDINAL: u64 = 6736355582617074292;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest;
}
pub struct StrictEventUnion;
impl ::fidl_next::Method for StrictEventUnion {
const ORDINAL: u64 = 4288682345454280036;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ::fidl_next::Never;
type Response =
crate::WireUnknownInteractionsClosedProtocolStrictEventUnionRequest<'static>;
}
pub struct StrictEventTable;
impl ::fidl_next::Method for StrictEventTable {
const ORDINAL: u64 = 2871682464255309246;
type Protocol = crate::UnknownInteractionsClosedProtocol;
type Request = ::fidl_next::Never;
type Response =
crate::WireUnknownInteractionsClosedProtocolStrictEventTableRequest<'static>;
}
mod ___detail {
pub struct StrictEventFields<T0> {
some_field: T0,
}
impl<T0> ::fidl_next::Encodable for StrictEventFields<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>,
{
type Encoded = crate::WireUnknownInteractionsClosedProtocolStrictEventFieldsRequest;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for StrictEventFields<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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::UnknownInteractionsClosedProtocol
where
___T: ::fidl_next::Transport,
{
type Client = UnknownInteractionsClosedProtocolClient<___T>;
type Server = UnknownInteractionsClosedProtocolServer<___T>;
}
/// The client for the `UnknownInteractionsClosedProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsClosedProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> UnknownInteractionsClosedProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(401526495318825508, ()),
)
}
pub fn strict_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6834828562275693047, ()),
)
}
pub fn strict_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1379139029283639891, ()),
)
}
pub fn strict_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7544414847426850727, ()),
)
}
pub fn strict_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7947328131967870853, ()),
)
}
pub fn strict_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(5738532966428790074, ()),
)
}
pub fn strict_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(802395819586836733, ()),
)
}
pub fn strict_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(925029359463709824, ()),
)
}
pub fn strict_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1260407702860823440, ()),
)
}
}
/// The server for the `UnknownInteractionsClosedProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsClosedProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> UnknownInteractionsClosedProtocolServer<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_event(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.server.send_event(760799297757210939, ()),
)
}
pub fn strict_event_fields(
&self,
some_field: 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.strict_event_fields_with(StrictEventFields { some_field })
}
pub fn strict_event_fields_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventFields as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(6736355582617074292, request),
)
}
pub fn strict_event_union_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventUnion as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(4288682345454280036, request),
)
}
pub fn strict_event_table_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventTable as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(2871682464255309246, request),
)
}
}
}
}
/// A client handler for the UnknownInteractionsClosedProtocol protocol.
///
/// See [`UnknownInteractionsClosedProtocol`] for more details.
pub trait UnknownInteractionsClosedProtocolClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_event(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsClosedProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_fields(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsClosedProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_closed_protocol::StrictEventFields, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_union(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsClosedProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_closed_protocol::StrictEventUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_table(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsClosedProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_closed_protocol::StrictEventTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T>
for UnknownInteractionsClosedProtocol
where
___H: UnknownInteractionsClosedProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<unknown_interactions_closed_protocol::StrictTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictEventFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictEventUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_closed_protocol::StrictEventTable 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 {
760799297757210939 => {
handler.strict_event(client).await;
}
6736355582617074292 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_fields(client, decoded).await,
Err(e) => client.close(),
},
4288682345454280036 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_union(client, decoded).await,
Err(e) => client.close(),
},
2871682464255309246 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_table(client, decoded).await,
Err(e) => client.close(),
},
ordinal => client.close(),
}
}
}
/// A server handler for the UnknownInteractionsClosedProtocol protocol.
///
/// See [`UnknownInteractionsClosedProtocol`] for more details.
pub trait UnknownInteractionsClosedProtocolServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsClosedProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_closed_protocol::StrictTwoWay, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayUnion,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayTable,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_closed_protocol::StrictTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T>
for UnknownInteractionsClosedProtocol
where
___H: UnknownInteractionsClosedProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
401526495318825508 => {
handler.strict_one_way(server).await;
}
ordinal => server.close(),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
6834828562275693047 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way(responder).await;
}
1379139029283639891 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields(responder).await;
}
7544414847426850727 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union(responder).await;
}
7947328131967870853 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table(responder).await;
}
5738532966428790074 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_err(responder).await;
}
802395819586836733 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields_err(responder).await;
}
925029359463709824 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union_err(responder).await;
}
1260407702860823440 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table_err(responder).await;
}
ordinal => responder.server().close(),
}
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse: ::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 UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse: ::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<WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
type Natural = UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
type Decoded<'de> = WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse {
type EncodedOption =
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_driver_protocol_strict_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_driver_protocol_strict_two_way_union_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_driver_protocol_strict_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_driver_protocol_strict_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsDriverProtocolStrictTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsDriverProtocolStrictTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolStrictTwoWayTableResponse {
type Encoded = WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolStrictTwoWayTableResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsDriverProtocolStrictTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsDriverProtocolStrictTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayErrResponse`].
pub type WireUnknownInteractionsDriverProtocolStrictTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse: ::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 UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse: ::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<WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
{
type Natural = UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_driver_protocol_strict_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_driver_protocol_strict_two_way_union_err_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_driver_protocol_strict_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_driver_protocol_strict_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsDriverProtocolFlexibleTwoWayResponse = ();
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayResponse`].
pub type WireUnknownInteractionsDriverProtocolFlexibleTwoWayResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse: ::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 UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse: ::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<WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
{
type Natural = UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse {
type EncodedOption =
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
> for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_driver_protocol_flexible_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_driver_protocol_flexible_two_way_union_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_driver_protocol_flexible_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_driver_protocol_flexible_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse {
type Encoded = WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsDriverProtocolFlexibleTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayErrResponse`].
pub type WireUnknownInteractionsDriverProtocolFlexibleTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
{
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse: ::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 UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse: ::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<WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(
wire: WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
{
type Natural = UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse>
for UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
{
type EncodedOption =
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>>
for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
{
#[inline]
fn from_wire(
wire: WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<
UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse as ::fidl_next::FromWireOption<WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>>
>::from_wire_option(wire).map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_driver_protocol_flexible_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_driver_protocol_flexible_two_way_union_err_response::Ref<'_>
{
match self.raw.ordinal() {
1 => crate::unknown_interactions_driver_protocol_flexible_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_driver_protocol_flexible_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>
{
type Decoded<'de> =
WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<
&WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<
WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>,
> {
if self.is_some() {
Some(WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de>
::fidl_next::FromWire<WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>>
for UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<
WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>,
> for UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
/// The type corresponding to the UnknownInteractionsDriverProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct UnknownInteractionsDriverProtocol;
pub mod unknown_interactions_driver_protocol {
pub mod prelude {
pub use crate::{
UnknownInteractionsDriverProtocol, UnknownInteractionsDriverProtocolClientHandler,
UnknownInteractionsDriverProtocolServerHandler, unknown_interactions_driver_protocol,
};
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse;
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse;
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayErrResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse;
pub use crate::UnknownInteractionsDriverProtocolFlexibleTwoWayResponse;
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayErrResponse;
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse;
pub use crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse;
}
pub struct StrictOneWay;
impl ::fidl_next::Method for StrictOneWay {
const ORDINAL: u64 = 6982839851953080288;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct FlexibleOneWay;
impl ::fidl_next::Method for FlexibleOneWay {
const ORDINAL: u64 = 1083620022582160398;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct StrictTwoWay;
impl ::fidl_next::Method for StrictTwoWay {
const ORDINAL: u64 = 1481114722667499972;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ();
}
pub struct StrictTwoWayFields;
impl ::fidl_next::Method for StrictTwoWayFields {
const ORDINAL: u64 = 6841797014773573215;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse;
}
pub struct StrictTwoWayUnion;
impl ::fidl_next::Method for StrictTwoWayUnion {
const ORDINAL: u64 = 1451514501977162287;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsDriverProtocolStrictTwoWayUnionResponse<'static>;
}
pub struct StrictTwoWayTable;
impl ::fidl_next::Method for StrictTwoWayTable {
const ORDINAL: u64 = 3330693085881435529;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response =
crate::WireUnknownInteractionsDriverProtocolStrictTwoWayTableResponse<'static>;
}
pub struct StrictTwoWayErr;
impl ::fidl_next::Method for StrictTwoWayErr {
const ORDINAL: u64 = 8222960355260037542;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsDriverProtocolStrictTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayFieldsErr;
impl ::fidl_next::Method for StrictTwoWayFieldsErr {
const ORDINAL: u64 = 225387363174180470;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayUnionErr;
impl ::fidl_next::Method for StrictTwoWayUnionErr {
const ORDINAL: u64 = 3066880266580913088;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayTableErr;
impl ::fidl_next::Method for StrictTwoWayTableErr {
const ORDINAL: u64 = 708169949929096689;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWay;
impl ::fidl_next::Method for FlexibleTwoWay {
const ORDINAL: u64 = 2929398860738426482;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayResponse,
>;
}
pub struct FlexibleTwoWayFields;
impl ::fidl_next::Method for FlexibleTwoWayFields {
const ORDINAL: u64 = 8423663794424433896;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse,
>;
}
pub struct FlexibleTwoWayUnion;
impl ::fidl_next::Method for FlexibleTwoWayUnion {
const ORDINAL: u64 = 8216450897182897849;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse<'static>,
>;
}
pub struct FlexibleTwoWayTable;
impl ::fidl_next::Method for FlexibleTwoWayTable {
const ORDINAL: u64 = 1049265954148894210;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse<'static>,
>;
}
pub struct FlexibleTwoWayErr;
impl ::fidl_next::Method for FlexibleTwoWayErr {
const ORDINAL: u64 = 5583489590753947170;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWayFieldsErr;
impl ::fidl_next::Method for FlexibleTwoWayFieldsErr {
const ORDINAL: u64 = 6033174601748665003;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWayUnionErr;
impl ::fidl_next::Method for FlexibleTwoWayUnionErr {
const ORDINAL: u64 = 6235121653537390575;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWayTableErr;
impl ::fidl_next::Method for FlexibleTwoWayTableErr {
const ORDINAL: u64 = 940887795361350656;
type Protocol = crate::UnknownInteractionsDriverProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
mod ___detail {
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::UnknownInteractionsDriverProtocol
where
___T: ::fidl_next::Transport,
{
type Client = UnknownInteractionsDriverProtocolClient<___T>;
type Server = UnknownInteractionsDriverProtocolServer<___T>;
}
/// The client for the `UnknownInteractionsDriverProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsDriverProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> UnknownInteractionsDriverProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(6982839851953080288, ()),
)
}
pub fn flexible_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(1083620022582160398, ()),
)
}
pub fn strict_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1481114722667499972, ()),
)
}
pub fn strict_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6841797014773573215, ()),
)
}
pub fn strict_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1451514501977162287, ()),
)
}
pub fn strict_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3330693085881435529, ()),
)
}
pub fn strict_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8222960355260037542, ()),
)
}
pub fn strict_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(225387363174180470, ()),
)
}
pub fn strict_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3066880266580913088, ()),
)
}
pub fn strict_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(708169949929096689, ()),
)
}
pub fn flexible_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(2929398860738426482, ()),
)
}
pub fn flexible_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8423663794424433896, ()),
)
}
pub fn flexible_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8216450897182897849, ()),
)
}
pub fn flexible_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1049265954148894210, ()),
)
}
pub fn flexible_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(5583489590753947170, ()),
)
}
pub fn flexible_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6033174601748665003, ()),
)
}
pub fn flexible_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6235121653537390575, ()),
)
}
pub fn flexible_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(940887795361350656, ()),
)
}
}
/// The server for the `UnknownInteractionsDriverProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsDriverProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> UnknownInteractionsDriverProtocolServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the UnknownInteractionsDriverProtocol protocol.
///
/// See [`UnknownInteractionsDriverProtocol`] for more details.
pub trait UnknownInteractionsDriverProtocolClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn on_unknown_interaction(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsDriverProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
client.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for UnknownInteractionsDriverProtocol
where
___H: UnknownInteractionsDriverProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<unknown_interactions_driver_protocol::StrictTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::StrictTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::StrictTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::StrictTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::StrictTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::StrictTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::StrictTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWay as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_driver_protocol::FlexibleTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
{
async fn on_event(
handler: &mut ___H,
client: &::fidl_next::Client<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
ordinal => handler.on_unknown_interaction(client, ordinal).await,
}
}
}
/// A server handler for the UnknownInteractionsDriverProtocol protocol.
///
/// See [`UnknownInteractionsDriverProtocol`] for more details.
pub trait UnknownInteractionsDriverProtocolServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsDriverProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsDriverProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_driver_protocol::StrictTwoWay, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayUnion,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayTable,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::StrictTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWay,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_union(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayUnion,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_table(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayTable,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_driver_protocol::FlexibleTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn on_unknown_interaction(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsDriverProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
server.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T>
for UnknownInteractionsDriverProtocol
where
___H: UnknownInteractionsDriverProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
6982839851953080288 => {
handler.strict_one_way(server).await;
}
1083620022582160398 => {
handler.flexible_one_way(server).await;
}
ordinal => handler.on_unknown_interaction(server, ordinal).await,
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
1481114722667499972 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way(responder).await;
}
6841797014773573215 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields(responder).await;
}
1451514501977162287 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union(responder).await;
}
3330693085881435529 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table(responder).await;
}
8222960355260037542 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_err(responder).await;
}
225387363174180470 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields_err(responder).await;
}
3066880266580913088 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union_err(responder).await;
}
708169949929096689 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table_err(responder).await;
}
2929398860738426482 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way(responder).await;
}
8423663794424433896 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_fields(responder).await;
}
8216450897182897849 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_union(responder).await;
}
1049265954148894210 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_table(responder).await;
}
5583489590753947170 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_err(responder).await;
}
6033174601748665003 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_fields_err(responder).await;
}
6235121653537390575 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_union_err(responder).await;
}
940887795361350656 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_table_err(responder).await;
}
ordinal => {
let server = ::fidl_next::Server::wrap_untyped(responder.server());
handler.on_unknown_interaction(server, ordinal).await;
}
}
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolStrictTwoWayFieldsResponse {
type EncodedOption =
::fidl_next::WireBox<'static, WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolStrictTwoWayFieldsResponse: ::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 UnknownInteractionsProtocolStrictTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolStrictTwoWayFieldsResponse: ::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<WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsProtocolStrictTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse {
type Natural = UnknownInteractionsProtocolStrictTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse>
for UnknownInteractionsProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse {
type Decoded<'de> = WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsProtocolStrictTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolStrictTwoWayUnionResponse {
type EncodedOption = WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsProtocolStrictTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsProtocolStrictTwoWayUnionResponse;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
> for UnknownInteractionsProtocolStrictTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsProtocolStrictTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsProtocolStrictTwoWayUnionResponse as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsProtocolStrictTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_protocol_strict_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_protocol_strict_two_way_union_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_protocol_strict_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_protocol_strict_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>> {
if self.is_some() {
Some(WireUnknownInteractionsProtocolStrictTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsProtocolStrictTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsProtocolStrictTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictTwoWayTableResponse {
type Encoded = WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsProtocolStrictTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsProtocolStrictTwoWayTableResponse;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayTableResponse
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de>) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsProtocolStrictTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsProtocolStrictTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayErrResponse`].
pub type WireUnknownInteractionsProtocolStrictTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
type EncodedOption =
::fidl_next::WireBox<'static, WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse: ::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 UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse: ::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<WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
type Natural = UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse>
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
type Decoded<'de> = WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsProtocolStrictTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse {
type EncodedOption =
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsProtocolStrictTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsProtocolStrictTwoWayUnionErrResponse;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsProtocolStrictTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsProtocolStrictTwoWayUnionErrResponse as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsProtocolStrictTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_protocol_strict_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_protocol_strict_two_way_union_err_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_protocol_strict_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_protocol_strict_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsProtocolStrictTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsProtocolStrictTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsProtocolStrictTwoWayTableErrResponse;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de>>
for UnknownInteractionsProtocolStrictTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsProtocolStrictTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsProtocolFlexibleTwoWayResponse = ();
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayResponse`].
pub type WireUnknownInteractionsProtocolFlexibleTwoWayResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
type EncodedOption =
::fidl_next::WireBox<'static, WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse: ::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 UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse: ::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<WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
type Natural = UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsProtocolFlexibleTwoWayUnionResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse {
type Encoded = WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse {
type EncodedOption =
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
where
___E: ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayUnionResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>
{
type Natural = UnknownInteractionsProtocolFlexibleTwoWayUnionResponse;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
> for UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsProtocolFlexibleTwoWayUnionResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsProtocolFlexibleTwoWayUnionResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsProtocolFlexibleTwoWayUnionResponse as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
> for Box<UnknownInteractionsProtocolFlexibleTwoWayUnionResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayUnionResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_protocol_flexible_two_way_union_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_protocol_flexible_two_way_union_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_protocol_flexible_two_way_union_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_protocol_flexible_two_way_union_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayTableResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsProtocolFlexibleTwoWayTableResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleTwoWayTableResponse {
type Encoded = WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayTableResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayTableResponse
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de>
{
type Natural = UnknownInteractionsProtocolFlexibleTwoWayTableResponse;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayTableResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayTableResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsProtocolFlexibleTwoWayTableResponse")
.field("some_field", &self.some_field())
.finish()
}
}
pub type UnknownInteractionsProtocolFlexibleTwoWayErrResponse = ();
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayErrResponse`].
pub type WireUnknownInteractionsProtocolFlexibleTwoWayErrResponse = ();
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
type EncodedOption = ::fidl_next::WireBox<
'static,
WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse: ::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 UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse: ::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<WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
type Natural = UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse {
type Encoded = WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse {
type EncodedOption =
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
where
___E: ?Sized,
UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>
{
type Natural = UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>
{
type Natural =
::core::option::Option<UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
> for Box<UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse`].
#[repr(transparent)]
pub struct WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_protocol_flexible_two_way_union_err_response {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_protocol_flexible_two_way_union_err_response::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_protocol_flexible_two_way_union_err_response::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_protocol_flexible_two_way_union_err_response::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>>
{
if self.is_some() {
Some(WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse {
type Encoded = WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse
{
#[inline]
fn from_wire(
wire_: WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>,
) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>
{
type Natural = UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse;
}
impl<'de>
::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>>
for UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse
{
#[inline]
fn from_wire_ref(
wire: &WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>,
) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse`].
#[repr(C)]
pub struct WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug
for WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'de>
{
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse")
.field("some_field", &self.some_field())
.finish()
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsProtocolStrictEventFieldsRequest {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictEventFieldsRequest {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsProtocolStrictEventFieldsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsProtocolStrictEventFieldsRequest;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolStrictEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolStrictEventFieldsRequest {
type EncodedOption =
::fidl_next::WireBox<'static, WireUnknownInteractionsProtocolStrictEventFieldsRequest>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolStrictEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolStrictEventFieldsRequest: ::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 UnknownInteractionsProtocolStrictEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolStrictEventFieldsRequest: ::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<WireUnknownInteractionsProtocolStrictEventFieldsRequest>
for UnknownInteractionsProtocolStrictEventFieldsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsProtocolStrictEventFieldsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolStrictEventFieldsRequest {
type Natural = UnknownInteractionsProtocolStrictEventFieldsRequest;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictEventFieldsRequest>
for UnknownInteractionsProtocolStrictEventFieldsRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictEventFieldsRequest`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsProtocolStrictEventFieldsRequest {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolStrictEventFieldsRequest {
type Decoded<'de> = WireUnknownInteractionsProtocolStrictEventFieldsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictEventFieldsRequest
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsProtocolStrictEventUnionRequest {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictEventUnionRequest {
type Encoded = WireUnknownInteractionsProtocolStrictEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolStrictEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolStrictEventUnionRequest {
type EncodedOption = WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolStrictEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsProtocolStrictEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsProtocolStrictEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsProtocolStrictEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
type Natural = UnknownInteractionsProtocolStrictEventUnionRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>>
for UnknownInteractionsProtocolStrictEventUnionRequest
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsProtocolStrictEventUnionRequest>;
}
impl<'de>
::fidl_next::FromWireOption<WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>>
for Box<UnknownInteractionsProtocolStrictEventUnionRequest>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsProtocolStrictEventUnionRequest as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>,
> for Box<UnknownInteractionsProtocolStrictEventUnionRequest>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictEventUnionRequest`].
#[repr(transparent)]
pub struct WireUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolStrictEventUnionRequest<'static> {
type Decoded<'de> = WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_protocol_strict_event_union_request {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_protocol_strict_event_union_request::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_protocol_strict_event_union_request::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_protocol_strict_event_union_request::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>> {
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsProtocolStrictEventUnionRequest<'de>> {
if self.is_some() {
Some(WireUnknownInteractionsProtocolStrictEventUnionRequest {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsProtocolStrictEventUnionRequest<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsProtocolStrictEventTableRequest {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsProtocolStrictEventTableRequest {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolStrictEventTableRequest {
type Encoded = WireUnknownInteractionsProtocolStrictEventTableRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolStrictEventTableRequest
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolStrictEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolStrictEventTableRequest
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsProtocolStrictEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolStrictEventTableRequest<'de>>
for UnknownInteractionsProtocolStrictEventTableRequest
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsProtocolStrictEventTableRequest<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolStrictEventTableRequest<'de> {
type Natural = UnknownInteractionsProtocolStrictEventTableRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolStrictEventTableRequest<'de>>
for UnknownInteractionsProtocolStrictEventTableRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolStrictEventTableRequest<'de>) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolStrictEventTableRequest`].
#[repr(C)]
pub struct WireUnknownInteractionsProtocolStrictEventTableRequest<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolStrictEventTableRequest<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolStrictEventTableRequest<'static> {
type Decoded<'de> = WireUnknownInteractionsProtocolStrictEventTableRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolStrictEventTableRequest<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsProtocolStrictEventTableRequest<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolStrictEventTableRequest<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsProtocolStrictEventTableRequest")
.field("some_field", &self.some_field())
.finish()
}
}
#[derive(PartialEq, Clone, Debug)]
#[repr(C)]
pub struct UnknownInteractionsProtocolFlexibleEventFieldsRequest {
pub some_field: i32,
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleEventFieldsRequest {
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
Self,
WireUnknownInteractionsProtocolFlexibleEventFieldsRequest,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
)
};
type Encoded = WireUnknownInteractionsProtocolFlexibleEventFieldsRequest;
}
unsafe impl<___E> ::fidl_next::Encode<___E>
for UnknownInteractionsProtocolFlexibleEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleEventFieldsRequest
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 {
some_field,
} = out_;
}
::fidl_next::EncodeRef::encode_ref(&self.some_field, encoder_, some_field)?;
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolFlexibleEventFieldsRequest {
type EncodedOption =
::fidl_next::WireBox<'static, WireUnknownInteractionsProtocolFlexibleEventFieldsRequest>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolFlexibleEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolFlexibleEventFieldsRequest: ::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 UnknownInteractionsProtocolFlexibleEventFieldsRequest
where
___E: ::fidl_next::Encoder + ?Sized,
UnknownInteractionsProtocolFlexibleEventFieldsRequest: ::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<WireUnknownInteractionsProtocolFlexibleEventFieldsRequest>
for UnknownInteractionsProtocolFlexibleEventFieldsRequest
{
const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
WireUnknownInteractionsProtocolFlexibleEventFieldsRequest,
Self,
> = unsafe {
::fidl_next::CopyOptimization::enable_if(
true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
.is_enabled(),
)
};
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolFlexibleEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWire::from_wire(wire.some_field) }
}
}
impl ::fidl_next::IntoNatural for WireUnknownInteractionsProtocolFlexibleEventFieldsRequest {
type Natural = UnknownInteractionsProtocolFlexibleEventFieldsRequest;
}
impl ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleEventFieldsRequest>
for UnknownInteractionsProtocolFlexibleEventFieldsRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolFlexibleEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::FromWireRef::from_wire_ref(&wire.some_field) }
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleEventFieldsRequest`].
#[derive(Clone, Debug)]
#[repr(C)]
pub struct WireUnknownInteractionsProtocolFlexibleEventFieldsRequest {
pub some_field: ::fidl_next::WireI32,
}
unsafe impl ::fidl_next::Wire for WireUnknownInteractionsProtocolFlexibleEventFieldsRequest {
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleEventFieldsRequest;
#[inline]
fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge! {
let Self {
some_field,
} = &mut *out_;
}
::fidl_next::Wire::zero_padding(some_field);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleEventFieldsRequest
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 some_field,
} = slot_;
}
::fidl_next::Decode::decode(some_field.as_mut(), decoder_)?;
Ok(())
}
}
#[derive(PartialEq, Clone, Debug)]
pub enum UnknownInteractionsProtocolFlexibleEventUnionRequest {
SomeField(i32),
UnknownOrdinal_(u64),
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleEventUnionRequest {
type Encoded = WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolFlexibleEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode(
self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
}
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleEventUnionRequest
where
___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
___E: ::fidl_next::Encoder,
{
#[inline]
fn encode_ref(
&self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = out);
match self {
Self::SomeField(value) => {
::fidl_next::RawWireUnion::encode_as::<___E, &i32>(value, 1, encoder, raw)?
}
Self::UnknownOrdinal_(ordinal) => {
return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
}
}
Ok(())
}
}
impl ::fidl_next::EncodableOption for UnknownInteractionsProtocolFlexibleEventUnionRequest {
type EncodedOption = WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>;
}
unsafe impl<___E> ::fidl_next::EncodeOption<___E>
for UnknownInteractionsProtocolFlexibleEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsProtocolFlexibleEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::Encode::encode(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E>
for UnknownInteractionsProtocolFlexibleEventUnionRequest
where
___E: ?Sized,
UnknownInteractionsProtocolFlexibleEventUnionRequest: ::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> {
::fidl_next::munge!(let WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest { raw, _phantom: _ } = &mut *out);
if let Some(inner) = this {
let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
} else {
::fidl_next::RawWireUnion::encode_absent(raw);
}
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>>
for UnknownInteractionsProtocolFlexibleEventUnionRequest
{
#[inline]
fn from_wire(wire: WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>) -> Self {
let wire = ::core::mem::ManuallyDrop::new(wire);
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWire::from_wire(unsafe {
wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>
{
type Natural = UnknownInteractionsProtocolFlexibleEventUnionRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>>
for UnknownInteractionsProtocolFlexibleEventUnionRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>) -> Self {
match wire.raw.ordinal() {
1 => Self::SomeField(::fidl_next::FromWireRef::from_wire_ref(unsafe {
wire.raw.get().deref_unchecked::<::fidl_next::WireI32>()
})),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
> for UnknownInteractionsProtocolFlexibleEventUnionRequest
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.into_option() {
Some(::fidl_next::FromWire::from_wire(inner))
} else {
None
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>
{
type Natural = ::core::option::Option<UnknownInteractionsProtocolFlexibleEventUnionRequest>;
}
impl<'de>
::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
> for Box<UnknownInteractionsProtocolFlexibleEventUnionRequest>
{
#[inline]
fn from_wire_option(
wire: WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
<UnknownInteractionsProtocolFlexibleEventUnionRequest as ::fidl_next::FromWireOption<
WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
>>::from_wire_option(wire)
.map(Box::new)
}
}
impl<'de>
::fidl_next::FromWireOptionRef<
WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
> for Box<UnknownInteractionsProtocolFlexibleEventUnionRequest>
{
#[inline]
fn from_wire_option_ref(
wire: &WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>,
) -> ::core::option::Option<Self> {
if let Some(inner) = wire.as_ref() {
Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
} else {
None
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleEventUnionRequest`].
#[repr(transparent)]
pub struct WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de> {
fn drop(&mut self) {
match self.raw.ordinal() {
1 => {
let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
}
_ => (),
}
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
pub mod unknown_interactions_protocol_flexible_event_union_request {
pub enum Ref<'de> {
SomeField(&'de ::fidl_next::WireI32),
UnknownOrdinal_(u64),
}
}
impl<'de> WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de> {
pub fn as_ref(
&self,
) -> crate::unknown_interactions_protocol_flexible_event_union_request::Ref<'_> {
match self.raw.ordinal() {
1 => crate::unknown_interactions_protocol_flexible_event_union_request::Ref::SomeField(
unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>() }
),
unknown => crate::unknown_interactions_protocol_flexible_event_union_request::Ref::UnknownOrdinal_(unknown),
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self.raw.ordinal() {
1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
}
}
#[repr(transparent)]
pub struct WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de> {
raw: ::fidl_next::RawWireUnion,
_phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
}
unsafe impl ::fidl_next::Wire
for WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>
{
type Decoded<'de> = WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
::fidl_next::RawWireUnion::zero_padding(raw);
}
}
impl<'de> WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de> {
pub fn is_some(&self) -> bool {
self.raw.is_some()
}
pub fn is_none(&self) -> bool {
self.raw.is_none()
}
pub fn as_ref(
&self,
) -> ::core::option::Option<&WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>>
{
if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
}
pub fn into_option(
self,
) -> ::core::option::Option<WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>> {
if self.is_some() {
Some(WireUnknownInteractionsProtocolFlexibleEventUnionRequest {
raw: self.raw,
_phantom: ::core::marker::PhantomData,
})
} else {
None
}
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>
where
___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
___D: ::fidl_next::Decoder,
{
fn decode(
mut slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(raw, decoder)?,
0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
_ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
}
Ok(())
}
}
impl<'de> ::core::fmt::Debug
for WireOptionalUnknownInteractionsProtocolFlexibleEventUnionRequest<'de>
{
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
self.as_ref().fmt(f)
}
}
#[derive(PartialEq, Clone, Debug, Default)]
pub struct UnknownInteractionsProtocolFlexibleEventTableRequest {
pub some_field: ::core::option::Option<i32>,
}
impl UnknownInteractionsProtocolFlexibleEventTableRequest {
fn __max_ordinal(&self) -> usize {
if self.some_field.is_some() {
return 1;
}
0
}
}
impl ::fidl_next::Encodable for UnknownInteractionsProtocolFlexibleEventTableRequest {
type Encoded = WireUnknownInteractionsProtocolFlexibleEventTableRequest<'static>;
}
unsafe impl<___E> ::fidl_next::Encode<___E> for UnknownInteractionsProtocolFlexibleEventTableRequest
where
___E: ::fidl_next::Encoder + ?Sized,
{
#[inline]
fn encode(
mut self,
encoder: &mut ___E,
out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
::fidl_next::munge!(let WireUnknownInteractionsProtocolFlexibleEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = self.some_field.take() {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
unsafe impl<___E> ::fidl_next::EncodeRef<___E>
for UnknownInteractionsProtocolFlexibleEventTableRequest
where
___E: ::fidl_next::Encoder + ?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 WireUnknownInteractionsProtocolFlexibleEventTableRequest { table } = out);
let max_ord = self.__max_ordinal();
let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
::fidl_next::Wire::zero_padding(&mut out);
let mut preallocated =
::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
for i in 1..=max_ord {
match i {
1 => {
if let Some(value) = &self.some_field {
::fidl_next::WireEnvelope::encode_value(
value,
preallocated.encoder,
&mut out,
)?;
} else {
::fidl_next::WireEnvelope::encode_zero(&mut out)
}
}
_ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
}
unsafe {
preallocated.write_next(out.assume_init_ref());
}
}
::fidl_next::WireTable::encode_len(table, max_ord);
Ok(())
}
}
impl<'de> ::fidl_next::FromWire<WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de>>
for UnknownInteractionsProtocolFlexibleEventTableRequest
{
#[inline]
fn from_wire(wire_: WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de>) -> Self {
let wire_ = ::core::mem::ManuallyDrop::new(wire_);
let some_field = wire_.table.get(1);
Self {
some_field: some_field.map(|envelope| {
::fidl_next::FromWire::from_wire(unsafe {
envelope.read_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
impl<'de> ::fidl_next::IntoNatural
for WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de>
{
type Natural = UnknownInteractionsProtocolFlexibleEventTableRequest;
}
impl<'de> ::fidl_next::FromWireRef<WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de>>
for UnknownInteractionsProtocolFlexibleEventTableRequest
{
#[inline]
fn from_wire_ref(wire: &WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de>) -> Self {
Self {
some_field: wire.table.get(1).map(|envelope| {
::fidl_next::FromWireRef::from_wire_ref(unsafe {
envelope.deref_unchecked::<::fidl_next::WireI32>()
})
}),
}
}
}
/// The wire type corresponding to [`UnknownInteractionsProtocolFlexibleEventTableRequest`].
#[repr(C)]
pub struct WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de> {
table: ::fidl_next::WireTable<'de>,
}
impl<'de> Drop for WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de> {
fn drop(&mut self) {
let _ = self
.table
.get(1)
.map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
}
}
unsafe impl ::fidl_next::Wire
for WireUnknownInteractionsProtocolFlexibleEventTableRequest<'static>
{
type Decoded<'de> = WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de>;
#[inline]
fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
::fidl_next::munge!(let Self { table } = out);
::fidl_next::WireTable::zero_padding(table);
}
}
unsafe impl<___D> ::fidl_next::Decode<___D>
for WireUnknownInteractionsProtocolFlexibleEventTableRequest<'static>
where
___D: ::fidl_next::Decoder + ?Sized,
{
fn decode(
slot: ::fidl_next::Slot<'_, Self>,
decoder: &mut ___D,
) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
::fidl_next::munge!(let Self { table } = slot);
::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
match ordinal {
0 => unsafe { ::core::hint::unreachable_unchecked() },
1 => {
::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
slot.as_mut(),
decoder,
)?;
Ok(())
}
_ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
}
})
}
}
impl<'de> WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de> {
pub fn some_field(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
unsafe { Some(self.table.get(1)?.deref_unchecked()) }
}
}
impl<'de> ::core::fmt::Debug for WireUnknownInteractionsProtocolFlexibleEventTableRequest<'de> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
f.debug_struct("UnknownInteractionsProtocolFlexibleEventTableRequest")
.field("some_field", &self.some_field())
.finish()
}
}
/// The type corresponding to the UnknownInteractionsProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct UnknownInteractionsProtocol;
pub mod unknown_interactions_protocol {
pub mod prelude {
pub use crate::{
UnknownInteractionsProtocol, UnknownInteractionsProtocolClientHandler,
UnknownInteractionsProtocolServerHandler, unknown_interactions_protocol,
};
pub use crate::UnknownInteractionsProtocolFlexibleEventFieldsRequest;
pub use crate::UnknownInteractionsProtocolFlexibleEventTableRequest;
pub use crate::UnknownInteractionsProtocolFlexibleEventUnionRequest;
pub use crate::UnknownInteractionsProtocolStrictEventFieldsRequest;
pub use crate::UnknownInteractionsProtocolStrictEventTableRequest;
pub use crate::UnknownInteractionsProtocolStrictEventUnionRequest;
pub use crate::UnknownInteractionsProtocolStrictTwoWayFieldsResponse;
pub use crate::UnknownInteractionsProtocolStrictTwoWayTableResponse;
pub use crate::UnknownInteractionsProtocolStrictTwoWayUnionResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayErrResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayTableResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse;
pub use crate::UnknownInteractionsProtocolFlexibleTwoWayResponse;
pub use crate::UnknownInteractionsProtocolStrictTwoWayErrResponse;
pub use crate::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse;
pub use crate::UnknownInteractionsProtocolStrictTwoWayTableErrResponse;
pub use crate::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse;
}
pub struct StrictOneWay;
impl ::fidl_next::Method for StrictOneWay {
const ORDINAL: u64 = 5652707722400962470;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct FlexibleOneWay;
impl ::fidl_next::Method for FlexibleOneWay {
const ORDINAL: u64 = 583422011583300678;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::Never;
}
pub struct StrictTwoWay;
impl ::fidl_next::Method for StrictTwoWay {
const ORDINAL: u64 = 8308184097687583042;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ();
}
pub struct StrictTwoWayFields;
impl ::fidl_next::Method for StrictTwoWayFields {
const ORDINAL: u64 = 3697260130745060067;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsProtocolStrictTwoWayFieldsResponse;
}
pub struct StrictTwoWayUnion;
impl ::fidl_next::Method for StrictTwoWayUnion {
const ORDINAL: u64 = 2455165891480464557;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsProtocolStrictTwoWayUnionResponse<'static>;
}
pub struct StrictTwoWayTable;
impl ::fidl_next::Method for StrictTwoWayTable {
const ORDINAL: u64 = 8389853739594228663;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = crate::WireUnknownInteractionsProtocolStrictTwoWayTableResponse<'static>;
}
pub struct StrictTwoWayErr;
impl ::fidl_next::Method for StrictTwoWayErr {
const ORDINAL: u64 = 7862264614495172967;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsProtocolStrictTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayFieldsErr;
impl ::fidl_next::Method for StrictTwoWayFieldsErr {
const ORDINAL: u64 = 2414673307948662059;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayUnionErr;
impl ::fidl_next::Method for StrictTwoWayUnionErr {
const ORDINAL: u64 = 4988571416540160202;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsProtocolStrictTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictTwoWayTableErr;
impl ::fidl_next::Method for StrictTwoWayTableErr {
const ORDINAL: u64 = 5487292735562672344;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireResult<
'static,
crate::WireUnknownInteractionsProtocolStrictTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWay;
impl ::fidl_next::Method for FlexibleTwoWay {
const ORDINAL: u64 = 334879577560091516;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayResponse,
>;
}
pub struct FlexibleTwoWayFields;
impl ::fidl_next::Method for FlexibleTwoWayFields {
const ORDINAL: u64 = 4257018954691721778;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
>;
}
pub struct FlexibleTwoWayUnion;
impl ::fidl_next::Method for FlexibleTwoWayUnion {
const ORDINAL: u64 = 4913460516188409782;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayUnionResponse<'static>,
>;
}
pub struct FlexibleTwoWayTable;
impl ::fidl_next::Method for FlexibleTwoWayTable {
const ORDINAL: u64 = 9171907422498283911;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexible<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayTableResponse<'static>,
>;
}
pub struct FlexibleTwoWayErr;
impl ::fidl_next::Method for FlexibleTwoWayErr {
const ORDINAL: u64 = 6999736795697216519;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayErrResponse,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWayFieldsErr;
impl ::fidl_next::Method for FlexibleTwoWayFieldsErr {
const ORDINAL: u64 = 1093132337162001157;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWayUnionErr;
impl ::fidl_next::Method for FlexibleTwoWayUnionErr {
const ORDINAL: u64 = 2410151523245950935;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct FlexibleTwoWayTableErr;
impl ::fidl_next::Method for FlexibleTwoWayTableErr {
const ORDINAL: u64 = 7893309626427980786;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ();
type Response = ::fidl_next::WireFlexibleResult<
'static,
crate::WireUnknownInteractionsProtocolFlexibleTwoWayTableErrResponse<'static>,
::fidl_next::WireI32,
>;
}
pub struct StrictEvent;
impl ::fidl_next::Method for StrictEvent {
const ORDINAL: u64 = 685715276307386305;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = ();
}
pub struct StrictEventFields;
impl ::fidl_next::Method for StrictEventFields {
const ORDINAL: u64 = 8896208255987935026;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsProtocolStrictEventFieldsRequest;
}
pub struct StrictEventUnion;
impl ::fidl_next::Method for StrictEventUnion {
const ORDINAL: u64 = 3919175221694221274;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsProtocolStrictEventUnionRequest<'static>;
}
pub struct StrictEventTable;
impl ::fidl_next::Method for StrictEventTable {
const ORDINAL: u64 = 2711448698318579984;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsProtocolStrictEventTableRequest<'static>;
}
pub struct FlexibleEvent;
impl ::fidl_next::Method for FlexibleEvent {
const ORDINAL: u64 = 7042257263728687206;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = ();
}
pub struct FlexibleEventFields;
impl ::fidl_next::Method for FlexibleEventFields {
const ORDINAL: u64 = 3613822014516746241;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsProtocolFlexibleEventFieldsRequest;
}
pub struct FlexibleEventUnion;
impl ::fidl_next::Method for FlexibleEventUnion {
const ORDINAL: u64 = 2499446536152409191;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsProtocolFlexibleEventUnionRequest<'static>;
}
pub struct FlexibleEventTable;
impl ::fidl_next::Method for FlexibleEventTable {
const ORDINAL: u64 = 5724881371349617120;
type Protocol = crate::UnknownInteractionsProtocol;
type Request = ::fidl_next::Never;
type Response = crate::WireUnknownInteractionsProtocolFlexibleEventTableRequest<'static>;
}
mod ___detail {
pub struct StrictEventFields<T0> {
some_field: T0,
}
impl<T0> ::fidl_next::Encodable for StrictEventFields<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>,
{
type Encoded = crate::WireUnknownInteractionsProtocolStrictEventFieldsRequest;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for StrictEventFields<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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
pub struct FlexibleEventFields<T0> {
some_field: T0,
}
impl<T0> ::fidl_next::Encodable for FlexibleEventFields<T0>
where
T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireI32>,
{
type Encoded = crate::WireUnknownInteractionsProtocolFlexibleEventFieldsRequest;
}
unsafe impl<___E, T0> ::fidl_next::Encode<___E> for FlexibleEventFields<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 {
some_field,
} = out_;
}
::fidl_next::Encode::encode(self.some_field, encoder_, some_field)?;
Ok(())
}
}
unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::UnknownInteractionsProtocol
where
___T: ::fidl_next::Transport,
{
type Client = UnknownInteractionsProtocolClient<___T>;
type Server = UnknownInteractionsProtocolServer<___T>;
}
/// The client for the `UnknownInteractionsProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> UnknownInteractionsProtocolClient<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(5652707722400962470, ()),
)
}
pub fn flexible_one_way(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.client.send_one_way(583422011583300678, ()),
)
}
pub fn strict_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8308184097687583042, ()),
)
}
pub fn strict_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(3697260130745060067, ()),
)
}
pub fn strict_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(2455165891480464557, ()),
)
}
pub fn strict_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(8389853739594228663, ()),
)
}
pub fn strict_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7862264614495172967, ()),
)
}
pub fn strict_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(2414673307948662059, ()),
)
}
pub fn strict_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(4988571416540160202, ()),
)
}
pub fn strict_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::StrictTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(5487292735562672344, ()),
)
}
pub fn flexible_two_way(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWay, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(334879577560091516, ()),
)
}
pub fn flexible_two_way_fields(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayFields, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(4257018954691721778, ()),
)
}
pub fn flexible_two_way_union(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayUnion, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(4913460516188409782, ()),
)
}
pub fn flexible_two_way_table(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayTable, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(9171907422498283911, ()),
)
}
pub fn flexible_two_way_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(6999736795697216519, ()),
)
}
pub fn flexible_two_way_fields_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayFieldsErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(1093132337162001157, ()),
)
}
pub fn flexible_two_way_union_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayUnionErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(2410151523245950935, ()),
)
}
pub fn flexible_two_way_table_err(
&self,
) -> ::fidl_next::TwoWayFuture<'_, super::FlexibleTwoWayTableErr, ___T> {
::fidl_next::TwoWayFuture::from_untyped(
self.client.send_two_way(7893309626427980786, ()),
)
}
}
/// The server for the `UnknownInteractionsProtocol` protocol.
#[repr(transparent)]
pub struct UnknownInteractionsProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> UnknownInteractionsProtocolServer<___T>
where
___T: ::fidl_next::Transport,
{
pub fn strict_event(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.server.send_event(685715276307386305, ()),
)
}
pub fn strict_event_fields(
&self,
some_field: 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.strict_event_fields_with(StrictEventFields { some_field })
}
pub fn strict_event_fields_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventFields as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(8896208255987935026, request),
)
}
pub fn strict_event_union_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventUnion as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(3919175221694221274, request),
)
}
pub fn strict_event_table_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::StrictEventTable as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(2711448698318579984, request),
)
}
pub fn flexible_event(&self) -> ::fidl_next::SendFuture<'_, ___T> {
::fidl_next::SendFuture::from_untyped(
self.server.send_event(7042257263728687206, ()),
)
}
pub fn flexible_event_fields(
&self,
some_field: 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.flexible_event_fields_with(FlexibleEventFields { some_field })
}
pub fn flexible_event_fields_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::FlexibleEventFields as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(3613822014516746241, request),
)
}
pub fn flexible_event_union_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::FlexibleEventUnion as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(2499446536152409191, request),
)
}
pub fn flexible_event_table_with<___R>(
&self,
request: ___R,
) -> ::fidl_next::SendFuture<'_, ___T>
where
___R: ::fidl_next::Encode<
<___T as ::fidl_next::Transport>::SendBuffer,
Encoded = <super::FlexibleEventTable as ::fidl_next::Method>::Response,
>,
{
::fidl_next::SendFuture::from_untyped(
self.server.send_event(5724881371349617120, request),
)
}
}
}
}
/// A client handler for the UnknownInteractionsProtocol protocol.
///
/// See [`UnknownInteractionsProtocol`] for more details.
pub trait UnknownInteractionsProtocolClientHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_event(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_fields(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_protocol::StrictEventFields, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_union(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_protocol::StrictEventUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_event_table(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_protocol::StrictEventTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event_fields(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_protocol::FlexibleEventFields, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event_union(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_protocol::FlexibleEventUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_event_table(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
event: ::fidl_next::Response<unknown_interactions_protocol::FlexibleEventTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn on_unknown_interaction(
&mut self,
client: &::fidl_next::Client<UnknownInteractionsProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
client.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for UnknownInteractionsProtocol
where
___H: UnknownInteractionsProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
<unknown_interactions_protocol::StrictTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWay as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayFieldsErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayUnionErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleTwoWayTableErr as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictEventFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictEventUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::StrictEventTable as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleEventFields as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleEventUnion as ::fidl_next::Method>::Response:
::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
<unknown_interactions_protocol::FlexibleEventTable 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 {
685715276307386305 => {
handler.strict_event(client).await;
}
8896208255987935026 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_fields(client, decoded).await,
Err(e) => client.close(),
},
3919175221694221274 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_union(client, decoded).await,
Err(e) => client.close(),
},
2711448698318579984 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.strict_event_table(client, decoded).await,
Err(e) => client.close(),
},
7042257263728687206 => {
handler.flexible_event(client).await;
}
3613822014516746241 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.flexible_event_fields(client, decoded).await,
Err(e) => client.close(),
},
2499446536152409191 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.flexible_event_union(client, decoded).await,
Err(e) => client.close(),
},
5724881371349617120 => match ::fidl_next::DecoderExt::decode(buffer) {
Ok(decoded) => handler.flexible_event_table(client, decoded).await,
Err(e) => client.close(),
},
ordinal => handler.on_unknown_interaction(client, ordinal).await,
}
}
}
/// A server handler for the UnknownInteractionsProtocol protocol.
///
/// See [`UnknownInteractionsProtocol`] for more details.
pub trait UnknownInteractionsProtocolServerHandler<
#[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
#[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
>
{
fn strict_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_one_way(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsProtocol, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::StrictTwoWay, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::StrictTwoWayFields, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::StrictTwoWayUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::StrictTwoWayTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_err(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::StrictTwoWayErr, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::StrictTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::StrictTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn strict_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::StrictTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::FlexibleTwoWay, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_fields(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::FlexibleTwoWayFields,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_union(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::FlexibleTwoWayUnion, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_table(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::FlexibleTwoWayTable, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_err(
&mut self,
responder: ::fidl_next::Responder<unknown_interactions_protocol::FlexibleTwoWayErr, ___T>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_fields_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::FlexibleTwoWayFieldsErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_union_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::FlexibleTwoWayUnionErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn flexible_two_way_table_err(
&mut self,
responder: ::fidl_next::Responder<
unknown_interactions_protocol::FlexibleTwoWayTableErr,
___T,
>,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
fn on_unknown_interaction(
&mut self,
server: &::fidl_next::Server<UnknownInteractionsProtocol, ___T>,
ordinal: u64,
) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
server.close();
::core::future::ready(())
}
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for UnknownInteractionsProtocol
where
___H: UnknownInteractionsProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
server: &::fidl_next::Server<Self, ___T>,
ordinal: u64,
buffer: ___T::RecvBuffer,
) {
match ordinal {
5652707722400962470 => {
handler.strict_one_way(server).await;
}
583422011583300678 => {
handler.flexible_one_way(server).await;
}
ordinal => handler.on_unknown_interaction(server, ordinal).await,
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) {
match ordinal {
8308184097687583042 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way(responder).await;
}
3697260130745060067 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields(responder).await;
}
2455165891480464557 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union(responder).await;
}
8389853739594228663 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table(responder).await;
}
7862264614495172967 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_err(responder).await;
}
2414673307948662059 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_fields_err(responder).await;
}
4988571416540160202 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_union_err(responder).await;
}
5487292735562672344 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.strict_two_way_table_err(responder).await;
}
334879577560091516 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way(responder).await;
}
4257018954691721778 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_fields(responder).await;
}
4913460516188409782 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_union(responder).await;
}
9171907422498283911 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_table(responder).await;
}
6999736795697216519 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_err(responder).await;
}
1093132337162001157 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_fields_err(responder).await;
}
2410151523245950935 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_union_err(responder).await;
}
7893309626427980786 => {
let responder = ::fidl_next::Responder::from_untyped(responder);
handler.flexible_two_way_table_err(responder).await;
}
ordinal => {
let server = ::fidl_next::Server::wrap_untyped(responder.server());
handler.on_unknown_interaction(server, ordinal).await;
}
}
}
}
/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
pub mod compat {
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse> for crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse {
fn compat_from(value: crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse> for crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse {
fn compat_from(value: crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse> for crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse> for crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse> for crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse> for crate::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `UnknownInteractionsAjarDriverProtocol`
/// protocol.
pub type UnknownInteractionsAjarDriverProtocolProxy =
::fidl_next::Client<crate::UnknownInteractionsAjarDriverProtocol>;
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarDriverProtocol>
for ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolMarker
{
fn compat_from(_: crate::UnknownInteractionsAjarDriverProtocol) -> Self {
Self
}
}
#[cfg(feature = "driver")]
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolMarker,
> for crate::UnknownInteractionsAjarDriverProtocol
{
fn compat_from(
_: ::fidl_test_unknowninteractions::UnknownInteractionsAjarDriverProtocolMarker,
) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse> for crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse {
fn compat_from(value: crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse> for crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse {
fn compat_from(value: crate::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse> for crate::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse> for crate::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse> for crate::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse> for crate::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictEventFieldsRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventFieldsRequest
{
#[inline]
fn compat_from(
value: crate::UnknownInteractionsAjarProtocolStrictEventFieldsRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventFieldsRequest> for crate::UnknownInteractionsAjarProtocolStrictEventFieldsRequest {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventFieldsRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictEventUnionRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventUnionRequest
{
fn compat_from(
value: crate::UnknownInteractionsAjarProtocolStrictEventUnionRequest,
) -> Self {
match value {
crate::UnknownInteractionsAjarProtocolStrictEventUnionRequest::SomeField(value) => {
Self::SomeField(::fidl_next::CompatFrom::compat_from(value))
}
crate::UnknownInteractionsAjarProtocolStrictEventUnionRequest::UnknownOrdinal_(
unknown_ordinal,
) => Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventUnionRequest,
> for crate::UnknownInteractionsAjarProtocolStrictEventUnionRequest
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventUnionRequest,
) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventUnionRequest::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolStrictEventTableRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventTableRequest
{
fn compat_from(
value: crate::UnknownInteractionsAjarProtocolStrictEventTableRequest,
) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventTableRequest,
> for crate::UnknownInteractionsAjarProtocolStrictEventTableRequest
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolStrictEventTableRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
#[inline]
fn compat_from(value: crate::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest> for crate::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventFieldsRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest {
fn compat_from(value: crate::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest) -> Self {
match value {
crate::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest> for crate::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventUnionRequest::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocolFlexibleEventTableRequest> for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventTableRequest {
fn compat_from(value: crate::UnknownInteractionsAjarProtocolFlexibleEventTableRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventTableRequest> for crate::UnknownInteractionsAjarProtocolFlexibleEventTableRequest {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolFlexibleEventTableRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `UnknownInteractionsAjarProtocol`
/// protocol.
pub type UnknownInteractionsAjarProtocolProxy =
::fidl_next::Client<crate::UnknownInteractionsAjarProtocol>;
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsAjarProtocol>
for ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolMarker
{
fn compat_from(_: crate::UnknownInteractionsAjarProtocol) -> Self {
Self
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolMarker,
> for crate::UnknownInteractionsAjarProtocol
{
fn compat_from(
_: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolMarker,
) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl
::fidl_next::ClientCompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolProxy,
> for crate::UnknownInteractionsAjarProtocol
{
fn client_compat_from(
proxy: ::fidl_test_unknowninteractions::UnknownInteractionsAjarProtocolProxy,
) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
::fidl_next::ClientDispatcher::new(client_end)
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse> for crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse {
fn compat_from(value: crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse> for crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse {
fn compat_from(value: crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse> for crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse> for crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse> for crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse> for crate::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `UnknownInteractionsClosedDriverProtocol`
/// protocol.
pub type UnknownInteractionsClosedDriverProtocolProxy =
::fidl_next::Client<crate::UnknownInteractionsClosedDriverProtocol>;
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedDriverProtocol>
for ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolMarker
{
fn compat_from(_: crate::UnknownInteractionsClosedDriverProtocol) -> Self {
Self
}
}
#[cfg(feature = "driver")]
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolMarker,
> for crate::UnknownInteractionsClosedDriverProtocol
{
fn compat_from(
_: ::fidl_test_unknowninteractions::UnknownInteractionsClosedDriverProtocolMarker,
) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse> for crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse {
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse> for crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse {
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse> for crate::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse> for crate::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse> for crate::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse> for crate::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictEventFieldsRequest> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventFieldsRequest {
#[inline]
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictEventFieldsRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventFieldsRequest> for crate::UnknownInteractionsClosedProtocolStrictEventFieldsRequest {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventFieldsRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictEventUnionRequest> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventUnionRequest {
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictEventUnionRequest) -> Self {
match value {
crate::UnknownInteractionsClosedProtocolStrictEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsClosedProtocolStrictEventUnionRequest::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventUnionRequest> for crate::UnknownInteractionsClosedProtocolStrictEventUnionRequest {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventUnionRequest) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventUnionRequest::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocolStrictEventTableRequest> for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventTableRequest {
fn compat_from(value: crate::UnknownInteractionsClosedProtocolStrictEventTableRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventTableRequest> for crate::UnknownInteractionsClosedProtocolStrictEventTableRequest {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolStrictEventTableRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `UnknownInteractionsClosedProtocol`
/// protocol.
pub type UnknownInteractionsClosedProtocolProxy =
::fidl_next::Client<crate::UnknownInteractionsClosedProtocol>;
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsClosedProtocol>
for ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolMarker
{
fn compat_from(_: crate::UnknownInteractionsClosedProtocol) -> Self {
Self
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolMarker,
> for crate::UnknownInteractionsClosedProtocol
{
fn compat_from(
_: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolMarker,
) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl
::fidl_next::ClientCompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolProxy,
> for crate::UnknownInteractionsClosedProtocol
{
fn client_compat_from(
proxy: ::fidl_test_unknowninteractions::UnknownInteractionsClosedProtocolProxy,
) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
::fidl_next::ClientDispatcher::new(client_end)
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse> for crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse> for crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse> for crate::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse> for crate::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse> for crate::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse> for crate::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse> for crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse> for crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse> for crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse> for crate::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse> for crate::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse> for crate::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolFlexibleTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `UnknownInteractionsDriverProtocol`
/// protocol.
pub type UnknownInteractionsDriverProtocolProxy =
::fidl_next::Client<crate::UnknownInteractionsDriverProtocol>;
#[cfg(feature = "driver")]
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsDriverProtocol>
for ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolMarker
{
fn compat_from(_: crate::UnknownInteractionsDriverProtocol) -> Self {
Self
}
}
#[cfg(feature = "driver")]
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolMarker,
> for crate::UnknownInteractionsDriverProtocol
{
fn compat_from(
_: ::fidl_test_unknowninteractions::UnknownInteractionsDriverProtocolMarker,
) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictTwoWayFieldsResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn compat_from(
value: crate::UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
> for crate::UnknownInteractionsProtocolStrictTwoWayFieldsResponse
{
#[inline]
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictTwoWayUnionResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionResponse
{
fn compat_from(value: crate::UnknownInteractionsProtocolStrictTwoWayUnionResponse) -> Self {
match value {
crate::UnknownInteractionsProtocolStrictTwoWayUnionResponse::SomeField(value) => {
Self::SomeField(::fidl_next::CompatFrom::compat_from(value))
}
crate::UnknownInteractionsProtocolStrictTwoWayUnionResponse::UnknownOrdinal_(
unknown_ordinal,
) => Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionResponse,
> for crate::UnknownInteractionsProtocolStrictTwoWayUnionResponse
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionResponse,
) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictTwoWayTableResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayTableResponse
{
fn compat_from(value: crate::UnknownInteractionsProtocolStrictTwoWayTableResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayTableResponse,
> for crate::UnknownInteractionsProtocolStrictTwoWayTableResponse
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayTableResponse,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse> for crate::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse
{
fn compat_from(
value: crate::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse,
) -> Self {
match value {
crate::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse::SomeField(
value,
) => Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse::UnknownOrdinal_(
unknown_ordinal,
) => Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse> for crate::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictTwoWayTableErrResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayTableErrResponse
{
fn compat_from(
value: crate::UnknownInteractionsProtocolStrictTwoWayTableErrResponse,
) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayTableErrResponse> for crate::UnknownInteractionsProtocolStrictTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
{
#[inline]
fn compat_from(
value: crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse> for crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
{
fn compat_from(
value: crate::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse,
) -> Self {
match value {
crate::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse::SomeField(value) => {
Self::SomeField(::fidl_next::CompatFrom::compat_from(value))
}
crate::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse::UnknownOrdinal_(
unknown_ordinal,
) => Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse,
> for crate::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse,
) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleTwoWayTableResponse>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayTableResponse
{
fn compat_from(
value: crate::UnknownInteractionsProtocolFlexibleTwoWayTableResponse,
) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayTableResponse,
> for crate::UnknownInteractionsProtocolFlexibleTwoWayTableResponse
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayTableResponse,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse> for crate::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
#[inline]
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse {
fn compat_from(value: crate::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse) -> Self {
match value {
crate::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
crate::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse::UnknownOrdinal_(unknown_ordinal) =>
Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse> for crate::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayUnionErrResponse::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse> for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse {
fn compat_from(value: crate::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse> for crate::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse {
fn compat_from(value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleTwoWayTableErrResponse) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictEventFieldsRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventFieldsRequest
{
#[inline]
fn compat_from(value: crate::UnknownInteractionsProtocolStrictEventFieldsRequest) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventFieldsRequest,
> for crate::UnknownInteractionsProtocolStrictEventFieldsRequest
{
#[inline]
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventFieldsRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictEventUnionRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventUnionRequest
{
fn compat_from(value: crate::UnknownInteractionsProtocolStrictEventUnionRequest) -> Self {
match value {
crate::UnknownInteractionsProtocolStrictEventUnionRequest::SomeField(value) => {
Self::SomeField(::fidl_next::CompatFrom::compat_from(value))
}
crate::UnknownInteractionsProtocolStrictEventUnionRequest::UnknownOrdinal_(
unknown_ordinal,
) => Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventUnionRequest,
> for crate::UnknownInteractionsProtocolStrictEventUnionRequest
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventUnionRequest,
) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventUnionRequest::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolStrictEventTableRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventTableRequest
{
fn compat_from(value: crate::UnknownInteractionsProtocolStrictEventTableRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventTableRequest,
> for crate::UnknownInteractionsProtocolStrictEventTableRequest
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolStrictEventTableRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleEventFieldsRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventFieldsRequest
{
#[inline]
fn compat_from(
value: crate::UnknownInteractionsProtocolFlexibleEventFieldsRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventFieldsRequest,
> for crate::UnknownInteractionsProtocolFlexibleEventFieldsRequest
{
#[inline]
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventFieldsRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleEventUnionRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventUnionRequest
{
fn compat_from(value: crate::UnknownInteractionsProtocolFlexibleEventUnionRequest) -> Self {
match value {
crate::UnknownInteractionsProtocolFlexibleEventUnionRequest::SomeField(value) => {
Self::SomeField(::fidl_next::CompatFrom::compat_from(value))
}
crate::UnknownInteractionsProtocolFlexibleEventUnionRequest::UnknownOrdinal_(
unknown_ordinal,
) => Self::__SourceBreaking { unknown_ordinal },
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventUnionRequest,
> for crate::UnknownInteractionsProtocolFlexibleEventUnionRequest
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventUnionRequest,
) -> Self {
match value {
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventUnionRequest::SomeField(value) =>
Self::SomeField(::fidl_next::CompatFrom::compat_from(value)),
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventUnionRequest::__SourceBreaking { unknown_ordinal } =>
Self::UnknownOrdinal_(unknown_ordinal),
}
}
}
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocolFlexibleEventTableRequest>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventTableRequest
{
fn compat_from(value: crate::UnknownInteractionsProtocolFlexibleEventTableRequest) -> Self {
Self {
some_field: ::fidl_next::CompatFrom::compat_from(value.some_field),
__source_breaking: ::fidl::marker::SourceBreaking,
}
}
}
impl
::fidl_next::CompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventTableRequest,
> for crate::UnknownInteractionsProtocolFlexibleEventTableRequest
{
fn compat_from(
value: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolFlexibleEventTableRequest,
) -> Self {
Self { some_field: ::fidl_next::CompatFrom::compat_from(value.some_field) }
}
}
#[cfg(target_os = "fuchsia")]
/// An alias for a client over `zx::Channel` for the `UnknownInteractionsProtocol`
/// protocol.
pub type UnknownInteractionsProtocolProxy =
::fidl_next::Client<crate::UnknownInteractionsProtocol>;
impl ::fidl_next::CompatFrom<crate::UnknownInteractionsProtocol>
for ::fidl_test_unknowninteractions::UnknownInteractionsProtocolMarker
{
fn compat_from(_: crate::UnknownInteractionsProtocol) -> Self {
Self
}
}
impl ::fidl_next::CompatFrom<::fidl_test_unknowninteractions::UnknownInteractionsProtocolMarker>
for crate::UnknownInteractionsProtocol
{
fn compat_from(
_: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolMarker,
) -> Self {
Self
}
}
#[cfg(target_os = "fuchsia")]
impl
::fidl_next::ClientCompatFrom<
::fidl_test_unknowninteractions::UnknownInteractionsProtocolProxy,
> for crate::UnknownInteractionsProtocol
{
fn client_compat_from(
proxy: ::fidl_test_unknowninteractions::UnknownInteractionsProtocolProxy,
) -> ::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)
}
}
}