#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> for EchoEchoArraysRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoArraysResponse {
pub value: ArraysStruct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoArraysWithErrorRequest
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoEventRequest {
pub value: Struct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructNoRetValRequest
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructRequest {
pub value: Struct,
pub forward_to_server: String,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EchoEchoStructRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructResponse {
pub value: Struct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructWithErrorRequest
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableRequest {
pub value: AllTypesTable,
pub forward_to_server: String,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EchoEchoTableRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableResponse {
pub value: AllTypesTable,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoTableWithErrorRequest
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsRequest {
pub value: VectorsStruct,
pub forward_to_server: String,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EchoEchoVectorsRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsResponse {
pub value: VectorsStruct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoVectorsWithErrorRequest
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsRequest {
pub value: Vec<AllTypesXunion>,
pub forward_to_server: String,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EchoEchoXunionsRequest {}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsResponse {
pub value: Vec<AllTypesXunion>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoXunionsWithErrorRequest
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoArraysWithErrorResponse {
pub value: ArraysStruct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoArraysWithErrorResponse
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoStructWithErrorResponse {
pub value: Struct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructWithErrorResponse
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoTableWithErrorResponse {
pub value: AllTypesTable,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoTableWithErrorResponse
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoVectorsWithErrorResponse {
pub value: VectorsStruct,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoVectorsWithErrorResponse
{
}
#[derive(Debug, PartialEq)]
pub struct EchoEchoXunionsWithErrorResponse {
pub value: Vec<AllTypesXunion>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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<fidl::encoding::DefaultFuchsiaResourceDialect> 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::MonotonicInstant,
) -> Result<ConfigEvent, fidl::Error> {
ConfigEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_impls(
&self,
___deadline: zx::MonotonicInstant,
) -> 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<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
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>, fidl::encoding::DefaultFuchsiaResourceDialect>
{
ConfigProxyInterface::r#get_impls(self)
}
}
impl ConfigProxyInterface for ConfigProxy {
type GetImplsResponseFut =
fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_impls(&self) -> Self::GetImplsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<Vec<String>, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ConfigGetImplsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
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<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::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<fidl::encoding::DefaultFuchsiaResourceDialect>>,
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<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
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::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|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.into(),
))))
}
}
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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
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()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
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::MonotonicInstant) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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::MonotonicInstant,
) -> 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<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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, fidl::encoding::DefaultFuchsiaResourceDialect> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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, fidl::encoding::DefaultFuchsiaResourceDialect>
{
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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, fidl::encoding::DefaultFuchsiaResourceDialect>
{
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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, fidl::encoding::DefaultFuchsiaResourceDialect>
{
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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, fidl::encoding::DefaultFuchsiaResourceDialect>
{
EchoProxyInterface::r#echo_table_payload(self, payload)
}
pub fn r#echo_table_payload_with_error(
&self,
mut payload: &EchoEchoTablePayloadWithErrorRequest,
) -> fidl::client::QueryResponseFut<
EchoEchoTablePayloadWithErrorResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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, fidl::encoding::DefaultFuchsiaResourceDialect>
{
EchoProxyInterface::r#echo_union_payload(self, payload)
}
pub fn r#echo_union_payload_with_error(
&self,
mut payload: &EchoEchoUnionPayloadWithErrorRequest,
) -> fidl::client::QueryResponseFut<
EchoEchoUnionPayloadWithErrorResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_table_request_composed(
&self,
mut payload: &fidl_fidl_test_imported::ComposedEchoTableRequestComposedRequest,
) -> Self::EchoTableRequestComposedResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl_fidl_test_imported::ResponseStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#echo_minimal(&self, mut forward_to_server: &str) -> Self::EchoMinimalResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_minimal_with_error(
&self,
mut forward_to_server: &str,
mut result_variant: RespondWith,
) -> Self::EchoMinimalWithErrorResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoMinimalWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, u32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#echo_struct(
&self,
mut value: Struct,
mut forward_to_server: &str,
) -> Self::EchoStructResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<Struct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoStructResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoStructWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoStructWithErrorResponse, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#echo_arrays(
&self,
mut value: ArraysStruct,
mut forward_to_server: &str,
) -> Self::EchoArraysResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ArraysStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoArraysResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoArraysWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoArraysWithErrorResponse, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_vectors(
&self,
mut value: VectorsStruct,
mut forward_to_server: &str,
) -> Self::EchoVectorsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<VectorsStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoVectorsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoVectorsWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoVectorsWithErrorResponse, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_table(
&self,
mut value: AllTypesTable,
mut forward_to_server: &str,
) -> Self::EchoTableResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<AllTypesTable, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoTableResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoTableWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoTableWithErrorResponse, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_xunions(
&self,
mut value: Vec<AllTypesXunion>,
mut forward_to_server: &str,
) -> Self::EchoXunionsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<Vec<AllTypesXunion>, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EchoEchoXunionsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoXunionsWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<EchoEchoXunionsWithErrorResponse, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<fidl_fidl_test_imported::SimpleStruct, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl_fidl_test_imported::ResponseStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoNamedStructWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl_fidl_test_imported::ResponseStruct, u32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_table_payload(
&self,
mut payload: &RequestTable,
) -> Self::EchoTablePayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ResponseTable, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ResponseTable,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_table_payload_with_error(
&self,
mut payload: &EchoEchoTablePayloadWithErrorRequest,
) -> Self::EchoTablePayloadWithErrorResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoTablePayloadWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ResponseTable, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_union_payload(
&self,
mut payload: &RequestUnion,
) -> Self::EchoUnionPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ResponseUnion, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ResponseUnion,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#echo_union_payload_with_error(
&self,
mut payload: &EchoEchoUnionPayloadWithErrorRequest,
) -> Self::EchoUnionPayloadWithErrorResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EchoEchoUnionPayloadWithErrorResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ResponseUnion, DefaultEnum>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
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::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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<fidl::encoding::DefaultFuchsiaResourceDialect>>,
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<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
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::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|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.into(),
))))
}
}
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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::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<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
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()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DefaultBits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DefaultBits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U16Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U16Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U32Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U32Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U64Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U64Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U8Bits {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U8Bits {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RespondWith {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RespondWith {
#[inline(always)]
fn new_empty() -> Self {
Self::Success
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DefaultEnum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DefaultEnum {
#[inline(always)]
fn new_empty() -> Self {
Self::KZero
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I16Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I16Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I32Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I32Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I64Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I64Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I8Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I8Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KNegativeOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U16Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U16Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U32Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U32Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U64Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U64Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U8Enum {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U8Enum {
#[inline(always)]
fn new_empty() -> Self {
Self::KOne
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<ArraysStruct, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut ArraysStruct
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ArraysStruct>(offset);
fidl::encoding::Encode::<ArraysStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::Array<i8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T2: fidl::encoding::Encode<
fidl::encoding::Array<i16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<
fidl::encoding::Array<i32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T4: fidl::encoding::Encode<
fidl::encoding::Array<i64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T5: fidl::encoding::Encode<
fidl::encoding::Array<u8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T6: fidl::encoding::Encode<
fidl::encoding::Array<u16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T7: fidl::encoding::Encode<
fidl::encoding::Array<u32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T8: fidl::encoding::Encode<
fidl::encoding::Array<u64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T9: fidl::encoding::Encode<
fidl::encoding::Array<f32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T10: fidl::encoding::Encode<
fidl::encoding::Array<f64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T11: fidl::encoding::Encode<
fidl::encoding::Array<DefaultEnum, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T12: fidl::encoding::Encode<
fidl::encoding::Array<DefaultBits, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T13: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T15: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::UnboundedString, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T16: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T17: fidl::encoding::Encode<
fidl::encoding::Array<ThisIsAStruct, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T18: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T19: fidl::encoding::Encode<
fidl::encoding::Array<ThisIsAUnion, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T20: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T21: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T22: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T23: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T24: fidl::encoding::Encode<
fidl::encoding::Array<ThisIsATable, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T25: fidl::encoding::Encode<
fidl::encoding::Array<ThisIsAXunion, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
> fidl::encoding::Encode<ArraysStruct, fidl::encoding::DefaultFuchsiaResourceDialect>
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<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> for ArraysStruct {
#[inline(always)]
fn new_empty() -> Self {
Self {
bools: fidl::new_empty!(fidl::encoding::Array<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int8s: fidl::new_empty!(fidl::encoding::Array<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int16s: fidl::new_empty!(fidl::encoding::Array<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int32s: fidl::new_empty!(fidl::encoding::Array<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int64s: fidl::new_empty!(fidl::encoding::Array<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint8s: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint16s: fidl::new_empty!(fidl::encoding::Array<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint32s: fidl::new_empty!(fidl::encoding::Array<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint64s: fidl::new_empty!(fidl::encoding::Array<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
float32s: fidl::new_empty!(fidl::encoding::Array<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
float64s: fidl::new_empty!(fidl::encoding::Array<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
enums: fidl::new_empty!(fidl::encoding::Array<DefaultEnum, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
bits: fidl::new_empty!(fidl::encoding::Array<DefaultBits, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
handles: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_handles: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
strings: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::UnboundedString, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_strings: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
structs: fidl::new_empty!(fidl::encoding::Array<ThisIsAStruct, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_structs: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
unions: fidl::new_empty!(fidl::encoding::Array<ThisIsAUnion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_unions: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
arrays: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
vectors: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_vectors: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
tables: fidl::new_empty!(fidl::encoding::Array<ThisIsATable, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
xunions: fidl::new_empty!(fidl::encoding::Array<ThisIsAXunion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.bools, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int8s, decoder, offset + 3, _depth)?;
fidl::decode!(fidl::encoding::Array<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int16s, decoder, offset + 6, _depth)?;
fidl::decode!(fidl::encoding::Array<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int32s, decoder, offset + 12, _depth)?;
fidl::decode!(fidl::encoding::Array<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int64s, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint8s, decoder, offset + 48, _depth)?;
fidl::decode!(fidl::encoding::Array<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint16s, decoder, offset + 52, _depth)?;
fidl::decode!(fidl::encoding::Array<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint32s, decoder, offset + 60, _depth)?;
fidl::decode!(fidl::encoding::Array<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint64s, decoder, offset + 72, _depth)?;
fidl::decode!(fidl::encoding::Array<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.float32s, decoder, offset + 96, _depth)?;
fidl::decode!(fidl::encoding::Array<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.float64s, decoder, offset + 112, _depth)?;
fidl::decode!(fidl::encoding::Array<DefaultEnum, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.enums, decoder, offset + 136, _depth)?;
fidl::decode!(fidl::encoding::Array<DefaultBits, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.bits, decoder, offset + 148, _depth)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_handles,
decoder,
offset + 172,
_depth
)?;
fidl::decode!(fidl::encoding::Array<fidl::encoding::UnboundedString, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.strings, decoder, offset + 184, _depth)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_strings,
decoder,
offset + 232,
_depth
)?;
fidl::decode!(fidl::encoding::Array<ThisIsAStruct, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.structs, decoder, offset + 280, _depth)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_structs,
decoder,
offset + 328,
_depth
)?;
fidl::decode!(fidl::encoding::Array<ThisIsAUnion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.unions, decoder, offset + 352, _depth)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_unions,
decoder,
offset + 400,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u32, 3>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.arrays,
decoder,
offset + 448,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::UnboundedVector<u32>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.vectors,
decoder,
offset + 488,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_vectors,
decoder,
offset + 536,
_depth
)?;
fidl::decode!(fidl::encoding::Array<ThisIsATable, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.tables, decoder, offset + 584, _depth)?;
fidl::decode!(fidl::encoding::Array<ThisIsAXunion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.xunions, decoder, offset + 632, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConfigGetImplsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ConfigGetImplsResponse, D> for &ConfigGetImplsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConfigGetImplsResponse>(offset);
fidl::encoding::Encode::<ConfigGetImplsResponse, D>::encode(
(
<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.impls),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
D,
>,
> fidl::encoding::Encode<ConfigGetImplsResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConfigGetImplsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ConfigGetImplsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
impls: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
D
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
D,
&mut self.impls,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<EchoEchoArraysRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut EchoEchoArraysRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysRequest>(offset);
fidl::encoding::Encode::<
EchoEchoArraysRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<EchoEchoArraysRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoArraysRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 680,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoArraysResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoArraysResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysResponse>(offset);
fidl::encoding::Encode::<
EchoEchoArraysResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<ArraysStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ArraysStruct, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoArraysResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoArraysResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoArraysWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoArraysWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysWithErrorRequest>(offset);
fidl::encoding::Encode::<
EchoEchoArraysWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T2: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<RespondWith, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoArraysWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoArraysWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_err: fidl::new_empty!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_variant: fidl::new_empty!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_err,
decoder,
offset + 680,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 688,
_depth
)?;
fidl::decode!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_variant,
decoder,
offset + 704,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<EchoEchoEventRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut EchoEchoEventRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoEventRequest>(offset);
fidl::encoding::Encode::<
EchoEchoEventRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<Struct, fidl::encoding::DefaultFuchsiaResourceDialect>>
fidl::encoding::Encode<EchoEchoEventRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoEventRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(Struct, fidl::encoding::DefaultFuchsiaResourceDialect) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
Struct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalNoRetValRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<EchoEchoMinimalNoRetValRequest, D>
for &EchoEchoMinimalNoRetValRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalNoRetValRequest>(offset);
fidl::encoding::Encode::<EchoEchoMinimalNoRetValRequest, D>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
> fidl::encoding::Encode<EchoEchoMinimalNoRetValRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalNoRetValRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for EchoEchoMinimalNoRetValRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.forward_to_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<EchoEchoMinimalRequest, D> for &EchoEchoMinimalRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalRequest>(offset);
fidl::encoding::Encode::<EchoEchoMinimalRequest, D>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.forward_to_server,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
> fidl::encoding::Encode<EchoEchoMinimalRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for EchoEchoMinimalRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.forward_to_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalWithErrorRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<EchoEchoMinimalWithErrorRequest, D>
for &EchoEchoMinimalWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoMinimalWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoMinimalWithErrorRequest, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
T1: fidl::encoding::Encode<RespondWith, D>,
> fidl::encoding::Encode<EchoEchoMinimalWithErrorRequest, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for EchoEchoMinimalWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
result_variant: fidl::new_empty!(RespondWith, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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,
D,
&mut self.forward_to_server,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(RespondWith, D, &mut self.result_variant, decoder, offset + 16, _depth)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoStructNoRetValRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoStructNoRetValRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructNoRetValRequest>(offset);
fidl::encoding::Encode::<
EchoEchoStructNoRetValRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
EchoEchoStructNoRetValRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructNoRetValRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(Struct, fidl::encoding::DefaultFuchsiaResourceDialect),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
Struct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 2912,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<EchoEchoStructRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut EchoEchoStructRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructRequest>(offset);
fidl::encoding::Encode::<
EchoEchoStructRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<EchoEchoStructRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(Struct, fidl::encoding::DefaultFuchsiaResourceDialect),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
Struct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 2912,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoStructResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoStructResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructResponse>(offset);
fidl::encoding::Encode::<
EchoEchoStructResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<Struct, fidl::encoding::DefaultFuchsiaResourceDialect>>
fidl::encoding::Encode<
EchoEchoStructResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(Struct, fidl::encoding::DefaultFuchsiaResourceDialect) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
Struct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoStructWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoStructWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructWithErrorRequest>(offset);
fidl::encoding::Encode::<
EchoEchoStructWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T2: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<RespondWith, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoStructWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(Struct, fidl::encoding::DefaultFuchsiaResourceDialect),
result_err: fidl::new_empty!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_variant: fidl::new_empty!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_err,
decoder,
offset + 2912,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 2920,
_depth
)?;
fidl::decode!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_variant,
decoder,
offset + 2936,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<EchoEchoTableRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut EchoEchoTableRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableRequest>(offset);
fidl::encoding::Encode::<
EchoEchoTableRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<EchoEchoTableRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoTableRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<EchoEchoTableResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut EchoEchoTableResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableResponse>(offset);
fidl::encoding::Encode::<
EchoEchoTableResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<AllTypesTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<AllTypesTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<EchoEchoTableResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoTableResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoTableWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoTableWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableWithErrorRequest>(offset);
fidl::encoding::Encode::<
EchoEchoTableWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T2: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<RespondWith, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoTableWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoTableWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_err: fidl::new_empty!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_variant: fidl::new_empty!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_err,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_variant,
decoder,
offset + 40,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoVectorsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoVectorsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsRequest>(offset);
fidl::encoding::Encode::<
EchoEchoVectorsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
EchoEchoVectorsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoVectorsRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 416,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoVectorsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoVectorsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsResponse>(offset);
fidl::encoding::Encode::<
EchoEchoVectorsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<VectorsStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<VectorsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoVectorsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoVectorsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoVectorsWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoVectorsWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsWithErrorRequest>(offset);
fidl::encoding::Encode::<
EchoEchoVectorsWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T2: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<RespondWith, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoVectorsWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoVectorsWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_err: fidl::new_empty!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_variant: fidl::new_empty!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_err,
decoder,
offset + 416,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 424,
_depth
)?;
fidl::decode!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_variant,
decoder,
offset + 440,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoXunionsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoXunionsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsRequest>(offset);
fidl::encoding::Encode::<EchoEchoXunionsRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
EchoEchoXunionsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoXunionsRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoXunionsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoXunionsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsResponse>(offset);
fidl::encoding::Encode::<EchoEchoXunionsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
EchoEchoXunionsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoXunionsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoXunionsWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoXunionsWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsWithErrorRequest>(offset);
fidl::encoding::Encode::<EchoEchoXunionsWithErrorRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T2: fidl::encoding::Encode<
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<RespondWith, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoXunionsWithErrorRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoXunionsWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_err: fidl::new_empty!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect
),
forward_to_server: fidl::new_empty!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect
),
result_variant: fidl::new_empty!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_err,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.forward_to_server,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(
RespondWith,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.result_variant,
decoder,
offset + 40,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoArraysWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoArraysWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoArraysWithErrorResponse>(offset);
fidl::encoding::Encode::<
EchoEchoArraysWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<ArraysStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ArraysStruct, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoArraysWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoArraysWithErrorResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
ArraysStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoStructWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoStructWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoStructWithErrorResponse>(offset);
fidl::encoding::Encode::<
EchoEchoStructWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<Struct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<Struct, fidl::encoding::DefaultFuchsiaResourceDialect>>
fidl::encoding::Encode<
EchoEchoStructWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoStructWithErrorResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(Struct, fidl::encoding::DefaultFuchsiaResourceDialect) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
Struct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoTableWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoTableWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoTableWithErrorResponse>(offset);
fidl::encoding::Encode::<
EchoEchoTableWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<AllTypesTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<AllTypesTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoTableWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoTableWithErrorResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
AllTypesTable,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoVectorsWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoVectorsWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoVectorsWithErrorResponse>(offset);
fidl::encoding::Encode::<
EchoEchoVectorsWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<VectorsStruct as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.value,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<VectorsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
EchoEchoVectorsWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoVectorsWithErrorResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
VectorsStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl
fidl::encoding::Encode<
EchoEchoXunionsWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut EchoEchoXunionsWithErrorResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EchoEchoXunionsWithErrorResponse>(offset);
fidl::encoding::Encode::<EchoEchoXunionsWithErrorResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::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::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
EchoEchoXunionsWithErrorResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>
for EchoEchoXunionsWithErrorResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<AllTypesXunion>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.value,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Signed {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Signed, D> for &Signed {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Signed>(offset);
fidl::encoding::Encode::<Signed, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i64, D>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
> fidl::encoding::Encode<Signed, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Signed {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(i64, D),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(i64, D, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SignedErrorable {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SignedErrorable, D>
for &SignedErrorable
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SignedErrorable>(offset);
fidl::encoding::Encode::<SignedErrorable, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i64, D>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
T2: fidl::encoding::Encode<DefaultEnum, D>,
T3: fidl::encoding::Encode<RespondWith, D>,
> fidl::encoding::Encode<SignedErrorable, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SignedErrorable {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(i64, D),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
result_err: fidl::new_empty!(DefaultEnum, D),
result_variant: fidl::new_empty!(RespondWith, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(i64, D, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(DefaultEnum, D, &mut self.result_err, decoder, offset + 24, _depth)?;
fidl::decode!(RespondWith, D, &mut self.result_variant, decoder, offset + 28, _depth)?;
Ok(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<Struct, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut Struct
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Struct>(offset);
fidl::encoding::Encode::<Struct, fidl::encoding::DefaultFuchsiaResourceDialect>::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, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<DefaultValues, fidl::encoding::DefaultFuchsiaResourceDialect>,
T2: fidl::encoding::Encode<Arrays, fidl::encoding::DefaultFuchsiaResourceDialect>,
T3: fidl::encoding::Encode<Arrays2d, fidl::encoding::DefaultFuchsiaResourceDialect>,
T4: fidl::encoding::Encode<Vectors, fidl::encoding::DefaultFuchsiaResourceDialect>,
T5: fidl::encoding::Encode<Handles, fidl::encoding::DefaultFuchsiaResourceDialect>,
T6: fidl::encoding::Encode<Strings, fidl::encoding::DefaultFuchsiaResourceDialect>,
T7: fidl::encoding::Encode<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T8: fidl::encoding::Encode<I8Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T9: fidl::encoding::Encode<I16Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T10: fidl::encoding::Encode<I32Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T11: fidl::encoding::Encode<I64Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T12: fidl::encoding::Encode<U8Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T13: fidl::encoding::Encode<U16Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T14: fidl::encoding::Encode<U32Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T15: fidl::encoding::Encode<U64Enum, fidl::encoding::DefaultFuchsiaResourceDialect>,
T16: fidl::encoding::Encode<DefaultBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
T17: fidl::encoding::Encode<U8Bits, fidl::encoding::DefaultFuchsiaResourceDialect>,
T18: fidl::encoding::Encode<U16Bits, fidl::encoding::DefaultFuchsiaResourceDialect>,
T19: fidl::encoding::Encode<U32Bits, fidl::encoding::DefaultFuchsiaResourceDialect>,
T20: fidl::encoding::Encode<U64Bits, fidl::encoding::DefaultFuchsiaResourceDialect>,
T21: fidl::encoding::Encode<Structs, fidl::encoding::DefaultFuchsiaResourceDialect>,
T22: fidl::encoding::Encode<Unions, fidl::encoding::DefaultFuchsiaResourceDialect>,
T23: fidl::encoding::Encode<ThisIsATable, fidl::encoding::DefaultFuchsiaResourceDialect>,
T24: fidl::encoding::Encode<ThisIsAXunion, fidl::encoding::DefaultFuchsiaResourceDialect>,
T25: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
> fidl::encoding::Encode<Struct, fidl::encoding::DefaultFuchsiaResourceDialect>
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<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> for Struct {
#[inline(always)]
fn new_empty() -> Self {
Self {
primitive_types: fidl::new_empty!(
PrimitiveTypes,
fidl::encoding::DefaultFuchsiaResourceDialect
),
default_values: fidl::new_empty!(
DefaultValues,
fidl::encoding::DefaultFuchsiaResourceDialect
),
arrays: fidl::new_empty!(Arrays, fidl::encoding::DefaultFuchsiaResourceDialect),
arrays_2d: fidl::new_empty!(
Arrays2d,
fidl::encoding::DefaultFuchsiaResourceDialect
),
vectors: fidl::new_empty!(Vectors, fidl::encoding::DefaultFuchsiaResourceDialect),
handles: fidl::new_empty!(Handles, fidl::encoding::DefaultFuchsiaResourceDialect),
strings: fidl::new_empty!(Strings, fidl::encoding::DefaultFuchsiaResourceDialect),
default_enum: fidl::new_empty!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_enum: fidl::new_empty!(I8Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
i16_enum: fidl::new_empty!(I16Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
i32_enum: fidl::new_empty!(I32Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
i64_enum: fidl::new_empty!(I64Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
u8_enum: fidl::new_empty!(U8Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
u16_enum: fidl::new_empty!(U16Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
u32_enum: fidl::new_empty!(U32Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
u64_enum: fidl::new_empty!(U64Enum, fidl::encoding::DefaultFuchsiaResourceDialect),
default_bits: fidl::new_empty!(
DefaultBits,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_bits: fidl::new_empty!(U8Bits, fidl::encoding::DefaultFuchsiaResourceDialect),
u16_bits: fidl::new_empty!(U16Bits, fidl::encoding::DefaultFuchsiaResourceDialect),
u32_bits: fidl::new_empty!(U32Bits, fidl::encoding::DefaultFuchsiaResourceDialect),
u64_bits: fidl::new_empty!(U64Bits, fidl::encoding::DefaultFuchsiaResourceDialect),
structs: fidl::new_empty!(Structs, fidl::encoding::DefaultFuchsiaResourceDialect),
unions: fidl::new_empty!(Unions, fidl::encoding::DefaultFuchsiaResourceDialect),
table: fidl::new_empty!(
ThisIsATable,
fidl::encoding::DefaultFuchsiaResourceDialect
),
xunion: fidl::new_empty!(
ThisIsAXunion,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.primitive_types,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
DefaultValues,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.default_values,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
Arrays,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.arrays,
decoder,
offset + 120,
_depth
)?;
fidl::decode!(
Arrays2d,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.arrays_2d,
decoder,
offset + 328,
_depth
)?;
fidl::decode!(
Vectors,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.vectors,
decoder,
offset + 616,
_depth
)?;
fidl::decode!(
Handles,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handles,
decoder,
offset + 2536,
_depth
)?;
fidl::decode!(
Strings,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.strings,
decoder,
offset + 2648,
_depth
)?;
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.default_enum,
decoder,
offset + 2744,
_depth
)?;
fidl::decode!(
I8Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_enum,
decoder,
offset + 2748,
_depth
)?;
fidl::decode!(
I16Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_enum,
decoder,
offset + 2750,
_depth
)?;
fidl::decode!(
I32Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_enum,
decoder,
offset + 2752,
_depth
)?;
fidl::decode!(
I64Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_enum,
decoder,
offset + 2760,
_depth
)?;
fidl::decode!(
U8Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_enum,
decoder,
offset + 2768,
_depth
)?;
fidl::decode!(
U16Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_enum,
decoder,
offset + 2770,
_depth
)?;
fidl::decode!(
U32Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_enum,
decoder,
offset + 2772,
_depth
)?;
fidl::decode!(
U64Enum,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_enum,
decoder,
offset + 2776,
_depth
)?;
fidl::decode!(
DefaultBits,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.default_bits,
decoder,
offset + 2784,
_depth
)?;
fidl::decode!(
U8Bits,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_bits,
decoder,
offset + 2788,
_depth
)?;
fidl::decode!(
U16Bits,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_bits,
decoder,
offset + 2790,
_depth
)?;
fidl::decode!(
U32Bits,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_bits,
decoder,
offset + 2792,
_depth
)?;
fidl::decode!(
U64Bits,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_bits,
decoder,
offset + 2800,
_depth
)?;
fidl::decode!(
Structs,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.structs,
decoder,
offset + 2808,
_depth
)?;
fidl::decode!(
Unions,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.unions,
decoder,
offset + 2840,
_depth
)?;
fidl::decode!(
ThisIsATable,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.table,
decoder,
offset + 2872,
_depth
)?;
fidl::decode!(
ThisIsAXunion,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.xunion,
decoder,
offset + 2888,
_depth
)?;
fidl::decode!(
bool,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b,
decoder,
offset + 2904,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Unsigned {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Unsigned, D> for &Unsigned {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Unsigned>(offset);
fidl::encoding::Encode::<Unsigned, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
> fidl::encoding::Encode<Unsigned, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Unsigned {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(u64, D),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(u64, D, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for UnsignedErrorable {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnsignedErrorable, D>
for &UnsignedErrorable
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnsignedErrorable>(offset);
fidl::encoding::Encode::<UnsignedErrorable, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
T2: fidl::encoding::Encode<DefaultEnum, D>,
T3: fidl::encoding::Encode<RespondWith, D>,
> fidl::encoding::Encode<UnsignedErrorable, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsignedErrorable {
#[inline(always)]
fn new_empty() -> Self {
Self {
value: fidl::new_empty!(u64, D),
forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
result_err: fidl::new_empty!(DefaultEnum, D),
result_variant: fidl::new_empty!(RespondWith, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(u64, D, &mut self.value, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.forward_to_server,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(DefaultEnum, D, &mut self.result_err, decoder, offset + 24, _depth)?;
fidl::decode!(RespondWith, D, &mut self.result_variant, decoder, offset + 28, _depth)?;
Ok(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<VectorsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut VectorsStruct
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<VectorsStruct>(offset);
fidl::encoding::Encode::<VectorsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::Vector<i8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T2: fidl::encoding::Encode<
fidl::encoding::Vector<i16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<
fidl::encoding::Vector<i32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T4: fidl::encoding::Encode<
fidl::encoding::Vector<i64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T5: fidl::encoding::Encode<
fidl::encoding::Vector<u8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T6: fidl::encoding::Encode<
fidl::encoding::Vector<u16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T7: fidl::encoding::Encode<
fidl::encoding::Vector<u32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T8: fidl::encoding::Encode<
fidl::encoding::Vector<u64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T9: fidl::encoding::Encode<
fidl::encoding::Vector<f32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T10: fidl::encoding::Encode<
fidl::encoding::Vector<f64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T11: fidl::encoding::Encode<
fidl::encoding::Vector<DefaultEnum, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T12: fidl::encoding::Encode<
fidl::encoding::Vector<DefaultBits, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T13: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T15: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::UnboundedString, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T16: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T17: fidl::encoding::Encode<
fidl::encoding::Vector<ThisIsAStruct, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T18: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T19: fidl::encoding::Encode<
fidl::encoding::Vector<ThisIsAUnion, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T20: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T21: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T22: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T23: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T24: fidl::encoding::Encode<
fidl::encoding::Vector<ThisIsATable, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T25: fidl::encoding::Encode<
fidl::encoding::Vector<ThisIsAXunion, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
> fidl::encoding::Encode<VectorsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>
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<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> for VectorsStruct {
#[inline(always)]
fn new_empty() -> Self {
Self {
bools: fidl::new_empty!(fidl::encoding::Vector<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int8s: fidl::new_empty!(fidl::encoding::Vector<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int16s: fidl::new_empty!(fidl::encoding::Vector<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int32s: fidl::new_empty!(fidl::encoding::Vector<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
int64s: fidl::new_empty!(fidl::encoding::Vector<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint8s: fidl::new_empty!(fidl::encoding::Vector<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint16s: fidl::new_empty!(fidl::encoding::Vector<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint32s: fidl::new_empty!(fidl::encoding::Vector<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
uint64s: fidl::new_empty!(fidl::encoding::Vector<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
float32s: fidl::new_empty!(fidl::encoding::Vector<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
float64s: fidl::new_empty!(fidl::encoding::Vector<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
enums: fidl::new_empty!(fidl::encoding::Vector<DefaultEnum, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
bits: fidl::new_empty!(fidl::encoding::Vector<DefaultBits, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
handles: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_handles: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
strings: fidl::new_empty!(fidl::encoding::Vector<fidl::encoding::UnboundedString, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_strings: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
structs: fidl::new_empty!(fidl::encoding::Vector<ThisIsAStruct, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_structs: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
unions: fidl::new_empty!(fidl::encoding::Vector<ThisIsAUnion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_unions: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
arrays: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
vectors: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_vectors: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
tables: fidl::new_empty!(fidl::encoding::Vector<ThisIsATable, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
xunions: fidl::new_empty!(fidl::encoding::Vector<ThisIsAXunion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::Vector<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.bools, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Vector<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int8s, decoder, offset + 16, _depth)?;
fidl::decode!(fidl::encoding::Vector<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int16s, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::Vector<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int32s, decoder, offset + 48, _depth)?;
fidl::decode!(fidl::encoding::Vector<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.int64s, decoder, offset + 64, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint8s, decoder, offset + 80, _depth)?;
fidl::decode!(fidl::encoding::Vector<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint16s, decoder, offset + 96, _depth)?;
fidl::decode!(fidl::encoding::Vector<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint32s, decoder, offset + 112, _depth)?;
fidl::decode!(fidl::encoding::Vector<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.uint64s, decoder, offset + 128, _depth)?;
fidl::decode!(fidl::encoding::Vector<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.float32s, decoder, offset + 144, _depth)?;
fidl::decode!(fidl::encoding::Vector<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.float64s, decoder, offset + 160, _depth)?;
fidl::decode!(fidl::encoding::Vector<DefaultEnum, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.enums, decoder, offset + 176, _depth)?;
fidl::decode!(fidl::encoding::Vector<DefaultBits, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.bits, decoder, offset + 192, _depth)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_handles,
decoder,
offset + 224,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<fidl::encoding::UnboundedString, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.strings, decoder, offset + 240, _depth)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_strings,
decoder,
offset + 256,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<ThisIsAStruct, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.structs, decoder, offset + 272, _depth)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Boxed<ThisIsAStruct>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_structs,
decoder,
offset + 288,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<ThisIsAUnion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.unions, decoder, offset + 304, _depth)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::OptionalUnion<ThisIsAUnion>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_unions,
decoder,
offset + 320,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Array<u32, 3>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.arrays,
decoder,
offset + 336,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::UnboundedVector<u32>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.vectors,
decoder,
offset + 352,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<
fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_vectors,
decoder,
offset + 368,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<ThisIsATable, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.tables, decoder, offset + 384, _depth)?;
fidl::decode!(fidl::encoding::Vector<ThisIsAXunion, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.xunions, decoder, offset + 400, _depth)?;
Ok(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<Arrays, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut Arrays
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Arrays>(offset);
fidl::encoding::Encode::<Arrays, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::Array<i8, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T2: fidl::encoding::Encode<
fidl::encoding::Array<i16, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<
fidl::encoding::Array<i32, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T4: fidl::encoding::Encode<
fidl::encoding::Array<i64, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T5: fidl::encoding::Encode<
fidl::encoding::Array<u8, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T6: fidl::encoding::Encode<
fidl::encoding::Array<u16, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T7: fidl::encoding::Encode<
fidl::encoding::Array<u32, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T8: fidl::encoding::Encode<
fidl::encoding::Array<u64, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T9: fidl::encoding::Encode<
fidl::encoding::Array<f32, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T10: fidl::encoding::Encode<
fidl::encoding::Array<f64, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T11: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T12: fidl::encoding::Encode<
fidl::encoding::Array<bool, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T13: fidl::encoding::Encode<
fidl::encoding::Array<i8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Array<i16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T15: fidl::encoding::Encode<
fidl::encoding::Array<i32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T16: fidl::encoding::Encode<
fidl::encoding::Array<i64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T17: fidl::encoding::Encode<
fidl::encoding::Array<u8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T18: fidl::encoding::Encode<
fidl::encoding::Array<u16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T19: fidl::encoding::Encode<
fidl::encoding::Array<u32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T20: fidl::encoding::Encode<
fidl::encoding::Array<u64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T21: fidl::encoding::Encode<
fidl::encoding::Array<f32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T22: fidl::encoding::Encode<
fidl::encoding::Array<f64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T23: fidl::encoding::Encode<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
> fidl::encoding::Encode<Arrays, fidl::encoding::DefaultFuchsiaResourceDialect>
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<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> for Arrays {
#[inline(always)]
fn new_empty() -> Self {
Self {
b_0: fidl::new_empty!(fidl::encoding::Array<bool, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i8_0: fidl::new_empty!(fidl::encoding::Array<i8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i16_0: fidl::new_empty!(fidl::encoding::Array<i16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i32_0: fidl::new_empty!(fidl::encoding::Array<i32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i64_0: fidl::new_empty!(fidl::encoding::Array<i64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u8_0: fidl::new_empty!(fidl::encoding::Array<u8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u16_0: fidl::new_empty!(fidl::encoding::Array<u16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u32_0: fidl::new_empty!(fidl::encoding::Array<u32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u64_0: fidl::new_empty!(fidl::encoding::Array<u64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
f32_0: fidl::new_empty!(fidl::encoding::Array<f32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
f64_0: fidl::new_empty!(fidl::encoding::Array<f64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
handle_0: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_1: fidl::new_empty!(fidl::encoding::Array<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i8_1: fidl::new_empty!(fidl::encoding::Array<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i16_1: fidl::new_empty!(fidl::encoding::Array<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i32_1: fidl::new_empty!(fidl::encoding::Array<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i64_1: fidl::new_empty!(fidl::encoding::Array<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u8_1: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u16_1: fidl::new_empty!(fidl::encoding::Array<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u32_1: fidl::new_empty!(fidl::encoding::Array<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u64_1: fidl::new_empty!(fidl::encoding::Array<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
f32_1: fidl::new_empty!(fidl::encoding::Array<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
f64_1: fidl::new_empty!(fidl::encoding::Array<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
handle_1: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.b_0, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<i8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i8_0, decoder, offset + 1, _depth)?;
fidl::decode!(fidl::encoding::Array<i16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i16_0, decoder, offset + 2, _depth)?;
fidl::decode!(fidl::encoding::Array<i32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i32_0, decoder, offset + 4, _depth)?;
fidl::decode!(fidl::encoding::Array<i64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i64_0, decoder, offset + 8, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u8_0, decoder, offset + 16, _depth)?;
fidl::decode!(fidl::encoding::Array<u16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u16_0, decoder, offset + 18, _depth)?;
fidl::decode!(fidl::encoding::Array<u32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u32_0, decoder, offset + 20, _depth)?;
fidl::decode!(fidl::encoding::Array<u64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u64_0, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::Array<f32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f32_0, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::Array<f64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_0,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(fidl::encoding::Array<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.b_1, decoder, offset + 52, _depth)?;
fidl::decode!(fidl::encoding::Array<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i8_1, decoder, offset + 55, _depth)?;
fidl::decode!(fidl::encoding::Array<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i16_1, decoder, offset + 58, _depth)?;
fidl::decode!(fidl::encoding::Array<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i32_1, decoder, offset + 64, _depth)?;
fidl::decode!(fidl::encoding::Array<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i64_1, decoder, offset + 80, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u8_1, decoder, offset + 104, _depth)?;
fidl::decode!(fidl::encoding::Array<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u16_1, decoder, offset + 108, _depth)?;
fidl::decode!(fidl::encoding::Array<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u32_1, decoder, offset + 116, _depth)?;
fidl::decode!(fidl::encoding::Array<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u64_1, decoder, offset + 128, _depth)?;
fidl::decode!(fidl::encoding::Array<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f32_1, decoder, offset + 152, _depth)?;
fidl::decode!(fidl::encoding::Array<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_1,
decoder,
offset + 192,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<Arrays2d, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut Arrays2d
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Arrays2d>(offset);
fidl::encoding::Encode::<Arrays2d, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T2: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T4: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T5: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T6: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T7: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T8: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T9: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T10: fidl::encoding::Encode<
fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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::DefaultFuchsiaResourceDialect,
>,
> fidl::encoding::Encode<Arrays2d, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> for Arrays2d {
#[inline(always)]
fn new_empty() -> Self {
Self {
b: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<bool, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64: fidl::new_empty!(
fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
handle_handle: fidl::new_empty!(
fidl::encoding::Array<
fidl::encoding::Array<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16,
decoder,
offset + 12,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<i64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8,
decoder,
offset + 96,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16,
decoder,
offset + 102,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32,
decoder,
offset + 116,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<u64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64,
decoder,
offset + 144,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<f32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32,
decoder,
offset + 192,
_depth
)?;
fidl::decode!(
fidl::encoding::Array<fidl::encoding::Array<f64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_handle,
decoder,
offset + 264,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DefaultValues {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DefaultValues, D>
for &DefaultValues
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DefaultValues>(offset);
fidl::encoding::Encode::<DefaultValues, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<bool, D>,
T1: fidl::encoding::Encode<bool, D>,
T2: fidl::encoding::Encode<i8, D>,
T3: fidl::encoding::Encode<i16, D>,
T4: fidl::encoding::Encode<i32, D>,
T5: fidl::encoding::Encode<i64, D>,
T6: fidl::encoding::Encode<u8, D>,
T7: fidl::encoding::Encode<u16, D>,
T8: fidl::encoding::Encode<u32, D>,
T9: fidl::encoding::Encode<u64, D>,
T10: fidl::encoding::Encode<f32, D>,
T11: fidl::encoding::Encode<f64, D>,
T12: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
> fidl::encoding::Encode<DefaultValues, D>
for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DefaultValues {
#[inline(always)]
fn new_empty() -> Self {
Self {
b1: fidl::new_empty!(bool, D),
b2: fidl::new_empty!(bool, D),
i8: fidl::new_empty!(i8, D),
i16: fidl::new_empty!(i16, D),
i32: fidl::new_empty!(i32, D),
i64: fidl::new_empty!(i64, D),
u8: fidl::new_empty!(u8, D),
u16: fidl::new_empty!(u16, D),
u32: fidl::new_empty!(u32, D),
u64: fidl::new_empty!(u64, D),
f32: fidl::new_empty!(f32, D),
f64: fidl::new_empty!(f64, D),
s: fidl::new_empty!(fidl::encoding::UnboundedString, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D, &mut self.b1, decoder, offset + 0, _depth)?;
fidl::decode!(bool, D, &mut self.b2, decoder, offset + 1, _depth)?;
fidl::decode!(i8, D, &mut self.i8, decoder, offset + 2, _depth)?;
fidl::decode!(i16, D, &mut self.i16, decoder, offset + 4, _depth)?;
fidl::decode!(i32, D, &mut self.i32, decoder, offset + 8, _depth)?;
fidl::decode!(i64, D, &mut self.i64, decoder, offset + 16, _depth)?;
fidl::decode!(u8, D, &mut self.u8, decoder, offset + 24, _depth)?;
fidl::decode!(u16, D, &mut self.u16, decoder, offset + 26, _depth)?;
fidl::decode!(u32, D, &mut self.u32, decoder, offset + 28, _depth)?;
fidl::decode!(u64, D, &mut self.u64, decoder, offset + 32, _depth)?;
fidl::decode!(f32, D, &mut self.f32, decoder, offset + 40, _depth)?;
fidl::decode!(f64, D, &mut self.f64, decoder, offset + 48, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.s,
decoder,
offset + 56,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut Handles
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Handles>(offset);
fidl::encoding::Encode::<Handles, fidl::encoding::DefaultFuchsiaResourceDialect>::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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T2: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T4: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T5: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T6: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T7: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T8: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T9: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T10: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T11: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T12: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T13: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T14: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T15: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T16: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T17: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T18: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T19: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Interrupt,
{ fidl::ObjectType::INTERRUPT.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T20: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::DebugLog,
{ fidl::ObjectType::DEBUGLOG.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T21: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T22: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T23: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T24: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T25: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T26: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
> fidl::encoding::Encode<Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
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<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> 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>, fidl::encoding::DefaultFuchsiaResourceDialect),
process_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
thread_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
vmo_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
event_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
port_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Port, { fidl::ObjectType::PORT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
socket_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
eventpair_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
job_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
vmar_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
fifo_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Fifo, { fidl::ObjectType::FIFO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
timer_handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Timer, { fidl::ObjectType::TIMER.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
nullable_handle_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_process_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Process,
{ fidl::ObjectType::PROCESS.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_thread_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Thread,
{ fidl::ObjectType::THREAD.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_vmo_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_channel_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_event_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Event,
{ fidl::ObjectType::EVENT.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_port_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Port,
{ fidl::ObjectType::PORT.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_interrupt_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Interrupt,
{ fidl::ObjectType::INTERRUPT.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_log_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::DebugLog,
{ fidl::ObjectType::DEBUGLOG.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_socket_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Socket,
{ fidl::ObjectType::SOCKET.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_eventpair_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::EventPair,
{ fidl::ObjectType::EVENTPAIR.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_job_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Job,
{ fidl::ObjectType::JOB.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_vmar_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Vmar,
{ fidl::ObjectType::VMAR.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_fifo_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Fifo,
{ fidl::ObjectType::FIFO.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
nullable_timer_handle: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Timer,
{ fidl::ObjectType::TIMER.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle_handle, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process_handle, decoder, offset + 4, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.thread_handle, decoder, offset + 8, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo_handle, decoder, offset + 12, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event_handle, decoder, offset + 16, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Port, { fidl::ObjectType::PORT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.port_handle, decoder, offset + 20, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket_handle, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair_handle, decoder, offset + 28, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.job_handle, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmar_handle, decoder, offset + 36, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Fifo, { fidl::ObjectType::FIFO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.fifo_handle, decoder, offset + 40, _depth)?;
fidl::decode!(fidl::encoding::HandleType<fidl::Timer, { fidl::ObjectType::TIMER.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.timer_handle, decoder, offset + 44, _depth)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.nullable_timer_handle,
decoder,
offset + 104,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for PrimitiveTypes {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PrimitiveTypes, D>
for &PrimitiveTypes
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PrimitiveTypes>(offset);
fidl::encoding::Encode::<PrimitiveTypes, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<bool, D>,
T1: fidl::encoding::Encode<i8, D>,
T2: fidl::encoding::Encode<i16, D>,
T3: fidl::encoding::Encode<i32, D>,
T4: fidl::encoding::Encode<i64, D>,
T5: fidl::encoding::Encode<u8, D>,
T6: fidl::encoding::Encode<u16, D>,
T7: fidl::encoding::Encode<u32, D>,
T8: fidl::encoding::Encode<u64, D>,
T9: fidl::encoding::Encode<f32, D>,
T10: fidl::encoding::Encode<f64, D>,
> fidl::encoding::Encode<PrimitiveTypes, D>
for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PrimitiveTypes {
#[inline(always)]
fn new_empty() -> Self {
Self {
b: fidl::new_empty!(bool, D),
i8: fidl::new_empty!(i8, D),
i16: fidl::new_empty!(i16, D),
i32: fidl::new_empty!(i32, D),
i64: fidl::new_empty!(i64, D),
u8: fidl::new_empty!(u8, D),
u16: fidl::new_empty!(u16, D),
u32: fidl::new_empty!(u32, D),
u64: fidl::new_empty!(u64, D),
f32: fidl::new_empty!(f32, D),
f64: fidl::new_empty!(f64, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D, &mut self.b, decoder, offset + 0, _depth)?;
fidl::decode!(i8, D, &mut self.i8, decoder, offset + 1, _depth)?;
fidl::decode!(i16, D, &mut self.i16, decoder, offset + 2, _depth)?;
fidl::decode!(i32, D, &mut self.i32, decoder, offset + 4, _depth)?;
fidl::decode!(i64, D, &mut self.i64, decoder, offset + 8, _depth)?;
fidl::decode!(u8, D, &mut self.u8, decoder, offset + 16, _depth)?;
fidl::decode!(u16, D, &mut self.u16, decoder, offset + 18, _depth)?;
fidl::decode!(u32, D, &mut self.u32, decoder, offset + 20, _depth)?;
fidl::decode!(u64, D, &mut self.u64, decoder, offset + 24, _depth)?;
fidl::decode!(f32, D, &mut self.f32, decoder, offset + 32, _depth)?;
fidl::decode!(f64, D, &mut self.f64, decoder, offset + 40, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Strings {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Strings, D> for &Strings {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Strings>(offset);
fidl::encoding::Encode::<Strings, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
T2: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
T3: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
T4: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<2>>, D>,
T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
> fidl::encoding::Encode<Strings, D> for (T0, T1, T2, T3, T4, T5)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Strings {
#[inline(always)]
fn new_empty() -> Self {
Self {
s: fidl::new_empty!(fidl::encoding::UnboundedString, D),
nullable_s: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
D
),
size_0_s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D),
size_1_s: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
nullable_size_0_s: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
D
),
nullable_size_1_s: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
D
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.s,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::UnboundedString>,
D,
&mut self.nullable_s,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::BoundedString<2>,
D,
&mut self.size_0_s,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(
fidl::encoding::BoundedString<32>,
D,
&mut self.size_1_s,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
D,
&mut self.nullable_size_0_s,
decoder,
offset + 64,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
D,
&mut self.nullable_size_1_s,
decoder,
offset + 80,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Structs {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Structs, D> for &Structs {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Structs>(offset);
fidl::encoding::Encode::<Structs, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<ThisIsAStruct, D>,
T1: fidl::encoding::Encode<fidl::encoding::Boxed<ThisIsAStruct>, D>,
T2: fidl::encoding::Encode<ThisIsAnEmptyStruct, D>,
> fidl::encoding::Encode<Structs, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Structs {
#[inline(always)]
fn new_empty() -> Self {
Self {
s: fidl::new_empty!(ThisIsAStruct, D),
nullable_s: fidl::new_empty!(fidl::encoding::Boxed<ThisIsAStruct>, D),
es: fidl::new_empty!(ThisIsAnEmptyStruct, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D, &mut self.s, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::Boxed<ThisIsAStruct>,
D,
&mut self.nullable_s,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(ThisIsAnEmptyStruct, D, &mut self.es, decoder, offset + 24, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAStruct {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAStruct, D>
for &ThisIsAStruct
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAStruct>(offset);
fidl::encoding::Encode::<ThisIsAStruct, D>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.s,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
> fidl::encoding::Encode<ThisIsAStruct, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAStruct>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAStruct {
#[inline(always)]
fn new_empty() -> Self {
Self { s: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
D,
&mut self.s,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAnEmptyStruct {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAnEmptyStruct, D>
for &ThisIsAnEmptyStruct
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ThisIsAnEmptyStruct>(offset);
encoder.write_num(0u8, offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAnEmptyStruct {
#[inline(always)]
fn new_empty() -> Self {
Self
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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),
}
}
}
impl fidl::encoding::ValueTypeMarker for Unions {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Unions, D> for &Unions {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Unions>(offset);
fidl::encoding::Encode::<Unions, D>::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<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<ThisIsAUnion, D>,
T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<ThisIsAUnion>, D>,
> fidl::encoding::Encode<Unions, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Unions {
#[inline(always)]
fn new_empty() -> Self {
Self {
u: fidl::new_empty!(ThisIsAUnion, D),
nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<ThisIsAUnion>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ThisIsAUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::OptionalUnion<ThisIsAUnion>,
D,
&mut self.nullable_u,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<Vectors, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut Vectors
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vectors>(offset);
fidl::encoding::Encode::<Vectors, fidl::encoding::DefaultFuchsiaResourceDialect>::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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<i8>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T2: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<i16>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T3: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T4: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<i64>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T5: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<u8>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T6: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<u16>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T7: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<u32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T8: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<u64>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T9: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<f32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T10: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<f64>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T11: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T12: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T13: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T14: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T15: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T16: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T17: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T18: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T19: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T20: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T21: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T22: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T23: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T24: fidl::encoding::Encode<
fidl::encoding::Vector<bool, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T25: fidl::encoding::Encode<
fidl::encoding::Vector<i8, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T26: fidl::encoding::Encode<
fidl::encoding::Vector<i16, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T27: fidl::encoding::Encode<
fidl::encoding::Vector<i32, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T28: fidl::encoding::Encode<
fidl::encoding::Vector<i64, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T29: fidl::encoding::Encode<
fidl::encoding::Vector<u8, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T30: fidl::encoding::Encode<
fidl::encoding::Vector<u16, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T31: fidl::encoding::Encode<
fidl::encoding::Vector<u32, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T32: fidl::encoding::Encode<
fidl::encoding::Vector<u64, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T33: fidl::encoding::Encode<
fidl::encoding::Vector<f32, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T34: fidl::encoding::Encode<
fidl::encoding::Vector<f64, 1>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T35: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T36: fidl::encoding::Encode<
fidl::encoding::Vector<bool, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T37: fidl::encoding::Encode<
fidl::encoding::Vector<i8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T38: fidl::encoding::Encode<
fidl::encoding::Vector<i16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T39: fidl::encoding::Encode<
fidl::encoding::Vector<i32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T40: fidl::encoding::Encode<
fidl::encoding::Vector<i64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T41: fidl::encoding::Encode<
fidl::encoding::Vector<u8, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T42: fidl::encoding::Encode<
fidl::encoding::Vector<u16, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T43: fidl::encoding::Encode<
fidl::encoding::Vector<u32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T44: fidl::encoding::Encode<
fidl::encoding::Vector<u64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T45: fidl::encoding::Encode<
fidl::encoding::Vector<f32, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T46: fidl::encoding::Encode<
fidl::encoding::Vector<f64, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T47: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T48: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T49: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T50: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T51: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T52: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T53: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T54: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T55: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T56: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T57: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T58: fidl::encoding::Encode<
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T59: fidl::encoding::Encode<
fidl::encoding::Vector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T60: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T61: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T62: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T63: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T64: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T65: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T66: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T67: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T68: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T69: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T70: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T71: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T72: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T73: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T74: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T75: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T76: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T77: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T78: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T79: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T80: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T81: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T82: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
>,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T84: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T85: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T86: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T87: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T88: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T89: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T90: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T91: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T92: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T93: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T94: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T95: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T96: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T97: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T98: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T99: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T100: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T101: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T102: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T103: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T104: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T105: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T106: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T107: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T108: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T109: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T110: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T111: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T112: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T113: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T114: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T115: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T116: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T117: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T118: fidl::encoding::Encode<
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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::DefaultFuchsiaResourceDialect,
>,
> fidl::encoding::Encode<Vectors, fidl::encoding::DefaultFuchsiaResourceDialect>
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<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect> for Vectors {
#[inline(always)]
fn new_empty() -> Self {
Self {
b_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<bool>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<i8>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<i16>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<i32>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<i64>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<u8>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<u16>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<u32>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<u64>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<f32>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<f64>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
handle_0: fidl::new_empty!(
fidl::encoding::UnboundedVector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
handle_1: fidl::new_empty!(
fidl::encoding::UnboundedVector<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
2,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_sized_0: fidl::new_empty!(fidl::encoding::Vector<bool, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i8_sized_0: fidl::new_empty!(fidl::encoding::Vector<i8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i16_sized_0: fidl::new_empty!(fidl::encoding::Vector<i16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i32_sized_0: fidl::new_empty!(fidl::encoding::Vector<i32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
i64_sized_0: fidl::new_empty!(fidl::encoding::Vector<i64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u8_sized_0: fidl::new_empty!(fidl::encoding::Vector<u8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u16_sized_0: fidl::new_empty!(fidl::encoding::Vector<u16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u32_sized_0: fidl::new_empty!(fidl::encoding::Vector<u32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
u64_sized_0: fidl::new_empty!(fidl::encoding::Vector<u64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
f32_sized_0: fidl::new_empty!(fidl::encoding::Vector<f32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
f64_sized_0: fidl::new_empty!(fidl::encoding::Vector<f64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect),
handle_sized_0: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_sized_1: fidl::new_empty!(fidl::encoding::Vector<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i8_sized_1: fidl::new_empty!(fidl::encoding::Vector<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i16_sized_1: fidl::new_empty!(fidl::encoding::Vector<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i32_sized_1: fidl::new_empty!(fidl::encoding::Vector<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
i64_sized_1: fidl::new_empty!(fidl::encoding::Vector<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u8_sized_1: fidl::new_empty!(fidl::encoding::Vector<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u16_sized_1: fidl::new_empty!(fidl::encoding::Vector<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u32_sized_1: fidl::new_empty!(fidl::encoding::Vector<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
u64_sized_1: fidl::new_empty!(fidl::encoding::Vector<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
f32_sized_1: fidl::new_empty!(fidl::encoding::Vector<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
f64_sized_1: fidl::new_empty!(fidl::encoding::Vector<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
handle_sized_1: fidl::new_empty!(
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
3,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_sized_2: fidl::new_empty!(
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
handle_nullable_0: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
1,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_nullable_1: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
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,
>,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_nullable_sized_0: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_nullable_sized_1: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
b_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i8_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i16_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i32_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
i64_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u8_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u16_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u32_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
u64_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f32_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
f64_nullable_sized_2: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<bool>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_0,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i8>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_0,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i16>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_0,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_0,
decoder,
offset + 48,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<i64>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_0,
decoder,
offset + 64,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_0,
decoder,
offset + 80,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u16>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_0,
decoder,
offset + 96,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_0,
decoder,
offset + 112,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u64>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_0,
decoder,
offset + 128,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<f32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_0,
decoder,
offset + 144,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<f64>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f64_0,
decoder,
offset + 160,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<
fidl::encoding::HandleType<
fidl::Handle,
{ fidl::ObjectType::NONE.into_raw() },
2147483648,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_0,
decoder,
offset + 176,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_1,
decoder,
offset + 192,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_1,
decoder,
offset + 208,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_1,
decoder,
offset + 224,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_1,
decoder,
offset + 240,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_1,
decoder,
offset + 256,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_1,
decoder,
offset + 272,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_1,
decoder,
offset + 288,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_1,
decoder,
offset + 304,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_1,
decoder,
offset + 320,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_1,
decoder,
offset + 336,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_1,
decoder,
offset + 368,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<bool, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.b_sized_0, decoder, offset + 384, _depth)?;
fidl::decode!(fidl::encoding::Vector<i8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i8_sized_0, decoder, offset + 400, _depth)?;
fidl::decode!(fidl::encoding::Vector<i16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i16_sized_0, decoder, offset + 416, _depth)?;
fidl::decode!(fidl::encoding::Vector<i32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i32_sized_0, decoder, offset + 432, _depth)?;
fidl::decode!(fidl::encoding::Vector<i64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i64_sized_0, decoder, offset + 448, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u8_sized_0, decoder, offset + 464, _depth)?;
fidl::decode!(fidl::encoding::Vector<u16, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u16_sized_0, decoder, offset + 480, _depth)?;
fidl::decode!(fidl::encoding::Vector<u32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u32_sized_0, decoder, offset + 496, _depth)?;
fidl::decode!(fidl::encoding::Vector<u64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u64_sized_0, decoder, offset + 512, _depth)?;
fidl::decode!(fidl::encoding::Vector<f32, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f32_sized_0, decoder, offset + 528, _depth)?;
fidl::decode!(fidl::encoding::Vector<f64, 1>, fidl::encoding::DefaultFuchsiaResourceDialect, &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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_sized_0,
decoder,
offset + 560,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<bool, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.b_sized_1, decoder, offset + 576, _depth)?;
fidl::decode!(fidl::encoding::Vector<i8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i8_sized_1, decoder, offset + 592, _depth)?;
fidl::decode!(fidl::encoding::Vector<i16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i16_sized_1, decoder, offset + 608, _depth)?;
fidl::decode!(fidl::encoding::Vector<i32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i32_sized_1, decoder, offset + 624, _depth)?;
fidl::decode!(fidl::encoding::Vector<i64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.i64_sized_1, decoder, offset + 640, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u8_sized_1, decoder, offset + 656, _depth)?;
fidl::decode!(fidl::encoding::Vector<u16, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u16_sized_1, decoder, offset + 672, _depth)?;
fidl::decode!(fidl::encoding::Vector<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u32_sized_1, decoder, offset + 688, _depth)?;
fidl::decode!(fidl::encoding::Vector<u64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.u64_sized_1, decoder, offset + 704, _depth)?;
fidl::decode!(fidl::encoding::Vector<f32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f32_sized_1, decoder, offset + 720, _depth)?;
fidl::decode!(fidl::encoding::Vector<f64, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_sized_1,
decoder,
offset + 752,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_sized_2,
decoder,
offset + 768,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_sized_2,
decoder,
offset + 784,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_sized_2,
decoder,
offset + 800,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_sized_2,
decoder,
offset + 816,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_sized_2,
decoder,
offset + 832,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_sized_2,
decoder,
offset + 848,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_sized_2,
decoder,
offset + 864,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_sized_2,
decoder,
offset + 880,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_sized_2,
decoder,
offset + 896,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_sized_2,
decoder,
offset + 912,
_depth
)?;
fidl::decode!(
fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_sized_2,
decoder,
offset + 944,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_nullable_0,
decoder,
offset + 960,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_nullable_0,
decoder,
offset + 976,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_nullable_0,
decoder,
offset + 992,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_nullable_0,
decoder,
offset + 1008,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_nullable_0,
decoder,
offset + 1024,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_nullable_0,
decoder,
offset + 1040,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_nullable_0,
decoder,
offset + 1056,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_nullable_0,
decoder,
offset + 1072,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_nullable_0,
decoder,
offset + 1088,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_nullable_0,
decoder,
offset + 1104,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_nullable_0,
decoder,
offset + 1136,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<bool, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_nullable_1,
decoder,
offset + 1152,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i8, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_nullable_1,
decoder,
offset + 1168,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i16, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_nullable_1,
decoder,
offset + 1184,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_nullable_1,
decoder,
offset + 1200,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<i64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_nullable_1,
decoder,
offset + 1216,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_nullable_1,
decoder,
offset + 1232,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u16, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_nullable_1,
decoder,
offset + 1248,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_nullable_1,
decoder,
offset + 1264,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_nullable_1,
decoder,
offset + 1280,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f32, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_nullable_1,
decoder,
offset + 1296,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<f64, 2>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_nullable_1,
decoder,
offset + 1328,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_nullable_sized_0,
decoder,
offset + 1344,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_nullable_sized_0,
decoder,
offset + 1360,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_nullable_sized_0,
decoder,
offset + 1376,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_nullable_sized_0,
decoder,
offset + 1392,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_nullable_sized_0,
decoder,
offset + 1408,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_nullable_sized_0,
decoder,
offset + 1424,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_nullable_sized_0,
decoder,
offset + 1440,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_nullable_sized_0,
decoder,
offset + 1456,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_nullable_sized_0,
decoder,
offset + 1472,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_nullable_sized_0,
decoder,
offset + 1488,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 1>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_nullable_sized_0,
decoder,
offset + 1520,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<bool, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_nullable_sized_1,
decoder,
offset + 1536,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i8, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_nullable_sized_1,
decoder,
offset + 1552,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i16, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_nullable_sized_1,
decoder,
offset + 1568,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_nullable_sized_1,
decoder,
offset + 1584,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<i64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_nullable_sized_1,
decoder,
offset + 1600,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_nullable_sized_1,
decoder,
offset + 1616,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u16, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_nullable_sized_1,
decoder,
offset + 1632,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_nullable_sized_1,
decoder,
offset + 1648,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_nullable_sized_1,
decoder,
offset + 1664,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f32, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_nullable_sized_1,
decoder,
offset + 1680,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<f64, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.handle_nullable_sized_1,
decoder,
offset + 1712,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Vector<fidl::encoding::Vector<bool, 2>, 3>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.b_nullable_sized_2,
decoder,
offset + 1728,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i8, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i8_nullable_sized_2,
decoder,
offset + 1744,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i16, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i16_nullable_sized_2,
decoder,
offset + 1760,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i32, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i32_nullable_sized_2,
decoder,
offset + 1776,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<i64, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.i64_nullable_sized_2,
decoder,
offset + 1792,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u8, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u8_nullable_sized_2,
decoder,
offset + 1808,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u16, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u16_nullable_sized_2,
decoder,
offset + 1824,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u32, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u32_nullable_sized_2,
decoder,
offset + 1840,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<u64, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.u64_nullable_sized_2,
decoder,
offset + 1856,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f32, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.f32_nullable_sized_2,
decoder,
offset + 1872,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<fidl::encoding::Vector<f64, 2>, 3>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&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
}
}
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::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
}
}
unsafe impl fidl::encoding::Encode<AllTypesTable, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut AllTypesTable
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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>, fidl::encoding::DefaultFuchsiaResourceDialect>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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,
fidl::encoding::DefaultFuchsiaResourceDialect,
>(
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, fidl::encoding::DefaultFuchsiaResourceDialect> for AllTypesTable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
bool,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
i8,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
i16,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
i32,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
i64,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
u8,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
u16,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
u32,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
u64,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
f32,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
f64,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
DefaultBits,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect));
fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, 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::encoding::DefaultFuchsiaResourceDialect
)
});
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
ThisIsAStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
ThisIsAUnion,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect));
fidl::decode!(fidl::encoding::Array<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, 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::encoding::DefaultFuchsiaResourceDialect
)
});
fidl::decode!(
fidl::encoding::UnboundedVector<u32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
ThisIsATable,
fidl::encoding::DefaultFuchsiaResourceDialect,
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::encoding::DefaultFuchsiaResourceDialect)
});
fidl::decode!(
ThisIsAXunion,
fidl::encoding::DefaultFuchsiaResourceDialect,
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
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoTablePayloadWithErrorRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<EchoEchoTablePayloadWithErrorRequest, D>
for &EchoEchoTablePayloadWithErrorRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
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, D>(
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, D>(
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, D>(
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for EchoEchoTablePayloadWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
fidl::decode!(u64, D, 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, D));
fidl::decode!(
fidl::encoding::UnboundedString,
D,
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, D));
fidl::decode!(DefaultEnum, D, 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, D));
fidl::decode!(RespondWith, D, 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
}
}
impl fidl::encoding::ValueTypeMarker for RequestTable {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RequestTable, D>
for &RequestTable
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
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, D>(
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RequestTable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
fidl::decode!(u64, D, 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, D));
fidl::decode!(
fidl::encoding::UnboundedString,
D,
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
}
}
impl fidl::encoding::ValueTypeMarker for ResponseTable {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResponseTable, D>
for &ResponseTable
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResponseTable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
fidl::decode!(u64, D, 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
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsATable {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsATable, D>
for &ThisIsATable
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsATable {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
fidl::decode!(
fidl::encoding::UnboundedString,
D,
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 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::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
}
}
unsafe impl
fidl::encoding::Encode<AllTypesXunion, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut AllTypesXunion
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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, fidl::encoding::DefaultFuchsiaResourceDialect>(
<bool as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int8Member(ref val) => {
fidl::encoding::encode_in_envelope::<i8, fidl::encoding::DefaultFuchsiaResourceDialect>(
<i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int16Member(ref val) => {
fidl::encoding::encode_in_envelope::<i16, fidl::encoding::DefaultFuchsiaResourceDialect>(
<i16 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int32Member(ref val) => {
fidl::encoding::encode_in_envelope::<i32, fidl::encoding::DefaultFuchsiaResourceDialect>(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Int64Member(ref val) => {
fidl::encoding::encode_in_envelope::<i64, fidl::encoding::DefaultFuchsiaResourceDialect>(
<i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint8Member(ref val) => {
fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
<u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint16Member(ref val) => {
fidl::encoding::encode_in_envelope::<u16, fidl::encoding::DefaultFuchsiaResourceDialect>(
<u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint32Member(ref val) => {
fidl::encoding::encode_in_envelope::<u32, fidl::encoding::DefaultFuchsiaResourceDialect>(
<u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Uint64Member(ref val) => {
fidl::encoding::encode_in_envelope::<u64, fidl::encoding::DefaultFuchsiaResourceDialect>(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Float32Member(ref val) => {
fidl::encoding::encode_in_envelope::<f32, fidl::encoding::DefaultFuchsiaResourceDialect>(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::Float64Member(ref val) => {
fidl::encoding::encode_in_envelope::<f64, fidl::encoding::DefaultFuchsiaResourceDialect>(
<f64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::EnumMember(ref val) => {
fidl::encoding::encode_in_envelope::<DefaultEnum, fidl::encoding::DefaultFuchsiaResourceDialect>(
<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::BitsMember(ref val) => {
fidl::encoding::encode_in_envelope::<DefaultBits, fidl::encoding::DefaultFuchsiaResourceDialect>(
<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::DefaultFuchsiaResourceDialect>(
<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::DefaultFuchsiaResourceDialect>(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::StructMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsAStruct, fidl::encoding::DefaultFuchsiaResourceDialect>(
<ThisIsAStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::UnionMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsAUnion, fidl::encoding::DefaultFuchsiaResourceDialect>(
<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::DefaultFuchsiaResourceDialect>(
<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::DefaultFuchsiaResourceDialect>(
<fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::TableMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsATable, fidl::encoding::DefaultFuchsiaResourceDialect>(
<ThisIsATable as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::XunionMember(ref val) => {
fidl::encoding::encode_in_envelope::<ThisIsAXunion, fidl::encoding::DefaultFuchsiaResourceDialect>(
<ThisIsAXunion as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
AllTypesXunion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for AllTypesXunion
{
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::BoolMember(ref mut val) = self {
fidl::decode!(
bool,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int8Member(ref mut val) = self {
fidl::decode!(
i8,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int16Member(ref mut val) = self {
fidl::decode!(
i16,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int32Member(ref mut val) = self {
fidl::decode!(
i32,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Int64Member(ref mut val) = self {
fidl::decode!(
i64,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint8Member(ref mut val) = self {
fidl::decode!(
u8,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint16Member(ref mut val) = self {
fidl::decode!(
u16,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint32Member(ref mut val) = self {
fidl::decode!(
u32,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Uint64Member(ref mut val) = self {
fidl::decode!(
u64,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Float32Member(ref mut val) = self {
fidl::decode!(
f32,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::Float64Member(ref mut val) = self {
fidl::decode!(
f64,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::EnumMember(ref mut val) = self {
fidl::decode!(
DefaultEnum,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::BitsMember(ref mut val) = self {
fidl::decode!(
DefaultBits,
fidl::encoding::DefaultFuchsiaResourceDialect,
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>, fidl::encoding::DefaultFuchsiaResourceDialect),
);
}
#[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>, fidl::encoding::DefaultFuchsiaResourceDialect, 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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::StringMember(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedString,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::StructMember(ref mut val) = self {
fidl::decode!(
ThisIsAStruct,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::UnionMember(ref mut val) = self {
fidl::decode!(
ThisIsAUnion,
fidl::encoding::DefaultFuchsiaResourceDialect,
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>, fidl::encoding::DefaultFuchsiaResourceDialect),
);
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::ArrayMember(ref mut val) = self {
fidl::decode!(fidl::encoding::Array<u32, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, 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>,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::VectorMember(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedVector<u32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::TableMember(ref mut val) = self {
fidl::decode!(
ThisIsATable,
fidl::encoding::DefaultFuchsiaResourceDialect,
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,
fidl::encoding::DefaultFuchsiaResourceDialect
));
}
#[allow(irrefutable_let_patterns)]
if let AllTypesXunion::XunionMember(ref mut val) = self {
fidl::decode!(
ThisIsAXunion,
fidl::encoding::DefaultFuchsiaResourceDialect,
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(())
}
}
impl fidl::encoding::ValueTypeMarker for EchoEchoUnionPayloadWithErrorRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<EchoEchoUnionPayloadWithErrorRequest, D>
for &EchoEchoUnionPayloadWithErrorRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
<UnsignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
EchoEchoUnionPayloadWithErrorRequest::Signed(ref val) => {
fidl::encoding::encode_in_envelope::<SignedErrorable, D>(
<SignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking { .. } => {
Err(fidl::Error::UnknownUnionTag)
}
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for EchoEchoUnionPayloadWithErrorRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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,
D
));
}
#[allow(irrefutable_let_patterns)]
if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref mut val) = self {
fidl::decode!(UnsignedErrorable, D, 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,
D
));
}
#[allow(irrefutable_let_patterns)]
if let EchoEchoUnionPayloadWithErrorRequest::Signed(ref mut val) = self {
fidl::decode!(SignedErrorable, D, 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(())
}
}
impl fidl::encoding::ValueTypeMarker for RequestUnion {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RequestUnion, D>
for &RequestUnion
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
<Unsigned as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
RequestUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<Signed, D>(
<Signed as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
RequestUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RequestUnion {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
}
#[allow(irrefutable_let_patterns)]
if let RequestUnion::Unsigned(ref mut val) = self {
fidl::decode!(Unsigned, D, 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, D));
}
#[allow(irrefutable_let_patterns)]
if let RequestUnion::Signed(ref mut val) = self {
fidl::decode!(Signed, D, 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(())
}
}
impl fidl::encoding::ValueTypeMarker for ResponseUnion {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResponseUnion, D>
for &ResponseUnion
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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, D>(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
ResponseUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
<i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResponseUnion {
#[inline(always)]
fn new_empty() -> Self {
Self::Unsigned(fidl::new_empty!(u64, D))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
}
#[allow(irrefutable_let_patterns)]
if let ResponseUnion::Unsigned(ref mut val) = self {
fidl::decode!(u64, D, 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, D));
}
#[allow(irrefutable_let_patterns)]
if let ResponseUnion::Signed(ref mut val) = self {
fidl::decode!(i64, D, 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(())
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAUnion {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAUnion, D>
for &ThisIsAUnion
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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,
D,
>(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
val,
),
encoder,
offset + 8,
_depth,
),
ThisIsAUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
<bool as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAUnion {
#[inline(always)]
fn new_empty() -> Self {
Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAUnion::S(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedString,
D,
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, D));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAUnion::B(ref mut val) = self {
fidl::decode!(bool, D, 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(())
}
}
impl fidl::encoding::ValueTypeMarker for ThisIsAXunion {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAXunion, D>
for &ThisIsAXunion
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
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,
D,
>(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
val,
),
encoder,
offset + 8,
_depth,
),
ThisIsAXunion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
<bool as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
ThisIsAXunion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAXunion {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
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, D));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAXunion::S(ref mut val) = self {
fidl::decode!(
fidl::encoding::UnboundedString,
D,
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, D));
}
#[allow(irrefutable_let_patterns)]
if let ThisIsAXunion::B(ref mut val) = self {
fidl::decode!(bool, D, 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(())
}
}
}