1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_component_sandbox__common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub type Token = fdomain_client::EventPair;
16
17#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18pub struct CapabilityStoreConnectorCreateRequest {
19 pub id: u64,
20 pub receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
21}
22
23impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
24 for CapabilityStoreConnectorCreateRequest
25{
26}
27
28#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29pub struct CapabilityStoreConnectorOpenRequest {
30 pub id: u64,
31 pub server_end: fdomain_client::Channel,
32}
33
34impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
35 for CapabilityStoreConnectorOpenRequest
36{
37}
38
39#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40pub struct CapabilityStoreDictionaryDrainRequest {
41 pub id: u64,
42 pub iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
43}
44
45impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
46 for CapabilityStoreDictionaryDrainRequest
47{
48}
49
50#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
51pub struct CapabilityStoreDictionaryEnumerateRequest {
52 pub id: u64,
53 pub iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
54}
55
56impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
57 for CapabilityStoreDictionaryEnumerateRequest
58{
59}
60
61#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
62pub struct CapabilityStoreDictionaryKeysRequest {
63 pub id: u64,
64 pub iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
65}
66
67impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
68 for CapabilityStoreDictionaryKeysRequest
69{
70}
71
72#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
73pub struct CapabilityStoreDictionaryLegacyExportRequest {
74 pub id: u64,
75 pub server_end: fdomain_client::Channel,
76}
77
78impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
79 for CapabilityStoreDictionaryLegacyExportRequest
80{
81}
82
83#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
84pub struct CapabilityStoreDictionaryLegacyImportRequest {
85 pub id: u64,
86 pub client_end: fdomain_client::Channel,
87}
88
89impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
90 for CapabilityStoreDictionaryLegacyImportRequest
91{
92}
93
94#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
95pub struct CapabilityStoreDirConnectorCreateRequest {
96 pub id: u64,
97 pub receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
98}
99
100impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
101 for CapabilityStoreDirConnectorCreateRequest
102{
103}
104
105#[derive(Debug, PartialEq)]
106pub struct CapabilityStoreImportRequest {
107 pub id: u64,
108 pub capability: Capability,
109}
110
111impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
112 for CapabilityStoreImportRequest
113{
114}
115
116#[derive(Debug, PartialEq)]
117pub struct CapabilityStoreExportResponse {
118 pub capability: Capability,
119}
120
121impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
122 for CapabilityStoreExportResponse
123{
124}
125
126#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
127pub struct Connector {
128 pub token: fdomain_client::EventPair,
129}
130
131impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Connector {}
132
133#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
134pub struct DictionaryDrainIteratorGetNextResponse {
135 pub items: Vec<DictionaryItem>,
136 pub end_id: u64,
137}
138
139impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
140 for DictionaryDrainIteratorGetNextResponse
141{
142}
143
144#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
145pub struct DictionaryEnumerateIteratorGetNextResponse {
146 pub items: Vec<DictionaryOptionalItem>,
147 pub end_id: u64,
148}
149
150impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
151 for DictionaryEnumerateIteratorGetNextResponse
152{
153}
154
155#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
156pub struct DictionaryKeysIteratorGetNextResponse {
157 pub keys: Vec<String>,
158}
159
160impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
161 for DictionaryKeysIteratorGetNextResponse
162{
163}
164
165#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
169pub struct DictionaryOptionalItem {
170 pub key: String,
171 pub value: Option<Box<WrappedCapabilityId>>,
172}
173
174impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DictionaryOptionalItem {}
175
176#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
177pub struct DictionaryRef {
178 pub token: fdomain_client::EventPair,
179}
180
181impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DictionaryRef {}
182
183#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
184pub struct DirConnector {
185 pub token: fdomain_client::EventPair,
186}
187
188impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirConnector {}
189
190#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
191pub struct DirEntry {
192 pub token: fdomain_client::EventPair,
193}
194
195impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirEntry {}
196
197#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
200pub struct InstanceToken {
201 pub token: fdomain_client::EventPair,
202}
203
204impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for InstanceToken {}
205
206#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
208pub struct ProtocolPayload {
209 pub channel: fdomain_client::Channel,
210}
211
212impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ProtocolPayload {}
213
214#[derive(Debug, Default, PartialEq)]
215pub struct CapabilityStoreDirConnectorOpenRequest {
216 pub id: Option<u64>,
217 pub server_end: Option<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>>,
218 pub flags: Option<fdomain_fuchsia_io::Flags>,
219 pub path: Option<String>,
220 #[doc(hidden)]
221 pub __source_breaking: fidl::marker::SourceBreaking,
222}
223
224impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
225 for CapabilityStoreDirConnectorOpenRequest
226{
227}
228
229#[derive(Debug, Default, PartialEq)]
230pub struct DirReceiverReceiveRequest {
231 pub channel: Option<fdomain_client::Channel>,
232 pub flags: Option<fdomain_fuchsia_io::Flags>,
233 pub subdir: Option<String>,
234 #[doc(hidden)]
235 pub __source_breaking: fidl::marker::SourceBreaking,
236}
237
238impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirReceiverReceiveRequest {}
239
240#[derive(Debug, Default, PartialEq)]
242pub struct RouteRequest {
243 pub requesting: Option<InstanceToken>,
246 pub metadata: Option<DictionaryRef>,
249 #[doc(hidden)]
250 pub __source_breaking: fidl::marker::SourceBreaking,
251}
252
253impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RouteRequest {}
254
255#[derive(Debug)]
256pub enum Capability {
257 Unit(Unit),
258 Handle(fdomain_client::NullableHandle),
259 Data(Data),
260 Dictionary(DictionaryRef),
261 Connector(Connector),
262 DirConnector(DirConnector),
263 Directory(fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>),
264 DirEntry(DirEntry),
265 ConnectorRouter(fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>),
266 DictionaryRouter(fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>),
267 DirEntryRouter(fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>),
268 DataRouter(fdomain_client::fidl::ClientEnd<DataRouterMarker>),
269 DirConnectorRouter(fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>),
270 #[doc(hidden)]
271 __SourceBreaking {
272 unknown_ordinal: u64,
273 },
274}
275
276#[macro_export]
278macro_rules! CapabilityUnknown {
279 () => {
280 _
281 };
282}
283
284impl PartialEq for Capability {
286 fn eq(&self, other: &Self) -> bool {
287 match (self, other) {
288 (Self::Unit(x), Self::Unit(y)) => *x == *y,
289 (Self::Handle(x), Self::Handle(y)) => *x == *y,
290 (Self::Data(x), Self::Data(y)) => *x == *y,
291 (Self::Dictionary(x), Self::Dictionary(y)) => *x == *y,
292 (Self::Connector(x), Self::Connector(y)) => *x == *y,
293 (Self::DirConnector(x), Self::DirConnector(y)) => *x == *y,
294 (Self::Directory(x), Self::Directory(y)) => *x == *y,
295 (Self::DirEntry(x), Self::DirEntry(y)) => *x == *y,
296 (Self::ConnectorRouter(x), Self::ConnectorRouter(y)) => *x == *y,
297 (Self::DictionaryRouter(x), Self::DictionaryRouter(y)) => *x == *y,
298 (Self::DirEntryRouter(x), Self::DirEntryRouter(y)) => *x == *y,
299 (Self::DataRouter(x), Self::DataRouter(y)) => *x == *y,
300 (Self::DirConnectorRouter(x), Self::DirConnectorRouter(y)) => *x == *y,
301 _ => false,
302 }
303 }
304}
305
306impl Capability {
307 #[inline]
308 pub fn ordinal(&self) -> u64 {
309 match *self {
310 Self::Unit(_) => 1,
311 Self::Handle(_) => 2,
312 Self::Data(_) => 3,
313 Self::Dictionary(_) => 4,
314 Self::Connector(_) => 5,
315 Self::DirConnector(_) => 6,
316 Self::Directory(_) => 7,
317 Self::DirEntry(_) => 8,
318 Self::ConnectorRouter(_) => 9,
319 Self::DictionaryRouter(_) => 10,
320 Self::DirEntryRouter(_) => 11,
321 Self::DataRouter(_) => 12,
322 Self::DirConnectorRouter(_) => 13,
323 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
324 }
325 }
326
327 #[inline]
328 pub fn unknown_variant_for_testing() -> Self {
329 Self::__SourceBreaking { unknown_ordinal: 0 }
330 }
331
332 #[inline]
333 pub fn is_unknown(&self) -> bool {
334 match self {
335 Self::__SourceBreaking { .. } => true,
336 _ => false,
337 }
338 }
339}
340
341impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Capability {}
342
343#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
344pub enum ConnectorRouterRouteResponse {
345 Connector(Connector),
346 Unavailable(Unit),
347}
348
349impl ConnectorRouterRouteResponse {
350 #[inline]
351 pub fn ordinal(&self) -> u64 {
352 match *self {
353 Self::Connector(_) => 1,
354 Self::Unavailable(_) => 2,
355 }
356 }
357}
358
359impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
360 for ConnectorRouterRouteResponse
361{
362}
363
364#[derive(Debug, PartialEq)]
365pub enum DataRouterRouteResponse {
366 Data(Data),
367 Unavailable(Unit),
368}
369
370impl DataRouterRouteResponse {
371 #[inline]
372 pub fn ordinal(&self) -> u64 {
373 match *self {
374 Self::Data(_) => 1,
375 Self::Unavailable(_) => 2,
376 }
377 }
378}
379
380impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DataRouterRouteResponse {}
381
382#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
383pub enum DictionaryRouterRouteResponse {
384 Dictionary(DictionaryRef),
385 Unavailable(Unit),
386}
387
388impl DictionaryRouterRouteResponse {
389 #[inline]
390 pub fn ordinal(&self) -> u64 {
391 match *self {
392 Self::Dictionary(_) => 1,
393 Self::Unavailable(_) => 2,
394 }
395 }
396}
397
398impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
399 for DictionaryRouterRouteResponse
400{
401}
402
403#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
404pub enum DirConnectorRouterRouteResponse {
405 DirConnector(DirConnector),
406 Unavailable(Unit),
407}
408
409impl DirConnectorRouterRouteResponse {
410 #[inline]
411 pub fn ordinal(&self) -> u64 {
412 match *self {
413 Self::DirConnector(_) => 1,
414 Self::Unavailable(_) => 2,
415 }
416 }
417}
418
419impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
420 for DirConnectorRouterRouteResponse
421{
422}
423
424#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
425pub enum DirEntryRouterRouteResponse {
426 DirEntry(DirEntry),
427 Unavailable(Unit),
428}
429
430impl DirEntryRouterRouteResponse {
431 #[inline]
432 pub fn ordinal(&self) -> u64 {
433 match *self {
434 Self::DirEntry(_) => 1,
435 Self::Unavailable(_) => 2,
436 }
437 }
438}
439
440impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
441 for DirEntryRouterRouteResponse
442{
443}
444
445#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
446pub enum DirectoryRouterRouteResponse {
447 Directory(fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>),
448 Unavailable(Unit),
449}
450
451impl DirectoryRouterRouteResponse {
452 #[inline]
453 pub fn ordinal(&self) -> u64 {
454 match *self {
455 Self::Directory(_) => 1,
456 Self::Unavailable(_) => 2,
457 }
458 }
459}
460
461impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
462 for DirectoryRouterRouteResponse
463{
464}
465
466#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
467pub struct CapabilityStoreMarker;
468
469impl fdomain_client::fidl::ProtocolMarker for CapabilityStoreMarker {
470 type Proxy = CapabilityStoreProxy;
471 type RequestStream = CapabilityStoreRequestStream;
472
473 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
474}
475impl fdomain_client::fidl::DiscoverableProtocolMarker for CapabilityStoreMarker {}
476pub type CapabilityStoreDuplicateResult = Result<(), CapabilityStoreError>;
477pub type CapabilityStoreDropResult = Result<(), CapabilityStoreError>;
478pub type CapabilityStoreExportResult = Result<Capability, CapabilityStoreError>;
479pub type CapabilityStoreImportResult = Result<(), CapabilityStoreError>;
480pub type CapabilityStoreConnectorCreateResult = Result<(), CapabilityStoreError>;
481pub type CapabilityStoreConnectorOpenResult = Result<(), CapabilityStoreError>;
482pub type CapabilityStoreDirConnectorCreateResult = Result<(), CapabilityStoreError>;
483pub type CapabilityStoreDirConnectorOpenResult = Result<(), CapabilityStoreError>;
484pub type CapabilityStoreDictionaryCreateResult = Result<(), CapabilityStoreError>;
485pub type CapabilityStoreDictionaryLegacyImportResult = Result<(), CapabilityStoreError>;
486pub type CapabilityStoreDictionaryLegacyExportResult = Result<(), CapabilityStoreError>;
487pub type CapabilityStoreDictionaryInsertResult = Result<(), CapabilityStoreError>;
488pub type CapabilityStoreDictionaryGetResult = Result<(), CapabilityStoreError>;
489pub type CapabilityStoreDictionaryRemoveResult = Result<(), CapabilityStoreError>;
490pub type CapabilityStoreDictionaryCopyResult = Result<(), CapabilityStoreError>;
491pub type CapabilityStoreDictionaryKeysResult = Result<(), CapabilityStoreError>;
492pub type CapabilityStoreDictionaryEnumerateResult = Result<(), CapabilityStoreError>;
493pub type CapabilityStoreDictionaryDrainResult = Result<(), CapabilityStoreError>;
494
495pub trait CapabilityStoreProxyInterface: Send + Sync {
496 type DuplicateResponseFut: std::future::Future<Output = Result<CapabilityStoreDuplicateResult, fidl::Error>>
497 + Send;
498 fn r#duplicate(&self, id: u64, dest_id: u64) -> Self::DuplicateResponseFut;
499 type DropResponseFut: std::future::Future<Output = Result<CapabilityStoreDropResult, fidl::Error>>
500 + Send;
501 fn r#drop(&self, id: u64) -> Self::DropResponseFut;
502 type ExportResponseFut: std::future::Future<Output = Result<CapabilityStoreExportResult, fidl::Error>>
503 + Send;
504 fn r#export(&self, id: u64) -> Self::ExportResponseFut;
505 type ImportResponseFut: std::future::Future<Output = Result<CapabilityStoreImportResult, fidl::Error>>
506 + Send;
507 fn r#import(&self, id: u64, capability: Capability) -> Self::ImportResponseFut;
508 type ConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorCreateResult, fidl::Error>>
509 + Send;
510 fn r#connector_create(
511 &self,
512 id: u64,
513 receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
514 ) -> Self::ConnectorCreateResponseFut;
515 type ConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorOpenResult, fidl::Error>>
516 + Send;
517 fn r#connector_open(
518 &self,
519 id: u64,
520 server_end: fdomain_client::Channel,
521 ) -> Self::ConnectorOpenResponseFut;
522 type DirConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorCreateResult, fidl::Error>>
523 + Send;
524 fn r#dir_connector_create(
525 &self,
526 id: u64,
527 receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
528 ) -> Self::DirConnectorCreateResponseFut;
529 type DirConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorOpenResult, fidl::Error>>
530 + Send;
531 fn r#dir_connector_open(
532 &self,
533 payload: CapabilityStoreDirConnectorOpenRequest,
534 ) -> Self::DirConnectorOpenResponseFut;
535 type DictionaryCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCreateResult, fidl::Error>>
536 + Send;
537 fn r#dictionary_create(&self, id: u64) -> Self::DictionaryCreateResponseFut;
538 type DictionaryLegacyImportResponseFut: std::future::Future<
539 Output = Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error>,
540 > + Send;
541 fn r#dictionary_legacy_import(
542 &self,
543 id: u64,
544 client_end: fdomain_client::Channel,
545 ) -> Self::DictionaryLegacyImportResponseFut;
546 type DictionaryLegacyExportResponseFut: std::future::Future<
547 Output = Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error>,
548 > + Send;
549 fn r#dictionary_legacy_export(
550 &self,
551 id: u64,
552 server_end: fdomain_client::Channel,
553 ) -> Self::DictionaryLegacyExportResponseFut;
554 type DictionaryInsertResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryInsertResult, fidl::Error>>
555 + Send;
556 fn r#dictionary_insert(
557 &self,
558 id: u64,
559 item: &DictionaryItem,
560 ) -> Self::DictionaryInsertResponseFut;
561 type DictionaryGetResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryGetResult, fidl::Error>>
562 + Send;
563 fn r#dictionary_get(&self, id: u64, key: &str, dest_id: u64) -> Self::DictionaryGetResponseFut;
564 type DictionaryRemoveResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryRemoveResult, fidl::Error>>
565 + Send;
566 fn r#dictionary_remove(
567 &self,
568 id: u64,
569 key: &str,
570 dest_id: Option<&WrappedCapabilityId>,
571 ) -> Self::DictionaryRemoveResponseFut;
572 type DictionaryCopyResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCopyResult, fidl::Error>>
573 + Send;
574 fn r#dictionary_copy(&self, id: u64, dest_id: u64) -> Self::DictionaryCopyResponseFut;
575 type DictionaryKeysResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryKeysResult, fidl::Error>>
576 + Send;
577 fn r#dictionary_keys(
578 &self,
579 id: u64,
580 iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
581 ) -> Self::DictionaryKeysResponseFut;
582 type DictionaryEnumerateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error>>
583 + Send;
584 fn r#dictionary_enumerate(
585 &self,
586 id: u64,
587 iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
588 ) -> Self::DictionaryEnumerateResponseFut;
589 type DictionaryDrainResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryDrainResult, fidl::Error>>
590 + Send;
591 fn r#dictionary_drain(
592 &self,
593 id: u64,
594 iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
595 ) -> Self::DictionaryDrainResponseFut;
596}
597
598#[derive(Debug, Clone)]
599pub struct CapabilityStoreProxy {
600 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
601}
602
603impl fdomain_client::fidl::Proxy for CapabilityStoreProxy {
604 type Protocol = CapabilityStoreMarker;
605
606 fn from_channel(inner: fdomain_client::Channel) -> Self {
607 Self::new(inner)
608 }
609
610 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
611 self.client.into_channel().map_err(|client| Self { client })
612 }
613
614 fn as_channel(&self) -> &fdomain_client::Channel {
615 self.client.as_channel()
616 }
617}
618
619impl CapabilityStoreProxy {
620 pub fn new(channel: fdomain_client::Channel) -> Self {
622 let protocol_name =
623 <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
624 Self { client: fidl::client::Client::new(channel, protocol_name) }
625 }
626
627 pub fn take_event_stream(&self) -> CapabilityStoreEventStream {
633 CapabilityStoreEventStream { event_receiver: self.client.take_event_receiver() }
634 }
635
636 pub fn r#duplicate(
644 &self,
645 mut id: u64,
646 mut dest_id: u64,
647 ) -> fidl::client::QueryResponseFut<
648 CapabilityStoreDuplicateResult,
649 fdomain_client::fidl::FDomainResourceDialect,
650 > {
651 CapabilityStoreProxyInterface::r#duplicate(self, id, dest_id)
652 }
653
654 pub fn r#drop(
660 &self,
661 mut id: u64,
662 ) -> fidl::client::QueryResponseFut<
663 CapabilityStoreDropResult,
664 fdomain_client::fidl::FDomainResourceDialect,
665 > {
666 CapabilityStoreProxyInterface::r#drop(self, id)
667 }
668
669 pub fn r#export(
677 &self,
678 mut id: u64,
679 ) -> fidl::client::QueryResponseFut<
680 CapabilityStoreExportResult,
681 fdomain_client::fidl::FDomainResourceDialect,
682 > {
683 CapabilityStoreProxyInterface::r#export(self, id)
684 }
685
686 pub fn r#import(
693 &self,
694 mut id: u64,
695 mut capability: Capability,
696 ) -> fidl::client::QueryResponseFut<
697 CapabilityStoreImportResult,
698 fdomain_client::fidl::FDomainResourceDialect,
699 > {
700 CapabilityStoreProxyInterface::r#import(self, id, capability)
701 }
702
703 pub fn r#connector_create(
710 &self,
711 mut id: u64,
712 mut receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
713 ) -> fidl::client::QueryResponseFut<
714 CapabilityStoreConnectorCreateResult,
715 fdomain_client::fidl::FDomainResourceDialect,
716 > {
717 CapabilityStoreProxyInterface::r#connector_create(self, id, receiver)
718 }
719
720 pub fn r#connector_open(
730 &self,
731 mut id: u64,
732 mut server_end: fdomain_client::Channel,
733 ) -> fidl::client::QueryResponseFut<
734 CapabilityStoreConnectorOpenResult,
735 fdomain_client::fidl::FDomainResourceDialect,
736 > {
737 CapabilityStoreProxyInterface::r#connector_open(self, id, server_end)
738 }
739
740 pub fn r#dir_connector_create(
747 &self,
748 mut id: u64,
749 mut receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
750 ) -> fidl::client::QueryResponseFut<
751 CapabilityStoreDirConnectorCreateResult,
752 fdomain_client::fidl::FDomainResourceDialect,
753 > {
754 CapabilityStoreProxyInterface::r#dir_connector_create(self, id, receiver)
755 }
756
757 pub fn r#dir_connector_open(
771 &self,
772 mut payload: CapabilityStoreDirConnectorOpenRequest,
773 ) -> fidl::client::QueryResponseFut<
774 CapabilityStoreDirConnectorOpenResult,
775 fdomain_client::fidl::FDomainResourceDialect,
776 > {
777 CapabilityStoreProxyInterface::r#dir_connector_open(self, payload)
778 }
779
780 pub fn r#dictionary_create(
786 &self,
787 mut id: u64,
788 ) -> fidl::client::QueryResponseFut<
789 CapabilityStoreDictionaryCreateResult,
790 fdomain_client::fidl::FDomainResourceDialect,
791 > {
792 CapabilityStoreProxyInterface::r#dictionary_create(self, id)
793 }
794
795 pub fn r#dictionary_legacy_import(
805 &self,
806 mut id: u64,
807 mut client_end: fdomain_client::Channel,
808 ) -> fidl::client::QueryResponseFut<
809 CapabilityStoreDictionaryLegacyImportResult,
810 fdomain_client::fidl::FDomainResourceDialect,
811 > {
812 CapabilityStoreProxyInterface::r#dictionary_legacy_import(self, id, client_end)
813 }
814
815 pub fn r#dictionary_legacy_export(
825 &self,
826 mut id: u64,
827 mut server_end: fdomain_client::Channel,
828 ) -> fidl::client::QueryResponseFut<
829 CapabilityStoreDictionaryLegacyExportResult,
830 fdomain_client::fidl::FDomainResourceDialect,
831 > {
832 CapabilityStoreProxyInterface::r#dictionary_legacy_export(self, id, server_end)
833 }
834
835 pub fn r#dictionary_insert(
845 &self,
846 mut id: u64,
847 mut item: &DictionaryItem,
848 ) -> fidl::client::QueryResponseFut<
849 CapabilityStoreDictionaryInsertResult,
850 fdomain_client::fidl::FDomainResourceDialect,
851 > {
852 CapabilityStoreProxyInterface::r#dictionary_insert(self, id, item)
853 }
854
855 pub fn r#dictionary_get(
867 &self,
868 mut id: u64,
869 mut key: &str,
870 mut dest_id: u64,
871 ) -> fidl::client::QueryResponseFut<
872 CapabilityStoreDictionaryGetResult,
873 fdomain_client::fidl::FDomainResourceDialect,
874 > {
875 CapabilityStoreProxyInterface::r#dictionary_get(self, id, key, dest_id)
876 }
877
878 pub fn r#dictionary_remove(
889 &self,
890 mut id: u64,
891 mut key: &str,
892 mut dest_id: Option<&WrappedCapabilityId>,
893 ) -> fidl::client::QueryResponseFut<
894 CapabilityStoreDictionaryRemoveResult,
895 fdomain_client::fidl::FDomainResourceDialect,
896 > {
897 CapabilityStoreProxyInterface::r#dictionary_remove(self, id, key, dest_id)
898 }
899
900 pub fn r#dictionary_copy(
916 &self,
917 mut id: u64,
918 mut dest_id: u64,
919 ) -> fidl::client::QueryResponseFut<
920 CapabilityStoreDictionaryCopyResult,
921 fdomain_client::fidl::FDomainResourceDialect,
922 > {
923 CapabilityStoreProxyInterface::r#dictionary_copy(self, id, dest_id)
924 }
925
926 pub fn r#dictionary_keys(
933 &self,
934 mut id: u64,
935 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
936 ) -> fidl::client::QueryResponseFut<
937 CapabilityStoreDictionaryKeysResult,
938 fdomain_client::fidl::FDomainResourceDialect,
939 > {
940 CapabilityStoreProxyInterface::r#dictionary_keys(self, id, iterator)
941 }
942
943 pub fn r#dictionary_enumerate(
953 &self,
954 mut id: u64,
955 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
956 ) -> fidl::client::QueryResponseFut<
957 CapabilityStoreDictionaryEnumerateResult,
958 fdomain_client::fidl::FDomainResourceDialect,
959 > {
960 CapabilityStoreProxyInterface::r#dictionary_enumerate(self, id, iterator)
961 }
962
963 pub fn r#dictionary_drain(
971 &self,
972 mut id: u64,
973 mut iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
974 ) -> fidl::client::QueryResponseFut<
975 CapabilityStoreDictionaryDrainResult,
976 fdomain_client::fidl::FDomainResourceDialect,
977 > {
978 CapabilityStoreProxyInterface::r#dictionary_drain(self, id, iterator)
979 }
980}
981
982impl CapabilityStoreProxyInterface for CapabilityStoreProxy {
983 type DuplicateResponseFut = fidl::client::QueryResponseFut<
984 CapabilityStoreDuplicateResult,
985 fdomain_client::fidl::FDomainResourceDialect,
986 >;
987 fn r#duplicate(&self, mut id: u64, mut dest_id: u64) -> Self::DuplicateResponseFut {
988 fn _decode(
989 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
990 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
991 let _response = fidl::client::decode_transaction_body::<
992 fidl::encoding::FlexibleResultType<
993 fidl::encoding::EmptyStruct,
994 CapabilityStoreError,
995 >,
996 fdomain_client::fidl::FDomainResourceDialect,
997 0x5d5d35d9c20a2184,
998 >(_buf?)?
999 .into_result_fdomain::<CapabilityStoreMarker>("duplicate")?;
1000 Ok(_response.map(|x| x))
1001 }
1002 self.client.send_query_and_decode::<
1003 CapabilityStoreDuplicateRequest,
1004 CapabilityStoreDuplicateResult,
1005 >(
1006 (id, dest_id,),
1007 0x5d5d35d9c20a2184,
1008 fidl::encoding::DynamicFlags::FLEXIBLE,
1009 _decode,
1010 )
1011 }
1012
1013 type DropResponseFut = fidl::client::QueryResponseFut<
1014 CapabilityStoreDropResult,
1015 fdomain_client::fidl::FDomainResourceDialect,
1016 >;
1017 fn r#drop(&self, mut id: u64) -> Self::DropResponseFut {
1018 fn _decode(
1019 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1020 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
1021 let _response = fidl::client::decode_transaction_body::<
1022 fidl::encoding::FlexibleResultType<
1023 fidl::encoding::EmptyStruct,
1024 CapabilityStoreError,
1025 >,
1026 fdomain_client::fidl::FDomainResourceDialect,
1027 0xa745c0990fc2559,
1028 >(_buf?)?
1029 .into_result_fdomain::<CapabilityStoreMarker>("drop")?;
1030 Ok(_response.map(|x| x))
1031 }
1032 self.client.send_query_and_decode::<CapabilityStoreDropRequest, CapabilityStoreDropResult>(
1033 (id,),
1034 0xa745c0990fc2559,
1035 fidl::encoding::DynamicFlags::FLEXIBLE,
1036 _decode,
1037 )
1038 }
1039
1040 type ExportResponseFut = fidl::client::QueryResponseFut<
1041 CapabilityStoreExportResult,
1042 fdomain_client::fidl::FDomainResourceDialect,
1043 >;
1044 fn r#export(&self, mut id: u64) -> Self::ExportResponseFut {
1045 fn _decode(
1046 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1047 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
1048 let _response = fidl::client::decode_transaction_body::<
1049 fidl::encoding::FlexibleResultType<
1050 CapabilityStoreExportResponse,
1051 CapabilityStoreError,
1052 >,
1053 fdomain_client::fidl::FDomainResourceDialect,
1054 0x3237a8f4748faff,
1055 >(_buf?)?
1056 .into_result_fdomain::<CapabilityStoreMarker>("export")?;
1057 Ok(_response.map(|x| x.capability))
1058 }
1059 self.client
1060 .send_query_and_decode::<CapabilityStoreExportRequest, CapabilityStoreExportResult>(
1061 (id,),
1062 0x3237a8f4748faff,
1063 fidl::encoding::DynamicFlags::FLEXIBLE,
1064 _decode,
1065 )
1066 }
1067
1068 type ImportResponseFut = fidl::client::QueryResponseFut<
1069 CapabilityStoreImportResult,
1070 fdomain_client::fidl::FDomainResourceDialect,
1071 >;
1072 fn r#import(&self, mut id: u64, mut capability: Capability) -> Self::ImportResponseFut {
1073 fn _decode(
1074 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1075 ) -> Result<CapabilityStoreImportResult, fidl::Error> {
1076 let _response = fidl::client::decode_transaction_body::<
1077 fidl::encoding::FlexibleResultType<
1078 fidl::encoding::EmptyStruct,
1079 CapabilityStoreError,
1080 >,
1081 fdomain_client::fidl::FDomainResourceDialect,
1082 0x1f96157a29f4539b,
1083 >(_buf?)?
1084 .into_result_fdomain::<CapabilityStoreMarker>("import")?;
1085 Ok(_response.map(|x| x))
1086 }
1087 self.client
1088 .send_query_and_decode::<CapabilityStoreImportRequest, CapabilityStoreImportResult>(
1089 (id, &mut capability),
1090 0x1f96157a29f4539b,
1091 fidl::encoding::DynamicFlags::FLEXIBLE,
1092 _decode,
1093 )
1094 }
1095
1096 type ConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1097 CapabilityStoreConnectorCreateResult,
1098 fdomain_client::fidl::FDomainResourceDialect,
1099 >;
1100 fn r#connector_create(
1101 &self,
1102 mut id: u64,
1103 mut receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
1104 ) -> Self::ConnectorCreateResponseFut {
1105 fn _decode(
1106 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1107 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
1108 let _response = fidl::client::decode_transaction_body::<
1109 fidl::encoding::FlexibleResultType<
1110 fidl::encoding::EmptyStruct,
1111 CapabilityStoreError,
1112 >,
1113 fdomain_client::fidl::FDomainResourceDialect,
1114 0x29592c5d63e91c25,
1115 >(_buf?)?
1116 .into_result_fdomain::<CapabilityStoreMarker>("connector_create")?;
1117 Ok(_response.map(|x| x))
1118 }
1119 self.client.send_query_and_decode::<
1120 CapabilityStoreConnectorCreateRequest,
1121 CapabilityStoreConnectorCreateResult,
1122 >(
1123 (id, receiver,),
1124 0x29592c5d63e91c25,
1125 fidl::encoding::DynamicFlags::FLEXIBLE,
1126 _decode,
1127 )
1128 }
1129
1130 type ConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1131 CapabilityStoreConnectorOpenResult,
1132 fdomain_client::fidl::FDomainResourceDialect,
1133 >;
1134 fn r#connector_open(
1135 &self,
1136 mut id: u64,
1137 mut server_end: fdomain_client::Channel,
1138 ) -> Self::ConnectorOpenResponseFut {
1139 fn _decode(
1140 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1141 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
1142 let _response = fidl::client::decode_transaction_body::<
1143 fidl::encoding::FlexibleResultType<
1144 fidl::encoding::EmptyStruct,
1145 CapabilityStoreError,
1146 >,
1147 fdomain_client::fidl::FDomainResourceDialect,
1148 0x537e69ab40563b9f,
1149 >(_buf?)?
1150 .into_result_fdomain::<CapabilityStoreMarker>("connector_open")?;
1151 Ok(_response.map(|x| x))
1152 }
1153 self.client.send_query_and_decode::<
1154 CapabilityStoreConnectorOpenRequest,
1155 CapabilityStoreConnectorOpenResult,
1156 >(
1157 (id, server_end,),
1158 0x537e69ab40563b9f,
1159 fidl::encoding::DynamicFlags::FLEXIBLE,
1160 _decode,
1161 )
1162 }
1163
1164 type DirConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1165 CapabilityStoreDirConnectorCreateResult,
1166 fdomain_client::fidl::FDomainResourceDialect,
1167 >;
1168 fn r#dir_connector_create(
1169 &self,
1170 mut id: u64,
1171 mut receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
1172 ) -> Self::DirConnectorCreateResponseFut {
1173 fn _decode(
1174 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1175 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
1176 let _response = fidl::client::decode_transaction_body::<
1177 fidl::encoding::FlexibleResultType<
1178 fidl::encoding::EmptyStruct,
1179 CapabilityStoreError,
1180 >,
1181 fdomain_client::fidl::FDomainResourceDialect,
1182 0x186138a11ccf19bb,
1183 >(_buf?)?
1184 .into_result_fdomain::<CapabilityStoreMarker>("dir_connector_create")?;
1185 Ok(_response.map(|x| x))
1186 }
1187 self.client.send_query_and_decode::<
1188 CapabilityStoreDirConnectorCreateRequest,
1189 CapabilityStoreDirConnectorCreateResult,
1190 >(
1191 (id, receiver,),
1192 0x186138a11ccf19bb,
1193 fidl::encoding::DynamicFlags::FLEXIBLE,
1194 _decode,
1195 )
1196 }
1197
1198 type DirConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1199 CapabilityStoreDirConnectorOpenResult,
1200 fdomain_client::fidl::FDomainResourceDialect,
1201 >;
1202 fn r#dir_connector_open(
1203 &self,
1204 mut payload: CapabilityStoreDirConnectorOpenRequest,
1205 ) -> Self::DirConnectorOpenResponseFut {
1206 fn _decode(
1207 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1208 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
1209 let _response = fidl::client::decode_transaction_body::<
1210 fidl::encoding::FlexibleResultType<
1211 fidl::encoding::EmptyStruct,
1212 CapabilityStoreError,
1213 >,
1214 fdomain_client::fidl::FDomainResourceDialect,
1215 0x5650d3d6a3a13901,
1216 >(_buf?)?
1217 .into_result_fdomain::<CapabilityStoreMarker>("dir_connector_open")?;
1218 Ok(_response.map(|x| x))
1219 }
1220 self.client.send_query_and_decode::<
1221 CapabilityStoreDirConnectorOpenRequest,
1222 CapabilityStoreDirConnectorOpenResult,
1223 >(
1224 &mut payload,
1225 0x5650d3d6a3a13901,
1226 fidl::encoding::DynamicFlags::FLEXIBLE,
1227 _decode,
1228 )
1229 }
1230
1231 type DictionaryCreateResponseFut = fidl::client::QueryResponseFut<
1232 CapabilityStoreDictionaryCreateResult,
1233 fdomain_client::fidl::FDomainResourceDialect,
1234 >;
1235 fn r#dictionary_create(&self, mut id: u64) -> Self::DictionaryCreateResponseFut {
1236 fn _decode(
1237 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1238 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
1239 let _response = fidl::client::decode_transaction_body::<
1240 fidl::encoding::FlexibleResultType<
1241 fidl::encoding::EmptyStruct,
1242 CapabilityStoreError,
1243 >,
1244 fdomain_client::fidl::FDomainResourceDialect,
1245 0x6997c8dfc63de093,
1246 >(_buf?)?
1247 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_create")?;
1248 Ok(_response.map(|x| x))
1249 }
1250 self.client.send_query_and_decode::<
1251 CapabilityStoreDictionaryCreateRequest,
1252 CapabilityStoreDictionaryCreateResult,
1253 >(
1254 (id,),
1255 0x6997c8dfc63de093,
1256 fidl::encoding::DynamicFlags::FLEXIBLE,
1257 _decode,
1258 )
1259 }
1260
1261 type DictionaryLegacyImportResponseFut = fidl::client::QueryResponseFut<
1262 CapabilityStoreDictionaryLegacyImportResult,
1263 fdomain_client::fidl::FDomainResourceDialect,
1264 >;
1265 fn r#dictionary_legacy_import(
1266 &self,
1267 mut id: u64,
1268 mut client_end: fdomain_client::Channel,
1269 ) -> Self::DictionaryLegacyImportResponseFut {
1270 fn _decode(
1271 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1272 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
1273 let _response = fidl::client::decode_transaction_body::<
1274 fidl::encoding::FlexibleResultType<
1275 fidl::encoding::EmptyStruct,
1276 CapabilityStoreError,
1277 >,
1278 fdomain_client::fidl::FDomainResourceDialect,
1279 0x72fd686c37b6025f,
1280 >(_buf?)?
1281 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_legacy_import")?;
1282 Ok(_response.map(|x| x))
1283 }
1284 self.client.send_query_and_decode::<
1285 CapabilityStoreDictionaryLegacyImportRequest,
1286 CapabilityStoreDictionaryLegacyImportResult,
1287 >(
1288 (id, client_end,),
1289 0x72fd686c37b6025f,
1290 fidl::encoding::DynamicFlags::FLEXIBLE,
1291 _decode,
1292 )
1293 }
1294
1295 type DictionaryLegacyExportResponseFut = fidl::client::QueryResponseFut<
1296 CapabilityStoreDictionaryLegacyExportResult,
1297 fdomain_client::fidl::FDomainResourceDialect,
1298 >;
1299 fn r#dictionary_legacy_export(
1300 &self,
1301 mut id: u64,
1302 mut server_end: fdomain_client::Channel,
1303 ) -> Self::DictionaryLegacyExportResponseFut {
1304 fn _decode(
1305 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1306 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
1307 let _response = fidl::client::decode_transaction_body::<
1308 fidl::encoding::FlexibleResultType<
1309 fidl::encoding::EmptyStruct,
1310 CapabilityStoreError,
1311 >,
1312 fdomain_client::fidl::FDomainResourceDialect,
1313 0x407e15cc4bde5dcd,
1314 >(_buf?)?
1315 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_legacy_export")?;
1316 Ok(_response.map(|x| x))
1317 }
1318 self.client.send_query_and_decode::<
1319 CapabilityStoreDictionaryLegacyExportRequest,
1320 CapabilityStoreDictionaryLegacyExportResult,
1321 >(
1322 (id, server_end,),
1323 0x407e15cc4bde5dcd,
1324 fidl::encoding::DynamicFlags::FLEXIBLE,
1325 _decode,
1326 )
1327 }
1328
1329 type DictionaryInsertResponseFut = fidl::client::QueryResponseFut<
1330 CapabilityStoreDictionaryInsertResult,
1331 fdomain_client::fidl::FDomainResourceDialect,
1332 >;
1333 fn r#dictionary_insert(
1334 &self,
1335 mut id: u64,
1336 mut item: &DictionaryItem,
1337 ) -> Self::DictionaryInsertResponseFut {
1338 fn _decode(
1339 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1340 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
1341 let _response = fidl::client::decode_transaction_body::<
1342 fidl::encoding::FlexibleResultType<
1343 fidl::encoding::EmptyStruct,
1344 CapabilityStoreError,
1345 >,
1346 fdomain_client::fidl::FDomainResourceDialect,
1347 0x7702183689d44c27,
1348 >(_buf?)?
1349 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_insert")?;
1350 Ok(_response.map(|x| x))
1351 }
1352 self.client.send_query_and_decode::<
1353 CapabilityStoreDictionaryInsertRequest,
1354 CapabilityStoreDictionaryInsertResult,
1355 >(
1356 (id, item,),
1357 0x7702183689d44c27,
1358 fidl::encoding::DynamicFlags::FLEXIBLE,
1359 _decode,
1360 )
1361 }
1362
1363 type DictionaryGetResponseFut = fidl::client::QueryResponseFut<
1364 CapabilityStoreDictionaryGetResult,
1365 fdomain_client::fidl::FDomainResourceDialect,
1366 >;
1367 fn r#dictionary_get(
1368 &self,
1369 mut id: u64,
1370 mut key: &str,
1371 mut dest_id: u64,
1372 ) -> Self::DictionaryGetResponseFut {
1373 fn _decode(
1374 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1375 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
1376 let _response = fidl::client::decode_transaction_body::<
1377 fidl::encoding::FlexibleResultType<
1378 fidl::encoding::EmptyStruct,
1379 CapabilityStoreError,
1380 >,
1381 fdomain_client::fidl::FDomainResourceDialect,
1382 0x4d9e27538284add2,
1383 >(_buf?)?
1384 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_get")?;
1385 Ok(_response.map(|x| x))
1386 }
1387 self.client.send_query_and_decode::<
1388 CapabilityStoreDictionaryGetRequest,
1389 CapabilityStoreDictionaryGetResult,
1390 >(
1391 (id, key, dest_id,),
1392 0x4d9e27538284add2,
1393 fidl::encoding::DynamicFlags::FLEXIBLE,
1394 _decode,
1395 )
1396 }
1397
1398 type DictionaryRemoveResponseFut = fidl::client::QueryResponseFut<
1399 CapabilityStoreDictionaryRemoveResult,
1400 fdomain_client::fidl::FDomainResourceDialect,
1401 >;
1402 fn r#dictionary_remove(
1403 &self,
1404 mut id: u64,
1405 mut key: &str,
1406 mut dest_id: Option<&WrappedCapabilityId>,
1407 ) -> Self::DictionaryRemoveResponseFut {
1408 fn _decode(
1409 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1410 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
1411 let _response = fidl::client::decode_transaction_body::<
1412 fidl::encoding::FlexibleResultType<
1413 fidl::encoding::EmptyStruct,
1414 CapabilityStoreError,
1415 >,
1416 fdomain_client::fidl::FDomainResourceDialect,
1417 0x4c5c025ab05d4f3,
1418 >(_buf?)?
1419 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_remove")?;
1420 Ok(_response.map(|x| x))
1421 }
1422 self.client.send_query_and_decode::<
1423 CapabilityStoreDictionaryRemoveRequest,
1424 CapabilityStoreDictionaryRemoveResult,
1425 >(
1426 (id, key, dest_id,),
1427 0x4c5c025ab05d4f3,
1428 fidl::encoding::DynamicFlags::FLEXIBLE,
1429 _decode,
1430 )
1431 }
1432
1433 type DictionaryCopyResponseFut = fidl::client::QueryResponseFut<
1434 CapabilityStoreDictionaryCopyResult,
1435 fdomain_client::fidl::FDomainResourceDialect,
1436 >;
1437 fn r#dictionary_copy(&self, mut id: u64, mut dest_id: u64) -> Self::DictionaryCopyResponseFut {
1438 fn _decode(
1439 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1440 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
1441 let _response = fidl::client::decode_transaction_body::<
1442 fidl::encoding::FlexibleResultType<
1443 fidl::encoding::EmptyStruct,
1444 CapabilityStoreError,
1445 >,
1446 fdomain_client::fidl::FDomainResourceDialect,
1447 0x3733ecdf4ea1b44f,
1448 >(_buf?)?
1449 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_copy")?;
1450 Ok(_response.map(|x| x))
1451 }
1452 self.client.send_query_and_decode::<
1453 CapabilityStoreDictionaryCopyRequest,
1454 CapabilityStoreDictionaryCopyResult,
1455 >(
1456 (id, dest_id,),
1457 0x3733ecdf4ea1b44f,
1458 fidl::encoding::DynamicFlags::FLEXIBLE,
1459 _decode,
1460 )
1461 }
1462
1463 type DictionaryKeysResponseFut = fidl::client::QueryResponseFut<
1464 CapabilityStoreDictionaryKeysResult,
1465 fdomain_client::fidl::FDomainResourceDialect,
1466 >;
1467 fn r#dictionary_keys(
1468 &self,
1469 mut id: u64,
1470 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
1471 ) -> Self::DictionaryKeysResponseFut {
1472 fn _decode(
1473 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1474 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
1475 let _response = fidl::client::decode_transaction_body::<
1476 fidl::encoding::FlexibleResultType<
1477 fidl::encoding::EmptyStruct,
1478 CapabilityStoreError,
1479 >,
1480 fdomain_client::fidl::FDomainResourceDialect,
1481 0x84b05577ceaec9e,
1482 >(_buf?)?
1483 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_keys")?;
1484 Ok(_response.map(|x| x))
1485 }
1486 self.client.send_query_and_decode::<
1487 CapabilityStoreDictionaryKeysRequest,
1488 CapabilityStoreDictionaryKeysResult,
1489 >(
1490 (id, iterator,),
1491 0x84b05577ceaec9e,
1492 fidl::encoding::DynamicFlags::FLEXIBLE,
1493 _decode,
1494 )
1495 }
1496
1497 type DictionaryEnumerateResponseFut = fidl::client::QueryResponseFut<
1498 CapabilityStoreDictionaryEnumerateResult,
1499 fdomain_client::fidl::FDomainResourceDialect,
1500 >;
1501 fn r#dictionary_enumerate(
1502 &self,
1503 mut id: u64,
1504 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
1505 ) -> Self::DictionaryEnumerateResponseFut {
1506 fn _decode(
1507 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1508 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
1509 let _response = fidl::client::decode_transaction_body::<
1510 fidl::encoding::FlexibleResultType<
1511 fidl::encoding::EmptyStruct,
1512 CapabilityStoreError,
1513 >,
1514 fdomain_client::fidl::FDomainResourceDialect,
1515 0xd6279b6ced04641,
1516 >(_buf?)?
1517 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_enumerate")?;
1518 Ok(_response.map(|x| x))
1519 }
1520 self.client.send_query_and_decode::<
1521 CapabilityStoreDictionaryEnumerateRequest,
1522 CapabilityStoreDictionaryEnumerateResult,
1523 >(
1524 (id, iterator,),
1525 0xd6279b6ced04641,
1526 fidl::encoding::DynamicFlags::FLEXIBLE,
1527 _decode,
1528 )
1529 }
1530
1531 type DictionaryDrainResponseFut = fidl::client::QueryResponseFut<
1532 CapabilityStoreDictionaryDrainResult,
1533 fdomain_client::fidl::FDomainResourceDialect,
1534 >;
1535 fn r#dictionary_drain(
1536 &self,
1537 mut id: u64,
1538 mut iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
1539 ) -> Self::DictionaryDrainResponseFut {
1540 fn _decode(
1541 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1542 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
1543 let _response = fidl::client::decode_transaction_body::<
1544 fidl::encoding::FlexibleResultType<
1545 fidl::encoding::EmptyStruct,
1546 CapabilityStoreError,
1547 >,
1548 fdomain_client::fidl::FDomainResourceDialect,
1549 0x28a3a3f84d928cd8,
1550 >(_buf?)?
1551 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_drain")?;
1552 Ok(_response.map(|x| x))
1553 }
1554 self.client.send_query_and_decode::<
1555 CapabilityStoreDictionaryDrainRequest,
1556 CapabilityStoreDictionaryDrainResult,
1557 >(
1558 (id, iterator,),
1559 0x28a3a3f84d928cd8,
1560 fidl::encoding::DynamicFlags::FLEXIBLE,
1561 _decode,
1562 )
1563 }
1564}
1565
1566pub struct CapabilityStoreEventStream {
1567 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1568}
1569
1570impl std::marker::Unpin for CapabilityStoreEventStream {}
1571
1572impl futures::stream::FusedStream for CapabilityStoreEventStream {
1573 fn is_terminated(&self) -> bool {
1574 self.event_receiver.is_terminated()
1575 }
1576}
1577
1578impl futures::Stream for CapabilityStoreEventStream {
1579 type Item = Result<CapabilityStoreEvent, fidl::Error>;
1580
1581 fn poll_next(
1582 mut self: std::pin::Pin<&mut Self>,
1583 cx: &mut std::task::Context<'_>,
1584 ) -> std::task::Poll<Option<Self::Item>> {
1585 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1586 &mut self.event_receiver,
1587 cx
1588 )?) {
1589 Some(buf) => std::task::Poll::Ready(Some(CapabilityStoreEvent::decode(buf))),
1590 None => std::task::Poll::Ready(None),
1591 }
1592 }
1593}
1594
1595#[derive(Debug)]
1596pub enum CapabilityStoreEvent {
1597 #[non_exhaustive]
1598 _UnknownEvent {
1599 ordinal: u64,
1601 },
1602}
1603
1604impl CapabilityStoreEvent {
1605 fn decode(
1607 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1608 ) -> Result<CapabilityStoreEvent, fidl::Error> {
1609 let (bytes, _handles) = buf.split_mut();
1610 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1611 debug_assert_eq!(tx_header.tx_id, 0);
1612 match tx_header.ordinal {
1613 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1614 Ok(CapabilityStoreEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1615 }
1616 _ => Err(fidl::Error::UnknownOrdinal {
1617 ordinal: tx_header.ordinal,
1618 protocol_name:
1619 <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1620 }),
1621 }
1622 }
1623}
1624
1625pub struct CapabilityStoreRequestStream {
1627 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1628 is_terminated: bool,
1629}
1630
1631impl std::marker::Unpin for CapabilityStoreRequestStream {}
1632
1633impl futures::stream::FusedStream for CapabilityStoreRequestStream {
1634 fn is_terminated(&self) -> bool {
1635 self.is_terminated
1636 }
1637}
1638
1639impl fdomain_client::fidl::RequestStream for CapabilityStoreRequestStream {
1640 type Protocol = CapabilityStoreMarker;
1641 type ControlHandle = CapabilityStoreControlHandle;
1642
1643 fn from_channel(channel: fdomain_client::Channel) -> Self {
1644 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1645 }
1646
1647 fn control_handle(&self) -> Self::ControlHandle {
1648 CapabilityStoreControlHandle { inner: self.inner.clone() }
1649 }
1650
1651 fn into_inner(
1652 self,
1653 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1654 {
1655 (self.inner, self.is_terminated)
1656 }
1657
1658 fn from_inner(
1659 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1660 is_terminated: bool,
1661 ) -> Self {
1662 Self { inner, is_terminated }
1663 }
1664}
1665
1666impl futures::Stream for CapabilityStoreRequestStream {
1667 type Item = Result<CapabilityStoreRequest, fidl::Error>;
1668
1669 fn poll_next(
1670 mut self: std::pin::Pin<&mut Self>,
1671 cx: &mut std::task::Context<'_>,
1672 ) -> std::task::Poll<Option<Self::Item>> {
1673 let this = &mut *self;
1674 if this.inner.check_shutdown(cx) {
1675 this.is_terminated = true;
1676 return std::task::Poll::Ready(None);
1677 }
1678 if this.is_terminated {
1679 panic!("polled CapabilityStoreRequestStream after completion");
1680 }
1681 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1682 |bytes, handles| {
1683 match this.inner.channel().read_etc(cx, bytes, handles) {
1684 std::task::Poll::Ready(Ok(())) => {}
1685 std::task::Poll::Pending => return std::task::Poll::Pending,
1686 std::task::Poll::Ready(Err(None)) => {
1687 this.is_terminated = true;
1688 return std::task::Poll::Ready(None);
1689 }
1690 std::task::Poll::Ready(Err(Some(e))) => {
1691 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1692 e.into(),
1693 ))));
1694 }
1695 }
1696
1697 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1699
1700 std::task::Poll::Ready(Some(match header.ordinal {
1701 0x5d5d35d9c20a2184 => {
1702 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1703 let mut req = fidl::new_empty!(CapabilityStoreDuplicateRequest, fdomain_client::fidl::FDomainResourceDialect);
1704 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDuplicateRequest>(&header, _body_bytes, handles, &mut req)?;
1705 let control_handle = CapabilityStoreControlHandle {
1706 inner: this.inner.clone(),
1707 };
1708 Ok(CapabilityStoreRequest::Duplicate {id: req.id,
1709dest_id: req.dest_id,
1710
1711 responder: CapabilityStoreDuplicateResponder {
1712 control_handle: std::mem::ManuallyDrop::new(control_handle),
1713 tx_id: header.tx_id,
1714 },
1715 })
1716 }
1717 0xa745c0990fc2559 => {
1718 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1719 let mut req = fidl::new_empty!(CapabilityStoreDropRequest, fdomain_client::fidl::FDomainResourceDialect);
1720 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDropRequest>(&header, _body_bytes, handles, &mut req)?;
1721 let control_handle = CapabilityStoreControlHandle {
1722 inner: this.inner.clone(),
1723 };
1724 Ok(CapabilityStoreRequest::Drop {id: req.id,
1725
1726 responder: CapabilityStoreDropResponder {
1727 control_handle: std::mem::ManuallyDrop::new(control_handle),
1728 tx_id: header.tx_id,
1729 },
1730 })
1731 }
1732 0x3237a8f4748faff => {
1733 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1734 let mut req = fidl::new_empty!(CapabilityStoreExportRequest, fdomain_client::fidl::FDomainResourceDialect);
1735 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreExportRequest>(&header, _body_bytes, handles, &mut req)?;
1736 let control_handle = CapabilityStoreControlHandle {
1737 inner: this.inner.clone(),
1738 };
1739 Ok(CapabilityStoreRequest::Export {id: req.id,
1740
1741 responder: CapabilityStoreExportResponder {
1742 control_handle: std::mem::ManuallyDrop::new(control_handle),
1743 tx_id: header.tx_id,
1744 },
1745 })
1746 }
1747 0x1f96157a29f4539b => {
1748 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1749 let mut req = fidl::new_empty!(CapabilityStoreImportRequest, fdomain_client::fidl::FDomainResourceDialect);
1750 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreImportRequest>(&header, _body_bytes, handles, &mut req)?;
1751 let control_handle = CapabilityStoreControlHandle {
1752 inner: this.inner.clone(),
1753 };
1754 Ok(CapabilityStoreRequest::Import {id: req.id,
1755capability: req.capability,
1756
1757 responder: CapabilityStoreImportResponder {
1758 control_handle: std::mem::ManuallyDrop::new(control_handle),
1759 tx_id: header.tx_id,
1760 },
1761 })
1762 }
1763 0x29592c5d63e91c25 => {
1764 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1765 let mut req = fidl::new_empty!(CapabilityStoreConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1766 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1767 let control_handle = CapabilityStoreControlHandle {
1768 inner: this.inner.clone(),
1769 };
1770 Ok(CapabilityStoreRequest::ConnectorCreate {id: req.id,
1771receiver: req.receiver,
1772
1773 responder: CapabilityStoreConnectorCreateResponder {
1774 control_handle: std::mem::ManuallyDrop::new(control_handle),
1775 tx_id: header.tx_id,
1776 },
1777 })
1778 }
1779 0x537e69ab40563b9f => {
1780 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1781 let mut req = fidl::new_empty!(CapabilityStoreConnectorOpenRequest, fdomain_client::fidl::FDomainResourceDialect);
1782 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
1783 let control_handle = CapabilityStoreControlHandle {
1784 inner: this.inner.clone(),
1785 };
1786 Ok(CapabilityStoreRequest::ConnectorOpen {id: req.id,
1787server_end: req.server_end,
1788
1789 responder: CapabilityStoreConnectorOpenResponder {
1790 control_handle: std::mem::ManuallyDrop::new(control_handle),
1791 tx_id: header.tx_id,
1792 },
1793 })
1794 }
1795 0x186138a11ccf19bb => {
1796 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1797 let mut req = fidl::new_empty!(CapabilityStoreDirConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1798 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDirConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1799 let control_handle = CapabilityStoreControlHandle {
1800 inner: this.inner.clone(),
1801 };
1802 Ok(CapabilityStoreRequest::DirConnectorCreate {id: req.id,
1803receiver: req.receiver,
1804
1805 responder: CapabilityStoreDirConnectorCreateResponder {
1806 control_handle: std::mem::ManuallyDrop::new(control_handle),
1807 tx_id: header.tx_id,
1808 },
1809 })
1810 }
1811 0x5650d3d6a3a13901 => {
1812 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1813 let mut req = fidl::new_empty!(CapabilityStoreDirConnectorOpenRequest, fdomain_client::fidl::FDomainResourceDialect);
1814 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDirConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
1815 let control_handle = CapabilityStoreControlHandle {
1816 inner: this.inner.clone(),
1817 };
1818 Ok(CapabilityStoreRequest::DirConnectorOpen {payload: req,
1819 responder: CapabilityStoreDirConnectorOpenResponder {
1820 control_handle: std::mem::ManuallyDrop::new(control_handle),
1821 tx_id: header.tx_id,
1822 },
1823 })
1824 }
1825 0x6997c8dfc63de093 => {
1826 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1827 let mut req = fidl::new_empty!(CapabilityStoreDictionaryCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1828 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1829 let control_handle = CapabilityStoreControlHandle {
1830 inner: this.inner.clone(),
1831 };
1832 Ok(CapabilityStoreRequest::DictionaryCreate {id: req.id,
1833
1834 responder: CapabilityStoreDictionaryCreateResponder {
1835 control_handle: std::mem::ManuallyDrop::new(control_handle),
1836 tx_id: header.tx_id,
1837 },
1838 })
1839 }
1840 0x72fd686c37b6025f => {
1841 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1842 let mut req = fidl::new_empty!(CapabilityStoreDictionaryLegacyImportRequest, fdomain_client::fidl::FDomainResourceDialect);
1843 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyImportRequest>(&header, _body_bytes, handles, &mut req)?;
1844 let control_handle = CapabilityStoreControlHandle {
1845 inner: this.inner.clone(),
1846 };
1847 Ok(CapabilityStoreRequest::DictionaryLegacyImport {id: req.id,
1848client_end: req.client_end,
1849
1850 responder: CapabilityStoreDictionaryLegacyImportResponder {
1851 control_handle: std::mem::ManuallyDrop::new(control_handle),
1852 tx_id: header.tx_id,
1853 },
1854 })
1855 }
1856 0x407e15cc4bde5dcd => {
1857 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1858 let mut req = fidl::new_empty!(CapabilityStoreDictionaryLegacyExportRequest, fdomain_client::fidl::FDomainResourceDialect);
1859 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyExportRequest>(&header, _body_bytes, handles, &mut req)?;
1860 let control_handle = CapabilityStoreControlHandle {
1861 inner: this.inner.clone(),
1862 };
1863 Ok(CapabilityStoreRequest::DictionaryLegacyExport {id: req.id,
1864server_end: req.server_end,
1865
1866 responder: CapabilityStoreDictionaryLegacyExportResponder {
1867 control_handle: std::mem::ManuallyDrop::new(control_handle),
1868 tx_id: header.tx_id,
1869 },
1870 })
1871 }
1872 0x7702183689d44c27 => {
1873 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1874 let mut req = fidl::new_empty!(CapabilityStoreDictionaryInsertRequest, fdomain_client::fidl::FDomainResourceDialect);
1875 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryInsertRequest>(&header, _body_bytes, handles, &mut req)?;
1876 let control_handle = CapabilityStoreControlHandle {
1877 inner: this.inner.clone(),
1878 };
1879 Ok(CapabilityStoreRequest::DictionaryInsert {id: req.id,
1880item: req.item,
1881
1882 responder: CapabilityStoreDictionaryInsertResponder {
1883 control_handle: std::mem::ManuallyDrop::new(control_handle),
1884 tx_id: header.tx_id,
1885 },
1886 })
1887 }
1888 0x4d9e27538284add2 => {
1889 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1890 let mut req = fidl::new_empty!(CapabilityStoreDictionaryGetRequest, fdomain_client::fidl::FDomainResourceDialect);
1891 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryGetRequest>(&header, _body_bytes, handles, &mut req)?;
1892 let control_handle = CapabilityStoreControlHandle {
1893 inner: this.inner.clone(),
1894 };
1895 Ok(CapabilityStoreRequest::DictionaryGet {id: req.id,
1896key: req.key,
1897dest_id: req.dest_id,
1898
1899 responder: CapabilityStoreDictionaryGetResponder {
1900 control_handle: std::mem::ManuallyDrop::new(control_handle),
1901 tx_id: header.tx_id,
1902 },
1903 })
1904 }
1905 0x4c5c025ab05d4f3 => {
1906 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1907 let mut req = fidl::new_empty!(CapabilityStoreDictionaryRemoveRequest, fdomain_client::fidl::FDomainResourceDialect);
1908 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryRemoveRequest>(&header, _body_bytes, handles, &mut req)?;
1909 let control_handle = CapabilityStoreControlHandle {
1910 inner: this.inner.clone(),
1911 };
1912 Ok(CapabilityStoreRequest::DictionaryRemove {id: req.id,
1913key: req.key,
1914dest_id: req.dest_id,
1915
1916 responder: CapabilityStoreDictionaryRemoveResponder {
1917 control_handle: std::mem::ManuallyDrop::new(control_handle),
1918 tx_id: header.tx_id,
1919 },
1920 })
1921 }
1922 0x3733ecdf4ea1b44f => {
1923 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1924 let mut req = fidl::new_empty!(CapabilityStoreDictionaryCopyRequest, fdomain_client::fidl::FDomainResourceDialect);
1925 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryCopyRequest>(&header, _body_bytes, handles, &mut req)?;
1926 let control_handle = CapabilityStoreControlHandle {
1927 inner: this.inner.clone(),
1928 };
1929 Ok(CapabilityStoreRequest::DictionaryCopy {id: req.id,
1930dest_id: req.dest_id,
1931
1932 responder: CapabilityStoreDictionaryCopyResponder {
1933 control_handle: std::mem::ManuallyDrop::new(control_handle),
1934 tx_id: header.tx_id,
1935 },
1936 })
1937 }
1938 0x84b05577ceaec9e => {
1939 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1940 let mut req = fidl::new_empty!(CapabilityStoreDictionaryKeysRequest, fdomain_client::fidl::FDomainResourceDialect);
1941 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryKeysRequest>(&header, _body_bytes, handles, &mut req)?;
1942 let control_handle = CapabilityStoreControlHandle {
1943 inner: this.inner.clone(),
1944 };
1945 Ok(CapabilityStoreRequest::DictionaryKeys {id: req.id,
1946iterator: req.iterator,
1947
1948 responder: CapabilityStoreDictionaryKeysResponder {
1949 control_handle: std::mem::ManuallyDrop::new(control_handle),
1950 tx_id: header.tx_id,
1951 },
1952 })
1953 }
1954 0xd6279b6ced04641 => {
1955 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1956 let mut req = fidl::new_empty!(CapabilityStoreDictionaryEnumerateRequest, fdomain_client::fidl::FDomainResourceDialect);
1957 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
1958 let control_handle = CapabilityStoreControlHandle {
1959 inner: this.inner.clone(),
1960 };
1961 Ok(CapabilityStoreRequest::DictionaryEnumerate {id: req.id,
1962iterator: req.iterator,
1963
1964 responder: CapabilityStoreDictionaryEnumerateResponder {
1965 control_handle: std::mem::ManuallyDrop::new(control_handle),
1966 tx_id: header.tx_id,
1967 },
1968 })
1969 }
1970 0x28a3a3f84d928cd8 => {
1971 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1972 let mut req = fidl::new_empty!(CapabilityStoreDictionaryDrainRequest, fdomain_client::fidl::FDomainResourceDialect);
1973 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryDrainRequest>(&header, _body_bytes, handles, &mut req)?;
1974 let control_handle = CapabilityStoreControlHandle {
1975 inner: this.inner.clone(),
1976 };
1977 Ok(CapabilityStoreRequest::DictionaryDrain {id: req.id,
1978iterator: req.iterator,
1979
1980 responder: CapabilityStoreDictionaryDrainResponder {
1981 control_handle: std::mem::ManuallyDrop::new(control_handle),
1982 tx_id: header.tx_id,
1983 },
1984 })
1985 }
1986 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1987 Ok(CapabilityStoreRequest::_UnknownMethod {
1988 ordinal: header.ordinal,
1989 control_handle: CapabilityStoreControlHandle { inner: this.inner.clone() },
1990 method_type: fidl::MethodType::OneWay,
1991 })
1992 }
1993 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1994 this.inner.send_framework_err(
1995 fidl::encoding::FrameworkErr::UnknownMethod,
1996 header.tx_id,
1997 header.ordinal,
1998 header.dynamic_flags(),
1999 (bytes, handles),
2000 )?;
2001 Ok(CapabilityStoreRequest::_UnknownMethod {
2002 ordinal: header.ordinal,
2003 control_handle: CapabilityStoreControlHandle { inner: this.inner.clone() },
2004 method_type: fidl::MethodType::TwoWay,
2005 })
2006 }
2007 _ => Err(fidl::Error::UnknownOrdinal {
2008 ordinal: header.ordinal,
2009 protocol_name: <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2010 }),
2011 }))
2012 },
2013 )
2014 }
2015}
2016
2017#[derive(Debug)]
2041pub enum CapabilityStoreRequest {
2042 Duplicate { id: u64, dest_id: u64, responder: CapabilityStoreDuplicateResponder },
2050 Drop { id: u64, responder: CapabilityStoreDropResponder },
2056 Export { id: u64, responder: CapabilityStoreExportResponder },
2064 Import { id: u64, capability: Capability, responder: CapabilityStoreImportResponder },
2071 ConnectorCreate {
2078 id: u64,
2079 receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
2080 responder: CapabilityStoreConnectorCreateResponder,
2081 },
2082 ConnectorOpen {
2092 id: u64,
2093 server_end: fdomain_client::Channel,
2094 responder: CapabilityStoreConnectorOpenResponder,
2095 },
2096 DirConnectorCreate {
2103 id: u64,
2104 receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
2105 responder: CapabilityStoreDirConnectorCreateResponder,
2106 },
2107 DirConnectorOpen {
2121 payload: CapabilityStoreDirConnectorOpenRequest,
2122 responder: CapabilityStoreDirConnectorOpenResponder,
2123 },
2124 DictionaryCreate { id: u64, responder: CapabilityStoreDictionaryCreateResponder },
2130 DictionaryLegacyImport {
2140 id: u64,
2141 client_end: fdomain_client::Channel,
2142 responder: CapabilityStoreDictionaryLegacyImportResponder,
2143 },
2144 DictionaryLegacyExport {
2154 id: u64,
2155 server_end: fdomain_client::Channel,
2156 responder: CapabilityStoreDictionaryLegacyExportResponder,
2157 },
2158 DictionaryInsert {
2168 id: u64,
2169 item: DictionaryItem,
2170 responder: CapabilityStoreDictionaryInsertResponder,
2171 },
2172 DictionaryGet {
2184 id: u64,
2185 key: String,
2186 dest_id: u64,
2187 responder: CapabilityStoreDictionaryGetResponder,
2188 },
2189 DictionaryRemove {
2200 id: u64,
2201 key: String,
2202 dest_id: Option<Box<WrappedCapabilityId>>,
2203 responder: CapabilityStoreDictionaryRemoveResponder,
2204 },
2205 DictionaryCopy { id: u64, dest_id: u64, responder: CapabilityStoreDictionaryCopyResponder },
2221 DictionaryKeys {
2228 id: u64,
2229 iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
2230 responder: CapabilityStoreDictionaryKeysResponder,
2231 },
2232 DictionaryEnumerate {
2242 id: u64,
2243 iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
2244 responder: CapabilityStoreDictionaryEnumerateResponder,
2245 },
2246 DictionaryDrain {
2254 id: u64,
2255 iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
2256 responder: CapabilityStoreDictionaryDrainResponder,
2257 },
2258 #[non_exhaustive]
2260 _UnknownMethod {
2261 ordinal: u64,
2263 control_handle: CapabilityStoreControlHandle,
2264 method_type: fidl::MethodType,
2265 },
2266}
2267
2268impl CapabilityStoreRequest {
2269 #[allow(irrefutable_let_patterns)]
2270 pub fn into_duplicate(self) -> Option<(u64, u64, CapabilityStoreDuplicateResponder)> {
2271 if let CapabilityStoreRequest::Duplicate { id, dest_id, responder } = self {
2272 Some((id, dest_id, responder))
2273 } else {
2274 None
2275 }
2276 }
2277
2278 #[allow(irrefutable_let_patterns)]
2279 pub fn into_drop(self) -> Option<(u64, CapabilityStoreDropResponder)> {
2280 if let CapabilityStoreRequest::Drop { id, responder } = self {
2281 Some((id, responder))
2282 } else {
2283 None
2284 }
2285 }
2286
2287 #[allow(irrefutable_let_patterns)]
2288 pub fn into_export(self) -> Option<(u64, CapabilityStoreExportResponder)> {
2289 if let CapabilityStoreRequest::Export { id, responder } = self {
2290 Some((id, responder))
2291 } else {
2292 None
2293 }
2294 }
2295
2296 #[allow(irrefutable_let_patterns)]
2297 pub fn into_import(self) -> Option<(u64, Capability, CapabilityStoreImportResponder)> {
2298 if let CapabilityStoreRequest::Import { id, capability, responder } = self {
2299 Some((id, capability, responder))
2300 } else {
2301 None
2302 }
2303 }
2304
2305 #[allow(irrefutable_let_patterns)]
2306 pub fn into_connector_create(
2307 self,
2308 ) -> Option<(
2309 u64,
2310 fdomain_client::fidl::ClientEnd<ReceiverMarker>,
2311 CapabilityStoreConnectorCreateResponder,
2312 )> {
2313 if let CapabilityStoreRequest::ConnectorCreate { id, receiver, responder } = self {
2314 Some((id, receiver, responder))
2315 } else {
2316 None
2317 }
2318 }
2319
2320 #[allow(irrefutable_let_patterns)]
2321 pub fn into_connector_open(
2322 self,
2323 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreConnectorOpenResponder)> {
2324 if let CapabilityStoreRequest::ConnectorOpen { id, server_end, responder } = self {
2325 Some((id, server_end, responder))
2326 } else {
2327 None
2328 }
2329 }
2330
2331 #[allow(irrefutable_let_patterns)]
2332 pub fn into_dir_connector_create(
2333 self,
2334 ) -> Option<(
2335 u64,
2336 fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
2337 CapabilityStoreDirConnectorCreateResponder,
2338 )> {
2339 if let CapabilityStoreRequest::DirConnectorCreate { id, receiver, responder } = self {
2340 Some((id, receiver, responder))
2341 } else {
2342 None
2343 }
2344 }
2345
2346 #[allow(irrefutable_let_patterns)]
2347 pub fn into_dir_connector_open(
2348 self,
2349 ) -> Option<(CapabilityStoreDirConnectorOpenRequest, CapabilityStoreDirConnectorOpenResponder)>
2350 {
2351 if let CapabilityStoreRequest::DirConnectorOpen { payload, responder } = self {
2352 Some((payload, responder))
2353 } else {
2354 None
2355 }
2356 }
2357
2358 #[allow(irrefutable_let_patterns)]
2359 pub fn into_dictionary_create(self) -> Option<(u64, CapabilityStoreDictionaryCreateResponder)> {
2360 if let CapabilityStoreRequest::DictionaryCreate { id, responder } = self {
2361 Some((id, responder))
2362 } else {
2363 None
2364 }
2365 }
2366
2367 #[allow(irrefutable_let_patterns)]
2368 pub fn into_dictionary_legacy_import(
2369 self,
2370 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreDictionaryLegacyImportResponder)>
2371 {
2372 if let CapabilityStoreRequest::DictionaryLegacyImport { id, client_end, responder } = self {
2373 Some((id, client_end, responder))
2374 } else {
2375 None
2376 }
2377 }
2378
2379 #[allow(irrefutable_let_patterns)]
2380 pub fn into_dictionary_legacy_export(
2381 self,
2382 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreDictionaryLegacyExportResponder)>
2383 {
2384 if let CapabilityStoreRequest::DictionaryLegacyExport { id, server_end, responder } = self {
2385 Some((id, server_end, responder))
2386 } else {
2387 None
2388 }
2389 }
2390
2391 #[allow(irrefutable_let_patterns)]
2392 pub fn into_dictionary_insert(
2393 self,
2394 ) -> Option<(u64, DictionaryItem, CapabilityStoreDictionaryInsertResponder)> {
2395 if let CapabilityStoreRequest::DictionaryInsert { id, item, responder } = self {
2396 Some((id, item, responder))
2397 } else {
2398 None
2399 }
2400 }
2401
2402 #[allow(irrefutable_let_patterns)]
2403 pub fn into_dictionary_get(
2404 self,
2405 ) -> Option<(u64, String, u64, CapabilityStoreDictionaryGetResponder)> {
2406 if let CapabilityStoreRequest::DictionaryGet { id, key, dest_id, responder } = self {
2407 Some((id, key, dest_id, responder))
2408 } else {
2409 None
2410 }
2411 }
2412
2413 #[allow(irrefutable_let_patterns)]
2414 pub fn into_dictionary_remove(
2415 self,
2416 ) -> Option<(
2417 u64,
2418 String,
2419 Option<Box<WrappedCapabilityId>>,
2420 CapabilityStoreDictionaryRemoveResponder,
2421 )> {
2422 if let CapabilityStoreRequest::DictionaryRemove { id, key, dest_id, responder } = self {
2423 Some((id, key, dest_id, responder))
2424 } else {
2425 None
2426 }
2427 }
2428
2429 #[allow(irrefutable_let_patterns)]
2430 pub fn into_dictionary_copy(
2431 self,
2432 ) -> Option<(u64, u64, CapabilityStoreDictionaryCopyResponder)> {
2433 if let CapabilityStoreRequest::DictionaryCopy { id, dest_id, responder } = self {
2434 Some((id, dest_id, responder))
2435 } else {
2436 None
2437 }
2438 }
2439
2440 #[allow(irrefutable_let_patterns)]
2441 pub fn into_dictionary_keys(
2442 self,
2443 ) -> Option<(
2444 u64,
2445 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
2446 CapabilityStoreDictionaryKeysResponder,
2447 )> {
2448 if let CapabilityStoreRequest::DictionaryKeys { id, iterator, responder } = self {
2449 Some((id, iterator, responder))
2450 } else {
2451 None
2452 }
2453 }
2454
2455 #[allow(irrefutable_let_patterns)]
2456 pub fn into_dictionary_enumerate(
2457 self,
2458 ) -> Option<(
2459 u64,
2460 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
2461 CapabilityStoreDictionaryEnumerateResponder,
2462 )> {
2463 if let CapabilityStoreRequest::DictionaryEnumerate { id, iterator, responder } = self {
2464 Some((id, iterator, responder))
2465 } else {
2466 None
2467 }
2468 }
2469
2470 #[allow(irrefutable_let_patterns)]
2471 pub fn into_dictionary_drain(
2472 self,
2473 ) -> Option<(
2474 u64,
2475 Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
2476 CapabilityStoreDictionaryDrainResponder,
2477 )> {
2478 if let CapabilityStoreRequest::DictionaryDrain { id, iterator, responder } = self {
2479 Some((id, iterator, responder))
2480 } else {
2481 None
2482 }
2483 }
2484
2485 pub fn method_name(&self) -> &'static str {
2487 match *self {
2488 CapabilityStoreRequest::Duplicate { .. } => "duplicate",
2489 CapabilityStoreRequest::Drop { .. } => "drop",
2490 CapabilityStoreRequest::Export { .. } => "export",
2491 CapabilityStoreRequest::Import { .. } => "import",
2492 CapabilityStoreRequest::ConnectorCreate { .. } => "connector_create",
2493 CapabilityStoreRequest::ConnectorOpen { .. } => "connector_open",
2494 CapabilityStoreRequest::DirConnectorCreate { .. } => "dir_connector_create",
2495 CapabilityStoreRequest::DirConnectorOpen { .. } => "dir_connector_open",
2496 CapabilityStoreRequest::DictionaryCreate { .. } => "dictionary_create",
2497 CapabilityStoreRequest::DictionaryLegacyImport { .. } => "dictionary_legacy_import",
2498 CapabilityStoreRequest::DictionaryLegacyExport { .. } => "dictionary_legacy_export",
2499 CapabilityStoreRequest::DictionaryInsert { .. } => "dictionary_insert",
2500 CapabilityStoreRequest::DictionaryGet { .. } => "dictionary_get",
2501 CapabilityStoreRequest::DictionaryRemove { .. } => "dictionary_remove",
2502 CapabilityStoreRequest::DictionaryCopy { .. } => "dictionary_copy",
2503 CapabilityStoreRequest::DictionaryKeys { .. } => "dictionary_keys",
2504 CapabilityStoreRequest::DictionaryEnumerate { .. } => "dictionary_enumerate",
2505 CapabilityStoreRequest::DictionaryDrain { .. } => "dictionary_drain",
2506 CapabilityStoreRequest::_UnknownMethod {
2507 method_type: fidl::MethodType::OneWay,
2508 ..
2509 } => "unknown one-way method",
2510 CapabilityStoreRequest::_UnknownMethod {
2511 method_type: fidl::MethodType::TwoWay,
2512 ..
2513 } => "unknown two-way method",
2514 }
2515 }
2516}
2517
2518#[derive(Debug, Clone)]
2519pub struct CapabilityStoreControlHandle {
2520 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2521}
2522
2523impl fdomain_client::fidl::ControlHandle for CapabilityStoreControlHandle {
2524 fn shutdown(&self) {
2525 self.inner.shutdown()
2526 }
2527
2528 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2529 self.inner.shutdown_with_epitaph(status)
2530 }
2531
2532 fn is_closed(&self) -> bool {
2533 self.inner.channel().is_closed()
2534 }
2535 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
2536 self.inner.channel().on_closed()
2537 }
2538}
2539
2540impl CapabilityStoreControlHandle {}
2541
2542#[must_use = "FIDL methods require a response to be sent"]
2543#[derive(Debug)]
2544pub struct CapabilityStoreDuplicateResponder {
2545 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2546 tx_id: u32,
2547}
2548
2549impl std::ops::Drop for CapabilityStoreDuplicateResponder {
2553 fn drop(&mut self) {
2554 self.control_handle.shutdown();
2555 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2557 }
2558}
2559
2560impl fdomain_client::fidl::Responder for CapabilityStoreDuplicateResponder {
2561 type ControlHandle = CapabilityStoreControlHandle;
2562
2563 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2564 &self.control_handle
2565 }
2566
2567 fn drop_without_shutdown(mut self) {
2568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2570 std::mem::forget(self);
2572 }
2573}
2574
2575impl CapabilityStoreDuplicateResponder {
2576 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2580 let _result = self.send_raw(result);
2581 if _result.is_err() {
2582 self.control_handle.shutdown();
2583 }
2584 self.drop_without_shutdown();
2585 _result
2586 }
2587
2588 pub fn send_no_shutdown_on_err(
2590 self,
2591 mut result: Result<(), CapabilityStoreError>,
2592 ) -> Result<(), fidl::Error> {
2593 let _result = self.send_raw(result);
2594 self.drop_without_shutdown();
2595 _result
2596 }
2597
2598 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2599 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2600 fidl::encoding::EmptyStruct,
2601 CapabilityStoreError,
2602 >>(
2603 fidl::encoding::FlexibleResult::new(result),
2604 self.tx_id,
2605 0x5d5d35d9c20a2184,
2606 fidl::encoding::DynamicFlags::FLEXIBLE,
2607 )
2608 }
2609}
2610
2611#[must_use = "FIDL methods require a response to be sent"]
2612#[derive(Debug)]
2613pub struct CapabilityStoreDropResponder {
2614 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2615 tx_id: u32,
2616}
2617
2618impl std::ops::Drop for CapabilityStoreDropResponder {
2622 fn drop(&mut self) {
2623 self.control_handle.shutdown();
2624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2626 }
2627}
2628
2629impl fdomain_client::fidl::Responder for CapabilityStoreDropResponder {
2630 type ControlHandle = CapabilityStoreControlHandle;
2631
2632 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2633 &self.control_handle
2634 }
2635
2636 fn drop_without_shutdown(mut self) {
2637 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2639 std::mem::forget(self);
2641 }
2642}
2643
2644impl CapabilityStoreDropResponder {
2645 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2649 let _result = self.send_raw(result);
2650 if _result.is_err() {
2651 self.control_handle.shutdown();
2652 }
2653 self.drop_without_shutdown();
2654 _result
2655 }
2656
2657 pub fn send_no_shutdown_on_err(
2659 self,
2660 mut result: Result<(), CapabilityStoreError>,
2661 ) -> Result<(), fidl::Error> {
2662 let _result = self.send_raw(result);
2663 self.drop_without_shutdown();
2664 _result
2665 }
2666
2667 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2668 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2669 fidl::encoding::EmptyStruct,
2670 CapabilityStoreError,
2671 >>(
2672 fidl::encoding::FlexibleResult::new(result),
2673 self.tx_id,
2674 0xa745c0990fc2559,
2675 fidl::encoding::DynamicFlags::FLEXIBLE,
2676 )
2677 }
2678}
2679
2680#[must_use = "FIDL methods require a response to be sent"]
2681#[derive(Debug)]
2682pub struct CapabilityStoreExportResponder {
2683 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2684 tx_id: u32,
2685}
2686
2687impl std::ops::Drop for CapabilityStoreExportResponder {
2691 fn drop(&mut self) {
2692 self.control_handle.shutdown();
2693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2695 }
2696}
2697
2698impl fdomain_client::fidl::Responder for CapabilityStoreExportResponder {
2699 type ControlHandle = CapabilityStoreControlHandle;
2700
2701 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2702 &self.control_handle
2703 }
2704
2705 fn drop_without_shutdown(mut self) {
2706 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2708 std::mem::forget(self);
2710 }
2711}
2712
2713impl CapabilityStoreExportResponder {
2714 pub fn send(
2718 self,
2719 mut result: Result<Capability, CapabilityStoreError>,
2720 ) -> Result<(), fidl::Error> {
2721 let _result = self.send_raw(result);
2722 if _result.is_err() {
2723 self.control_handle.shutdown();
2724 }
2725 self.drop_without_shutdown();
2726 _result
2727 }
2728
2729 pub fn send_no_shutdown_on_err(
2731 self,
2732 mut result: Result<Capability, CapabilityStoreError>,
2733 ) -> Result<(), fidl::Error> {
2734 let _result = self.send_raw(result);
2735 self.drop_without_shutdown();
2736 _result
2737 }
2738
2739 fn send_raw(
2740 &self,
2741 mut result: Result<Capability, CapabilityStoreError>,
2742 ) -> Result<(), fidl::Error> {
2743 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2744 CapabilityStoreExportResponse,
2745 CapabilityStoreError,
2746 >>(
2747 fidl::encoding::FlexibleResult::new(
2748 result.as_mut().map_err(|e| *e).map(|capability| (capability,)),
2749 ),
2750 self.tx_id,
2751 0x3237a8f4748faff,
2752 fidl::encoding::DynamicFlags::FLEXIBLE,
2753 )
2754 }
2755}
2756
2757#[must_use = "FIDL methods require a response to be sent"]
2758#[derive(Debug)]
2759pub struct CapabilityStoreImportResponder {
2760 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2761 tx_id: u32,
2762}
2763
2764impl std::ops::Drop for CapabilityStoreImportResponder {
2768 fn drop(&mut self) {
2769 self.control_handle.shutdown();
2770 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2772 }
2773}
2774
2775impl fdomain_client::fidl::Responder for CapabilityStoreImportResponder {
2776 type ControlHandle = CapabilityStoreControlHandle;
2777
2778 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2779 &self.control_handle
2780 }
2781
2782 fn drop_without_shutdown(mut self) {
2783 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2785 std::mem::forget(self);
2787 }
2788}
2789
2790impl CapabilityStoreImportResponder {
2791 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2795 let _result = self.send_raw(result);
2796 if _result.is_err() {
2797 self.control_handle.shutdown();
2798 }
2799 self.drop_without_shutdown();
2800 _result
2801 }
2802
2803 pub fn send_no_shutdown_on_err(
2805 self,
2806 mut result: Result<(), CapabilityStoreError>,
2807 ) -> Result<(), fidl::Error> {
2808 let _result = self.send_raw(result);
2809 self.drop_without_shutdown();
2810 _result
2811 }
2812
2813 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2814 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2815 fidl::encoding::EmptyStruct,
2816 CapabilityStoreError,
2817 >>(
2818 fidl::encoding::FlexibleResult::new(result),
2819 self.tx_id,
2820 0x1f96157a29f4539b,
2821 fidl::encoding::DynamicFlags::FLEXIBLE,
2822 )
2823 }
2824}
2825
2826#[must_use = "FIDL methods require a response to be sent"]
2827#[derive(Debug)]
2828pub struct CapabilityStoreConnectorCreateResponder {
2829 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2830 tx_id: u32,
2831}
2832
2833impl std::ops::Drop for CapabilityStoreConnectorCreateResponder {
2837 fn drop(&mut self) {
2838 self.control_handle.shutdown();
2839 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2841 }
2842}
2843
2844impl fdomain_client::fidl::Responder for CapabilityStoreConnectorCreateResponder {
2845 type ControlHandle = CapabilityStoreControlHandle;
2846
2847 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2848 &self.control_handle
2849 }
2850
2851 fn drop_without_shutdown(mut self) {
2852 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2854 std::mem::forget(self);
2856 }
2857}
2858
2859impl CapabilityStoreConnectorCreateResponder {
2860 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2864 let _result = self.send_raw(result);
2865 if _result.is_err() {
2866 self.control_handle.shutdown();
2867 }
2868 self.drop_without_shutdown();
2869 _result
2870 }
2871
2872 pub fn send_no_shutdown_on_err(
2874 self,
2875 mut result: Result<(), CapabilityStoreError>,
2876 ) -> Result<(), fidl::Error> {
2877 let _result = self.send_raw(result);
2878 self.drop_without_shutdown();
2879 _result
2880 }
2881
2882 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2883 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2884 fidl::encoding::EmptyStruct,
2885 CapabilityStoreError,
2886 >>(
2887 fidl::encoding::FlexibleResult::new(result),
2888 self.tx_id,
2889 0x29592c5d63e91c25,
2890 fidl::encoding::DynamicFlags::FLEXIBLE,
2891 )
2892 }
2893}
2894
2895#[must_use = "FIDL methods require a response to be sent"]
2896#[derive(Debug)]
2897pub struct CapabilityStoreConnectorOpenResponder {
2898 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2899 tx_id: u32,
2900}
2901
2902impl std::ops::Drop for CapabilityStoreConnectorOpenResponder {
2906 fn drop(&mut self) {
2907 self.control_handle.shutdown();
2908 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2910 }
2911}
2912
2913impl fdomain_client::fidl::Responder for CapabilityStoreConnectorOpenResponder {
2914 type ControlHandle = CapabilityStoreControlHandle;
2915
2916 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2917 &self.control_handle
2918 }
2919
2920 fn drop_without_shutdown(mut self) {
2921 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2923 std::mem::forget(self);
2925 }
2926}
2927
2928impl CapabilityStoreConnectorOpenResponder {
2929 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2933 let _result = self.send_raw(result);
2934 if _result.is_err() {
2935 self.control_handle.shutdown();
2936 }
2937 self.drop_without_shutdown();
2938 _result
2939 }
2940
2941 pub fn send_no_shutdown_on_err(
2943 self,
2944 mut result: Result<(), CapabilityStoreError>,
2945 ) -> Result<(), fidl::Error> {
2946 let _result = self.send_raw(result);
2947 self.drop_without_shutdown();
2948 _result
2949 }
2950
2951 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2952 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2953 fidl::encoding::EmptyStruct,
2954 CapabilityStoreError,
2955 >>(
2956 fidl::encoding::FlexibleResult::new(result),
2957 self.tx_id,
2958 0x537e69ab40563b9f,
2959 fidl::encoding::DynamicFlags::FLEXIBLE,
2960 )
2961 }
2962}
2963
2964#[must_use = "FIDL methods require a response to be sent"]
2965#[derive(Debug)]
2966pub struct CapabilityStoreDirConnectorCreateResponder {
2967 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2968 tx_id: u32,
2969}
2970
2971impl std::ops::Drop for CapabilityStoreDirConnectorCreateResponder {
2975 fn drop(&mut self) {
2976 self.control_handle.shutdown();
2977 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2979 }
2980}
2981
2982impl fdomain_client::fidl::Responder for CapabilityStoreDirConnectorCreateResponder {
2983 type ControlHandle = CapabilityStoreControlHandle;
2984
2985 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2986 &self.control_handle
2987 }
2988
2989 fn drop_without_shutdown(mut self) {
2990 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2992 std::mem::forget(self);
2994 }
2995}
2996
2997impl CapabilityStoreDirConnectorCreateResponder {
2998 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3002 let _result = self.send_raw(result);
3003 if _result.is_err() {
3004 self.control_handle.shutdown();
3005 }
3006 self.drop_without_shutdown();
3007 _result
3008 }
3009
3010 pub fn send_no_shutdown_on_err(
3012 self,
3013 mut result: Result<(), CapabilityStoreError>,
3014 ) -> Result<(), fidl::Error> {
3015 let _result = self.send_raw(result);
3016 self.drop_without_shutdown();
3017 _result
3018 }
3019
3020 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3021 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3022 fidl::encoding::EmptyStruct,
3023 CapabilityStoreError,
3024 >>(
3025 fidl::encoding::FlexibleResult::new(result),
3026 self.tx_id,
3027 0x186138a11ccf19bb,
3028 fidl::encoding::DynamicFlags::FLEXIBLE,
3029 )
3030 }
3031}
3032
3033#[must_use = "FIDL methods require a response to be sent"]
3034#[derive(Debug)]
3035pub struct CapabilityStoreDirConnectorOpenResponder {
3036 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3037 tx_id: u32,
3038}
3039
3040impl std::ops::Drop for CapabilityStoreDirConnectorOpenResponder {
3044 fn drop(&mut self) {
3045 self.control_handle.shutdown();
3046 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3048 }
3049}
3050
3051impl fdomain_client::fidl::Responder for CapabilityStoreDirConnectorOpenResponder {
3052 type ControlHandle = CapabilityStoreControlHandle;
3053
3054 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3055 &self.control_handle
3056 }
3057
3058 fn drop_without_shutdown(mut self) {
3059 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3061 std::mem::forget(self);
3063 }
3064}
3065
3066impl CapabilityStoreDirConnectorOpenResponder {
3067 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3071 let _result = self.send_raw(result);
3072 if _result.is_err() {
3073 self.control_handle.shutdown();
3074 }
3075 self.drop_without_shutdown();
3076 _result
3077 }
3078
3079 pub fn send_no_shutdown_on_err(
3081 self,
3082 mut result: Result<(), CapabilityStoreError>,
3083 ) -> Result<(), fidl::Error> {
3084 let _result = self.send_raw(result);
3085 self.drop_without_shutdown();
3086 _result
3087 }
3088
3089 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3090 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3091 fidl::encoding::EmptyStruct,
3092 CapabilityStoreError,
3093 >>(
3094 fidl::encoding::FlexibleResult::new(result),
3095 self.tx_id,
3096 0x5650d3d6a3a13901,
3097 fidl::encoding::DynamicFlags::FLEXIBLE,
3098 )
3099 }
3100}
3101
3102#[must_use = "FIDL methods require a response to be sent"]
3103#[derive(Debug)]
3104pub struct CapabilityStoreDictionaryCreateResponder {
3105 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3106 tx_id: u32,
3107}
3108
3109impl std::ops::Drop for CapabilityStoreDictionaryCreateResponder {
3113 fn drop(&mut self) {
3114 self.control_handle.shutdown();
3115 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3117 }
3118}
3119
3120impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryCreateResponder {
3121 type ControlHandle = CapabilityStoreControlHandle;
3122
3123 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3124 &self.control_handle
3125 }
3126
3127 fn drop_without_shutdown(mut self) {
3128 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3130 std::mem::forget(self);
3132 }
3133}
3134
3135impl CapabilityStoreDictionaryCreateResponder {
3136 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3140 let _result = self.send_raw(result);
3141 if _result.is_err() {
3142 self.control_handle.shutdown();
3143 }
3144 self.drop_without_shutdown();
3145 _result
3146 }
3147
3148 pub fn send_no_shutdown_on_err(
3150 self,
3151 mut result: Result<(), CapabilityStoreError>,
3152 ) -> Result<(), fidl::Error> {
3153 let _result = self.send_raw(result);
3154 self.drop_without_shutdown();
3155 _result
3156 }
3157
3158 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3159 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3160 fidl::encoding::EmptyStruct,
3161 CapabilityStoreError,
3162 >>(
3163 fidl::encoding::FlexibleResult::new(result),
3164 self.tx_id,
3165 0x6997c8dfc63de093,
3166 fidl::encoding::DynamicFlags::FLEXIBLE,
3167 )
3168 }
3169}
3170
3171#[must_use = "FIDL methods require a response to be sent"]
3172#[derive(Debug)]
3173pub struct CapabilityStoreDictionaryLegacyImportResponder {
3174 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3175 tx_id: u32,
3176}
3177
3178impl std::ops::Drop for CapabilityStoreDictionaryLegacyImportResponder {
3182 fn drop(&mut self) {
3183 self.control_handle.shutdown();
3184 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3186 }
3187}
3188
3189impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryLegacyImportResponder {
3190 type ControlHandle = CapabilityStoreControlHandle;
3191
3192 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3193 &self.control_handle
3194 }
3195
3196 fn drop_without_shutdown(mut self) {
3197 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3199 std::mem::forget(self);
3201 }
3202}
3203
3204impl CapabilityStoreDictionaryLegacyImportResponder {
3205 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3209 let _result = self.send_raw(result);
3210 if _result.is_err() {
3211 self.control_handle.shutdown();
3212 }
3213 self.drop_without_shutdown();
3214 _result
3215 }
3216
3217 pub fn send_no_shutdown_on_err(
3219 self,
3220 mut result: Result<(), CapabilityStoreError>,
3221 ) -> Result<(), fidl::Error> {
3222 let _result = self.send_raw(result);
3223 self.drop_without_shutdown();
3224 _result
3225 }
3226
3227 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3228 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3229 fidl::encoding::EmptyStruct,
3230 CapabilityStoreError,
3231 >>(
3232 fidl::encoding::FlexibleResult::new(result),
3233 self.tx_id,
3234 0x72fd686c37b6025f,
3235 fidl::encoding::DynamicFlags::FLEXIBLE,
3236 )
3237 }
3238}
3239
3240#[must_use = "FIDL methods require a response to be sent"]
3241#[derive(Debug)]
3242pub struct CapabilityStoreDictionaryLegacyExportResponder {
3243 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3244 tx_id: u32,
3245}
3246
3247impl std::ops::Drop for CapabilityStoreDictionaryLegacyExportResponder {
3251 fn drop(&mut self) {
3252 self.control_handle.shutdown();
3253 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3255 }
3256}
3257
3258impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryLegacyExportResponder {
3259 type ControlHandle = CapabilityStoreControlHandle;
3260
3261 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3262 &self.control_handle
3263 }
3264
3265 fn drop_without_shutdown(mut self) {
3266 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3268 std::mem::forget(self);
3270 }
3271}
3272
3273impl CapabilityStoreDictionaryLegacyExportResponder {
3274 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3278 let _result = self.send_raw(result);
3279 if _result.is_err() {
3280 self.control_handle.shutdown();
3281 }
3282 self.drop_without_shutdown();
3283 _result
3284 }
3285
3286 pub fn send_no_shutdown_on_err(
3288 self,
3289 mut result: Result<(), CapabilityStoreError>,
3290 ) -> Result<(), fidl::Error> {
3291 let _result = self.send_raw(result);
3292 self.drop_without_shutdown();
3293 _result
3294 }
3295
3296 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3297 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3298 fidl::encoding::EmptyStruct,
3299 CapabilityStoreError,
3300 >>(
3301 fidl::encoding::FlexibleResult::new(result),
3302 self.tx_id,
3303 0x407e15cc4bde5dcd,
3304 fidl::encoding::DynamicFlags::FLEXIBLE,
3305 )
3306 }
3307}
3308
3309#[must_use = "FIDL methods require a response to be sent"]
3310#[derive(Debug)]
3311pub struct CapabilityStoreDictionaryInsertResponder {
3312 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3313 tx_id: u32,
3314}
3315
3316impl std::ops::Drop for CapabilityStoreDictionaryInsertResponder {
3320 fn drop(&mut self) {
3321 self.control_handle.shutdown();
3322 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3324 }
3325}
3326
3327impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryInsertResponder {
3328 type ControlHandle = CapabilityStoreControlHandle;
3329
3330 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3331 &self.control_handle
3332 }
3333
3334 fn drop_without_shutdown(mut self) {
3335 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3337 std::mem::forget(self);
3339 }
3340}
3341
3342impl CapabilityStoreDictionaryInsertResponder {
3343 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3347 let _result = self.send_raw(result);
3348 if _result.is_err() {
3349 self.control_handle.shutdown();
3350 }
3351 self.drop_without_shutdown();
3352 _result
3353 }
3354
3355 pub fn send_no_shutdown_on_err(
3357 self,
3358 mut result: Result<(), CapabilityStoreError>,
3359 ) -> Result<(), fidl::Error> {
3360 let _result = self.send_raw(result);
3361 self.drop_without_shutdown();
3362 _result
3363 }
3364
3365 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3366 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3367 fidl::encoding::EmptyStruct,
3368 CapabilityStoreError,
3369 >>(
3370 fidl::encoding::FlexibleResult::new(result),
3371 self.tx_id,
3372 0x7702183689d44c27,
3373 fidl::encoding::DynamicFlags::FLEXIBLE,
3374 )
3375 }
3376}
3377
3378#[must_use = "FIDL methods require a response to be sent"]
3379#[derive(Debug)]
3380pub struct CapabilityStoreDictionaryGetResponder {
3381 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3382 tx_id: u32,
3383}
3384
3385impl std::ops::Drop for CapabilityStoreDictionaryGetResponder {
3389 fn drop(&mut self) {
3390 self.control_handle.shutdown();
3391 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3393 }
3394}
3395
3396impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryGetResponder {
3397 type ControlHandle = CapabilityStoreControlHandle;
3398
3399 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3400 &self.control_handle
3401 }
3402
3403 fn drop_without_shutdown(mut self) {
3404 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3406 std::mem::forget(self);
3408 }
3409}
3410
3411impl CapabilityStoreDictionaryGetResponder {
3412 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3416 let _result = self.send_raw(result);
3417 if _result.is_err() {
3418 self.control_handle.shutdown();
3419 }
3420 self.drop_without_shutdown();
3421 _result
3422 }
3423
3424 pub fn send_no_shutdown_on_err(
3426 self,
3427 mut result: Result<(), CapabilityStoreError>,
3428 ) -> Result<(), fidl::Error> {
3429 let _result = self.send_raw(result);
3430 self.drop_without_shutdown();
3431 _result
3432 }
3433
3434 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3435 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3436 fidl::encoding::EmptyStruct,
3437 CapabilityStoreError,
3438 >>(
3439 fidl::encoding::FlexibleResult::new(result),
3440 self.tx_id,
3441 0x4d9e27538284add2,
3442 fidl::encoding::DynamicFlags::FLEXIBLE,
3443 )
3444 }
3445}
3446
3447#[must_use = "FIDL methods require a response to be sent"]
3448#[derive(Debug)]
3449pub struct CapabilityStoreDictionaryRemoveResponder {
3450 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3451 tx_id: u32,
3452}
3453
3454impl std::ops::Drop for CapabilityStoreDictionaryRemoveResponder {
3458 fn drop(&mut self) {
3459 self.control_handle.shutdown();
3460 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3462 }
3463}
3464
3465impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryRemoveResponder {
3466 type ControlHandle = CapabilityStoreControlHandle;
3467
3468 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3469 &self.control_handle
3470 }
3471
3472 fn drop_without_shutdown(mut self) {
3473 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3475 std::mem::forget(self);
3477 }
3478}
3479
3480impl CapabilityStoreDictionaryRemoveResponder {
3481 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3485 let _result = self.send_raw(result);
3486 if _result.is_err() {
3487 self.control_handle.shutdown();
3488 }
3489 self.drop_without_shutdown();
3490 _result
3491 }
3492
3493 pub fn send_no_shutdown_on_err(
3495 self,
3496 mut result: Result<(), CapabilityStoreError>,
3497 ) -> Result<(), fidl::Error> {
3498 let _result = self.send_raw(result);
3499 self.drop_without_shutdown();
3500 _result
3501 }
3502
3503 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3504 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3505 fidl::encoding::EmptyStruct,
3506 CapabilityStoreError,
3507 >>(
3508 fidl::encoding::FlexibleResult::new(result),
3509 self.tx_id,
3510 0x4c5c025ab05d4f3,
3511 fidl::encoding::DynamicFlags::FLEXIBLE,
3512 )
3513 }
3514}
3515
3516#[must_use = "FIDL methods require a response to be sent"]
3517#[derive(Debug)]
3518pub struct CapabilityStoreDictionaryCopyResponder {
3519 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3520 tx_id: u32,
3521}
3522
3523impl std::ops::Drop for CapabilityStoreDictionaryCopyResponder {
3527 fn drop(&mut self) {
3528 self.control_handle.shutdown();
3529 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3531 }
3532}
3533
3534impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryCopyResponder {
3535 type ControlHandle = CapabilityStoreControlHandle;
3536
3537 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3538 &self.control_handle
3539 }
3540
3541 fn drop_without_shutdown(mut self) {
3542 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3544 std::mem::forget(self);
3546 }
3547}
3548
3549impl CapabilityStoreDictionaryCopyResponder {
3550 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3554 let _result = self.send_raw(result);
3555 if _result.is_err() {
3556 self.control_handle.shutdown();
3557 }
3558 self.drop_without_shutdown();
3559 _result
3560 }
3561
3562 pub fn send_no_shutdown_on_err(
3564 self,
3565 mut result: Result<(), CapabilityStoreError>,
3566 ) -> Result<(), fidl::Error> {
3567 let _result = self.send_raw(result);
3568 self.drop_without_shutdown();
3569 _result
3570 }
3571
3572 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3573 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3574 fidl::encoding::EmptyStruct,
3575 CapabilityStoreError,
3576 >>(
3577 fidl::encoding::FlexibleResult::new(result),
3578 self.tx_id,
3579 0x3733ecdf4ea1b44f,
3580 fidl::encoding::DynamicFlags::FLEXIBLE,
3581 )
3582 }
3583}
3584
3585#[must_use = "FIDL methods require a response to be sent"]
3586#[derive(Debug)]
3587pub struct CapabilityStoreDictionaryKeysResponder {
3588 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3589 tx_id: u32,
3590}
3591
3592impl std::ops::Drop for CapabilityStoreDictionaryKeysResponder {
3596 fn drop(&mut self) {
3597 self.control_handle.shutdown();
3598 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3600 }
3601}
3602
3603impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryKeysResponder {
3604 type ControlHandle = CapabilityStoreControlHandle;
3605
3606 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3607 &self.control_handle
3608 }
3609
3610 fn drop_without_shutdown(mut self) {
3611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3613 std::mem::forget(self);
3615 }
3616}
3617
3618impl CapabilityStoreDictionaryKeysResponder {
3619 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3623 let _result = self.send_raw(result);
3624 if _result.is_err() {
3625 self.control_handle.shutdown();
3626 }
3627 self.drop_without_shutdown();
3628 _result
3629 }
3630
3631 pub fn send_no_shutdown_on_err(
3633 self,
3634 mut result: Result<(), CapabilityStoreError>,
3635 ) -> Result<(), fidl::Error> {
3636 let _result = self.send_raw(result);
3637 self.drop_without_shutdown();
3638 _result
3639 }
3640
3641 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3642 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3643 fidl::encoding::EmptyStruct,
3644 CapabilityStoreError,
3645 >>(
3646 fidl::encoding::FlexibleResult::new(result),
3647 self.tx_id,
3648 0x84b05577ceaec9e,
3649 fidl::encoding::DynamicFlags::FLEXIBLE,
3650 )
3651 }
3652}
3653
3654#[must_use = "FIDL methods require a response to be sent"]
3655#[derive(Debug)]
3656pub struct CapabilityStoreDictionaryEnumerateResponder {
3657 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3658 tx_id: u32,
3659}
3660
3661impl std::ops::Drop for CapabilityStoreDictionaryEnumerateResponder {
3665 fn drop(&mut self) {
3666 self.control_handle.shutdown();
3667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3669 }
3670}
3671
3672impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryEnumerateResponder {
3673 type ControlHandle = CapabilityStoreControlHandle;
3674
3675 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3676 &self.control_handle
3677 }
3678
3679 fn drop_without_shutdown(mut self) {
3680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3682 std::mem::forget(self);
3684 }
3685}
3686
3687impl CapabilityStoreDictionaryEnumerateResponder {
3688 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3692 let _result = self.send_raw(result);
3693 if _result.is_err() {
3694 self.control_handle.shutdown();
3695 }
3696 self.drop_without_shutdown();
3697 _result
3698 }
3699
3700 pub fn send_no_shutdown_on_err(
3702 self,
3703 mut result: Result<(), CapabilityStoreError>,
3704 ) -> Result<(), fidl::Error> {
3705 let _result = self.send_raw(result);
3706 self.drop_without_shutdown();
3707 _result
3708 }
3709
3710 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3711 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3712 fidl::encoding::EmptyStruct,
3713 CapabilityStoreError,
3714 >>(
3715 fidl::encoding::FlexibleResult::new(result),
3716 self.tx_id,
3717 0xd6279b6ced04641,
3718 fidl::encoding::DynamicFlags::FLEXIBLE,
3719 )
3720 }
3721}
3722
3723#[must_use = "FIDL methods require a response to be sent"]
3724#[derive(Debug)]
3725pub struct CapabilityStoreDictionaryDrainResponder {
3726 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3727 tx_id: u32,
3728}
3729
3730impl std::ops::Drop for CapabilityStoreDictionaryDrainResponder {
3734 fn drop(&mut self) {
3735 self.control_handle.shutdown();
3736 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3738 }
3739}
3740
3741impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryDrainResponder {
3742 type ControlHandle = CapabilityStoreControlHandle;
3743
3744 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3745 &self.control_handle
3746 }
3747
3748 fn drop_without_shutdown(mut self) {
3749 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3751 std::mem::forget(self);
3753 }
3754}
3755
3756impl CapabilityStoreDictionaryDrainResponder {
3757 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3761 let _result = self.send_raw(result);
3762 if _result.is_err() {
3763 self.control_handle.shutdown();
3764 }
3765 self.drop_without_shutdown();
3766 _result
3767 }
3768
3769 pub fn send_no_shutdown_on_err(
3771 self,
3772 mut result: Result<(), CapabilityStoreError>,
3773 ) -> Result<(), fidl::Error> {
3774 let _result = self.send_raw(result);
3775 self.drop_without_shutdown();
3776 _result
3777 }
3778
3779 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3780 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3781 fidl::encoding::EmptyStruct,
3782 CapabilityStoreError,
3783 >>(
3784 fidl::encoding::FlexibleResult::new(result),
3785 self.tx_id,
3786 0x28a3a3f84d928cd8,
3787 fidl::encoding::DynamicFlags::FLEXIBLE,
3788 )
3789 }
3790}
3791
3792#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3793pub struct ConnectorRouterMarker;
3794
3795impl fdomain_client::fidl::ProtocolMarker for ConnectorRouterMarker {
3796 type Proxy = ConnectorRouterProxy;
3797 type RequestStream = ConnectorRouterRequestStream;
3798
3799 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
3800}
3801impl fdomain_client::fidl::DiscoverableProtocolMarker for ConnectorRouterMarker {}
3802pub type ConnectorRouterRouteResult = Result<ConnectorRouterRouteResponse, RouterError>;
3803
3804pub trait ConnectorRouterProxyInterface: Send + Sync {
3805 type RouteResponseFut: std::future::Future<Output = Result<ConnectorRouterRouteResult, fidl::Error>>
3806 + Send;
3807 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
3808}
3809
3810#[derive(Debug, Clone)]
3811pub struct ConnectorRouterProxy {
3812 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
3813}
3814
3815impl fdomain_client::fidl::Proxy for ConnectorRouterProxy {
3816 type Protocol = ConnectorRouterMarker;
3817
3818 fn from_channel(inner: fdomain_client::Channel) -> Self {
3819 Self::new(inner)
3820 }
3821
3822 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
3823 self.client.into_channel().map_err(|client| Self { client })
3824 }
3825
3826 fn as_channel(&self) -> &fdomain_client::Channel {
3827 self.client.as_channel()
3828 }
3829}
3830
3831impl ConnectorRouterProxy {
3832 pub fn new(channel: fdomain_client::Channel) -> Self {
3834 let protocol_name =
3835 <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
3836 Self { client: fidl::client::Client::new(channel, protocol_name) }
3837 }
3838
3839 pub fn take_event_stream(&self) -> ConnectorRouterEventStream {
3845 ConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
3846 }
3847
3848 pub fn r#route(
3849 &self,
3850 mut payload: RouteRequest,
3851 ) -> fidl::client::QueryResponseFut<
3852 ConnectorRouterRouteResult,
3853 fdomain_client::fidl::FDomainResourceDialect,
3854 > {
3855 ConnectorRouterProxyInterface::r#route(self, payload)
3856 }
3857}
3858
3859impl ConnectorRouterProxyInterface for ConnectorRouterProxy {
3860 type RouteResponseFut = fidl::client::QueryResponseFut<
3861 ConnectorRouterRouteResult,
3862 fdomain_client::fidl::FDomainResourceDialect,
3863 >;
3864 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
3865 fn _decode(
3866 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3867 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
3868 let _response = fidl::client::decode_transaction_body::<
3869 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
3870 fdomain_client::fidl::FDomainResourceDialect,
3871 0x74dbb8bc13730766,
3872 >(_buf?)?
3873 .into_result_fdomain::<ConnectorRouterMarker>("route")?;
3874 Ok(_response.map(|x| x))
3875 }
3876 self.client.send_query_and_decode::<RouteRequest, ConnectorRouterRouteResult>(
3877 &mut payload,
3878 0x74dbb8bc13730766,
3879 fidl::encoding::DynamicFlags::FLEXIBLE,
3880 _decode,
3881 )
3882 }
3883}
3884
3885pub struct ConnectorRouterEventStream {
3886 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
3887}
3888
3889impl std::marker::Unpin for ConnectorRouterEventStream {}
3890
3891impl futures::stream::FusedStream for ConnectorRouterEventStream {
3892 fn is_terminated(&self) -> bool {
3893 self.event_receiver.is_terminated()
3894 }
3895}
3896
3897impl futures::Stream for ConnectorRouterEventStream {
3898 type Item = Result<ConnectorRouterEvent, fidl::Error>;
3899
3900 fn poll_next(
3901 mut self: std::pin::Pin<&mut Self>,
3902 cx: &mut std::task::Context<'_>,
3903 ) -> std::task::Poll<Option<Self::Item>> {
3904 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3905 &mut self.event_receiver,
3906 cx
3907 )?) {
3908 Some(buf) => std::task::Poll::Ready(Some(ConnectorRouterEvent::decode(buf))),
3909 None => std::task::Poll::Ready(None),
3910 }
3911 }
3912}
3913
3914#[derive(Debug)]
3915pub enum ConnectorRouterEvent {
3916 #[non_exhaustive]
3917 _UnknownEvent {
3918 ordinal: u64,
3920 },
3921}
3922
3923impl ConnectorRouterEvent {
3924 fn decode(
3926 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3927 ) -> Result<ConnectorRouterEvent, fidl::Error> {
3928 let (bytes, _handles) = buf.split_mut();
3929 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3930 debug_assert_eq!(tx_header.tx_id, 0);
3931 match tx_header.ordinal {
3932 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3933 Ok(ConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3934 }
3935 _ => Err(fidl::Error::UnknownOrdinal {
3936 ordinal: tx_header.ordinal,
3937 protocol_name:
3938 <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3939 }),
3940 }
3941 }
3942}
3943
3944pub struct ConnectorRouterRequestStream {
3946 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3947 is_terminated: bool,
3948}
3949
3950impl std::marker::Unpin for ConnectorRouterRequestStream {}
3951
3952impl futures::stream::FusedStream for ConnectorRouterRequestStream {
3953 fn is_terminated(&self) -> bool {
3954 self.is_terminated
3955 }
3956}
3957
3958impl fdomain_client::fidl::RequestStream for ConnectorRouterRequestStream {
3959 type Protocol = ConnectorRouterMarker;
3960 type ControlHandle = ConnectorRouterControlHandle;
3961
3962 fn from_channel(channel: fdomain_client::Channel) -> Self {
3963 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3964 }
3965
3966 fn control_handle(&self) -> Self::ControlHandle {
3967 ConnectorRouterControlHandle { inner: self.inner.clone() }
3968 }
3969
3970 fn into_inner(
3971 self,
3972 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
3973 {
3974 (self.inner, self.is_terminated)
3975 }
3976
3977 fn from_inner(
3978 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3979 is_terminated: bool,
3980 ) -> Self {
3981 Self { inner, is_terminated }
3982 }
3983}
3984
3985impl futures::Stream for ConnectorRouterRequestStream {
3986 type Item = Result<ConnectorRouterRequest, fidl::Error>;
3987
3988 fn poll_next(
3989 mut self: std::pin::Pin<&mut Self>,
3990 cx: &mut std::task::Context<'_>,
3991 ) -> std::task::Poll<Option<Self::Item>> {
3992 let this = &mut *self;
3993 if this.inner.check_shutdown(cx) {
3994 this.is_terminated = true;
3995 return std::task::Poll::Ready(None);
3996 }
3997 if this.is_terminated {
3998 panic!("polled ConnectorRouterRequestStream after completion");
3999 }
4000 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4001 |bytes, handles| {
4002 match this.inner.channel().read_etc(cx, bytes, handles) {
4003 std::task::Poll::Ready(Ok(())) => {}
4004 std::task::Poll::Pending => return std::task::Poll::Pending,
4005 std::task::Poll::Ready(Err(None)) => {
4006 this.is_terminated = true;
4007 return std::task::Poll::Ready(None);
4008 }
4009 std::task::Poll::Ready(Err(Some(e))) => {
4010 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4011 e.into(),
4012 ))));
4013 }
4014 }
4015
4016 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4018
4019 std::task::Poll::Ready(Some(match header.ordinal {
4020 0x74dbb8bc13730766 => {
4021 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4022 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
4023 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4024 let control_handle = ConnectorRouterControlHandle {
4025 inner: this.inner.clone(),
4026 };
4027 Ok(ConnectorRouterRequest::Route {payload: req,
4028 responder: ConnectorRouterRouteResponder {
4029 control_handle: std::mem::ManuallyDrop::new(control_handle),
4030 tx_id: header.tx_id,
4031 },
4032 })
4033 }
4034 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4035 Ok(ConnectorRouterRequest::_UnknownMethod {
4036 ordinal: header.ordinal,
4037 control_handle: ConnectorRouterControlHandle { inner: this.inner.clone() },
4038 method_type: fidl::MethodType::OneWay,
4039 })
4040 }
4041 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4042 this.inner.send_framework_err(
4043 fidl::encoding::FrameworkErr::UnknownMethod,
4044 header.tx_id,
4045 header.ordinal,
4046 header.dynamic_flags(),
4047 (bytes, handles),
4048 )?;
4049 Ok(ConnectorRouterRequest::_UnknownMethod {
4050 ordinal: header.ordinal,
4051 control_handle: ConnectorRouterControlHandle { inner: this.inner.clone() },
4052 method_type: fidl::MethodType::TwoWay,
4053 })
4054 }
4055 _ => Err(fidl::Error::UnknownOrdinal {
4056 ordinal: header.ordinal,
4057 protocol_name: <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4058 }),
4059 }))
4060 },
4061 )
4062 }
4063}
4064
4065#[derive(Debug)]
4066pub enum ConnectorRouterRequest {
4067 Route {
4068 payload: RouteRequest,
4069 responder: ConnectorRouterRouteResponder,
4070 },
4071 #[non_exhaustive]
4073 _UnknownMethod {
4074 ordinal: u64,
4076 control_handle: ConnectorRouterControlHandle,
4077 method_type: fidl::MethodType,
4078 },
4079}
4080
4081impl ConnectorRouterRequest {
4082 #[allow(irrefutable_let_patterns)]
4083 pub fn into_route(self) -> Option<(RouteRequest, ConnectorRouterRouteResponder)> {
4084 if let ConnectorRouterRequest::Route { payload, responder } = self {
4085 Some((payload, responder))
4086 } else {
4087 None
4088 }
4089 }
4090
4091 pub fn method_name(&self) -> &'static str {
4093 match *self {
4094 ConnectorRouterRequest::Route { .. } => "route",
4095 ConnectorRouterRequest::_UnknownMethod {
4096 method_type: fidl::MethodType::OneWay,
4097 ..
4098 } => "unknown one-way method",
4099 ConnectorRouterRequest::_UnknownMethod {
4100 method_type: fidl::MethodType::TwoWay,
4101 ..
4102 } => "unknown two-way method",
4103 }
4104 }
4105}
4106
4107#[derive(Debug, Clone)]
4108pub struct ConnectorRouterControlHandle {
4109 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4110}
4111
4112impl fdomain_client::fidl::ControlHandle for ConnectorRouterControlHandle {
4113 fn shutdown(&self) {
4114 self.inner.shutdown()
4115 }
4116
4117 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4118 self.inner.shutdown_with_epitaph(status)
4119 }
4120
4121 fn is_closed(&self) -> bool {
4122 self.inner.channel().is_closed()
4123 }
4124 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4125 self.inner.channel().on_closed()
4126 }
4127}
4128
4129impl ConnectorRouterControlHandle {}
4130
4131#[must_use = "FIDL methods require a response to be sent"]
4132#[derive(Debug)]
4133pub struct ConnectorRouterRouteResponder {
4134 control_handle: std::mem::ManuallyDrop<ConnectorRouterControlHandle>,
4135 tx_id: u32,
4136}
4137
4138impl std::ops::Drop for ConnectorRouterRouteResponder {
4142 fn drop(&mut self) {
4143 self.control_handle.shutdown();
4144 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4146 }
4147}
4148
4149impl fdomain_client::fidl::Responder for ConnectorRouterRouteResponder {
4150 type ControlHandle = ConnectorRouterControlHandle;
4151
4152 fn control_handle(&self) -> &ConnectorRouterControlHandle {
4153 &self.control_handle
4154 }
4155
4156 fn drop_without_shutdown(mut self) {
4157 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4159 std::mem::forget(self);
4161 }
4162}
4163
4164impl ConnectorRouterRouteResponder {
4165 pub fn send(
4169 self,
4170 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4171 ) -> Result<(), fidl::Error> {
4172 let _result = self.send_raw(result);
4173 if _result.is_err() {
4174 self.control_handle.shutdown();
4175 }
4176 self.drop_without_shutdown();
4177 _result
4178 }
4179
4180 pub fn send_no_shutdown_on_err(
4182 self,
4183 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4184 ) -> Result<(), fidl::Error> {
4185 let _result = self.send_raw(result);
4186 self.drop_without_shutdown();
4187 _result
4188 }
4189
4190 fn send_raw(
4191 &self,
4192 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4193 ) -> Result<(), fidl::Error> {
4194 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4195 ConnectorRouterRouteResponse,
4196 RouterError,
4197 >>(
4198 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
4199 self.tx_id,
4200 0x74dbb8bc13730766,
4201 fidl::encoding::DynamicFlags::FLEXIBLE,
4202 )
4203 }
4204}
4205
4206#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4207pub struct DataRouterMarker;
4208
4209impl fdomain_client::fidl::ProtocolMarker for DataRouterMarker {
4210 type Proxy = DataRouterProxy;
4211 type RequestStream = DataRouterRequestStream;
4212
4213 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
4214}
4215impl fdomain_client::fidl::DiscoverableProtocolMarker for DataRouterMarker {}
4216pub type DataRouterRouteResult = Result<DataRouterRouteResponse, RouterError>;
4217
4218pub trait DataRouterProxyInterface: Send + Sync {
4219 type RouteResponseFut: std::future::Future<Output = Result<DataRouterRouteResult, fidl::Error>>
4220 + Send;
4221 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4222}
4223
4224#[derive(Debug, Clone)]
4225pub struct DataRouterProxy {
4226 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4227}
4228
4229impl fdomain_client::fidl::Proxy for DataRouterProxy {
4230 type Protocol = DataRouterMarker;
4231
4232 fn from_channel(inner: fdomain_client::Channel) -> Self {
4233 Self::new(inner)
4234 }
4235
4236 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4237 self.client.into_channel().map_err(|client| Self { client })
4238 }
4239
4240 fn as_channel(&self) -> &fdomain_client::Channel {
4241 self.client.as_channel()
4242 }
4243}
4244
4245impl DataRouterProxy {
4246 pub fn new(channel: fdomain_client::Channel) -> Self {
4248 let protocol_name = <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4249 Self { client: fidl::client::Client::new(channel, protocol_name) }
4250 }
4251
4252 pub fn take_event_stream(&self) -> DataRouterEventStream {
4258 DataRouterEventStream { event_receiver: self.client.take_event_receiver() }
4259 }
4260
4261 pub fn r#route(
4262 &self,
4263 mut payload: RouteRequest,
4264 ) -> fidl::client::QueryResponseFut<
4265 DataRouterRouteResult,
4266 fdomain_client::fidl::FDomainResourceDialect,
4267 > {
4268 DataRouterProxyInterface::r#route(self, payload)
4269 }
4270}
4271
4272impl DataRouterProxyInterface for DataRouterProxy {
4273 type RouteResponseFut = fidl::client::QueryResponseFut<
4274 DataRouterRouteResult,
4275 fdomain_client::fidl::FDomainResourceDialect,
4276 >;
4277 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4278 fn _decode(
4279 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4280 ) -> Result<DataRouterRouteResult, fidl::Error> {
4281 let _response = fidl::client::decode_transaction_body::<
4282 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
4283 fdomain_client::fidl::FDomainResourceDialect,
4284 0x2e87dc44dfc53804,
4285 >(_buf?)?
4286 .into_result_fdomain::<DataRouterMarker>("route")?;
4287 Ok(_response.map(|x| x))
4288 }
4289 self.client.send_query_and_decode::<RouteRequest, DataRouterRouteResult>(
4290 &mut payload,
4291 0x2e87dc44dfc53804,
4292 fidl::encoding::DynamicFlags::FLEXIBLE,
4293 _decode,
4294 )
4295 }
4296}
4297
4298pub struct DataRouterEventStream {
4299 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4300}
4301
4302impl std::marker::Unpin for DataRouterEventStream {}
4303
4304impl futures::stream::FusedStream for DataRouterEventStream {
4305 fn is_terminated(&self) -> bool {
4306 self.event_receiver.is_terminated()
4307 }
4308}
4309
4310impl futures::Stream for DataRouterEventStream {
4311 type Item = Result<DataRouterEvent, fidl::Error>;
4312
4313 fn poll_next(
4314 mut self: std::pin::Pin<&mut Self>,
4315 cx: &mut std::task::Context<'_>,
4316 ) -> std::task::Poll<Option<Self::Item>> {
4317 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4318 &mut self.event_receiver,
4319 cx
4320 )?) {
4321 Some(buf) => std::task::Poll::Ready(Some(DataRouterEvent::decode(buf))),
4322 None => std::task::Poll::Ready(None),
4323 }
4324 }
4325}
4326
4327#[derive(Debug)]
4328pub enum DataRouterEvent {
4329 #[non_exhaustive]
4330 _UnknownEvent {
4331 ordinal: u64,
4333 },
4334}
4335
4336impl DataRouterEvent {
4337 fn decode(
4339 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4340 ) -> Result<DataRouterEvent, fidl::Error> {
4341 let (bytes, _handles) = buf.split_mut();
4342 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4343 debug_assert_eq!(tx_header.tx_id, 0);
4344 match tx_header.ordinal {
4345 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4346 Ok(DataRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4347 }
4348 _ => Err(fidl::Error::UnknownOrdinal {
4349 ordinal: tx_header.ordinal,
4350 protocol_name:
4351 <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4352 }),
4353 }
4354 }
4355}
4356
4357pub struct DataRouterRequestStream {
4359 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4360 is_terminated: bool,
4361}
4362
4363impl std::marker::Unpin for DataRouterRequestStream {}
4364
4365impl futures::stream::FusedStream for DataRouterRequestStream {
4366 fn is_terminated(&self) -> bool {
4367 self.is_terminated
4368 }
4369}
4370
4371impl fdomain_client::fidl::RequestStream for DataRouterRequestStream {
4372 type Protocol = DataRouterMarker;
4373 type ControlHandle = DataRouterControlHandle;
4374
4375 fn from_channel(channel: fdomain_client::Channel) -> Self {
4376 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4377 }
4378
4379 fn control_handle(&self) -> Self::ControlHandle {
4380 DataRouterControlHandle { inner: self.inner.clone() }
4381 }
4382
4383 fn into_inner(
4384 self,
4385 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4386 {
4387 (self.inner, self.is_terminated)
4388 }
4389
4390 fn from_inner(
4391 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4392 is_terminated: bool,
4393 ) -> Self {
4394 Self { inner, is_terminated }
4395 }
4396}
4397
4398impl futures::Stream for DataRouterRequestStream {
4399 type Item = Result<DataRouterRequest, fidl::Error>;
4400
4401 fn poll_next(
4402 mut self: std::pin::Pin<&mut Self>,
4403 cx: &mut std::task::Context<'_>,
4404 ) -> std::task::Poll<Option<Self::Item>> {
4405 let this = &mut *self;
4406 if this.inner.check_shutdown(cx) {
4407 this.is_terminated = true;
4408 return std::task::Poll::Ready(None);
4409 }
4410 if this.is_terminated {
4411 panic!("polled DataRouterRequestStream after completion");
4412 }
4413 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4414 |bytes, handles| {
4415 match this.inner.channel().read_etc(cx, bytes, handles) {
4416 std::task::Poll::Ready(Ok(())) => {}
4417 std::task::Poll::Pending => return std::task::Poll::Pending,
4418 std::task::Poll::Ready(Err(None)) => {
4419 this.is_terminated = true;
4420 return std::task::Poll::Ready(None);
4421 }
4422 std::task::Poll::Ready(Err(Some(e))) => {
4423 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4424 e.into(),
4425 ))));
4426 }
4427 }
4428
4429 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4431
4432 std::task::Poll::Ready(Some(match header.ordinal {
4433 0x2e87dc44dfc53804 => {
4434 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4435 let mut req = fidl::new_empty!(
4436 RouteRequest,
4437 fdomain_client::fidl::FDomainResourceDialect
4438 );
4439 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4440 let control_handle = DataRouterControlHandle { inner: this.inner.clone() };
4441 Ok(DataRouterRequest::Route {
4442 payload: req,
4443 responder: DataRouterRouteResponder {
4444 control_handle: std::mem::ManuallyDrop::new(control_handle),
4445 tx_id: header.tx_id,
4446 },
4447 })
4448 }
4449 _ if header.tx_id == 0
4450 && header
4451 .dynamic_flags()
4452 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4453 {
4454 Ok(DataRouterRequest::_UnknownMethod {
4455 ordinal: header.ordinal,
4456 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
4457 method_type: fidl::MethodType::OneWay,
4458 })
4459 }
4460 _ if header
4461 .dynamic_flags()
4462 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4463 {
4464 this.inner.send_framework_err(
4465 fidl::encoding::FrameworkErr::UnknownMethod,
4466 header.tx_id,
4467 header.ordinal,
4468 header.dynamic_flags(),
4469 (bytes, handles),
4470 )?;
4471 Ok(DataRouterRequest::_UnknownMethod {
4472 ordinal: header.ordinal,
4473 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
4474 method_type: fidl::MethodType::TwoWay,
4475 })
4476 }
4477 _ => Err(fidl::Error::UnknownOrdinal {
4478 ordinal: header.ordinal,
4479 protocol_name:
4480 <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4481 }),
4482 }))
4483 },
4484 )
4485 }
4486}
4487
4488#[derive(Debug)]
4489pub enum DataRouterRequest {
4490 Route {
4491 payload: RouteRequest,
4492 responder: DataRouterRouteResponder,
4493 },
4494 #[non_exhaustive]
4496 _UnknownMethod {
4497 ordinal: u64,
4499 control_handle: DataRouterControlHandle,
4500 method_type: fidl::MethodType,
4501 },
4502}
4503
4504impl DataRouterRequest {
4505 #[allow(irrefutable_let_patterns)]
4506 pub fn into_route(self) -> Option<(RouteRequest, DataRouterRouteResponder)> {
4507 if let DataRouterRequest::Route { payload, responder } = self {
4508 Some((payload, responder))
4509 } else {
4510 None
4511 }
4512 }
4513
4514 pub fn method_name(&self) -> &'static str {
4516 match *self {
4517 DataRouterRequest::Route { .. } => "route",
4518 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4519 "unknown one-way method"
4520 }
4521 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4522 "unknown two-way method"
4523 }
4524 }
4525 }
4526}
4527
4528#[derive(Debug, Clone)]
4529pub struct DataRouterControlHandle {
4530 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4531}
4532
4533impl fdomain_client::fidl::ControlHandle for DataRouterControlHandle {
4534 fn shutdown(&self) {
4535 self.inner.shutdown()
4536 }
4537
4538 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4539 self.inner.shutdown_with_epitaph(status)
4540 }
4541
4542 fn is_closed(&self) -> bool {
4543 self.inner.channel().is_closed()
4544 }
4545 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4546 self.inner.channel().on_closed()
4547 }
4548}
4549
4550impl DataRouterControlHandle {}
4551
4552#[must_use = "FIDL methods require a response to be sent"]
4553#[derive(Debug)]
4554pub struct DataRouterRouteResponder {
4555 control_handle: std::mem::ManuallyDrop<DataRouterControlHandle>,
4556 tx_id: u32,
4557}
4558
4559impl std::ops::Drop for DataRouterRouteResponder {
4563 fn drop(&mut self) {
4564 self.control_handle.shutdown();
4565 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4567 }
4568}
4569
4570impl fdomain_client::fidl::Responder for DataRouterRouteResponder {
4571 type ControlHandle = DataRouterControlHandle;
4572
4573 fn control_handle(&self) -> &DataRouterControlHandle {
4574 &self.control_handle
4575 }
4576
4577 fn drop_without_shutdown(mut self) {
4578 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4580 std::mem::forget(self);
4582 }
4583}
4584
4585impl DataRouterRouteResponder {
4586 pub fn send(
4590 self,
4591 mut result: Result<DataRouterRouteResponse, RouterError>,
4592 ) -> Result<(), fidl::Error> {
4593 let _result = self.send_raw(result);
4594 if _result.is_err() {
4595 self.control_handle.shutdown();
4596 }
4597 self.drop_without_shutdown();
4598 _result
4599 }
4600
4601 pub fn send_no_shutdown_on_err(
4603 self,
4604 mut result: Result<DataRouterRouteResponse, RouterError>,
4605 ) -> Result<(), fidl::Error> {
4606 let _result = self.send_raw(result);
4607 self.drop_without_shutdown();
4608 _result
4609 }
4610
4611 fn send_raw(
4612 &self,
4613 mut result: Result<DataRouterRouteResponse, RouterError>,
4614 ) -> Result<(), fidl::Error> {
4615 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4616 DataRouterRouteResponse,
4617 RouterError,
4618 >>(
4619 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
4620 self.tx_id,
4621 0x2e87dc44dfc53804,
4622 fidl::encoding::DynamicFlags::FLEXIBLE,
4623 )
4624 }
4625}
4626
4627#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4628pub struct DictionaryMarker;
4629
4630impl fdomain_client::fidl::ProtocolMarker for DictionaryMarker {
4631 type Proxy = DictionaryProxy;
4632 type RequestStream = DictionaryRequestStream;
4633
4634 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
4635}
4636impl fdomain_client::fidl::DiscoverableProtocolMarker for DictionaryMarker {}
4637
4638pub trait DictionaryProxyInterface: Send + Sync {}
4639
4640#[derive(Debug, Clone)]
4641pub struct DictionaryProxy {
4642 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4643}
4644
4645impl fdomain_client::fidl::Proxy for DictionaryProxy {
4646 type Protocol = DictionaryMarker;
4647
4648 fn from_channel(inner: fdomain_client::Channel) -> Self {
4649 Self::new(inner)
4650 }
4651
4652 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4653 self.client.into_channel().map_err(|client| Self { client })
4654 }
4655
4656 fn as_channel(&self) -> &fdomain_client::Channel {
4657 self.client.as_channel()
4658 }
4659}
4660
4661impl DictionaryProxy {
4662 pub fn new(channel: fdomain_client::Channel) -> Self {
4664 let protocol_name = <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4665 Self { client: fidl::client::Client::new(channel, protocol_name) }
4666 }
4667
4668 pub fn take_event_stream(&self) -> DictionaryEventStream {
4674 DictionaryEventStream { event_receiver: self.client.take_event_receiver() }
4675 }
4676}
4677
4678impl DictionaryProxyInterface for DictionaryProxy {}
4679
4680pub struct DictionaryEventStream {
4681 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4682}
4683
4684impl std::marker::Unpin for DictionaryEventStream {}
4685
4686impl futures::stream::FusedStream for DictionaryEventStream {
4687 fn is_terminated(&self) -> bool {
4688 self.event_receiver.is_terminated()
4689 }
4690}
4691
4692impl futures::Stream for DictionaryEventStream {
4693 type Item = Result<DictionaryEvent, fidl::Error>;
4694
4695 fn poll_next(
4696 mut self: std::pin::Pin<&mut Self>,
4697 cx: &mut std::task::Context<'_>,
4698 ) -> std::task::Poll<Option<Self::Item>> {
4699 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4700 &mut self.event_receiver,
4701 cx
4702 )?) {
4703 Some(buf) => std::task::Poll::Ready(Some(DictionaryEvent::decode(buf))),
4704 None => std::task::Poll::Ready(None),
4705 }
4706 }
4707}
4708
4709#[derive(Debug)]
4710pub enum DictionaryEvent {
4711 #[non_exhaustive]
4712 _UnknownEvent {
4713 ordinal: u64,
4715 },
4716}
4717
4718impl DictionaryEvent {
4719 fn decode(
4721 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4722 ) -> Result<DictionaryEvent, fidl::Error> {
4723 let (bytes, _handles) = buf.split_mut();
4724 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4725 debug_assert_eq!(tx_header.tx_id, 0);
4726 match tx_header.ordinal {
4727 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4728 Ok(DictionaryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4729 }
4730 _ => Err(fidl::Error::UnknownOrdinal {
4731 ordinal: tx_header.ordinal,
4732 protocol_name:
4733 <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4734 }),
4735 }
4736 }
4737}
4738
4739pub struct DictionaryRequestStream {
4741 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4742 is_terminated: bool,
4743}
4744
4745impl std::marker::Unpin for DictionaryRequestStream {}
4746
4747impl futures::stream::FusedStream for DictionaryRequestStream {
4748 fn is_terminated(&self) -> bool {
4749 self.is_terminated
4750 }
4751}
4752
4753impl fdomain_client::fidl::RequestStream for DictionaryRequestStream {
4754 type Protocol = DictionaryMarker;
4755 type ControlHandle = DictionaryControlHandle;
4756
4757 fn from_channel(channel: fdomain_client::Channel) -> Self {
4758 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4759 }
4760
4761 fn control_handle(&self) -> Self::ControlHandle {
4762 DictionaryControlHandle { inner: self.inner.clone() }
4763 }
4764
4765 fn into_inner(
4766 self,
4767 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4768 {
4769 (self.inner, self.is_terminated)
4770 }
4771
4772 fn from_inner(
4773 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4774 is_terminated: bool,
4775 ) -> Self {
4776 Self { inner, is_terminated }
4777 }
4778}
4779
4780impl futures::Stream for DictionaryRequestStream {
4781 type Item = Result<DictionaryRequest, fidl::Error>;
4782
4783 fn poll_next(
4784 mut self: std::pin::Pin<&mut Self>,
4785 cx: &mut std::task::Context<'_>,
4786 ) -> std::task::Poll<Option<Self::Item>> {
4787 let this = &mut *self;
4788 if this.inner.check_shutdown(cx) {
4789 this.is_terminated = true;
4790 return std::task::Poll::Ready(None);
4791 }
4792 if this.is_terminated {
4793 panic!("polled DictionaryRequestStream after completion");
4794 }
4795 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4796 |bytes, handles| {
4797 match this.inner.channel().read_etc(cx, bytes, handles) {
4798 std::task::Poll::Ready(Ok(())) => {}
4799 std::task::Poll::Pending => return std::task::Poll::Pending,
4800 std::task::Poll::Ready(Err(None)) => {
4801 this.is_terminated = true;
4802 return std::task::Poll::Ready(None);
4803 }
4804 std::task::Poll::Ready(Err(Some(e))) => {
4805 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4806 e.into(),
4807 ))));
4808 }
4809 }
4810
4811 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4813
4814 std::task::Poll::Ready(Some(match header.ordinal {
4815 _ if header.tx_id == 0
4816 && header
4817 .dynamic_flags()
4818 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4819 {
4820 Ok(DictionaryRequest::_UnknownMethod {
4821 ordinal: header.ordinal,
4822 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
4823 method_type: fidl::MethodType::OneWay,
4824 })
4825 }
4826 _ if header
4827 .dynamic_flags()
4828 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4829 {
4830 this.inner.send_framework_err(
4831 fidl::encoding::FrameworkErr::UnknownMethod,
4832 header.tx_id,
4833 header.ordinal,
4834 header.dynamic_flags(),
4835 (bytes, handles),
4836 )?;
4837 Ok(DictionaryRequest::_UnknownMethod {
4838 ordinal: header.ordinal,
4839 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
4840 method_type: fidl::MethodType::TwoWay,
4841 })
4842 }
4843 _ => Err(fidl::Error::UnknownOrdinal {
4844 ordinal: header.ordinal,
4845 protocol_name:
4846 <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4847 }),
4848 }))
4849 },
4850 )
4851 }
4852}
4853
4854#[derive(Debug)]
4855pub enum DictionaryRequest {
4856 #[non_exhaustive]
4858 _UnknownMethod {
4859 ordinal: u64,
4861 control_handle: DictionaryControlHandle,
4862 method_type: fidl::MethodType,
4863 },
4864}
4865
4866impl DictionaryRequest {
4867 pub fn method_name(&self) -> &'static str {
4869 match *self {
4870 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4871 "unknown one-way method"
4872 }
4873 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4874 "unknown two-way method"
4875 }
4876 }
4877 }
4878}
4879
4880#[derive(Debug, Clone)]
4881pub struct DictionaryControlHandle {
4882 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4883}
4884
4885impl fdomain_client::fidl::ControlHandle for DictionaryControlHandle {
4886 fn shutdown(&self) {
4887 self.inner.shutdown()
4888 }
4889
4890 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4891 self.inner.shutdown_with_epitaph(status)
4892 }
4893
4894 fn is_closed(&self) -> bool {
4895 self.inner.channel().is_closed()
4896 }
4897 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4898 self.inner.channel().on_closed()
4899 }
4900}
4901
4902impl DictionaryControlHandle {}
4903
4904#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4905pub struct DictionaryDrainIteratorMarker;
4906
4907impl fdomain_client::fidl::ProtocolMarker for DictionaryDrainIteratorMarker {
4908 type Proxy = DictionaryDrainIteratorProxy;
4909 type RequestStream = DictionaryDrainIteratorRequestStream;
4910
4911 const DEBUG_NAME: &'static str = "(anonymous) DictionaryDrainIterator";
4912}
4913pub type DictionaryDrainIteratorGetNextResult =
4914 Result<(Vec<DictionaryItem>, u64), CapabilityStoreError>;
4915
4916pub trait DictionaryDrainIteratorProxyInterface: Send + Sync {
4917 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryDrainIteratorGetNextResult, fidl::Error>>
4918 + Send;
4919 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
4920}
4921
4922#[derive(Debug, Clone)]
4923pub struct DictionaryDrainIteratorProxy {
4924 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4925}
4926
4927impl fdomain_client::fidl::Proxy for DictionaryDrainIteratorProxy {
4928 type Protocol = DictionaryDrainIteratorMarker;
4929
4930 fn from_channel(inner: fdomain_client::Channel) -> Self {
4931 Self::new(inner)
4932 }
4933
4934 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4935 self.client.into_channel().map_err(|client| Self { client })
4936 }
4937
4938 fn as_channel(&self) -> &fdomain_client::Channel {
4939 self.client.as_channel()
4940 }
4941}
4942
4943impl DictionaryDrainIteratorProxy {
4944 pub fn new(channel: fdomain_client::Channel) -> Self {
4946 let protocol_name =
4947 <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4948 Self { client: fidl::client::Client::new(channel, protocol_name) }
4949 }
4950
4951 pub fn take_event_stream(&self) -> DictionaryDrainIteratorEventStream {
4957 DictionaryDrainIteratorEventStream { event_receiver: self.client.take_event_receiver() }
4958 }
4959
4960 pub fn r#get_next(
4977 &self,
4978 mut start_id: u64,
4979 mut limit: u32,
4980 ) -> fidl::client::QueryResponseFut<
4981 DictionaryDrainIteratorGetNextResult,
4982 fdomain_client::fidl::FDomainResourceDialect,
4983 > {
4984 DictionaryDrainIteratorProxyInterface::r#get_next(self, start_id, limit)
4985 }
4986}
4987
4988impl DictionaryDrainIteratorProxyInterface for DictionaryDrainIteratorProxy {
4989 type GetNextResponseFut = fidl::client::QueryResponseFut<
4990 DictionaryDrainIteratorGetNextResult,
4991 fdomain_client::fidl::FDomainResourceDialect,
4992 >;
4993 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
4994 fn _decode(
4995 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4996 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
4997 let _response = fidl::client::decode_transaction_body::<
4998 fidl::encoding::FlexibleResultType<
4999 DictionaryDrainIteratorGetNextResponse,
5000 CapabilityStoreError,
5001 >,
5002 fdomain_client::fidl::FDomainResourceDialect,
5003 0x4f8082ca1ee26061,
5004 >(_buf?)?
5005 .into_result_fdomain::<DictionaryDrainIteratorMarker>("get_next")?;
5006 Ok(_response.map(|x| (x.items, x.end_id)))
5007 }
5008 self.client.send_query_and_decode::<
5009 DictionaryDrainIteratorGetNextRequest,
5010 DictionaryDrainIteratorGetNextResult,
5011 >(
5012 (start_id, limit,),
5013 0x4f8082ca1ee26061,
5014 fidl::encoding::DynamicFlags::FLEXIBLE,
5015 _decode,
5016 )
5017 }
5018}
5019
5020pub struct DictionaryDrainIteratorEventStream {
5021 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5022}
5023
5024impl std::marker::Unpin for DictionaryDrainIteratorEventStream {}
5025
5026impl futures::stream::FusedStream for DictionaryDrainIteratorEventStream {
5027 fn is_terminated(&self) -> bool {
5028 self.event_receiver.is_terminated()
5029 }
5030}
5031
5032impl futures::Stream for DictionaryDrainIteratorEventStream {
5033 type Item = Result<DictionaryDrainIteratorEvent, fidl::Error>;
5034
5035 fn poll_next(
5036 mut self: std::pin::Pin<&mut Self>,
5037 cx: &mut std::task::Context<'_>,
5038 ) -> std::task::Poll<Option<Self::Item>> {
5039 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5040 &mut self.event_receiver,
5041 cx
5042 )?) {
5043 Some(buf) => std::task::Poll::Ready(Some(DictionaryDrainIteratorEvent::decode(buf))),
5044 None => std::task::Poll::Ready(None),
5045 }
5046 }
5047}
5048
5049#[derive(Debug)]
5050pub enum DictionaryDrainIteratorEvent {
5051 #[non_exhaustive]
5052 _UnknownEvent {
5053 ordinal: u64,
5055 },
5056}
5057
5058impl DictionaryDrainIteratorEvent {
5059 fn decode(
5061 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5062 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
5063 let (bytes, _handles) = buf.split_mut();
5064 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5065 debug_assert_eq!(tx_header.tx_id, 0);
5066 match tx_header.ordinal {
5067 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5068 Ok(DictionaryDrainIteratorEvent::_UnknownEvent {
5069 ordinal: tx_header.ordinal,
5070 })
5071 }
5072 _ => Err(fidl::Error::UnknownOrdinal {
5073 ordinal: tx_header.ordinal,
5074 protocol_name: <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5075 })
5076 }
5077 }
5078}
5079
5080pub struct DictionaryDrainIteratorRequestStream {
5082 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5083 is_terminated: bool,
5084}
5085
5086impl std::marker::Unpin for DictionaryDrainIteratorRequestStream {}
5087
5088impl futures::stream::FusedStream for DictionaryDrainIteratorRequestStream {
5089 fn is_terminated(&self) -> bool {
5090 self.is_terminated
5091 }
5092}
5093
5094impl fdomain_client::fidl::RequestStream for DictionaryDrainIteratorRequestStream {
5095 type Protocol = DictionaryDrainIteratorMarker;
5096 type ControlHandle = DictionaryDrainIteratorControlHandle;
5097
5098 fn from_channel(channel: fdomain_client::Channel) -> Self {
5099 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5100 }
5101
5102 fn control_handle(&self) -> Self::ControlHandle {
5103 DictionaryDrainIteratorControlHandle { inner: self.inner.clone() }
5104 }
5105
5106 fn into_inner(
5107 self,
5108 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5109 {
5110 (self.inner, self.is_terminated)
5111 }
5112
5113 fn from_inner(
5114 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5115 is_terminated: bool,
5116 ) -> Self {
5117 Self { inner, is_terminated }
5118 }
5119}
5120
5121impl futures::Stream for DictionaryDrainIteratorRequestStream {
5122 type Item = Result<DictionaryDrainIteratorRequest, fidl::Error>;
5123
5124 fn poll_next(
5125 mut self: std::pin::Pin<&mut Self>,
5126 cx: &mut std::task::Context<'_>,
5127 ) -> std::task::Poll<Option<Self::Item>> {
5128 let this = &mut *self;
5129 if this.inner.check_shutdown(cx) {
5130 this.is_terminated = true;
5131 return std::task::Poll::Ready(None);
5132 }
5133 if this.is_terminated {
5134 panic!("polled DictionaryDrainIteratorRequestStream after completion");
5135 }
5136 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5137 |bytes, handles| {
5138 match this.inner.channel().read_etc(cx, bytes, handles) {
5139 std::task::Poll::Ready(Ok(())) => {}
5140 std::task::Poll::Pending => return std::task::Poll::Pending,
5141 std::task::Poll::Ready(Err(None)) => {
5142 this.is_terminated = true;
5143 return std::task::Poll::Ready(None);
5144 }
5145 std::task::Poll::Ready(Err(Some(e))) => {
5146 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5147 e.into(),
5148 ))));
5149 }
5150 }
5151
5152 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5154
5155 std::task::Poll::Ready(Some(match header.ordinal {
5156 0x4f8082ca1ee26061 => {
5157 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5158 let mut req = fidl::new_empty!(DictionaryDrainIteratorGetNextRequest, fdomain_client::fidl::FDomainResourceDialect);
5159 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DictionaryDrainIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
5160 let control_handle = DictionaryDrainIteratorControlHandle {
5161 inner: this.inner.clone(),
5162 };
5163 Ok(DictionaryDrainIteratorRequest::GetNext {start_id: req.start_id,
5164limit: req.limit,
5165
5166 responder: DictionaryDrainIteratorGetNextResponder {
5167 control_handle: std::mem::ManuallyDrop::new(control_handle),
5168 tx_id: header.tx_id,
5169 },
5170 })
5171 }
5172 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5173 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
5174 ordinal: header.ordinal,
5175 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
5176 method_type: fidl::MethodType::OneWay,
5177 })
5178 }
5179 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5180 this.inner.send_framework_err(
5181 fidl::encoding::FrameworkErr::UnknownMethod,
5182 header.tx_id,
5183 header.ordinal,
5184 header.dynamic_flags(),
5185 (bytes, handles),
5186 )?;
5187 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
5188 ordinal: header.ordinal,
5189 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
5190 method_type: fidl::MethodType::TwoWay,
5191 })
5192 }
5193 _ => Err(fidl::Error::UnknownOrdinal {
5194 ordinal: header.ordinal,
5195 protocol_name: <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5196 }),
5197 }))
5198 },
5199 )
5200 }
5201}
5202
5203#[derive(Debug)]
5204pub enum DictionaryDrainIteratorRequest {
5205 GetNext { start_id: u64, limit: u32, responder: DictionaryDrainIteratorGetNextResponder },
5222 #[non_exhaustive]
5224 _UnknownMethod {
5225 ordinal: u64,
5227 control_handle: DictionaryDrainIteratorControlHandle,
5228 method_type: fidl::MethodType,
5229 },
5230}
5231
5232impl DictionaryDrainIteratorRequest {
5233 #[allow(irrefutable_let_patterns)]
5234 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryDrainIteratorGetNextResponder)> {
5235 if let DictionaryDrainIteratorRequest::GetNext { start_id, limit, responder } = self {
5236 Some((start_id, limit, responder))
5237 } else {
5238 None
5239 }
5240 }
5241
5242 pub fn method_name(&self) -> &'static str {
5244 match *self {
5245 DictionaryDrainIteratorRequest::GetNext { .. } => "get_next",
5246 DictionaryDrainIteratorRequest::_UnknownMethod {
5247 method_type: fidl::MethodType::OneWay,
5248 ..
5249 } => "unknown one-way method",
5250 DictionaryDrainIteratorRequest::_UnknownMethod {
5251 method_type: fidl::MethodType::TwoWay,
5252 ..
5253 } => "unknown two-way method",
5254 }
5255 }
5256}
5257
5258#[derive(Debug, Clone)]
5259pub struct DictionaryDrainIteratorControlHandle {
5260 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5261}
5262
5263impl fdomain_client::fidl::ControlHandle for DictionaryDrainIteratorControlHandle {
5264 fn shutdown(&self) {
5265 self.inner.shutdown()
5266 }
5267
5268 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5269 self.inner.shutdown_with_epitaph(status)
5270 }
5271
5272 fn is_closed(&self) -> bool {
5273 self.inner.channel().is_closed()
5274 }
5275 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5276 self.inner.channel().on_closed()
5277 }
5278}
5279
5280impl DictionaryDrainIteratorControlHandle {}
5281
5282#[must_use = "FIDL methods require a response to be sent"]
5283#[derive(Debug)]
5284pub struct DictionaryDrainIteratorGetNextResponder {
5285 control_handle: std::mem::ManuallyDrop<DictionaryDrainIteratorControlHandle>,
5286 tx_id: u32,
5287}
5288
5289impl std::ops::Drop for DictionaryDrainIteratorGetNextResponder {
5293 fn drop(&mut self) {
5294 self.control_handle.shutdown();
5295 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5297 }
5298}
5299
5300impl fdomain_client::fidl::Responder for DictionaryDrainIteratorGetNextResponder {
5301 type ControlHandle = DictionaryDrainIteratorControlHandle;
5302
5303 fn control_handle(&self) -> &DictionaryDrainIteratorControlHandle {
5304 &self.control_handle
5305 }
5306
5307 fn drop_without_shutdown(mut self) {
5308 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5310 std::mem::forget(self);
5312 }
5313}
5314
5315impl DictionaryDrainIteratorGetNextResponder {
5316 pub fn send(
5320 self,
5321 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5322 ) -> Result<(), fidl::Error> {
5323 let _result = self.send_raw(result);
5324 if _result.is_err() {
5325 self.control_handle.shutdown();
5326 }
5327 self.drop_without_shutdown();
5328 _result
5329 }
5330
5331 pub fn send_no_shutdown_on_err(
5333 self,
5334 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5335 ) -> Result<(), fidl::Error> {
5336 let _result = self.send_raw(result);
5337 self.drop_without_shutdown();
5338 _result
5339 }
5340
5341 fn send_raw(
5342 &self,
5343 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5344 ) -> Result<(), fidl::Error> {
5345 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5346 DictionaryDrainIteratorGetNextResponse,
5347 CapabilityStoreError,
5348 >>(
5349 fidl::encoding::FlexibleResult::new(result),
5350 self.tx_id,
5351 0x4f8082ca1ee26061,
5352 fidl::encoding::DynamicFlags::FLEXIBLE,
5353 )
5354 }
5355}
5356
5357#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5358pub struct DictionaryEnumerateIteratorMarker;
5359
5360impl fdomain_client::fidl::ProtocolMarker for DictionaryEnumerateIteratorMarker {
5361 type Proxy = DictionaryEnumerateIteratorProxy;
5362 type RequestStream = DictionaryEnumerateIteratorRequestStream;
5363
5364 const DEBUG_NAME: &'static str = "(anonymous) DictionaryEnumerateIterator";
5365}
5366pub type DictionaryEnumerateIteratorGetNextResult =
5367 Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>;
5368
5369pub trait DictionaryEnumerateIteratorProxyInterface: Send + Sync {
5370 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error>>
5371 + Send;
5372 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
5373}
5374
5375#[derive(Debug, Clone)]
5376pub struct DictionaryEnumerateIteratorProxy {
5377 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5378}
5379
5380impl fdomain_client::fidl::Proxy for DictionaryEnumerateIteratorProxy {
5381 type Protocol = DictionaryEnumerateIteratorMarker;
5382
5383 fn from_channel(inner: fdomain_client::Channel) -> Self {
5384 Self::new(inner)
5385 }
5386
5387 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5388 self.client.into_channel().map_err(|client| Self { client })
5389 }
5390
5391 fn as_channel(&self) -> &fdomain_client::Channel {
5392 self.client.as_channel()
5393 }
5394}
5395
5396impl DictionaryEnumerateIteratorProxy {
5397 pub fn new(channel: fdomain_client::Channel) -> Self {
5399 let protocol_name =
5400 <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5401 Self { client: fidl::client::Client::new(channel, protocol_name) }
5402 }
5403
5404 pub fn take_event_stream(&self) -> DictionaryEnumerateIteratorEventStream {
5410 DictionaryEnumerateIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5411 }
5412
5413 pub fn r#get_next(
5434 &self,
5435 mut start_id: u64,
5436 mut limit: u32,
5437 ) -> fidl::client::QueryResponseFut<
5438 DictionaryEnumerateIteratorGetNextResult,
5439 fdomain_client::fidl::FDomainResourceDialect,
5440 > {
5441 DictionaryEnumerateIteratorProxyInterface::r#get_next(self, start_id, limit)
5442 }
5443}
5444
5445impl DictionaryEnumerateIteratorProxyInterface for DictionaryEnumerateIteratorProxy {
5446 type GetNextResponseFut = fidl::client::QueryResponseFut<
5447 DictionaryEnumerateIteratorGetNextResult,
5448 fdomain_client::fidl::FDomainResourceDialect,
5449 >;
5450 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
5451 fn _decode(
5452 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5453 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
5454 let _response = fidl::client::decode_transaction_body::<
5455 fidl::encoding::FlexibleResultType<
5456 DictionaryEnumerateIteratorGetNextResponse,
5457 CapabilityStoreError,
5458 >,
5459 fdomain_client::fidl::FDomainResourceDialect,
5460 0x14f8bc286512f5cf,
5461 >(_buf?)?
5462 .into_result_fdomain::<DictionaryEnumerateIteratorMarker>("get_next")?;
5463 Ok(_response.map(|x| (x.items, x.end_id)))
5464 }
5465 self.client.send_query_and_decode::<
5466 DictionaryEnumerateIteratorGetNextRequest,
5467 DictionaryEnumerateIteratorGetNextResult,
5468 >(
5469 (start_id, limit,),
5470 0x14f8bc286512f5cf,
5471 fidl::encoding::DynamicFlags::FLEXIBLE,
5472 _decode,
5473 )
5474 }
5475}
5476
5477pub struct DictionaryEnumerateIteratorEventStream {
5478 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5479}
5480
5481impl std::marker::Unpin for DictionaryEnumerateIteratorEventStream {}
5482
5483impl futures::stream::FusedStream for DictionaryEnumerateIteratorEventStream {
5484 fn is_terminated(&self) -> bool {
5485 self.event_receiver.is_terminated()
5486 }
5487}
5488
5489impl futures::Stream for DictionaryEnumerateIteratorEventStream {
5490 type Item = Result<DictionaryEnumerateIteratorEvent, fidl::Error>;
5491
5492 fn poll_next(
5493 mut self: std::pin::Pin<&mut Self>,
5494 cx: &mut std::task::Context<'_>,
5495 ) -> std::task::Poll<Option<Self::Item>> {
5496 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5497 &mut self.event_receiver,
5498 cx
5499 )?) {
5500 Some(buf) => {
5501 std::task::Poll::Ready(Some(DictionaryEnumerateIteratorEvent::decode(buf)))
5502 }
5503 None => std::task::Poll::Ready(None),
5504 }
5505 }
5506}
5507
5508#[derive(Debug)]
5509pub enum DictionaryEnumerateIteratorEvent {
5510 #[non_exhaustive]
5511 _UnknownEvent {
5512 ordinal: u64,
5514 },
5515}
5516
5517impl DictionaryEnumerateIteratorEvent {
5518 fn decode(
5520 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5521 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
5522 let (bytes, _handles) = buf.split_mut();
5523 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5524 debug_assert_eq!(tx_header.tx_id, 0);
5525 match tx_header.ordinal {
5526 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5527 Ok(DictionaryEnumerateIteratorEvent::_UnknownEvent {
5528 ordinal: tx_header.ordinal,
5529 })
5530 }
5531 _ => Err(fidl::Error::UnknownOrdinal {
5532 ordinal: tx_header.ordinal,
5533 protocol_name: <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5534 })
5535 }
5536 }
5537}
5538
5539pub struct DictionaryEnumerateIteratorRequestStream {
5541 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5542 is_terminated: bool,
5543}
5544
5545impl std::marker::Unpin for DictionaryEnumerateIteratorRequestStream {}
5546
5547impl futures::stream::FusedStream for DictionaryEnumerateIteratorRequestStream {
5548 fn is_terminated(&self) -> bool {
5549 self.is_terminated
5550 }
5551}
5552
5553impl fdomain_client::fidl::RequestStream for DictionaryEnumerateIteratorRequestStream {
5554 type Protocol = DictionaryEnumerateIteratorMarker;
5555 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
5556
5557 fn from_channel(channel: fdomain_client::Channel) -> Self {
5558 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5559 }
5560
5561 fn control_handle(&self) -> Self::ControlHandle {
5562 DictionaryEnumerateIteratorControlHandle { inner: self.inner.clone() }
5563 }
5564
5565 fn into_inner(
5566 self,
5567 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5568 {
5569 (self.inner, self.is_terminated)
5570 }
5571
5572 fn from_inner(
5573 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5574 is_terminated: bool,
5575 ) -> Self {
5576 Self { inner, is_terminated }
5577 }
5578}
5579
5580impl futures::Stream for DictionaryEnumerateIteratorRequestStream {
5581 type Item = Result<DictionaryEnumerateIteratorRequest, fidl::Error>;
5582
5583 fn poll_next(
5584 mut self: std::pin::Pin<&mut Self>,
5585 cx: &mut std::task::Context<'_>,
5586 ) -> std::task::Poll<Option<Self::Item>> {
5587 let this = &mut *self;
5588 if this.inner.check_shutdown(cx) {
5589 this.is_terminated = true;
5590 return std::task::Poll::Ready(None);
5591 }
5592 if this.is_terminated {
5593 panic!("polled DictionaryEnumerateIteratorRequestStream after completion");
5594 }
5595 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5596 |bytes, handles| {
5597 match this.inner.channel().read_etc(cx, bytes, handles) {
5598 std::task::Poll::Ready(Ok(())) => {}
5599 std::task::Poll::Pending => return std::task::Poll::Pending,
5600 std::task::Poll::Ready(Err(None)) => {
5601 this.is_terminated = true;
5602 return std::task::Poll::Ready(None);
5603 }
5604 std::task::Poll::Ready(Err(Some(e))) => {
5605 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5606 e.into(),
5607 ))));
5608 }
5609 }
5610
5611 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5613
5614 std::task::Poll::Ready(Some(match header.ordinal {
5615 0x14f8bc286512f5cf => {
5616 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5617 let mut req = fidl::new_empty!(DictionaryEnumerateIteratorGetNextRequest, fdomain_client::fidl::FDomainResourceDialect);
5618 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DictionaryEnumerateIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
5619 let control_handle = DictionaryEnumerateIteratorControlHandle {
5620 inner: this.inner.clone(),
5621 };
5622 Ok(DictionaryEnumerateIteratorRequest::GetNext {start_id: req.start_id,
5623limit: req.limit,
5624
5625 responder: DictionaryEnumerateIteratorGetNextResponder {
5626 control_handle: std::mem::ManuallyDrop::new(control_handle),
5627 tx_id: header.tx_id,
5628 },
5629 })
5630 }
5631 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5632 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
5633 ordinal: header.ordinal,
5634 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
5635 method_type: fidl::MethodType::OneWay,
5636 })
5637 }
5638 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5639 this.inner.send_framework_err(
5640 fidl::encoding::FrameworkErr::UnknownMethod,
5641 header.tx_id,
5642 header.ordinal,
5643 header.dynamic_flags(),
5644 (bytes, handles),
5645 )?;
5646 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
5647 ordinal: header.ordinal,
5648 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
5649 method_type: fidl::MethodType::TwoWay,
5650 })
5651 }
5652 _ => Err(fidl::Error::UnknownOrdinal {
5653 ordinal: header.ordinal,
5654 protocol_name: <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5655 }),
5656 }))
5657 },
5658 )
5659 }
5660}
5661
5662#[derive(Debug)]
5663pub enum DictionaryEnumerateIteratorRequest {
5664 GetNext { start_id: u64, limit: u32, responder: DictionaryEnumerateIteratorGetNextResponder },
5685 #[non_exhaustive]
5687 _UnknownMethod {
5688 ordinal: u64,
5690 control_handle: DictionaryEnumerateIteratorControlHandle,
5691 method_type: fidl::MethodType,
5692 },
5693}
5694
5695impl DictionaryEnumerateIteratorRequest {
5696 #[allow(irrefutable_let_patterns)]
5697 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryEnumerateIteratorGetNextResponder)> {
5698 if let DictionaryEnumerateIteratorRequest::GetNext { start_id, limit, responder } = self {
5699 Some((start_id, limit, responder))
5700 } else {
5701 None
5702 }
5703 }
5704
5705 pub fn method_name(&self) -> &'static str {
5707 match *self {
5708 DictionaryEnumerateIteratorRequest::GetNext { .. } => "get_next",
5709 DictionaryEnumerateIteratorRequest::_UnknownMethod {
5710 method_type: fidl::MethodType::OneWay,
5711 ..
5712 } => "unknown one-way method",
5713 DictionaryEnumerateIteratorRequest::_UnknownMethod {
5714 method_type: fidl::MethodType::TwoWay,
5715 ..
5716 } => "unknown two-way method",
5717 }
5718 }
5719}
5720
5721#[derive(Debug, Clone)]
5722pub struct DictionaryEnumerateIteratorControlHandle {
5723 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5724}
5725
5726impl fdomain_client::fidl::ControlHandle for DictionaryEnumerateIteratorControlHandle {
5727 fn shutdown(&self) {
5728 self.inner.shutdown()
5729 }
5730
5731 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5732 self.inner.shutdown_with_epitaph(status)
5733 }
5734
5735 fn is_closed(&self) -> bool {
5736 self.inner.channel().is_closed()
5737 }
5738 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5739 self.inner.channel().on_closed()
5740 }
5741}
5742
5743impl DictionaryEnumerateIteratorControlHandle {}
5744
5745#[must_use = "FIDL methods require a response to be sent"]
5746#[derive(Debug)]
5747pub struct DictionaryEnumerateIteratorGetNextResponder {
5748 control_handle: std::mem::ManuallyDrop<DictionaryEnumerateIteratorControlHandle>,
5749 tx_id: u32,
5750}
5751
5752impl std::ops::Drop for DictionaryEnumerateIteratorGetNextResponder {
5756 fn drop(&mut self) {
5757 self.control_handle.shutdown();
5758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5760 }
5761}
5762
5763impl fdomain_client::fidl::Responder for DictionaryEnumerateIteratorGetNextResponder {
5764 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
5765
5766 fn control_handle(&self) -> &DictionaryEnumerateIteratorControlHandle {
5767 &self.control_handle
5768 }
5769
5770 fn drop_without_shutdown(mut self) {
5771 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5773 std::mem::forget(self);
5775 }
5776}
5777
5778impl DictionaryEnumerateIteratorGetNextResponder {
5779 pub fn send(
5783 self,
5784 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
5785 ) -> Result<(), fidl::Error> {
5786 let _result = self.send_raw(result);
5787 if _result.is_err() {
5788 self.control_handle.shutdown();
5789 }
5790 self.drop_without_shutdown();
5791 _result
5792 }
5793
5794 pub fn send_no_shutdown_on_err(
5796 self,
5797 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
5798 ) -> Result<(), fidl::Error> {
5799 let _result = self.send_raw(result);
5800 self.drop_without_shutdown();
5801 _result
5802 }
5803
5804 fn send_raw(
5805 &self,
5806 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
5807 ) -> Result<(), fidl::Error> {
5808 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5809 DictionaryEnumerateIteratorGetNextResponse,
5810 CapabilityStoreError,
5811 >>(
5812 fidl::encoding::FlexibleResult::new(
5813 result
5814 .as_mut()
5815 .map_err(|e| *e)
5816 .map(|(items, end_id)| (items.as_mut_slice(), *end_id)),
5817 ),
5818 self.tx_id,
5819 0x14f8bc286512f5cf,
5820 fidl::encoding::DynamicFlags::FLEXIBLE,
5821 )
5822 }
5823}
5824
5825#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5826pub struct DictionaryKeysIteratorMarker;
5827
5828impl fdomain_client::fidl::ProtocolMarker for DictionaryKeysIteratorMarker {
5829 type Proxy = DictionaryKeysIteratorProxy;
5830 type RequestStream = DictionaryKeysIteratorRequestStream;
5831
5832 const DEBUG_NAME: &'static str = "(anonymous) DictionaryKeysIterator";
5833}
5834
5835pub trait DictionaryKeysIteratorProxyInterface: Send + Sync {
5836 type GetNextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
5837 fn r#get_next(&self) -> Self::GetNextResponseFut;
5838}
5839
5840#[derive(Debug, Clone)]
5841pub struct DictionaryKeysIteratorProxy {
5842 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5843}
5844
5845impl fdomain_client::fidl::Proxy for DictionaryKeysIteratorProxy {
5846 type Protocol = DictionaryKeysIteratorMarker;
5847
5848 fn from_channel(inner: fdomain_client::Channel) -> Self {
5849 Self::new(inner)
5850 }
5851
5852 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5853 self.client.into_channel().map_err(|client| Self { client })
5854 }
5855
5856 fn as_channel(&self) -> &fdomain_client::Channel {
5857 self.client.as_channel()
5858 }
5859}
5860
5861impl DictionaryKeysIteratorProxy {
5862 pub fn new(channel: fdomain_client::Channel) -> Self {
5864 let protocol_name =
5865 <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5866 Self { client: fidl::client::Client::new(channel, protocol_name) }
5867 }
5868
5869 pub fn take_event_stream(&self) -> DictionaryKeysIteratorEventStream {
5875 DictionaryKeysIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5876 }
5877
5878 pub fn r#get_next(
5879 &self,
5880 ) -> fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>
5881 {
5882 DictionaryKeysIteratorProxyInterface::r#get_next(self)
5883 }
5884}
5885
5886impl DictionaryKeysIteratorProxyInterface for DictionaryKeysIteratorProxy {
5887 type GetNextResponseFut =
5888 fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>;
5889 fn r#get_next(&self) -> Self::GetNextResponseFut {
5890 fn _decode(
5891 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5892 ) -> Result<Vec<String>, fidl::Error> {
5893 let _response = fidl::client::decode_transaction_body::<
5894 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
5895 fdomain_client::fidl::FDomainResourceDialect,
5896 0x453828cbacca7d53,
5897 >(_buf?)?
5898 .into_result_fdomain::<DictionaryKeysIteratorMarker>("get_next")?;
5899 Ok(_response.keys)
5900 }
5901 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
5902 (),
5903 0x453828cbacca7d53,
5904 fidl::encoding::DynamicFlags::FLEXIBLE,
5905 _decode,
5906 )
5907 }
5908}
5909
5910pub struct DictionaryKeysIteratorEventStream {
5911 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5912}
5913
5914impl std::marker::Unpin for DictionaryKeysIteratorEventStream {}
5915
5916impl futures::stream::FusedStream for DictionaryKeysIteratorEventStream {
5917 fn is_terminated(&self) -> bool {
5918 self.event_receiver.is_terminated()
5919 }
5920}
5921
5922impl futures::Stream for DictionaryKeysIteratorEventStream {
5923 type Item = Result<DictionaryKeysIteratorEvent, fidl::Error>;
5924
5925 fn poll_next(
5926 mut self: std::pin::Pin<&mut Self>,
5927 cx: &mut std::task::Context<'_>,
5928 ) -> std::task::Poll<Option<Self::Item>> {
5929 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5930 &mut self.event_receiver,
5931 cx
5932 )?) {
5933 Some(buf) => std::task::Poll::Ready(Some(DictionaryKeysIteratorEvent::decode(buf))),
5934 None => std::task::Poll::Ready(None),
5935 }
5936 }
5937}
5938
5939#[derive(Debug)]
5940pub enum DictionaryKeysIteratorEvent {
5941 #[non_exhaustive]
5942 _UnknownEvent {
5943 ordinal: u64,
5945 },
5946}
5947
5948impl DictionaryKeysIteratorEvent {
5949 fn decode(
5951 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5952 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
5953 let (bytes, _handles) = buf.split_mut();
5954 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5955 debug_assert_eq!(tx_header.tx_id, 0);
5956 match tx_header.ordinal {
5957 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5958 Ok(DictionaryKeysIteratorEvent::_UnknownEvent {
5959 ordinal: tx_header.ordinal,
5960 })
5961 }
5962 _ => Err(fidl::Error::UnknownOrdinal {
5963 ordinal: tx_header.ordinal,
5964 protocol_name: <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5965 })
5966 }
5967 }
5968}
5969
5970pub struct DictionaryKeysIteratorRequestStream {
5972 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5973 is_terminated: bool,
5974}
5975
5976impl std::marker::Unpin for DictionaryKeysIteratorRequestStream {}
5977
5978impl futures::stream::FusedStream for DictionaryKeysIteratorRequestStream {
5979 fn is_terminated(&self) -> bool {
5980 self.is_terminated
5981 }
5982}
5983
5984impl fdomain_client::fidl::RequestStream for DictionaryKeysIteratorRequestStream {
5985 type Protocol = DictionaryKeysIteratorMarker;
5986 type ControlHandle = DictionaryKeysIteratorControlHandle;
5987
5988 fn from_channel(channel: fdomain_client::Channel) -> Self {
5989 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5990 }
5991
5992 fn control_handle(&self) -> Self::ControlHandle {
5993 DictionaryKeysIteratorControlHandle { inner: self.inner.clone() }
5994 }
5995
5996 fn into_inner(
5997 self,
5998 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5999 {
6000 (self.inner, self.is_terminated)
6001 }
6002
6003 fn from_inner(
6004 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6005 is_terminated: bool,
6006 ) -> Self {
6007 Self { inner, is_terminated }
6008 }
6009}
6010
6011impl futures::Stream for DictionaryKeysIteratorRequestStream {
6012 type Item = Result<DictionaryKeysIteratorRequest, fidl::Error>;
6013
6014 fn poll_next(
6015 mut self: std::pin::Pin<&mut Self>,
6016 cx: &mut std::task::Context<'_>,
6017 ) -> std::task::Poll<Option<Self::Item>> {
6018 let this = &mut *self;
6019 if this.inner.check_shutdown(cx) {
6020 this.is_terminated = true;
6021 return std::task::Poll::Ready(None);
6022 }
6023 if this.is_terminated {
6024 panic!("polled DictionaryKeysIteratorRequestStream after completion");
6025 }
6026 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6027 |bytes, handles| {
6028 match this.inner.channel().read_etc(cx, bytes, handles) {
6029 std::task::Poll::Ready(Ok(())) => {}
6030 std::task::Poll::Pending => return std::task::Poll::Pending,
6031 std::task::Poll::Ready(Err(None)) => {
6032 this.is_terminated = true;
6033 return std::task::Poll::Ready(None);
6034 }
6035 std::task::Poll::Ready(Err(Some(e))) => {
6036 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6037 e.into(),
6038 ))));
6039 }
6040 }
6041
6042 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6044
6045 std::task::Poll::Ready(Some(match header.ordinal {
6046 0x453828cbacca7d53 => {
6047 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6048 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
6049 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6050 let control_handle = DictionaryKeysIteratorControlHandle {
6051 inner: this.inner.clone(),
6052 };
6053 Ok(DictionaryKeysIteratorRequest::GetNext {
6054 responder: DictionaryKeysIteratorGetNextResponder {
6055 control_handle: std::mem::ManuallyDrop::new(control_handle),
6056 tx_id: header.tx_id,
6057 },
6058 })
6059 }
6060 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6061 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
6062 ordinal: header.ordinal,
6063 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
6064 method_type: fidl::MethodType::OneWay,
6065 })
6066 }
6067 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6068 this.inner.send_framework_err(
6069 fidl::encoding::FrameworkErr::UnknownMethod,
6070 header.tx_id,
6071 header.ordinal,
6072 header.dynamic_flags(),
6073 (bytes, handles),
6074 )?;
6075 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
6076 ordinal: header.ordinal,
6077 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
6078 method_type: fidl::MethodType::TwoWay,
6079 })
6080 }
6081 _ => Err(fidl::Error::UnknownOrdinal {
6082 ordinal: header.ordinal,
6083 protocol_name: <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6084 }),
6085 }))
6086 },
6087 )
6088 }
6089}
6090
6091#[derive(Debug)]
6092pub enum DictionaryKeysIteratorRequest {
6093 GetNext {
6094 responder: DictionaryKeysIteratorGetNextResponder,
6095 },
6096 #[non_exhaustive]
6098 _UnknownMethod {
6099 ordinal: u64,
6101 control_handle: DictionaryKeysIteratorControlHandle,
6102 method_type: fidl::MethodType,
6103 },
6104}
6105
6106impl DictionaryKeysIteratorRequest {
6107 #[allow(irrefutable_let_patterns)]
6108 pub fn into_get_next(self) -> Option<(DictionaryKeysIteratorGetNextResponder)> {
6109 if let DictionaryKeysIteratorRequest::GetNext { responder } = self {
6110 Some((responder))
6111 } else {
6112 None
6113 }
6114 }
6115
6116 pub fn method_name(&self) -> &'static str {
6118 match *self {
6119 DictionaryKeysIteratorRequest::GetNext { .. } => "get_next",
6120 DictionaryKeysIteratorRequest::_UnknownMethod {
6121 method_type: fidl::MethodType::OneWay,
6122 ..
6123 } => "unknown one-way method",
6124 DictionaryKeysIteratorRequest::_UnknownMethod {
6125 method_type: fidl::MethodType::TwoWay,
6126 ..
6127 } => "unknown two-way method",
6128 }
6129 }
6130}
6131
6132#[derive(Debug, Clone)]
6133pub struct DictionaryKeysIteratorControlHandle {
6134 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6135}
6136
6137impl fdomain_client::fidl::ControlHandle for DictionaryKeysIteratorControlHandle {
6138 fn shutdown(&self) {
6139 self.inner.shutdown()
6140 }
6141
6142 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6143 self.inner.shutdown_with_epitaph(status)
6144 }
6145
6146 fn is_closed(&self) -> bool {
6147 self.inner.channel().is_closed()
6148 }
6149 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6150 self.inner.channel().on_closed()
6151 }
6152}
6153
6154impl DictionaryKeysIteratorControlHandle {}
6155
6156#[must_use = "FIDL methods require a response to be sent"]
6157#[derive(Debug)]
6158pub struct DictionaryKeysIteratorGetNextResponder {
6159 control_handle: std::mem::ManuallyDrop<DictionaryKeysIteratorControlHandle>,
6160 tx_id: u32,
6161}
6162
6163impl std::ops::Drop for DictionaryKeysIteratorGetNextResponder {
6167 fn drop(&mut self) {
6168 self.control_handle.shutdown();
6169 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6171 }
6172}
6173
6174impl fdomain_client::fidl::Responder for DictionaryKeysIteratorGetNextResponder {
6175 type ControlHandle = DictionaryKeysIteratorControlHandle;
6176
6177 fn control_handle(&self) -> &DictionaryKeysIteratorControlHandle {
6178 &self.control_handle
6179 }
6180
6181 fn drop_without_shutdown(mut self) {
6182 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6184 std::mem::forget(self);
6186 }
6187}
6188
6189impl DictionaryKeysIteratorGetNextResponder {
6190 pub fn send(self, mut keys: &[String]) -> Result<(), fidl::Error> {
6194 let _result = self.send_raw(keys);
6195 if _result.is_err() {
6196 self.control_handle.shutdown();
6197 }
6198 self.drop_without_shutdown();
6199 _result
6200 }
6201
6202 pub fn send_no_shutdown_on_err(self, mut keys: &[String]) -> Result<(), fidl::Error> {
6204 let _result = self.send_raw(keys);
6205 self.drop_without_shutdown();
6206 _result
6207 }
6208
6209 fn send_raw(&self, mut keys: &[String]) -> Result<(), fidl::Error> {
6210 self.control_handle
6211 .inner
6212 .send::<fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>>(
6213 fidl::encoding::Flexible::new((keys,)),
6214 self.tx_id,
6215 0x453828cbacca7d53,
6216 fidl::encoding::DynamicFlags::FLEXIBLE,
6217 )
6218 }
6219}
6220
6221#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6222pub struct DictionaryRouterMarker;
6223
6224impl fdomain_client::fidl::ProtocolMarker for DictionaryRouterMarker {
6225 type Proxy = DictionaryRouterProxy;
6226 type RequestStream = DictionaryRouterRequestStream;
6227
6228 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
6229}
6230impl fdomain_client::fidl::DiscoverableProtocolMarker for DictionaryRouterMarker {}
6231pub type DictionaryRouterRouteResult = Result<DictionaryRouterRouteResponse, RouterError>;
6232
6233pub trait DictionaryRouterProxyInterface: Send + Sync {
6234 type RouteResponseFut: std::future::Future<Output = Result<DictionaryRouterRouteResult, fidl::Error>>
6235 + Send;
6236 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
6237}
6238
6239#[derive(Debug, Clone)]
6240pub struct DictionaryRouterProxy {
6241 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6242}
6243
6244impl fdomain_client::fidl::Proxy for DictionaryRouterProxy {
6245 type Protocol = DictionaryRouterMarker;
6246
6247 fn from_channel(inner: fdomain_client::Channel) -> Self {
6248 Self::new(inner)
6249 }
6250
6251 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6252 self.client.into_channel().map_err(|client| Self { client })
6253 }
6254
6255 fn as_channel(&self) -> &fdomain_client::Channel {
6256 self.client.as_channel()
6257 }
6258}
6259
6260impl DictionaryRouterProxy {
6261 pub fn new(channel: fdomain_client::Channel) -> Self {
6263 let protocol_name =
6264 <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6265 Self { client: fidl::client::Client::new(channel, protocol_name) }
6266 }
6267
6268 pub fn take_event_stream(&self) -> DictionaryRouterEventStream {
6274 DictionaryRouterEventStream { event_receiver: self.client.take_event_receiver() }
6275 }
6276
6277 pub fn r#route(
6278 &self,
6279 mut payload: RouteRequest,
6280 ) -> fidl::client::QueryResponseFut<
6281 DictionaryRouterRouteResult,
6282 fdomain_client::fidl::FDomainResourceDialect,
6283 > {
6284 DictionaryRouterProxyInterface::r#route(self, payload)
6285 }
6286}
6287
6288impl DictionaryRouterProxyInterface for DictionaryRouterProxy {
6289 type RouteResponseFut = fidl::client::QueryResponseFut<
6290 DictionaryRouterRouteResult,
6291 fdomain_client::fidl::FDomainResourceDialect,
6292 >;
6293 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
6294 fn _decode(
6295 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6296 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
6297 let _response = fidl::client::decode_transaction_body::<
6298 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
6299 fdomain_client::fidl::FDomainResourceDialect,
6300 0x714c65bfe54bd79f,
6301 >(_buf?)?
6302 .into_result_fdomain::<DictionaryRouterMarker>("route")?;
6303 Ok(_response.map(|x| x))
6304 }
6305 self.client.send_query_and_decode::<RouteRequest, DictionaryRouterRouteResult>(
6306 &mut payload,
6307 0x714c65bfe54bd79f,
6308 fidl::encoding::DynamicFlags::FLEXIBLE,
6309 _decode,
6310 )
6311 }
6312}
6313
6314pub struct DictionaryRouterEventStream {
6315 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6316}
6317
6318impl std::marker::Unpin for DictionaryRouterEventStream {}
6319
6320impl futures::stream::FusedStream for DictionaryRouterEventStream {
6321 fn is_terminated(&self) -> bool {
6322 self.event_receiver.is_terminated()
6323 }
6324}
6325
6326impl futures::Stream for DictionaryRouterEventStream {
6327 type Item = Result<DictionaryRouterEvent, fidl::Error>;
6328
6329 fn poll_next(
6330 mut self: std::pin::Pin<&mut Self>,
6331 cx: &mut std::task::Context<'_>,
6332 ) -> std::task::Poll<Option<Self::Item>> {
6333 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6334 &mut self.event_receiver,
6335 cx
6336 )?) {
6337 Some(buf) => std::task::Poll::Ready(Some(DictionaryRouterEvent::decode(buf))),
6338 None => std::task::Poll::Ready(None),
6339 }
6340 }
6341}
6342
6343#[derive(Debug)]
6344pub enum DictionaryRouterEvent {
6345 #[non_exhaustive]
6346 _UnknownEvent {
6347 ordinal: u64,
6349 },
6350}
6351
6352impl DictionaryRouterEvent {
6353 fn decode(
6355 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6356 ) -> Result<DictionaryRouterEvent, fidl::Error> {
6357 let (bytes, _handles) = buf.split_mut();
6358 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6359 debug_assert_eq!(tx_header.tx_id, 0);
6360 match tx_header.ordinal {
6361 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6362 Ok(DictionaryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6363 }
6364 _ => Err(fidl::Error::UnknownOrdinal {
6365 ordinal: tx_header.ordinal,
6366 protocol_name:
6367 <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6368 }),
6369 }
6370 }
6371}
6372
6373pub struct DictionaryRouterRequestStream {
6375 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6376 is_terminated: bool,
6377}
6378
6379impl std::marker::Unpin for DictionaryRouterRequestStream {}
6380
6381impl futures::stream::FusedStream for DictionaryRouterRequestStream {
6382 fn is_terminated(&self) -> bool {
6383 self.is_terminated
6384 }
6385}
6386
6387impl fdomain_client::fidl::RequestStream for DictionaryRouterRequestStream {
6388 type Protocol = DictionaryRouterMarker;
6389 type ControlHandle = DictionaryRouterControlHandle;
6390
6391 fn from_channel(channel: fdomain_client::Channel) -> Self {
6392 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6393 }
6394
6395 fn control_handle(&self) -> Self::ControlHandle {
6396 DictionaryRouterControlHandle { inner: self.inner.clone() }
6397 }
6398
6399 fn into_inner(
6400 self,
6401 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6402 {
6403 (self.inner, self.is_terminated)
6404 }
6405
6406 fn from_inner(
6407 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6408 is_terminated: bool,
6409 ) -> Self {
6410 Self { inner, is_terminated }
6411 }
6412}
6413
6414impl futures::Stream for DictionaryRouterRequestStream {
6415 type Item = Result<DictionaryRouterRequest, fidl::Error>;
6416
6417 fn poll_next(
6418 mut self: std::pin::Pin<&mut Self>,
6419 cx: &mut std::task::Context<'_>,
6420 ) -> std::task::Poll<Option<Self::Item>> {
6421 let this = &mut *self;
6422 if this.inner.check_shutdown(cx) {
6423 this.is_terminated = true;
6424 return std::task::Poll::Ready(None);
6425 }
6426 if this.is_terminated {
6427 panic!("polled DictionaryRouterRequestStream after completion");
6428 }
6429 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6430 |bytes, handles| {
6431 match this.inner.channel().read_etc(cx, bytes, handles) {
6432 std::task::Poll::Ready(Ok(())) => {}
6433 std::task::Poll::Pending => return std::task::Poll::Pending,
6434 std::task::Poll::Ready(Err(None)) => {
6435 this.is_terminated = true;
6436 return std::task::Poll::Ready(None);
6437 }
6438 std::task::Poll::Ready(Err(Some(e))) => {
6439 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6440 e.into(),
6441 ))));
6442 }
6443 }
6444
6445 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6447
6448 std::task::Poll::Ready(Some(match header.ordinal {
6449 0x714c65bfe54bd79f => {
6450 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6451 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
6452 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
6453 let control_handle = DictionaryRouterControlHandle {
6454 inner: this.inner.clone(),
6455 };
6456 Ok(DictionaryRouterRequest::Route {payload: req,
6457 responder: DictionaryRouterRouteResponder {
6458 control_handle: std::mem::ManuallyDrop::new(control_handle),
6459 tx_id: header.tx_id,
6460 },
6461 })
6462 }
6463 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6464 Ok(DictionaryRouterRequest::_UnknownMethod {
6465 ordinal: header.ordinal,
6466 control_handle: DictionaryRouterControlHandle { inner: this.inner.clone() },
6467 method_type: fidl::MethodType::OneWay,
6468 })
6469 }
6470 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6471 this.inner.send_framework_err(
6472 fidl::encoding::FrameworkErr::UnknownMethod,
6473 header.tx_id,
6474 header.ordinal,
6475 header.dynamic_flags(),
6476 (bytes, handles),
6477 )?;
6478 Ok(DictionaryRouterRequest::_UnknownMethod {
6479 ordinal: header.ordinal,
6480 control_handle: DictionaryRouterControlHandle { inner: this.inner.clone() },
6481 method_type: fidl::MethodType::TwoWay,
6482 })
6483 }
6484 _ => Err(fidl::Error::UnknownOrdinal {
6485 ordinal: header.ordinal,
6486 protocol_name: <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6487 }),
6488 }))
6489 },
6490 )
6491 }
6492}
6493
6494#[derive(Debug)]
6495pub enum DictionaryRouterRequest {
6496 Route {
6497 payload: RouteRequest,
6498 responder: DictionaryRouterRouteResponder,
6499 },
6500 #[non_exhaustive]
6502 _UnknownMethod {
6503 ordinal: u64,
6505 control_handle: DictionaryRouterControlHandle,
6506 method_type: fidl::MethodType,
6507 },
6508}
6509
6510impl DictionaryRouterRequest {
6511 #[allow(irrefutable_let_patterns)]
6512 pub fn into_route(self) -> Option<(RouteRequest, DictionaryRouterRouteResponder)> {
6513 if let DictionaryRouterRequest::Route { payload, responder } = self {
6514 Some((payload, responder))
6515 } else {
6516 None
6517 }
6518 }
6519
6520 pub fn method_name(&self) -> &'static str {
6522 match *self {
6523 DictionaryRouterRequest::Route { .. } => "route",
6524 DictionaryRouterRequest::_UnknownMethod {
6525 method_type: fidl::MethodType::OneWay,
6526 ..
6527 } => "unknown one-way method",
6528 DictionaryRouterRequest::_UnknownMethod {
6529 method_type: fidl::MethodType::TwoWay,
6530 ..
6531 } => "unknown two-way method",
6532 }
6533 }
6534}
6535
6536#[derive(Debug, Clone)]
6537pub struct DictionaryRouterControlHandle {
6538 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6539}
6540
6541impl fdomain_client::fidl::ControlHandle for DictionaryRouterControlHandle {
6542 fn shutdown(&self) {
6543 self.inner.shutdown()
6544 }
6545
6546 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6547 self.inner.shutdown_with_epitaph(status)
6548 }
6549
6550 fn is_closed(&self) -> bool {
6551 self.inner.channel().is_closed()
6552 }
6553 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6554 self.inner.channel().on_closed()
6555 }
6556}
6557
6558impl DictionaryRouterControlHandle {}
6559
6560#[must_use = "FIDL methods require a response to be sent"]
6561#[derive(Debug)]
6562pub struct DictionaryRouterRouteResponder {
6563 control_handle: std::mem::ManuallyDrop<DictionaryRouterControlHandle>,
6564 tx_id: u32,
6565}
6566
6567impl std::ops::Drop for DictionaryRouterRouteResponder {
6571 fn drop(&mut self) {
6572 self.control_handle.shutdown();
6573 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6575 }
6576}
6577
6578impl fdomain_client::fidl::Responder for DictionaryRouterRouteResponder {
6579 type ControlHandle = DictionaryRouterControlHandle;
6580
6581 fn control_handle(&self) -> &DictionaryRouterControlHandle {
6582 &self.control_handle
6583 }
6584
6585 fn drop_without_shutdown(mut self) {
6586 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6588 std::mem::forget(self);
6590 }
6591}
6592
6593impl DictionaryRouterRouteResponder {
6594 pub fn send(
6598 self,
6599 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6600 ) -> Result<(), fidl::Error> {
6601 let _result = self.send_raw(result);
6602 if _result.is_err() {
6603 self.control_handle.shutdown();
6604 }
6605 self.drop_without_shutdown();
6606 _result
6607 }
6608
6609 pub fn send_no_shutdown_on_err(
6611 self,
6612 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6613 ) -> Result<(), fidl::Error> {
6614 let _result = self.send_raw(result);
6615 self.drop_without_shutdown();
6616 _result
6617 }
6618
6619 fn send_raw(
6620 &self,
6621 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6622 ) -> Result<(), fidl::Error> {
6623 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6624 DictionaryRouterRouteResponse,
6625 RouterError,
6626 >>(
6627 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
6628 self.tx_id,
6629 0x714c65bfe54bd79f,
6630 fidl::encoding::DynamicFlags::FLEXIBLE,
6631 )
6632 }
6633}
6634
6635#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6636pub struct DirConnectorRouterMarker;
6637
6638impl fdomain_client::fidl::ProtocolMarker for DirConnectorRouterMarker {
6639 type Proxy = DirConnectorRouterProxy;
6640 type RequestStream = DirConnectorRouterRequestStream;
6641
6642 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
6643}
6644impl fdomain_client::fidl::DiscoverableProtocolMarker for DirConnectorRouterMarker {}
6645pub type DirConnectorRouterRouteResult = Result<DirConnectorRouterRouteResponse, RouterError>;
6646
6647pub trait DirConnectorRouterProxyInterface: Send + Sync {
6648 type RouteResponseFut: std::future::Future<Output = Result<DirConnectorRouterRouteResult, fidl::Error>>
6649 + Send;
6650 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
6651}
6652
6653#[derive(Debug, Clone)]
6654pub struct DirConnectorRouterProxy {
6655 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6656}
6657
6658impl fdomain_client::fidl::Proxy for DirConnectorRouterProxy {
6659 type Protocol = DirConnectorRouterMarker;
6660
6661 fn from_channel(inner: fdomain_client::Channel) -> Self {
6662 Self::new(inner)
6663 }
6664
6665 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6666 self.client.into_channel().map_err(|client| Self { client })
6667 }
6668
6669 fn as_channel(&self) -> &fdomain_client::Channel {
6670 self.client.as_channel()
6671 }
6672}
6673
6674impl DirConnectorRouterProxy {
6675 pub fn new(channel: fdomain_client::Channel) -> Self {
6677 let protocol_name =
6678 <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6679 Self { client: fidl::client::Client::new(channel, protocol_name) }
6680 }
6681
6682 pub fn take_event_stream(&self) -> DirConnectorRouterEventStream {
6688 DirConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
6689 }
6690
6691 pub fn r#route(
6692 &self,
6693 mut payload: RouteRequest,
6694 ) -> fidl::client::QueryResponseFut<
6695 DirConnectorRouterRouteResult,
6696 fdomain_client::fidl::FDomainResourceDialect,
6697 > {
6698 DirConnectorRouterProxyInterface::r#route(self, payload)
6699 }
6700}
6701
6702impl DirConnectorRouterProxyInterface for DirConnectorRouterProxy {
6703 type RouteResponseFut = fidl::client::QueryResponseFut<
6704 DirConnectorRouterRouteResult,
6705 fdomain_client::fidl::FDomainResourceDialect,
6706 >;
6707 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
6708 fn _decode(
6709 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6710 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
6711 let _response = fidl::client::decode_transaction_body::<
6712 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
6713 fdomain_client::fidl::FDomainResourceDialect,
6714 0xd7e0f01da2c8e40,
6715 >(_buf?)?
6716 .into_result_fdomain::<DirConnectorRouterMarker>("route")?;
6717 Ok(_response.map(|x| x))
6718 }
6719 self.client.send_query_and_decode::<RouteRequest, DirConnectorRouterRouteResult>(
6720 &mut payload,
6721 0xd7e0f01da2c8e40,
6722 fidl::encoding::DynamicFlags::FLEXIBLE,
6723 _decode,
6724 )
6725 }
6726}
6727
6728pub struct DirConnectorRouterEventStream {
6729 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6730}
6731
6732impl std::marker::Unpin for DirConnectorRouterEventStream {}
6733
6734impl futures::stream::FusedStream for DirConnectorRouterEventStream {
6735 fn is_terminated(&self) -> bool {
6736 self.event_receiver.is_terminated()
6737 }
6738}
6739
6740impl futures::Stream for DirConnectorRouterEventStream {
6741 type Item = Result<DirConnectorRouterEvent, fidl::Error>;
6742
6743 fn poll_next(
6744 mut self: std::pin::Pin<&mut Self>,
6745 cx: &mut std::task::Context<'_>,
6746 ) -> std::task::Poll<Option<Self::Item>> {
6747 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6748 &mut self.event_receiver,
6749 cx
6750 )?) {
6751 Some(buf) => std::task::Poll::Ready(Some(DirConnectorRouterEvent::decode(buf))),
6752 None => std::task::Poll::Ready(None),
6753 }
6754 }
6755}
6756
6757#[derive(Debug)]
6758pub enum DirConnectorRouterEvent {
6759 #[non_exhaustive]
6760 _UnknownEvent {
6761 ordinal: u64,
6763 },
6764}
6765
6766impl DirConnectorRouterEvent {
6767 fn decode(
6769 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6770 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
6771 let (bytes, _handles) = buf.split_mut();
6772 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6773 debug_assert_eq!(tx_header.tx_id, 0);
6774 match tx_header.ordinal {
6775 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6776 Ok(DirConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6777 }
6778 _ => Err(fidl::Error::UnknownOrdinal {
6779 ordinal: tx_header.ordinal,
6780 protocol_name:
6781 <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6782 }),
6783 }
6784 }
6785}
6786
6787pub struct DirConnectorRouterRequestStream {
6789 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6790 is_terminated: bool,
6791}
6792
6793impl std::marker::Unpin for DirConnectorRouterRequestStream {}
6794
6795impl futures::stream::FusedStream for DirConnectorRouterRequestStream {
6796 fn is_terminated(&self) -> bool {
6797 self.is_terminated
6798 }
6799}
6800
6801impl fdomain_client::fidl::RequestStream for DirConnectorRouterRequestStream {
6802 type Protocol = DirConnectorRouterMarker;
6803 type ControlHandle = DirConnectorRouterControlHandle;
6804
6805 fn from_channel(channel: fdomain_client::Channel) -> Self {
6806 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6807 }
6808
6809 fn control_handle(&self) -> Self::ControlHandle {
6810 DirConnectorRouterControlHandle { inner: self.inner.clone() }
6811 }
6812
6813 fn into_inner(
6814 self,
6815 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6816 {
6817 (self.inner, self.is_terminated)
6818 }
6819
6820 fn from_inner(
6821 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6822 is_terminated: bool,
6823 ) -> Self {
6824 Self { inner, is_terminated }
6825 }
6826}
6827
6828impl futures::Stream for DirConnectorRouterRequestStream {
6829 type Item = Result<DirConnectorRouterRequest, fidl::Error>;
6830
6831 fn poll_next(
6832 mut self: std::pin::Pin<&mut Self>,
6833 cx: &mut std::task::Context<'_>,
6834 ) -> std::task::Poll<Option<Self::Item>> {
6835 let this = &mut *self;
6836 if this.inner.check_shutdown(cx) {
6837 this.is_terminated = true;
6838 return std::task::Poll::Ready(None);
6839 }
6840 if this.is_terminated {
6841 panic!("polled DirConnectorRouterRequestStream after completion");
6842 }
6843 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6844 |bytes, handles| {
6845 match this.inner.channel().read_etc(cx, bytes, handles) {
6846 std::task::Poll::Ready(Ok(())) => {}
6847 std::task::Poll::Pending => return std::task::Poll::Pending,
6848 std::task::Poll::Ready(Err(None)) => {
6849 this.is_terminated = true;
6850 return std::task::Poll::Ready(None);
6851 }
6852 std::task::Poll::Ready(Err(Some(e))) => {
6853 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6854 e.into(),
6855 ))));
6856 }
6857 }
6858
6859 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6861
6862 std::task::Poll::Ready(Some(match header.ordinal {
6863 0xd7e0f01da2c8e40 => {
6864 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6865 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
6866 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
6867 let control_handle = DirConnectorRouterControlHandle {
6868 inner: this.inner.clone(),
6869 };
6870 Ok(DirConnectorRouterRequest::Route {payload: req,
6871 responder: DirConnectorRouterRouteResponder {
6872 control_handle: std::mem::ManuallyDrop::new(control_handle),
6873 tx_id: header.tx_id,
6874 },
6875 })
6876 }
6877 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6878 Ok(DirConnectorRouterRequest::_UnknownMethod {
6879 ordinal: header.ordinal,
6880 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
6881 method_type: fidl::MethodType::OneWay,
6882 })
6883 }
6884 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6885 this.inner.send_framework_err(
6886 fidl::encoding::FrameworkErr::UnknownMethod,
6887 header.tx_id,
6888 header.ordinal,
6889 header.dynamic_flags(),
6890 (bytes, handles),
6891 )?;
6892 Ok(DirConnectorRouterRequest::_UnknownMethod {
6893 ordinal: header.ordinal,
6894 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
6895 method_type: fidl::MethodType::TwoWay,
6896 })
6897 }
6898 _ => Err(fidl::Error::UnknownOrdinal {
6899 ordinal: header.ordinal,
6900 protocol_name: <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6901 }),
6902 }))
6903 },
6904 )
6905 }
6906}
6907
6908#[derive(Debug)]
6909pub enum DirConnectorRouterRequest {
6910 Route {
6911 payload: RouteRequest,
6912 responder: DirConnectorRouterRouteResponder,
6913 },
6914 #[non_exhaustive]
6916 _UnknownMethod {
6917 ordinal: u64,
6919 control_handle: DirConnectorRouterControlHandle,
6920 method_type: fidl::MethodType,
6921 },
6922}
6923
6924impl DirConnectorRouterRequest {
6925 #[allow(irrefutable_let_patterns)]
6926 pub fn into_route(self) -> Option<(RouteRequest, DirConnectorRouterRouteResponder)> {
6927 if let DirConnectorRouterRequest::Route { payload, responder } = self {
6928 Some((payload, responder))
6929 } else {
6930 None
6931 }
6932 }
6933
6934 pub fn method_name(&self) -> &'static str {
6936 match *self {
6937 DirConnectorRouterRequest::Route { .. } => "route",
6938 DirConnectorRouterRequest::_UnknownMethod {
6939 method_type: fidl::MethodType::OneWay,
6940 ..
6941 } => "unknown one-way method",
6942 DirConnectorRouterRequest::_UnknownMethod {
6943 method_type: fidl::MethodType::TwoWay,
6944 ..
6945 } => "unknown two-way method",
6946 }
6947 }
6948}
6949
6950#[derive(Debug, Clone)]
6951pub struct DirConnectorRouterControlHandle {
6952 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6953}
6954
6955impl fdomain_client::fidl::ControlHandle for DirConnectorRouterControlHandle {
6956 fn shutdown(&self) {
6957 self.inner.shutdown()
6958 }
6959
6960 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6961 self.inner.shutdown_with_epitaph(status)
6962 }
6963
6964 fn is_closed(&self) -> bool {
6965 self.inner.channel().is_closed()
6966 }
6967 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6968 self.inner.channel().on_closed()
6969 }
6970}
6971
6972impl DirConnectorRouterControlHandle {}
6973
6974#[must_use = "FIDL methods require a response to be sent"]
6975#[derive(Debug)]
6976pub struct DirConnectorRouterRouteResponder {
6977 control_handle: std::mem::ManuallyDrop<DirConnectorRouterControlHandle>,
6978 tx_id: u32,
6979}
6980
6981impl std::ops::Drop for DirConnectorRouterRouteResponder {
6985 fn drop(&mut self) {
6986 self.control_handle.shutdown();
6987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6989 }
6990}
6991
6992impl fdomain_client::fidl::Responder for DirConnectorRouterRouteResponder {
6993 type ControlHandle = DirConnectorRouterControlHandle;
6994
6995 fn control_handle(&self) -> &DirConnectorRouterControlHandle {
6996 &self.control_handle
6997 }
6998
6999 fn drop_without_shutdown(mut self) {
7000 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7002 std::mem::forget(self);
7004 }
7005}
7006
7007impl DirConnectorRouterRouteResponder {
7008 pub fn send(
7012 self,
7013 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7014 ) -> Result<(), fidl::Error> {
7015 let _result = self.send_raw(result);
7016 if _result.is_err() {
7017 self.control_handle.shutdown();
7018 }
7019 self.drop_without_shutdown();
7020 _result
7021 }
7022
7023 pub fn send_no_shutdown_on_err(
7025 self,
7026 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7027 ) -> Result<(), fidl::Error> {
7028 let _result = self.send_raw(result);
7029 self.drop_without_shutdown();
7030 _result
7031 }
7032
7033 fn send_raw(
7034 &self,
7035 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7036 ) -> Result<(), fidl::Error> {
7037 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7038 DirConnectorRouterRouteResponse,
7039 RouterError,
7040 >>(
7041 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
7042 self.tx_id,
7043 0xd7e0f01da2c8e40,
7044 fidl::encoding::DynamicFlags::FLEXIBLE,
7045 )
7046 }
7047}
7048
7049#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7050pub struct DirEntryRouterMarker;
7051
7052impl fdomain_client::fidl::ProtocolMarker for DirEntryRouterMarker {
7053 type Proxy = DirEntryRouterProxy;
7054 type RequestStream = DirEntryRouterRequestStream;
7055
7056 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
7057}
7058impl fdomain_client::fidl::DiscoverableProtocolMarker for DirEntryRouterMarker {}
7059pub type DirEntryRouterRouteResult = Result<DirEntryRouterRouteResponse, RouterError>;
7060
7061pub trait DirEntryRouterProxyInterface: Send + Sync {
7062 type RouteResponseFut: std::future::Future<Output = Result<DirEntryRouterRouteResult, fidl::Error>>
7063 + Send;
7064 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
7065}
7066
7067#[derive(Debug, Clone)]
7068pub struct DirEntryRouterProxy {
7069 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7070}
7071
7072impl fdomain_client::fidl::Proxy for DirEntryRouterProxy {
7073 type Protocol = DirEntryRouterMarker;
7074
7075 fn from_channel(inner: fdomain_client::Channel) -> Self {
7076 Self::new(inner)
7077 }
7078
7079 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7080 self.client.into_channel().map_err(|client| Self { client })
7081 }
7082
7083 fn as_channel(&self) -> &fdomain_client::Channel {
7084 self.client.as_channel()
7085 }
7086}
7087
7088impl DirEntryRouterProxy {
7089 pub fn new(channel: fdomain_client::Channel) -> Self {
7091 let protocol_name =
7092 <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7093 Self { client: fidl::client::Client::new(channel, protocol_name) }
7094 }
7095
7096 pub fn take_event_stream(&self) -> DirEntryRouterEventStream {
7102 DirEntryRouterEventStream { event_receiver: self.client.take_event_receiver() }
7103 }
7104
7105 pub fn r#route(
7106 &self,
7107 mut payload: RouteRequest,
7108 ) -> fidl::client::QueryResponseFut<
7109 DirEntryRouterRouteResult,
7110 fdomain_client::fidl::FDomainResourceDialect,
7111 > {
7112 DirEntryRouterProxyInterface::r#route(self, payload)
7113 }
7114}
7115
7116impl DirEntryRouterProxyInterface for DirEntryRouterProxy {
7117 type RouteResponseFut = fidl::client::QueryResponseFut<
7118 DirEntryRouterRouteResult,
7119 fdomain_client::fidl::FDomainResourceDialect,
7120 >;
7121 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
7122 fn _decode(
7123 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7124 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
7125 let _response = fidl::client::decode_transaction_body::<
7126 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
7127 fdomain_client::fidl::FDomainResourceDialect,
7128 0x1ac694001c208bd2,
7129 >(_buf?)?
7130 .into_result_fdomain::<DirEntryRouterMarker>("route")?;
7131 Ok(_response.map(|x| x))
7132 }
7133 self.client.send_query_and_decode::<RouteRequest, DirEntryRouterRouteResult>(
7134 &mut payload,
7135 0x1ac694001c208bd2,
7136 fidl::encoding::DynamicFlags::FLEXIBLE,
7137 _decode,
7138 )
7139 }
7140}
7141
7142pub struct DirEntryRouterEventStream {
7143 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7144}
7145
7146impl std::marker::Unpin for DirEntryRouterEventStream {}
7147
7148impl futures::stream::FusedStream for DirEntryRouterEventStream {
7149 fn is_terminated(&self) -> bool {
7150 self.event_receiver.is_terminated()
7151 }
7152}
7153
7154impl futures::Stream for DirEntryRouterEventStream {
7155 type Item = Result<DirEntryRouterEvent, fidl::Error>;
7156
7157 fn poll_next(
7158 mut self: std::pin::Pin<&mut Self>,
7159 cx: &mut std::task::Context<'_>,
7160 ) -> std::task::Poll<Option<Self::Item>> {
7161 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7162 &mut self.event_receiver,
7163 cx
7164 )?) {
7165 Some(buf) => std::task::Poll::Ready(Some(DirEntryRouterEvent::decode(buf))),
7166 None => std::task::Poll::Ready(None),
7167 }
7168 }
7169}
7170
7171#[derive(Debug)]
7172pub enum DirEntryRouterEvent {
7173 #[non_exhaustive]
7174 _UnknownEvent {
7175 ordinal: u64,
7177 },
7178}
7179
7180impl DirEntryRouterEvent {
7181 fn decode(
7183 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7184 ) -> Result<DirEntryRouterEvent, fidl::Error> {
7185 let (bytes, _handles) = buf.split_mut();
7186 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7187 debug_assert_eq!(tx_header.tx_id, 0);
7188 match tx_header.ordinal {
7189 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7190 Ok(DirEntryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7191 }
7192 _ => Err(fidl::Error::UnknownOrdinal {
7193 ordinal: tx_header.ordinal,
7194 protocol_name:
7195 <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7196 }),
7197 }
7198 }
7199}
7200
7201pub struct DirEntryRouterRequestStream {
7203 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7204 is_terminated: bool,
7205}
7206
7207impl std::marker::Unpin for DirEntryRouterRequestStream {}
7208
7209impl futures::stream::FusedStream for DirEntryRouterRequestStream {
7210 fn is_terminated(&self) -> bool {
7211 self.is_terminated
7212 }
7213}
7214
7215impl fdomain_client::fidl::RequestStream for DirEntryRouterRequestStream {
7216 type Protocol = DirEntryRouterMarker;
7217 type ControlHandle = DirEntryRouterControlHandle;
7218
7219 fn from_channel(channel: fdomain_client::Channel) -> Self {
7220 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7221 }
7222
7223 fn control_handle(&self) -> Self::ControlHandle {
7224 DirEntryRouterControlHandle { inner: self.inner.clone() }
7225 }
7226
7227 fn into_inner(
7228 self,
7229 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7230 {
7231 (self.inner, self.is_terminated)
7232 }
7233
7234 fn from_inner(
7235 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7236 is_terminated: bool,
7237 ) -> Self {
7238 Self { inner, is_terminated }
7239 }
7240}
7241
7242impl futures::Stream for DirEntryRouterRequestStream {
7243 type Item = Result<DirEntryRouterRequest, fidl::Error>;
7244
7245 fn poll_next(
7246 mut self: std::pin::Pin<&mut Self>,
7247 cx: &mut std::task::Context<'_>,
7248 ) -> std::task::Poll<Option<Self::Item>> {
7249 let this = &mut *self;
7250 if this.inner.check_shutdown(cx) {
7251 this.is_terminated = true;
7252 return std::task::Poll::Ready(None);
7253 }
7254 if this.is_terminated {
7255 panic!("polled DirEntryRouterRequestStream after completion");
7256 }
7257 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7258 |bytes, handles| {
7259 match this.inner.channel().read_etc(cx, bytes, handles) {
7260 std::task::Poll::Ready(Ok(())) => {}
7261 std::task::Poll::Pending => return std::task::Poll::Pending,
7262 std::task::Poll::Ready(Err(None)) => {
7263 this.is_terminated = true;
7264 return std::task::Poll::Ready(None);
7265 }
7266 std::task::Poll::Ready(Err(Some(e))) => {
7267 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7268 e.into(),
7269 ))));
7270 }
7271 }
7272
7273 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7275
7276 std::task::Poll::Ready(Some(match header.ordinal {
7277 0x1ac694001c208bd2 => {
7278 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7279 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
7280 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
7281 let control_handle = DirEntryRouterControlHandle {
7282 inner: this.inner.clone(),
7283 };
7284 Ok(DirEntryRouterRequest::Route {payload: req,
7285 responder: DirEntryRouterRouteResponder {
7286 control_handle: std::mem::ManuallyDrop::new(control_handle),
7287 tx_id: header.tx_id,
7288 },
7289 })
7290 }
7291 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7292 Ok(DirEntryRouterRequest::_UnknownMethod {
7293 ordinal: header.ordinal,
7294 control_handle: DirEntryRouterControlHandle { inner: this.inner.clone() },
7295 method_type: fidl::MethodType::OneWay,
7296 })
7297 }
7298 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7299 this.inner.send_framework_err(
7300 fidl::encoding::FrameworkErr::UnknownMethod,
7301 header.tx_id,
7302 header.ordinal,
7303 header.dynamic_flags(),
7304 (bytes, handles),
7305 )?;
7306 Ok(DirEntryRouterRequest::_UnknownMethod {
7307 ordinal: header.ordinal,
7308 control_handle: DirEntryRouterControlHandle { inner: this.inner.clone() },
7309 method_type: fidl::MethodType::TwoWay,
7310 })
7311 }
7312 _ => Err(fidl::Error::UnknownOrdinal {
7313 ordinal: header.ordinal,
7314 protocol_name: <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7315 }),
7316 }))
7317 },
7318 )
7319 }
7320}
7321
7322#[derive(Debug)]
7323pub enum DirEntryRouterRequest {
7324 Route {
7325 payload: RouteRequest,
7326 responder: DirEntryRouterRouteResponder,
7327 },
7328 #[non_exhaustive]
7330 _UnknownMethod {
7331 ordinal: u64,
7333 control_handle: DirEntryRouterControlHandle,
7334 method_type: fidl::MethodType,
7335 },
7336}
7337
7338impl DirEntryRouterRequest {
7339 #[allow(irrefutable_let_patterns)]
7340 pub fn into_route(self) -> Option<(RouteRequest, DirEntryRouterRouteResponder)> {
7341 if let DirEntryRouterRequest::Route { payload, responder } = self {
7342 Some((payload, responder))
7343 } else {
7344 None
7345 }
7346 }
7347
7348 pub fn method_name(&self) -> &'static str {
7350 match *self {
7351 DirEntryRouterRequest::Route { .. } => "route",
7352 DirEntryRouterRequest::_UnknownMethod {
7353 method_type: fidl::MethodType::OneWay, ..
7354 } => "unknown one-way method",
7355 DirEntryRouterRequest::_UnknownMethod {
7356 method_type: fidl::MethodType::TwoWay, ..
7357 } => "unknown two-way method",
7358 }
7359 }
7360}
7361
7362#[derive(Debug, Clone)]
7363pub struct DirEntryRouterControlHandle {
7364 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7365}
7366
7367impl fdomain_client::fidl::ControlHandle for DirEntryRouterControlHandle {
7368 fn shutdown(&self) {
7369 self.inner.shutdown()
7370 }
7371
7372 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7373 self.inner.shutdown_with_epitaph(status)
7374 }
7375
7376 fn is_closed(&self) -> bool {
7377 self.inner.channel().is_closed()
7378 }
7379 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7380 self.inner.channel().on_closed()
7381 }
7382}
7383
7384impl DirEntryRouterControlHandle {}
7385
7386#[must_use = "FIDL methods require a response to be sent"]
7387#[derive(Debug)]
7388pub struct DirEntryRouterRouteResponder {
7389 control_handle: std::mem::ManuallyDrop<DirEntryRouterControlHandle>,
7390 tx_id: u32,
7391}
7392
7393impl std::ops::Drop for DirEntryRouterRouteResponder {
7397 fn drop(&mut self) {
7398 self.control_handle.shutdown();
7399 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7401 }
7402}
7403
7404impl fdomain_client::fidl::Responder for DirEntryRouterRouteResponder {
7405 type ControlHandle = DirEntryRouterControlHandle;
7406
7407 fn control_handle(&self) -> &DirEntryRouterControlHandle {
7408 &self.control_handle
7409 }
7410
7411 fn drop_without_shutdown(mut self) {
7412 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7414 std::mem::forget(self);
7416 }
7417}
7418
7419impl DirEntryRouterRouteResponder {
7420 pub fn send(
7424 self,
7425 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7426 ) -> Result<(), fidl::Error> {
7427 let _result = self.send_raw(result);
7428 if _result.is_err() {
7429 self.control_handle.shutdown();
7430 }
7431 self.drop_without_shutdown();
7432 _result
7433 }
7434
7435 pub fn send_no_shutdown_on_err(
7437 self,
7438 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7439 ) -> Result<(), fidl::Error> {
7440 let _result = self.send_raw(result);
7441 self.drop_without_shutdown();
7442 _result
7443 }
7444
7445 fn send_raw(
7446 &self,
7447 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7448 ) -> Result<(), fidl::Error> {
7449 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7450 DirEntryRouterRouteResponse,
7451 RouterError,
7452 >>(
7453 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
7454 self.tx_id,
7455 0x1ac694001c208bd2,
7456 fidl::encoding::DynamicFlags::FLEXIBLE,
7457 )
7458 }
7459}
7460
7461#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7462pub struct DirReceiverMarker;
7463
7464impl fdomain_client::fidl::ProtocolMarker for DirReceiverMarker {
7465 type Proxy = DirReceiverProxy;
7466 type RequestStream = DirReceiverRequestStream;
7467
7468 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
7469}
7470impl fdomain_client::fidl::DiscoverableProtocolMarker for DirReceiverMarker {}
7471
7472pub trait DirReceiverProxyInterface: Send + Sync {
7473 fn r#receive(&self, payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error>;
7474}
7475
7476#[derive(Debug, Clone)]
7477pub struct DirReceiverProxy {
7478 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7479}
7480
7481impl fdomain_client::fidl::Proxy for DirReceiverProxy {
7482 type Protocol = DirReceiverMarker;
7483
7484 fn from_channel(inner: fdomain_client::Channel) -> Self {
7485 Self::new(inner)
7486 }
7487
7488 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7489 self.client.into_channel().map_err(|client| Self { client })
7490 }
7491
7492 fn as_channel(&self) -> &fdomain_client::Channel {
7493 self.client.as_channel()
7494 }
7495}
7496
7497impl DirReceiverProxy {
7498 pub fn new(channel: fdomain_client::Channel) -> Self {
7500 let protocol_name = <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7501 Self { client: fidl::client::Client::new(channel, protocol_name) }
7502 }
7503
7504 pub fn take_event_stream(&self) -> DirReceiverEventStream {
7510 DirReceiverEventStream { event_receiver: self.client.take_event_receiver() }
7511 }
7512
7513 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
7518 DirReceiverProxyInterface::r#receive(self, payload)
7519 }
7520}
7521
7522impl DirReceiverProxyInterface for DirReceiverProxy {
7523 fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
7524 self.client.send::<DirReceiverReceiveRequest>(
7525 &mut payload,
7526 0xcdc3e9b89fe7bb4,
7527 fidl::encoding::DynamicFlags::FLEXIBLE,
7528 )
7529 }
7530}
7531
7532pub struct DirReceiverEventStream {
7533 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7534}
7535
7536impl std::marker::Unpin for DirReceiverEventStream {}
7537
7538impl futures::stream::FusedStream for DirReceiverEventStream {
7539 fn is_terminated(&self) -> bool {
7540 self.event_receiver.is_terminated()
7541 }
7542}
7543
7544impl futures::Stream for DirReceiverEventStream {
7545 type Item = Result<DirReceiverEvent, fidl::Error>;
7546
7547 fn poll_next(
7548 mut self: std::pin::Pin<&mut Self>,
7549 cx: &mut std::task::Context<'_>,
7550 ) -> std::task::Poll<Option<Self::Item>> {
7551 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7552 &mut self.event_receiver,
7553 cx
7554 )?) {
7555 Some(buf) => std::task::Poll::Ready(Some(DirReceiverEvent::decode(buf))),
7556 None => std::task::Poll::Ready(None),
7557 }
7558 }
7559}
7560
7561#[derive(Debug)]
7562pub enum DirReceiverEvent {
7563 #[non_exhaustive]
7564 _UnknownEvent {
7565 ordinal: u64,
7567 },
7568}
7569
7570impl DirReceiverEvent {
7571 fn decode(
7573 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7574 ) -> Result<DirReceiverEvent, fidl::Error> {
7575 let (bytes, _handles) = buf.split_mut();
7576 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7577 debug_assert_eq!(tx_header.tx_id, 0);
7578 match tx_header.ordinal {
7579 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7580 Ok(DirReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7581 }
7582 _ => Err(fidl::Error::UnknownOrdinal {
7583 ordinal: tx_header.ordinal,
7584 protocol_name:
7585 <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7586 }),
7587 }
7588 }
7589}
7590
7591pub struct DirReceiverRequestStream {
7593 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7594 is_terminated: bool,
7595}
7596
7597impl std::marker::Unpin for DirReceiverRequestStream {}
7598
7599impl futures::stream::FusedStream for DirReceiverRequestStream {
7600 fn is_terminated(&self) -> bool {
7601 self.is_terminated
7602 }
7603}
7604
7605impl fdomain_client::fidl::RequestStream for DirReceiverRequestStream {
7606 type Protocol = DirReceiverMarker;
7607 type ControlHandle = DirReceiverControlHandle;
7608
7609 fn from_channel(channel: fdomain_client::Channel) -> Self {
7610 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7611 }
7612
7613 fn control_handle(&self) -> Self::ControlHandle {
7614 DirReceiverControlHandle { inner: self.inner.clone() }
7615 }
7616
7617 fn into_inner(
7618 self,
7619 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7620 {
7621 (self.inner, self.is_terminated)
7622 }
7623
7624 fn from_inner(
7625 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7626 is_terminated: bool,
7627 ) -> Self {
7628 Self { inner, is_terminated }
7629 }
7630}
7631
7632impl futures::Stream for DirReceiverRequestStream {
7633 type Item = Result<DirReceiverRequest, fidl::Error>;
7634
7635 fn poll_next(
7636 mut self: std::pin::Pin<&mut Self>,
7637 cx: &mut std::task::Context<'_>,
7638 ) -> std::task::Poll<Option<Self::Item>> {
7639 let this = &mut *self;
7640 if this.inner.check_shutdown(cx) {
7641 this.is_terminated = true;
7642 return std::task::Poll::Ready(None);
7643 }
7644 if this.is_terminated {
7645 panic!("polled DirReceiverRequestStream after completion");
7646 }
7647 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7648 |bytes, handles| {
7649 match this.inner.channel().read_etc(cx, bytes, handles) {
7650 std::task::Poll::Ready(Ok(())) => {}
7651 std::task::Poll::Pending => return std::task::Poll::Pending,
7652 std::task::Poll::Ready(Err(None)) => {
7653 this.is_terminated = true;
7654 return std::task::Poll::Ready(None);
7655 }
7656 std::task::Poll::Ready(Err(Some(e))) => {
7657 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7658 e.into(),
7659 ))));
7660 }
7661 }
7662
7663 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7665
7666 std::task::Poll::Ready(Some(match header.ordinal {
7667 0xcdc3e9b89fe7bb4 => {
7668 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7669 let mut req = fidl::new_empty!(
7670 DirReceiverReceiveRequest,
7671 fdomain_client::fidl::FDomainResourceDialect
7672 );
7673 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirReceiverReceiveRequest>(&header, _body_bytes, handles, &mut req)?;
7674 let control_handle = DirReceiverControlHandle { inner: this.inner.clone() };
7675 Ok(DirReceiverRequest::Receive { payload: req, control_handle })
7676 }
7677 _ if header.tx_id == 0
7678 && header
7679 .dynamic_flags()
7680 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7681 {
7682 Ok(DirReceiverRequest::_UnknownMethod {
7683 ordinal: header.ordinal,
7684 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
7685 method_type: fidl::MethodType::OneWay,
7686 })
7687 }
7688 _ if header
7689 .dynamic_flags()
7690 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7691 {
7692 this.inner.send_framework_err(
7693 fidl::encoding::FrameworkErr::UnknownMethod,
7694 header.tx_id,
7695 header.ordinal,
7696 header.dynamic_flags(),
7697 (bytes, handles),
7698 )?;
7699 Ok(DirReceiverRequest::_UnknownMethod {
7700 ordinal: header.ordinal,
7701 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
7702 method_type: fidl::MethodType::TwoWay,
7703 })
7704 }
7705 _ => Err(fidl::Error::UnknownOrdinal {
7706 ordinal: header.ordinal,
7707 protocol_name:
7708 <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7709 }),
7710 }))
7711 },
7712 )
7713 }
7714}
7715
7716#[derive(Debug)]
7719pub enum DirReceiverRequest {
7720 Receive { payload: DirReceiverReceiveRequest, control_handle: DirReceiverControlHandle },
7725 #[non_exhaustive]
7727 _UnknownMethod {
7728 ordinal: u64,
7730 control_handle: DirReceiverControlHandle,
7731 method_type: fidl::MethodType,
7732 },
7733}
7734
7735impl DirReceiverRequest {
7736 #[allow(irrefutable_let_patterns)]
7737 pub fn into_receive(self) -> Option<(DirReceiverReceiveRequest, DirReceiverControlHandle)> {
7738 if let DirReceiverRequest::Receive { payload, control_handle } = self {
7739 Some((payload, control_handle))
7740 } else {
7741 None
7742 }
7743 }
7744
7745 pub fn method_name(&self) -> &'static str {
7747 match *self {
7748 DirReceiverRequest::Receive { .. } => "receive",
7749 DirReceiverRequest::_UnknownMethod {
7750 method_type: fidl::MethodType::OneWay, ..
7751 } => "unknown one-way method",
7752 DirReceiverRequest::_UnknownMethod {
7753 method_type: fidl::MethodType::TwoWay, ..
7754 } => "unknown two-way method",
7755 }
7756 }
7757}
7758
7759#[derive(Debug, Clone)]
7760pub struct DirReceiverControlHandle {
7761 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7762}
7763
7764impl fdomain_client::fidl::ControlHandle for DirReceiverControlHandle {
7765 fn shutdown(&self) {
7766 self.inner.shutdown()
7767 }
7768
7769 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7770 self.inner.shutdown_with_epitaph(status)
7771 }
7772
7773 fn is_closed(&self) -> bool {
7774 self.inner.channel().is_closed()
7775 }
7776 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7777 self.inner.channel().on_closed()
7778 }
7779}
7780
7781impl DirReceiverControlHandle {}
7782
7783#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7784pub struct DirectoryRouterMarker;
7785
7786impl fdomain_client::fidl::ProtocolMarker for DirectoryRouterMarker {
7787 type Proxy = DirectoryRouterProxy;
7788 type RequestStream = DirectoryRouterRequestStream;
7789
7790 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
7791}
7792impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryRouterMarker {}
7793pub type DirectoryRouterRouteResult = Result<DirectoryRouterRouteResponse, RouterError>;
7794
7795pub trait DirectoryRouterProxyInterface: Send + Sync {
7796 type RouteResponseFut: std::future::Future<Output = Result<DirectoryRouterRouteResult, fidl::Error>>
7797 + Send;
7798 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
7799}
7800
7801#[derive(Debug, Clone)]
7802pub struct DirectoryRouterProxy {
7803 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7804}
7805
7806impl fdomain_client::fidl::Proxy for DirectoryRouterProxy {
7807 type Protocol = DirectoryRouterMarker;
7808
7809 fn from_channel(inner: fdomain_client::Channel) -> Self {
7810 Self::new(inner)
7811 }
7812
7813 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7814 self.client.into_channel().map_err(|client| Self { client })
7815 }
7816
7817 fn as_channel(&self) -> &fdomain_client::Channel {
7818 self.client.as_channel()
7819 }
7820}
7821
7822impl DirectoryRouterProxy {
7823 pub fn new(channel: fdomain_client::Channel) -> Self {
7825 let protocol_name =
7826 <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7827 Self { client: fidl::client::Client::new(channel, protocol_name) }
7828 }
7829
7830 pub fn take_event_stream(&self) -> DirectoryRouterEventStream {
7836 DirectoryRouterEventStream { event_receiver: self.client.take_event_receiver() }
7837 }
7838
7839 pub fn r#route(
7840 &self,
7841 mut payload: RouteRequest,
7842 ) -> fidl::client::QueryResponseFut<
7843 DirectoryRouterRouteResult,
7844 fdomain_client::fidl::FDomainResourceDialect,
7845 > {
7846 DirectoryRouterProxyInterface::r#route(self, payload)
7847 }
7848}
7849
7850impl DirectoryRouterProxyInterface for DirectoryRouterProxy {
7851 type RouteResponseFut = fidl::client::QueryResponseFut<
7852 DirectoryRouterRouteResult,
7853 fdomain_client::fidl::FDomainResourceDialect,
7854 >;
7855 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
7856 fn _decode(
7857 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7858 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
7859 let _response = fidl::client::decode_transaction_body::<
7860 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
7861 fdomain_client::fidl::FDomainResourceDialect,
7862 0x683b6c6be21b0f21,
7863 >(_buf?)?
7864 .into_result_fdomain::<DirectoryRouterMarker>("route")?;
7865 Ok(_response.map(|x| x))
7866 }
7867 self.client.send_query_and_decode::<RouteRequest, DirectoryRouterRouteResult>(
7868 &mut payload,
7869 0x683b6c6be21b0f21,
7870 fidl::encoding::DynamicFlags::FLEXIBLE,
7871 _decode,
7872 )
7873 }
7874}
7875
7876pub struct DirectoryRouterEventStream {
7877 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7878}
7879
7880impl std::marker::Unpin for DirectoryRouterEventStream {}
7881
7882impl futures::stream::FusedStream for DirectoryRouterEventStream {
7883 fn is_terminated(&self) -> bool {
7884 self.event_receiver.is_terminated()
7885 }
7886}
7887
7888impl futures::Stream for DirectoryRouterEventStream {
7889 type Item = Result<DirectoryRouterEvent, fidl::Error>;
7890
7891 fn poll_next(
7892 mut self: std::pin::Pin<&mut Self>,
7893 cx: &mut std::task::Context<'_>,
7894 ) -> std::task::Poll<Option<Self::Item>> {
7895 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7896 &mut self.event_receiver,
7897 cx
7898 )?) {
7899 Some(buf) => std::task::Poll::Ready(Some(DirectoryRouterEvent::decode(buf))),
7900 None => std::task::Poll::Ready(None),
7901 }
7902 }
7903}
7904
7905#[derive(Debug)]
7906pub enum DirectoryRouterEvent {
7907 #[non_exhaustive]
7908 _UnknownEvent {
7909 ordinal: u64,
7911 },
7912}
7913
7914impl DirectoryRouterEvent {
7915 fn decode(
7917 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7918 ) -> Result<DirectoryRouterEvent, fidl::Error> {
7919 let (bytes, _handles) = buf.split_mut();
7920 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7921 debug_assert_eq!(tx_header.tx_id, 0);
7922 match tx_header.ordinal {
7923 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7924 Ok(DirectoryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7925 }
7926 _ => Err(fidl::Error::UnknownOrdinal {
7927 ordinal: tx_header.ordinal,
7928 protocol_name:
7929 <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7930 }),
7931 }
7932 }
7933}
7934
7935pub struct DirectoryRouterRequestStream {
7937 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7938 is_terminated: bool,
7939}
7940
7941impl std::marker::Unpin for DirectoryRouterRequestStream {}
7942
7943impl futures::stream::FusedStream for DirectoryRouterRequestStream {
7944 fn is_terminated(&self) -> bool {
7945 self.is_terminated
7946 }
7947}
7948
7949impl fdomain_client::fidl::RequestStream for DirectoryRouterRequestStream {
7950 type Protocol = DirectoryRouterMarker;
7951 type ControlHandle = DirectoryRouterControlHandle;
7952
7953 fn from_channel(channel: fdomain_client::Channel) -> Self {
7954 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7955 }
7956
7957 fn control_handle(&self) -> Self::ControlHandle {
7958 DirectoryRouterControlHandle { inner: self.inner.clone() }
7959 }
7960
7961 fn into_inner(
7962 self,
7963 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7964 {
7965 (self.inner, self.is_terminated)
7966 }
7967
7968 fn from_inner(
7969 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7970 is_terminated: bool,
7971 ) -> Self {
7972 Self { inner, is_terminated }
7973 }
7974}
7975
7976impl futures::Stream for DirectoryRouterRequestStream {
7977 type Item = Result<DirectoryRouterRequest, fidl::Error>;
7978
7979 fn poll_next(
7980 mut self: std::pin::Pin<&mut Self>,
7981 cx: &mut std::task::Context<'_>,
7982 ) -> std::task::Poll<Option<Self::Item>> {
7983 let this = &mut *self;
7984 if this.inner.check_shutdown(cx) {
7985 this.is_terminated = true;
7986 return std::task::Poll::Ready(None);
7987 }
7988 if this.is_terminated {
7989 panic!("polled DirectoryRouterRequestStream after completion");
7990 }
7991 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7992 |bytes, handles| {
7993 match this.inner.channel().read_etc(cx, bytes, handles) {
7994 std::task::Poll::Ready(Ok(())) => {}
7995 std::task::Poll::Pending => return std::task::Poll::Pending,
7996 std::task::Poll::Ready(Err(None)) => {
7997 this.is_terminated = true;
7998 return std::task::Poll::Ready(None);
7999 }
8000 std::task::Poll::Ready(Err(Some(e))) => {
8001 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8002 e.into(),
8003 ))));
8004 }
8005 }
8006
8007 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8009
8010 std::task::Poll::Ready(Some(match header.ordinal {
8011 0x683b6c6be21b0f21 => {
8012 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8013 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
8014 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8015 let control_handle = DirectoryRouterControlHandle {
8016 inner: this.inner.clone(),
8017 };
8018 Ok(DirectoryRouterRequest::Route {payload: req,
8019 responder: DirectoryRouterRouteResponder {
8020 control_handle: std::mem::ManuallyDrop::new(control_handle),
8021 tx_id: header.tx_id,
8022 },
8023 })
8024 }
8025 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8026 Ok(DirectoryRouterRequest::_UnknownMethod {
8027 ordinal: header.ordinal,
8028 control_handle: DirectoryRouterControlHandle { inner: this.inner.clone() },
8029 method_type: fidl::MethodType::OneWay,
8030 })
8031 }
8032 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8033 this.inner.send_framework_err(
8034 fidl::encoding::FrameworkErr::UnknownMethod,
8035 header.tx_id,
8036 header.ordinal,
8037 header.dynamic_flags(),
8038 (bytes, handles),
8039 )?;
8040 Ok(DirectoryRouterRequest::_UnknownMethod {
8041 ordinal: header.ordinal,
8042 control_handle: DirectoryRouterControlHandle { inner: this.inner.clone() },
8043 method_type: fidl::MethodType::TwoWay,
8044 })
8045 }
8046 _ => Err(fidl::Error::UnknownOrdinal {
8047 ordinal: header.ordinal,
8048 protocol_name: <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8049 }),
8050 }))
8051 },
8052 )
8053 }
8054}
8055
8056#[derive(Debug)]
8057pub enum DirectoryRouterRequest {
8058 Route {
8059 payload: RouteRequest,
8060 responder: DirectoryRouterRouteResponder,
8061 },
8062 #[non_exhaustive]
8064 _UnknownMethod {
8065 ordinal: u64,
8067 control_handle: DirectoryRouterControlHandle,
8068 method_type: fidl::MethodType,
8069 },
8070}
8071
8072impl DirectoryRouterRequest {
8073 #[allow(irrefutable_let_patterns)]
8074 pub fn into_route(self) -> Option<(RouteRequest, DirectoryRouterRouteResponder)> {
8075 if let DirectoryRouterRequest::Route { payload, responder } = self {
8076 Some((payload, responder))
8077 } else {
8078 None
8079 }
8080 }
8081
8082 pub fn method_name(&self) -> &'static str {
8084 match *self {
8085 DirectoryRouterRequest::Route { .. } => "route",
8086 DirectoryRouterRequest::_UnknownMethod {
8087 method_type: fidl::MethodType::OneWay,
8088 ..
8089 } => "unknown one-way method",
8090 DirectoryRouterRequest::_UnknownMethod {
8091 method_type: fidl::MethodType::TwoWay,
8092 ..
8093 } => "unknown two-way method",
8094 }
8095 }
8096}
8097
8098#[derive(Debug, Clone)]
8099pub struct DirectoryRouterControlHandle {
8100 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8101}
8102
8103impl fdomain_client::fidl::ControlHandle for DirectoryRouterControlHandle {
8104 fn shutdown(&self) {
8105 self.inner.shutdown()
8106 }
8107
8108 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8109 self.inner.shutdown_with_epitaph(status)
8110 }
8111
8112 fn is_closed(&self) -> bool {
8113 self.inner.channel().is_closed()
8114 }
8115 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8116 self.inner.channel().on_closed()
8117 }
8118}
8119
8120impl DirectoryRouterControlHandle {}
8121
8122#[must_use = "FIDL methods require a response to be sent"]
8123#[derive(Debug)]
8124pub struct DirectoryRouterRouteResponder {
8125 control_handle: std::mem::ManuallyDrop<DirectoryRouterControlHandle>,
8126 tx_id: u32,
8127}
8128
8129impl std::ops::Drop for DirectoryRouterRouteResponder {
8133 fn drop(&mut self) {
8134 self.control_handle.shutdown();
8135 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8137 }
8138}
8139
8140impl fdomain_client::fidl::Responder for DirectoryRouterRouteResponder {
8141 type ControlHandle = DirectoryRouterControlHandle;
8142
8143 fn control_handle(&self) -> &DirectoryRouterControlHandle {
8144 &self.control_handle
8145 }
8146
8147 fn drop_without_shutdown(mut self) {
8148 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8150 std::mem::forget(self);
8152 }
8153}
8154
8155impl DirectoryRouterRouteResponder {
8156 pub fn send(
8160 self,
8161 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8162 ) -> Result<(), fidl::Error> {
8163 let _result = self.send_raw(result);
8164 if _result.is_err() {
8165 self.control_handle.shutdown();
8166 }
8167 self.drop_without_shutdown();
8168 _result
8169 }
8170
8171 pub fn send_no_shutdown_on_err(
8173 self,
8174 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8175 ) -> Result<(), fidl::Error> {
8176 let _result = self.send_raw(result);
8177 self.drop_without_shutdown();
8178 _result
8179 }
8180
8181 fn send_raw(
8182 &self,
8183 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8184 ) -> Result<(), fidl::Error> {
8185 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8186 DirectoryRouterRouteResponse,
8187 RouterError,
8188 >>(
8189 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8190 self.tx_id,
8191 0x683b6c6be21b0f21,
8192 fidl::encoding::DynamicFlags::FLEXIBLE,
8193 )
8194 }
8195}
8196
8197#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8198pub struct ReceiverMarker;
8199
8200impl fdomain_client::fidl::ProtocolMarker for ReceiverMarker {
8201 type Proxy = ReceiverProxy;
8202 type RequestStream = ReceiverRequestStream;
8203
8204 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
8205}
8206impl fdomain_client::fidl::DiscoverableProtocolMarker for ReceiverMarker {}
8207
8208pub trait ReceiverProxyInterface: Send + Sync {
8209 fn r#receive(&self, channel: fdomain_client::Channel) -> Result<(), fidl::Error>;
8210}
8211
8212#[derive(Debug, Clone)]
8213pub struct ReceiverProxy {
8214 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
8215}
8216
8217impl fdomain_client::fidl::Proxy for ReceiverProxy {
8218 type Protocol = ReceiverMarker;
8219
8220 fn from_channel(inner: fdomain_client::Channel) -> Self {
8221 Self::new(inner)
8222 }
8223
8224 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
8225 self.client.into_channel().map_err(|client| Self { client })
8226 }
8227
8228 fn as_channel(&self) -> &fdomain_client::Channel {
8229 self.client.as_channel()
8230 }
8231}
8232
8233impl ReceiverProxy {
8234 pub fn new(channel: fdomain_client::Channel) -> Self {
8236 let protocol_name = <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
8237 Self { client: fidl::client::Client::new(channel, protocol_name) }
8238 }
8239
8240 pub fn take_event_stream(&self) -> ReceiverEventStream {
8246 ReceiverEventStream { event_receiver: self.client.take_event_receiver() }
8247 }
8248
8249 pub fn r#receive(&self, mut channel: fdomain_client::Channel) -> Result<(), fidl::Error> {
8251 ReceiverProxyInterface::r#receive(self, channel)
8252 }
8253}
8254
8255impl ReceiverProxyInterface for ReceiverProxy {
8256 fn r#receive(&self, mut channel: fdomain_client::Channel) -> Result<(), fidl::Error> {
8257 self.client.send::<ProtocolPayload>(
8258 (channel,),
8259 0x4bae18ab7aa1a94,
8260 fidl::encoding::DynamicFlags::FLEXIBLE,
8261 )
8262 }
8263}
8264
8265pub struct ReceiverEventStream {
8266 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
8267}
8268
8269impl std::marker::Unpin for ReceiverEventStream {}
8270
8271impl futures::stream::FusedStream for ReceiverEventStream {
8272 fn is_terminated(&self) -> bool {
8273 self.event_receiver.is_terminated()
8274 }
8275}
8276
8277impl futures::Stream for ReceiverEventStream {
8278 type Item = Result<ReceiverEvent, fidl::Error>;
8279
8280 fn poll_next(
8281 mut self: std::pin::Pin<&mut Self>,
8282 cx: &mut std::task::Context<'_>,
8283 ) -> std::task::Poll<Option<Self::Item>> {
8284 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8285 &mut self.event_receiver,
8286 cx
8287 )?) {
8288 Some(buf) => std::task::Poll::Ready(Some(ReceiverEvent::decode(buf))),
8289 None => std::task::Poll::Ready(None),
8290 }
8291 }
8292}
8293
8294#[derive(Debug)]
8295pub enum ReceiverEvent {
8296 #[non_exhaustive]
8297 _UnknownEvent {
8298 ordinal: u64,
8300 },
8301}
8302
8303impl ReceiverEvent {
8304 fn decode(
8306 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8307 ) -> Result<ReceiverEvent, fidl::Error> {
8308 let (bytes, _handles) = buf.split_mut();
8309 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8310 debug_assert_eq!(tx_header.tx_id, 0);
8311 match tx_header.ordinal {
8312 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8313 Ok(ReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8314 }
8315 _ => Err(fidl::Error::UnknownOrdinal {
8316 ordinal: tx_header.ordinal,
8317 protocol_name: <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8318 }),
8319 }
8320 }
8321}
8322
8323pub struct ReceiverRequestStream {
8325 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8326 is_terminated: bool,
8327}
8328
8329impl std::marker::Unpin for ReceiverRequestStream {}
8330
8331impl futures::stream::FusedStream for ReceiverRequestStream {
8332 fn is_terminated(&self) -> bool {
8333 self.is_terminated
8334 }
8335}
8336
8337impl fdomain_client::fidl::RequestStream for ReceiverRequestStream {
8338 type Protocol = ReceiverMarker;
8339 type ControlHandle = ReceiverControlHandle;
8340
8341 fn from_channel(channel: fdomain_client::Channel) -> Self {
8342 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8343 }
8344
8345 fn control_handle(&self) -> Self::ControlHandle {
8346 ReceiverControlHandle { inner: self.inner.clone() }
8347 }
8348
8349 fn into_inner(
8350 self,
8351 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
8352 {
8353 (self.inner, self.is_terminated)
8354 }
8355
8356 fn from_inner(
8357 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8358 is_terminated: bool,
8359 ) -> Self {
8360 Self { inner, is_terminated }
8361 }
8362}
8363
8364impl futures::Stream for ReceiverRequestStream {
8365 type Item = Result<ReceiverRequest, fidl::Error>;
8366
8367 fn poll_next(
8368 mut self: std::pin::Pin<&mut Self>,
8369 cx: &mut std::task::Context<'_>,
8370 ) -> std::task::Poll<Option<Self::Item>> {
8371 let this = &mut *self;
8372 if this.inner.check_shutdown(cx) {
8373 this.is_terminated = true;
8374 return std::task::Poll::Ready(None);
8375 }
8376 if this.is_terminated {
8377 panic!("polled ReceiverRequestStream after completion");
8378 }
8379 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
8380 |bytes, handles| {
8381 match this.inner.channel().read_etc(cx, bytes, handles) {
8382 std::task::Poll::Ready(Ok(())) => {}
8383 std::task::Poll::Pending => return std::task::Poll::Pending,
8384 std::task::Poll::Ready(Err(None)) => {
8385 this.is_terminated = true;
8386 return std::task::Poll::Ready(None);
8387 }
8388 std::task::Poll::Ready(Err(Some(e))) => {
8389 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8390 e.into(),
8391 ))));
8392 }
8393 }
8394
8395 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8397
8398 std::task::Poll::Ready(Some(match header.ordinal {
8399 0x4bae18ab7aa1a94 => {
8400 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
8401 let mut req = fidl::new_empty!(
8402 ProtocolPayload,
8403 fdomain_client::fidl::FDomainResourceDialect
8404 );
8405 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ProtocolPayload>(&header, _body_bytes, handles, &mut req)?;
8406 let control_handle = ReceiverControlHandle { inner: this.inner.clone() };
8407 Ok(ReceiverRequest::Receive { channel: req.channel, control_handle })
8408 }
8409 _ if header.tx_id == 0
8410 && header
8411 .dynamic_flags()
8412 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8413 {
8414 Ok(ReceiverRequest::_UnknownMethod {
8415 ordinal: header.ordinal,
8416 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
8417 method_type: fidl::MethodType::OneWay,
8418 })
8419 }
8420 _ if header
8421 .dynamic_flags()
8422 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8423 {
8424 this.inner.send_framework_err(
8425 fidl::encoding::FrameworkErr::UnknownMethod,
8426 header.tx_id,
8427 header.ordinal,
8428 header.dynamic_flags(),
8429 (bytes, handles),
8430 )?;
8431 Ok(ReceiverRequest::_UnknownMethod {
8432 ordinal: header.ordinal,
8433 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
8434 method_type: fidl::MethodType::TwoWay,
8435 })
8436 }
8437 _ => Err(fidl::Error::UnknownOrdinal {
8438 ordinal: header.ordinal,
8439 protocol_name:
8440 <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8441 }),
8442 }))
8443 },
8444 )
8445 }
8446}
8447
8448#[derive(Debug)]
8451pub enum ReceiverRequest {
8452 Receive { channel: fdomain_client::Channel, control_handle: ReceiverControlHandle },
8454 #[non_exhaustive]
8456 _UnknownMethod {
8457 ordinal: u64,
8459 control_handle: ReceiverControlHandle,
8460 method_type: fidl::MethodType,
8461 },
8462}
8463
8464impl ReceiverRequest {
8465 #[allow(irrefutable_let_patterns)]
8466 pub fn into_receive(self) -> Option<(fdomain_client::Channel, ReceiverControlHandle)> {
8467 if let ReceiverRequest::Receive { channel, control_handle } = self {
8468 Some((channel, control_handle))
8469 } else {
8470 None
8471 }
8472 }
8473
8474 pub fn method_name(&self) -> &'static str {
8476 match *self {
8477 ReceiverRequest::Receive { .. } => "receive",
8478 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8479 "unknown one-way method"
8480 }
8481 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8482 "unknown two-way method"
8483 }
8484 }
8485 }
8486}
8487
8488#[derive(Debug, Clone)]
8489pub struct ReceiverControlHandle {
8490 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8491}
8492
8493impl fdomain_client::fidl::ControlHandle for ReceiverControlHandle {
8494 fn shutdown(&self) {
8495 self.inner.shutdown()
8496 }
8497
8498 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8499 self.inner.shutdown_with_epitaph(status)
8500 }
8501
8502 fn is_closed(&self) -> bool {
8503 self.inner.channel().is_closed()
8504 }
8505 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8506 self.inner.channel().on_closed()
8507 }
8508}
8509
8510impl ReceiverControlHandle {}
8511
8512mod internal {
8513 use super::*;
8514
8515 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorCreateRequest {
8516 type Borrowed<'a> = &'a mut Self;
8517 fn take_or_borrow<'a>(
8518 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8519 ) -> Self::Borrowed<'a> {
8520 value
8521 }
8522 }
8523
8524 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorCreateRequest {
8525 type Owned = Self;
8526
8527 #[inline(always)]
8528 fn inline_align(_context: fidl::encoding::Context) -> usize {
8529 8
8530 }
8531
8532 #[inline(always)]
8533 fn inline_size(_context: fidl::encoding::Context) -> usize {
8534 16
8535 }
8536 }
8537
8538 unsafe impl
8539 fidl::encoding::Encode<
8540 CapabilityStoreConnectorCreateRequest,
8541 fdomain_client::fidl::FDomainResourceDialect,
8542 > for &mut CapabilityStoreConnectorCreateRequest
8543 {
8544 #[inline]
8545 unsafe fn encode(
8546 self,
8547 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8548 offset: usize,
8549 _depth: fidl::encoding::Depth,
8550 ) -> fidl::Result<()> {
8551 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
8552 fidl::encoding::Encode::<CapabilityStoreConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8554 (
8555 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8556 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
8557 ),
8558 encoder, offset, _depth
8559 )
8560 }
8561 }
8562 unsafe impl<
8563 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8564 T1: fidl::encoding::Encode<
8565 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8566 fdomain_client::fidl::FDomainResourceDialect,
8567 >,
8568 >
8569 fidl::encoding::Encode<
8570 CapabilityStoreConnectorCreateRequest,
8571 fdomain_client::fidl::FDomainResourceDialect,
8572 > for (T0, T1)
8573 {
8574 #[inline]
8575 unsafe fn encode(
8576 self,
8577 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8578 offset: usize,
8579 depth: fidl::encoding::Depth,
8580 ) -> fidl::Result<()> {
8581 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
8582 unsafe {
8585 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8586 (ptr as *mut u64).write_unaligned(0);
8587 }
8588 self.0.encode(encoder, offset + 0, depth)?;
8590 self.1.encode(encoder, offset + 8, depth)?;
8591 Ok(())
8592 }
8593 }
8594
8595 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8596 for CapabilityStoreConnectorCreateRequest
8597 {
8598 #[inline(always)]
8599 fn new_empty() -> Self {
8600 Self {
8601 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
8602 receiver: fidl::new_empty!(
8603 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8604 fdomain_client::fidl::FDomainResourceDialect
8605 ),
8606 }
8607 }
8608
8609 #[inline]
8610 unsafe fn decode(
8611 &mut self,
8612 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8613 offset: usize,
8614 _depth: fidl::encoding::Depth,
8615 ) -> fidl::Result<()> {
8616 decoder.debug_check_bounds::<Self>(offset);
8617 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8619 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8620 let mask = 0xffffffff00000000u64;
8621 let maskedval = padval & mask;
8622 if maskedval != 0 {
8623 return Err(fidl::Error::NonZeroPadding {
8624 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8625 });
8626 }
8627 fidl::decode!(
8628 u64,
8629 fdomain_client::fidl::FDomainResourceDialect,
8630 &mut self.id,
8631 decoder,
8632 offset + 0,
8633 _depth
8634 )?;
8635 fidl::decode!(
8636 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8637 fdomain_client::fidl::FDomainResourceDialect,
8638 &mut self.receiver,
8639 decoder,
8640 offset + 8,
8641 _depth
8642 )?;
8643 Ok(())
8644 }
8645 }
8646
8647 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorOpenRequest {
8648 type Borrowed<'a> = &'a mut Self;
8649 fn take_or_borrow<'a>(
8650 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8651 ) -> Self::Borrowed<'a> {
8652 value
8653 }
8654 }
8655
8656 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorOpenRequest {
8657 type Owned = Self;
8658
8659 #[inline(always)]
8660 fn inline_align(_context: fidl::encoding::Context) -> usize {
8661 8
8662 }
8663
8664 #[inline(always)]
8665 fn inline_size(_context: fidl::encoding::Context) -> usize {
8666 16
8667 }
8668 }
8669
8670 unsafe impl
8671 fidl::encoding::Encode<
8672 CapabilityStoreConnectorOpenRequest,
8673 fdomain_client::fidl::FDomainResourceDialect,
8674 > for &mut CapabilityStoreConnectorOpenRequest
8675 {
8676 #[inline]
8677 unsafe fn encode(
8678 self,
8679 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8680 offset: usize,
8681 _depth: fidl::encoding::Depth,
8682 ) -> fidl::Result<()> {
8683 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
8684 fidl::encoding::Encode::<
8686 CapabilityStoreConnectorOpenRequest,
8687 fdomain_client::fidl::FDomainResourceDialect,
8688 >::encode(
8689 (
8690 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8691 <fidl::encoding::HandleType<
8692 fdomain_client::Channel,
8693 { fidl::ObjectType::CHANNEL.into_raw() },
8694 2147483648,
8695 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8696 &mut self.server_end
8697 ),
8698 ),
8699 encoder,
8700 offset,
8701 _depth,
8702 )
8703 }
8704 }
8705 unsafe impl<
8706 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8707 T1: fidl::encoding::Encode<
8708 fidl::encoding::HandleType<
8709 fdomain_client::Channel,
8710 { fidl::ObjectType::CHANNEL.into_raw() },
8711 2147483648,
8712 >,
8713 fdomain_client::fidl::FDomainResourceDialect,
8714 >,
8715 >
8716 fidl::encoding::Encode<
8717 CapabilityStoreConnectorOpenRequest,
8718 fdomain_client::fidl::FDomainResourceDialect,
8719 > for (T0, T1)
8720 {
8721 #[inline]
8722 unsafe fn encode(
8723 self,
8724 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8725 offset: usize,
8726 depth: fidl::encoding::Depth,
8727 ) -> fidl::Result<()> {
8728 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
8729 unsafe {
8732 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8733 (ptr as *mut u64).write_unaligned(0);
8734 }
8735 self.0.encode(encoder, offset + 0, depth)?;
8737 self.1.encode(encoder, offset + 8, depth)?;
8738 Ok(())
8739 }
8740 }
8741
8742 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8743 for CapabilityStoreConnectorOpenRequest
8744 {
8745 #[inline(always)]
8746 fn new_empty() -> Self {
8747 Self {
8748 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
8749 server_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
8750 }
8751 }
8752
8753 #[inline]
8754 unsafe fn decode(
8755 &mut self,
8756 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8757 offset: usize,
8758 _depth: fidl::encoding::Depth,
8759 ) -> fidl::Result<()> {
8760 decoder.debug_check_bounds::<Self>(offset);
8761 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8763 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8764 let mask = 0xffffffff00000000u64;
8765 let maskedval = padval & mask;
8766 if maskedval != 0 {
8767 return Err(fidl::Error::NonZeroPadding {
8768 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8769 });
8770 }
8771 fidl::decode!(
8772 u64,
8773 fdomain_client::fidl::FDomainResourceDialect,
8774 &mut self.id,
8775 decoder,
8776 offset + 0,
8777 _depth
8778 )?;
8779 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.server_end, decoder, offset + 8, _depth)?;
8780 Ok(())
8781 }
8782 }
8783
8784 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryDrainRequest {
8785 type Borrowed<'a> = &'a mut Self;
8786 fn take_or_borrow<'a>(
8787 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8788 ) -> Self::Borrowed<'a> {
8789 value
8790 }
8791 }
8792
8793 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryDrainRequest {
8794 type Owned = Self;
8795
8796 #[inline(always)]
8797 fn inline_align(_context: fidl::encoding::Context) -> usize {
8798 8
8799 }
8800
8801 #[inline(always)]
8802 fn inline_size(_context: fidl::encoding::Context) -> usize {
8803 16
8804 }
8805 }
8806
8807 unsafe impl
8808 fidl::encoding::Encode<
8809 CapabilityStoreDictionaryDrainRequest,
8810 fdomain_client::fidl::FDomainResourceDialect,
8811 > for &mut CapabilityStoreDictionaryDrainRequest
8812 {
8813 #[inline]
8814 unsafe fn encode(
8815 self,
8816 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8817 offset: usize,
8818 _depth: fidl::encoding::Depth,
8819 ) -> fidl::Result<()> {
8820 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
8821 fidl::encoding::Encode::<
8823 CapabilityStoreDictionaryDrainRequest,
8824 fdomain_client::fidl::FDomainResourceDialect,
8825 >::encode(
8826 (
8827 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8828 <fidl::encoding::Optional<
8829 fidl::encoding::Endpoint<
8830 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
8831 >,
8832 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8833 &mut self.iterator
8834 ),
8835 ),
8836 encoder,
8837 offset,
8838 _depth,
8839 )
8840 }
8841 }
8842 unsafe impl<
8843 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8844 T1: fidl::encoding::Encode<
8845 fidl::encoding::Optional<
8846 fidl::encoding::Endpoint<
8847 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
8848 >,
8849 >,
8850 fdomain_client::fidl::FDomainResourceDialect,
8851 >,
8852 >
8853 fidl::encoding::Encode<
8854 CapabilityStoreDictionaryDrainRequest,
8855 fdomain_client::fidl::FDomainResourceDialect,
8856 > for (T0, T1)
8857 {
8858 #[inline]
8859 unsafe fn encode(
8860 self,
8861 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8862 offset: usize,
8863 depth: fidl::encoding::Depth,
8864 ) -> fidl::Result<()> {
8865 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
8866 unsafe {
8869 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8870 (ptr as *mut u64).write_unaligned(0);
8871 }
8872 self.0.encode(encoder, offset + 0, depth)?;
8874 self.1.encode(encoder, offset + 8, depth)?;
8875 Ok(())
8876 }
8877 }
8878
8879 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8880 for CapabilityStoreDictionaryDrainRequest
8881 {
8882 #[inline(always)]
8883 fn new_empty() -> Self {
8884 Self {
8885 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
8886 iterator: fidl::new_empty!(
8887 fidl::encoding::Optional<
8888 fidl::encoding::Endpoint<
8889 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
8890 >,
8891 >,
8892 fdomain_client::fidl::FDomainResourceDialect
8893 ),
8894 }
8895 }
8896
8897 #[inline]
8898 unsafe fn decode(
8899 &mut self,
8900 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8901 offset: usize,
8902 _depth: fidl::encoding::Depth,
8903 ) -> fidl::Result<()> {
8904 decoder.debug_check_bounds::<Self>(offset);
8905 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8907 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8908 let mask = 0xffffffff00000000u64;
8909 let maskedval = padval & mask;
8910 if maskedval != 0 {
8911 return Err(fidl::Error::NonZeroPadding {
8912 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8913 });
8914 }
8915 fidl::decode!(
8916 u64,
8917 fdomain_client::fidl::FDomainResourceDialect,
8918 &mut self.id,
8919 decoder,
8920 offset + 0,
8921 _depth
8922 )?;
8923 fidl::decode!(
8924 fidl::encoding::Optional<
8925 fidl::encoding::Endpoint<
8926 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
8927 >,
8928 >,
8929 fdomain_client::fidl::FDomainResourceDialect,
8930 &mut self.iterator,
8931 decoder,
8932 offset + 8,
8933 _depth
8934 )?;
8935 Ok(())
8936 }
8937 }
8938
8939 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryEnumerateRequest {
8940 type Borrowed<'a> = &'a mut Self;
8941 fn take_or_borrow<'a>(
8942 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8943 ) -> Self::Borrowed<'a> {
8944 value
8945 }
8946 }
8947
8948 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryEnumerateRequest {
8949 type Owned = Self;
8950
8951 #[inline(always)]
8952 fn inline_align(_context: fidl::encoding::Context) -> usize {
8953 8
8954 }
8955
8956 #[inline(always)]
8957 fn inline_size(_context: fidl::encoding::Context) -> usize {
8958 16
8959 }
8960 }
8961
8962 unsafe impl
8963 fidl::encoding::Encode<
8964 CapabilityStoreDictionaryEnumerateRequest,
8965 fdomain_client::fidl::FDomainResourceDialect,
8966 > for &mut CapabilityStoreDictionaryEnumerateRequest
8967 {
8968 #[inline]
8969 unsafe fn encode(
8970 self,
8971 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8972 offset: usize,
8973 _depth: fidl::encoding::Depth,
8974 ) -> fidl::Result<()> {
8975 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
8976 fidl::encoding::Encode::<
8978 CapabilityStoreDictionaryEnumerateRequest,
8979 fdomain_client::fidl::FDomainResourceDialect,
8980 >::encode(
8981 (
8982 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8983 <fidl::encoding::Endpoint<
8984 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
8985 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8986 &mut self.iterator
8987 ),
8988 ),
8989 encoder,
8990 offset,
8991 _depth,
8992 )
8993 }
8994 }
8995 unsafe impl<
8996 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8997 T1: fidl::encoding::Encode<
8998 fidl::encoding::Endpoint<
8999 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9000 >,
9001 fdomain_client::fidl::FDomainResourceDialect,
9002 >,
9003 >
9004 fidl::encoding::Encode<
9005 CapabilityStoreDictionaryEnumerateRequest,
9006 fdomain_client::fidl::FDomainResourceDialect,
9007 > for (T0, T1)
9008 {
9009 #[inline]
9010 unsafe fn encode(
9011 self,
9012 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9013 offset: usize,
9014 depth: fidl::encoding::Depth,
9015 ) -> fidl::Result<()> {
9016 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
9017 unsafe {
9020 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9021 (ptr as *mut u64).write_unaligned(0);
9022 }
9023 self.0.encode(encoder, offset + 0, depth)?;
9025 self.1.encode(encoder, offset + 8, depth)?;
9026 Ok(())
9027 }
9028 }
9029
9030 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9031 for CapabilityStoreDictionaryEnumerateRequest
9032 {
9033 #[inline(always)]
9034 fn new_empty() -> Self {
9035 Self {
9036 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9037 iterator: fidl::new_empty!(
9038 fidl::encoding::Endpoint<
9039 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9040 >,
9041 fdomain_client::fidl::FDomainResourceDialect
9042 ),
9043 }
9044 }
9045
9046 #[inline]
9047 unsafe fn decode(
9048 &mut self,
9049 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9050 offset: usize,
9051 _depth: fidl::encoding::Depth,
9052 ) -> fidl::Result<()> {
9053 decoder.debug_check_bounds::<Self>(offset);
9054 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9056 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9057 let mask = 0xffffffff00000000u64;
9058 let maskedval = padval & mask;
9059 if maskedval != 0 {
9060 return Err(fidl::Error::NonZeroPadding {
9061 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9062 });
9063 }
9064 fidl::decode!(
9065 u64,
9066 fdomain_client::fidl::FDomainResourceDialect,
9067 &mut self.id,
9068 decoder,
9069 offset + 0,
9070 _depth
9071 )?;
9072 fidl::decode!(
9073 fidl::encoding::Endpoint<
9074 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9075 >,
9076 fdomain_client::fidl::FDomainResourceDialect,
9077 &mut self.iterator,
9078 decoder,
9079 offset + 8,
9080 _depth
9081 )?;
9082 Ok(())
9083 }
9084 }
9085
9086 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryKeysRequest {
9087 type Borrowed<'a> = &'a mut Self;
9088 fn take_or_borrow<'a>(
9089 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9090 ) -> Self::Borrowed<'a> {
9091 value
9092 }
9093 }
9094
9095 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryKeysRequest {
9096 type Owned = Self;
9097
9098 #[inline(always)]
9099 fn inline_align(_context: fidl::encoding::Context) -> usize {
9100 8
9101 }
9102
9103 #[inline(always)]
9104 fn inline_size(_context: fidl::encoding::Context) -> usize {
9105 16
9106 }
9107 }
9108
9109 unsafe impl
9110 fidl::encoding::Encode<
9111 CapabilityStoreDictionaryKeysRequest,
9112 fdomain_client::fidl::FDomainResourceDialect,
9113 > for &mut CapabilityStoreDictionaryKeysRequest
9114 {
9115 #[inline]
9116 unsafe fn encode(
9117 self,
9118 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9119 offset: usize,
9120 _depth: fidl::encoding::Depth,
9121 ) -> fidl::Result<()> {
9122 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
9123 fidl::encoding::Encode::<
9125 CapabilityStoreDictionaryKeysRequest,
9126 fdomain_client::fidl::FDomainResourceDialect,
9127 >::encode(
9128 (
9129 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9130 <fidl::encoding::Endpoint<
9131 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9132 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9133 &mut self.iterator
9134 ),
9135 ),
9136 encoder,
9137 offset,
9138 _depth,
9139 )
9140 }
9141 }
9142 unsafe impl<
9143 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9144 T1: fidl::encoding::Encode<
9145 fidl::encoding::Endpoint<
9146 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9147 >,
9148 fdomain_client::fidl::FDomainResourceDialect,
9149 >,
9150 >
9151 fidl::encoding::Encode<
9152 CapabilityStoreDictionaryKeysRequest,
9153 fdomain_client::fidl::FDomainResourceDialect,
9154 > for (T0, T1)
9155 {
9156 #[inline]
9157 unsafe fn encode(
9158 self,
9159 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9160 offset: usize,
9161 depth: fidl::encoding::Depth,
9162 ) -> fidl::Result<()> {
9163 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
9164 unsafe {
9167 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9168 (ptr as *mut u64).write_unaligned(0);
9169 }
9170 self.0.encode(encoder, offset + 0, depth)?;
9172 self.1.encode(encoder, offset + 8, depth)?;
9173 Ok(())
9174 }
9175 }
9176
9177 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9178 for CapabilityStoreDictionaryKeysRequest
9179 {
9180 #[inline(always)]
9181 fn new_empty() -> Self {
9182 Self {
9183 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9184 iterator: fidl::new_empty!(
9185 fidl::encoding::Endpoint<
9186 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9187 >,
9188 fdomain_client::fidl::FDomainResourceDialect
9189 ),
9190 }
9191 }
9192
9193 #[inline]
9194 unsafe fn decode(
9195 &mut self,
9196 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9197 offset: usize,
9198 _depth: fidl::encoding::Depth,
9199 ) -> fidl::Result<()> {
9200 decoder.debug_check_bounds::<Self>(offset);
9201 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9203 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9204 let mask = 0xffffffff00000000u64;
9205 let maskedval = padval & mask;
9206 if maskedval != 0 {
9207 return Err(fidl::Error::NonZeroPadding {
9208 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9209 });
9210 }
9211 fidl::decode!(
9212 u64,
9213 fdomain_client::fidl::FDomainResourceDialect,
9214 &mut self.id,
9215 decoder,
9216 offset + 0,
9217 _depth
9218 )?;
9219 fidl::decode!(
9220 fidl::encoding::Endpoint<
9221 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9222 >,
9223 fdomain_client::fidl::FDomainResourceDialect,
9224 &mut self.iterator,
9225 decoder,
9226 offset + 8,
9227 _depth
9228 )?;
9229 Ok(())
9230 }
9231 }
9232
9233 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
9234 type Borrowed<'a> = &'a mut Self;
9235 fn take_or_borrow<'a>(
9236 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9237 ) -> Self::Borrowed<'a> {
9238 value
9239 }
9240 }
9241
9242 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
9243 type Owned = Self;
9244
9245 #[inline(always)]
9246 fn inline_align(_context: fidl::encoding::Context) -> usize {
9247 8
9248 }
9249
9250 #[inline(always)]
9251 fn inline_size(_context: fidl::encoding::Context) -> usize {
9252 16
9253 }
9254 }
9255
9256 unsafe impl
9257 fidl::encoding::Encode<
9258 CapabilityStoreDictionaryLegacyExportRequest,
9259 fdomain_client::fidl::FDomainResourceDialect,
9260 > for &mut CapabilityStoreDictionaryLegacyExportRequest
9261 {
9262 #[inline]
9263 unsafe fn encode(
9264 self,
9265 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9266 offset: usize,
9267 _depth: fidl::encoding::Depth,
9268 ) -> fidl::Result<()> {
9269 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
9270 fidl::encoding::Encode::<
9272 CapabilityStoreDictionaryLegacyExportRequest,
9273 fdomain_client::fidl::FDomainResourceDialect,
9274 >::encode(
9275 (
9276 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9277 <fidl::encoding::HandleType<
9278 fdomain_client::Channel,
9279 { fidl::ObjectType::CHANNEL.into_raw() },
9280 2147483648,
9281 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9282 &mut self.server_end
9283 ),
9284 ),
9285 encoder,
9286 offset,
9287 _depth,
9288 )
9289 }
9290 }
9291 unsafe impl<
9292 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9293 T1: fidl::encoding::Encode<
9294 fidl::encoding::HandleType<
9295 fdomain_client::Channel,
9296 { fidl::ObjectType::CHANNEL.into_raw() },
9297 2147483648,
9298 >,
9299 fdomain_client::fidl::FDomainResourceDialect,
9300 >,
9301 >
9302 fidl::encoding::Encode<
9303 CapabilityStoreDictionaryLegacyExportRequest,
9304 fdomain_client::fidl::FDomainResourceDialect,
9305 > for (T0, T1)
9306 {
9307 #[inline]
9308 unsafe fn encode(
9309 self,
9310 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9311 offset: usize,
9312 depth: fidl::encoding::Depth,
9313 ) -> fidl::Result<()> {
9314 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
9315 unsafe {
9318 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9319 (ptr as *mut u64).write_unaligned(0);
9320 }
9321 self.0.encode(encoder, offset + 0, depth)?;
9323 self.1.encode(encoder, offset + 8, depth)?;
9324 Ok(())
9325 }
9326 }
9327
9328 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9329 for CapabilityStoreDictionaryLegacyExportRequest
9330 {
9331 #[inline(always)]
9332 fn new_empty() -> Self {
9333 Self {
9334 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9335 server_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9336 }
9337 }
9338
9339 #[inline]
9340 unsafe fn decode(
9341 &mut self,
9342 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9343 offset: usize,
9344 _depth: fidl::encoding::Depth,
9345 ) -> fidl::Result<()> {
9346 decoder.debug_check_bounds::<Self>(offset);
9347 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9349 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9350 let mask = 0xffffffff00000000u64;
9351 let maskedval = padval & mask;
9352 if maskedval != 0 {
9353 return Err(fidl::Error::NonZeroPadding {
9354 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9355 });
9356 }
9357 fidl::decode!(
9358 u64,
9359 fdomain_client::fidl::FDomainResourceDialect,
9360 &mut self.id,
9361 decoder,
9362 offset + 0,
9363 _depth
9364 )?;
9365 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.server_end, decoder, offset + 8, _depth)?;
9366 Ok(())
9367 }
9368 }
9369
9370 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
9371 type Borrowed<'a> = &'a mut Self;
9372 fn take_or_borrow<'a>(
9373 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9374 ) -> Self::Borrowed<'a> {
9375 value
9376 }
9377 }
9378
9379 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
9380 type Owned = Self;
9381
9382 #[inline(always)]
9383 fn inline_align(_context: fidl::encoding::Context) -> usize {
9384 8
9385 }
9386
9387 #[inline(always)]
9388 fn inline_size(_context: fidl::encoding::Context) -> usize {
9389 16
9390 }
9391 }
9392
9393 unsafe impl
9394 fidl::encoding::Encode<
9395 CapabilityStoreDictionaryLegacyImportRequest,
9396 fdomain_client::fidl::FDomainResourceDialect,
9397 > for &mut CapabilityStoreDictionaryLegacyImportRequest
9398 {
9399 #[inline]
9400 unsafe fn encode(
9401 self,
9402 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9403 offset: usize,
9404 _depth: fidl::encoding::Depth,
9405 ) -> fidl::Result<()> {
9406 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
9407 fidl::encoding::Encode::<
9409 CapabilityStoreDictionaryLegacyImportRequest,
9410 fdomain_client::fidl::FDomainResourceDialect,
9411 >::encode(
9412 (
9413 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9414 <fidl::encoding::HandleType<
9415 fdomain_client::Channel,
9416 { fidl::ObjectType::CHANNEL.into_raw() },
9417 2147483648,
9418 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9419 &mut self.client_end
9420 ),
9421 ),
9422 encoder,
9423 offset,
9424 _depth,
9425 )
9426 }
9427 }
9428 unsafe impl<
9429 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9430 T1: fidl::encoding::Encode<
9431 fidl::encoding::HandleType<
9432 fdomain_client::Channel,
9433 { fidl::ObjectType::CHANNEL.into_raw() },
9434 2147483648,
9435 >,
9436 fdomain_client::fidl::FDomainResourceDialect,
9437 >,
9438 >
9439 fidl::encoding::Encode<
9440 CapabilityStoreDictionaryLegacyImportRequest,
9441 fdomain_client::fidl::FDomainResourceDialect,
9442 > for (T0, T1)
9443 {
9444 #[inline]
9445 unsafe fn encode(
9446 self,
9447 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9448 offset: usize,
9449 depth: fidl::encoding::Depth,
9450 ) -> fidl::Result<()> {
9451 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
9452 unsafe {
9455 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9456 (ptr as *mut u64).write_unaligned(0);
9457 }
9458 self.0.encode(encoder, offset + 0, depth)?;
9460 self.1.encode(encoder, offset + 8, depth)?;
9461 Ok(())
9462 }
9463 }
9464
9465 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9466 for CapabilityStoreDictionaryLegacyImportRequest
9467 {
9468 #[inline(always)]
9469 fn new_empty() -> Self {
9470 Self {
9471 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9472 client_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9473 }
9474 }
9475
9476 #[inline]
9477 unsafe fn decode(
9478 &mut self,
9479 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9480 offset: usize,
9481 _depth: fidl::encoding::Depth,
9482 ) -> fidl::Result<()> {
9483 decoder.debug_check_bounds::<Self>(offset);
9484 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9486 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9487 let mask = 0xffffffff00000000u64;
9488 let maskedval = padval & mask;
9489 if maskedval != 0 {
9490 return Err(fidl::Error::NonZeroPadding {
9491 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9492 });
9493 }
9494 fidl::decode!(
9495 u64,
9496 fdomain_client::fidl::FDomainResourceDialect,
9497 &mut self.id,
9498 decoder,
9499 offset + 0,
9500 _depth
9501 )?;
9502 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.client_end, decoder, offset + 8, _depth)?;
9503 Ok(())
9504 }
9505 }
9506
9507 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorCreateRequest {
9508 type Borrowed<'a> = &'a mut Self;
9509 fn take_or_borrow<'a>(
9510 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9511 ) -> Self::Borrowed<'a> {
9512 value
9513 }
9514 }
9515
9516 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorCreateRequest {
9517 type Owned = Self;
9518
9519 #[inline(always)]
9520 fn inline_align(_context: fidl::encoding::Context) -> usize {
9521 8
9522 }
9523
9524 #[inline(always)]
9525 fn inline_size(_context: fidl::encoding::Context) -> usize {
9526 16
9527 }
9528 }
9529
9530 unsafe impl
9531 fidl::encoding::Encode<
9532 CapabilityStoreDirConnectorCreateRequest,
9533 fdomain_client::fidl::FDomainResourceDialect,
9534 > for &mut CapabilityStoreDirConnectorCreateRequest
9535 {
9536 #[inline]
9537 unsafe fn encode(
9538 self,
9539 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9540 offset: usize,
9541 _depth: fidl::encoding::Depth,
9542 ) -> fidl::Result<()> {
9543 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
9544 fidl::encoding::Encode::<CapabilityStoreDirConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9546 (
9547 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9548 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
9549 ),
9550 encoder, offset, _depth
9551 )
9552 }
9553 }
9554 unsafe impl<
9555 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9556 T1: fidl::encoding::Encode<
9557 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9558 fdomain_client::fidl::FDomainResourceDialect,
9559 >,
9560 >
9561 fidl::encoding::Encode<
9562 CapabilityStoreDirConnectorCreateRequest,
9563 fdomain_client::fidl::FDomainResourceDialect,
9564 > for (T0, T1)
9565 {
9566 #[inline]
9567 unsafe fn encode(
9568 self,
9569 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9570 offset: usize,
9571 depth: fidl::encoding::Depth,
9572 ) -> fidl::Result<()> {
9573 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
9574 unsafe {
9577 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9578 (ptr as *mut u64).write_unaligned(0);
9579 }
9580 self.0.encode(encoder, offset + 0, depth)?;
9582 self.1.encode(encoder, offset + 8, depth)?;
9583 Ok(())
9584 }
9585 }
9586
9587 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9588 for CapabilityStoreDirConnectorCreateRequest
9589 {
9590 #[inline(always)]
9591 fn new_empty() -> Self {
9592 Self {
9593 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9594 receiver: fidl::new_empty!(
9595 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9596 fdomain_client::fidl::FDomainResourceDialect
9597 ),
9598 }
9599 }
9600
9601 #[inline]
9602 unsafe fn decode(
9603 &mut self,
9604 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9605 offset: usize,
9606 _depth: fidl::encoding::Depth,
9607 ) -> fidl::Result<()> {
9608 decoder.debug_check_bounds::<Self>(offset);
9609 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9611 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9612 let mask = 0xffffffff00000000u64;
9613 let maskedval = padval & mask;
9614 if maskedval != 0 {
9615 return Err(fidl::Error::NonZeroPadding {
9616 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9617 });
9618 }
9619 fidl::decode!(
9620 u64,
9621 fdomain_client::fidl::FDomainResourceDialect,
9622 &mut self.id,
9623 decoder,
9624 offset + 0,
9625 _depth
9626 )?;
9627 fidl::decode!(
9628 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9629 fdomain_client::fidl::FDomainResourceDialect,
9630 &mut self.receiver,
9631 decoder,
9632 offset + 8,
9633 _depth
9634 )?;
9635 Ok(())
9636 }
9637 }
9638
9639 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreImportRequest {
9640 type Borrowed<'a> = &'a mut Self;
9641 fn take_or_borrow<'a>(
9642 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9643 ) -> Self::Borrowed<'a> {
9644 value
9645 }
9646 }
9647
9648 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreImportRequest {
9649 type Owned = Self;
9650
9651 #[inline(always)]
9652 fn inline_align(_context: fidl::encoding::Context) -> usize {
9653 8
9654 }
9655
9656 #[inline(always)]
9657 fn inline_size(_context: fidl::encoding::Context) -> usize {
9658 24
9659 }
9660 }
9661
9662 unsafe impl
9663 fidl::encoding::Encode<
9664 CapabilityStoreImportRequest,
9665 fdomain_client::fidl::FDomainResourceDialect,
9666 > for &mut CapabilityStoreImportRequest
9667 {
9668 #[inline]
9669 unsafe fn encode(
9670 self,
9671 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9672 offset: usize,
9673 _depth: fidl::encoding::Depth,
9674 ) -> fidl::Result<()> {
9675 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
9676 fidl::encoding::Encode::<
9678 CapabilityStoreImportRequest,
9679 fdomain_client::fidl::FDomainResourceDialect,
9680 >::encode(
9681 (
9682 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9683 <Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9684 &mut self.capability,
9685 ),
9686 ),
9687 encoder,
9688 offset,
9689 _depth,
9690 )
9691 }
9692 }
9693 unsafe impl<
9694 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9695 T1: fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>,
9696 >
9697 fidl::encoding::Encode<
9698 CapabilityStoreImportRequest,
9699 fdomain_client::fidl::FDomainResourceDialect,
9700 > for (T0, T1)
9701 {
9702 #[inline]
9703 unsafe fn encode(
9704 self,
9705 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9706 offset: usize,
9707 depth: fidl::encoding::Depth,
9708 ) -> fidl::Result<()> {
9709 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
9710 self.0.encode(encoder, offset + 0, depth)?;
9714 self.1.encode(encoder, offset + 8, depth)?;
9715 Ok(())
9716 }
9717 }
9718
9719 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9720 for CapabilityStoreImportRequest
9721 {
9722 #[inline(always)]
9723 fn new_empty() -> Self {
9724 Self {
9725 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9726 capability: fidl::new_empty!(
9727 Capability,
9728 fdomain_client::fidl::FDomainResourceDialect
9729 ),
9730 }
9731 }
9732
9733 #[inline]
9734 unsafe fn decode(
9735 &mut self,
9736 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9737 offset: usize,
9738 _depth: fidl::encoding::Depth,
9739 ) -> fidl::Result<()> {
9740 decoder.debug_check_bounds::<Self>(offset);
9741 fidl::decode!(
9743 u64,
9744 fdomain_client::fidl::FDomainResourceDialect,
9745 &mut self.id,
9746 decoder,
9747 offset + 0,
9748 _depth
9749 )?;
9750 fidl::decode!(
9751 Capability,
9752 fdomain_client::fidl::FDomainResourceDialect,
9753 &mut self.capability,
9754 decoder,
9755 offset + 8,
9756 _depth
9757 )?;
9758 Ok(())
9759 }
9760 }
9761
9762 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreExportResponse {
9763 type Borrowed<'a> = &'a mut Self;
9764 fn take_or_borrow<'a>(
9765 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9766 ) -> Self::Borrowed<'a> {
9767 value
9768 }
9769 }
9770
9771 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreExportResponse {
9772 type Owned = Self;
9773
9774 #[inline(always)]
9775 fn inline_align(_context: fidl::encoding::Context) -> usize {
9776 8
9777 }
9778
9779 #[inline(always)]
9780 fn inline_size(_context: fidl::encoding::Context) -> usize {
9781 16
9782 }
9783 }
9784
9785 unsafe impl
9786 fidl::encoding::Encode<
9787 CapabilityStoreExportResponse,
9788 fdomain_client::fidl::FDomainResourceDialect,
9789 > for &mut CapabilityStoreExportResponse
9790 {
9791 #[inline]
9792 unsafe fn encode(
9793 self,
9794 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9795 offset: usize,
9796 _depth: fidl::encoding::Depth,
9797 ) -> fidl::Result<()> {
9798 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
9799 fidl::encoding::Encode::<
9801 CapabilityStoreExportResponse,
9802 fdomain_client::fidl::FDomainResourceDialect,
9803 >::encode(
9804 (<Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9805 &mut self.capability,
9806 ),),
9807 encoder,
9808 offset,
9809 _depth,
9810 )
9811 }
9812 }
9813 unsafe impl<
9814 T0: fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>,
9815 >
9816 fidl::encoding::Encode<
9817 CapabilityStoreExportResponse,
9818 fdomain_client::fidl::FDomainResourceDialect,
9819 > for (T0,)
9820 {
9821 #[inline]
9822 unsafe fn encode(
9823 self,
9824 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9825 offset: usize,
9826 depth: fidl::encoding::Depth,
9827 ) -> fidl::Result<()> {
9828 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
9829 self.0.encode(encoder, offset + 0, depth)?;
9833 Ok(())
9834 }
9835 }
9836
9837 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9838 for CapabilityStoreExportResponse
9839 {
9840 #[inline(always)]
9841 fn new_empty() -> Self {
9842 Self {
9843 capability: fidl::new_empty!(
9844 Capability,
9845 fdomain_client::fidl::FDomainResourceDialect
9846 ),
9847 }
9848 }
9849
9850 #[inline]
9851 unsafe fn decode(
9852 &mut self,
9853 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9854 offset: usize,
9855 _depth: fidl::encoding::Depth,
9856 ) -> fidl::Result<()> {
9857 decoder.debug_check_bounds::<Self>(offset);
9858 fidl::decode!(
9860 Capability,
9861 fdomain_client::fidl::FDomainResourceDialect,
9862 &mut self.capability,
9863 decoder,
9864 offset + 0,
9865 _depth
9866 )?;
9867 Ok(())
9868 }
9869 }
9870
9871 impl fidl::encoding::ResourceTypeMarker for Connector {
9872 type Borrowed<'a> = &'a mut Self;
9873 fn take_or_borrow<'a>(
9874 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9875 ) -> Self::Borrowed<'a> {
9876 value
9877 }
9878 }
9879
9880 unsafe impl fidl::encoding::TypeMarker for Connector {
9881 type Owned = Self;
9882
9883 #[inline(always)]
9884 fn inline_align(_context: fidl::encoding::Context) -> usize {
9885 4
9886 }
9887
9888 #[inline(always)]
9889 fn inline_size(_context: fidl::encoding::Context) -> usize {
9890 4
9891 }
9892 }
9893
9894 unsafe impl fidl::encoding::Encode<Connector, fdomain_client::fidl::FDomainResourceDialect>
9895 for &mut Connector
9896 {
9897 #[inline]
9898 unsafe fn encode(
9899 self,
9900 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9901 offset: usize,
9902 _depth: fidl::encoding::Depth,
9903 ) -> fidl::Result<()> {
9904 encoder.debug_check_bounds::<Connector>(offset);
9905 fidl::encoding::Encode::<Connector, fdomain_client::fidl::FDomainResourceDialect>::encode(
9907 (
9908 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
9909 ),
9910 encoder, offset, _depth
9911 )
9912 }
9913 }
9914 unsafe impl<
9915 T0: fidl::encoding::Encode<
9916 fidl::encoding::HandleType<
9917 fdomain_client::EventPair,
9918 { fidl::ObjectType::EVENTPAIR.into_raw() },
9919 2147483648,
9920 >,
9921 fdomain_client::fidl::FDomainResourceDialect,
9922 >,
9923 > fidl::encoding::Encode<Connector, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
9924 {
9925 #[inline]
9926 unsafe fn encode(
9927 self,
9928 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9929 offset: usize,
9930 depth: fidl::encoding::Depth,
9931 ) -> fidl::Result<()> {
9932 encoder.debug_check_bounds::<Connector>(offset);
9933 self.0.encode(encoder, offset + 0, depth)?;
9937 Ok(())
9938 }
9939 }
9940
9941 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Connector {
9942 #[inline(always)]
9943 fn new_empty() -> Self {
9944 Self {
9945 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9946 }
9947 }
9948
9949 #[inline]
9950 unsafe fn decode(
9951 &mut self,
9952 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9953 offset: usize,
9954 _depth: fidl::encoding::Depth,
9955 ) -> fidl::Result<()> {
9956 decoder.debug_check_bounds::<Self>(offset);
9957 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
9959 Ok(())
9960 }
9961 }
9962
9963 impl fidl::encoding::ResourceTypeMarker for DictionaryDrainIteratorGetNextResponse {
9964 type Borrowed<'a> = &'a mut Self;
9965 fn take_or_borrow<'a>(
9966 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9967 ) -> Self::Borrowed<'a> {
9968 value
9969 }
9970 }
9971
9972 unsafe impl fidl::encoding::TypeMarker for DictionaryDrainIteratorGetNextResponse {
9973 type Owned = Self;
9974
9975 #[inline(always)]
9976 fn inline_align(_context: fidl::encoding::Context) -> usize {
9977 8
9978 }
9979
9980 #[inline(always)]
9981 fn inline_size(_context: fidl::encoding::Context) -> usize {
9982 24
9983 }
9984 }
9985
9986 unsafe impl
9987 fidl::encoding::Encode<
9988 DictionaryDrainIteratorGetNextResponse,
9989 fdomain_client::fidl::FDomainResourceDialect,
9990 > for &mut DictionaryDrainIteratorGetNextResponse
9991 {
9992 #[inline]
9993 unsafe fn encode(
9994 self,
9995 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9996 offset: usize,
9997 _depth: fidl::encoding::Depth,
9998 ) -> fidl::Result<()> {
9999 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
10000 fidl::encoding::Encode::<DictionaryDrainIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10002 (
10003 <fidl::encoding::Vector<DictionaryItem, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.items),
10004 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
10005 ),
10006 encoder, offset, _depth
10007 )
10008 }
10009 }
10010 unsafe impl<
10011 T0: fidl::encoding::Encode<
10012 fidl::encoding::Vector<DictionaryItem, 128>,
10013 fdomain_client::fidl::FDomainResourceDialect,
10014 >,
10015 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10016 >
10017 fidl::encoding::Encode<
10018 DictionaryDrainIteratorGetNextResponse,
10019 fdomain_client::fidl::FDomainResourceDialect,
10020 > for (T0, T1)
10021 {
10022 #[inline]
10023 unsafe fn encode(
10024 self,
10025 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10026 offset: usize,
10027 depth: fidl::encoding::Depth,
10028 ) -> fidl::Result<()> {
10029 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
10030 self.0.encode(encoder, offset + 0, depth)?;
10034 self.1.encode(encoder, offset + 16, depth)?;
10035 Ok(())
10036 }
10037 }
10038
10039 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10040 for DictionaryDrainIteratorGetNextResponse
10041 {
10042 #[inline(always)]
10043 fn new_empty() -> Self {
10044 Self {
10045 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryItem, 128>, fdomain_client::fidl::FDomainResourceDialect),
10046 end_id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10047 }
10048 }
10049
10050 #[inline]
10051 unsafe fn decode(
10052 &mut self,
10053 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10054 offset: usize,
10055 _depth: fidl::encoding::Depth,
10056 ) -> fidl::Result<()> {
10057 decoder.debug_check_bounds::<Self>(offset);
10058 fidl::decode!(fidl::encoding::Vector<DictionaryItem, 128>, fdomain_client::fidl::FDomainResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
10060 fidl::decode!(
10061 u64,
10062 fdomain_client::fidl::FDomainResourceDialect,
10063 &mut self.end_id,
10064 decoder,
10065 offset + 16,
10066 _depth
10067 )?;
10068 Ok(())
10069 }
10070 }
10071
10072 impl fidl::encoding::ResourceTypeMarker for DictionaryEnumerateIteratorGetNextResponse {
10073 type Borrowed<'a> = &'a mut Self;
10074 fn take_or_borrow<'a>(
10075 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10076 ) -> Self::Borrowed<'a> {
10077 value
10078 }
10079 }
10080
10081 unsafe impl fidl::encoding::TypeMarker for DictionaryEnumerateIteratorGetNextResponse {
10082 type Owned = Self;
10083
10084 #[inline(always)]
10085 fn inline_align(_context: fidl::encoding::Context) -> usize {
10086 8
10087 }
10088
10089 #[inline(always)]
10090 fn inline_size(_context: fidl::encoding::Context) -> usize {
10091 24
10092 }
10093 }
10094
10095 unsafe impl
10096 fidl::encoding::Encode<
10097 DictionaryEnumerateIteratorGetNextResponse,
10098 fdomain_client::fidl::FDomainResourceDialect,
10099 > for &mut DictionaryEnumerateIteratorGetNextResponse
10100 {
10101 #[inline]
10102 unsafe fn encode(
10103 self,
10104 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10105 offset: usize,
10106 _depth: fidl::encoding::Depth,
10107 ) -> fidl::Result<()> {
10108 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
10109 fidl::encoding::Encode::<DictionaryEnumerateIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10111 (
10112 <fidl::encoding::Vector<DictionaryOptionalItem, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.items),
10113 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
10114 ),
10115 encoder, offset, _depth
10116 )
10117 }
10118 }
10119 unsafe impl<
10120 T0: fidl::encoding::Encode<
10121 fidl::encoding::Vector<DictionaryOptionalItem, 128>,
10122 fdomain_client::fidl::FDomainResourceDialect,
10123 >,
10124 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10125 >
10126 fidl::encoding::Encode<
10127 DictionaryEnumerateIteratorGetNextResponse,
10128 fdomain_client::fidl::FDomainResourceDialect,
10129 > for (T0, T1)
10130 {
10131 #[inline]
10132 unsafe fn encode(
10133 self,
10134 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10135 offset: usize,
10136 depth: fidl::encoding::Depth,
10137 ) -> fidl::Result<()> {
10138 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
10139 self.0.encode(encoder, offset + 0, depth)?;
10143 self.1.encode(encoder, offset + 16, depth)?;
10144 Ok(())
10145 }
10146 }
10147
10148 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10149 for DictionaryEnumerateIteratorGetNextResponse
10150 {
10151 #[inline(always)]
10152 fn new_empty() -> Self {
10153 Self {
10154 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fdomain_client::fidl::FDomainResourceDialect),
10155 end_id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10156 }
10157 }
10158
10159 #[inline]
10160 unsafe fn decode(
10161 &mut self,
10162 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10163 offset: usize,
10164 _depth: fidl::encoding::Depth,
10165 ) -> fidl::Result<()> {
10166 decoder.debug_check_bounds::<Self>(offset);
10167 fidl::decode!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fdomain_client::fidl::FDomainResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
10169 fidl::decode!(
10170 u64,
10171 fdomain_client::fidl::FDomainResourceDialect,
10172 &mut self.end_id,
10173 decoder,
10174 offset + 16,
10175 _depth
10176 )?;
10177 Ok(())
10178 }
10179 }
10180
10181 impl fidl::encoding::ResourceTypeMarker for DictionaryKeysIteratorGetNextResponse {
10182 type Borrowed<'a> = &'a mut Self;
10183 fn take_or_borrow<'a>(
10184 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10185 ) -> Self::Borrowed<'a> {
10186 value
10187 }
10188 }
10189
10190 unsafe impl fidl::encoding::TypeMarker for DictionaryKeysIteratorGetNextResponse {
10191 type Owned = Self;
10192
10193 #[inline(always)]
10194 fn inline_align(_context: fidl::encoding::Context) -> usize {
10195 8
10196 }
10197
10198 #[inline(always)]
10199 fn inline_size(_context: fidl::encoding::Context) -> usize {
10200 16
10201 }
10202 }
10203
10204 unsafe impl
10205 fidl::encoding::Encode<
10206 DictionaryKeysIteratorGetNextResponse,
10207 fdomain_client::fidl::FDomainResourceDialect,
10208 > for &mut DictionaryKeysIteratorGetNextResponse
10209 {
10210 #[inline]
10211 unsafe fn encode(
10212 self,
10213 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10214 offset: usize,
10215 _depth: fidl::encoding::Depth,
10216 ) -> fidl::Result<()> {
10217 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
10218 fidl::encoding::Encode::<DictionaryKeysIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10220 (
10221 <fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
10222 ),
10223 encoder, offset, _depth
10224 )
10225 }
10226 }
10227 unsafe impl<
10228 T0: fidl::encoding::Encode<
10229 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10230 fdomain_client::fidl::FDomainResourceDialect,
10231 >,
10232 >
10233 fidl::encoding::Encode<
10234 DictionaryKeysIteratorGetNextResponse,
10235 fdomain_client::fidl::FDomainResourceDialect,
10236 > for (T0,)
10237 {
10238 #[inline]
10239 unsafe fn encode(
10240 self,
10241 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10242 offset: usize,
10243 depth: fidl::encoding::Depth,
10244 ) -> fidl::Result<()> {
10245 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
10246 self.0.encode(encoder, offset + 0, depth)?;
10250 Ok(())
10251 }
10252 }
10253
10254 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10255 for DictionaryKeysIteratorGetNextResponse
10256 {
10257 #[inline(always)]
10258 fn new_empty() -> Self {
10259 Self {
10260 keys: fidl::new_empty!(
10261 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10262 fdomain_client::fidl::FDomainResourceDialect
10263 ),
10264 }
10265 }
10266
10267 #[inline]
10268 unsafe fn decode(
10269 &mut self,
10270 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10271 offset: usize,
10272 _depth: fidl::encoding::Depth,
10273 ) -> fidl::Result<()> {
10274 decoder.debug_check_bounds::<Self>(offset);
10275 fidl::decode!(
10277 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10278 fdomain_client::fidl::FDomainResourceDialect,
10279 &mut self.keys,
10280 decoder,
10281 offset + 0,
10282 _depth
10283 )?;
10284 Ok(())
10285 }
10286 }
10287
10288 impl fidl::encoding::ResourceTypeMarker for DictionaryOptionalItem {
10289 type Borrowed<'a> = &'a mut Self;
10290 fn take_or_borrow<'a>(
10291 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10292 ) -> Self::Borrowed<'a> {
10293 value
10294 }
10295 }
10296
10297 unsafe impl fidl::encoding::TypeMarker for DictionaryOptionalItem {
10298 type Owned = Self;
10299
10300 #[inline(always)]
10301 fn inline_align(_context: fidl::encoding::Context) -> usize {
10302 8
10303 }
10304
10305 #[inline(always)]
10306 fn inline_size(_context: fidl::encoding::Context) -> usize {
10307 24
10308 }
10309 }
10310
10311 unsafe impl
10312 fidl::encoding::Encode<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>
10313 for &mut DictionaryOptionalItem
10314 {
10315 #[inline]
10316 unsafe fn encode(
10317 self,
10318 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10319 offset: usize,
10320 _depth: fidl::encoding::Depth,
10321 ) -> fidl::Result<()> {
10322 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
10323 fidl::encoding::Encode::<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>::encode(
10325 (
10326 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
10327 <fidl::encoding::Boxed<WrappedCapabilityId> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10328 ),
10329 encoder, offset, _depth
10330 )
10331 }
10332 }
10333 unsafe impl<
10334 T0: fidl::encoding::Encode<
10335 fidl::encoding::BoundedString<255>,
10336 fdomain_client::fidl::FDomainResourceDialect,
10337 >,
10338 T1: fidl::encoding::Encode<
10339 fidl::encoding::Boxed<WrappedCapabilityId>,
10340 fdomain_client::fidl::FDomainResourceDialect,
10341 >,
10342 >
10343 fidl::encoding::Encode<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>
10344 for (T0, T1)
10345 {
10346 #[inline]
10347 unsafe fn encode(
10348 self,
10349 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10350 offset: usize,
10351 depth: fidl::encoding::Depth,
10352 ) -> fidl::Result<()> {
10353 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
10354 self.0.encode(encoder, offset + 0, depth)?;
10358 self.1.encode(encoder, offset + 16, depth)?;
10359 Ok(())
10360 }
10361 }
10362
10363 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10364 for DictionaryOptionalItem
10365 {
10366 #[inline(always)]
10367 fn new_empty() -> Self {
10368 Self {
10369 key: fidl::new_empty!(
10370 fidl::encoding::BoundedString<255>,
10371 fdomain_client::fidl::FDomainResourceDialect
10372 ),
10373 value: fidl::new_empty!(
10374 fidl::encoding::Boxed<WrappedCapabilityId>,
10375 fdomain_client::fidl::FDomainResourceDialect
10376 ),
10377 }
10378 }
10379
10380 #[inline]
10381 unsafe fn decode(
10382 &mut self,
10383 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10384 offset: usize,
10385 _depth: fidl::encoding::Depth,
10386 ) -> fidl::Result<()> {
10387 decoder.debug_check_bounds::<Self>(offset);
10388 fidl::decode!(
10390 fidl::encoding::BoundedString<255>,
10391 fdomain_client::fidl::FDomainResourceDialect,
10392 &mut self.key,
10393 decoder,
10394 offset + 0,
10395 _depth
10396 )?;
10397 fidl::decode!(
10398 fidl::encoding::Boxed<WrappedCapabilityId>,
10399 fdomain_client::fidl::FDomainResourceDialect,
10400 &mut self.value,
10401 decoder,
10402 offset + 16,
10403 _depth
10404 )?;
10405 Ok(())
10406 }
10407 }
10408
10409 impl fidl::encoding::ResourceTypeMarker for DictionaryRef {
10410 type Borrowed<'a> = &'a mut Self;
10411 fn take_or_borrow<'a>(
10412 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10413 ) -> Self::Borrowed<'a> {
10414 value
10415 }
10416 }
10417
10418 unsafe impl fidl::encoding::TypeMarker for DictionaryRef {
10419 type Owned = Self;
10420
10421 #[inline(always)]
10422 fn inline_align(_context: fidl::encoding::Context) -> usize {
10423 4
10424 }
10425
10426 #[inline(always)]
10427 fn inline_size(_context: fidl::encoding::Context) -> usize {
10428 4
10429 }
10430 }
10431
10432 unsafe impl fidl::encoding::Encode<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>
10433 for &mut DictionaryRef
10434 {
10435 #[inline]
10436 unsafe fn encode(
10437 self,
10438 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10439 offset: usize,
10440 _depth: fidl::encoding::Depth,
10441 ) -> fidl::Result<()> {
10442 encoder.debug_check_bounds::<DictionaryRef>(offset);
10443 fidl::encoding::Encode::<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>::encode(
10445 (
10446 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10447 ),
10448 encoder, offset, _depth
10449 )
10450 }
10451 }
10452 unsafe impl<
10453 T0: fidl::encoding::Encode<
10454 fidl::encoding::HandleType<
10455 fdomain_client::EventPair,
10456 { fidl::ObjectType::EVENTPAIR.into_raw() },
10457 2147483648,
10458 >,
10459 fdomain_client::fidl::FDomainResourceDialect,
10460 >,
10461 > fidl::encoding::Encode<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10462 {
10463 #[inline]
10464 unsafe fn encode(
10465 self,
10466 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10467 offset: usize,
10468 depth: fidl::encoding::Depth,
10469 ) -> fidl::Result<()> {
10470 encoder.debug_check_bounds::<DictionaryRef>(offset);
10471 self.0.encode(encoder, offset + 0, depth)?;
10475 Ok(())
10476 }
10477 }
10478
10479 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DictionaryRef {
10480 #[inline(always)]
10481 fn new_empty() -> Self {
10482 Self {
10483 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10484 }
10485 }
10486
10487 #[inline]
10488 unsafe fn decode(
10489 &mut self,
10490 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10491 offset: usize,
10492 _depth: fidl::encoding::Depth,
10493 ) -> fidl::Result<()> {
10494 decoder.debug_check_bounds::<Self>(offset);
10495 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
10497 Ok(())
10498 }
10499 }
10500
10501 impl fidl::encoding::ResourceTypeMarker for DirConnector {
10502 type Borrowed<'a> = &'a mut Self;
10503 fn take_or_borrow<'a>(
10504 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10505 ) -> Self::Borrowed<'a> {
10506 value
10507 }
10508 }
10509
10510 unsafe impl fidl::encoding::TypeMarker for DirConnector {
10511 type Owned = Self;
10512
10513 #[inline(always)]
10514 fn inline_align(_context: fidl::encoding::Context) -> usize {
10515 4
10516 }
10517
10518 #[inline(always)]
10519 fn inline_size(_context: fidl::encoding::Context) -> usize {
10520 4
10521 }
10522 }
10523
10524 unsafe impl fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect>
10525 for &mut DirConnector
10526 {
10527 #[inline]
10528 unsafe fn encode(
10529 self,
10530 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10531 offset: usize,
10532 _depth: fidl::encoding::Depth,
10533 ) -> fidl::Result<()> {
10534 encoder.debug_check_bounds::<DirConnector>(offset);
10535 fidl::encoding::Encode::<DirConnector, fdomain_client::fidl::FDomainResourceDialect>::encode(
10537 (
10538 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10539 ),
10540 encoder, offset, _depth
10541 )
10542 }
10543 }
10544 unsafe impl<
10545 T0: fidl::encoding::Encode<
10546 fidl::encoding::HandleType<
10547 fdomain_client::EventPair,
10548 { fidl::ObjectType::EVENTPAIR.into_raw() },
10549 2147483648,
10550 >,
10551 fdomain_client::fidl::FDomainResourceDialect,
10552 >,
10553 > fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10554 {
10555 #[inline]
10556 unsafe fn encode(
10557 self,
10558 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10559 offset: usize,
10560 depth: fidl::encoding::Depth,
10561 ) -> fidl::Result<()> {
10562 encoder.debug_check_bounds::<DirConnector>(offset);
10563 self.0.encode(encoder, offset + 0, depth)?;
10567 Ok(())
10568 }
10569 }
10570
10571 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DirConnector {
10572 #[inline(always)]
10573 fn new_empty() -> Self {
10574 Self {
10575 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10576 }
10577 }
10578
10579 #[inline]
10580 unsafe fn decode(
10581 &mut self,
10582 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10583 offset: usize,
10584 _depth: fidl::encoding::Depth,
10585 ) -> fidl::Result<()> {
10586 decoder.debug_check_bounds::<Self>(offset);
10587 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
10589 Ok(())
10590 }
10591 }
10592
10593 impl fidl::encoding::ResourceTypeMarker for DirEntry {
10594 type Borrowed<'a> = &'a mut Self;
10595 fn take_or_borrow<'a>(
10596 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10597 ) -> Self::Borrowed<'a> {
10598 value
10599 }
10600 }
10601
10602 unsafe impl fidl::encoding::TypeMarker for DirEntry {
10603 type Owned = Self;
10604
10605 #[inline(always)]
10606 fn inline_align(_context: fidl::encoding::Context) -> usize {
10607 4
10608 }
10609
10610 #[inline(always)]
10611 fn inline_size(_context: fidl::encoding::Context) -> usize {
10612 4
10613 }
10614 }
10615
10616 unsafe impl fidl::encoding::Encode<DirEntry, fdomain_client::fidl::FDomainResourceDialect>
10617 for &mut DirEntry
10618 {
10619 #[inline]
10620 unsafe fn encode(
10621 self,
10622 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10623 offset: usize,
10624 _depth: fidl::encoding::Depth,
10625 ) -> fidl::Result<()> {
10626 encoder.debug_check_bounds::<DirEntry>(offset);
10627 fidl::encoding::Encode::<DirEntry, fdomain_client::fidl::FDomainResourceDialect>::encode(
10629 (<fidl::encoding::HandleType<
10630 fdomain_client::EventPair,
10631 { fidl::ObjectType::EVENTPAIR.into_raw() },
10632 2147483648,
10633 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10634 &mut self.token
10635 ),),
10636 encoder,
10637 offset,
10638 _depth,
10639 )
10640 }
10641 }
10642 unsafe impl<
10643 T0: fidl::encoding::Encode<
10644 fidl::encoding::HandleType<
10645 fdomain_client::EventPair,
10646 { fidl::ObjectType::EVENTPAIR.into_raw() },
10647 2147483648,
10648 >,
10649 fdomain_client::fidl::FDomainResourceDialect,
10650 >,
10651 > fidl::encoding::Encode<DirEntry, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10652 {
10653 #[inline]
10654 unsafe fn encode(
10655 self,
10656 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10657 offset: usize,
10658 depth: fidl::encoding::Depth,
10659 ) -> fidl::Result<()> {
10660 encoder.debug_check_bounds::<DirEntry>(offset);
10661 self.0.encode(encoder, offset + 0, depth)?;
10665 Ok(())
10666 }
10667 }
10668
10669 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DirEntry {
10670 #[inline(always)]
10671 fn new_empty() -> Self {
10672 Self {
10673 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10674 }
10675 }
10676
10677 #[inline]
10678 unsafe fn decode(
10679 &mut self,
10680 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10681 offset: usize,
10682 _depth: fidl::encoding::Depth,
10683 ) -> fidl::Result<()> {
10684 decoder.debug_check_bounds::<Self>(offset);
10685 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
10687 Ok(())
10688 }
10689 }
10690
10691 impl fidl::encoding::ResourceTypeMarker for InstanceToken {
10692 type Borrowed<'a> = &'a mut Self;
10693 fn take_or_borrow<'a>(
10694 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10695 ) -> Self::Borrowed<'a> {
10696 value
10697 }
10698 }
10699
10700 unsafe impl fidl::encoding::TypeMarker for InstanceToken {
10701 type Owned = Self;
10702
10703 #[inline(always)]
10704 fn inline_align(_context: fidl::encoding::Context) -> usize {
10705 4
10706 }
10707
10708 #[inline(always)]
10709 fn inline_size(_context: fidl::encoding::Context) -> usize {
10710 4
10711 }
10712 }
10713
10714 unsafe impl fidl::encoding::Encode<InstanceToken, fdomain_client::fidl::FDomainResourceDialect>
10715 for &mut InstanceToken
10716 {
10717 #[inline]
10718 unsafe fn encode(
10719 self,
10720 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10721 offset: usize,
10722 _depth: fidl::encoding::Depth,
10723 ) -> fidl::Result<()> {
10724 encoder.debug_check_bounds::<InstanceToken>(offset);
10725 fidl::encoding::Encode::<InstanceToken, fdomain_client::fidl::FDomainResourceDialect>::encode(
10727 (
10728 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10729 ),
10730 encoder, offset, _depth
10731 )
10732 }
10733 }
10734 unsafe impl<
10735 T0: fidl::encoding::Encode<
10736 fidl::encoding::HandleType<
10737 fdomain_client::EventPair,
10738 { fidl::ObjectType::EVENTPAIR.into_raw() },
10739 2147483648,
10740 >,
10741 fdomain_client::fidl::FDomainResourceDialect,
10742 >,
10743 > fidl::encoding::Encode<InstanceToken, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10744 {
10745 #[inline]
10746 unsafe fn encode(
10747 self,
10748 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10749 offset: usize,
10750 depth: fidl::encoding::Depth,
10751 ) -> fidl::Result<()> {
10752 encoder.debug_check_bounds::<InstanceToken>(offset);
10753 self.0.encode(encoder, offset + 0, depth)?;
10757 Ok(())
10758 }
10759 }
10760
10761 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for InstanceToken {
10762 #[inline(always)]
10763 fn new_empty() -> Self {
10764 Self {
10765 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10766 }
10767 }
10768
10769 #[inline]
10770 unsafe fn decode(
10771 &mut self,
10772 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10773 offset: usize,
10774 _depth: fidl::encoding::Depth,
10775 ) -> fidl::Result<()> {
10776 decoder.debug_check_bounds::<Self>(offset);
10777 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
10779 Ok(())
10780 }
10781 }
10782
10783 impl fidl::encoding::ResourceTypeMarker for ProtocolPayload {
10784 type Borrowed<'a> = &'a mut Self;
10785 fn take_or_borrow<'a>(
10786 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10787 ) -> Self::Borrowed<'a> {
10788 value
10789 }
10790 }
10791
10792 unsafe impl fidl::encoding::TypeMarker for ProtocolPayload {
10793 type Owned = Self;
10794
10795 #[inline(always)]
10796 fn inline_align(_context: fidl::encoding::Context) -> usize {
10797 4
10798 }
10799
10800 #[inline(always)]
10801 fn inline_size(_context: fidl::encoding::Context) -> usize {
10802 4
10803 }
10804 }
10805
10806 unsafe impl
10807 fidl::encoding::Encode<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>
10808 for &mut ProtocolPayload
10809 {
10810 #[inline]
10811 unsafe fn encode(
10812 self,
10813 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10814 offset: usize,
10815 _depth: fidl::encoding::Depth,
10816 ) -> fidl::Result<()> {
10817 encoder.debug_check_bounds::<ProtocolPayload>(offset);
10818 fidl::encoding::Encode::<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>::encode(
10820 (
10821 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.channel),
10822 ),
10823 encoder, offset, _depth
10824 )
10825 }
10826 }
10827 unsafe impl<
10828 T0: fidl::encoding::Encode<
10829 fidl::encoding::HandleType<
10830 fdomain_client::Channel,
10831 { fidl::ObjectType::CHANNEL.into_raw() },
10832 2147483648,
10833 >,
10834 fdomain_client::fidl::FDomainResourceDialect,
10835 >,
10836 > fidl::encoding::Encode<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>
10837 for (T0,)
10838 {
10839 #[inline]
10840 unsafe fn encode(
10841 self,
10842 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10843 offset: usize,
10844 depth: fidl::encoding::Depth,
10845 ) -> fidl::Result<()> {
10846 encoder.debug_check_bounds::<ProtocolPayload>(offset);
10847 self.0.encode(encoder, offset + 0, depth)?;
10851 Ok(())
10852 }
10853 }
10854
10855 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10856 for ProtocolPayload
10857 {
10858 #[inline(always)]
10859 fn new_empty() -> Self {
10860 Self {
10861 channel: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10862 }
10863 }
10864
10865 #[inline]
10866 unsafe fn decode(
10867 &mut self,
10868 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10869 offset: usize,
10870 _depth: fidl::encoding::Depth,
10871 ) -> fidl::Result<()> {
10872 decoder.debug_check_bounds::<Self>(offset);
10873 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.channel, decoder, offset + 0, _depth)?;
10875 Ok(())
10876 }
10877 }
10878
10879 impl CapabilityStoreDirConnectorOpenRequest {
10880 #[inline(always)]
10881 fn max_ordinal_present(&self) -> u64 {
10882 if let Some(_) = self.path {
10883 return 4;
10884 }
10885 if let Some(_) = self.flags {
10886 return 3;
10887 }
10888 if let Some(_) = self.server_end {
10889 return 2;
10890 }
10891 if let Some(_) = self.id {
10892 return 1;
10893 }
10894 0
10895 }
10896 }
10897
10898 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorOpenRequest {
10899 type Borrowed<'a> = &'a mut Self;
10900 fn take_or_borrow<'a>(
10901 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10902 ) -> Self::Borrowed<'a> {
10903 value
10904 }
10905 }
10906
10907 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorOpenRequest {
10908 type Owned = Self;
10909
10910 #[inline(always)]
10911 fn inline_align(_context: fidl::encoding::Context) -> usize {
10912 8
10913 }
10914
10915 #[inline(always)]
10916 fn inline_size(_context: fidl::encoding::Context) -> usize {
10917 16
10918 }
10919 }
10920
10921 unsafe impl
10922 fidl::encoding::Encode<
10923 CapabilityStoreDirConnectorOpenRequest,
10924 fdomain_client::fidl::FDomainResourceDialect,
10925 > for &mut CapabilityStoreDirConnectorOpenRequest
10926 {
10927 unsafe fn encode(
10928 self,
10929 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10930 offset: usize,
10931 mut depth: fidl::encoding::Depth,
10932 ) -> fidl::Result<()> {
10933 encoder.debug_check_bounds::<CapabilityStoreDirConnectorOpenRequest>(offset);
10934 let max_ordinal: u64 = self.max_ordinal_present();
10936 encoder.write_num(max_ordinal, offset);
10937 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10938 if max_ordinal == 0 {
10940 return Ok(());
10941 }
10942 depth.increment()?;
10943 let envelope_size = 8;
10944 let bytes_len = max_ordinal as usize * envelope_size;
10945 #[allow(unused_variables)]
10946 let offset = encoder.out_of_line_offset(bytes_len);
10947 let mut _prev_end_offset: usize = 0;
10948 if 1 > max_ordinal {
10949 return Ok(());
10950 }
10951
10952 let cur_offset: usize = (1 - 1) * envelope_size;
10955
10956 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10958
10959 fidl::encoding::encode_in_envelope_optional::<
10964 u64,
10965 fdomain_client::fidl::FDomainResourceDialect,
10966 >(
10967 self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
10968 encoder,
10969 offset + cur_offset,
10970 depth,
10971 )?;
10972
10973 _prev_end_offset = cur_offset + envelope_size;
10974 if 2 > max_ordinal {
10975 return Ok(());
10976 }
10977
10978 let cur_offset: usize = (2 - 1) * envelope_size;
10981
10982 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10984
10985 fidl::encoding::encode_in_envelope_optional::<
10990 fidl::encoding::Endpoint<
10991 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
10992 >,
10993 fdomain_client::fidl::FDomainResourceDialect,
10994 >(
10995 self.server_end.as_mut().map(
10996 <fidl::encoding::Endpoint<
10997 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
10998 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10999 ),
11000 encoder,
11001 offset + cur_offset,
11002 depth,
11003 )?;
11004
11005 _prev_end_offset = cur_offset + envelope_size;
11006 if 3 > max_ordinal {
11007 return Ok(());
11008 }
11009
11010 let cur_offset: usize = (3 - 1) * envelope_size;
11013
11014 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11016
11017 fidl::encoding::encode_in_envelope_optional::<
11022 fdomain_fuchsia_io::Flags,
11023 fdomain_client::fidl::FDomainResourceDialect,
11024 >(
11025 self.flags
11026 .as_ref()
11027 .map(<fdomain_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
11028 encoder,
11029 offset + cur_offset,
11030 depth,
11031 )?;
11032
11033 _prev_end_offset = cur_offset + envelope_size;
11034 if 4 > max_ordinal {
11035 return Ok(());
11036 }
11037
11038 let cur_offset: usize = (4 - 1) * envelope_size;
11041
11042 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11044
11045 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
11050 self.path.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
11051 encoder, offset + cur_offset, depth
11052 )?;
11053
11054 _prev_end_offset = cur_offset + envelope_size;
11055
11056 Ok(())
11057 }
11058 }
11059
11060 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11061 for CapabilityStoreDirConnectorOpenRequest
11062 {
11063 #[inline(always)]
11064 fn new_empty() -> Self {
11065 Self::default()
11066 }
11067
11068 unsafe fn decode(
11069 &mut self,
11070 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11071 offset: usize,
11072 mut depth: fidl::encoding::Depth,
11073 ) -> fidl::Result<()> {
11074 decoder.debug_check_bounds::<Self>(offset);
11075 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11076 None => return Err(fidl::Error::NotNullable),
11077 Some(len) => len,
11078 };
11079 if len == 0 {
11081 return Ok(());
11082 };
11083 depth.increment()?;
11084 let envelope_size = 8;
11085 let bytes_len = len * envelope_size;
11086 let offset = decoder.out_of_line_offset(bytes_len)?;
11087 let mut _next_ordinal_to_read = 0;
11089 let mut next_offset = offset;
11090 let end_offset = offset + bytes_len;
11091 _next_ordinal_to_read += 1;
11092 if next_offset >= end_offset {
11093 return Ok(());
11094 }
11095
11096 while _next_ordinal_to_read < 1 {
11098 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11099 _next_ordinal_to_read += 1;
11100 next_offset += envelope_size;
11101 }
11102
11103 let next_out_of_line = decoder.next_out_of_line();
11104 let handles_before = decoder.remaining_handles();
11105 if let Some((inlined, num_bytes, num_handles)) =
11106 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11107 {
11108 let member_inline_size =
11109 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11110 if inlined != (member_inline_size <= 4) {
11111 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11112 }
11113 let inner_offset;
11114 let mut inner_depth = depth.clone();
11115 if inlined {
11116 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11117 inner_offset = next_offset;
11118 } else {
11119 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11120 inner_depth.increment()?;
11121 }
11122 let val_ref = self.id.get_or_insert_with(|| {
11123 fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect)
11124 });
11125 fidl::decode!(
11126 u64,
11127 fdomain_client::fidl::FDomainResourceDialect,
11128 val_ref,
11129 decoder,
11130 inner_offset,
11131 inner_depth
11132 )?;
11133 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11134 {
11135 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11136 }
11137 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11138 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11139 }
11140 }
11141
11142 next_offset += envelope_size;
11143 _next_ordinal_to_read += 1;
11144 if next_offset >= end_offset {
11145 return Ok(());
11146 }
11147
11148 while _next_ordinal_to_read < 2 {
11150 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11151 _next_ordinal_to_read += 1;
11152 next_offset += envelope_size;
11153 }
11154
11155 let next_out_of_line = decoder.next_out_of_line();
11156 let handles_before = decoder.remaining_handles();
11157 if let Some((inlined, num_bytes, num_handles)) =
11158 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11159 {
11160 let member_inline_size = <fidl::encoding::Endpoint<
11161 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11162 > as fidl::encoding::TypeMarker>::inline_size(
11163 decoder.context
11164 );
11165 if inlined != (member_inline_size <= 4) {
11166 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11167 }
11168 let inner_offset;
11169 let mut inner_depth = depth.clone();
11170 if inlined {
11171 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11172 inner_offset = next_offset;
11173 } else {
11174 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11175 inner_depth.increment()?;
11176 }
11177 let val_ref = self.server_end.get_or_insert_with(|| {
11178 fidl::new_empty!(
11179 fidl::encoding::Endpoint<
11180 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11181 >,
11182 fdomain_client::fidl::FDomainResourceDialect
11183 )
11184 });
11185 fidl::decode!(
11186 fidl::encoding::Endpoint<
11187 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11188 >,
11189 fdomain_client::fidl::FDomainResourceDialect,
11190 val_ref,
11191 decoder,
11192 inner_offset,
11193 inner_depth
11194 )?;
11195 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11196 {
11197 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11198 }
11199 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11200 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11201 }
11202 }
11203
11204 next_offset += envelope_size;
11205 _next_ordinal_to_read += 1;
11206 if next_offset >= end_offset {
11207 return Ok(());
11208 }
11209
11210 while _next_ordinal_to_read < 3 {
11212 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11213 _next_ordinal_to_read += 1;
11214 next_offset += envelope_size;
11215 }
11216
11217 let next_out_of_line = decoder.next_out_of_line();
11218 let handles_before = decoder.remaining_handles();
11219 if let Some((inlined, num_bytes, num_handles)) =
11220 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11221 {
11222 let member_inline_size =
11223 <fdomain_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
11224 decoder.context,
11225 );
11226 if inlined != (member_inline_size <= 4) {
11227 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11228 }
11229 let inner_offset;
11230 let mut inner_depth = depth.clone();
11231 if inlined {
11232 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11233 inner_offset = next_offset;
11234 } else {
11235 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11236 inner_depth.increment()?;
11237 }
11238 let val_ref = self.flags.get_or_insert_with(|| {
11239 fidl::new_empty!(
11240 fdomain_fuchsia_io::Flags,
11241 fdomain_client::fidl::FDomainResourceDialect
11242 )
11243 });
11244 fidl::decode!(
11245 fdomain_fuchsia_io::Flags,
11246 fdomain_client::fidl::FDomainResourceDialect,
11247 val_ref,
11248 decoder,
11249 inner_offset,
11250 inner_depth
11251 )?;
11252 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11253 {
11254 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11255 }
11256 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11257 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11258 }
11259 }
11260
11261 next_offset += envelope_size;
11262 _next_ordinal_to_read += 1;
11263 if next_offset >= end_offset {
11264 return Ok(());
11265 }
11266
11267 while _next_ordinal_to_read < 4 {
11269 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11270 _next_ordinal_to_read += 1;
11271 next_offset += envelope_size;
11272 }
11273
11274 let next_out_of_line = decoder.next_out_of_line();
11275 let handles_before = decoder.remaining_handles();
11276 if let Some((inlined, num_bytes, num_handles)) =
11277 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11278 {
11279 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11280 if inlined != (member_inline_size <= 4) {
11281 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11282 }
11283 let inner_offset;
11284 let mut inner_depth = depth.clone();
11285 if inlined {
11286 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11287 inner_offset = next_offset;
11288 } else {
11289 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11290 inner_depth.increment()?;
11291 }
11292 let val_ref = self.path.get_or_insert_with(|| {
11293 fidl::new_empty!(
11294 fidl::encoding::BoundedString<4095>,
11295 fdomain_client::fidl::FDomainResourceDialect
11296 )
11297 });
11298 fidl::decode!(
11299 fidl::encoding::BoundedString<4095>,
11300 fdomain_client::fidl::FDomainResourceDialect,
11301 val_ref,
11302 decoder,
11303 inner_offset,
11304 inner_depth
11305 )?;
11306 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11307 {
11308 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11309 }
11310 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11311 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11312 }
11313 }
11314
11315 next_offset += envelope_size;
11316
11317 while next_offset < end_offset {
11319 _next_ordinal_to_read += 1;
11320 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11321 next_offset += envelope_size;
11322 }
11323
11324 Ok(())
11325 }
11326 }
11327
11328 impl DirReceiverReceiveRequest {
11329 #[inline(always)]
11330 fn max_ordinal_present(&self) -> u64 {
11331 if let Some(_) = self.subdir {
11332 return 3;
11333 }
11334 if let Some(_) = self.flags {
11335 return 2;
11336 }
11337 if let Some(_) = self.channel {
11338 return 1;
11339 }
11340 0
11341 }
11342 }
11343
11344 impl fidl::encoding::ResourceTypeMarker for DirReceiverReceiveRequest {
11345 type Borrowed<'a> = &'a mut Self;
11346 fn take_or_borrow<'a>(
11347 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11348 ) -> Self::Borrowed<'a> {
11349 value
11350 }
11351 }
11352
11353 unsafe impl fidl::encoding::TypeMarker for DirReceiverReceiveRequest {
11354 type Owned = Self;
11355
11356 #[inline(always)]
11357 fn inline_align(_context: fidl::encoding::Context) -> usize {
11358 8
11359 }
11360
11361 #[inline(always)]
11362 fn inline_size(_context: fidl::encoding::Context) -> usize {
11363 16
11364 }
11365 }
11366
11367 unsafe impl
11368 fidl::encoding::Encode<
11369 DirReceiverReceiveRequest,
11370 fdomain_client::fidl::FDomainResourceDialect,
11371 > for &mut DirReceiverReceiveRequest
11372 {
11373 unsafe fn encode(
11374 self,
11375 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11376 offset: usize,
11377 mut depth: fidl::encoding::Depth,
11378 ) -> fidl::Result<()> {
11379 encoder.debug_check_bounds::<DirReceiverReceiveRequest>(offset);
11380 let max_ordinal: u64 = self.max_ordinal_present();
11382 encoder.write_num(max_ordinal, offset);
11383 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11384 if max_ordinal == 0 {
11386 return Ok(());
11387 }
11388 depth.increment()?;
11389 let envelope_size = 8;
11390 let bytes_len = max_ordinal as usize * envelope_size;
11391 #[allow(unused_variables)]
11392 let offset = encoder.out_of_line_offset(bytes_len);
11393 let mut _prev_end_offset: usize = 0;
11394 if 1 > max_ordinal {
11395 return Ok(());
11396 }
11397
11398 let cur_offset: usize = (1 - 1) * envelope_size;
11401
11402 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11404
11405 fidl::encoding::encode_in_envelope_optional::<
11410 fidl::encoding::HandleType<
11411 fdomain_client::Channel,
11412 { fidl::ObjectType::CHANNEL.into_raw() },
11413 2147483648,
11414 >,
11415 fdomain_client::fidl::FDomainResourceDialect,
11416 >(
11417 self.channel.as_mut().map(
11418 <fidl::encoding::HandleType<
11419 fdomain_client::Channel,
11420 { fidl::ObjectType::CHANNEL.into_raw() },
11421 2147483648,
11422 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11423 ),
11424 encoder,
11425 offset + cur_offset,
11426 depth,
11427 )?;
11428
11429 _prev_end_offset = cur_offset + envelope_size;
11430 if 2 > max_ordinal {
11431 return Ok(());
11432 }
11433
11434 let cur_offset: usize = (2 - 1) * envelope_size;
11437
11438 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11440
11441 fidl::encoding::encode_in_envelope_optional::<
11446 fdomain_fuchsia_io::Flags,
11447 fdomain_client::fidl::FDomainResourceDialect,
11448 >(
11449 self.flags
11450 .as_ref()
11451 .map(<fdomain_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
11452 encoder,
11453 offset + cur_offset,
11454 depth,
11455 )?;
11456
11457 _prev_end_offset = cur_offset + envelope_size;
11458 if 3 > max_ordinal {
11459 return Ok(());
11460 }
11461
11462 let cur_offset: usize = (3 - 1) * envelope_size;
11465
11466 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11468
11469 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
11474 self.subdir.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
11475 encoder, offset + cur_offset, depth
11476 )?;
11477
11478 _prev_end_offset = cur_offset + envelope_size;
11479
11480 Ok(())
11481 }
11482 }
11483
11484 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11485 for DirReceiverReceiveRequest
11486 {
11487 #[inline(always)]
11488 fn new_empty() -> Self {
11489 Self::default()
11490 }
11491
11492 unsafe fn decode(
11493 &mut self,
11494 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11495 offset: usize,
11496 mut depth: fidl::encoding::Depth,
11497 ) -> fidl::Result<()> {
11498 decoder.debug_check_bounds::<Self>(offset);
11499 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11500 None => return Err(fidl::Error::NotNullable),
11501 Some(len) => len,
11502 };
11503 if len == 0 {
11505 return Ok(());
11506 };
11507 depth.increment()?;
11508 let envelope_size = 8;
11509 let bytes_len = len * envelope_size;
11510 let offset = decoder.out_of_line_offset(bytes_len)?;
11511 let mut _next_ordinal_to_read = 0;
11513 let mut next_offset = offset;
11514 let end_offset = offset + bytes_len;
11515 _next_ordinal_to_read += 1;
11516 if next_offset >= end_offset {
11517 return Ok(());
11518 }
11519
11520 while _next_ordinal_to_read < 1 {
11522 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11523 _next_ordinal_to_read += 1;
11524 next_offset += envelope_size;
11525 }
11526
11527 let next_out_of_line = decoder.next_out_of_line();
11528 let handles_before = decoder.remaining_handles();
11529 if let Some((inlined, num_bytes, num_handles)) =
11530 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11531 {
11532 let member_inline_size = <fidl::encoding::HandleType<
11533 fdomain_client::Channel,
11534 { fidl::ObjectType::CHANNEL.into_raw() },
11535 2147483648,
11536 > as fidl::encoding::TypeMarker>::inline_size(
11537 decoder.context
11538 );
11539 if inlined != (member_inline_size <= 4) {
11540 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11541 }
11542 let inner_offset;
11543 let mut inner_depth = depth.clone();
11544 if inlined {
11545 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11546 inner_offset = next_offset;
11547 } else {
11548 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11549 inner_depth.increment()?;
11550 }
11551 let val_ref =
11552 self.channel.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
11553 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11554 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11555 {
11556 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11557 }
11558 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11559 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11560 }
11561 }
11562
11563 next_offset += envelope_size;
11564 _next_ordinal_to_read += 1;
11565 if next_offset >= end_offset {
11566 return Ok(());
11567 }
11568
11569 while _next_ordinal_to_read < 2 {
11571 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11572 _next_ordinal_to_read += 1;
11573 next_offset += envelope_size;
11574 }
11575
11576 let next_out_of_line = decoder.next_out_of_line();
11577 let handles_before = decoder.remaining_handles();
11578 if let Some((inlined, num_bytes, num_handles)) =
11579 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11580 {
11581 let member_inline_size =
11582 <fdomain_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
11583 decoder.context,
11584 );
11585 if inlined != (member_inline_size <= 4) {
11586 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11587 }
11588 let inner_offset;
11589 let mut inner_depth = depth.clone();
11590 if inlined {
11591 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11592 inner_offset = next_offset;
11593 } else {
11594 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11595 inner_depth.increment()?;
11596 }
11597 let val_ref = self.flags.get_or_insert_with(|| {
11598 fidl::new_empty!(
11599 fdomain_fuchsia_io::Flags,
11600 fdomain_client::fidl::FDomainResourceDialect
11601 )
11602 });
11603 fidl::decode!(
11604 fdomain_fuchsia_io::Flags,
11605 fdomain_client::fidl::FDomainResourceDialect,
11606 val_ref,
11607 decoder,
11608 inner_offset,
11609 inner_depth
11610 )?;
11611 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11612 {
11613 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11614 }
11615 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11616 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11617 }
11618 }
11619
11620 next_offset += envelope_size;
11621 _next_ordinal_to_read += 1;
11622 if next_offset >= end_offset {
11623 return Ok(());
11624 }
11625
11626 while _next_ordinal_to_read < 3 {
11628 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11629 _next_ordinal_to_read += 1;
11630 next_offset += envelope_size;
11631 }
11632
11633 let next_out_of_line = decoder.next_out_of_line();
11634 let handles_before = decoder.remaining_handles();
11635 if let Some((inlined, num_bytes, num_handles)) =
11636 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11637 {
11638 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11639 if inlined != (member_inline_size <= 4) {
11640 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11641 }
11642 let inner_offset;
11643 let mut inner_depth = depth.clone();
11644 if inlined {
11645 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11646 inner_offset = next_offset;
11647 } else {
11648 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11649 inner_depth.increment()?;
11650 }
11651 let val_ref = self.subdir.get_or_insert_with(|| {
11652 fidl::new_empty!(
11653 fidl::encoding::BoundedString<4095>,
11654 fdomain_client::fidl::FDomainResourceDialect
11655 )
11656 });
11657 fidl::decode!(
11658 fidl::encoding::BoundedString<4095>,
11659 fdomain_client::fidl::FDomainResourceDialect,
11660 val_ref,
11661 decoder,
11662 inner_offset,
11663 inner_depth
11664 )?;
11665 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11666 {
11667 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11668 }
11669 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11670 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11671 }
11672 }
11673
11674 next_offset += envelope_size;
11675
11676 while next_offset < end_offset {
11678 _next_ordinal_to_read += 1;
11679 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11680 next_offset += envelope_size;
11681 }
11682
11683 Ok(())
11684 }
11685 }
11686
11687 impl RouteRequest {
11688 #[inline(always)]
11689 fn max_ordinal_present(&self) -> u64 {
11690 if let Some(_) = self.metadata {
11691 return 2;
11692 }
11693 if let Some(_) = self.requesting {
11694 return 1;
11695 }
11696 0
11697 }
11698 }
11699
11700 impl fidl::encoding::ResourceTypeMarker for RouteRequest {
11701 type Borrowed<'a> = &'a mut Self;
11702 fn take_or_borrow<'a>(
11703 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11704 ) -> Self::Borrowed<'a> {
11705 value
11706 }
11707 }
11708
11709 unsafe impl fidl::encoding::TypeMarker for RouteRequest {
11710 type Owned = Self;
11711
11712 #[inline(always)]
11713 fn inline_align(_context: fidl::encoding::Context) -> usize {
11714 8
11715 }
11716
11717 #[inline(always)]
11718 fn inline_size(_context: fidl::encoding::Context) -> usize {
11719 16
11720 }
11721 }
11722
11723 unsafe impl fidl::encoding::Encode<RouteRequest, fdomain_client::fidl::FDomainResourceDialect>
11724 for &mut RouteRequest
11725 {
11726 unsafe fn encode(
11727 self,
11728 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11729 offset: usize,
11730 mut depth: fidl::encoding::Depth,
11731 ) -> fidl::Result<()> {
11732 encoder.debug_check_bounds::<RouteRequest>(offset);
11733 let max_ordinal: u64 = self.max_ordinal_present();
11735 encoder.write_num(max_ordinal, offset);
11736 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11737 if max_ordinal == 0 {
11739 return Ok(());
11740 }
11741 depth.increment()?;
11742 let envelope_size = 8;
11743 let bytes_len = max_ordinal as usize * envelope_size;
11744 #[allow(unused_variables)]
11745 let offset = encoder.out_of_line_offset(bytes_len);
11746 let mut _prev_end_offset: usize = 0;
11747 if 1 > max_ordinal {
11748 return Ok(());
11749 }
11750
11751 let cur_offset: usize = (1 - 1) * envelope_size;
11754
11755 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11757
11758 fidl::encoding::encode_in_envelope_optional::<
11763 InstanceToken,
11764 fdomain_client::fidl::FDomainResourceDialect,
11765 >(
11766 self.requesting
11767 .as_mut()
11768 .map(<InstanceToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11769 encoder,
11770 offset + cur_offset,
11771 depth,
11772 )?;
11773
11774 _prev_end_offset = cur_offset + envelope_size;
11775 if 2 > max_ordinal {
11776 return Ok(());
11777 }
11778
11779 let cur_offset: usize = (2 - 1) * envelope_size;
11782
11783 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11785
11786 fidl::encoding::encode_in_envelope_optional::<
11791 DictionaryRef,
11792 fdomain_client::fidl::FDomainResourceDialect,
11793 >(
11794 self.metadata
11795 .as_mut()
11796 .map(<DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11797 encoder,
11798 offset + cur_offset,
11799 depth,
11800 )?;
11801
11802 _prev_end_offset = cur_offset + envelope_size;
11803
11804 Ok(())
11805 }
11806 }
11807
11808 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for RouteRequest {
11809 #[inline(always)]
11810 fn new_empty() -> Self {
11811 Self::default()
11812 }
11813
11814 unsafe fn decode(
11815 &mut self,
11816 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11817 offset: usize,
11818 mut depth: fidl::encoding::Depth,
11819 ) -> fidl::Result<()> {
11820 decoder.debug_check_bounds::<Self>(offset);
11821 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11822 None => return Err(fidl::Error::NotNullable),
11823 Some(len) => len,
11824 };
11825 if len == 0 {
11827 return Ok(());
11828 };
11829 depth.increment()?;
11830 let envelope_size = 8;
11831 let bytes_len = len * envelope_size;
11832 let offset = decoder.out_of_line_offset(bytes_len)?;
11833 let mut _next_ordinal_to_read = 0;
11835 let mut next_offset = offset;
11836 let end_offset = offset + bytes_len;
11837 _next_ordinal_to_read += 1;
11838 if next_offset >= end_offset {
11839 return Ok(());
11840 }
11841
11842 while _next_ordinal_to_read < 1 {
11844 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11845 _next_ordinal_to_read += 1;
11846 next_offset += envelope_size;
11847 }
11848
11849 let next_out_of_line = decoder.next_out_of_line();
11850 let handles_before = decoder.remaining_handles();
11851 if let Some((inlined, num_bytes, num_handles)) =
11852 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11853 {
11854 let member_inline_size =
11855 <InstanceToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11856 if inlined != (member_inline_size <= 4) {
11857 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11858 }
11859 let inner_offset;
11860 let mut inner_depth = depth.clone();
11861 if inlined {
11862 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11863 inner_offset = next_offset;
11864 } else {
11865 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11866 inner_depth.increment()?;
11867 }
11868 let val_ref = self.requesting.get_or_insert_with(|| {
11869 fidl::new_empty!(InstanceToken, fdomain_client::fidl::FDomainResourceDialect)
11870 });
11871 fidl::decode!(
11872 InstanceToken,
11873 fdomain_client::fidl::FDomainResourceDialect,
11874 val_ref,
11875 decoder,
11876 inner_offset,
11877 inner_depth
11878 )?;
11879 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11880 {
11881 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11882 }
11883 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11884 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11885 }
11886 }
11887
11888 next_offset += envelope_size;
11889 _next_ordinal_to_read += 1;
11890 if next_offset >= end_offset {
11891 return Ok(());
11892 }
11893
11894 while _next_ordinal_to_read < 2 {
11896 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11897 _next_ordinal_to_read += 1;
11898 next_offset += envelope_size;
11899 }
11900
11901 let next_out_of_line = decoder.next_out_of_line();
11902 let handles_before = decoder.remaining_handles();
11903 if let Some((inlined, num_bytes, num_handles)) =
11904 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11905 {
11906 let member_inline_size =
11907 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11908 if inlined != (member_inline_size <= 4) {
11909 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11910 }
11911 let inner_offset;
11912 let mut inner_depth = depth.clone();
11913 if inlined {
11914 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11915 inner_offset = next_offset;
11916 } else {
11917 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11918 inner_depth.increment()?;
11919 }
11920 let val_ref = self.metadata.get_or_insert_with(|| {
11921 fidl::new_empty!(DictionaryRef, fdomain_client::fidl::FDomainResourceDialect)
11922 });
11923 fidl::decode!(
11924 DictionaryRef,
11925 fdomain_client::fidl::FDomainResourceDialect,
11926 val_ref,
11927 decoder,
11928 inner_offset,
11929 inner_depth
11930 )?;
11931 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11932 {
11933 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11934 }
11935 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11936 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11937 }
11938 }
11939
11940 next_offset += envelope_size;
11941
11942 while next_offset < end_offset {
11944 _next_ordinal_to_read += 1;
11945 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11946 next_offset += envelope_size;
11947 }
11948
11949 Ok(())
11950 }
11951 }
11952
11953 impl fidl::encoding::ResourceTypeMarker for Capability {
11954 type Borrowed<'a> = &'a mut Self;
11955 fn take_or_borrow<'a>(
11956 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11957 ) -> Self::Borrowed<'a> {
11958 value
11959 }
11960 }
11961
11962 unsafe impl fidl::encoding::TypeMarker for Capability {
11963 type Owned = Self;
11964
11965 #[inline(always)]
11966 fn inline_align(_context: fidl::encoding::Context) -> usize {
11967 8
11968 }
11969
11970 #[inline(always)]
11971 fn inline_size(_context: fidl::encoding::Context) -> usize {
11972 16
11973 }
11974 }
11975
11976 unsafe impl fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>
11977 for &mut Capability
11978 {
11979 #[inline]
11980 unsafe fn encode(
11981 self,
11982 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11983 offset: usize,
11984 _depth: fidl::encoding::Depth,
11985 ) -> fidl::Result<()> {
11986 encoder.debug_check_bounds::<Capability>(offset);
11987 encoder.write_num::<u64>(self.ordinal(), offset);
11988 match self {
11989 Capability::Unit(ref val) => {
11990 fidl::encoding::encode_in_envelope::<Unit, fdomain_client::fidl::FDomainResourceDialect>(
11991 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
11992 encoder, offset + 8, _depth
11993 )
11994 }
11995 Capability::Handle(ref mut val) => {
11996 fidl::encoding::encode_in_envelope::<fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect>(
11997 <fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
11998 encoder, offset + 8, _depth
11999 )
12000 }
12001 Capability::Data(ref val) => {
12002 fidl::encoding::encode_in_envelope::<Data, fdomain_client::fidl::FDomainResourceDialect>(
12003 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
12004 encoder, offset + 8, _depth
12005 )
12006 }
12007 Capability::Dictionary(ref mut val) => {
12008 fidl::encoding::encode_in_envelope::<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>(
12009 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12010 encoder, offset + 8, _depth
12011 )
12012 }
12013 Capability::Connector(ref mut val) => {
12014 fidl::encoding::encode_in_envelope::<Connector, fdomain_client::fidl::FDomainResourceDialect>(
12015 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12016 encoder, offset + 8, _depth
12017 )
12018 }
12019 Capability::DirConnector(ref mut val) => {
12020 fidl::encoding::encode_in_envelope::<DirConnector, fdomain_client::fidl::FDomainResourceDialect>(
12021 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12022 encoder, offset + 8, _depth
12023 )
12024 }
12025 Capability::Directory(ref mut val) => {
12026 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12027 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12028 encoder, offset + 8, _depth
12029 )
12030 }
12031 Capability::DirEntry(ref mut val) => {
12032 fidl::encoding::encode_in_envelope::<DirEntry, fdomain_client::fidl::FDomainResourceDialect>(
12033 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12034 encoder, offset + 8, _depth
12035 )
12036 }
12037 Capability::ConnectorRouter(ref mut val) => {
12038 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12039 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12040 encoder, offset + 8, _depth
12041 )
12042 }
12043 Capability::DictionaryRouter(ref mut val) => {
12044 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12045 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12046 encoder, offset + 8, _depth
12047 )
12048 }
12049 Capability::DirEntryRouter(ref mut val) => {
12050 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12051 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12052 encoder, offset + 8, _depth
12053 )
12054 }
12055 Capability::DataRouter(ref mut val) => {
12056 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DataRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12057 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DataRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12058 encoder, offset + 8, _depth
12059 )
12060 }
12061 Capability::DirConnectorRouter(ref mut val) => {
12062 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12063 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12064 encoder, offset + 8, _depth
12065 )
12066 }
12067 Capability::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
12068 }
12069 }
12070 }
12071
12072 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Capability {
12073 #[inline(always)]
12074 fn new_empty() -> Self {
12075 Self::__SourceBreaking { unknown_ordinal: 0 }
12076 }
12077
12078 #[inline]
12079 unsafe fn decode(
12080 &mut self,
12081 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12082 offset: usize,
12083 mut depth: fidl::encoding::Depth,
12084 ) -> fidl::Result<()> {
12085 decoder.debug_check_bounds::<Self>(offset);
12086 #[allow(unused_variables)]
12087 let next_out_of_line = decoder.next_out_of_line();
12088 let handles_before = decoder.remaining_handles();
12089 let (ordinal, inlined, num_bytes, num_handles) =
12090 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12091
12092 let member_inline_size =
12093 match ordinal {
12094 1 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12095 2 => <fidl::encoding::HandleType<
12096 fdomain_client::NullableHandle,
12097 { fidl::ObjectType::NONE.into_raw() },
12098 2147483648,
12099 > as fidl::encoding::TypeMarker>::inline_size(
12100 decoder.context
12101 ),
12102 3 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12103 4 => {
12104 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context)
12105 }
12106 5 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12107 6 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12108 7 => <fidl::encoding::Endpoint<
12109 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
12110 > as fidl::encoding::TypeMarker>::inline_size(
12111 decoder.context
12112 ),
12113 8 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12114 9 => <fidl::encoding::Endpoint<
12115 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
12116 > as fidl::encoding::TypeMarker>::inline_size(
12117 decoder.context
12118 ),
12119 10 => <fidl::encoding::Endpoint<
12120 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
12121 > as fidl::encoding::TypeMarker>::inline_size(
12122 decoder.context
12123 ),
12124 11 => <fidl::encoding::Endpoint<
12125 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
12126 > as fidl::encoding::TypeMarker>::inline_size(
12127 decoder.context
12128 ),
12129 12 => <fidl::encoding::Endpoint<
12130 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
12131 > as fidl::encoding::TypeMarker>::inline_size(
12132 decoder.context
12133 ),
12134 13 => <fidl::encoding::Endpoint<
12135 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
12136 > as fidl::encoding::TypeMarker>::inline_size(
12137 decoder.context
12138 ),
12139 0 => return Err(fidl::Error::UnknownUnionTag),
12140 _ => num_bytes as usize,
12141 };
12142
12143 if inlined != (member_inline_size <= 4) {
12144 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12145 }
12146 let _inner_offset;
12147 if inlined {
12148 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12149 _inner_offset = offset + 8;
12150 } else {
12151 depth.increment()?;
12152 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12153 }
12154 match ordinal {
12155 1 => {
12156 #[allow(irrefutable_let_patterns)]
12157 if let Capability::Unit(_) = self {
12158 } else {
12160 *self = Capability::Unit(fidl::new_empty!(
12162 Unit,
12163 fdomain_client::fidl::FDomainResourceDialect
12164 ));
12165 }
12166 #[allow(irrefutable_let_patterns)]
12167 if let Capability::Unit(ref mut val) = self {
12168 fidl::decode!(
12169 Unit,
12170 fdomain_client::fidl::FDomainResourceDialect,
12171 val,
12172 decoder,
12173 _inner_offset,
12174 depth
12175 )?;
12176 } else {
12177 unreachable!()
12178 }
12179 }
12180 2 => {
12181 #[allow(irrefutable_let_patterns)]
12182 if let Capability::Handle(_) = self {
12183 } else {
12185 *self = Capability::Handle(
12187 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
12188 );
12189 }
12190 #[allow(irrefutable_let_patterns)]
12191 if let Capability::Handle(ref mut val) = self {
12192 fidl::decode!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
12193 } else {
12194 unreachable!()
12195 }
12196 }
12197 3 => {
12198 #[allow(irrefutable_let_patterns)]
12199 if let Capability::Data(_) = self {
12200 } else {
12202 *self = Capability::Data(fidl::new_empty!(
12204 Data,
12205 fdomain_client::fidl::FDomainResourceDialect
12206 ));
12207 }
12208 #[allow(irrefutable_let_patterns)]
12209 if let Capability::Data(ref mut val) = self {
12210 fidl::decode!(
12211 Data,
12212 fdomain_client::fidl::FDomainResourceDialect,
12213 val,
12214 decoder,
12215 _inner_offset,
12216 depth
12217 )?;
12218 } else {
12219 unreachable!()
12220 }
12221 }
12222 4 => {
12223 #[allow(irrefutable_let_patterns)]
12224 if let Capability::Dictionary(_) = self {
12225 } else {
12227 *self = Capability::Dictionary(fidl::new_empty!(
12229 DictionaryRef,
12230 fdomain_client::fidl::FDomainResourceDialect
12231 ));
12232 }
12233 #[allow(irrefutable_let_patterns)]
12234 if let Capability::Dictionary(ref mut val) = self {
12235 fidl::decode!(
12236 DictionaryRef,
12237 fdomain_client::fidl::FDomainResourceDialect,
12238 val,
12239 decoder,
12240 _inner_offset,
12241 depth
12242 )?;
12243 } else {
12244 unreachable!()
12245 }
12246 }
12247 5 => {
12248 #[allow(irrefutable_let_patterns)]
12249 if let Capability::Connector(_) = self {
12250 } else {
12252 *self = Capability::Connector(fidl::new_empty!(
12254 Connector,
12255 fdomain_client::fidl::FDomainResourceDialect
12256 ));
12257 }
12258 #[allow(irrefutable_let_patterns)]
12259 if let Capability::Connector(ref mut val) = self {
12260 fidl::decode!(
12261 Connector,
12262 fdomain_client::fidl::FDomainResourceDialect,
12263 val,
12264 decoder,
12265 _inner_offset,
12266 depth
12267 )?;
12268 } else {
12269 unreachable!()
12270 }
12271 }
12272 6 => {
12273 #[allow(irrefutable_let_patterns)]
12274 if let Capability::DirConnector(_) = self {
12275 } else {
12277 *self = Capability::DirConnector(fidl::new_empty!(
12279 DirConnector,
12280 fdomain_client::fidl::FDomainResourceDialect
12281 ));
12282 }
12283 #[allow(irrefutable_let_patterns)]
12284 if let Capability::DirConnector(ref mut val) = self {
12285 fidl::decode!(
12286 DirConnector,
12287 fdomain_client::fidl::FDomainResourceDialect,
12288 val,
12289 decoder,
12290 _inner_offset,
12291 depth
12292 )?;
12293 } else {
12294 unreachable!()
12295 }
12296 }
12297 7 => {
12298 #[allow(irrefutable_let_patterns)]
12299 if let Capability::Directory(_) = self {
12300 } else {
12302 *self = Capability::Directory(fidl::new_empty!(
12304 fidl::encoding::Endpoint<
12305 fdomain_client::fidl::ClientEnd<
12306 fdomain_fuchsia_io::DirectoryMarker,
12307 >,
12308 >,
12309 fdomain_client::fidl::FDomainResourceDialect
12310 ));
12311 }
12312 #[allow(irrefutable_let_patterns)]
12313 if let Capability::Directory(ref mut val) = self {
12314 fidl::decode!(
12315 fidl::encoding::Endpoint<
12316 fdomain_client::fidl::ClientEnd<
12317 fdomain_fuchsia_io::DirectoryMarker,
12318 >,
12319 >,
12320 fdomain_client::fidl::FDomainResourceDialect,
12321 val,
12322 decoder,
12323 _inner_offset,
12324 depth
12325 )?;
12326 } else {
12327 unreachable!()
12328 }
12329 }
12330 8 => {
12331 #[allow(irrefutable_let_patterns)]
12332 if let Capability::DirEntry(_) = self {
12333 } else {
12335 *self = Capability::DirEntry(fidl::new_empty!(
12337 DirEntry,
12338 fdomain_client::fidl::FDomainResourceDialect
12339 ));
12340 }
12341 #[allow(irrefutable_let_patterns)]
12342 if let Capability::DirEntry(ref mut val) = self {
12343 fidl::decode!(
12344 DirEntry,
12345 fdomain_client::fidl::FDomainResourceDialect,
12346 val,
12347 decoder,
12348 _inner_offset,
12349 depth
12350 )?;
12351 } else {
12352 unreachable!()
12353 }
12354 }
12355 9 => {
12356 #[allow(irrefutable_let_patterns)]
12357 if let Capability::ConnectorRouter(_) = self {
12358 } else {
12360 *self = Capability::ConnectorRouter(fidl::new_empty!(
12362 fidl::encoding::Endpoint<
12363 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
12364 >,
12365 fdomain_client::fidl::FDomainResourceDialect
12366 ));
12367 }
12368 #[allow(irrefutable_let_patterns)]
12369 if let Capability::ConnectorRouter(ref mut val) = self {
12370 fidl::decode!(
12371 fidl::encoding::Endpoint<
12372 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
12373 >,
12374 fdomain_client::fidl::FDomainResourceDialect,
12375 val,
12376 decoder,
12377 _inner_offset,
12378 depth
12379 )?;
12380 } else {
12381 unreachable!()
12382 }
12383 }
12384 10 => {
12385 #[allow(irrefutable_let_patterns)]
12386 if let Capability::DictionaryRouter(_) = self {
12387 } else {
12389 *self = Capability::DictionaryRouter(fidl::new_empty!(
12391 fidl::encoding::Endpoint<
12392 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
12393 >,
12394 fdomain_client::fidl::FDomainResourceDialect
12395 ));
12396 }
12397 #[allow(irrefutable_let_patterns)]
12398 if let Capability::DictionaryRouter(ref mut val) = self {
12399 fidl::decode!(
12400 fidl::encoding::Endpoint<
12401 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
12402 >,
12403 fdomain_client::fidl::FDomainResourceDialect,
12404 val,
12405 decoder,
12406 _inner_offset,
12407 depth
12408 )?;
12409 } else {
12410 unreachable!()
12411 }
12412 }
12413 11 => {
12414 #[allow(irrefutable_let_patterns)]
12415 if let Capability::DirEntryRouter(_) = self {
12416 } else {
12418 *self = Capability::DirEntryRouter(fidl::new_empty!(
12420 fidl::encoding::Endpoint<
12421 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
12422 >,
12423 fdomain_client::fidl::FDomainResourceDialect
12424 ));
12425 }
12426 #[allow(irrefutable_let_patterns)]
12427 if let Capability::DirEntryRouter(ref mut val) = self {
12428 fidl::decode!(
12429 fidl::encoding::Endpoint<
12430 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
12431 >,
12432 fdomain_client::fidl::FDomainResourceDialect,
12433 val,
12434 decoder,
12435 _inner_offset,
12436 depth
12437 )?;
12438 } else {
12439 unreachable!()
12440 }
12441 }
12442 12 => {
12443 #[allow(irrefutable_let_patterns)]
12444 if let Capability::DataRouter(_) = self {
12445 } else {
12447 *self = Capability::DataRouter(fidl::new_empty!(
12449 fidl::encoding::Endpoint<
12450 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
12451 >,
12452 fdomain_client::fidl::FDomainResourceDialect
12453 ));
12454 }
12455 #[allow(irrefutable_let_patterns)]
12456 if let Capability::DataRouter(ref mut val) = self {
12457 fidl::decode!(
12458 fidl::encoding::Endpoint<
12459 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
12460 >,
12461 fdomain_client::fidl::FDomainResourceDialect,
12462 val,
12463 decoder,
12464 _inner_offset,
12465 depth
12466 )?;
12467 } else {
12468 unreachable!()
12469 }
12470 }
12471 13 => {
12472 #[allow(irrefutable_let_patterns)]
12473 if let Capability::DirConnectorRouter(_) = self {
12474 } else {
12476 *self = Capability::DirConnectorRouter(fidl::new_empty!(
12478 fidl::encoding::Endpoint<
12479 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
12480 >,
12481 fdomain_client::fidl::FDomainResourceDialect
12482 ));
12483 }
12484 #[allow(irrefutable_let_patterns)]
12485 if let Capability::DirConnectorRouter(ref mut val) = self {
12486 fidl::decode!(
12487 fidl::encoding::Endpoint<
12488 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
12489 >,
12490 fdomain_client::fidl::FDomainResourceDialect,
12491 val,
12492 decoder,
12493 _inner_offset,
12494 depth
12495 )?;
12496 } else {
12497 unreachable!()
12498 }
12499 }
12500 #[allow(deprecated)]
12501 ordinal => {
12502 for _ in 0..num_handles {
12503 decoder.drop_next_handle()?;
12504 }
12505 *self = Capability::__SourceBreaking { unknown_ordinal: ordinal };
12506 }
12507 }
12508 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12509 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12510 }
12511 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12512 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12513 }
12514 Ok(())
12515 }
12516 }
12517
12518 impl fidl::encoding::ResourceTypeMarker for ConnectorRouterRouteResponse {
12519 type Borrowed<'a> = &'a mut Self;
12520 fn take_or_borrow<'a>(
12521 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12522 ) -> Self::Borrowed<'a> {
12523 value
12524 }
12525 }
12526
12527 unsafe impl fidl::encoding::TypeMarker for ConnectorRouterRouteResponse {
12528 type Owned = Self;
12529
12530 #[inline(always)]
12531 fn inline_align(_context: fidl::encoding::Context) -> usize {
12532 8
12533 }
12534
12535 #[inline(always)]
12536 fn inline_size(_context: fidl::encoding::Context) -> usize {
12537 16
12538 }
12539 }
12540
12541 unsafe impl
12542 fidl::encoding::Encode<
12543 ConnectorRouterRouteResponse,
12544 fdomain_client::fidl::FDomainResourceDialect,
12545 > for &mut ConnectorRouterRouteResponse
12546 {
12547 #[inline]
12548 unsafe fn encode(
12549 self,
12550 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12551 offset: usize,
12552 _depth: fidl::encoding::Depth,
12553 ) -> fidl::Result<()> {
12554 encoder.debug_check_bounds::<ConnectorRouterRouteResponse>(offset);
12555 encoder.write_num::<u64>(self.ordinal(), offset);
12556 match self {
12557 ConnectorRouterRouteResponse::Connector(ref mut val) => {
12558 fidl::encoding::encode_in_envelope::<
12559 Connector,
12560 fdomain_client::fidl::FDomainResourceDialect,
12561 >(
12562 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12563 encoder,
12564 offset + 8,
12565 _depth,
12566 )
12567 }
12568 ConnectorRouterRouteResponse::Unavailable(ref val) => {
12569 fidl::encoding::encode_in_envelope::<
12570 Unit,
12571 fdomain_client::fidl::FDomainResourceDialect,
12572 >(
12573 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
12574 encoder,
12575 offset + 8,
12576 _depth,
12577 )
12578 }
12579 }
12580 }
12581 }
12582
12583 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
12584 for ConnectorRouterRouteResponse
12585 {
12586 #[inline(always)]
12587 fn new_empty() -> Self {
12588 Self::Connector(fidl::new_empty!(
12589 Connector,
12590 fdomain_client::fidl::FDomainResourceDialect
12591 ))
12592 }
12593
12594 #[inline]
12595 unsafe fn decode(
12596 &mut self,
12597 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12598 offset: usize,
12599 mut depth: fidl::encoding::Depth,
12600 ) -> fidl::Result<()> {
12601 decoder.debug_check_bounds::<Self>(offset);
12602 #[allow(unused_variables)]
12603 let next_out_of_line = decoder.next_out_of_line();
12604 let handles_before = decoder.remaining_handles();
12605 let (ordinal, inlined, num_bytes, num_handles) =
12606 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12607
12608 let member_inline_size = match ordinal {
12609 1 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12610 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12611 _ => return Err(fidl::Error::UnknownUnionTag),
12612 };
12613
12614 if inlined != (member_inline_size <= 4) {
12615 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12616 }
12617 let _inner_offset;
12618 if inlined {
12619 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12620 _inner_offset = offset + 8;
12621 } else {
12622 depth.increment()?;
12623 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12624 }
12625 match ordinal {
12626 1 => {
12627 #[allow(irrefutable_let_patterns)]
12628 if let ConnectorRouterRouteResponse::Connector(_) = self {
12629 } else {
12631 *self = ConnectorRouterRouteResponse::Connector(fidl::new_empty!(
12633 Connector,
12634 fdomain_client::fidl::FDomainResourceDialect
12635 ));
12636 }
12637 #[allow(irrefutable_let_patterns)]
12638 if let ConnectorRouterRouteResponse::Connector(ref mut val) = self {
12639 fidl::decode!(
12640 Connector,
12641 fdomain_client::fidl::FDomainResourceDialect,
12642 val,
12643 decoder,
12644 _inner_offset,
12645 depth
12646 )?;
12647 } else {
12648 unreachable!()
12649 }
12650 }
12651 2 => {
12652 #[allow(irrefutable_let_patterns)]
12653 if let ConnectorRouterRouteResponse::Unavailable(_) = self {
12654 } else {
12656 *self = ConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
12658 Unit,
12659 fdomain_client::fidl::FDomainResourceDialect
12660 ));
12661 }
12662 #[allow(irrefutable_let_patterns)]
12663 if let ConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
12664 fidl::decode!(
12665 Unit,
12666 fdomain_client::fidl::FDomainResourceDialect,
12667 val,
12668 decoder,
12669 _inner_offset,
12670 depth
12671 )?;
12672 } else {
12673 unreachable!()
12674 }
12675 }
12676 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12677 }
12678 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12679 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12680 }
12681 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12682 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12683 }
12684 Ok(())
12685 }
12686 }
12687
12688 impl fidl::encoding::ResourceTypeMarker for DataRouterRouteResponse {
12689 type Borrowed<'a> = &'a mut Self;
12690 fn take_or_borrow<'a>(
12691 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12692 ) -> Self::Borrowed<'a> {
12693 value
12694 }
12695 }
12696
12697 unsafe impl fidl::encoding::TypeMarker for DataRouterRouteResponse {
12698 type Owned = Self;
12699
12700 #[inline(always)]
12701 fn inline_align(_context: fidl::encoding::Context) -> usize {
12702 8
12703 }
12704
12705 #[inline(always)]
12706 fn inline_size(_context: fidl::encoding::Context) -> usize {
12707 16
12708 }
12709 }
12710
12711 unsafe impl
12712 fidl::encoding::Encode<
12713 DataRouterRouteResponse,
12714 fdomain_client::fidl::FDomainResourceDialect,
12715 > for &mut DataRouterRouteResponse
12716 {
12717 #[inline]
12718 unsafe fn encode(
12719 self,
12720 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12721 offset: usize,
12722 _depth: fidl::encoding::Depth,
12723 ) -> fidl::Result<()> {
12724 encoder.debug_check_bounds::<DataRouterRouteResponse>(offset);
12725 encoder.write_num::<u64>(self.ordinal(), offset);
12726 match self {
12727 DataRouterRouteResponse::Data(ref val) => fidl::encoding::encode_in_envelope::<
12728 Data,
12729 fdomain_client::fidl::FDomainResourceDialect,
12730 >(
12731 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
12732 encoder,
12733 offset + 8,
12734 _depth,
12735 ),
12736 DataRouterRouteResponse::Unavailable(ref val) => {
12737 fidl::encoding::encode_in_envelope::<
12738 Unit,
12739 fdomain_client::fidl::FDomainResourceDialect,
12740 >(
12741 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
12742 encoder,
12743 offset + 8,
12744 _depth,
12745 )
12746 }
12747 }
12748 }
12749 }
12750
12751 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
12752 for DataRouterRouteResponse
12753 {
12754 #[inline(always)]
12755 fn new_empty() -> Self {
12756 Self::Data(fidl::new_empty!(Data, fdomain_client::fidl::FDomainResourceDialect))
12757 }
12758
12759 #[inline]
12760 unsafe fn decode(
12761 &mut self,
12762 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12763 offset: usize,
12764 mut depth: fidl::encoding::Depth,
12765 ) -> fidl::Result<()> {
12766 decoder.debug_check_bounds::<Self>(offset);
12767 #[allow(unused_variables)]
12768 let next_out_of_line = decoder.next_out_of_line();
12769 let handles_before = decoder.remaining_handles();
12770 let (ordinal, inlined, num_bytes, num_handles) =
12771 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12772
12773 let member_inline_size = match ordinal {
12774 1 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12775 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12776 _ => return Err(fidl::Error::UnknownUnionTag),
12777 };
12778
12779 if inlined != (member_inline_size <= 4) {
12780 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12781 }
12782 let _inner_offset;
12783 if inlined {
12784 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12785 _inner_offset = offset + 8;
12786 } else {
12787 depth.increment()?;
12788 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12789 }
12790 match ordinal {
12791 1 => {
12792 #[allow(irrefutable_let_patterns)]
12793 if let DataRouterRouteResponse::Data(_) = self {
12794 } else {
12796 *self = DataRouterRouteResponse::Data(fidl::new_empty!(
12798 Data,
12799 fdomain_client::fidl::FDomainResourceDialect
12800 ));
12801 }
12802 #[allow(irrefutable_let_patterns)]
12803 if let DataRouterRouteResponse::Data(ref mut val) = self {
12804 fidl::decode!(
12805 Data,
12806 fdomain_client::fidl::FDomainResourceDialect,
12807 val,
12808 decoder,
12809 _inner_offset,
12810 depth
12811 )?;
12812 } else {
12813 unreachable!()
12814 }
12815 }
12816 2 => {
12817 #[allow(irrefutable_let_patterns)]
12818 if let DataRouterRouteResponse::Unavailable(_) = self {
12819 } else {
12821 *self = DataRouterRouteResponse::Unavailable(fidl::new_empty!(
12823 Unit,
12824 fdomain_client::fidl::FDomainResourceDialect
12825 ));
12826 }
12827 #[allow(irrefutable_let_patterns)]
12828 if let DataRouterRouteResponse::Unavailable(ref mut val) = self {
12829 fidl::decode!(
12830 Unit,
12831 fdomain_client::fidl::FDomainResourceDialect,
12832 val,
12833 decoder,
12834 _inner_offset,
12835 depth
12836 )?;
12837 } else {
12838 unreachable!()
12839 }
12840 }
12841 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12842 }
12843 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12844 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12845 }
12846 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12847 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12848 }
12849 Ok(())
12850 }
12851 }
12852
12853 impl fidl::encoding::ResourceTypeMarker for DictionaryRouterRouteResponse {
12854 type Borrowed<'a> = &'a mut Self;
12855 fn take_or_borrow<'a>(
12856 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12857 ) -> Self::Borrowed<'a> {
12858 value
12859 }
12860 }
12861
12862 unsafe impl fidl::encoding::TypeMarker for DictionaryRouterRouteResponse {
12863 type Owned = Self;
12864
12865 #[inline(always)]
12866 fn inline_align(_context: fidl::encoding::Context) -> usize {
12867 8
12868 }
12869
12870 #[inline(always)]
12871 fn inline_size(_context: fidl::encoding::Context) -> usize {
12872 16
12873 }
12874 }
12875
12876 unsafe impl
12877 fidl::encoding::Encode<
12878 DictionaryRouterRouteResponse,
12879 fdomain_client::fidl::FDomainResourceDialect,
12880 > for &mut DictionaryRouterRouteResponse
12881 {
12882 #[inline]
12883 unsafe fn encode(
12884 self,
12885 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12886 offset: usize,
12887 _depth: fidl::encoding::Depth,
12888 ) -> fidl::Result<()> {
12889 encoder.debug_check_bounds::<DictionaryRouterRouteResponse>(offset);
12890 encoder.write_num::<u64>(self.ordinal(), offset);
12891 match self {
12892 DictionaryRouterRouteResponse::Dictionary(ref mut val) => {
12893 fidl::encoding::encode_in_envelope::<
12894 DictionaryRef,
12895 fdomain_client::fidl::FDomainResourceDialect,
12896 >(
12897 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12898 encoder,
12899 offset + 8,
12900 _depth,
12901 )
12902 }
12903 DictionaryRouterRouteResponse::Unavailable(ref val) => {
12904 fidl::encoding::encode_in_envelope::<
12905 Unit,
12906 fdomain_client::fidl::FDomainResourceDialect,
12907 >(
12908 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
12909 encoder,
12910 offset + 8,
12911 _depth,
12912 )
12913 }
12914 }
12915 }
12916 }
12917
12918 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
12919 for DictionaryRouterRouteResponse
12920 {
12921 #[inline(always)]
12922 fn new_empty() -> Self {
12923 Self::Dictionary(fidl::new_empty!(
12924 DictionaryRef,
12925 fdomain_client::fidl::FDomainResourceDialect
12926 ))
12927 }
12928
12929 #[inline]
12930 unsafe fn decode(
12931 &mut self,
12932 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12933 offset: usize,
12934 mut depth: fidl::encoding::Depth,
12935 ) -> fidl::Result<()> {
12936 decoder.debug_check_bounds::<Self>(offset);
12937 #[allow(unused_variables)]
12938 let next_out_of_line = decoder.next_out_of_line();
12939 let handles_before = decoder.remaining_handles();
12940 let (ordinal, inlined, num_bytes, num_handles) =
12941 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12942
12943 let member_inline_size = match ordinal {
12944 1 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12945 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12946 _ => return Err(fidl::Error::UnknownUnionTag),
12947 };
12948
12949 if inlined != (member_inline_size <= 4) {
12950 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12951 }
12952 let _inner_offset;
12953 if inlined {
12954 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12955 _inner_offset = offset + 8;
12956 } else {
12957 depth.increment()?;
12958 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12959 }
12960 match ordinal {
12961 1 => {
12962 #[allow(irrefutable_let_patterns)]
12963 if let DictionaryRouterRouteResponse::Dictionary(_) = self {
12964 } else {
12966 *self = DictionaryRouterRouteResponse::Dictionary(fidl::new_empty!(
12968 DictionaryRef,
12969 fdomain_client::fidl::FDomainResourceDialect
12970 ));
12971 }
12972 #[allow(irrefutable_let_patterns)]
12973 if let DictionaryRouterRouteResponse::Dictionary(ref mut val) = self {
12974 fidl::decode!(
12975 DictionaryRef,
12976 fdomain_client::fidl::FDomainResourceDialect,
12977 val,
12978 decoder,
12979 _inner_offset,
12980 depth
12981 )?;
12982 } else {
12983 unreachable!()
12984 }
12985 }
12986 2 => {
12987 #[allow(irrefutable_let_patterns)]
12988 if let DictionaryRouterRouteResponse::Unavailable(_) = self {
12989 } else {
12991 *self = DictionaryRouterRouteResponse::Unavailable(fidl::new_empty!(
12993 Unit,
12994 fdomain_client::fidl::FDomainResourceDialect
12995 ));
12996 }
12997 #[allow(irrefutable_let_patterns)]
12998 if let DictionaryRouterRouteResponse::Unavailable(ref mut val) = self {
12999 fidl::decode!(
13000 Unit,
13001 fdomain_client::fidl::FDomainResourceDialect,
13002 val,
13003 decoder,
13004 _inner_offset,
13005 depth
13006 )?;
13007 } else {
13008 unreachable!()
13009 }
13010 }
13011 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13012 }
13013 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13014 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13015 }
13016 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13017 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13018 }
13019 Ok(())
13020 }
13021 }
13022
13023 impl fidl::encoding::ResourceTypeMarker for DirConnectorRouterRouteResponse {
13024 type Borrowed<'a> = &'a mut Self;
13025 fn take_or_borrow<'a>(
13026 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13027 ) -> Self::Borrowed<'a> {
13028 value
13029 }
13030 }
13031
13032 unsafe impl fidl::encoding::TypeMarker for DirConnectorRouterRouteResponse {
13033 type Owned = Self;
13034
13035 #[inline(always)]
13036 fn inline_align(_context: fidl::encoding::Context) -> usize {
13037 8
13038 }
13039
13040 #[inline(always)]
13041 fn inline_size(_context: fidl::encoding::Context) -> usize {
13042 16
13043 }
13044 }
13045
13046 unsafe impl
13047 fidl::encoding::Encode<
13048 DirConnectorRouterRouteResponse,
13049 fdomain_client::fidl::FDomainResourceDialect,
13050 > for &mut DirConnectorRouterRouteResponse
13051 {
13052 #[inline]
13053 unsafe fn encode(
13054 self,
13055 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13056 offset: usize,
13057 _depth: fidl::encoding::Depth,
13058 ) -> fidl::Result<()> {
13059 encoder.debug_check_bounds::<DirConnectorRouterRouteResponse>(offset);
13060 encoder.write_num::<u64>(self.ordinal(), offset);
13061 match self {
13062 DirConnectorRouterRouteResponse::DirConnector(ref mut val) => {
13063 fidl::encoding::encode_in_envelope::<
13064 DirConnector,
13065 fdomain_client::fidl::FDomainResourceDialect,
13066 >(
13067 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13068 encoder,
13069 offset + 8,
13070 _depth,
13071 )
13072 }
13073 DirConnectorRouterRouteResponse::Unavailable(ref val) => {
13074 fidl::encoding::encode_in_envelope::<
13075 Unit,
13076 fdomain_client::fidl::FDomainResourceDialect,
13077 >(
13078 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13079 encoder,
13080 offset + 8,
13081 _depth,
13082 )
13083 }
13084 }
13085 }
13086 }
13087
13088 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13089 for DirConnectorRouterRouteResponse
13090 {
13091 #[inline(always)]
13092 fn new_empty() -> Self {
13093 Self::DirConnector(fidl::new_empty!(
13094 DirConnector,
13095 fdomain_client::fidl::FDomainResourceDialect
13096 ))
13097 }
13098
13099 #[inline]
13100 unsafe fn decode(
13101 &mut self,
13102 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13103 offset: usize,
13104 mut depth: fidl::encoding::Depth,
13105 ) -> fidl::Result<()> {
13106 decoder.debug_check_bounds::<Self>(offset);
13107 #[allow(unused_variables)]
13108 let next_out_of_line = decoder.next_out_of_line();
13109 let handles_before = decoder.remaining_handles();
13110 let (ordinal, inlined, num_bytes, num_handles) =
13111 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13112
13113 let member_inline_size = match ordinal {
13114 1 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13115 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13116 _ => return Err(fidl::Error::UnknownUnionTag),
13117 };
13118
13119 if inlined != (member_inline_size <= 4) {
13120 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13121 }
13122 let _inner_offset;
13123 if inlined {
13124 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13125 _inner_offset = offset + 8;
13126 } else {
13127 depth.increment()?;
13128 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13129 }
13130 match ordinal {
13131 1 => {
13132 #[allow(irrefutable_let_patterns)]
13133 if let DirConnectorRouterRouteResponse::DirConnector(_) = self {
13134 } else {
13136 *self = DirConnectorRouterRouteResponse::DirConnector(fidl::new_empty!(
13138 DirConnector,
13139 fdomain_client::fidl::FDomainResourceDialect
13140 ));
13141 }
13142 #[allow(irrefutable_let_patterns)]
13143 if let DirConnectorRouterRouteResponse::DirConnector(ref mut val) = self {
13144 fidl::decode!(
13145 DirConnector,
13146 fdomain_client::fidl::FDomainResourceDialect,
13147 val,
13148 decoder,
13149 _inner_offset,
13150 depth
13151 )?;
13152 } else {
13153 unreachable!()
13154 }
13155 }
13156 2 => {
13157 #[allow(irrefutable_let_patterns)]
13158 if let DirConnectorRouterRouteResponse::Unavailable(_) = self {
13159 } else {
13161 *self = DirConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
13163 Unit,
13164 fdomain_client::fidl::FDomainResourceDialect
13165 ));
13166 }
13167 #[allow(irrefutable_let_patterns)]
13168 if let DirConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
13169 fidl::decode!(
13170 Unit,
13171 fdomain_client::fidl::FDomainResourceDialect,
13172 val,
13173 decoder,
13174 _inner_offset,
13175 depth
13176 )?;
13177 } else {
13178 unreachable!()
13179 }
13180 }
13181 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13182 }
13183 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13184 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13185 }
13186 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13187 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13188 }
13189 Ok(())
13190 }
13191 }
13192
13193 impl fidl::encoding::ResourceTypeMarker for DirEntryRouterRouteResponse {
13194 type Borrowed<'a> = &'a mut Self;
13195 fn take_or_borrow<'a>(
13196 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13197 ) -> Self::Borrowed<'a> {
13198 value
13199 }
13200 }
13201
13202 unsafe impl fidl::encoding::TypeMarker for DirEntryRouterRouteResponse {
13203 type Owned = Self;
13204
13205 #[inline(always)]
13206 fn inline_align(_context: fidl::encoding::Context) -> usize {
13207 8
13208 }
13209
13210 #[inline(always)]
13211 fn inline_size(_context: fidl::encoding::Context) -> usize {
13212 16
13213 }
13214 }
13215
13216 unsafe impl
13217 fidl::encoding::Encode<
13218 DirEntryRouterRouteResponse,
13219 fdomain_client::fidl::FDomainResourceDialect,
13220 > for &mut DirEntryRouterRouteResponse
13221 {
13222 #[inline]
13223 unsafe fn encode(
13224 self,
13225 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13226 offset: usize,
13227 _depth: fidl::encoding::Depth,
13228 ) -> fidl::Result<()> {
13229 encoder.debug_check_bounds::<DirEntryRouterRouteResponse>(offset);
13230 encoder.write_num::<u64>(self.ordinal(), offset);
13231 match self {
13232 DirEntryRouterRouteResponse::DirEntry(ref mut val) => {
13233 fidl::encoding::encode_in_envelope::<
13234 DirEntry,
13235 fdomain_client::fidl::FDomainResourceDialect,
13236 >(
13237 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13238 encoder,
13239 offset + 8,
13240 _depth,
13241 )
13242 }
13243 DirEntryRouterRouteResponse::Unavailable(ref val) => {
13244 fidl::encoding::encode_in_envelope::<
13245 Unit,
13246 fdomain_client::fidl::FDomainResourceDialect,
13247 >(
13248 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13249 encoder,
13250 offset + 8,
13251 _depth,
13252 )
13253 }
13254 }
13255 }
13256 }
13257
13258 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13259 for DirEntryRouterRouteResponse
13260 {
13261 #[inline(always)]
13262 fn new_empty() -> Self {
13263 Self::DirEntry(fidl::new_empty!(DirEntry, fdomain_client::fidl::FDomainResourceDialect))
13264 }
13265
13266 #[inline]
13267 unsafe fn decode(
13268 &mut self,
13269 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13270 offset: usize,
13271 mut depth: fidl::encoding::Depth,
13272 ) -> fidl::Result<()> {
13273 decoder.debug_check_bounds::<Self>(offset);
13274 #[allow(unused_variables)]
13275 let next_out_of_line = decoder.next_out_of_line();
13276 let handles_before = decoder.remaining_handles();
13277 let (ordinal, inlined, num_bytes, num_handles) =
13278 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13279
13280 let member_inline_size = match ordinal {
13281 1 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13282 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13283 _ => return Err(fidl::Error::UnknownUnionTag),
13284 };
13285
13286 if inlined != (member_inline_size <= 4) {
13287 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13288 }
13289 let _inner_offset;
13290 if inlined {
13291 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13292 _inner_offset = offset + 8;
13293 } else {
13294 depth.increment()?;
13295 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13296 }
13297 match ordinal {
13298 1 => {
13299 #[allow(irrefutable_let_patterns)]
13300 if let DirEntryRouterRouteResponse::DirEntry(_) = self {
13301 } else {
13303 *self = DirEntryRouterRouteResponse::DirEntry(fidl::new_empty!(
13305 DirEntry,
13306 fdomain_client::fidl::FDomainResourceDialect
13307 ));
13308 }
13309 #[allow(irrefutable_let_patterns)]
13310 if let DirEntryRouterRouteResponse::DirEntry(ref mut val) = self {
13311 fidl::decode!(
13312 DirEntry,
13313 fdomain_client::fidl::FDomainResourceDialect,
13314 val,
13315 decoder,
13316 _inner_offset,
13317 depth
13318 )?;
13319 } else {
13320 unreachable!()
13321 }
13322 }
13323 2 => {
13324 #[allow(irrefutable_let_patterns)]
13325 if let DirEntryRouterRouteResponse::Unavailable(_) = self {
13326 } else {
13328 *self = DirEntryRouterRouteResponse::Unavailable(fidl::new_empty!(
13330 Unit,
13331 fdomain_client::fidl::FDomainResourceDialect
13332 ));
13333 }
13334 #[allow(irrefutable_let_patterns)]
13335 if let DirEntryRouterRouteResponse::Unavailable(ref mut val) = self {
13336 fidl::decode!(
13337 Unit,
13338 fdomain_client::fidl::FDomainResourceDialect,
13339 val,
13340 decoder,
13341 _inner_offset,
13342 depth
13343 )?;
13344 } else {
13345 unreachable!()
13346 }
13347 }
13348 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13349 }
13350 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13351 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13352 }
13353 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13354 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13355 }
13356 Ok(())
13357 }
13358 }
13359
13360 impl fidl::encoding::ResourceTypeMarker for DirectoryRouterRouteResponse {
13361 type Borrowed<'a> = &'a mut Self;
13362 fn take_or_borrow<'a>(
13363 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13364 ) -> Self::Borrowed<'a> {
13365 value
13366 }
13367 }
13368
13369 unsafe impl fidl::encoding::TypeMarker for DirectoryRouterRouteResponse {
13370 type Owned = Self;
13371
13372 #[inline(always)]
13373 fn inline_align(_context: fidl::encoding::Context) -> usize {
13374 8
13375 }
13376
13377 #[inline(always)]
13378 fn inline_size(_context: fidl::encoding::Context) -> usize {
13379 16
13380 }
13381 }
13382
13383 unsafe impl
13384 fidl::encoding::Encode<
13385 DirectoryRouterRouteResponse,
13386 fdomain_client::fidl::FDomainResourceDialect,
13387 > for &mut DirectoryRouterRouteResponse
13388 {
13389 #[inline]
13390 unsafe fn encode(
13391 self,
13392 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13393 offset: usize,
13394 _depth: fidl::encoding::Depth,
13395 ) -> fidl::Result<()> {
13396 encoder.debug_check_bounds::<DirectoryRouterRouteResponse>(offset);
13397 encoder.write_num::<u64>(self.ordinal(), offset);
13398 match self {
13399 DirectoryRouterRouteResponse::Directory(ref mut val) => {
13400 fidl::encoding::encode_in_envelope::<
13401 fidl::encoding::Endpoint<
13402 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
13403 >,
13404 fdomain_client::fidl::FDomainResourceDialect,
13405 >(
13406 <fidl::encoding::Endpoint<
13407 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
13408 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13409 val
13410 ),
13411 encoder,
13412 offset + 8,
13413 _depth,
13414 )
13415 }
13416 DirectoryRouterRouteResponse::Unavailable(ref val) => {
13417 fidl::encoding::encode_in_envelope::<
13418 Unit,
13419 fdomain_client::fidl::FDomainResourceDialect,
13420 >(
13421 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13422 encoder,
13423 offset + 8,
13424 _depth,
13425 )
13426 }
13427 }
13428 }
13429 }
13430
13431 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13432 for DirectoryRouterRouteResponse
13433 {
13434 #[inline(always)]
13435 fn new_empty() -> Self {
13436 Self::Directory(fidl::new_empty!(
13437 fidl::encoding::Endpoint<
13438 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
13439 >,
13440 fdomain_client::fidl::FDomainResourceDialect
13441 ))
13442 }
13443
13444 #[inline]
13445 unsafe fn decode(
13446 &mut self,
13447 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13448 offset: usize,
13449 mut depth: fidl::encoding::Depth,
13450 ) -> fidl::Result<()> {
13451 decoder.debug_check_bounds::<Self>(offset);
13452 #[allow(unused_variables)]
13453 let next_out_of_line = decoder.next_out_of_line();
13454 let handles_before = decoder.remaining_handles();
13455 let (ordinal, inlined, num_bytes, num_handles) =
13456 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13457
13458 let member_inline_size = match ordinal {
13459 1 => <fidl::encoding::Endpoint<
13460 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
13461 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13462 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13463 _ => return Err(fidl::Error::UnknownUnionTag),
13464 };
13465
13466 if inlined != (member_inline_size <= 4) {
13467 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13468 }
13469 let _inner_offset;
13470 if inlined {
13471 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13472 _inner_offset = offset + 8;
13473 } else {
13474 depth.increment()?;
13475 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13476 }
13477 match ordinal {
13478 1 => {
13479 #[allow(irrefutable_let_patterns)]
13480 if let DirectoryRouterRouteResponse::Directory(_) = self {
13481 } else {
13483 *self = DirectoryRouterRouteResponse::Directory(fidl::new_empty!(
13485 fidl::encoding::Endpoint<
13486 fdomain_client::fidl::ClientEnd<
13487 fdomain_fuchsia_io::DirectoryMarker,
13488 >,
13489 >,
13490 fdomain_client::fidl::FDomainResourceDialect
13491 ));
13492 }
13493 #[allow(irrefutable_let_patterns)]
13494 if let DirectoryRouterRouteResponse::Directory(ref mut val) = self {
13495 fidl::decode!(
13496 fidl::encoding::Endpoint<
13497 fdomain_client::fidl::ClientEnd<
13498 fdomain_fuchsia_io::DirectoryMarker,
13499 >,
13500 >,
13501 fdomain_client::fidl::FDomainResourceDialect,
13502 val,
13503 decoder,
13504 _inner_offset,
13505 depth
13506 )?;
13507 } else {
13508 unreachable!()
13509 }
13510 }
13511 2 => {
13512 #[allow(irrefutable_let_patterns)]
13513 if let DirectoryRouterRouteResponse::Unavailable(_) = self {
13514 } else {
13516 *self = DirectoryRouterRouteResponse::Unavailable(fidl::new_empty!(
13518 Unit,
13519 fdomain_client::fidl::FDomainResourceDialect
13520 ));
13521 }
13522 #[allow(irrefutable_let_patterns)]
13523 if let DirectoryRouterRouteResponse::Unavailable(ref mut val) = self {
13524 fidl::decode!(
13525 Unit,
13526 fdomain_client::fidl::FDomainResourceDialect,
13527 val,
13528 decoder,
13529 _inner_offset,
13530 depth
13531 )?;
13532 } else {
13533 unreachable!()
13534 }
13535 }
13536 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13537 }
13538 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13539 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13540 }
13541 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13542 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13543 }
13544 Ok(())
13545 }
13546 }
13547}