#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use {
bitflags::bitflags,
fidl::{
client::QueryResponseFut,
endpoints::{ControlHandle as _, Responder as _},
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[cfg(target_os = "fuchsia")]
use fuchsia_zircon as zx;
pub const ARRAYS_SIZE: u32 = 3;
pub const STRINGS_SIZE: u32 = 32;
pub const VECTORS_SIZE: u32 = 3;
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DefaultBits: u32 {
const ONE = 1;
const TWO = 2;
}
}
impl DefaultBits {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
0
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct U16Bits: u16 {
const ONE = 1;
const TWO = 2;
const THREE = 4;
const FOUR = 8;
const FIVE = 16;
const SIX = 32;
}
}
impl U16Bits {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u16 {
0
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct U32Bits: u32 {
const ONE = 1;
const TWO = 2;
const THREE = 4;
const FOUR = 8;
const FIVE = 16;
const SIX = 32;
const SEVEN = 64;
}
}
impl U32Bits {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
0
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct U64Bits: u64 {
const ONE = 1;
const TWO = 2;
const THREE = 4;
const FOUR = 8;
const FIVE = 16;
const SIX = 32;
const SEVEN = 64;
const EIGHT = 128;
}
}
impl U64Bits {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u64 {
0
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct U8Bits: u8 {
const ONE = 1;
const TWO = 2;
const THREE = 4;
const FOUR = 8;
const FIVE = 16;
}
}
impl U8Bits {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u8 {
0
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum RespondWith {
Success = 1,
Err = 2,
}
impl RespondWith {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::Success),
2 => Some(Self::Err),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum DefaultEnum {
KZero = 0,
KOne = 1,
}
impl DefaultEnum {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::KZero),
1 => Some(Self::KOne),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(i16)]
pub enum I16Enum {
KNegativeOne = -1,
KOne = 1,
KTwo = 2,
}
impl I16Enum {
#[inline]
pub fn from_primitive(prim: i16) -> Option<Self> {
match prim {
-1 => Some(Self::KNegativeOne),
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> i16 {
self as i16
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(i32)]
pub enum I32Enum {
KNegativeOne = -1,
KOne = 1,
KTwo = 2,
KThree = 3,
}
impl I32Enum {
#[inline]
pub fn from_primitive(prim: i32) -> Option<Self> {
match prim {
-1 => Some(Self::KNegativeOne),
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
3 => Some(Self::KThree),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> i32 {
self as i32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(i64)]
pub enum I64Enum {
KNegativeOne = -1,
KOne = 1,
KTwo = 2,
KThree = 3,
KFour = 4,
}
impl I64Enum {
#[inline]
pub fn from_primitive(prim: i64) -> Option<Self> {
match prim {
-1 => Some(Self::KNegativeOne),
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
3 => Some(Self::KThree),
4 => Some(Self::KFour),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> i64 {
self as i64
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(i8)]
pub enum I8Enum {
KNegativeOne = -1,
KOne = 1,
}
impl I8Enum {
#[inline]
pub fn from_primitive(prim: i8) -> Option<Self> {
match prim {
-1 => Some(Self::KNegativeOne),
1 => Some(Self::KOne),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> i8 {
self as i8
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u16)]
pub enum U16Enum {
KOne = 1,
KTwo = 2,
KThree = 3,
KFour = 4,
KFive = 5,
KSix = 6,
}
impl U16Enum {
#[inline]
pub fn from_primitive(prim: u16) -> Option<Self> {
match prim {
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
3 => Some(Self::KThree),
4 => Some(Self::KFour),
5 => Some(Self::KFive),
6 => Some(Self::KSix),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u16 {
self as u16
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum U32Enum {
KOne = 1,
KTwo = 2,
KThree = 3,
KFour = 4,
KFive = 5,
KSix = 6,
KSeven = 7,
}
impl U32Enum {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
3 => Some(Self::KThree),
4 => Some(Self::KFour),
5 => Some(Self::KFive),
6 => Some(Self::KSix),
7 => Some(Self::KSeven),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u64)]
pub enum U64Enum {
KOne = 1,
KTwo = 2,
KThree = 3,
KFour = 4,
KFive = 5,
KSix = 6,
KSeven = 7,
KEight = 8,
}
impl U64Enum {
#[inline]
pub fn from_primitive(prim: u64) -> Option<Self> {
match prim {
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
3 => Some(Self::KThree),
4 => Some(Self::KFour),
5 => Some(Self::KFive),
6 => Some(Self::KSix),
7 => Some(Self::KSeven),
8 => Some(Self::KEight),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u64 {
self as u64
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u8)]
pub enum U8Enum {
KOne = 1,
KTwo = 2,
KThree = 3,
KFour = 4,
KFive = 5,
}
impl U8Enum {
#[inline]
pub fn from_primitive(prim: u8) -> Option<Self> {
match prim {
1 => Some(Self::KOne),
2 => Some(Self::KTwo),
3 => Some(Self::KThree),
4 => Some(Self::KFour),
5 => Some(Self::KFive),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u8 {
self as u8
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Debug, PartialEq)]
pub struct ArraysStruct {
pub bools: [bool; 3],
pub int8s: [i8; 3],
pub int16s: [i16; 3],
pub int32s: [i32; 3],
pub int64s: [i64; 3],
pub uint8s: [u8; 3],
pub uint16s: [u16; 3],
pub uint32s: [u32; 3],
pub uint64s: [u64; 3],
pub float32s: [f32; 3],
pub float64s: [f64; 3],
pub enums: [DefaultEnum; 3],
pub bits: [DefaultBits; 3],
pub handles: [fidl::Handle; 3],
pub nullable_handles: [Option<fidl::Handle>; 3],
pub strings: [String; 3],
pub nullable_strings: [Option<String>; 3],
pub structs: [ThisIsAStruct; 3],
pub nullable_structs: [Option<Box<ThisIsAStruct>>; 3],
pub unions: [ThisIsAUnion; 3],
pub nullable_unions: [Option<Box<ThisIsAUnion>>; 3],
pub arrays: [[u32; 3]; 3],
pub vectors: [Vec<u32>; 3],
pub nullable_vectors: [Option<Vec<u32>>; 3],
pub tables: [ThisIsATable; 3],
pub xunions: [ThisIsAXunion; 3],
}
impl fidl::Standalone for ArraysStruct {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ConfigGetImplsResponse {
pub impls: Vec<String>,
}
impl fidl::Persistable for ConfigGetImplsResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoArraysRequest {
pub value: ArraysStruct,
pub forward_to_server: String,
}
impl fidl::Standalone for EchoEchoArraysRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoArraysResponse {
pub value: ArraysStruct,
}
impl fidl::Standalone for EchoEchoArraysResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoArraysWithErrorRequest {
pub value: ArraysStruct,
pub result_err: DefaultEnum,
pub forward_to_server: String,
pub result_variant: RespondWith,
}
impl fidl::Standalone for EchoEchoArraysWithErrorRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoEventRequest {
pub value: Struct,
}
impl fidl::Standalone for EchoEchoEventRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct EchoEchoMinimalNoRetValRequest {
pub forward_to_server: String,
}
impl fidl::Persistable for EchoEchoMinimalNoRetValRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct EchoEchoMinimalRequest {
pub forward_to_server: String,
}
impl fidl::Persistable for EchoEchoMinimalRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct EchoEchoMinimalWithErrorRequest {
pub forward_to_server: String,
pub result_variant: RespondWith,
}
impl fidl::Persistable for EchoEchoMinimalWithErrorRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructNoRetValRequest {
pub value: Struct,
pub forward_to_server: String,
}
impl fidl::Standalone for EchoEchoStructNoRetValRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructRequest {
pub value: Struct,
pub forward_to_server: String,
}
impl fidl::Standalone for EchoEchoStructRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructResponse {
pub value: Struct,
}
impl fidl::Standalone for EchoEchoStructResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructWithErrorRequest {
pub value: Struct,
pub result_err: DefaultEnum,
pub forward_to_server: String,
pub result_variant: RespondWith,
}
impl fidl::Standalone for EchoEchoStructWithErrorRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableRequest {
pub value: AllTypesTable,
pub forward_to_server: String,
}
impl fidl::Standalone for EchoEchoTableRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableResponse {
pub value: AllTypesTable,
}
impl fidl::Standalone for EchoEchoTableResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableWithErrorRequest {
pub value: AllTypesTable,
pub result_err: DefaultEnum,
pub forward_to_server: String,
pub result_variant: RespondWith,
}
impl fidl::Standalone for EchoEchoTableWithErrorRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsRequest {
pub value: VectorsStruct,
pub forward_to_server: String,
}
impl fidl::Standalone for EchoEchoVectorsRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsResponse {
pub value: VectorsStruct,
}
impl fidl::Standalone for EchoEchoVectorsResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsWithErrorRequest {
pub value: VectorsStruct,
pub result_err: DefaultEnum,
pub forward_to_server: String,
pub result_variant: RespondWith,
}
impl fidl::Standalone for EchoEchoVectorsWithErrorRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsRequest {
pub value: Vec<AllTypesXunion>,
pub forward_to_server: String,
}
impl fidl::Standalone for EchoEchoXunionsRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsResponse {
pub value: Vec<AllTypesXunion>,
}
impl fidl::Standalone for EchoEchoXunionsResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsWithErrorRequest {
pub value: Vec<AllTypesXunion>,
pub result_err: DefaultEnum,
pub forward_to_server: String,
pub result_variant: RespondWith,
}
impl fidl::Standalone for EchoEchoXunionsWithErrorRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoArraysWithErrorResponse {
pub value: ArraysStruct,
}
impl fidl::Standalone for EchoEchoArraysWithErrorResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructWithErrorResponse {
pub value: Struct,
}
impl fidl::Standalone for EchoEchoStructWithErrorResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableWithErrorResponse {
pub value: AllTypesTable,
}
impl fidl::Standalone for EchoEchoTableWithErrorResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsWithErrorResponse {
pub value: VectorsStruct,
}
impl fidl::Standalone for EchoEchoVectorsWithErrorResponse {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsWithErrorResponse {
pub value: Vec<AllTypesXunion>,
}
impl fidl::Standalone for EchoEchoXunionsWithErrorResponse {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Signed {
pub value: i64,
pub forward_to_server: String,
}
impl fidl::Persistable for Signed {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SignedErrorable {
pub value: i64,
pub forward_to_server: String,
pub result_err: DefaultEnum,
pub result_variant: RespondWith,
}
impl fidl::Persistable for SignedErrorable {}
#[derive(Debug, PartialEq)]
pub struct Struct {
pub primitive_types: PrimitiveTypes,
pub default_values: DefaultValues,
pub arrays: Arrays,
pub arrays_2d: Arrays2d,
pub vectors: Vectors,
pub handles: Handles,
pub strings: Strings,
pub default_enum: DefaultEnum,
pub i8_enum: I8Enum,
pub i16_enum: I16Enum,
pub i32_enum: I32Enum,
pub i64_enum: I64Enum,
pub u8_enum: U8Enum,
pub u16_enum: U16Enum,
pub u32_enum: U32Enum,
pub u64_enum: U64Enum,
pub default_bits: DefaultBits,
pub u8_bits: U8Bits,
pub u16_bits: U16Bits,
pub u32_bits: U32Bits,
pub u64_bits: U64Bits,
pub structs: Structs,
pub unions: Unions,
pub table: ThisIsATable,
pub xunion: ThisIsAXunion,
pub b: bool,
}
impl fidl::Standalone for Struct {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Unsigned {
pub value: u64,
pub forward_to_server: String,
}
impl fidl::Persistable for Unsigned {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct UnsignedErrorable {
pub value: u64,
pub forward_to_server: String,
pub result_err: DefaultEnum,
pub result_variant: RespondWith,
}
impl fidl::Persistable for UnsignedErrorable {}
#[derive(Debug, PartialEq)]
pub struct VectorsStruct {
pub bools: Vec<bool>,
pub int8s: Vec<i8>,
pub int16s: Vec<i16>,
pub int32s: Vec<i32>,
pub int64s: Vec<i64>,
pub uint8s: Vec<u8>,
pub uint16s: Vec<u16>,
pub uint32s: Vec<u32>,
pub uint64s: Vec<u64>,
pub float32s: Vec<f32>,
pub float64s: Vec<f64>,
pub enums: Vec<DefaultEnum>,
pub bits: Vec<DefaultBits>,
pub handles: Vec<fidl::Handle>,
pub nullable_handles: Vec<Option<fidl::Handle>>,
pub strings: Vec<String>,
pub nullable_strings: Vec<Option<String>>,
pub structs: Vec<ThisIsAStruct>,
pub nullable_structs: Vec<Option<Box<ThisIsAStruct>>>,
pub unions: Vec<ThisIsAUnion>,
pub nullable_unions: Vec<Option<Box<ThisIsAUnion>>>,
pub arrays: Vec<[u32; 3]>,
pub vectors: Vec<Vec<u32>>,
pub nullable_vectors: Vec<Option<Vec<u32>>>,
pub tables: Vec<ThisIsATable>,
pub xunions: Vec<ThisIsAXunion>,
}
impl fidl::Standalone for VectorsStruct {}
#[derive(Debug, PartialEq, PartialOrd)]
pub struct Arrays {
pub b_0: [bool; 1],
pub i8_0: [i8; 1],
pub i16_0: [i16; 1],
pub i32_0: [i32; 1],
pub i64_0: [i64; 1],
pub u8_0: [u8; 1],
pub u16_0: [u16; 1],
pub u32_0: [u32; 1],
pub u64_0: [u64; 1],
pub f32_0: [f32; 1],
pub f64_0: [f64; 1],
pub handle_0: [fidl::Handle; 1],
pub b_1: [bool; 3],
pub i8_1: [i8; 3],
pub i16_1: [i16; 3],
pub i32_1: [i32; 3],
pub i64_1: [i64; 3],
pub u8_1: [u8; 3],
pub u16_1: [u16; 3],
pub u32_1: [u32; 3],
pub u64_1: [u64; 3],
pub f32_1: [f32; 3],
pub f64_1: [f64; 3],
pub handle_1: [fidl::Handle; 3],
}
impl fidl::Standalone for Arrays {}
#[derive(Debug, PartialEq, PartialOrd)]
pub struct Arrays2d {
pub b: [[bool; 2]; 3],
pub i8: [[i8; 2]; 3],
pub i16: [[i16; 2]; 3],
pub i32: [[i32; 2]; 3],
pub i64: [[i64; 2]; 3],
pub u8: [[u8; 2]; 3],
pub u16: [[u16; 2]; 3],
pub u32: [[u32; 2]; 3],
pub u64: [[u64; 2]; 3],
pub f32: [[f32; 2]; 3],
pub f64: [[f64; 2]; 3],
pub handle_handle: [[fidl::Handle; 2]; 3],
}
impl fidl::Standalone for Arrays2d {}
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct DefaultValues {
pub b1: bool,
pub b2: bool,
pub i8: i8,
pub i16: i16,
pub i32: i32,
pub i64: i64,
pub u8: u8,
pub u16: u16,
pub u32: u32,
pub u64: u64,
pub f32: f32,
pub f64: f64,
pub s: String,
}
impl fidl::Persistable for DefaultValues {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Handles {
pub handle_handle: fidl::Handle,
pub process_handle: fidl::Process,
pub thread_handle: fidl::Thread,
pub vmo_handle: fidl::Vmo,
pub event_handle: fidl::Event,
pub port_handle: fidl::Port,
pub socket_handle: fidl::Socket,
pub eventpair_handle: fidl::EventPair,
pub job_handle: fidl::Job,
pub vmar_handle: fidl::Vmar,
pub fifo_handle: fidl::Fifo,
pub timer_handle: fidl::Timer,
pub nullable_handle_handle: Option<fidl::Handle>,
pub nullable_process_handle: Option<fidl::Process>,
pub nullable_thread_handle: Option<fidl::Thread>,
pub nullable_vmo_handle: Option<fidl::Vmo>,
pub nullable_channel_handle: Option<fidl::Channel>,
pub nullable_event_handle: Option<fidl::Event>,
pub nullable_port_handle: Option<fidl::Port>,
pub nullable_interrupt_handle: Option<fidl::Interrupt>,
pub nullable_log_handle: Option<fidl::DebugLog>,
pub nullable_socket_handle: Option<fidl::Socket>,
pub nullable_eventpair_handle: Option<fidl::EventPair>,
pub nullable_job_handle: Option<fidl::Job>,
pub nullable_vmar_handle: Option<fidl::Vmar>,
pub nullable_fifo_handle: Option<fidl::Fifo>,
pub nullable_timer_handle: Option<fidl::Timer>,
}
impl fidl::Standalone for Handles {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct PrimitiveTypes {
pub b: bool,
pub i8: i8,
pub i16: i16,
pub i32: i32,
pub i64: i64,
pub u8: u8,
pub u16: u16,
pub u32: u32,
pub u64: u64,
pub f32: f32,
pub f64: f64,
}
impl fidl::Persistable for PrimitiveTypes {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Strings {
pub s: String,
pub nullable_s: Option<String>,
pub size_0_s: String,
pub size_1_s: String,
pub nullable_size_0_s: Option<String>,
pub nullable_size_1_s: Option<String>,
}
impl fidl::Persistable for Strings {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Structs {
pub s: ThisIsAStruct,
pub nullable_s: Option<Box<ThisIsAStruct>>,
pub es: ThisIsAnEmptyStruct,
}
impl fidl::Persistable for Structs {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ThisIsAStruct {
pub s: String,
}
impl fidl::Persistable for ThisIsAStruct {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ThisIsAnEmptyStruct;
impl fidl::Persistable for ThisIsAnEmptyStruct {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Unions {
pub u: ThisIsAUnion,
pub nullable_u: Option<Box<ThisIsAUnion>>,
}
impl fidl::Persistable for Unions {}
#[derive(Debug, PartialEq, PartialOrd)]
pub struct Vectors {
pub b_0: Vec<bool>,
pub i8_0: Vec<i8>,
pub i16_0: Vec<i16>,
pub i32_0: Vec<i32>,
pub i64_0: Vec<i64>,
pub u8_0: Vec<u8>,
pub u16_0: Vec<u16>,
pub u32_0: Vec<u32>,
pub u64_0: Vec<u64>,
pub f32_0: Vec<f32>,
pub f64_0: Vec<f64>,
pub handle_0: Vec<fidl::Handle>,
pub b_1: Vec<Vec<bool>>,
pub i8_1: Vec<Vec<i8>>,
pub i16_1: Vec<Vec<i16>>,
pub i32_1: Vec<Vec<i32>>,
pub i64_1: Vec<Vec<i64>>,
pub u8_1: Vec<Vec<u8>>,
pub u16_1: Vec<Vec<u16>>,
pub u32_1: Vec<Vec<u32>>,
pub u64_1: Vec<Vec<u64>>,
pub f32_1: Vec<Vec<f32>>,
pub f64_1: Vec<Vec<f64>>,
pub handle_1: Vec<Vec<fidl::Handle>>,
pub b_sized_0: Vec<bool>,
pub i8_sized_0: Vec<i8>,
pub i16_sized_0: Vec<i16>,
pub i32_sized_0: Vec<i32>,
pub i64_sized_0: Vec<i64>,
pub u8_sized_0: Vec<u8>,
pub u16_sized_0: Vec<u16>,
pub u32_sized_0: Vec<u32>,
pub u64_sized_0: Vec<u64>,
pub f32_sized_0: Vec<f32>,
pub f64_sized_0: Vec<f64>,
pub handle_sized_0: Vec<fidl::Handle>,
pub b_sized_1: Vec<bool>,
pub i8_sized_1: Vec<i8>,
pub i16_sized_1: Vec<i16>,
pub i32_sized_1: Vec<i32>,
pub i64_sized_1: Vec<i64>,
pub u8_sized_1: Vec<u8>,
pub u16_sized_1: Vec<u16>,
pub u32_sized_1: Vec<u32>,
pub u64_sized_1: Vec<u64>,
pub f32_sized_1: Vec<f32>,
pub f64_sized_1: Vec<f64>,
pub handle_sized_1: Vec<fidl::Handle>,
pub b_sized_2: Vec<Vec<bool>>,
pub i8_sized_2: Vec<Vec<i8>>,
pub i16_sized_2: Vec<Vec<i16>>,
pub i32_sized_2: Vec<Vec<i32>>,
pub i64_sized_2: Vec<Vec<i64>>,
pub u8_sized_2: Vec<Vec<u8>>,
pub u16_sized_2: Vec<Vec<u16>>,
pub u32_sized_2: Vec<Vec<u32>>,
pub u64_sized_2: Vec<Vec<u64>>,
pub f32_sized_2: Vec<Vec<f32>>,
pub f64_sized_2: Vec<Vec<f64>>,
pub handle_sized_2: Vec<Vec<fidl::Handle>>,
pub b_nullable_0: Option<Vec<bool>>,
pub i8_nullable_0: Option<Vec<i8>>,
pub i16_nullable_0: Option<Vec<i16>>,
pub i32_nullable_0: Option<Vec<i32>>,
pub i64_nullable_0: Option<Vec<i64>>,
pub u8_nullable_0: Option<Vec<u8>>,
pub u16_nullable_0: Option<Vec<u16>>,
pub u32_nullable_0: Option<Vec<u32>>,
pub u64_nullable_0: Option<Vec<u64>>,
pub f32_nullable_0: Option<Vec<f32>>,
pub f64_nullable_0: Option<Vec<f64>>,
pub handle_nullable_0: Option<Vec<fidl::Handle>>,
pub b_nullable_1: Option<Vec<Vec<bool>>>,
pub i8_nullable_1: Option<Vec<Vec<i8>>>,
pub i16_nullable_1: Option<Vec<Vec<i16>>>,
pub i32_nullable_1: Option<Vec<Vec<i32>>>,
pub i64_nullable_1: Option<Vec<Vec<i64>>>,
pub u8_nullable_1: Option<Vec<Vec<u8>>>,
pub u16_nullable_1: Option<Vec<Vec<u16>>>,
pub u32_nullable_1: Option<Vec<Vec<u32>>>,
pub u64_nullable_1: Option<Vec<Vec<u64>>>,
pub f32_nullable_1: Option<Vec<Vec<f32>>>,
pub f64_nullable_1: Option<Vec<Vec<f64>>>,
pub handle_nullable_1: Option<Vec<Vec<fidl::Handle>>>,
pub b_nullable_sized_0: Option<Vec<bool>>,
pub i8_nullable_sized_0: Option<Vec<i8>>,
pub i16_nullable_sized_0: Option<Vec<i16>>,
pub i32_nullable_sized_0: Option<Vec<i32>>,
pub i64_nullable_sized_0: Option<Vec<i64>>,
pub u8_nullable_sized_0: Option<Vec<u8>>,
pub u16_nullable_sized_0: Option<Vec<u16>>,
pub u32_nullable_sized_0: Option<Vec<u32>>,
pub u64_nullable_sized_0: Option<Vec<u64>>,
pub f32_nullable_sized_0: Option<Vec<f32>>,
pub f64_nullable_sized_0: Option<Vec<f64>>,
pub handle_nullable_sized_0: Option<Vec<fidl::Handle>>,
pub b_nullable_sized_1: Option<Vec<bool>>,
pub i8_nullable_sized_1: Option<Vec<i8>>,
pub i16_nullable_sized_1: Option<Vec<i16>>,
pub i32_nullable_sized_1: Option<Vec<i32>>,
pub i64_nullable_sized_1: Option<Vec<i64>>,
pub u8_nullable_sized_1: Option<Vec<u8>>,
pub u16_nullable_sized_1: Option<Vec<u16>>,
pub u32_nullable_sized_1: Option<Vec<u32>>,
pub u64_nullable_sized_1: Option<Vec<u64>>,
pub f32_nullable_sized_1: Option<Vec<f32>>,
pub f64_nullable_sized_1: Option<Vec<f64>>,
pub handle_nullable_sized_1: Option<Vec<fidl::Handle>>,
pub b_nullable_sized_2: Option<Vec<Vec<bool>>>,
pub i8_nullable_sized_2: Option<Vec<Vec<i8>>>,
pub i16_nullable_sized_2: Option<Vec<Vec<i16>>>,
pub i32_nullable_sized_2: Option<Vec<Vec<i32>>>,
pub i64_nullable_sized_2: Option<Vec<Vec<i64>>>,
pub u8_nullable_sized_2: Option<Vec<Vec<u8>>>,
pub u16_nullable_sized_2: Option<Vec<Vec<u16>>>,
pub u32_nullable_sized_2: Option<Vec<Vec<u32>>>,
pub u64_nullable_sized_2: Option<Vec<Vec<u64>>>,
pub f32_nullable_sized_2: Option<Vec<Vec<f32>>>,
pub f64_nullable_sized_2: Option<Vec<Vec<f64>>>,
pub handle_nullable_sized_2: Option<Vec<Vec<fidl::Handle>>>,
}
impl fidl::Standalone for Vectors {}
#[derive(Debug, Default, PartialEq)]
pub struct AllTypesTable {
pub bool_member: Option<bool>,
pub int8_member: Option<i8>,
pub int16_member: Option<i16>,
pub int32_member: Option<i32>,
pub int64_member: Option<i64>,
pub uint8_member: Option<u8>,
pub uint16_member: Option<u16>,
pub uint32_member: Option<u32>,
pub uint64_member: Option<u64>,
pub float32_member: Option<f32>,
pub float64_member: Option<f64>,
pub enum_member: Option<DefaultEnum>,
pub bits_member: Option<DefaultBits>,
pub handle_member: Option<fidl::Handle>,
pub string_member: Option<String>,
pub struct_member: Option<ThisIsAStruct>,
pub union_member: Option<ThisIsAUnion>,
pub array_member: Option<[u32; 3]>,
pub vector_member: Option<Vec<u32>>,
pub table_member: Option<ThisIsATable>,
pub xunion_member: Option<ThisIsAXunion>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Standalone for AllTypesTable {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct EchoEchoTablePayloadWithErrorRequest {
pub value: Option<u64>,
pub forward_to_server: Option<String>,
pub result_err: Option<DefaultEnum>,
pub result_variant: Option<RespondWith>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for EchoEchoTablePayloadWithErrorRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RequestTable {
pub value: Option<u64>,
pub forward_to_server: Option<String>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for RequestTable {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ResponseTable {
pub value: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for ResponseTable {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ThisIsATable {
pub s: Option<String>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for ThisIsATable {}
#[derive(Debug)]
pub enum AllTypesXunion {
BoolMember(bool),
Int8Member(i8),
Int16Member(i16),
Int32Member(i32),
Int64Member(i64),
Uint8Member(u8),
Uint16Member(u16),
Uint32Member(u32),
Uint64Member(u64),
Float32Member(f32),
Float64Member(f64),
EnumMember(DefaultEnum),
BitsMember(DefaultBits),
HandleMember(fidl::Handle),
StringMember(String),
StructMember(ThisIsAStruct),
UnionMember(ThisIsAUnion),
ArrayMember([u32; 3]),
VectorMember(Vec<u32>),
TableMember(ThisIsATable),
XunionMember(ThisIsAXunion),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! AllTypesXunionUnknown {
() => {
_
};
}
impl PartialEq for AllTypesXunion {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::BoolMember(x), Self::BoolMember(y)) => *x == *y,
(Self::Int8Member(x), Self::Int8Member(y)) => *x == *y,
(Self::Int16Member(x), Self::Int16Member(y)) => *x == *y,
(Self::Int32Member(x), Self::Int32Member(y)) => *x == *y,
(Self::Int64Member(x), Self::Int64Member(y)) => *x == *y,
(Self::Uint8Member(x), Self::Uint8Member(y)) => *x == *y,
(Self::Uint16Member(x), Self::Uint16Member(y)) => *x == *y,
(Self::Uint32Member(x), Self::Uint32Member(y)) => *x == *y,
(Self::Uint64Member(x), Self::Uint64Member(y)) => *x == *y,
(Self::Float32Member(x), Self::Float32Member(y)) => *x == *y,
(Self::Float64Member(x), Self::Float64Member(y)) => *x == *y,
(Self::EnumMember(x), Self::EnumMember(y)) => *x == *y,
(Self::BitsMember(x), Self::BitsMember(y)) => *x == *y,
(Self::HandleMember(x), Self::HandleMember(y)) => *x == *y,
(Self::StringMember(x), Self::StringMember(y)) => *x == *y,
(Self::StructMember(x), Self::StructMember(y)) => *x == *y,
(Self::UnionMember(x), Self::UnionMember(y)) => *x == *y,
(Self::ArrayMember(x), Self::ArrayMember(y)) => *x == *y,
(Self::VectorMember(x), Self::VectorMember(y)) => *x == *y,
(Self::TableMember(x), Self::TableMember(y)) => *x == *y,
(Self::XunionMember(x), Self::XunionMember(y)) => *x == *y,
_ => false,
}
}
}
impl AllTypesXunion {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::BoolMember(_) => 1,
Self::Int8Member(_) => 2,
Self::Int16Member(_) => 3,
Self::Int32Member(_) => 4,
Self::Int64Member(_) => 5,
Self::Uint8Member(_) => 6,
Self::Uint16Member(_) => 7,
Self::Uint32Member(_) => 8,
Self::Uint64Member(_) => 9,
Self::Float32Member(_) => 10,
Self::Float64Member(_) => 11,
Self::EnumMember(_) => 12,
Self::BitsMember(_) => 13,
Self::HandleMember(_) => 14,
Self::StringMember(_) => 15,
Self::StructMember(_) => 16,
Self::UnionMember(_) => 17,
Self::ArrayMember(_) => 18,
Self::VectorMember(_) => 19,
Self::TableMember(_) => 20,
Self::XunionMember(_) => 21,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Standalone for AllTypesXunion {}
#[derive(Clone, Debug)]
pub enum EchoEchoUnionPayloadWithErrorRequest {
Unsigned(UnsignedErrorable),
Signed(SignedErrorable),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! EchoEchoUnionPayloadWithErrorRequestUnknown {
() => {
_
};
}
impl PartialEq for EchoEchoUnionPayloadWithErrorRequest {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Unsigned(x), Self::Unsigned(y)) => *x == *y,
(Self::Signed(x), Self::Signed(y)) => *x == *y,
_ => false,
}
}
}
impl EchoEchoUnionPayloadWithErrorRequest {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Unsigned(_) => 1,
Self::Signed(_) => 2,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for EchoEchoUnionPayloadWithErrorRequest {}
#[derive(Clone, Debug)]
pub enum RequestUnion {
Unsigned(Unsigned),
Signed(Signed),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! RequestUnionUnknown {
() => {
_
};
}
impl PartialEq for RequestUnion {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Unsigned(x), Self::Unsigned(y)) => *x == *y,
(Self::Signed(x), Self::Signed(y)) => *x == *y,
_ => false,
}
}
}
impl RequestUnion {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Unsigned(_) => 1,
Self::Signed(_) => 2,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for RequestUnion {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum ResponseUnion {
Unsigned(u64),
Signed(i64),
}
impl ResponseUnion {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Unsigned(_) => 1,
Self::Signed(_) => 2,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for ResponseUnion {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum ThisIsAUnion {
S(String),
B(bool),
}
impl ThisIsAUnion {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::S(_) => 1,
Self::B(_) => 2,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for ThisIsAUnion {}
#[derive(Clone, Debug)]
pub enum ThisIsAXunion {
S(String),
B(bool),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! ThisIsAXunionUnknown {
() => {
_
};
}
impl PartialEq for ThisIsAXunion {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::S(x), Self::S(y)) => *x == *y,
(Self::B(x), Self::B(y)) => *x == *y,
_ => false,
}
}
}
impl ThisIsAXunion {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::S(_) => 1,
Self::B(_) => 2,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for ThisIsAXunion {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ConfigMarker;
impl fidl::endpoints::ProtocolMarker for ConfigMarker {
type Proxy = ConfigProxy;
type RequestStream = ConfigRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ConfigSynchronousProxy;
const DEBUG_NAME: &'static str = "fidl.test.compatibility.Config";
}
impl fidl::endpoints::DiscoverableProtocolMarker for ConfigMarker {}
pub trait ConfigProxyInterface: Send + Sync {
type GetImplsResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
fn r#get_impls(&self) -> Self::GetImplsResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ConfigSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ConfigSynchronousProxy {
type Proxy = ConfigProxy;
type Protocol = ConfigMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl ConfigSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <ConfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(&self, deadline: zx::Time) -> Result<ConfigEvent, fidl::Error> {
ConfigEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_impls(&self, ___deadline: zx::Time) -> Result<Vec<String>, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, ConfigGetImplsResponse>(
(),
0x3b360c86a6dbdfe0,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.impls)
}
}
#[derive(Debug, Clone)]
pub struct ConfigProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for ConfigProxy {
type Protocol = ConfigMarker;
fn from_channel(inner: fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl ConfigProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <ConfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ConfigEventStream {
ConfigEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_impls(&self) -> fidl::client::QueryResponseFut<Vec<String>> {
ConfigProxyInterface::r#get_impls(self)
}
}
impl ConfigProxyInterface for ConfigProxy {
type GetImplsResponseFut = fidl::client::QueryResponseFut<Vec<String>>;
fn r#get_impls(&self) -> Self::GetImplsResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<Vec<String>, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ConfigGetImplsResponse,
0x3b360c86a6dbdfe0,
>(_buf?)?;
Ok(_response.impls)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
(),
0x3b360c86a6dbdfe0,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct ConfigEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for ConfigEventStream {}
impl futures::stream::FusedStream for ConfigEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ConfigEventStream {
type Item = Result<ConfigEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(ConfigEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ConfigEvent {}
impl ConfigEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<ConfigEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <ConfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ConfigRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for ConfigRequestStream {}
impl futures::stream::FusedStream for ConfigRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ConfigRequestStream {
type Protocol = ConfigMarker;
type ControlHandle = ConfigControlHandle;
fn from_channel(channel: fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
ConfigControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for ConfigRequestStream {
type Item = Result<ConfigRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled ConfigRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(e))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x3b360c86a6dbdfe0 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = ConfigControlHandle { inner: this.inner.clone() };
Ok(ConfigRequest::GetImpls {
responder: ConfigGetImplsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <ConfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum ConfigRequest {
GetImpls { responder: ConfigGetImplsResponder },
}
impl ConfigRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_impls(self) -> Option<(ConfigGetImplsResponder)> {
if let ConfigRequest::GetImpls { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
ConfigRequest::GetImpls { .. } => "get_impls",
}
}
}
#[derive(Debug, Clone)]
pub struct ConfigControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for ConfigControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
}
impl ConfigControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ConfigGetImplsResponder {
control_handle: std::mem::ManuallyDrop<ConfigControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ConfigGetImplsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ConfigGetImplsResponder {
type ControlHandle = ConfigControlHandle;
fn control_handle(&self) -> &ConfigControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ConfigGetImplsResponder {
pub fn send(self, mut impls: &[String]) -> Result<(), fidl::Error> {
let _result = self.send_raw(impls);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut impls: &[String]) -> Result<(), fidl::Error> {
let _result = self.send_raw(impls);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut impls: &[String]) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ConfigGetImplsResponse>(
(impls,),
self.tx_id,
0x3b360c86a6dbdfe0,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct EchoMarker;
impl fidl::endpoints::ProtocolMarker for EchoMarker {
type Proxy = EchoProxy;
type RequestStream = EchoRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = EchoSynchronousProxy;
const DEBUG_NAME: &'static str = "fidl.test.compatibility.Echo";
}
impl fidl::endpoints::DiscoverableProtocolMarker for EchoMarker {}
pub type EchoEchoMinimalWithErrorResult = Result<(), u32>;
pub type EchoEchoStructWithErrorResult = Result<Struct, DefaultEnum>;
pub type EchoEchoArraysWithErrorResult = Result<ArraysStruct, DefaultEnum>;
pub type EchoEchoVectorsWithErrorResult = Result<VectorsStruct, DefaultEnum>;
pub type EchoEchoTableWithErrorResult = Result<AllTypesTable, DefaultEnum>;
pub type EchoEchoXunionsWithErrorResult = Result<Vec<AllTypesXunion>, DefaultEnum>;
pub type EchoEchoNamedStructWithErrorResult = Result<fidl_fidl_test_imported::SimpleStruct, u32>;
pub type EchoEchoTablePayloadWithErrorResult = Result<ResponseTable, DefaultEnum>;
pub type EchoEchoUnionPayloadWithErrorResult = Result<ResponseUnion, DefaultEnum>;
pub trait EchoProxyInterface: Send + Sync {
type EchoTableRequestComposedResponseFut: std::future::Future<Output = Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error>>
+ Send;
fn r#echo_table_request_composed(
&self,
payload: &fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
) -> Self::EchoTableRequestComposedResponseFut;
type EchoUnionResponseWithErrorComposedResponseFut: std::future::Future<
Output = Result<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResult,
fidl::Error,
>,
> + Send;
fn r#echo_union_response_with_error_composed(
&self,
value: i64,
want_absolute_value: bool,
forward_to_server: &str,
result_err: u32,
result_variant: fidl_fidl_test_imported::WantResponse,
) -> Self::EchoUnionResponseWithErrorComposedResponseFut;
type EchoMinimalResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#echo_minimal(&self, forward_to_server: &str) -> Self::EchoMinimalResponseFut;
type EchoMinimalWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoMinimalWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_minimal_with_error(
&self,
forward_to_server: &str,
result_variant: RespondWith,
) -> Self::EchoMinimalWithErrorResponseFut;
fn r#echo_minimal_no_ret_val(&self, forward_to_server: &str) -> Result<(), fidl::Error>;
type EchoStructResponseFut: std::future::Future<Output = Result<Struct, fidl::Error>> + Send;
fn r#echo_struct(&self, value: Struct, forward_to_server: &str) -> Self::EchoStructResponseFut;
type EchoStructWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoStructWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_struct_with_error(
&self,
value: Struct,
result_err: DefaultEnum,
forward_to_server: &str,
result_variant: RespondWith,
) -> Self::EchoStructWithErrorResponseFut;
fn r#echo_struct_no_ret_val(
&self,
value: Struct,
forward_to_server: &str,
) -> Result<(), fidl::Error>;
type EchoArraysResponseFut: std::future::Future<Output = Result<ArraysStruct, fidl::Error>>
+ Send;
fn r#echo_arrays(
&self,
value: ArraysStruct,
forward_to_server: &str,
) -> Self::EchoArraysResponseFut;
type EchoArraysWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoArraysWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_arrays_with_error(
&self,
value: ArraysStruct,
result_err: DefaultEnum,
forward_to_server: &str,
result_variant: RespondWith,
) -> Self::EchoArraysWithErrorResponseFut;
type EchoVectorsResponseFut: std::future::Future<Output = Result<VectorsStruct, fidl::Error>>
+ Send;
fn r#echo_vectors(
&self,
value: VectorsStruct,
forward_to_server: &str,
) -> Self::EchoVectorsResponseFut;
type EchoVectorsWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoVectorsWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_vectors_with_error(
&self,
value: VectorsStruct,
result_err: DefaultEnum,
forward_to_server: &str,
result_variant: RespondWith,
) -> Self::EchoVectorsWithErrorResponseFut;
type EchoTableResponseFut: std::future::Future<Output = Result<AllTypesTable, fidl::Error>>
+ Send;
fn r#echo_table(
&self,
value: AllTypesTable,
forward_to_server: &str,
) -> Self::EchoTableResponseFut;
type EchoTableWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoTableWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_table_with_error(
&self,
value: AllTypesTable,
result_err: DefaultEnum,
forward_to_server: &str,
result_variant: RespondWith,
) -> Self::EchoTableWithErrorResponseFut;
type EchoXunionsResponseFut: std::future::Future<Output = Result<Vec<AllTypesXunion>, fidl::Error>>
+ Send;
fn r#echo_xunions(
&self,
value: Vec<AllTypesXunion>,
forward_to_server: &str,
) -> Self::EchoXunionsResponseFut;
type EchoXunionsWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoXunionsWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_xunions_with_error(
&self,
value: Vec<AllTypesXunion>,
result_err: DefaultEnum,
forward_to_server: &str,
result_variant: RespondWith,
) -> Self::EchoXunionsWithErrorResponseFut;
type EchoNamedStructResponseFut: std::future::Future<Output = Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error>>
+ Send;
fn r#echo_named_struct(
&self,
value: &fidl_fidl_test_imported::SimpleStruct,
forward_to_server: &str,
) -> Self::EchoNamedStructResponseFut;
type EchoNamedStructWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoNamedStructWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_named_struct_with_error(
&self,
value: &fidl_fidl_test_imported::SimpleStruct,
result_err: u32,
forward_to_server: &str,
result_variant: fidl_fidl_test_imported::WantResponse,
) -> Self::EchoNamedStructWithErrorResponseFut;
fn r#echo_named_struct_no_ret_val(
&self,
value: &fidl_fidl_test_imported::SimpleStruct,
forward_to_server: &str,
) -> Result<(), fidl::Error>;
type EchoTablePayloadResponseFut: std::future::Future<Output = Result<ResponseTable, fidl::Error>>
+ Send;
fn r#echo_table_payload(&self, payload: &RequestTable) -> Self::EchoTablePayloadResponseFut;
type EchoTablePayloadWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoTablePayloadWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_table_payload_with_error(
&self,
payload: &EchoEchoTablePayloadWithErrorRequest,
) -> Self::EchoTablePayloadWithErrorResponseFut;
fn r#echo_table_payload_no_ret_val(&self, payload: &RequestTable) -> Result<(), fidl::Error>;
type EchoUnionPayloadResponseFut: std::future::Future<Output = Result<ResponseUnion, fidl::Error>>
+ Send;
fn r#echo_union_payload(&self, payload: &RequestUnion) -> Self::EchoUnionPayloadResponseFut;
type EchoUnionPayloadWithErrorResponseFut: std::future::Future<Output = Result<EchoEchoUnionPayloadWithErrorResult, fidl::Error>>
+ Send;
fn r#echo_union_payload_with_error(
&self,
payload: &EchoEchoUnionPayloadWithErrorRequest,
) -> Self::EchoUnionPayloadWithErrorResponseFut;
fn r#echo_union_payload_no_ret_val(&self, payload: &RequestUnion) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct EchoSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for EchoSynchronousProxy {
type Proxy = EchoProxy;
type Protocol = EchoMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl EchoSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <EchoMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(&self, deadline: zx::Time) -> Result<EchoEvent, fidl::Error> {
EchoEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#echo_table_request_composed(
&self,
mut payload: &fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
___deadline: zx::Time,
) -> Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error> {
let _response = self.client.send_query::<
fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
fidl_fidl_test_imported::ResponseStruct,
>(
payload,
0x1d545c738c7a8ee,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_union_response_with_error_composed(
&self,
mut value: i64,
mut want_absolute_value: bool,
mut forward_to_server: &str,
mut result_err: u32,
mut result_variant: fidl_fidl_test_imported::WantResponse,
___deadline: zx::Time,
) -> Result<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResult,
fidl::Error,
> {
let _response = self.client.send_query::<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedRequest,
fidl::encoding::ResultType<fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResponse, u32>,
>(
(value, want_absolute_value, forward_to_server, result_err, result_variant,),
0x38a67e88d6106443,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#echo_minimal(
&self,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<EchoEchoMinimalRequest, fidl::encoding::EmptyPayload>(
(forward_to_server,),
0x39edd68c837482ec,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#echo_minimal_with_error(
&self,
mut forward_to_server: &str,
mut result_variant: RespondWith,
___deadline: zx::Time,
) -> Result<EchoEchoMinimalWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoMinimalWithErrorRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, u32>,
>(
(forward_to_server, result_variant,),
0x36f4695996e35acc,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#echo_minimal_no_ret_val(
&self,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
self.client.send::<EchoEchoMinimalNoRetValRequest>(
(forward_to_server,),
0x42693c143e2c3694,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#echo_struct(
&self,
mut value: Struct,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<Struct, fidl::Error> {
let _response = self.client.send_query::<EchoEchoStructRequest, EchoEchoStructResponse>(
(&mut value, forward_to_server),
0x4c2f85818cc53f37,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_struct_with_error(
&self,
mut value: Struct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
___deadline: zx::Time,
) -> Result<EchoEchoStructWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoStructWithErrorRequest,
fidl::encoding::ResultType<EchoEchoStructWithErrorResponse, DefaultEnum>,
>(
(&mut value, result_err, forward_to_server, result_variant,),
0x46cb32652c4c0899,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.value))
}
pub fn r#echo_struct_no_ret_val(
&self,
mut value: Struct,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
self.client.send::<EchoEchoStructNoRetValRequest>(
(&mut value, forward_to_server),
0x1f763e602cf5892a,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#echo_arrays(
&self,
mut value: ArraysStruct,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<ArraysStruct, fidl::Error> {
let _response = self.client.send_query::<EchoEchoArraysRequest, EchoEchoArraysResponse>(
(&mut value, forward_to_server),
0x1b6019d5611f2470,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_arrays_with_error(
&self,
mut value: ArraysStruct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
___deadline: zx::Time,
) -> Result<EchoEchoArraysWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoArraysWithErrorRequest,
fidl::encoding::ResultType<EchoEchoArraysWithErrorResponse, DefaultEnum>,
>(
(&mut value, result_err, forward_to_server, result_variant,),
0x6dbf26e67e253afa,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.value))
}
pub fn r#echo_vectors(
&self,
mut value: VectorsStruct,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<VectorsStruct, fidl::Error> {
let _response = self.client.send_query::<EchoEchoVectorsRequest, EchoEchoVectorsResponse>(
(&mut value, forward_to_server),
0x1582623f0d9f6e5e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_vectors_with_error(
&self,
mut value: VectorsStruct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
___deadline: zx::Time,
) -> Result<EchoEchoVectorsWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoVectorsWithErrorRequest,
fidl::encoding::ResultType<EchoEchoVectorsWithErrorResponse, DefaultEnum>,
>(
(&mut value, result_err, forward_to_server, result_variant,),
0x730f163401e2b3e5,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.value))
}
pub fn r#echo_table(
&self,
mut value: AllTypesTable,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<AllTypesTable, fidl::Error> {
let _response = self.client.send_query::<EchoEchoTableRequest, EchoEchoTableResponse>(
(&mut value, forward_to_server),
0x4f1fb0a512f47c4b,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_table_with_error(
&self,
mut value: AllTypesTable,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
___deadline: zx::Time,
) -> Result<EchoEchoTableWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoTableWithErrorRequest,
fidl::encoding::ResultType<EchoEchoTableWithErrorResponse, DefaultEnum>,
>(
(&mut value, result_err, forward_to_server, result_variant,),
0x44e835cb1eb9a931,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.value))
}
pub fn r#echo_xunions(
&self,
mut value: Vec<AllTypesXunion>,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<Vec<AllTypesXunion>, fidl::Error> {
let _response = self.client.send_query::<EchoEchoXunionsRequest, EchoEchoXunionsResponse>(
(value.as_mut(), forward_to_server),
0x3dc181909041a583,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_xunions_with_error(
&self,
mut value: Vec<AllTypesXunion>,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
___deadline: zx::Time,
) -> Result<EchoEchoXunionsWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoXunionsWithErrorRequest,
fidl::encoding::ResultType<EchoEchoXunionsWithErrorResponse, DefaultEnum>,
>(
(value.as_mut(), result_err, forward_to_server, result_variant,),
0x75184102667fa766,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.value))
}
pub fn r#echo_named_struct(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut forward_to_server: &str,
___deadline: zx::Time,
) -> Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error> {
let _response = self.client.send_query::<
fidl_fidl_test_imported::RequestStruct,
fidl_fidl_test_imported::ResponseStruct,
>(
(value, forward_to_server,),
0xf2d4aa9e65f7111,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.value)
}
pub fn r#echo_named_struct_with_error(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut result_err: u32,
mut forward_to_server: &str,
mut result_variant: fidl_fidl_test_imported::WantResponse,
___deadline: zx::Time,
) -> Result<EchoEchoNamedStructWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
fidl_fidl_test_imported::ErrorableRequestStruct,
fidl::encoding::ResultType<fidl_fidl_test_imported::ResponseStruct, u32>,
>(
(value, result_err, forward_to_server, result_variant,),
0x5766fee9e74442e8,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.value))
}
pub fn r#echo_named_struct_no_ret_val(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
self.client.send::<fidl_fidl_test_imported::EventTriggeringRequestStruct>(
(value, forward_to_server),
0x3a50bbf7d2113ad7,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#echo_table_payload(
&self,
mut payload: &RequestTable,
___deadline: zx::Time,
) -> Result<ResponseTable, fidl::Error> {
let _response = self.client.send_query::<RequestTable, ResponseTable>(
payload,
0x641d98087378c003,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#echo_table_payload_with_error(
&self,
mut payload: &EchoEchoTablePayloadWithErrorRequest,
___deadline: zx::Time,
) -> Result<EchoEchoTablePayloadWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoTablePayloadWithErrorRequest,
fidl::encoding::ResultType<ResponseTable, DefaultEnum>,
>(
payload,
0x636ed243761ab66d,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#echo_table_payload_no_ret_val(
&self,
mut payload: &RequestTable,
) -> Result<(), fidl::Error> {
self.client.send::<RequestTable>(
payload,
0x32961f7d718569f8,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#echo_union_payload(
&self,
mut payload: &RequestUnion,
___deadline: zx::Time,
) -> Result<ResponseUnion, fidl::Error> {
let _response = self.client.send_query::<RequestUnion, ResponseUnion>(
payload,
0x66def9e793f10c55,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#echo_union_payload_with_error(
&self,
mut payload: &EchoEchoUnionPayloadWithErrorRequest,
___deadline: zx::Time,
) -> Result<EchoEchoUnionPayloadWithErrorResult, fidl::Error> {
let _response = self.client.send_query::<
EchoEchoUnionPayloadWithErrorRequest,
fidl::encoding::ResultType<ResponseUnion, DefaultEnum>,
>(
payload,
0x1be890d6e68ef063,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#echo_union_payload_no_ret_val(
&self,
mut payload: &RequestUnion,
) -> Result<(), fidl::Error> {
self.client.send::<RequestUnion>(
payload,
0x11518bf346430040,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct EchoProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for EchoProxy {
type Protocol = EchoMarker;
fn from_channel(inner: fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl EchoProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <EchoMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> EchoEventStream {
EchoEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#echo_table_request_composed(
&self,
mut payload: &fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
) -> fidl::client::QueryResponseFut<fidl_fidl_test_imported::SimpleStruct> {
EchoProxyInterface::r#echo_table_request_composed(self, payload)
}
pub fn r#echo_union_response_with_error_composed(
&self,
mut value: i64,
mut want_absolute_value: bool,
mut forward_to_server: &str,
mut result_err: u32,
mut result_variant: fidl_fidl_test_imported::WantResponse,
) -> fidl::client::QueryResponseFut<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResult,
> {
EchoProxyInterface::r#echo_union_response_with_error_composed(
self,
value,
want_absolute_value,
forward_to_server,
result_err,
result_variant,
)
}
pub fn r#echo_minimal(
&self,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<()> {
EchoProxyInterface::r#echo_minimal(self, forward_to_server)
}
pub fn r#echo_minimal_with_error(
&self,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> fidl::client::QueryResponseFut<EchoEchoMinimalWithErrorResult> {
EchoProxyInterface::r#echo_minimal_with_error(self, forward_to_server, result_variant)
}
pub fn r#echo_minimal_no_ret_val(
&self,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
EchoProxyInterface::r#echo_minimal_no_ret_val(self, forward_to_server)
}
pub fn r#echo_struct(
&self,
mut value: Struct,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<Struct> {
EchoProxyInterface::r#echo_struct(self, value, forward_to_server)
}
pub fn r#echo_struct_with_error(
&self,
mut value: Struct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> fidl::client::QueryResponseFut<EchoEchoStructWithErrorResult> {
EchoProxyInterface::r#echo_struct_with_error(
self,
value,
result_err,
forward_to_server,
result_variant,
)
}
pub fn r#echo_struct_no_ret_val(
&self,
mut value: Struct,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
EchoProxyInterface::r#echo_struct_no_ret_val(self, value, forward_to_server)
}
pub fn r#echo_arrays(
&self,
mut value: ArraysStruct,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<ArraysStruct> {
EchoProxyInterface::r#echo_arrays(self, value, forward_to_server)
}
pub fn r#echo_arrays_with_error(
&self,
mut value: ArraysStruct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> fidl::client::QueryResponseFut<EchoEchoArraysWithErrorResult> {
EchoProxyInterface::r#echo_arrays_with_error(
self,
value,
result_err,
forward_to_server,
result_variant,
)
}
pub fn r#echo_vectors(
&self,
mut value: VectorsStruct,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<VectorsStruct> {
EchoProxyInterface::r#echo_vectors(self, value, forward_to_server)
}
pub fn r#echo_vectors_with_error(
&self,
mut value: VectorsStruct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> fidl::client::QueryResponseFut<EchoEchoVectorsWithErrorResult> {
EchoProxyInterface::r#echo_vectors_with_error(
self,
value,
result_err,
forward_to_server,
result_variant,
)
}
pub fn r#echo_table(
&self,
mut value: AllTypesTable,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<AllTypesTable> {
EchoProxyInterface::r#echo_table(self, value, forward_to_server)
}
pub fn r#echo_table_with_error(
&self,
mut value: AllTypesTable,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> fidl::client::QueryResponseFut<EchoEchoTableWithErrorResult> {
EchoProxyInterface::r#echo_table_with_error(
self,
value,
result_err,
forward_to_server,
result_variant,
)
}
pub fn r#echo_xunions(
&self,
mut value: Vec<AllTypesXunion>,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<Vec<AllTypesXunion>> {
EchoProxyInterface::r#echo_xunions(self, value, forward_to_server)
}
pub fn r#echo_xunions_with_error(
&self,
mut value: Vec<AllTypesXunion>,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> fidl::client::QueryResponseFut<EchoEchoXunionsWithErrorResult> {
EchoProxyInterface::r#echo_xunions_with_error(
self,
value,
result_err,
forward_to_server,
result_variant,
)
}
pub fn r#echo_named_struct(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut forward_to_server: &str,
) -> fidl::client::QueryResponseFut<fidl_fidl_test_imported::SimpleStruct> {
EchoProxyInterface::r#echo_named_struct(self, value, forward_to_server)
}
pub fn r#echo_named_struct_with_error(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut result_err: u32,
mut forward_to_server: &str,
mut result_variant: fidl_fidl_test_imported::WantResponse,
) -> fidl::client::QueryResponseFut<EchoEchoNamedStructWithErrorResult> {
EchoProxyInterface::r#echo_named_struct_with_error(
self,
value,
result_err,
forward_to_server,
result_variant,
)
}
pub fn r#echo_named_struct_no_ret_val(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
EchoProxyInterface::r#echo_named_struct_no_ret_val(self, value, forward_to_server)
}
pub fn r#echo_table_payload(
&self,
mut payload: &RequestTable,
) -> fidl::client::QueryResponseFut<ResponseTable> {
EchoProxyInterface::r#echo_table_payload(self, payload)
}
pub fn r#echo_table_payload_with_error(
&self,
mut payload: &EchoEchoTablePayloadWithErrorRequest,
) -> fidl::client::QueryResponseFut<EchoEchoTablePayloadWithErrorResult> {
EchoProxyInterface::r#echo_table_payload_with_error(self, payload)
}
pub fn r#echo_table_payload_no_ret_val(
&self,
mut payload: &RequestTable,
) -> Result<(), fidl::Error> {
EchoProxyInterface::r#echo_table_payload_no_ret_val(self, payload)
}
pub fn r#echo_union_payload(
&self,
mut payload: &RequestUnion,
) -> fidl::client::QueryResponseFut<ResponseUnion> {
EchoProxyInterface::r#echo_union_payload(self, payload)
}
pub fn r#echo_union_payload_with_error(
&self,
mut payload: &EchoEchoUnionPayloadWithErrorRequest,
) -> fidl::client::QueryResponseFut<EchoEchoUnionPayloadWithErrorResult> {
EchoProxyInterface::r#echo_union_payload_with_error(self, payload)
}
pub fn r#echo_union_payload_no_ret_val(
&self,
mut payload: &RequestUnion,
) -> Result<(), fidl::Error> {
EchoProxyInterface::r#echo_union_payload_no_ret_val(self, payload)
}
}
impl EchoProxyInterface for EchoProxy {
type EchoTableRequestComposedResponseFut =
fidl::client::QueryResponseFut<fidl_fidl_test_imported::SimpleStruct>;
fn r#echo_table_request_composed(
&self,
mut payload: &fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
) -> Self::EchoTableRequestComposedResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl_fidl_test_imported::ResponseStruct,
0x1d545c738c7a8ee,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<
fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
fidl_fidl_test_imported::SimpleStruct,
>(
payload,
0x1d545c738c7a8ee,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoUnionResponseWithErrorComposedResponseFut = fidl::client::QueryResponseFut<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResult,
>;
fn r#echo_union_response_with_error_composed(
&self,
mut value: i64,
mut want_absolute_value: bool,
mut forward_to_server: &str,
mut result_err: u32,
mut result_variant: fidl_fidl_test_imported::WantResponse,
) -> Self::EchoUnionResponseWithErrorComposedResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResult,
fidl::Error,
> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResponse,
u32,
>,
0x38a67e88d6106443,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedRequest,
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResult,
>(
(value, want_absolute_value, forward_to_server, result_err, result_variant,),
0x38a67e88d6106443,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoMinimalResponseFut = fidl::client::QueryResponseFut<()>;
fn r#echo_minimal(&self, mut forward_to_server: &str) -> Self::EchoMinimalResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x39edd68c837482ec,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<EchoEchoMinimalRequest, ()>(
(forward_to_server,),
0x39edd68c837482ec,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoMinimalWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoMinimalWithErrorResult>;
fn r#echo_minimal_with_error(
&self,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoMinimalWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoMinimalWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, u32>,
0x36f4695996e35acc,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
EchoEchoMinimalWithErrorRequest,
EchoEchoMinimalWithErrorResult,
>(
(forward_to_server, result_variant,),
0x36f4695996e35acc,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#echo_minimal_no_ret_val(&self, mut forward_to_server: &str) -> Result<(), fidl::Error> {
self.client.send::<EchoEchoMinimalNoRetValRequest>(
(forward_to_server,),
0x42693c143e2c3694,
fidl::encoding::DynamicFlags::empty(),
)
}
type EchoStructResponseFut = fidl::client::QueryResponseFut<Struct>;
fn r#echo_struct(
&self,
mut value: Struct,
mut forward_to_server: &str,
) -> Self::EchoStructResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<Struct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoStructResponse,
0x4c2f85818cc53f37,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<EchoEchoStructRequest, Struct>(
(&mut value, forward_to_server),
0x4c2f85818cc53f37,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoStructWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoStructWithErrorResult>;
fn r#echo_struct_with_error(
&self,
mut value: Struct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoStructWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoStructWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoStructWithErrorResponse, DefaultEnum>,
0x46cb32652c4c0899,
>(_buf?)?;
Ok(_response.map(|x| x.value))
}
self.client
.send_query_and_decode::<EchoEchoStructWithErrorRequest, EchoEchoStructWithErrorResult>(
(&mut value, result_err, forward_to_server, result_variant),
0x46cb32652c4c0899,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#echo_struct_no_ret_val(
&self,
mut value: Struct,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
self.client.send::<EchoEchoStructNoRetValRequest>(
(&mut value, forward_to_server),
0x1f763e602cf5892a,
fidl::encoding::DynamicFlags::empty(),
)
}
type EchoArraysResponseFut = fidl::client::QueryResponseFut<ArraysStruct>;
fn r#echo_arrays(
&self,
mut value: ArraysStruct,
mut forward_to_server: &str,
) -> Self::EchoArraysResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<ArraysStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoArraysResponse,
0x1b6019d5611f2470,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<EchoEchoArraysRequest, ArraysStruct>(
(&mut value, forward_to_server),
0x1b6019d5611f2470,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoArraysWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoArraysWithErrorResult>;
fn r#echo_arrays_with_error(
&self,
mut value: ArraysStruct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoArraysWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoArraysWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoArraysWithErrorResponse, DefaultEnum>,
0x6dbf26e67e253afa,
>(_buf?)?;
Ok(_response.map(|x| x.value))
}
self.client
.send_query_and_decode::<EchoEchoArraysWithErrorRequest, EchoEchoArraysWithErrorResult>(
(&mut value, result_err, forward_to_server, result_variant),
0x6dbf26e67e253afa,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoVectorsResponseFut = fidl::client::QueryResponseFut<VectorsStruct>;
fn r#echo_vectors(
&self,
mut value: VectorsStruct,
mut forward_to_server: &str,
) -> Self::EchoVectorsResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<VectorsStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoVectorsResponse,
0x1582623f0d9f6e5e,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<EchoEchoVectorsRequest, VectorsStruct>(
(&mut value, forward_to_server),
0x1582623f0d9f6e5e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoVectorsWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoVectorsWithErrorResult>;
fn r#echo_vectors_with_error(
&self,
mut value: VectorsStruct,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoVectorsWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoVectorsWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoVectorsWithErrorResponse, DefaultEnum>,
0x730f163401e2b3e5,
>(_buf?)?;
Ok(_response.map(|x| x.value))
}
self.client.send_query_and_decode::<
EchoEchoVectorsWithErrorRequest,
EchoEchoVectorsWithErrorResult,
>(
(&mut value, result_err, forward_to_server, result_variant,),
0x730f163401e2b3e5,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoTableResponseFut = fidl::client::QueryResponseFut<AllTypesTable>;
fn r#echo_table(
&self,
mut value: AllTypesTable,
mut forward_to_server: &str,
) -> Self::EchoTableResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<AllTypesTable, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoTableResponse,
0x4f1fb0a512f47c4b,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<EchoEchoTableRequest, AllTypesTable>(
(&mut value, forward_to_server),
0x4f1fb0a512f47c4b,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoTableWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoTableWithErrorResult>;
fn r#echo_table_with_error(
&self,
mut value: AllTypesTable,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoTableWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoTableWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoTableWithErrorResponse, DefaultEnum>,
0x44e835cb1eb9a931,
>(_buf?)?;
Ok(_response.map(|x| x.value))
}
self.client
.send_query_and_decode::<EchoEchoTableWithErrorRequest, EchoEchoTableWithErrorResult>(
(&mut value, result_err, forward_to_server, result_variant),
0x44e835cb1eb9a931,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoXunionsResponseFut = fidl::client::QueryResponseFut<Vec<AllTypesXunion>>;
fn r#echo_xunions(
&self,
mut value: Vec<AllTypesXunion>,
mut forward_to_server: &str,
) -> Self::EchoXunionsResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<Vec<AllTypesXunion>, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoXunionsResponse,
0x3dc181909041a583,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<EchoEchoXunionsRequest, Vec<AllTypesXunion>>(
(value.as_mut(), forward_to_server),
0x3dc181909041a583,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoXunionsWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoXunionsWithErrorResult>;
fn r#echo_xunions_with_error(
&self,
mut value: Vec<AllTypesXunion>,
mut result_err: DefaultEnum,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoXunionsWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoXunionsWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoXunionsWithErrorResponse, DefaultEnum>,
0x75184102667fa766,
>(_buf?)?;
Ok(_response.map(|x| x.value))
}
self.client.send_query_and_decode::<
EchoEchoXunionsWithErrorRequest,
EchoEchoXunionsWithErrorResult,
>(
(value.as_mut(), result_err, forward_to_server, result_variant,),
0x75184102667fa766,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoNamedStructResponseFut =
fidl::client::QueryResponseFut<fidl_fidl_test_imported::SimpleStruct>;
fn r#echo_named_struct(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut forward_to_server: &str,
) -> Self::EchoNamedStructResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl_fidl_test_imported::ResponseStruct,
0xf2d4aa9e65f7111,
>(_buf?)?;
Ok(_response.value)
}
self.client.send_query_and_decode::<
fidl_fidl_test_imported::RequestStruct,
fidl_fidl_test_imported::SimpleStruct,
>(
(value, forward_to_server,),
0xf2d4aa9e65f7111,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoNamedStructWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoNamedStructWithErrorResult>;
fn r#echo_named_struct_with_error(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut result_err: u32,
mut forward_to_server: &str,
mut result_variant: fidl_fidl_test_imported::WantResponse,
) -> Self::EchoNamedStructWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoNamedStructWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl_fidl_test_imported::ResponseStruct, u32>,
0x5766fee9e74442e8,
>(_buf?)?;
Ok(_response.map(|x| x.value))
}
self.client.send_query_and_decode::<
fidl_fidl_test_imported::ErrorableRequestStruct,
EchoEchoNamedStructWithErrorResult,
>(
(value, result_err, forward_to_server, result_variant,),
0x5766fee9e74442e8,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#echo_named_struct_no_ret_val(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
mut forward_to_server: &str,
) -> Result<(), fidl::Error> {
self.client.send::<fidl_fidl_test_imported::EventTriggeringRequestStruct>(
(value, forward_to_server),
0x3a50bbf7d2113ad7,
fidl::encoding::DynamicFlags::empty(),
)
}
type EchoTablePayloadResponseFut = fidl::client::QueryResponseFut<ResponseTable>;
fn r#echo_table_payload(
&self,
mut payload: &RequestTable,
) -> Self::EchoTablePayloadResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<ResponseTable, fidl::Error> {
let _response =
fidl::client::decode_transaction_body::<ResponseTable, 0x641d98087378c003>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<RequestTable, ResponseTable>(
payload,
0x641d98087378c003,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoTablePayloadWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoTablePayloadWithErrorResult>;
fn r#echo_table_payload_with_error(
&self,
mut payload: &EchoEchoTablePayloadWithErrorRequest,
) -> Self::EchoTablePayloadWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoTablePayloadWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ResponseTable, DefaultEnum>,
0x636ed243761ab66d,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
EchoEchoTablePayloadWithErrorRequest,
EchoEchoTablePayloadWithErrorResult,
>(
payload,
0x636ed243761ab66d,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#echo_table_payload_no_ret_val(
&self,
mut payload: &RequestTable,
) -> Result<(), fidl::Error> {
self.client.send::<RequestTable>(
payload,
0x32961f7d718569f8,
fidl::encoding::DynamicFlags::empty(),
)
}
type EchoUnionPayloadResponseFut = fidl::client::QueryResponseFut<ResponseUnion>;
fn r#echo_union_payload(
&self,
mut payload: &RequestUnion,
) -> Self::EchoUnionPayloadResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<ResponseUnion, fidl::Error> {
let _response =
fidl::client::decode_transaction_body::<ResponseUnion, 0x66def9e793f10c55>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<RequestUnion, ResponseUnion>(
payload,
0x66def9e793f10c55,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EchoUnionPayloadWithErrorResponseFut =
fidl::client::QueryResponseFut<EchoEchoUnionPayloadWithErrorResult>;
fn r#echo_union_payload_with_error(
&self,
mut payload: &EchoEchoUnionPayloadWithErrorRequest,
) -> Self::EchoUnionPayloadWithErrorResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoUnionPayloadWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ResponseUnion, DefaultEnum>,
0x1be890d6e68ef063,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
EchoEchoUnionPayloadWithErrorRequest,
EchoEchoUnionPayloadWithErrorResult,
>(
payload,
0x1be890d6e68ef063,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#echo_union_payload_no_ret_val(
&self,
mut payload: &RequestUnion,
) -> Result<(), fidl::Error> {
self.client.send::<RequestUnion>(
payload,
0x11518bf346430040,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct EchoEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for EchoEventStream {}
impl futures::stream::FusedStream for EchoEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for EchoEventStream {
type Item = Result<EchoEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(EchoEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum EchoEvent {
EchoMinimalEvent {},
EchoEvent { value: Struct },
OnEchoNamedEvent { value: fidl_fidl_test_imported::SimpleStruct },
OnEchoTablePayloadEvent { payload: ResponseTable },
OnEchoUnionPayloadEvent { payload: ResponseUnion },
}
impl EchoEvent {
#[allow(irrefutable_let_patterns)]
pub fn into_echo_minimal_event(self) -> Option<()> {
if let EchoEvent::EchoMinimalEvent {} = self {
Some(())
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_event(self) -> Option<Struct> {
if let EchoEvent::EchoEvent { value } = self {
Some((value))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_echo_named_event(self) -> Option<fidl_fidl_test_imported::SimpleStruct> {
if let EchoEvent::OnEchoNamedEvent { value } = self {
Some((value))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_echo_table_payload_event(self) -> Option<ResponseTable> {
if let EchoEvent::OnEchoTablePayloadEvent { payload } = self {
Some((payload))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_echo_union_payload_event(self) -> Option<ResponseUnion> {
if let EchoEvent::OnEchoUnionPayloadEvent { payload } = self {
Some((payload))
} else {
None
}
}
fn decode(mut buf: fidl::MessageBufEtc) -> Result<EchoEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
0x273b2029f1a0aee2 => {
let mut out = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&tx_header,
_body_bytes,
_handles,
&mut out,
)?;
Ok((EchoEvent::EchoMinimalEvent {}))
}
0x1219e12e0450024 => {
let mut out = fidl::new_empty!(EchoEchoEventRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoEventRequest>(
&tx_header,
_body_bytes,
_handles,
&mut out,
)?;
Ok((EchoEvent::EchoEvent { value: out.value }))
}
0x749ebde83348a374 => {
let mut out = fidl::new_empty!(fidl_fidl_test_imported::ResponseStruct);
fidl::encoding::Decoder::decode_into::<fidl_fidl_test_imported::ResponseStruct>(
&tx_header,
_body_bytes,
_handles,
&mut out,
)?;
Ok((EchoEvent::OnEchoNamedEvent { value: out.value }))
}
0x708dddea1cb98430 => {
let mut out = fidl::new_empty!(ResponseTable);
fidl::encoding::Decoder::decode_into::<ResponseTable>(
&tx_header,
_body_bytes,
_handles,
&mut out,
)?;
Ok((EchoEvent::OnEchoTablePayloadEvent { payload: out }))
}
0x642f4c265a05f4c0 => {
let mut out = fidl::new_empty!(ResponseUnion);
fidl::encoding::Decoder::decode_into::<ResponseUnion>(
&tx_header,
_body_bytes,
_handles,
&mut out,
)?;
Ok((EchoEvent::OnEchoUnionPayloadEvent { payload: out }))
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <EchoMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct EchoRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for EchoRequestStream {}
impl futures::stream::FusedStream for EchoRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for EchoRequestStream {
type Protocol = EchoMarker;
type ControlHandle = EchoControlHandle;
fn from_channel(channel: fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
EchoControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for EchoRequestStream {
type Item = Result<EchoRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled EchoRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(e))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x1d545c738c7a8ee => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest
);
fidl::encoding::Decoder::decode_into::<
fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoTableRequestComposed {
payload: req,
responder: EchoEchoTableRequestComposedResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x38a67e88d6106443 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedRequest
);
fidl::encoding::Decoder::decode_into::<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoUnionResponseWithErrorComposed {
value: req.value,
want_absolute_value: req.want_absolute_value,
forward_to_server: req.forward_to_server,
result_err: req.result_err,
result_variant: req.result_variant,
responder: EchoEchoUnionResponseWithErrorComposedResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x39edd68c837482ec => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoMinimalRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoMinimalRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoMinimal {
forward_to_server: req.forward_to_server,
responder: EchoEchoMinimalResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x36f4695996e35acc => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoMinimalWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoMinimalWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoMinimalWithError {
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoMinimalWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x42693c143e2c3694 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(EchoEchoMinimalNoRetValRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoMinimalNoRetValRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoMinimalNoRetVal {
forward_to_server: req.forward_to_server,
control_handle,
})
}
0x4c2f85818cc53f37 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoStructRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoStructRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoStruct {
value: req.value,
forward_to_server: req.forward_to_server,
responder: EchoEchoStructResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x46cb32652c4c0899 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoStructWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoStructWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoStructWithError {
value: req.value,
result_err: req.result_err,
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoStructWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1f763e602cf5892a => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(EchoEchoStructNoRetValRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoStructNoRetValRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoStructNoRetVal {
value: req.value,
forward_to_server: req.forward_to_server,
control_handle,
})
}
0x1b6019d5611f2470 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoArraysRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoArraysRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoArrays {
value: req.value,
forward_to_server: req.forward_to_server,
responder: EchoEchoArraysResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6dbf26e67e253afa => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoArraysWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoArraysWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoArraysWithError {
value: req.value,
result_err: req.result_err,
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoArraysWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1582623f0d9f6e5e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoVectorsRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoVectorsRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoVectors {
value: req.value,
forward_to_server: req.forward_to_server,
responder: EchoEchoVectorsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x730f163401e2b3e5 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoVectorsWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoVectorsWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoVectorsWithError {
value: req.value,
result_err: req.result_err,
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoVectorsWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4f1fb0a512f47c4b => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoTableRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoTableRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoTable {
value: req.value,
forward_to_server: req.forward_to_server,
responder: EchoEchoTableResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x44e835cb1eb9a931 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoTableWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoTableWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoTableWithError {
value: req.value,
result_err: req.result_err,
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoTableWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3dc181909041a583 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoXunionsRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoXunionsRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoXunions {
value: req.value,
forward_to_server: req.forward_to_server,
responder: EchoEchoXunionsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x75184102667fa766 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoXunionsWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoXunionsWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoXunionsWithError {
value: req.value,
result_err: req.result_err,
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoXunionsWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0xf2d4aa9e65f7111 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl_fidl_test_imported::RequestStruct);
fidl::encoding::Decoder::decode_into::<fidl_fidl_test_imported::RequestStruct>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoNamedStruct {
value: req.value,
forward_to_server: req.forward_to_server,
responder: EchoEchoNamedStructResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x5766fee9e74442e8 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl_fidl_test_imported::ErrorableRequestStruct);
fidl::encoding::Decoder::decode_into::<
fidl_fidl_test_imported::ErrorableRequestStruct,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoNamedStructWithError {
value: req.value,
result_err: req.result_err,
forward_to_server: req.forward_to_server,
result_variant: req.result_variant,
responder: EchoEchoNamedStructWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3a50bbf7d2113ad7 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req =
fidl::new_empty!(fidl_fidl_test_imported::EventTriggeringRequestStruct);
fidl::encoding::Decoder::decode_into::<
fidl_fidl_test_imported::EventTriggeringRequestStruct,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoNamedStructNoRetVal {
value: req.value,
forward_to_server: req.forward_to_server,
control_handle,
})
}
0x641d98087378c003 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(RequestTable);
fidl::encoding::Decoder::decode_into::<RequestTable>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoTablePayload {
payload: req,
responder: EchoEchoTablePayloadResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x636ed243761ab66d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoTablePayloadWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoTablePayloadWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoTablePayloadWithError {
payload: req,
responder: EchoEchoTablePayloadWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x32961f7d718569f8 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(RequestTable);
fidl::encoding::Decoder::decode_into::<RequestTable>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoTablePayloadNoRetVal { payload: req, control_handle })
}
0x66def9e793f10c55 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(RequestUnion);
fidl::encoding::Decoder::decode_into::<RequestUnion>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoUnionPayload {
payload: req,
responder: EchoEchoUnionPayloadResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1be890d6e68ef063 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(EchoEchoUnionPayloadWithErrorRequest);
fidl::encoding::Decoder::decode_into::<EchoEchoUnionPayloadWithErrorRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoUnionPayloadWithError {
payload: req,
responder: EchoEchoUnionPayloadWithErrorResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x11518bf346430040 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(RequestUnion);
fidl::encoding::Decoder::decode_into::<RequestUnion>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = EchoControlHandle { inner: this.inner.clone() };
Ok(EchoRequest::EchoUnionPayloadNoRetVal { payload: req, control_handle })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <EchoMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum EchoRequest {
EchoTableRequestComposed {
payload: fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
responder: EchoEchoTableRequestComposedResponder,
},
EchoUnionResponseWithErrorComposed {
value: i64,
want_absolute_value: bool,
forward_to_server: String,
result_err: u32,
result_variant: fidl_fidl_test_imported::WantResponse,
responder: EchoEchoUnionResponseWithErrorComposedResponder,
},
EchoMinimal {
forward_to_server: String,
responder: EchoEchoMinimalResponder,
},
EchoMinimalWithError {
forward_to_server: String,
result_variant: RespondWith,
responder: EchoEchoMinimalWithErrorResponder,
},
EchoMinimalNoRetVal {
forward_to_server: String,
control_handle: EchoControlHandle,
},
EchoStruct {
value: Struct,
forward_to_server: String,
responder: EchoEchoStructResponder,
},
EchoStructWithError {
value: Struct,
result_err: DefaultEnum,
forward_to_server: String,
result_variant: RespondWith,
responder: EchoEchoStructWithErrorResponder,
},
EchoStructNoRetVal {
value: Struct,
forward_to_server: String,
control_handle: EchoControlHandle,
},
EchoArrays {
value: ArraysStruct,
forward_to_server: String,
responder: EchoEchoArraysResponder,
},
EchoArraysWithError {
value: ArraysStruct,
result_err: DefaultEnum,
forward_to_server: String,
result_variant: RespondWith,
responder: EchoEchoArraysWithErrorResponder,
},
EchoVectors {
value: VectorsStruct,
forward_to_server: String,
responder: EchoEchoVectorsResponder,
},
EchoVectorsWithError {
value: VectorsStruct,
result_err: DefaultEnum,
forward_to_server: String,
result_variant: RespondWith,
responder: EchoEchoVectorsWithErrorResponder,
},
EchoTable {
value: AllTypesTable,
forward_to_server: String,
responder: EchoEchoTableResponder,
},
EchoTableWithError {
value: AllTypesTable,
result_err: DefaultEnum,
forward_to_server: String,
result_variant: RespondWith,
responder: EchoEchoTableWithErrorResponder,
},
EchoXunions {
value: Vec<AllTypesXunion>,
forward_to_server: String,
responder: EchoEchoXunionsResponder,
},
EchoXunionsWithError {
value: Vec<AllTypesXunion>,
result_err: DefaultEnum,
forward_to_server: String,
result_variant: RespondWith,
responder: EchoEchoXunionsWithErrorResponder,
},
EchoNamedStruct {
value: fidl_fidl_test_imported::SimpleStruct,
forward_to_server: String,
responder: EchoEchoNamedStructResponder,
},
EchoNamedStructWithError {
value: fidl_fidl_test_imported::SimpleStruct,
result_err: u32,
forward_to_server: String,
result_variant: fidl_fidl_test_imported::WantResponse,
responder: EchoEchoNamedStructWithErrorResponder,
},
EchoNamedStructNoRetVal {
value: fidl_fidl_test_imported::SimpleStruct,
forward_to_server: String,
control_handle: EchoControlHandle,
},
EchoTablePayload {
payload: RequestTable,
responder: EchoEchoTablePayloadResponder,
},
EchoTablePayloadWithError {
payload: EchoEchoTablePayloadWithErrorRequest,
responder: EchoEchoTablePayloadWithErrorResponder,
},
EchoTablePayloadNoRetVal {
payload: RequestTable,
control_handle: EchoControlHandle,
},
EchoUnionPayload {
payload: RequestUnion,
responder: EchoEchoUnionPayloadResponder,
},
EchoUnionPayloadWithError {
payload: EchoEchoUnionPayloadWithErrorRequest,
responder: EchoEchoUnionPayloadWithErrorResponder,
},
EchoUnionPayloadNoRetVal {
payload: RequestUnion,
control_handle: EchoControlHandle,
},
}
impl EchoRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_echo_table_request_composed(
self,
) -> Option<(
fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
EchoEchoTableRequestComposedResponder,
)> {
if let EchoRequest::EchoTableRequestComposed { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_union_response_with_error_composed(
self,
) -> Option<(
i64,
bool,
String,
u32,
fidl_fidl_test_imported::WantResponse,
EchoEchoUnionResponseWithErrorComposedResponder,
)> {
if let EchoRequest::EchoUnionResponseWithErrorComposed {
value,
want_absolute_value,
forward_to_server,
result_err,
result_variant,
responder,
} = self
{
Some((
value,
want_absolute_value,
forward_to_server,
result_err,
result_variant,
responder,
))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_minimal(self) -> Option<(String, EchoEchoMinimalResponder)> {
if let EchoRequest::EchoMinimal { forward_to_server, responder } = self {
Some((forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_minimal_with_error(
self,
) -> Option<(String, RespondWith, EchoEchoMinimalWithErrorResponder)> {
if let EchoRequest::EchoMinimalWithError { forward_to_server, result_variant, responder } =
self
{
Some((forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_minimal_no_ret_val(self) -> Option<(String, EchoControlHandle)> {
if let EchoRequest::EchoMinimalNoRetVal { forward_to_server, control_handle } = self {
Some((forward_to_server, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_struct(self) -> Option<(Struct, String, EchoEchoStructResponder)> {
if let EchoRequest::EchoStruct { value, forward_to_server, responder } = self {
Some((value, forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_struct_with_error(
self,
) -> Option<(Struct, DefaultEnum, String, RespondWith, EchoEchoStructWithErrorResponder)> {
if let EchoRequest::EchoStructWithError {
value,
result_err,
forward_to_server,
result_variant,
responder,
} = self
{
Some((value, result_err, forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_struct_no_ret_val(self) -> Option<(Struct, String, EchoControlHandle)> {
if let EchoRequest::EchoStructNoRetVal { value, forward_to_server, control_handle } = self {
Some((value, forward_to_server, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_arrays(self) -> Option<(ArraysStruct, String, EchoEchoArraysResponder)> {
if let EchoRequest::EchoArrays { value, forward_to_server, responder } = self {
Some((value, forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_arrays_with_error(
self,
) -> Option<(ArraysStruct, DefaultEnum, String, RespondWith, EchoEchoArraysWithErrorResponder)>
{
if let EchoRequest::EchoArraysWithError {
value,
result_err,
forward_to_server,
result_variant,
responder,
} = self
{
Some((value, result_err, forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_vectors(self) -> Option<(VectorsStruct, String, EchoEchoVectorsResponder)> {
if let EchoRequest::EchoVectors { value, forward_to_server, responder } = self {
Some((value, forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_vectors_with_error(
self,
) -> Option<(VectorsStruct, DefaultEnum, String, RespondWith, EchoEchoVectorsWithErrorResponder)>
{
if let EchoRequest::EchoVectorsWithError {
value,
result_err,
forward_to_server,
result_variant,
responder,
} = self
{
Some((value, result_err, forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_table(self) -> Option<(AllTypesTable, String, EchoEchoTableResponder)> {
if let EchoRequest::EchoTable { value, forward_to_server, responder } = self {
Some((value, forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_table_with_error(
self,
) -> Option<(AllTypesTable, DefaultEnum, String, RespondWith, EchoEchoTableWithErrorResponder)>
{
if let EchoRequest::EchoTableWithError {
value,
result_err,
forward_to_server,
result_variant,
responder,
} = self
{
Some((value, result_err, forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_xunions(
self,
) -> Option<(Vec<AllTypesXunion>, String, EchoEchoXunionsResponder)> {
if let EchoRequest::EchoXunions { value, forward_to_server, responder } = self {
Some((value, forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_xunions_with_error(
self,
) -> Option<(
Vec<AllTypesXunion>,
DefaultEnum,
String,
RespondWith,
EchoEchoXunionsWithErrorResponder,
)> {
if let EchoRequest::EchoXunionsWithError {
value,
result_err,
forward_to_server,
result_variant,
responder,
} = self
{
Some((value, result_err, forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_named_struct(
self,
) -> Option<(fidl_fidl_test_imported::SimpleStruct, String, EchoEchoNamedStructResponder)> {
if let EchoRequest::EchoNamedStruct { value, forward_to_server, responder } = self {
Some((value, forward_to_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_named_struct_with_error(
self,
) -> Option<(
fidl_fidl_test_imported::SimpleStruct,
u32,
String,
fidl_fidl_test_imported::WantResponse,
EchoEchoNamedStructWithErrorResponder,
)> {
if let EchoRequest::EchoNamedStructWithError {
value,
result_err,
forward_to_server,
result_variant,
responder,
} = self
{
Some((value, result_err, forward_to_server, result_variant, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_named_struct_no_ret_val(
self,
) -> Option<(fidl_fidl_test_imported::SimpleStruct, String, EchoControlHandle)> {
if let EchoRequest::EchoNamedStructNoRetVal { value, forward_to_server, control_handle } =
self
{
Some((value, forward_to_server, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_table_payload(self) -> Option<(RequestTable, EchoEchoTablePayloadResponder)> {
if let EchoRequest::EchoTablePayload { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_table_payload_with_error(
self,
) -> Option<(EchoEchoTablePayloadWithErrorRequest, EchoEchoTablePayloadWithErrorResponder)>
{
if let EchoRequest::EchoTablePayloadWithError { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_table_payload_no_ret_val(self) -> Option<(RequestTable, EchoControlHandle)> {
if let EchoRequest::EchoTablePayloadNoRetVal { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_union_payload(self) -> Option<(RequestUnion, EchoEchoUnionPayloadResponder)> {
if let EchoRequest::EchoUnionPayload { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_union_payload_with_error(
self,
) -> Option<(EchoEchoUnionPayloadWithErrorRequest, EchoEchoUnionPayloadWithErrorResponder)>
{
if let EchoRequest::EchoUnionPayloadWithError { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_echo_union_payload_no_ret_val(self) -> Option<(RequestUnion, EchoControlHandle)> {
if let EchoRequest::EchoUnionPayloadNoRetVal { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
EchoRequest::EchoTableRequestComposed { .. } => "echo_table_request_composed",
EchoRequest::EchoUnionResponseWithErrorComposed { .. } => {
"echo_union_response_with_error_composed"
}
EchoRequest::EchoMinimal { .. } => "echo_minimal",
EchoRequest::EchoMinimalWithError { .. } => "echo_minimal_with_error",
EchoRequest::EchoMinimalNoRetVal { .. } => "echo_minimal_no_ret_val",
EchoRequest::EchoStruct { .. } => "echo_struct",
EchoRequest::EchoStructWithError { .. } => "echo_struct_with_error",
EchoRequest::EchoStructNoRetVal { .. } => "echo_struct_no_ret_val",
EchoRequest::EchoArrays { .. } => "echo_arrays",
EchoRequest::EchoArraysWithError { .. } => "echo_arrays_with_error",
EchoRequest::EchoVectors { .. } => "echo_vectors",
EchoRequest::EchoVectorsWithError { .. } => "echo_vectors_with_error",
EchoRequest::EchoTable { .. } => "echo_table",
EchoRequest::EchoTableWithError { .. } => "echo_table_with_error",
EchoRequest::EchoXunions { .. } => "echo_xunions",
EchoRequest::EchoXunionsWithError { .. } => "echo_xunions_with_error",
EchoRequest::EchoNamedStruct { .. } => "echo_named_struct",
EchoRequest::EchoNamedStructWithError { .. } => "echo_named_struct_with_error",
EchoRequest::EchoNamedStructNoRetVal { .. } => "echo_named_struct_no_ret_val",
EchoRequest::EchoTablePayload { .. } => "echo_table_payload",
EchoRequest::EchoTablePayloadWithError { .. } => "echo_table_payload_with_error",
EchoRequest::EchoTablePayloadNoRetVal { .. } => "echo_table_payload_no_ret_val",
EchoRequest::EchoUnionPayload { .. } => "echo_union_payload",
EchoRequest::EchoUnionPayloadWithError { .. } => "echo_union_payload_with_error",
EchoRequest::EchoUnionPayloadNoRetVal { .. } => "echo_union_payload_no_ret_val",
}
}
}
#[derive(Debug, Clone)]
pub struct EchoControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for EchoControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
}
impl EchoControlHandle {
pub fn send_echo_minimal_event(&self) -> Result<(), fidl::Error> {
self.inner.send::<fidl::encoding::EmptyPayload>(
(),
0,
0x273b2029f1a0aee2,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_echo_event(&self, mut value: Struct) -> Result<(), fidl::Error> {
self.inner.send::<EchoEchoEventRequest>(
(&mut value,),
0,
0x1219e12e0450024,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_echo_named_event(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
self.inner.send::<fidl_fidl_test_imported::ResponseStruct>(
(value,),
0,
0x749ebde83348a374,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_echo_table_payload_event(
&self,
mut payload: &ResponseTable,
) -> Result<(), fidl::Error> {
self.inner.send::<ResponseTable>(
payload,
0,
0x708dddea1cb98430,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_echo_union_payload_event(
&self,
mut payload: &ResponseUnion,
) -> Result<(), fidl::Error> {
self.inner.send::<ResponseUnion>(
payload,
0,
0x642f4c265a05f4c0,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoTableRequestComposedResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoTableRequestComposedResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoTableRequestComposedResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoTableRequestComposedResponder {
pub fn send(
self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl_fidl_test_imported::ResponseStruct>(
(value,),
self.tx_id,
0x1d545c738c7a8ee,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoUnionResponseWithErrorComposedResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoUnionResponseWithErrorComposedResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoUnionResponseWithErrorComposedResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoUnionResponseWithErrorComposedResponder {
pub fn send(
self,
mut result: Result<
&fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResponse,
u32,
>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<
&fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResponse,
u32,
>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<
&fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResponse,
u32,
>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
fidl_fidl_test_imported::ComposedEchoUnionResponseWithErrorComposedResponse,
u32,
>>(
result,
self.tx_id,
0x38a67e88d6106443,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoMinimalResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoMinimalResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoMinimalResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoMinimalResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x39edd68c837482ec,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoMinimalWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoMinimalWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoMinimalWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoMinimalWithErrorResponder {
pub fn send(self, mut result: Result<(), u32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), u32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), u32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, u32>>(
result,
self.tx_id,
0x36f4695996e35acc,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoStructResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoStructResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoStructResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoStructResponder {
pub fn send(self, mut value: Struct) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut value: Struct) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut value: Struct) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<EchoEchoStructResponse>(
(&mut value,),
self.tx_id,
0x4c2f85818cc53f37,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoStructWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoStructWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoStructWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoStructWithErrorResponder {
pub fn send(self, mut result: Result<Struct, DefaultEnum>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<Struct, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<Struct, DefaultEnum>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
EchoEchoStructWithErrorResponse,
DefaultEnum,
>>(
result.as_mut().map_err(|e| *e).map(|value| (value,)),
self.tx_id,
0x46cb32652c4c0899,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoArraysResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoArraysResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoArraysResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoArraysResponder {
pub fn send(self, mut value: ArraysStruct) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut value: ArraysStruct) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut value: ArraysStruct) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<EchoEchoArraysResponse>(
(&mut value,),
self.tx_id,
0x1b6019d5611f2470,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoArraysWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoArraysWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoArraysWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoArraysWithErrorResponder {
pub fn send(self, mut result: Result<ArraysStruct, DefaultEnum>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<ArraysStruct, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<ArraysStruct, DefaultEnum>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
EchoEchoArraysWithErrorResponse,
DefaultEnum,
>>(
result.as_mut().map_err(|e| *e).map(|value| (value,)),
self.tx_id,
0x6dbf26e67e253afa,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoVectorsResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoVectorsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoVectorsResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoVectorsResponder {
pub fn send(self, mut value: VectorsStruct) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut value: VectorsStruct) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut value: VectorsStruct) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<EchoEchoVectorsResponse>(
(&mut value,),
self.tx_id,
0x1582623f0d9f6e5e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoVectorsWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoVectorsWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoVectorsWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoVectorsWithErrorResponder {
pub fn send(self, mut result: Result<VectorsStruct, DefaultEnum>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<VectorsStruct, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<VectorsStruct, DefaultEnum>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
EchoEchoVectorsWithErrorResponse,
DefaultEnum,
>>(
result.as_mut().map_err(|e| *e).map(|value| (value,)),
self.tx_id,
0x730f163401e2b3e5,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoTableResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoTableResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoTableResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoTableResponder {
pub fn send(self, mut value: AllTypesTable) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut value: AllTypesTable) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut value: AllTypesTable) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<EchoEchoTableResponse>(
(&mut value,),
self.tx_id,
0x4f1fb0a512f47c4b,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoTableWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoTableWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoTableWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoTableWithErrorResponder {
pub fn send(self, mut result: Result<AllTypesTable, DefaultEnum>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<AllTypesTable, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<AllTypesTable, DefaultEnum>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
EchoEchoTableWithErrorResponse,
DefaultEnum,
>>(
result.as_mut().map_err(|e| *e).map(|value| (value,)),
self.tx_id,
0x44e835cb1eb9a931,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoXunionsResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoXunionsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoXunionsResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoXunionsResponder {
pub fn send(self, mut value: Vec<AllTypesXunion>) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut value: Vec<AllTypesXunion>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut value: Vec<AllTypesXunion>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<EchoEchoXunionsResponse>(
(value.as_mut(),),
self.tx_id,
0x3dc181909041a583,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoXunionsWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoXunionsWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoXunionsWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoXunionsWithErrorResponder {
pub fn send(
self,
mut result: Result<Vec<AllTypesXunion>, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<Vec<AllTypesXunion>, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<Vec<AllTypesXunion>, DefaultEnum>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
EchoEchoXunionsWithErrorResponse,
DefaultEnum,
>>(
result.as_mut().map_err(|e| *e).map(|value| (value.as_mut_slice(),)),
self.tx_id,
0x75184102667fa766,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoNamedStructResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoNamedStructResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoNamedStructResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoNamedStructResponder {
pub fn send(
self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(value);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut value: &fidl_fidl_test_imported::SimpleStruct,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl_fidl_test_imported::ResponseStruct>(
(value,),
self.tx_id,
0xf2d4aa9e65f7111,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoNamedStructWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoNamedStructWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoNamedStructWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoNamedStructWithErrorResponder {
pub fn send(
self,
mut result: Result<&fidl_fidl_test_imported::SimpleStruct, u32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fidl_test_imported::SimpleStruct, u32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fidl_test_imported::SimpleStruct, u32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
fidl_fidl_test_imported::ResponseStruct,
u32,
>>(
result.map(|value| (value,)),
self.tx_id,
0x5766fee9e74442e8,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoTablePayloadResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoTablePayloadResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoTablePayloadResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoTablePayloadResponder {
pub fn send(self, mut payload: &ResponseTable) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut payload: &ResponseTable) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut payload: &ResponseTable) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ResponseTable>(
payload,
self.tx_id,
0x641d98087378c003,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoTablePayloadWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoTablePayloadWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoTablePayloadWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoTablePayloadWithErrorResponder {
pub fn send(self, mut result: Result<&ResponseTable, DefaultEnum>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&ResponseTable, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<&ResponseTable, DefaultEnum>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<ResponseTable, DefaultEnum>>(
result,
self.tx_id,
0x636ed243761ab66d,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoUnionPayloadResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoUnionPayloadResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoUnionPayloadResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoUnionPayloadResponder {
pub fn send(self, mut payload: &ResponseUnion) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut payload: &ResponseUnion) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut payload: &ResponseUnion) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ResponseUnion>(
payload,
self.tx_id,
0x66def9e793f10c55,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct EchoEchoUnionPayloadWithErrorResponder {
control_handle: std::mem::ManuallyDrop<EchoControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for EchoEchoUnionPayloadWithErrorResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for EchoEchoUnionPayloadWithErrorResponder {
type ControlHandle = EchoControlHandle;
fn control_handle(&self) -> &EchoControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl EchoEchoUnionPayloadWithErrorResponder {
pub fn send(self, mut result: Result<&ResponseUnion, DefaultEnum>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&ResponseUnion, DefaultEnum>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<&ResponseUnion, DefaultEnum>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<ResponseUnion, DefaultEnum>>(
result,
self.tx_id,
0x1be890d6e68ef063,
fidl::encoding::DynamicFlags::empty(),
)
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for DefaultBits {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
}
impl fidl::encoding::ValueTypeMarker for DefaultBits {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for DefaultBits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
if self.bits() & Self::all().bits() != self.bits() {
return Err(fidl::Error::InvalidBitsValue);
}
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for DefaultBits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U16Bits {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
}
impl fidl::encoding::ValueTypeMarker for U16Bits {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U16Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
if self.bits() & Self::all().bits() != self.bits() {
return Err(fidl::Error::InvalidBitsValue);
}
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U16Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u16>(offset);
*self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U32Bits {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
}
impl fidl::encoding::ValueTypeMarker for U32Bits {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U32Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
if self.bits() & Self::all().bits() != self.bits() {
return Err(fidl::Error::InvalidBitsValue);
}
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U32Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U64Bits {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
impl fidl::encoding::ValueTypeMarker for U64Bits {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U64Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
if self.bits() & Self::all().bits() != self.bits() {
return Err(fidl::Error::InvalidBitsValue);
}
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U64Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u64>(offset);
*self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U8Bits {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
}
impl fidl::encoding::ValueTypeMarker for U8Bits {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U8Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
if self.bits() & Self::all().bits() != self.bits() {
return Err(fidl::Error::InvalidBitsValue);
}
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U8Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u8>(offset);
*self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for RespondWith {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for RespondWith {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for RespondWith {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for RespondWith {
#[inline(always)]
fn new_empty() -> Self {
Self::Success
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for DefaultEnum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for DefaultEnum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for DefaultEnum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for DefaultEnum {
#[inline(always)]
fn new_empty() -> Self {
Self::KZero
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for I16Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<i16>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<i16>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for I16Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for I16Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for I16Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<i16>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for I32Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<i32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<i32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for I32Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for I32Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for I32Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<i32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for I64Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<i64>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<i64>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for I64Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for I64Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for I64Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<i64>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for I8Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<i8>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<i8>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for I8Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for I8Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for I8Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<i8>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U16Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u16>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u16>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for U16Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U16Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U16Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u16>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U32Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for U32Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U32Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U32Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U64Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u64>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u64>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for U64Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U64Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U64Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u64>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for U8Enum {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u8>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u8>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for U8Enum {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for U8Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for U8Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u8>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ArraysStruct {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
680
}
}
impl fidl::encoding::ResourceTypeMarker for ArraysStruct {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ArraysStruct> for &mut ArraysStruct {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ArraysStruct>(offset);
fidl::encoding::Encode::<ArraysStruct>::encode(
(
<fidl::encoding::Array<bool, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.bools),
<fidl::encoding::Array<i8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int8s),
<fidl::encoding::Array<i16, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int16s),
<fidl::encoding::Array<i32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int32s),
<fidl::encoding::Array<i64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int64s),
<fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint8s),
<fidl::encoding::Array<u16, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint16s),
<fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint32s),
<fidl::encoding::Array<u64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint64s),
<fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.float32s),
<fidl::encoding::Array<f64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.float64s),
<fidl::encoding::Array<DefaultEnum, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.enums),
<fidl::encoding::Array<DefaultBits, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.bits),
<fidl::encoding::Array<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
<fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.nullable_handles),
<fidl::encoding::Array<fidl::encoding::UnboundedString, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.strings),
<fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_strings),
<fidl::encoding::Array<ThisIsAStruct, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.structs),
<fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_structs),
<fidl::encoding::Array<ThisIsAUnion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
<fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_unions),
<fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.arrays),
<fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.vectors),
<fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_vectors),
<fidl::encoding::Array<ThisIsATable, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.tables),
<fidl::encoding::Array<ThisIsAXunion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.xunions),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::Array<bool, 3>>,
T1: fidl::encoding::Encode<fidl::encoding::Array<i8, 3>>,
T2: fidl::encoding::Encode<fidl::encoding::Array<i16, 3>>,
T3: fidl::encoding::Encode<fidl::encoding::Array<i32, 3>>,
T4: fidl::encoding::Encode<fidl::encoding::Array<i64, 3>>,
T5: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>>,
T6: fidl::encoding::Encode<fidl::encoding::Array<u16, 3>>,
T7: fidl::encoding::Encode<fidl::encoding::Array<u32, 3>>,
T8: fidl::encoding::Encode<fidl::encoding::Array<u64, 3>>,
T9: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>>,
T10: fidl::encoding::Encode<fidl::encoding::Array<f64, 3>>,
T11: fidl::encoding::Encode<fidl::encoding::Array<DefaultEnum, 3>>,
T12: fidl::encoding::Encode<fidl::encoding::Array<DefaultBits, 3>>,
T13: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
>,
T15: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::UnboundedString, 3>>,
T16: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 3>,
>,
T17: fidl::encoding::Encode<fidl::encoding::Array<ThisIsAStruct, 3>>,
T18: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3>>,
T19: fidl::encoding::Encode<fidl::encoding::Array<ThisIsAUnion, 3>>,
T20: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
>,
T21: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3>>,
T22: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3>>,
T23: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
>,
T24: fidl::encoding::Encode<fidl::encoding::Array<ThisIsATable, 3>>,
T25: fidl::encoding::Encode<fidl::encoding::Array<ThisIsAXunion, 3>>,
> fidl::encoding::Encode<ArraysStruct>
for (
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
T24,
T25,
)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ArraysStruct>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(480);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 3, depth)?;
self.2.encode(encoder, offset + 6, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
self.4.encode(encoder, offset + 24, depth)?;
self.5.encode(encoder, offset + 48, depth)?;
self.6.encode(encoder, offset + 52, depth)?;
self.7.encode(encoder, offset + 60, depth)?;
self.8.encode(encoder, offset + 72, depth)?;
self.9.encode(encoder, offset + 96, depth)?;
self.10.encode(encoder, offset + 112, depth)?;
self.11.encode(encoder, offset + 136, depth)?;
self.12.encode(encoder, offset + 148, depth)?;
self.13.encode(encoder, offset + 160, depth)?;
self.14.encode(encoder, offset + 172, depth)?;
self.15.encode(encoder, offset + 184, depth)?;
self.16.encode(encoder, offset + 232, depth)?;
self.17.encode(encoder, offset + 280, depth)?;
self.18.encode(encoder, offset + 328, depth)?;
self.19.encode(encoder, offset + 352, depth)?;
self.20.encode(encoder, offset + 400, depth)?;
self.21.encode(encoder, offset + 448, depth)?;
self.22.encode(encoder, offset + 488, depth)?;
self.23.encode(encoder, offset + 536, depth)?;
self.24.encode(encoder, offset + 584, depth)?;
self.25.encode(encoder, offset + 632, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ArraysStruct {
#[inline(always)]
fn new_empty() -> Self {
Self {
bools: fidl::new_empty!(fidl::encoding::Array<bool, 3>),
int8s: fidl::new_empty!(fidl::encoding::Array<i8, 3>),
int16s: fidl::new_empty!(fidl::encoding::Array<i16, 3>),
int32s: fidl::new_empty!(fidl::encoding::Array<i32, 3>),
int64s: fidl::new_empty!(fidl::encoding::Array<i64, 3>),
uint8s: fidl::new_empty!(fidl::encoding::Array<u8, 3>),
uint16s: fidl::new_empty!(fidl::encoding::Array<u16, 3>),
uint32s: fidl::new_empty!(fidl::encoding::Array<u32, 3>),
uint64s: fidl::new_empty!(fidl::encoding::Array<u64, 3>),
float32s: fidl::new_empty!(fidl::encoding::Array<f32, 3>),
float64s: fidl::new_empty!(fidl::encoding::Array<f64, 3>),
enums: fidl::new_empty!(fidl::encoding::Array<DefaultEnum, 3>),
bits: fidl::new_empty!(fidl::encoding::Array<DefaultBits, 3>),
handles: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>
),
nullable_handles: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>
),
strings: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::UnboundedString, 3>),
nullable_strings: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>
),
structs: fidl::new_empty!(fidl::encoding::Array<ThisIsAStruct, 3>),
nullable_structs: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3>
),
unions: fidl::new_empty!(fidl::encoding::Array<ThisIsAUnion, 3>),
nullable_unions: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>
),
arrays: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3>),
vectors: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3>
),
nullable_vectors: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>
),
tables: fidl::new_empty!(fidl::encoding::Array<ThisIsATable, 3>),
xunions: fidl::new_empty!(fidl::encoding::Array<ThisIsAXunion, 3>),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffff0000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(480) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 480 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<bool, 3>, &mut self.bools, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<i8, 3>, &mut self.int8s, decoder, offset + 3, _depth)?;
fidl::decode!(fidl::encoding::Array<i16, 3>, &mut self.int16s, decoder, offset + 6, _depth)?;
fidl::decode!(fidl::encoding::Array<i32, 3>, &mut self.int32s, decoder, offset + 12, _depth)?;
fidl::decode!(fidl::encoding::Array<i64, 3>, &mut self.int64s, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 3>, &mut self.uint8s, decoder, offset + 48, _depth)?;
fidl::decode!(fidl::encoding::Array<u16, 3>, &mut self.uint16s, decoder, offset + 52, _depth)?;
fidl::decode!(fidl::encoding::Array<u32, 3>, &mut self.uint32s, decoder, offset + 60, _depth)?;
fidl::decode!(fidl::encoding::Array<u64, 3>, &mut self.uint64s, decoder, offset + 72, _depth)?;
fidl::decode!(fidl::encoding::Array<f32, 3>, &mut self.float32s, decoder, offset + 96, _depth)?;
fidl::decode!(fidl::encoding::Array<f64, 3>, &mut self.float64s, decoder, offset + 112, _depth)?;
fidl::decode!(fidl::encoding::Array<DefaultEnum, 3>, &mut self.enums, decoder, offset + 136, _depth)?;
fidl::decode!(fidl::encoding::Array<DefaultBits, 3>, &mut self.bits, decoder, offset + 148, _depth)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
&mut self.handles,
decoder,
offset + 160,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
&mut self.nullable_handles,
decoder,
offset + 172,
_depth
)?;
fidl::decode!(fidl::encoding::Array<fidl::encoding::UnboundedString, 3>, &mut self.strings, decoder, offset + 184, _depth)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 3>,
&mut self.nullable_strings,
decoder,
offset + 232,
_depth
)?;
fidl::decode!(fidl::encoding::Array<ThisIsAStruct, 3>, &mut self.structs, decoder, offset + 280, _depth)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
&mut self.nullable_structs,
decoder,
offset + 328,
_depth
)?;
fidl::decode!(fidl::encoding::Array<ThisIsAUnion, 3>, &mut self.unions, decoder, offset + 352, _depth)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
&mut self.nullable_unions,
decoder,
offset + 400,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3>,
&mut self.arrays,
decoder,
offset + 448,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3>,
&mut self.vectors,
decoder,
offset + 488,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
&mut self.nullable_vectors,
decoder,
offset + 536,
_depth
)?;
fidl::decode!(fidl::encoding::Array<ThisIsATable, 3>, &mut self.tables, decoder, offset + 584, _depth)?;
fidl::decode!(fidl::encoding::Array<ThisIsAXunion, 3>, &mut self.xunions, decoder, offset + 632, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ConfigGetImplsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ConfigGetImplsResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ConfigGetImplsResponse> for &ConfigGetImplsResponse {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConfigGetImplsResponse>(offset);
fidl::encoding::Encode::<ConfigGetImplsResponse>::encode(
(
<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.impls),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
>,
> fidl::encoding::Encode<ConfigGetImplsResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConfigGetImplsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ConfigGetImplsResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
impls: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
&mut self.impls,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoArraysRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
696
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoArraysRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoArraysRequest> for &mut EchoEchoArraysRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysRequest>(offset);
fidl::encoding::Encode::<EchoEchoArraysRequest>::encode(
(
<ArraysStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ArraysStruct>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<EchoEchoArraysRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 680, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoArraysRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(ArraysStruct),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ArraysStruct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 680,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoArraysResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
680
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoArraysResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoArraysResponse> for &mut EchoEchoArraysResponse {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysResponse>(offset);
fidl::encoding::Encode::<EchoEchoArraysResponse>::encode(
(<ArraysStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<ArraysStruct>>
fidl::encoding::Encode<EchoEchoArraysResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoArraysResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(ArraysStruct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ArraysStruct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoArraysWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
712
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoArraysWithErrorRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoArraysWithErrorRequest>
for &mut EchoEchoArraysWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoArraysWithErrorRequest>::encode(
(
<ArraysStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ArraysStruct>,
T1: fidl::encoding::Encode<DefaultEnum>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<EchoEchoArraysWithErrorRequest> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysWithErrorRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(680);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(704);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 680, depth)?;
self.2.encode(encoder, offset + 688, depth)?;
self.3.encode(encoder, offset + 704, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoArraysWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(ArraysStruct),
result_err: fidl::new_empty!(DefaultEnum),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(680) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 680 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(704) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 704 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(ArraysStruct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 680, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 688,
_depth
)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 704, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoEventRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2912
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoEventRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoEventRequest> for &mut EchoEchoEventRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoEventRequest>(offset);
fidl::encoding::Encode::<EchoEchoEventRequest>::encode(
(<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<Struct>> fidl::encoding::Encode<EchoEchoEventRequest>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoEventRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoEventRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(Struct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(Struct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoMinimalNoRetValRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalNoRetValRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoMinimalNoRetValRequest>
for &EchoEchoMinimalNoRetValRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalNoRetValRequest>(offset);
fidl::encoding::Encode::<EchoEchoMinimalNoRetValRequest>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<EchoEchoMinimalNoRetValRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalNoRetValRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoMinimalNoRetValRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoMinimalRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoMinimalRequest> for &EchoEchoMinimalRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalRequest>(offset);
fidl::encoding::Encode::<EchoEchoMinimalRequest>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<EchoEchoMinimalRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoMinimalRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoMinimalWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalWithErrorRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoMinimalWithErrorRequest>
for &EchoEchoMinimalWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoMinimalWithErrorRequest>::encode(
(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T1: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<EchoEchoMinimalWithErrorRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalWithErrorRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoMinimalWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 16, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoStructNoRetValRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2928
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoStructNoRetValRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoStructNoRetValRequest>
for &mut EchoEchoStructNoRetValRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructNoRetValRequest>(offset);
fidl::encoding::Encode::<EchoEchoStructNoRetValRequest>::encode(
(
<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<Struct>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<EchoEchoStructNoRetValRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructNoRetValRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 2912, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoStructNoRetValRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(Struct),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(Struct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 2912,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoStructRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2928
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoStructRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoStructRequest> for &mut EchoEchoStructRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructRequest>(offset);
fidl::encoding::Encode::<EchoEchoStructRequest>::encode(
(
<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<Struct>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<EchoEchoStructRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 2912, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoStructRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(Struct),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(Struct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 2912,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoStructResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2912
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoStructResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoStructResponse> for &mut EchoEchoStructResponse {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructResponse>(offset);
fidl::encoding::Encode::<EchoEchoStructResponse>::encode(
(<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<Struct>> fidl::encoding::Encode<EchoEchoStructResponse>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoStructResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(Struct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(Struct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoStructWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2944
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoStructWithErrorRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoStructWithErrorRequest>
for &mut EchoEchoStructWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoStructWithErrorRequest>::encode(
(
<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<Struct>,
T1: fidl::encoding::Encode<DefaultEnum>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<EchoEchoStructWithErrorRequest> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructWithErrorRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2912);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2936);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 2912, depth)?;
self.2.encode(encoder, offset + 2920, depth)?;
self.3.encode(encoder, offset + 2936, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoStructWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(Struct),
result_err: fidl::new_empty!(DefaultEnum),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2912) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2912 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2936) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2936 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(Struct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 2912, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 2920,
_depth
)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 2936, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoTableRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoTableRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoTableRequest> for &mut EchoEchoTableRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableRequest>(offset);
fidl::encoding::Encode::<EchoEchoTableRequest>::encode(
(
<AllTypesTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<AllTypesTable>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<EchoEchoTableRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoTableRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(AllTypesTable),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(AllTypesTable, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoTableResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoTableResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoTableResponse> for &mut EchoEchoTableResponse {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableResponse>(offset);
fidl::encoding::Encode::<EchoEchoTableResponse>::encode(
(<AllTypesTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<AllTypesTable>>
fidl::encoding::Encode<EchoEchoTableResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoTableResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(AllTypesTable) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(AllTypesTable, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoTableWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
48
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoTableWithErrorRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoTableWithErrorRequest>
for &mut EchoEchoTableWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoTableWithErrorRequest>::encode(
(
<AllTypesTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<AllTypesTable>,
T1: fidl::encoding::Encode<DefaultEnum>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<EchoEchoTableWithErrorRequest> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableWithErrorRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 24, depth)?;
self.3.encode(encoder, offset + 40, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoTableWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(AllTypesTable),
result_err: fidl::new_empty!(DefaultEnum),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(AllTypesTable, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 16, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 40, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoVectorsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
432
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoVectorsRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoVectorsRequest> for &mut EchoEchoVectorsRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsRequest>(offset);
fidl::encoding::Encode::<EchoEchoVectorsRequest>::encode(
(
<VectorsStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<VectorsStruct>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<EchoEchoVectorsRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 416, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoVectorsRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(VectorsStruct),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(VectorsStruct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 416,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoVectorsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
416
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoVectorsResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoVectorsResponse> for &mut EchoEchoVectorsResponse {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsResponse>(offset);
fidl::encoding::Encode::<EchoEchoVectorsResponse>::encode(
(<VectorsStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<VectorsStruct>>
fidl::encoding::Encode<EchoEchoVectorsResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoVectorsResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(VectorsStruct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(VectorsStruct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoVectorsWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
448
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoVectorsWithErrorRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoVectorsWithErrorRequest>
for &mut EchoEchoVectorsWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoVectorsWithErrorRequest>::encode(
(
<VectorsStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<VectorsStruct>,
T1: fidl::encoding::Encode<DefaultEnum>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<EchoEchoVectorsWithErrorRequest> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsWithErrorRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(416);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(440);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 416, depth)?;
self.2.encode(encoder, offset + 424, depth)?;
self.3.encode(encoder, offset + 440, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoVectorsWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(VectorsStruct),
result_err: fidl::new_empty!(DefaultEnum),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(416) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 416 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(440) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 440 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(VectorsStruct, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 416, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 424,
_depth
)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 440, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoXunionsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoXunionsRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoXunionsRequest> for &mut EchoEchoXunionsRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsRequest>(offset);
fidl::encoding::Encode::<EchoEchoXunionsRequest>::encode(
(
<fidl::encoding::UnboundedVector<AllTypesXunion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.forward_to_server),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<AllTypesXunion>>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<EchoEchoXunionsRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoXunionsRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(fidl::encoding::UnboundedVector<AllTypesXunion>),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoXunionsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoXunionsResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoXunionsResponse> for &mut EchoEchoXunionsResponse {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsResponse>(offset);
fidl::encoding::Encode::<EchoEchoXunionsResponse>::encode(
(
<fidl::encoding::UnboundedVector<AllTypesXunion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<AllTypesXunion>>>
fidl::encoding::Encode<EchoEchoXunionsResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoXunionsResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(fidl::encoding::UnboundedVector<AllTypesXunion>) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoXunionsWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
48
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoXunionsWithErrorRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoXunionsWithErrorRequest>
for &mut EchoEchoXunionsWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoXunionsWithErrorRequest>::encode(
(
<fidl::encoding::UnboundedVector<AllTypesXunion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.forward_to_server),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<AllTypesXunion>>,
T1: fidl::encoding::Encode<DefaultEnum>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<EchoEchoXunionsWithErrorRequest> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsWithErrorRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 24, depth)?;
self.3.encode(encoder, offset + 40, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoXunionsWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(fidl::encoding::UnboundedVector<AllTypesXunion>),
result_err: fidl::new_empty!(DefaultEnum),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 16, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 40, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoArraysWithErrorResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
680
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoArraysWithErrorResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoArraysWithErrorResponse>
for &mut EchoEchoArraysWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysWithErrorResponse>(offset);
fidl::encoding::Encode::<EchoEchoArraysWithErrorResponse>::encode(
(<ArraysStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<ArraysStruct>>
fidl::encoding::Encode<EchoEchoArraysWithErrorResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysWithErrorResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoArraysWithErrorResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(ArraysStruct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ArraysStruct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoStructWithErrorResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2912
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoStructWithErrorResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoStructWithErrorResponse>
for &mut EchoEchoStructWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructWithErrorResponse>(offset);
fidl::encoding::Encode::<EchoEchoStructWithErrorResponse>::encode(
(<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<Struct>>
fidl::encoding::Encode<EchoEchoStructWithErrorResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructWithErrorResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoStructWithErrorResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(Struct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(Struct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoTableWithErrorResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoTableWithErrorResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoTableWithErrorResponse>
for &mut EchoEchoTableWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableWithErrorResponse>(offset);
fidl::encoding::Encode::<EchoEchoTableWithErrorResponse>::encode(
(<AllTypesTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<AllTypesTable>>
fidl::encoding::Encode<EchoEchoTableWithErrorResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableWithErrorResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoTableWithErrorResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(AllTypesTable) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(AllTypesTable, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoVectorsWithErrorResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
416
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoVectorsWithErrorResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoVectorsWithErrorResponse>
for &mut EchoEchoVectorsWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsWithErrorResponse>(offset);
fidl::encoding::Encode::<EchoEchoVectorsWithErrorResponse>::encode(
(<VectorsStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<VectorsStruct>>
fidl::encoding::Encode<EchoEchoVectorsWithErrorResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsWithErrorResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoVectorsWithErrorResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(VectorsStruct) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(VectorsStruct, &mut self.value, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoXunionsWithErrorResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ResourceTypeMarker for EchoEchoXunionsWithErrorResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoXunionsWithErrorResponse>
for &mut EchoEchoXunionsWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsWithErrorResponse>(offset);
fidl::encoding::Encode::<EchoEchoXunionsWithErrorResponse>::encode(
(
<fidl::encoding::UnboundedVector<AllTypesXunion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<AllTypesXunion>>>
fidl::encoding::Encode<EchoEchoXunionsWithErrorResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsWithErrorResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoXunionsWithErrorResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(fidl::encoding::UnboundedVector<AllTypesXunion>) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Signed {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
impl fidl::encoding::ValueTypeMarker for Signed {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Signed> for &Signed {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Signed>(offset);
fidl::encoding::Encode::<Signed>::encode(
(
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<i64>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<Signed> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Signed>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Signed {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(i64),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(i64, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for SignedErrorable {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ValueTypeMarker for SignedErrorable {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<SignedErrorable> for &SignedErrorable {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SignedErrorable>(offset);
fidl::encoding::Encode::<SignedErrorable>::encode(
(
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<i64>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T2: fidl::encoding::Encode<DefaultEnum>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<SignedErrorable> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SignedErrorable>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
self.2.encode(encoder, offset + 24, depth)?;
self.3.encode(encoder, offset + 28, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for SignedErrorable {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(i64),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_err: fidl::new_empty!(DefaultEnum),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(i64, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 24, _depth)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 28, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Struct {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2912
}
}
impl fidl::encoding::ResourceTypeMarker for Struct {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Struct> for &mut Struct {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Struct>(offset);
fidl::encoding::Encode::<Struct>::encode(
(
<PrimitiveTypes as fidl::encoding::ValueTypeMarker>::borrow(
&self.primitive_types,
),
<DefaultValues as fidl::encoding::ValueTypeMarker>::borrow(
&self.default_values,
),
<Arrays as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.arrays,
),
<Arrays2d as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.arrays_2d,
),
<Vectors as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.vectors,
),
<Handles as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.handles,
),
<Strings as fidl::encoding::ValueTypeMarker>::borrow(&self.strings),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.default_enum),
<I8Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_enum),
<I16Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_enum),
<I32Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_enum),
<I64Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_enum),
<U8Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_enum),
<U16Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_enum),
<U32Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_enum),
<U64Enum as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_enum),
<DefaultBits as fidl::encoding::ValueTypeMarker>::borrow(&self.default_bits),
<U8Bits as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_bits),
<U16Bits as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_bits),
<U32Bits as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_bits),
<U64Bits as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_bits),
<Structs as fidl::encoding::ValueTypeMarker>::borrow(&self.structs),
<Unions as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
<ThisIsATable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),
<ThisIsAXunion as fidl::encoding::ValueTypeMarker>::borrow(&self.xunion),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<PrimitiveTypes>,
T1: fidl::encoding::Encode<DefaultValues>,
T2: fidl::encoding::Encode<Arrays>,
T3: fidl::encoding::Encode<Arrays2d>,
T4: fidl::encoding::Encode<Vectors>,
T5: fidl::encoding::Encode<Handles>,
T6: fidl::encoding::Encode<Strings>,
T7: fidl::encoding::Encode<DefaultEnum>,
T8: fidl::encoding::Encode<I8Enum>,
T9: fidl::encoding::Encode<I16Enum>,
T10: fidl::encoding::Encode<I32Enum>,
T11: fidl::encoding::Encode<I64Enum>,
T12: fidl::encoding::Encode<U8Enum>,
T13: fidl::encoding::Encode<U16Enum>,
T14: fidl::encoding::Encode<U32Enum>,
T15: fidl::encoding::Encode<U64Enum>,
T16: fidl::encoding::Encode<DefaultBits>,
T17: fidl::encoding::Encode<U8Bits>,
T18: fidl::encoding::Encode<U16Bits>,
T19: fidl::encoding::Encode<U32Bits>,
T20: fidl::encoding::Encode<U64Bits>,
T21: fidl::encoding::Encode<Structs>,
T22: fidl::encoding::Encode<Unions>,
T23: fidl::encoding::Encode<ThisIsATable>,
T24: fidl::encoding::Encode<ThisIsAXunion>,
T25: fidl::encoding::Encode<bool>,
> fidl::encoding::Encode<Struct>
for (
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
T24,
T25,
)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Struct>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2640);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2744);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2752);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2768);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2784);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2792);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2904);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 48, depth)?;
self.2.encode(encoder, offset + 120, depth)?;
self.3.encode(encoder, offset + 328, depth)?;
self.4.encode(encoder, offset + 616, depth)?;
self.5.encode(encoder, offset + 2536, depth)?;
self.6.encode(encoder, offset + 2648, depth)?;
self.7.encode(encoder, offset + 2744, depth)?;
self.8.encode(encoder, offset + 2748, depth)?;
self.9.encode(encoder, offset + 2750, depth)?;
self.10.encode(encoder, offset + 2752, depth)?;
self.11.encode(encoder, offset + 2760, depth)?;
self.12.encode(encoder, offset + 2768, depth)?;
self.13.encode(encoder, offset + 2770, depth)?;
self.14.encode(encoder, offset + 2772, depth)?;
self.15.encode(encoder, offset + 2776, depth)?;
self.16.encode(encoder, offset + 2784, depth)?;
self.17.encode(encoder, offset + 2788, depth)?;
self.18.encode(encoder, offset + 2790, depth)?;
self.19.encode(encoder, offset + 2792, depth)?;
self.20.encode(encoder, offset + 2800, depth)?;
self.21.encode(encoder, offset + 2808, depth)?;
self.22.encode(encoder, offset + 2840, depth)?;
self.23.encode(encoder, offset + 2872, depth)?;
self.24.encode(encoder, offset + 2888, depth)?;
self.25.encode(encoder, offset + 2904, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Struct {
#[inline(always)]
fn new_empty() -> Self {
Self {
primitive_types: fidl::new_empty!(PrimitiveTypes),
default_values: fidl::new_empty!(DefaultValues),
arrays: fidl::new_empty!(Arrays),
arrays_2d: fidl::new_empty!(Arrays2d),
vectors: fidl::new_empty!(Vectors),
handles: fidl::new_empty!(Handles),
strings: fidl::new_empty!(Strings),
default_enum: fidl::new_empty!(DefaultEnum),
i8_enum: fidl::new_empty!(I8Enum),
i16_enum: fidl::new_empty!(I16Enum),
i32_enum: fidl::new_empty!(I32Enum),
i64_enum: fidl::new_empty!(I64Enum),
u8_enum: fidl::new_empty!(U8Enum),
u16_enum: fidl::new_empty!(U16Enum),
u32_enum: fidl::new_empty!(U32Enum),
u64_enum: fidl::new_empty!(U64Enum),
default_bits: fidl::new_empty!(DefaultBits),
u8_bits: fidl::new_empty!(U8Bits),
u16_bits: fidl::new_empty!(U16Bits),
u32_bits: fidl::new_empty!(U32Bits),
u64_bits: fidl::new_empty!(U64Bits),
structs: fidl::new_empty!(Structs),
unions: fidl::new_empty!(Unions),
table: fidl::new_empty!(ThisIsATable),
xunion: fidl::new_empty!(ThisIsAXunion),
b: fidl::new_empty!(bool),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2640) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2640 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2744) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff0000000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2744 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2752) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2752 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2768) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2768 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2784) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff0000000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2784 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2792) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2792 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2904) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffffff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 2904 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(PrimitiveTypes, &mut self.primitive_types, decoder, offset + 0, _depth)?;
fidl::decode!(DefaultValues, &mut self.default_values, decoder, offset + 48, _depth)?;
fidl::decode!(Arrays, &mut self.arrays, decoder, offset + 120, _depth)?;
fidl::decode!(Arrays2d, &mut self.arrays_2d, decoder, offset + 328, _depth)?;
fidl::decode!(Vectors, &mut self.vectors, decoder, offset + 616, _depth)?;
fidl::decode!(Handles, &mut self.handles, decoder, offset + 2536, _depth)?;
fidl::decode!(Strings, &mut self.strings, decoder, offset + 2648, _depth)?;
fidl::decode!(DefaultEnum, &mut self.default_enum, decoder, offset + 2744, _depth)?;
fidl::decode!(I8Enum, &mut self.i8_enum, decoder, offset + 2748, _depth)?;
fidl::decode!(I16Enum, &mut self.i16_enum, decoder, offset + 2750, _depth)?;
fidl::decode!(I32Enum, &mut self.i32_enum, decoder, offset + 2752, _depth)?;
fidl::decode!(I64Enum, &mut self.i64_enum, decoder, offset + 2760, _depth)?;
fidl::decode!(U8Enum, &mut self.u8_enum, decoder, offset + 2768, _depth)?;
fidl::decode!(U16Enum, &mut self.u16_enum, decoder, offset + 2770, _depth)?;
fidl::decode!(U32Enum, &mut self.u32_enum, decoder, offset + 2772, _depth)?;
fidl::decode!(U64Enum, &mut self.u64_enum, decoder, offset + 2776, _depth)?;
fidl::decode!(DefaultBits, &mut self.default_bits, decoder, offset + 2784, _depth)?;
fidl::decode!(U8Bits, &mut self.u8_bits, decoder, offset + 2788, _depth)?;
fidl::decode!(U16Bits, &mut self.u16_bits, decoder, offset + 2790, _depth)?;
fidl::decode!(U32Bits, &mut self.u32_bits, decoder, offset + 2792, _depth)?;
fidl::decode!(U64Bits, &mut self.u64_bits, decoder, offset + 2800, _depth)?;
fidl::decode!(Structs, &mut self.structs, decoder, offset + 2808, _depth)?;
fidl::decode!(Unions, &mut self.unions, decoder, offset + 2840, _depth)?;
fidl::decode!(ThisIsATable, &mut self.table, decoder, offset + 2872, _depth)?;
fidl::decode!(ThisIsAXunion, &mut self.xunion, decoder, offset + 2888, _depth)?;
fidl::decode!(bool, &mut self.b, decoder, offset + 2904, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Unsigned {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
impl fidl::encoding::ValueTypeMarker for Unsigned {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Unsigned> for &Unsigned {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Unsigned>(offset);
fidl::encoding::Encode::<Unsigned>::encode(
(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<u64>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<Unsigned> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Unsigned>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Unsigned {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(u64),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(u64, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for UnsignedErrorable {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ValueTypeMarker for UnsignedErrorable {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<UnsignedErrorable> for &UnsignedErrorable {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnsignedErrorable>(offset);
fidl::encoding::Encode::<UnsignedErrorable>::encode(
(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
<RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<u64>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T2: fidl::encoding::Encode<DefaultEnum>,
T3: fidl::encoding::Encode<RespondWith>,
> fidl::encoding::Encode<UnsignedErrorable> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnsignedErrorable>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
self.2.encode(encoder, offset + 24, depth)?;
self.3.encode(encoder, offset + 28, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for UnsignedErrorable {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(u64),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString),
result_err: fidl::new_empty!(DefaultEnum),
result_variant: fidl::new_empty!(RespondWith),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(u64, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(DefaultEnum, &mut self.result_err, decoder, offset + 24, _depth)?;
fidl::decode!(RespondWith, &mut self.result_variant, decoder, offset + 28, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for VectorsStruct {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
416
}
}
impl fidl::encoding::ResourceTypeMarker for VectorsStruct {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<VectorsStruct> for &mut VectorsStruct {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<VectorsStruct>(offset);
fidl::encoding::Encode::<VectorsStruct>::encode(
(
<fidl::encoding::Vector<bool, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.bools),
<fidl::encoding::Vector<i8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int8s),
<fidl::encoding::Vector<i16, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int16s),
<fidl::encoding::Vector<i32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int32s),
<fidl::encoding::Vector<i64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.int64s),
<fidl::encoding::Vector<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint8s),
<fidl::encoding::Vector<u16, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint16s),
<fidl::encoding::Vector<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint32s),
<fidl::encoding::Vector<u64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.uint64s),
<fidl::encoding::Vector<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.float32s),
<fidl::encoding::Vector<f64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.float64s),
<fidl::encoding::Vector<DefaultEnum, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.enums),
<fidl::encoding::Vector<DefaultBits, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.bits),
<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
<fidl::encoding::Vector<fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.nullable_handles),
<fidl::encoding::Vector<fidl::encoding::UnboundedString, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.strings),
<fidl::encoding::Vector<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_strings),
<fidl::encoding::Vector<ThisIsAStruct, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.structs),
<fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_structs),
<fidl::encoding::Vector<ThisIsAUnion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
<fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_unions),
<fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.arrays),
<fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.vectors),
<fidl::encoding::Vector<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_vectors),
<fidl::encoding::Vector<ThisIsATable, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.tables),
<fidl::encoding::Vector<ThisIsAXunion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.xunions),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::Vector<bool, 3>>,
T1: fidl::encoding::Encode<fidl::encoding::Vector<i8, 3>>,
T2: fidl::encoding::Encode<fidl::encoding::Vector<i16, 3>>,
T3: fidl::encoding::Encode<fidl::encoding::Vector<i32, 3>>,
T4: fidl::encoding::Encode<fidl::encoding::Vector<i64, 3>>,
T5: fidl::encoding::Encode<fidl::encoding::Vector<u8, 3>>,
T6: fidl::encoding::Encode<fidl::encoding::Vector<u16, 3>>,
T7: fidl::encoding::Encode<fidl::encoding::Vector<u32, 3>>,
T8: fidl::encoding::Encode<fidl::encoding::Vector<u64, 3>>,
T9: fidl::encoding::Encode<fidl::encoding::Vector<f32, 3>>,
T10: fidl::encoding::Encode<fidl::encoding::Vector<f64, 3>>,
T11: fidl::encoding::Encode<fidl::encoding::Vector<DefaultEnum, 3>>,
T12: fidl::encoding::Encode<fidl::encoding::Vector<DefaultBits, 3>>,
T13: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
>,
T15: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::UnboundedString, 3>>,
T16: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>,
>,
T17: fidl::encoding::Encode<fidl::encoding::Vector<ThisIsAStruct, 3>>,
T18: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3>>,
T19: fidl::encoding::Encode<fidl::encoding::Vector<ThisIsAUnion, 3>>,
T20: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
>,
T21: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3>>,
T22: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3>>,
T23: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
>,
T24: fidl::encoding::Encode<fidl::encoding::Vector<ThisIsATable, 3>>,
T25: fidl::encoding::Encode<fidl::encoding::Vector<ThisIsAXunion, 3>>,
> fidl::encoding::Encode<VectorsStruct>
for (
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
T24,
T25,
)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<VectorsStruct>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 32, depth)?;
self.3.encode(encoder, offset + 48, depth)?;
self.4.encode(encoder, offset + 64, depth)?;
self.5.encode(encoder, offset + 80, depth)?;
self.6.encode(encoder, offset + 96, depth)?;
self.7.encode(encoder, offset + 112, depth)?;
self.8.encode(encoder, offset + 128, depth)?;
self.9.encode(encoder, offset + 144, depth)?;
self.10.encode(encoder, offset + 160, depth)?;
self.11.encode(encoder, offset + 176, depth)?;
self.12.encode(encoder, offset + 192, depth)?;
self.13.encode(encoder, offset + 208, depth)?;
self.14.encode(encoder, offset + 224, depth)?;
self.15.encode(encoder, offset + 240, depth)?;
self.16.encode(encoder, offset + 256, depth)?;
self.17.encode(encoder, offset + 272, depth)?;
self.18.encode(encoder, offset + 288, depth)?;
self.19.encode(encoder, offset + 304, depth)?;
self.20.encode(encoder, offset + 320, depth)?;
self.21.encode(encoder, offset + 336, depth)?;
self.22.encode(encoder, offset + 352, depth)?;
self.23.encode(encoder, offset + 368, depth)?;
self.24.encode(encoder, offset + 384, depth)?;
self.25.encode(encoder, offset + 400, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for VectorsStruct {
#[inline(always)]
fn new_empty() -> Self {
Self {
bools: fidl::new_empty!(fidl::encoding::Vector<bool, 3>),
int8s: fidl::new_empty!(fidl::encoding::Vector<i8, 3>),
int16s: fidl::new_empty!(fidl::encoding::Vector<i16, 3>),
int32s: fidl::new_empty!(fidl::encoding::Vector<i32, 3>),
int64s: fidl::new_empty!(fidl::encoding::Vector<i64, 3>),
uint8s: fidl::new_empty!(fidl::encoding::Vector<u8, 3>),
uint16s: fidl::new_empty!(fidl::encoding::Vector<u16, 3>),
uint32s: fidl::new_empty!(fidl::encoding::Vector<u32, 3>),
uint64s: fidl::new_empty!(fidl::encoding::Vector<u64, 3>),
float32s: fidl::new_empty!(fidl::encoding::Vector<f32, 3>),
float64s: fidl::new_empty!(fidl::encoding::Vector<f64, 3>),
enums: fidl::new_empty!(fidl::encoding::Vector<DefaultEnum, 3>),
bits: fidl::new_empty!(fidl::encoding::Vector<DefaultBits, 3>),
handles: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>
),
nullable_handles: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>
),
strings: fidl::new_empty!(fidl::encoding::Vector<fidl::encoding::UnboundedString, 3>),
nullable_strings: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>
),
structs: fidl::new_empty!(fidl::encoding::Vector<ThisIsAStruct, 3>),
nullable_structs: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3>
),
unions: fidl::new_empty!(fidl::encoding::Vector<ThisIsAUnion, 3>),
nullable_unions: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>
),
arrays: fidl::new_empty!(fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3>),
vectors: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3>
),
nullable_vectors: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>
),
tables: fidl::new_empty!(fidl::encoding::Vector<ThisIsATable, 3>),
xunions: fidl::new_empty!(fidl::encoding::Vector<ThisIsAXunion, 3>),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::Vector<bool, 3>, &mut self.bools, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Vector<i8, 3>, &mut self.int8s, decoder, offset + 16, _depth)?;
fidl::decode!(fidl::encoding::Vector<i16, 3>, &mut self.int16s, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::Vector<i32, 3>, &mut self.int32s, decoder, offset + 48, _depth)?;
fidl::decode!(fidl::encoding::Vector<i64, 3>, &mut self.int64s, decoder, offset + 64, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 3>, &mut self.uint8s, decoder, offset + 80, _depth)?;
fidl::decode!(fidl::encoding::Vector<u16, 3>, &mut self.uint16s, decoder, offset + 96, _depth)?;
fidl::decode!(fidl::encoding::Vector<u32, 3>, &mut self.uint32s, decoder, offset + 112, _depth)?;
fidl::decode!(fidl::encoding::Vector<u64, 3>, &mut self.uint64s, decoder, offset + 128, _depth)?;
fidl::decode!(fidl::encoding::Vector<f32, 3>, &mut self.float32s, decoder, offset + 144, _depth)?;
fidl::decode!(fidl::encoding::Vector<f64, 3>, &mut self.float64s, decoder, offset + 160, _depth)?;
fidl::decode!(fidl::encoding::Vector<DefaultEnum, 3>, &mut self.enums, decoder, offset + 176, _depth)?;
fidl::decode!(fidl::encoding::Vector<DefaultBits, 3>, &mut self.bits, decoder, offset + 192, _depth)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
&mut self.handles,
decoder,
offset + 208,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
&mut self.nullable_handles,
decoder,
offset + 224,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<fidl::encoding::UnboundedString, 3>, &mut self.strings, decoder, offset + 240, _depth)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>,
&mut self.nullable_strings,
decoder,
offset + 256,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<ThisIsAStruct, 3>, &mut self.structs, decoder, offset + 272, _depth)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
&mut self.nullable_structs,
decoder,
offset + 288,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<ThisIsAUnion, 3>, &mut self.unions, decoder, offset + 304, _depth)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
&mut self.nullable_unions,
decoder,
offset + 320,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3>,
&mut self.arrays,
decoder,
offset + 336,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3>,
&mut self.vectors,
decoder,
offset + 352,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
&mut self.nullable_vectors,
decoder,
offset + 368,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<ThisIsATable, 3>, &mut self.tables, decoder, offset + 384, _depth)?;
fidl::decode!(fidl::encoding::Vector<ThisIsAXunion, 3>, &mut self.xunions, decoder, offset + 400, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Arrays {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
208
}
}
impl fidl::encoding::ResourceTypeMarker for Arrays {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Arrays> for &mut Arrays {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Arrays>(offset);
fidl::encoding::Encode::<Arrays>::encode(
(
<fidl::encoding::Array<bool, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.b_0,
),
<fidl::encoding::Array<i8, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i8_0,
),
<fidl::encoding::Array<i16, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i16_0,
),
<fidl::encoding::Array<i32, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i32_0,
),
<fidl::encoding::Array<i64, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i64_0,
),
<fidl::encoding::Array<u8, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u8_0,
),
<fidl::encoding::Array<u16, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u16_0,
),
<fidl::encoding::Array<u32, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u32_0,
),
<fidl::encoding::Array<u64, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u64_0,
),
<fidl::encoding::Array<f32, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.f32_0,
),
<fidl::encoding::Array<f64, 1> as fidl::encoding::ValueTypeMarker>::borrow(
&self.f64_0,
),
<fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.handle_0
),
<fidl::encoding::Array<bool, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.b_1,
),
<fidl::encoding::Array<i8, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i8_1,
),
<fidl::encoding::Array<i16, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i16_1,
),
<fidl::encoding::Array<i32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i32_1,
),
<fidl::encoding::Array<i64, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.i64_1,
),
<fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u8_1,
),
<fidl::encoding::Array<u16, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u16_1,
),
<fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u32_1,
),
<fidl::encoding::Array<u64, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.u64_1,
),
<fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.f32_1,
),
<fidl::encoding::Array<f64, 3> as fidl::encoding::ValueTypeMarker>::borrow(
&self.f64_1,
),
<fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.handle_1
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::Array<bool, 1>>,
T1: fidl::encoding::Encode<fidl::encoding::Array<i8, 1>>,
T2: fidl::encoding::Encode<fidl::encoding::Array<i16, 1>>,
T3: fidl::encoding::Encode<fidl::encoding::Array<i32, 1>>,
T4: fidl::encoding::Encode<fidl::encoding::Array<i64, 1>>,
T5: fidl::encoding::Encode<fidl::encoding::Array<u8, 1>>,
T6: fidl::encoding::Encode<fidl::encoding::Array<u16, 1>>,
T7: fidl::encoding::Encode<fidl::encoding::Array<u32, 1>>,
T8: fidl::encoding::Encode<fidl::encoding::Array<u64, 1>>,
T9: fidl::encoding::Encode<fidl::encoding::Array<f32, 1>>,
T10: fidl::encoding::Encode<fidl::encoding::Array<f64, 1>>,
T11: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
T12: fidl::encoding::Encode<fidl::encoding::Array<bool, 3>>,
T13: fidl::encoding::Encode<fidl::encoding::Array<i8, 3>>,
T14: fidl::encoding::Encode<fidl::encoding::Array<i16, 3>>,
T15: fidl::encoding::Encode<fidl::encoding::Array<i32, 3>>,
T16: fidl::encoding::Encode<fidl::encoding::Array<i64, 3>>,
T17: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>>,
T18: fidl::encoding::Encode<fidl::encoding::Array<u16, 3>>,
T19: fidl::encoding::Encode<fidl::encoding::Array<u32, 3>>,
T20: fidl::encoding::Encode<fidl::encoding::Array<u64, 3>>,
T21: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>>,
T22: fidl::encoding::Encode<fidl::encoding::Array<f64, 3>>,
T23: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
> fidl::encoding::Encode<Arrays>
for (
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Arrays>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(112);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(160);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(200);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 1, depth)?;
self.2.encode(encoder, offset + 2, depth)?;
self.3.encode(encoder, offset + 4, depth)?;
self.4.encode(encoder, offset + 8, depth)?;
self.5.encode(encoder, offset + 16, depth)?;
self.6.encode(encoder, offset + 18, depth)?;
self.7.encode(encoder, offset + 20, depth)?;
self.8.encode(encoder, offset + 24, depth)?;
self.9.encode(encoder, offset + 32, depth)?;
self.10.encode(encoder, offset + 40, depth)?;
self.11.encode(encoder, offset + 48, depth)?;
self.12.encode(encoder, offset + 52, depth)?;
self.13.encode(encoder, offset + 55, depth)?;
self.14.encode(encoder, offset + 58, depth)?;
self.15.encode(encoder, offset + 64, depth)?;
self.16.encode(encoder, offset + 80, depth)?;
self.17.encode(encoder, offset + 104, depth)?;
self.18.encode(encoder, offset + 108, depth)?;
self.19.encode(encoder, offset + 116, depth)?;
self.20.encode(encoder, offset + 128, depth)?;
self.21.encode(encoder, offset + 152, depth)?;
self.22.encode(encoder, offset + 168, depth)?;
self.23.encode(encoder, offset + 192, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Arrays {
#[inline(always)]
fn new_empty() -> Self {
Self {
b_0: fidl::new_empty!(fidl::encoding::Array<bool, 1>),
i8_0: fidl::new_empty!(fidl::encoding::Array<i8, 1>),
i16_0: fidl::new_empty!(fidl::encoding::Array<i16, 1>),
i32_0: fidl::new_empty!(fidl::encoding::Array<i32, 1>),
i64_0: fidl::new_empty!(fidl::encoding::Array<i64, 1>),
u8_0: fidl::new_empty!(fidl::encoding::Array<u8, 1>),
u16_0: fidl::new_empty!(fidl::encoding::Array<u16, 1>),
u32_0: fidl::new_empty!(fidl::encoding::Array<u32, 1>),
u64_0: fidl::new_empty!(fidl::encoding::Array<u64, 1>),
f32_0: fidl::new_empty!(fidl::encoding::Array<f32, 1>),
f64_0: fidl::new_empty!(fidl::encoding::Array<f64, 1>),
handle_0: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>
),
b_1: fidl::new_empty!(fidl::encoding::Array<bool, 3>),
i8_1: fidl::new_empty!(fidl::encoding::Array<i8, 3>),
i16_1: fidl::new_empty!(fidl::encoding::Array<i16, 3>),
i32_1: fidl::new_empty!(fidl::encoding::Array<i32, 3>),
i64_1: fidl::new_empty!(fidl::encoding::Array<i64, 3>),
u8_1: fidl::new_empty!(fidl::encoding::Array<u8, 3>),
u16_1: fidl::new_empty!(fidl::encoding::Array<u16, 3>),
u32_1: fidl::new_empty!(fidl::encoding::Array<u32, 3>),
u64_1: fidl::new_empty!(fidl::encoding::Array<u64, 3>),
f32_1: fidl::new_empty!(fidl::encoding::Array<f32, 3>),
f64_1: fidl::new_empty!(fidl::encoding::Array<f64, 3>),
handle_1: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(112) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffff0000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 112 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(160) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 160 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(200) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 200 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<bool, 1>, &mut self.b_0, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<i8, 1>, &mut self.i8_0, decoder, offset + 1, _depth)?;
fidl::decode!(fidl::encoding::Array<i16, 1>, &mut self.i16_0, decoder, offset + 2, _depth)?;
fidl::decode!(fidl::encoding::Array<i32, 1>, &mut self.i32_0, decoder, offset + 4, _depth)?;
fidl::decode!(fidl::encoding::Array<i64, 1>, &mut self.i64_0, decoder, offset + 8, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 1>, &mut self.u8_0, decoder, offset + 16, _depth)?;
fidl::decode!(fidl::encoding::Array<u16, 1>, &mut self.u16_0, decoder, offset + 18, _depth)?;
fidl::decode!(fidl::encoding::Array<u32, 1>, &mut self.u32_0, decoder, offset + 20, _depth)?;
fidl::decode!(fidl::encoding::Array<u64, 1>, &mut self.u64_0, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::Array<f32, 1>, &mut self.f32_0, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::Array<f64, 1>, &mut self.f64_0, decoder, offset + 40, _depth)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
&mut self.handle_0,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(fidl::encoding::Array<bool, 3>, &mut self.b_1, decoder, offset + 52, _depth)?;
fidl::decode!(fidl::encoding::Array<i8, 3>, &mut self.i8_1, decoder, offset + 55, _depth)?;
fidl::decode!(fidl::encoding::Array<i16, 3>, &mut self.i16_1, decoder, offset + 58, _depth)?;
fidl::decode!(fidl::encoding::Array<i32, 3>, &mut self.i32_1, decoder, offset + 64, _depth)?;
fidl::decode!(fidl::encoding::Array<i64, 3>, &mut self.i64_1, decoder, offset + 80, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 3>, &mut self.u8_1, decoder, offset + 104, _depth)?;
fidl::decode!(fidl::encoding::Array<u16, 3>, &mut self.u16_1, decoder, offset + 108, _depth)?;
fidl::decode!(fidl::encoding::Array<u32, 3>, &mut self.u32_1, decoder, offset + 116, _depth)?;
fidl::decode!(fidl::encoding::Array<u64, 3>, &mut self.u64_1, decoder, offset + 128, _depth)?;
fidl::decode!(fidl::encoding::Array<f32, 3>, &mut self.f32_1, decoder, offset + 152, _depth)?;
fidl::decode!(fidl::encoding::Array<f64, 3>, &mut self.f64_1, decoder, offset + 168, _depth)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
&mut self.handle_1,
decoder,
offset + 192,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Arrays2d {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
288
}
}
impl fidl::encoding::ResourceTypeMarker for Arrays2d {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Arrays2d> for &mut Arrays2d {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Arrays2d>(offset);
fidl::encoding::Encode::<Arrays2d>::encode(
(
<fidl::encoding::Array<fidl::encoding::Array<bool, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
<fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8),
<fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16),
<fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32),
<fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64),
<fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8),
<fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16),
<fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32),
<fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64),
<fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32),
<fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64),
<fidl::encoding::Array<fidl::encoding::Array<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 2>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_handle),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<bool, 2>, 3>>,
T1: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3>>,
T2: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3>>,
T3: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3>>,
T4: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3>>,
T5: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3>>,
T6: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3>>,
T7: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3>>,
T8: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3>>,
T9: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3>>,
T10: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3>>,
T11: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
>,
> fidl::encoding::Encode<Arrays2d> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Arrays2d>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(112);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(136);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
self.2.encode(encoder, offset + 12, depth)?;
self.3.encode(encoder, offset + 24, depth)?;
self.4.encode(encoder, offset + 48, depth)?;
self.5.encode(encoder, offset + 96, depth)?;
self.6.encode(encoder, offset + 102, depth)?;
self.7.encode(encoder, offset + 116, depth)?;
self.8.encode(encoder, offset + 144, depth)?;
self.9.encode(encoder, offset + 192, depth)?;
self.10.encode(encoder, offset + 216, depth)?;
self.11.encode(encoder, offset + 264, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Arrays2d {
#[inline(always)]
fn new_empty() -> Self {
Self {
b: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<bool, 2>, 3>),
i8: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3>),
i16: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3>),
i32: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3>),
i64: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3>),
u8: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3>),
u16: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3>),
u32: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3>),
u64: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3>),
f32: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3>),
f64: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3>),
handle_handle: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(112) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffff0000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 112 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(136) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 136 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<bool, 2>, 3>,
&mut self.b,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3>,
&mut self.i8,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3>,
&mut self.i16,
decoder,
offset + 12,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3>,
&mut self.i32,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3>,
&mut self.i64,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3>,
&mut self.u8,
decoder,
offset + 96,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3>,
&mut self.u16,
decoder,
offset + 102,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3>,
&mut self.u32,
decoder,
offset + 116,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3>,
&mut self.u64,
decoder,
offset + 144,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3>,
&mut self.f32,
decoder,
offset + 192,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3>,
&mut self.f64,
decoder,
offset + 216,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
&mut self.handle_handle,
decoder,
offset + 264,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for DefaultValues {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
72
}
}
impl fidl::encoding::ValueTypeMarker for DefaultValues {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<DefaultValues> for &DefaultValues {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DefaultValues>(offset);
fidl::encoding::Encode::<DefaultValues>::encode(
(
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b1),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b2),
<i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.i8),
<i16 as fidl::encoding::ValueTypeMarker>::borrow(&self.i16),
<i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.i32),
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.i64),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.u8),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.u16),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.u32),
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.u64),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f32),
<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f64),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.s,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<bool>,
T1: fidl::encoding::Encode<bool>,
T2: fidl::encoding::Encode<i8>,
T3: fidl::encoding::Encode<i16>,
T4: fidl::encoding::Encode<i32>,
T5: fidl::encoding::Encode<i64>,
T6: fidl::encoding::Encode<u8>,
T7: fidl::encoding::Encode<u16>,
T8: fidl::encoding::Encode<u32>,
T9: fidl::encoding::Encode<u64>,
T10: fidl::encoding::Encode<f32>,
T11: fidl::encoding::Encode<f64>,
T12: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<DefaultValues>
for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DefaultValues>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 1, depth)?;
self.2.encode(encoder, offset + 2, depth)?;
self.3.encode(encoder, offset + 4, depth)?;
self.4.encode(encoder, offset + 8, depth)?;
self.5.encode(encoder, offset + 16, depth)?;
self.6.encode(encoder, offset + 24, depth)?;
self.7.encode(encoder, offset + 26, depth)?;
self.8.encode(encoder, offset + 28, depth)?;
self.9.encode(encoder, offset + 32, depth)?;
self.10.encode(encoder, offset + 40, depth)?;
self.11.encode(encoder, offset + 48, depth)?;
self.12.encode(encoder, offset + 56, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for DefaultValues {
#[inline(always)]
fn new_empty() -> Self {
Self {
b1: fidl::new_empty!(bool),
b2: fidl::new_empty!(bool),
i8: fidl::new_empty!(i8),
i16: fidl::new_empty!(i16),
i32: fidl::new_empty!(i32),
i64: fidl::new_empty!(i64),
u8: fidl::new_empty!(u8),
u16: fidl::new_empty!(u16),
u32: fidl::new_empty!(u32),
u64: fidl::new_empty!(u64),
f32: fidl::new_empty!(f32),
f64: fidl::new_empty!(f64),
s: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffff0000ff000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(bool, &mut self.b1, decoder, offset + 0, _depth)?;
fidl::decode!(bool, &mut self.b2, decoder, offset + 1, _depth)?;
fidl::decode!(i8, &mut self.i8, decoder, offset + 2, _depth)?;
fidl::decode!(i16, &mut self.i16, decoder, offset + 4, _depth)?;
fidl::decode!(i32, &mut self.i32, decoder, offset + 8, _depth)?;
fidl::decode!(i64, &mut self.i64, decoder, offset + 16, _depth)?;
fidl::decode!(u8, &mut self.u8, decoder, offset + 24, _depth)?;
fidl::decode!(u16, &mut self.u16, decoder, offset + 26, _depth)?;
fidl::decode!(u32, &mut self.u32, decoder, offset + 28, _depth)?;
fidl::decode!(u64, &mut self.u64, decoder, offset + 32, _depth)?;
fidl::decode!(f32, &mut self.f32, decoder, offset + 40, _depth)?;
fidl::decode!(f64, &mut self.f64, decoder, offset + 48, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.s,
decoder,
offset + 56,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Handles {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
108
}
}
impl fidl::encoding::ResourceTypeMarker for Handles {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Handles> for &mut Handles {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Handles>(offset);
fidl::encoding::Encode::<Handles>::encode(
(
<fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.handle_handle,
),
<fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.process_handle,
),
<fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.thread_handle,
),
<fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.vmo_handle
),
<fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.event_handle,
),
<fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.port_handle
),
<fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.socket_handle,
),
<fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.eventpair_handle,
),
<fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.job_handle
),
<fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.vmar_handle
),
<fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.fifo_handle
),
<fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.timer_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_handle_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_process_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_thread_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_vmo_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_channel_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_event_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_port_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Interrupt,
{ fidl::ObjectType::INTERRUPT.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_interrupt_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::DebugLog,
{ fidl::ObjectType::DEBUGLOG.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_log_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_socket_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_eventpair_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_job_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_vmar_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_fifo_handle,
),
<fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.nullable_timer_handle,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
T1: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
>,
T2: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
>,
T3: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
>,
T4: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
>,
T5: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
>,
T6: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
>,
T7: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
>,
T8: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
>,
T9: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
>,
T10: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
>,
T11: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
>,
T12: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
>,
T13: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
>,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
>,
>,
T15: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
>,
>,
T16: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
>,
>,
T17: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
>,
>,
T18: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
>,
>,
T19: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Interrupt,
{ fidl::ObjectType::INTERRUPT.into_raw() },
2147483648,
>,
>,
>,
T20: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::DebugLog,
{ fidl::ObjectType::DEBUGLOG.into_raw() },
2147483648,
>,
>,
>,
T21: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
>,
>,
T22: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
>,
>,
T23: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
>,
>,
T24: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
>,
>,
T25: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
>,
>,
T26: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
>,
>,
> fidl::encoding::Encode<Handles>
for (
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
T24,
T25,
T26,
)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Handles>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
self.4.encode(encoder, offset + 16, depth)?;
self.5.encode(encoder, offset + 20, depth)?;
self.6.encode(encoder, offset + 24, depth)?;
self.7.encode(encoder, offset + 28, depth)?;
self.8.encode(encoder, offset + 32, depth)?;
self.9.encode(encoder, offset + 36, depth)?;
self.10.encode(encoder, offset + 40, depth)?;
self.11.encode(encoder, offset + 44, depth)?;
self.12.encode(encoder, offset + 48, depth)?;
self.13.encode(encoder, offset + 52, depth)?;
self.14.encode(encoder, offset + 56, depth)?;
self.15.encode(encoder, offset + 60, depth)?;
self.16.encode(encoder, offset + 64, depth)?;
self.17.encode(encoder, offset + 68, depth)?;
self.18.encode(encoder, offset + 72, depth)?;
self.19.encode(encoder, offset + 76, depth)?;
self.20.encode(encoder, offset + 80, depth)?;
self.21.encode(encoder, offset + 84, depth)?;
self.22.encode(encoder, offset + 88, depth)?;
self.23.encode(encoder, offset + 92, depth)?;
self.24.encode(encoder, offset + 96, depth)?;
self.25.encode(encoder, offset + 100, depth)?;
self.26.encode(encoder, offset + 104, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Handles {
#[inline(always)]
fn new_empty() -> Self {
Self {
handle_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>),
process_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>),
thread_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648>),
vmo_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>),
event_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>),
port_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Port, { fidl::ObjectType::PORT.into_raw() }, 2147483648>),
socket_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>),
eventpair_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>),
job_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648>),
vmar_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648>),
fifo_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Fifo, { fidl::ObjectType::FIFO.into_raw() }, 2147483648>),
timer_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Timer, { fidl::ObjectType::TIMER.into_raw() }, 2147483648>),
nullable_handle_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>
),
nullable_process_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
>
),
nullable_thread_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
>
),
nullable_vmo_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
>
),
nullable_channel_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
>
),
nullable_event_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
>
),
nullable_port_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
>
),
nullable_interrupt_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Interrupt,
{ fidl::ObjectType::INTERRUPT.into_raw() },
2147483648,
>,
>
),
nullable_log_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::DebugLog,
{ fidl::ObjectType::DEBUGLOG.into_raw() },
2147483648,
>,
>
),
nullable_socket_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
>
),
nullable_eventpair_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
>
),
nullable_job_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
>
),
nullable_vmar_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
>
),
nullable_fifo_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
>
),
nullable_timer_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, &mut self.handle_handle, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, &mut self.process_handle, decoder, offset + 4, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648>, &mut self.thread_handle, decoder, offset + 8, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, &mut self.vmo_handle, decoder, offset + 12, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, &mut self.event_handle, decoder, offset + 16, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Port, { fidl::ObjectType::PORT.into_raw() }, 2147483648>, &mut self.port_handle, decoder, offset + 20, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, &mut self.socket_handle, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, &mut self.eventpair_handle, decoder, offset + 28, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648>, &mut self.job_handle, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648>, &mut self.vmar_handle, decoder, offset + 36, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Fifo, { fidl::ObjectType::FIFO.into_raw() }, 2147483648>, &mut self.fifo_handle, decoder, offset + 40, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Timer, { fidl::ObjectType::TIMER.into_raw() }, 2147483648>, &mut self.timer_handle, decoder, offset + 44, _depth)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
&mut self.nullable_handle_handle,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
>,
&mut self.nullable_process_handle,
decoder,
offset + 52,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
>,
&mut self.nullable_thread_handle,
decoder,
offset + 56,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
>,
&mut self.nullable_vmo_handle,
decoder,
offset + 60,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
>,
&mut self.nullable_channel_handle,
decoder,
offset + 64,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
>,
&mut self.nullable_event_handle,
decoder,
offset + 68,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
>,
&mut self.nullable_port_handle,
decoder,
offset + 72,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Interrupt,
{ fidl::ObjectType::INTERRUPT.into_raw() },
2147483648,
>,
>,
&mut self.nullable_interrupt_handle,
decoder,
offset + 76,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::DebugLog,
{ fidl::ObjectType::DEBUGLOG.into_raw() },
2147483648,
>,
>,
&mut self.nullable_log_handle,
decoder,
offset + 80,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
>,
&mut self.nullable_socket_handle,
decoder,
offset + 84,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
>,
&mut self.nullable_eventpair_handle,
decoder,
offset + 88,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
>,
&mut self.nullable_job_handle,
decoder,
offset + 92,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
>,
&mut self.nullable_vmar_handle,
decoder,
offset + 96,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
>,
&mut self.nullable_fifo_handle,
decoder,
offset + 100,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
>,
&mut self.nullable_timer_handle,
decoder,
offset + 104,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for PrimitiveTypes {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
48
}
}
impl fidl::encoding::ValueTypeMarker for PrimitiveTypes {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<PrimitiveTypes> for &PrimitiveTypes {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PrimitiveTypes>(offset);
fidl::encoding::Encode::<PrimitiveTypes>::encode(
(
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
<i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.i8),
<i16 as fidl::encoding::ValueTypeMarker>::borrow(&self.i16),
<i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.i32),
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.i64),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.u8),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.u16),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.u32),
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.u64),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f32),
<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f64),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<bool>,
T1: fidl::encoding::Encode<i8>,
T2: fidl::encoding::Encode<i16>,
T3: fidl::encoding::Encode<i32>,
T4: fidl::encoding::Encode<i64>,
T5: fidl::encoding::Encode<u8>,
T6: fidl::encoding::Encode<u16>,
T7: fidl::encoding::Encode<u32>,
T8: fidl::encoding::Encode<u64>,
T9: fidl::encoding::Encode<f32>,
T10: fidl::encoding::Encode<f64>,
> fidl::encoding::Encode<PrimitiveTypes> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PrimitiveTypes>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 1, depth)?;
self.2.encode(encoder, offset + 2, depth)?;
self.3.encode(encoder, offset + 4, depth)?;
self.4.encode(encoder, offset + 8, depth)?;
self.5.encode(encoder, offset + 16, depth)?;
self.6.encode(encoder, offset + 18, depth)?;
self.7.encode(encoder, offset + 20, depth)?;
self.8.encode(encoder, offset + 24, depth)?;
self.9.encode(encoder, offset + 32, depth)?;
self.10.encode(encoder, offset + 40, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for PrimitiveTypes {
#[inline(always)]
fn new_empty() -> Self {
Self {
b: fidl::new_empty!(bool),
i8: fidl::new_empty!(i8),
i16: fidl::new_empty!(i16),
i32: fidl::new_empty!(i32),
i64: fidl::new_empty!(i64),
u8: fidl::new_empty!(u8),
u16: fidl::new_empty!(u16),
u32: fidl::new_empty!(u32),
u64: fidl::new_empty!(u64),
f32: fidl::new_empty!(f32),
f64: fidl::new_empty!(f64),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(bool, &mut self.b, decoder, offset + 0, _depth)?;
fidl::decode!(i8, &mut self.i8, decoder, offset + 1, _depth)?;
fidl::decode!(i16, &mut self.i16, decoder, offset + 2, _depth)?;
fidl::decode!(i32, &mut self.i32, decoder, offset + 4, _depth)?;
fidl::decode!(i64, &mut self.i64, decoder, offset + 8, _depth)?;
fidl::decode!(u8, &mut self.u8, decoder, offset + 16, _depth)?;
fidl::decode!(u16, &mut self.u16, decoder, offset + 18, _depth)?;
fidl::decode!(u32, &mut self.u32, decoder, offset + 20, _depth)?;
fidl::decode!(u64, &mut self.u64, decoder, offset + 24, _depth)?;
fidl::decode!(f32, &mut self.f32, decoder, offset + 32, _depth)?;
fidl::decode!(f64, &mut self.f64, decoder, offset + 40, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Strings {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
96
}
}
impl fidl::encoding::ValueTypeMarker for Strings {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Strings> for &Strings {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Strings>(offset);
fidl::encoding::Encode::<Strings>::encode(
(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
<fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_s),
<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(&self.size_0_s),
<fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(&self.size_1_s),
<fidl::encoding::Optional<fidl::encoding::BoundedString<2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_size_0_s),
<fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_size_1_s),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>>,
T2: fidl::encoding::Encode<fidl::encoding::BoundedString<2>>,
T3: fidl::encoding::Encode<fidl::encoding::BoundedString<32>>,
T4: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<2>>>,
T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>>,
> fidl::encoding::Encode<Strings> for (T0, T1, T2, T3, T4, T5)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Strings>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 32, depth)?;
self.3.encode(encoder, offset + 48, depth)?;
self.4.encode(encoder, offset + 64, depth)?;
self.5.encode(encoder, offset + 80, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Strings {
#[inline(always)]
fn new_empty() -> Self {
Self {
s: fidl::new_empty!(fidl::encoding::UnboundedString),
nullable_s: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::UnboundedString>
),
size_0_s: fidl::new_empty!(fidl::encoding::BoundedString<2>),
size_1_s: fidl::new_empty!(fidl::encoding::BoundedString<32>),
nullable_size_0_s: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::BoundedString<2>>
),
nullable_size_1_s: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::BoundedString<32>>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.s,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
&mut self.nullable_s,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::BoundedString<2>,
&mut self.size_0_s,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(
fidl::encoding::BoundedString<32>,
&mut self.size_1_s,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
&mut self.nullable_size_0_s,
decoder,
offset + 64,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
&mut self.nullable_size_1_s,
decoder,
offset + 80,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Structs {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ValueTypeMarker for Structs {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Structs> for &Structs {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Structs>(offset);
fidl::encoding::Encode::<Structs>::encode(
(
<ThisIsAStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
<fidl::encoding::Boxed<ThisIsAStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_s),
<ThisIsAnEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ThisIsAStruct>,
T1: fidl::encoding::Encode<fidl::encoding::Boxed<ThisIsAStruct>>,
T2: fidl::encoding::Encode<ThisIsAnEmptyStruct>,
> fidl::encoding::Encode<Structs> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Structs>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 24, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Structs {
#[inline(always)]
fn new_empty() -> Self {
Self {
s: fidl::new_empty!(ThisIsAStruct),
nullable_s: fidl::new_empty!(fidl::encoding::Boxed<ThisIsAStruct>),
es: fidl::new_empty!(ThisIsAnEmptyStruct),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffffff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(ThisIsAStruct, &mut self.s, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::Boxed<ThisIsAStruct>,
&mut self.nullable_s,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(ThisIsAnEmptyStruct, &mut self.es, decoder, offset + 24, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ThisIsAStruct {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAStruct {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ThisIsAStruct> for &ThisIsAStruct {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAStruct>(offset);
fidl::encoding::Encode::<ThisIsAStruct>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.s,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<ThisIsAStruct> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAStruct>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ThisIsAStruct {
#[inline(always)]
fn new_empty() -> Self {
Self { s: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.s,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ThisIsAnEmptyStruct {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAnEmptyStruct {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ThisIsAnEmptyStruct> for &ThisIsAnEmptyStruct {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAnEmptyStruct>(offset);
encoder.write_num(0u8, offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ThisIsAnEmptyStruct {
#[inline(always)]
fn new_empty() -> Self {
Self
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
match decoder.read_num::<u8>(offset) {
0 => Ok(()),
_ => Err(fidl::Error::Invalid),
}
}
}
unsafe impl fidl::encoding::TypeMarker for Unions {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ValueTypeMarker for Unions {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Unions> for &Unions {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Unions>(offset);
fidl::encoding::Encode::<Unions>::encode(
(
<ThisIsAUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
<fidl::encoding::OptionalUnion<ThisIsAUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ThisIsAUnion>,
T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<ThisIsAUnion>>,
> fidl::encoding::Encode<Unions> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Unions>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Unions {
#[inline(always)]
fn new_empty() -> Self {
Self {
u: fidl::new_empty!(ThisIsAUnion),
nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<ThisIsAUnion>),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ThisIsAUnion, &mut self.u, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::OptionalUnion<ThisIsAUnion>,
&mut self.nullable_u,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Vectors {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1920
}
}
impl fidl::encoding::ResourceTypeMarker for Vectors {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<Vectors> for &mut Vectors {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vectors>(offset);
fidl::encoding::Encode::<Vectors>::encode(
(
<fidl::encoding::UnboundedVector<bool> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_0),
<fidl::encoding::UnboundedVector<i8> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_0),
<fidl::encoding::UnboundedVector<i16> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_0),
<fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_0),
<fidl::encoding::UnboundedVector<i64> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_0),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_0),
<fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_0),
<fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_0),
<fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_0),
<fidl::encoding::UnboundedVector<f32> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_0),
<fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_0),
<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_0),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_1),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 2>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_1),
<fidl::encoding::Vector<bool, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_sized_0),
<fidl::encoding::Vector<i8, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_sized_0),
<fidl::encoding::Vector<i16, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_sized_0),
<fidl::encoding::Vector<i32, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_sized_0),
<fidl::encoding::Vector<i64, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_sized_0),
<fidl::encoding::Vector<u8, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_sized_0),
<fidl::encoding::Vector<u16, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_sized_0),
<fidl::encoding::Vector<u32, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_sized_0),
<fidl::encoding::Vector<u64, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_sized_0),
<fidl::encoding::Vector<f32, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_sized_0),
<fidl::encoding::Vector<f64, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_sized_0),
<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 1> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_sized_0),
<fidl::encoding::Vector<bool, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_sized_1),
<fidl::encoding::Vector<i8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_sized_1),
<fidl::encoding::Vector<i16, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_sized_1),
<fidl::encoding::Vector<i32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_sized_1),
<fidl::encoding::Vector<i64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_sized_1),
<fidl::encoding::Vector<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_sized_1),
<fidl::encoding::Vector<u16, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_sized_1),
<fidl::encoding::Vector<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_sized_1),
<fidl::encoding::Vector<u64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_sized_1),
<fidl::encoding::Vector<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_sized_1),
<fidl::encoding::Vector<f64, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_sized_1),
<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_sized_1),
<fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_sized_2),
<fidl::encoding::Vector<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 2>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_nullable_0),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 1>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_nullable_0),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_nullable_1),
<fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 2>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_nullable_1),
<fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 1>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_nullable_sized_0),
<fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_nullable_sized_1),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.b_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i8_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i16_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i32_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.i64_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u8_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u16_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u32_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.u64_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f32_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f64_nullable_sized_2),
<fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 2>, 3>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle_nullable_sized_2),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<bool>>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i8>>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i16>>,
T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>>,
T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i64>>,
T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>>,
T6: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>>,
T7: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>>,
T8: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>>,
T9: fidl::encoding::Encode<fidl::encoding::UnboundedVector<f32>>,
T10: fidl::encoding::Encode<fidl::encoding::UnboundedVector<f64>>,
T11: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
>,
T12: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>,
T13: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>>,
T14: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>>,
T15: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>>,
T16: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>>,
T17: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>>,
T18: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>>,
T19: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>>,
T20: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>>,
T21: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>>,
T22: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>>,
T23: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
>,
T24: fidl::encoding::Encode<fidl::encoding::Vector<bool, 1>>,
T25: fidl::encoding::Encode<fidl::encoding::Vector<i8, 1>>,
T26: fidl::encoding::Encode<fidl::encoding::Vector<i16, 1>>,
T27: fidl::encoding::Encode<fidl::encoding::Vector<i32, 1>>,
T28: fidl::encoding::Encode<fidl::encoding::Vector<i64, 1>>,
T29: fidl::encoding::Encode<fidl::encoding::Vector<u8, 1>>,
T30: fidl::encoding::Encode<fidl::encoding::Vector<u16, 1>>,
T31: fidl::encoding::Encode<fidl::encoding::Vector<u32, 1>>,
T32: fidl::encoding::Encode<fidl::encoding::Vector<u64, 1>>,
T33: fidl::encoding::Encode<fidl::encoding::Vector<f32, 1>>,
T34: fidl::encoding::Encode<fidl::encoding::Vector<f64, 1>>,
T35: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
T36: fidl::encoding::Encode<fidl::encoding::Vector<bool, 3>>,
T37: fidl::encoding::Encode<fidl::encoding::Vector<i8, 3>>,
T38: fidl::encoding::Encode<fidl::encoding::Vector<i16, 3>>,
T39: fidl::encoding::Encode<fidl::encoding::Vector<i32, 3>>,
T40: fidl::encoding::Encode<fidl::encoding::Vector<i64, 3>>,
T41: fidl::encoding::Encode<fidl::encoding::Vector<u8, 3>>,
T42: fidl::encoding::Encode<fidl::encoding::Vector<u16, 3>>,
T43: fidl::encoding::Encode<fidl::encoding::Vector<u32, 3>>,
T44: fidl::encoding::Encode<fidl::encoding::Vector<u64, 3>>,
T45: fidl::encoding::Encode<fidl::encoding::Vector<f32, 3>>,
T46: fidl::encoding::Encode<fidl::encoding::Vector<f64, 3>>,
T47: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
T48: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>>,
T49: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>>,
T50: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>>,
T51: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>>,
T52: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>>,
T53: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>>,
T54: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>>,
T55: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>>,
T56: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>>,
T57: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>>,
T58: fidl::encoding::Encode<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>>,
T59: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
>,
T60: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>>,
T61: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>>,
T62: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>>,
T63: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>>,
T64: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>>,
T65: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>>,
T66: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>>,
T67: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>>,
T68: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>>,
T69: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>>,
T70: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>>,
T71: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
>,
T72: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>,
>,
T73: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
>,
>,
T74: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
>,
>,
T75: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
>,
>,
T76: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
>,
>,
T77: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
>,
>,
T78: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
>,
>,
T79: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
>,
>,
T80: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
>,
>,
T81: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
>,
>,
T82: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
>,
>,
T83: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
>,
>,
T84: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>>,
T85: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>>,
T86: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>>,
T87: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>>,
T88: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>>,
T89: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>>,
T90: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>>,
T91: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>>,
T92: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>>,
T93: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>>,
T94: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>>,
T95: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
>,
T96: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>>>,
T97: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>>>,
T98: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>>>,
T99: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>>>,
T100: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>>>,
T101: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>>>,
T102: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>>>,
T103: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>>>,
T104: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>>>,
T105: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>>>,
T106: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>>>,
T107: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
>,
T108: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
>,
>,
T109: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>>,
>,
T110: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>>,
>,
T111: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>>,
>,
T112: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>>,
>,
T113: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>>,
>,
T114: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>>,
>,
T115: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>>,
>,
T116: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>>,
>,
T117: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>>,
>,
T118: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>>,
>,
T119: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
>,
>,
> fidl::encoding::Encode<Vectors>
for (
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
T24,
T25,
T26,
T27,
T28,
T29,
T30,
T31,
T32,
T33,
T34,
T35,
T36,
T37,
T38,
T39,
T40,
T41,
T42,
T43,
T44,
T45,
T46,
T47,
T48,
T49,
T50,
T51,
T52,
T53,
T54,
T55,
T56,
T57,
T58,
T59,
T60,
T61,
T62,
T63,
T64,
T65,
T66,
T67,
T68,
T69,
T70,
T71,
T72,
T73,
T74,
T75,
T76,
T77,
T78,
T79,
T80,
T81,
T82,
T83,
T84,
T85,
T86,
T87,
T88,
T89,
T90,
T91,
T92,
T93,
T94,
T95,
T96,
T97,
T98,
T99,
T100,
T101,
T102,
T103,
T104,
T105,
T106,
T107,
T108,
T109,
T110,
T111,
T112,
T113,
T114,
T115,
T116,
T117,
T118,
T119,
)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vectors>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 32, depth)?;
self.3.encode(encoder, offset + 48, depth)?;
self.4.encode(encoder, offset + 64, depth)?;
self.5.encode(encoder, offset + 80, depth)?;
self.6.encode(encoder, offset + 96, depth)?;
self.7.encode(encoder, offset + 112, depth)?;
self.8.encode(encoder, offset + 128, depth)?;
self.9.encode(encoder, offset + 144, depth)?;
self.10.encode(encoder, offset + 160, depth)?;
self.11.encode(encoder, offset + 176, depth)?;
self.12.encode(encoder, offset + 192, depth)?;
self.13.encode(encoder, offset + 208, depth)?;
self.14.encode(encoder, offset + 224, depth)?;
self.15.encode(encoder, offset + 240, depth)?;
self.16.encode(encoder, offset + 256, depth)?;
self.17.encode(encoder, offset + 272, depth)?;
self.18.encode(encoder, offset + 288, depth)?;
self.19.encode(encoder, offset + 304, depth)?;
self.20.encode(encoder, offset + 320, depth)?;
self.21.encode(encoder, offset + 336, depth)?;
self.22.encode(encoder, offset + 352, depth)?;
self.23.encode(encoder, offset + 368, depth)?;
self.24.encode(encoder, offset + 384, depth)?;
self.25.encode(encoder, offset + 400, depth)?;
self.26.encode(encoder, offset + 416, depth)?;
self.27.encode(encoder, offset + 432, depth)?;
self.28.encode(encoder, offset + 448, depth)?;
self.29.encode(encoder, offset + 464, depth)?;
self.30.encode(encoder, offset + 480, depth)?;
self.31.encode(encoder, offset + 496, depth)?;
self.32.encode(encoder, offset + 512, depth)?;
self.33.encode(encoder, offset + 528, depth)?;
self.34.encode(encoder, offset + 544, depth)?;
self.35.encode(encoder, offset + 560, depth)?;
self.36.encode(encoder, offset + 576, depth)?;
self.37.encode(encoder, offset + 592, depth)?;
self.38.encode(encoder, offset + 608, depth)?;
self.39.encode(encoder, offset + 624, depth)?;
self.40.encode(encoder, offset + 640, depth)?;
self.41.encode(encoder, offset + 656, depth)?;
self.42.encode(encoder, offset + 672, depth)?;
self.43.encode(encoder, offset + 688, depth)?;
self.44.encode(encoder, offset + 704, depth)?;
self.45.encode(encoder, offset + 720, depth)?;
self.46.encode(encoder, offset + 736, depth)?;
self.47.encode(encoder, offset + 752, depth)?;
self.48.encode(encoder, offset + 768, depth)?;
self.49.encode(encoder, offset + 784, depth)?;
self.50.encode(encoder, offset + 800, depth)?;
self.51.encode(encoder, offset + 816, depth)?;
self.52.encode(encoder, offset + 832, depth)?;
self.53.encode(encoder, offset + 848, depth)?;
self.54.encode(encoder, offset + 864, depth)?;
self.55.encode(encoder, offset + 880, depth)?;
self.56.encode(encoder, offset + 896, depth)?;
self.57.encode(encoder, offset + 912, depth)?;
self.58.encode(encoder, offset + 928, depth)?;
self.59.encode(encoder, offset + 944, depth)?;
self.60.encode(encoder, offset + 960, depth)?;
self.61.encode(encoder, offset + 976, depth)?;
self.62.encode(encoder, offset + 992, depth)?;
self.63.encode(encoder, offset + 1008, depth)?;
self.64.encode(encoder, offset + 1024, depth)?;
self.65.encode(encoder, offset + 1040, depth)?;
self.66.encode(encoder, offset + 1056, depth)?;
self.67.encode(encoder, offset + 1072, depth)?;
self.68.encode(encoder, offset + 1088, depth)?;
self.69.encode(encoder, offset + 1104, depth)?;
self.70.encode(encoder, offset + 1120, depth)?;
self.71.encode(encoder, offset + 1136, depth)?;
self.72.encode(encoder, offset + 1152, depth)?;
self.73.encode(encoder, offset + 1168, depth)?;
self.74.encode(encoder, offset + 1184, depth)?;
self.75.encode(encoder, offset + 1200, depth)?;
self.76.encode(encoder, offset + 1216, depth)?;
self.77.encode(encoder, offset + 1232, depth)?;
self.78.encode(encoder, offset + 1248, depth)?;
self.79.encode(encoder, offset + 1264, depth)?;
self.80.encode(encoder, offset + 1280, depth)?;
self.81.encode(encoder, offset + 1296, depth)?;
self.82.encode(encoder, offset + 1312, depth)?;
self.83.encode(encoder, offset + 1328, depth)?;
self.84.encode(encoder, offset + 1344, depth)?;
self.85.encode(encoder, offset + 1360, depth)?;
self.86.encode(encoder, offset + 1376, depth)?;
self.87.encode(encoder, offset + 1392, depth)?;
self.88.encode(encoder, offset + 1408, depth)?;
self.89.encode(encoder, offset + 1424, depth)?;
self.90.encode(encoder, offset + 1440, depth)?;
self.91.encode(encoder, offset + 1456, depth)?;
self.92.encode(encoder, offset + 1472, depth)?;
self.93.encode(encoder, offset + 1488, depth)?;
self.94.encode(encoder, offset + 1504, depth)?;
self.95.encode(encoder, offset + 1520, depth)?;
self.96.encode(encoder, offset + 1536, depth)?;
self.97.encode(encoder, offset + 1552, depth)?;
self.98.encode(encoder, offset + 1568, depth)?;
self.99.encode(encoder, offset + 1584, depth)?;
self.100.encode(encoder, offset + 1600, depth)?;
self.101.encode(encoder, offset + 1616, depth)?;
self.102.encode(encoder, offset + 1632, depth)?;
self.103.encode(encoder, offset + 1648, depth)?;
self.104.encode(encoder, offset + 1664, depth)?;
self.105.encode(encoder, offset + 1680, depth)?;
self.106.encode(encoder, offset + 1696, depth)?;
self.107.encode(encoder, offset + 1712, depth)?;
self.108.encode(encoder, offset + 1728, depth)?;
self.109.encode(encoder, offset + 1744, depth)?;
self.110.encode(encoder, offset + 1760, depth)?;
self.111.encode(encoder, offset + 1776, depth)?;
self.112.encode(encoder, offset + 1792, depth)?;
self.113.encode(encoder, offset + 1808, depth)?;
self.114.encode(encoder, offset + 1824, depth)?;
self.115.encode(encoder, offset + 1840, depth)?;
self.116.encode(encoder, offset + 1856, depth)?;
self.117.encode(encoder, offset + 1872, depth)?;
self.118.encode(encoder, offset + 1888, depth)?;
self.119.encode(encoder, offset + 1904, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for Vectors {
#[inline(always)]
fn new_empty() -> Self {
Self {
b_0: fidl::new_empty!(fidl::encoding::UnboundedVector<bool>),
i8_0: fidl::new_empty!(fidl::encoding::UnboundedVector<i8>),
i16_0: fidl::new_empty!(fidl::encoding::UnboundedVector<i16>),
i32_0: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>),
i64_0: fidl::new_empty!(fidl::encoding::UnboundedVector<i64>),
u8_0: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>),
u16_0: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>),
u32_0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>),
u64_0: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>),
f32_0: fidl::new_empty!(fidl::encoding::UnboundedVector<f32>),
f64_0: fidl::new_empty!(fidl::encoding::UnboundedVector<f64>),
handle_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>
),
b_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>
),
i8_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>
),
i16_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>
),
i32_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>
),
i64_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>
),
u8_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>
),
u16_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>
),
u32_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>
),
u64_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>
),
f32_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>
),
f64_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>
),
handle_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>
),
b_sized_0: fidl::new_empty!(fidl::encoding::Vector<bool, 1>),
i8_sized_0: fidl::new_empty!(fidl::encoding::Vector<i8, 1>),
i16_sized_0: fidl::new_empty!(fidl::encoding::Vector<i16, 1>),
i32_sized_0: fidl::new_empty!(fidl::encoding::Vector<i32, 1>),
i64_sized_0: fidl::new_empty!(fidl::encoding::Vector<i64, 1>),
u8_sized_0: fidl::new_empty!(fidl::encoding::Vector<u8, 1>),
u16_sized_0: fidl::new_empty!(fidl::encoding::Vector<u16, 1>),
u32_sized_0: fidl::new_empty!(fidl::encoding::Vector<u32, 1>),
u64_sized_0: fidl::new_empty!(fidl::encoding::Vector<u64, 1>),
f32_sized_0: fidl::new_empty!(fidl::encoding::Vector<f32, 1>),
f64_sized_0: fidl::new_empty!(fidl::encoding::Vector<f64, 1>),
handle_sized_0: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>
),
b_sized_1: fidl::new_empty!(fidl::encoding::Vector<bool, 3>),
i8_sized_1: fidl::new_empty!(fidl::encoding::Vector<i8, 3>),
i16_sized_1: fidl::new_empty!(fidl::encoding::Vector<i16, 3>),
i32_sized_1: fidl::new_empty!(fidl::encoding::Vector<i32, 3>),
i64_sized_1: fidl::new_empty!(fidl::encoding::Vector<i64, 3>),
u8_sized_1: fidl::new_empty!(fidl::encoding::Vector<u8, 3>),
u16_sized_1: fidl::new_empty!(fidl::encoding::Vector<u16, 3>),
u32_sized_1: fidl::new_empty!(fidl::encoding::Vector<u32, 3>),
u64_sized_1: fidl::new_empty!(fidl::encoding::Vector<u64, 3>),
f32_sized_1: fidl::new_empty!(fidl::encoding::Vector<f32, 3>),
f64_sized_1: fidl::new_empty!(fidl::encoding::Vector<f64, 3>),
handle_sized_1: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>
),
b_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>
),
i8_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>
),
i16_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>
),
i32_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>
),
i64_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>
),
u8_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>
),
u16_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>
),
u32_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>
),
u64_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>
),
f32_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>
),
f64_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>
),
handle_sized_2: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>
),
b_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>
),
i8_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>
),
i16_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>
),
i32_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>
),
i64_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>
),
u8_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>
),
u16_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>
),
u32_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>
),
u64_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>
),
f32_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>
),
f64_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>
),
handle_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>
),
b_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>
),
i8_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
>
),
i16_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
>
),
i32_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
>
),
i64_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
>
),
u8_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
>
),
u16_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
>
),
u32_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
>
),
u64_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
>
),
f32_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
>
),
f64_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
>
),
handle_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
>
),
b_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>
),
i8_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>
),
i16_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>
),
i32_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>
),
i64_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>
),
u8_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>
),
u16_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>
),
u32_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>
),
u64_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>
),
f32_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>
),
f64_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>
),
handle_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>
),
b_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>>
),
i8_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>>
),
i16_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>>
),
i32_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>>
),
i64_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>>
),
u8_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>>
),
u16_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>>
),
u32_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>>
),
u64_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>>
),
f32_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>>
),
f64_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>>
),
handle_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>
),
b_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
>
),
i8_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>,
>
),
i16_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>,
>
),
i32_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>,
>
),
i64_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>,
>
),
u8_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>,
>
),
u16_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>,
>
),
u32_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>,
>
),
u64_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>,
>
),
f32_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>,
>
),
f64_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>,
>
),
handle_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<bool>,
&mut self.b_0,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i8>,
&mut self.i8_0,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i16>,
&mut self.i16_0,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i32>,
&mut self.i32_0,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i64>,
&mut self.i64_0,
decoder,
offset + 64,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
&mut self.u8_0,
decoder,
offset + 80,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u16>,
&mut self.u16_0,
decoder,
offset + 96,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u32>,
&mut self.u32_0,
decoder,
offset + 112,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u64>,
&mut self.u64_0,
decoder,
offset + 128,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<f32>,
&mut self.f32_0,
decoder,
offset + 144,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<f64>,
&mut self.f64_0,
decoder,
offset + 160,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
&mut self.handle_0,
decoder,
offset + 176,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
&mut self.b_1,
decoder,
offset + 192,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
&mut self.i8_1,
decoder,
offset + 208,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
&mut self.i16_1,
decoder,
offset + 224,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
&mut self.i32_1,
decoder,
offset + 240,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
&mut self.i64_1,
decoder,
offset + 256,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
&mut self.u8_1,
decoder,
offset + 272,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
&mut self.u16_1,
decoder,
offset + 288,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
&mut self.u32_1,
decoder,
offset + 304,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
&mut self.u64_1,
decoder,
offset + 320,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
&mut self.f32_1,
decoder,
offset + 336,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
&mut self.f64_1,
decoder,
offset + 352,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
&mut self.handle_1,
decoder,
offset + 368,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<bool, 1>, &mut self.b_sized_0, decoder, offset + 384, _depth)?;
fidl::decode!(fidl::encoding::Vector<i8, 1>, &mut self.i8_sized_0, decoder, offset + 400, _depth)?;
fidl::decode!(fidl::encoding::Vector<i16, 1>, &mut self.i16_sized_0, decoder, offset + 416, _depth)?;
fidl::decode!(fidl::encoding::Vector<i32, 1>, &mut self.i32_sized_0, decoder, offset + 432, _depth)?;
fidl::decode!(fidl::encoding::Vector<i64, 1>, &mut self.i64_sized_0, decoder, offset + 448, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 1>, &mut self.u8_sized_0, decoder, offset + 464, _depth)?;
fidl::decode!(fidl::encoding::Vector<u16, 1>, &mut self.u16_sized_0, decoder, offset + 480, _depth)?;
fidl::decode!(fidl::encoding::Vector<u32, 1>, &mut self.u32_sized_0, decoder, offset + 496, _depth)?;
fidl::decode!(fidl::encoding::Vector<u64, 1>, &mut self.u64_sized_0, decoder, offset + 512, _depth)?;
fidl::decode!(fidl::encoding::Vector<f32, 1>, &mut self.f32_sized_0, decoder, offset + 528, _depth)?;
fidl::decode!(fidl::encoding::Vector<f64, 1>, &mut self.f64_sized_0, decoder, offset + 544, _depth)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
&mut self.handle_sized_0,
decoder,
offset + 560,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<bool, 3>, &mut self.b_sized_1, decoder, offset + 576, _depth)?;
fidl::decode!(fidl::encoding::Vector<i8, 3>, &mut self.i8_sized_1, decoder, offset + 592, _depth)?;
fidl::decode!(fidl::encoding::Vector<i16, 3>, &mut self.i16_sized_1, decoder, offset + 608, _depth)?;
fidl::decode!(fidl::encoding::Vector<i32, 3>, &mut self.i32_sized_1, decoder, offset + 624, _depth)?;
fidl::decode!(fidl::encoding::Vector<i64, 3>, &mut self.i64_sized_1, decoder, offset + 640, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 3>, &mut self.u8_sized_1, decoder, offset + 656, _depth)?;
fidl::decode!(fidl::encoding::Vector<u16, 3>, &mut self.u16_sized_1, decoder, offset + 672, _depth)?;
fidl::decode!(fidl::encoding::Vector<u32, 3>, &mut self.u32_sized_1, decoder, offset + 688, _depth)?;
fidl::decode!(fidl::encoding::Vector<u64, 3>, &mut self.u64_sized_1, decoder, offset + 704, _depth)?;
fidl::decode!(fidl::encoding::Vector<f32, 3>, &mut self.f32_sized_1, decoder, offset + 720, _depth)?;
fidl::decode!(fidl::encoding::Vector<f64, 3>, &mut self.f64_sized_1, decoder, offset + 736, _depth)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
&mut self.handle_sized_1,
decoder,
offset + 752,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
&mut self.b_sized_2,
decoder,
offset + 768,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>,
&mut self.i8_sized_2,
decoder,
offset + 784,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>,
&mut self.i16_sized_2,
decoder,
offset + 800,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>,
&mut self.i32_sized_2,
decoder,
offset + 816,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>,
&mut self.i64_sized_2,
decoder,
offset + 832,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>,
&mut self.u8_sized_2,
decoder,
offset + 848,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>,
&mut self.u16_sized_2,
decoder,
offset + 864,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>,
&mut self.u32_sized_2,
decoder,
offset + 880,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>,
&mut self.u64_sized_2,
decoder,
offset + 896,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>,
&mut self.f32_sized_2,
decoder,
offset + 912,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>,
&mut self.f64_sized_2,
decoder,
offset + 928,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
&mut self.handle_sized_2,
decoder,
offset + 944,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
&mut self.b_nullable_0,
decoder,
offset + 960,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
&mut self.i8_nullable_0,
decoder,
offset + 976,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
&mut self.i16_nullable_0,
decoder,
offset + 992,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
&mut self.i32_nullable_0,
decoder,
offset + 1008,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
&mut self.i64_nullable_0,
decoder,
offset + 1024,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
&mut self.u8_nullable_0,
decoder,
offset + 1040,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
&mut self.u16_nullable_0,
decoder,
offset + 1056,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
&mut self.u32_nullable_0,
decoder,
offset + 1072,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
&mut self.u64_nullable_0,
decoder,
offset + 1088,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
&mut self.f32_nullable_0,
decoder,
offset + 1104,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
&mut self.f64_nullable_0,
decoder,
offset + 1120,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
&mut self.handle_nullable_0,
decoder,
offset + 1136,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>,
&mut self.b_nullable_1,
decoder,
offset + 1152,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
>,
&mut self.i8_nullable_1,
decoder,
offset + 1168,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
>,
&mut self.i16_nullable_1,
decoder,
offset + 1184,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
>,
&mut self.i32_nullable_1,
decoder,
offset + 1200,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
>,
&mut self.i64_nullable_1,
decoder,
offset + 1216,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
>,
&mut self.u8_nullable_1,
decoder,
offset + 1232,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
>,
&mut self.u16_nullable_1,
decoder,
offset + 1248,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
>,
&mut self.u32_nullable_1,
decoder,
offset + 1264,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
>,
&mut self.u64_nullable_1,
decoder,
offset + 1280,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
>,
&mut self.f32_nullable_1,
decoder,
offset + 1296,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
>,
&mut self.f64_nullable_1,
decoder,
offset + 1312,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
>,
&mut self.handle_nullable_1,
decoder,
offset + 1328,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
&mut self.b_nullable_sized_0,
decoder,
offset + 1344,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
&mut self.i8_nullable_sized_0,
decoder,
offset + 1360,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
&mut self.i16_nullable_sized_0,
decoder,
offset + 1376,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
&mut self.i32_nullable_sized_0,
decoder,
offset + 1392,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
&mut self.i64_nullable_sized_0,
decoder,
offset + 1408,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
&mut self.u8_nullable_sized_0,
decoder,
offset + 1424,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
&mut self.u16_nullable_sized_0,
decoder,
offset + 1440,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
&mut self.u32_nullable_sized_0,
decoder,
offset + 1456,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
&mut self.u64_nullable_sized_0,
decoder,
offset + 1472,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
&mut self.f32_nullable_sized_0,
decoder,
offset + 1488,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
&mut self.f64_nullable_sized_0,
decoder,
offset + 1504,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
&mut self.handle_nullable_sized_0,
decoder,
offset + 1520,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>>,
&mut self.b_nullable_sized_1,
decoder,
offset + 1536,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>>,
&mut self.i8_nullable_sized_1,
decoder,
offset + 1552,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>>,
&mut self.i16_nullable_sized_1,
decoder,
offset + 1568,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>>,
&mut self.i32_nullable_sized_1,
decoder,
offset + 1584,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>>,
&mut self.i64_nullable_sized_1,
decoder,
offset + 1600,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>>,
&mut self.u8_nullable_sized_1,
decoder,
offset + 1616,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>>,
&mut self.u16_nullable_sized_1,
decoder,
offset + 1632,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>>,
&mut self.u32_nullable_sized_1,
decoder,
offset + 1648,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>>,
&mut self.u64_nullable_sized_1,
decoder,
offset + 1664,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>>,
&mut self.f32_nullable_sized_1,
decoder,
offset + 1680,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>>,
&mut self.f64_nullable_sized_1,
decoder,
offset + 1696,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
&mut self.handle_nullable_sized_1,
decoder,
offset + 1712,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
>,
&mut self.b_nullable_sized_2,
decoder,
offset + 1728,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>>,
&mut self.i8_nullable_sized_2,
decoder,
offset + 1744,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>>,
&mut self.i16_nullable_sized_2,
decoder,
offset + 1760,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>>,
&mut self.i32_nullable_sized_2,
decoder,
offset + 1776,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>>,
&mut self.i64_nullable_sized_2,
decoder,
offset + 1792,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>>,
&mut self.u8_nullable_sized_2,
decoder,
offset + 1808,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>>,
&mut self.u16_nullable_sized_2,
decoder,
offset + 1824,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>>,
&mut self.u32_nullable_sized_2,
decoder,
offset + 1840,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>>,
&mut self.u64_nullable_sized_2,
decoder,
offset + 1856,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>>,
&mut self.f32_nullable_sized_2,
decoder,
offset + 1872,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>>,
&mut self.f64_nullable_sized_2,
decoder,
offset + 1888,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
>,
&mut self.handle_nullable_sized_2,
decoder,
offset + 1904,
_depth
)?;
Ok(())
}
}
impl AllTypesTable {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.xunion_member {
return 21;
}
if let Some(_) = self.table_member {
return 20;
}
if let Some(_) = self.vector_member {
return 19;
}
if let Some(_) = self.array_member {
return 18;
}
if let Some(_) = self.union_member {
return 17;
}
if let Some(_) = self.struct_member {
return 16;
}
if let Some(_) = self.string_member {
return 15;
}
if let Some(_) = self.handle_member {
return 14;
}
if let Some(_) = self.bits_member {
return 13;
}
if let Some(_) = self.enum_member {
return 12;
}
if let Some(_) = self.float64_member {
return 11;
}
if let Some(_) = self.float32_member {
return 10;
}
if let Some(_) = self.uint64_member {
return 9;
}
if let Some(_) = self.uint32_member {
return 8;
}
if let Some(_) = self.uint16_member {
return 7;
}
if let Some(_) = self.uint8_member {
return 6;
}
if let Some(_) = self.int64_member {
return 5;
}
if let Some(_) = self.int32_member {
return 4;
}
if let Some(_) = self.int16_member {
return 3;
}
if let Some(_) = self.int8_member {
return 2;
}
if let Some(_) = self.bool_member {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for AllTypesTable {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ResourceTypeMarker for AllTypesTable {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<AllTypesTable> for &mut AllTypesTable {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<AllTypesTable>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<bool>(
self.bool_member.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i8>(
self.int8_member.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 3 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (3 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i16>(
self.int16_member.as_ref().map(<i16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 4 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (4 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i32>(
self.int32_member.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 5 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (5 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i64>(
self.int64_member.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 6 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (6 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u8>(
self.uint8_member.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 7 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (7 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u16>(
self.uint16_member.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 8 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (8 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u32>(
self.uint32_member.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 9 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (9 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u64>(
self.uint64_member.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 10 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (10 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<f32>(
self.float32_member.as_ref().map(<f32 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 11 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (11 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<f64>(
self.float64_member.as_ref().map(<f64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 12 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (12 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<DefaultEnum>(
self.enum_member
.as_ref()
.map(<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 13 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (13 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<DefaultBits>(
self.bits_member
.as_ref()
.map(<DefaultBits as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 14 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (14 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>(
self.handle_member.as_mut().map(
<fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 15 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (15 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString>(
self.string_member.as_ref().map(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 16 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (16 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<ThisIsAStruct>(
self.struct_member
.as_ref()
.map(<ThisIsAStruct as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 17 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (17 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<ThisIsAUnion>(
self.union_member
.as_ref()
.map(<ThisIsAUnion as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 18 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (18 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u32, 3>>(
self.array_member.as_ref().map(
<fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 19 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (19 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u32>>(
self.vector_member.as_ref().map(<fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
if 20 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (20 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<ThisIsATable>(
self.table_member
.as_ref()
.map(<ThisIsATable as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 21 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (21 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<ThisIsAXunion>(
self.xunion_member
.as_ref()
.map(<ThisIsAXunion as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for AllTypesTable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.bool_member.get_or_insert_with(|| fidl::new_empty!(bool));
fidl::decode!(bool, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.int8_member.get_or_insert_with(|| fidl::new_empty!(i8));
fidl::decode!(i8, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 3 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.int16_member.get_or_insert_with(|| fidl::new_empty!(i16));
fidl::decode!(i16, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 4 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.int32_member.get_or_insert_with(|| fidl::new_empty!(i32));
fidl::decode!(i32, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 5 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.int64_member.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 6 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.uint8_member.get_or_insert_with(|| fidl::new_empty!(u8));
fidl::decode!(u8, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 7 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.uint16_member.get_or_insert_with(|| fidl::new_empty!(u16));
fidl::decode!(u16, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 8 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.uint32_member.get_or_insert_with(|| fidl::new_empty!(u32));
fidl::decode!(u32, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 9 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.uint64_member.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 10 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<f32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.float32_member.get_or_insert_with(|| fidl::new_empty!(f32));
fidl::decode!(f32, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 11 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<f64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.float64_member.get_or_insert_with(|| fidl::new_empty!(f64));
fidl::decode!(f64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 12 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<DefaultEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.enum_member.get_or_insert_with(|| fidl::new_empty!(DefaultEnum));
fidl::decode!(DefaultEnum, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 13 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<DefaultBits as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.bits_member.get_or_insert_with(|| fidl::new_empty!(DefaultBits));
fidl::decode!(DefaultBits, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 14 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size = <fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
> as fidl::encoding::TypeMarker>::inline_size(
decoder.context
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.handle_member.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>));
fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 15 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.string_member
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString));
fidl::decode!(
fidl::encoding::UnboundedString,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 16 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<ThisIsAStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.struct_member.get_or_insert_with(|| fidl::new_empty!(ThisIsAStruct));
fidl::decode!(ThisIsAStruct, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 17 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<ThisIsAUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.union_member.get_or_insert_with(|| fidl::new_empty!(ThisIsAUnion));
fidl::decode!(ThisIsAUnion, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 18 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::Array<u32, 3> as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.array_member
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u32, 3>));
fidl::decode!(fidl::encoding::Array<u32, 3>, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 19 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size = <fidl::encoding::UnboundedVector<u32> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.vector_member
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedVector<u32>));
fidl::decode!(
fidl::encoding::UnboundedVector<u32>,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 20 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<ThisIsATable as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.table_member.get_or_insert_with(|| fidl::new_empty!(ThisIsATable));
fidl::decode!(ThisIsATable, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 21 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<ThisIsAXunion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.xunion_member.get_or_insert_with(|| fidl::new_empty!(ThisIsAXunion));
fidl::decode!(ThisIsAXunion, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl EchoEchoTablePayloadWithErrorRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.result_variant {
return 4;
}
if let Some(_) = self.result_err {
return 3;
}
if let Some(_) = self.forward_to_server {
return 2;
}
if let Some(_) = self.value {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoTablePayloadWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoTablePayloadWithErrorRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoTablePayloadWithErrorRequest>
for &EchoEchoTablePayloadWithErrorRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTablePayloadWithErrorRequest>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u64>(
self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString>(
self.forward_to_server.as_ref().map(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 3 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (3 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<DefaultEnum>(
self.result_err
.as_ref()
.map(<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 4 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (4 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<RespondWith>(
self.result_variant
.as_ref()
.map(<RespondWith as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for EchoEchoTablePayloadWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.forward_to_server
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString));
fidl::decode!(
fidl::encoding::UnboundedString,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 3 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<DefaultEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.result_err.get_or_insert_with(|| fidl::new_empty!(DefaultEnum));
fidl::decode!(DefaultEnum, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 4 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<RespondWith as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.result_variant.get_or_insert_with(|| fidl::new_empty!(RespondWith));
fidl::decode!(RespondWith, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl RequestTable {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.forward_to_server {
return 2;
}
if let Some(_) = self.value {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for RequestTable {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for RequestTable {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<RequestTable> for &RequestTable {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RequestTable>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u64>(
self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString>(
self.forward_to_server.as_ref().map(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for RequestTable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.forward_to_server
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString));
fidl::decode!(
fidl::encoding::UnboundedString,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl ResponseTable {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.value {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for ResponseTable {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ResponseTable {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ResponseTable> for &ResponseTable {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ResponseTable>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u64>(
self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ResponseTable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl ThisIsATable {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.s {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for ThisIsATable {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsATable {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ThisIsATable> for &ThisIsATable {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsATable>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString>(
self.s.as_ref().map(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ThisIsATable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.s.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString));
fidl::decode!(
fidl::encoding::UnboundedString,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for AllTypesXunion {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ResourceTypeMarker for AllTypesXunion {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<AllTypesXunion> for &mut AllTypesXunion {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<AllTypesXunion>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
AllTypesXunion::BoolMember(ref val) => {
fidl::encoding::encode_in_envelope::<bool>(
<bool as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int8Member(ref val) => {
fidl::encoding::encode_in_envelope::<i8>(
<i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int16Member(ref val) => {
fidl::encoding::encode_in_envelope::<i16>(
<i16 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int32Member(ref val) => {
fidl::encoding::encode_in_envelope::<i32>(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int64Member(ref val) => {
fidl::encoding::encode_in_envelope::<i64>(
<i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint8Member(ref val) => {
fidl::encoding::encode_in_envelope::<u8>(
<u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint16Member(ref val) => {
fidl::encoding::encode_in_envelope::<u16>(
<u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint32Member(ref val) => {
fidl::encoding::encode_in_envelope::<u32>(
<u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint64Member(ref val) => {
fidl::encoding::encode_in_envelope::<u64>(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Float32Member(ref val) => {
fidl::encoding::encode_in_envelope::<f32>(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Float64Member(ref val) => {
fidl::encoding::encode_in_envelope::<f64>(
<f64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::EnumMember(ref val) => {
fidl::encoding::encode_in_envelope::<DefaultEnum>(
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::BitsMember(ref val) => {
fidl::encoding::encode_in_envelope::<DefaultBits>(
<DefaultBits as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::HandleMember(ref mut val) => {
fidl::encoding::encode_in_envelope::<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>(
<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::StringMember(ref val) => {
fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString>(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::StructMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsAStruct>(
<ThisIsAStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::UnionMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsAUnion>(
<ThisIsAUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::ArrayMember(ref val) => {
fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u32, 3>>(
<fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::VectorMember(ref val) => {
fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u32>>(
<fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::TableMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsATable>(
<ThisIsATable as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::XunionMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsAXunion>(
<ThisIsAXunion as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl fidl::encoding::Decode<Self> for AllTypesXunion {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3 => <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10 => <f32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
11 => <f64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12 => <DefaultEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13 => <DefaultBits as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14 => <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16 => <ThisIsAStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17 => <ThisIsAUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18 => <fidl::encoding::Array<u32, 3> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19 => <fidl::encoding::UnboundedVector<u32> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20 => <ThisIsATable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
21 => <ThisIsAXunion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
0 => return Err(fidl::Error::UnknownUnionTag),
_ => num_bytes as usize,
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::BoolMember(_) = self {
} else {
*self = AllTypesXunion::BoolMember(fidl::new_empty!(bool));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::BoolMember(ref mut val) = self {
fidl::decode!(bool, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int8Member(_) = self {
} else {
*self = AllTypesXunion::Int8Member(fidl::new_empty!(i8));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int8Member(ref mut val) = self {
fidl::decode!(i8, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
3 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int16Member(_) = self {
} else {
*self = AllTypesXunion::Int16Member(fidl::new_empty!(i16));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int16Member(ref mut val) = self {
fidl::decode!(i16, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
4 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int32Member(_) = self {
} else {
*self = AllTypesXunion::Int32Member(fidl::new_empty!(i32));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int32Member(ref mut val) = self {
fidl::decode!(i32, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
5 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int64Member(_) = self {
} else {
*self = AllTypesXunion::Int64Member(fidl::new_empty!(i64));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int64Member(ref mut val) = self {
fidl::decode!(i64, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
6 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint8Member(_) = self {
} else {
*self = AllTypesXunion::Uint8Member(fidl::new_empty!(u8));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint8Member(ref mut val) = self {
fidl::decode!(u8, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
7 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint16Member(_) = self {
} else {
*self = AllTypesXunion::Uint16Member(fidl::new_empty!(u16));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint16Member(ref mut val) = self {
fidl::decode!(u16, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
8 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint32Member(_) = self {
} else {
*self = AllTypesXunion::Uint32Member(fidl::new_empty!(u32));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint32Member(ref mut val) = self {
fidl::decode!(u32, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
9 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint64Member(_) = self {
} else {
*self = AllTypesXunion::Uint64Member(fidl::new_empty!(u64));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint64Member(ref mut val) = self {
fidl::decode!(u64, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
10 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Float32Member(_) = self {
} else {
*self = AllTypesXunion::Float32Member(fidl::new_empty!(f32));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Float32Member(ref mut val) = self {
fidl::decode!(f32, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
11 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Float64Member(_) = self {
} else {
*self = AllTypesXunion::Float64Member(fidl::new_empty!(f64));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Float64Member(ref mut val) = self {
fidl::decode!(f64, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
12 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::EnumMember(_) = self {
} else {
*self = AllTypesXunion::EnumMember(fidl::new_empty!(DefaultEnum));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::EnumMember(ref mut val) = self {
fidl::decode!(DefaultEnum, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
13 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::BitsMember(_) = self {
} else {
*self = AllTypesXunion::BitsMember(fidl::new_empty!(DefaultBits));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::BitsMember(ref mut val) = self {
fidl::decode!(DefaultBits, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
14 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::HandleMember(_) = self {
} else {
*self = AllTypesXunion::HandleMember(
fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>),
);
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::HandleMember(ref mut val) = self {
fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
15 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::StringMember(_) = self {
} else {
*self = AllTypesXunion::StringMember(fidl::new_empty!(
fidl::encoding::UnboundedString
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::StringMember(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedString,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
16 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::StructMember(_) = self {
} else {
*self = AllTypesXunion::StructMember(fidl::new_empty!(ThisIsAStruct));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::StructMember(ref mut val) = self {
fidl::decode!(ThisIsAStruct, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
17 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::UnionMember(_) = self {
} else {
*self = AllTypesXunion::UnionMember(fidl::new_empty!(ThisIsAUnion));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::UnionMember(ref mut val) = self {
fidl::decode!(ThisIsAUnion, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
18 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::ArrayMember(_) = self {
} else {
*self = AllTypesXunion::ArrayMember(
fidl::new_empty!(fidl::encoding::Array<u32, 3>),
);
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::ArrayMember(ref mut val) = self {
fidl::decode!(fidl::encoding::Array<u32, 3>, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
19 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::VectorMember(_) = self {
} else {
*self = AllTypesXunion::VectorMember(fidl::new_empty!(
fidl::encoding::UnboundedVector<u32>
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::VectorMember(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedVector<u32>,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
20 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::TableMember(_) = self {
} else {
*self = AllTypesXunion::TableMember(fidl::new_empty!(ThisIsATable));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::TableMember(ref mut val) = self {
fidl::decode!(ThisIsATable, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
21 => {
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::XunionMember(_) = self {
} else {
*self = AllTypesXunion::XunionMember(fidl::new_empty!(ThisIsAXunion));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::XunionMember(ref mut val) = self {
fidl::decode!(ThisIsAXunion, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
#[allow(deprecated)]
ordinal => {
for _ in 0..num_handles {
decoder.drop_next_handle()?;
}
*self = AllTypesXunion::__SourceBreaking { unknown_ordinal: ordinal };
}
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for EchoEchoUnionPayloadWithErrorRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoUnionPayloadWithErrorRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<EchoEchoUnionPayloadWithErrorRequest>
for &EchoEchoUnionPayloadWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoUnionPayloadWithErrorRequest>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref val) => {
fidl::encoding::encode_in_envelope::<UnsignedErrorable>(
<UnsignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
EchoEchoUnionPayloadWithErrorRequest::Signed(ref val) => {
fidl::encoding::encode_in_envelope::<SignedErrorable>(
<SignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking { .. } => {
Err(fidl::Error::UnknownUnionTag)
}
}
}
}
impl fidl::encoding::Decode<Self> for EchoEchoUnionPayloadWithErrorRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => {
<UnsignedErrorable as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
2 => <SignedErrorable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
0 => return Err(fidl::Error::UnknownUnionTag),
_ => num_bytes as usize,
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(_) = self {
} else {
*self = EchoEchoUnionPayloadWithErrorRequest::Unsigned(fidl::new_empty!(
UnsignedErrorable
));
}
#[allow(irrefutable_let_patterns)]
if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref mut val) = self {
fidl::decode!(UnsignedErrorable, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let EchoEchoUnionPayloadWithErrorRequest::Signed(_) = self {
} else {
*self = EchoEchoUnionPayloadWithErrorRequest::Signed(fidl::new_empty!(
SignedErrorable
));
}
#[allow(irrefutable_let_patterns)]
if let EchoEchoUnionPayloadWithErrorRequest::Signed(ref mut val) = self {
fidl::decode!(SignedErrorable, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
#[allow(deprecated)]
ordinal => {
for _ in 0..num_handles {
decoder.drop_next_handle()?;
}
*self = EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking {
unknown_ordinal: ordinal,
};
}
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for RequestUnion {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for RequestUnion {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<RequestUnion> for &RequestUnion {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RequestUnion>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
RequestUnion::Unsigned(ref val) => fidl::encoding::encode_in_envelope::<Unsigned>(
<Unsigned as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
RequestUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<Signed>(
<Signed as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
RequestUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl fidl::encoding::Decode<Self> for RequestUnion {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <Unsigned as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <Signed as fidl::encoding::TypeMarker>::inline_size(decoder.context),
0 => return Err(fidl::Error::UnknownUnionTag),
_ => num_bytes as usize,
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let RequestUnion::Unsigned(_) = self {
} else {
*self = RequestUnion::Unsigned(fidl::new_empty!(Unsigned));
}
#[allow(irrefutable_let_patterns)]
if let RequestUnion::Unsigned(ref mut val) = self {
fidl::decode!(Unsigned, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let RequestUnion::Signed(_) = self {
} else {
*self = RequestUnion::Signed(fidl::new_empty!(Signed));
}
#[allow(irrefutable_let_patterns)]
if let RequestUnion::Signed(ref mut val) = self {
fidl::decode!(Signed, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
#[allow(deprecated)]
ordinal => {
for _ in 0..num_handles {
decoder.drop_next_handle()?;
}
*self = RequestUnion::__SourceBreaking { unknown_ordinal: ordinal };
}
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ResponseUnion {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ResponseUnion {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ResponseUnion> for &ResponseUnion {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ResponseUnion>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
ResponseUnion::Unsigned(ref val) => fidl::encoding::encode_in_envelope::<u64>(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
ResponseUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<i64>(
<i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
}
}
}
impl fidl::encoding::Decode<Self> for ResponseUnion {
#[inline(always)]
fn new_empty() -> Self {
Self::Unsigned(fidl::new_empty!(u64))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
_ => return Err(fidl::Error::UnknownUnionTag),
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let ResponseUnion::Unsigned(_) = self {
} else {
*self = ResponseUnion::Unsigned(fidl::new_empty!(u64));
}
#[allow(irrefutable_let_patterns)]
if let ResponseUnion::Unsigned(ref mut val) = self {
fidl::decode!(u64, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let ResponseUnion::Signed(_) = self {
} else {
*self = ResponseUnion::Signed(fidl::new_empty!(i64));
}
#[allow(irrefutable_let_patterns)]
if let ResponseUnion::Signed(ref mut val) = self {
fidl::decode!(i64, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
ordinal => panic!("unexpected ordinal {:?}", ordinal),
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ThisIsAUnion {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAUnion {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ThisIsAUnion> for &ThisIsAUnion {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAUnion>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
ThisIsAUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
fidl::encoding::UnboundedString,
>(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
val,
),
encoder,
offset + 8,
_depth,
),
ThisIsAUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool>(
<bool as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
}
}
}
impl fidl::encoding::Decode<Self> for ThisIsAUnion {
#[inline(always)]
fn new_empty() -> Self {
Self::S(fidl::new_empty!(fidl::encoding::UnboundedString))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
_ => return Err(fidl::Error::UnknownUnionTag),
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let ThisIsAUnion::S(_) = self {
} else {
*self = ThisIsAUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAUnion::S(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedString,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let ThisIsAUnion::B(_) = self {
} else {
*self = ThisIsAUnion::B(fidl::new_empty!(bool));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAUnion::B(ref mut val) = self {
fidl::decode!(bool, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
ordinal => panic!("unexpected ordinal {:?}", ordinal),
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ThisIsAXunion {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAXunion {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ThisIsAXunion> for &ThisIsAXunion {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAXunion>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
ThisIsAXunion::S(ref val) => fidl::encoding::encode_in_envelope::<
fidl::encoding::UnboundedString,
>(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
val,
),
encoder,
offset + 8,
_depth,
),
ThisIsAXunion::B(ref val) => fidl::encoding::encode_in_envelope::<bool>(
<bool as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
ThisIsAXunion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl fidl::encoding::Decode<Self> for ThisIsAXunion {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
0 => return Err(fidl::Error::UnknownUnionTag),
_ => num_bytes as usize,
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let ThisIsAXunion::S(_) = self {
} else {
*self = ThisIsAXunion::S(fidl::new_empty!(fidl::encoding::UnboundedString));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAXunion::S(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedString,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let ThisIsAXunion::B(_) = self {
} else {
*self = ThisIsAXunion::B(fidl::new_empty!(bool));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAXunion::B(ref mut val) = self {
fidl::decode!(bool, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
#[allow(deprecated)]
ordinal => {
for _ in 0..num_handles {
decoder.drop_next_handle()?;
}
*self = ThisIsAXunion::__SourceBreaking { unknown_ordinal: ordinal };
}
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
}