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, PartialEq)]
40pub struct CapabilityStoreCreateServiceAggregateRequest {
41 pub sources: Vec<AggregateSource>,
42}
43
44impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
45 for CapabilityStoreCreateServiceAggregateRequest
46{
47}
48
49#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
50pub struct CapabilityStoreDictionaryDrainRequest {
51 pub id: u64,
52 pub iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
53}
54
55impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
56 for CapabilityStoreDictionaryDrainRequest
57{
58}
59
60#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
61pub struct CapabilityStoreDictionaryEnumerateRequest {
62 pub id: u64,
63 pub iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
64}
65
66impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
67 for CapabilityStoreDictionaryEnumerateRequest
68{
69}
70
71#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
72pub struct CapabilityStoreDictionaryKeysRequest {
73 pub id: u64,
74 pub iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
75}
76
77impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
78 for CapabilityStoreDictionaryKeysRequest
79{
80}
81
82#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
83pub struct CapabilityStoreDictionaryLegacyExportRequest {
84 pub id: u64,
85 pub server_end: fdomain_client::Channel,
86}
87
88impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
89 for CapabilityStoreDictionaryLegacyExportRequest
90{
91}
92
93#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
94pub struct CapabilityStoreDictionaryLegacyImportRequest {
95 pub id: u64,
96 pub client_end: fdomain_client::Channel,
97}
98
99impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
100 for CapabilityStoreDictionaryLegacyImportRequest
101{
102}
103
104#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
105pub struct CapabilityStoreDirConnectorCreateRequest {
106 pub id: u64,
107 pub receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
108}
109
110impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
111 for CapabilityStoreDirConnectorCreateRequest
112{
113}
114
115#[derive(Debug, PartialEq)]
116pub struct CapabilityStoreImportRequest {
117 pub id: u64,
118 pub capability: Capability,
119}
120
121impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
122 for CapabilityStoreImportRequest
123{
124}
125
126#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
127pub struct CapabilityStoreCreateServiceAggregateResponse {
128 pub aggregate_dir_connector: DirConnector,
129}
130
131impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
132 for CapabilityStoreCreateServiceAggregateResponse
133{
134}
135
136#[derive(Debug, PartialEq)]
137pub struct CapabilityStoreExportResponse {
138 pub capability: Capability,
139}
140
141impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
142 for CapabilityStoreExportResponse
143{
144}
145
146#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147pub struct Connector {
148 pub token: fdomain_client::EventPair,
149}
150
151impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Connector {}
152
153#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
154pub struct DictionaryDrainIteratorGetNextResponse {
155 pub items: Vec<DictionaryItem>,
156 pub end_id: u64,
157}
158
159impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
160 for DictionaryDrainIteratorGetNextResponse
161{
162}
163
164#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
165pub struct DictionaryEnumerateIteratorGetNextResponse {
166 pub items: Vec<DictionaryOptionalItem>,
167 pub end_id: u64,
168}
169
170impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
171 for DictionaryEnumerateIteratorGetNextResponse
172{
173}
174
175#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
176pub struct DictionaryKeysIteratorGetNextResponse {
177 pub keys: Vec<String>,
178}
179
180impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
181 for DictionaryKeysIteratorGetNextResponse
182{
183}
184
185#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
189pub struct DictionaryOptionalItem {
190 pub key: String,
191 pub value: Option<Box<WrappedCapabilityId>>,
192}
193
194impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DictionaryOptionalItem {}
195
196#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
197pub struct DictionaryRef {
198 pub token: fdomain_client::EventPair,
199}
200
201impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DictionaryRef {}
202
203#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
204pub struct DirConnector {
205 pub token: fdomain_client::EventPair,
206}
207
208impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirConnector {}
209
210#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
211pub struct DirEntry {
212 pub token: fdomain_client::EventPair,
213}
214
215impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirEntry {}
216
217#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
220pub struct InstanceToken {
221 pub token: fdomain_client::EventPair,
222}
223
224impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for InstanceToken {}
225
226#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
228pub struct ProtocolPayload {
229 pub channel: fdomain_client::Channel,
230}
231
232impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ProtocolPayload {}
233
234#[derive(Debug, Default, PartialEq)]
235pub struct AggregateSource {
236 pub dir_connector: Option<DirConnector>,
237 pub source_instance_filter: Option<Vec<String>>,
242 pub renamed_instances: Option<Vec<fdomain_fuchsia_component_decl::NameMapping>>,
254 #[doc(hidden)]
255 pub __source_breaking: fidl::marker::SourceBreaking,
256}
257
258impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for AggregateSource {}
259
260#[derive(Debug, Default, PartialEq)]
261pub struct CapabilityStoreDirConnectorOpenRequest {
262 pub id: Option<u64>,
263 pub server_end: Option<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>>,
264 pub flags: Option<fdomain_fuchsia_io::Flags>,
265 pub path: Option<String>,
266 #[doc(hidden)]
267 pub __source_breaking: fidl::marker::SourceBreaking,
268}
269
270impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
271 for CapabilityStoreDirConnectorOpenRequest
272{
273}
274
275#[derive(Debug, Default, PartialEq)]
276pub struct DirReceiverReceiveRequest {
277 pub channel: Option<fdomain_client::Channel>,
278 pub flags: Option<fdomain_fuchsia_io::Flags>,
279 pub subdir: Option<String>,
280 #[doc(hidden)]
281 pub __source_breaking: fidl::marker::SourceBreaking,
282}
283
284impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirReceiverReceiveRequest {}
285
286#[derive(Debug, Default, PartialEq)]
288pub struct RouteRequest {
289 pub requesting: Option<InstanceToken>,
292 pub metadata: Option<DictionaryRef>,
295 #[doc(hidden)]
296 pub __source_breaking: fidl::marker::SourceBreaking,
297}
298
299impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RouteRequest {}
300
301#[derive(Debug)]
302pub enum Capability {
303 Unit(Unit),
304 Handle(fdomain_client::NullableHandle),
305 Data(Data),
306 Dictionary(DictionaryRef),
307 Connector(Connector),
308 DirConnector(DirConnector),
309 Directory(fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>),
310 DirEntry(DirEntry),
311 ConnectorRouter(fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>),
312 DictionaryRouter(fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>),
313 DirEntryRouter(fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>),
314 DataRouter(fdomain_client::fidl::ClientEnd<DataRouterMarker>),
315 DirConnectorRouter(fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>),
316 #[doc(hidden)]
317 __SourceBreaking {
318 unknown_ordinal: u64,
319 },
320}
321
322#[macro_export]
324macro_rules! CapabilityUnknown {
325 () => {
326 _
327 };
328}
329
330impl PartialEq for Capability {
332 fn eq(&self, other: &Self) -> bool {
333 match (self, other) {
334 (Self::Unit(x), Self::Unit(y)) => *x == *y,
335 (Self::Handle(x), Self::Handle(y)) => *x == *y,
336 (Self::Data(x), Self::Data(y)) => *x == *y,
337 (Self::Dictionary(x), Self::Dictionary(y)) => *x == *y,
338 (Self::Connector(x), Self::Connector(y)) => *x == *y,
339 (Self::DirConnector(x), Self::DirConnector(y)) => *x == *y,
340 (Self::Directory(x), Self::Directory(y)) => *x == *y,
341 (Self::DirEntry(x), Self::DirEntry(y)) => *x == *y,
342 (Self::ConnectorRouter(x), Self::ConnectorRouter(y)) => *x == *y,
343 (Self::DictionaryRouter(x), Self::DictionaryRouter(y)) => *x == *y,
344 (Self::DirEntryRouter(x), Self::DirEntryRouter(y)) => *x == *y,
345 (Self::DataRouter(x), Self::DataRouter(y)) => *x == *y,
346 (Self::DirConnectorRouter(x), Self::DirConnectorRouter(y)) => *x == *y,
347 _ => false,
348 }
349 }
350}
351
352impl Capability {
353 #[inline]
354 pub fn ordinal(&self) -> u64 {
355 match *self {
356 Self::Unit(_) => 1,
357 Self::Handle(_) => 2,
358 Self::Data(_) => 3,
359 Self::Dictionary(_) => 4,
360 Self::Connector(_) => 5,
361 Self::DirConnector(_) => 6,
362 Self::Directory(_) => 7,
363 Self::DirEntry(_) => 8,
364 Self::ConnectorRouter(_) => 9,
365 Self::DictionaryRouter(_) => 10,
366 Self::DirEntryRouter(_) => 11,
367 Self::DataRouter(_) => 12,
368 Self::DirConnectorRouter(_) => 13,
369 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
370 }
371 }
372
373 #[inline]
374 pub fn unknown_variant_for_testing() -> Self {
375 Self::__SourceBreaking { unknown_ordinal: 0 }
376 }
377
378 #[inline]
379 pub fn is_unknown(&self) -> bool {
380 match self {
381 Self::__SourceBreaking { .. } => true,
382 _ => false,
383 }
384 }
385}
386
387impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Capability {}
388
389#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
390pub enum ConnectorRouterRouteResponse {
391 Connector(Connector),
392 Unavailable(Unit),
393}
394
395impl ConnectorRouterRouteResponse {
396 #[inline]
397 pub fn ordinal(&self) -> u64 {
398 match *self {
399 Self::Connector(_) => 1,
400 Self::Unavailable(_) => 2,
401 }
402 }
403}
404
405impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
406 for ConnectorRouterRouteResponse
407{
408}
409
410#[derive(Debug, PartialEq)]
411pub enum DataRouterRouteResponse {
412 Data(Data),
413 Unavailable(Unit),
414}
415
416impl DataRouterRouteResponse {
417 #[inline]
418 pub fn ordinal(&self) -> u64 {
419 match *self {
420 Self::Data(_) => 1,
421 Self::Unavailable(_) => 2,
422 }
423 }
424}
425
426impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DataRouterRouteResponse {}
427
428#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
429pub enum DictionaryRouterRouteResponse {
430 Dictionary(DictionaryRef),
431 Unavailable(Unit),
432}
433
434impl DictionaryRouterRouteResponse {
435 #[inline]
436 pub fn ordinal(&self) -> u64 {
437 match *self {
438 Self::Dictionary(_) => 1,
439 Self::Unavailable(_) => 2,
440 }
441 }
442}
443
444impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
445 for DictionaryRouterRouteResponse
446{
447}
448
449#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
450pub enum DirConnectorRouterRouteResponse {
451 DirConnector(DirConnector),
452 Unavailable(Unit),
453}
454
455impl DirConnectorRouterRouteResponse {
456 #[inline]
457 pub fn ordinal(&self) -> u64 {
458 match *self {
459 Self::DirConnector(_) => 1,
460 Self::Unavailable(_) => 2,
461 }
462 }
463}
464
465impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
466 for DirConnectorRouterRouteResponse
467{
468}
469
470#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
471pub enum DirEntryRouterRouteResponse {
472 DirEntry(DirEntry),
473 Unavailable(Unit),
474}
475
476impl DirEntryRouterRouteResponse {
477 #[inline]
478 pub fn ordinal(&self) -> u64 {
479 match *self {
480 Self::DirEntry(_) => 1,
481 Self::Unavailable(_) => 2,
482 }
483 }
484}
485
486impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
487 for DirEntryRouterRouteResponse
488{
489}
490
491#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
492pub enum DirectoryRouterRouteResponse {
493 Directory(fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>),
494 Unavailable(Unit),
495}
496
497impl DirectoryRouterRouteResponse {
498 #[inline]
499 pub fn ordinal(&self) -> u64 {
500 match *self {
501 Self::Directory(_) => 1,
502 Self::Unavailable(_) => 2,
503 }
504 }
505}
506
507impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
508 for DirectoryRouterRouteResponse
509{
510}
511
512#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
513pub struct CapabilityStoreMarker;
514
515impl fdomain_client::fidl::ProtocolMarker for CapabilityStoreMarker {
516 type Proxy = CapabilityStoreProxy;
517 type RequestStream = CapabilityStoreRequestStream;
518
519 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
520}
521impl fdomain_client::fidl::DiscoverableProtocolMarker for CapabilityStoreMarker {}
522pub type CapabilityStoreDuplicateResult = Result<(), CapabilityStoreError>;
523pub type CapabilityStoreDropResult = Result<(), CapabilityStoreError>;
524pub type CapabilityStoreExportResult = Result<Capability, CapabilityStoreError>;
525pub type CapabilityStoreImportResult = Result<(), CapabilityStoreError>;
526pub type CapabilityStoreConnectorCreateResult = Result<(), CapabilityStoreError>;
527pub type CapabilityStoreConnectorOpenResult = Result<(), CapabilityStoreError>;
528pub type CapabilityStoreDirConnectorCreateResult = Result<(), CapabilityStoreError>;
529pub type CapabilityStoreDirConnectorOpenResult = Result<(), CapabilityStoreError>;
530pub type CapabilityStoreDictionaryCreateResult = Result<(), CapabilityStoreError>;
531pub type CapabilityStoreDictionaryLegacyImportResult = Result<(), CapabilityStoreError>;
532pub type CapabilityStoreDictionaryLegacyExportResult = Result<(), CapabilityStoreError>;
533pub type CapabilityStoreDictionaryInsertResult = Result<(), CapabilityStoreError>;
534pub type CapabilityStoreDictionaryGetResult = Result<(), CapabilityStoreError>;
535pub type CapabilityStoreDictionaryRemoveResult = Result<(), CapabilityStoreError>;
536pub type CapabilityStoreDictionaryCopyResult = Result<(), CapabilityStoreError>;
537pub type CapabilityStoreDictionaryKeysResult = Result<(), CapabilityStoreError>;
538pub type CapabilityStoreDictionaryEnumerateResult = Result<(), CapabilityStoreError>;
539pub type CapabilityStoreDictionaryDrainResult = Result<(), CapabilityStoreError>;
540pub type CapabilityStoreCreateServiceAggregateResult = Result<DirConnector, CapabilityStoreError>;
541
542pub trait CapabilityStoreProxyInterface: Send + Sync {
543 type DuplicateResponseFut: std::future::Future<Output = Result<CapabilityStoreDuplicateResult, fidl::Error>>
544 + Send;
545 fn r#duplicate(&self, id: u64, dest_id: u64) -> Self::DuplicateResponseFut;
546 type DropResponseFut: std::future::Future<Output = Result<CapabilityStoreDropResult, fidl::Error>>
547 + Send;
548 fn r#drop(&self, id: u64) -> Self::DropResponseFut;
549 type ExportResponseFut: std::future::Future<Output = Result<CapabilityStoreExportResult, fidl::Error>>
550 + Send;
551 fn r#export(&self, id: u64) -> Self::ExportResponseFut;
552 type ImportResponseFut: std::future::Future<Output = Result<CapabilityStoreImportResult, fidl::Error>>
553 + Send;
554 fn r#import(&self, id: u64, capability: Capability) -> Self::ImportResponseFut;
555 type ConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorCreateResult, fidl::Error>>
556 + Send;
557 fn r#connector_create(
558 &self,
559 id: u64,
560 receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
561 ) -> Self::ConnectorCreateResponseFut;
562 type ConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorOpenResult, fidl::Error>>
563 + Send;
564 fn r#connector_open(
565 &self,
566 id: u64,
567 server_end: fdomain_client::Channel,
568 ) -> Self::ConnectorOpenResponseFut;
569 type DirConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorCreateResult, fidl::Error>>
570 + Send;
571 fn r#dir_connector_create(
572 &self,
573 id: u64,
574 receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
575 ) -> Self::DirConnectorCreateResponseFut;
576 type DirConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorOpenResult, fidl::Error>>
577 + Send;
578 fn r#dir_connector_open(
579 &self,
580 payload: CapabilityStoreDirConnectorOpenRequest,
581 ) -> Self::DirConnectorOpenResponseFut;
582 type DictionaryCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCreateResult, fidl::Error>>
583 + Send;
584 fn r#dictionary_create(&self, id: u64) -> Self::DictionaryCreateResponseFut;
585 type DictionaryLegacyImportResponseFut: std::future::Future<
586 Output = Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error>,
587 > + Send;
588 fn r#dictionary_legacy_import(
589 &self,
590 id: u64,
591 client_end: fdomain_client::Channel,
592 ) -> Self::DictionaryLegacyImportResponseFut;
593 type DictionaryLegacyExportResponseFut: std::future::Future<
594 Output = Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error>,
595 > + Send;
596 fn r#dictionary_legacy_export(
597 &self,
598 id: u64,
599 server_end: fdomain_client::Channel,
600 ) -> Self::DictionaryLegacyExportResponseFut;
601 type DictionaryInsertResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryInsertResult, fidl::Error>>
602 + Send;
603 fn r#dictionary_insert(
604 &self,
605 id: u64,
606 item: &DictionaryItem,
607 ) -> Self::DictionaryInsertResponseFut;
608 type DictionaryGetResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryGetResult, fidl::Error>>
609 + Send;
610 fn r#dictionary_get(&self, id: u64, key: &str, dest_id: u64) -> Self::DictionaryGetResponseFut;
611 type DictionaryRemoveResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryRemoveResult, fidl::Error>>
612 + Send;
613 fn r#dictionary_remove(
614 &self,
615 id: u64,
616 key: &str,
617 dest_id: Option<&WrappedCapabilityId>,
618 ) -> Self::DictionaryRemoveResponseFut;
619 type DictionaryCopyResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCopyResult, fidl::Error>>
620 + Send;
621 fn r#dictionary_copy(&self, id: u64, dest_id: u64) -> Self::DictionaryCopyResponseFut;
622 type DictionaryKeysResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryKeysResult, fidl::Error>>
623 + Send;
624 fn r#dictionary_keys(
625 &self,
626 id: u64,
627 iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
628 ) -> Self::DictionaryKeysResponseFut;
629 type DictionaryEnumerateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error>>
630 + Send;
631 fn r#dictionary_enumerate(
632 &self,
633 id: u64,
634 iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
635 ) -> Self::DictionaryEnumerateResponseFut;
636 type DictionaryDrainResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryDrainResult, fidl::Error>>
637 + Send;
638 fn r#dictionary_drain(
639 &self,
640 id: u64,
641 iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
642 ) -> Self::DictionaryDrainResponseFut;
643 type CreateServiceAggregateResponseFut: std::future::Future<
644 Output = Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error>,
645 > + Send;
646 fn r#create_service_aggregate(
647 &self,
648 sources: Vec<AggregateSource>,
649 ) -> Self::CreateServiceAggregateResponseFut;
650}
651
652#[derive(Debug, Clone)]
653pub struct CapabilityStoreProxy {
654 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
655}
656
657impl fdomain_client::fidl::Proxy for CapabilityStoreProxy {
658 type Protocol = CapabilityStoreMarker;
659
660 fn from_channel(inner: fdomain_client::Channel) -> Self {
661 Self::new(inner)
662 }
663
664 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
665 self.client.into_channel().map_err(|client| Self { client })
666 }
667
668 fn as_channel(&self) -> &fdomain_client::Channel {
669 self.client.as_channel()
670 }
671}
672
673impl CapabilityStoreProxy {
674 pub fn new(channel: fdomain_client::Channel) -> Self {
676 let protocol_name =
677 <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
678 Self { client: fidl::client::Client::new(channel, protocol_name) }
679 }
680
681 pub fn take_event_stream(&self) -> CapabilityStoreEventStream {
687 CapabilityStoreEventStream { event_receiver: self.client.take_event_receiver() }
688 }
689
690 pub fn r#duplicate(
698 &self,
699 mut id: u64,
700 mut dest_id: u64,
701 ) -> fidl::client::QueryResponseFut<
702 CapabilityStoreDuplicateResult,
703 fdomain_client::fidl::FDomainResourceDialect,
704 > {
705 CapabilityStoreProxyInterface::r#duplicate(self, id, dest_id)
706 }
707
708 pub fn r#drop(
714 &self,
715 mut id: u64,
716 ) -> fidl::client::QueryResponseFut<
717 CapabilityStoreDropResult,
718 fdomain_client::fidl::FDomainResourceDialect,
719 > {
720 CapabilityStoreProxyInterface::r#drop(self, id)
721 }
722
723 pub fn r#export(
731 &self,
732 mut id: u64,
733 ) -> fidl::client::QueryResponseFut<
734 CapabilityStoreExportResult,
735 fdomain_client::fidl::FDomainResourceDialect,
736 > {
737 CapabilityStoreProxyInterface::r#export(self, id)
738 }
739
740 pub fn r#import(
747 &self,
748 mut id: u64,
749 mut capability: Capability,
750 ) -> fidl::client::QueryResponseFut<
751 CapabilityStoreImportResult,
752 fdomain_client::fidl::FDomainResourceDialect,
753 > {
754 CapabilityStoreProxyInterface::r#import(self, id, capability)
755 }
756
757 pub fn r#connector_create(
764 &self,
765 mut id: u64,
766 mut receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
767 ) -> fidl::client::QueryResponseFut<
768 CapabilityStoreConnectorCreateResult,
769 fdomain_client::fidl::FDomainResourceDialect,
770 > {
771 CapabilityStoreProxyInterface::r#connector_create(self, id, receiver)
772 }
773
774 pub fn r#connector_open(
784 &self,
785 mut id: u64,
786 mut server_end: fdomain_client::Channel,
787 ) -> fidl::client::QueryResponseFut<
788 CapabilityStoreConnectorOpenResult,
789 fdomain_client::fidl::FDomainResourceDialect,
790 > {
791 CapabilityStoreProxyInterface::r#connector_open(self, id, server_end)
792 }
793
794 pub fn r#dir_connector_create(
801 &self,
802 mut id: u64,
803 mut receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
804 ) -> fidl::client::QueryResponseFut<
805 CapabilityStoreDirConnectorCreateResult,
806 fdomain_client::fidl::FDomainResourceDialect,
807 > {
808 CapabilityStoreProxyInterface::r#dir_connector_create(self, id, receiver)
809 }
810
811 pub fn r#dir_connector_open(
825 &self,
826 mut payload: CapabilityStoreDirConnectorOpenRequest,
827 ) -> fidl::client::QueryResponseFut<
828 CapabilityStoreDirConnectorOpenResult,
829 fdomain_client::fidl::FDomainResourceDialect,
830 > {
831 CapabilityStoreProxyInterface::r#dir_connector_open(self, payload)
832 }
833
834 pub fn r#dictionary_create(
840 &self,
841 mut id: u64,
842 ) -> fidl::client::QueryResponseFut<
843 CapabilityStoreDictionaryCreateResult,
844 fdomain_client::fidl::FDomainResourceDialect,
845 > {
846 CapabilityStoreProxyInterface::r#dictionary_create(self, id)
847 }
848
849 pub fn r#dictionary_legacy_import(
859 &self,
860 mut id: u64,
861 mut client_end: fdomain_client::Channel,
862 ) -> fidl::client::QueryResponseFut<
863 CapabilityStoreDictionaryLegacyImportResult,
864 fdomain_client::fidl::FDomainResourceDialect,
865 > {
866 CapabilityStoreProxyInterface::r#dictionary_legacy_import(self, id, client_end)
867 }
868
869 pub fn r#dictionary_legacy_export(
879 &self,
880 mut id: u64,
881 mut server_end: fdomain_client::Channel,
882 ) -> fidl::client::QueryResponseFut<
883 CapabilityStoreDictionaryLegacyExportResult,
884 fdomain_client::fidl::FDomainResourceDialect,
885 > {
886 CapabilityStoreProxyInterface::r#dictionary_legacy_export(self, id, server_end)
887 }
888
889 pub fn r#dictionary_insert(
899 &self,
900 mut id: u64,
901 mut item: &DictionaryItem,
902 ) -> fidl::client::QueryResponseFut<
903 CapabilityStoreDictionaryInsertResult,
904 fdomain_client::fidl::FDomainResourceDialect,
905 > {
906 CapabilityStoreProxyInterface::r#dictionary_insert(self, id, item)
907 }
908
909 pub fn r#dictionary_get(
921 &self,
922 mut id: u64,
923 mut key: &str,
924 mut dest_id: u64,
925 ) -> fidl::client::QueryResponseFut<
926 CapabilityStoreDictionaryGetResult,
927 fdomain_client::fidl::FDomainResourceDialect,
928 > {
929 CapabilityStoreProxyInterface::r#dictionary_get(self, id, key, dest_id)
930 }
931
932 pub fn r#dictionary_remove(
943 &self,
944 mut id: u64,
945 mut key: &str,
946 mut dest_id: Option<&WrappedCapabilityId>,
947 ) -> fidl::client::QueryResponseFut<
948 CapabilityStoreDictionaryRemoveResult,
949 fdomain_client::fidl::FDomainResourceDialect,
950 > {
951 CapabilityStoreProxyInterface::r#dictionary_remove(self, id, key, dest_id)
952 }
953
954 pub fn r#dictionary_copy(
970 &self,
971 mut id: u64,
972 mut dest_id: u64,
973 ) -> fidl::client::QueryResponseFut<
974 CapabilityStoreDictionaryCopyResult,
975 fdomain_client::fidl::FDomainResourceDialect,
976 > {
977 CapabilityStoreProxyInterface::r#dictionary_copy(self, id, dest_id)
978 }
979
980 pub fn r#dictionary_keys(
987 &self,
988 mut id: u64,
989 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
990 ) -> fidl::client::QueryResponseFut<
991 CapabilityStoreDictionaryKeysResult,
992 fdomain_client::fidl::FDomainResourceDialect,
993 > {
994 CapabilityStoreProxyInterface::r#dictionary_keys(self, id, iterator)
995 }
996
997 pub fn r#dictionary_enumerate(
1007 &self,
1008 mut id: u64,
1009 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
1010 ) -> fidl::client::QueryResponseFut<
1011 CapabilityStoreDictionaryEnumerateResult,
1012 fdomain_client::fidl::FDomainResourceDialect,
1013 > {
1014 CapabilityStoreProxyInterface::r#dictionary_enumerate(self, id, iterator)
1015 }
1016
1017 pub fn r#dictionary_drain(
1025 &self,
1026 mut id: u64,
1027 mut iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
1028 ) -> fidl::client::QueryResponseFut<
1029 CapabilityStoreDictionaryDrainResult,
1030 fdomain_client::fidl::FDomainResourceDialect,
1031 > {
1032 CapabilityStoreProxyInterface::r#dictionary_drain(self, id, iterator)
1033 }
1034
1035 pub fn r#create_service_aggregate(
1038 &self,
1039 mut sources: Vec<AggregateSource>,
1040 ) -> fidl::client::QueryResponseFut<
1041 CapabilityStoreCreateServiceAggregateResult,
1042 fdomain_client::fidl::FDomainResourceDialect,
1043 > {
1044 CapabilityStoreProxyInterface::r#create_service_aggregate(self, sources)
1045 }
1046}
1047
1048impl CapabilityStoreProxyInterface for CapabilityStoreProxy {
1049 type DuplicateResponseFut = fidl::client::QueryResponseFut<
1050 CapabilityStoreDuplicateResult,
1051 fdomain_client::fidl::FDomainResourceDialect,
1052 >;
1053 fn r#duplicate(&self, mut id: u64, mut dest_id: u64) -> Self::DuplicateResponseFut {
1054 fn _decode(
1055 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1056 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
1057 let _response = fidl::client::decode_transaction_body::<
1058 fidl::encoding::FlexibleResultType<
1059 fidl::encoding::EmptyStruct,
1060 CapabilityStoreError,
1061 >,
1062 fdomain_client::fidl::FDomainResourceDialect,
1063 0x5d5d35d9c20a2184,
1064 >(_buf?)?
1065 .into_result_fdomain::<CapabilityStoreMarker>("duplicate")?;
1066 Ok(_response.map(|x| x))
1067 }
1068 self.client.send_query_and_decode::<
1069 CapabilityStoreDuplicateRequest,
1070 CapabilityStoreDuplicateResult,
1071 >(
1072 (id, dest_id,),
1073 0x5d5d35d9c20a2184,
1074 fidl::encoding::DynamicFlags::FLEXIBLE,
1075 _decode,
1076 )
1077 }
1078
1079 type DropResponseFut = fidl::client::QueryResponseFut<
1080 CapabilityStoreDropResult,
1081 fdomain_client::fidl::FDomainResourceDialect,
1082 >;
1083 fn r#drop(&self, mut id: u64) -> Self::DropResponseFut {
1084 fn _decode(
1085 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1086 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
1087 let _response = fidl::client::decode_transaction_body::<
1088 fidl::encoding::FlexibleResultType<
1089 fidl::encoding::EmptyStruct,
1090 CapabilityStoreError,
1091 >,
1092 fdomain_client::fidl::FDomainResourceDialect,
1093 0xa745c0990fc2559,
1094 >(_buf?)?
1095 .into_result_fdomain::<CapabilityStoreMarker>("drop")?;
1096 Ok(_response.map(|x| x))
1097 }
1098 self.client.send_query_and_decode::<CapabilityStoreDropRequest, CapabilityStoreDropResult>(
1099 (id,),
1100 0xa745c0990fc2559,
1101 fidl::encoding::DynamicFlags::FLEXIBLE,
1102 _decode,
1103 )
1104 }
1105
1106 type ExportResponseFut = fidl::client::QueryResponseFut<
1107 CapabilityStoreExportResult,
1108 fdomain_client::fidl::FDomainResourceDialect,
1109 >;
1110 fn r#export(&self, mut id: u64) -> Self::ExportResponseFut {
1111 fn _decode(
1112 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1113 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
1114 let _response = fidl::client::decode_transaction_body::<
1115 fidl::encoding::FlexibleResultType<
1116 CapabilityStoreExportResponse,
1117 CapabilityStoreError,
1118 >,
1119 fdomain_client::fidl::FDomainResourceDialect,
1120 0x3237a8f4748faff,
1121 >(_buf?)?
1122 .into_result_fdomain::<CapabilityStoreMarker>("export")?;
1123 Ok(_response.map(|x| x.capability))
1124 }
1125 self.client
1126 .send_query_and_decode::<CapabilityStoreExportRequest, CapabilityStoreExportResult>(
1127 (id,),
1128 0x3237a8f4748faff,
1129 fidl::encoding::DynamicFlags::FLEXIBLE,
1130 _decode,
1131 )
1132 }
1133
1134 type ImportResponseFut = fidl::client::QueryResponseFut<
1135 CapabilityStoreImportResult,
1136 fdomain_client::fidl::FDomainResourceDialect,
1137 >;
1138 fn r#import(&self, mut id: u64, mut capability: Capability) -> Self::ImportResponseFut {
1139 fn _decode(
1140 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1141 ) -> Result<CapabilityStoreImportResult, 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 0x1f96157a29f4539b,
1149 >(_buf?)?
1150 .into_result_fdomain::<CapabilityStoreMarker>("import")?;
1151 Ok(_response.map(|x| x))
1152 }
1153 self.client
1154 .send_query_and_decode::<CapabilityStoreImportRequest, CapabilityStoreImportResult>(
1155 (id, &mut capability),
1156 0x1f96157a29f4539b,
1157 fidl::encoding::DynamicFlags::FLEXIBLE,
1158 _decode,
1159 )
1160 }
1161
1162 type ConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1163 CapabilityStoreConnectorCreateResult,
1164 fdomain_client::fidl::FDomainResourceDialect,
1165 >;
1166 fn r#connector_create(
1167 &self,
1168 mut id: u64,
1169 mut receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
1170 ) -> Self::ConnectorCreateResponseFut {
1171 fn _decode(
1172 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1173 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
1174 let _response = fidl::client::decode_transaction_body::<
1175 fidl::encoding::FlexibleResultType<
1176 fidl::encoding::EmptyStruct,
1177 CapabilityStoreError,
1178 >,
1179 fdomain_client::fidl::FDomainResourceDialect,
1180 0x29592c5d63e91c25,
1181 >(_buf?)?
1182 .into_result_fdomain::<CapabilityStoreMarker>("connector_create")?;
1183 Ok(_response.map(|x| x))
1184 }
1185 self.client.send_query_and_decode::<
1186 CapabilityStoreConnectorCreateRequest,
1187 CapabilityStoreConnectorCreateResult,
1188 >(
1189 (id, receiver,),
1190 0x29592c5d63e91c25,
1191 fidl::encoding::DynamicFlags::FLEXIBLE,
1192 _decode,
1193 )
1194 }
1195
1196 type ConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1197 CapabilityStoreConnectorOpenResult,
1198 fdomain_client::fidl::FDomainResourceDialect,
1199 >;
1200 fn r#connector_open(
1201 &self,
1202 mut id: u64,
1203 mut server_end: fdomain_client::Channel,
1204 ) -> Self::ConnectorOpenResponseFut {
1205 fn _decode(
1206 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1207 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
1208 let _response = fidl::client::decode_transaction_body::<
1209 fidl::encoding::FlexibleResultType<
1210 fidl::encoding::EmptyStruct,
1211 CapabilityStoreError,
1212 >,
1213 fdomain_client::fidl::FDomainResourceDialect,
1214 0x537e69ab40563b9f,
1215 >(_buf?)?
1216 .into_result_fdomain::<CapabilityStoreMarker>("connector_open")?;
1217 Ok(_response.map(|x| x))
1218 }
1219 self.client.send_query_and_decode::<
1220 CapabilityStoreConnectorOpenRequest,
1221 CapabilityStoreConnectorOpenResult,
1222 >(
1223 (id, server_end,),
1224 0x537e69ab40563b9f,
1225 fidl::encoding::DynamicFlags::FLEXIBLE,
1226 _decode,
1227 )
1228 }
1229
1230 type DirConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1231 CapabilityStoreDirConnectorCreateResult,
1232 fdomain_client::fidl::FDomainResourceDialect,
1233 >;
1234 fn r#dir_connector_create(
1235 &self,
1236 mut id: u64,
1237 mut receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
1238 ) -> Self::DirConnectorCreateResponseFut {
1239 fn _decode(
1240 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1241 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
1242 let _response = fidl::client::decode_transaction_body::<
1243 fidl::encoding::FlexibleResultType<
1244 fidl::encoding::EmptyStruct,
1245 CapabilityStoreError,
1246 >,
1247 fdomain_client::fidl::FDomainResourceDialect,
1248 0x186138a11ccf19bb,
1249 >(_buf?)?
1250 .into_result_fdomain::<CapabilityStoreMarker>("dir_connector_create")?;
1251 Ok(_response.map(|x| x))
1252 }
1253 self.client.send_query_and_decode::<
1254 CapabilityStoreDirConnectorCreateRequest,
1255 CapabilityStoreDirConnectorCreateResult,
1256 >(
1257 (id, receiver,),
1258 0x186138a11ccf19bb,
1259 fidl::encoding::DynamicFlags::FLEXIBLE,
1260 _decode,
1261 )
1262 }
1263
1264 type DirConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1265 CapabilityStoreDirConnectorOpenResult,
1266 fdomain_client::fidl::FDomainResourceDialect,
1267 >;
1268 fn r#dir_connector_open(
1269 &self,
1270 mut payload: CapabilityStoreDirConnectorOpenRequest,
1271 ) -> Self::DirConnectorOpenResponseFut {
1272 fn _decode(
1273 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1274 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
1275 let _response = fidl::client::decode_transaction_body::<
1276 fidl::encoding::FlexibleResultType<
1277 fidl::encoding::EmptyStruct,
1278 CapabilityStoreError,
1279 >,
1280 fdomain_client::fidl::FDomainResourceDialect,
1281 0x5650d3d6a3a13901,
1282 >(_buf?)?
1283 .into_result_fdomain::<CapabilityStoreMarker>("dir_connector_open")?;
1284 Ok(_response.map(|x| x))
1285 }
1286 self.client.send_query_and_decode::<
1287 CapabilityStoreDirConnectorOpenRequest,
1288 CapabilityStoreDirConnectorOpenResult,
1289 >(
1290 &mut payload,
1291 0x5650d3d6a3a13901,
1292 fidl::encoding::DynamicFlags::FLEXIBLE,
1293 _decode,
1294 )
1295 }
1296
1297 type DictionaryCreateResponseFut = fidl::client::QueryResponseFut<
1298 CapabilityStoreDictionaryCreateResult,
1299 fdomain_client::fidl::FDomainResourceDialect,
1300 >;
1301 fn r#dictionary_create(&self, mut id: u64) -> Self::DictionaryCreateResponseFut {
1302 fn _decode(
1303 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1304 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
1305 let _response = fidl::client::decode_transaction_body::<
1306 fidl::encoding::FlexibleResultType<
1307 fidl::encoding::EmptyStruct,
1308 CapabilityStoreError,
1309 >,
1310 fdomain_client::fidl::FDomainResourceDialect,
1311 0x6997c8dfc63de093,
1312 >(_buf?)?
1313 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_create")?;
1314 Ok(_response.map(|x| x))
1315 }
1316 self.client.send_query_and_decode::<
1317 CapabilityStoreDictionaryCreateRequest,
1318 CapabilityStoreDictionaryCreateResult,
1319 >(
1320 (id,),
1321 0x6997c8dfc63de093,
1322 fidl::encoding::DynamicFlags::FLEXIBLE,
1323 _decode,
1324 )
1325 }
1326
1327 type DictionaryLegacyImportResponseFut = fidl::client::QueryResponseFut<
1328 CapabilityStoreDictionaryLegacyImportResult,
1329 fdomain_client::fidl::FDomainResourceDialect,
1330 >;
1331 fn r#dictionary_legacy_import(
1332 &self,
1333 mut id: u64,
1334 mut client_end: fdomain_client::Channel,
1335 ) -> Self::DictionaryLegacyImportResponseFut {
1336 fn _decode(
1337 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1338 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
1339 let _response = fidl::client::decode_transaction_body::<
1340 fidl::encoding::FlexibleResultType<
1341 fidl::encoding::EmptyStruct,
1342 CapabilityStoreError,
1343 >,
1344 fdomain_client::fidl::FDomainResourceDialect,
1345 0x72fd686c37b6025f,
1346 >(_buf?)?
1347 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_legacy_import")?;
1348 Ok(_response.map(|x| x))
1349 }
1350 self.client.send_query_and_decode::<
1351 CapabilityStoreDictionaryLegacyImportRequest,
1352 CapabilityStoreDictionaryLegacyImportResult,
1353 >(
1354 (id, client_end,),
1355 0x72fd686c37b6025f,
1356 fidl::encoding::DynamicFlags::FLEXIBLE,
1357 _decode,
1358 )
1359 }
1360
1361 type DictionaryLegacyExportResponseFut = fidl::client::QueryResponseFut<
1362 CapabilityStoreDictionaryLegacyExportResult,
1363 fdomain_client::fidl::FDomainResourceDialect,
1364 >;
1365 fn r#dictionary_legacy_export(
1366 &self,
1367 mut id: u64,
1368 mut server_end: fdomain_client::Channel,
1369 ) -> Self::DictionaryLegacyExportResponseFut {
1370 fn _decode(
1371 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1372 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
1373 let _response = fidl::client::decode_transaction_body::<
1374 fidl::encoding::FlexibleResultType<
1375 fidl::encoding::EmptyStruct,
1376 CapabilityStoreError,
1377 >,
1378 fdomain_client::fidl::FDomainResourceDialect,
1379 0x407e15cc4bde5dcd,
1380 >(_buf?)?
1381 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_legacy_export")?;
1382 Ok(_response.map(|x| x))
1383 }
1384 self.client.send_query_and_decode::<
1385 CapabilityStoreDictionaryLegacyExportRequest,
1386 CapabilityStoreDictionaryLegacyExportResult,
1387 >(
1388 (id, server_end,),
1389 0x407e15cc4bde5dcd,
1390 fidl::encoding::DynamicFlags::FLEXIBLE,
1391 _decode,
1392 )
1393 }
1394
1395 type DictionaryInsertResponseFut = fidl::client::QueryResponseFut<
1396 CapabilityStoreDictionaryInsertResult,
1397 fdomain_client::fidl::FDomainResourceDialect,
1398 >;
1399 fn r#dictionary_insert(
1400 &self,
1401 mut id: u64,
1402 mut item: &DictionaryItem,
1403 ) -> Self::DictionaryInsertResponseFut {
1404 fn _decode(
1405 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1406 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
1407 let _response = fidl::client::decode_transaction_body::<
1408 fidl::encoding::FlexibleResultType<
1409 fidl::encoding::EmptyStruct,
1410 CapabilityStoreError,
1411 >,
1412 fdomain_client::fidl::FDomainResourceDialect,
1413 0x7702183689d44c27,
1414 >(_buf?)?
1415 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_insert")?;
1416 Ok(_response.map(|x| x))
1417 }
1418 self.client.send_query_and_decode::<
1419 CapabilityStoreDictionaryInsertRequest,
1420 CapabilityStoreDictionaryInsertResult,
1421 >(
1422 (id, item,),
1423 0x7702183689d44c27,
1424 fidl::encoding::DynamicFlags::FLEXIBLE,
1425 _decode,
1426 )
1427 }
1428
1429 type DictionaryGetResponseFut = fidl::client::QueryResponseFut<
1430 CapabilityStoreDictionaryGetResult,
1431 fdomain_client::fidl::FDomainResourceDialect,
1432 >;
1433 fn r#dictionary_get(
1434 &self,
1435 mut id: u64,
1436 mut key: &str,
1437 mut dest_id: u64,
1438 ) -> Self::DictionaryGetResponseFut {
1439 fn _decode(
1440 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1441 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
1442 let _response = fidl::client::decode_transaction_body::<
1443 fidl::encoding::FlexibleResultType<
1444 fidl::encoding::EmptyStruct,
1445 CapabilityStoreError,
1446 >,
1447 fdomain_client::fidl::FDomainResourceDialect,
1448 0x4d9e27538284add2,
1449 >(_buf?)?
1450 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_get")?;
1451 Ok(_response.map(|x| x))
1452 }
1453 self.client.send_query_and_decode::<
1454 CapabilityStoreDictionaryGetRequest,
1455 CapabilityStoreDictionaryGetResult,
1456 >(
1457 (id, key, dest_id,),
1458 0x4d9e27538284add2,
1459 fidl::encoding::DynamicFlags::FLEXIBLE,
1460 _decode,
1461 )
1462 }
1463
1464 type DictionaryRemoveResponseFut = fidl::client::QueryResponseFut<
1465 CapabilityStoreDictionaryRemoveResult,
1466 fdomain_client::fidl::FDomainResourceDialect,
1467 >;
1468 fn r#dictionary_remove(
1469 &self,
1470 mut id: u64,
1471 mut key: &str,
1472 mut dest_id: Option<&WrappedCapabilityId>,
1473 ) -> Self::DictionaryRemoveResponseFut {
1474 fn _decode(
1475 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1476 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
1477 let _response = fidl::client::decode_transaction_body::<
1478 fidl::encoding::FlexibleResultType<
1479 fidl::encoding::EmptyStruct,
1480 CapabilityStoreError,
1481 >,
1482 fdomain_client::fidl::FDomainResourceDialect,
1483 0x4c5c025ab05d4f3,
1484 >(_buf?)?
1485 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_remove")?;
1486 Ok(_response.map(|x| x))
1487 }
1488 self.client.send_query_and_decode::<
1489 CapabilityStoreDictionaryRemoveRequest,
1490 CapabilityStoreDictionaryRemoveResult,
1491 >(
1492 (id, key, dest_id,),
1493 0x4c5c025ab05d4f3,
1494 fidl::encoding::DynamicFlags::FLEXIBLE,
1495 _decode,
1496 )
1497 }
1498
1499 type DictionaryCopyResponseFut = fidl::client::QueryResponseFut<
1500 CapabilityStoreDictionaryCopyResult,
1501 fdomain_client::fidl::FDomainResourceDialect,
1502 >;
1503 fn r#dictionary_copy(&self, mut id: u64, mut dest_id: u64) -> Self::DictionaryCopyResponseFut {
1504 fn _decode(
1505 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1506 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
1507 let _response = fidl::client::decode_transaction_body::<
1508 fidl::encoding::FlexibleResultType<
1509 fidl::encoding::EmptyStruct,
1510 CapabilityStoreError,
1511 >,
1512 fdomain_client::fidl::FDomainResourceDialect,
1513 0x3733ecdf4ea1b44f,
1514 >(_buf?)?
1515 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_copy")?;
1516 Ok(_response.map(|x| x))
1517 }
1518 self.client.send_query_and_decode::<
1519 CapabilityStoreDictionaryCopyRequest,
1520 CapabilityStoreDictionaryCopyResult,
1521 >(
1522 (id, dest_id,),
1523 0x3733ecdf4ea1b44f,
1524 fidl::encoding::DynamicFlags::FLEXIBLE,
1525 _decode,
1526 )
1527 }
1528
1529 type DictionaryKeysResponseFut = fidl::client::QueryResponseFut<
1530 CapabilityStoreDictionaryKeysResult,
1531 fdomain_client::fidl::FDomainResourceDialect,
1532 >;
1533 fn r#dictionary_keys(
1534 &self,
1535 mut id: u64,
1536 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
1537 ) -> Self::DictionaryKeysResponseFut {
1538 fn _decode(
1539 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1540 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
1541 let _response = fidl::client::decode_transaction_body::<
1542 fidl::encoding::FlexibleResultType<
1543 fidl::encoding::EmptyStruct,
1544 CapabilityStoreError,
1545 >,
1546 fdomain_client::fidl::FDomainResourceDialect,
1547 0x84b05577ceaec9e,
1548 >(_buf?)?
1549 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_keys")?;
1550 Ok(_response.map(|x| x))
1551 }
1552 self.client.send_query_and_decode::<
1553 CapabilityStoreDictionaryKeysRequest,
1554 CapabilityStoreDictionaryKeysResult,
1555 >(
1556 (id, iterator,),
1557 0x84b05577ceaec9e,
1558 fidl::encoding::DynamicFlags::FLEXIBLE,
1559 _decode,
1560 )
1561 }
1562
1563 type DictionaryEnumerateResponseFut = fidl::client::QueryResponseFut<
1564 CapabilityStoreDictionaryEnumerateResult,
1565 fdomain_client::fidl::FDomainResourceDialect,
1566 >;
1567 fn r#dictionary_enumerate(
1568 &self,
1569 mut id: u64,
1570 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
1571 ) -> Self::DictionaryEnumerateResponseFut {
1572 fn _decode(
1573 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1574 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
1575 let _response = fidl::client::decode_transaction_body::<
1576 fidl::encoding::FlexibleResultType<
1577 fidl::encoding::EmptyStruct,
1578 CapabilityStoreError,
1579 >,
1580 fdomain_client::fidl::FDomainResourceDialect,
1581 0xd6279b6ced04641,
1582 >(_buf?)?
1583 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_enumerate")?;
1584 Ok(_response.map(|x| x))
1585 }
1586 self.client.send_query_and_decode::<
1587 CapabilityStoreDictionaryEnumerateRequest,
1588 CapabilityStoreDictionaryEnumerateResult,
1589 >(
1590 (id, iterator,),
1591 0xd6279b6ced04641,
1592 fidl::encoding::DynamicFlags::FLEXIBLE,
1593 _decode,
1594 )
1595 }
1596
1597 type DictionaryDrainResponseFut = fidl::client::QueryResponseFut<
1598 CapabilityStoreDictionaryDrainResult,
1599 fdomain_client::fidl::FDomainResourceDialect,
1600 >;
1601 fn r#dictionary_drain(
1602 &self,
1603 mut id: u64,
1604 mut iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
1605 ) -> Self::DictionaryDrainResponseFut {
1606 fn _decode(
1607 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1608 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
1609 let _response = fidl::client::decode_transaction_body::<
1610 fidl::encoding::FlexibleResultType<
1611 fidl::encoding::EmptyStruct,
1612 CapabilityStoreError,
1613 >,
1614 fdomain_client::fidl::FDomainResourceDialect,
1615 0x28a3a3f84d928cd8,
1616 >(_buf?)?
1617 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_drain")?;
1618 Ok(_response.map(|x| x))
1619 }
1620 self.client.send_query_and_decode::<
1621 CapabilityStoreDictionaryDrainRequest,
1622 CapabilityStoreDictionaryDrainResult,
1623 >(
1624 (id, iterator,),
1625 0x28a3a3f84d928cd8,
1626 fidl::encoding::DynamicFlags::FLEXIBLE,
1627 _decode,
1628 )
1629 }
1630
1631 type CreateServiceAggregateResponseFut = fidl::client::QueryResponseFut<
1632 CapabilityStoreCreateServiceAggregateResult,
1633 fdomain_client::fidl::FDomainResourceDialect,
1634 >;
1635 fn r#create_service_aggregate(
1636 &self,
1637 mut sources: Vec<AggregateSource>,
1638 ) -> Self::CreateServiceAggregateResponseFut {
1639 fn _decode(
1640 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1641 ) -> Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error> {
1642 let _response = fidl::client::decode_transaction_body::<
1643 fidl::encoding::FlexibleResultType<
1644 CapabilityStoreCreateServiceAggregateResponse,
1645 CapabilityStoreError,
1646 >,
1647 fdomain_client::fidl::FDomainResourceDialect,
1648 0x4584116c8085885a,
1649 >(_buf?)?
1650 .into_result_fdomain::<CapabilityStoreMarker>("create_service_aggregate")?;
1651 Ok(_response.map(|x| x.aggregate_dir_connector))
1652 }
1653 self.client.send_query_and_decode::<
1654 CapabilityStoreCreateServiceAggregateRequest,
1655 CapabilityStoreCreateServiceAggregateResult,
1656 >(
1657 (sources.as_mut(),),
1658 0x4584116c8085885a,
1659 fidl::encoding::DynamicFlags::FLEXIBLE,
1660 _decode,
1661 )
1662 }
1663}
1664
1665pub struct CapabilityStoreEventStream {
1666 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1667}
1668
1669impl std::marker::Unpin for CapabilityStoreEventStream {}
1670
1671impl futures::stream::FusedStream for CapabilityStoreEventStream {
1672 fn is_terminated(&self) -> bool {
1673 self.event_receiver.is_terminated()
1674 }
1675}
1676
1677impl futures::Stream for CapabilityStoreEventStream {
1678 type Item = Result<CapabilityStoreEvent, fidl::Error>;
1679
1680 fn poll_next(
1681 mut self: std::pin::Pin<&mut Self>,
1682 cx: &mut std::task::Context<'_>,
1683 ) -> std::task::Poll<Option<Self::Item>> {
1684 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1685 &mut self.event_receiver,
1686 cx
1687 )?) {
1688 Some(buf) => std::task::Poll::Ready(Some(CapabilityStoreEvent::decode(buf))),
1689 None => std::task::Poll::Ready(None),
1690 }
1691 }
1692}
1693
1694#[derive(Debug)]
1695pub enum CapabilityStoreEvent {
1696 #[non_exhaustive]
1697 _UnknownEvent {
1698 ordinal: u64,
1700 },
1701}
1702
1703impl CapabilityStoreEvent {
1704 fn decode(
1706 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1707 ) -> Result<CapabilityStoreEvent, fidl::Error> {
1708 let (bytes, _handles) = buf.split_mut();
1709 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1710 debug_assert_eq!(tx_header.tx_id, 0);
1711 match tx_header.ordinal {
1712 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1713 Ok(CapabilityStoreEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1714 }
1715 _ => Err(fidl::Error::UnknownOrdinal {
1716 ordinal: tx_header.ordinal,
1717 protocol_name:
1718 <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1719 }),
1720 }
1721 }
1722}
1723
1724pub struct CapabilityStoreRequestStream {
1726 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1727 is_terminated: bool,
1728}
1729
1730impl std::marker::Unpin for CapabilityStoreRequestStream {}
1731
1732impl futures::stream::FusedStream for CapabilityStoreRequestStream {
1733 fn is_terminated(&self) -> bool {
1734 self.is_terminated
1735 }
1736}
1737
1738impl fdomain_client::fidl::RequestStream for CapabilityStoreRequestStream {
1739 type Protocol = CapabilityStoreMarker;
1740 type ControlHandle = CapabilityStoreControlHandle;
1741
1742 fn from_channel(channel: fdomain_client::Channel) -> Self {
1743 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1744 }
1745
1746 fn control_handle(&self) -> Self::ControlHandle {
1747 CapabilityStoreControlHandle { inner: self.inner.clone() }
1748 }
1749
1750 fn into_inner(
1751 self,
1752 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1753 {
1754 (self.inner, self.is_terminated)
1755 }
1756
1757 fn from_inner(
1758 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1759 is_terminated: bool,
1760 ) -> Self {
1761 Self { inner, is_terminated }
1762 }
1763}
1764
1765impl futures::Stream for CapabilityStoreRequestStream {
1766 type Item = Result<CapabilityStoreRequest, fidl::Error>;
1767
1768 fn poll_next(
1769 mut self: std::pin::Pin<&mut Self>,
1770 cx: &mut std::task::Context<'_>,
1771 ) -> std::task::Poll<Option<Self::Item>> {
1772 let this = &mut *self;
1773 if this.inner.check_shutdown(cx) {
1774 this.is_terminated = true;
1775 return std::task::Poll::Ready(None);
1776 }
1777 if this.is_terminated {
1778 panic!("polled CapabilityStoreRequestStream after completion");
1779 }
1780 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1781 |bytes, handles| {
1782 match this.inner.channel().read_etc(cx, bytes, handles) {
1783 std::task::Poll::Ready(Ok(())) => {}
1784 std::task::Poll::Pending => return std::task::Poll::Pending,
1785 std::task::Poll::Ready(Err(None)) => {
1786 this.is_terminated = true;
1787 return std::task::Poll::Ready(None);
1788 }
1789 std::task::Poll::Ready(Err(Some(e))) => {
1790 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1791 e.into(),
1792 ))));
1793 }
1794 }
1795
1796 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1798
1799 std::task::Poll::Ready(Some(match header.ordinal {
1800 0x5d5d35d9c20a2184 => {
1801 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1802 let mut req = fidl::new_empty!(CapabilityStoreDuplicateRequest, fdomain_client::fidl::FDomainResourceDialect);
1803 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDuplicateRequest>(&header, _body_bytes, handles, &mut req)?;
1804 let control_handle = CapabilityStoreControlHandle {
1805 inner: this.inner.clone(),
1806 };
1807 Ok(CapabilityStoreRequest::Duplicate {id: req.id,
1808dest_id: req.dest_id,
1809
1810 responder: CapabilityStoreDuplicateResponder {
1811 control_handle: std::mem::ManuallyDrop::new(control_handle),
1812 tx_id: header.tx_id,
1813 },
1814 })
1815 }
1816 0xa745c0990fc2559 => {
1817 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1818 let mut req = fidl::new_empty!(CapabilityStoreDropRequest, fdomain_client::fidl::FDomainResourceDialect);
1819 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDropRequest>(&header, _body_bytes, handles, &mut req)?;
1820 let control_handle = CapabilityStoreControlHandle {
1821 inner: this.inner.clone(),
1822 };
1823 Ok(CapabilityStoreRequest::Drop {id: req.id,
1824
1825 responder: CapabilityStoreDropResponder {
1826 control_handle: std::mem::ManuallyDrop::new(control_handle),
1827 tx_id: header.tx_id,
1828 },
1829 })
1830 }
1831 0x3237a8f4748faff => {
1832 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1833 let mut req = fidl::new_empty!(CapabilityStoreExportRequest, fdomain_client::fidl::FDomainResourceDialect);
1834 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreExportRequest>(&header, _body_bytes, handles, &mut req)?;
1835 let control_handle = CapabilityStoreControlHandle {
1836 inner: this.inner.clone(),
1837 };
1838 Ok(CapabilityStoreRequest::Export {id: req.id,
1839
1840 responder: CapabilityStoreExportResponder {
1841 control_handle: std::mem::ManuallyDrop::new(control_handle),
1842 tx_id: header.tx_id,
1843 },
1844 })
1845 }
1846 0x1f96157a29f4539b => {
1847 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1848 let mut req = fidl::new_empty!(CapabilityStoreImportRequest, fdomain_client::fidl::FDomainResourceDialect);
1849 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreImportRequest>(&header, _body_bytes, handles, &mut req)?;
1850 let control_handle = CapabilityStoreControlHandle {
1851 inner: this.inner.clone(),
1852 };
1853 Ok(CapabilityStoreRequest::Import {id: req.id,
1854capability: req.capability,
1855
1856 responder: CapabilityStoreImportResponder {
1857 control_handle: std::mem::ManuallyDrop::new(control_handle),
1858 tx_id: header.tx_id,
1859 },
1860 })
1861 }
1862 0x29592c5d63e91c25 => {
1863 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1864 let mut req = fidl::new_empty!(CapabilityStoreConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1865 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1866 let control_handle = CapabilityStoreControlHandle {
1867 inner: this.inner.clone(),
1868 };
1869 Ok(CapabilityStoreRequest::ConnectorCreate {id: req.id,
1870receiver: req.receiver,
1871
1872 responder: CapabilityStoreConnectorCreateResponder {
1873 control_handle: std::mem::ManuallyDrop::new(control_handle),
1874 tx_id: header.tx_id,
1875 },
1876 })
1877 }
1878 0x537e69ab40563b9f => {
1879 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1880 let mut req = fidl::new_empty!(CapabilityStoreConnectorOpenRequest, fdomain_client::fidl::FDomainResourceDialect);
1881 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
1882 let control_handle = CapabilityStoreControlHandle {
1883 inner: this.inner.clone(),
1884 };
1885 Ok(CapabilityStoreRequest::ConnectorOpen {id: req.id,
1886server_end: req.server_end,
1887
1888 responder: CapabilityStoreConnectorOpenResponder {
1889 control_handle: std::mem::ManuallyDrop::new(control_handle),
1890 tx_id: header.tx_id,
1891 },
1892 })
1893 }
1894 0x186138a11ccf19bb => {
1895 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1896 let mut req = fidl::new_empty!(CapabilityStoreDirConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1897 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDirConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1898 let control_handle = CapabilityStoreControlHandle {
1899 inner: this.inner.clone(),
1900 };
1901 Ok(CapabilityStoreRequest::DirConnectorCreate {id: req.id,
1902receiver: req.receiver,
1903
1904 responder: CapabilityStoreDirConnectorCreateResponder {
1905 control_handle: std::mem::ManuallyDrop::new(control_handle),
1906 tx_id: header.tx_id,
1907 },
1908 })
1909 }
1910 0x5650d3d6a3a13901 => {
1911 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1912 let mut req = fidl::new_empty!(CapabilityStoreDirConnectorOpenRequest, fdomain_client::fidl::FDomainResourceDialect);
1913 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDirConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
1914 let control_handle = CapabilityStoreControlHandle {
1915 inner: this.inner.clone(),
1916 };
1917 Ok(CapabilityStoreRequest::DirConnectorOpen {payload: req,
1918 responder: CapabilityStoreDirConnectorOpenResponder {
1919 control_handle: std::mem::ManuallyDrop::new(control_handle),
1920 tx_id: header.tx_id,
1921 },
1922 })
1923 }
1924 0x6997c8dfc63de093 => {
1925 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1926 let mut req = fidl::new_empty!(CapabilityStoreDictionaryCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1927 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1928 let control_handle = CapabilityStoreControlHandle {
1929 inner: this.inner.clone(),
1930 };
1931 Ok(CapabilityStoreRequest::DictionaryCreate {id: req.id,
1932
1933 responder: CapabilityStoreDictionaryCreateResponder {
1934 control_handle: std::mem::ManuallyDrop::new(control_handle),
1935 tx_id: header.tx_id,
1936 },
1937 })
1938 }
1939 0x72fd686c37b6025f => {
1940 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1941 let mut req = fidl::new_empty!(CapabilityStoreDictionaryLegacyImportRequest, fdomain_client::fidl::FDomainResourceDialect);
1942 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyImportRequest>(&header, _body_bytes, handles, &mut req)?;
1943 let control_handle = CapabilityStoreControlHandle {
1944 inner: this.inner.clone(),
1945 };
1946 Ok(CapabilityStoreRequest::DictionaryLegacyImport {id: req.id,
1947client_end: req.client_end,
1948
1949 responder: CapabilityStoreDictionaryLegacyImportResponder {
1950 control_handle: std::mem::ManuallyDrop::new(control_handle),
1951 tx_id: header.tx_id,
1952 },
1953 })
1954 }
1955 0x407e15cc4bde5dcd => {
1956 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1957 let mut req = fidl::new_empty!(CapabilityStoreDictionaryLegacyExportRequest, fdomain_client::fidl::FDomainResourceDialect);
1958 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyExportRequest>(&header, _body_bytes, handles, &mut req)?;
1959 let control_handle = CapabilityStoreControlHandle {
1960 inner: this.inner.clone(),
1961 };
1962 Ok(CapabilityStoreRequest::DictionaryLegacyExport {id: req.id,
1963server_end: req.server_end,
1964
1965 responder: CapabilityStoreDictionaryLegacyExportResponder {
1966 control_handle: std::mem::ManuallyDrop::new(control_handle),
1967 tx_id: header.tx_id,
1968 },
1969 })
1970 }
1971 0x7702183689d44c27 => {
1972 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1973 let mut req = fidl::new_empty!(CapabilityStoreDictionaryInsertRequest, fdomain_client::fidl::FDomainResourceDialect);
1974 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryInsertRequest>(&header, _body_bytes, handles, &mut req)?;
1975 let control_handle = CapabilityStoreControlHandle {
1976 inner: this.inner.clone(),
1977 };
1978 Ok(CapabilityStoreRequest::DictionaryInsert {id: req.id,
1979item: req.item,
1980
1981 responder: CapabilityStoreDictionaryInsertResponder {
1982 control_handle: std::mem::ManuallyDrop::new(control_handle),
1983 tx_id: header.tx_id,
1984 },
1985 })
1986 }
1987 0x4d9e27538284add2 => {
1988 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1989 let mut req = fidl::new_empty!(CapabilityStoreDictionaryGetRequest, fdomain_client::fidl::FDomainResourceDialect);
1990 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryGetRequest>(&header, _body_bytes, handles, &mut req)?;
1991 let control_handle = CapabilityStoreControlHandle {
1992 inner: this.inner.clone(),
1993 };
1994 Ok(CapabilityStoreRequest::DictionaryGet {id: req.id,
1995key: req.key,
1996dest_id: req.dest_id,
1997
1998 responder: CapabilityStoreDictionaryGetResponder {
1999 control_handle: std::mem::ManuallyDrop::new(control_handle),
2000 tx_id: header.tx_id,
2001 },
2002 })
2003 }
2004 0x4c5c025ab05d4f3 => {
2005 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2006 let mut req = fidl::new_empty!(CapabilityStoreDictionaryRemoveRequest, fdomain_client::fidl::FDomainResourceDialect);
2007 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryRemoveRequest>(&header, _body_bytes, handles, &mut req)?;
2008 let control_handle = CapabilityStoreControlHandle {
2009 inner: this.inner.clone(),
2010 };
2011 Ok(CapabilityStoreRequest::DictionaryRemove {id: req.id,
2012key: req.key,
2013dest_id: req.dest_id,
2014
2015 responder: CapabilityStoreDictionaryRemoveResponder {
2016 control_handle: std::mem::ManuallyDrop::new(control_handle),
2017 tx_id: header.tx_id,
2018 },
2019 })
2020 }
2021 0x3733ecdf4ea1b44f => {
2022 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2023 let mut req = fidl::new_empty!(CapabilityStoreDictionaryCopyRequest, fdomain_client::fidl::FDomainResourceDialect);
2024 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryCopyRequest>(&header, _body_bytes, handles, &mut req)?;
2025 let control_handle = CapabilityStoreControlHandle {
2026 inner: this.inner.clone(),
2027 };
2028 Ok(CapabilityStoreRequest::DictionaryCopy {id: req.id,
2029dest_id: req.dest_id,
2030
2031 responder: CapabilityStoreDictionaryCopyResponder {
2032 control_handle: std::mem::ManuallyDrop::new(control_handle),
2033 tx_id: header.tx_id,
2034 },
2035 })
2036 }
2037 0x84b05577ceaec9e => {
2038 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2039 let mut req = fidl::new_empty!(CapabilityStoreDictionaryKeysRequest, fdomain_client::fidl::FDomainResourceDialect);
2040 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryKeysRequest>(&header, _body_bytes, handles, &mut req)?;
2041 let control_handle = CapabilityStoreControlHandle {
2042 inner: this.inner.clone(),
2043 };
2044 Ok(CapabilityStoreRequest::DictionaryKeys {id: req.id,
2045iterator: req.iterator,
2046
2047 responder: CapabilityStoreDictionaryKeysResponder {
2048 control_handle: std::mem::ManuallyDrop::new(control_handle),
2049 tx_id: header.tx_id,
2050 },
2051 })
2052 }
2053 0xd6279b6ced04641 => {
2054 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2055 let mut req = fidl::new_empty!(CapabilityStoreDictionaryEnumerateRequest, fdomain_client::fidl::FDomainResourceDialect);
2056 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
2057 let control_handle = CapabilityStoreControlHandle {
2058 inner: this.inner.clone(),
2059 };
2060 Ok(CapabilityStoreRequest::DictionaryEnumerate {id: req.id,
2061iterator: req.iterator,
2062
2063 responder: CapabilityStoreDictionaryEnumerateResponder {
2064 control_handle: std::mem::ManuallyDrop::new(control_handle),
2065 tx_id: header.tx_id,
2066 },
2067 })
2068 }
2069 0x28a3a3f84d928cd8 => {
2070 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2071 let mut req = fidl::new_empty!(CapabilityStoreDictionaryDrainRequest, fdomain_client::fidl::FDomainResourceDialect);
2072 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryDrainRequest>(&header, _body_bytes, handles, &mut req)?;
2073 let control_handle = CapabilityStoreControlHandle {
2074 inner: this.inner.clone(),
2075 };
2076 Ok(CapabilityStoreRequest::DictionaryDrain {id: req.id,
2077iterator: req.iterator,
2078
2079 responder: CapabilityStoreDictionaryDrainResponder {
2080 control_handle: std::mem::ManuallyDrop::new(control_handle),
2081 tx_id: header.tx_id,
2082 },
2083 })
2084 }
2085 0x4584116c8085885a => {
2086 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2087 let mut req = fidl::new_empty!(CapabilityStoreCreateServiceAggregateRequest, fdomain_client::fidl::FDomainResourceDialect);
2088 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreCreateServiceAggregateRequest>(&header, _body_bytes, handles, &mut req)?;
2089 let control_handle = CapabilityStoreControlHandle {
2090 inner: this.inner.clone(),
2091 };
2092 Ok(CapabilityStoreRequest::CreateServiceAggregate {sources: req.sources,
2093
2094 responder: CapabilityStoreCreateServiceAggregateResponder {
2095 control_handle: std::mem::ManuallyDrop::new(control_handle),
2096 tx_id: header.tx_id,
2097 },
2098 })
2099 }
2100 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2101 Ok(CapabilityStoreRequest::_UnknownMethod {
2102 ordinal: header.ordinal,
2103 control_handle: CapabilityStoreControlHandle { inner: this.inner.clone() },
2104 method_type: fidl::MethodType::OneWay,
2105 })
2106 }
2107 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2108 this.inner.send_framework_err(
2109 fidl::encoding::FrameworkErr::UnknownMethod,
2110 header.tx_id,
2111 header.ordinal,
2112 header.dynamic_flags(),
2113 (bytes, handles),
2114 )?;
2115 Ok(CapabilityStoreRequest::_UnknownMethod {
2116 ordinal: header.ordinal,
2117 control_handle: CapabilityStoreControlHandle { inner: this.inner.clone() },
2118 method_type: fidl::MethodType::TwoWay,
2119 })
2120 }
2121 _ => Err(fidl::Error::UnknownOrdinal {
2122 ordinal: header.ordinal,
2123 protocol_name: <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2124 }),
2125 }))
2126 },
2127 )
2128 }
2129}
2130
2131#[derive(Debug)]
2155pub enum CapabilityStoreRequest {
2156 Duplicate { id: u64, dest_id: u64, responder: CapabilityStoreDuplicateResponder },
2164 Drop { id: u64, responder: CapabilityStoreDropResponder },
2170 Export { id: u64, responder: CapabilityStoreExportResponder },
2178 Import { id: u64, capability: Capability, responder: CapabilityStoreImportResponder },
2185 ConnectorCreate {
2192 id: u64,
2193 receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
2194 responder: CapabilityStoreConnectorCreateResponder,
2195 },
2196 ConnectorOpen {
2206 id: u64,
2207 server_end: fdomain_client::Channel,
2208 responder: CapabilityStoreConnectorOpenResponder,
2209 },
2210 DirConnectorCreate {
2217 id: u64,
2218 receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
2219 responder: CapabilityStoreDirConnectorCreateResponder,
2220 },
2221 DirConnectorOpen {
2235 payload: CapabilityStoreDirConnectorOpenRequest,
2236 responder: CapabilityStoreDirConnectorOpenResponder,
2237 },
2238 DictionaryCreate { id: u64, responder: CapabilityStoreDictionaryCreateResponder },
2244 DictionaryLegacyImport {
2254 id: u64,
2255 client_end: fdomain_client::Channel,
2256 responder: CapabilityStoreDictionaryLegacyImportResponder,
2257 },
2258 DictionaryLegacyExport {
2268 id: u64,
2269 server_end: fdomain_client::Channel,
2270 responder: CapabilityStoreDictionaryLegacyExportResponder,
2271 },
2272 DictionaryInsert {
2282 id: u64,
2283 item: DictionaryItem,
2284 responder: CapabilityStoreDictionaryInsertResponder,
2285 },
2286 DictionaryGet {
2298 id: u64,
2299 key: String,
2300 dest_id: u64,
2301 responder: CapabilityStoreDictionaryGetResponder,
2302 },
2303 DictionaryRemove {
2314 id: u64,
2315 key: String,
2316 dest_id: Option<Box<WrappedCapabilityId>>,
2317 responder: CapabilityStoreDictionaryRemoveResponder,
2318 },
2319 DictionaryCopy { id: u64, dest_id: u64, responder: CapabilityStoreDictionaryCopyResponder },
2335 DictionaryKeys {
2342 id: u64,
2343 iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
2344 responder: CapabilityStoreDictionaryKeysResponder,
2345 },
2346 DictionaryEnumerate {
2356 id: u64,
2357 iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
2358 responder: CapabilityStoreDictionaryEnumerateResponder,
2359 },
2360 DictionaryDrain {
2368 id: u64,
2369 iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
2370 responder: CapabilityStoreDictionaryDrainResponder,
2371 },
2372 CreateServiceAggregate {
2375 sources: Vec<AggregateSource>,
2376 responder: CapabilityStoreCreateServiceAggregateResponder,
2377 },
2378 #[non_exhaustive]
2380 _UnknownMethod {
2381 ordinal: u64,
2383 control_handle: CapabilityStoreControlHandle,
2384 method_type: fidl::MethodType,
2385 },
2386}
2387
2388impl CapabilityStoreRequest {
2389 #[allow(irrefutable_let_patterns)]
2390 pub fn into_duplicate(self) -> Option<(u64, u64, CapabilityStoreDuplicateResponder)> {
2391 if let CapabilityStoreRequest::Duplicate { id, dest_id, responder } = self {
2392 Some((id, dest_id, responder))
2393 } else {
2394 None
2395 }
2396 }
2397
2398 #[allow(irrefutable_let_patterns)]
2399 pub fn into_drop(self) -> Option<(u64, CapabilityStoreDropResponder)> {
2400 if let CapabilityStoreRequest::Drop { id, responder } = self {
2401 Some((id, responder))
2402 } else {
2403 None
2404 }
2405 }
2406
2407 #[allow(irrefutable_let_patterns)]
2408 pub fn into_export(self) -> Option<(u64, CapabilityStoreExportResponder)> {
2409 if let CapabilityStoreRequest::Export { id, responder } = self {
2410 Some((id, responder))
2411 } else {
2412 None
2413 }
2414 }
2415
2416 #[allow(irrefutable_let_patterns)]
2417 pub fn into_import(self) -> Option<(u64, Capability, CapabilityStoreImportResponder)> {
2418 if let CapabilityStoreRequest::Import { id, capability, responder } = self {
2419 Some((id, capability, responder))
2420 } else {
2421 None
2422 }
2423 }
2424
2425 #[allow(irrefutable_let_patterns)]
2426 pub fn into_connector_create(
2427 self,
2428 ) -> Option<(
2429 u64,
2430 fdomain_client::fidl::ClientEnd<ReceiverMarker>,
2431 CapabilityStoreConnectorCreateResponder,
2432 )> {
2433 if let CapabilityStoreRequest::ConnectorCreate { id, receiver, responder } = self {
2434 Some((id, receiver, responder))
2435 } else {
2436 None
2437 }
2438 }
2439
2440 #[allow(irrefutable_let_patterns)]
2441 pub fn into_connector_open(
2442 self,
2443 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreConnectorOpenResponder)> {
2444 if let CapabilityStoreRequest::ConnectorOpen { id, server_end, responder } = self {
2445 Some((id, server_end, responder))
2446 } else {
2447 None
2448 }
2449 }
2450
2451 #[allow(irrefutable_let_patterns)]
2452 pub fn into_dir_connector_create(
2453 self,
2454 ) -> Option<(
2455 u64,
2456 fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
2457 CapabilityStoreDirConnectorCreateResponder,
2458 )> {
2459 if let CapabilityStoreRequest::DirConnectorCreate { id, receiver, responder } = self {
2460 Some((id, receiver, responder))
2461 } else {
2462 None
2463 }
2464 }
2465
2466 #[allow(irrefutable_let_patterns)]
2467 pub fn into_dir_connector_open(
2468 self,
2469 ) -> Option<(CapabilityStoreDirConnectorOpenRequest, CapabilityStoreDirConnectorOpenResponder)>
2470 {
2471 if let CapabilityStoreRequest::DirConnectorOpen { payload, responder } = self {
2472 Some((payload, responder))
2473 } else {
2474 None
2475 }
2476 }
2477
2478 #[allow(irrefutable_let_patterns)]
2479 pub fn into_dictionary_create(self) -> Option<(u64, CapabilityStoreDictionaryCreateResponder)> {
2480 if let CapabilityStoreRequest::DictionaryCreate { id, responder } = self {
2481 Some((id, responder))
2482 } else {
2483 None
2484 }
2485 }
2486
2487 #[allow(irrefutable_let_patterns)]
2488 pub fn into_dictionary_legacy_import(
2489 self,
2490 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreDictionaryLegacyImportResponder)>
2491 {
2492 if let CapabilityStoreRequest::DictionaryLegacyImport { id, client_end, responder } = self {
2493 Some((id, client_end, responder))
2494 } else {
2495 None
2496 }
2497 }
2498
2499 #[allow(irrefutable_let_patterns)]
2500 pub fn into_dictionary_legacy_export(
2501 self,
2502 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreDictionaryLegacyExportResponder)>
2503 {
2504 if let CapabilityStoreRequest::DictionaryLegacyExport { id, server_end, responder } = self {
2505 Some((id, server_end, responder))
2506 } else {
2507 None
2508 }
2509 }
2510
2511 #[allow(irrefutable_let_patterns)]
2512 pub fn into_dictionary_insert(
2513 self,
2514 ) -> Option<(u64, DictionaryItem, CapabilityStoreDictionaryInsertResponder)> {
2515 if let CapabilityStoreRequest::DictionaryInsert { id, item, responder } = self {
2516 Some((id, item, responder))
2517 } else {
2518 None
2519 }
2520 }
2521
2522 #[allow(irrefutable_let_patterns)]
2523 pub fn into_dictionary_get(
2524 self,
2525 ) -> Option<(u64, String, u64, CapabilityStoreDictionaryGetResponder)> {
2526 if let CapabilityStoreRequest::DictionaryGet { id, key, dest_id, responder } = self {
2527 Some((id, key, dest_id, responder))
2528 } else {
2529 None
2530 }
2531 }
2532
2533 #[allow(irrefutable_let_patterns)]
2534 pub fn into_dictionary_remove(
2535 self,
2536 ) -> Option<(
2537 u64,
2538 String,
2539 Option<Box<WrappedCapabilityId>>,
2540 CapabilityStoreDictionaryRemoveResponder,
2541 )> {
2542 if let CapabilityStoreRequest::DictionaryRemove { id, key, dest_id, responder } = self {
2543 Some((id, key, dest_id, responder))
2544 } else {
2545 None
2546 }
2547 }
2548
2549 #[allow(irrefutable_let_patterns)]
2550 pub fn into_dictionary_copy(
2551 self,
2552 ) -> Option<(u64, u64, CapabilityStoreDictionaryCopyResponder)> {
2553 if let CapabilityStoreRequest::DictionaryCopy { id, dest_id, responder } = self {
2554 Some((id, dest_id, responder))
2555 } else {
2556 None
2557 }
2558 }
2559
2560 #[allow(irrefutable_let_patterns)]
2561 pub fn into_dictionary_keys(
2562 self,
2563 ) -> Option<(
2564 u64,
2565 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
2566 CapabilityStoreDictionaryKeysResponder,
2567 )> {
2568 if let CapabilityStoreRequest::DictionaryKeys { id, iterator, responder } = self {
2569 Some((id, iterator, responder))
2570 } else {
2571 None
2572 }
2573 }
2574
2575 #[allow(irrefutable_let_patterns)]
2576 pub fn into_dictionary_enumerate(
2577 self,
2578 ) -> Option<(
2579 u64,
2580 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
2581 CapabilityStoreDictionaryEnumerateResponder,
2582 )> {
2583 if let CapabilityStoreRequest::DictionaryEnumerate { id, iterator, responder } = self {
2584 Some((id, iterator, responder))
2585 } else {
2586 None
2587 }
2588 }
2589
2590 #[allow(irrefutable_let_patterns)]
2591 pub fn into_dictionary_drain(
2592 self,
2593 ) -> Option<(
2594 u64,
2595 Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
2596 CapabilityStoreDictionaryDrainResponder,
2597 )> {
2598 if let CapabilityStoreRequest::DictionaryDrain { id, iterator, responder } = self {
2599 Some((id, iterator, responder))
2600 } else {
2601 None
2602 }
2603 }
2604
2605 #[allow(irrefutable_let_patterns)]
2606 pub fn into_create_service_aggregate(
2607 self,
2608 ) -> Option<(Vec<AggregateSource>, CapabilityStoreCreateServiceAggregateResponder)> {
2609 if let CapabilityStoreRequest::CreateServiceAggregate { sources, responder } = self {
2610 Some((sources, responder))
2611 } else {
2612 None
2613 }
2614 }
2615
2616 pub fn method_name(&self) -> &'static str {
2618 match *self {
2619 CapabilityStoreRequest::Duplicate { .. } => "duplicate",
2620 CapabilityStoreRequest::Drop { .. } => "drop",
2621 CapabilityStoreRequest::Export { .. } => "export",
2622 CapabilityStoreRequest::Import { .. } => "import",
2623 CapabilityStoreRequest::ConnectorCreate { .. } => "connector_create",
2624 CapabilityStoreRequest::ConnectorOpen { .. } => "connector_open",
2625 CapabilityStoreRequest::DirConnectorCreate { .. } => "dir_connector_create",
2626 CapabilityStoreRequest::DirConnectorOpen { .. } => "dir_connector_open",
2627 CapabilityStoreRequest::DictionaryCreate { .. } => "dictionary_create",
2628 CapabilityStoreRequest::DictionaryLegacyImport { .. } => "dictionary_legacy_import",
2629 CapabilityStoreRequest::DictionaryLegacyExport { .. } => "dictionary_legacy_export",
2630 CapabilityStoreRequest::DictionaryInsert { .. } => "dictionary_insert",
2631 CapabilityStoreRequest::DictionaryGet { .. } => "dictionary_get",
2632 CapabilityStoreRequest::DictionaryRemove { .. } => "dictionary_remove",
2633 CapabilityStoreRequest::DictionaryCopy { .. } => "dictionary_copy",
2634 CapabilityStoreRequest::DictionaryKeys { .. } => "dictionary_keys",
2635 CapabilityStoreRequest::DictionaryEnumerate { .. } => "dictionary_enumerate",
2636 CapabilityStoreRequest::DictionaryDrain { .. } => "dictionary_drain",
2637 CapabilityStoreRequest::CreateServiceAggregate { .. } => "create_service_aggregate",
2638 CapabilityStoreRequest::_UnknownMethod {
2639 method_type: fidl::MethodType::OneWay,
2640 ..
2641 } => "unknown one-way method",
2642 CapabilityStoreRequest::_UnknownMethod {
2643 method_type: fidl::MethodType::TwoWay,
2644 ..
2645 } => "unknown two-way method",
2646 }
2647 }
2648}
2649
2650#[derive(Debug, Clone)]
2651pub struct CapabilityStoreControlHandle {
2652 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2653}
2654
2655impl fdomain_client::fidl::ControlHandle for CapabilityStoreControlHandle {
2656 fn shutdown(&self) {
2657 self.inner.shutdown()
2658 }
2659
2660 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2661 self.inner.shutdown_with_epitaph(status)
2662 }
2663
2664 fn is_closed(&self) -> bool {
2665 self.inner.channel().is_closed()
2666 }
2667 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
2668 self.inner.channel().on_closed()
2669 }
2670}
2671
2672impl CapabilityStoreControlHandle {}
2673
2674#[must_use = "FIDL methods require a response to be sent"]
2675#[derive(Debug)]
2676pub struct CapabilityStoreDuplicateResponder {
2677 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2678 tx_id: u32,
2679}
2680
2681impl std::ops::Drop for CapabilityStoreDuplicateResponder {
2685 fn drop(&mut self) {
2686 self.control_handle.shutdown();
2687 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2689 }
2690}
2691
2692impl fdomain_client::fidl::Responder for CapabilityStoreDuplicateResponder {
2693 type ControlHandle = CapabilityStoreControlHandle;
2694
2695 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2696 &self.control_handle
2697 }
2698
2699 fn drop_without_shutdown(mut self) {
2700 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2702 std::mem::forget(self);
2704 }
2705}
2706
2707impl CapabilityStoreDuplicateResponder {
2708 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2712 let _result = self.send_raw(result);
2713 if _result.is_err() {
2714 self.control_handle.shutdown();
2715 }
2716 self.drop_without_shutdown();
2717 _result
2718 }
2719
2720 pub fn send_no_shutdown_on_err(
2722 self,
2723 mut result: Result<(), CapabilityStoreError>,
2724 ) -> Result<(), fidl::Error> {
2725 let _result = self.send_raw(result);
2726 self.drop_without_shutdown();
2727 _result
2728 }
2729
2730 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2731 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2732 fidl::encoding::EmptyStruct,
2733 CapabilityStoreError,
2734 >>(
2735 fidl::encoding::FlexibleResult::new(result),
2736 self.tx_id,
2737 0x5d5d35d9c20a2184,
2738 fidl::encoding::DynamicFlags::FLEXIBLE,
2739 )
2740 }
2741}
2742
2743#[must_use = "FIDL methods require a response to be sent"]
2744#[derive(Debug)]
2745pub struct CapabilityStoreDropResponder {
2746 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2747 tx_id: u32,
2748}
2749
2750impl std::ops::Drop for CapabilityStoreDropResponder {
2754 fn drop(&mut self) {
2755 self.control_handle.shutdown();
2756 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2758 }
2759}
2760
2761impl fdomain_client::fidl::Responder for CapabilityStoreDropResponder {
2762 type ControlHandle = CapabilityStoreControlHandle;
2763
2764 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2765 &self.control_handle
2766 }
2767
2768 fn drop_without_shutdown(mut self) {
2769 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2771 std::mem::forget(self);
2773 }
2774}
2775
2776impl CapabilityStoreDropResponder {
2777 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2781 let _result = self.send_raw(result);
2782 if _result.is_err() {
2783 self.control_handle.shutdown();
2784 }
2785 self.drop_without_shutdown();
2786 _result
2787 }
2788
2789 pub fn send_no_shutdown_on_err(
2791 self,
2792 mut result: Result<(), CapabilityStoreError>,
2793 ) -> Result<(), fidl::Error> {
2794 let _result = self.send_raw(result);
2795 self.drop_without_shutdown();
2796 _result
2797 }
2798
2799 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2800 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2801 fidl::encoding::EmptyStruct,
2802 CapabilityStoreError,
2803 >>(
2804 fidl::encoding::FlexibleResult::new(result),
2805 self.tx_id,
2806 0xa745c0990fc2559,
2807 fidl::encoding::DynamicFlags::FLEXIBLE,
2808 )
2809 }
2810}
2811
2812#[must_use = "FIDL methods require a response to be sent"]
2813#[derive(Debug)]
2814pub struct CapabilityStoreExportResponder {
2815 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2816 tx_id: u32,
2817}
2818
2819impl std::ops::Drop for CapabilityStoreExportResponder {
2823 fn drop(&mut self) {
2824 self.control_handle.shutdown();
2825 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2827 }
2828}
2829
2830impl fdomain_client::fidl::Responder for CapabilityStoreExportResponder {
2831 type ControlHandle = CapabilityStoreControlHandle;
2832
2833 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2834 &self.control_handle
2835 }
2836
2837 fn drop_without_shutdown(mut self) {
2838 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2840 std::mem::forget(self);
2842 }
2843}
2844
2845impl CapabilityStoreExportResponder {
2846 pub fn send(
2850 self,
2851 mut result: Result<Capability, CapabilityStoreError>,
2852 ) -> Result<(), fidl::Error> {
2853 let _result = self.send_raw(result);
2854 if _result.is_err() {
2855 self.control_handle.shutdown();
2856 }
2857 self.drop_without_shutdown();
2858 _result
2859 }
2860
2861 pub fn send_no_shutdown_on_err(
2863 self,
2864 mut result: Result<Capability, CapabilityStoreError>,
2865 ) -> Result<(), fidl::Error> {
2866 let _result = self.send_raw(result);
2867 self.drop_without_shutdown();
2868 _result
2869 }
2870
2871 fn send_raw(
2872 &self,
2873 mut result: Result<Capability, CapabilityStoreError>,
2874 ) -> Result<(), fidl::Error> {
2875 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2876 CapabilityStoreExportResponse,
2877 CapabilityStoreError,
2878 >>(
2879 fidl::encoding::FlexibleResult::new(
2880 result.as_mut().map_err(|e| *e).map(|capability| (capability,)),
2881 ),
2882 self.tx_id,
2883 0x3237a8f4748faff,
2884 fidl::encoding::DynamicFlags::FLEXIBLE,
2885 )
2886 }
2887}
2888
2889#[must_use = "FIDL methods require a response to be sent"]
2890#[derive(Debug)]
2891pub struct CapabilityStoreImportResponder {
2892 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2893 tx_id: u32,
2894}
2895
2896impl std::ops::Drop for CapabilityStoreImportResponder {
2900 fn drop(&mut self) {
2901 self.control_handle.shutdown();
2902 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2904 }
2905}
2906
2907impl fdomain_client::fidl::Responder for CapabilityStoreImportResponder {
2908 type ControlHandle = CapabilityStoreControlHandle;
2909
2910 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2911 &self.control_handle
2912 }
2913
2914 fn drop_without_shutdown(mut self) {
2915 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2917 std::mem::forget(self);
2919 }
2920}
2921
2922impl CapabilityStoreImportResponder {
2923 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2927 let _result = self.send_raw(result);
2928 if _result.is_err() {
2929 self.control_handle.shutdown();
2930 }
2931 self.drop_without_shutdown();
2932 _result
2933 }
2934
2935 pub fn send_no_shutdown_on_err(
2937 self,
2938 mut result: Result<(), CapabilityStoreError>,
2939 ) -> Result<(), fidl::Error> {
2940 let _result = self.send_raw(result);
2941 self.drop_without_shutdown();
2942 _result
2943 }
2944
2945 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2946 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2947 fidl::encoding::EmptyStruct,
2948 CapabilityStoreError,
2949 >>(
2950 fidl::encoding::FlexibleResult::new(result),
2951 self.tx_id,
2952 0x1f96157a29f4539b,
2953 fidl::encoding::DynamicFlags::FLEXIBLE,
2954 )
2955 }
2956}
2957
2958#[must_use = "FIDL methods require a response to be sent"]
2959#[derive(Debug)]
2960pub struct CapabilityStoreConnectorCreateResponder {
2961 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2962 tx_id: u32,
2963}
2964
2965impl std::ops::Drop for CapabilityStoreConnectorCreateResponder {
2969 fn drop(&mut self) {
2970 self.control_handle.shutdown();
2971 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2973 }
2974}
2975
2976impl fdomain_client::fidl::Responder for CapabilityStoreConnectorCreateResponder {
2977 type ControlHandle = CapabilityStoreControlHandle;
2978
2979 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2980 &self.control_handle
2981 }
2982
2983 fn drop_without_shutdown(mut self) {
2984 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2986 std::mem::forget(self);
2988 }
2989}
2990
2991impl CapabilityStoreConnectorCreateResponder {
2992 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2996 let _result = self.send_raw(result);
2997 if _result.is_err() {
2998 self.control_handle.shutdown();
2999 }
3000 self.drop_without_shutdown();
3001 _result
3002 }
3003
3004 pub fn send_no_shutdown_on_err(
3006 self,
3007 mut result: Result<(), CapabilityStoreError>,
3008 ) -> Result<(), fidl::Error> {
3009 let _result = self.send_raw(result);
3010 self.drop_without_shutdown();
3011 _result
3012 }
3013
3014 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3015 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3016 fidl::encoding::EmptyStruct,
3017 CapabilityStoreError,
3018 >>(
3019 fidl::encoding::FlexibleResult::new(result),
3020 self.tx_id,
3021 0x29592c5d63e91c25,
3022 fidl::encoding::DynamicFlags::FLEXIBLE,
3023 )
3024 }
3025}
3026
3027#[must_use = "FIDL methods require a response to be sent"]
3028#[derive(Debug)]
3029pub struct CapabilityStoreConnectorOpenResponder {
3030 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3031 tx_id: u32,
3032}
3033
3034impl std::ops::Drop for CapabilityStoreConnectorOpenResponder {
3038 fn drop(&mut self) {
3039 self.control_handle.shutdown();
3040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3042 }
3043}
3044
3045impl fdomain_client::fidl::Responder for CapabilityStoreConnectorOpenResponder {
3046 type ControlHandle = CapabilityStoreControlHandle;
3047
3048 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3049 &self.control_handle
3050 }
3051
3052 fn drop_without_shutdown(mut self) {
3053 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3055 std::mem::forget(self);
3057 }
3058}
3059
3060impl CapabilityStoreConnectorOpenResponder {
3061 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3065 let _result = self.send_raw(result);
3066 if _result.is_err() {
3067 self.control_handle.shutdown();
3068 }
3069 self.drop_without_shutdown();
3070 _result
3071 }
3072
3073 pub fn send_no_shutdown_on_err(
3075 self,
3076 mut result: Result<(), CapabilityStoreError>,
3077 ) -> Result<(), fidl::Error> {
3078 let _result = self.send_raw(result);
3079 self.drop_without_shutdown();
3080 _result
3081 }
3082
3083 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3084 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3085 fidl::encoding::EmptyStruct,
3086 CapabilityStoreError,
3087 >>(
3088 fidl::encoding::FlexibleResult::new(result),
3089 self.tx_id,
3090 0x537e69ab40563b9f,
3091 fidl::encoding::DynamicFlags::FLEXIBLE,
3092 )
3093 }
3094}
3095
3096#[must_use = "FIDL methods require a response to be sent"]
3097#[derive(Debug)]
3098pub struct CapabilityStoreDirConnectorCreateResponder {
3099 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3100 tx_id: u32,
3101}
3102
3103impl std::ops::Drop for CapabilityStoreDirConnectorCreateResponder {
3107 fn drop(&mut self) {
3108 self.control_handle.shutdown();
3109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3111 }
3112}
3113
3114impl fdomain_client::fidl::Responder for CapabilityStoreDirConnectorCreateResponder {
3115 type ControlHandle = CapabilityStoreControlHandle;
3116
3117 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3118 &self.control_handle
3119 }
3120
3121 fn drop_without_shutdown(mut self) {
3122 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3124 std::mem::forget(self);
3126 }
3127}
3128
3129impl CapabilityStoreDirConnectorCreateResponder {
3130 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3134 let _result = self.send_raw(result);
3135 if _result.is_err() {
3136 self.control_handle.shutdown();
3137 }
3138 self.drop_without_shutdown();
3139 _result
3140 }
3141
3142 pub fn send_no_shutdown_on_err(
3144 self,
3145 mut result: Result<(), CapabilityStoreError>,
3146 ) -> Result<(), fidl::Error> {
3147 let _result = self.send_raw(result);
3148 self.drop_without_shutdown();
3149 _result
3150 }
3151
3152 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3153 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3154 fidl::encoding::EmptyStruct,
3155 CapabilityStoreError,
3156 >>(
3157 fidl::encoding::FlexibleResult::new(result),
3158 self.tx_id,
3159 0x186138a11ccf19bb,
3160 fidl::encoding::DynamicFlags::FLEXIBLE,
3161 )
3162 }
3163}
3164
3165#[must_use = "FIDL methods require a response to be sent"]
3166#[derive(Debug)]
3167pub struct CapabilityStoreDirConnectorOpenResponder {
3168 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3169 tx_id: u32,
3170}
3171
3172impl std::ops::Drop for CapabilityStoreDirConnectorOpenResponder {
3176 fn drop(&mut self) {
3177 self.control_handle.shutdown();
3178 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3180 }
3181}
3182
3183impl fdomain_client::fidl::Responder for CapabilityStoreDirConnectorOpenResponder {
3184 type ControlHandle = CapabilityStoreControlHandle;
3185
3186 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3187 &self.control_handle
3188 }
3189
3190 fn drop_without_shutdown(mut self) {
3191 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3193 std::mem::forget(self);
3195 }
3196}
3197
3198impl CapabilityStoreDirConnectorOpenResponder {
3199 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3203 let _result = self.send_raw(result);
3204 if _result.is_err() {
3205 self.control_handle.shutdown();
3206 }
3207 self.drop_without_shutdown();
3208 _result
3209 }
3210
3211 pub fn send_no_shutdown_on_err(
3213 self,
3214 mut result: Result<(), CapabilityStoreError>,
3215 ) -> Result<(), fidl::Error> {
3216 let _result = self.send_raw(result);
3217 self.drop_without_shutdown();
3218 _result
3219 }
3220
3221 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3222 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3223 fidl::encoding::EmptyStruct,
3224 CapabilityStoreError,
3225 >>(
3226 fidl::encoding::FlexibleResult::new(result),
3227 self.tx_id,
3228 0x5650d3d6a3a13901,
3229 fidl::encoding::DynamicFlags::FLEXIBLE,
3230 )
3231 }
3232}
3233
3234#[must_use = "FIDL methods require a response to be sent"]
3235#[derive(Debug)]
3236pub struct CapabilityStoreDictionaryCreateResponder {
3237 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3238 tx_id: u32,
3239}
3240
3241impl std::ops::Drop for CapabilityStoreDictionaryCreateResponder {
3245 fn drop(&mut self) {
3246 self.control_handle.shutdown();
3247 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3249 }
3250}
3251
3252impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryCreateResponder {
3253 type ControlHandle = CapabilityStoreControlHandle;
3254
3255 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3256 &self.control_handle
3257 }
3258
3259 fn drop_without_shutdown(mut self) {
3260 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3262 std::mem::forget(self);
3264 }
3265}
3266
3267impl CapabilityStoreDictionaryCreateResponder {
3268 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3272 let _result = self.send_raw(result);
3273 if _result.is_err() {
3274 self.control_handle.shutdown();
3275 }
3276 self.drop_without_shutdown();
3277 _result
3278 }
3279
3280 pub fn send_no_shutdown_on_err(
3282 self,
3283 mut result: Result<(), CapabilityStoreError>,
3284 ) -> Result<(), fidl::Error> {
3285 let _result = self.send_raw(result);
3286 self.drop_without_shutdown();
3287 _result
3288 }
3289
3290 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3291 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3292 fidl::encoding::EmptyStruct,
3293 CapabilityStoreError,
3294 >>(
3295 fidl::encoding::FlexibleResult::new(result),
3296 self.tx_id,
3297 0x6997c8dfc63de093,
3298 fidl::encoding::DynamicFlags::FLEXIBLE,
3299 )
3300 }
3301}
3302
3303#[must_use = "FIDL methods require a response to be sent"]
3304#[derive(Debug)]
3305pub struct CapabilityStoreDictionaryLegacyImportResponder {
3306 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3307 tx_id: u32,
3308}
3309
3310impl std::ops::Drop for CapabilityStoreDictionaryLegacyImportResponder {
3314 fn drop(&mut self) {
3315 self.control_handle.shutdown();
3316 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3318 }
3319}
3320
3321impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryLegacyImportResponder {
3322 type ControlHandle = CapabilityStoreControlHandle;
3323
3324 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3325 &self.control_handle
3326 }
3327
3328 fn drop_without_shutdown(mut self) {
3329 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3331 std::mem::forget(self);
3333 }
3334}
3335
3336impl CapabilityStoreDictionaryLegacyImportResponder {
3337 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3341 let _result = self.send_raw(result);
3342 if _result.is_err() {
3343 self.control_handle.shutdown();
3344 }
3345 self.drop_without_shutdown();
3346 _result
3347 }
3348
3349 pub fn send_no_shutdown_on_err(
3351 self,
3352 mut result: Result<(), CapabilityStoreError>,
3353 ) -> Result<(), fidl::Error> {
3354 let _result = self.send_raw(result);
3355 self.drop_without_shutdown();
3356 _result
3357 }
3358
3359 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3360 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3361 fidl::encoding::EmptyStruct,
3362 CapabilityStoreError,
3363 >>(
3364 fidl::encoding::FlexibleResult::new(result),
3365 self.tx_id,
3366 0x72fd686c37b6025f,
3367 fidl::encoding::DynamicFlags::FLEXIBLE,
3368 )
3369 }
3370}
3371
3372#[must_use = "FIDL methods require a response to be sent"]
3373#[derive(Debug)]
3374pub struct CapabilityStoreDictionaryLegacyExportResponder {
3375 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3376 tx_id: u32,
3377}
3378
3379impl std::ops::Drop for CapabilityStoreDictionaryLegacyExportResponder {
3383 fn drop(&mut self) {
3384 self.control_handle.shutdown();
3385 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3387 }
3388}
3389
3390impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryLegacyExportResponder {
3391 type ControlHandle = CapabilityStoreControlHandle;
3392
3393 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3394 &self.control_handle
3395 }
3396
3397 fn drop_without_shutdown(mut self) {
3398 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3400 std::mem::forget(self);
3402 }
3403}
3404
3405impl CapabilityStoreDictionaryLegacyExportResponder {
3406 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3410 let _result = self.send_raw(result);
3411 if _result.is_err() {
3412 self.control_handle.shutdown();
3413 }
3414 self.drop_without_shutdown();
3415 _result
3416 }
3417
3418 pub fn send_no_shutdown_on_err(
3420 self,
3421 mut result: Result<(), CapabilityStoreError>,
3422 ) -> Result<(), fidl::Error> {
3423 let _result = self.send_raw(result);
3424 self.drop_without_shutdown();
3425 _result
3426 }
3427
3428 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3429 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3430 fidl::encoding::EmptyStruct,
3431 CapabilityStoreError,
3432 >>(
3433 fidl::encoding::FlexibleResult::new(result),
3434 self.tx_id,
3435 0x407e15cc4bde5dcd,
3436 fidl::encoding::DynamicFlags::FLEXIBLE,
3437 )
3438 }
3439}
3440
3441#[must_use = "FIDL methods require a response to be sent"]
3442#[derive(Debug)]
3443pub struct CapabilityStoreDictionaryInsertResponder {
3444 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3445 tx_id: u32,
3446}
3447
3448impl std::ops::Drop for CapabilityStoreDictionaryInsertResponder {
3452 fn drop(&mut self) {
3453 self.control_handle.shutdown();
3454 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3456 }
3457}
3458
3459impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryInsertResponder {
3460 type ControlHandle = CapabilityStoreControlHandle;
3461
3462 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3463 &self.control_handle
3464 }
3465
3466 fn drop_without_shutdown(mut self) {
3467 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3469 std::mem::forget(self);
3471 }
3472}
3473
3474impl CapabilityStoreDictionaryInsertResponder {
3475 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3479 let _result = self.send_raw(result);
3480 if _result.is_err() {
3481 self.control_handle.shutdown();
3482 }
3483 self.drop_without_shutdown();
3484 _result
3485 }
3486
3487 pub fn send_no_shutdown_on_err(
3489 self,
3490 mut result: Result<(), CapabilityStoreError>,
3491 ) -> Result<(), fidl::Error> {
3492 let _result = self.send_raw(result);
3493 self.drop_without_shutdown();
3494 _result
3495 }
3496
3497 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3498 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3499 fidl::encoding::EmptyStruct,
3500 CapabilityStoreError,
3501 >>(
3502 fidl::encoding::FlexibleResult::new(result),
3503 self.tx_id,
3504 0x7702183689d44c27,
3505 fidl::encoding::DynamicFlags::FLEXIBLE,
3506 )
3507 }
3508}
3509
3510#[must_use = "FIDL methods require a response to be sent"]
3511#[derive(Debug)]
3512pub struct CapabilityStoreDictionaryGetResponder {
3513 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3514 tx_id: u32,
3515}
3516
3517impl std::ops::Drop for CapabilityStoreDictionaryGetResponder {
3521 fn drop(&mut self) {
3522 self.control_handle.shutdown();
3523 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3525 }
3526}
3527
3528impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryGetResponder {
3529 type ControlHandle = CapabilityStoreControlHandle;
3530
3531 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3532 &self.control_handle
3533 }
3534
3535 fn drop_without_shutdown(mut self) {
3536 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3538 std::mem::forget(self);
3540 }
3541}
3542
3543impl CapabilityStoreDictionaryGetResponder {
3544 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3548 let _result = self.send_raw(result);
3549 if _result.is_err() {
3550 self.control_handle.shutdown();
3551 }
3552 self.drop_without_shutdown();
3553 _result
3554 }
3555
3556 pub fn send_no_shutdown_on_err(
3558 self,
3559 mut result: Result<(), CapabilityStoreError>,
3560 ) -> Result<(), fidl::Error> {
3561 let _result = self.send_raw(result);
3562 self.drop_without_shutdown();
3563 _result
3564 }
3565
3566 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3567 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3568 fidl::encoding::EmptyStruct,
3569 CapabilityStoreError,
3570 >>(
3571 fidl::encoding::FlexibleResult::new(result),
3572 self.tx_id,
3573 0x4d9e27538284add2,
3574 fidl::encoding::DynamicFlags::FLEXIBLE,
3575 )
3576 }
3577}
3578
3579#[must_use = "FIDL methods require a response to be sent"]
3580#[derive(Debug)]
3581pub struct CapabilityStoreDictionaryRemoveResponder {
3582 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3583 tx_id: u32,
3584}
3585
3586impl std::ops::Drop for CapabilityStoreDictionaryRemoveResponder {
3590 fn drop(&mut self) {
3591 self.control_handle.shutdown();
3592 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3594 }
3595}
3596
3597impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryRemoveResponder {
3598 type ControlHandle = CapabilityStoreControlHandle;
3599
3600 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3601 &self.control_handle
3602 }
3603
3604 fn drop_without_shutdown(mut self) {
3605 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3607 std::mem::forget(self);
3609 }
3610}
3611
3612impl CapabilityStoreDictionaryRemoveResponder {
3613 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3617 let _result = self.send_raw(result);
3618 if _result.is_err() {
3619 self.control_handle.shutdown();
3620 }
3621 self.drop_without_shutdown();
3622 _result
3623 }
3624
3625 pub fn send_no_shutdown_on_err(
3627 self,
3628 mut result: Result<(), CapabilityStoreError>,
3629 ) -> Result<(), fidl::Error> {
3630 let _result = self.send_raw(result);
3631 self.drop_without_shutdown();
3632 _result
3633 }
3634
3635 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3636 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3637 fidl::encoding::EmptyStruct,
3638 CapabilityStoreError,
3639 >>(
3640 fidl::encoding::FlexibleResult::new(result),
3641 self.tx_id,
3642 0x4c5c025ab05d4f3,
3643 fidl::encoding::DynamicFlags::FLEXIBLE,
3644 )
3645 }
3646}
3647
3648#[must_use = "FIDL methods require a response to be sent"]
3649#[derive(Debug)]
3650pub struct CapabilityStoreDictionaryCopyResponder {
3651 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3652 tx_id: u32,
3653}
3654
3655impl std::ops::Drop for CapabilityStoreDictionaryCopyResponder {
3659 fn drop(&mut self) {
3660 self.control_handle.shutdown();
3661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3663 }
3664}
3665
3666impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryCopyResponder {
3667 type ControlHandle = CapabilityStoreControlHandle;
3668
3669 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3670 &self.control_handle
3671 }
3672
3673 fn drop_without_shutdown(mut self) {
3674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3676 std::mem::forget(self);
3678 }
3679}
3680
3681impl CapabilityStoreDictionaryCopyResponder {
3682 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3686 let _result = self.send_raw(result);
3687 if _result.is_err() {
3688 self.control_handle.shutdown();
3689 }
3690 self.drop_without_shutdown();
3691 _result
3692 }
3693
3694 pub fn send_no_shutdown_on_err(
3696 self,
3697 mut result: Result<(), CapabilityStoreError>,
3698 ) -> Result<(), fidl::Error> {
3699 let _result = self.send_raw(result);
3700 self.drop_without_shutdown();
3701 _result
3702 }
3703
3704 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3705 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3706 fidl::encoding::EmptyStruct,
3707 CapabilityStoreError,
3708 >>(
3709 fidl::encoding::FlexibleResult::new(result),
3710 self.tx_id,
3711 0x3733ecdf4ea1b44f,
3712 fidl::encoding::DynamicFlags::FLEXIBLE,
3713 )
3714 }
3715}
3716
3717#[must_use = "FIDL methods require a response to be sent"]
3718#[derive(Debug)]
3719pub struct CapabilityStoreDictionaryKeysResponder {
3720 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3721 tx_id: u32,
3722}
3723
3724impl std::ops::Drop for CapabilityStoreDictionaryKeysResponder {
3728 fn drop(&mut self) {
3729 self.control_handle.shutdown();
3730 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3732 }
3733}
3734
3735impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryKeysResponder {
3736 type ControlHandle = CapabilityStoreControlHandle;
3737
3738 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3739 &self.control_handle
3740 }
3741
3742 fn drop_without_shutdown(mut self) {
3743 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3745 std::mem::forget(self);
3747 }
3748}
3749
3750impl CapabilityStoreDictionaryKeysResponder {
3751 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3755 let _result = self.send_raw(result);
3756 if _result.is_err() {
3757 self.control_handle.shutdown();
3758 }
3759 self.drop_without_shutdown();
3760 _result
3761 }
3762
3763 pub fn send_no_shutdown_on_err(
3765 self,
3766 mut result: Result<(), CapabilityStoreError>,
3767 ) -> Result<(), fidl::Error> {
3768 let _result = self.send_raw(result);
3769 self.drop_without_shutdown();
3770 _result
3771 }
3772
3773 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3774 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3775 fidl::encoding::EmptyStruct,
3776 CapabilityStoreError,
3777 >>(
3778 fidl::encoding::FlexibleResult::new(result),
3779 self.tx_id,
3780 0x84b05577ceaec9e,
3781 fidl::encoding::DynamicFlags::FLEXIBLE,
3782 )
3783 }
3784}
3785
3786#[must_use = "FIDL methods require a response to be sent"]
3787#[derive(Debug)]
3788pub struct CapabilityStoreDictionaryEnumerateResponder {
3789 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3790 tx_id: u32,
3791}
3792
3793impl std::ops::Drop for CapabilityStoreDictionaryEnumerateResponder {
3797 fn drop(&mut self) {
3798 self.control_handle.shutdown();
3799 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3801 }
3802}
3803
3804impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryEnumerateResponder {
3805 type ControlHandle = CapabilityStoreControlHandle;
3806
3807 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3808 &self.control_handle
3809 }
3810
3811 fn drop_without_shutdown(mut self) {
3812 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3814 std::mem::forget(self);
3816 }
3817}
3818
3819impl CapabilityStoreDictionaryEnumerateResponder {
3820 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3824 let _result = self.send_raw(result);
3825 if _result.is_err() {
3826 self.control_handle.shutdown();
3827 }
3828 self.drop_without_shutdown();
3829 _result
3830 }
3831
3832 pub fn send_no_shutdown_on_err(
3834 self,
3835 mut result: Result<(), CapabilityStoreError>,
3836 ) -> Result<(), fidl::Error> {
3837 let _result = self.send_raw(result);
3838 self.drop_without_shutdown();
3839 _result
3840 }
3841
3842 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3843 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3844 fidl::encoding::EmptyStruct,
3845 CapabilityStoreError,
3846 >>(
3847 fidl::encoding::FlexibleResult::new(result),
3848 self.tx_id,
3849 0xd6279b6ced04641,
3850 fidl::encoding::DynamicFlags::FLEXIBLE,
3851 )
3852 }
3853}
3854
3855#[must_use = "FIDL methods require a response to be sent"]
3856#[derive(Debug)]
3857pub struct CapabilityStoreDictionaryDrainResponder {
3858 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3859 tx_id: u32,
3860}
3861
3862impl std::ops::Drop for CapabilityStoreDictionaryDrainResponder {
3866 fn drop(&mut self) {
3867 self.control_handle.shutdown();
3868 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3870 }
3871}
3872
3873impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryDrainResponder {
3874 type ControlHandle = CapabilityStoreControlHandle;
3875
3876 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3877 &self.control_handle
3878 }
3879
3880 fn drop_without_shutdown(mut self) {
3881 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3883 std::mem::forget(self);
3885 }
3886}
3887
3888impl CapabilityStoreDictionaryDrainResponder {
3889 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3893 let _result = self.send_raw(result);
3894 if _result.is_err() {
3895 self.control_handle.shutdown();
3896 }
3897 self.drop_without_shutdown();
3898 _result
3899 }
3900
3901 pub fn send_no_shutdown_on_err(
3903 self,
3904 mut result: Result<(), CapabilityStoreError>,
3905 ) -> Result<(), fidl::Error> {
3906 let _result = self.send_raw(result);
3907 self.drop_without_shutdown();
3908 _result
3909 }
3910
3911 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3912 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3913 fidl::encoding::EmptyStruct,
3914 CapabilityStoreError,
3915 >>(
3916 fidl::encoding::FlexibleResult::new(result),
3917 self.tx_id,
3918 0x28a3a3f84d928cd8,
3919 fidl::encoding::DynamicFlags::FLEXIBLE,
3920 )
3921 }
3922}
3923
3924#[must_use = "FIDL methods require a response to be sent"]
3925#[derive(Debug)]
3926pub struct CapabilityStoreCreateServiceAggregateResponder {
3927 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3928 tx_id: u32,
3929}
3930
3931impl std::ops::Drop for CapabilityStoreCreateServiceAggregateResponder {
3935 fn drop(&mut self) {
3936 self.control_handle.shutdown();
3937 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3939 }
3940}
3941
3942impl fdomain_client::fidl::Responder for CapabilityStoreCreateServiceAggregateResponder {
3943 type ControlHandle = CapabilityStoreControlHandle;
3944
3945 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3946 &self.control_handle
3947 }
3948
3949 fn drop_without_shutdown(mut self) {
3950 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3952 std::mem::forget(self);
3954 }
3955}
3956
3957impl CapabilityStoreCreateServiceAggregateResponder {
3958 pub fn send(
3962 self,
3963 mut result: Result<DirConnector, CapabilityStoreError>,
3964 ) -> Result<(), fidl::Error> {
3965 let _result = self.send_raw(result);
3966 if _result.is_err() {
3967 self.control_handle.shutdown();
3968 }
3969 self.drop_without_shutdown();
3970 _result
3971 }
3972
3973 pub fn send_no_shutdown_on_err(
3975 self,
3976 mut result: Result<DirConnector, CapabilityStoreError>,
3977 ) -> Result<(), fidl::Error> {
3978 let _result = self.send_raw(result);
3979 self.drop_without_shutdown();
3980 _result
3981 }
3982
3983 fn send_raw(
3984 &self,
3985 mut result: Result<DirConnector, CapabilityStoreError>,
3986 ) -> Result<(), fidl::Error> {
3987 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3988 CapabilityStoreCreateServiceAggregateResponse,
3989 CapabilityStoreError,
3990 >>(
3991 fidl::encoding::FlexibleResult::new(
3992 result
3993 .as_mut()
3994 .map_err(|e| *e)
3995 .map(|aggregate_dir_connector| (aggregate_dir_connector,)),
3996 ),
3997 self.tx_id,
3998 0x4584116c8085885a,
3999 fidl::encoding::DynamicFlags::FLEXIBLE,
4000 )
4001 }
4002}
4003
4004#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4005pub struct ConnectorRouterMarker;
4006
4007impl fdomain_client::fidl::ProtocolMarker for ConnectorRouterMarker {
4008 type Proxy = ConnectorRouterProxy;
4009 type RequestStream = ConnectorRouterRequestStream;
4010
4011 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
4012}
4013impl fdomain_client::fidl::DiscoverableProtocolMarker for ConnectorRouterMarker {}
4014pub type ConnectorRouterRouteResult = Result<ConnectorRouterRouteResponse, RouterError>;
4015
4016pub trait ConnectorRouterProxyInterface: Send + Sync {
4017 type RouteResponseFut: std::future::Future<Output = Result<ConnectorRouterRouteResult, fidl::Error>>
4018 + Send;
4019 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4020}
4021
4022#[derive(Debug, Clone)]
4023pub struct ConnectorRouterProxy {
4024 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4025}
4026
4027impl fdomain_client::fidl::Proxy for ConnectorRouterProxy {
4028 type Protocol = ConnectorRouterMarker;
4029
4030 fn from_channel(inner: fdomain_client::Channel) -> Self {
4031 Self::new(inner)
4032 }
4033
4034 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4035 self.client.into_channel().map_err(|client| Self { client })
4036 }
4037
4038 fn as_channel(&self) -> &fdomain_client::Channel {
4039 self.client.as_channel()
4040 }
4041}
4042
4043impl ConnectorRouterProxy {
4044 pub fn new(channel: fdomain_client::Channel) -> Self {
4046 let protocol_name =
4047 <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4048 Self { client: fidl::client::Client::new(channel, protocol_name) }
4049 }
4050
4051 pub fn take_event_stream(&self) -> ConnectorRouterEventStream {
4057 ConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
4058 }
4059
4060 pub fn r#route(
4061 &self,
4062 mut payload: RouteRequest,
4063 ) -> fidl::client::QueryResponseFut<
4064 ConnectorRouterRouteResult,
4065 fdomain_client::fidl::FDomainResourceDialect,
4066 > {
4067 ConnectorRouterProxyInterface::r#route(self, payload)
4068 }
4069}
4070
4071impl ConnectorRouterProxyInterface for ConnectorRouterProxy {
4072 type RouteResponseFut = fidl::client::QueryResponseFut<
4073 ConnectorRouterRouteResult,
4074 fdomain_client::fidl::FDomainResourceDialect,
4075 >;
4076 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4077 fn _decode(
4078 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4079 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
4080 let _response = fidl::client::decode_transaction_body::<
4081 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
4082 fdomain_client::fidl::FDomainResourceDialect,
4083 0x74dbb8bc13730766,
4084 >(_buf?)?
4085 .into_result_fdomain::<ConnectorRouterMarker>("route")?;
4086 Ok(_response.map(|x| x))
4087 }
4088 self.client.send_query_and_decode::<RouteRequest, ConnectorRouterRouteResult>(
4089 &mut payload,
4090 0x74dbb8bc13730766,
4091 fidl::encoding::DynamicFlags::FLEXIBLE,
4092 _decode,
4093 )
4094 }
4095}
4096
4097pub struct ConnectorRouterEventStream {
4098 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4099}
4100
4101impl std::marker::Unpin for ConnectorRouterEventStream {}
4102
4103impl futures::stream::FusedStream for ConnectorRouterEventStream {
4104 fn is_terminated(&self) -> bool {
4105 self.event_receiver.is_terminated()
4106 }
4107}
4108
4109impl futures::Stream for ConnectorRouterEventStream {
4110 type Item = Result<ConnectorRouterEvent, fidl::Error>;
4111
4112 fn poll_next(
4113 mut self: std::pin::Pin<&mut Self>,
4114 cx: &mut std::task::Context<'_>,
4115 ) -> std::task::Poll<Option<Self::Item>> {
4116 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4117 &mut self.event_receiver,
4118 cx
4119 )?) {
4120 Some(buf) => std::task::Poll::Ready(Some(ConnectorRouterEvent::decode(buf))),
4121 None => std::task::Poll::Ready(None),
4122 }
4123 }
4124}
4125
4126#[derive(Debug)]
4127pub enum ConnectorRouterEvent {
4128 #[non_exhaustive]
4129 _UnknownEvent {
4130 ordinal: u64,
4132 },
4133}
4134
4135impl ConnectorRouterEvent {
4136 fn decode(
4138 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4139 ) -> Result<ConnectorRouterEvent, fidl::Error> {
4140 let (bytes, _handles) = buf.split_mut();
4141 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4142 debug_assert_eq!(tx_header.tx_id, 0);
4143 match tx_header.ordinal {
4144 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4145 Ok(ConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4146 }
4147 _ => Err(fidl::Error::UnknownOrdinal {
4148 ordinal: tx_header.ordinal,
4149 protocol_name:
4150 <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4151 }),
4152 }
4153 }
4154}
4155
4156pub struct ConnectorRouterRequestStream {
4158 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4159 is_terminated: bool,
4160}
4161
4162impl std::marker::Unpin for ConnectorRouterRequestStream {}
4163
4164impl futures::stream::FusedStream for ConnectorRouterRequestStream {
4165 fn is_terminated(&self) -> bool {
4166 self.is_terminated
4167 }
4168}
4169
4170impl fdomain_client::fidl::RequestStream for ConnectorRouterRequestStream {
4171 type Protocol = ConnectorRouterMarker;
4172 type ControlHandle = ConnectorRouterControlHandle;
4173
4174 fn from_channel(channel: fdomain_client::Channel) -> Self {
4175 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4176 }
4177
4178 fn control_handle(&self) -> Self::ControlHandle {
4179 ConnectorRouterControlHandle { inner: self.inner.clone() }
4180 }
4181
4182 fn into_inner(
4183 self,
4184 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4185 {
4186 (self.inner, self.is_terminated)
4187 }
4188
4189 fn from_inner(
4190 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4191 is_terminated: bool,
4192 ) -> Self {
4193 Self { inner, is_terminated }
4194 }
4195}
4196
4197impl futures::Stream for ConnectorRouterRequestStream {
4198 type Item = Result<ConnectorRouterRequest, fidl::Error>;
4199
4200 fn poll_next(
4201 mut self: std::pin::Pin<&mut Self>,
4202 cx: &mut std::task::Context<'_>,
4203 ) -> std::task::Poll<Option<Self::Item>> {
4204 let this = &mut *self;
4205 if this.inner.check_shutdown(cx) {
4206 this.is_terminated = true;
4207 return std::task::Poll::Ready(None);
4208 }
4209 if this.is_terminated {
4210 panic!("polled ConnectorRouterRequestStream after completion");
4211 }
4212 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4213 |bytes, handles| {
4214 match this.inner.channel().read_etc(cx, bytes, handles) {
4215 std::task::Poll::Ready(Ok(())) => {}
4216 std::task::Poll::Pending => return std::task::Poll::Pending,
4217 std::task::Poll::Ready(Err(None)) => {
4218 this.is_terminated = true;
4219 return std::task::Poll::Ready(None);
4220 }
4221 std::task::Poll::Ready(Err(Some(e))) => {
4222 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4223 e.into(),
4224 ))));
4225 }
4226 }
4227
4228 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4230
4231 std::task::Poll::Ready(Some(match header.ordinal {
4232 0x74dbb8bc13730766 => {
4233 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4234 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
4235 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4236 let control_handle = ConnectorRouterControlHandle {
4237 inner: this.inner.clone(),
4238 };
4239 Ok(ConnectorRouterRequest::Route {payload: req,
4240 responder: ConnectorRouterRouteResponder {
4241 control_handle: std::mem::ManuallyDrop::new(control_handle),
4242 tx_id: header.tx_id,
4243 },
4244 })
4245 }
4246 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4247 Ok(ConnectorRouterRequest::_UnknownMethod {
4248 ordinal: header.ordinal,
4249 control_handle: ConnectorRouterControlHandle { inner: this.inner.clone() },
4250 method_type: fidl::MethodType::OneWay,
4251 })
4252 }
4253 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4254 this.inner.send_framework_err(
4255 fidl::encoding::FrameworkErr::UnknownMethod,
4256 header.tx_id,
4257 header.ordinal,
4258 header.dynamic_flags(),
4259 (bytes, handles),
4260 )?;
4261 Ok(ConnectorRouterRequest::_UnknownMethod {
4262 ordinal: header.ordinal,
4263 control_handle: ConnectorRouterControlHandle { inner: this.inner.clone() },
4264 method_type: fidl::MethodType::TwoWay,
4265 })
4266 }
4267 _ => Err(fidl::Error::UnknownOrdinal {
4268 ordinal: header.ordinal,
4269 protocol_name: <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4270 }),
4271 }))
4272 },
4273 )
4274 }
4275}
4276
4277#[derive(Debug)]
4278pub enum ConnectorRouterRequest {
4279 Route {
4280 payload: RouteRequest,
4281 responder: ConnectorRouterRouteResponder,
4282 },
4283 #[non_exhaustive]
4285 _UnknownMethod {
4286 ordinal: u64,
4288 control_handle: ConnectorRouterControlHandle,
4289 method_type: fidl::MethodType,
4290 },
4291}
4292
4293impl ConnectorRouterRequest {
4294 #[allow(irrefutable_let_patterns)]
4295 pub fn into_route(self) -> Option<(RouteRequest, ConnectorRouterRouteResponder)> {
4296 if let ConnectorRouterRequest::Route { payload, responder } = self {
4297 Some((payload, responder))
4298 } else {
4299 None
4300 }
4301 }
4302
4303 pub fn method_name(&self) -> &'static str {
4305 match *self {
4306 ConnectorRouterRequest::Route { .. } => "route",
4307 ConnectorRouterRequest::_UnknownMethod {
4308 method_type: fidl::MethodType::OneWay,
4309 ..
4310 } => "unknown one-way method",
4311 ConnectorRouterRequest::_UnknownMethod {
4312 method_type: fidl::MethodType::TwoWay,
4313 ..
4314 } => "unknown two-way method",
4315 }
4316 }
4317}
4318
4319#[derive(Debug, Clone)]
4320pub struct ConnectorRouterControlHandle {
4321 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4322}
4323
4324impl fdomain_client::fidl::ControlHandle for ConnectorRouterControlHandle {
4325 fn shutdown(&self) {
4326 self.inner.shutdown()
4327 }
4328
4329 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4330 self.inner.shutdown_with_epitaph(status)
4331 }
4332
4333 fn is_closed(&self) -> bool {
4334 self.inner.channel().is_closed()
4335 }
4336 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4337 self.inner.channel().on_closed()
4338 }
4339}
4340
4341impl ConnectorRouterControlHandle {}
4342
4343#[must_use = "FIDL methods require a response to be sent"]
4344#[derive(Debug)]
4345pub struct ConnectorRouterRouteResponder {
4346 control_handle: std::mem::ManuallyDrop<ConnectorRouterControlHandle>,
4347 tx_id: u32,
4348}
4349
4350impl std::ops::Drop for ConnectorRouterRouteResponder {
4354 fn drop(&mut self) {
4355 self.control_handle.shutdown();
4356 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4358 }
4359}
4360
4361impl fdomain_client::fidl::Responder for ConnectorRouterRouteResponder {
4362 type ControlHandle = ConnectorRouterControlHandle;
4363
4364 fn control_handle(&self) -> &ConnectorRouterControlHandle {
4365 &self.control_handle
4366 }
4367
4368 fn drop_without_shutdown(mut self) {
4369 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4371 std::mem::forget(self);
4373 }
4374}
4375
4376impl ConnectorRouterRouteResponder {
4377 pub fn send(
4381 self,
4382 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4383 ) -> Result<(), fidl::Error> {
4384 let _result = self.send_raw(result);
4385 if _result.is_err() {
4386 self.control_handle.shutdown();
4387 }
4388 self.drop_without_shutdown();
4389 _result
4390 }
4391
4392 pub fn send_no_shutdown_on_err(
4394 self,
4395 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4396 ) -> Result<(), fidl::Error> {
4397 let _result = self.send_raw(result);
4398 self.drop_without_shutdown();
4399 _result
4400 }
4401
4402 fn send_raw(
4403 &self,
4404 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4405 ) -> Result<(), fidl::Error> {
4406 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4407 ConnectorRouterRouteResponse,
4408 RouterError,
4409 >>(
4410 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
4411 self.tx_id,
4412 0x74dbb8bc13730766,
4413 fidl::encoding::DynamicFlags::FLEXIBLE,
4414 )
4415 }
4416}
4417
4418#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4419pub struct DataRouterMarker;
4420
4421impl fdomain_client::fidl::ProtocolMarker for DataRouterMarker {
4422 type Proxy = DataRouterProxy;
4423 type RequestStream = DataRouterRequestStream;
4424
4425 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
4426}
4427impl fdomain_client::fidl::DiscoverableProtocolMarker for DataRouterMarker {}
4428pub type DataRouterRouteResult = Result<DataRouterRouteResponse, RouterError>;
4429
4430pub trait DataRouterProxyInterface: Send + Sync {
4431 type RouteResponseFut: std::future::Future<Output = Result<DataRouterRouteResult, fidl::Error>>
4432 + Send;
4433 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4434}
4435
4436#[derive(Debug, Clone)]
4437pub struct DataRouterProxy {
4438 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4439}
4440
4441impl fdomain_client::fidl::Proxy for DataRouterProxy {
4442 type Protocol = DataRouterMarker;
4443
4444 fn from_channel(inner: fdomain_client::Channel) -> Self {
4445 Self::new(inner)
4446 }
4447
4448 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4449 self.client.into_channel().map_err(|client| Self { client })
4450 }
4451
4452 fn as_channel(&self) -> &fdomain_client::Channel {
4453 self.client.as_channel()
4454 }
4455}
4456
4457impl DataRouterProxy {
4458 pub fn new(channel: fdomain_client::Channel) -> Self {
4460 let protocol_name = <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4461 Self { client: fidl::client::Client::new(channel, protocol_name) }
4462 }
4463
4464 pub fn take_event_stream(&self) -> DataRouterEventStream {
4470 DataRouterEventStream { event_receiver: self.client.take_event_receiver() }
4471 }
4472
4473 pub fn r#route(
4474 &self,
4475 mut payload: RouteRequest,
4476 ) -> fidl::client::QueryResponseFut<
4477 DataRouterRouteResult,
4478 fdomain_client::fidl::FDomainResourceDialect,
4479 > {
4480 DataRouterProxyInterface::r#route(self, payload)
4481 }
4482}
4483
4484impl DataRouterProxyInterface for DataRouterProxy {
4485 type RouteResponseFut = fidl::client::QueryResponseFut<
4486 DataRouterRouteResult,
4487 fdomain_client::fidl::FDomainResourceDialect,
4488 >;
4489 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4490 fn _decode(
4491 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4492 ) -> Result<DataRouterRouteResult, fidl::Error> {
4493 let _response = fidl::client::decode_transaction_body::<
4494 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
4495 fdomain_client::fidl::FDomainResourceDialect,
4496 0x2e87dc44dfc53804,
4497 >(_buf?)?
4498 .into_result_fdomain::<DataRouterMarker>("route")?;
4499 Ok(_response.map(|x| x))
4500 }
4501 self.client.send_query_and_decode::<RouteRequest, DataRouterRouteResult>(
4502 &mut payload,
4503 0x2e87dc44dfc53804,
4504 fidl::encoding::DynamicFlags::FLEXIBLE,
4505 _decode,
4506 )
4507 }
4508}
4509
4510pub struct DataRouterEventStream {
4511 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4512}
4513
4514impl std::marker::Unpin for DataRouterEventStream {}
4515
4516impl futures::stream::FusedStream for DataRouterEventStream {
4517 fn is_terminated(&self) -> bool {
4518 self.event_receiver.is_terminated()
4519 }
4520}
4521
4522impl futures::Stream for DataRouterEventStream {
4523 type Item = Result<DataRouterEvent, fidl::Error>;
4524
4525 fn poll_next(
4526 mut self: std::pin::Pin<&mut Self>,
4527 cx: &mut std::task::Context<'_>,
4528 ) -> std::task::Poll<Option<Self::Item>> {
4529 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4530 &mut self.event_receiver,
4531 cx
4532 )?) {
4533 Some(buf) => std::task::Poll::Ready(Some(DataRouterEvent::decode(buf))),
4534 None => std::task::Poll::Ready(None),
4535 }
4536 }
4537}
4538
4539#[derive(Debug)]
4540pub enum DataRouterEvent {
4541 #[non_exhaustive]
4542 _UnknownEvent {
4543 ordinal: u64,
4545 },
4546}
4547
4548impl DataRouterEvent {
4549 fn decode(
4551 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4552 ) -> Result<DataRouterEvent, fidl::Error> {
4553 let (bytes, _handles) = buf.split_mut();
4554 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4555 debug_assert_eq!(tx_header.tx_id, 0);
4556 match tx_header.ordinal {
4557 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4558 Ok(DataRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4559 }
4560 _ => Err(fidl::Error::UnknownOrdinal {
4561 ordinal: tx_header.ordinal,
4562 protocol_name:
4563 <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4564 }),
4565 }
4566 }
4567}
4568
4569pub struct DataRouterRequestStream {
4571 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4572 is_terminated: bool,
4573}
4574
4575impl std::marker::Unpin for DataRouterRequestStream {}
4576
4577impl futures::stream::FusedStream for DataRouterRequestStream {
4578 fn is_terminated(&self) -> bool {
4579 self.is_terminated
4580 }
4581}
4582
4583impl fdomain_client::fidl::RequestStream for DataRouterRequestStream {
4584 type Protocol = DataRouterMarker;
4585 type ControlHandle = DataRouterControlHandle;
4586
4587 fn from_channel(channel: fdomain_client::Channel) -> Self {
4588 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4589 }
4590
4591 fn control_handle(&self) -> Self::ControlHandle {
4592 DataRouterControlHandle { inner: self.inner.clone() }
4593 }
4594
4595 fn into_inner(
4596 self,
4597 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4598 {
4599 (self.inner, self.is_terminated)
4600 }
4601
4602 fn from_inner(
4603 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4604 is_terminated: bool,
4605 ) -> Self {
4606 Self { inner, is_terminated }
4607 }
4608}
4609
4610impl futures::Stream for DataRouterRequestStream {
4611 type Item = Result<DataRouterRequest, fidl::Error>;
4612
4613 fn poll_next(
4614 mut self: std::pin::Pin<&mut Self>,
4615 cx: &mut std::task::Context<'_>,
4616 ) -> std::task::Poll<Option<Self::Item>> {
4617 let this = &mut *self;
4618 if this.inner.check_shutdown(cx) {
4619 this.is_terminated = true;
4620 return std::task::Poll::Ready(None);
4621 }
4622 if this.is_terminated {
4623 panic!("polled DataRouterRequestStream after completion");
4624 }
4625 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4626 |bytes, handles| {
4627 match this.inner.channel().read_etc(cx, bytes, handles) {
4628 std::task::Poll::Ready(Ok(())) => {}
4629 std::task::Poll::Pending => return std::task::Poll::Pending,
4630 std::task::Poll::Ready(Err(None)) => {
4631 this.is_terminated = true;
4632 return std::task::Poll::Ready(None);
4633 }
4634 std::task::Poll::Ready(Err(Some(e))) => {
4635 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4636 e.into(),
4637 ))));
4638 }
4639 }
4640
4641 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4643
4644 std::task::Poll::Ready(Some(match header.ordinal {
4645 0x2e87dc44dfc53804 => {
4646 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4647 let mut req = fidl::new_empty!(
4648 RouteRequest,
4649 fdomain_client::fidl::FDomainResourceDialect
4650 );
4651 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4652 let control_handle = DataRouterControlHandle { inner: this.inner.clone() };
4653 Ok(DataRouterRequest::Route {
4654 payload: req,
4655 responder: DataRouterRouteResponder {
4656 control_handle: std::mem::ManuallyDrop::new(control_handle),
4657 tx_id: header.tx_id,
4658 },
4659 })
4660 }
4661 _ if header.tx_id == 0
4662 && header
4663 .dynamic_flags()
4664 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4665 {
4666 Ok(DataRouterRequest::_UnknownMethod {
4667 ordinal: header.ordinal,
4668 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
4669 method_type: fidl::MethodType::OneWay,
4670 })
4671 }
4672 _ if header
4673 .dynamic_flags()
4674 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4675 {
4676 this.inner.send_framework_err(
4677 fidl::encoding::FrameworkErr::UnknownMethod,
4678 header.tx_id,
4679 header.ordinal,
4680 header.dynamic_flags(),
4681 (bytes, handles),
4682 )?;
4683 Ok(DataRouterRequest::_UnknownMethod {
4684 ordinal: header.ordinal,
4685 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
4686 method_type: fidl::MethodType::TwoWay,
4687 })
4688 }
4689 _ => Err(fidl::Error::UnknownOrdinal {
4690 ordinal: header.ordinal,
4691 protocol_name:
4692 <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4693 }),
4694 }))
4695 },
4696 )
4697 }
4698}
4699
4700#[derive(Debug)]
4701pub enum DataRouterRequest {
4702 Route {
4703 payload: RouteRequest,
4704 responder: DataRouterRouteResponder,
4705 },
4706 #[non_exhaustive]
4708 _UnknownMethod {
4709 ordinal: u64,
4711 control_handle: DataRouterControlHandle,
4712 method_type: fidl::MethodType,
4713 },
4714}
4715
4716impl DataRouterRequest {
4717 #[allow(irrefutable_let_patterns)]
4718 pub fn into_route(self) -> Option<(RouteRequest, DataRouterRouteResponder)> {
4719 if let DataRouterRequest::Route { payload, responder } = self {
4720 Some((payload, responder))
4721 } else {
4722 None
4723 }
4724 }
4725
4726 pub fn method_name(&self) -> &'static str {
4728 match *self {
4729 DataRouterRequest::Route { .. } => "route",
4730 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4731 "unknown one-way method"
4732 }
4733 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4734 "unknown two-way method"
4735 }
4736 }
4737 }
4738}
4739
4740#[derive(Debug, Clone)]
4741pub struct DataRouterControlHandle {
4742 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4743}
4744
4745impl fdomain_client::fidl::ControlHandle for DataRouterControlHandle {
4746 fn shutdown(&self) {
4747 self.inner.shutdown()
4748 }
4749
4750 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4751 self.inner.shutdown_with_epitaph(status)
4752 }
4753
4754 fn is_closed(&self) -> bool {
4755 self.inner.channel().is_closed()
4756 }
4757 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4758 self.inner.channel().on_closed()
4759 }
4760}
4761
4762impl DataRouterControlHandle {}
4763
4764#[must_use = "FIDL methods require a response to be sent"]
4765#[derive(Debug)]
4766pub struct DataRouterRouteResponder {
4767 control_handle: std::mem::ManuallyDrop<DataRouterControlHandle>,
4768 tx_id: u32,
4769}
4770
4771impl std::ops::Drop for DataRouterRouteResponder {
4775 fn drop(&mut self) {
4776 self.control_handle.shutdown();
4777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4779 }
4780}
4781
4782impl fdomain_client::fidl::Responder for DataRouterRouteResponder {
4783 type ControlHandle = DataRouterControlHandle;
4784
4785 fn control_handle(&self) -> &DataRouterControlHandle {
4786 &self.control_handle
4787 }
4788
4789 fn drop_without_shutdown(mut self) {
4790 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4792 std::mem::forget(self);
4794 }
4795}
4796
4797impl DataRouterRouteResponder {
4798 pub fn send(
4802 self,
4803 mut result: Result<DataRouterRouteResponse, RouterError>,
4804 ) -> Result<(), fidl::Error> {
4805 let _result = self.send_raw(result);
4806 if _result.is_err() {
4807 self.control_handle.shutdown();
4808 }
4809 self.drop_without_shutdown();
4810 _result
4811 }
4812
4813 pub fn send_no_shutdown_on_err(
4815 self,
4816 mut result: Result<DataRouterRouteResponse, RouterError>,
4817 ) -> Result<(), fidl::Error> {
4818 let _result = self.send_raw(result);
4819 self.drop_without_shutdown();
4820 _result
4821 }
4822
4823 fn send_raw(
4824 &self,
4825 mut result: Result<DataRouterRouteResponse, RouterError>,
4826 ) -> Result<(), fidl::Error> {
4827 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4828 DataRouterRouteResponse,
4829 RouterError,
4830 >>(
4831 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
4832 self.tx_id,
4833 0x2e87dc44dfc53804,
4834 fidl::encoding::DynamicFlags::FLEXIBLE,
4835 )
4836 }
4837}
4838
4839#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4840pub struct DictionaryMarker;
4841
4842impl fdomain_client::fidl::ProtocolMarker for DictionaryMarker {
4843 type Proxy = DictionaryProxy;
4844 type RequestStream = DictionaryRequestStream;
4845
4846 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
4847}
4848impl fdomain_client::fidl::DiscoverableProtocolMarker for DictionaryMarker {}
4849
4850pub trait DictionaryProxyInterface: Send + Sync {}
4851
4852#[derive(Debug, Clone)]
4853pub struct DictionaryProxy {
4854 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4855}
4856
4857impl fdomain_client::fidl::Proxy for DictionaryProxy {
4858 type Protocol = DictionaryMarker;
4859
4860 fn from_channel(inner: fdomain_client::Channel) -> Self {
4861 Self::new(inner)
4862 }
4863
4864 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4865 self.client.into_channel().map_err(|client| Self { client })
4866 }
4867
4868 fn as_channel(&self) -> &fdomain_client::Channel {
4869 self.client.as_channel()
4870 }
4871}
4872
4873impl DictionaryProxy {
4874 pub fn new(channel: fdomain_client::Channel) -> Self {
4876 let protocol_name = <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4877 Self { client: fidl::client::Client::new(channel, protocol_name) }
4878 }
4879
4880 pub fn take_event_stream(&self) -> DictionaryEventStream {
4886 DictionaryEventStream { event_receiver: self.client.take_event_receiver() }
4887 }
4888}
4889
4890impl DictionaryProxyInterface for DictionaryProxy {}
4891
4892pub struct DictionaryEventStream {
4893 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4894}
4895
4896impl std::marker::Unpin for DictionaryEventStream {}
4897
4898impl futures::stream::FusedStream for DictionaryEventStream {
4899 fn is_terminated(&self) -> bool {
4900 self.event_receiver.is_terminated()
4901 }
4902}
4903
4904impl futures::Stream for DictionaryEventStream {
4905 type Item = Result<DictionaryEvent, fidl::Error>;
4906
4907 fn poll_next(
4908 mut self: std::pin::Pin<&mut Self>,
4909 cx: &mut std::task::Context<'_>,
4910 ) -> std::task::Poll<Option<Self::Item>> {
4911 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4912 &mut self.event_receiver,
4913 cx
4914 )?) {
4915 Some(buf) => std::task::Poll::Ready(Some(DictionaryEvent::decode(buf))),
4916 None => std::task::Poll::Ready(None),
4917 }
4918 }
4919}
4920
4921#[derive(Debug)]
4922pub enum DictionaryEvent {
4923 #[non_exhaustive]
4924 _UnknownEvent {
4925 ordinal: u64,
4927 },
4928}
4929
4930impl DictionaryEvent {
4931 fn decode(
4933 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4934 ) -> Result<DictionaryEvent, fidl::Error> {
4935 let (bytes, _handles) = buf.split_mut();
4936 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4937 debug_assert_eq!(tx_header.tx_id, 0);
4938 match tx_header.ordinal {
4939 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4940 Ok(DictionaryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4941 }
4942 _ => Err(fidl::Error::UnknownOrdinal {
4943 ordinal: tx_header.ordinal,
4944 protocol_name:
4945 <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4946 }),
4947 }
4948 }
4949}
4950
4951pub struct DictionaryRequestStream {
4953 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4954 is_terminated: bool,
4955}
4956
4957impl std::marker::Unpin for DictionaryRequestStream {}
4958
4959impl futures::stream::FusedStream for DictionaryRequestStream {
4960 fn is_terminated(&self) -> bool {
4961 self.is_terminated
4962 }
4963}
4964
4965impl fdomain_client::fidl::RequestStream for DictionaryRequestStream {
4966 type Protocol = DictionaryMarker;
4967 type ControlHandle = DictionaryControlHandle;
4968
4969 fn from_channel(channel: fdomain_client::Channel) -> Self {
4970 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4971 }
4972
4973 fn control_handle(&self) -> Self::ControlHandle {
4974 DictionaryControlHandle { inner: self.inner.clone() }
4975 }
4976
4977 fn into_inner(
4978 self,
4979 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4980 {
4981 (self.inner, self.is_terminated)
4982 }
4983
4984 fn from_inner(
4985 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4986 is_terminated: bool,
4987 ) -> Self {
4988 Self { inner, is_terminated }
4989 }
4990}
4991
4992impl futures::Stream for DictionaryRequestStream {
4993 type Item = Result<DictionaryRequest, fidl::Error>;
4994
4995 fn poll_next(
4996 mut self: std::pin::Pin<&mut Self>,
4997 cx: &mut std::task::Context<'_>,
4998 ) -> std::task::Poll<Option<Self::Item>> {
4999 let this = &mut *self;
5000 if this.inner.check_shutdown(cx) {
5001 this.is_terminated = true;
5002 return std::task::Poll::Ready(None);
5003 }
5004 if this.is_terminated {
5005 panic!("polled DictionaryRequestStream after completion");
5006 }
5007 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5008 |bytes, handles| {
5009 match this.inner.channel().read_etc(cx, bytes, handles) {
5010 std::task::Poll::Ready(Ok(())) => {}
5011 std::task::Poll::Pending => return std::task::Poll::Pending,
5012 std::task::Poll::Ready(Err(None)) => {
5013 this.is_terminated = true;
5014 return std::task::Poll::Ready(None);
5015 }
5016 std::task::Poll::Ready(Err(Some(e))) => {
5017 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5018 e.into(),
5019 ))));
5020 }
5021 }
5022
5023 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5025
5026 std::task::Poll::Ready(Some(match header.ordinal {
5027 _ if header.tx_id == 0
5028 && header
5029 .dynamic_flags()
5030 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5031 {
5032 Ok(DictionaryRequest::_UnknownMethod {
5033 ordinal: header.ordinal,
5034 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5035 method_type: fidl::MethodType::OneWay,
5036 })
5037 }
5038 _ if header
5039 .dynamic_flags()
5040 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5041 {
5042 this.inner.send_framework_err(
5043 fidl::encoding::FrameworkErr::UnknownMethod,
5044 header.tx_id,
5045 header.ordinal,
5046 header.dynamic_flags(),
5047 (bytes, handles),
5048 )?;
5049 Ok(DictionaryRequest::_UnknownMethod {
5050 ordinal: header.ordinal,
5051 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5052 method_type: fidl::MethodType::TwoWay,
5053 })
5054 }
5055 _ => Err(fidl::Error::UnknownOrdinal {
5056 ordinal: header.ordinal,
5057 protocol_name:
5058 <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5059 }),
5060 }))
5061 },
5062 )
5063 }
5064}
5065
5066#[derive(Debug)]
5067pub enum DictionaryRequest {
5068 #[non_exhaustive]
5070 _UnknownMethod {
5071 ordinal: u64,
5073 control_handle: DictionaryControlHandle,
5074 method_type: fidl::MethodType,
5075 },
5076}
5077
5078impl DictionaryRequest {
5079 pub fn method_name(&self) -> &'static str {
5081 match *self {
5082 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
5083 "unknown one-way method"
5084 }
5085 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
5086 "unknown two-way method"
5087 }
5088 }
5089 }
5090}
5091
5092#[derive(Debug, Clone)]
5093pub struct DictionaryControlHandle {
5094 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5095}
5096
5097impl fdomain_client::fidl::ControlHandle for DictionaryControlHandle {
5098 fn shutdown(&self) {
5099 self.inner.shutdown()
5100 }
5101
5102 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5103 self.inner.shutdown_with_epitaph(status)
5104 }
5105
5106 fn is_closed(&self) -> bool {
5107 self.inner.channel().is_closed()
5108 }
5109 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5110 self.inner.channel().on_closed()
5111 }
5112}
5113
5114impl DictionaryControlHandle {}
5115
5116#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5117pub struct DictionaryDrainIteratorMarker;
5118
5119impl fdomain_client::fidl::ProtocolMarker for DictionaryDrainIteratorMarker {
5120 type Proxy = DictionaryDrainIteratorProxy;
5121 type RequestStream = DictionaryDrainIteratorRequestStream;
5122
5123 const DEBUG_NAME: &'static str = "(anonymous) DictionaryDrainIterator";
5124}
5125pub type DictionaryDrainIteratorGetNextResult =
5126 Result<(Vec<DictionaryItem>, u64), CapabilityStoreError>;
5127
5128pub trait DictionaryDrainIteratorProxyInterface: Send + Sync {
5129 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryDrainIteratorGetNextResult, fidl::Error>>
5130 + Send;
5131 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
5132}
5133
5134#[derive(Debug, Clone)]
5135pub struct DictionaryDrainIteratorProxy {
5136 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5137}
5138
5139impl fdomain_client::fidl::Proxy for DictionaryDrainIteratorProxy {
5140 type Protocol = DictionaryDrainIteratorMarker;
5141
5142 fn from_channel(inner: fdomain_client::Channel) -> Self {
5143 Self::new(inner)
5144 }
5145
5146 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5147 self.client.into_channel().map_err(|client| Self { client })
5148 }
5149
5150 fn as_channel(&self) -> &fdomain_client::Channel {
5151 self.client.as_channel()
5152 }
5153}
5154
5155impl DictionaryDrainIteratorProxy {
5156 pub fn new(channel: fdomain_client::Channel) -> Self {
5158 let protocol_name =
5159 <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5160 Self { client: fidl::client::Client::new(channel, protocol_name) }
5161 }
5162
5163 pub fn take_event_stream(&self) -> DictionaryDrainIteratorEventStream {
5169 DictionaryDrainIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5170 }
5171
5172 pub fn r#get_next(
5189 &self,
5190 mut start_id: u64,
5191 mut limit: u32,
5192 ) -> fidl::client::QueryResponseFut<
5193 DictionaryDrainIteratorGetNextResult,
5194 fdomain_client::fidl::FDomainResourceDialect,
5195 > {
5196 DictionaryDrainIteratorProxyInterface::r#get_next(self, start_id, limit)
5197 }
5198}
5199
5200impl DictionaryDrainIteratorProxyInterface for DictionaryDrainIteratorProxy {
5201 type GetNextResponseFut = fidl::client::QueryResponseFut<
5202 DictionaryDrainIteratorGetNextResult,
5203 fdomain_client::fidl::FDomainResourceDialect,
5204 >;
5205 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
5206 fn _decode(
5207 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5208 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
5209 let _response = fidl::client::decode_transaction_body::<
5210 fidl::encoding::FlexibleResultType<
5211 DictionaryDrainIteratorGetNextResponse,
5212 CapabilityStoreError,
5213 >,
5214 fdomain_client::fidl::FDomainResourceDialect,
5215 0x4f8082ca1ee26061,
5216 >(_buf?)?
5217 .into_result_fdomain::<DictionaryDrainIteratorMarker>("get_next")?;
5218 Ok(_response.map(|x| (x.items, x.end_id)))
5219 }
5220 self.client.send_query_and_decode::<
5221 DictionaryDrainIteratorGetNextRequest,
5222 DictionaryDrainIteratorGetNextResult,
5223 >(
5224 (start_id, limit,),
5225 0x4f8082ca1ee26061,
5226 fidl::encoding::DynamicFlags::FLEXIBLE,
5227 _decode,
5228 )
5229 }
5230}
5231
5232pub struct DictionaryDrainIteratorEventStream {
5233 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5234}
5235
5236impl std::marker::Unpin for DictionaryDrainIteratorEventStream {}
5237
5238impl futures::stream::FusedStream for DictionaryDrainIteratorEventStream {
5239 fn is_terminated(&self) -> bool {
5240 self.event_receiver.is_terminated()
5241 }
5242}
5243
5244impl futures::Stream for DictionaryDrainIteratorEventStream {
5245 type Item = Result<DictionaryDrainIteratorEvent, fidl::Error>;
5246
5247 fn poll_next(
5248 mut self: std::pin::Pin<&mut Self>,
5249 cx: &mut std::task::Context<'_>,
5250 ) -> std::task::Poll<Option<Self::Item>> {
5251 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5252 &mut self.event_receiver,
5253 cx
5254 )?) {
5255 Some(buf) => std::task::Poll::Ready(Some(DictionaryDrainIteratorEvent::decode(buf))),
5256 None => std::task::Poll::Ready(None),
5257 }
5258 }
5259}
5260
5261#[derive(Debug)]
5262pub enum DictionaryDrainIteratorEvent {
5263 #[non_exhaustive]
5264 _UnknownEvent {
5265 ordinal: u64,
5267 },
5268}
5269
5270impl DictionaryDrainIteratorEvent {
5271 fn decode(
5273 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5274 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
5275 let (bytes, _handles) = buf.split_mut();
5276 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5277 debug_assert_eq!(tx_header.tx_id, 0);
5278 match tx_header.ordinal {
5279 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5280 Ok(DictionaryDrainIteratorEvent::_UnknownEvent {
5281 ordinal: tx_header.ordinal,
5282 })
5283 }
5284 _ => Err(fidl::Error::UnknownOrdinal {
5285 ordinal: tx_header.ordinal,
5286 protocol_name: <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5287 })
5288 }
5289 }
5290}
5291
5292pub struct DictionaryDrainIteratorRequestStream {
5294 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5295 is_terminated: bool,
5296}
5297
5298impl std::marker::Unpin for DictionaryDrainIteratorRequestStream {}
5299
5300impl futures::stream::FusedStream for DictionaryDrainIteratorRequestStream {
5301 fn is_terminated(&self) -> bool {
5302 self.is_terminated
5303 }
5304}
5305
5306impl fdomain_client::fidl::RequestStream for DictionaryDrainIteratorRequestStream {
5307 type Protocol = DictionaryDrainIteratorMarker;
5308 type ControlHandle = DictionaryDrainIteratorControlHandle;
5309
5310 fn from_channel(channel: fdomain_client::Channel) -> Self {
5311 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5312 }
5313
5314 fn control_handle(&self) -> Self::ControlHandle {
5315 DictionaryDrainIteratorControlHandle { inner: self.inner.clone() }
5316 }
5317
5318 fn into_inner(
5319 self,
5320 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5321 {
5322 (self.inner, self.is_terminated)
5323 }
5324
5325 fn from_inner(
5326 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5327 is_terminated: bool,
5328 ) -> Self {
5329 Self { inner, is_terminated }
5330 }
5331}
5332
5333impl futures::Stream for DictionaryDrainIteratorRequestStream {
5334 type Item = Result<DictionaryDrainIteratorRequest, fidl::Error>;
5335
5336 fn poll_next(
5337 mut self: std::pin::Pin<&mut Self>,
5338 cx: &mut std::task::Context<'_>,
5339 ) -> std::task::Poll<Option<Self::Item>> {
5340 let this = &mut *self;
5341 if this.inner.check_shutdown(cx) {
5342 this.is_terminated = true;
5343 return std::task::Poll::Ready(None);
5344 }
5345 if this.is_terminated {
5346 panic!("polled DictionaryDrainIteratorRequestStream after completion");
5347 }
5348 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5349 |bytes, handles| {
5350 match this.inner.channel().read_etc(cx, bytes, handles) {
5351 std::task::Poll::Ready(Ok(())) => {}
5352 std::task::Poll::Pending => return std::task::Poll::Pending,
5353 std::task::Poll::Ready(Err(None)) => {
5354 this.is_terminated = true;
5355 return std::task::Poll::Ready(None);
5356 }
5357 std::task::Poll::Ready(Err(Some(e))) => {
5358 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5359 e.into(),
5360 ))));
5361 }
5362 }
5363
5364 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5366
5367 std::task::Poll::Ready(Some(match header.ordinal {
5368 0x4f8082ca1ee26061 => {
5369 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5370 let mut req = fidl::new_empty!(DictionaryDrainIteratorGetNextRequest, fdomain_client::fidl::FDomainResourceDialect);
5371 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DictionaryDrainIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
5372 let control_handle = DictionaryDrainIteratorControlHandle {
5373 inner: this.inner.clone(),
5374 };
5375 Ok(DictionaryDrainIteratorRequest::GetNext {start_id: req.start_id,
5376limit: req.limit,
5377
5378 responder: DictionaryDrainIteratorGetNextResponder {
5379 control_handle: std::mem::ManuallyDrop::new(control_handle),
5380 tx_id: header.tx_id,
5381 },
5382 })
5383 }
5384 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5385 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
5386 ordinal: header.ordinal,
5387 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
5388 method_type: fidl::MethodType::OneWay,
5389 })
5390 }
5391 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5392 this.inner.send_framework_err(
5393 fidl::encoding::FrameworkErr::UnknownMethod,
5394 header.tx_id,
5395 header.ordinal,
5396 header.dynamic_flags(),
5397 (bytes, handles),
5398 )?;
5399 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
5400 ordinal: header.ordinal,
5401 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
5402 method_type: fidl::MethodType::TwoWay,
5403 })
5404 }
5405 _ => Err(fidl::Error::UnknownOrdinal {
5406 ordinal: header.ordinal,
5407 protocol_name: <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5408 }),
5409 }))
5410 },
5411 )
5412 }
5413}
5414
5415#[derive(Debug)]
5416pub enum DictionaryDrainIteratorRequest {
5417 GetNext { start_id: u64, limit: u32, responder: DictionaryDrainIteratorGetNextResponder },
5434 #[non_exhaustive]
5436 _UnknownMethod {
5437 ordinal: u64,
5439 control_handle: DictionaryDrainIteratorControlHandle,
5440 method_type: fidl::MethodType,
5441 },
5442}
5443
5444impl DictionaryDrainIteratorRequest {
5445 #[allow(irrefutable_let_patterns)]
5446 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryDrainIteratorGetNextResponder)> {
5447 if let DictionaryDrainIteratorRequest::GetNext { start_id, limit, responder } = self {
5448 Some((start_id, limit, responder))
5449 } else {
5450 None
5451 }
5452 }
5453
5454 pub fn method_name(&self) -> &'static str {
5456 match *self {
5457 DictionaryDrainIteratorRequest::GetNext { .. } => "get_next",
5458 DictionaryDrainIteratorRequest::_UnknownMethod {
5459 method_type: fidl::MethodType::OneWay,
5460 ..
5461 } => "unknown one-way method",
5462 DictionaryDrainIteratorRequest::_UnknownMethod {
5463 method_type: fidl::MethodType::TwoWay,
5464 ..
5465 } => "unknown two-way method",
5466 }
5467 }
5468}
5469
5470#[derive(Debug, Clone)]
5471pub struct DictionaryDrainIteratorControlHandle {
5472 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5473}
5474
5475impl fdomain_client::fidl::ControlHandle for DictionaryDrainIteratorControlHandle {
5476 fn shutdown(&self) {
5477 self.inner.shutdown()
5478 }
5479
5480 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5481 self.inner.shutdown_with_epitaph(status)
5482 }
5483
5484 fn is_closed(&self) -> bool {
5485 self.inner.channel().is_closed()
5486 }
5487 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5488 self.inner.channel().on_closed()
5489 }
5490}
5491
5492impl DictionaryDrainIteratorControlHandle {}
5493
5494#[must_use = "FIDL methods require a response to be sent"]
5495#[derive(Debug)]
5496pub struct DictionaryDrainIteratorGetNextResponder {
5497 control_handle: std::mem::ManuallyDrop<DictionaryDrainIteratorControlHandle>,
5498 tx_id: u32,
5499}
5500
5501impl std::ops::Drop for DictionaryDrainIteratorGetNextResponder {
5505 fn drop(&mut self) {
5506 self.control_handle.shutdown();
5507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5509 }
5510}
5511
5512impl fdomain_client::fidl::Responder for DictionaryDrainIteratorGetNextResponder {
5513 type ControlHandle = DictionaryDrainIteratorControlHandle;
5514
5515 fn control_handle(&self) -> &DictionaryDrainIteratorControlHandle {
5516 &self.control_handle
5517 }
5518
5519 fn drop_without_shutdown(mut self) {
5520 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5522 std::mem::forget(self);
5524 }
5525}
5526
5527impl DictionaryDrainIteratorGetNextResponder {
5528 pub fn send(
5532 self,
5533 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5534 ) -> Result<(), fidl::Error> {
5535 let _result = self.send_raw(result);
5536 if _result.is_err() {
5537 self.control_handle.shutdown();
5538 }
5539 self.drop_without_shutdown();
5540 _result
5541 }
5542
5543 pub fn send_no_shutdown_on_err(
5545 self,
5546 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5547 ) -> Result<(), fidl::Error> {
5548 let _result = self.send_raw(result);
5549 self.drop_without_shutdown();
5550 _result
5551 }
5552
5553 fn send_raw(
5554 &self,
5555 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5556 ) -> Result<(), fidl::Error> {
5557 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5558 DictionaryDrainIteratorGetNextResponse,
5559 CapabilityStoreError,
5560 >>(
5561 fidl::encoding::FlexibleResult::new(result),
5562 self.tx_id,
5563 0x4f8082ca1ee26061,
5564 fidl::encoding::DynamicFlags::FLEXIBLE,
5565 )
5566 }
5567}
5568
5569#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5570pub struct DictionaryEnumerateIteratorMarker;
5571
5572impl fdomain_client::fidl::ProtocolMarker for DictionaryEnumerateIteratorMarker {
5573 type Proxy = DictionaryEnumerateIteratorProxy;
5574 type RequestStream = DictionaryEnumerateIteratorRequestStream;
5575
5576 const DEBUG_NAME: &'static str = "(anonymous) DictionaryEnumerateIterator";
5577}
5578pub type DictionaryEnumerateIteratorGetNextResult =
5579 Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>;
5580
5581pub trait DictionaryEnumerateIteratorProxyInterface: Send + Sync {
5582 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error>>
5583 + Send;
5584 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
5585}
5586
5587#[derive(Debug, Clone)]
5588pub struct DictionaryEnumerateIteratorProxy {
5589 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5590}
5591
5592impl fdomain_client::fidl::Proxy for DictionaryEnumerateIteratorProxy {
5593 type Protocol = DictionaryEnumerateIteratorMarker;
5594
5595 fn from_channel(inner: fdomain_client::Channel) -> Self {
5596 Self::new(inner)
5597 }
5598
5599 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5600 self.client.into_channel().map_err(|client| Self { client })
5601 }
5602
5603 fn as_channel(&self) -> &fdomain_client::Channel {
5604 self.client.as_channel()
5605 }
5606}
5607
5608impl DictionaryEnumerateIteratorProxy {
5609 pub fn new(channel: fdomain_client::Channel) -> Self {
5611 let protocol_name =
5612 <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5613 Self { client: fidl::client::Client::new(channel, protocol_name) }
5614 }
5615
5616 pub fn take_event_stream(&self) -> DictionaryEnumerateIteratorEventStream {
5622 DictionaryEnumerateIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5623 }
5624
5625 pub fn r#get_next(
5646 &self,
5647 mut start_id: u64,
5648 mut limit: u32,
5649 ) -> fidl::client::QueryResponseFut<
5650 DictionaryEnumerateIteratorGetNextResult,
5651 fdomain_client::fidl::FDomainResourceDialect,
5652 > {
5653 DictionaryEnumerateIteratorProxyInterface::r#get_next(self, start_id, limit)
5654 }
5655}
5656
5657impl DictionaryEnumerateIteratorProxyInterface for DictionaryEnumerateIteratorProxy {
5658 type GetNextResponseFut = fidl::client::QueryResponseFut<
5659 DictionaryEnumerateIteratorGetNextResult,
5660 fdomain_client::fidl::FDomainResourceDialect,
5661 >;
5662 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
5663 fn _decode(
5664 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5665 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
5666 let _response = fidl::client::decode_transaction_body::<
5667 fidl::encoding::FlexibleResultType<
5668 DictionaryEnumerateIteratorGetNextResponse,
5669 CapabilityStoreError,
5670 >,
5671 fdomain_client::fidl::FDomainResourceDialect,
5672 0x14f8bc286512f5cf,
5673 >(_buf?)?
5674 .into_result_fdomain::<DictionaryEnumerateIteratorMarker>("get_next")?;
5675 Ok(_response.map(|x| (x.items, x.end_id)))
5676 }
5677 self.client.send_query_and_decode::<
5678 DictionaryEnumerateIteratorGetNextRequest,
5679 DictionaryEnumerateIteratorGetNextResult,
5680 >(
5681 (start_id, limit,),
5682 0x14f8bc286512f5cf,
5683 fidl::encoding::DynamicFlags::FLEXIBLE,
5684 _decode,
5685 )
5686 }
5687}
5688
5689pub struct DictionaryEnumerateIteratorEventStream {
5690 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5691}
5692
5693impl std::marker::Unpin for DictionaryEnumerateIteratorEventStream {}
5694
5695impl futures::stream::FusedStream for DictionaryEnumerateIteratorEventStream {
5696 fn is_terminated(&self) -> bool {
5697 self.event_receiver.is_terminated()
5698 }
5699}
5700
5701impl futures::Stream for DictionaryEnumerateIteratorEventStream {
5702 type Item = Result<DictionaryEnumerateIteratorEvent, fidl::Error>;
5703
5704 fn poll_next(
5705 mut self: std::pin::Pin<&mut Self>,
5706 cx: &mut std::task::Context<'_>,
5707 ) -> std::task::Poll<Option<Self::Item>> {
5708 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5709 &mut self.event_receiver,
5710 cx
5711 )?) {
5712 Some(buf) => {
5713 std::task::Poll::Ready(Some(DictionaryEnumerateIteratorEvent::decode(buf)))
5714 }
5715 None => std::task::Poll::Ready(None),
5716 }
5717 }
5718}
5719
5720#[derive(Debug)]
5721pub enum DictionaryEnumerateIteratorEvent {
5722 #[non_exhaustive]
5723 _UnknownEvent {
5724 ordinal: u64,
5726 },
5727}
5728
5729impl DictionaryEnumerateIteratorEvent {
5730 fn decode(
5732 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5733 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
5734 let (bytes, _handles) = buf.split_mut();
5735 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5736 debug_assert_eq!(tx_header.tx_id, 0);
5737 match tx_header.ordinal {
5738 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5739 Ok(DictionaryEnumerateIteratorEvent::_UnknownEvent {
5740 ordinal: tx_header.ordinal,
5741 })
5742 }
5743 _ => Err(fidl::Error::UnknownOrdinal {
5744 ordinal: tx_header.ordinal,
5745 protocol_name: <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5746 })
5747 }
5748 }
5749}
5750
5751pub struct DictionaryEnumerateIteratorRequestStream {
5753 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5754 is_terminated: bool,
5755}
5756
5757impl std::marker::Unpin for DictionaryEnumerateIteratorRequestStream {}
5758
5759impl futures::stream::FusedStream for DictionaryEnumerateIteratorRequestStream {
5760 fn is_terminated(&self) -> bool {
5761 self.is_terminated
5762 }
5763}
5764
5765impl fdomain_client::fidl::RequestStream for DictionaryEnumerateIteratorRequestStream {
5766 type Protocol = DictionaryEnumerateIteratorMarker;
5767 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
5768
5769 fn from_channel(channel: fdomain_client::Channel) -> Self {
5770 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5771 }
5772
5773 fn control_handle(&self) -> Self::ControlHandle {
5774 DictionaryEnumerateIteratorControlHandle { inner: self.inner.clone() }
5775 }
5776
5777 fn into_inner(
5778 self,
5779 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5780 {
5781 (self.inner, self.is_terminated)
5782 }
5783
5784 fn from_inner(
5785 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5786 is_terminated: bool,
5787 ) -> Self {
5788 Self { inner, is_terminated }
5789 }
5790}
5791
5792impl futures::Stream for DictionaryEnumerateIteratorRequestStream {
5793 type Item = Result<DictionaryEnumerateIteratorRequest, fidl::Error>;
5794
5795 fn poll_next(
5796 mut self: std::pin::Pin<&mut Self>,
5797 cx: &mut std::task::Context<'_>,
5798 ) -> std::task::Poll<Option<Self::Item>> {
5799 let this = &mut *self;
5800 if this.inner.check_shutdown(cx) {
5801 this.is_terminated = true;
5802 return std::task::Poll::Ready(None);
5803 }
5804 if this.is_terminated {
5805 panic!("polled DictionaryEnumerateIteratorRequestStream after completion");
5806 }
5807 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5808 |bytes, handles| {
5809 match this.inner.channel().read_etc(cx, bytes, handles) {
5810 std::task::Poll::Ready(Ok(())) => {}
5811 std::task::Poll::Pending => return std::task::Poll::Pending,
5812 std::task::Poll::Ready(Err(None)) => {
5813 this.is_terminated = true;
5814 return std::task::Poll::Ready(None);
5815 }
5816 std::task::Poll::Ready(Err(Some(e))) => {
5817 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5818 e.into(),
5819 ))));
5820 }
5821 }
5822
5823 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5825
5826 std::task::Poll::Ready(Some(match header.ordinal {
5827 0x14f8bc286512f5cf => {
5828 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5829 let mut req = fidl::new_empty!(DictionaryEnumerateIteratorGetNextRequest, fdomain_client::fidl::FDomainResourceDialect);
5830 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DictionaryEnumerateIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
5831 let control_handle = DictionaryEnumerateIteratorControlHandle {
5832 inner: this.inner.clone(),
5833 };
5834 Ok(DictionaryEnumerateIteratorRequest::GetNext {start_id: req.start_id,
5835limit: req.limit,
5836
5837 responder: DictionaryEnumerateIteratorGetNextResponder {
5838 control_handle: std::mem::ManuallyDrop::new(control_handle),
5839 tx_id: header.tx_id,
5840 },
5841 })
5842 }
5843 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5844 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
5845 ordinal: header.ordinal,
5846 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
5847 method_type: fidl::MethodType::OneWay,
5848 })
5849 }
5850 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5851 this.inner.send_framework_err(
5852 fidl::encoding::FrameworkErr::UnknownMethod,
5853 header.tx_id,
5854 header.ordinal,
5855 header.dynamic_flags(),
5856 (bytes, handles),
5857 )?;
5858 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
5859 ordinal: header.ordinal,
5860 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
5861 method_type: fidl::MethodType::TwoWay,
5862 })
5863 }
5864 _ => Err(fidl::Error::UnknownOrdinal {
5865 ordinal: header.ordinal,
5866 protocol_name: <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5867 }),
5868 }))
5869 },
5870 )
5871 }
5872}
5873
5874#[derive(Debug)]
5875pub enum DictionaryEnumerateIteratorRequest {
5876 GetNext { start_id: u64, limit: u32, responder: DictionaryEnumerateIteratorGetNextResponder },
5897 #[non_exhaustive]
5899 _UnknownMethod {
5900 ordinal: u64,
5902 control_handle: DictionaryEnumerateIteratorControlHandle,
5903 method_type: fidl::MethodType,
5904 },
5905}
5906
5907impl DictionaryEnumerateIteratorRequest {
5908 #[allow(irrefutable_let_patterns)]
5909 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryEnumerateIteratorGetNextResponder)> {
5910 if let DictionaryEnumerateIteratorRequest::GetNext { start_id, limit, responder } = self {
5911 Some((start_id, limit, responder))
5912 } else {
5913 None
5914 }
5915 }
5916
5917 pub fn method_name(&self) -> &'static str {
5919 match *self {
5920 DictionaryEnumerateIteratorRequest::GetNext { .. } => "get_next",
5921 DictionaryEnumerateIteratorRequest::_UnknownMethod {
5922 method_type: fidl::MethodType::OneWay,
5923 ..
5924 } => "unknown one-way method",
5925 DictionaryEnumerateIteratorRequest::_UnknownMethod {
5926 method_type: fidl::MethodType::TwoWay,
5927 ..
5928 } => "unknown two-way method",
5929 }
5930 }
5931}
5932
5933#[derive(Debug, Clone)]
5934pub struct DictionaryEnumerateIteratorControlHandle {
5935 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5936}
5937
5938impl fdomain_client::fidl::ControlHandle for DictionaryEnumerateIteratorControlHandle {
5939 fn shutdown(&self) {
5940 self.inner.shutdown()
5941 }
5942
5943 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5944 self.inner.shutdown_with_epitaph(status)
5945 }
5946
5947 fn is_closed(&self) -> bool {
5948 self.inner.channel().is_closed()
5949 }
5950 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5951 self.inner.channel().on_closed()
5952 }
5953}
5954
5955impl DictionaryEnumerateIteratorControlHandle {}
5956
5957#[must_use = "FIDL methods require a response to be sent"]
5958#[derive(Debug)]
5959pub struct DictionaryEnumerateIteratorGetNextResponder {
5960 control_handle: std::mem::ManuallyDrop<DictionaryEnumerateIteratorControlHandle>,
5961 tx_id: u32,
5962}
5963
5964impl std::ops::Drop for DictionaryEnumerateIteratorGetNextResponder {
5968 fn drop(&mut self) {
5969 self.control_handle.shutdown();
5970 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5972 }
5973}
5974
5975impl fdomain_client::fidl::Responder for DictionaryEnumerateIteratorGetNextResponder {
5976 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
5977
5978 fn control_handle(&self) -> &DictionaryEnumerateIteratorControlHandle {
5979 &self.control_handle
5980 }
5981
5982 fn drop_without_shutdown(mut self) {
5983 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5985 std::mem::forget(self);
5987 }
5988}
5989
5990impl DictionaryEnumerateIteratorGetNextResponder {
5991 pub fn send(
5995 self,
5996 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
5997 ) -> Result<(), fidl::Error> {
5998 let _result = self.send_raw(result);
5999 if _result.is_err() {
6000 self.control_handle.shutdown();
6001 }
6002 self.drop_without_shutdown();
6003 _result
6004 }
6005
6006 pub fn send_no_shutdown_on_err(
6008 self,
6009 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
6010 ) -> Result<(), fidl::Error> {
6011 let _result = self.send_raw(result);
6012 self.drop_without_shutdown();
6013 _result
6014 }
6015
6016 fn send_raw(
6017 &self,
6018 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
6019 ) -> Result<(), fidl::Error> {
6020 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6021 DictionaryEnumerateIteratorGetNextResponse,
6022 CapabilityStoreError,
6023 >>(
6024 fidl::encoding::FlexibleResult::new(
6025 result
6026 .as_mut()
6027 .map_err(|e| *e)
6028 .map(|(items, end_id)| (items.as_mut_slice(), *end_id)),
6029 ),
6030 self.tx_id,
6031 0x14f8bc286512f5cf,
6032 fidl::encoding::DynamicFlags::FLEXIBLE,
6033 )
6034 }
6035}
6036
6037#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6038pub struct DictionaryKeysIteratorMarker;
6039
6040impl fdomain_client::fidl::ProtocolMarker for DictionaryKeysIteratorMarker {
6041 type Proxy = DictionaryKeysIteratorProxy;
6042 type RequestStream = DictionaryKeysIteratorRequestStream;
6043
6044 const DEBUG_NAME: &'static str = "(anonymous) DictionaryKeysIterator";
6045}
6046
6047pub trait DictionaryKeysIteratorProxyInterface: Send + Sync {
6048 type GetNextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
6049 fn r#get_next(&self) -> Self::GetNextResponseFut;
6050}
6051
6052#[derive(Debug, Clone)]
6053pub struct DictionaryKeysIteratorProxy {
6054 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6055}
6056
6057impl fdomain_client::fidl::Proxy for DictionaryKeysIteratorProxy {
6058 type Protocol = DictionaryKeysIteratorMarker;
6059
6060 fn from_channel(inner: fdomain_client::Channel) -> Self {
6061 Self::new(inner)
6062 }
6063
6064 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6065 self.client.into_channel().map_err(|client| Self { client })
6066 }
6067
6068 fn as_channel(&self) -> &fdomain_client::Channel {
6069 self.client.as_channel()
6070 }
6071}
6072
6073impl DictionaryKeysIteratorProxy {
6074 pub fn new(channel: fdomain_client::Channel) -> Self {
6076 let protocol_name =
6077 <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6078 Self { client: fidl::client::Client::new(channel, protocol_name) }
6079 }
6080
6081 pub fn take_event_stream(&self) -> DictionaryKeysIteratorEventStream {
6087 DictionaryKeysIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6088 }
6089
6090 pub fn r#get_next(
6091 &self,
6092 ) -> fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>
6093 {
6094 DictionaryKeysIteratorProxyInterface::r#get_next(self)
6095 }
6096}
6097
6098impl DictionaryKeysIteratorProxyInterface for DictionaryKeysIteratorProxy {
6099 type GetNextResponseFut =
6100 fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>;
6101 fn r#get_next(&self) -> Self::GetNextResponseFut {
6102 fn _decode(
6103 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6104 ) -> Result<Vec<String>, fidl::Error> {
6105 let _response = fidl::client::decode_transaction_body::<
6106 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
6107 fdomain_client::fidl::FDomainResourceDialect,
6108 0x453828cbacca7d53,
6109 >(_buf?)?
6110 .into_result_fdomain::<DictionaryKeysIteratorMarker>("get_next")?;
6111 Ok(_response.keys)
6112 }
6113 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
6114 (),
6115 0x453828cbacca7d53,
6116 fidl::encoding::DynamicFlags::FLEXIBLE,
6117 _decode,
6118 )
6119 }
6120}
6121
6122pub struct DictionaryKeysIteratorEventStream {
6123 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6124}
6125
6126impl std::marker::Unpin for DictionaryKeysIteratorEventStream {}
6127
6128impl futures::stream::FusedStream for DictionaryKeysIteratorEventStream {
6129 fn is_terminated(&self) -> bool {
6130 self.event_receiver.is_terminated()
6131 }
6132}
6133
6134impl futures::Stream for DictionaryKeysIteratorEventStream {
6135 type Item = Result<DictionaryKeysIteratorEvent, fidl::Error>;
6136
6137 fn poll_next(
6138 mut self: std::pin::Pin<&mut Self>,
6139 cx: &mut std::task::Context<'_>,
6140 ) -> std::task::Poll<Option<Self::Item>> {
6141 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6142 &mut self.event_receiver,
6143 cx
6144 )?) {
6145 Some(buf) => std::task::Poll::Ready(Some(DictionaryKeysIteratorEvent::decode(buf))),
6146 None => std::task::Poll::Ready(None),
6147 }
6148 }
6149}
6150
6151#[derive(Debug)]
6152pub enum DictionaryKeysIteratorEvent {
6153 #[non_exhaustive]
6154 _UnknownEvent {
6155 ordinal: u64,
6157 },
6158}
6159
6160impl DictionaryKeysIteratorEvent {
6161 fn decode(
6163 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6164 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
6165 let (bytes, _handles) = buf.split_mut();
6166 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6167 debug_assert_eq!(tx_header.tx_id, 0);
6168 match tx_header.ordinal {
6169 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6170 Ok(DictionaryKeysIteratorEvent::_UnknownEvent {
6171 ordinal: tx_header.ordinal,
6172 })
6173 }
6174 _ => Err(fidl::Error::UnknownOrdinal {
6175 ordinal: tx_header.ordinal,
6176 protocol_name: <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6177 })
6178 }
6179 }
6180}
6181
6182pub struct DictionaryKeysIteratorRequestStream {
6184 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6185 is_terminated: bool,
6186}
6187
6188impl std::marker::Unpin for DictionaryKeysIteratorRequestStream {}
6189
6190impl futures::stream::FusedStream for DictionaryKeysIteratorRequestStream {
6191 fn is_terminated(&self) -> bool {
6192 self.is_terminated
6193 }
6194}
6195
6196impl fdomain_client::fidl::RequestStream for DictionaryKeysIteratorRequestStream {
6197 type Protocol = DictionaryKeysIteratorMarker;
6198 type ControlHandle = DictionaryKeysIteratorControlHandle;
6199
6200 fn from_channel(channel: fdomain_client::Channel) -> Self {
6201 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6202 }
6203
6204 fn control_handle(&self) -> Self::ControlHandle {
6205 DictionaryKeysIteratorControlHandle { inner: self.inner.clone() }
6206 }
6207
6208 fn into_inner(
6209 self,
6210 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6211 {
6212 (self.inner, self.is_terminated)
6213 }
6214
6215 fn from_inner(
6216 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6217 is_terminated: bool,
6218 ) -> Self {
6219 Self { inner, is_terminated }
6220 }
6221}
6222
6223impl futures::Stream for DictionaryKeysIteratorRequestStream {
6224 type Item = Result<DictionaryKeysIteratorRequest, fidl::Error>;
6225
6226 fn poll_next(
6227 mut self: std::pin::Pin<&mut Self>,
6228 cx: &mut std::task::Context<'_>,
6229 ) -> std::task::Poll<Option<Self::Item>> {
6230 let this = &mut *self;
6231 if this.inner.check_shutdown(cx) {
6232 this.is_terminated = true;
6233 return std::task::Poll::Ready(None);
6234 }
6235 if this.is_terminated {
6236 panic!("polled DictionaryKeysIteratorRequestStream after completion");
6237 }
6238 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6239 |bytes, handles| {
6240 match this.inner.channel().read_etc(cx, bytes, handles) {
6241 std::task::Poll::Ready(Ok(())) => {}
6242 std::task::Poll::Pending => return std::task::Poll::Pending,
6243 std::task::Poll::Ready(Err(None)) => {
6244 this.is_terminated = true;
6245 return std::task::Poll::Ready(None);
6246 }
6247 std::task::Poll::Ready(Err(Some(e))) => {
6248 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6249 e.into(),
6250 ))));
6251 }
6252 }
6253
6254 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6256
6257 std::task::Poll::Ready(Some(match header.ordinal {
6258 0x453828cbacca7d53 => {
6259 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6260 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
6261 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6262 let control_handle = DictionaryKeysIteratorControlHandle {
6263 inner: this.inner.clone(),
6264 };
6265 Ok(DictionaryKeysIteratorRequest::GetNext {
6266 responder: DictionaryKeysIteratorGetNextResponder {
6267 control_handle: std::mem::ManuallyDrop::new(control_handle),
6268 tx_id: header.tx_id,
6269 },
6270 })
6271 }
6272 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6273 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
6274 ordinal: header.ordinal,
6275 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
6276 method_type: fidl::MethodType::OneWay,
6277 })
6278 }
6279 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6280 this.inner.send_framework_err(
6281 fidl::encoding::FrameworkErr::UnknownMethod,
6282 header.tx_id,
6283 header.ordinal,
6284 header.dynamic_flags(),
6285 (bytes, handles),
6286 )?;
6287 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
6288 ordinal: header.ordinal,
6289 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
6290 method_type: fidl::MethodType::TwoWay,
6291 })
6292 }
6293 _ => Err(fidl::Error::UnknownOrdinal {
6294 ordinal: header.ordinal,
6295 protocol_name: <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6296 }),
6297 }))
6298 },
6299 )
6300 }
6301}
6302
6303#[derive(Debug)]
6304pub enum DictionaryKeysIteratorRequest {
6305 GetNext {
6306 responder: DictionaryKeysIteratorGetNextResponder,
6307 },
6308 #[non_exhaustive]
6310 _UnknownMethod {
6311 ordinal: u64,
6313 control_handle: DictionaryKeysIteratorControlHandle,
6314 method_type: fidl::MethodType,
6315 },
6316}
6317
6318impl DictionaryKeysIteratorRequest {
6319 #[allow(irrefutable_let_patterns)]
6320 pub fn into_get_next(self) -> Option<(DictionaryKeysIteratorGetNextResponder)> {
6321 if let DictionaryKeysIteratorRequest::GetNext { responder } = self {
6322 Some((responder))
6323 } else {
6324 None
6325 }
6326 }
6327
6328 pub fn method_name(&self) -> &'static str {
6330 match *self {
6331 DictionaryKeysIteratorRequest::GetNext { .. } => "get_next",
6332 DictionaryKeysIteratorRequest::_UnknownMethod {
6333 method_type: fidl::MethodType::OneWay,
6334 ..
6335 } => "unknown one-way method",
6336 DictionaryKeysIteratorRequest::_UnknownMethod {
6337 method_type: fidl::MethodType::TwoWay,
6338 ..
6339 } => "unknown two-way method",
6340 }
6341 }
6342}
6343
6344#[derive(Debug, Clone)]
6345pub struct DictionaryKeysIteratorControlHandle {
6346 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6347}
6348
6349impl fdomain_client::fidl::ControlHandle for DictionaryKeysIteratorControlHandle {
6350 fn shutdown(&self) {
6351 self.inner.shutdown()
6352 }
6353
6354 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6355 self.inner.shutdown_with_epitaph(status)
6356 }
6357
6358 fn is_closed(&self) -> bool {
6359 self.inner.channel().is_closed()
6360 }
6361 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6362 self.inner.channel().on_closed()
6363 }
6364}
6365
6366impl DictionaryKeysIteratorControlHandle {}
6367
6368#[must_use = "FIDL methods require a response to be sent"]
6369#[derive(Debug)]
6370pub struct DictionaryKeysIteratorGetNextResponder {
6371 control_handle: std::mem::ManuallyDrop<DictionaryKeysIteratorControlHandle>,
6372 tx_id: u32,
6373}
6374
6375impl std::ops::Drop for DictionaryKeysIteratorGetNextResponder {
6379 fn drop(&mut self) {
6380 self.control_handle.shutdown();
6381 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6383 }
6384}
6385
6386impl fdomain_client::fidl::Responder for DictionaryKeysIteratorGetNextResponder {
6387 type ControlHandle = DictionaryKeysIteratorControlHandle;
6388
6389 fn control_handle(&self) -> &DictionaryKeysIteratorControlHandle {
6390 &self.control_handle
6391 }
6392
6393 fn drop_without_shutdown(mut self) {
6394 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6396 std::mem::forget(self);
6398 }
6399}
6400
6401impl DictionaryKeysIteratorGetNextResponder {
6402 pub fn send(self, mut keys: &[String]) -> Result<(), fidl::Error> {
6406 let _result = self.send_raw(keys);
6407 if _result.is_err() {
6408 self.control_handle.shutdown();
6409 }
6410 self.drop_without_shutdown();
6411 _result
6412 }
6413
6414 pub fn send_no_shutdown_on_err(self, mut keys: &[String]) -> Result<(), fidl::Error> {
6416 let _result = self.send_raw(keys);
6417 self.drop_without_shutdown();
6418 _result
6419 }
6420
6421 fn send_raw(&self, mut keys: &[String]) -> Result<(), fidl::Error> {
6422 self.control_handle
6423 .inner
6424 .send::<fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>>(
6425 fidl::encoding::Flexible::new((keys,)),
6426 self.tx_id,
6427 0x453828cbacca7d53,
6428 fidl::encoding::DynamicFlags::FLEXIBLE,
6429 )
6430 }
6431}
6432
6433#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6434pub struct DictionaryRouterMarker;
6435
6436impl fdomain_client::fidl::ProtocolMarker for DictionaryRouterMarker {
6437 type Proxy = DictionaryRouterProxy;
6438 type RequestStream = DictionaryRouterRequestStream;
6439
6440 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
6441}
6442impl fdomain_client::fidl::DiscoverableProtocolMarker for DictionaryRouterMarker {}
6443pub type DictionaryRouterRouteResult = Result<DictionaryRouterRouteResponse, RouterError>;
6444
6445pub trait DictionaryRouterProxyInterface: Send + Sync {
6446 type RouteResponseFut: std::future::Future<Output = Result<DictionaryRouterRouteResult, fidl::Error>>
6447 + Send;
6448 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
6449}
6450
6451#[derive(Debug, Clone)]
6452pub struct DictionaryRouterProxy {
6453 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6454}
6455
6456impl fdomain_client::fidl::Proxy for DictionaryRouterProxy {
6457 type Protocol = DictionaryRouterMarker;
6458
6459 fn from_channel(inner: fdomain_client::Channel) -> Self {
6460 Self::new(inner)
6461 }
6462
6463 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6464 self.client.into_channel().map_err(|client| Self { client })
6465 }
6466
6467 fn as_channel(&self) -> &fdomain_client::Channel {
6468 self.client.as_channel()
6469 }
6470}
6471
6472impl DictionaryRouterProxy {
6473 pub fn new(channel: fdomain_client::Channel) -> Self {
6475 let protocol_name =
6476 <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6477 Self { client: fidl::client::Client::new(channel, protocol_name) }
6478 }
6479
6480 pub fn take_event_stream(&self) -> DictionaryRouterEventStream {
6486 DictionaryRouterEventStream { event_receiver: self.client.take_event_receiver() }
6487 }
6488
6489 pub fn r#route(
6490 &self,
6491 mut payload: RouteRequest,
6492 ) -> fidl::client::QueryResponseFut<
6493 DictionaryRouterRouteResult,
6494 fdomain_client::fidl::FDomainResourceDialect,
6495 > {
6496 DictionaryRouterProxyInterface::r#route(self, payload)
6497 }
6498}
6499
6500impl DictionaryRouterProxyInterface for DictionaryRouterProxy {
6501 type RouteResponseFut = fidl::client::QueryResponseFut<
6502 DictionaryRouterRouteResult,
6503 fdomain_client::fidl::FDomainResourceDialect,
6504 >;
6505 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
6506 fn _decode(
6507 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6508 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
6509 let _response = fidl::client::decode_transaction_body::<
6510 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
6511 fdomain_client::fidl::FDomainResourceDialect,
6512 0x714c65bfe54bd79f,
6513 >(_buf?)?
6514 .into_result_fdomain::<DictionaryRouterMarker>("route")?;
6515 Ok(_response.map(|x| x))
6516 }
6517 self.client.send_query_and_decode::<RouteRequest, DictionaryRouterRouteResult>(
6518 &mut payload,
6519 0x714c65bfe54bd79f,
6520 fidl::encoding::DynamicFlags::FLEXIBLE,
6521 _decode,
6522 )
6523 }
6524}
6525
6526pub struct DictionaryRouterEventStream {
6527 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6528}
6529
6530impl std::marker::Unpin for DictionaryRouterEventStream {}
6531
6532impl futures::stream::FusedStream for DictionaryRouterEventStream {
6533 fn is_terminated(&self) -> bool {
6534 self.event_receiver.is_terminated()
6535 }
6536}
6537
6538impl futures::Stream for DictionaryRouterEventStream {
6539 type Item = Result<DictionaryRouterEvent, fidl::Error>;
6540
6541 fn poll_next(
6542 mut self: std::pin::Pin<&mut Self>,
6543 cx: &mut std::task::Context<'_>,
6544 ) -> std::task::Poll<Option<Self::Item>> {
6545 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6546 &mut self.event_receiver,
6547 cx
6548 )?) {
6549 Some(buf) => std::task::Poll::Ready(Some(DictionaryRouterEvent::decode(buf))),
6550 None => std::task::Poll::Ready(None),
6551 }
6552 }
6553}
6554
6555#[derive(Debug)]
6556pub enum DictionaryRouterEvent {
6557 #[non_exhaustive]
6558 _UnknownEvent {
6559 ordinal: u64,
6561 },
6562}
6563
6564impl DictionaryRouterEvent {
6565 fn decode(
6567 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6568 ) -> Result<DictionaryRouterEvent, fidl::Error> {
6569 let (bytes, _handles) = buf.split_mut();
6570 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6571 debug_assert_eq!(tx_header.tx_id, 0);
6572 match tx_header.ordinal {
6573 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6574 Ok(DictionaryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6575 }
6576 _ => Err(fidl::Error::UnknownOrdinal {
6577 ordinal: tx_header.ordinal,
6578 protocol_name:
6579 <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6580 }),
6581 }
6582 }
6583}
6584
6585pub struct DictionaryRouterRequestStream {
6587 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6588 is_terminated: bool,
6589}
6590
6591impl std::marker::Unpin for DictionaryRouterRequestStream {}
6592
6593impl futures::stream::FusedStream for DictionaryRouterRequestStream {
6594 fn is_terminated(&self) -> bool {
6595 self.is_terminated
6596 }
6597}
6598
6599impl fdomain_client::fidl::RequestStream for DictionaryRouterRequestStream {
6600 type Protocol = DictionaryRouterMarker;
6601 type ControlHandle = DictionaryRouterControlHandle;
6602
6603 fn from_channel(channel: fdomain_client::Channel) -> Self {
6604 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6605 }
6606
6607 fn control_handle(&self) -> Self::ControlHandle {
6608 DictionaryRouterControlHandle { inner: self.inner.clone() }
6609 }
6610
6611 fn into_inner(
6612 self,
6613 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6614 {
6615 (self.inner, self.is_terminated)
6616 }
6617
6618 fn from_inner(
6619 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6620 is_terminated: bool,
6621 ) -> Self {
6622 Self { inner, is_terminated }
6623 }
6624}
6625
6626impl futures::Stream for DictionaryRouterRequestStream {
6627 type Item = Result<DictionaryRouterRequest, fidl::Error>;
6628
6629 fn poll_next(
6630 mut self: std::pin::Pin<&mut Self>,
6631 cx: &mut std::task::Context<'_>,
6632 ) -> std::task::Poll<Option<Self::Item>> {
6633 let this = &mut *self;
6634 if this.inner.check_shutdown(cx) {
6635 this.is_terminated = true;
6636 return std::task::Poll::Ready(None);
6637 }
6638 if this.is_terminated {
6639 panic!("polled DictionaryRouterRequestStream after completion");
6640 }
6641 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6642 |bytes, handles| {
6643 match this.inner.channel().read_etc(cx, bytes, handles) {
6644 std::task::Poll::Ready(Ok(())) => {}
6645 std::task::Poll::Pending => return std::task::Poll::Pending,
6646 std::task::Poll::Ready(Err(None)) => {
6647 this.is_terminated = true;
6648 return std::task::Poll::Ready(None);
6649 }
6650 std::task::Poll::Ready(Err(Some(e))) => {
6651 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6652 e.into(),
6653 ))));
6654 }
6655 }
6656
6657 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6659
6660 std::task::Poll::Ready(Some(match header.ordinal {
6661 0x714c65bfe54bd79f => {
6662 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6663 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
6664 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
6665 let control_handle = DictionaryRouterControlHandle {
6666 inner: this.inner.clone(),
6667 };
6668 Ok(DictionaryRouterRequest::Route {payload: req,
6669 responder: DictionaryRouterRouteResponder {
6670 control_handle: std::mem::ManuallyDrop::new(control_handle),
6671 tx_id: header.tx_id,
6672 },
6673 })
6674 }
6675 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6676 Ok(DictionaryRouterRequest::_UnknownMethod {
6677 ordinal: header.ordinal,
6678 control_handle: DictionaryRouterControlHandle { inner: this.inner.clone() },
6679 method_type: fidl::MethodType::OneWay,
6680 })
6681 }
6682 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6683 this.inner.send_framework_err(
6684 fidl::encoding::FrameworkErr::UnknownMethod,
6685 header.tx_id,
6686 header.ordinal,
6687 header.dynamic_flags(),
6688 (bytes, handles),
6689 )?;
6690 Ok(DictionaryRouterRequest::_UnknownMethod {
6691 ordinal: header.ordinal,
6692 control_handle: DictionaryRouterControlHandle { inner: this.inner.clone() },
6693 method_type: fidl::MethodType::TwoWay,
6694 })
6695 }
6696 _ => Err(fidl::Error::UnknownOrdinal {
6697 ordinal: header.ordinal,
6698 protocol_name: <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6699 }),
6700 }))
6701 },
6702 )
6703 }
6704}
6705
6706#[derive(Debug)]
6707pub enum DictionaryRouterRequest {
6708 Route {
6709 payload: RouteRequest,
6710 responder: DictionaryRouterRouteResponder,
6711 },
6712 #[non_exhaustive]
6714 _UnknownMethod {
6715 ordinal: u64,
6717 control_handle: DictionaryRouterControlHandle,
6718 method_type: fidl::MethodType,
6719 },
6720}
6721
6722impl DictionaryRouterRequest {
6723 #[allow(irrefutable_let_patterns)]
6724 pub fn into_route(self) -> Option<(RouteRequest, DictionaryRouterRouteResponder)> {
6725 if let DictionaryRouterRequest::Route { payload, responder } = self {
6726 Some((payload, responder))
6727 } else {
6728 None
6729 }
6730 }
6731
6732 pub fn method_name(&self) -> &'static str {
6734 match *self {
6735 DictionaryRouterRequest::Route { .. } => "route",
6736 DictionaryRouterRequest::_UnknownMethod {
6737 method_type: fidl::MethodType::OneWay,
6738 ..
6739 } => "unknown one-way method",
6740 DictionaryRouterRequest::_UnknownMethod {
6741 method_type: fidl::MethodType::TwoWay,
6742 ..
6743 } => "unknown two-way method",
6744 }
6745 }
6746}
6747
6748#[derive(Debug, Clone)]
6749pub struct DictionaryRouterControlHandle {
6750 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6751}
6752
6753impl fdomain_client::fidl::ControlHandle for DictionaryRouterControlHandle {
6754 fn shutdown(&self) {
6755 self.inner.shutdown()
6756 }
6757
6758 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6759 self.inner.shutdown_with_epitaph(status)
6760 }
6761
6762 fn is_closed(&self) -> bool {
6763 self.inner.channel().is_closed()
6764 }
6765 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6766 self.inner.channel().on_closed()
6767 }
6768}
6769
6770impl DictionaryRouterControlHandle {}
6771
6772#[must_use = "FIDL methods require a response to be sent"]
6773#[derive(Debug)]
6774pub struct DictionaryRouterRouteResponder {
6775 control_handle: std::mem::ManuallyDrop<DictionaryRouterControlHandle>,
6776 tx_id: u32,
6777}
6778
6779impl std::ops::Drop for DictionaryRouterRouteResponder {
6783 fn drop(&mut self) {
6784 self.control_handle.shutdown();
6785 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6787 }
6788}
6789
6790impl fdomain_client::fidl::Responder for DictionaryRouterRouteResponder {
6791 type ControlHandle = DictionaryRouterControlHandle;
6792
6793 fn control_handle(&self) -> &DictionaryRouterControlHandle {
6794 &self.control_handle
6795 }
6796
6797 fn drop_without_shutdown(mut self) {
6798 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6800 std::mem::forget(self);
6802 }
6803}
6804
6805impl DictionaryRouterRouteResponder {
6806 pub fn send(
6810 self,
6811 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6812 ) -> Result<(), fidl::Error> {
6813 let _result = self.send_raw(result);
6814 if _result.is_err() {
6815 self.control_handle.shutdown();
6816 }
6817 self.drop_without_shutdown();
6818 _result
6819 }
6820
6821 pub fn send_no_shutdown_on_err(
6823 self,
6824 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6825 ) -> Result<(), fidl::Error> {
6826 let _result = self.send_raw(result);
6827 self.drop_without_shutdown();
6828 _result
6829 }
6830
6831 fn send_raw(
6832 &self,
6833 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6834 ) -> Result<(), fidl::Error> {
6835 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6836 DictionaryRouterRouteResponse,
6837 RouterError,
6838 >>(
6839 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
6840 self.tx_id,
6841 0x714c65bfe54bd79f,
6842 fidl::encoding::DynamicFlags::FLEXIBLE,
6843 )
6844 }
6845}
6846
6847#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6848pub struct DirConnectorRouterMarker;
6849
6850impl fdomain_client::fidl::ProtocolMarker for DirConnectorRouterMarker {
6851 type Proxy = DirConnectorRouterProxy;
6852 type RequestStream = DirConnectorRouterRequestStream;
6853
6854 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
6855}
6856impl fdomain_client::fidl::DiscoverableProtocolMarker for DirConnectorRouterMarker {}
6857pub type DirConnectorRouterRouteResult = Result<DirConnectorRouterRouteResponse, RouterError>;
6858
6859pub trait DirConnectorRouterProxyInterface: Send + Sync {
6860 type RouteResponseFut: std::future::Future<Output = Result<DirConnectorRouterRouteResult, fidl::Error>>
6861 + Send;
6862 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
6863}
6864
6865#[derive(Debug, Clone)]
6866pub struct DirConnectorRouterProxy {
6867 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6868}
6869
6870impl fdomain_client::fidl::Proxy for DirConnectorRouterProxy {
6871 type Protocol = DirConnectorRouterMarker;
6872
6873 fn from_channel(inner: fdomain_client::Channel) -> Self {
6874 Self::new(inner)
6875 }
6876
6877 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6878 self.client.into_channel().map_err(|client| Self { client })
6879 }
6880
6881 fn as_channel(&self) -> &fdomain_client::Channel {
6882 self.client.as_channel()
6883 }
6884}
6885
6886impl DirConnectorRouterProxy {
6887 pub fn new(channel: fdomain_client::Channel) -> Self {
6889 let protocol_name =
6890 <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6891 Self { client: fidl::client::Client::new(channel, protocol_name) }
6892 }
6893
6894 pub fn take_event_stream(&self) -> DirConnectorRouterEventStream {
6900 DirConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
6901 }
6902
6903 pub fn r#route(
6904 &self,
6905 mut payload: RouteRequest,
6906 ) -> fidl::client::QueryResponseFut<
6907 DirConnectorRouterRouteResult,
6908 fdomain_client::fidl::FDomainResourceDialect,
6909 > {
6910 DirConnectorRouterProxyInterface::r#route(self, payload)
6911 }
6912}
6913
6914impl DirConnectorRouterProxyInterface for DirConnectorRouterProxy {
6915 type RouteResponseFut = fidl::client::QueryResponseFut<
6916 DirConnectorRouterRouteResult,
6917 fdomain_client::fidl::FDomainResourceDialect,
6918 >;
6919 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
6920 fn _decode(
6921 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6922 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
6923 let _response = fidl::client::decode_transaction_body::<
6924 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
6925 fdomain_client::fidl::FDomainResourceDialect,
6926 0xd7e0f01da2c8e40,
6927 >(_buf?)?
6928 .into_result_fdomain::<DirConnectorRouterMarker>("route")?;
6929 Ok(_response.map(|x| x))
6930 }
6931 self.client.send_query_and_decode::<RouteRequest, DirConnectorRouterRouteResult>(
6932 &mut payload,
6933 0xd7e0f01da2c8e40,
6934 fidl::encoding::DynamicFlags::FLEXIBLE,
6935 _decode,
6936 )
6937 }
6938}
6939
6940pub struct DirConnectorRouterEventStream {
6941 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6942}
6943
6944impl std::marker::Unpin for DirConnectorRouterEventStream {}
6945
6946impl futures::stream::FusedStream for DirConnectorRouterEventStream {
6947 fn is_terminated(&self) -> bool {
6948 self.event_receiver.is_terminated()
6949 }
6950}
6951
6952impl futures::Stream for DirConnectorRouterEventStream {
6953 type Item = Result<DirConnectorRouterEvent, fidl::Error>;
6954
6955 fn poll_next(
6956 mut self: std::pin::Pin<&mut Self>,
6957 cx: &mut std::task::Context<'_>,
6958 ) -> std::task::Poll<Option<Self::Item>> {
6959 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6960 &mut self.event_receiver,
6961 cx
6962 )?) {
6963 Some(buf) => std::task::Poll::Ready(Some(DirConnectorRouterEvent::decode(buf))),
6964 None => std::task::Poll::Ready(None),
6965 }
6966 }
6967}
6968
6969#[derive(Debug)]
6970pub enum DirConnectorRouterEvent {
6971 #[non_exhaustive]
6972 _UnknownEvent {
6973 ordinal: u64,
6975 },
6976}
6977
6978impl DirConnectorRouterEvent {
6979 fn decode(
6981 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6982 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
6983 let (bytes, _handles) = buf.split_mut();
6984 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6985 debug_assert_eq!(tx_header.tx_id, 0);
6986 match tx_header.ordinal {
6987 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6988 Ok(DirConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6989 }
6990 _ => Err(fidl::Error::UnknownOrdinal {
6991 ordinal: tx_header.ordinal,
6992 protocol_name:
6993 <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6994 }),
6995 }
6996 }
6997}
6998
6999pub struct DirConnectorRouterRequestStream {
7001 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7002 is_terminated: bool,
7003}
7004
7005impl std::marker::Unpin for DirConnectorRouterRequestStream {}
7006
7007impl futures::stream::FusedStream for DirConnectorRouterRequestStream {
7008 fn is_terminated(&self) -> bool {
7009 self.is_terminated
7010 }
7011}
7012
7013impl fdomain_client::fidl::RequestStream for DirConnectorRouterRequestStream {
7014 type Protocol = DirConnectorRouterMarker;
7015 type ControlHandle = DirConnectorRouterControlHandle;
7016
7017 fn from_channel(channel: fdomain_client::Channel) -> Self {
7018 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7019 }
7020
7021 fn control_handle(&self) -> Self::ControlHandle {
7022 DirConnectorRouterControlHandle { inner: self.inner.clone() }
7023 }
7024
7025 fn into_inner(
7026 self,
7027 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7028 {
7029 (self.inner, self.is_terminated)
7030 }
7031
7032 fn from_inner(
7033 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7034 is_terminated: bool,
7035 ) -> Self {
7036 Self { inner, is_terminated }
7037 }
7038}
7039
7040impl futures::Stream for DirConnectorRouterRequestStream {
7041 type Item = Result<DirConnectorRouterRequest, fidl::Error>;
7042
7043 fn poll_next(
7044 mut self: std::pin::Pin<&mut Self>,
7045 cx: &mut std::task::Context<'_>,
7046 ) -> std::task::Poll<Option<Self::Item>> {
7047 let this = &mut *self;
7048 if this.inner.check_shutdown(cx) {
7049 this.is_terminated = true;
7050 return std::task::Poll::Ready(None);
7051 }
7052 if this.is_terminated {
7053 panic!("polled DirConnectorRouterRequestStream after completion");
7054 }
7055 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7056 |bytes, handles| {
7057 match this.inner.channel().read_etc(cx, bytes, handles) {
7058 std::task::Poll::Ready(Ok(())) => {}
7059 std::task::Poll::Pending => return std::task::Poll::Pending,
7060 std::task::Poll::Ready(Err(None)) => {
7061 this.is_terminated = true;
7062 return std::task::Poll::Ready(None);
7063 }
7064 std::task::Poll::Ready(Err(Some(e))) => {
7065 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7066 e.into(),
7067 ))));
7068 }
7069 }
7070
7071 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7073
7074 std::task::Poll::Ready(Some(match header.ordinal {
7075 0xd7e0f01da2c8e40 => {
7076 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7077 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
7078 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
7079 let control_handle = DirConnectorRouterControlHandle {
7080 inner: this.inner.clone(),
7081 };
7082 Ok(DirConnectorRouterRequest::Route {payload: req,
7083 responder: DirConnectorRouterRouteResponder {
7084 control_handle: std::mem::ManuallyDrop::new(control_handle),
7085 tx_id: header.tx_id,
7086 },
7087 })
7088 }
7089 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7090 Ok(DirConnectorRouterRequest::_UnknownMethod {
7091 ordinal: header.ordinal,
7092 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
7093 method_type: fidl::MethodType::OneWay,
7094 })
7095 }
7096 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7097 this.inner.send_framework_err(
7098 fidl::encoding::FrameworkErr::UnknownMethod,
7099 header.tx_id,
7100 header.ordinal,
7101 header.dynamic_flags(),
7102 (bytes, handles),
7103 )?;
7104 Ok(DirConnectorRouterRequest::_UnknownMethod {
7105 ordinal: header.ordinal,
7106 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
7107 method_type: fidl::MethodType::TwoWay,
7108 })
7109 }
7110 _ => Err(fidl::Error::UnknownOrdinal {
7111 ordinal: header.ordinal,
7112 protocol_name: <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7113 }),
7114 }))
7115 },
7116 )
7117 }
7118}
7119
7120#[derive(Debug)]
7121pub enum DirConnectorRouterRequest {
7122 Route {
7123 payload: RouteRequest,
7124 responder: DirConnectorRouterRouteResponder,
7125 },
7126 #[non_exhaustive]
7128 _UnknownMethod {
7129 ordinal: u64,
7131 control_handle: DirConnectorRouterControlHandle,
7132 method_type: fidl::MethodType,
7133 },
7134}
7135
7136impl DirConnectorRouterRequest {
7137 #[allow(irrefutable_let_patterns)]
7138 pub fn into_route(self) -> Option<(RouteRequest, DirConnectorRouterRouteResponder)> {
7139 if let DirConnectorRouterRequest::Route { payload, responder } = self {
7140 Some((payload, responder))
7141 } else {
7142 None
7143 }
7144 }
7145
7146 pub fn method_name(&self) -> &'static str {
7148 match *self {
7149 DirConnectorRouterRequest::Route { .. } => "route",
7150 DirConnectorRouterRequest::_UnknownMethod {
7151 method_type: fidl::MethodType::OneWay,
7152 ..
7153 } => "unknown one-way method",
7154 DirConnectorRouterRequest::_UnknownMethod {
7155 method_type: fidl::MethodType::TwoWay,
7156 ..
7157 } => "unknown two-way method",
7158 }
7159 }
7160}
7161
7162#[derive(Debug, Clone)]
7163pub struct DirConnectorRouterControlHandle {
7164 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7165}
7166
7167impl fdomain_client::fidl::ControlHandle for DirConnectorRouterControlHandle {
7168 fn shutdown(&self) {
7169 self.inner.shutdown()
7170 }
7171
7172 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7173 self.inner.shutdown_with_epitaph(status)
7174 }
7175
7176 fn is_closed(&self) -> bool {
7177 self.inner.channel().is_closed()
7178 }
7179 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7180 self.inner.channel().on_closed()
7181 }
7182}
7183
7184impl DirConnectorRouterControlHandle {}
7185
7186#[must_use = "FIDL methods require a response to be sent"]
7187#[derive(Debug)]
7188pub struct DirConnectorRouterRouteResponder {
7189 control_handle: std::mem::ManuallyDrop<DirConnectorRouterControlHandle>,
7190 tx_id: u32,
7191}
7192
7193impl std::ops::Drop for DirConnectorRouterRouteResponder {
7197 fn drop(&mut self) {
7198 self.control_handle.shutdown();
7199 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7201 }
7202}
7203
7204impl fdomain_client::fidl::Responder for DirConnectorRouterRouteResponder {
7205 type ControlHandle = DirConnectorRouterControlHandle;
7206
7207 fn control_handle(&self) -> &DirConnectorRouterControlHandle {
7208 &self.control_handle
7209 }
7210
7211 fn drop_without_shutdown(mut self) {
7212 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7214 std::mem::forget(self);
7216 }
7217}
7218
7219impl DirConnectorRouterRouteResponder {
7220 pub fn send(
7224 self,
7225 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7226 ) -> Result<(), fidl::Error> {
7227 let _result = self.send_raw(result);
7228 if _result.is_err() {
7229 self.control_handle.shutdown();
7230 }
7231 self.drop_without_shutdown();
7232 _result
7233 }
7234
7235 pub fn send_no_shutdown_on_err(
7237 self,
7238 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7239 ) -> Result<(), fidl::Error> {
7240 let _result = self.send_raw(result);
7241 self.drop_without_shutdown();
7242 _result
7243 }
7244
7245 fn send_raw(
7246 &self,
7247 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7248 ) -> Result<(), fidl::Error> {
7249 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7250 DirConnectorRouterRouteResponse,
7251 RouterError,
7252 >>(
7253 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
7254 self.tx_id,
7255 0xd7e0f01da2c8e40,
7256 fidl::encoding::DynamicFlags::FLEXIBLE,
7257 )
7258 }
7259}
7260
7261#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7262pub struct DirEntryRouterMarker;
7263
7264impl fdomain_client::fidl::ProtocolMarker for DirEntryRouterMarker {
7265 type Proxy = DirEntryRouterProxy;
7266 type RequestStream = DirEntryRouterRequestStream;
7267
7268 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
7269}
7270impl fdomain_client::fidl::DiscoverableProtocolMarker for DirEntryRouterMarker {}
7271pub type DirEntryRouterRouteResult = Result<DirEntryRouterRouteResponse, RouterError>;
7272
7273pub trait DirEntryRouterProxyInterface: Send + Sync {
7274 type RouteResponseFut: std::future::Future<Output = Result<DirEntryRouterRouteResult, fidl::Error>>
7275 + Send;
7276 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
7277}
7278
7279#[derive(Debug, Clone)]
7280pub struct DirEntryRouterProxy {
7281 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7282}
7283
7284impl fdomain_client::fidl::Proxy for DirEntryRouterProxy {
7285 type Protocol = DirEntryRouterMarker;
7286
7287 fn from_channel(inner: fdomain_client::Channel) -> Self {
7288 Self::new(inner)
7289 }
7290
7291 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7292 self.client.into_channel().map_err(|client| Self { client })
7293 }
7294
7295 fn as_channel(&self) -> &fdomain_client::Channel {
7296 self.client.as_channel()
7297 }
7298}
7299
7300impl DirEntryRouterProxy {
7301 pub fn new(channel: fdomain_client::Channel) -> Self {
7303 let protocol_name =
7304 <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7305 Self { client: fidl::client::Client::new(channel, protocol_name) }
7306 }
7307
7308 pub fn take_event_stream(&self) -> DirEntryRouterEventStream {
7314 DirEntryRouterEventStream { event_receiver: self.client.take_event_receiver() }
7315 }
7316
7317 pub fn r#route(
7318 &self,
7319 mut payload: RouteRequest,
7320 ) -> fidl::client::QueryResponseFut<
7321 DirEntryRouterRouteResult,
7322 fdomain_client::fidl::FDomainResourceDialect,
7323 > {
7324 DirEntryRouterProxyInterface::r#route(self, payload)
7325 }
7326}
7327
7328impl DirEntryRouterProxyInterface for DirEntryRouterProxy {
7329 type RouteResponseFut = fidl::client::QueryResponseFut<
7330 DirEntryRouterRouteResult,
7331 fdomain_client::fidl::FDomainResourceDialect,
7332 >;
7333 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
7334 fn _decode(
7335 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7336 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
7337 let _response = fidl::client::decode_transaction_body::<
7338 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
7339 fdomain_client::fidl::FDomainResourceDialect,
7340 0x1ac694001c208bd2,
7341 >(_buf?)?
7342 .into_result_fdomain::<DirEntryRouterMarker>("route")?;
7343 Ok(_response.map(|x| x))
7344 }
7345 self.client.send_query_and_decode::<RouteRequest, DirEntryRouterRouteResult>(
7346 &mut payload,
7347 0x1ac694001c208bd2,
7348 fidl::encoding::DynamicFlags::FLEXIBLE,
7349 _decode,
7350 )
7351 }
7352}
7353
7354pub struct DirEntryRouterEventStream {
7355 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7356}
7357
7358impl std::marker::Unpin for DirEntryRouterEventStream {}
7359
7360impl futures::stream::FusedStream for DirEntryRouterEventStream {
7361 fn is_terminated(&self) -> bool {
7362 self.event_receiver.is_terminated()
7363 }
7364}
7365
7366impl futures::Stream for DirEntryRouterEventStream {
7367 type Item = Result<DirEntryRouterEvent, fidl::Error>;
7368
7369 fn poll_next(
7370 mut self: std::pin::Pin<&mut Self>,
7371 cx: &mut std::task::Context<'_>,
7372 ) -> std::task::Poll<Option<Self::Item>> {
7373 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7374 &mut self.event_receiver,
7375 cx
7376 )?) {
7377 Some(buf) => std::task::Poll::Ready(Some(DirEntryRouterEvent::decode(buf))),
7378 None => std::task::Poll::Ready(None),
7379 }
7380 }
7381}
7382
7383#[derive(Debug)]
7384pub enum DirEntryRouterEvent {
7385 #[non_exhaustive]
7386 _UnknownEvent {
7387 ordinal: u64,
7389 },
7390}
7391
7392impl DirEntryRouterEvent {
7393 fn decode(
7395 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7396 ) -> Result<DirEntryRouterEvent, fidl::Error> {
7397 let (bytes, _handles) = buf.split_mut();
7398 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7399 debug_assert_eq!(tx_header.tx_id, 0);
7400 match tx_header.ordinal {
7401 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7402 Ok(DirEntryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7403 }
7404 _ => Err(fidl::Error::UnknownOrdinal {
7405 ordinal: tx_header.ordinal,
7406 protocol_name:
7407 <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7408 }),
7409 }
7410 }
7411}
7412
7413pub struct DirEntryRouterRequestStream {
7415 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7416 is_terminated: bool,
7417}
7418
7419impl std::marker::Unpin for DirEntryRouterRequestStream {}
7420
7421impl futures::stream::FusedStream for DirEntryRouterRequestStream {
7422 fn is_terminated(&self) -> bool {
7423 self.is_terminated
7424 }
7425}
7426
7427impl fdomain_client::fidl::RequestStream for DirEntryRouterRequestStream {
7428 type Protocol = DirEntryRouterMarker;
7429 type ControlHandle = DirEntryRouterControlHandle;
7430
7431 fn from_channel(channel: fdomain_client::Channel) -> Self {
7432 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7433 }
7434
7435 fn control_handle(&self) -> Self::ControlHandle {
7436 DirEntryRouterControlHandle { inner: self.inner.clone() }
7437 }
7438
7439 fn into_inner(
7440 self,
7441 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7442 {
7443 (self.inner, self.is_terminated)
7444 }
7445
7446 fn from_inner(
7447 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7448 is_terminated: bool,
7449 ) -> Self {
7450 Self { inner, is_terminated }
7451 }
7452}
7453
7454impl futures::Stream for DirEntryRouterRequestStream {
7455 type Item = Result<DirEntryRouterRequest, fidl::Error>;
7456
7457 fn poll_next(
7458 mut self: std::pin::Pin<&mut Self>,
7459 cx: &mut std::task::Context<'_>,
7460 ) -> std::task::Poll<Option<Self::Item>> {
7461 let this = &mut *self;
7462 if this.inner.check_shutdown(cx) {
7463 this.is_terminated = true;
7464 return std::task::Poll::Ready(None);
7465 }
7466 if this.is_terminated {
7467 panic!("polled DirEntryRouterRequestStream after completion");
7468 }
7469 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7470 |bytes, handles| {
7471 match this.inner.channel().read_etc(cx, bytes, handles) {
7472 std::task::Poll::Ready(Ok(())) => {}
7473 std::task::Poll::Pending => return std::task::Poll::Pending,
7474 std::task::Poll::Ready(Err(None)) => {
7475 this.is_terminated = true;
7476 return std::task::Poll::Ready(None);
7477 }
7478 std::task::Poll::Ready(Err(Some(e))) => {
7479 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7480 e.into(),
7481 ))));
7482 }
7483 }
7484
7485 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7487
7488 std::task::Poll::Ready(Some(match header.ordinal {
7489 0x1ac694001c208bd2 => {
7490 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7491 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
7492 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
7493 let control_handle = DirEntryRouterControlHandle {
7494 inner: this.inner.clone(),
7495 };
7496 Ok(DirEntryRouterRequest::Route {payload: req,
7497 responder: DirEntryRouterRouteResponder {
7498 control_handle: std::mem::ManuallyDrop::new(control_handle),
7499 tx_id: header.tx_id,
7500 },
7501 })
7502 }
7503 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7504 Ok(DirEntryRouterRequest::_UnknownMethod {
7505 ordinal: header.ordinal,
7506 control_handle: DirEntryRouterControlHandle { inner: this.inner.clone() },
7507 method_type: fidl::MethodType::OneWay,
7508 })
7509 }
7510 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7511 this.inner.send_framework_err(
7512 fidl::encoding::FrameworkErr::UnknownMethod,
7513 header.tx_id,
7514 header.ordinal,
7515 header.dynamic_flags(),
7516 (bytes, handles),
7517 )?;
7518 Ok(DirEntryRouterRequest::_UnknownMethod {
7519 ordinal: header.ordinal,
7520 control_handle: DirEntryRouterControlHandle { inner: this.inner.clone() },
7521 method_type: fidl::MethodType::TwoWay,
7522 })
7523 }
7524 _ => Err(fidl::Error::UnknownOrdinal {
7525 ordinal: header.ordinal,
7526 protocol_name: <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7527 }),
7528 }))
7529 },
7530 )
7531 }
7532}
7533
7534#[derive(Debug)]
7535pub enum DirEntryRouterRequest {
7536 Route {
7537 payload: RouteRequest,
7538 responder: DirEntryRouterRouteResponder,
7539 },
7540 #[non_exhaustive]
7542 _UnknownMethod {
7543 ordinal: u64,
7545 control_handle: DirEntryRouterControlHandle,
7546 method_type: fidl::MethodType,
7547 },
7548}
7549
7550impl DirEntryRouterRequest {
7551 #[allow(irrefutable_let_patterns)]
7552 pub fn into_route(self) -> Option<(RouteRequest, DirEntryRouterRouteResponder)> {
7553 if let DirEntryRouterRequest::Route { payload, responder } = self {
7554 Some((payload, responder))
7555 } else {
7556 None
7557 }
7558 }
7559
7560 pub fn method_name(&self) -> &'static str {
7562 match *self {
7563 DirEntryRouterRequest::Route { .. } => "route",
7564 DirEntryRouterRequest::_UnknownMethod {
7565 method_type: fidl::MethodType::OneWay, ..
7566 } => "unknown one-way method",
7567 DirEntryRouterRequest::_UnknownMethod {
7568 method_type: fidl::MethodType::TwoWay, ..
7569 } => "unknown two-way method",
7570 }
7571 }
7572}
7573
7574#[derive(Debug, Clone)]
7575pub struct DirEntryRouterControlHandle {
7576 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7577}
7578
7579impl fdomain_client::fidl::ControlHandle for DirEntryRouterControlHandle {
7580 fn shutdown(&self) {
7581 self.inner.shutdown()
7582 }
7583
7584 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7585 self.inner.shutdown_with_epitaph(status)
7586 }
7587
7588 fn is_closed(&self) -> bool {
7589 self.inner.channel().is_closed()
7590 }
7591 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7592 self.inner.channel().on_closed()
7593 }
7594}
7595
7596impl DirEntryRouterControlHandle {}
7597
7598#[must_use = "FIDL methods require a response to be sent"]
7599#[derive(Debug)]
7600pub struct DirEntryRouterRouteResponder {
7601 control_handle: std::mem::ManuallyDrop<DirEntryRouterControlHandle>,
7602 tx_id: u32,
7603}
7604
7605impl std::ops::Drop for DirEntryRouterRouteResponder {
7609 fn drop(&mut self) {
7610 self.control_handle.shutdown();
7611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7613 }
7614}
7615
7616impl fdomain_client::fidl::Responder for DirEntryRouterRouteResponder {
7617 type ControlHandle = DirEntryRouterControlHandle;
7618
7619 fn control_handle(&self) -> &DirEntryRouterControlHandle {
7620 &self.control_handle
7621 }
7622
7623 fn drop_without_shutdown(mut self) {
7624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7626 std::mem::forget(self);
7628 }
7629}
7630
7631impl DirEntryRouterRouteResponder {
7632 pub fn send(
7636 self,
7637 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7638 ) -> Result<(), fidl::Error> {
7639 let _result = self.send_raw(result);
7640 if _result.is_err() {
7641 self.control_handle.shutdown();
7642 }
7643 self.drop_without_shutdown();
7644 _result
7645 }
7646
7647 pub fn send_no_shutdown_on_err(
7649 self,
7650 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7651 ) -> Result<(), fidl::Error> {
7652 let _result = self.send_raw(result);
7653 self.drop_without_shutdown();
7654 _result
7655 }
7656
7657 fn send_raw(
7658 &self,
7659 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7660 ) -> Result<(), fidl::Error> {
7661 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7662 DirEntryRouterRouteResponse,
7663 RouterError,
7664 >>(
7665 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
7666 self.tx_id,
7667 0x1ac694001c208bd2,
7668 fidl::encoding::DynamicFlags::FLEXIBLE,
7669 )
7670 }
7671}
7672
7673#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7674pub struct DirReceiverMarker;
7675
7676impl fdomain_client::fidl::ProtocolMarker for DirReceiverMarker {
7677 type Proxy = DirReceiverProxy;
7678 type RequestStream = DirReceiverRequestStream;
7679
7680 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
7681}
7682impl fdomain_client::fidl::DiscoverableProtocolMarker for DirReceiverMarker {}
7683
7684pub trait DirReceiverProxyInterface: Send + Sync {
7685 fn r#receive(&self, payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error>;
7686}
7687
7688#[derive(Debug, Clone)]
7689pub struct DirReceiverProxy {
7690 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7691}
7692
7693impl fdomain_client::fidl::Proxy for DirReceiverProxy {
7694 type Protocol = DirReceiverMarker;
7695
7696 fn from_channel(inner: fdomain_client::Channel) -> Self {
7697 Self::new(inner)
7698 }
7699
7700 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7701 self.client.into_channel().map_err(|client| Self { client })
7702 }
7703
7704 fn as_channel(&self) -> &fdomain_client::Channel {
7705 self.client.as_channel()
7706 }
7707}
7708
7709impl DirReceiverProxy {
7710 pub fn new(channel: fdomain_client::Channel) -> Self {
7712 let protocol_name = <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7713 Self { client: fidl::client::Client::new(channel, protocol_name) }
7714 }
7715
7716 pub fn take_event_stream(&self) -> DirReceiverEventStream {
7722 DirReceiverEventStream { event_receiver: self.client.take_event_receiver() }
7723 }
7724
7725 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
7730 DirReceiverProxyInterface::r#receive(self, payload)
7731 }
7732}
7733
7734impl DirReceiverProxyInterface for DirReceiverProxy {
7735 fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
7736 self.client.send::<DirReceiverReceiveRequest>(
7737 &mut payload,
7738 0xcdc3e9b89fe7bb4,
7739 fidl::encoding::DynamicFlags::FLEXIBLE,
7740 )
7741 }
7742}
7743
7744pub struct DirReceiverEventStream {
7745 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7746}
7747
7748impl std::marker::Unpin for DirReceiverEventStream {}
7749
7750impl futures::stream::FusedStream for DirReceiverEventStream {
7751 fn is_terminated(&self) -> bool {
7752 self.event_receiver.is_terminated()
7753 }
7754}
7755
7756impl futures::Stream for DirReceiverEventStream {
7757 type Item = Result<DirReceiverEvent, fidl::Error>;
7758
7759 fn poll_next(
7760 mut self: std::pin::Pin<&mut Self>,
7761 cx: &mut std::task::Context<'_>,
7762 ) -> std::task::Poll<Option<Self::Item>> {
7763 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7764 &mut self.event_receiver,
7765 cx
7766 )?) {
7767 Some(buf) => std::task::Poll::Ready(Some(DirReceiverEvent::decode(buf))),
7768 None => std::task::Poll::Ready(None),
7769 }
7770 }
7771}
7772
7773#[derive(Debug)]
7774pub enum DirReceiverEvent {
7775 #[non_exhaustive]
7776 _UnknownEvent {
7777 ordinal: u64,
7779 },
7780}
7781
7782impl DirReceiverEvent {
7783 fn decode(
7785 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7786 ) -> Result<DirReceiverEvent, fidl::Error> {
7787 let (bytes, _handles) = buf.split_mut();
7788 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7789 debug_assert_eq!(tx_header.tx_id, 0);
7790 match tx_header.ordinal {
7791 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7792 Ok(DirReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7793 }
7794 _ => Err(fidl::Error::UnknownOrdinal {
7795 ordinal: tx_header.ordinal,
7796 protocol_name:
7797 <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7798 }),
7799 }
7800 }
7801}
7802
7803pub struct DirReceiverRequestStream {
7805 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7806 is_terminated: bool,
7807}
7808
7809impl std::marker::Unpin for DirReceiverRequestStream {}
7810
7811impl futures::stream::FusedStream for DirReceiverRequestStream {
7812 fn is_terminated(&self) -> bool {
7813 self.is_terminated
7814 }
7815}
7816
7817impl fdomain_client::fidl::RequestStream for DirReceiverRequestStream {
7818 type Protocol = DirReceiverMarker;
7819 type ControlHandle = DirReceiverControlHandle;
7820
7821 fn from_channel(channel: fdomain_client::Channel) -> Self {
7822 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7823 }
7824
7825 fn control_handle(&self) -> Self::ControlHandle {
7826 DirReceiverControlHandle { inner: self.inner.clone() }
7827 }
7828
7829 fn into_inner(
7830 self,
7831 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7832 {
7833 (self.inner, self.is_terminated)
7834 }
7835
7836 fn from_inner(
7837 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7838 is_terminated: bool,
7839 ) -> Self {
7840 Self { inner, is_terminated }
7841 }
7842}
7843
7844impl futures::Stream for DirReceiverRequestStream {
7845 type Item = Result<DirReceiverRequest, fidl::Error>;
7846
7847 fn poll_next(
7848 mut self: std::pin::Pin<&mut Self>,
7849 cx: &mut std::task::Context<'_>,
7850 ) -> std::task::Poll<Option<Self::Item>> {
7851 let this = &mut *self;
7852 if this.inner.check_shutdown(cx) {
7853 this.is_terminated = true;
7854 return std::task::Poll::Ready(None);
7855 }
7856 if this.is_terminated {
7857 panic!("polled DirReceiverRequestStream after completion");
7858 }
7859 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7860 |bytes, handles| {
7861 match this.inner.channel().read_etc(cx, bytes, handles) {
7862 std::task::Poll::Ready(Ok(())) => {}
7863 std::task::Poll::Pending => return std::task::Poll::Pending,
7864 std::task::Poll::Ready(Err(None)) => {
7865 this.is_terminated = true;
7866 return std::task::Poll::Ready(None);
7867 }
7868 std::task::Poll::Ready(Err(Some(e))) => {
7869 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7870 e.into(),
7871 ))));
7872 }
7873 }
7874
7875 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7877
7878 std::task::Poll::Ready(Some(match header.ordinal {
7879 0xcdc3e9b89fe7bb4 => {
7880 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7881 let mut req = fidl::new_empty!(
7882 DirReceiverReceiveRequest,
7883 fdomain_client::fidl::FDomainResourceDialect
7884 );
7885 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirReceiverReceiveRequest>(&header, _body_bytes, handles, &mut req)?;
7886 let control_handle = DirReceiverControlHandle { inner: this.inner.clone() };
7887 Ok(DirReceiverRequest::Receive { payload: req, control_handle })
7888 }
7889 _ if header.tx_id == 0
7890 && header
7891 .dynamic_flags()
7892 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7893 {
7894 Ok(DirReceiverRequest::_UnknownMethod {
7895 ordinal: header.ordinal,
7896 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
7897 method_type: fidl::MethodType::OneWay,
7898 })
7899 }
7900 _ if header
7901 .dynamic_flags()
7902 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7903 {
7904 this.inner.send_framework_err(
7905 fidl::encoding::FrameworkErr::UnknownMethod,
7906 header.tx_id,
7907 header.ordinal,
7908 header.dynamic_flags(),
7909 (bytes, handles),
7910 )?;
7911 Ok(DirReceiverRequest::_UnknownMethod {
7912 ordinal: header.ordinal,
7913 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
7914 method_type: fidl::MethodType::TwoWay,
7915 })
7916 }
7917 _ => Err(fidl::Error::UnknownOrdinal {
7918 ordinal: header.ordinal,
7919 protocol_name:
7920 <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7921 }),
7922 }))
7923 },
7924 )
7925 }
7926}
7927
7928#[derive(Debug)]
7931pub enum DirReceiverRequest {
7932 Receive { payload: DirReceiverReceiveRequest, control_handle: DirReceiverControlHandle },
7937 #[non_exhaustive]
7939 _UnknownMethod {
7940 ordinal: u64,
7942 control_handle: DirReceiverControlHandle,
7943 method_type: fidl::MethodType,
7944 },
7945}
7946
7947impl DirReceiverRequest {
7948 #[allow(irrefutable_let_patterns)]
7949 pub fn into_receive(self) -> Option<(DirReceiverReceiveRequest, DirReceiverControlHandle)> {
7950 if let DirReceiverRequest::Receive { payload, control_handle } = self {
7951 Some((payload, control_handle))
7952 } else {
7953 None
7954 }
7955 }
7956
7957 pub fn method_name(&self) -> &'static str {
7959 match *self {
7960 DirReceiverRequest::Receive { .. } => "receive",
7961 DirReceiverRequest::_UnknownMethod {
7962 method_type: fidl::MethodType::OneWay, ..
7963 } => "unknown one-way method",
7964 DirReceiverRequest::_UnknownMethod {
7965 method_type: fidl::MethodType::TwoWay, ..
7966 } => "unknown two-way method",
7967 }
7968 }
7969}
7970
7971#[derive(Debug, Clone)]
7972pub struct DirReceiverControlHandle {
7973 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7974}
7975
7976impl fdomain_client::fidl::ControlHandle for DirReceiverControlHandle {
7977 fn shutdown(&self) {
7978 self.inner.shutdown()
7979 }
7980
7981 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7982 self.inner.shutdown_with_epitaph(status)
7983 }
7984
7985 fn is_closed(&self) -> bool {
7986 self.inner.channel().is_closed()
7987 }
7988 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7989 self.inner.channel().on_closed()
7990 }
7991}
7992
7993impl DirReceiverControlHandle {}
7994
7995#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7996pub struct DirectoryRouterMarker;
7997
7998impl fdomain_client::fidl::ProtocolMarker for DirectoryRouterMarker {
7999 type Proxy = DirectoryRouterProxy;
8000 type RequestStream = DirectoryRouterRequestStream;
8001
8002 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
8003}
8004impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryRouterMarker {}
8005pub type DirectoryRouterRouteResult = Result<DirectoryRouterRouteResponse, RouterError>;
8006
8007pub trait DirectoryRouterProxyInterface: Send + Sync {
8008 type RouteResponseFut: std::future::Future<Output = Result<DirectoryRouterRouteResult, fidl::Error>>
8009 + Send;
8010 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
8011}
8012
8013#[derive(Debug, Clone)]
8014pub struct DirectoryRouterProxy {
8015 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
8016}
8017
8018impl fdomain_client::fidl::Proxy for DirectoryRouterProxy {
8019 type Protocol = DirectoryRouterMarker;
8020
8021 fn from_channel(inner: fdomain_client::Channel) -> Self {
8022 Self::new(inner)
8023 }
8024
8025 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
8026 self.client.into_channel().map_err(|client| Self { client })
8027 }
8028
8029 fn as_channel(&self) -> &fdomain_client::Channel {
8030 self.client.as_channel()
8031 }
8032}
8033
8034impl DirectoryRouterProxy {
8035 pub fn new(channel: fdomain_client::Channel) -> Self {
8037 let protocol_name =
8038 <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
8039 Self { client: fidl::client::Client::new(channel, protocol_name) }
8040 }
8041
8042 pub fn take_event_stream(&self) -> DirectoryRouterEventStream {
8048 DirectoryRouterEventStream { event_receiver: self.client.take_event_receiver() }
8049 }
8050
8051 pub fn r#route(
8052 &self,
8053 mut payload: RouteRequest,
8054 ) -> fidl::client::QueryResponseFut<
8055 DirectoryRouterRouteResult,
8056 fdomain_client::fidl::FDomainResourceDialect,
8057 > {
8058 DirectoryRouterProxyInterface::r#route(self, payload)
8059 }
8060}
8061
8062impl DirectoryRouterProxyInterface for DirectoryRouterProxy {
8063 type RouteResponseFut = fidl::client::QueryResponseFut<
8064 DirectoryRouterRouteResult,
8065 fdomain_client::fidl::FDomainResourceDialect,
8066 >;
8067 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
8068 fn _decode(
8069 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8070 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
8071 let _response = fidl::client::decode_transaction_body::<
8072 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
8073 fdomain_client::fidl::FDomainResourceDialect,
8074 0x683b6c6be21b0f21,
8075 >(_buf?)?
8076 .into_result_fdomain::<DirectoryRouterMarker>("route")?;
8077 Ok(_response.map(|x| x))
8078 }
8079 self.client.send_query_and_decode::<RouteRequest, DirectoryRouterRouteResult>(
8080 &mut payload,
8081 0x683b6c6be21b0f21,
8082 fidl::encoding::DynamicFlags::FLEXIBLE,
8083 _decode,
8084 )
8085 }
8086}
8087
8088pub struct DirectoryRouterEventStream {
8089 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
8090}
8091
8092impl std::marker::Unpin for DirectoryRouterEventStream {}
8093
8094impl futures::stream::FusedStream for DirectoryRouterEventStream {
8095 fn is_terminated(&self) -> bool {
8096 self.event_receiver.is_terminated()
8097 }
8098}
8099
8100impl futures::Stream for DirectoryRouterEventStream {
8101 type Item = Result<DirectoryRouterEvent, fidl::Error>;
8102
8103 fn poll_next(
8104 mut self: std::pin::Pin<&mut Self>,
8105 cx: &mut std::task::Context<'_>,
8106 ) -> std::task::Poll<Option<Self::Item>> {
8107 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8108 &mut self.event_receiver,
8109 cx
8110 )?) {
8111 Some(buf) => std::task::Poll::Ready(Some(DirectoryRouterEvent::decode(buf))),
8112 None => std::task::Poll::Ready(None),
8113 }
8114 }
8115}
8116
8117#[derive(Debug)]
8118pub enum DirectoryRouterEvent {
8119 #[non_exhaustive]
8120 _UnknownEvent {
8121 ordinal: u64,
8123 },
8124}
8125
8126impl DirectoryRouterEvent {
8127 fn decode(
8129 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8130 ) -> Result<DirectoryRouterEvent, fidl::Error> {
8131 let (bytes, _handles) = buf.split_mut();
8132 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8133 debug_assert_eq!(tx_header.tx_id, 0);
8134 match tx_header.ordinal {
8135 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8136 Ok(DirectoryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8137 }
8138 _ => Err(fidl::Error::UnknownOrdinal {
8139 ordinal: tx_header.ordinal,
8140 protocol_name:
8141 <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8142 }),
8143 }
8144 }
8145}
8146
8147pub struct DirectoryRouterRequestStream {
8149 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8150 is_terminated: bool,
8151}
8152
8153impl std::marker::Unpin for DirectoryRouterRequestStream {}
8154
8155impl futures::stream::FusedStream for DirectoryRouterRequestStream {
8156 fn is_terminated(&self) -> bool {
8157 self.is_terminated
8158 }
8159}
8160
8161impl fdomain_client::fidl::RequestStream for DirectoryRouterRequestStream {
8162 type Protocol = DirectoryRouterMarker;
8163 type ControlHandle = DirectoryRouterControlHandle;
8164
8165 fn from_channel(channel: fdomain_client::Channel) -> Self {
8166 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8167 }
8168
8169 fn control_handle(&self) -> Self::ControlHandle {
8170 DirectoryRouterControlHandle { inner: self.inner.clone() }
8171 }
8172
8173 fn into_inner(
8174 self,
8175 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
8176 {
8177 (self.inner, self.is_terminated)
8178 }
8179
8180 fn from_inner(
8181 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8182 is_terminated: bool,
8183 ) -> Self {
8184 Self { inner, is_terminated }
8185 }
8186}
8187
8188impl futures::Stream for DirectoryRouterRequestStream {
8189 type Item = Result<DirectoryRouterRequest, fidl::Error>;
8190
8191 fn poll_next(
8192 mut self: std::pin::Pin<&mut Self>,
8193 cx: &mut std::task::Context<'_>,
8194 ) -> std::task::Poll<Option<Self::Item>> {
8195 let this = &mut *self;
8196 if this.inner.check_shutdown(cx) {
8197 this.is_terminated = true;
8198 return std::task::Poll::Ready(None);
8199 }
8200 if this.is_terminated {
8201 panic!("polled DirectoryRouterRequestStream after completion");
8202 }
8203 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
8204 |bytes, handles| {
8205 match this.inner.channel().read_etc(cx, bytes, handles) {
8206 std::task::Poll::Ready(Ok(())) => {}
8207 std::task::Poll::Pending => return std::task::Poll::Pending,
8208 std::task::Poll::Ready(Err(None)) => {
8209 this.is_terminated = true;
8210 return std::task::Poll::Ready(None);
8211 }
8212 std::task::Poll::Ready(Err(Some(e))) => {
8213 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8214 e.into(),
8215 ))));
8216 }
8217 }
8218
8219 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8221
8222 std::task::Poll::Ready(Some(match header.ordinal {
8223 0x683b6c6be21b0f21 => {
8224 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8225 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
8226 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8227 let control_handle = DirectoryRouterControlHandle {
8228 inner: this.inner.clone(),
8229 };
8230 Ok(DirectoryRouterRequest::Route {payload: req,
8231 responder: DirectoryRouterRouteResponder {
8232 control_handle: std::mem::ManuallyDrop::new(control_handle),
8233 tx_id: header.tx_id,
8234 },
8235 })
8236 }
8237 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8238 Ok(DirectoryRouterRequest::_UnknownMethod {
8239 ordinal: header.ordinal,
8240 control_handle: DirectoryRouterControlHandle { inner: this.inner.clone() },
8241 method_type: fidl::MethodType::OneWay,
8242 })
8243 }
8244 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8245 this.inner.send_framework_err(
8246 fidl::encoding::FrameworkErr::UnknownMethod,
8247 header.tx_id,
8248 header.ordinal,
8249 header.dynamic_flags(),
8250 (bytes, handles),
8251 )?;
8252 Ok(DirectoryRouterRequest::_UnknownMethod {
8253 ordinal: header.ordinal,
8254 control_handle: DirectoryRouterControlHandle { inner: this.inner.clone() },
8255 method_type: fidl::MethodType::TwoWay,
8256 })
8257 }
8258 _ => Err(fidl::Error::UnknownOrdinal {
8259 ordinal: header.ordinal,
8260 protocol_name: <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8261 }),
8262 }))
8263 },
8264 )
8265 }
8266}
8267
8268#[derive(Debug)]
8269pub enum DirectoryRouterRequest {
8270 Route {
8271 payload: RouteRequest,
8272 responder: DirectoryRouterRouteResponder,
8273 },
8274 #[non_exhaustive]
8276 _UnknownMethod {
8277 ordinal: u64,
8279 control_handle: DirectoryRouterControlHandle,
8280 method_type: fidl::MethodType,
8281 },
8282}
8283
8284impl DirectoryRouterRequest {
8285 #[allow(irrefutable_let_patterns)]
8286 pub fn into_route(self) -> Option<(RouteRequest, DirectoryRouterRouteResponder)> {
8287 if let DirectoryRouterRequest::Route { payload, responder } = self {
8288 Some((payload, responder))
8289 } else {
8290 None
8291 }
8292 }
8293
8294 pub fn method_name(&self) -> &'static str {
8296 match *self {
8297 DirectoryRouterRequest::Route { .. } => "route",
8298 DirectoryRouterRequest::_UnknownMethod {
8299 method_type: fidl::MethodType::OneWay,
8300 ..
8301 } => "unknown one-way method",
8302 DirectoryRouterRequest::_UnknownMethod {
8303 method_type: fidl::MethodType::TwoWay,
8304 ..
8305 } => "unknown two-way method",
8306 }
8307 }
8308}
8309
8310#[derive(Debug, Clone)]
8311pub struct DirectoryRouterControlHandle {
8312 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8313}
8314
8315impl fdomain_client::fidl::ControlHandle for DirectoryRouterControlHandle {
8316 fn shutdown(&self) {
8317 self.inner.shutdown()
8318 }
8319
8320 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8321 self.inner.shutdown_with_epitaph(status)
8322 }
8323
8324 fn is_closed(&self) -> bool {
8325 self.inner.channel().is_closed()
8326 }
8327 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8328 self.inner.channel().on_closed()
8329 }
8330}
8331
8332impl DirectoryRouterControlHandle {}
8333
8334#[must_use = "FIDL methods require a response to be sent"]
8335#[derive(Debug)]
8336pub struct DirectoryRouterRouteResponder {
8337 control_handle: std::mem::ManuallyDrop<DirectoryRouterControlHandle>,
8338 tx_id: u32,
8339}
8340
8341impl std::ops::Drop for DirectoryRouterRouteResponder {
8345 fn drop(&mut self) {
8346 self.control_handle.shutdown();
8347 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8349 }
8350}
8351
8352impl fdomain_client::fidl::Responder for DirectoryRouterRouteResponder {
8353 type ControlHandle = DirectoryRouterControlHandle;
8354
8355 fn control_handle(&self) -> &DirectoryRouterControlHandle {
8356 &self.control_handle
8357 }
8358
8359 fn drop_without_shutdown(mut self) {
8360 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8362 std::mem::forget(self);
8364 }
8365}
8366
8367impl DirectoryRouterRouteResponder {
8368 pub fn send(
8372 self,
8373 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8374 ) -> Result<(), fidl::Error> {
8375 let _result = self.send_raw(result);
8376 if _result.is_err() {
8377 self.control_handle.shutdown();
8378 }
8379 self.drop_without_shutdown();
8380 _result
8381 }
8382
8383 pub fn send_no_shutdown_on_err(
8385 self,
8386 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8387 ) -> Result<(), fidl::Error> {
8388 let _result = self.send_raw(result);
8389 self.drop_without_shutdown();
8390 _result
8391 }
8392
8393 fn send_raw(
8394 &self,
8395 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8396 ) -> Result<(), fidl::Error> {
8397 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8398 DirectoryRouterRouteResponse,
8399 RouterError,
8400 >>(
8401 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8402 self.tx_id,
8403 0x683b6c6be21b0f21,
8404 fidl::encoding::DynamicFlags::FLEXIBLE,
8405 )
8406 }
8407}
8408
8409#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8410pub struct ReceiverMarker;
8411
8412impl fdomain_client::fidl::ProtocolMarker for ReceiverMarker {
8413 type Proxy = ReceiverProxy;
8414 type RequestStream = ReceiverRequestStream;
8415
8416 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
8417}
8418impl fdomain_client::fidl::DiscoverableProtocolMarker for ReceiverMarker {}
8419
8420pub trait ReceiverProxyInterface: Send + Sync {
8421 fn r#receive(&self, channel: fdomain_client::Channel) -> Result<(), fidl::Error>;
8422}
8423
8424#[derive(Debug, Clone)]
8425pub struct ReceiverProxy {
8426 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
8427}
8428
8429impl fdomain_client::fidl::Proxy for ReceiverProxy {
8430 type Protocol = ReceiverMarker;
8431
8432 fn from_channel(inner: fdomain_client::Channel) -> Self {
8433 Self::new(inner)
8434 }
8435
8436 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
8437 self.client.into_channel().map_err(|client| Self { client })
8438 }
8439
8440 fn as_channel(&self) -> &fdomain_client::Channel {
8441 self.client.as_channel()
8442 }
8443}
8444
8445impl ReceiverProxy {
8446 pub fn new(channel: fdomain_client::Channel) -> Self {
8448 let protocol_name = <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
8449 Self { client: fidl::client::Client::new(channel, protocol_name) }
8450 }
8451
8452 pub fn take_event_stream(&self) -> ReceiverEventStream {
8458 ReceiverEventStream { event_receiver: self.client.take_event_receiver() }
8459 }
8460
8461 pub fn r#receive(&self, mut channel: fdomain_client::Channel) -> Result<(), fidl::Error> {
8463 ReceiverProxyInterface::r#receive(self, channel)
8464 }
8465}
8466
8467impl ReceiverProxyInterface for ReceiverProxy {
8468 fn r#receive(&self, mut channel: fdomain_client::Channel) -> Result<(), fidl::Error> {
8469 self.client.send::<ProtocolPayload>(
8470 (channel,),
8471 0x4bae18ab7aa1a94,
8472 fidl::encoding::DynamicFlags::FLEXIBLE,
8473 )
8474 }
8475}
8476
8477pub struct ReceiverEventStream {
8478 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
8479}
8480
8481impl std::marker::Unpin for ReceiverEventStream {}
8482
8483impl futures::stream::FusedStream for ReceiverEventStream {
8484 fn is_terminated(&self) -> bool {
8485 self.event_receiver.is_terminated()
8486 }
8487}
8488
8489impl futures::Stream for ReceiverEventStream {
8490 type Item = Result<ReceiverEvent, fidl::Error>;
8491
8492 fn poll_next(
8493 mut self: std::pin::Pin<&mut Self>,
8494 cx: &mut std::task::Context<'_>,
8495 ) -> std::task::Poll<Option<Self::Item>> {
8496 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8497 &mut self.event_receiver,
8498 cx
8499 )?) {
8500 Some(buf) => std::task::Poll::Ready(Some(ReceiverEvent::decode(buf))),
8501 None => std::task::Poll::Ready(None),
8502 }
8503 }
8504}
8505
8506#[derive(Debug)]
8507pub enum ReceiverEvent {
8508 #[non_exhaustive]
8509 _UnknownEvent {
8510 ordinal: u64,
8512 },
8513}
8514
8515impl ReceiverEvent {
8516 fn decode(
8518 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8519 ) -> Result<ReceiverEvent, fidl::Error> {
8520 let (bytes, _handles) = buf.split_mut();
8521 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8522 debug_assert_eq!(tx_header.tx_id, 0);
8523 match tx_header.ordinal {
8524 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8525 Ok(ReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8526 }
8527 _ => Err(fidl::Error::UnknownOrdinal {
8528 ordinal: tx_header.ordinal,
8529 protocol_name: <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8530 }),
8531 }
8532 }
8533}
8534
8535pub struct ReceiverRequestStream {
8537 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8538 is_terminated: bool,
8539}
8540
8541impl std::marker::Unpin for ReceiverRequestStream {}
8542
8543impl futures::stream::FusedStream for ReceiverRequestStream {
8544 fn is_terminated(&self) -> bool {
8545 self.is_terminated
8546 }
8547}
8548
8549impl fdomain_client::fidl::RequestStream for ReceiverRequestStream {
8550 type Protocol = ReceiverMarker;
8551 type ControlHandle = ReceiverControlHandle;
8552
8553 fn from_channel(channel: fdomain_client::Channel) -> Self {
8554 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8555 }
8556
8557 fn control_handle(&self) -> Self::ControlHandle {
8558 ReceiverControlHandle { inner: self.inner.clone() }
8559 }
8560
8561 fn into_inner(
8562 self,
8563 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
8564 {
8565 (self.inner, self.is_terminated)
8566 }
8567
8568 fn from_inner(
8569 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8570 is_terminated: bool,
8571 ) -> Self {
8572 Self { inner, is_terminated }
8573 }
8574}
8575
8576impl futures::Stream for ReceiverRequestStream {
8577 type Item = Result<ReceiverRequest, fidl::Error>;
8578
8579 fn poll_next(
8580 mut self: std::pin::Pin<&mut Self>,
8581 cx: &mut std::task::Context<'_>,
8582 ) -> std::task::Poll<Option<Self::Item>> {
8583 let this = &mut *self;
8584 if this.inner.check_shutdown(cx) {
8585 this.is_terminated = true;
8586 return std::task::Poll::Ready(None);
8587 }
8588 if this.is_terminated {
8589 panic!("polled ReceiverRequestStream after completion");
8590 }
8591 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
8592 |bytes, handles| {
8593 match this.inner.channel().read_etc(cx, bytes, handles) {
8594 std::task::Poll::Ready(Ok(())) => {}
8595 std::task::Poll::Pending => return std::task::Poll::Pending,
8596 std::task::Poll::Ready(Err(None)) => {
8597 this.is_terminated = true;
8598 return std::task::Poll::Ready(None);
8599 }
8600 std::task::Poll::Ready(Err(Some(e))) => {
8601 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8602 e.into(),
8603 ))));
8604 }
8605 }
8606
8607 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8609
8610 std::task::Poll::Ready(Some(match header.ordinal {
8611 0x4bae18ab7aa1a94 => {
8612 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
8613 let mut req = fidl::new_empty!(
8614 ProtocolPayload,
8615 fdomain_client::fidl::FDomainResourceDialect
8616 );
8617 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ProtocolPayload>(&header, _body_bytes, handles, &mut req)?;
8618 let control_handle = ReceiverControlHandle { inner: this.inner.clone() };
8619 Ok(ReceiverRequest::Receive { channel: req.channel, control_handle })
8620 }
8621 _ if header.tx_id == 0
8622 && header
8623 .dynamic_flags()
8624 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8625 {
8626 Ok(ReceiverRequest::_UnknownMethod {
8627 ordinal: header.ordinal,
8628 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
8629 method_type: fidl::MethodType::OneWay,
8630 })
8631 }
8632 _ if header
8633 .dynamic_flags()
8634 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8635 {
8636 this.inner.send_framework_err(
8637 fidl::encoding::FrameworkErr::UnknownMethod,
8638 header.tx_id,
8639 header.ordinal,
8640 header.dynamic_flags(),
8641 (bytes, handles),
8642 )?;
8643 Ok(ReceiverRequest::_UnknownMethod {
8644 ordinal: header.ordinal,
8645 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
8646 method_type: fidl::MethodType::TwoWay,
8647 })
8648 }
8649 _ => Err(fidl::Error::UnknownOrdinal {
8650 ordinal: header.ordinal,
8651 protocol_name:
8652 <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8653 }),
8654 }))
8655 },
8656 )
8657 }
8658}
8659
8660#[derive(Debug)]
8663pub enum ReceiverRequest {
8664 Receive { channel: fdomain_client::Channel, control_handle: ReceiverControlHandle },
8666 #[non_exhaustive]
8668 _UnknownMethod {
8669 ordinal: u64,
8671 control_handle: ReceiverControlHandle,
8672 method_type: fidl::MethodType,
8673 },
8674}
8675
8676impl ReceiverRequest {
8677 #[allow(irrefutable_let_patterns)]
8678 pub fn into_receive(self) -> Option<(fdomain_client::Channel, ReceiverControlHandle)> {
8679 if let ReceiverRequest::Receive { channel, control_handle } = self {
8680 Some((channel, control_handle))
8681 } else {
8682 None
8683 }
8684 }
8685
8686 pub fn method_name(&self) -> &'static str {
8688 match *self {
8689 ReceiverRequest::Receive { .. } => "receive",
8690 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8691 "unknown one-way method"
8692 }
8693 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8694 "unknown two-way method"
8695 }
8696 }
8697 }
8698}
8699
8700#[derive(Debug, Clone)]
8701pub struct ReceiverControlHandle {
8702 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8703}
8704
8705impl fdomain_client::fidl::ControlHandle for ReceiverControlHandle {
8706 fn shutdown(&self) {
8707 self.inner.shutdown()
8708 }
8709
8710 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8711 self.inner.shutdown_with_epitaph(status)
8712 }
8713
8714 fn is_closed(&self) -> bool {
8715 self.inner.channel().is_closed()
8716 }
8717 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8718 self.inner.channel().on_closed()
8719 }
8720}
8721
8722impl ReceiverControlHandle {}
8723
8724mod internal {
8725 use super::*;
8726
8727 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorCreateRequest {
8728 type Borrowed<'a> = &'a mut Self;
8729 fn take_or_borrow<'a>(
8730 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8731 ) -> Self::Borrowed<'a> {
8732 value
8733 }
8734 }
8735
8736 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorCreateRequest {
8737 type Owned = Self;
8738
8739 #[inline(always)]
8740 fn inline_align(_context: fidl::encoding::Context) -> usize {
8741 8
8742 }
8743
8744 #[inline(always)]
8745 fn inline_size(_context: fidl::encoding::Context) -> usize {
8746 16
8747 }
8748 }
8749
8750 unsafe impl
8751 fidl::encoding::Encode<
8752 CapabilityStoreConnectorCreateRequest,
8753 fdomain_client::fidl::FDomainResourceDialect,
8754 > for &mut CapabilityStoreConnectorCreateRequest
8755 {
8756 #[inline]
8757 unsafe fn encode(
8758 self,
8759 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8760 offset: usize,
8761 _depth: fidl::encoding::Depth,
8762 ) -> fidl::Result<()> {
8763 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
8764 fidl::encoding::Encode::<CapabilityStoreConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8766 (
8767 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8768 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
8769 ),
8770 encoder, offset, _depth
8771 )
8772 }
8773 }
8774 unsafe impl<
8775 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8776 T1: fidl::encoding::Encode<
8777 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8778 fdomain_client::fidl::FDomainResourceDialect,
8779 >,
8780 >
8781 fidl::encoding::Encode<
8782 CapabilityStoreConnectorCreateRequest,
8783 fdomain_client::fidl::FDomainResourceDialect,
8784 > for (T0, T1)
8785 {
8786 #[inline]
8787 unsafe fn encode(
8788 self,
8789 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8790 offset: usize,
8791 depth: fidl::encoding::Depth,
8792 ) -> fidl::Result<()> {
8793 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
8794 unsafe {
8797 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8798 (ptr as *mut u64).write_unaligned(0);
8799 }
8800 self.0.encode(encoder, offset + 0, depth)?;
8802 self.1.encode(encoder, offset + 8, depth)?;
8803 Ok(())
8804 }
8805 }
8806
8807 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8808 for CapabilityStoreConnectorCreateRequest
8809 {
8810 #[inline(always)]
8811 fn new_empty() -> Self {
8812 Self {
8813 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
8814 receiver: fidl::new_empty!(
8815 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8816 fdomain_client::fidl::FDomainResourceDialect
8817 ),
8818 }
8819 }
8820
8821 #[inline]
8822 unsafe fn decode(
8823 &mut self,
8824 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8825 offset: usize,
8826 _depth: fidl::encoding::Depth,
8827 ) -> fidl::Result<()> {
8828 decoder.debug_check_bounds::<Self>(offset);
8829 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8831 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8832 let mask = 0xffffffff00000000u64;
8833 let maskedval = padval & mask;
8834 if maskedval != 0 {
8835 return Err(fidl::Error::NonZeroPadding {
8836 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8837 });
8838 }
8839 fidl::decode!(
8840 u64,
8841 fdomain_client::fidl::FDomainResourceDialect,
8842 &mut self.id,
8843 decoder,
8844 offset + 0,
8845 _depth
8846 )?;
8847 fidl::decode!(
8848 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8849 fdomain_client::fidl::FDomainResourceDialect,
8850 &mut self.receiver,
8851 decoder,
8852 offset + 8,
8853 _depth
8854 )?;
8855 Ok(())
8856 }
8857 }
8858
8859 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorOpenRequest {
8860 type Borrowed<'a> = &'a mut Self;
8861 fn take_or_borrow<'a>(
8862 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8863 ) -> Self::Borrowed<'a> {
8864 value
8865 }
8866 }
8867
8868 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorOpenRequest {
8869 type Owned = Self;
8870
8871 #[inline(always)]
8872 fn inline_align(_context: fidl::encoding::Context) -> usize {
8873 8
8874 }
8875
8876 #[inline(always)]
8877 fn inline_size(_context: fidl::encoding::Context) -> usize {
8878 16
8879 }
8880 }
8881
8882 unsafe impl
8883 fidl::encoding::Encode<
8884 CapabilityStoreConnectorOpenRequest,
8885 fdomain_client::fidl::FDomainResourceDialect,
8886 > for &mut CapabilityStoreConnectorOpenRequest
8887 {
8888 #[inline]
8889 unsafe fn encode(
8890 self,
8891 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8892 offset: usize,
8893 _depth: fidl::encoding::Depth,
8894 ) -> fidl::Result<()> {
8895 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
8896 fidl::encoding::Encode::<
8898 CapabilityStoreConnectorOpenRequest,
8899 fdomain_client::fidl::FDomainResourceDialect,
8900 >::encode(
8901 (
8902 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8903 <fidl::encoding::HandleType<
8904 fdomain_client::Channel,
8905 { fidl::ObjectType::CHANNEL.into_raw() },
8906 2147483648,
8907 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8908 &mut self.server_end
8909 ),
8910 ),
8911 encoder,
8912 offset,
8913 _depth,
8914 )
8915 }
8916 }
8917 unsafe impl<
8918 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8919 T1: fidl::encoding::Encode<
8920 fidl::encoding::HandleType<
8921 fdomain_client::Channel,
8922 { fidl::ObjectType::CHANNEL.into_raw() },
8923 2147483648,
8924 >,
8925 fdomain_client::fidl::FDomainResourceDialect,
8926 >,
8927 >
8928 fidl::encoding::Encode<
8929 CapabilityStoreConnectorOpenRequest,
8930 fdomain_client::fidl::FDomainResourceDialect,
8931 > for (T0, T1)
8932 {
8933 #[inline]
8934 unsafe fn encode(
8935 self,
8936 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8937 offset: usize,
8938 depth: fidl::encoding::Depth,
8939 ) -> fidl::Result<()> {
8940 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
8941 unsafe {
8944 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8945 (ptr as *mut u64).write_unaligned(0);
8946 }
8947 self.0.encode(encoder, offset + 0, depth)?;
8949 self.1.encode(encoder, offset + 8, depth)?;
8950 Ok(())
8951 }
8952 }
8953
8954 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8955 for CapabilityStoreConnectorOpenRequest
8956 {
8957 #[inline(always)]
8958 fn new_empty() -> Self {
8959 Self {
8960 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
8961 server_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
8962 }
8963 }
8964
8965 #[inline]
8966 unsafe fn decode(
8967 &mut self,
8968 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8969 offset: usize,
8970 _depth: fidl::encoding::Depth,
8971 ) -> fidl::Result<()> {
8972 decoder.debug_check_bounds::<Self>(offset);
8973 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8975 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8976 let mask = 0xffffffff00000000u64;
8977 let maskedval = padval & mask;
8978 if maskedval != 0 {
8979 return Err(fidl::Error::NonZeroPadding {
8980 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8981 });
8982 }
8983 fidl::decode!(
8984 u64,
8985 fdomain_client::fidl::FDomainResourceDialect,
8986 &mut self.id,
8987 decoder,
8988 offset + 0,
8989 _depth
8990 )?;
8991 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)?;
8992 Ok(())
8993 }
8994 }
8995
8996 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateRequest {
8997 type Borrowed<'a> = &'a mut Self;
8998 fn take_or_borrow<'a>(
8999 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9000 ) -> Self::Borrowed<'a> {
9001 value
9002 }
9003 }
9004
9005 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateRequest {
9006 type Owned = Self;
9007
9008 #[inline(always)]
9009 fn inline_align(_context: fidl::encoding::Context) -> usize {
9010 8
9011 }
9012
9013 #[inline(always)]
9014 fn inline_size(_context: fidl::encoding::Context) -> usize {
9015 16
9016 }
9017 }
9018
9019 unsafe impl
9020 fidl::encoding::Encode<
9021 CapabilityStoreCreateServiceAggregateRequest,
9022 fdomain_client::fidl::FDomainResourceDialect,
9023 > for &mut CapabilityStoreCreateServiceAggregateRequest
9024 {
9025 #[inline]
9026 unsafe fn encode(
9027 self,
9028 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9029 offset: usize,
9030 _depth: fidl::encoding::Depth,
9031 ) -> fidl::Result<()> {
9032 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
9033 fidl::encoding::Encode::<CapabilityStoreCreateServiceAggregateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9035 (
9036 <fidl::encoding::UnboundedVector<AggregateSource> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sources),
9037 ),
9038 encoder, offset, _depth
9039 )
9040 }
9041 }
9042 unsafe impl<
9043 T0: fidl::encoding::Encode<
9044 fidl::encoding::UnboundedVector<AggregateSource>,
9045 fdomain_client::fidl::FDomainResourceDialect,
9046 >,
9047 >
9048 fidl::encoding::Encode<
9049 CapabilityStoreCreateServiceAggregateRequest,
9050 fdomain_client::fidl::FDomainResourceDialect,
9051 > for (T0,)
9052 {
9053 #[inline]
9054 unsafe fn encode(
9055 self,
9056 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9057 offset: usize,
9058 depth: fidl::encoding::Depth,
9059 ) -> fidl::Result<()> {
9060 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
9061 self.0.encode(encoder, offset + 0, depth)?;
9065 Ok(())
9066 }
9067 }
9068
9069 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9070 for CapabilityStoreCreateServiceAggregateRequest
9071 {
9072 #[inline(always)]
9073 fn new_empty() -> Self {
9074 Self {
9075 sources: fidl::new_empty!(
9076 fidl::encoding::UnboundedVector<AggregateSource>,
9077 fdomain_client::fidl::FDomainResourceDialect
9078 ),
9079 }
9080 }
9081
9082 #[inline]
9083 unsafe fn decode(
9084 &mut self,
9085 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9086 offset: usize,
9087 _depth: fidl::encoding::Depth,
9088 ) -> fidl::Result<()> {
9089 decoder.debug_check_bounds::<Self>(offset);
9090 fidl::decode!(
9092 fidl::encoding::UnboundedVector<AggregateSource>,
9093 fdomain_client::fidl::FDomainResourceDialect,
9094 &mut self.sources,
9095 decoder,
9096 offset + 0,
9097 _depth
9098 )?;
9099 Ok(())
9100 }
9101 }
9102
9103 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryDrainRequest {
9104 type Borrowed<'a> = &'a mut Self;
9105 fn take_or_borrow<'a>(
9106 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9107 ) -> Self::Borrowed<'a> {
9108 value
9109 }
9110 }
9111
9112 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryDrainRequest {
9113 type Owned = Self;
9114
9115 #[inline(always)]
9116 fn inline_align(_context: fidl::encoding::Context) -> usize {
9117 8
9118 }
9119
9120 #[inline(always)]
9121 fn inline_size(_context: fidl::encoding::Context) -> usize {
9122 16
9123 }
9124 }
9125
9126 unsafe impl
9127 fidl::encoding::Encode<
9128 CapabilityStoreDictionaryDrainRequest,
9129 fdomain_client::fidl::FDomainResourceDialect,
9130 > for &mut CapabilityStoreDictionaryDrainRequest
9131 {
9132 #[inline]
9133 unsafe fn encode(
9134 self,
9135 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9136 offset: usize,
9137 _depth: fidl::encoding::Depth,
9138 ) -> fidl::Result<()> {
9139 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
9140 fidl::encoding::Encode::<
9142 CapabilityStoreDictionaryDrainRequest,
9143 fdomain_client::fidl::FDomainResourceDialect,
9144 >::encode(
9145 (
9146 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9147 <fidl::encoding::Optional<
9148 fidl::encoding::Endpoint<
9149 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9150 >,
9151 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9152 &mut self.iterator
9153 ),
9154 ),
9155 encoder,
9156 offset,
9157 _depth,
9158 )
9159 }
9160 }
9161 unsafe impl<
9162 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9163 T1: fidl::encoding::Encode<
9164 fidl::encoding::Optional<
9165 fidl::encoding::Endpoint<
9166 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9167 >,
9168 >,
9169 fdomain_client::fidl::FDomainResourceDialect,
9170 >,
9171 >
9172 fidl::encoding::Encode<
9173 CapabilityStoreDictionaryDrainRequest,
9174 fdomain_client::fidl::FDomainResourceDialect,
9175 > for (T0, T1)
9176 {
9177 #[inline]
9178 unsafe fn encode(
9179 self,
9180 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9181 offset: usize,
9182 depth: fidl::encoding::Depth,
9183 ) -> fidl::Result<()> {
9184 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
9185 unsafe {
9188 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9189 (ptr as *mut u64).write_unaligned(0);
9190 }
9191 self.0.encode(encoder, offset + 0, depth)?;
9193 self.1.encode(encoder, offset + 8, depth)?;
9194 Ok(())
9195 }
9196 }
9197
9198 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9199 for CapabilityStoreDictionaryDrainRequest
9200 {
9201 #[inline(always)]
9202 fn new_empty() -> Self {
9203 Self {
9204 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9205 iterator: fidl::new_empty!(
9206 fidl::encoding::Optional<
9207 fidl::encoding::Endpoint<
9208 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9209 >,
9210 >,
9211 fdomain_client::fidl::FDomainResourceDialect
9212 ),
9213 }
9214 }
9215
9216 #[inline]
9217 unsafe fn decode(
9218 &mut self,
9219 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9220 offset: usize,
9221 _depth: fidl::encoding::Depth,
9222 ) -> fidl::Result<()> {
9223 decoder.debug_check_bounds::<Self>(offset);
9224 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9226 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9227 let mask = 0xffffffff00000000u64;
9228 let maskedval = padval & mask;
9229 if maskedval != 0 {
9230 return Err(fidl::Error::NonZeroPadding {
9231 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9232 });
9233 }
9234 fidl::decode!(
9235 u64,
9236 fdomain_client::fidl::FDomainResourceDialect,
9237 &mut self.id,
9238 decoder,
9239 offset + 0,
9240 _depth
9241 )?;
9242 fidl::decode!(
9243 fidl::encoding::Optional<
9244 fidl::encoding::Endpoint<
9245 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9246 >,
9247 >,
9248 fdomain_client::fidl::FDomainResourceDialect,
9249 &mut self.iterator,
9250 decoder,
9251 offset + 8,
9252 _depth
9253 )?;
9254 Ok(())
9255 }
9256 }
9257
9258 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryEnumerateRequest {
9259 type Borrowed<'a> = &'a mut Self;
9260 fn take_or_borrow<'a>(
9261 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9262 ) -> Self::Borrowed<'a> {
9263 value
9264 }
9265 }
9266
9267 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryEnumerateRequest {
9268 type Owned = Self;
9269
9270 #[inline(always)]
9271 fn inline_align(_context: fidl::encoding::Context) -> usize {
9272 8
9273 }
9274
9275 #[inline(always)]
9276 fn inline_size(_context: fidl::encoding::Context) -> usize {
9277 16
9278 }
9279 }
9280
9281 unsafe impl
9282 fidl::encoding::Encode<
9283 CapabilityStoreDictionaryEnumerateRequest,
9284 fdomain_client::fidl::FDomainResourceDialect,
9285 > for &mut CapabilityStoreDictionaryEnumerateRequest
9286 {
9287 #[inline]
9288 unsafe fn encode(
9289 self,
9290 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9291 offset: usize,
9292 _depth: fidl::encoding::Depth,
9293 ) -> fidl::Result<()> {
9294 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
9295 fidl::encoding::Encode::<
9297 CapabilityStoreDictionaryEnumerateRequest,
9298 fdomain_client::fidl::FDomainResourceDialect,
9299 >::encode(
9300 (
9301 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9302 <fidl::encoding::Endpoint<
9303 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9304 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9305 &mut self.iterator
9306 ),
9307 ),
9308 encoder,
9309 offset,
9310 _depth,
9311 )
9312 }
9313 }
9314 unsafe impl<
9315 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9316 T1: fidl::encoding::Encode<
9317 fidl::encoding::Endpoint<
9318 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9319 >,
9320 fdomain_client::fidl::FDomainResourceDialect,
9321 >,
9322 >
9323 fidl::encoding::Encode<
9324 CapabilityStoreDictionaryEnumerateRequest,
9325 fdomain_client::fidl::FDomainResourceDialect,
9326 > for (T0, T1)
9327 {
9328 #[inline]
9329 unsafe fn encode(
9330 self,
9331 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9332 offset: usize,
9333 depth: fidl::encoding::Depth,
9334 ) -> fidl::Result<()> {
9335 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
9336 unsafe {
9339 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9340 (ptr as *mut u64).write_unaligned(0);
9341 }
9342 self.0.encode(encoder, offset + 0, depth)?;
9344 self.1.encode(encoder, offset + 8, depth)?;
9345 Ok(())
9346 }
9347 }
9348
9349 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9350 for CapabilityStoreDictionaryEnumerateRequest
9351 {
9352 #[inline(always)]
9353 fn new_empty() -> Self {
9354 Self {
9355 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9356 iterator: fidl::new_empty!(
9357 fidl::encoding::Endpoint<
9358 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9359 >,
9360 fdomain_client::fidl::FDomainResourceDialect
9361 ),
9362 }
9363 }
9364
9365 #[inline]
9366 unsafe fn decode(
9367 &mut self,
9368 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9369 offset: usize,
9370 _depth: fidl::encoding::Depth,
9371 ) -> fidl::Result<()> {
9372 decoder.debug_check_bounds::<Self>(offset);
9373 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9375 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9376 let mask = 0xffffffff00000000u64;
9377 let maskedval = padval & mask;
9378 if maskedval != 0 {
9379 return Err(fidl::Error::NonZeroPadding {
9380 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9381 });
9382 }
9383 fidl::decode!(
9384 u64,
9385 fdomain_client::fidl::FDomainResourceDialect,
9386 &mut self.id,
9387 decoder,
9388 offset + 0,
9389 _depth
9390 )?;
9391 fidl::decode!(
9392 fidl::encoding::Endpoint<
9393 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9394 >,
9395 fdomain_client::fidl::FDomainResourceDialect,
9396 &mut self.iterator,
9397 decoder,
9398 offset + 8,
9399 _depth
9400 )?;
9401 Ok(())
9402 }
9403 }
9404
9405 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryKeysRequest {
9406 type Borrowed<'a> = &'a mut Self;
9407 fn take_or_borrow<'a>(
9408 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9409 ) -> Self::Borrowed<'a> {
9410 value
9411 }
9412 }
9413
9414 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryKeysRequest {
9415 type Owned = Self;
9416
9417 #[inline(always)]
9418 fn inline_align(_context: fidl::encoding::Context) -> usize {
9419 8
9420 }
9421
9422 #[inline(always)]
9423 fn inline_size(_context: fidl::encoding::Context) -> usize {
9424 16
9425 }
9426 }
9427
9428 unsafe impl
9429 fidl::encoding::Encode<
9430 CapabilityStoreDictionaryKeysRequest,
9431 fdomain_client::fidl::FDomainResourceDialect,
9432 > for &mut CapabilityStoreDictionaryKeysRequest
9433 {
9434 #[inline]
9435 unsafe fn encode(
9436 self,
9437 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9438 offset: usize,
9439 _depth: fidl::encoding::Depth,
9440 ) -> fidl::Result<()> {
9441 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
9442 fidl::encoding::Encode::<
9444 CapabilityStoreDictionaryKeysRequest,
9445 fdomain_client::fidl::FDomainResourceDialect,
9446 >::encode(
9447 (
9448 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9449 <fidl::encoding::Endpoint<
9450 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9451 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9452 &mut self.iterator
9453 ),
9454 ),
9455 encoder,
9456 offset,
9457 _depth,
9458 )
9459 }
9460 }
9461 unsafe impl<
9462 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9463 T1: fidl::encoding::Encode<
9464 fidl::encoding::Endpoint<
9465 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9466 >,
9467 fdomain_client::fidl::FDomainResourceDialect,
9468 >,
9469 >
9470 fidl::encoding::Encode<
9471 CapabilityStoreDictionaryKeysRequest,
9472 fdomain_client::fidl::FDomainResourceDialect,
9473 > for (T0, T1)
9474 {
9475 #[inline]
9476 unsafe fn encode(
9477 self,
9478 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9479 offset: usize,
9480 depth: fidl::encoding::Depth,
9481 ) -> fidl::Result<()> {
9482 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
9483 unsafe {
9486 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9487 (ptr as *mut u64).write_unaligned(0);
9488 }
9489 self.0.encode(encoder, offset + 0, depth)?;
9491 self.1.encode(encoder, offset + 8, depth)?;
9492 Ok(())
9493 }
9494 }
9495
9496 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9497 for CapabilityStoreDictionaryKeysRequest
9498 {
9499 #[inline(always)]
9500 fn new_empty() -> Self {
9501 Self {
9502 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9503 iterator: fidl::new_empty!(
9504 fidl::encoding::Endpoint<
9505 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9506 >,
9507 fdomain_client::fidl::FDomainResourceDialect
9508 ),
9509 }
9510 }
9511
9512 #[inline]
9513 unsafe fn decode(
9514 &mut self,
9515 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9516 offset: usize,
9517 _depth: fidl::encoding::Depth,
9518 ) -> fidl::Result<()> {
9519 decoder.debug_check_bounds::<Self>(offset);
9520 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9522 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9523 let mask = 0xffffffff00000000u64;
9524 let maskedval = padval & mask;
9525 if maskedval != 0 {
9526 return Err(fidl::Error::NonZeroPadding {
9527 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9528 });
9529 }
9530 fidl::decode!(
9531 u64,
9532 fdomain_client::fidl::FDomainResourceDialect,
9533 &mut self.id,
9534 decoder,
9535 offset + 0,
9536 _depth
9537 )?;
9538 fidl::decode!(
9539 fidl::encoding::Endpoint<
9540 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9541 >,
9542 fdomain_client::fidl::FDomainResourceDialect,
9543 &mut self.iterator,
9544 decoder,
9545 offset + 8,
9546 _depth
9547 )?;
9548 Ok(())
9549 }
9550 }
9551
9552 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
9553 type Borrowed<'a> = &'a mut Self;
9554 fn take_or_borrow<'a>(
9555 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9556 ) -> Self::Borrowed<'a> {
9557 value
9558 }
9559 }
9560
9561 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
9562 type Owned = Self;
9563
9564 #[inline(always)]
9565 fn inline_align(_context: fidl::encoding::Context) -> usize {
9566 8
9567 }
9568
9569 #[inline(always)]
9570 fn inline_size(_context: fidl::encoding::Context) -> usize {
9571 16
9572 }
9573 }
9574
9575 unsafe impl
9576 fidl::encoding::Encode<
9577 CapabilityStoreDictionaryLegacyExportRequest,
9578 fdomain_client::fidl::FDomainResourceDialect,
9579 > for &mut CapabilityStoreDictionaryLegacyExportRequest
9580 {
9581 #[inline]
9582 unsafe fn encode(
9583 self,
9584 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9585 offset: usize,
9586 _depth: fidl::encoding::Depth,
9587 ) -> fidl::Result<()> {
9588 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
9589 fidl::encoding::Encode::<
9591 CapabilityStoreDictionaryLegacyExportRequest,
9592 fdomain_client::fidl::FDomainResourceDialect,
9593 >::encode(
9594 (
9595 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9596 <fidl::encoding::HandleType<
9597 fdomain_client::Channel,
9598 { fidl::ObjectType::CHANNEL.into_raw() },
9599 2147483648,
9600 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9601 &mut self.server_end
9602 ),
9603 ),
9604 encoder,
9605 offset,
9606 _depth,
9607 )
9608 }
9609 }
9610 unsafe impl<
9611 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9612 T1: fidl::encoding::Encode<
9613 fidl::encoding::HandleType<
9614 fdomain_client::Channel,
9615 { fidl::ObjectType::CHANNEL.into_raw() },
9616 2147483648,
9617 >,
9618 fdomain_client::fidl::FDomainResourceDialect,
9619 >,
9620 >
9621 fidl::encoding::Encode<
9622 CapabilityStoreDictionaryLegacyExportRequest,
9623 fdomain_client::fidl::FDomainResourceDialect,
9624 > for (T0, T1)
9625 {
9626 #[inline]
9627 unsafe fn encode(
9628 self,
9629 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9630 offset: usize,
9631 depth: fidl::encoding::Depth,
9632 ) -> fidl::Result<()> {
9633 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
9634 unsafe {
9637 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9638 (ptr as *mut u64).write_unaligned(0);
9639 }
9640 self.0.encode(encoder, offset + 0, depth)?;
9642 self.1.encode(encoder, offset + 8, depth)?;
9643 Ok(())
9644 }
9645 }
9646
9647 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9648 for CapabilityStoreDictionaryLegacyExportRequest
9649 {
9650 #[inline(always)]
9651 fn new_empty() -> Self {
9652 Self {
9653 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9654 server_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9655 }
9656 }
9657
9658 #[inline]
9659 unsafe fn decode(
9660 &mut self,
9661 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9662 offset: usize,
9663 _depth: fidl::encoding::Depth,
9664 ) -> fidl::Result<()> {
9665 decoder.debug_check_bounds::<Self>(offset);
9666 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9668 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9669 let mask = 0xffffffff00000000u64;
9670 let maskedval = padval & mask;
9671 if maskedval != 0 {
9672 return Err(fidl::Error::NonZeroPadding {
9673 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9674 });
9675 }
9676 fidl::decode!(
9677 u64,
9678 fdomain_client::fidl::FDomainResourceDialect,
9679 &mut self.id,
9680 decoder,
9681 offset + 0,
9682 _depth
9683 )?;
9684 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)?;
9685 Ok(())
9686 }
9687 }
9688
9689 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
9690 type Borrowed<'a> = &'a mut Self;
9691 fn take_or_borrow<'a>(
9692 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9693 ) -> Self::Borrowed<'a> {
9694 value
9695 }
9696 }
9697
9698 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
9699 type Owned = Self;
9700
9701 #[inline(always)]
9702 fn inline_align(_context: fidl::encoding::Context) -> usize {
9703 8
9704 }
9705
9706 #[inline(always)]
9707 fn inline_size(_context: fidl::encoding::Context) -> usize {
9708 16
9709 }
9710 }
9711
9712 unsafe impl
9713 fidl::encoding::Encode<
9714 CapabilityStoreDictionaryLegacyImportRequest,
9715 fdomain_client::fidl::FDomainResourceDialect,
9716 > for &mut CapabilityStoreDictionaryLegacyImportRequest
9717 {
9718 #[inline]
9719 unsafe fn encode(
9720 self,
9721 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9722 offset: usize,
9723 _depth: fidl::encoding::Depth,
9724 ) -> fidl::Result<()> {
9725 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
9726 fidl::encoding::Encode::<
9728 CapabilityStoreDictionaryLegacyImportRequest,
9729 fdomain_client::fidl::FDomainResourceDialect,
9730 >::encode(
9731 (
9732 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9733 <fidl::encoding::HandleType<
9734 fdomain_client::Channel,
9735 { fidl::ObjectType::CHANNEL.into_raw() },
9736 2147483648,
9737 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9738 &mut self.client_end
9739 ),
9740 ),
9741 encoder,
9742 offset,
9743 _depth,
9744 )
9745 }
9746 }
9747 unsafe impl<
9748 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9749 T1: fidl::encoding::Encode<
9750 fidl::encoding::HandleType<
9751 fdomain_client::Channel,
9752 { fidl::ObjectType::CHANNEL.into_raw() },
9753 2147483648,
9754 >,
9755 fdomain_client::fidl::FDomainResourceDialect,
9756 >,
9757 >
9758 fidl::encoding::Encode<
9759 CapabilityStoreDictionaryLegacyImportRequest,
9760 fdomain_client::fidl::FDomainResourceDialect,
9761 > for (T0, T1)
9762 {
9763 #[inline]
9764 unsafe fn encode(
9765 self,
9766 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9767 offset: usize,
9768 depth: fidl::encoding::Depth,
9769 ) -> fidl::Result<()> {
9770 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
9771 unsafe {
9774 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9775 (ptr as *mut u64).write_unaligned(0);
9776 }
9777 self.0.encode(encoder, offset + 0, depth)?;
9779 self.1.encode(encoder, offset + 8, depth)?;
9780 Ok(())
9781 }
9782 }
9783
9784 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9785 for CapabilityStoreDictionaryLegacyImportRequest
9786 {
9787 #[inline(always)]
9788 fn new_empty() -> Self {
9789 Self {
9790 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9791 client_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9792 }
9793 }
9794
9795 #[inline]
9796 unsafe fn decode(
9797 &mut self,
9798 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9799 offset: usize,
9800 _depth: fidl::encoding::Depth,
9801 ) -> fidl::Result<()> {
9802 decoder.debug_check_bounds::<Self>(offset);
9803 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9805 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9806 let mask = 0xffffffff00000000u64;
9807 let maskedval = padval & mask;
9808 if maskedval != 0 {
9809 return Err(fidl::Error::NonZeroPadding {
9810 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9811 });
9812 }
9813 fidl::decode!(
9814 u64,
9815 fdomain_client::fidl::FDomainResourceDialect,
9816 &mut self.id,
9817 decoder,
9818 offset + 0,
9819 _depth
9820 )?;
9821 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)?;
9822 Ok(())
9823 }
9824 }
9825
9826 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorCreateRequest {
9827 type Borrowed<'a> = &'a mut Self;
9828 fn take_or_borrow<'a>(
9829 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9830 ) -> Self::Borrowed<'a> {
9831 value
9832 }
9833 }
9834
9835 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorCreateRequest {
9836 type Owned = Self;
9837
9838 #[inline(always)]
9839 fn inline_align(_context: fidl::encoding::Context) -> usize {
9840 8
9841 }
9842
9843 #[inline(always)]
9844 fn inline_size(_context: fidl::encoding::Context) -> usize {
9845 16
9846 }
9847 }
9848
9849 unsafe impl
9850 fidl::encoding::Encode<
9851 CapabilityStoreDirConnectorCreateRequest,
9852 fdomain_client::fidl::FDomainResourceDialect,
9853 > for &mut CapabilityStoreDirConnectorCreateRequest
9854 {
9855 #[inline]
9856 unsafe fn encode(
9857 self,
9858 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9859 offset: usize,
9860 _depth: fidl::encoding::Depth,
9861 ) -> fidl::Result<()> {
9862 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
9863 fidl::encoding::Encode::<CapabilityStoreDirConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9865 (
9866 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9867 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
9868 ),
9869 encoder, offset, _depth
9870 )
9871 }
9872 }
9873 unsafe impl<
9874 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9875 T1: fidl::encoding::Encode<
9876 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9877 fdomain_client::fidl::FDomainResourceDialect,
9878 >,
9879 >
9880 fidl::encoding::Encode<
9881 CapabilityStoreDirConnectorCreateRequest,
9882 fdomain_client::fidl::FDomainResourceDialect,
9883 > for (T0, T1)
9884 {
9885 #[inline]
9886 unsafe fn encode(
9887 self,
9888 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9889 offset: usize,
9890 depth: fidl::encoding::Depth,
9891 ) -> fidl::Result<()> {
9892 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
9893 unsafe {
9896 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9897 (ptr as *mut u64).write_unaligned(0);
9898 }
9899 self.0.encode(encoder, offset + 0, depth)?;
9901 self.1.encode(encoder, offset + 8, depth)?;
9902 Ok(())
9903 }
9904 }
9905
9906 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9907 for CapabilityStoreDirConnectorCreateRequest
9908 {
9909 #[inline(always)]
9910 fn new_empty() -> Self {
9911 Self {
9912 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9913 receiver: fidl::new_empty!(
9914 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9915 fdomain_client::fidl::FDomainResourceDialect
9916 ),
9917 }
9918 }
9919
9920 #[inline]
9921 unsafe fn decode(
9922 &mut self,
9923 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9924 offset: usize,
9925 _depth: fidl::encoding::Depth,
9926 ) -> fidl::Result<()> {
9927 decoder.debug_check_bounds::<Self>(offset);
9928 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9930 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9931 let mask = 0xffffffff00000000u64;
9932 let maskedval = padval & mask;
9933 if maskedval != 0 {
9934 return Err(fidl::Error::NonZeroPadding {
9935 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9936 });
9937 }
9938 fidl::decode!(
9939 u64,
9940 fdomain_client::fidl::FDomainResourceDialect,
9941 &mut self.id,
9942 decoder,
9943 offset + 0,
9944 _depth
9945 )?;
9946 fidl::decode!(
9947 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9948 fdomain_client::fidl::FDomainResourceDialect,
9949 &mut self.receiver,
9950 decoder,
9951 offset + 8,
9952 _depth
9953 )?;
9954 Ok(())
9955 }
9956 }
9957
9958 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreImportRequest {
9959 type Borrowed<'a> = &'a mut Self;
9960 fn take_or_borrow<'a>(
9961 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9962 ) -> Self::Borrowed<'a> {
9963 value
9964 }
9965 }
9966
9967 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreImportRequest {
9968 type Owned = Self;
9969
9970 #[inline(always)]
9971 fn inline_align(_context: fidl::encoding::Context) -> usize {
9972 8
9973 }
9974
9975 #[inline(always)]
9976 fn inline_size(_context: fidl::encoding::Context) -> usize {
9977 24
9978 }
9979 }
9980
9981 unsafe impl
9982 fidl::encoding::Encode<
9983 CapabilityStoreImportRequest,
9984 fdomain_client::fidl::FDomainResourceDialect,
9985 > for &mut CapabilityStoreImportRequest
9986 {
9987 #[inline]
9988 unsafe fn encode(
9989 self,
9990 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9991 offset: usize,
9992 _depth: fidl::encoding::Depth,
9993 ) -> fidl::Result<()> {
9994 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
9995 fidl::encoding::Encode::<
9997 CapabilityStoreImportRequest,
9998 fdomain_client::fidl::FDomainResourceDialect,
9999 >::encode(
10000 (
10001 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10002 <Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10003 &mut self.capability,
10004 ),
10005 ),
10006 encoder,
10007 offset,
10008 _depth,
10009 )
10010 }
10011 }
10012 unsafe impl<
10013 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10014 T1: fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>,
10015 >
10016 fidl::encoding::Encode<
10017 CapabilityStoreImportRequest,
10018 fdomain_client::fidl::FDomainResourceDialect,
10019 > for (T0, T1)
10020 {
10021 #[inline]
10022 unsafe fn encode(
10023 self,
10024 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10025 offset: usize,
10026 depth: fidl::encoding::Depth,
10027 ) -> fidl::Result<()> {
10028 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
10029 self.0.encode(encoder, offset + 0, depth)?;
10033 self.1.encode(encoder, offset + 8, depth)?;
10034 Ok(())
10035 }
10036 }
10037
10038 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10039 for CapabilityStoreImportRequest
10040 {
10041 #[inline(always)]
10042 fn new_empty() -> Self {
10043 Self {
10044 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10045 capability: fidl::new_empty!(
10046 Capability,
10047 fdomain_client::fidl::FDomainResourceDialect
10048 ),
10049 }
10050 }
10051
10052 #[inline]
10053 unsafe fn decode(
10054 &mut self,
10055 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10056 offset: usize,
10057 _depth: fidl::encoding::Depth,
10058 ) -> fidl::Result<()> {
10059 decoder.debug_check_bounds::<Self>(offset);
10060 fidl::decode!(
10062 u64,
10063 fdomain_client::fidl::FDomainResourceDialect,
10064 &mut self.id,
10065 decoder,
10066 offset + 0,
10067 _depth
10068 )?;
10069 fidl::decode!(
10070 Capability,
10071 fdomain_client::fidl::FDomainResourceDialect,
10072 &mut self.capability,
10073 decoder,
10074 offset + 8,
10075 _depth
10076 )?;
10077 Ok(())
10078 }
10079 }
10080
10081 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateResponse {
10082 type Borrowed<'a> = &'a mut Self;
10083 fn take_or_borrow<'a>(
10084 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10085 ) -> Self::Borrowed<'a> {
10086 value
10087 }
10088 }
10089
10090 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateResponse {
10091 type Owned = Self;
10092
10093 #[inline(always)]
10094 fn inline_align(_context: fidl::encoding::Context) -> usize {
10095 4
10096 }
10097
10098 #[inline(always)]
10099 fn inline_size(_context: fidl::encoding::Context) -> usize {
10100 4
10101 }
10102 }
10103
10104 unsafe impl
10105 fidl::encoding::Encode<
10106 CapabilityStoreCreateServiceAggregateResponse,
10107 fdomain_client::fidl::FDomainResourceDialect,
10108 > for &mut CapabilityStoreCreateServiceAggregateResponse
10109 {
10110 #[inline]
10111 unsafe fn encode(
10112 self,
10113 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10114 offset: usize,
10115 _depth: fidl::encoding::Depth,
10116 ) -> fidl::Result<()> {
10117 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
10118 fidl::encoding::Encode::<
10120 CapabilityStoreCreateServiceAggregateResponse,
10121 fdomain_client::fidl::FDomainResourceDialect,
10122 >::encode(
10123 (<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10124 &mut self.aggregate_dir_connector,
10125 ),),
10126 encoder,
10127 offset,
10128 _depth,
10129 )
10130 }
10131 }
10132 unsafe impl<
10133 T0: fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect>,
10134 >
10135 fidl::encoding::Encode<
10136 CapabilityStoreCreateServiceAggregateResponse,
10137 fdomain_client::fidl::FDomainResourceDialect,
10138 > for (T0,)
10139 {
10140 #[inline]
10141 unsafe fn encode(
10142 self,
10143 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10144 offset: usize,
10145 depth: fidl::encoding::Depth,
10146 ) -> fidl::Result<()> {
10147 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
10148 self.0.encode(encoder, offset + 0, depth)?;
10152 Ok(())
10153 }
10154 }
10155
10156 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10157 for CapabilityStoreCreateServiceAggregateResponse
10158 {
10159 #[inline(always)]
10160 fn new_empty() -> Self {
10161 Self {
10162 aggregate_dir_connector: fidl::new_empty!(
10163 DirConnector,
10164 fdomain_client::fidl::FDomainResourceDialect
10165 ),
10166 }
10167 }
10168
10169 #[inline]
10170 unsafe fn decode(
10171 &mut self,
10172 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10173 offset: usize,
10174 _depth: fidl::encoding::Depth,
10175 ) -> fidl::Result<()> {
10176 decoder.debug_check_bounds::<Self>(offset);
10177 fidl::decode!(
10179 DirConnector,
10180 fdomain_client::fidl::FDomainResourceDialect,
10181 &mut self.aggregate_dir_connector,
10182 decoder,
10183 offset + 0,
10184 _depth
10185 )?;
10186 Ok(())
10187 }
10188 }
10189
10190 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreExportResponse {
10191 type Borrowed<'a> = &'a mut Self;
10192 fn take_or_borrow<'a>(
10193 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10194 ) -> Self::Borrowed<'a> {
10195 value
10196 }
10197 }
10198
10199 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreExportResponse {
10200 type Owned = Self;
10201
10202 #[inline(always)]
10203 fn inline_align(_context: fidl::encoding::Context) -> usize {
10204 8
10205 }
10206
10207 #[inline(always)]
10208 fn inline_size(_context: fidl::encoding::Context) -> usize {
10209 16
10210 }
10211 }
10212
10213 unsafe impl
10214 fidl::encoding::Encode<
10215 CapabilityStoreExportResponse,
10216 fdomain_client::fidl::FDomainResourceDialect,
10217 > for &mut CapabilityStoreExportResponse
10218 {
10219 #[inline]
10220 unsafe fn encode(
10221 self,
10222 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10223 offset: usize,
10224 _depth: fidl::encoding::Depth,
10225 ) -> fidl::Result<()> {
10226 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
10227 fidl::encoding::Encode::<
10229 CapabilityStoreExportResponse,
10230 fdomain_client::fidl::FDomainResourceDialect,
10231 >::encode(
10232 (<Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10233 &mut self.capability,
10234 ),),
10235 encoder,
10236 offset,
10237 _depth,
10238 )
10239 }
10240 }
10241 unsafe impl<
10242 T0: fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>,
10243 >
10244 fidl::encoding::Encode<
10245 CapabilityStoreExportResponse,
10246 fdomain_client::fidl::FDomainResourceDialect,
10247 > for (T0,)
10248 {
10249 #[inline]
10250 unsafe fn encode(
10251 self,
10252 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10253 offset: usize,
10254 depth: fidl::encoding::Depth,
10255 ) -> fidl::Result<()> {
10256 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
10257 self.0.encode(encoder, offset + 0, depth)?;
10261 Ok(())
10262 }
10263 }
10264
10265 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10266 for CapabilityStoreExportResponse
10267 {
10268 #[inline(always)]
10269 fn new_empty() -> Self {
10270 Self {
10271 capability: fidl::new_empty!(
10272 Capability,
10273 fdomain_client::fidl::FDomainResourceDialect
10274 ),
10275 }
10276 }
10277
10278 #[inline]
10279 unsafe fn decode(
10280 &mut self,
10281 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10282 offset: usize,
10283 _depth: fidl::encoding::Depth,
10284 ) -> fidl::Result<()> {
10285 decoder.debug_check_bounds::<Self>(offset);
10286 fidl::decode!(
10288 Capability,
10289 fdomain_client::fidl::FDomainResourceDialect,
10290 &mut self.capability,
10291 decoder,
10292 offset + 0,
10293 _depth
10294 )?;
10295 Ok(())
10296 }
10297 }
10298
10299 impl fidl::encoding::ResourceTypeMarker for Connector {
10300 type Borrowed<'a> = &'a mut Self;
10301 fn take_or_borrow<'a>(
10302 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10303 ) -> Self::Borrowed<'a> {
10304 value
10305 }
10306 }
10307
10308 unsafe impl fidl::encoding::TypeMarker for Connector {
10309 type Owned = Self;
10310
10311 #[inline(always)]
10312 fn inline_align(_context: fidl::encoding::Context) -> usize {
10313 4
10314 }
10315
10316 #[inline(always)]
10317 fn inline_size(_context: fidl::encoding::Context) -> usize {
10318 4
10319 }
10320 }
10321
10322 unsafe impl fidl::encoding::Encode<Connector, fdomain_client::fidl::FDomainResourceDialect>
10323 for &mut Connector
10324 {
10325 #[inline]
10326 unsafe fn encode(
10327 self,
10328 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10329 offset: usize,
10330 _depth: fidl::encoding::Depth,
10331 ) -> fidl::Result<()> {
10332 encoder.debug_check_bounds::<Connector>(offset);
10333 fidl::encoding::Encode::<Connector, fdomain_client::fidl::FDomainResourceDialect>::encode(
10335 (
10336 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10337 ),
10338 encoder, offset, _depth
10339 )
10340 }
10341 }
10342 unsafe impl<
10343 T0: fidl::encoding::Encode<
10344 fidl::encoding::HandleType<
10345 fdomain_client::EventPair,
10346 { fidl::ObjectType::EVENTPAIR.into_raw() },
10347 2147483648,
10348 >,
10349 fdomain_client::fidl::FDomainResourceDialect,
10350 >,
10351 > fidl::encoding::Encode<Connector, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10352 {
10353 #[inline]
10354 unsafe fn encode(
10355 self,
10356 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10357 offset: usize,
10358 depth: fidl::encoding::Depth,
10359 ) -> fidl::Result<()> {
10360 encoder.debug_check_bounds::<Connector>(offset);
10361 self.0.encode(encoder, offset + 0, depth)?;
10365 Ok(())
10366 }
10367 }
10368
10369 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Connector {
10370 #[inline(always)]
10371 fn new_empty() -> Self {
10372 Self {
10373 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10374 }
10375 }
10376
10377 #[inline]
10378 unsafe fn decode(
10379 &mut self,
10380 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10381 offset: usize,
10382 _depth: fidl::encoding::Depth,
10383 ) -> fidl::Result<()> {
10384 decoder.debug_check_bounds::<Self>(offset);
10385 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)?;
10387 Ok(())
10388 }
10389 }
10390
10391 impl fidl::encoding::ResourceTypeMarker for DictionaryDrainIteratorGetNextResponse {
10392 type Borrowed<'a> = &'a mut Self;
10393 fn take_or_borrow<'a>(
10394 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10395 ) -> Self::Borrowed<'a> {
10396 value
10397 }
10398 }
10399
10400 unsafe impl fidl::encoding::TypeMarker for DictionaryDrainIteratorGetNextResponse {
10401 type Owned = Self;
10402
10403 #[inline(always)]
10404 fn inline_align(_context: fidl::encoding::Context) -> usize {
10405 8
10406 }
10407
10408 #[inline(always)]
10409 fn inline_size(_context: fidl::encoding::Context) -> usize {
10410 24
10411 }
10412 }
10413
10414 unsafe impl
10415 fidl::encoding::Encode<
10416 DictionaryDrainIteratorGetNextResponse,
10417 fdomain_client::fidl::FDomainResourceDialect,
10418 > for &mut DictionaryDrainIteratorGetNextResponse
10419 {
10420 #[inline]
10421 unsafe fn encode(
10422 self,
10423 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10424 offset: usize,
10425 _depth: fidl::encoding::Depth,
10426 ) -> fidl::Result<()> {
10427 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
10428 fidl::encoding::Encode::<DictionaryDrainIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10430 (
10431 <fidl::encoding::Vector<DictionaryItem, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.items),
10432 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
10433 ),
10434 encoder, offset, _depth
10435 )
10436 }
10437 }
10438 unsafe impl<
10439 T0: fidl::encoding::Encode<
10440 fidl::encoding::Vector<DictionaryItem, 128>,
10441 fdomain_client::fidl::FDomainResourceDialect,
10442 >,
10443 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10444 >
10445 fidl::encoding::Encode<
10446 DictionaryDrainIteratorGetNextResponse,
10447 fdomain_client::fidl::FDomainResourceDialect,
10448 > for (T0, T1)
10449 {
10450 #[inline]
10451 unsafe fn encode(
10452 self,
10453 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10454 offset: usize,
10455 depth: fidl::encoding::Depth,
10456 ) -> fidl::Result<()> {
10457 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
10458 self.0.encode(encoder, offset + 0, depth)?;
10462 self.1.encode(encoder, offset + 16, depth)?;
10463 Ok(())
10464 }
10465 }
10466
10467 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10468 for DictionaryDrainIteratorGetNextResponse
10469 {
10470 #[inline(always)]
10471 fn new_empty() -> Self {
10472 Self {
10473 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryItem, 128>, fdomain_client::fidl::FDomainResourceDialect),
10474 end_id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10475 }
10476 }
10477
10478 #[inline]
10479 unsafe fn decode(
10480 &mut self,
10481 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10482 offset: usize,
10483 _depth: fidl::encoding::Depth,
10484 ) -> fidl::Result<()> {
10485 decoder.debug_check_bounds::<Self>(offset);
10486 fidl::decode!(fidl::encoding::Vector<DictionaryItem, 128>, fdomain_client::fidl::FDomainResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
10488 fidl::decode!(
10489 u64,
10490 fdomain_client::fidl::FDomainResourceDialect,
10491 &mut self.end_id,
10492 decoder,
10493 offset + 16,
10494 _depth
10495 )?;
10496 Ok(())
10497 }
10498 }
10499
10500 impl fidl::encoding::ResourceTypeMarker for DictionaryEnumerateIteratorGetNextResponse {
10501 type Borrowed<'a> = &'a mut Self;
10502 fn take_or_borrow<'a>(
10503 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10504 ) -> Self::Borrowed<'a> {
10505 value
10506 }
10507 }
10508
10509 unsafe impl fidl::encoding::TypeMarker for DictionaryEnumerateIteratorGetNextResponse {
10510 type Owned = Self;
10511
10512 #[inline(always)]
10513 fn inline_align(_context: fidl::encoding::Context) -> usize {
10514 8
10515 }
10516
10517 #[inline(always)]
10518 fn inline_size(_context: fidl::encoding::Context) -> usize {
10519 24
10520 }
10521 }
10522
10523 unsafe impl
10524 fidl::encoding::Encode<
10525 DictionaryEnumerateIteratorGetNextResponse,
10526 fdomain_client::fidl::FDomainResourceDialect,
10527 > for &mut DictionaryEnumerateIteratorGetNextResponse
10528 {
10529 #[inline]
10530 unsafe fn encode(
10531 self,
10532 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10533 offset: usize,
10534 _depth: fidl::encoding::Depth,
10535 ) -> fidl::Result<()> {
10536 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
10537 fidl::encoding::Encode::<DictionaryEnumerateIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10539 (
10540 <fidl::encoding::Vector<DictionaryOptionalItem, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.items),
10541 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
10542 ),
10543 encoder, offset, _depth
10544 )
10545 }
10546 }
10547 unsafe impl<
10548 T0: fidl::encoding::Encode<
10549 fidl::encoding::Vector<DictionaryOptionalItem, 128>,
10550 fdomain_client::fidl::FDomainResourceDialect,
10551 >,
10552 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10553 >
10554 fidl::encoding::Encode<
10555 DictionaryEnumerateIteratorGetNextResponse,
10556 fdomain_client::fidl::FDomainResourceDialect,
10557 > for (T0, T1)
10558 {
10559 #[inline]
10560 unsafe fn encode(
10561 self,
10562 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10563 offset: usize,
10564 depth: fidl::encoding::Depth,
10565 ) -> fidl::Result<()> {
10566 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
10567 self.0.encode(encoder, offset + 0, depth)?;
10571 self.1.encode(encoder, offset + 16, depth)?;
10572 Ok(())
10573 }
10574 }
10575
10576 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10577 for DictionaryEnumerateIteratorGetNextResponse
10578 {
10579 #[inline(always)]
10580 fn new_empty() -> Self {
10581 Self {
10582 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fdomain_client::fidl::FDomainResourceDialect),
10583 end_id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10584 }
10585 }
10586
10587 #[inline]
10588 unsafe fn decode(
10589 &mut self,
10590 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10591 offset: usize,
10592 _depth: fidl::encoding::Depth,
10593 ) -> fidl::Result<()> {
10594 decoder.debug_check_bounds::<Self>(offset);
10595 fidl::decode!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fdomain_client::fidl::FDomainResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
10597 fidl::decode!(
10598 u64,
10599 fdomain_client::fidl::FDomainResourceDialect,
10600 &mut self.end_id,
10601 decoder,
10602 offset + 16,
10603 _depth
10604 )?;
10605 Ok(())
10606 }
10607 }
10608
10609 impl fidl::encoding::ResourceTypeMarker for DictionaryKeysIteratorGetNextResponse {
10610 type Borrowed<'a> = &'a mut Self;
10611 fn take_or_borrow<'a>(
10612 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10613 ) -> Self::Borrowed<'a> {
10614 value
10615 }
10616 }
10617
10618 unsafe impl fidl::encoding::TypeMarker for DictionaryKeysIteratorGetNextResponse {
10619 type Owned = Self;
10620
10621 #[inline(always)]
10622 fn inline_align(_context: fidl::encoding::Context) -> usize {
10623 8
10624 }
10625
10626 #[inline(always)]
10627 fn inline_size(_context: fidl::encoding::Context) -> usize {
10628 16
10629 }
10630 }
10631
10632 unsafe impl
10633 fidl::encoding::Encode<
10634 DictionaryKeysIteratorGetNextResponse,
10635 fdomain_client::fidl::FDomainResourceDialect,
10636 > for &mut DictionaryKeysIteratorGetNextResponse
10637 {
10638 #[inline]
10639 unsafe fn encode(
10640 self,
10641 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10642 offset: usize,
10643 _depth: fidl::encoding::Depth,
10644 ) -> fidl::Result<()> {
10645 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
10646 fidl::encoding::Encode::<DictionaryKeysIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10648 (
10649 <fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
10650 ),
10651 encoder, offset, _depth
10652 )
10653 }
10654 }
10655 unsafe impl<
10656 T0: fidl::encoding::Encode<
10657 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10658 fdomain_client::fidl::FDomainResourceDialect,
10659 >,
10660 >
10661 fidl::encoding::Encode<
10662 DictionaryKeysIteratorGetNextResponse,
10663 fdomain_client::fidl::FDomainResourceDialect,
10664 > for (T0,)
10665 {
10666 #[inline]
10667 unsafe fn encode(
10668 self,
10669 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10670 offset: usize,
10671 depth: fidl::encoding::Depth,
10672 ) -> fidl::Result<()> {
10673 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
10674 self.0.encode(encoder, offset + 0, depth)?;
10678 Ok(())
10679 }
10680 }
10681
10682 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10683 for DictionaryKeysIteratorGetNextResponse
10684 {
10685 #[inline(always)]
10686 fn new_empty() -> Self {
10687 Self {
10688 keys: fidl::new_empty!(
10689 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10690 fdomain_client::fidl::FDomainResourceDialect
10691 ),
10692 }
10693 }
10694
10695 #[inline]
10696 unsafe fn decode(
10697 &mut self,
10698 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10699 offset: usize,
10700 _depth: fidl::encoding::Depth,
10701 ) -> fidl::Result<()> {
10702 decoder.debug_check_bounds::<Self>(offset);
10703 fidl::decode!(
10705 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10706 fdomain_client::fidl::FDomainResourceDialect,
10707 &mut self.keys,
10708 decoder,
10709 offset + 0,
10710 _depth
10711 )?;
10712 Ok(())
10713 }
10714 }
10715
10716 impl fidl::encoding::ResourceTypeMarker for DictionaryOptionalItem {
10717 type Borrowed<'a> = &'a mut Self;
10718 fn take_or_borrow<'a>(
10719 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10720 ) -> Self::Borrowed<'a> {
10721 value
10722 }
10723 }
10724
10725 unsafe impl fidl::encoding::TypeMarker for DictionaryOptionalItem {
10726 type Owned = Self;
10727
10728 #[inline(always)]
10729 fn inline_align(_context: fidl::encoding::Context) -> usize {
10730 8
10731 }
10732
10733 #[inline(always)]
10734 fn inline_size(_context: fidl::encoding::Context) -> usize {
10735 24
10736 }
10737 }
10738
10739 unsafe impl
10740 fidl::encoding::Encode<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>
10741 for &mut DictionaryOptionalItem
10742 {
10743 #[inline]
10744 unsafe fn encode(
10745 self,
10746 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10747 offset: usize,
10748 _depth: fidl::encoding::Depth,
10749 ) -> fidl::Result<()> {
10750 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
10751 fidl::encoding::Encode::<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>::encode(
10753 (
10754 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
10755 <fidl::encoding::Boxed<WrappedCapabilityId> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10756 ),
10757 encoder, offset, _depth
10758 )
10759 }
10760 }
10761 unsafe impl<
10762 T0: fidl::encoding::Encode<
10763 fidl::encoding::BoundedString<255>,
10764 fdomain_client::fidl::FDomainResourceDialect,
10765 >,
10766 T1: fidl::encoding::Encode<
10767 fidl::encoding::Boxed<WrappedCapabilityId>,
10768 fdomain_client::fidl::FDomainResourceDialect,
10769 >,
10770 >
10771 fidl::encoding::Encode<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>
10772 for (T0, T1)
10773 {
10774 #[inline]
10775 unsafe fn encode(
10776 self,
10777 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10778 offset: usize,
10779 depth: fidl::encoding::Depth,
10780 ) -> fidl::Result<()> {
10781 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
10782 self.0.encode(encoder, offset + 0, depth)?;
10786 self.1.encode(encoder, offset + 16, depth)?;
10787 Ok(())
10788 }
10789 }
10790
10791 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10792 for DictionaryOptionalItem
10793 {
10794 #[inline(always)]
10795 fn new_empty() -> Self {
10796 Self {
10797 key: fidl::new_empty!(
10798 fidl::encoding::BoundedString<255>,
10799 fdomain_client::fidl::FDomainResourceDialect
10800 ),
10801 value: fidl::new_empty!(
10802 fidl::encoding::Boxed<WrappedCapabilityId>,
10803 fdomain_client::fidl::FDomainResourceDialect
10804 ),
10805 }
10806 }
10807
10808 #[inline]
10809 unsafe fn decode(
10810 &mut self,
10811 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10812 offset: usize,
10813 _depth: fidl::encoding::Depth,
10814 ) -> fidl::Result<()> {
10815 decoder.debug_check_bounds::<Self>(offset);
10816 fidl::decode!(
10818 fidl::encoding::BoundedString<255>,
10819 fdomain_client::fidl::FDomainResourceDialect,
10820 &mut self.key,
10821 decoder,
10822 offset + 0,
10823 _depth
10824 )?;
10825 fidl::decode!(
10826 fidl::encoding::Boxed<WrappedCapabilityId>,
10827 fdomain_client::fidl::FDomainResourceDialect,
10828 &mut self.value,
10829 decoder,
10830 offset + 16,
10831 _depth
10832 )?;
10833 Ok(())
10834 }
10835 }
10836
10837 impl fidl::encoding::ResourceTypeMarker for DictionaryRef {
10838 type Borrowed<'a> = &'a mut Self;
10839 fn take_or_borrow<'a>(
10840 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10841 ) -> Self::Borrowed<'a> {
10842 value
10843 }
10844 }
10845
10846 unsafe impl fidl::encoding::TypeMarker for DictionaryRef {
10847 type Owned = Self;
10848
10849 #[inline(always)]
10850 fn inline_align(_context: fidl::encoding::Context) -> usize {
10851 4
10852 }
10853
10854 #[inline(always)]
10855 fn inline_size(_context: fidl::encoding::Context) -> usize {
10856 4
10857 }
10858 }
10859
10860 unsafe impl fidl::encoding::Encode<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>
10861 for &mut DictionaryRef
10862 {
10863 #[inline]
10864 unsafe fn encode(
10865 self,
10866 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10867 offset: usize,
10868 _depth: fidl::encoding::Depth,
10869 ) -> fidl::Result<()> {
10870 encoder.debug_check_bounds::<DictionaryRef>(offset);
10871 fidl::encoding::Encode::<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>::encode(
10873 (
10874 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10875 ),
10876 encoder, offset, _depth
10877 )
10878 }
10879 }
10880 unsafe impl<
10881 T0: fidl::encoding::Encode<
10882 fidl::encoding::HandleType<
10883 fdomain_client::EventPair,
10884 { fidl::ObjectType::EVENTPAIR.into_raw() },
10885 2147483648,
10886 >,
10887 fdomain_client::fidl::FDomainResourceDialect,
10888 >,
10889 > fidl::encoding::Encode<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10890 {
10891 #[inline]
10892 unsafe fn encode(
10893 self,
10894 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10895 offset: usize,
10896 depth: fidl::encoding::Depth,
10897 ) -> fidl::Result<()> {
10898 encoder.debug_check_bounds::<DictionaryRef>(offset);
10899 self.0.encode(encoder, offset + 0, depth)?;
10903 Ok(())
10904 }
10905 }
10906
10907 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DictionaryRef {
10908 #[inline(always)]
10909 fn new_empty() -> Self {
10910 Self {
10911 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10912 }
10913 }
10914
10915 #[inline]
10916 unsafe fn decode(
10917 &mut self,
10918 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10919 offset: usize,
10920 _depth: fidl::encoding::Depth,
10921 ) -> fidl::Result<()> {
10922 decoder.debug_check_bounds::<Self>(offset);
10923 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)?;
10925 Ok(())
10926 }
10927 }
10928
10929 impl fidl::encoding::ResourceTypeMarker for DirConnector {
10930 type Borrowed<'a> = &'a mut Self;
10931 fn take_or_borrow<'a>(
10932 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10933 ) -> Self::Borrowed<'a> {
10934 value
10935 }
10936 }
10937
10938 unsafe impl fidl::encoding::TypeMarker for DirConnector {
10939 type Owned = Self;
10940
10941 #[inline(always)]
10942 fn inline_align(_context: fidl::encoding::Context) -> usize {
10943 4
10944 }
10945
10946 #[inline(always)]
10947 fn inline_size(_context: fidl::encoding::Context) -> usize {
10948 4
10949 }
10950 }
10951
10952 unsafe impl fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect>
10953 for &mut DirConnector
10954 {
10955 #[inline]
10956 unsafe fn encode(
10957 self,
10958 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10959 offset: usize,
10960 _depth: fidl::encoding::Depth,
10961 ) -> fidl::Result<()> {
10962 encoder.debug_check_bounds::<DirConnector>(offset);
10963 fidl::encoding::Encode::<DirConnector, fdomain_client::fidl::FDomainResourceDialect>::encode(
10965 (
10966 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10967 ),
10968 encoder, offset, _depth
10969 )
10970 }
10971 }
10972 unsafe impl<
10973 T0: fidl::encoding::Encode<
10974 fidl::encoding::HandleType<
10975 fdomain_client::EventPair,
10976 { fidl::ObjectType::EVENTPAIR.into_raw() },
10977 2147483648,
10978 >,
10979 fdomain_client::fidl::FDomainResourceDialect,
10980 >,
10981 > fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10982 {
10983 #[inline]
10984 unsafe fn encode(
10985 self,
10986 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10987 offset: usize,
10988 depth: fidl::encoding::Depth,
10989 ) -> fidl::Result<()> {
10990 encoder.debug_check_bounds::<DirConnector>(offset);
10991 self.0.encode(encoder, offset + 0, depth)?;
10995 Ok(())
10996 }
10997 }
10998
10999 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DirConnector {
11000 #[inline(always)]
11001 fn new_empty() -> Self {
11002 Self {
11003 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11004 }
11005 }
11006
11007 #[inline]
11008 unsafe fn decode(
11009 &mut self,
11010 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11011 offset: usize,
11012 _depth: fidl::encoding::Depth,
11013 ) -> fidl::Result<()> {
11014 decoder.debug_check_bounds::<Self>(offset);
11015 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)?;
11017 Ok(())
11018 }
11019 }
11020
11021 impl fidl::encoding::ResourceTypeMarker for DirEntry {
11022 type Borrowed<'a> = &'a mut Self;
11023 fn take_or_borrow<'a>(
11024 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11025 ) -> Self::Borrowed<'a> {
11026 value
11027 }
11028 }
11029
11030 unsafe impl fidl::encoding::TypeMarker for DirEntry {
11031 type Owned = Self;
11032
11033 #[inline(always)]
11034 fn inline_align(_context: fidl::encoding::Context) -> usize {
11035 4
11036 }
11037
11038 #[inline(always)]
11039 fn inline_size(_context: fidl::encoding::Context) -> usize {
11040 4
11041 }
11042 }
11043
11044 unsafe impl fidl::encoding::Encode<DirEntry, fdomain_client::fidl::FDomainResourceDialect>
11045 for &mut DirEntry
11046 {
11047 #[inline]
11048 unsafe fn encode(
11049 self,
11050 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11051 offset: usize,
11052 _depth: fidl::encoding::Depth,
11053 ) -> fidl::Result<()> {
11054 encoder.debug_check_bounds::<DirEntry>(offset);
11055 fidl::encoding::Encode::<DirEntry, fdomain_client::fidl::FDomainResourceDialect>::encode(
11057 (<fidl::encoding::HandleType<
11058 fdomain_client::EventPair,
11059 { fidl::ObjectType::EVENTPAIR.into_raw() },
11060 2147483648,
11061 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11062 &mut self.token
11063 ),),
11064 encoder,
11065 offset,
11066 _depth,
11067 )
11068 }
11069 }
11070 unsafe impl<
11071 T0: fidl::encoding::Encode<
11072 fidl::encoding::HandleType<
11073 fdomain_client::EventPair,
11074 { fidl::ObjectType::EVENTPAIR.into_raw() },
11075 2147483648,
11076 >,
11077 fdomain_client::fidl::FDomainResourceDialect,
11078 >,
11079 > fidl::encoding::Encode<DirEntry, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
11080 {
11081 #[inline]
11082 unsafe fn encode(
11083 self,
11084 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11085 offset: usize,
11086 depth: fidl::encoding::Depth,
11087 ) -> fidl::Result<()> {
11088 encoder.debug_check_bounds::<DirEntry>(offset);
11089 self.0.encode(encoder, offset + 0, depth)?;
11093 Ok(())
11094 }
11095 }
11096
11097 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DirEntry {
11098 #[inline(always)]
11099 fn new_empty() -> Self {
11100 Self {
11101 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11102 }
11103 }
11104
11105 #[inline]
11106 unsafe fn decode(
11107 &mut self,
11108 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11109 offset: usize,
11110 _depth: fidl::encoding::Depth,
11111 ) -> fidl::Result<()> {
11112 decoder.debug_check_bounds::<Self>(offset);
11113 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)?;
11115 Ok(())
11116 }
11117 }
11118
11119 impl fidl::encoding::ResourceTypeMarker for InstanceToken {
11120 type Borrowed<'a> = &'a mut Self;
11121 fn take_or_borrow<'a>(
11122 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11123 ) -> Self::Borrowed<'a> {
11124 value
11125 }
11126 }
11127
11128 unsafe impl fidl::encoding::TypeMarker for InstanceToken {
11129 type Owned = Self;
11130
11131 #[inline(always)]
11132 fn inline_align(_context: fidl::encoding::Context) -> usize {
11133 4
11134 }
11135
11136 #[inline(always)]
11137 fn inline_size(_context: fidl::encoding::Context) -> usize {
11138 4
11139 }
11140 }
11141
11142 unsafe impl fidl::encoding::Encode<InstanceToken, fdomain_client::fidl::FDomainResourceDialect>
11143 for &mut InstanceToken
11144 {
11145 #[inline]
11146 unsafe fn encode(
11147 self,
11148 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11149 offset: usize,
11150 _depth: fidl::encoding::Depth,
11151 ) -> fidl::Result<()> {
11152 encoder.debug_check_bounds::<InstanceToken>(offset);
11153 fidl::encoding::Encode::<InstanceToken, fdomain_client::fidl::FDomainResourceDialect>::encode(
11155 (
11156 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
11157 ),
11158 encoder, offset, _depth
11159 )
11160 }
11161 }
11162 unsafe impl<
11163 T0: fidl::encoding::Encode<
11164 fidl::encoding::HandleType<
11165 fdomain_client::EventPair,
11166 { fidl::ObjectType::EVENTPAIR.into_raw() },
11167 2147483648,
11168 >,
11169 fdomain_client::fidl::FDomainResourceDialect,
11170 >,
11171 > fidl::encoding::Encode<InstanceToken, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
11172 {
11173 #[inline]
11174 unsafe fn encode(
11175 self,
11176 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11177 offset: usize,
11178 depth: fidl::encoding::Depth,
11179 ) -> fidl::Result<()> {
11180 encoder.debug_check_bounds::<InstanceToken>(offset);
11181 self.0.encode(encoder, offset + 0, depth)?;
11185 Ok(())
11186 }
11187 }
11188
11189 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for InstanceToken {
11190 #[inline(always)]
11191 fn new_empty() -> Self {
11192 Self {
11193 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11194 }
11195 }
11196
11197 #[inline]
11198 unsafe fn decode(
11199 &mut self,
11200 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11201 offset: usize,
11202 _depth: fidl::encoding::Depth,
11203 ) -> fidl::Result<()> {
11204 decoder.debug_check_bounds::<Self>(offset);
11205 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)?;
11207 Ok(())
11208 }
11209 }
11210
11211 impl fidl::encoding::ResourceTypeMarker for ProtocolPayload {
11212 type Borrowed<'a> = &'a mut Self;
11213 fn take_or_borrow<'a>(
11214 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11215 ) -> Self::Borrowed<'a> {
11216 value
11217 }
11218 }
11219
11220 unsafe impl fidl::encoding::TypeMarker for ProtocolPayload {
11221 type Owned = Self;
11222
11223 #[inline(always)]
11224 fn inline_align(_context: fidl::encoding::Context) -> usize {
11225 4
11226 }
11227
11228 #[inline(always)]
11229 fn inline_size(_context: fidl::encoding::Context) -> usize {
11230 4
11231 }
11232 }
11233
11234 unsafe impl
11235 fidl::encoding::Encode<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>
11236 for &mut ProtocolPayload
11237 {
11238 #[inline]
11239 unsafe fn encode(
11240 self,
11241 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11242 offset: usize,
11243 _depth: fidl::encoding::Depth,
11244 ) -> fidl::Result<()> {
11245 encoder.debug_check_bounds::<ProtocolPayload>(offset);
11246 fidl::encoding::Encode::<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>::encode(
11248 (
11249 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.channel),
11250 ),
11251 encoder, offset, _depth
11252 )
11253 }
11254 }
11255 unsafe impl<
11256 T0: fidl::encoding::Encode<
11257 fidl::encoding::HandleType<
11258 fdomain_client::Channel,
11259 { fidl::ObjectType::CHANNEL.into_raw() },
11260 2147483648,
11261 >,
11262 fdomain_client::fidl::FDomainResourceDialect,
11263 >,
11264 > fidl::encoding::Encode<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>
11265 for (T0,)
11266 {
11267 #[inline]
11268 unsafe fn encode(
11269 self,
11270 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11271 offset: usize,
11272 depth: fidl::encoding::Depth,
11273 ) -> fidl::Result<()> {
11274 encoder.debug_check_bounds::<ProtocolPayload>(offset);
11275 self.0.encode(encoder, offset + 0, depth)?;
11279 Ok(())
11280 }
11281 }
11282
11283 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11284 for ProtocolPayload
11285 {
11286 #[inline(always)]
11287 fn new_empty() -> Self {
11288 Self {
11289 channel: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11290 }
11291 }
11292
11293 #[inline]
11294 unsafe fn decode(
11295 &mut self,
11296 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11297 offset: usize,
11298 _depth: fidl::encoding::Depth,
11299 ) -> fidl::Result<()> {
11300 decoder.debug_check_bounds::<Self>(offset);
11301 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)?;
11303 Ok(())
11304 }
11305 }
11306
11307 impl AggregateSource {
11308 #[inline(always)]
11309 fn max_ordinal_present(&self) -> u64 {
11310 if let Some(_) = self.renamed_instances {
11311 return 3;
11312 }
11313 if let Some(_) = self.source_instance_filter {
11314 return 2;
11315 }
11316 if let Some(_) = self.dir_connector {
11317 return 1;
11318 }
11319 0
11320 }
11321 }
11322
11323 impl fidl::encoding::ResourceTypeMarker for AggregateSource {
11324 type Borrowed<'a> = &'a mut Self;
11325 fn take_or_borrow<'a>(
11326 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11327 ) -> Self::Borrowed<'a> {
11328 value
11329 }
11330 }
11331
11332 unsafe impl fidl::encoding::TypeMarker for AggregateSource {
11333 type Owned = Self;
11334
11335 #[inline(always)]
11336 fn inline_align(_context: fidl::encoding::Context) -> usize {
11337 8
11338 }
11339
11340 #[inline(always)]
11341 fn inline_size(_context: fidl::encoding::Context) -> usize {
11342 16
11343 }
11344 }
11345
11346 unsafe impl
11347 fidl::encoding::Encode<AggregateSource, fdomain_client::fidl::FDomainResourceDialect>
11348 for &mut AggregateSource
11349 {
11350 unsafe fn encode(
11351 self,
11352 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11353 offset: usize,
11354 mut depth: fidl::encoding::Depth,
11355 ) -> fidl::Result<()> {
11356 encoder.debug_check_bounds::<AggregateSource>(offset);
11357 let max_ordinal: u64 = self.max_ordinal_present();
11359 encoder.write_num(max_ordinal, offset);
11360 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11361 if max_ordinal == 0 {
11363 return Ok(());
11364 }
11365 depth.increment()?;
11366 let envelope_size = 8;
11367 let bytes_len = max_ordinal as usize * envelope_size;
11368 #[allow(unused_variables)]
11369 let offset = encoder.out_of_line_offset(bytes_len);
11370 let mut _prev_end_offset: usize = 0;
11371 if 1 > max_ordinal {
11372 return Ok(());
11373 }
11374
11375 let cur_offset: usize = (1 - 1) * envelope_size;
11378
11379 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11381
11382 fidl::encoding::encode_in_envelope_optional::<
11387 DirConnector,
11388 fdomain_client::fidl::FDomainResourceDialect,
11389 >(
11390 self.dir_connector
11391 .as_mut()
11392 .map(<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11393 encoder,
11394 offset + cur_offset,
11395 depth,
11396 )?;
11397
11398 _prev_end_offset = cur_offset + envelope_size;
11399 if 2 > max_ordinal {
11400 return Ok(());
11401 }
11402
11403 let cur_offset: usize = (2 - 1) * envelope_size;
11406
11407 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11409
11410 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>, fdomain_client::fidl::FDomainResourceDialect>(
11415 self.source_instance_filter.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>> as fidl::encoding::ValueTypeMarker>::borrow),
11416 encoder, offset + cur_offset, depth
11417 )?;
11418
11419 _prev_end_offset = cur_offset + envelope_size;
11420 if 3 > max_ordinal {
11421 return Ok(());
11422 }
11423
11424 let cur_offset: usize = (3 - 1) * envelope_size;
11427
11428 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11430
11431 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fdomain_fuchsia_component_decl::NameMapping>, fdomain_client::fidl::FDomainResourceDialect>(
11436 self.renamed_instances.as_ref().map(<fidl::encoding::UnboundedVector<fdomain_fuchsia_component_decl::NameMapping> as fidl::encoding::ValueTypeMarker>::borrow),
11437 encoder, offset + cur_offset, depth
11438 )?;
11439
11440 _prev_end_offset = cur_offset + envelope_size;
11441
11442 Ok(())
11443 }
11444 }
11445
11446 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11447 for AggregateSource
11448 {
11449 #[inline(always)]
11450 fn new_empty() -> Self {
11451 Self::default()
11452 }
11453
11454 unsafe fn decode(
11455 &mut self,
11456 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11457 offset: usize,
11458 mut depth: fidl::encoding::Depth,
11459 ) -> fidl::Result<()> {
11460 decoder.debug_check_bounds::<Self>(offset);
11461 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11462 None => return Err(fidl::Error::NotNullable),
11463 Some(len) => len,
11464 };
11465 if len == 0 {
11467 return Ok(());
11468 };
11469 depth.increment()?;
11470 let envelope_size = 8;
11471 let bytes_len = len * envelope_size;
11472 let offset = decoder.out_of_line_offset(bytes_len)?;
11473 let mut _next_ordinal_to_read = 0;
11475 let mut next_offset = offset;
11476 let end_offset = offset + bytes_len;
11477 _next_ordinal_to_read += 1;
11478 if next_offset >= end_offset {
11479 return Ok(());
11480 }
11481
11482 while _next_ordinal_to_read < 1 {
11484 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11485 _next_ordinal_to_read += 1;
11486 next_offset += envelope_size;
11487 }
11488
11489 let next_out_of_line = decoder.next_out_of_line();
11490 let handles_before = decoder.remaining_handles();
11491 if let Some((inlined, num_bytes, num_handles)) =
11492 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11493 {
11494 let member_inline_size =
11495 <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11496 if inlined != (member_inline_size <= 4) {
11497 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11498 }
11499 let inner_offset;
11500 let mut inner_depth = depth.clone();
11501 if inlined {
11502 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11503 inner_offset = next_offset;
11504 } else {
11505 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11506 inner_depth.increment()?;
11507 }
11508 let val_ref = self.dir_connector.get_or_insert_with(|| {
11509 fidl::new_empty!(DirConnector, fdomain_client::fidl::FDomainResourceDialect)
11510 });
11511 fidl::decode!(
11512 DirConnector,
11513 fdomain_client::fidl::FDomainResourceDialect,
11514 val_ref,
11515 decoder,
11516 inner_offset,
11517 inner_depth
11518 )?;
11519 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11520 {
11521 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11522 }
11523 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11524 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11525 }
11526 }
11527
11528 next_offset += envelope_size;
11529 _next_ordinal_to_read += 1;
11530 if next_offset >= end_offset {
11531 return Ok(());
11532 }
11533
11534 while _next_ordinal_to_read < 2 {
11536 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11537 _next_ordinal_to_read += 1;
11538 next_offset += envelope_size;
11539 }
11540
11541 let next_out_of_line = decoder.next_out_of_line();
11542 let handles_before = decoder.remaining_handles();
11543 if let Some((inlined, num_bytes, num_handles)) =
11544 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11545 {
11546 let member_inline_size = <fidl::encoding::UnboundedVector<
11547 fidl::encoding::BoundedString<255>,
11548 > as fidl::encoding::TypeMarker>::inline_size(
11549 decoder.context
11550 );
11551 if inlined != (member_inline_size <= 4) {
11552 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11553 }
11554 let inner_offset;
11555 let mut inner_depth = depth.clone();
11556 if inlined {
11557 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11558 inner_offset = next_offset;
11559 } else {
11560 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11561 inner_depth.increment()?;
11562 }
11563 let val_ref = self.source_instance_filter.get_or_insert_with(|| {
11564 fidl::new_empty!(
11565 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
11566 fdomain_client::fidl::FDomainResourceDialect
11567 )
11568 });
11569 fidl::decode!(
11570 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
11571 fdomain_client::fidl::FDomainResourceDialect,
11572 val_ref,
11573 decoder,
11574 inner_offset,
11575 inner_depth
11576 )?;
11577 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11578 {
11579 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11580 }
11581 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11582 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11583 }
11584 }
11585
11586 next_offset += envelope_size;
11587 _next_ordinal_to_read += 1;
11588 if next_offset >= end_offset {
11589 return Ok(());
11590 }
11591
11592 while _next_ordinal_to_read < 3 {
11594 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11595 _next_ordinal_to_read += 1;
11596 next_offset += envelope_size;
11597 }
11598
11599 let next_out_of_line = decoder.next_out_of_line();
11600 let handles_before = decoder.remaining_handles();
11601 if let Some((inlined, num_bytes, num_handles)) =
11602 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11603 {
11604 let member_inline_size = <fidl::encoding::UnboundedVector<
11605 fdomain_fuchsia_component_decl::NameMapping,
11606 > as fidl::encoding::TypeMarker>::inline_size(
11607 decoder.context
11608 );
11609 if inlined != (member_inline_size <= 4) {
11610 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11611 }
11612 let inner_offset;
11613 let mut inner_depth = depth.clone();
11614 if inlined {
11615 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11616 inner_offset = next_offset;
11617 } else {
11618 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11619 inner_depth.increment()?;
11620 }
11621 let val_ref = self.renamed_instances.get_or_insert_with(|| {
11622 fidl::new_empty!(
11623 fidl::encoding::UnboundedVector<
11624 fdomain_fuchsia_component_decl::NameMapping,
11625 >,
11626 fdomain_client::fidl::FDomainResourceDialect
11627 )
11628 });
11629 fidl::decode!(
11630 fidl::encoding::UnboundedVector<fdomain_fuchsia_component_decl::NameMapping>,
11631 fdomain_client::fidl::FDomainResourceDialect,
11632 val_ref,
11633 decoder,
11634 inner_offset,
11635 inner_depth
11636 )?;
11637 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11638 {
11639 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11640 }
11641 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11642 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11643 }
11644 }
11645
11646 next_offset += envelope_size;
11647
11648 while next_offset < end_offset {
11650 _next_ordinal_to_read += 1;
11651 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11652 next_offset += envelope_size;
11653 }
11654
11655 Ok(())
11656 }
11657 }
11658
11659 impl CapabilityStoreDirConnectorOpenRequest {
11660 #[inline(always)]
11661 fn max_ordinal_present(&self) -> u64 {
11662 if let Some(_) = self.path {
11663 return 4;
11664 }
11665 if let Some(_) = self.flags {
11666 return 3;
11667 }
11668 if let Some(_) = self.server_end {
11669 return 2;
11670 }
11671 if let Some(_) = self.id {
11672 return 1;
11673 }
11674 0
11675 }
11676 }
11677
11678 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorOpenRequest {
11679 type Borrowed<'a> = &'a mut Self;
11680 fn take_or_borrow<'a>(
11681 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11682 ) -> Self::Borrowed<'a> {
11683 value
11684 }
11685 }
11686
11687 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorOpenRequest {
11688 type Owned = Self;
11689
11690 #[inline(always)]
11691 fn inline_align(_context: fidl::encoding::Context) -> usize {
11692 8
11693 }
11694
11695 #[inline(always)]
11696 fn inline_size(_context: fidl::encoding::Context) -> usize {
11697 16
11698 }
11699 }
11700
11701 unsafe impl
11702 fidl::encoding::Encode<
11703 CapabilityStoreDirConnectorOpenRequest,
11704 fdomain_client::fidl::FDomainResourceDialect,
11705 > for &mut CapabilityStoreDirConnectorOpenRequest
11706 {
11707 unsafe fn encode(
11708 self,
11709 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11710 offset: usize,
11711 mut depth: fidl::encoding::Depth,
11712 ) -> fidl::Result<()> {
11713 encoder.debug_check_bounds::<CapabilityStoreDirConnectorOpenRequest>(offset);
11714 let max_ordinal: u64 = self.max_ordinal_present();
11716 encoder.write_num(max_ordinal, offset);
11717 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11718 if max_ordinal == 0 {
11720 return Ok(());
11721 }
11722 depth.increment()?;
11723 let envelope_size = 8;
11724 let bytes_len = max_ordinal as usize * envelope_size;
11725 #[allow(unused_variables)]
11726 let offset = encoder.out_of_line_offset(bytes_len);
11727 let mut _prev_end_offset: usize = 0;
11728 if 1 > max_ordinal {
11729 return Ok(());
11730 }
11731
11732 let cur_offset: usize = (1 - 1) * envelope_size;
11735
11736 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11738
11739 fidl::encoding::encode_in_envelope_optional::<
11744 u64,
11745 fdomain_client::fidl::FDomainResourceDialect,
11746 >(
11747 self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
11748 encoder,
11749 offset + cur_offset,
11750 depth,
11751 )?;
11752
11753 _prev_end_offset = cur_offset + envelope_size;
11754 if 2 > max_ordinal {
11755 return Ok(());
11756 }
11757
11758 let cur_offset: usize = (2 - 1) * envelope_size;
11761
11762 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11764
11765 fidl::encoding::encode_in_envelope_optional::<
11770 fidl::encoding::Endpoint<
11771 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11772 >,
11773 fdomain_client::fidl::FDomainResourceDialect,
11774 >(
11775 self.server_end.as_mut().map(
11776 <fidl::encoding::Endpoint<
11777 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11778 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11779 ),
11780 encoder,
11781 offset + cur_offset,
11782 depth,
11783 )?;
11784
11785 _prev_end_offset = cur_offset + envelope_size;
11786 if 3 > max_ordinal {
11787 return Ok(());
11788 }
11789
11790 let cur_offset: usize = (3 - 1) * envelope_size;
11793
11794 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11796
11797 fidl::encoding::encode_in_envelope_optional::<
11802 fdomain_fuchsia_io::Flags,
11803 fdomain_client::fidl::FDomainResourceDialect,
11804 >(
11805 self.flags
11806 .as_ref()
11807 .map(<fdomain_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
11808 encoder,
11809 offset + cur_offset,
11810 depth,
11811 )?;
11812
11813 _prev_end_offset = cur_offset + envelope_size;
11814 if 4 > max_ordinal {
11815 return Ok(());
11816 }
11817
11818 let cur_offset: usize = (4 - 1) * envelope_size;
11821
11822 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11824
11825 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
11830 self.path.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
11831 encoder, offset + cur_offset, depth
11832 )?;
11833
11834 _prev_end_offset = cur_offset + envelope_size;
11835
11836 Ok(())
11837 }
11838 }
11839
11840 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11841 for CapabilityStoreDirConnectorOpenRequest
11842 {
11843 #[inline(always)]
11844 fn new_empty() -> Self {
11845 Self::default()
11846 }
11847
11848 unsafe fn decode(
11849 &mut self,
11850 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11851 offset: usize,
11852 mut depth: fidl::encoding::Depth,
11853 ) -> fidl::Result<()> {
11854 decoder.debug_check_bounds::<Self>(offset);
11855 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11856 None => return Err(fidl::Error::NotNullable),
11857 Some(len) => len,
11858 };
11859 if len == 0 {
11861 return Ok(());
11862 };
11863 depth.increment()?;
11864 let envelope_size = 8;
11865 let bytes_len = len * envelope_size;
11866 let offset = decoder.out_of_line_offset(bytes_len)?;
11867 let mut _next_ordinal_to_read = 0;
11869 let mut next_offset = offset;
11870 let end_offset = offset + bytes_len;
11871 _next_ordinal_to_read += 1;
11872 if next_offset >= end_offset {
11873 return Ok(());
11874 }
11875
11876 while _next_ordinal_to_read < 1 {
11878 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11879 _next_ordinal_to_read += 1;
11880 next_offset += envelope_size;
11881 }
11882
11883 let next_out_of_line = decoder.next_out_of_line();
11884 let handles_before = decoder.remaining_handles();
11885 if let Some((inlined, num_bytes, num_handles)) =
11886 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11887 {
11888 let member_inline_size =
11889 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11890 if inlined != (member_inline_size <= 4) {
11891 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11892 }
11893 let inner_offset;
11894 let mut inner_depth = depth.clone();
11895 if inlined {
11896 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11897 inner_offset = next_offset;
11898 } else {
11899 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11900 inner_depth.increment()?;
11901 }
11902 let val_ref = self.id.get_or_insert_with(|| {
11903 fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect)
11904 });
11905 fidl::decode!(
11906 u64,
11907 fdomain_client::fidl::FDomainResourceDialect,
11908 val_ref,
11909 decoder,
11910 inner_offset,
11911 inner_depth
11912 )?;
11913 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11914 {
11915 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11916 }
11917 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11918 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11919 }
11920 }
11921
11922 next_offset += envelope_size;
11923 _next_ordinal_to_read += 1;
11924 if next_offset >= end_offset {
11925 return Ok(());
11926 }
11927
11928 while _next_ordinal_to_read < 2 {
11930 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11931 _next_ordinal_to_read += 1;
11932 next_offset += envelope_size;
11933 }
11934
11935 let next_out_of_line = decoder.next_out_of_line();
11936 let handles_before = decoder.remaining_handles();
11937 if let Some((inlined, num_bytes, num_handles)) =
11938 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11939 {
11940 let member_inline_size = <fidl::encoding::Endpoint<
11941 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11942 > as fidl::encoding::TypeMarker>::inline_size(
11943 decoder.context
11944 );
11945 if inlined != (member_inline_size <= 4) {
11946 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11947 }
11948 let inner_offset;
11949 let mut inner_depth = depth.clone();
11950 if inlined {
11951 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11952 inner_offset = next_offset;
11953 } else {
11954 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11955 inner_depth.increment()?;
11956 }
11957 let val_ref = self.server_end.get_or_insert_with(|| {
11958 fidl::new_empty!(
11959 fidl::encoding::Endpoint<
11960 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11961 >,
11962 fdomain_client::fidl::FDomainResourceDialect
11963 )
11964 });
11965 fidl::decode!(
11966 fidl::encoding::Endpoint<
11967 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11968 >,
11969 fdomain_client::fidl::FDomainResourceDialect,
11970 val_ref,
11971 decoder,
11972 inner_offset,
11973 inner_depth
11974 )?;
11975 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11976 {
11977 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11978 }
11979 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11980 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11981 }
11982 }
11983
11984 next_offset += envelope_size;
11985 _next_ordinal_to_read += 1;
11986 if next_offset >= end_offset {
11987 return Ok(());
11988 }
11989
11990 while _next_ordinal_to_read < 3 {
11992 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11993 _next_ordinal_to_read += 1;
11994 next_offset += envelope_size;
11995 }
11996
11997 let next_out_of_line = decoder.next_out_of_line();
11998 let handles_before = decoder.remaining_handles();
11999 if let Some((inlined, num_bytes, num_handles)) =
12000 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12001 {
12002 let member_inline_size =
12003 <fdomain_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
12004 decoder.context,
12005 );
12006 if inlined != (member_inline_size <= 4) {
12007 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12008 }
12009 let inner_offset;
12010 let mut inner_depth = depth.clone();
12011 if inlined {
12012 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12013 inner_offset = next_offset;
12014 } else {
12015 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12016 inner_depth.increment()?;
12017 }
12018 let val_ref = self.flags.get_or_insert_with(|| {
12019 fidl::new_empty!(
12020 fdomain_fuchsia_io::Flags,
12021 fdomain_client::fidl::FDomainResourceDialect
12022 )
12023 });
12024 fidl::decode!(
12025 fdomain_fuchsia_io::Flags,
12026 fdomain_client::fidl::FDomainResourceDialect,
12027 val_ref,
12028 decoder,
12029 inner_offset,
12030 inner_depth
12031 )?;
12032 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12033 {
12034 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12035 }
12036 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12037 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12038 }
12039 }
12040
12041 next_offset += envelope_size;
12042 _next_ordinal_to_read += 1;
12043 if next_offset >= end_offset {
12044 return Ok(());
12045 }
12046
12047 while _next_ordinal_to_read < 4 {
12049 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12050 _next_ordinal_to_read += 1;
12051 next_offset += envelope_size;
12052 }
12053
12054 let next_out_of_line = decoder.next_out_of_line();
12055 let handles_before = decoder.remaining_handles();
12056 if let Some((inlined, num_bytes, num_handles)) =
12057 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12058 {
12059 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12060 if inlined != (member_inline_size <= 4) {
12061 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12062 }
12063 let inner_offset;
12064 let mut inner_depth = depth.clone();
12065 if inlined {
12066 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12067 inner_offset = next_offset;
12068 } else {
12069 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12070 inner_depth.increment()?;
12071 }
12072 let val_ref = self.path.get_or_insert_with(|| {
12073 fidl::new_empty!(
12074 fidl::encoding::BoundedString<4095>,
12075 fdomain_client::fidl::FDomainResourceDialect
12076 )
12077 });
12078 fidl::decode!(
12079 fidl::encoding::BoundedString<4095>,
12080 fdomain_client::fidl::FDomainResourceDialect,
12081 val_ref,
12082 decoder,
12083 inner_offset,
12084 inner_depth
12085 )?;
12086 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12087 {
12088 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12089 }
12090 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12091 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12092 }
12093 }
12094
12095 next_offset += envelope_size;
12096
12097 while next_offset < end_offset {
12099 _next_ordinal_to_read += 1;
12100 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12101 next_offset += envelope_size;
12102 }
12103
12104 Ok(())
12105 }
12106 }
12107
12108 impl DirReceiverReceiveRequest {
12109 #[inline(always)]
12110 fn max_ordinal_present(&self) -> u64 {
12111 if let Some(_) = self.subdir {
12112 return 3;
12113 }
12114 if let Some(_) = self.flags {
12115 return 2;
12116 }
12117 if let Some(_) = self.channel {
12118 return 1;
12119 }
12120 0
12121 }
12122 }
12123
12124 impl fidl::encoding::ResourceTypeMarker for DirReceiverReceiveRequest {
12125 type Borrowed<'a> = &'a mut Self;
12126 fn take_or_borrow<'a>(
12127 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12128 ) -> Self::Borrowed<'a> {
12129 value
12130 }
12131 }
12132
12133 unsafe impl fidl::encoding::TypeMarker for DirReceiverReceiveRequest {
12134 type Owned = Self;
12135
12136 #[inline(always)]
12137 fn inline_align(_context: fidl::encoding::Context) -> usize {
12138 8
12139 }
12140
12141 #[inline(always)]
12142 fn inline_size(_context: fidl::encoding::Context) -> usize {
12143 16
12144 }
12145 }
12146
12147 unsafe impl
12148 fidl::encoding::Encode<
12149 DirReceiverReceiveRequest,
12150 fdomain_client::fidl::FDomainResourceDialect,
12151 > for &mut DirReceiverReceiveRequest
12152 {
12153 unsafe fn encode(
12154 self,
12155 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12156 offset: usize,
12157 mut depth: fidl::encoding::Depth,
12158 ) -> fidl::Result<()> {
12159 encoder.debug_check_bounds::<DirReceiverReceiveRequest>(offset);
12160 let max_ordinal: u64 = self.max_ordinal_present();
12162 encoder.write_num(max_ordinal, offset);
12163 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12164 if max_ordinal == 0 {
12166 return Ok(());
12167 }
12168 depth.increment()?;
12169 let envelope_size = 8;
12170 let bytes_len = max_ordinal as usize * envelope_size;
12171 #[allow(unused_variables)]
12172 let offset = encoder.out_of_line_offset(bytes_len);
12173 let mut _prev_end_offset: usize = 0;
12174 if 1 > max_ordinal {
12175 return Ok(());
12176 }
12177
12178 let cur_offset: usize = (1 - 1) * envelope_size;
12181
12182 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12184
12185 fidl::encoding::encode_in_envelope_optional::<
12190 fidl::encoding::HandleType<
12191 fdomain_client::Channel,
12192 { fidl::ObjectType::CHANNEL.into_raw() },
12193 2147483648,
12194 >,
12195 fdomain_client::fidl::FDomainResourceDialect,
12196 >(
12197 self.channel.as_mut().map(
12198 <fidl::encoding::HandleType<
12199 fdomain_client::Channel,
12200 { fidl::ObjectType::CHANNEL.into_raw() },
12201 2147483648,
12202 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12203 ),
12204 encoder,
12205 offset + cur_offset,
12206 depth,
12207 )?;
12208
12209 _prev_end_offset = cur_offset + envelope_size;
12210 if 2 > max_ordinal {
12211 return Ok(());
12212 }
12213
12214 let cur_offset: usize = (2 - 1) * envelope_size;
12217
12218 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12220
12221 fidl::encoding::encode_in_envelope_optional::<
12226 fdomain_fuchsia_io::Flags,
12227 fdomain_client::fidl::FDomainResourceDialect,
12228 >(
12229 self.flags
12230 .as_ref()
12231 .map(<fdomain_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
12232 encoder,
12233 offset + cur_offset,
12234 depth,
12235 )?;
12236
12237 _prev_end_offset = cur_offset + envelope_size;
12238 if 3 > max_ordinal {
12239 return Ok(());
12240 }
12241
12242 let cur_offset: usize = (3 - 1) * envelope_size;
12245
12246 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12248
12249 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
12254 self.subdir.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
12255 encoder, offset + cur_offset, depth
12256 )?;
12257
12258 _prev_end_offset = cur_offset + envelope_size;
12259
12260 Ok(())
12261 }
12262 }
12263
12264 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
12265 for DirReceiverReceiveRequest
12266 {
12267 #[inline(always)]
12268 fn new_empty() -> Self {
12269 Self::default()
12270 }
12271
12272 unsafe fn decode(
12273 &mut self,
12274 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12275 offset: usize,
12276 mut depth: fidl::encoding::Depth,
12277 ) -> fidl::Result<()> {
12278 decoder.debug_check_bounds::<Self>(offset);
12279 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12280 None => return Err(fidl::Error::NotNullable),
12281 Some(len) => len,
12282 };
12283 if len == 0 {
12285 return Ok(());
12286 };
12287 depth.increment()?;
12288 let envelope_size = 8;
12289 let bytes_len = len * envelope_size;
12290 let offset = decoder.out_of_line_offset(bytes_len)?;
12291 let mut _next_ordinal_to_read = 0;
12293 let mut next_offset = offset;
12294 let end_offset = offset + bytes_len;
12295 _next_ordinal_to_read += 1;
12296 if next_offset >= end_offset {
12297 return Ok(());
12298 }
12299
12300 while _next_ordinal_to_read < 1 {
12302 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12303 _next_ordinal_to_read += 1;
12304 next_offset += envelope_size;
12305 }
12306
12307 let next_out_of_line = decoder.next_out_of_line();
12308 let handles_before = decoder.remaining_handles();
12309 if let Some((inlined, num_bytes, num_handles)) =
12310 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12311 {
12312 let member_inline_size = <fidl::encoding::HandleType<
12313 fdomain_client::Channel,
12314 { fidl::ObjectType::CHANNEL.into_raw() },
12315 2147483648,
12316 > as fidl::encoding::TypeMarker>::inline_size(
12317 decoder.context
12318 );
12319 if inlined != (member_inline_size <= 4) {
12320 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12321 }
12322 let inner_offset;
12323 let mut inner_depth = depth.clone();
12324 if inlined {
12325 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12326 inner_offset = next_offset;
12327 } else {
12328 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12329 inner_depth.increment()?;
12330 }
12331 let val_ref =
12332 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));
12333 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)?;
12334 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12335 {
12336 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12337 }
12338 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12339 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12340 }
12341 }
12342
12343 next_offset += envelope_size;
12344 _next_ordinal_to_read += 1;
12345 if next_offset >= end_offset {
12346 return Ok(());
12347 }
12348
12349 while _next_ordinal_to_read < 2 {
12351 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12352 _next_ordinal_to_read += 1;
12353 next_offset += envelope_size;
12354 }
12355
12356 let next_out_of_line = decoder.next_out_of_line();
12357 let handles_before = decoder.remaining_handles();
12358 if let Some((inlined, num_bytes, num_handles)) =
12359 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12360 {
12361 let member_inline_size =
12362 <fdomain_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
12363 decoder.context,
12364 );
12365 if inlined != (member_inline_size <= 4) {
12366 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12367 }
12368 let inner_offset;
12369 let mut inner_depth = depth.clone();
12370 if inlined {
12371 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12372 inner_offset = next_offset;
12373 } else {
12374 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12375 inner_depth.increment()?;
12376 }
12377 let val_ref = self.flags.get_or_insert_with(|| {
12378 fidl::new_empty!(
12379 fdomain_fuchsia_io::Flags,
12380 fdomain_client::fidl::FDomainResourceDialect
12381 )
12382 });
12383 fidl::decode!(
12384 fdomain_fuchsia_io::Flags,
12385 fdomain_client::fidl::FDomainResourceDialect,
12386 val_ref,
12387 decoder,
12388 inner_offset,
12389 inner_depth
12390 )?;
12391 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12392 {
12393 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12394 }
12395 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12396 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12397 }
12398 }
12399
12400 next_offset += envelope_size;
12401 _next_ordinal_to_read += 1;
12402 if next_offset >= end_offset {
12403 return Ok(());
12404 }
12405
12406 while _next_ordinal_to_read < 3 {
12408 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12409 _next_ordinal_to_read += 1;
12410 next_offset += envelope_size;
12411 }
12412
12413 let next_out_of_line = decoder.next_out_of_line();
12414 let handles_before = decoder.remaining_handles();
12415 if let Some((inlined, num_bytes, num_handles)) =
12416 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12417 {
12418 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12419 if inlined != (member_inline_size <= 4) {
12420 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12421 }
12422 let inner_offset;
12423 let mut inner_depth = depth.clone();
12424 if inlined {
12425 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12426 inner_offset = next_offset;
12427 } else {
12428 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12429 inner_depth.increment()?;
12430 }
12431 let val_ref = self.subdir.get_or_insert_with(|| {
12432 fidl::new_empty!(
12433 fidl::encoding::BoundedString<4095>,
12434 fdomain_client::fidl::FDomainResourceDialect
12435 )
12436 });
12437 fidl::decode!(
12438 fidl::encoding::BoundedString<4095>,
12439 fdomain_client::fidl::FDomainResourceDialect,
12440 val_ref,
12441 decoder,
12442 inner_offset,
12443 inner_depth
12444 )?;
12445 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12446 {
12447 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12448 }
12449 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12450 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12451 }
12452 }
12453
12454 next_offset += envelope_size;
12455
12456 while next_offset < end_offset {
12458 _next_ordinal_to_read += 1;
12459 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12460 next_offset += envelope_size;
12461 }
12462
12463 Ok(())
12464 }
12465 }
12466
12467 impl RouteRequest {
12468 #[inline(always)]
12469 fn max_ordinal_present(&self) -> u64 {
12470 if let Some(_) = self.metadata {
12471 return 2;
12472 }
12473 if let Some(_) = self.requesting {
12474 return 1;
12475 }
12476 0
12477 }
12478 }
12479
12480 impl fidl::encoding::ResourceTypeMarker for RouteRequest {
12481 type Borrowed<'a> = &'a mut Self;
12482 fn take_or_borrow<'a>(
12483 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12484 ) -> Self::Borrowed<'a> {
12485 value
12486 }
12487 }
12488
12489 unsafe impl fidl::encoding::TypeMarker for RouteRequest {
12490 type Owned = Self;
12491
12492 #[inline(always)]
12493 fn inline_align(_context: fidl::encoding::Context) -> usize {
12494 8
12495 }
12496
12497 #[inline(always)]
12498 fn inline_size(_context: fidl::encoding::Context) -> usize {
12499 16
12500 }
12501 }
12502
12503 unsafe impl fidl::encoding::Encode<RouteRequest, fdomain_client::fidl::FDomainResourceDialect>
12504 for &mut RouteRequest
12505 {
12506 unsafe fn encode(
12507 self,
12508 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12509 offset: usize,
12510 mut depth: fidl::encoding::Depth,
12511 ) -> fidl::Result<()> {
12512 encoder.debug_check_bounds::<RouteRequest>(offset);
12513 let max_ordinal: u64 = self.max_ordinal_present();
12515 encoder.write_num(max_ordinal, offset);
12516 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12517 if max_ordinal == 0 {
12519 return Ok(());
12520 }
12521 depth.increment()?;
12522 let envelope_size = 8;
12523 let bytes_len = max_ordinal as usize * envelope_size;
12524 #[allow(unused_variables)]
12525 let offset = encoder.out_of_line_offset(bytes_len);
12526 let mut _prev_end_offset: usize = 0;
12527 if 1 > max_ordinal {
12528 return Ok(());
12529 }
12530
12531 let cur_offset: usize = (1 - 1) * envelope_size;
12534
12535 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12537
12538 fidl::encoding::encode_in_envelope_optional::<
12543 InstanceToken,
12544 fdomain_client::fidl::FDomainResourceDialect,
12545 >(
12546 self.requesting
12547 .as_mut()
12548 .map(<InstanceToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12549 encoder,
12550 offset + cur_offset,
12551 depth,
12552 )?;
12553
12554 _prev_end_offset = cur_offset + envelope_size;
12555 if 2 > max_ordinal {
12556 return Ok(());
12557 }
12558
12559 let cur_offset: usize = (2 - 1) * envelope_size;
12562
12563 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12565
12566 fidl::encoding::encode_in_envelope_optional::<
12571 DictionaryRef,
12572 fdomain_client::fidl::FDomainResourceDialect,
12573 >(
12574 self.metadata
12575 .as_mut()
12576 .map(<DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12577 encoder,
12578 offset + cur_offset,
12579 depth,
12580 )?;
12581
12582 _prev_end_offset = cur_offset + envelope_size;
12583
12584 Ok(())
12585 }
12586 }
12587
12588 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for RouteRequest {
12589 #[inline(always)]
12590 fn new_empty() -> Self {
12591 Self::default()
12592 }
12593
12594 unsafe fn decode(
12595 &mut self,
12596 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12597 offset: usize,
12598 mut depth: fidl::encoding::Depth,
12599 ) -> fidl::Result<()> {
12600 decoder.debug_check_bounds::<Self>(offset);
12601 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12602 None => return Err(fidl::Error::NotNullable),
12603 Some(len) => len,
12604 };
12605 if len == 0 {
12607 return Ok(());
12608 };
12609 depth.increment()?;
12610 let envelope_size = 8;
12611 let bytes_len = len * envelope_size;
12612 let offset = decoder.out_of_line_offset(bytes_len)?;
12613 let mut _next_ordinal_to_read = 0;
12615 let mut next_offset = offset;
12616 let end_offset = offset + bytes_len;
12617 _next_ordinal_to_read += 1;
12618 if next_offset >= end_offset {
12619 return Ok(());
12620 }
12621
12622 while _next_ordinal_to_read < 1 {
12624 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12625 _next_ordinal_to_read += 1;
12626 next_offset += envelope_size;
12627 }
12628
12629 let next_out_of_line = decoder.next_out_of_line();
12630 let handles_before = decoder.remaining_handles();
12631 if let Some((inlined, num_bytes, num_handles)) =
12632 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12633 {
12634 let member_inline_size =
12635 <InstanceToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12636 if inlined != (member_inline_size <= 4) {
12637 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12638 }
12639 let inner_offset;
12640 let mut inner_depth = depth.clone();
12641 if inlined {
12642 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12643 inner_offset = next_offset;
12644 } else {
12645 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12646 inner_depth.increment()?;
12647 }
12648 let val_ref = self.requesting.get_or_insert_with(|| {
12649 fidl::new_empty!(InstanceToken, fdomain_client::fidl::FDomainResourceDialect)
12650 });
12651 fidl::decode!(
12652 InstanceToken,
12653 fdomain_client::fidl::FDomainResourceDialect,
12654 val_ref,
12655 decoder,
12656 inner_offset,
12657 inner_depth
12658 )?;
12659 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12660 {
12661 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12662 }
12663 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12664 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12665 }
12666 }
12667
12668 next_offset += envelope_size;
12669 _next_ordinal_to_read += 1;
12670 if next_offset >= end_offset {
12671 return Ok(());
12672 }
12673
12674 while _next_ordinal_to_read < 2 {
12676 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12677 _next_ordinal_to_read += 1;
12678 next_offset += envelope_size;
12679 }
12680
12681 let next_out_of_line = decoder.next_out_of_line();
12682 let handles_before = decoder.remaining_handles();
12683 if let Some((inlined, num_bytes, num_handles)) =
12684 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12685 {
12686 let member_inline_size =
12687 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12688 if inlined != (member_inline_size <= 4) {
12689 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12690 }
12691 let inner_offset;
12692 let mut inner_depth = depth.clone();
12693 if inlined {
12694 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12695 inner_offset = next_offset;
12696 } else {
12697 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12698 inner_depth.increment()?;
12699 }
12700 let val_ref = self.metadata.get_or_insert_with(|| {
12701 fidl::new_empty!(DictionaryRef, fdomain_client::fidl::FDomainResourceDialect)
12702 });
12703 fidl::decode!(
12704 DictionaryRef,
12705 fdomain_client::fidl::FDomainResourceDialect,
12706 val_ref,
12707 decoder,
12708 inner_offset,
12709 inner_depth
12710 )?;
12711 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12712 {
12713 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12714 }
12715 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12716 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12717 }
12718 }
12719
12720 next_offset += envelope_size;
12721
12722 while next_offset < end_offset {
12724 _next_ordinal_to_read += 1;
12725 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12726 next_offset += envelope_size;
12727 }
12728
12729 Ok(())
12730 }
12731 }
12732
12733 impl fidl::encoding::ResourceTypeMarker for Capability {
12734 type Borrowed<'a> = &'a mut Self;
12735 fn take_or_borrow<'a>(
12736 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12737 ) -> Self::Borrowed<'a> {
12738 value
12739 }
12740 }
12741
12742 unsafe impl fidl::encoding::TypeMarker for Capability {
12743 type Owned = Self;
12744
12745 #[inline(always)]
12746 fn inline_align(_context: fidl::encoding::Context) -> usize {
12747 8
12748 }
12749
12750 #[inline(always)]
12751 fn inline_size(_context: fidl::encoding::Context) -> usize {
12752 16
12753 }
12754 }
12755
12756 unsafe impl fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>
12757 for &mut Capability
12758 {
12759 #[inline]
12760 unsafe fn encode(
12761 self,
12762 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12763 offset: usize,
12764 _depth: fidl::encoding::Depth,
12765 ) -> fidl::Result<()> {
12766 encoder.debug_check_bounds::<Capability>(offset);
12767 encoder.write_num::<u64>(self.ordinal(), offset);
12768 match self {
12769 Capability::Unit(ref val) => {
12770 fidl::encoding::encode_in_envelope::<Unit, fdomain_client::fidl::FDomainResourceDialect>(
12771 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
12772 encoder, offset + 8, _depth
12773 )
12774 }
12775 Capability::Handle(ref mut val) => {
12776 fidl::encoding::encode_in_envelope::<fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect>(
12777 <fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12778 encoder, offset + 8, _depth
12779 )
12780 }
12781 Capability::Data(ref val) => {
12782 fidl::encoding::encode_in_envelope::<Data, fdomain_client::fidl::FDomainResourceDialect>(
12783 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
12784 encoder, offset + 8, _depth
12785 )
12786 }
12787 Capability::Dictionary(ref mut val) => {
12788 fidl::encoding::encode_in_envelope::<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>(
12789 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12790 encoder, offset + 8, _depth
12791 )
12792 }
12793 Capability::Connector(ref mut val) => {
12794 fidl::encoding::encode_in_envelope::<Connector, fdomain_client::fidl::FDomainResourceDialect>(
12795 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12796 encoder, offset + 8, _depth
12797 )
12798 }
12799 Capability::DirConnector(ref mut val) => {
12800 fidl::encoding::encode_in_envelope::<DirConnector, fdomain_client::fidl::FDomainResourceDialect>(
12801 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12802 encoder, offset + 8, _depth
12803 )
12804 }
12805 Capability::Directory(ref mut val) => {
12806 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12807 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12808 encoder, offset + 8, _depth
12809 )
12810 }
12811 Capability::DirEntry(ref mut val) => {
12812 fidl::encoding::encode_in_envelope::<DirEntry, fdomain_client::fidl::FDomainResourceDialect>(
12813 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12814 encoder, offset + 8, _depth
12815 )
12816 }
12817 Capability::ConnectorRouter(ref mut val) => {
12818 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12819 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12820 encoder, offset + 8, _depth
12821 )
12822 }
12823 Capability::DictionaryRouter(ref mut val) => {
12824 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12825 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12826 encoder, offset + 8, _depth
12827 )
12828 }
12829 Capability::DirEntryRouter(ref mut val) => {
12830 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12831 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12832 encoder, offset + 8, _depth
12833 )
12834 }
12835 Capability::DataRouter(ref mut val) => {
12836 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DataRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12837 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DataRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12838 encoder, offset + 8, _depth
12839 )
12840 }
12841 Capability::DirConnectorRouter(ref mut val) => {
12842 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12843 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12844 encoder, offset + 8, _depth
12845 )
12846 }
12847 Capability::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
12848 }
12849 }
12850 }
12851
12852 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Capability {
12853 #[inline(always)]
12854 fn new_empty() -> Self {
12855 Self::__SourceBreaking { unknown_ordinal: 0 }
12856 }
12857
12858 #[inline]
12859 unsafe fn decode(
12860 &mut self,
12861 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12862 offset: usize,
12863 mut depth: fidl::encoding::Depth,
12864 ) -> fidl::Result<()> {
12865 decoder.debug_check_bounds::<Self>(offset);
12866 #[allow(unused_variables)]
12867 let next_out_of_line = decoder.next_out_of_line();
12868 let handles_before = decoder.remaining_handles();
12869 let (ordinal, inlined, num_bytes, num_handles) =
12870 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12871
12872 let member_inline_size =
12873 match ordinal {
12874 1 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12875 2 => <fidl::encoding::HandleType<
12876 fdomain_client::NullableHandle,
12877 { fidl::ObjectType::NONE.into_raw() },
12878 2147483648,
12879 > as fidl::encoding::TypeMarker>::inline_size(
12880 decoder.context
12881 ),
12882 3 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12883 4 => {
12884 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context)
12885 }
12886 5 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12887 6 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12888 7 => <fidl::encoding::Endpoint<
12889 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
12890 > as fidl::encoding::TypeMarker>::inline_size(
12891 decoder.context
12892 ),
12893 8 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12894 9 => <fidl::encoding::Endpoint<
12895 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
12896 > as fidl::encoding::TypeMarker>::inline_size(
12897 decoder.context
12898 ),
12899 10 => <fidl::encoding::Endpoint<
12900 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
12901 > as fidl::encoding::TypeMarker>::inline_size(
12902 decoder.context
12903 ),
12904 11 => <fidl::encoding::Endpoint<
12905 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
12906 > as fidl::encoding::TypeMarker>::inline_size(
12907 decoder.context
12908 ),
12909 12 => <fidl::encoding::Endpoint<
12910 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
12911 > as fidl::encoding::TypeMarker>::inline_size(
12912 decoder.context
12913 ),
12914 13 => <fidl::encoding::Endpoint<
12915 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
12916 > as fidl::encoding::TypeMarker>::inline_size(
12917 decoder.context
12918 ),
12919 0 => return Err(fidl::Error::UnknownUnionTag),
12920 _ => num_bytes as usize,
12921 };
12922
12923 if inlined != (member_inline_size <= 4) {
12924 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12925 }
12926 let _inner_offset;
12927 if inlined {
12928 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12929 _inner_offset = offset + 8;
12930 } else {
12931 depth.increment()?;
12932 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12933 }
12934 match ordinal {
12935 1 => {
12936 #[allow(irrefutable_let_patterns)]
12937 if let Capability::Unit(_) = self {
12938 } else {
12940 *self = Capability::Unit(fidl::new_empty!(
12942 Unit,
12943 fdomain_client::fidl::FDomainResourceDialect
12944 ));
12945 }
12946 #[allow(irrefutable_let_patterns)]
12947 if let Capability::Unit(ref mut val) = self {
12948 fidl::decode!(
12949 Unit,
12950 fdomain_client::fidl::FDomainResourceDialect,
12951 val,
12952 decoder,
12953 _inner_offset,
12954 depth
12955 )?;
12956 } else {
12957 unreachable!()
12958 }
12959 }
12960 2 => {
12961 #[allow(irrefutable_let_patterns)]
12962 if let Capability::Handle(_) = self {
12963 } else {
12965 *self = Capability::Handle(
12967 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
12968 );
12969 }
12970 #[allow(irrefutable_let_patterns)]
12971 if let Capability::Handle(ref mut val) = self {
12972 fidl::decode!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
12973 } else {
12974 unreachable!()
12975 }
12976 }
12977 3 => {
12978 #[allow(irrefutable_let_patterns)]
12979 if let Capability::Data(_) = self {
12980 } else {
12982 *self = Capability::Data(fidl::new_empty!(
12984 Data,
12985 fdomain_client::fidl::FDomainResourceDialect
12986 ));
12987 }
12988 #[allow(irrefutable_let_patterns)]
12989 if let Capability::Data(ref mut val) = self {
12990 fidl::decode!(
12991 Data,
12992 fdomain_client::fidl::FDomainResourceDialect,
12993 val,
12994 decoder,
12995 _inner_offset,
12996 depth
12997 )?;
12998 } else {
12999 unreachable!()
13000 }
13001 }
13002 4 => {
13003 #[allow(irrefutable_let_patterns)]
13004 if let Capability::Dictionary(_) = self {
13005 } else {
13007 *self = Capability::Dictionary(fidl::new_empty!(
13009 DictionaryRef,
13010 fdomain_client::fidl::FDomainResourceDialect
13011 ));
13012 }
13013 #[allow(irrefutable_let_patterns)]
13014 if let Capability::Dictionary(ref mut val) = self {
13015 fidl::decode!(
13016 DictionaryRef,
13017 fdomain_client::fidl::FDomainResourceDialect,
13018 val,
13019 decoder,
13020 _inner_offset,
13021 depth
13022 )?;
13023 } else {
13024 unreachable!()
13025 }
13026 }
13027 5 => {
13028 #[allow(irrefutable_let_patterns)]
13029 if let Capability::Connector(_) = self {
13030 } else {
13032 *self = Capability::Connector(fidl::new_empty!(
13034 Connector,
13035 fdomain_client::fidl::FDomainResourceDialect
13036 ));
13037 }
13038 #[allow(irrefutable_let_patterns)]
13039 if let Capability::Connector(ref mut val) = self {
13040 fidl::decode!(
13041 Connector,
13042 fdomain_client::fidl::FDomainResourceDialect,
13043 val,
13044 decoder,
13045 _inner_offset,
13046 depth
13047 )?;
13048 } else {
13049 unreachable!()
13050 }
13051 }
13052 6 => {
13053 #[allow(irrefutable_let_patterns)]
13054 if let Capability::DirConnector(_) = self {
13055 } else {
13057 *self = Capability::DirConnector(fidl::new_empty!(
13059 DirConnector,
13060 fdomain_client::fidl::FDomainResourceDialect
13061 ));
13062 }
13063 #[allow(irrefutable_let_patterns)]
13064 if let Capability::DirConnector(ref mut val) = self {
13065 fidl::decode!(
13066 DirConnector,
13067 fdomain_client::fidl::FDomainResourceDialect,
13068 val,
13069 decoder,
13070 _inner_offset,
13071 depth
13072 )?;
13073 } else {
13074 unreachable!()
13075 }
13076 }
13077 7 => {
13078 #[allow(irrefutable_let_patterns)]
13079 if let Capability::Directory(_) = self {
13080 } else {
13082 *self = Capability::Directory(fidl::new_empty!(
13084 fidl::encoding::Endpoint<
13085 fdomain_client::fidl::ClientEnd<
13086 fdomain_fuchsia_io::DirectoryMarker,
13087 >,
13088 >,
13089 fdomain_client::fidl::FDomainResourceDialect
13090 ));
13091 }
13092 #[allow(irrefutable_let_patterns)]
13093 if let Capability::Directory(ref mut val) = self {
13094 fidl::decode!(
13095 fidl::encoding::Endpoint<
13096 fdomain_client::fidl::ClientEnd<
13097 fdomain_fuchsia_io::DirectoryMarker,
13098 >,
13099 >,
13100 fdomain_client::fidl::FDomainResourceDialect,
13101 val,
13102 decoder,
13103 _inner_offset,
13104 depth
13105 )?;
13106 } else {
13107 unreachable!()
13108 }
13109 }
13110 8 => {
13111 #[allow(irrefutable_let_patterns)]
13112 if let Capability::DirEntry(_) = self {
13113 } else {
13115 *self = Capability::DirEntry(fidl::new_empty!(
13117 DirEntry,
13118 fdomain_client::fidl::FDomainResourceDialect
13119 ));
13120 }
13121 #[allow(irrefutable_let_patterns)]
13122 if let Capability::DirEntry(ref mut val) = self {
13123 fidl::decode!(
13124 DirEntry,
13125 fdomain_client::fidl::FDomainResourceDialect,
13126 val,
13127 decoder,
13128 _inner_offset,
13129 depth
13130 )?;
13131 } else {
13132 unreachable!()
13133 }
13134 }
13135 9 => {
13136 #[allow(irrefutable_let_patterns)]
13137 if let Capability::ConnectorRouter(_) = self {
13138 } else {
13140 *self = Capability::ConnectorRouter(fidl::new_empty!(
13142 fidl::encoding::Endpoint<
13143 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
13144 >,
13145 fdomain_client::fidl::FDomainResourceDialect
13146 ));
13147 }
13148 #[allow(irrefutable_let_patterns)]
13149 if let Capability::ConnectorRouter(ref mut val) = self {
13150 fidl::decode!(
13151 fidl::encoding::Endpoint<
13152 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
13153 >,
13154 fdomain_client::fidl::FDomainResourceDialect,
13155 val,
13156 decoder,
13157 _inner_offset,
13158 depth
13159 )?;
13160 } else {
13161 unreachable!()
13162 }
13163 }
13164 10 => {
13165 #[allow(irrefutable_let_patterns)]
13166 if let Capability::DictionaryRouter(_) = self {
13167 } else {
13169 *self = Capability::DictionaryRouter(fidl::new_empty!(
13171 fidl::encoding::Endpoint<
13172 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
13173 >,
13174 fdomain_client::fidl::FDomainResourceDialect
13175 ));
13176 }
13177 #[allow(irrefutable_let_patterns)]
13178 if let Capability::DictionaryRouter(ref mut val) = self {
13179 fidl::decode!(
13180 fidl::encoding::Endpoint<
13181 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
13182 >,
13183 fdomain_client::fidl::FDomainResourceDialect,
13184 val,
13185 decoder,
13186 _inner_offset,
13187 depth
13188 )?;
13189 } else {
13190 unreachable!()
13191 }
13192 }
13193 11 => {
13194 #[allow(irrefutable_let_patterns)]
13195 if let Capability::DirEntryRouter(_) = self {
13196 } else {
13198 *self = Capability::DirEntryRouter(fidl::new_empty!(
13200 fidl::encoding::Endpoint<
13201 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
13202 >,
13203 fdomain_client::fidl::FDomainResourceDialect
13204 ));
13205 }
13206 #[allow(irrefutable_let_patterns)]
13207 if let Capability::DirEntryRouter(ref mut val) = self {
13208 fidl::decode!(
13209 fidl::encoding::Endpoint<
13210 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
13211 >,
13212 fdomain_client::fidl::FDomainResourceDialect,
13213 val,
13214 decoder,
13215 _inner_offset,
13216 depth
13217 )?;
13218 } else {
13219 unreachable!()
13220 }
13221 }
13222 12 => {
13223 #[allow(irrefutable_let_patterns)]
13224 if let Capability::DataRouter(_) = self {
13225 } else {
13227 *self = Capability::DataRouter(fidl::new_empty!(
13229 fidl::encoding::Endpoint<
13230 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
13231 >,
13232 fdomain_client::fidl::FDomainResourceDialect
13233 ));
13234 }
13235 #[allow(irrefutable_let_patterns)]
13236 if let Capability::DataRouter(ref mut val) = self {
13237 fidl::decode!(
13238 fidl::encoding::Endpoint<
13239 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
13240 >,
13241 fdomain_client::fidl::FDomainResourceDialect,
13242 val,
13243 decoder,
13244 _inner_offset,
13245 depth
13246 )?;
13247 } else {
13248 unreachable!()
13249 }
13250 }
13251 13 => {
13252 #[allow(irrefutable_let_patterns)]
13253 if let Capability::DirConnectorRouter(_) = self {
13254 } else {
13256 *self = Capability::DirConnectorRouter(fidl::new_empty!(
13258 fidl::encoding::Endpoint<
13259 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
13260 >,
13261 fdomain_client::fidl::FDomainResourceDialect
13262 ));
13263 }
13264 #[allow(irrefutable_let_patterns)]
13265 if let Capability::DirConnectorRouter(ref mut val) = self {
13266 fidl::decode!(
13267 fidl::encoding::Endpoint<
13268 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
13269 >,
13270 fdomain_client::fidl::FDomainResourceDialect,
13271 val,
13272 decoder,
13273 _inner_offset,
13274 depth
13275 )?;
13276 } else {
13277 unreachable!()
13278 }
13279 }
13280 #[allow(deprecated)]
13281 ordinal => {
13282 for _ in 0..num_handles {
13283 decoder.drop_next_handle()?;
13284 }
13285 *self = Capability::__SourceBreaking { unknown_ordinal: ordinal };
13286 }
13287 }
13288 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13289 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13290 }
13291 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13292 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13293 }
13294 Ok(())
13295 }
13296 }
13297
13298 impl fidl::encoding::ResourceTypeMarker for ConnectorRouterRouteResponse {
13299 type Borrowed<'a> = &'a mut Self;
13300 fn take_or_borrow<'a>(
13301 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13302 ) -> Self::Borrowed<'a> {
13303 value
13304 }
13305 }
13306
13307 unsafe impl fidl::encoding::TypeMarker for ConnectorRouterRouteResponse {
13308 type Owned = Self;
13309
13310 #[inline(always)]
13311 fn inline_align(_context: fidl::encoding::Context) -> usize {
13312 8
13313 }
13314
13315 #[inline(always)]
13316 fn inline_size(_context: fidl::encoding::Context) -> usize {
13317 16
13318 }
13319 }
13320
13321 unsafe impl
13322 fidl::encoding::Encode<
13323 ConnectorRouterRouteResponse,
13324 fdomain_client::fidl::FDomainResourceDialect,
13325 > for &mut ConnectorRouterRouteResponse
13326 {
13327 #[inline]
13328 unsafe fn encode(
13329 self,
13330 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13331 offset: usize,
13332 _depth: fidl::encoding::Depth,
13333 ) -> fidl::Result<()> {
13334 encoder.debug_check_bounds::<ConnectorRouterRouteResponse>(offset);
13335 encoder.write_num::<u64>(self.ordinal(), offset);
13336 match self {
13337 ConnectorRouterRouteResponse::Connector(ref mut val) => {
13338 fidl::encoding::encode_in_envelope::<
13339 Connector,
13340 fdomain_client::fidl::FDomainResourceDialect,
13341 >(
13342 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13343 encoder,
13344 offset + 8,
13345 _depth,
13346 )
13347 }
13348 ConnectorRouterRouteResponse::Unavailable(ref val) => {
13349 fidl::encoding::encode_in_envelope::<
13350 Unit,
13351 fdomain_client::fidl::FDomainResourceDialect,
13352 >(
13353 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13354 encoder,
13355 offset + 8,
13356 _depth,
13357 )
13358 }
13359 }
13360 }
13361 }
13362
13363 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13364 for ConnectorRouterRouteResponse
13365 {
13366 #[inline(always)]
13367 fn new_empty() -> Self {
13368 Self::Connector(fidl::new_empty!(
13369 Connector,
13370 fdomain_client::fidl::FDomainResourceDialect
13371 ))
13372 }
13373
13374 #[inline]
13375 unsafe fn decode(
13376 &mut self,
13377 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13378 offset: usize,
13379 mut depth: fidl::encoding::Depth,
13380 ) -> fidl::Result<()> {
13381 decoder.debug_check_bounds::<Self>(offset);
13382 #[allow(unused_variables)]
13383 let next_out_of_line = decoder.next_out_of_line();
13384 let handles_before = decoder.remaining_handles();
13385 let (ordinal, inlined, num_bytes, num_handles) =
13386 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13387
13388 let member_inline_size = match ordinal {
13389 1 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13390 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13391 _ => return Err(fidl::Error::UnknownUnionTag),
13392 };
13393
13394 if inlined != (member_inline_size <= 4) {
13395 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13396 }
13397 let _inner_offset;
13398 if inlined {
13399 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13400 _inner_offset = offset + 8;
13401 } else {
13402 depth.increment()?;
13403 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13404 }
13405 match ordinal {
13406 1 => {
13407 #[allow(irrefutable_let_patterns)]
13408 if let ConnectorRouterRouteResponse::Connector(_) = self {
13409 } else {
13411 *self = ConnectorRouterRouteResponse::Connector(fidl::new_empty!(
13413 Connector,
13414 fdomain_client::fidl::FDomainResourceDialect
13415 ));
13416 }
13417 #[allow(irrefutable_let_patterns)]
13418 if let ConnectorRouterRouteResponse::Connector(ref mut val) = self {
13419 fidl::decode!(
13420 Connector,
13421 fdomain_client::fidl::FDomainResourceDialect,
13422 val,
13423 decoder,
13424 _inner_offset,
13425 depth
13426 )?;
13427 } else {
13428 unreachable!()
13429 }
13430 }
13431 2 => {
13432 #[allow(irrefutable_let_patterns)]
13433 if let ConnectorRouterRouteResponse::Unavailable(_) = self {
13434 } else {
13436 *self = ConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
13438 Unit,
13439 fdomain_client::fidl::FDomainResourceDialect
13440 ));
13441 }
13442 #[allow(irrefutable_let_patterns)]
13443 if let ConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
13444 fidl::decode!(
13445 Unit,
13446 fdomain_client::fidl::FDomainResourceDialect,
13447 val,
13448 decoder,
13449 _inner_offset,
13450 depth
13451 )?;
13452 } else {
13453 unreachable!()
13454 }
13455 }
13456 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13457 }
13458 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13459 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13460 }
13461 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13462 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13463 }
13464 Ok(())
13465 }
13466 }
13467
13468 impl fidl::encoding::ResourceTypeMarker for DataRouterRouteResponse {
13469 type Borrowed<'a> = &'a mut Self;
13470 fn take_or_borrow<'a>(
13471 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13472 ) -> Self::Borrowed<'a> {
13473 value
13474 }
13475 }
13476
13477 unsafe impl fidl::encoding::TypeMarker for DataRouterRouteResponse {
13478 type Owned = Self;
13479
13480 #[inline(always)]
13481 fn inline_align(_context: fidl::encoding::Context) -> usize {
13482 8
13483 }
13484
13485 #[inline(always)]
13486 fn inline_size(_context: fidl::encoding::Context) -> usize {
13487 16
13488 }
13489 }
13490
13491 unsafe impl
13492 fidl::encoding::Encode<
13493 DataRouterRouteResponse,
13494 fdomain_client::fidl::FDomainResourceDialect,
13495 > for &mut DataRouterRouteResponse
13496 {
13497 #[inline]
13498 unsafe fn encode(
13499 self,
13500 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13501 offset: usize,
13502 _depth: fidl::encoding::Depth,
13503 ) -> fidl::Result<()> {
13504 encoder.debug_check_bounds::<DataRouterRouteResponse>(offset);
13505 encoder.write_num::<u64>(self.ordinal(), offset);
13506 match self {
13507 DataRouterRouteResponse::Data(ref val) => fidl::encoding::encode_in_envelope::<
13508 Data,
13509 fdomain_client::fidl::FDomainResourceDialect,
13510 >(
13511 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
13512 encoder,
13513 offset + 8,
13514 _depth,
13515 ),
13516 DataRouterRouteResponse::Unavailable(ref val) => {
13517 fidl::encoding::encode_in_envelope::<
13518 Unit,
13519 fdomain_client::fidl::FDomainResourceDialect,
13520 >(
13521 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13522 encoder,
13523 offset + 8,
13524 _depth,
13525 )
13526 }
13527 }
13528 }
13529 }
13530
13531 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13532 for DataRouterRouteResponse
13533 {
13534 #[inline(always)]
13535 fn new_empty() -> Self {
13536 Self::Data(fidl::new_empty!(Data, fdomain_client::fidl::FDomainResourceDialect))
13537 }
13538
13539 #[inline]
13540 unsafe fn decode(
13541 &mut self,
13542 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13543 offset: usize,
13544 mut depth: fidl::encoding::Depth,
13545 ) -> fidl::Result<()> {
13546 decoder.debug_check_bounds::<Self>(offset);
13547 #[allow(unused_variables)]
13548 let next_out_of_line = decoder.next_out_of_line();
13549 let handles_before = decoder.remaining_handles();
13550 let (ordinal, inlined, num_bytes, num_handles) =
13551 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13552
13553 let member_inline_size = match ordinal {
13554 1 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13555 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13556 _ => return Err(fidl::Error::UnknownUnionTag),
13557 };
13558
13559 if inlined != (member_inline_size <= 4) {
13560 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13561 }
13562 let _inner_offset;
13563 if inlined {
13564 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13565 _inner_offset = offset + 8;
13566 } else {
13567 depth.increment()?;
13568 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13569 }
13570 match ordinal {
13571 1 => {
13572 #[allow(irrefutable_let_patterns)]
13573 if let DataRouterRouteResponse::Data(_) = self {
13574 } else {
13576 *self = DataRouterRouteResponse::Data(fidl::new_empty!(
13578 Data,
13579 fdomain_client::fidl::FDomainResourceDialect
13580 ));
13581 }
13582 #[allow(irrefutable_let_patterns)]
13583 if let DataRouterRouteResponse::Data(ref mut val) = self {
13584 fidl::decode!(
13585 Data,
13586 fdomain_client::fidl::FDomainResourceDialect,
13587 val,
13588 decoder,
13589 _inner_offset,
13590 depth
13591 )?;
13592 } else {
13593 unreachable!()
13594 }
13595 }
13596 2 => {
13597 #[allow(irrefutable_let_patterns)]
13598 if let DataRouterRouteResponse::Unavailable(_) = self {
13599 } else {
13601 *self = DataRouterRouteResponse::Unavailable(fidl::new_empty!(
13603 Unit,
13604 fdomain_client::fidl::FDomainResourceDialect
13605 ));
13606 }
13607 #[allow(irrefutable_let_patterns)]
13608 if let DataRouterRouteResponse::Unavailable(ref mut val) = self {
13609 fidl::decode!(
13610 Unit,
13611 fdomain_client::fidl::FDomainResourceDialect,
13612 val,
13613 decoder,
13614 _inner_offset,
13615 depth
13616 )?;
13617 } else {
13618 unreachable!()
13619 }
13620 }
13621 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13622 }
13623 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13624 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13625 }
13626 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13627 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13628 }
13629 Ok(())
13630 }
13631 }
13632
13633 impl fidl::encoding::ResourceTypeMarker for DictionaryRouterRouteResponse {
13634 type Borrowed<'a> = &'a mut Self;
13635 fn take_or_borrow<'a>(
13636 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13637 ) -> Self::Borrowed<'a> {
13638 value
13639 }
13640 }
13641
13642 unsafe impl fidl::encoding::TypeMarker for DictionaryRouterRouteResponse {
13643 type Owned = Self;
13644
13645 #[inline(always)]
13646 fn inline_align(_context: fidl::encoding::Context) -> usize {
13647 8
13648 }
13649
13650 #[inline(always)]
13651 fn inline_size(_context: fidl::encoding::Context) -> usize {
13652 16
13653 }
13654 }
13655
13656 unsafe impl
13657 fidl::encoding::Encode<
13658 DictionaryRouterRouteResponse,
13659 fdomain_client::fidl::FDomainResourceDialect,
13660 > for &mut DictionaryRouterRouteResponse
13661 {
13662 #[inline]
13663 unsafe fn encode(
13664 self,
13665 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13666 offset: usize,
13667 _depth: fidl::encoding::Depth,
13668 ) -> fidl::Result<()> {
13669 encoder.debug_check_bounds::<DictionaryRouterRouteResponse>(offset);
13670 encoder.write_num::<u64>(self.ordinal(), offset);
13671 match self {
13672 DictionaryRouterRouteResponse::Dictionary(ref mut val) => {
13673 fidl::encoding::encode_in_envelope::<
13674 DictionaryRef,
13675 fdomain_client::fidl::FDomainResourceDialect,
13676 >(
13677 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13678 encoder,
13679 offset + 8,
13680 _depth,
13681 )
13682 }
13683 DictionaryRouterRouteResponse::Unavailable(ref val) => {
13684 fidl::encoding::encode_in_envelope::<
13685 Unit,
13686 fdomain_client::fidl::FDomainResourceDialect,
13687 >(
13688 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13689 encoder,
13690 offset + 8,
13691 _depth,
13692 )
13693 }
13694 }
13695 }
13696 }
13697
13698 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13699 for DictionaryRouterRouteResponse
13700 {
13701 #[inline(always)]
13702 fn new_empty() -> Self {
13703 Self::Dictionary(fidl::new_empty!(
13704 DictionaryRef,
13705 fdomain_client::fidl::FDomainResourceDialect
13706 ))
13707 }
13708
13709 #[inline]
13710 unsafe fn decode(
13711 &mut self,
13712 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13713 offset: usize,
13714 mut depth: fidl::encoding::Depth,
13715 ) -> fidl::Result<()> {
13716 decoder.debug_check_bounds::<Self>(offset);
13717 #[allow(unused_variables)]
13718 let next_out_of_line = decoder.next_out_of_line();
13719 let handles_before = decoder.remaining_handles();
13720 let (ordinal, inlined, num_bytes, num_handles) =
13721 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13722
13723 let member_inline_size = match ordinal {
13724 1 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13725 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13726 _ => return Err(fidl::Error::UnknownUnionTag),
13727 };
13728
13729 if inlined != (member_inline_size <= 4) {
13730 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13731 }
13732 let _inner_offset;
13733 if inlined {
13734 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13735 _inner_offset = offset + 8;
13736 } else {
13737 depth.increment()?;
13738 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13739 }
13740 match ordinal {
13741 1 => {
13742 #[allow(irrefutable_let_patterns)]
13743 if let DictionaryRouterRouteResponse::Dictionary(_) = self {
13744 } else {
13746 *self = DictionaryRouterRouteResponse::Dictionary(fidl::new_empty!(
13748 DictionaryRef,
13749 fdomain_client::fidl::FDomainResourceDialect
13750 ));
13751 }
13752 #[allow(irrefutable_let_patterns)]
13753 if let DictionaryRouterRouteResponse::Dictionary(ref mut val) = self {
13754 fidl::decode!(
13755 DictionaryRef,
13756 fdomain_client::fidl::FDomainResourceDialect,
13757 val,
13758 decoder,
13759 _inner_offset,
13760 depth
13761 )?;
13762 } else {
13763 unreachable!()
13764 }
13765 }
13766 2 => {
13767 #[allow(irrefutable_let_patterns)]
13768 if let DictionaryRouterRouteResponse::Unavailable(_) = self {
13769 } else {
13771 *self = DictionaryRouterRouteResponse::Unavailable(fidl::new_empty!(
13773 Unit,
13774 fdomain_client::fidl::FDomainResourceDialect
13775 ));
13776 }
13777 #[allow(irrefutable_let_patterns)]
13778 if let DictionaryRouterRouteResponse::Unavailable(ref mut val) = self {
13779 fidl::decode!(
13780 Unit,
13781 fdomain_client::fidl::FDomainResourceDialect,
13782 val,
13783 decoder,
13784 _inner_offset,
13785 depth
13786 )?;
13787 } else {
13788 unreachable!()
13789 }
13790 }
13791 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13792 }
13793 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13794 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13795 }
13796 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13797 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13798 }
13799 Ok(())
13800 }
13801 }
13802
13803 impl fidl::encoding::ResourceTypeMarker for DirConnectorRouterRouteResponse {
13804 type Borrowed<'a> = &'a mut Self;
13805 fn take_or_borrow<'a>(
13806 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13807 ) -> Self::Borrowed<'a> {
13808 value
13809 }
13810 }
13811
13812 unsafe impl fidl::encoding::TypeMarker for DirConnectorRouterRouteResponse {
13813 type Owned = Self;
13814
13815 #[inline(always)]
13816 fn inline_align(_context: fidl::encoding::Context) -> usize {
13817 8
13818 }
13819
13820 #[inline(always)]
13821 fn inline_size(_context: fidl::encoding::Context) -> usize {
13822 16
13823 }
13824 }
13825
13826 unsafe impl
13827 fidl::encoding::Encode<
13828 DirConnectorRouterRouteResponse,
13829 fdomain_client::fidl::FDomainResourceDialect,
13830 > for &mut DirConnectorRouterRouteResponse
13831 {
13832 #[inline]
13833 unsafe fn encode(
13834 self,
13835 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13836 offset: usize,
13837 _depth: fidl::encoding::Depth,
13838 ) -> fidl::Result<()> {
13839 encoder.debug_check_bounds::<DirConnectorRouterRouteResponse>(offset);
13840 encoder.write_num::<u64>(self.ordinal(), offset);
13841 match self {
13842 DirConnectorRouterRouteResponse::DirConnector(ref mut val) => {
13843 fidl::encoding::encode_in_envelope::<
13844 DirConnector,
13845 fdomain_client::fidl::FDomainResourceDialect,
13846 >(
13847 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13848 encoder,
13849 offset + 8,
13850 _depth,
13851 )
13852 }
13853 DirConnectorRouterRouteResponse::Unavailable(ref val) => {
13854 fidl::encoding::encode_in_envelope::<
13855 Unit,
13856 fdomain_client::fidl::FDomainResourceDialect,
13857 >(
13858 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13859 encoder,
13860 offset + 8,
13861 _depth,
13862 )
13863 }
13864 }
13865 }
13866 }
13867
13868 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13869 for DirConnectorRouterRouteResponse
13870 {
13871 #[inline(always)]
13872 fn new_empty() -> Self {
13873 Self::DirConnector(fidl::new_empty!(
13874 DirConnector,
13875 fdomain_client::fidl::FDomainResourceDialect
13876 ))
13877 }
13878
13879 #[inline]
13880 unsafe fn decode(
13881 &mut self,
13882 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13883 offset: usize,
13884 mut depth: fidl::encoding::Depth,
13885 ) -> fidl::Result<()> {
13886 decoder.debug_check_bounds::<Self>(offset);
13887 #[allow(unused_variables)]
13888 let next_out_of_line = decoder.next_out_of_line();
13889 let handles_before = decoder.remaining_handles();
13890 let (ordinal, inlined, num_bytes, num_handles) =
13891 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13892
13893 let member_inline_size = match ordinal {
13894 1 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13895 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13896 _ => return Err(fidl::Error::UnknownUnionTag),
13897 };
13898
13899 if inlined != (member_inline_size <= 4) {
13900 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13901 }
13902 let _inner_offset;
13903 if inlined {
13904 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13905 _inner_offset = offset + 8;
13906 } else {
13907 depth.increment()?;
13908 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13909 }
13910 match ordinal {
13911 1 => {
13912 #[allow(irrefutable_let_patterns)]
13913 if let DirConnectorRouterRouteResponse::DirConnector(_) = self {
13914 } else {
13916 *self = DirConnectorRouterRouteResponse::DirConnector(fidl::new_empty!(
13918 DirConnector,
13919 fdomain_client::fidl::FDomainResourceDialect
13920 ));
13921 }
13922 #[allow(irrefutable_let_patterns)]
13923 if let DirConnectorRouterRouteResponse::DirConnector(ref mut val) = self {
13924 fidl::decode!(
13925 DirConnector,
13926 fdomain_client::fidl::FDomainResourceDialect,
13927 val,
13928 decoder,
13929 _inner_offset,
13930 depth
13931 )?;
13932 } else {
13933 unreachable!()
13934 }
13935 }
13936 2 => {
13937 #[allow(irrefutable_let_patterns)]
13938 if let DirConnectorRouterRouteResponse::Unavailable(_) = self {
13939 } else {
13941 *self = DirConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
13943 Unit,
13944 fdomain_client::fidl::FDomainResourceDialect
13945 ));
13946 }
13947 #[allow(irrefutable_let_patterns)]
13948 if let DirConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
13949 fidl::decode!(
13950 Unit,
13951 fdomain_client::fidl::FDomainResourceDialect,
13952 val,
13953 decoder,
13954 _inner_offset,
13955 depth
13956 )?;
13957 } else {
13958 unreachable!()
13959 }
13960 }
13961 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13962 }
13963 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13964 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13965 }
13966 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13967 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13968 }
13969 Ok(())
13970 }
13971 }
13972
13973 impl fidl::encoding::ResourceTypeMarker for DirEntryRouterRouteResponse {
13974 type Borrowed<'a> = &'a mut Self;
13975 fn take_or_borrow<'a>(
13976 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13977 ) -> Self::Borrowed<'a> {
13978 value
13979 }
13980 }
13981
13982 unsafe impl fidl::encoding::TypeMarker for DirEntryRouterRouteResponse {
13983 type Owned = Self;
13984
13985 #[inline(always)]
13986 fn inline_align(_context: fidl::encoding::Context) -> usize {
13987 8
13988 }
13989
13990 #[inline(always)]
13991 fn inline_size(_context: fidl::encoding::Context) -> usize {
13992 16
13993 }
13994 }
13995
13996 unsafe impl
13997 fidl::encoding::Encode<
13998 DirEntryRouterRouteResponse,
13999 fdomain_client::fidl::FDomainResourceDialect,
14000 > for &mut DirEntryRouterRouteResponse
14001 {
14002 #[inline]
14003 unsafe fn encode(
14004 self,
14005 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14006 offset: usize,
14007 _depth: fidl::encoding::Depth,
14008 ) -> fidl::Result<()> {
14009 encoder.debug_check_bounds::<DirEntryRouterRouteResponse>(offset);
14010 encoder.write_num::<u64>(self.ordinal(), offset);
14011 match self {
14012 DirEntryRouterRouteResponse::DirEntry(ref mut val) => {
14013 fidl::encoding::encode_in_envelope::<
14014 DirEntry,
14015 fdomain_client::fidl::FDomainResourceDialect,
14016 >(
14017 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14018 encoder,
14019 offset + 8,
14020 _depth,
14021 )
14022 }
14023 DirEntryRouterRouteResponse::Unavailable(ref val) => {
14024 fidl::encoding::encode_in_envelope::<
14025 Unit,
14026 fdomain_client::fidl::FDomainResourceDialect,
14027 >(
14028 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
14029 encoder,
14030 offset + 8,
14031 _depth,
14032 )
14033 }
14034 }
14035 }
14036 }
14037
14038 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
14039 for DirEntryRouterRouteResponse
14040 {
14041 #[inline(always)]
14042 fn new_empty() -> Self {
14043 Self::DirEntry(fidl::new_empty!(DirEntry, fdomain_client::fidl::FDomainResourceDialect))
14044 }
14045
14046 #[inline]
14047 unsafe fn decode(
14048 &mut self,
14049 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14050 offset: usize,
14051 mut depth: fidl::encoding::Depth,
14052 ) -> fidl::Result<()> {
14053 decoder.debug_check_bounds::<Self>(offset);
14054 #[allow(unused_variables)]
14055 let next_out_of_line = decoder.next_out_of_line();
14056 let handles_before = decoder.remaining_handles();
14057 let (ordinal, inlined, num_bytes, num_handles) =
14058 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14059
14060 let member_inline_size = match ordinal {
14061 1 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14062 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14063 _ => return Err(fidl::Error::UnknownUnionTag),
14064 };
14065
14066 if inlined != (member_inline_size <= 4) {
14067 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14068 }
14069 let _inner_offset;
14070 if inlined {
14071 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14072 _inner_offset = offset + 8;
14073 } else {
14074 depth.increment()?;
14075 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14076 }
14077 match ordinal {
14078 1 => {
14079 #[allow(irrefutable_let_patterns)]
14080 if let DirEntryRouterRouteResponse::DirEntry(_) = self {
14081 } else {
14083 *self = DirEntryRouterRouteResponse::DirEntry(fidl::new_empty!(
14085 DirEntry,
14086 fdomain_client::fidl::FDomainResourceDialect
14087 ));
14088 }
14089 #[allow(irrefutable_let_patterns)]
14090 if let DirEntryRouterRouteResponse::DirEntry(ref mut val) = self {
14091 fidl::decode!(
14092 DirEntry,
14093 fdomain_client::fidl::FDomainResourceDialect,
14094 val,
14095 decoder,
14096 _inner_offset,
14097 depth
14098 )?;
14099 } else {
14100 unreachable!()
14101 }
14102 }
14103 2 => {
14104 #[allow(irrefutable_let_patterns)]
14105 if let DirEntryRouterRouteResponse::Unavailable(_) = self {
14106 } else {
14108 *self = DirEntryRouterRouteResponse::Unavailable(fidl::new_empty!(
14110 Unit,
14111 fdomain_client::fidl::FDomainResourceDialect
14112 ));
14113 }
14114 #[allow(irrefutable_let_patterns)]
14115 if let DirEntryRouterRouteResponse::Unavailable(ref mut val) = self {
14116 fidl::decode!(
14117 Unit,
14118 fdomain_client::fidl::FDomainResourceDialect,
14119 val,
14120 decoder,
14121 _inner_offset,
14122 depth
14123 )?;
14124 } else {
14125 unreachable!()
14126 }
14127 }
14128 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14129 }
14130 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14131 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14132 }
14133 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14134 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14135 }
14136 Ok(())
14137 }
14138 }
14139
14140 impl fidl::encoding::ResourceTypeMarker for DirectoryRouterRouteResponse {
14141 type Borrowed<'a> = &'a mut Self;
14142 fn take_or_borrow<'a>(
14143 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14144 ) -> Self::Borrowed<'a> {
14145 value
14146 }
14147 }
14148
14149 unsafe impl fidl::encoding::TypeMarker for DirectoryRouterRouteResponse {
14150 type Owned = Self;
14151
14152 #[inline(always)]
14153 fn inline_align(_context: fidl::encoding::Context) -> usize {
14154 8
14155 }
14156
14157 #[inline(always)]
14158 fn inline_size(_context: fidl::encoding::Context) -> usize {
14159 16
14160 }
14161 }
14162
14163 unsafe impl
14164 fidl::encoding::Encode<
14165 DirectoryRouterRouteResponse,
14166 fdomain_client::fidl::FDomainResourceDialect,
14167 > for &mut DirectoryRouterRouteResponse
14168 {
14169 #[inline]
14170 unsafe fn encode(
14171 self,
14172 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14173 offset: usize,
14174 _depth: fidl::encoding::Depth,
14175 ) -> fidl::Result<()> {
14176 encoder.debug_check_bounds::<DirectoryRouterRouteResponse>(offset);
14177 encoder.write_num::<u64>(self.ordinal(), offset);
14178 match self {
14179 DirectoryRouterRouteResponse::Directory(ref mut val) => {
14180 fidl::encoding::encode_in_envelope::<
14181 fidl::encoding::Endpoint<
14182 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14183 >,
14184 fdomain_client::fidl::FDomainResourceDialect,
14185 >(
14186 <fidl::encoding::Endpoint<
14187 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14188 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14189 val
14190 ),
14191 encoder,
14192 offset + 8,
14193 _depth,
14194 )
14195 }
14196 DirectoryRouterRouteResponse::Unavailable(ref val) => {
14197 fidl::encoding::encode_in_envelope::<
14198 Unit,
14199 fdomain_client::fidl::FDomainResourceDialect,
14200 >(
14201 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
14202 encoder,
14203 offset + 8,
14204 _depth,
14205 )
14206 }
14207 }
14208 }
14209 }
14210
14211 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
14212 for DirectoryRouterRouteResponse
14213 {
14214 #[inline(always)]
14215 fn new_empty() -> Self {
14216 Self::Directory(fidl::new_empty!(
14217 fidl::encoding::Endpoint<
14218 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14219 >,
14220 fdomain_client::fidl::FDomainResourceDialect
14221 ))
14222 }
14223
14224 #[inline]
14225 unsafe fn decode(
14226 &mut self,
14227 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14228 offset: usize,
14229 mut depth: fidl::encoding::Depth,
14230 ) -> fidl::Result<()> {
14231 decoder.debug_check_bounds::<Self>(offset);
14232 #[allow(unused_variables)]
14233 let next_out_of_line = decoder.next_out_of_line();
14234 let handles_before = decoder.remaining_handles();
14235 let (ordinal, inlined, num_bytes, num_handles) =
14236 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14237
14238 let member_inline_size = match ordinal {
14239 1 => <fidl::encoding::Endpoint<
14240 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14241 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14242 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14243 _ => return Err(fidl::Error::UnknownUnionTag),
14244 };
14245
14246 if inlined != (member_inline_size <= 4) {
14247 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14248 }
14249 let _inner_offset;
14250 if inlined {
14251 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14252 _inner_offset = offset + 8;
14253 } else {
14254 depth.increment()?;
14255 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14256 }
14257 match ordinal {
14258 1 => {
14259 #[allow(irrefutable_let_patterns)]
14260 if let DirectoryRouterRouteResponse::Directory(_) = self {
14261 } else {
14263 *self = DirectoryRouterRouteResponse::Directory(fidl::new_empty!(
14265 fidl::encoding::Endpoint<
14266 fdomain_client::fidl::ClientEnd<
14267 fdomain_fuchsia_io::DirectoryMarker,
14268 >,
14269 >,
14270 fdomain_client::fidl::FDomainResourceDialect
14271 ));
14272 }
14273 #[allow(irrefutable_let_patterns)]
14274 if let DirectoryRouterRouteResponse::Directory(ref mut val) = self {
14275 fidl::decode!(
14276 fidl::encoding::Endpoint<
14277 fdomain_client::fidl::ClientEnd<
14278 fdomain_fuchsia_io::DirectoryMarker,
14279 >,
14280 >,
14281 fdomain_client::fidl::FDomainResourceDialect,
14282 val,
14283 decoder,
14284 _inner_offset,
14285 depth
14286 )?;
14287 } else {
14288 unreachable!()
14289 }
14290 }
14291 2 => {
14292 #[allow(irrefutable_let_patterns)]
14293 if let DirectoryRouterRouteResponse::Unavailable(_) = self {
14294 } else {
14296 *self = DirectoryRouterRouteResponse::Unavailable(fidl::new_empty!(
14298 Unit,
14299 fdomain_client::fidl::FDomainResourceDialect
14300 ));
14301 }
14302 #[allow(irrefutable_let_patterns)]
14303 if let DirectoryRouterRouteResponse::Unavailable(ref mut val) = self {
14304 fidl::decode!(
14305 Unit,
14306 fdomain_client::fidl::FDomainResourceDialect,
14307 val,
14308 decoder,
14309 _inner_offset,
14310 depth
14311 )?;
14312 } else {
14313 unreachable!()
14314 }
14315 }
14316 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14317 }
14318 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14319 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14320 }
14321 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14322 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14323 }
14324 Ok(())
14325 }
14326 }
14327}