1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// WARNING: This file is machine generated by fidlgen.

// fidl_experiment = no_optional_structs
// fidl_experiment = simple_empty_response_syntax
// fidl_experiment = unknown_interactions

#![allow(
    unused_parens, // one-element-tuple-case is not a tuple
    unused_mut, // not all args require mutation, but many do
    nonstandard_style, // auto-caps does its best, but is not always successful
)]
#![recursion_limit = "512"]

#[cfg(target_os = "fuchsia")]
#[allow(unused_imports)]
use fuchsia_zircon as zx;

#[allow(unused_imports)]
use {
    bitflags::bitflags,
    fidl::{
        client::{decode_transaction_body_fut, QueryResponseFut},
        encoding::{zerocopy, Decodable as _, Encodable as _},
        endpoints::{ControlHandle as _, Responder as _},
        fidl_bits, fidl_empty_struct, fidl_enum, fidl_struct, fidl_struct_copy, fidl_table,
        fidl_union, wrap_handle_metadata,
    },
    fuchsia_zircon_status as zx_status,
    futures::future::{self, MaybeDone, TryFutureExt},
};

#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum ErrorSyntaxResult {
    Response(ErrorSyntaxResponse),
    Err(u32),
}

impl ErrorSyntaxResult {
    #[inline]
    pub fn ordinal(&self) -> u64 {
        match *self {
            Self::Response(_) => 1,
            Self::Err(_) => 2,
        }
    }
    #[deprecated = "Strict unions should not use `is_unknown`"]
    #[inline]
    pub fn is_unknown(&self) -> bool {
        false
    }
}

impl fidl::encoding::TopLevel for ErrorSyntaxResult {}

impl fidl::encoding::Persistable for ErrorSyntaxResult {}

fidl_union! {
    name: ErrorSyntaxResult,
    members: [
        Response {
            ty: ErrorSyntaxResponse,
            ordinal: 1,
        },
        Err {
            ty: u32,
            ordinal: 2,
        },
    ],
}

#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(C)]
pub struct ErrorSyntaxResponse {
    pub ptrs: i64,
    pub payload_buffer_id: u32,
    pub payload_offset: u64,
    pub payload_size: u64,
    pub flags: u32,
    pub buffer_config: u64,
    pub stream_segment_id: u64,
}

impl fidl::encoding::TopLevel for ErrorSyntaxResponse {}

impl fidl::encoding::Persistable for ErrorSyntaxResponse {}

fidl_struct_copy! {
    name: ErrorSyntaxResponse,
    members: [
        ptrs {
            ty: i64,
            offset_v1: 0,
            offset_v2: 0,
        },
        payload_buffer_id {
            ty: u32,
            offset_v1: 8,
            offset_v2: 8,
        },
        payload_offset {
            ty: u64,
            offset_v1: 16,
            offset_v2: 16,
        },
        payload_size {
            ty: u64,
            offset_v1: 24,
            offset_v2: 24,
        },
        flags {
            ty: u32,
            offset_v1: 32,
            offset_v2: 32,
        },
        buffer_config {
            ty: u64,
            offset_v1: 40,
            offset_v2: 40,
        },
        stream_segment_id {
            ty: u64,
            offset_v1: 48,
            offset_v2: 48,
        },
    ],
    padding_v1: [
        {
            ty: u64,
            offset: 8,
            mask: 0xffffffff00000000u64,
        },
        {
            ty: u64,
            offset: 32,
            mask: 0xffffffff00000000u64,
        },],
    padding_v2: [
        {
            ty: u64,
            offset: 8,
            mask: 0xffffffff00000000u64,
        },
        {
            ty: u64,
            offset: 32,
            mask: 0xffffffff00000000u64,
        },],
    size_v1: 56,
    size_v2: 56,
    align_v1: 8,
    align_v2: 8,
}

#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ErrorSyntaxResultStruct {
    pub result: ErrorSyntaxResult,
}

impl fidl::encoding::TopLevel for ErrorSyntaxResultStruct {}

impl fidl::encoding::Persistable for ErrorSyntaxResultStruct {}

fidl_struct! {
    name: ErrorSyntaxResultStruct,
    members: [
        result {
            ty: ErrorSyntaxResult,
            offset_v1: 0,
            offset_v2: 0,
        },
    ],
    padding_v1: [],
    padding_v2: [],
    size_v1: 24,
    size_v2: 16,
    align_v1: 8,
    align_v2: 8,
}