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 #[doc(hidden)]
293 pub __source_breaking: fidl::marker::SourceBreaking,
294}
295
296impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RouteRequest {}
297
298#[derive(Debug)]
299pub enum Capability {
300 Unit(Unit),
301 Handle(fdomain_client::NullableHandle),
302 Data(Data),
303 Dictionary(DictionaryRef),
304 Connector(Connector),
305 DirConnector(DirConnector),
306 Directory(fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>),
307 DirEntry(DirEntry),
308 ConnectorRouter(fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>),
309 DictionaryRouter(fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>),
310 DirEntryRouter(fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>),
311 DataRouter(fdomain_client::fidl::ClientEnd<DataRouterMarker>),
312 DirConnectorRouter(fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>),
313 #[doc(hidden)]
314 __SourceBreaking {
315 unknown_ordinal: u64,
316 },
317}
318
319#[macro_export]
321macro_rules! CapabilityUnknown {
322 () => {
323 _
324 };
325}
326
327impl PartialEq for Capability {
329 fn eq(&self, other: &Self) -> bool {
330 match (self, other) {
331 (Self::Unit(x), Self::Unit(y)) => *x == *y,
332 (Self::Handle(x), Self::Handle(y)) => *x == *y,
333 (Self::Data(x), Self::Data(y)) => *x == *y,
334 (Self::Dictionary(x), Self::Dictionary(y)) => *x == *y,
335 (Self::Connector(x), Self::Connector(y)) => *x == *y,
336 (Self::DirConnector(x), Self::DirConnector(y)) => *x == *y,
337 (Self::Directory(x), Self::Directory(y)) => *x == *y,
338 (Self::DirEntry(x), Self::DirEntry(y)) => *x == *y,
339 (Self::ConnectorRouter(x), Self::ConnectorRouter(y)) => *x == *y,
340 (Self::DictionaryRouter(x), Self::DictionaryRouter(y)) => *x == *y,
341 (Self::DirEntryRouter(x), Self::DirEntryRouter(y)) => *x == *y,
342 (Self::DataRouter(x), Self::DataRouter(y)) => *x == *y,
343 (Self::DirConnectorRouter(x), Self::DirConnectorRouter(y)) => *x == *y,
344 _ => false,
345 }
346 }
347}
348
349impl Capability {
350 #[inline]
351 pub fn ordinal(&self) -> u64 {
352 match *self {
353 Self::Unit(_) => 1,
354 Self::Handle(_) => 2,
355 Self::Data(_) => 3,
356 Self::Dictionary(_) => 4,
357 Self::Connector(_) => 5,
358 Self::DirConnector(_) => 6,
359 Self::Directory(_) => 7,
360 Self::DirEntry(_) => 8,
361 Self::ConnectorRouter(_) => 9,
362 Self::DictionaryRouter(_) => 10,
363 Self::DirEntryRouter(_) => 11,
364 Self::DataRouter(_) => 12,
365 Self::DirConnectorRouter(_) => 13,
366 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
367 }
368 }
369
370 #[inline]
371 pub fn unknown_variant_for_testing() -> Self {
372 Self::__SourceBreaking { unknown_ordinal: 0 }
373 }
374
375 #[inline]
376 pub fn is_unknown(&self) -> bool {
377 match self {
378 Self::__SourceBreaking { .. } => true,
379 _ => false,
380 }
381 }
382}
383
384impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Capability {}
385
386#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
387pub enum ConnectorRouterRouteResponse {
388 Connector(Connector),
389 Unavailable(Unit),
390}
391
392impl ConnectorRouterRouteResponse {
393 #[inline]
394 pub fn ordinal(&self) -> u64 {
395 match *self {
396 Self::Connector(_) => 1,
397 Self::Unavailable(_) => 2,
398 }
399 }
400}
401
402impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
403 for ConnectorRouterRouteResponse
404{
405}
406
407#[derive(Debug, PartialEq)]
408pub enum DataRouterRouteResponse {
409 Data(Data),
410 Unavailable(Unit),
411}
412
413impl DataRouterRouteResponse {
414 #[inline]
415 pub fn ordinal(&self) -> u64 {
416 match *self {
417 Self::Data(_) => 1,
418 Self::Unavailable(_) => 2,
419 }
420 }
421}
422
423impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DataRouterRouteResponse {}
424
425#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
426pub enum DictionaryRouterRouteResponse {
427 Dictionary(DictionaryRef),
428 Unavailable(Unit),
429}
430
431impl DictionaryRouterRouteResponse {
432 #[inline]
433 pub fn ordinal(&self) -> u64 {
434 match *self {
435 Self::Dictionary(_) => 1,
436 Self::Unavailable(_) => 2,
437 }
438 }
439}
440
441impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
442 for DictionaryRouterRouteResponse
443{
444}
445
446#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
447pub enum DirConnectorRouterRouteResponse {
448 DirConnector(DirConnector),
449 Unavailable(Unit),
450}
451
452impl DirConnectorRouterRouteResponse {
453 #[inline]
454 pub fn ordinal(&self) -> u64 {
455 match *self {
456 Self::DirConnector(_) => 1,
457 Self::Unavailable(_) => 2,
458 }
459 }
460}
461
462impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
463 for DirConnectorRouterRouteResponse
464{
465}
466
467#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
468pub enum DirEntryRouterRouteResponse {
469 DirEntry(DirEntry),
470 Unavailable(Unit),
471}
472
473impl DirEntryRouterRouteResponse {
474 #[inline]
475 pub fn ordinal(&self) -> u64 {
476 match *self {
477 Self::DirEntry(_) => 1,
478 Self::Unavailable(_) => 2,
479 }
480 }
481}
482
483impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
484 for DirEntryRouterRouteResponse
485{
486}
487
488#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
489pub enum DirectoryRouterRouteResponse {
490 Directory(fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>),
491 Unavailable(Unit),
492}
493
494impl DirectoryRouterRouteResponse {
495 #[inline]
496 pub fn ordinal(&self) -> u64 {
497 match *self {
498 Self::Directory(_) => 1,
499 Self::Unavailable(_) => 2,
500 }
501 }
502}
503
504impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
505 for DirectoryRouterRouteResponse
506{
507}
508
509#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
510pub struct CapabilityStoreMarker;
511
512impl fdomain_client::fidl::ProtocolMarker for CapabilityStoreMarker {
513 type Proxy = CapabilityStoreProxy;
514 type RequestStream = CapabilityStoreRequestStream;
515
516 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
517}
518impl fdomain_client::fidl::DiscoverableProtocolMarker for CapabilityStoreMarker {}
519pub type CapabilityStoreDuplicateResult = Result<(), CapabilityStoreError>;
520pub type CapabilityStoreDropResult = Result<(), CapabilityStoreError>;
521pub type CapabilityStoreExportResult = Result<Capability, CapabilityStoreError>;
522pub type CapabilityStoreImportResult = Result<(), CapabilityStoreError>;
523pub type CapabilityStoreConnectorCreateResult = Result<(), CapabilityStoreError>;
524pub type CapabilityStoreConnectorOpenResult = Result<(), CapabilityStoreError>;
525pub type CapabilityStoreDirConnectorCreateResult = Result<(), CapabilityStoreError>;
526pub type CapabilityStoreDirConnectorOpenResult = Result<(), CapabilityStoreError>;
527pub type CapabilityStoreDictionaryCreateResult = Result<(), CapabilityStoreError>;
528pub type CapabilityStoreDictionaryLegacyImportResult = Result<(), CapabilityStoreError>;
529pub type CapabilityStoreDictionaryLegacyExportResult = Result<(), CapabilityStoreError>;
530pub type CapabilityStoreDictionaryInsertResult = Result<(), CapabilityStoreError>;
531pub type CapabilityStoreDictionaryGetResult = Result<(), CapabilityStoreError>;
532pub type CapabilityStoreDictionaryRemoveResult = Result<(), CapabilityStoreError>;
533pub type CapabilityStoreDictionaryCopyResult = Result<(), CapabilityStoreError>;
534pub type CapabilityStoreDictionaryKeysResult = Result<(), CapabilityStoreError>;
535pub type CapabilityStoreDictionaryEnumerateResult = Result<(), CapabilityStoreError>;
536pub type CapabilityStoreDictionaryDrainResult = Result<(), CapabilityStoreError>;
537pub type CapabilityStoreCreateServiceAggregateResult = Result<DirConnector, CapabilityStoreError>;
538
539pub trait CapabilityStoreProxyInterface: Send + Sync {
540 type DuplicateResponseFut: std::future::Future<Output = Result<CapabilityStoreDuplicateResult, fidl::Error>>
541 + Send;
542 fn r#duplicate(&self, id: u64, dest_id: u64) -> Self::DuplicateResponseFut;
543 type DropResponseFut: std::future::Future<Output = Result<CapabilityStoreDropResult, fidl::Error>>
544 + Send;
545 fn r#drop(&self, id: u64) -> Self::DropResponseFut;
546 type ExportResponseFut: std::future::Future<Output = Result<CapabilityStoreExportResult, fidl::Error>>
547 + Send;
548 fn r#export(&self, id: u64) -> Self::ExportResponseFut;
549 type ImportResponseFut: std::future::Future<Output = Result<CapabilityStoreImportResult, fidl::Error>>
550 + Send;
551 fn r#import(&self, id: u64, capability: Capability) -> Self::ImportResponseFut;
552 type ConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorCreateResult, fidl::Error>>
553 + Send;
554 fn r#connector_create(
555 &self,
556 id: u64,
557 receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
558 ) -> Self::ConnectorCreateResponseFut;
559 type ConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorOpenResult, fidl::Error>>
560 + Send;
561 fn r#connector_open(
562 &self,
563 id: u64,
564 server_end: fdomain_client::Channel,
565 ) -> Self::ConnectorOpenResponseFut;
566 type DirConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorCreateResult, fidl::Error>>
567 + Send;
568 fn r#dir_connector_create(
569 &self,
570 id: u64,
571 receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
572 ) -> Self::DirConnectorCreateResponseFut;
573 type DirConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorOpenResult, fidl::Error>>
574 + Send;
575 fn r#dir_connector_open(
576 &self,
577 payload: CapabilityStoreDirConnectorOpenRequest,
578 ) -> Self::DirConnectorOpenResponseFut;
579 type DictionaryCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCreateResult, fidl::Error>>
580 + Send;
581 fn r#dictionary_create(&self, id: u64) -> Self::DictionaryCreateResponseFut;
582 type DictionaryLegacyImportResponseFut: std::future::Future<
583 Output = Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error>,
584 > + Send;
585 fn r#dictionary_legacy_import(
586 &self,
587 id: u64,
588 client_end: fdomain_client::Channel,
589 ) -> Self::DictionaryLegacyImportResponseFut;
590 type DictionaryLegacyExportResponseFut: std::future::Future<
591 Output = Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error>,
592 > + Send;
593 fn r#dictionary_legacy_export(
594 &self,
595 id: u64,
596 server_end: fdomain_client::Channel,
597 ) -> Self::DictionaryLegacyExportResponseFut;
598 type DictionaryInsertResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryInsertResult, fidl::Error>>
599 + Send;
600 fn r#dictionary_insert(
601 &self,
602 id: u64,
603 item: &DictionaryItem,
604 ) -> Self::DictionaryInsertResponseFut;
605 type DictionaryGetResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryGetResult, fidl::Error>>
606 + Send;
607 fn r#dictionary_get(&self, id: u64, key: &str, dest_id: u64) -> Self::DictionaryGetResponseFut;
608 type DictionaryRemoveResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryRemoveResult, fidl::Error>>
609 + Send;
610 fn r#dictionary_remove(
611 &self,
612 id: u64,
613 key: &str,
614 dest_id: Option<&WrappedCapabilityId>,
615 ) -> Self::DictionaryRemoveResponseFut;
616 type DictionaryCopyResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCopyResult, fidl::Error>>
617 + Send;
618 fn r#dictionary_copy(&self, id: u64, dest_id: u64) -> Self::DictionaryCopyResponseFut;
619 type DictionaryKeysResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryKeysResult, fidl::Error>>
620 + Send;
621 fn r#dictionary_keys(
622 &self,
623 id: u64,
624 iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
625 ) -> Self::DictionaryKeysResponseFut;
626 type DictionaryEnumerateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error>>
627 + Send;
628 fn r#dictionary_enumerate(
629 &self,
630 id: u64,
631 iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
632 ) -> Self::DictionaryEnumerateResponseFut;
633 type DictionaryDrainResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryDrainResult, fidl::Error>>
634 + Send;
635 fn r#dictionary_drain(
636 &self,
637 id: u64,
638 iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
639 ) -> Self::DictionaryDrainResponseFut;
640 type CreateServiceAggregateResponseFut: std::future::Future<
641 Output = Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error>,
642 > + Send;
643 fn r#create_service_aggregate(
644 &self,
645 sources: Vec<AggregateSource>,
646 ) -> Self::CreateServiceAggregateResponseFut;
647}
648
649#[derive(Debug, Clone)]
650pub struct CapabilityStoreProxy {
651 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
652}
653
654impl fdomain_client::fidl::Proxy for CapabilityStoreProxy {
655 type Protocol = CapabilityStoreMarker;
656
657 fn from_channel(inner: fdomain_client::Channel) -> Self {
658 Self::new(inner)
659 }
660
661 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
662 self.client.into_channel().map_err(|client| Self { client })
663 }
664
665 fn as_channel(&self) -> &fdomain_client::Channel {
666 self.client.as_channel()
667 }
668}
669
670impl CapabilityStoreProxy {
671 pub fn new(channel: fdomain_client::Channel) -> Self {
673 let protocol_name =
674 <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
675 Self { client: fidl::client::Client::new(channel, protocol_name) }
676 }
677
678 pub fn take_event_stream(&self) -> CapabilityStoreEventStream {
684 CapabilityStoreEventStream { event_receiver: self.client.take_event_receiver() }
685 }
686
687 pub fn r#duplicate(
695 &self,
696 mut id: u64,
697 mut dest_id: u64,
698 ) -> fidl::client::QueryResponseFut<
699 CapabilityStoreDuplicateResult,
700 fdomain_client::fidl::FDomainResourceDialect,
701 > {
702 CapabilityStoreProxyInterface::r#duplicate(self, id, dest_id)
703 }
704
705 pub fn r#drop(
711 &self,
712 mut id: u64,
713 ) -> fidl::client::QueryResponseFut<
714 CapabilityStoreDropResult,
715 fdomain_client::fidl::FDomainResourceDialect,
716 > {
717 CapabilityStoreProxyInterface::r#drop(self, id)
718 }
719
720 pub fn r#export(
728 &self,
729 mut id: u64,
730 ) -> fidl::client::QueryResponseFut<
731 CapabilityStoreExportResult,
732 fdomain_client::fidl::FDomainResourceDialect,
733 > {
734 CapabilityStoreProxyInterface::r#export(self, id)
735 }
736
737 pub fn r#import(
744 &self,
745 mut id: u64,
746 mut capability: Capability,
747 ) -> fidl::client::QueryResponseFut<
748 CapabilityStoreImportResult,
749 fdomain_client::fidl::FDomainResourceDialect,
750 > {
751 CapabilityStoreProxyInterface::r#import(self, id, capability)
752 }
753
754 pub fn r#connector_create(
761 &self,
762 mut id: u64,
763 mut receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
764 ) -> fidl::client::QueryResponseFut<
765 CapabilityStoreConnectorCreateResult,
766 fdomain_client::fidl::FDomainResourceDialect,
767 > {
768 CapabilityStoreProxyInterface::r#connector_create(self, id, receiver)
769 }
770
771 pub fn r#connector_open(
781 &self,
782 mut id: u64,
783 mut server_end: fdomain_client::Channel,
784 ) -> fidl::client::QueryResponseFut<
785 CapabilityStoreConnectorOpenResult,
786 fdomain_client::fidl::FDomainResourceDialect,
787 > {
788 CapabilityStoreProxyInterface::r#connector_open(self, id, server_end)
789 }
790
791 pub fn r#dir_connector_create(
798 &self,
799 mut id: u64,
800 mut receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
801 ) -> fidl::client::QueryResponseFut<
802 CapabilityStoreDirConnectorCreateResult,
803 fdomain_client::fidl::FDomainResourceDialect,
804 > {
805 CapabilityStoreProxyInterface::r#dir_connector_create(self, id, receiver)
806 }
807
808 pub fn r#dir_connector_open(
822 &self,
823 mut payload: CapabilityStoreDirConnectorOpenRequest,
824 ) -> fidl::client::QueryResponseFut<
825 CapabilityStoreDirConnectorOpenResult,
826 fdomain_client::fidl::FDomainResourceDialect,
827 > {
828 CapabilityStoreProxyInterface::r#dir_connector_open(self, payload)
829 }
830
831 pub fn r#dictionary_create(
837 &self,
838 mut id: u64,
839 ) -> fidl::client::QueryResponseFut<
840 CapabilityStoreDictionaryCreateResult,
841 fdomain_client::fidl::FDomainResourceDialect,
842 > {
843 CapabilityStoreProxyInterface::r#dictionary_create(self, id)
844 }
845
846 pub fn r#dictionary_legacy_import(
856 &self,
857 mut id: u64,
858 mut client_end: fdomain_client::Channel,
859 ) -> fidl::client::QueryResponseFut<
860 CapabilityStoreDictionaryLegacyImportResult,
861 fdomain_client::fidl::FDomainResourceDialect,
862 > {
863 CapabilityStoreProxyInterface::r#dictionary_legacy_import(self, id, client_end)
864 }
865
866 pub fn r#dictionary_legacy_export(
876 &self,
877 mut id: u64,
878 mut server_end: fdomain_client::Channel,
879 ) -> fidl::client::QueryResponseFut<
880 CapabilityStoreDictionaryLegacyExportResult,
881 fdomain_client::fidl::FDomainResourceDialect,
882 > {
883 CapabilityStoreProxyInterface::r#dictionary_legacy_export(self, id, server_end)
884 }
885
886 pub fn r#dictionary_insert(
896 &self,
897 mut id: u64,
898 mut item: &DictionaryItem,
899 ) -> fidl::client::QueryResponseFut<
900 CapabilityStoreDictionaryInsertResult,
901 fdomain_client::fidl::FDomainResourceDialect,
902 > {
903 CapabilityStoreProxyInterface::r#dictionary_insert(self, id, item)
904 }
905
906 pub fn r#dictionary_get(
918 &self,
919 mut id: u64,
920 mut key: &str,
921 mut dest_id: u64,
922 ) -> fidl::client::QueryResponseFut<
923 CapabilityStoreDictionaryGetResult,
924 fdomain_client::fidl::FDomainResourceDialect,
925 > {
926 CapabilityStoreProxyInterface::r#dictionary_get(self, id, key, dest_id)
927 }
928
929 pub fn r#dictionary_remove(
940 &self,
941 mut id: u64,
942 mut key: &str,
943 mut dest_id: Option<&WrappedCapabilityId>,
944 ) -> fidl::client::QueryResponseFut<
945 CapabilityStoreDictionaryRemoveResult,
946 fdomain_client::fidl::FDomainResourceDialect,
947 > {
948 CapabilityStoreProxyInterface::r#dictionary_remove(self, id, key, dest_id)
949 }
950
951 pub fn r#dictionary_copy(
967 &self,
968 mut id: u64,
969 mut dest_id: u64,
970 ) -> fidl::client::QueryResponseFut<
971 CapabilityStoreDictionaryCopyResult,
972 fdomain_client::fidl::FDomainResourceDialect,
973 > {
974 CapabilityStoreProxyInterface::r#dictionary_copy(self, id, dest_id)
975 }
976
977 pub fn r#dictionary_keys(
984 &self,
985 mut id: u64,
986 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
987 ) -> fidl::client::QueryResponseFut<
988 CapabilityStoreDictionaryKeysResult,
989 fdomain_client::fidl::FDomainResourceDialect,
990 > {
991 CapabilityStoreProxyInterface::r#dictionary_keys(self, id, iterator)
992 }
993
994 pub fn r#dictionary_enumerate(
1004 &self,
1005 mut id: u64,
1006 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
1007 ) -> fidl::client::QueryResponseFut<
1008 CapabilityStoreDictionaryEnumerateResult,
1009 fdomain_client::fidl::FDomainResourceDialect,
1010 > {
1011 CapabilityStoreProxyInterface::r#dictionary_enumerate(self, id, iterator)
1012 }
1013
1014 pub fn r#dictionary_drain(
1022 &self,
1023 mut id: u64,
1024 mut iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
1025 ) -> fidl::client::QueryResponseFut<
1026 CapabilityStoreDictionaryDrainResult,
1027 fdomain_client::fidl::FDomainResourceDialect,
1028 > {
1029 CapabilityStoreProxyInterface::r#dictionary_drain(self, id, iterator)
1030 }
1031
1032 pub fn r#create_service_aggregate(
1035 &self,
1036 mut sources: Vec<AggregateSource>,
1037 ) -> fidl::client::QueryResponseFut<
1038 CapabilityStoreCreateServiceAggregateResult,
1039 fdomain_client::fidl::FDomainResourceDialect,
1040 > {
1041 CapabilityStoreProxyInterface::r#create_service_aggregate(self, sources)
1042 }
1043}
1044
1045impl CapabilityStoreProxyInterface for CapabilityStoreProxy {
1046 type DuplicateResponseFut = fidl::client::QueryResponseFut<
1047 CapabilityStoreDuplicateResult,
1048 fdomain_client::fidl::FDomainResourceDialect,
1049 >;
1050 fn r#duplicate(&self, mut id: u64, mut dest_id: u64) -> Self::DuplicateResponseFut {
1051 fn _decode(
1052 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1053 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
1054 let _response = fidl::client::decode_transaction_body::<
1055 fidl::encoding::FlexibleResultType<
1056 fidl::encoding::EmptyStruct,
1057 CapabilityStoreError,
1058 >,
1059 fdomain_client::fidl::FDomainResourceDialect,
1060 0x5d5d35d9c20a2184,
1061 >(_buf?)?
1062 .into_result_fdomain::<CapabilityStoreMarker>("duplicate")?;
1063 Ok(_response.map(|x| x))
1064 }
1065 self.client.send_query_and_decode::<
1066 CapabilityStoreDuplicateRequest,
1067 CapabilityStoreDuplicateResult,
1068 >(
1069 (id, dest_id,),
1070 0x5d5d35d9c20a2184,
1071 fidl::encoding::DynamicFlags::FLEXIBLE,
1072 _decode,
1073 )
1074 }
1075
1076 type DropResponseFut = fidl::client::QueryResponseFut<
1077 CapabilityStoreDropResult,
1078 fdomain_client::fidl::FDomainResourceDialect,
1079 >;
1080 fn r#drop(&self, mut id: u64) -> Self::DropResponseFut {
1081 fn _decode(
1082 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1083 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
1084 let _response = fidl::client::decode_transaction_body::<
1085 fidl::encoding::FlexibleResultType<
1086 fidl::encoding::EmptyStruct,
1087 CapabilityStoreError,
1088 >,
1089 fdomain_client::fidl::FDomainResourceDialect,
1090 0xa745c0990fc2559,
1091 >(_buf?)?
1092 .into_result_fdomain::<CapabilityStoreMarker>("drop")?;
1093 Ok(_response.map(|x| x))
1094 }
1095 self.client.send_query_and_decode::<CapabilityStoreDropRequest, CapabilityStoreDropResult>(
1096 (id,),
1097 0xa745c0990fc2559,
1098 fidl::encoding::DynamicFlags::FLEXIBLE,
1099 _decode,
1100 )
1101 }
1102
1103 type ExportResponseFut = fidl::client::QueryResponseFut<
1104 CapabilityStoreExportResult,
1105 fdomain_client::fidl::FDomainResourceDialect,
1106 >;
1107 fn r#export(&self, mut id: u64) -> Self::ExportResponseFut {
1108 fn _decode(
1109 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1110 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
1111 let _response = fidl::client::decode_transaction_body::<
1112 fidl::encoding::FlexibleResultType<
1113 CapabilityStoreExportResponse,
1114 CapabilityStoreError,
1115 >,
1116 fdomain_client::fidl::FDomainResourceDialect,
1117 0x3237a8f4748faff,
1118 >(_buf?)?
1119 .into_result_fdomain::<CapabilityStoreMarker>("export")?;
1120 Ok(_response.map(|x| x.capability))
1121 }
1122 self.client
1123 .send_query_and_decode::<CapabilityStoreExportRequest, CapabilityStoreExportResult>(
1124 (id,),
1125 0x3237a8f4748faff,
1126 fidl::encoding::DynamicFlags::FLEXIBLE,
1127 _decode,
1128 )
1129 }
1130
1131 type ImportResponseFut = fidl::client::QueryResponseFut<
1132 CapabilityStoreImportResult,
1133 fdomain_client::fidl::FDomainResourceDialect,
1134 >;
1135 fn r#import(&self, mut id: u64, mut capability: Capability) -> Self::ImportResponseFut {
1136 fn _decode(
1137 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1138 ) -> Result<CapabilityStoreImportResult, fidl::Error> {
1139 let _response = fidl::client::decode_transaction_body::<
1140 fidl::encoding::FlexibleResultType<
1141 fidl::encoding::EmptyStruct,
1142 CapabilityStoreError,
1143 >,
1144 fdomain_client::fidl::FDomainResourceDialect,
1145 0x1f96157a29f4539b,
1146 >(_buf?)?
1147 .into_result_fdomain::<CapabilityStoreMarker>("import")?;
1148 Ok(_response.map(|x| x))
1149 }
1150 self.client
1151 .send_query_and_decode::<CapabilityStoreImportRequest, CapabilityStoreImportResult>(
1152 (id, &mut capability),
1153 0x1f96157a29f4539b,
1154 fidl::encoding::DynamicFlags::FLEXIBLE,
1155 _decode,
1156 )
1157 }
1158
1159 type ConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1160 CapabilityStoreConnectorCreateResult,
1161 fdomain_client::fidl::FDomainResourceDialect,
1162 >;
1163 fn r#connector_create(
1164 &self,
1165 mut id: u64,
1166 mut receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
1167 ) -> Self::ConnectorCreateResponseFut {
1168 fn _decode(
1169 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1170 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
1171 let _response = fidl::client::decode_transaction_body::<
1172 fidl::encoding::FlexibleResultType<
1173 fidl::encoding::EmptyStruct,
1174 CapabilityStoreError,
1175 >,
1176 fdomain_client::fidl::FDomainResourceDialect,
1177 0x29592c5d63e91c25,
1178 >(_buf?)?
1179 .into_result_fdomain::<CapabilityStoreMarker>("connector_create")?;
1180 Ok(_response.map(|x| x))
1181 }
1182 self.client.send_query_and_decode::<
1183 CapabilityStoreConnectorCreateRequest,
1184 CapabilityStoreConnectorCreateResult,
1185 >(
1186 (id, receiver,),
1187 0x29592c5d63e91c25,
1188 fidl::encoding::DynamicFlags::FLEXIBLE,
1189 _decode,
1190 )
1191 }
1192
1193 type ConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1194 CapabilityStoreConnectorOpenResult,
1195 fdomain_client::fidl::FDomainResourceDialect,
1196 >;
1197 fn r#connector_open(
1198 &self,
1199 mut id: u64,
1200 mut server_end: fdomain_client::Channel,
1201 ) -> Self::ConnectorOpenResponseFut {
1202 fn _decode(
1203 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1204 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
1205 let _response = fidl::client::decode_transaction_body::<
1206 fidl::encoding::FlexibleResultType<
1207 fidl::encoding::EmptyStruct,
1208 CapabilityStoreError,
1209 >,
1210 fdomain_client::fidl::FDomainResourceDialect,
1211 0x537e69ab40563b9f,
1212 >(_buf?)?
1213 .into_result_fdomain::<CapabilityStoreMarker>("connector_open")?;
1214 Ok(_response.map(|x| x))
1215 }
1216 self.client.send_query_and_decode::<
1217 CapabilityStoreConnectorOpenRequest,
1218 CapabilityStoreConnectorOpenResult,
1219 >(
1220 (id, server_end,),
1221 0x537e69ab40563b9f,
1222 fidl::encoding::DynamicFlags::FLEXIBLE,
1223 _decode,
1224 )
1225 }
1226
1227 type DirConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1228 CapabilityStoreDirConnectorCreateResult,
1229 fdomain_client::fidl::FDomainResourceDialect,
1230 >;
1231 fn r#dir_connector_create(
1232 &self,
1233 mut id: u64,
1234 mut receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
1235 ) -> Self::DirConnectorCreateResponseFut {
1236 fn _decode(
1237 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1238 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
1239 let _response = fidl::client::decode_transaction_body::<
1240 fidl::encoding::FlexibleResultType<
1241 fidl::encoding::EmptyStruct,
1242 CapabilityStoreError,
1243 >,
1244 fdomain_client::fidl::FDomainResourceDialect,
1245 0x186138a11ccf19bb,
1246 >(_buf?)?
1247 .into_result_fdomain::<CapabilityStoreMarker>("dir_connector_create")?;
1248 Ok(_response.map(|x| x))
1249 }
1250 self.client.send_query_and_decode::<
1251 CapabilityStoreDirConnectorCreateRequest,
1252 CapabilityStoreDirConnectorCreateResult,
1253 >(
1254 (id, receiver,),
1255 0x186138a11ccf19bb,
1256 fidl::encoding::DynamicFlags::FLEXIBLE,
1257 _decode,
1258 )
1259 }
1260
1261 type DirConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1262 CapabilityStoreDirConnectorOpenResult,
1263 fdomain_client::fidl::FDomainResourceDialect,
1264 >;
1265 fn r#dir_connector_open(
1266 &self,
1267 mut payload: CapabilityStoreDirConnectorOpenRequest,
1268 ) -> Self::DirConnectorOpenResponseFut {
1269 fn _decode(
1270 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1271 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
1272 let _response = fidl::client::decode_transaction_body::<
1273 fidl::encoding::FlexibleResultType<
1274 fidl::encoding::EmptyStruct,
1275 CapabilityStoreError,
1276 >,
1277 fdomain_client::fidl::FDomainResourceDialect,
1278 0x5650d3d6a3a13901,
1279 >(_buf?)?
1280 .into_result_fdomain::<CapabilityStoreMarker>("dir_connector_open")?;
1281 Ok(_response.map(|x| x))
1282 }
1283 self.client.send_query_and_decode::<
1284 CapabilityStoreDirConnectorOpenRequest,
1285 CapabilityStoreDirConnectorOpenResult,
1286 >(
1287 &mut payload,
1288 0x5650d3d6a3a13901,
1289 fidl::encoding::DynamicFlags::FLEXIBLE,
1290 _decode,
1291 )
1292 }
1293
1294 type DictionaryCreateResponseFut = fidl::client::QueryResponseFut<
1295 CapabilityStoreDictionaryCreateResult,
1296 fdomain_client::fidl::FDomainResourceDialect,
1297 >;
1298 fn r#dictionary_create(&self, mut id: u64) -> Self::DictionaryCreateResponseFut {
1299 fn _decode(
1300 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1301 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
1302 let _response = fidl::client::decode_transaction_body::<
1303 fidl::encoding::FlexibleResultType<
1304 fidl::encoding::EmptyStruct,
1305 CapabilityStoreError,
1306 >,
1307 fdomain_client::fidl::FDomainResourceDialect,
1308 0x6997c8dfc63de093,
1309 >(_buf?)?
1310 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_create")?;
1311 Ok(_response.map(|x| x))
1312 }
1313 self.client.send_query_and_decode::<
1314 CapabilityStoreDictionaryCreateRequest,
1315 CapabilityStoreDictionaryCreateResult,
1316 >(
1317 (id,),
1318 0x6997c8dfc63de093,
1319 fidl::encoding::DynamicFlags::FLEXIBLE,
1320 _decode,
1321 )
1322 }
1323
1324 type DictionaryLegacyImportResponseFut = fidl::client::QueryResponseFut<
1325 CapabilityStoreDictionaryLegacyImportResult,
1326 fdomain_client::fidl::FDomainResourceDialect,
1327 >;
1328 fn r#dictionary_legacy_import(
1329 &self,
1330 mut id: u64,
1331 mut client_end: fdomain_client::Channel,
1332 ) -> Self::DictionaryLegacyImportResponseFut {
1333 fn _decode(
1334 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1335 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
1336 let _response = fidl::client::decode_transaction_body::<
1337 fidl::encoding::FlexibleResultType<
1338 fidl::encoding::EmptyStruct,
1339 CapabilityStoreError,
1340 >,
1341 fdomain_client::fidl::FDomainResourceDialect,
1342 0x72fd686c37b6025f,
1343 >(_buf?)?
1344 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_legacy_import")?;
1345 Ok(_response.map(|x| x))
1346 }
1347 self.client.send_query_and_decode::<
1348 CapabilityStoreDictionaryLegacyImportRequest,
1349 CapabilityStoreDictionaryLegacyImportResult,
1350 >(
1351 (id, client_end,),
1352 0x72fd686c37b6025f,
1353 fidl::encoding::DynamicFlags::FLEXIBLE,
1354 _decode,
1355 )
1356 }
1357
1358 type DictionaryLegacyExportResponseFut = fidl::client::QueryResponseFut<
1359 CapabilityStoreDictionaryLegacyExportResult,
1360 fdomain_client::fidl::FDomainResourceDialect,
1361 >;
1362 fn r#dictionary_legacy_export(
1363 &self,
1364 mut id: u64,
1365 mut server_end: fdomain_client::Channel,
1366 ) -> Self::DictionaryLegacyExportResponseFut {
1367 fn _decode(
1368 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1369 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
1370 let _response = fidl::client::decode_transaction_body::<
1371 fidl::encoding::FlexibleResultType<
1372 fidl::encoding::EmptyStruct,
1373 CapabilityStoreError,
1374 >,
1375 fdomain_client::fidl::FDomainResourceDialect,
1376 0x407e15cc4bde5dcd,
1377 >(_buf?)?
1378 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_legacy_export")?;
1379 Ok(_response.map(|x| x))
1380 }
1381 self.client.send_query_and_decode::<
1382 CapabilityStoreDictionaryLegacyExportRequest,
1383 CapabilityStoreDictionaryLegacyExportResult,
1384 >(
1385 (id, server_end,),
1386 0x407e15cc4bde5dcd,
1387 fidl::encoding::DynamicFlags::FLEXIBLE,
1388 _decode,
1389 )
1390 }
1391
1392 type DictionaryInsertResponseFut = fidl::client::QueryResponseFut<
1393 CapabilityStoreDictionaryInsertResult,
1394 fdomain_client::fidl::FDomainResourceDialect,
1395 >;
1396 fn r#dictionary_insert(
1397 &self,
1398 mut id: u64,
1399 mut item: &DictionaryItem,
1400 ) -> Self::DictionaryInsertResponseFut {
1401 fn _decode(
1402 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1403 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
1404 let _response = fidl::client::decode_transaction_body::<
1405 fidl::encoding::FlexibleResultType<
1406 fidl::encoding::EmptyStruct,
1407 CapabilityStoreError,
1408 >,
1409 fdomain_client::fidl::FDomainResourceDialect,
1410 0x7702183689d44c27,
1411 >(_buf?)?
1412 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_insert")?;
1413 Ok(_response.map(|x| x))
1414 }
1415 self.client.send_query_and_decode::<
1416 CapabilityStoreDictionaryInsertRequest,
1417 CapabilityStoreDictionaryInsertResult,
1418 >(
1419 (id, item,),
1420 0x7702183689d44c27,
1421 fidl::encoding::DynamicFlags::FLEXIBLE,
1422 _decode,
1423 )
1424 }
1425
1426 type DictionaryGetResponseFut = fidl::client::QueryResponseFut<
1427 CapabilityStoreDictionaryGetResult,
1428 fdomain_client::fidl::FDomainResourceDialect,
1429 >;
1430 fn r#dictionary_get(
1431 &self,
1432 mut id: u64,
1433 mut key: &str,
1434 mut dest_id: u64,
1435 ) -> Self::DictionaryGetResponseFut {
1436 fn _decode(
1437 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1438 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
1439 let _response = fidl::client::decode_transaction_body::<
1440 fidl::encoding::FlexibleResultType<
1441 fidl::encoding::EmptyStruct,
1442 CapabilityStoreError,
1443 >,
1444 fdomain_client::fidl::FDomainResourceDialect,
1445 0x4d9e27538284add2,
1446 >(_buf?)?
1447 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_get")?;
1448 Ok(_response.map(|x| x))
1449 }
1450 self.client.send_query_and_decode::<
1451 CapabilityStoreDictionaryGetRequest,
1452 CapabilityStoreDictionaryGetResult,
1453 >(
1454 (id, key, dest_id,),
1455 0x4d9e27538284add2,
1456 fidl::encoding::DynamicFlags::FLEXIBLE,
1457 _decode,
1458 )
1459 }
1460
1461 type DictionaryRemoveResponseFut = fidl::client::QueryResponseFut<
1462 CapabilityStoreDictionaryRemoveResult,
1463 fdomain_client::fidl::FDomainResourceDialect,
1464 >;
1465 fn r#dictionary_remove(
1466 &self,
1467 mut id: u64,
1468 mut key: &str,
1469 mut dest_id: Option<&WrappedCapabilityId>,
1470 ) -> Self::DictionaryRemoveResponseFut {
1471 fn _decode(
1472 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1473 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
1474 let _response = fidl::client::decode_transaction_body::<
1475 fidl::encoding::FlexibleResultType<
1476 fidl::encoding::EmptyStruct,
1477 CapabilityStoreError,
1478 >,
1479 fdomain_client::fidl::FDomainResourceDialect,
1480 0x4c5c025ab05d4f3,
1481 >(_buf?)?
1482 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_remove")?;
1483 Ok(_response.map(|x| x))
1484 }
1485 self.client.send_query_and_decode::<
1486 CapabilityStoreDictionaryRemoveRequest,
1487 CapabilityStoreDictionaryRemoveResult,
1488 >(
1489 (id, key, dest_id,),
1490 0x4c5c025ab05d4f3,
1491 fidl::encoding::DynamicFlags::FLEXIBLE,
1492 _decode,
1493 )
1494 }
1495
1496 type DictionaryCopyResponseFut = fidl::client::QueryResponseFut<
1497 CapabilityStoreDictionaryCopyResult,
1498 fdomain_client::fidl::FDomainResourceDialect,
1499 >;
1500 fn r#dictionary_copy(&self, mut id: u64, mut dest_id: u64) -> Self::DictionaryCopyResponseFut {
1501 fn _decode(
1502 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1503 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
1504 let _response = fidl::client::decode_transaction_body::<
1505 fidl::encoding::FlexibleResultType<
1506 fidl::encoding::EmptyStruct,
1507 CapabilityStoreError,
1508 >,
1509 fdomain_client::fidl::FDomainResourceDialect,
1510 0x3733ecdf4ea1b44f,
1511 >(_buf?)?
1512 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_copy")?;
1513 Ok(_response.map(|x| x))
1514 }
1515 self.client.send_query_and_decode::<
1516 CapabilityStoreDictionaryCopyRequest,
1517 CapabilityStoreDictionaryCopyResult,
1518 >(
1519 (id, dest_id,),
1520 0x3733ecdf4ea1b44f,
1521 fidl::encoding::DynamicFlags::FLEXIBLE,
1522 _decode,
1523 )
1524 }
1525
1526 type DictionaryKeysResponseFut = fidl::client::QueryResponseFut<
1527 CapabilityStoreDictionaryKeysResult,
1528 fdomain_client::fidl::FDomainResourceDialect,
1529 >;
1530 fn r#dictionary_keys(
1531 &self,
1532 mut id: u64,
1533 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
1534 ) -> Self::DictionaryKeysResponseFut {
1535 fn _decode(
1536 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1537 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
1538 let _response = fidl::client::decode_transaction_body::<
1539 fidl::encoding::FlexibleResultType<
1540 fidl::encoding::EmptyStruct,
1541 CapabilityStoreError,
1542 >,
1543 fdomain_client::fidl::FDomainResourceDialect,
1544 0x84b05577ceaec9e,
1545 >(_buf?)?
1546 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_keys")?;
1547 Ok(_response.map(|x| x))
1548 }
1549 self.client.send_query_and_decode::<
1550 CapabilityStoreDictionaryKeysRequest,
1551 CapabilityStoreDictionaryKeysResult,
1552 >(
1553 (id, iterator,),
1554 0x84b05577ceaec9e,
1555 fidl::encoding::DynamicFlags::FLEXIBLE,
1556 _decode,
1557 )
1558 }
1559
1560 type DictionaryEnumerateResponseFut = fidl::client::QueryResponseFut<
1561 CapabilityStoreDictionaryEnumerateResult,
1562 fdomain_client::fidl::FDomainResourceDialect,
1563 >;
1564 fn r#dictionary_enumerate(
1565 &self,
1566 mut id: u64,
1567 mut iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
1568 ) -> Self::DictionaryEnumerateResponseFut {
1569 fn _decode(
1570 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1571 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
1572 let _response = fidl::client::decode_transaction_body::<
1573 fidl::encoding::FlexibleResultType<
1574 fidl::encoding::EmptyStruct,
1575 CapabilityStoreError,
1576 >,
1577 fdomain_client::fidl::FDomainResourceDialect,
1578 0xd6279b6ced04641,
1579 >(_buf?)?
1580 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_enumerate")?;
1581 Ok(_response.map(|x| x))
1582 }
1583 self.client.send_query_and_decode::<
1584 CapabilityStoreDictionaryEnumerateRequest,
1585 CapabilityStoreDictionaryEnumerateResult,
1586 >(
1587 (id, iterator,),
1588 0xd6279b6ced04641,
1589 fidl::encoding::DynamicFlags::FLEXIBLE,
1590 _decode,
1591 )
1592 }
1593
1594 type DictionaryDrainResponseFut = fidl::client::QueryResponseFut<
1595 CapabilityStoreDictionaryDrainResult,
1596 fdomain_client::fidl::FDomainResourceDialect,
1597 >;
1598 fn r#dictionary_drain(
1599 &self,
1600 mut id: u64,
1601 mut iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
1602 ) -> Self::DictionaryDrainResponseFut {
1603 fn _decode(
1604 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1605 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
1606 let _response = fidl::client::decode_transaction_body::<
1607 fidl::encoding::FlexibleResultType<
1608 fidl::encoding::EmptyStruct,
1609 CapabilityStoreError,
1610 >,
1611 fdomain_client::fidl::FDomainResourceDialect,
1612 0x28a3a3f84d928cd8,
1613 >(_buf?)?
1614 .into_result_fdomain::<CapabilityStoreMarker>("dictionary_drain")?;
1615 Ok(_response.map(|x| x))
1616 }
1617 self.client.send_query_and_decode::<
1618 CapabilityStoreDictionaryDrainRequest,
1619 CapabilityStoreDictionaryDrainResult,
1620 >(
1621 (id, iterator,),
1622 0x28a3a3f84d928cd8,
1623 fidl::encoding::DynamicFlags::FLEXIBLE,
1624 _decode,
1625 )
1626 }
1627
1628 type CreateServiceAggregateResponseFut = fidl::client::QueryResponseFut<
1629 CapabilityStoreCreateServiceAggregateResult,
1630 fdomain_client::fidl::FDomainResourceDialect,
1631 >;
1632 fn r#create_service_aggregate(
1633 &self,
1634 mut sources: Vec<AggregateSource>,
1635 ) -> Self::CreateServiceAggregateResponseFut {
1636 fn _decode(
1637 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1638 ) -> Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error> {
1639 let _response = fidl::client::decode_transaction_body::<
1640 fidl::encoding::FlexibleResultType<
1641 CapabilityStoreCreateServiceAggregateResponse,
1642 CapabilityStoreError,
1643 >,
1644 fdomain_client::fidl::FDomainResourceDialect,
1645 0x4584116c8085885a,
1646 >(_buf?)?
1647 .into_result_fdomain::<CapabilityStoreMarker>("create_service_aggregate")?;
1648 Ok(_response.map(|x| x.aggregate_dir_connector))
1649 }
1650 self.client.send_query_and_decode::<
1651 CapabilityStoreCreateServiceAggregateRequest,
1652 CapabilityStoreCreateServiceAggregateResult,
1653 >(
1654 (sources.as_mut(),),
1655 0x4584116c8085885a,
1656 fidl::encoding::DynamicFlags::FLEXIBLE,
1657 _decode,
1658 )
1659 }
1660}
1661
1662pub struct CapabilityStoreEventStream {
1663 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1664}
1665
1666impl std::marker::Unpin for CapabilityStoreEventStream {}
1667
1668impl futures::stream::FusedStream for CapabilityStoreEventStream {
1669 fn is_terminated(&self) -> bool {
1670 self.event_receiver.is_terminated()
1671 }
1672}
1673
1674impl futures::Stream for CapabilityStoreEventStream {
1675 type Item = Result<CapabilityStoreEvent, fidl::Error>;
1676
1677 fn poll_next(
1678 mut self: std::pin::Pin<&mut Self>,
1679 cx: &mut std::task::Context<'_>,
1680 ) -> std::task::Poll<Option<Self::Item>> {
1681 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1682 &mut self.event_receiver,
1683 cx
1684 )?) {
1685 Some(buf) => std::task::Poll::Ready(Some(CapabilityStoreEvent::decode(buf))),
1686 None => std::task::Poll::Ready(None),
1687 }
1688 }
1689}
1690
1691#[derive(Debug)]
1692pub enum CapabilityStoreEvent {
1693 #[non_exhaustive]
1694 _UnknownEvent {
1695 ordinal: u64,
1697 },
1698}
1699
1700impl CapabilityStoreEvent {
1701 fn decode(
1703 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1704 ) -> Result<CapabilityStoreEvent, fidl::Error> {
1705 let (bytes, _handles) = buf.split_mut();
1706 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1707 debug_assert_eq!(tx_header.tx_id, 0);
1708 match tx_header.ordinal {
1709 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1710 Ok(CapabilityStoreEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1711 }
1712 _ => Err(fidl::Error::UnknownOrdinal {
1713 ordinal: tx_header.ordinal,
1714 protocol_name:
1715 <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1716 }),
1717 }
1718 }
1719}
1720
1721pub struct CapabilityStoreRequestStream {
1723 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1724 is_terminated: bool,
1725}
1726
1727impl std::marker::Unpin for CapabilityStoreRequestStream {}
1728
1729impl futures::stream::FusedStream for CapabilityStoreRequestStream {
1730 fn is_terminated(&self) -> bool {
1731 self.is_terminated
1732 }
1733}
1734
1735impl fdomain_client::fidl::RequestStream for CapabilityStoreRequestStream {
1736 type Protocol = CapabilityStoreMarker;
1737 type ControlHandle = CapabilityStoreControlHandle;
1738
1739 fn from_channel(channel: fdomain_client::Channel) -> Self {
1740 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1741 }
1742
1743 fn control_handle(&self) -> Self::ControlHandle {
1744 CapabilityStoreControlHandle { inner: self.inner.clone() }
1745 }
1746
1747 fn into_inner(
1748 self,
1749 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1750 {
1751 (self.inner, self.is_terminated)
1752 }
1753
1754 fn from_inner(
1755 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1756 is_terminated: bool,
1757 ) -> Self {
1758 Self { inner, is_terminated }
1759 }
1760}
1761
1762impl futures::Stream for CapabilityStoreRequestStream {
1763 type Item = Result<CapabilityStoreRequest, fidl::Error>;
1764
1765 fn poll_next(
1766 mut self: std::pin::Pin<&mut Self>,
1767 cx: &mut std::task::Context<'_>,
1768 ) -> std::task::Poll<Option<Self::Item>> {
1769 let this = &mut *self;
1770 if this.inner.check_shutdown(cx) {
1771 this.is_terminated = true;
1772 return std::task::Poll::Ready(None);
1773 }
1774 if this.is_terminated {
1775 panic!("polled CapabilityStoreRequestStream after completion");
1776 }
1777 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1778 |bytes, handles| {
1779 match this.inner.channel().read_etc(cx, bytes, handles) {
1780 std::task::Poll::Ready(Ok(())) => {}
1781 std::task::Poll::Pending => return std::task::Poll::Pending,
1782 std::task::Poll::Ready(Err(None)) => {
1783 this.is_terminated = true;
1784 return std::task::Poll::Ready(None);
1785 }
1786 std::task::Poll::Ready(Err(Some(e))) => {
1787 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1788 e.into(),
1789 ))));
1790 }
1791 }
1792
1793 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1795
1796 std::task::Poll::Ready(Some(match header.ordinal {
1797 0x5d5d35d9c20a2184 => {
1798 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1799 let mut req = fidl::new_empty!(CapabilityStoreDuplicateRequest, fdomain_client::fidl::FDomainResourceDialect);
1800 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDuplicateRequest>(&header, _body_bytes, handles, &mut req)?;
1801 let control_handle = CapabilityStoreControlHandle {
1802 inner: this.inner.clone(),
1803 };
1804 Ok(CapabilityStoreRequest::Duplicate {id: req.id,
1805dest_id: req.dest_id,
1806
1807 responder: CapabilityStoreDuplicateResponder {
1808 control_handle: std::mem::ManuallyDrop::new(control_handle),
1809 tx_id: header.tx_id,
1810 },
1811 })
1812 }
1813 0xa745c0990fc2559 => {
1814 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1815 let mut req = fidl::new_empty!(CapabilityStoreDropRequest, fdomain_client::fidl::FDomainResourceDialect);
1816 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDropRequest>(&header, _body_bytes, handles, &mut req)?;
1817 let control_handle = CapabilityStoreControlHandle {
1818 inner: this.inner.clone(),
1819 };
1820 Ok(CapabilityStoreRequest::Drop {id: req.id,
1821
1822 responder: CapabilityStoreDropResponder {
1823 control_handle: std::mem::ManuallyDrop::new(control_handle),
1824 tx_id: header.tx_id,
1825 },
1826 })
1827 }
1828 0x3237a8f4748faff => {
1829 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1830 let mut req = fidl::new_empty!(CapabilityStoreExportRequest, fdomain_client::fidl::FDomainResourceDialect);
1831 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreExportRequest>(&header, _body_bytes, handles, &mut req)?;
1832 let control_handle = CapabilityStoreControlHandle {
1833 inner: this.inner.clone(),
1834 };
1835 Ok(CapabilityStoreRequest::Export {id: req.id,
1836
1837 responder: CapabilityStoreExportResponder {
1838 control_handle: std::mem::ManuallyDrop::new(control_handle),
1839 tx_id: header.tx_id,
1840 },
1841 })
1842 }
1843 0x1f96157a29f4539b => {
1844 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1845 let mut req = fidl::new_empty!(CapabilityStoreImportRequest, fdomain_client::fidl::FDomainResourceDialect);
1846 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreImportRequest>(&header, _body_bytes, handles, &mut req)?;
1847 let control_handle = CapabilityStoreControlHandle {
1848 inner: this.inner.clone(),
1849 };
1850 Ok(CapabilityStoreRequest::Import {id: req.id,
1851capability: req.capability,
1852
1853 responder: CapabilityStoreImportResponder {
1854 control_handle: std::mem::ManuallyDrop::new(control_handle),
1855 tx_id: header.tx_id,
1856 },
1857 })
1858 }
1859 0x29592c5d63e91c25 => {
1860 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1861 let mut req = fidl::new_empty!(CapabilityStoreConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1862 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1863 let control_handle = CapabilityStoreControlHandle {
1864 inner: this.inner.clone(),
1865 };
1866 Ok(CapabilityStoreRequest::ConnectorCreate {id: req.id,
1867receiver: req.receiver,
1868
1869 responder: CapabilityStoreConnectorCreateResponder {
1870 control_handle: std::mem::ManuallyDrop::new(control_handle),
1871 tx_id: header.tx_id,
1872 },
1873 })
1874 }
1875 0x537e69ab40563b9f => {
1876 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1877 let mut req = fidl::new_empty!(CapabilityStoreConnectorOpenRequest, fdomain_client::fidl::FDomainResourceDialect);
1878 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
1879 let control_handle = CapabilityStoreControlHandle {
1880 inner: this.inner.clone(),
1881 };
1882 Ok(CapabilityStoreRequest::ConnectorOpen {id: req.id,
1883server_end: req.server_end,
1884
1885 responder: CapabilityStoreConnectorOpenResponder {
1886 control_handle: std::mem::ManuallyDrop::new(control_handle),
1887 tx_id: header.tx_id,
1888 },
1889 })
1890 }
1891 0x186138a11ccf19bb => {
1892 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1893 let mut req = fidl::new_empty!(CapabilityStoreDirConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1894 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDirConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1895 let control_handle = CapabilityStoreControlHandle {
1896 inner: this.inner.clone(),
1897 };
1898 Ok(CapabilityStoreRequest::DirConnectorCreate {id: req.id,
1899receiver: req.receiver,
1900
1901 responder: CapabilityStoreDirConnectorCreateResponder {
1902 control_handle: std::mem::ManuallyDrop::new(control_handle),
1903 tx_id: header.tx_id,
1904 },
1905 })
1906 }
1907 0x5650d3d6a3a13901 => {
1908 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1909 let mut req = fidl::new_empty!(CapabilityStoreDirConnectorOpenRequest, fdomain_client::fidl::FDomainResourceDialect);
1910 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDirConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
1911 let control_handle = CapabilityStoreControlHandle {
1912 inner: this.inner.clone(),
1913 };
1914 Ok(CapabilityStoreRequest::DirConnectorOpen {payload: req,
1915 responder: CapabilityStoreDirConnectorOpenResponder {
1916 control_handle: std::mem::ManuallyDrop::new(control_handle),
1917 tx_id: header.tx_id,
1918 },
1919 })
1920 }
1921 0x6997c8dfc63de093 => {
1922 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1923 let mut req = fidl::new_empty!(CapabilityStoreDictionaryCreateRequest, fdomain_client::fidl::FDomainResourceDialect);
1924 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryCreateRequest>(&header, _body_bytes, handles, &mut req)?;
1925 let control_handle = CapabilityStoreControlHandle {
1926 inner: this.inner.clone(),
1927 };
1928 Ok(CapabilityStoreRequest::DictionaryCreate {id: req.id,
1929
1930 responder: CapabilityStoreDictionaryCreateResponder {
1931 control_handle: std::mem::ManuallyDrop::new(control_handle),
1932 tx_id: header.tx_id,
1933 },
1934 })
1935 }
1936 0x72fd686c37b6025f => {
1937 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1938 let mut req = fidl::new_empty!(CapabilityStoreDictionaryLegacyImportRequest, fdomain_client::fidl::FDomainResourceDialect);
1939 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyImportRequest>(&header, _body_bytes, handles, &mut req)?;
1940 let control_handle = CapabilityStoreControlHandle {
1941 inner: this.inner.clone(),
1942 };
1943 Ok(CapabilityStoreRequest::DictionaryLegacyImport {id: req.id,
1944client_end: req.client_end,
1945
1946 responder: CapabilityStoreDictionaryLegacyImportResponder {
1947 control_handle: std::mem::ManuallyDrop::new(control_handle),
1948 tx_id: header.tx_id,
1949 },
1950 })
1951 }
1952 0x407e15cc4bde5dcd => {
1953 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1954 let mut req = fidl::new_empty!(CapabilityStoreDictionaryLegacyExportRequest, fdomain_client::fidl::FDomainResourceDialect);
1955 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyExportRequest>(&header, _body_bytes, handles, &mut req)?;
1956 let control_handle = CapabilityStoreControlHandle {
1957 inner: this.inner.clone(),
1958 };
1959 Ok(CapabilityStoreRequest::DictionaryLegacyExport {id: req.id,
1960server_end: req.server_end,
1961
1962 responder: CapabilityStoreDictionaryLegacyExportResponder {
1963 control_handle: std::mem::ManuallyDrop::new(control_handle),
1964 tx_id: header.tx_id,
1965 },
1966 })
1967 }
1968 0x7702183689d44c27 => {
1969 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1970 let mut req = fidl::new_empty!(CapabilityStoreDictionaryInsertRequest, fdomain_client::fidl::FDomainResourceDialect);
1971 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryInsertRequest>(&header, _body_bytes, handles, &mut req)?;
1972 let control_handle = CapabilityStoreControlHandle {
1973 inner: this.inner.clone(),
1974 };
1975 Ok(CapabilityStoreRequest::DictionaryInsert {id: req.id,
1976item: req.item,
1977
1978 responder: CapabilityStoreDictionaryInsertResponder {
1979 control_handle: std::mem::ManuallyDrop::new(control_handle),
1980 tx_id: header.tx_id,
1981 },
1982 })
1983 }
1984 0x4d9e27538284add2 => {
1985 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1986 let mut req = fidl::new_empty!(CapabilityStoreDictionaryGetRequest, fdomain_client::fidl::FDomainResourceDialect);
1987 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryGetRequest>(&header, _body_bytes, handles, &mut req)?;
1988 let control_handle = CapabilityStoreControlHandle {
1989 inner: this.inner.clone(),
1990 };
1991 Ok(CapabilityStoreRequest::DictionaryGet {id: req.id,
1992key: req.key,
1993dest_id: req.dest_id,
1994
1995 responder: CapabilityStoreDictionaryGetResponder {
1996 control_handle: std::mem::ManuallyDrop::new(control_handle),
1997 tx_id: header.tx_id,
1998 },
1999 })
2000 }
2001 0x4c5c025ab05d4f3 => {
2002 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2003 let mut req = fidl::new_empty!(CapabilityStoreDictionaryRemoveRequest, fdomain_client::fidl::FDomainResourceDialect);
2004 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryRemoveRequest>(&header, _body_bytes, handles, &mut req)?;
2005 let control_handle = CapabilityStoreControlHandle {
2006 inner: this.inner.clone(),
2007 };
2008 Ok(CapabilityStoreRequest::DictionaryRemove {id: req.id,
2009key: req.key,
2010dest_id: req.dest_id,
2011
2012 responder: CapabilityStoreDictionaryRemoveResponder {
2013 control_handle: std::mem::ManuallyDrop::new(control_handle),
2014 tx_id: header.tx_id,
2015 },
2016 })
2017 }
2018 0x3733ecdf4ea1b44f => {
2019 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2020 let mut req = fidl::new_empty!(CapabilityStoreDictionaryCopyRequest, fdomain_client::fidl::FDomainResourceDialect);
2021 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryCopyRequest>(&header, _body_bytes, handles, &mut req)?;
2022 let control_handle = CapabilityStoreControlHandle {
2023 inner: this.inner.clone(),
2024 };
2025 Ok(CapabilityStoreRequest::DictionaryCopy {id: req.id,
2026dest_id: req.dest_id,
2027
2028 responder: CapabilityStoreDictionaryCopyResponder {
2029 control_handle: std::mem::ManuallyDrop::new(control_handle),
2030 tx_id: header.tx_id,
2031 },
2032 })
2033 }
2034 0x84b05577ceaec9e => {
2035 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2036 let mut req = fidl::new_empty!(CapabilityStoreDictionaryKeysRequest, fdomain_client::fidl::FDomainResourceDialect);
2037 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryKeysRequest>(&header, _body_bytes, handles, &mut req)?;
2038 let control_handle = CapabilityStoreControlHandle {
2039 inner: this.inner.clone(),
2040 };
2041 Ok(CapabilityStoreRequest::DictionaryKeys {id: req.id,
2042iterator: req.iterator,
2043
2044 responder: CapabilityStoreDictionaryKeysResponder {
2045 control_handle: std::mem::ManuallyDrop::new(control_handle),
2046 tx_id: header.tx_id,
2047 },
2048 })
2049 }
2050 0xd6279b6ced04641 => {
2051 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2052 let mut req = fidl::new_empty!(CapabilityStoreDictionaryEnumerateRequest, fdomain_client::fidl::FDomainResourceDialect);
2053 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
2054 let control_handle = CapabilityStoreControlHandle {
2055 inner: this.inner.clone(),
2056 };
2057 Ok(CapabilityStoreRequest::DictionaryEnumerate {id: req.id,
2058iterator: req.iterator,
2059
2060 responder: CapabilityStoreDictionaryEnumerateResponder {
2061 control_handle: std::mem::ManuallyDrop::new(control_handle),
2062 tx_id: header.tx_id,
2063 },
2064 })
2065 }
2066 0x28a3a3f84d928cd8 => {
2067 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2068 let mut req = fidl::new_empty!(CapabilityStoreDictionaryDrainRequest, fdomain_client::fidl::FDomainResourceDialect);
2069 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreDictionaryDrainRequest>(&header, _body_bytes, handles, &mut req)?;
2070 let control_handle = CapabilityStoreControlHandle {
2071 inner: this.inner.clone(),
2072 };
2073 Ok(CapabilityStoreRequest::DictionaryDrain {id: req.id,
2074iterator: req.iterator,
2075
2076 responder: CapabilityStoreDictionaryDrainResponder {
2077 control_handle: std::mem::ManuallyDrop::new(control_handle),
2078 tx_id: header.tx_id,
2079 },
2080 })
2081 }
2082 0x4584116c8085885a => {
2083 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2084 let mut req = fidl::new_empty!(CapabilityStoreCreateServiceAggregateRequest, fdomain_client::fidl::FDomainResourceDialect);
2085 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CapabilityStoreCreateServiceAggregateRequest>(&header, _body_bytes, handles, &mut req)?;
2086 let control_handle = CapabilityStoreControlHandle {
2087 inner: this.inner.clone(),
2088 };
2089 Ok(CapabilityStoreRequest::CreateServiceAggregate {sources: req.sources,
2090
2091 responder: CapabilityStoreCreateServiceAggregateResponder {
2092 control_handle: std::mem::ManuallyDrop::new(control_handle),
2093 tx_id: header.tx_id,
2094 },
2095 })
2096 }
2097 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2098 Ok(CapabilityStoreRequest::_UnknownMethod {
2099 ordinal: header.ordinal,
2100 control_handle: CapabilityStoreControlHandle { inner: this.inner.clone() },
2101 method_type: fidl::MethodType::OneWay,
2102 })
2103 }
2104 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2105 this.inner.send_framework_err(
2106 fidl::encoding::FrameworkErr::UnknownMethod,
2107 header.tx_id,
2108 header.ordinal,
2109 header.dynamic_flags(),
2110 (bytes, handles),
2111 )?;
2112 Ok(CapabilityStoreRequest::_UnknownMethod {
2113 ordinal: header.ordinal,
2114 control_handle: CapabilityStoreControlHandle { inner: this.inner.clone() },
2115 method_type: fidl::MethodType::TwoWay,
2116 })
2117 }
2118 _ => Err(fidl::Error::UnknownOrdinal {
2119 ordinal: header.ordinal,
2120 protocol_name: <CapabilityStoreMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2121 }),
2122 }))
2123 },
2124 )
2125 }
2126}
2127
2128#[derive(Debug)]
2152pub enum CapabilityStoreRequest {
2153 Duplicate { id: u64, dest_id: u64, responder: CapabilityStoreDuplicateResponder },
2161 Drop { id: u64, responder: CapabilityStoreDropResponder },
2167 Export { id: u64, responder: CapabilityStoreExportResponder },
2175 Import { id: u64, capability: Capability, responder: CapabilityStoreImportResponder },
2182 ConnectorCreate {
2189 id: u64,
2190 receiver: fdomain_client::fidl::ClientEnd<ReceiverMarker>,
2191 responder: CapabilityStoreConnectorCreateResponder,
2192 },
2193 ConnectorOpen {
2203 id: u64,
2204 server_end: fdomain_client::Channel,
2205 responder: CapabilityStoreConnectorOpenResponder,
2206 },
2207 DirConnectorCreate {
2214 id: u64,
2215 receiver: fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
2216 responder: CapabilityStoreDirConnectorCreateResponder,
2217 },
2218 DirConnectorOpen {
2232 payload: CapabilityStoreDirConnectorOpenRequest,
2233 responder: CapabilityStoreDirConnectorOpenResponder,
2234 },
2235 DictionaryCreate { id: u64, responder: CapabilityStoreDictionaryCreateResponder },
2241 DictionaryLegacyImport {
2251 id: u64,
2252 client_end: fdomain_client::Channel,
2253 responder: CapabilityStoreDictionaryLegacyImportResponder,
2254 },
2255 DictionaryLegacyExport {
2265 id: u64,
2266 server_end: fdomain_client::Channel,
2267 responder: CapabilityStoreDictionaryLegacyExportResponder,
2268 },
2269 DictionaryInsert {
2279 id: u64,
2280 item: DictionaryItem,
2281 responder: CapabilityStoreDictionaryInsertResponder,
2282 },
2283 DictionaryGet {
2295 id: u64,
2296 key: String,
2297 dest_id: u64,
2298 responder: CapabilityStoreDictionaryGetResponder,
2299 },
2300 DictionaryRemove {
2311 id: u64,
2312 key: String,
2313 dest_id: Option<Box<WrappedCapabilityId>>,
2314 responder: CapabilityStoreDictionaryRemoveResponder,
2315 },
2316 DictionaryCopy { id: u64, dest_id: u64, responder: CapabilityStoreDictionaryCopyResponder },
2332 DictionaryKeys {
2339 id: u64,
2340 iterator: fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
2341 responder: CapabilityStoreDictionaryKeysResponder,
2342 },
2343 DictionaryEnumerate {
2353 id: u64,
2354 iterator: fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
2355 responder: CapabilityStoreDictionaryEnumerateResponder,
2356 },
2357 DictionaryDrain {
2365 id: u64,
2366 iterator: Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
2367 responder: CapabilityStoreDictionaryDrainResponder,
2368 },
2369 CreateServiceAggregate {
2372 sources: Vec<AggregateSource>,
2373 responder: CapabilityStoreCreateServiceAggregateResponder,
2374 },
2375 #[non_exhaustive]
2377 _UnknownMethod {
2378 ordinal: u64,
2380 control_handle: CapabilityStoreControlHandle,
2381 method_type: fidl::MethodType,
2382 },
2383}
2384
2385impl CapabilityStoreRequest {
2386 #[allow(irrefutable_let_patterns)]
2387 pub fn into_duplicate(self) -> Option<(u64, u64, CapabilityStoreDuplicateResponder)> {
2388 if let CapabilityStoreRequest::Duplicate { id, dest_id, responder } = self {
2389 Some((id, dest_id, responder))
2390 } else {
2391 None
2392 }
2393 }
2394
2395 #[allow(irrefutable_let_patterns)]
2396 pub fn into_drop(self) -> Option<(u64, CapabilityStoreDropResponder)> {
2397 if let CapabilityStoreRequest::Drop { id, responder } = self {
2398 Some((id, responder))
2399 } else {
2400 None
2401 }
2402 }
2403
2404 #[allow(irrefutable_let_patterns)]
2405 pub fn into_export(self) -> Option<(u64, CapabilityStoreExportResponder)> {
2406 if let CapabilityStoreRequest::Export { id, responder } = self {
2407 Some((id, responder))
2408 } else {
2409 None
2410 }
2411 }
2412
2413 #[allow(irrefutable_let_patterns)]
2414 pub fn into_import(self) -> Option<(u64, Capability, CapabilityStoreImportResponder)> {
2415 if let CapabilityStoreRequest::Import { id, capability, responder } = self {
2416 Some((id, capability, responder))
2417 } else {
2418 None
2419 }
2420 }
2421
2422 #[allow(irrefutable_let_patterns)]
2423 pub fn into_connector_create(
2424 self,
2425 ) -> Option<(
2426 u64,
2427 fdomain_client::fidl::ClientEnd<ReceiverMarker>,
2428 CapabilityStoreConnectorCreateResponder,
2429 )> {
2430 if let CapabilityStoreRequest::ConnectorCreate { id, receiver, responder } = self {
2431 Some((id, receiver, responder))
2432 } else {
2433 None
2434 }
2435 }
2436
2437 #[allow(irrefutable_let_patterns)]
2438 pub fn into_connector_open(
2439 self,
2440 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreConnectorOpenResponder)> {
2441 if let CapabilityStoreRequest::ConnectorOpen { id, server_end, responder } = self {
2442 Some((id, server_end, responder))
2443 } else {
2444 None
2445 }
2446 }
2447
2448 #[allow(irrefutable_let_patterns)]
2449 pub fn into_dir_connector_create(
2450 self,
2451 ) -> Option<(
2452 u64,
2453 fdomain_client::fidl::ClientEnd<DirReceiverMarker>,
2454 CapabilityStoreDirConnectorCreateResponder,
2455 )> {
2456 if let CapabilityStoreRequest::DirConnectorCreate { id, receiver, responder } = self {
2457 Some((id, receiver, responder))
2458 } else {
2459 None
2460 }
2461 }
2462
2463 #[allow(irrefutable_let_patterns)]
2464 pub fn into_dir_connector_open(
2465 self,
2466 ) -> Option<(CapabilityStoreDirConnectorOpenRequest, CapabilityStoreDirConnectorOpenResponder)>
2467 {
2468 if let CapabilityStoreRequest::DirConnectorOpen { payload, responder } = self {
2469 Some((payload, responder))
2470 } else {
2471 None
2472 }
2473 }
2474
2475 #[allow(irrefutable_let_patterns)]
2476 pub fn into_dictionary_create(self) -> Option<(u64, CapabilityStoreDictionaryCreateResponder)> {
2477 if let CapabilityStoreRequest::DictionaryCreate { id, responder } = self {
2478 Some((id, responder))
2479 } else {
2480 None
2481 }
2482 }
2483
2484 #[allow(irrefutable_let_patterns)]
2485 pub fn into_dictionary_legacy_import(
2486 self,
2487 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreDictionaryLegacyImportResponder)>
2488 {
2489 if let CapabilityStoreRequest::DictionaryLegacyImport { id, client_end, responder } = self {
2490 Some((id, client_end, responder))
2491 } else {
2492 None
2493 }
2494 }
2495
2496 #[allow(irrefutable_let_patterns)]
2497 pub fn into_dictionary_legacy_export(
2498 self,
2499 ) -> Option<(u64, fdomain_client::Channel, CapabilityStoreDictionaryLegacyExportResponder)>
2500 {
2501 if let CapabilityStoreRequest::DictionaryLegacyExport { id, server_end, responder } = self {
2502 Some((id, server_end, responder))
2503 } else {
2504 None
2505 }
2506 }
2507
2508 #[allow(irrefutable_let_patterns)]
2509 pub fn into_dictionary_insert(
2510 self,
2511 ) -> Option<(u64, DictionaryItem, CapabilityStoreDictionaryInsertResponder)> {
2512 if let CapabilityStoreRequest::DictionaryInsert { id, item, responder } = self {
2513 Some((id, item, responder))
2514 } else {
2515 None
2516 }
2517 }
2518
2519 #[allow(irrefutable_let_patterns)]
2520 pub fn into_dictionary_get(
2521 self,
2522 ) -> Option<(u64, String, u64, CapabilityStoreDictionaryGetResponder)> {
2523 if let CapabilityStoreRequest::DictionaryGet { id, key, dest_id, responder } = self {
2524 Some((id, key, dest_id, responder))
2525 } else {
2526 None
2527 }
2528 }
2529
2530 #[allow(irrefutable_let_patterns)]
2531 pub fn into_dictionary_remove(
2532 self,
2533 ) -> Option<(
2534 u64,
2535 String,
2536 Option<Box<WrappedCapabilityId>>,
2537 CapabilityStoreDictionaryRemoveResponder,
2538 )> {
2539 if let CapabilityStoreRequest::DictionaryRemove { id, key, dest_id, responder } = self {
2540 Some((id, key, dest_id, responder))
2541 } else {
2542 None
2543 }
2544 }
2545
2546 #[allow(irrefutable_let_patterns)]
2547 pub fn into_dictionary_copy(
2548 self,
2549 ) -> Option<(u64, u64, CapabilityStoreDictionaryCopyResponder)> {
2550 if let CapabilityStoreRequest::DictionaryCopy { id, dest_id, responder } = self {
2551 Some((id, dest_id, responder))
2552 } else {
2553 None
2554 }
2555 }
2556
2557 #[allow(irrefutable_let_patterns)]
2558 pub fn into_dictionary_keys(
2559 self,
2560 ) -> Option<(
2561 u64,
2562 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
2563 CapabilityStoreDictionaryKeysResponder,
2564 )> {
2565 if let CapabilityStoreRequest::DictionaryKeys { id, iterator, responder } = self {
2566 Some((id, iterator, responder))
2567 } else {
2568 None
2569 }
2570 }
2571
2572 #[allow(irrefutable_let_patterns)]
2573 pub fn into_dictionary_enumerate(
2574 self,
2575 ) -> Option<(
2576 u64,
2577 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
2578 CapabilityStoreDictionaryEnumerateResponder,
2579 )> {
2580 if let CapabilityStoreRequest::DictionaryEnumerate { id, iterator, responder } = self {
2581 Some((id, iterator, responder))
2582 } else {
2583 None
2584 }
2585 }
2586
2587 #[allow(irrefutable_let_patterns)]
2588 pub fn into_dictionary_drain(
2589 self,
2590 ) -> Option<(
2591 u64,
2592 Option<fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>>,
2593 CapabilityStoreDictionaryDrainResponder,
2594 )> {
2595 if let CapabilityStoreRequest::DictionaryDrain { id, iterator, responder } = self {
2596 Some((id, iterator, responder))
2597 } else {
2598 None
2599 }
2600 }
2601
2602 #[allow(irrefutable_let_patterns)]
2603 pub fn into_create_service_aggregate(
2604 self,
2605 ) -> Option<(Vec<AggregateSource>, CapabilityStoreCreateServiceAggregateResponder)> {
2606 if let CapabilityStoreRequest::CreateServiceAggregate { sources, responder } = self {
2607 Some((sources, responder))
2608 } else {
2609 None
2610 }
2611 }
2612
2613 pub fn method_name(&self) -> &'static str {
2615 match *self {
2616 CapabilityStoreRequest::Duplicate { .. } => "duplicate",
2617 CapabilityStoreRequest::Drop { .. } => "drop",
2618 CapabilityStoreRequest::Export { .. } => "export",
2619 CapabilityStoreRequest::Import { .. } => "import",
2620 CapabilityStoreRequest::ConnectorCreate { .. } => "connector_create",
2621 CapabilityStoreRequest::ConnectorOpen { .. } => "connector_open",
2622 CapabilityStoreRequest::DirConnectorCreate { .. } => "dir_connector_create",
2623 CapabilityStoreRequest::DirConnectorOpen { .. } => "dir_connector_open",
2624 CapabilityStoreRequest::DictionaryCreate { .. } => "dictionary_create",
2625 CapabilityStoreRequest::DictionaryLegacyImport { .. } => "dictionary_legacy_import",
2626 CapabilityStoreRequest::DictionaryLegacyExport { .. } => "dictionary_legacy_export",
2627 CapabilityStoreRequest::DictionaryInsert { .. } => "dictionary_insert",
2628 CapabilityStoreRequest::DictionaryGet { .. } => "dictionary_get",
2629 CapabilityStoreRequest::DictionaryRemove { .. } => "dictionary_remove",
2630 CapabilityStoreRequest::DictionaryCopy { .. } => "dictionary_copy",
2631 CapabilityStoreRequest::DictionaryKeys { .. } => "dictionary_keys",
2632 CapabilityStoreRequest::DictionaryEnumerate { .. } => "dictionary_enumerate",
2633 CapabilityStoreRequest::DictionaryDrain { .. } => "dictionary_drain",
2634 CapabilityStoreRequest::CreateServiceAggregate { .. } => "create_service_aggregate",
2635 CapabilityStoreRequest::_UnknownMethod {
2636 method_type: fidl::MethodType::OneWay,
2637 ..
2638 } => "unknown one-way method",
2639 CapabilityStoreRequest::_UnknownMethod {
2640 method_type: fidl::MethodType::TwoWay,
2641 ..
2642 } => "unknown two-way method",
2643 }
2644 }
2645}
2646
2647#[derive(Debug, Clone)]
2648pub struct CapabilityStoreControlHandle {
2649 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2650}
2651
2652impl CapabilityStoreControlHandle {
2653 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
2654 self.inner.shutdown_with_epitaph(status.into())
2655 }
2656}
2657
2658impl fdomain_client::fidl::ControlHandle for CapabilityStoreControlHandle {
2659 fn shutdown(&self) {
2660 self.inner.shutdown()
2661 }
2662
2663 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
2664 self.inner.shutdown_with_epitaph(status)
2665 }
2666
2667 fn is_closed(&self) -> bool {
2668 self.inner.channel().is_closed()
2669 }
2670 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
2671 self.inner.channel().on_closed()
2672 }
2673}
2674
2675impl CapabilityStoreControlHandle {}
2676
2677#[must_use = "FIDL methods require a response to be sent"]
2678#[derive(Debug)]
2679pub struct CapabilityStoreDuplicateResponder {
2680 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2681 tx_id: u32,
2682}
2683
2684impl std::ops::Drop for CapabilityStoreDuplicateResponder {
2688 fn drop(&mut self) {
2689 self.control_handle.shutdown();
2690 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2692 }
2693}
2694
2695impl fdomain_client::fidl::Responder for CapabilityStoreDuplicateResponder {
2696 type ControlHandle = CapabilityStoreControlHandle;
2697
2698 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2699 &self.control_handle
2700 }
2701
2702 fn drop_without_shutdown(mut self) {
2703 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2705 std::mem::forget(self);
2707 }
2708}
2709
2710impl CapabilityStoreDuplicateResponder {
2711 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2715 let _result = self.send_raw(result);
2716 if _result.is_err() {
2717 self.control_handle.shutdown();
2718 }
2719 self.drop_without_shutdown();
2720 _result
2721 }
2722
2723 pub fn send_no_shutdown_on_err(
2725 self,
2726 mut result: Result<(), CapabilityStoreError>,
2727 ) -> Result<(), fidl::Error> {
2728 let _result = self.send_raw(result);
2729 self.drop_without_shutdown();
2730 _result
2731 }
2732
2733 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2734 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2735 fidl::encoding::EmptyStruct,
2736 CapabilityStoreError,
2737 >>(
2738 fidl::encoding::FlexibleResult::new(result),
2739 self.tx_id,
2740 0x5d5d35d9c20a2184,
2741 fidl::encoding::DynamicFlags::FLEXIBLE,
2742 )
2743 }
2744}
2745
2746#[must_use = "FIDL methods require a response to be sent"]
2747#[derive(Debug)]
2748pub struct CapabilityStoreDropResponder {
2749 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2750 tx_id: u32,
2751}
2752
2753impl std::ops::Drop for CapabilityStoreDropResponder {
2757 fn drop(&mut self) {
2758 self.control_handle.shutdown();
2759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2761 }
2762}
2763
2764impl fdomain_client::fidl::Responder for CapabilityStoreDropResponder {
2765 type ControlHandle = CapabilityStoreControlHandle;
2766
2767 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2768 &self.control_handle
2769 }
2770
2771 fn drop_without_shutdown(mut self) {
2772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2774 std::mem::forget(self);
2776 }
2777}
2778
2779impl CapabilityStoreDropResponder {
2780 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2784 let _result = self.send_raw(result);
2785 if _result.is_err() {
2786 self.control_handle.shutdown();
2787 }
2788 self.drop_without_shutdown();
2789 _result
2790 }
2791
2792 pub fn send_no_shutdown_on_err(
2794 self,
2795 mut result: Result<(), CapabilityStoreError>,
2796 ) -> Result<(), fidl::Error> {
2797 let _result = self.send_raw(result);
2798 self.drop_without_shutdown();
2799 _result
2800 }
2801
2802 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2803 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2804 fidl::encoding::EmptyStruct,
2805 CapabilityStoreError,
2806 >>(
2807 fidl::encoding::FlexibleResult::new(result),
2808 self.tx_id,
2809 0xa745c0990fc2559,
2810 fidl::encoding::DynamicFlags::FLEXIBLE,
2811 )
2812 }
2813}
2814
2815#[must_use = "FIDL methods require a response to be sent"]
2816#[derive(Debug)]
2817pub struct CapabilityStoreExportResponder {
2818 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2819 tx_id: u32,
2820}
2821
2822impl std::ops::Drop for CapabilityStoreExportResponder {
2826 fn drop(&mut self) {
2827 self.control_handle.shutdown();
2828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2830 }
2831}
2832
2833impl fdomain_client::fidl::Responder for CapabilityStoreExportResponder {
2834 type ControlHandle = CapabilityStoreControlHandle;
2835
2836 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2837 &self.control_handle
2838 }
2839
2840 fn drop_without_shutdown(mut self) {
2841 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2843 std::mem::forget(self);
2845 }
2846}
2847
2848impl CapabilityStoreExportResponder {
2849 pub fn send(
2853 self,
2854 mut result: Result<Capability, CapabilityStoreError>,
2855 ) -> Result<(), fidl::Error> {
2856 let _result = self.send_raw(result);
2857 if _result.is_err() {
2858 self.control_handle.shutdown();
2859 }
2860 self.drop_without_shutdown();
2861 _result
2862 }
2863
2864 pub fn send_no_shutdown_on_err(
2866 self,
2867 mut result: Result<Capability, CapabilityStoreError>,
2868 ) -> Result<(), fidl::Error> {
2869 let _result = self.send_raw(result);
2870 self.drop_without_shutdown();
2871 _result
2872 }
2873
2874 fn send_raw(
2875 &self,
2876 mut result: Result<Capability, CapabilityStoreError>,
2877 ) -> Result<(), fidl::Error> {
2878 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2879 CapabilityStoreExportResponse,
2880 CapabilityStoreError,
2881 >>(
2882 fidl::encoding::FlexibleResult::new(
2883 result.as_mut().map_err(|e| *e).map(|capability| (capability,)),
2884 ),
2885 self.tx_id,
2886 0x3237a8f4748faff,
2887 fidl::encoding::DynamicFlags::FLEXIBLE,
2888 )
2889 }
2890}
2891
2892#[must_use = "FIDL methods require a response to be sent"]
2893#[derive(Debug)]
2894pub struct CapabilityStoreImportResponder {
2895 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2896 tx_id: u32,
2897}
2898
2899impl std::ops::Drop for CapabilityStoreImportResponder {
2903 fn drop(&mut self) {
2904 self.control_handle.shutdown();
2905 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2907 }
2908}
2909
2910impl fdomain_client::fidl::Responder for CapabilityStoreImportResponder {
2911 type ControlHandle = CapabilityStoreControlHandle;
2912
2913 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2914 &self.control_handle
2915 }
2916
2917 fn drop_without_shutdown(mut self) {
2918 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2920 std::mem::forget(self);
2922 }
2923}
2924
2925impl CapabilityStoreImportResponder {
2926 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2930 let _result = self.send_raw(result);
2931 if _result.is_err() {
2932 self.control_handle.shutdown();
2933 }
2934 self.drop_without_shutdown();
2935 _result
2936 }
2937
2938 pub fn send_no_shutdown_on_err(
2940 self,
2941 mut result: Result<(), CapabilityStoreError>,
2942 ) -> Result<(), fidl::Error> {
2943 let _result = self.send_raw(result);
2944 self.drop_without_shutdown();
2945 _result
2946 }
2947
2948 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2949 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2950 fidl::encoding::EmptyStruct,
2951 CapabilityStoreError,
2952 >>(
2953 fidl::encoding::FlexibleResult::new(result),
2954 self.tx_id,
2955 0x1f96157a29f4539b,
2956 fidl::encoding::DynamicFlags::FLEXIBLE,
2957 )
2958 }
2959}
2960
2961#[must_use = "FIDL methods require a response to be sent"]
2962#[derive(Debug)]
2963pub struct CapabilityStoreConnectorCreateResponder {
2964 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
2965 tx_id: u32,
2966}
2967
2968impl std::ops::Drop for CapabilityStoreConnectorCreateResponder {
2972 fn drop(&mut self) {
2973 self.control_handle.shutdown();
2974 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2976 }
2977}
2978
2979impl fdomain_client::fidl::Responder for CapabilityStoreConnectorCreateResponder {
2980 type ControlHandle = CapabilityStoreControlHandle;
2981
2982 fn control_handle(&self) -> &CapabilityStoreControlHandle {
2983 &self.control_handle
2984 }
2985
2986 fn drop_without_shutdown(mut self) {
2987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2989 std::mem::forget(self);
2991 }
2992}
2993
2994impl CapabilityStoreConnectorCreateResponder {
2995 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
2999 let _result = self.send_raw(result);
3000 if _result.is_err() {
3001 self.control_handle.shutdown();
3002 }
3003 self.drop_without_shutdown();
3004 _result
3005 }
3006
3007 pub fn send_no_shutdown_on_err(
3009 self,
3010 mut result: Result<(), CapabilityStoreError>,
3011 ) -> Result<(), fidl::Error> {
3012 let _result = self.send_raw(result);
3013 self.drop_without_shutdown();
3014 _result
3015 }
3016
3017 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3018 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3019 fidl::encoding::EmptyStruct,
3020 CapabilityStoreError,
3021 >>(
3022 fidl::encoding::FlexibleResult::new(result),
3023 self.tx_id,
3024 0x29592c5d63e91c25,
3025 fidl::encoding::DynamicFlags::FLEXIBLE,
3026 )
3027 }
3028}
3029
3030#[must_use = "FIDL methods require a response to be sent"]
3031#[derive(Debug)]
3032pub struct CapabilityStoreConnectorOpenResponder {
3033 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3034 tx_id: u32,
3035}
3036
3037impl std::ops::Drop for CapabilityStoreConnectorOpenResponder {
3041 fn drop(&mut self) {
3042 self.control_handle.shutdown();
3043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3045 }
3046}
3047
3048impl fdomain_client::fidl::Responder for CapabilityStoreConnectorOpenResponder {
3049 type ControlHandle = CapabilityStoreControlHandle;
3050
3051 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3052 &self.control_handle
3053 }
3054
3055 fn drop_without_shutdown(mut self) {
3056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3058 std::mem::forget(self);
3060 }
3061}
3062
3063impl CapabilityStoreConnectorOpenResponder {
3064 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3068 let _result = self.send_raw(result);
3069 if _result.is_err() {
3070 self.control_handle.shutdown();
3071 }
3072 self.drop_without_shutdown();
3073 _result
3074 }
3075
3076 pub fn send_no_shutdown_on_err(
3078 self,
3079 mut result: Result<(), CapabilityStoreError>,
3080 ) -> Result<(), fidl::Error> {
3081 let _result = self.send_raw(result);
3082 self.drop_without_shutdown();
3083 _result
3084 }
3085
3086 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3087 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3088 fidl::encoding::EmptyStruct,
3089 CapabilityStoreError,
3090 >>(
3091 fidl::encoding::FlexibleResult::new(result),
3092 self.tx_id,
3093 0x537e69ab40563b9f,
3094 fidl::encoding::DynamicFlags::FLEXIBLE,
3095 )
3096 }
3097}
3098
3099#[must_use = "FIDL methods require a response to be sent"]
3100#[derive(Debug)]
3101pub struct CapabilityStoreDirConnectorCreateResponder {
3102 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3103 tx_id: u32,
3104}
3105
3106impl std::ops::Drop for CapabilityStoreDirConnectorCreateResponder {
3110 fn drop(&mut self) {
3111 self.control_handle.shutdown();
3112 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3114 }
3115}
3116
3117impl fdomain_client::fidl::Responder for CapabilityStoreDirConnectorCreateResponder {
3118 type ControlHandle = CapabilityStoreControlHandle;
3119
3120 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3121 &self.control_handle
3122 }
3123
3124 fn drop_without_shutdown(mut self) {
3125 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3127 std::mem::forget(self);
3129 }
3130}
3131
3132impl CapabilityStoreDirConnectorCreateResponder {
3133 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3137 let _result = self.send_raw(result);
3138 if _result.is_err() {
3139 self.control_handle.shutdown();
3140 }
3141 self.drop_without_shutdown();
3142 _result
3143 }
3144
3145 pub fn send_no_shutdown_on_err(
3147 self,
3148 mut result: Result<(), CapabilityStoreError>,
3149 ) -> Result<(), fidl::Error> {
3150 let _result = self.send_raw(result);
3151 self.drop_without_shutdown();
3152 _result
3153 }
3154
3155 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3156 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3157 fidl::encoding::EmptyStruct,
3158 CapabilityStoreError,
3159 >>(
3160 fidl::encoding::FlexibleResult::new(result),
3161 self.tx_id,
3162 0x186138a11ccf19bb,
3163 fidl::encoding::DynamicFlags::FLEXIBLE,
3164 )
3165 }
3166}
3167
3168#[must_use = "FIDL methods require a response to be sent"]
3169#[derive(Debug)]
3170pub struct CapabilityStoreDirConnectorOpenResponder {
3171 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3172 tx_id: u32,
3173}
3174
3175impl std::ops::Drop for CapabilityStoreDirConnectorOpenResponder {
3179 fn drop(&mut self) {
3180 self.control_handle.shutdown();
3181 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3183 }
3184}
3185
3186impl fdomain_client::fidl::Responder for CapabilityStoreDirConnectorOpenResponder {
3187 type ControlHandle = CapabilityStoreControlHandle;
3188
3189 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3190 &self.control_handle
3191 }
3192
3193 fn drop_without_shutdown(mut self) {
3194 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3196 std::mem::forget(self);
3198 }
3199}
3200
3201impl CapabilityStoreDirConnectorOpenResponder {
3202 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3206 let _result = self.send_raw(result);
3207 if _result.is_err() {
3208 self.control_handle.shutdown();
3209 }
3210 self.drop_without_shutdown();
3211 _result
3212 }
3213
3214 pub fn send_no_shutdown_on_err(
3216 self,
3217 mut result: Result<(), CapabilityStoreError>,
3218 ) -> Result<(), fidl::Error> {
3219 let _result = self.send_raw(result);
3220 self.drop_without_shutdown();
3221 _result
3222 }
3223
3224 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3225 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3226 fidl::encoding::EmptyStruct,
3227 CapabilityStoreError,
3228 >>(
3229 fidl::encoding::FlexibleResult::new(result),
3230 self.tx_id,
3231 0x5650d3d6a3a13901,
3232 fidl::encoding::DynamicFlags::FLEXIBLE,
3233 )
3234 }
3235}
3236
3237#[must_use = "FIDL methods require a response to be sent"]
3238#[derive(Debug)]
3239pub struct CapabilityStoreDictionaryCreateResponder {
3240 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3241 tx_id: u32,
3242}
3243
3244impl std::ops::Drop for CapabilityStoreDictionaryCreateResponder {
3248 fn drop(&mut self) {
3249 self.control_handle.shutdown();
3250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3252 }
3253}
3254
3255impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryCreateResponder {
3256 type ControlHandle = CapabilityStoreControlHandle;
3257
3258 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3259 &self.control_handle
3260 }
3261
3262 fn drop_without_shutdown(mut self) {
3263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3265 std::mem::forget(self);
3267 }
3268}
3269
3270impl CapabilityStoreDictionaryCreateResponder {
3271 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3275 let _result = self.send_raw(result);
3276 if _result.is_err() {
3277 self.control_handle.shutdown();
3278 }
3279 self.drop_without_shutdown();
3280 _result
3281 }
3282
3283 pub fn send_no_shutdown_on_err(
3285 self,
3286 mut result: Result<(), CapabilityStoreError>,
3287 ) -> Result<(), fidl::Error> {
3288 let _result = self.send_raw(result);
3289 self.drop_without_shutdown();
3290 _result
3291 }
3292
3293 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3294 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3295 fidl::encoding::EmptyStruct,
3296 CapabilityStoreError,
3297 >>(
3298 fidl::encoding::FlexibleResult::new(result),
3299 self.tx_id,
3300 0x6997c8dfc63de093,
3301 fidl::encoding::DynamicFlags::FLEXIBLE,
3302 )
3303 }
3304}
3305
3306#[must_use = "FIDL methods require a response to be sent"]
3307#[derive(Debug)]
3308pub struct CapabilityStoreDictionaryLegacyImportResponder {
3309 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3310 tx_id: u32,
3311}
3312
3313impl std::ops::Drop for CapabilityStoreDictionaryLegacyImportResponder {
3317 fn drop(&mut self) {
3318 self.control_handle.shutdown();
3319 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3321 }
3322}
3323
3324impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryLegacyImportResponder {
3325 type ControlHandle = CapabilityStoreControlHandle;
3326
3327 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3328 &self.control_handle
3329 }
3330
3331 fn drop_without_shutdown(mut self) {
3332 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3334 std::mem::forget(self);
3336 }
3337}
3338
3339impl CapabilityStoreDictionaryLegacyImportResponder {
3340 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3344 let _result = self.send_raw(result);
3345 if _result.is_err() {
3346 self.control_handle.shutdown();
3347 }
3348 self.drop_without_shutdown();
3349 _result
3350 }
3351
3352 pub fn send_no_shutdown_on_err(
3354 self,
3355 mut result: Result<(), CapabilityStoreError>,
3356 ) -> Result<(), fidl::Error> {
3357 let _result = self.send_raw(result);
3358 self.drop_without_shutdown();
3359 _result
3360 }
3361
3362 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3363 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3364 fidl::encoding::EmptyStruct,
3365 CapabilityStoreError,
3366 >>(
3367 fidl::encoding::FlexibleResult::new(result),
3368 self.tx_id,
3369 0x72fd686c37b6025f,
3370 fidl::encoding::DynamicFlags::FLEXIBLE,
3371 )
3372 }
3373}
3374
3375#[must_use = "FIDL methods require a response to be sent"]
3376#[derive(Debug)]
3377pub struct CapabilityStoreDictionaryLegacyExportResponder {
3378 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3379 tx_id: u32,
3380}
3381
3382impl std::ops::Drop for CapabilityStoreDictionaryLegacyExportResponder {
3386 fn drop(&mut self) {
3387 self.control_handle.shutdown();
3388 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3390 }
3391}
3392
3393impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryLegacyExportResponder {
3394 type ControlHandle = CapabilityStoreControlHandle;
3395
3396 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3397 &self.control_handle
3398 }
3399
3400 fn drop_without_shutdown(mut self) {
3401 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3403 std::mem::forget(self);
3405 }
3406}
3407
3408impl CapabilityStoreDictionaryLegacyExportResponder {
3409 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3413 let _result = self.send_raw(result);
3414 if _result.is_err() {
3415 self.control_handle.shutdown();
3416 }
3417 self.drop_without_shutdown();
3418 _result
3419 }
3420
3421 pub fn send_no_shutdown_on_err(
3423 self,
3424 mut result: Result<(), CapabilityStoreError>,
3425 ) -> Result<(), fidl::Error> {
3426 let _result = self.send_raw(result);
3427 self.drop_without_shutdown();
3428 _result
3429 }
3430
3431 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3432 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3433 fidl::encoding::EmptyStruct,
3434 CapabilityStoreError,
3435 >>(
3436 fidl::encoding::FlexibleResult::new(result),
3437 self.tx_id,
3438 0x407e15cc4bde5dcd,
3439 fidl::encoding::DynamicFlags::FLEXIBLE,
3440 )
3441 }
3442}
3443
3444#[must_use = "FIDL methods require a response to be sent"]
3445#[derive(Debug)]
3446pub struct CapabilityStoreDictionaryInsertResponder {
3447 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3448 tx_id: u32,
3449}
3450
3451impl std::ops::Drop for CapabilityStoreDictionaryInsertResponder {
3455 fn drop(&mut self) {
3456 self.control_handle.shutdown();
3457 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3459 }
3460}
3461
3462impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryInsertResponder {
3463 type ControlHandle = CapabilityStoreControlHandle;
3464
3465 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3466 &self.control_handle
3467 }
3468
3469 fn drop_without_shutdown(mut self) {
3470 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3472 std::mem::forget(self);
3474 }
3475}
3476
3477impl CapabilityStoreDictionaryInsertResponder {
3478 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3482 let _result = self.send_raw(result);
3483 if _result.is_err() {
3484 self.control_handle.shutdown();
3485 }
3486 self.drop_without_shutdown();
3487 _result
3488 }
3489
3490 pub fn send_no_shutdown_on_err(
3492 self,
3493 mut result: Result<(), CapabilityStoreError>,
3494 ) -> Result<(), fidl::Error> {
3495 let _result = self.send_raw(result);
3496 self.drop_without_shutdown();
3497 _result
3498 }
3499
3500 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3501 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3502 fidl::encoding::EmptyStruct,
3503 CapabilityStoreError,
3504 >>(
3505 fidl::encoding::FlexibleResult::new(result),
3506 self.tx_id,
3507 0x7702183689d44c27,
3508 fidl::encoding::DynamicFlags::FLEXIBLE,
3509 )
3510 }
3511}
3512
3513#[must_use = "FIDL methods require a response to be sent"]
3514#[derive(Debug)]
3515pub struct CapabilityStoreDictionaryGetResponder {
3516 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3517 tx_id: u32,
3518}
3519
3520impl std::ops::Drop for CapabilityStoreDictionaryGetResponder {
3524 fn drop(&mut self) {
3525 self.control_handle.shutdown();
3526 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3528 }
3529}
3530
3531impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryGetResponder {
3532 type ControlHandle = CapabilityStoreControlHandle;
3533
3534 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3535 &self.control_handle
3536 }
3537
3538 fn drop_without_shutdown(mut self) {
3539 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3541 std::mem::forget(self);
3543 }
3544}
3545
3546impl CapabilityStoreDictionaryGetResponder {
3547 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3551 let _result = self.send_raw(result);
3552 if _result.is_err() {
3553 self.control_handle.shutdown();
3554 }
3555 self.drop_without_shutdown();
3556 _result
3557 }
3558
3559 pub fn send_no_shutdown_on_err(
3561 self,
3562 mut result: Result<(), CapabilityStoreError>,
3563 ) -> Result<(), fidl::Error> {
3564 let _result = self.send_raw(result);
3565 self.drop_without_shutdown();
3566 _result
3567 }
3568
3569 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3570 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3571 fidl::encoding::EmptyStruct,
3572 CapabilityStoreError,
3573 >>(
3574 fidl::encoding::FlexibleResult::new(result),
3575 self.tx_id,
3576 0x4d9e27538284add2,
3577 fidl::encoding::DynamicFlags::FLEXIBLE,
3578 )
3579 }
3580}
3581
3582#[must_use = "FIDL methods require a response to be sent"]
3583#[derive(Debug)]
3584pub struct CapabilityStoreDictionaryRemoveResponder {
3585 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3586 tx_id: u32,
3587}
3588
3589impl std::ops::Drop for CapabilityStoreDictionaryRemoveResponder {
3593 fn drop(&mut self) {
3594 self.control_handle.shutdown();
3595 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3597 }
3598}
3599
3600impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryRemoveResponder {
3601 type ControlHandle = CapabilityStoreControlHandle;
3602
3603 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3604 &self.control_handle
3605 }
3606
3607 fn drop_without_shutdown(mut self) {
3608 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3610 std::mem::forget(self);
3612 }
3613}
3614
3615impl CapabilityStoreDictionaryRemoveResponder {
3616 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3620 let _result = self.send_raw(result);
3621 if _result.is_err() {
3622 self.control_handle.shutdown();
3623 }
3624 self.drop_without_shutdown();
3625 _result
3626 }
3627
3628 pub fn send_no_shutdown_on_err(
3630 self,
3631 mut result: Result<(), CapabilityStoreError>,
3632 ) -> Result<(), fidl::Error> {
3633 let _result = self.send_raw(result);
3634 self.drop_without_shutdown();
3635 _result
3636 }
3637
3638 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3639 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3640 fidl::encoding::EmptyStruct,
3641 CapabilityStoreError,
3642 >>(
3643 fidl::encoding::FlexibleResult::new(result),
3644 self.tx_id,
3645 0x4c5c025ab05d4f3,
3646 fidl::encoding::DynamicFlags::FLEXIBLE,
3647 )
3648 }
3649}
3650
3651#[must_use = "FIDL methods require a response to be sent"]
3652#[derive(Debug)]
3653pub struct CapabilityStoreDictionaryCopyResponder {
3654 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3655 tx_id: u32,
3656}
3657
3658impl std::ops::Drop for CapabilityStoreDictionaryCopyResponder {
3662 fn drop(&mut self) {
3663 self.control_handle.shutdown();
3664 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3666 }
3667}
3668
3669impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryCopyResponder {
3670 type ControlHandle = CapabilityStoreControlHandle;
3671
3672 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3673 &self.control_handle
3674 }
3675
3676 fn drop_without_shutdown(mut self) {
3677 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3679 std::mem::forget(self);
3681 }
3682}
3683
3684impl CapabilityStoreDictionaryCopyResponder {
3685 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3689 let _result = self.send_raw(result);
3690 if _result.is_err() {
3691 self.control_handle.shutdown();
3692 }
3693 self.drop_without_shutdown();
3694 _result
3695 }
3696
3697 pub fn send_no_shutdown_on_err(
3699 self,
3700 mut result: Result<(), CapabilityStoreError>,
3701 ) -> Result<(), fidl::Error> {
3702 let _result = self.send_raw(result);
3703 self.drop_without_shutdown();
3704 _result
3705 }
3706
3707 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3708 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3709 fidl::encoding::EmptyStruct,
3710 CapabilityStoreError,
3711 >>(
3712 fidl::encoding::FlexibleResult::new(result),
3713 self.tx_id,
3714 0x3733ecdf4ea1b44f,
3715 fidl::encoding::DynamicFlags::FLEXIBLE,
3716 )
3717 }
3718}
3719
3720#[must_use = "FIDL methods require a response to be sent"]
3721#[derive(Debug)]
3722pub struct CapabilityStoreDictionaryKeysResponder {
3723 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3724 tx_id: u32,
3725}
3726
3727impl std::ops::Drop for CapabilityStoreDictionaryKeysResponder {
3731 fn drop(&mut self) {
3732 self.control_handle.shutdown();
3733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3735 }
3736}
3737
3738impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryKeysResponder {
3739 type ControlHandle = CapabilityStoreControlHandle;
3740
3741 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3742 &self.control_handle
3743 }
3744
3745 fn drop_without_shutdown(mut self) {
3746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3748 std::mem::forget(self);
3750 }
3751}
3752
3753impl CapabilityStoreDictionaryKeysResponder {
3754 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3758 let _result = self.send_raw(result);
3759 if _result.is_err() {
3760 self.control_handle.shutdown();
3761 }
3762 self.drop_without_shutdown();
3763 _result
3764 }
3765
3766 pub fn send_no_shutdown_on_err(
3768 self,
3769 mut result: Result<(), CapabilityStoreError>,
3770 ) -> Result<(), fidl::Error> {
3771 let _result = self.send_raw(result);
3772 self.drop_without_shutdown();
3773 _result
3774 }
3775
3776 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3777 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3778 fidl::encoding::EmptyStruct,
3779 CapabilityStoreError,
3780 >>(
3781 fidl::encoding::FlexibleResult::new(result),
3782 self.tx_id,
3783 0x84b05577ceaec9e,
3784 fidl::encoding::DynamicFlags::FLEXIBLE,
3785 )
3786 }
3787}
3788
3789#[must_use = "FIDL methods require a response to be sent"]
3790#[derive(Debug)]
3791pub struct CapabilityStoreDictionaryEnumerateResponder {
3792 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3793 tx_id: u32,
3794}
3795
3796impl std::ops::Drop for CapabilityStoreDictionaryEnumerateResponder {
3800 fn drop(&mut self) {
3801 self.control_handle.shutdown();
3802 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3804 }
3805}
3806
3807impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryEnumerateResponder {
3808 type ControlHandle = CapabilityStoreControlHandle;
3809
3810 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3811 &self.control_handle
3812 }
3813
3814 fn drop_without_shutdown(mut self) {
3815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3817 std::mem::forget(self);
3819 }
3820}
3821
3822impl CapabilityStoreDictionaryEnumerateResponder {
3823 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3827 let _result = self.send_raw(result);
3828 if _result.is_err() {
3829 self.control_handle.shutdown();
3830 }
3831 self.drop_without_shutdown();
3832 _result
3833 }
3834
3835 pub fn send_no_shutdown_on_err(
3837 self,
3838 mut result: Result<(), CapabilityStoreError>,
3839 ) -> Result<(), fidl::Error> {
3840 let _result = self.send_raw(result);
3841 self.drop_without_shutdown();
3842 _result
3843 }
3844
3845 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3846 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3847 fidl::encoding::EmptyStruct,
3848 CapabilityStoreError,
3849 >>(
3850 fidl::encoding::FlexibleResult::new(result),
3851 self.tx_id,
3852 0xd6279b6ced04641,
3853 fidl::encoding::DynamicFlags::FLEXIBLE,
3854 )
3855 }
3856}
3857
3858#[must_use = "FIDL methods require a response to be sent"]
3859#[derive(Debug)]
3860pub struct CapabilityStoreDictionaryDrainResponder {
3861 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3862 tx_id: u32,
3863}
3864
3865impl std::ops::Drop for CapabilityStoreDictionaryDrainResponder {
3869 fn drop(&mut self) {
3870 self.control_handle.shutdown();
3871 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3873 }
3874}
3875
3876impl fdomain_client::fidl::Responder for CapabilityStoreDictionaryDrainResponder {
3877 type ControlHandle = CapabilityStoreControlHandle;
3878
3879 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3880 &self.control_handle
3881 }
3882
3883 fn drop_without_shutdown(mut self) {
3884 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3886 std::mem::forget(self);
3888 }
3889}
3890
3891impl CapabilityStoreDictionaryDrainResponder {
3892 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3896 let _result = self.send_raw(result);
3897 if _result.is_err() {
3898 self.control_handle.shutdown();
3899 }
3900 self.drop_without_shutdown();
3901 _result
3902 }
3903
3904 pub fn send_no_shutdown_on_err(
3906 self,
3907 mut result: Result<(), CapabilityStoreError>,
3908 ) -> Result<(), fidl::Error> {
3909 let _result = self.send_raw(result);
3910 self.drop_without_shutdown();
3911 _result
3912 }
3913
3914 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3915 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3916 fidl::encoding::EmptyStruct,
3917 CapabilityStoreError,
3918 >>(
3919 fidl::encoding::FlexibleResult::new(result),
3920 self.tx_id,
3921 0x28a3a3f84d928cd8,
3922 fidl::encoding::DynamicFlags::FLEXIBLE,
3923 )
3924 }
3925}
3926
3927#[must_use = "FIDL methods require a response to be sent"]
3928#[derive(Debug)]
3929pub struct CapabilityStoreCreateServiceAggregateResponder {
3930 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3931 tx_id: u32,
3932}
3933
3934impl std::ops::Drop for CapabilityStoreCreateServiceAggregateResponder {
3938 fn drop(&mut self) {
3939 self.control_handle.shutdown();
3940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3942 }
3943}
3944
3945impl fdomain_client::fidl::Responder for CapabilityStoreCreateServiceAggregateResponder {
3946 type ControlHandle = CapabilityStoreControlHandle;
3947
3948 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3949 &self.control_handle
3950 }
3951
3952 fn drop_without_shutdown(mut self) {
3953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3955 std::mem::forget(self);
3957 }
3958}
3959
3960impl CapabilityStoreCreateServiceAggregateResponder {
3961 pub fn send(
3965 self,
3966 mut result: Result<DirConnector, CapabilityStoreError>,
3967 ) -> Result<(), fidl::Error> {
3968 let _result = self.send_raw(result);
3969 if _result.is_err() {
3970 self.control_handle.shutdown();
3971 }
3972 self.drop_without_shutdown();
3973 _result
3974 }
3975
3976 pub fn send_no_shutdown_on_err(
3978 self,
3979 mut result: Result<DirConnector, CapabilityStoreError>,
3980 ) -> Result<(), fidl::Error> {
3981 let _result = self.send_raw(result);
3982 self.drop_without_shutdown();
3983 _result
3984 }
3985
3986 fn send_raw(
3987 &self,
3988 mut result: Result<DirConnector, CapabilityStoreError>,
3989 ) -> Result<(), fidl::Error> {
3990 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3991 CapabilityStoreCreateServiceAggregateResponse,
3992 CapabilityStoreError,
3993 >>(
3994 fidl::encoding::FlexibleResult::new(
3995 result
3996 .as_mut()
3997 .map_err(|e| *e)
3998 .map(|aggregate_dir_connector| (aggregate_dir_connector,)),
3999 ),
4000 self.tx_id,
4001 0x4584116c8085885a,
4002 fidl::encoding::DynamicFlags::FLEXIBLE,
4003 )
4004 }
4005}
4006
4007#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4008pub struct ConnectorRouterMarker;
4009
4010impl fdomain_client::fidl::ProtocolMarker for ConnectorRouterMarker {
4011 type Proxy = ConnectorRouterProxy;
4012 type RequestStream = ConnectorRouterRequestStream;
4013
4014 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
4015}
4016impl fdomain_client::fidl::DiscoverableProtocolMarker for ConnectorRouterMarker {}
4017pub type ConnectorRouterRouteResult = Result<ConnectorRouterRouteResponse, RouterError>;
4018
4019pub trait ConnectorRouterProxyInterface: Send + Sync {
4020 type RouteResponseFut: std::future::Future<Output = Result<ConnectorRouterRouteResult, fidl::Error>>
4021 + Send;
4022 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4023}
4024
4025#[derive(Debug, Clone)]
4026pub struct ConnectorRouterProxy {
4027 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4028}
4029
4030impl fdomain_client::fidl::Proxy for ConnectorRouterProxy {
4031 type Protocol = ConnectorRouterMarker;
4032
4033 fn from_channel(inner: fdomain_client::Channel) -> Self {
4034 Self::new(inner)
4035 }
4036
4037 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4038 self.client.into_channel().map_err(|client| Self { client })
4039 }
4040
4041 fn as_channel(&self) -> &fdomain_client::Channel {
4042 self.client.as_channel()
4043 }
4044}
4045
4046impl ConnectorRouterProxy {
4047 pub fn new(channel: fdomain_client::Channel) -> Self {
4049 let protocol_name =
4050 <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4051 Self { client: fidl::client::Client::new(channel, protocol_name) }
4052 }
4053
4054 pub fn take_event_stream(&self) -> ConnectorRouterEventStream {
4060 ConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
4061 }
4062
4063 pub fn r#route(
4064 &self,
4065 mut payload: RouteRequest,
4066 ) -> fidl::client::QueryResponseFut<
4067 ConnectorRouterRouteResult,
4068 fdomain_client::fidl::FDomainResourceDialect,
4069 > {
4070 ConnectorRouterProxyInterface::r#route(self, payload)
4071 }
4072}
4073
4074impl ConnectorRouterProxyInterface for ConnectorRouterProxy {
4075 type RouteResponseFut = fidl::client::QueryResponseFut<
4076 ConnectorRouterRouteResult,
4077 fdomain_client::fidl::FDomainResourceDialect,
4078 >;
4079 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4080 fn _decode(
4081 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4082 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
4083 let _response = fidl::client::decode_transaction_body::<
4084 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
4085 fdomain_client::fidl::FDomainResourceDialect,
4086 0x74dbb8bc13730766,
4087 >(_buf?)?
4088 .into_result_fdomain::<ConnectorRouterMarker>("route")?;
4089 Ok(_response.map(|x| x))
4090 }
4091 self.client.send_query_and_decode::<RouteRequest, ConnectorRouterRouteResult>(
4092 &mut payload,
4093 0x74dbb8bc13730766,
4094 fidl::encoding::DynamicFlags::FLEXIBLE,
4095 _decode,
4096 )
4097 }
4098}
4099
4100pub struct ConnectorRouterEventStream {
4101 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4102}
4103
4104impl std::marker::Unpin for ConnectorRouterEventStream {}
4105
4106impl futures::stream::FusedStream for ConnectorRouterEventStream {
4107 fn is_terminated(&self) -> bool {
4108 self.event_receiver.is_terminated()
4109 }
4110}
4111
4112impl futures::Stream for ConnectorRouterEventStream {
4113 type Item = Result<ConnectorRouterEvent, fidl::Error>;
4114
4115 fn poll_next(
4116 mut self: std::pin::Pin<&mut Self>,
4117 cx: &mut std::task::Context<'_>,
4118 ) -> std::task::Poll<Option<Self::Item>> {
4119 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4120 &mut self.event_receiver,
4121 cx
4122 )?) {
4123 Some(buf) => std::task::Poll::Ready(Some(ConnectorRouterEvent::decode(buf))),
4124 None => std::task::Poll::Ready(None),
4125 }
4126 }
4127}
4128
4129#[derive(Debug)]
4130pub enum ConnectorRouterEvent {
4131 #[non_exhaustive]
4132 _UnknownEvent {
4133 ordinal: u64,
4135 },
4136}
4137
4138impl ConnectorRouterEvent {
4139 fn decode(
4141 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4142 ) -> Result<ConnectorRouterEvent, fidl::Error> {
4143 let (bytes, _handles) = buf.split_mut();
4144 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4145 debug_assert_eq!(tx_header.tx_id, 0);
4146 match tx_header.ordinal {
4147 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4148 Ok(ConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4149 }
4150 _ => Err(fidl::Error::UnknownOrdinal {
4151 ordinal: tx_header.ordinal,
4152 protocol_name:
4153 <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4154 }),
4155 }
4156 }
4157}
4158
4159pub struct ConnectorRouterRequestStream {
4161 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4162 is_terminated: bool,
4163}
4164
4165impl std::marker::Unpin for ConnectorRouterRequestStream {}
4166
4167impl futures::stream::FusedStream for ConnectorRouterRequestStream {
4168 fn is_terminated(&self) -> bool {
4169 self.is_terminated
4170 }
4171}
4172
4173impl fdomain_client::fidl::RequestStream for ConnectorRouterRequestStream {
4174 type Protocol = ConnectorRouterMarker;
4175 type ControlHandle = ConnectorRouterControlHandle;
4176
4177 fn from_channel(channel: fdomain_client::Channel) -> Self {
4178 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4179 }
4180
4181 fn control_handle(&self) -> Self::ControlHandle {
4182 ConnectorRouterControlHandle { inner: self.inner.clone() }
4183 }
4184
4185 fn into_inner(
4186 self,
4187 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4188 {
4189 (self.inner, self.is_terminated)
4190 }
4191
4192 fn from_inner(
4193 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4194 is_terminated: bool,
4195 ) -> Self {
4196 Self { inner, is_terminated }
4197 }
4198}
4199
4200impl futures::Stream for ConnectorRouterRequestStream {
4201 type Item = Result<ConnectorRouterRequest, fidl::Error>;
4202
4203 fn poll_next(
4204 mut self: std::pin::Pin<&mut Self>,
4205 cx: &mut std::task::Context<'_>,
4206 ) -> std::task::Poll<Option<Self::Item>> {
4207 let this = &mut *self;
4208 if this.inner.check_shutdown(cx) {
4209 this.is_terminated = true;
4210 return std::task::Poll::Ready(None);
4211 }
4212 if this.is_terminated {
4213 panic!("polled ConnectorRouterRequestStream after completion");
4214 }
4215 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4216 |bytes, handles| {
4217 match this.inner.channel().read_etc(cx, bytes, handles) {
4218 std::task::Poll::Ready(Ok(())) => {}
4219 std::task::Poll::Pending => return std::task::Poll::Pending,
4220 std::task::Poll::Ready(Err(None)) => {
4221 this.is_terminated = true;
4222 return std::task::Poll::Ready(None);
4223 }
4224 std::task::Poll::Ready(Err(Some(e))) => {
4225 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4226 e.into(),
4227 ))));
4228 }
4229 }
4230
4231 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4233
4234 std::task::Poll::Ready(Some(match header.ordinal {
4235 0x74dbb8bc13730766 => {
4236 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4237 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
4238 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4239 let control_handle = ConnectorRouterControlHandle {
4240 inner: this.inner.clone(),
4241 };
4242 Ok(ConnectorRouterRequest::Route {payload: req,
4243 responder: ConnectorRouterRouteResponder {
4244 control_handle: std::mem::ManuallyDrop::new(control_handle),
4245 tx_id: header.tx_id,
4246 },
4247 })
4248 }
4249 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4250 Ok(ConnectorRouterRequest::_UnknownMethod {
4251 ordinal: header.ordinal,
4252 control_handle: ConnectorRouterControlHandle { inner: this.inner.clone() },
4253 method_type: fidl::MethodType::OneWay,
4254 })
4255 }
4256 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4257 this.inner.send_framework_err(
4258 fidl::encoding::FrameworkErr::UnknownMethod,
4259 header.tx_id,
4260 header.ordinal,
4261 header.dynamic_flags(),
4262 (bytes, handles),
4263 )?;
4264 Ok(ConnectorRouterRequest::_UnknownMethod {
4265 ordinal: header.ordinal,
4266 control_handle: ConnectorRouterControlHandle { inner: this.inner.clone() },
4267 method_type: fidl::MethodType::TwoWay,
4268 })
4269 }
4270 _ => Err(fidl::Error::UnknownOrdinal {
4271 ordinal: header.ordinal,
4272 protocol_name: <ConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4273 }),
4274 }))
4275 },
4276 )
4277 }
4278}
4279
4280#[derive(Debug)]
4281pub enum ConnectorRouterRequest {
4282 Route {
4283 payload: RouteRequest,
4284 responder: ConnectorRouterRouteResponder,
4285 },
4286 #[non_exhaustive]
4288 _UnknownMethod {
4289 ordinal: u64,
4291 control_handle: ConnectorRouterControlHandle,
4292 method_type: fidl::MethodType,
4293 },
4294}
4295
4296impl ConnectorRouterRequest {
4297 #[allow(irrefutable_let_patterns)]
4298 pub fn into_route(self) -> Option<(RouteRequest, ConnectorRouterRouteResponder)> {
4299 if let ConnectorRouterRequest::Route { payload, responder } = self {
4300 Some((payload, responder))
4301 } else {
4302 None
4303 }
4304 }
4305
4306 pub fn method_name(&self) -> &'static str {
4308 match *self {
4309 ConnectorRouterRequest::Route { .. } => "route",
4310 ConnectorRouterRequest::_UnknownMethod {
4311 method_type: fidl::MethodType::OneWay,
4312 ..
4313 } => "unknown one-way method",
4314 ConnectorRouterRequest::_UnknownMethod {
4315 method_type: fidl::MethodType::TwoWay,
4316 ..
4317 } => "unknown two-way method",
4318 }
4319 }
4320}
4321
4322#[derive(Debug, Clone)]
4323pub struct ConnectorRouterControlHandle {
4324 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4325}
4326
4327impl ConnectorRouterControlHandle {
4328 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
4329 self.inner.shutdown_with_epitaph(status.into())
4330 }
4331}
4332
4333impl fdomain_client::fidl::ControlHandle for ConnectorRouterControlHandle {
4334 fn shutdown(&self) {
4335 self.inner.shutdown()
4336 }
4337
4338 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
4339 self.inner.shutdown_with_epitaph(status)
4340 }
4341
4342 fn is_closed(&self) -> bool {
4343 self.inner.channel().is_closed()
4344 }
4345 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4346 self.inner.channel().on_closed()
4347 }
4348}
4349
4350impl ConnectorRouterControlHandle {}
4351
4352#[must_use = "FIDL methods require a response to be sent"]
4353#[derive(Debug)]
4354pub struct ConnectorRouterRouteResponder {
4355 control_handle: std::mem::ManuallyDrop<ConnectorRouterControlHandle>,
4356 tx_id: u32,
4357}
4358
4359impl std::ops::Drop for ConnectorRouterRouteResponder {
4363 fn drop(&mut self) {
4364 self.control_handle.shutdown();
4365 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4367 }
4368}
4369
4370impl fdomain_client::fidl::Responder for ConnectorRouterRouteResponder {
4371 type ControlHandle = ConnectorRouterControlHandle;
4372
4373 fn control_handle(&self) -> &ConnectorRouterControlHandle {
4374 &self.control_handle
4375 }
4376
4377 fn drop_without_shutdown(mut self) {
4378 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4380 std::mem::forget(self);
4382 }
4383}
4384
4385impl ConnectorRouterRouteResponder {
4386 pub fn send(
4390 self,
4391 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4392 ) -> Result<(), fidl::Error> {
4393 let _result = self.send_raw(result);
4394 if _result.is_err() {
4395 self.control_handle.shutdown();
4396 }
4397 self.drop_without_shutdown();
4398 _result
4399 }
4400
4401 pub fn send_no_shutdown_on_err(
4403 self,
4404 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4405 ) -> Result<(), fidl::Error> {
4406 let _result = self.send_raw(result);
4407 self.drop_without_shutdown();
4408 _result
4409 }
4410
4411 fn send_raw(
4412 &self,
4413 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
4414 ) -> Result<(), fidl::Error> {
4415 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4416 ConnectorRouterRouteResponse,
4417 RouterError,
4418 >>(
4419 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
4420 self.tx_id,
4421 0x74dbb8bc13730766,
4422 fidl::encoding::DynamicFlags::FLEXIBLE,
4423 )
4424 }
4425}
4426
4427#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4428pub struct DataRouterMarker;
4429
4430impl fdomain_client::fidl::ProtocolMarker for DataRouterMarker {
4431 type Proxy = DataRouterProxy;
4432 type RequestStream = DataRouterRequestStream;
4433
4434 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
4435}
4436impl fdomain_client::fidl::DiscoverableProtocolMarker for DataRouterMarker {}
4437pub type DataRouterRouteResult = Result<DataRouterRouteResponse, RouterError>;
4438
4439pub trait DataRouterProxyInterface: Send + Sync {
4440 type RouteResponseFut: std::future::Future<Output = Result<DataRouterRouteResult, fidl::Error>>
4441 + Send;
4442 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4443}
4444
4445#[derive(Debug, Clone)]
4446pub struct DataRouterProxy {
4447 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4448}
4449
4450impl fdomain_client::fidl::Proxy for DataRouterProxy {
4451 type Protocol = DataRouterMarker;
4452
4453 fn from_channel(inner: fdomain_client::Channel) -> Self {
4454 Self::new(inner)
4455 }
4456
4457 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4458 self.client.into_channel().map_err(|client| Self { client })
4459 }
4460
4461 fn as_channel(&self) -> &fdomain_client::Channel {
4462 self.client.as_channel()
4463 }
4464}
4465
4466impl DataRouterProxy {
4467 pub fn new(channel: fdomain_client::Channel) -> Self {
4469 let protocol_name = <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4470 Self { client: fidl::client::Client::new(channel, protocol_name) }
4471 }
4472
4473 pub fn take_event_stream(&self) -> DataRouterEventStream {
4479 DataRouterEventStream { event_receiver: self.client.take_event_receiver() }
4480 }
4481
4482 pub fn r#route(
4483 &self,
4484 mut payload: RouteRequest,
4485 ) -> fidl::client::QueryResponseFut<
4486 DataRouterRouteResult,
4487 fdomain_client::fidl::FDomainResourceDialect,
4488 > {
4489 DataRouterProxyInterface::r#route(self, payload)
4490 }
4491}
4492
4493impl DataRouterProxyInterface for DataRouterProxy {
4494 type RouteResponseFut = fidl::client::QueryResponseFut<
4495 DataRouterRouteResult,
4496 fdomain_client::fidl::FDomainResourceDialect,
4497 >;
4498 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4499 fn _decode(
4500 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4501 ) -> Result<DataRouterRouteResult, fidl::Error> {
4502 let _response = fidl::client::decode_transaction_body::<
4503 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
4504 fdomain_client::fidl::FDomainResourceDialect,
4505 0x2e87dc44dfc53804,
4506 >(_buf?)?
4507 .into_result_fdomain::<DataRouterMarker>("route")?;
4508 Ok(_response.map(|x| x))
4509 }
4510 self.client.send_query_and_decode::<RouteRequest, DataRouterRouteResult>(
4511 &mut payload,
4512 0x2e87dc44dfc53804,
4513 fidl::encoding::DynamicFlags::FLEXIBLE,
4514 _decode,
4515 )
4516 }
4517}
4518
4519pub struct DataRouterEventStream {
4520 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4521}
4522
4523impl std::marker::Unpin for DataRouterEventStream {}
4524
4525impl futures::stream::FusedStream for DataRouterEventStream {
4526 fn is_terminated(&self) -> bool {
4527 self.event_receiver.is_terminated()
4528 }
4529}
4530
4531impl futures::Stream for DataRouterEventStream {
4532 type Item = Result<DataRouterEvent, fidl::Error>;
4533
4534 fn poll_next(
4535 mut self: std::pin::Pin<&mut Self>,
4536 cx: &mut std::task::Context<'_>,
4537 ) -> std::task::Poll<Option<Self::Item>> {
4538 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4539 &mut self.event_receiver,
4540 cx
4541 )?) {
4542 Some(buf) => std::task::Poll::Ready(Some(DataRouterEvent::decode(buf))),
4543 None => std::task::Poll::Ready(None),
4544 }
4545 }
4546}
4547
4548#[derive(Debug)]
4549pub enum DataRouterEvent {
4550 #[non_exhaustive]
4551 _UnknownEvent {
4552 ordinal: u64,
4554 },
4555}
4556
4557impl DataRouterEvent {
4558 fn decode(
4560 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4561 ) -> Result<DataRouterEvent, fidl::Error> {
4562 let (bytes, _handles) = buf.split_mut();
4563 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4564 debug_assert_eq!(tx_header.tx_id, 0);
4565 match tx_header.ordinal {
4566 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4567 Ok(DataRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4568 }
4569 _ => Err(fidl::Error::UnknownOrdinal {
4570 ordinal: tx_header.ordinal,
4571 protocol_name:
4572 <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4573 }),
4574 }
4575 }
4576}
4577
4578pub struct DataRouterRequestStream {
4580 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4581 is_terminated: bool,
4582}
4583
4584impl std::marker::Unpin for DataRouterRequestStream {}
4585
4586impl futures::stream::FusedStream for DataRouterRequestStream {
4587 fn is_terminated(&self) -> bool {
4588 self.is_terminated
4589 }
4590}
4591
4592impl fdomain_client::fidl::RequestStream for DataRouterRequestStream {
4593 type Protocol = DataRouterMarker;
4594 type ControlHandle = DataRouterControlHandle;
4595
4596 fn from_channel(channel: fdomain_client::Channel) -> Self {
4597 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4598 }
4599
4600 fn control_handle(&self) -> Self::ControlHandle {
4601 DataRouterControlHandle { inner: self.inner.clone() }
4602 }
4603
4604 fn into_inner(
4605 self,
4606 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4607 {
4608 (self.inner, self.is_terminated)
4609 }
4610
4611 fn from_inner(
4612 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4613 is_terminated: bool,
4614 ) -> Self {
4615 Self { inner, is_terminated }
4616 }
4617}
4618
4619impl futures::Stream for DataRouterRequestStream {
4620 type Item = Result<DataRouterRequest, fidl::Error>;
4621
4622 fn poll_next(
4623 mut self: std::pin::Pin<&mut Self>,
4624 cx: &mut std::task::Context<'_>,
4625 ) -> std::task::Poll<Option<Self::Item>> {
4626 let this = &mut *self;
4627 if this.inner.check_shutdown(cx) {
4628 this.is_terminated = true;
4629 return std::task::Poll::Ready(None);
4630 }
4631 if this.is_terminated {
4632 panic!("polled DataRouterRequestStream after completion");
4633 }
4634 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4635 |bytes, handles| {
4636 match this.inner.channel().read_etc(cx, bytes, handles) {
4637 std::task::Poll::Ready(Ok(())) => {}
4638 std::task::Poll::Pending => return std::task::Poll::Pending,
4639 std::task::Poll::Ready(Err(None)) => {
4640 this.is_terminated = true;
4641 return std::task::Poll::Ready(None);
4642 }
4643 std::task::Poll::Ready(Err(Some(e))) => {
4644 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4645 e.into(),
4646 ))));
4647 }
4648 }
4649
4650 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4652
4653 std::task::Poll::Ready(Some(match header.ordinal {
4654 0x2e87dc44dfc53804 => {
4655 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4656 let mut req = fidl::new_empty!(
4657 RouteRequest,
4658 fdomain_client::fidl::FDomainResourceDialect
4659 );
4660 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4661 let control_handle = DataRouterControlHandle { inner: this.inner.clone() };
4662 Ok(DataRouterRequest::Route {
4663 payload: req,
4664 responder: DataRouterRouteResponder {
4665 control_handle: std::mem::ManuallyDrop::new(control_handle),
4666 tx_id: header.tx_id,
4667 },
4668 })
4669 }
4670 _ if header.tx_id == 0
4671 && header
4672 .dynamic_flags()
4673 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4674 {
4675 Ok(DataRouterRequest::_UnknownMethod {
4676 ordinal: header.ordinal,
4677 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
4678 method_type: fidl::MethodType::OneWay,
4679 })
4680 }
4681 _ if header
4682 .dynamic_flags()
4683 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4684 {
4685 this.inner.send_framework_err(
4686 fidl::encoding::FrameworkErr::UnknownMethod,
4687 header.tx_id,
4688 header.ordinal,
4689 header.dynamic_flags(),
4690 (bytes, handles),
4691 )?;
4692 Ok(DataRouterRequest::_UnknownMethod {
4693 ordinal: header.ordinal,
4694 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
4695 method_type: fidl::MethodType::TwoWay,
4696 })
4697 }
4698 _ => Err(fidl::Error::UnknownOrdinal {
4699 ordinal: header.ordinal,
4700 protocol_name:
4701 <DataRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4702 }),
4703 }))
4704 },
4705 )
4706 }
4707}
4708
4709#[derive(Debug)]
4710pub enum DataRouterRequest {
4711 Route {
4712 payload: RouteRequest,
4713 responder: DataRouterRouteResponder,
4714 },
4715 #[non_exhaustive]
4717 _UnknownMethod {
4718 ordinal: u64,
4720 control_handle: DataRouterControlHandle,
4721 method_type: fidl::MethodType,
4722 },
4723}
4724
4725impl DataRouterRequest {
4726 #[allow(irrefutable_let_patterns)]
4727 pub fn into_route(self) -> Option<(RouteRequest, DataRouterRouteResponder)> {
4728 if let DataRouterRequest::Route { payload, responder } = self {
4729 Some((payload, responder))
4730 } else {
4731 None
4732 }
4733 }
4734
4735 pub fn method_name(&self) -> &'static str {
4737 match *self {
4738 DataRouterRequest::Route { .. } => "route",
4739 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4740 "unknown one-way method"
4741 }
4742 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4743 "unknown two-way method"
4744 }
4745 }
4746 }
4747}
4748
4749#[derive(Debug, Clone)]
4750pub struct DataRouterControlHandle {
4751 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4752}
4753
4754impl DataRouterControlHandle {
4755 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
4756 self.inner.shutdown_with_epitaph(status.into())
4757 }
4758}
4759
4760impl fdomain_client::fidl::ControlHandle for DataRouterControlHandle {
4761 fn shutdown(&self) {
4762 self.inner.shutdown()
4763 }
4764
4765 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
4766 self.inner.shutdown_with_epitaph(status)
4767 }
4768
4769 fn is_closed(&self) -> bool {
4770 self.inner.channel().is_closed()
4771 }
4772 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4773 self.inner.channel().on_closed()
4774 }
4775}
4776
4777impl DataRouterControlHandle {}
4778
4779#[must_use = "FIDL methods require a response to be sent"]
4780#[derive(Debug)]
4781pub struct DataRouterRouteResponder {
4782 control_handle: std::mem::ManuallyDrop<DataRouterControlHandle>,
4783 tx_id: u32,
4784}
4785
4786impl std::ops::Drop for DataRouterRouteResponder {
4790 fn drop(&mut self) {
4791 self.control_handle.shutdown();
4792 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4794 }
4795}
4796
4797impl fdomain_client::fidl::Responder for DataRouterRouteResponder {
4798 type ControlHandle = DataRouterControlHandle;
4799
4800 fn control_handle(&self) -> &DataRouterControlHandle {
4801 &self.control_handle
4802 }
4803
4804 fn drop_without_shutdown(mut self) {
4805 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4807 std::mem::forget(self);
4809 }
4810}
4811
4812impl DataRouterRouteResponder {
4813 pub fn send(
4817 self,
4818 mut result: Result<DataRouterRouteResponse, RouterError>,
4819 ) -> Result<(), fidl::Error> {
4820 let _result = self.send_raw(result);
4821 if _result.is_err() {
4822 self.control_handle.shutdown();
4823 }
4824 self.drop_without_shutdown();
4825 _result
4826 }
4827
4828 pub fn send_no_shutdown_on_err(
4830 self,
4831 mut result: Result<DataRouterRouteResponse, RouterError>,
4832 ) -> Result<(), fidl::Error> {
4833 let _result = self.send_raw(result);
4834 self.drop_without_shutdown();
4835 _result
4836 }
4837
4838 fn send_raw(
4839 &self,
4840 mut result: Result<DataRouterRouteResponse, RouterError>,
4841 ) -> Result<(), fidl::Error> {
4842 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4843 DataRouterRouteResponse,
4844 RouterError,
4845 >>(
4846 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
4847 self.tx_id,
4848 0x2e87dc44dfc53804,
4849 fidl::encoding::DynamicFlags::FLEXIBLE,
4850 )
4851 }
4852}
4853
4854#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4855pub struct DictionaryMarker;
4856
4857impl fdomain_client::fidl::ProtocolMarker for DictionaryMarker {
4858 type Proxy = DictionaryProxy;
4859 type RequestStream = DictionaryRequestStream;
4860
4861 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
4862}
4863impl fdomain_client::fidl::DiscoverableProtocolMarker for DictionaryMarker {}
4864
4865pub trait DictionaryProxyInterface: Send + Sync {}
4866
4867#[derive(Debug, Clone)]
4868pub struct DictionaryProxy {
4869 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4870}
4871
4872impl fdomain_client::fidl::Proxy for DictionaryProxy {
4873 type Protocol = DictionaryMarker;
4874
4875 fn from_channel(inner: fdomain_client::Channel) -> Self {
4876 Self::new(inner)
4877 }
4878
4879 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4880 self.client.into_channel().map_err(|client| Self { client })
4881 }
4882
4883 fn as_channel(&self) -> &fdomain_client::Channel {
4884 self.client.as_channel()
4885 }
4886}
4887
4888impl DictionaryProxy {
4889 pub fn new(channel: fdomain_client::Channel) -> Self {
4891 let protocol_name = <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4892 Self { client: fidl::client::Client::new(channel, protocol_name) }
4893 }
4894
4895 pub fn take_event_stream(&self) -> DictionaryEventStream {
4901 DictionaryEventStream { event_receiver: self.client.take_event_receiver() }
4902 }
4903}
4904
4905impl DictionaryProxyInterface for DictionaryProxy {}
4906
4907pub struct DictionaryEventStream {
4908 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4909}
4910
4911impl std::marker::Unpin for DictionaryEventStream {}
4912
4913impl futures::stream::FusedStream for DictionaryEventStream {
4914 fn is_terminated(&self) -> bool {
4915 self.event_receiver.is_terminated()
4916 }
4917}
4918
4919impl futures::Stream for DictionaryEventStream {
4920 type Item = Result<DictionaryEvent, fidl::Error>;
4921
4922 fn poll_next(
4923 mut self: std::pin::Pin<&mut Self>,
4924 cx: &mut std::task::Context<'_>,
4925 ) -> std::task::Poll<Option<Self::Item>> {
4926 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4927 &mut self.event_receiver,
4928 cx
4929 )?) {
4930 Some(buf) => std::task::Poll::Ready(Some(DictionaryEvent::decode(buf))),
4931 None => std::task::Poll::Ready(None),
4932 }
4933 }
4934}
4935
4936#[derive(Debug)]
4937pub enum DictionaryEvent {
4938 #[non_exhaustive]
4939 _UnknownEvent {
4940 ordinal: u64,
4942 },
4943}
4944
4945impl DictionaryEvent {
4946 fn decode(
4948 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4949 ) -> Result<DictionaryEvent, fidl::Error> {
4950 let (bytes, _handles) = buf.split_mut();
4951 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4952 debug_assert_eq!(tx_header.tx_id, 0);
4953 match tx_header.ordinal {
4954 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4955 Ok(DictionaryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4956 }
4957 _ => Err(fidl::Error::UnknownOrdinal {
4958 ordinal: tx_header.ordinal,
4959 protocol_name:
4960 <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4961 }),
4962 }
4963 }
4964}
4965
4966pub struct DictionaryRequestStream {
4968 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4969 is_terminated: bool,
4970}
4971
4972impl std::marker::Unpin for DictionaryRequestStream {}
4973
4974impl futures::stream::FusedStream for DictionaryRequestStream {
4975 fn is_terminated(&self) -> bool {
4976 self.is_terminated
4977 }
4978}
4979
4980impl fdomain_client::fidl::RequestStream for DictionaryRequestStream {
4981 type Protocol = DictionaryMarker;
4982 type ControlHandle = DictionaryControlHandle;
4983
4984 fn from_channel(channel: fdomain_client::Channel) -> Self {
4985 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4986 }
4987
4988 fn control_handle(&self) -> Self::ControlHandle {
4989 DictionaryControlHandle { inner: self.inner.clone() }
4990 }
4991
4992 fn into_inner(
4993 self,
4994 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4995 {
4996 (self.inner, self.is_terminated)
4997 }
4998
4999 fn from_inner(
5000 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5001 is_terminated: bool,
5002 ) -> Self {
5003 Self { inner, is_terminated }
5004 }
5005}
5006
5007impl futures::Stream for DictionaryRequestStream {
5008 type Item = Result<DictionaryRequest, fidl::Error>;
5009
5010 fn poll_next(
5011 mut self: std::pin::Pin<&mut Self>,
5012 cx: &mut std::task::Context<'_>,
5013 ) -> std::task::Poll<Option<Self::Item>> {
5014 let this = &mut *self;
5015 if this.inner.check_shutdown(cx) {
5016 this.is_terminated = true;
5017 return std::task::Poll::Ready(None);
5018 }
5019 if this.is_terminated {
5020 panic!("polled DictionaryRequestStream after completion");
5021 }
5022 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5023 |bytes, handles| {
5024 match this.inner.channel().read_etc(cx, bytes, handles) {
5025 std::task::Poll::Ready(Ok(())) => {}
5026 std::task::Poll::Pending => return std::task::Poll::Pending,
5027 std::task::Poll::Ready(Err(None)) => {
5028 this.is_terminated = true;
5029 return std::task::Poll::Ready(None);
5030 }
5031 std::task::Poll::Ready(Err(Some(e))) => {
5032 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5033 e.into(),
5034 ))));
5035 }
5036 }
5037
5038 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5040
5041 std::task::Poll::Ready(Some(match header.ordinal {
5042 _ if header.tx_id == 0
5043 && header
5044 .dynamic_flags()
5045 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5046 {
5047 Ok(DictionaryRequest::_UnknownMethod {
5048 ordinal: header.ordinal,
5049 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5050 method_type: fidl::MethodType::OneWay,
5051 })
5052 }
5053 _ if header
5054 .dynamic_flags()
5055 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5056 {
5057 this.inner.send_framework_err(
5058 fidl::encoding::FrameworkErr::UnknownMethod,
5059 header.tx_id,
5060 header.ordinal,
5061 header.dynamic_flags(),
5062 (bytes, handles),
5063 )?;
5064 Ok(DictionaryRequest::_UnknownMethod {
5065 ordinal: header.ordinal,
5066 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5067 method_type: fidl::MethodType::TwoWay,
5068 })
5069 }
5070 _ => Err(fidl::Error::UnknownOrdinal {
5071 ordinal: header.ordinal,
5072 protocol_name:
5073 <DictionaryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5074 }),
5075 }))
5076 },
5077 )
5078 }
5079}
5080
5081#[derive(Debug)]
5082pub enum DictionaryRequest {
5083 #[non_exhaustive]
5085 _UnknownMethod {
5086 ordinal: u64,
5088 control_handle: DictionaryControlHandle,
5089 method_type: fidl::MethodType,
5090 },
5091}
5092
5093impl DictionaryRequest {
5094 pub fn method_name(&self) -> &'static str {
5096 match *self {
5097 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
5098 "unknown one-way method"
5099 }
5100 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
5101 "unknown two-way method"
5102 }
5103 }
5104 }
5105}
5106
5107#[derive(Debug, Clone)]
5108pub struct DictionaryControlHandle {
5109 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5110}
5111
5112impl DictionaryControlHandle {
5113 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
5114 self.inner.shutdown_with_epitaph(status.into())
5115 }
5116}
5117
5118impl fdomain_client::fidl::ControlHandle for DictionaryControlHandle {
5119 fn shutdown(&self) {
5120 self.inner.shutdown()
5121 }
5122
5123 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
5124 self.inner.shutdown_with_epitaph(status)
5125 }
5126
5127 fn is_closed(&self) -> bool {
5128 self.inner.channel().is_closed()
5129 }
5130 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5131 self.inner.channel().on_closed()
5132 }
5133}
5134
5135impl DictionaryControlHandle {}
5136
5137#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5138pub struct DictionaryDrainIteratorMarker;
5139
5140impl fdomain_client::fidl::ProtocolMarker for DictionaryDrainIteratorMarker {
5141 type Proxy = DictionaryDrainIteratorProxy;
5142 type RequestStream = DictionaryDrainIteratorRequestStream;
5143
5144 const DEBUG_NAME: &'static str = "(anonymous) DictionaryDrainIterator";
5145}
5146pub type DictionaryDrainIteratorGetNextResult =
5147 Result<(Vec<DictionaryItem>, u64), CapabilityStoreError>;
5148
5149pub trait DictionaryDrainIteratorProxyInterface: Send + Sync {
5150 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryDrainIteratorGetNextResult, fidl::Error>>
5151 + Send;
5152 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
5153}
5154
5155#[derive(Debug, Clone)]
5156pub struct DictionaryDrainIteratorProxy {
5157 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5158}
5159
5160impl fdomain_client::fidl::Proxy for DictionaryDrainIteratorProxy {
5161 type Protocol = DictionaryDrainIteratorMarker;
5162
5163 fn from_channel(inner: fdomain_client::Channel) -> Self {
5164 Self::new(inner)
5165 }
5166
5167 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5168 self.client.into_channel().map_err(|client| Self { client })
5169 }
5170
5171 fn as_channel(&self) -> &fdomain_client::Channel {
5172 self.client.as_channel()
5173 }
5174}
5175
5176impl DictionaryDrainIteratorProxy {
5177 pub fn new(channel: fdomain_client::Channel) -> Self {
5179 let protocol_name =
5180 <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5181 Self { client: fidl::client::Client::new(channel, protocol_name) }
5182 }
5183
5184 pub fn take_event_stream(&self) -> DictionaryDrainIteratorEventStream {
5190 DictionaryDrainIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5191 }
5192
5193 pub fn r#get_next(
5210 &self,
5211 mut start_id: u64,
5212 mut limit: u32,
5213 ) -> fidl::client::QueryResponseFut<
5214 DictionaryDrainIteratorGetNextResult,
5215 fdomain_client::fidl::FDomainResourceDialect,
5216 > {
5217 DictionaryDrainIteratorProxyInterface::r#get_next(self, start_id, limit)
5218 }
5219}
5220
5221impl DictionaryDrainIteratorProxyInterface for DictionaryDrainIteratorProxy {
5222 type GetNextResponseFut = fidl::client::QueryResponseFut<
5223 DictionaryDrainIteratorGetNextResult,
5224 fdomain_client::fidl::FDomainResourceDialect,
5225 >;
5226 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
5227 fn _decode(
5228 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5229 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
5230 let _response = fidl::client::decode_transaction_body::<
5231 fidl::encoding::FlexibleResultType<
5232 DictionaryDrainIteratorGetNextResponse,
5233 CapabilityStoreError,
5234 >,
5235 fdomain_client::fidl::FDomainResourceDialect,
5236 0x4f8082ca1ee26061,
5237 >(_buf?)?
5238 .into_result_fdomain::<DictionaryDrainIteratorMarker>("get_next")?;
5239 Ok(_response.map(|x| (x.items, x.end_id)))
5240 }
5241 self.client.send_query_and_decode::<
5242 DictionaryDrainIteratorGetNextRequest,
5243 DictionaryDrainIteratorGetNextResult,
5244 >(
5245 (start_id, limit,),
5246 0x4f8082ca1ee26061,
5247 fidl::encoding::DynamicFlags::FLEXIBLE,
5248 _decode,
5249 )
5250 }
5251}
5252
5253pub struct DictionaryDrainIteratorEventStream {
5254 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5255}
5256
5257impl std::marker::Unpin for DictionaryDrainIteratorEventStream {}
5258
5259impl futures::stream::FusedStream for DictionaryDrainIteratorEventStream {
5260 fn is_terminated(&self) -> bool {
5261 self.event_receiver.is_terminated()
5262 }
5263}
5264
5265impl futures::Stream for DictionaryDrainIteratorEventStream {
5266 type Item = Result<DictionaryDrainIteratorEvent, fidl::Error>;
5267
5268 fn poll_next(
5269 mut self: std::pin::Pin<&mut Self>,
5270 cx: &mut std::task::Context<'_>,
5271 ) -> std::task::Poll<Option<Self::Item>> {
5272 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5273 &mut self.event_receiver,
5274 cx
5275 )?) {
5276 Some(buf) => std::task::Poll::Ready(Some(DictionaryDrainIteratorEvent::decode(buf))),
5277 None => std::task::Poll::Ready(None),
5278 }
5279 }
5280}
5281
5282#[derive(Debug)]
5283pub enum DictionaryDrainIteratorEvent {
5284 #[non_exhaustive]
5285 _UnknownEvent {
5286 ordinal: u64,
5288 },
5289}
5290
5291impl DictionaryDrainIteratorEvent {
5292 fn decode(
5294 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5295 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
5296 let (bytes, _handles) = buf.split_mut();
5297 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5298 debug_assert_eq!(tx_header.tx_id, 0);
5299 match tx_header.ordinal {
5300 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5301 Ok(DictionaryDrainIteratorEvent::_UnknownEvent {
5302 ordinal: tx_header.ordinal,
5303 })
5304 }
5305 _ => Err(fidl::Error::UnknownOrdinal {
5306 ordinal: tx_header.ordinal,
5307 protocol_name: <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5308 })
5309 }
5310 }
5311}
5312
5313pub struct DictionaryDrainIteratorRequestStream {
5315 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5316 is_terminated: bool,
5317}
5318
5319impl std::marker::Unpin for DictionaryDrainIteratorRequestStream {}
5320
5321impl futures::stream::FusedStream for DictionaryDrainIteratorRequestStream {
5322 fn is_terminated(&self) -> bool {
5323 self.is_terminated
5324 }
5325}
5326
5327impl fdomain_client::fidl::RequestStream for DictionaryDrainIteratorRequestStream {
5328 type Protocol = DictionaryDrainIteratorMarker;
5329 type ControlHandle = DictionaryDrainIteratorControlHandle;
5330
5331 fn from_channel(channel: fdomain_client::Channel) -> Self {
5332 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5333 }
5334
5335 fn control_handle(&self) -> Self::ControlHandle {
5336 DictionaryDrainIteratorControlHandle { inner: self.inner.clone() }
5337 }
5338
5339 fn into_inner(
5340 self,
5341 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5342 {
5343 (self.inner, self.is_terminated)
5344 }
5345
5346 fn from_inner(
5347 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5348 is_terminated: bool,
5349 ) -> Self {
5350 Self { inner, is_terminated }
5351 }
5352}
5353
5354impl futures::Stream for DictionaryDrainIteratorRequestStream {
5355 type Item = Result<DictionaryDrainIteratorRequest, fidl::Error>;
5356
5357 fn poll_next(
5358 mut self: std::pin::Pin<&mut Self>,
5359 cx: &mut std::task::Context<'_>,
5360 ) -> std::task::Poll<Option<Self::Item>> {
5361 let this = &mut *self;
5362 if this.inner.check_shutdown(cx) {
5363 this.is_terminated = true;
5364 return std::task::Poll::Ready(None);
5365 }
5366 if this.is_terminated {
5367 panic!("polled DictionaryDrainIteratorRequestStream after completion");
5368 }
5369 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5370 |bytes, handles| {
5371 match this.inner.channel().read_etc(cx, bytes, handles) {
5372 std::task::Poll::Ready(Ok(())) => {}
5373 std::task::Poll::Pending => return std::task::Poll::Pending,
5374 std::task::Poll::Ready(Err(None)) => {
5375 this.is_terminated = true;
5376 return std::task::Poll::Ready(None);
5377 }
5378 std::task::Poll::Ready(Err(Some(e))) => {
5379 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5380 e.into(),
5381 ))));
5382 }
5383 }
5384
5385 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5387
5388 std::task::Poll::Ready(Some(match header.ordinal {
5389 0x4f8082ca1ee26061 => {
5390 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5391 let mut req = fidl::new_empty!(DictionaryDrainIteratorGetNextRequest, fdomain_client::fidl::FDomainResourceDialect);
5392 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DictionaryDrainIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
5393 let control_handle = DictionaryDrainIteratorControlHandle {
5394 inner: this.inner.clone(),
5395 };
5396 Ok(DictionaryDrainIteratorRequest::GetNext {start_id: req.start_id,
5397limit: req.limit,
5398
5399 responder: DictionaryDrainIteratorGetNextResponder {
5400 control_handle: std::mem::ManuallyDrop::new(control_handle),
5401 tx_id: header.tx_id,
5402 },
5403 })
5404 }
5405 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5406 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
5407 ordinal: header.ordinal,
5408 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
5409 method_type: fidl::MethodType::OneWay,
5410 })
5411 }
5412 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5413 this.inner.send_framework_err(
5414 fidl::encoding::FrameworkErr::UnknownMethod,
5415 header.tx_id,
5416 header.ordinal,
5417 header.dynamic_flags(),
5418 (bytes, handles),
5419 )?;
5420 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
5421 ordinal: header.ordinal,
5422 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
5423 method_type: fidl::MethodType::TwoWay,
5424 })
5425 }
5426 _ => Err(fidl::Error::UnknownOrdinal {
5427 ordinal: header.ordinal,
5428 protocol_name: <DictionaryDrainIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5429 }),
5430 }))
5431 },
5432 )
5433 }
5434}
5435
5436#[derive(Debug)]
5437pub enum DictionaryDrainIteratorRequest {
5438 GetNext { start_id: u64, limit: u32, responder: DictionaryDrainIteratorGetNextResponder },
5455 #[non_exhaustive]
5457 _UnknownMethod {
5458 ordinal: u64,
5460 control_handle: DictionaryDrainIteratorControlHandle,
5461 method_type: fidl::MethodType,
5462 },
5463}
5464
5465impl DictionaryDrainIteratorRequest {
5466 #[allow(irrefutable_let_patterns)]
5467 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryDrainIteratorGetNextResponder)> {
5468 if let DictionaryDrainIteratorRequest::GetNext { start_id, limit, responder } = self {
5469 Some((start_id, limit, responder))
5470 } else {
5471 None
5472 }
5473 }
5474
5475 pub fn method_name(&self) -> &'static str {
5477 match *self {
5478 DictionaryDrainIteratorRequest::GetNext { .. } => "get_next",
5479 DictionaryDrainIteratorRequest::_UnknownMethod {
5480 method_type: fidl::MethodType::OneWay,
5481 ..
5482 } => "unknown one-way method",
5483 DictionaryDrainIteratorRequest::_UnknownMethod {
5484 method_type: fidl::MethodType::TwoWay,
5485 ..
5486 } => "unknown two-way method",
5487 }
5488 }
5489}
5490
5491#[derive(Debug, Clone)]
5492pub struct DictionaryDrainIteratorControlHandle {
5493 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5494}
5495
5496impl DictionaryDrainIteratorControlHandle {
5497 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
5498 self.inner.shutdown_with_epitaph(status.into())
5499 }
5500}
5501
5502impl fdomain_client::fidl::ControlHandle for DictionaryDrainIteratorControlHandle {
5503 fn shutdown(&self) {
5504 self.inner.shutdown()
5505 }
5506
5507 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
5508 self.inner.shutdown_with_epitaph(status)
5509 }
5510
5511 fn is_closed(&self) -> bool {
5512 self.inner.channel().is_closed()
5513 }
5514 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5515 self.inner.channel().on_closed()
5516 }
5517}
5518
5519impl DictionaryDrainIteratorControlHandle {}
5520
5521#[must_use = "FIDL methods require a response to be sent"]
5522#[derive(Debug)]
5523pub struct DictionaryDrainIteratorGetNextResponder {
5524 control_handle: std::mem::ManuallyDrop<DictionaryDrainIteratorControlHandle>,
5525 tx_id: u32,
5526}
5527
5528impl std::ops::Drop for DictionaryDrainIteratorGetNextResponder {
5532 fn drop(&mut self) {
5533 self.control_handle.shutdown();
5534 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5536 }
5537}
5538
5539impl fdomain_client::fidl::Responder for DictionaryDrainIteratorGetNextResponder {
5540 type ControlHandle = DictionaryDrainIteratorControlHandle;
5541
5542 fn control_handle(&self) -> &DictionaryDrainIteratorControlHandle {
5543 &self.control_handle
5544 }
5545
5546 fn drop_without_shutdown(mut self) {
5547 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5549 std::mem::forget(self);
5551 }
5552}
5553
5554impl DictionaryDrainIteratorGetNextResponder {
5555 pub fn send(
5559 self,
5560 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5561 ) -> Result<(), fidl::Error> {
5562 let _result = self.send_raw(result);
5563 if _result.is_err() {
5564 self.control_handle.shutdown();
5565 }
5566 self.drop_without_shutdown();
5567 _result
5568 }
5569
5570 pub fn send_no_shutdown_on_err(
5572 self,
5573 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5574 ) -> Result<(), fidl::Error> {
5575 let _result = self.send_raw(result);
5576 self.drop_without_shutdown();
5577 _result
5578 }
5579
5580 fn send_raw(
5581 &self,
5582 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
5583 ) -> Result<(), fidl::Error> {
5584 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5585 DictionaryDrainIteratorGetNextResponse,
5586 CapabilityStoreError,
5587 >>(
5588 fidl::encoding::FlexibleResult::new(result),
5589 self.tx_id,
5590 0x4f8082ca1ee26061,
5591 fidl::encoding::DynamicFlags::FLEXIBLE,
5592 )
5593 }
5594}
5595
5596#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5597pub struct DictionaryEnumerateIteratorMarker;
5598
5599impl fdomain_client::fidl::ProtocolMarker for DictionaryEnumerateIteratorMarker {
5600 type Proxy = DictionaryEnumerateIteratorProxy;
5601 type RequestStream = DictionaryEnumerateIteratorRequestStream;
5602
5603 const DEBUG_NAME: &'static str = "(anonymous) DictionaryEnumerateIterator";
5604}
5605pub type DictionaryEnumerateIteratorGetNextResult =
5606 Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>;
5607
5608pub trait DictionaryEnumerateIteratorProxyInterface: Send + Sync {
5609 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error>>
5610 + Send;
5611 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
5612}
5613
5614#[derive(Debug, Clone)]
5615pub struct DictionaryEnumerateIteratorProxy {
5616 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5617}
5618
5619impl fdomain_client::fidl::Proxy for DictionaryEnumerateIteratorProxy {
5620 type Protocol = DictionaryEnumerateIteratorMarker;
5621
5622 fn from_channel(inner: fdomain_client::Channel) -> Self {
5623 Self::new(inner)
5624 }
5625
5626 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5627 self.client.into_channel().map_err(|client| Self { client })
5628 }
5629
5630 fn as_channel(&self) -> &fdomain_client::Channel {
5631 self.client.as_channel()
5632 }
5633}
5634
5635impl DictionaryEnumerateIteratorProxy {
5636 pub fn new(channel: fdomain_client::Channel) -> Self {
5638 let protocol_name =
5639 <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5640 Self { client: fidl::client::Client::new(channel, protocol_name) }
5641 }
5642
5643 pub fn take_event_stream(&self) -> DictionaryEnumerateIteratorEventStream {
5649 DictionaryEnumerateIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5650 }
5651
5652 pub fn r#get_next(
5673 &self,
5674 mut start_id: u64,
5675 mut limit: u32,
5676 ) -> fidl::client::QueryResponseFut<
5677 DictionaryEnumerateIteratorGetNextResult,
5678 fdomain_client::fidl::FDomainResourceDialect,
5679 > {
5680 DictionaryEnumerateIteratorProxyInterface::r#get_next(self, start_id, limit)
5681 }
5682}
5683
5684impl DictionaryEnumerateIteratorProxyInterface for DictionaryEnumerateIteratorProxy {
5685 type GetNextResponseFut = fidl::client::QueryResponseFut<
5686 DictionaryEnumerateIteratorGetNextResult,
5687 fdomain_client::fidl::FDomainResourceDialect,
5688 >;
5689 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
5690 fn _decode(
5691 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5692 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
5693 let _response = fidl::client::decode_transaction_body::<
5694 fidl::encoding::FlexibleResultType<
5695 DictionaryEnumerateIteratorGetNextResponse,
5696 CapabilityStoreError,
5697 >,
5698 fdomain_client::fidl::FDomainResourceDialect,
5699 0x14f8bc286512f5cf,
5700 >(_buf?)?
5701 .into_result_fdomain::<DictionaryEnumerateIteratorMarker>("get_next")?;
5702 Ok(_response.map(|x| (x.items, x.end_id)))
5703 }
5704 self.client.send_query_and_decode::<
5705 DictionaryEnumerateIteratorGetNextRequest,
5706 DictionaryEnumerateIteratorGetNextResult,
5707 >(
5708 (start_id, limit,),
5709 0x14f8bc286512f5cf,
5710 fidl::encoding::DynamicFlags::FLEXIBLE,
5711 _decode,
5712 )
5713 }
5714}
5715
5716pub struct DictionaryEnumerateIteratorEventStream {
5717 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5718}
5719
5720impl std::marker::Unpin for DictionaryEnumerateIteratorEventStream {}
5721
5722impl futures::stream::FusedStream for DictionaryEnumerateIteratorEventStream {
5723 fn is_terminated(&self) -> bool {
5724 self.event_receiver.is_terminated()
5725 }
5726}
5727
5728impl futures::Stream for DictionaryEnumerateIteratorEventStream {
5729 type Item = Result<DictionaryEnumerateIteratorEvent, fidl::Error>;
5730
5731 fn poll_next(
5732 mut self: std::pin::Pin<&mut Self>,
5733 cx: &mut std::task::Context<'_>,
5734 ) -> std::task::Poll<Option<Self::Item>> {
5735 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5736 &mut self.event_receiver,
5737 cx
5738 )?) {
5739 Some(buf) => {
5740 std::task::Poll::Ready(Some(DictionaryEnumerateIteratorEvent::decode(buf)))
5741 }
5742 None => std::task::Poll::Ready(None),
5743 }
5744 }
5745}
5746
5747#[derive(Debug)]
5748pub enum DictionaryEnumerateIteratorEvent {
5749 #[non_exhaustive]
5750 _UnknownEvent {
5751 ordinal: u64,
5753 },
5754}
5755
5756impl DictionaryEnumerateIteratorEvent {
5757 fn decode(
5759 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5760 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
5761 let (bytes, _handles) = buf.split_mut();
5762 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5763 debug_assert_eq!(tx_header.tx_id, 0);
5764 match tx_header.ordinal {
5765 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5766 Ok(DictionaryEnumerateIteratorEvent::_UnknownEvent {
5767 ordinal: tx_header.ordinal,
5768 })
5769 }
5770 _ => Err(fidl::Error::UnknownOrdinal {
5771 ordinal: tx_header.ordinal,
5772 protocol_name: <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5773 })
5774 }
5775 }
5776}
5777
5778pub struct DictionaryEnumerateIteratorRequestStream {
5780 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5781 is_terminated: bool,
5782}
5783
5784impl std::marker::Unpin for DictionaryEnumerateIteratorRequestStream {}
5785
5786impl futures::stream::FusedStream for DictionaryEnumerateIteratorRequestStream {
5787 fn is_terminated(&self) -> bool {
5788 self.is_terminated
5789 }
5790}
5791
5792impl fdomain_client::fidl::RequestStream for DictionaryEnumerateIteratorRequestStream {
5793 type Protocol = DictionaryEnumerateIteratorMarker;
5794 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
5795
5796 fn from_channel(channel: fdomain_client::Channel) -> Self {
5797 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5798 }
5799
5800 fn control_handle(&self) -> Self::ControlHandle {
5801 DictionaryEnumerateIteratorControlHandle { inner: self.inner.clone() }
5802 }
5803
5804 fn into_inner(
5805 self,
5806 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5807 {
5808 (self.inner, self.is_terminated)
5809 }
5810
5811 fn from_inner(
5812 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5813 is_terminated: bool,
5814 ) -> Self {
5815 Self { inner, is_terminated }
5816 }
5817}
5818
5819impl futures::Stream for DictionaryEnumerateIteratorRequestStream {
5820 type Item = Result<DictionaryEnumerateIteratorRequest, fidl::Error>;
5821
5822 fn poll_next(
5823 mut self: std::pin::Pin<&mut Self>,
5824 cx: &mut std::task::Context<'_>,
5825 ) -> std::task::Poll<Option<Self::Item>> {
5826 let this = &mut *self;
5827 if this.inner.check_shutdown(cx) {
5828 this.is_terminated = true;
5829 return std::task::Poll::Ready(None);
5830 }
5831 if this.is_terminated {
5832 panic!("polled DictionaryEnumerateIteratorRequestStream after completion");
5833 }
5834 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5835 |bytes, handles| {
5836 match this.inner.channel().read_etc(cx, bytes, handles) {
5837 std::task::Poll::Ready(Ok(())) => {}
5838 std::task::Poll::Pending => return std::task::Poll::Pending,
5839 std::task::Poll::Ready(Err(None)) => {
5840 this.is_terminated = true;
5841 return std::task::Poll::Ready(None);
5842 }
5843 std::task::Poll::Ready(Err(Some(e))) => {
5844 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5845 e.into(),
5846 ))));
5847 }
5848 }
5849
5850 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5852
5853 std::task::Poll::Ready(Some(match header.ordinal {
5854 0x14f8bc286512f5cf => {
5855 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5856 let mut req = fidl::new_empty!(DictionaryEnumerateIteratorGetNextRequest, fdomain_client::fidl::FDomainResourceDialect);
5857 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DictionaryEnumerateIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
5858 let control_handle = DictionaryEnumerateIteratorControlHandle {
5859 inner: this.inner.clone(),
5860 };
5861 Ok(DictionaryEnumerateIteratorRequest::GetNext {start_id: req.start_id,
5862limit: req.limit,
5863
5864 responder: DictionaryEnumerateIteratorGetNextResponder {
5865 control_handle: std::mem::ManuallyDrop::new(control_handle),
5866 tx_id: header.tx_id,
5867 },
5868 })
5869 }
5870 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5871 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
5872 ordinal: header.ordinal,
5873 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
5874 method_type: fidl::MethodType::OneWay,
5875 })
5876 }
5877 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5878 this.inner.send_framework_err(
5879 fidl::encoding::FrameworkErr::UnknownMethod,
5880 header.tx_id,
5881 header.ordinal,
5882 header.dynamic_flags(),
5883 (bytes, handles),
5884 )?;
5885 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
5886 ordinal: header.ordinal,
5887 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
5888 method_type: fidl::MethodType::TwoWay,
5889 })
5890 }
5891 _ => Err(fidl::Error::UnknownOrdinal {
5892 ordinal: header.ordinal,
5893 protocol_name: <DictionaryEnumerateIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5894 }),
5895 }))
5896 },
5897 )
5898 }
5899}
5900
5901#[derive(Debug)]
5902pub enum DictionaryEnumerateIteratorRequest {
5903 GetNext { start_id: u64, limit: u32, responder: DictionaryEnumerateIteratorGetNextResponder },
5924 #[non_exhaustive]
5926 _UnknownMethod {
5927 ordinal: u64,
5929 control_handle: DictionaryEnumerateIteratorControlHandle,
5930 method_type: fidl::MethodType,
5931 },
5932}
5933
5934impl DictionaryEnumerateIteratorRequest {
5935 #[allow(irrefutable_let_patterns)]
5936 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryEnumerateIteratorGetNextResponder)> {
5937 if let DictionaryEnumerateIteratorRequest::GetNext { start_id, limit, responder } = self {
5938 Some((start_id, limit, responder))
5939 } else {
5940 None
5941 }
5942 }
5943
5944 pub fn method_name(&self) -> &'static str {
5946 match *self {
5947 DictionaryEnumerateIteratorRequest::GetNext { .. } => "get_next",
5948 DictionaryEnumerateIteratorRequest::_UnknownMethod {
5949 method_type: fidl::MethodType::OneWay,
5950 ..
5951 } => "unknown one-way method",
5952 DictionaryEnumerateIteratorRequest::_UnknownMethod {
5953 method_type: fidl::MethodType::TwoWay,
5954 ..
5955 } => "unknown two-way method",
5956 }
5957 }
5958}
5959
5960#[derive(Debug, Clone)]
5961pub struct DictionaryEnumerateIteratorControlHandle {
5962 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5963}
5964
5965impl DictionaryEnumerateIteratorControlHandle {
5966 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
5967 self.inner.shutdown_with_epitaph(status.into())
5968 }
5969}
5970
5971impl fdomain_client::fidl::ControlHandle for DictionaryEnumerateIteratorControlHandle {
5972 fn shutdown(&self) {
5973 self.inner.shutdown()
5974 }
5975
5976 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
5977 self.inner.shutdown_with_epitaph(status)
5978 }
5979
5980 fn is_closed(&self) -> bool {
5981 self.inner.channel().is_closed()
5982 }
5983 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5984 self.inner.channel().on_closed()
5985 }
5986}
5987
5988impl DictionaryEnumerateIteratorControlHandle {}
5989
5990#[must_use = "FIDL methods require a response to be sent"]
5991#[derive(Debug)]
5992pub struct DictionaryEnumerateIteratorGetNextResponder {
5993 control_handle: std::mem::ManuallyDrop<DictionaryEnumerateIteratorControlHandle>,
5994 tx_id: u32,
5995}
5996
5997impl std::ops::Drop for DictionaryEnumerateIteratorGetNextResponder {
6001 fn drop(&mut self) {
6002 self.control_handle.shutdown();
6003 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6005 }
6006}
6007
6008impl fdomain_client::fidl::Responder for DictionaryEnumerateIteratorGetNextResponder {
6009 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
6010
6011 fn control_handle(&self) -> &DictionaryEnumerateIteratorControlHandle {
6012 &self.control_handle
6013 }
6014
6015 fn drop_without_shutdown(mut self) {
6016 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6018 std::mem::forget(self);
6020 }
6021}
6022
6023impl DictionaryEnumerateIteratorGetNextResponder {
6024 pub fn send(
6028 self,
6029 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
6030 ) -> Result<(), fidl::Error> {
6031 let _result = self.send_raw(result);
6032 if _result.is_err() {
6033 self.control_handle.shutdown();
6034 }
6035 self.drop_without_shutdown();
6036 _result
6037 }
6038
6039 pub fn send_no_shutdown_on_err(
6041 self,
6042 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
6043 ) -> Result<(), fidl::Error> {
6044 let _result = self.send_raw(result);
6045 self.drop_without_shutdown();
6046 _result
6047 }
6048
6049 fn send_raw(
6050 &self,
6051 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
6052 ) -> Result<(), fidl::Error> {
6053 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6054 DictionaryEnumerateIteratorGetNextResponse,
6055 CapabilityStoreError,
6056 >>(
6057 fidl::encoding::FlexibleResult::new(
6058 result
6059 .as_mut()
6060 .map_err(|e| *e)
6061 .map(|(items, end_id)| (items.as_mut_slice(), *end_id)),
6062 ),
6063 self.tx_id,
6064 0x14f8bc286512f5cf,
6065 fidl::encoding::DynamicFlags::FLEXIBLE,
6066 )
6067 }
6068}
6069
6070#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6071pub struct DictionaryKeysIteratorMarker;
6072
6073impl fdomain_client::fidl::ProtocolMarker for DictionaryKeysIteratorMarker {
6074 type Proxy = DictionaryKeysIteratorProxy;
6075 type RequestStream = DictionaryKeysIteratorRequestStream;
6076
6077 const DEBUG_NAME: &'static str = "(anonymous) DictionaryKeysIterator";
6078}
6079
6080pub trait DictionaryKeysIteratorProxyInterface: Send + Sync {
6081 type GetNextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
6082 fn r#get_next(&self) -> Self::GetNextResponseFut;
6083}
6084
6085#[derive(Debug, Clone)]
6086pub struct DictionaryKeysIteratorProxy {
6087 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6088}
6089
6090impl fdomain_client::fidl::Proxy for DictionaryKeysIteratorProxy {
6091 type Protocol = DictionaryKeysIteratorMarker;
6092
6093 fn from_channel(inner: fdomain_client::Channel) -> Self {
6094 Self::new(inner)
6095 }
6096
6097 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6098 self.client.into_channel().map_err(|client| Self { client })
6099 }
6100
6101 fn as_channel(&self) -> &fdomain_client::Channel {
6102 self.client.as_channel()
6103 }
6104}
6105
6106impl DictionaryKeysIteratorProxy {
6107 pub fn new(channel: fdomain_client::Channel) -> Self {
6109 let protocol_name =
6110 <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6111 Self { client: fidl::client::Client::new(channel, protocol_name) }
6112 }
6113
6114 pub fn take_event_stream(&self) -> DictionaryKeysIteratorEventStream {
6120 DictionaryKeysIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6121 }
6122
6123 pub fn r#get_next(
6124 &self,
6125 ) -> fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>
6126 {
6127 DictionaryKeysIteratorProxyInterface::r#get_next(self)
6128 }
6129}
6130
6131impl DictionaryKeysIteratorProxyInterface for DictionaryKeysIteratorProxy {
6132 type GetNextResponseFut =
6133 fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>;
6134 fn r#get_next(&self) -> Self::GetNextResponseFut {
6135 fn _decode(
6136 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6137 ) -> Result<Vec<String>, fidl::Error> {
6138 let _response = fidl::client::decode_transaction_body::<
6139 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
6140 fdomain_client::fidl::FDomainResourceDialect,
6141 0x453828cbacca7d53,
6142 >(_buf?)?
6143 .into_result_fdomain::<DictionaryKeysIteratorMarker>("get_next")?;
6144 Ok(_response.keys)
6145 }
6146 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
6147 (),
6148 0x453828cbacca7d53,
6149 fidl::encoding::DynamicFlags::FLEXIBLE,
6150 _decode,
6151 )
6152 }
6153}
6154
6155pub struct DictionaryKeysIteratorEventStream {
6156 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6157}
6158
6159impl std::marker::Unpin for DictionaryKeysIteratorEventStream {}
6160
6161impl futures::stream::FusedStream for DictionaryKeysIteratorEventStream {
6162 fn is_terminated(&self) -> bool {
6163 self.event_receiver.is_terminated()
6164 }
6165}
6166
6167impl futures::Stream for DictionaryKeysIteratorEventStream {
6168 type Item = Result<DictionaryKeysIteratorEvent, fidl::Error>;
6169
6170 fn poll_next(
6171 mut self: std::pin::Pin<&mut Self>,
6172 cx: &mut std::task::Context<'_>,
6173 ) -> std::task::Poll<Option<Self::Item>> {
6174 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6175 &mut self.event_receiver,
6176 cx
6177 )?) {
6178 Some(buf) => std::task::Poll::Ready(Some(DictionaryKeysIteratorEvent::decode(buf))),
6179 None => std::task::Poll::Ready(None),
6180 }
6181 }
6182}
6183
6184#[derive(Debug)]
6185pub enum DictionaryKeysIteratorEvent {
6186 #[non_exhaustive]
6187 _UnknownEvent {
6188 ordinal: u64,
6190 },
6191}
6192
6193impl DictionaryKeysIteratorEvent {
6194 fn decode(
6196 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6197 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
6198 let (bytes, _handles) = buf.split_mut();
6199 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6200 debug_assert_eq!(tx_header.tx_id, 0);
6201 match tx_header.ordinal {
6202 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6203 Ok(DictionaryKeysIteratorEvent::_UnknownEvent {
6204 ordinal: tx_header.ordinal,
6205 })
6206 }
6207 _ => Err(fidl::Error::UnknownOrdinal {
6208 ordinal: tx_header.ordinal,
6209 protocol_name: <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6210 })
6211 }
6212 }
6213}
6214
6215pub struct DictionaryKeysIteratorRequestStream {
6217 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6218 is_terminated: bool,
6219}
6220
6221impl std::marker::Unpin for DictionaryKeysIteratorRequestStream {}
6222
6223impl futures::stream::FusedStream for DictionaryKeysIteratorRequestStream {
6224 fn is_terminated(&self) -> bool {
6225 self.is_terminated
6226 }
6227}
6228
6229impl fdomain_client::fidl::RequestStream for DictionaryKeysIteratorRequestStream {
6230 type Protocol = DictionaryKeysIteratorMarker;
6231 type ControlHandle = DictionaryKeysIteratorControlHandle;
6232
6233 fn from_channel(channel: fdomain_client::Channel) -> Self {
6234 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6235 }
6236
6237 fn control_handle(&self) -> Self::ControlHandle {
6238 DictionaryKeysIteratorControlHandle { inner: self.inner.clone() }
6239 }
6240
6241 fn into_inner(
6242 self,
6243 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6244 {
6245 (self.inner, self.is_terminated)
6246 }
6247
6248 fn from_inner(
6249 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6250 is_terminated: bool,
6251 ) -> Self {
6252 Self { inner, is_terminated }
6253 }
6254}
6255
6256impl futures::Stream for DictionaryKeysIteratorRequestStream {
6257 type Item = Result<DictionaryKeysIteratorRequest, fidl::Error>;
6258
6259 fn poll_next(
6260 mut self: std::pin::Pin<&mut Self>,
6261 cx: &mut std::task::Context<'_>,
6262 ) -> std::task::Poll<Option<Self::Item>> {
6263 let this = &mut *self;
6264 if this.inner.check_shutdown(cx) {
6265 this.is_terminated = true;
6266 return std::task::Poll::Ready(None);
6267 }
6268 if this.is_terminated {
6269 panic!("polled DictionaryKeysIteratorRequestStream after completion");
6270 }
6271 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6272 |bytes, handles| {
6273 match this.inner.channel().read_etc(cx, bytes, handles) {
6274 std::task::Poll::Ready(Ok(())) => {}
6275 std::task::Poll::Pending => return std::task::Poll::Pending,
6276 std::task::Poll::Ready(Err(None)) => {
6277 this.is_terminated = true;
6278 return std::task::Poll::Ready(None);
6279 }
6280 std::task::Poll::Ready(Err(Some(e))) => {
6281 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6282 e.into(),
6283 ))));
6284 }
6285 }
6286
6287 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6289
6290 std::task::Poll::Ready(Some(match header.ordinal {
6291 0x453828cbacca7d53 => {
6292 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6293 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
6294 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6295 let control_handle = DictionaryKeysIteratorControlHandle {
6296 inner: this.inner.clone(),
6297 };
6298 Ok(DictionaryKeysIteratorRequest::GetNext {
6299 responder: DictionaryKeysIteratorGetNextResponder {
6300 control_handle: std::mem::ManuallyDrop::new(control_handle),
6301 tx_id: header.tx_id,
6302 },
6303 })
6304 }
6305 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6306 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
6307 ordinal: header.ordinal,
6308 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
6309 method_type: fidl::MethodType::OneWay,
6310 })
6311 }
6312 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6313 this.inner.send_framework_err(
6314 fidl::encoding::FrameworkErr::UnknownMethod,
6315 header.tx_id,
6316 header.ordinal,
6317 header.dynamic_flags(),
6318 (bytes, handles),
6319 )?;
6320 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
6321 ordinal: header.ordinal,
6322 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
6323 method_type: fidl::MethodType::TwoWay,
6324 })
6325 }
6326 _ => Err(fidl::Error::UnknownOrdinal {
6327 ordinal: header.ordinal,
6328 protocol_name: <DictionaryKeysIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6329 }),
6330 }))
6331 },
6332 )
6333 }
6334}
6335
6336#[derive(Debug)]
6337pub enum DictionaryKeysIteratorRequest {
6338 GetNext {
6339 responder: DictionaryKeysIteratorGetNextResponder,
6340 },
6341 #[non_exhaustive]
6343 _UnknownMethod {
6344 ordinal: u64,
6346 control_handle: DictionaryKeysIteratorControlHandle,
6347 method_type: fidl::MethodType,
6348 },
6349}
6350
6351impl DictionaryKeysIteratorRequest {
6352 #[allow(irrefutable_let_patterns)]
6353 pub fn into_get_next(self) -> Option<(DictionaryKeysIteratorGetNextResponder)> {
6354 if let DictionaryKeysIteratorRequest::GetNext { responder } = self {
6355 Some((responder))
6356 } else {
6357 None
6358 }
6359 }
6360
6361 pub fn method_name(&self) -> &'static str {
6363 match *self {
6364 DictionaryKeysIteratorRequest::GetNext { .. } => "get_next",
6365 DictionaryKeysIteratorRequest::_UnknownMethod {
6366 method_type: fidl::MethodType::OneWay,
6367 ..
6368 } => "unknown one-way method",
6369 DictionaryKeysIteratorRequest::_UnknownMethod {
6370 method_type: fidl::MethodType::TwoWay,
6371 ..
6372 } => "unknown two-way method",
6373 }
6374 }
6375}
6376
6377#[derive(Debug, Clone)]
6378pub struct DictionaryKeysIteratorControlHandle {
6379 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6380}
6381
6382impl DictionaryKeysIteratorControlHandle {
6383 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6384 self.inner.shutdown_with_epitaph(status.into())
6385 }
6386}
6387
6388impl fdomain_client::fidl::ControlHandle for DictionaryKeysIteratorControlHandle {
6389 fn shutdown(&self) {
6390 self.inner.shutdown()
6391 }
6392
6393 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6394 self.inner.shutdown_with_epitaph(status)
6395 }
6396
6397 fn is_closed(&self) -> bool {
6398 self.inner.channel().is_closed()
6399 }
6400 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6401 self.inner.channel().on_closed()
6402 }
6403}
6404
6405impl DictionaryKeysIteratorControlHandle {}
6406
6407#[must_use = "FIDL methods require a response to be sent"]
6408#[derive(Debug)]
6409pub struct DictionaryKeysIteratorGetNextResponder {
6410 control_handle: std::mem::ManuallyDrop<DictionaryKeysIteratorControlHandle>,
6411 tx_id: u32,
6412}
6413
6414impl std::ops::Drop for DictionaryKeysIteratorGetNextResponder {
6418 fn drop(&mut self) {
6419 self.control_handle.shutdown();
6420 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6422 }
6423}
6424
6425impl fdomain_client::fidl::Responder for DictionaryKeysIteratorGetNextResponder {
6426 type ControlHandle = DictionaryKeysIteratorControlHandle;
6427
6428 fn control_handle(&self) -> &DictionaryKeysIteratorControlHandle {
6429 &self.control_handle
6430 }
6431
6432 fn drop_without_shutdown(mut self) {
6433 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6435 std::mem::forget(self);
6437 }
6438}
6439
6440impl DictionaryKeysIteratorGetNextResponder {
6441 pub fn send(self, mut keys: &[String]) -> Result<(), fidl::Error> {
6445 let _result = self.send_raw(keys);
6446 if _result.is_err() {
6447 self.control_handle.shutdown();
6448 }
6449 self.drop_without_shutdown();
6450 _result
6451 }
6452
6453 pub fn send_no_shutdown_on_err(self, mut keys: &[String]) -> Result<(), fidl::Error> {
6455 let _result = self.send_raw(keys);
6456 self.drop_without_shutdown();
6457 _result
6458 }
6459
6460 fn send_raw(&self, mut keys: &[String]) -> Result<(), fidl::Error> {
6461 self.control_handle
6462 .inner
6463 .send::<fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>>(
6464 fidl::encoding::Flexible::new((keys,)),
6465 self.tx_id,
6466 0x453828cbacca7d53,
6467 fidl::encoding::DynamicFlags::FLEXIBLE,
6468 )
6469 }
6470}
6471
6472#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6473pub struct DictionaryRouterMarker;
6474
6475impl fdomain_client::fidl::ProtocolMarker for DictionaryRouterMarker {
6476 type Proxy = DictionaryRouterProxy;
6477 type RequestStream = DictionaryRouterRequestStream;
6478
6479 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
6480}
6481impl fdomain_client::fidl::DiscoverableProtocolMarker for DictionaryRouterMarker {}
6482pub type DictionaryRouterRouteResult = Result<DictionaryRouterRouteResponse, RouterError>;
6483
6484pub trait DictionaryRouterProxyInterface: Send + Sync {
6485 type RouteResponseFut: std::future::Future<Output = Result<DictionaryRouterRouteResult, fidl::Error>>
6486 + Send;
6487 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
6488}
6489
6490#[derive(Debug, Clone)]
6491pub struct DictionaryRouterProxy {
6492 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6493}
6494
6495impl fdomain_client::fidl::Proxy for DictionaryRouterProxy {
6496 type Protocol = DictionaryRouterMarker;
6497
6498 fn from_channel(inner: fdomain_client::Channel) -> Self {
6499 Self::new(inner)
6500 }
6501
6502 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6503 self.client.into_channel().map_err(|client| Self { client })
6504 }
6505
6506 fn as_channel(&self) -> &fdomain_client::Channel {
6507 self.client.as_channel()
6508 }
6509}
6510
6511impl DictionaryRouterProxy {
6512 pub fn new(channel: fdomain_client::Channel) -> Self {
6514 let protocol_name =
6515 <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6516 Self { client: fidl::client::Client::new(channel, protocol_name) }
6517 }
6518
6519 pub fn take_event_stream(&self) -> DictionaryRouterEventStream {
6525 DictionaryRouterEventStream { event_receiver: self.client.take_event_receiver() }
6526 }
6527
6528 pub fn r#route(
6529 &self,
6530 mut payload: RouteRequest,
6531 ) -> fidl::client::QueryResponseFut<
6532 DictionaryRouterRouteResult,
6533 fdomain_client::fidl::FDomainResourceDialect,
6534 > {
6535 DictionaryRouterProxyInterface::r#route(self, payload)
6536 }
6537}
6538
6539impl DictionaryRouterProxyInterface for DictionaryRouterProxy {
6540 type RouteResponseFut = fidl::client::QueryResponseFut<
6541 DictionaryRouterRouteResult,
6542 fdomain_client::fidl::FDomainResourceDialect,
6543 >;
6544 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
6545 fn _decode(
6546 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6547 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
6548 let _response = fidl::client::decode_transaction_body::<
6549 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
6550 fdomain_client::fidl::FDomainResourceDialect,
6551 0x714c65bfe54bd79f,
6552 >(_buf?)?
6553 .into_result_fdomain::<DictionaryRouterMarker>("route")?;
6554 Ok(_response.map(|x| x))
6555 }
6556 self.client.send_query_and_decode::<RouteRequest, DictionaryRouterRouteResult>(
6557 &mut payload,
6558 0x714c65bfe54bd79f,
6559 fidl::encoding::DynamicFlags::FLEXIBLE,
6560 _decode,
6561 )
6562 }
6563}
6564
6565pub struct DictionaryRouterEventStream {
6566 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6567}
6568
6569impl std::marker::Unpin for DictionaryRouterEventStream {}
6570
6571impl futures::stream::FusedStream for DictionaryRouterEventStream {
6572 fn is_terminated(&self) -> bool {
6573 self.event_receiver.is_terminated()
6574 }
6575}
6576
6577impl futures::Stream for DictionaryRouterEventStream {
6578 type Item = Result<DictionaryRouterEvent, fidl::Error>;
6579
6580 fn poll_next(
6581 mut self: std::pin::Pin<&mut Self>,
6582 cx: &mut std::task::Context<'_>,
6583 ) -> std::task::Poll<Option<Self::Item>> {
6584 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6585 &mut self.event_receiver,
6586 cx
6587 )?) {
6588 Some(buf) => std::task::Poll::Ready(Some(DictionaryRouterEvent::decode(buf))),
6589 None => std::task::Poll::Ready(None),
6590 }
6591 }
6592}
6593
6594#[derive(Debug)]
6595pub enum DictionaryRouterEvent {
6596 #[non_exhaustive]
6597 _UnknownEvent {
6598 ordinal: u64,
6600 },
6601}
6602
6603impl DictionaryRouterEvent {
6604 fn decode(
6606 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6607 ) -> Result<DictionaryRouterEvent, fidl::Error> {
6608 let (bytes, _handles) = buf.split_mut();
6609 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6610 debug_assert_eq!(tx_header.tx_id, 0);
6611 match tx_header.ordinal {
6612 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6613 Ok(DictionaryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6614 }
6615 _ => Err(fidl::Error::UnknownOrdinal {
6616 ordinal: tx_header.ordinal,
6617 protocol_name:
6618 <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6619 }),
6620 }
6621 }
6622}
6623
6624pub struct DictionaryRouterRequestStream {
6626 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6627 is_terminated: bool,
6628}
6629
6630impl std::marker::Unpin for DictionaryRouterRequestStream {}
6631
6632impl futures::stream::FusedStream for DictionaryRouterRequestStream {
6633 fn is_terminated(&self) -> bool {
6634 self.is_terminated
6635 }
6636}
6637
6638impl fdomain_client::fidl::RequestStream for DictionaryRouterRequestStream {
6639 type Protocol = DictionaryRouterMarker;
6640 type ControlHandle = DictionaryRouterControlHandle;
6641
6642 fn from_channel(channel: fdomain_client::Channel) -> Self {
6643 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6644 }
6645
6646 fn control_handle(&self) -> Self::ControlHandle {
6647 DictionaryRouterControlHandle { inner: self.inner.clone() }
6648 }
6649
6650 fn into_inner(
6651 self,
6652 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6653 {
6654 (self.inner, self.is_terminated)
6655 }
6656
6657 fn from_inner(
6658 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6659 is_terminated: bool,
6660 ) -> Self {
6661 Self { inner, is_terminated }
6662 }
6663}
6664
6665impl futures::Stream for DictionaryRouterRequestStream {
6666 type Item = Result<DictionaryRouterRequest, fidl::Error>;
6667
6668 fn poll_next(
6669 mut self: std::pin::Pin<&mut Self>,
6670 cx: &mut std::task::Context<'_>,
6671 ) -> std::task::Poll<Option<Self::Item>> {
6672 let this = &mut *self;
6673 if this.inner.check_shutdown(cx) {
6674 this.is_terminated = true;
6675 return std::task::Poll::Ready(None);
6676 }
6677 if this.is_terminated {
6678 panic!("polled DictionaryRouterRequestStream after completion");
6679 }
6680 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6681 |bytes, handles| {
6682 match this.inner.channel().read_etc(cx, bytes, handles) {
6683 std::task::Poll::Ready(Ok(())) => {}
6684 std::task::Poll::Pending => return std::task::Poll::Pending,
6685 std::task::Poll::Ready(Err(None)) => {
6686 this.is_terminated = true;
6687 return std::task::Poll::Ready(None);
6688 }
6689 std::task::Poll::Ready(Err(Some(e))) => {
6690 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6691 e.into(),
6692 ))));
6693 }
6694 }
6695
6696 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6698
6699 std::task::Poll::Ready(Some(match header.ordinal {
6700 0x714c65bfe54bd79f => {
6701 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6702 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
6703 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
6704 let control_handle = DictionaryRouterControlHandle {
6705 inner: this.inner.clone(),
6706 };
6707 Ok(DictionaryRouterRequest::Route {payload: req,
6708 responder: DictionaryRouterRouteResponder {
6709 control_handle: std::mem::ManuallyDrop::new(control_handle),
6710 tx_id: header.tx_id,
6711 },
6712 })
6713 }
6714 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6715 Ok(DictionaryRouterRequest::_UnknownMethod {
6716 ordinal: header.ordinal,
6717 control_handle: DictionaryRouterControlHandle { inner: this.inner.clone() },
6718 method_type: fidl::MethodType::OneWay,
6719 })
6720 }
6721 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6722 this.inner.send_framework_err(
6723 fidl::encoding::FrameworkErr::UnknownMethod,
6724 header.tx_id,
6725 header.ordinal,
6726 header.dynamic_flags(),
6727 (bytes, handles),
6728 )?;
6729 Ok(DictionaryRouterRequest::_UnknownMethod {
6730 ordinal: header.ordinal,
6731 control_handle: DictionaryRouterControlHandle { inner: this.inner.clone() },
6732 method_type: fidl::MethodType::TwoWay,
6733 })
6734 }
6735 _ => Err(fidl::Error::UnknownOrdinal {
6736 ordinal: header.ordinal,
6737 protocol_name: <DictionaryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6738 }),
6739 }))
6740 },
6741 )
6742 }
6743}
6744
6745#[derive(Debug)]
6746pub enum DictionaryRouterRequest {
6747 Route {
6748 payload: RouteRequest,
6749 responder: DictionaryRouterRouteResponder,
6750 },
6751 #[non_exhaustive]
6753 _UnknownMethod {
6754 ordinal: u64,
6756 control_handle: DictionaryRouterControlHandle,
6757 method_type: fidl::MethodType,
6758 },
6759}
6760
6761impl DictionaryRouterRequest {
6762 #[allow(irrefutable_let_patterns)]
6763 pub fn into_route(self) -> Option<(RouteRequest, DictionaryRouterRouteResponder)> {
6764 if let DictionaryRouterRequest::Route { payload, responder } = self {
6765 Some((payload, responder))
6766 } else {
6767 None
6768 }
6769 }
6770
6771 pub fn method_name(&self) -> &'static str {
6773 match *self {
6774 DictionaryRouterRequest::Route { .. } => "route",
6775 DictionaryRouterRequest::_UnknownMethod {
6776 method_type: fidl::MethodType::OneWay,
6777 ..
6778 } => "unknown one-way method",
6779 DictionaryRouterRequest::_UnknownMethod {
6780 method_type: fidl::MethodType::TwoWay,
6781 ..
6782 } => "unknown two-way method",
6783 }
6784 }
6785}
6786
6787#[derive(Debug, Clone)]
6788pub struct DictionaryRouterControlHandle {
6789 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6790}
6791
6792impl DictionaryRouterControlHandle {
6793 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6794 self.inner.shutdown_with_epitaph(status.into())
6795 }
6796}
6797
6798impl fdomain_client::fidl::ControlHandle for DictionaryRouterControlHandle {
6799 fn shutdown(&self) {
6800 self.inner.shutdown()
6801 }
6802
6803 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6804 self.inner.shutdown_with_epitaph(status)
6805 }
6806
6807 fn is_closed(&self) -> bool {
6808 self.inner.channel().is_closed()
6809 }
6810 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6811 self.inner.channel().on_closed()
6812 }
6813}
6814
6815impl DictionaryRouterControlHandle {}
6816
6817#[must_use = "FIDL methods require a response to be sent"]
6818#[derive(Debug)]
6819pub struct DictionaryRouterRouteResponder {
6820 control_handle: std::mem::ManuallyDrop<DictionaryRouterControlHandle>,
6821 tx_id: u32,
6822}
6823
6824impl std::ops::Drop for DictionaryRouterRouteResponder {
6828 fn drop(&mut self) {
6829 self.control_handle.shutdown();
6830 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6832 }
6833}
6834
6835impl fdomain_client::fidl::Responder for DictionaryRouterRouteResponder {
6836 type ControlHandle = DictionaryRouterControlHandle;
6837
6838 fn control_handle(&self) -> &DictionaryRouterControlHandle {
6839 &self.control_handle
6840 }
6841
6842 fn drop_without_shutdown(mut self) {
6843 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6845 std::mem::forget(self);
6847 }
6848}
6849
6850impl DictionaryRouterRouteResponder {
6851 pub fn send(
6855 self,
6856 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6857 ) -> Result<(), fidl::Error> {
6858 let _result = self.send_raw(result);
6859 if _result.is_err() {
6860 self.control_handle.shutdown();
6861 }
6862 self.drop_without_shutdown();
6863 _result
6864 }
6865
6866 pub fn send_no_shutdown_on_err(
6868 self,
6869 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6870 ) -> Result<(), fidl::Error> {
6871 let _result = self.send_raw(result);
6872 self.drop_without_shutdown();
6873 _result
6874 }
6875
6876 fn send_raw(
6877 &self,
6878 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
6879 ) -> Result<(), fidl::Error> {
6880 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6881 DictionaryRouterRouteResponse,
6882 RouterError,
6883 >>(
6884 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
6885 self.tx_id,
6886 0x714c65bfe54bd79f,
6887 fidl::encoding::DynamicFlags::FLEXIBLE,
6888 )
6889 }
6890}
6891
6892#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6893pub struct DirConnectorRouterMarker;
6894
6895impl fdomain_client::fidl::ProtocolMarker for DirConnectorRouterMarker {
6896 type Proxy = DirConnectorRouterProxy;
6897 type RequestStream = DirConnectorRouterRequestStream;
6898
6899 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
6900}
6901impl fdomain_client::fidl::DiscoverableProtocolMarker for DirConnectorRouterMarker {}
6902pub type DirConnectorRouterRouteResult = Result<DirConnectorRouterRouteResponse, RouterError>;
6903
6904pub trait DirConnectorRouterProxyInterface: Send + Sync {
6905 type RouteResponseFut: std::future::Future<Output = Result<DirConnectorRouterRouteResult, fidl::Error>>
6906 + Send;
6907 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
6908}
6909
6910#[derive(Debug, Clone)]
6911pub struct DirConnectorRouterProxy {
6912 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6913}
6914
6915impl fdomain_client::fidl::Proxy for DirConnectorRouterProxy {
6916 type Protocol = DirConnectorRouterMarker;
6917
6918 fn from_channel(inner: fdomain_client::Channel) -> Self {
6919 Self::new(inner)
6920 }
6921
6922 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6923 self.client.into_channel().map_err(|client| Self { client })
6924 }
6925
6926 fn as_channel(&self) -> &fdomain_client::Channel {
6927 self.client.as_channel()
6928 }
6929}
6930
6931impl DirConnectorRouterProxy {
6932 pub fn new(channel: fdomain_client::Channel) -> Self {
6934 let protocol_name =
6935 <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6936 Self { client: fidl::client::Client::new(channel, protocol_name) }
6937 }
6938
6939 pub fn take_event_stream(&self) -> DirConnectorRouterEventStream {
6945 DirConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
6946 }
6947
6948 pub fn r#route(
6949 &self,
6950 mut payload: RouteRequest,
6951 ) -> fidl::client::QueryResponseFut<
6952 DirConnectorRouterRouteResult,
6953 fdomain_client::fidl::FDomainResourceDialect,
6954 > {
6955 DirConnectorRouterProxyInterface::r#route(self, payload)
6956 }
6957}
6958
6959impl DirConnectorRouterProxyInterface for DirConnectorRouterProxy {
6960 type RouteResponseFut = fidl::client::QueryResponseFut<
6961 DirConnectorRouterRouteResult,
6962 fdomain_client::fidl::FDomainResourceDialect,
6963 >;
6964 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
6965 fn _decode(
6966 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6967 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
6968 let _response = fidl::client::decode_transaction_body::<
6969 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
6970 fdomain_client::fidl::FDomainResourceDialect,
6971 0xd7e0f01da2c8e40,
6972 >(_buf?)?
6973 .into_result_fdomain::<DirConnectorRouterMarker>("route")?;
6974 Ok(_response.map(|x| x))
6975 }
6976 self.client.send_query_and_decode::<RouteRequest, DirConnectorRouterRouteResult>(
6977 &mut payload,
6978 0xd7e0f01da2c8e40,
6979 fidl::encoding::DynamicFlags::FLEXIBLE,
6980 _decode,
6981 )
6982 }
6983}
6984
6985pub struct DirConnectorRouterEventStream {
6986 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6987}
6988
6989impl std::marker::Unpin for DirConnectorRouterEventStream {}
6990
6991impl futures::stream::FusedStream for DirConnectorRouterEventStream {
6992 fn is_terminated(&self) -> bool {
6993 self.event_receiver.is_terminated()
6994 }
6995}
6996
6997impl futures::Stream for DirConnectorRouterEventStream {
6998 type Item = Result<DirConnectorRouterEvent, fidl::Error>;
6999
7000 fn poll_next(
7001 mut self: std::pin::Pin<&mut Self>,
7002 cx: &mut std::task::Context<'_>,
7003 ) -> std::task::Poll<Option<Self::Item>> {
7004 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7005 &mut self.event_receiver,
7006 cx
7007 )?) {
7008 Some(buf) => std::task::Poll::Ready(Some(DirConnectorRouterEvent::decode(buf))),
7009 None => std::task::Poll::Ready(None),
7010 }
7011 }
7012}
7013
7014#[derive(Debug)]
7015pub enum DirConnectorRouterEvent {
7016 #[non_exhaustive]
7017 _UnknownEvent {
7018 ordinal: u64,
7020 },
7021}
7022
7023impl DirConnectorRouterEvent {
7024 fn decode(
7026 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7027 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
7028 let (bytes, _handles) = buf.split_mut();
7029 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7030 debug_assert_eq!(tx_header.tx_id, 0);
7031 match tx_header.ordinal {
7032 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7033 Ok(DirConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7034 }
7035 _ => Err(fidl::Error::UnknownOrdinal {
7036 ordinal: tx_header.ordinal,
7037 protocol_name:
7038 <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7039 }),
7040 }
7041 }
7042}
7043
7044pub struct DirConnectorRouterRequestStream {
7046 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7047 is_terminated: bool,
7048}
7049
7050impl std::marker::Unpin for DirConnectorRouterRequestStream {}
7051
7052impl futures::stream::FusedStream for DirConnectorRouterRequestStream {
7053 fn is_terminated(&self) -> bool {
7054 self.is_terminated
7055 }
7056}
7057
7058impl fdomain_client::fidl::RequestStream for DirConnectorRouterRequestStream {
7059 type Protocol = DirConnectorRouterMarker;
7060 type ControlHandle = DirConnectorRouterControlHandle;
7061
7062 fn from_channel(channel: fdomain_client::Channel) -> Self {
7063 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7064 }
7065
7066 fn control_handle(&self) -> Self::ControlHandle {
7067 DirConnectorRouterControlHandle { inner: self.inner.clone() }
7068 }
7069
7070 fn into_inner(
7071 self,
7072 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7073 {
7074 (self.inner, self.is_terminated)
7075 }
7076
7077 fn from_inner(
7078 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7079 is_terminated: bool,
7080 ) -> Self {
7081 Self { inner, is_terminated }
7082 }
7083}
7084
7085impl futures::Stream for DirConnectorRouterRequestStream {
7086 type Item = Result<DirConnectorRouterRequest, fidl::Error>;
7087
7088 fn poll_next(
7089 mut self: std::pin::Pin<&mut Self>,
7090 cx: &mut std::task::Context<'_>,
7091 ) -> std::task::Poll<Option<Self::Item>> {
7092 let this = &mut *self;
7093 if this.inner.check_shutdown(cx) {
7094 this.is_terminated = true;
7095 return std::task::Poll::Ready(None);
7096 }
7097 if this.is_terminated {
7098 panic!("polled DirConnectorRouterRequestStream after completion");
7099 }
7100 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7101 |bytes, handles| {
7102 match this.inner.channel().read_etc(cx, bytes, handles) {
7103 std::task::Poll::Ready(Ok(())) => {}
7104 std::task::Poll::Pending => return std::task::Poll::Pending,
7105 std::task::Poll::Ready(Err(None)) => {
7106 this.is_terminated = true;
7107 return std::task::Poll::Ready(None);
7108 }
7109 std::task::Poll::Ready(Err(Some(e))) => {
7110 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7111 e.into(),
7112 ))));
7113 }
7114 }
7115
7116 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7118
7119 std::task::Poll::Ready(Some(match header.ordinal {
7120 0xd7e0f01da2c8e40 => {
7121 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7122 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
7123 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
7124 let control_handle = DirConnectorRouterControlHandle {
7125 inner: this.inner.clone(),
7126 };
7127 Ok(DirConnectorRouterRequest::Route {payload: req,
7128 responder: DirConnectorRouterRouteResponder {
7129 control_handle: std::mem::ManuallyDrop::new(control_handle),
7130 tx_id: header.tx_id,
7131 },
7132 })
7133 }
7134 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7135 Ok(DirConnectorRouterRequest::_UnknownMethod {
7136 ordinal: header.ordinal,
7137 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
7138 method_type: fidl::MethodType::OneWay,
7139 })
7140 }
7141 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7142 this.inner.send_framework_err(
7143 fidl::encoding::FrameworkErr::UnknownMethod,
7144 header.tx_id,
7145 header.ordinal,
7146 header.dynamic_flags(),
7147 (bytes, handles),
7148 )?;
7149 Ok(DirConnectorRouterRequest::_UnknownMethod {
7150 ordinal: header.ordinal,
7151 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
7152 method_type: fidl::MethodType::TwoWay,
7153 })
7154 }
7155 _ => Err(fidl::Error::UnknownOrdinal {
7156 ordinal: header.ordinal,
7157 protocol_name: <DirConnectorRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7158 }),
7159 }))
7160 },
7161 )
7162 }
7163}
7164
7165#[derive(Debug)]
7166pub enum DirConnectorRouterRequest {
7167 Route {
7168 payload: RouteRequest,
7169 responder: DirConnectorRouterRouteResponder,
7170 },
7171 #[non_exhaustive]
7173 _UnknownMethod {
7174 ordinal: u64,
7176 control_handle: DirConnectorRouterControlHandle,
7177 method_type: fidl::MethodType,
7178 },
7179}
7180
7181impl DirConnectorRouterRequest {
7182 #[allow(irrefutable_let_patterns)]
7183 pub fn into_route(self) -> Option<(RouteRequest, DirConnectorRouterRouteResponder)> {
7184 if let DirConnectorRouterRequest::Route { payload, responder } = self {
7185 Some((payload, responder))
7186 } else {
7187 None
7188 }
7189 }
7190
7191 pub fn method_name(&self) -> &'static str {
7193 match *self {
7194 DirConnectorRouterRequest::Route { .. } => "route",
7195 DirConnectorRouterRequest::_UnknownMethod {
7196 method_type: fidl::MethodType::OneWay,
7197 ..
7198 } => "unknown one-way method",
7199 DirConnectorRouterRequest::_UnknownMethod {
7200 method_type: fidl::MethodType::TwoWay,
7201 ..
7202 } => "unknown two-way method",
7203 }
7204 }
7205}
7206
7207#[derive(Debug, Clone)]
7208pub struct DirConnectorRouterControlHandle {
7209 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7210}
7211
7212impl DirConnectorRouterControlHandle {
7213 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
7214 self.inner.shutdown_with_epitaph(status.into())
7215 }
7216}
7217
7218impl fdomain_client::fidl::ControlHandle for DirConnectorRouterControlHandle {
7219 fn shutdown(&self) {
7220 self.inner.shutdown()
7221 }
7222
7223 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
7224 self.inner.shutdown_with_epitaph(status)
7225 }
7226
7227 fn is_closed(&self) -> bool {
7228 self.inner.channel().is_closed()
7229 }
7230 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7231 self.inner.channel().on_closed()
7232 }
7233}
7234
7235impl DirConnectorRouterControlHandle {}
7236
7237#[must_use = "FIDL methods require a response to be sent"]
7238#[derive(Debug)]
7239pub struct DirConnectorRouterRouteResponder {
7240 control_handle: std::mem::ManuallyDrop<DirConnectorRouterControlHandle>,
7241 tx_id: u32,
7242}
7243
7244impl std::ops::Drop for DirConnectorRouterRouteResponder {
7248 fn drop(&mut self) {
7249 self.control_handle.shutdown();
7250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7252 }
7253}
7254
7255impl fdomain_client::fidl::Responder for DirConnectorRouterRouteResponder {
7256 type ControlHandle = DirConnectorRouterControlHandle;
7257
7258 fn control_handle(&self) -> &DirConnectorRouterControlHandle {
7259 &self.control_handle
7260 }
7261
7262 fn drop_without_shutdown(mut self) {
7263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7265 std::mem::forget(self);
7267 }
7268}
7269
7270impl DirConnectorRouterRouteResponder {
7271 pub fn send(
7275 self,
7276 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7277 ) -> Result<(), fidl::Error> {
7278 let _result = self.send_raw(result);
7279 if _result.is_err() {
7280 self.control_handle.shutdown();
7281 }
7282 self.drop_without_shutdown();
7283 _result
7284 }
7285
7286 pub fn send_no_shutdown_on_err(
7288 self,
7289 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7290 ) -> Result<(), fidl::Error> {
7291 let _result = self.send_raw(result);
7292 self.drop_without_shutdown();
7293 _result
7294 }
7295
7296 fn send_raw(
7297 &self,
7298 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
7299 ) -> Result<(), fidl::Error> {
7300 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7301 DirConnectorRouterRouteResponse,
7302 RouterError,
7303 >>(
7304 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
7305 self.tx_id,
7306 0xd7e0f01da2c8e40,
7307 fidl::encoding::DynamicFlags::FLEXIBLE,
7308 )
7309 }
7310}
7311
7312#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7313pub struct DirEntryRouterMarker;
7314
7315impl fdomain_client::fidl::ProtocolMarker for DirEntryRouterMarker {
7316 type Proxy = DirEntryRouterProxy;
7317 type RequestStream = DirEntryRouterRequestStream;
7318
7319 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
7320}
7321impl fdomain_client::fidl::DiscoverableProtocolMarker for DirEntryRouterMarker {}
7322pub type DirEntryRouterRouteResult = Result<DirEntryRouterRouteResponse, RouterError>;
7323
7324pub trait DirEntryRouterProxyInterface: Send + Sync {
7325 type RouteResponseFut: std::future::Future<Output = Result<DirEntryRouterRouteResult, fidl::Error>>
7326 + Send;
7327 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
7328}
7329
7330#[derive(Debug, Clone)]
7331pub struct DirEntryRouterProxy {
7332 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7333}
7334
7335impl fdomain_client::fidl::Proxy for DirEntryRouterProxy {
7336 type Protocol = DirEntryRouterMarker;
7337
7338 fn from_channel(inner: fdomain_client::Channel) -> Self {
7339 Self::new(inner)
7340 }
7341
7342 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7343 self.client.into_channel().map_err(|client| Self { client })
7344 }
7345
7346 fn as_channel(&self) -> &fdomain_client::Channel {
7347 self.client.as_channel()
7348 }
7349}
7350
7351impl DirEntryRouterProxy {
7352 pub fn new(channel: fdomain_client::Channel) -> Self {
7354 let protocol_name =
7355 <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7356 Self { client: fidl::client::Client::new(channel, protocol_name) }
7357 }
7358
7359 pub fn take_event_stream(&self) -> DirEntryRouterEventStream {
7365 DirEntryRouterEventStream { event_receiver: self.client.take_event_receiver() }
7366 }
7367
7368 pub fn r#route(
7369 &self,
7370 mut payload: RouteRequest,
7371 ) -> fidl::client::QueryResponseFut<
7372 DirEntryRouterRouteResult,
7373 fdomain_client::fidl::FDomainResourceDialect,
7374 > {
7375 DirEntryRouterProxyInterface::r#route(self, payload)
7376 }
7377}
7378
7379impl DirEntryRouterProxyInterface for DirEntryRouterProxy {
7380 type RouteResponseFut = fidl::client::QueryResponseFut<
7381 DirEntryRouterRouteResult,
7382 fdomain_client::fidl::FDomainResourceDialect,
7383 >;
7384 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
7385 fn _decode(
7386 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7387 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
7388 let _response = fidl::client::decode_transaction_body::<
7389 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
7390 fdomain_client::fidl::FDomainResourceDialect,
7391 0x1ac694001c208bd2,
7392 >(_buf?)?
7393 .into_result_fdomain::<DirEntryRouterMarker>("route")?;
7394 Ok(_response.map(|x| x))
7395 }
7396 self.client.send_query_and_decode::<RouteRequest, DirEntryRouterRouteResult>(
7397 &mut payload,
7398 0x1ac694001c208bd2,
7399 fidl::encoding::DynamicFlags::FLEXIBLE,
7400 _decode,
7401 )
7402 }
7403}
7404
7405pub struct DirEntryRouterEventStream {
7406 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7407}
7408
7409impl std::marker::Unpin for DirEntryRouterEventStream {}
7410
7411impl futures::stream::FusedStream for DirEntryRouterEventStream {
7412 fn is_terminated(&self) -> bool {
7413 self.event_receiver.is_terminated()
7414 }
7415}
7416
7417impl futures::Stream for DirEntryRouterEventStream {
7418 type Item = Result<DirEntryRouterEvent, fidl::Error>;
7419
7420 fn poll_next(
7421 mut self: std::pin::Pin<&mut Self>,
7422 cx: &mut std::task::Context<'_>,
7423 ) -> std::task::Poll<Option<Self::Item>> {
7424 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7425 &mut self.event_receiver,
7426 cx
7427 )?) {
7428 Some(buf) => std::task::Poll::Ready(Some(DirEntryRouterEvent::decode(buf))),
7429 None => std::task::Poll::Ready(None),
7430 }
7431 }
7432}
7433
7434#[derive(Debug)]
7435pub enum DirEntryRouterEvent {
7436 #[non_exhaustive]
7437 _UnknownEvent {
7438 ordinal: u64,
7440 },
7441}
7442
7443impl DirEntryRouterEvent {
7444 fn decode(
7446 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7447 ) -> Result<DirEntryRouterEvent, fidl::Error> {
7448 let (bytes, _handles) = buf.split_mut();
7449 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7450 debug_assert_eq!(tx_header.tx_id, 0);
7451 match tx_header.ordinal {
7452 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7453 Ok(DirEntryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7454 }
7455 _ => Err(fidl::Error::UnknownOrdinal {
7456 ordinal: tx_header.ordinal,
7457 protocol_name:
7458 <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7459 }),
7460 }
7461 }
7462}
7463
7464pub struct DirEntryRouterRequestStream {
7466 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7467 is_terminated: bool,
7468}
7469
7470impl std::marker::Unpin for DirEntryRouterRequestStream {}
7471
7472impl futures::stream::FusedStream for DirEntryRouterRequestStream {
7473 fn is_terminated(&self) -> bool {
7474 self.is_terminated
7475 }
7476}
7477
7478impl fdomain_client::fidl::RequestStream for DirEntryRouterRequestStream {
7479 type Protocol = DirEntryRouterMarker;
7480 type ControlHandle = DirEntryRouterControlHandle;
7481
7482 fn from_channel(channel: fdomain_client::Channel) -> Self {
7483 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7484 }
7485
7486 fn control_handle(&self) -> Self::ControlHandle {
7487 DirEntryRouterControlHandle { inner: self.inner.clone() }
7488 }
7489
7490 fn into_inner(
7491 self,
7492 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7493 {
7494 (self.inner, self.is_terminated)
7495 }
7496
7497 fn from_inner(
7498 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7499 is_terminated: bool,
7500 ) -> Self {
7501 Self { inner, is_terminated }
7502 }
7503}
7504
7505impl futures::Stream for DirEntryRouterRequestStream {
7506 type Item = Result<DirEntryRouterRequest, fidl::Error>;
7507
7508 fn poll_next(
7509 mut self: std::pin::Pin<&mut Self>,
7510 cx: &mut std::task::Context<'_>,
7511 ) -> std::task::Poll<Option<Self::Item>> {
7512 let this = &mut *self;
7513 if this.inner.check_shutdown(cx) {
7514 this.is_terminated = true;
7515 return std::task::Poll::Ready(None);
7516 }
7517 if this.is_terminated {
7518 panic!("polled DirEntryRouterRequestStream after completion");
7519 }
7520 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7521 |bytes, handles| {
7522 match this.inner.channel().read_etc(cx, bytes, handles) {
7523 std::task::Poll::Ready(Ok(())) => {}
7524 std::task::Poll::Pending => return std::task::Poll::Pending,
7525 std::task::Poll::Ready(Err(None)) => {
7526 this.is_terminated = true;
7527 return std::task::Poll::Ready(None);
7528 }
7529 std::task::Poll::Ready(Err(Some(e))) => {
7530 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7531 e.into(),
7532 ))));
7533 }
7534 }
7535
7536 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7538
7539 std::task::Poll::Ready(Some(match header.ordinal {
7540 0x1ac694001c208bd2 => {
7541 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7542 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
7543 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
7544 let control_handle = DirEntryRouterControlHandle {
7545 inner: this.inner.clone(),
7546 };
7547 Ok(DirEntryRouterRequest::Route {payload: req,
7548 responder: DirEntryRouterRouteResponder {
7549 control_handle: std::mem::ManuallyDrop::new(control_handle),
7550 tx_id: header.tx_id,
7551 },
7552 })
7553 }
7554 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7555 Ok(DirEntryRouterRequest::_UnknownMethod {
7556 ordinal: header.ordinal,
7557 control_handle: DirEntryRouterControlHandle { inner: this.inner.clone() },
7558 method_type: fidl::MethodType::OneWay,
7559 })
7560 }
7561 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7562 this.inner.send_framework_err(
7563 fidl::encoding::FrameworkErr::UnknownMethod,
7564 header.tx_id,
7565 header.ordinal,
7566 header.dynamic_flags(),
7567 (bytes, handles),
7568 )?;
7569 Ok(DirEntryRouterRequest::_UnknownMethod {
7570 ordinal: header.ordinal,
7571 control_handle: DirEntryRouterControlHandle { inner: this.inner.clone() },
7572 method_type: fidl::MethodType::TwoWay,
7573 })
7574 }
7575 _ => Err(fidl::Error::UnknownOrdinal {
7576 ordinal: header.ordinal,
7577 protocol_name: <DirEntryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7578 }),
7579 }))
7580 },
7581 )
7582 }
7583}
7584
7585#[derive(Debug)]
7586pub enum DirEntryRouterRequest {
7587 Route {
7588 payload: RouteRequest,
7589 responder: DirEntryRouterRouteResponder,
7590 },
7591 #[non_exhaustive]
7593 _UnknownMethod {
7594 ordinal: u64,
7596 control_handle: DirEntryRouterControlHandle,
7597 method_type: fidl::MethodType,
7598 },
7599}
7600
7601impl DirEntryRouterRequest {
7602 #[allow(irrefutable_let_patterns)]
7603 pub fn into_route(self) -> Option<(RouteRequest, DirEntryRouterRouteResponder)> {
7604 if let DirEntryRouterRequest::Route { payload, responder } = self {
7605 Some((payload, responder))
7606 } else {
7607 None
7608 }
7609 }
7610
7611 pub fn method_name(&self) -> &'static str {
7613 match *self {
7614 DirEntryRouterRequest::Route { .. } => "route",
7615 DirEntryRouterRequest::_UnknownMethod {
7616 method_type: fidl::MethodType::OneWay, ..
7617 } => "unknown one-way method",
7618 DirEntryRouterRequest::_UnknownMethod {
7619 method_type: fidl::MethodType::TwoWay, ..
7620 } => "unknown two-way method",
7621 }
7622 }
7623}
7624
7625#[derive(Debug, Clone)]
7626pub struct DirEntryRouterControlHandle {
7627 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7628}
7629
7630impl DirEntryRouterControlHandle {
7631 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
7632 self.inner.shutdown_with_epitaph(status.into())
7633 }
7634}
7635
7636impl fdomain_client::fidl::ControlHandle for DirEntryRouterControlHandle {
7637 fn shutdown(&self) {
7638 self.inner.shutdown()
7639 }
7640
7641 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
7642 self.inner.shutdown_with_epitaph(status)
7643 }
7644
7645 fn is_closed(&self) -> bool {
7646 self.inner.channel().is_closed()
7647 }
7648 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7649 self.inner.channel().on_closed()
7650 }
7651}
7652
7653impl DirEntryRouterControlHandle {}
7654
7655#[must_use = "FIDL methods require a response to be sent"]
7656#[derive(Debug)]
7657pub struct DirEntryRouterRouteResponder {
7658 control_handle: std::mem::ManuallyDrop<DirEntryRouterControlHandle>,
7659 tx_id: u32,
7660}
7661
7662impl std::ops::Drop for DirEntryRouterRouteResponder {
7666 fn drop(&mut self) {
7667 self.control_handle.shutdown();
7668 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7670 }
7671}
7672
7673impl fdomain_client::fidl::Responder for DirEntryRouterRouteResponder {
7674 type ControlHandle = DirEntryRouterControlHandle;
7675
7676 fn control_handle(&self) -> &DirEntryRouterControlHandle {
7677 &self.control_handle
7678 }
7679
7680 fn drop_without_shutdown(mut self) {
7681 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7683 std::mem::forget(self);
7685 }
7686}
7687
7688impl DirEntryRouterRouteResponder {
7689 pub fn send(
7693 self,
7694 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7695 ) -> Result<(), fidl::Error> {
7696 let _result = self.send_raw(result);
7697 if _result.is_err() {
7698 self.control_handle.shutdown();
7699 }
7700 self.drop_without_shutdown();
7701 _result
7702 }
7703
7704 pub fn send_no_shutdown_on_err(
7706 self,
7707 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7708 ) -> Result<(), fidl::Error> {
7709 let _result = self.send_raw(result);
7710 self.drop_without_shutdown();
7711 _result
7712 }
7713
7714 fn send_raw(
7715 &self,
7716 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
7717 ) -> Result<(), fidl::Error> {
7718 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7719 DirEntryRouterRouteResponse,
7720 RouterError,
7721 >>(
7722 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
7723 self.tx_id,
7724 0x1ac694001c208bd2,
7725 fidl::encoding::DynamicFlags::FLEXIBLE,
7726 )
7727 }
7728}
7729
7730#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7731pub struct DirReceiverMarker;
7732
7733impl fdomain_client::fidl::ProtocolMarker for DirReceiverMarker {
7734 type Proxy = DirReceiverProxy;
7735 type RequestStream = DirReceiverRequestStream;
7736
7737 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
7738}
7739impl fdomain_client::fidl::DiscoverableProtocolMarker for DirReceiverMarker {}
7740
7741pub trait DirReceiverProxyInterface: Send + Sync {
7742 fn r#receive(&self, payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error>;
7743}
7744
7745#[derive(Debug, Clone)]
7746pub struct DirReceiverProxy {
7747 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7748}
7749
7750impl fdomain_client::fidl::Proxy for DirReceiverProxy {
7751 type Protocol = DirReceiverMarker;
7752
7753 fn from_channel(inner: fdomain_client::Channel) -> Self {
7754 Self::new(inner)
7755 }
7756
7757 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7758 self.client.into_channel().map_err(|client| Self { client })
7759 }
7760
7761 fn as_channel(&self) -> &fdomain_client::Channel {
7762 self.client.as_channel()
7763 }
7764}
7765
7766impl DirReceiverProxy {
7767 pub fn new(channel: fdomain_client::Channel) -> Self {
7769 let protocol_name = <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7770 Self { client: fidl::client::Client::new(channel, protocol_name) }
7771 }
7772
7773 pub fn take_event_stream(&self) -> DirReceiverEventStream {
7779 DirReceiverEventStream { event_receiver: self.client.take_event_receiver() }
7780 }
7781
7782 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
7787 DirReceiverProxyInterface::r#receive(self, payload)
7788 }
7789}
7790
7791impl DirReceiverProxyInterface for DirReceiverProxy {
7792 fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
7793 self.client.send::<DirReceiverReceiveRequest>(
7794 &mut payload,
7795 0xcdc3e9b89fe7bb4,
7796 fidl::encoding::DynamicFlags::FLEXIBLE,
7797 )
7798 }
7799}
7800
7801pub struct DirReceiverEventStream {
7802 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7803}
7804
7805impl std::marker::Unpin for DirReceiverEventStream {}
7806
7807impl futures::stream::FusedStream for DirReceiverEventStream {
7808 fn is_terminated(&self) -> bool {
7809 self.event_receiver.is_terminated()
7810 }
7811}
7812
7813impl futures::Stream for DirReceiverEventStream {
7814 type Item = Result<DirReceiverEvent, fidl::Error>;
7815
7816 fn poll_next(
7817 mut self: std::pin::Pin<&mut Self>,
7818 cx: &mut std::task::Context<'_>,
7819 ) -> std::task::Poll<Option<Self::Item>> {
7820 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7821 &mut self.event_receiver,
7822 cx
7823 )?) {
7824 Some(buf) => std::task::Poll::Ready(Some(DirReceiverEvent::decode(buf))),
7825 None => std::task::Poll::Ready(None),
7826 }
7827 }
7828}
7829
7830#[derive(Debug)]
7831pub enum DirReceiverEvent {
7832 #[non_exhaustive]
7833 _UnknownEvent {
7834 ordinal: u64,
7836 },
7837}
7838
7839impl DirReceiverEvent {
7840 fn decode(
7842 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7843 ) -> Result<DirReceiverEvent, fidl::Error> {
7844 let (bytes, _handles) = buf.split_mut();
7845 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7846 debug_assert_eq!(tx_header.tx_id, 0);
7847 match tx_header.ordinal {
7848 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7849 Ok(DirReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7850 }
7851 _ => Err(fidl::Error::UnknownOrdinal {
7852 ordinal: tx_header.ordinal,
7853 protocol_name:
7854 <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7855 }),
7856 }
7857 }
7858}
7859
7860pub struct DirReceiverRequestStream {
7862 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7863 is_terminated: bool,
7864}
7865
7866impl std::marker::Unpin for DirReceiverRequestStream {}
7867
7868impl futures::stream::FusedStream for DirReceiverRequestStream {
7869 fn is_terminated(&self) -> bool {
7870 self.is_terminated
7871 }
7872}
7873
7874impl fdomain_client::fidl::RequestStream for DirReceiverRequestStream {
7875 type Protocol = DirReceiverMarker;
7876 type ControlHandle = DirReceiverControlHandle;
7877
7878 fn from_channel(channel: fdomain_client::Channel) -> Self {
7879 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7880 }
7881
7882 fn control_handle(&self) -> Self::ControlHandle {
7883 DirReceiverControlHandle { inner: self.inner.clone() }
7884 }
7885
7886 fn into_inner(
7887 self,
7888 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7889 {
7890 (self.inner, self.is_terminated)
7891 }
7892
7893 fn from_inner(
7894 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7895 is_terminated: bool,
7896 ) -> Self {
7897 Self { inner, is_terminated }
7898 }
7899}
7900
7901impl futures::Stream for DirReceiverRequestStream {
7902 type Item = Result<DirReceiverRequest, fidl::Error>;
7903
7904 fn poll_next(
7905 mut self: std::pin::Pin<&mut Self>,
7906 cx: &mut std::task::Context<'_>,
7907 ) -> std::task::Poll<Option<Self::Item>> {
7908 let this = &mut *self;
7909 if this.inner.check_shutdown(cx) {
7910 this.is_terminated = true;
7911 return std::task::Poll::Ready(None);
7912 }
7913 if this.is_terminated {
7914 panic!("polled DirReceiverRequestStream after completion");
7915 }
7916 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7917 |bytes, handles| {
7918 match this.inner.channel().read_etc(cx, bytes, handles) {
7919 std::task::Poll::Ready(Ok(())) => {}
7920 std::task::Poll::Pending => return std::task::Poll::Pending,
7921 std::task::Poll::Ready(Err(None)) => {
7922 this.is_terminated = true;
7923 return std::task::Poll::Ready(None);
7924 }
7925 std::task::Poll::Ready(Err(Some(e))) => {
7926 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7927 e.into(),
7928 ))));
7929 }
7930 }
7931
7932 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7934
7935 std::task::Poll::Ready(Some(match header.ordinal {
7936 0xcdc3e9b89fe7bb4 => {
7937 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7938 let mut req = fidl::new_empty!(
7939 DirReceiverReceiveRequest,
7940 fdomain_client::fidl::FDomainResourceDialect
7941 );
7942 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirReceiverReceiveRequest>(&header, _body_bytes, handles, &mut req)?;
7943 let control_handle = DirReceiverControlHandle { inner: this.inner.clone() };
7944 Ok(DirReceiverRequest::Receive { payload: req, control_handle })
7945 }
7946 _ if header.tx_id == 0
7947 && header
7948 .dynamic_flags()
7949 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7950 {
7951 Ok(DirReceiverRequest::_UnknownMethod {
7952 ordinal: header.ordinal,
7953 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
7954 method_type: fidl::MethodType::OneWay,
7955 })
7956 }
7957 _ if header
7958 .dynamic_flags()
7959 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7960 {
7961 this.inner.send_framework_err(
7962 fidl::encoding::FrameworkErr::UnknownMethod,
7963 header.tx_id,
7964 header.ordinal,
7965 header.dynamic_flags(),
7966 (bytes, handles),
7967 )?;
7968 Ok(DirReceiverRequest::_UnknownMethod {
7969 ordinal: header.ordinal,
7970 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
7971 method_type: fidl::MethodType::TwoWay,
7972 })
7973 }
7974 _ => Err(fidl::Error::UnknownOrdinal {
7975 ordinal: header.ordinal,
7976 protocol_name:
7977 <DirReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7978 }),
7979 }))
7980 },
7981 )
7982 }
7983}
7984
7985#[derive(Debug)]
7988pub enum DirReceiverRequest {
7989 Receive { payload: DirReceiverReceiveRequest, control_handle: DirReceiverControlHandle },
7994 #[non_exhaustive]
7996 _UnknownMethod {
7997 ordinal: u64,
7999 control_handle: DirReceiverControlHandle,
8000 method_type: fidl::MethodType,
8001 },
8002}
8003
8004impl DirReceiverRequest {
8005 #[allow(irrefutable_let_patterns)]
8006 pub fn into_receive(self) -> Option<(DirReceiverReceiveRequest, DirReceiverControlHandle)> {
8007 if let DirReceiverRequest::Receive { payload, control_handle } = self {
8008 Some((payload, control_handle))
8009 } else {
8010 None
8011 }
8012 }
8013
8014 pub fn method_name(&self) -> &'static str {
8016 match *self {
8017 DirReceiverRequest::Receive { .. } => "receive",
8018 DirReceiverRequest::_UnknownMethod {
8019 method_type: fidl::MethodType::OneWay, ..
8020 } => "unknown one-way method",
8021 DirReceiverRequest::_UnknownMethod {
8022 method_type: fidl::MethodType::TwoWay, ..
8023 } => "unknown two-way method",
8024 }
8025 }
8026}
8027
8028#[derive(Debug, Clone)]
8029pub struct DirReceiverControlHandle {
8030 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8031}
8032
8033impl DirReceiverControlHandle {
8034 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
8035 self.inner.shutdown_with_epitaph(status.into())
8036 }
8037}
8038
8039impl fdomain_client::fidl::ControlHandle for DirReceiverControlHandle {
8040 fn shutdown(&self) {
8041 self.inner.shutdown()
8042 }
8043
8044 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
8045 self.inner.shutdown_with_epitaph(status)
8046 }
8047
8048 fn is_closed(&self) -> bool {
8049 self.inner.channel().is_closed()
8050 }
8051 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8052 self.inner.channel().on_closed()
8053 }
8054}
8055
8056impl DirReceiverControlHandle {}
8057
8058#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8059pub struct DirectoryRouterMarker;
8060
8061impl fdomain_client::fidl::ProtocolMarker for DirectoryRouterMarker {
8062 type Proxy = DirectoryRouterProxy;
8063 type RequestStream = DirectoryRouterRequestStream;
8064
8065 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
8066}
8067impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryRouterMarker {}
8068pub type DirectoryRouterRouteResult = Result<DirectoryRouterRouteResponse, RouterError>;
8069
8070pub trait DirectoryRouterProxyInterface: Send + Sync {
8071 type RouteResponseFut: std::future::Future<Output = Result<DirectoryRouterRouteResult, fidl::Error>>
8072 + Send;
8073 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
8074}
8075
8076#[derive(Debug, Clone)]
8077pub struct DirectoryRouterProxy {
8078 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
8079}
8080
8081impl fdomain_client::fidl::Proxy for DirectoryRouterProxy {
8082 type Protocol = DirectoryRouterMarker;
8083
8084 fn from_channel(inner: fdomain_client::Channel) -> Self {
8085 Self::new(inner)
8086 }
8087
8088 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
8089 self.client.into_channel().map_err(|client| Self { client })
8090 }
8091
8092 fn as_channel(&self) -> &fdomain_client::Channel {
8093 self.client.as_channel()
8094 }
8095}
8096
8097impl DirectoryRouterProxy {
8098 pub fn new(channel: fdomain_client::Channel) -> Self {
8100 let protocol_name =
8101 <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
8102 Self { client: fidl::client::Client::new(channel, protocol_name) }
8103 }
8104
8105 pub fn take_event_stream(&self) -> DirectoryRouterEventStream {
8111 DirectoryRouterEventStream { event_receiver: self.client.take_event_receiver() }
8112 }
8113
8114 pub fn r#route(
8115 &self,
8116 mut payload: RouteRequest,
8117 ) -> fidl::client::QueryResponseFut<
8118 DirectoryRouterRouteResult,
8119 fdomain_client::fidl::FDomainResourceDialect,
8120 > {
8121 DirectoryRouterProxyInterface::r#route(self, payload)
8122 }
8123}
8124
8125impl DirectoryRouterProxyInterface for DirectoryRouterProxy {
8126 type RouteResponseFut = fidl::client::QueryResponseFut<
8127 DirectoryRouterRouteResult,
8128 fdomain_client::fidl::FDomainResourceDialect,
8129 >;
8130 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
8131 fn _decode(
8132 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8133 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
8134 let _response = fidl::client::decode_transaction_body::<
8135 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
8136 fdomain_client::fidl::FDomainResourceDialect,
8137 0x683b6c6be21b0f21,
8138 >(_buf?)?
8139 .into_result_fdomain::<DirectoryRouterMarker>("route")?;
8140 Ok(_response.map(|x| x))
8141 }
8142 self.client.send_query_and_decode::<RouteRequest, DirectoryRouterRouteResult>(
8143 &mut payload,
8144 0x683b6c6be21b0f21,
8145 fidl::encoding::DynamicFlags::FLEXIBLE,
8146 _decode,
8147 )
8148 }
8149}
8150
8151pub struct DirectoryRouterEventStream {
8152 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
8153}
8154
8155impl std::marker::Unpin for DirectoryRouterEventStream {}
8156
8157impl futures::stream::FusedStream for DirectoryRouterEventStream {
8158 fn is_terminated(&self) -> bool {
8159 self.event_receiver.is_terminated()
8160 }
8161}
8162
8163impl futures::Stream for DirectoryRouterEventStream {
8164 type Item = Result<DirectoryRouterEvent, fidl::Error>;
8165
8166 fn poll_next(
8167 mut self: std::pin::Pin<&mut Self>,
8168 cx: &mut std::task::Context<'_>,
8169 ) -> std::task::Poll<Option<Self::Item>> {
8170 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8171 &mut self.event_receiver,
8172 cx
8173 )?) {
8174 Some(buf) => std::task::Poll::Ready(Some(DirectoryRouterEvent::decode(buf))),
8175 None => std::task::Poll::Ready(None),
8176 }
8177 }
8178}
8179
8180#[derive(Debug)]
8181pub enum DirectoryRouterEvent {
8182 #[non_exhaustive]
8183 _UnknownEvent {
8184 ordinal: u64,
8186 },
8187}
8188
8189impl DirectoryRouterEvent {
8190 fn decode(
8192 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8193 ) -> Result<DirectoryRouterEvent, fidl::Error> {
8194 let (bytes, _handles) = buf.split_mut();
8195 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8196 debug_assert_eq!(tx_header.tx_id, 0);
8197 match tx_header.ordinal {
8198 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8199 Ok(DirectoryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8200 }
8201 _ => Err(fidl::Error::UnknownOrdinal {
8202 ordinal: tx_header.ordinal,
8203 protocol_name:
8204 <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8205 }),
8206 }
8207 }
8208}
8209
8210pub struct DirectoryRouterRequestStream {
8212 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8213 is_terminated: bool,
8214}
8215
8216impl std::marker::Unpin for DirectoryRouterRequestStream {}
8217
8218impl futures::stream::FusedStream for DirectoryRouterRequestStream {
8219 fn is_terminated(&self) -> bool {
8220 self.is_terminated
8221 }
8222}
8223
8224impl fdomain_client::fidl::RequestStream for DirectoryRouterRequestStream {
8225 type Protocol = DirectoryRouterMarker;
8226 type ControlHandle = DirectoryRouterControlHandle;
8227
8228 fn from_channel(channel: fdomain_client::Channel) -> Self {
8229 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8230 }
8231
8232 fn control_handle(&self) -> Self::ControlHandle {
8233 DirectoryRouterControlHandle { inner: self.inner.clone() }
8234 }
8235
8236 fn into_inner(
8237 self,
8238 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
8239 {
8240 (self.inner, self.is_terminated)
8241 }
8242
8243 fn from_inner(
8244 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8245 is_terminated: bool,
8246 ) -> Self {
8247 Self { inner, is_terminated }
8248 }
8249}
8250
8251impl futures::Stream for DirectoryRouterRequestStream {
8252 type Item = Result<DirectoryRouterRequest, fidl::Error>;
8253
8254 fn poll_next(
8255 mut self: std::pin::Pin<&mut Self>,
8256 cx: &mut std::task::Context<'_>,
8257 ) -> std::task::Poll<Option<Self::Item>> {
8258 let this = &mut *self;
8259 if this.inner.check_shutdown(cx) {
8260 this.is_terminated = true;
8261 return std::task::Poll::Ready(None);
8262 }
8263 if this.is_terminated {
8264 panic!("polled DirectoryRouterRequestStream after completion");
8265 }
8266 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
8267 |bytes, handles| {
8268 match this.inner.channel().read_etc(cx, bytes, handles) {
8269 std::task::Poll::Ready(Ok(())) => {}
8270 std::task::Poll::Pending => return std::task::Poll::Pending,
8271 std::task::Poll::Ready(Err(None)) => {
8272 this.is_terminated = true;
8273 return std::task::Poll::Ready(None);
8274 }
8275 std::task::Poll::Ready(Err(Some(e))) => {
8276 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8277 e.into(),
8278 ))));
8279 }
8280 }
8281
8282 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8284
8285 std::task::Poll::Ready(Some(match header.ordinal {
8286 0x683b6c6be21b0f21 => {
8287 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8288 let mut req = fidl::new_empty!(RouteRequest, fdomain_client::fidl::FDomainResourceDialect);
8289 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8290 let control_handle = DirectoryRouterControlHandle {
8291 inner: this.inner.clone(),
8292 };
8293 Ok(DirectoryRouterRequest::Route {payload: req,
8294 responder: DirectoryRouterRouteResponder {
8295 control_handle: std::mem::ManuallyDrop::new(control_handle),
8296 tx_id: header.tx_id,
8297 },
8298 })
8299 }
8300 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8301 Ok(DirectoryRouterRequest::_UnknownMethod {
8302 ordinal: header.ordinal,
8303 control_handle: DirectoryRouterControlHandle { inner: this.inner.clone() },
8304 method_type: fidl::MethodType::OneWay,
8305 })
8306 }
8307 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8308 this.inner.send_framework_err(
8309 fidl::encoding::FrameworkErr::UnknownMethod,
8310 header.tx_id,
8311 header.ordinal,
8312 header.dynamic_flags(),
8313 (bytes, handles),
8314 )?;
8315 Ok(DirectoryRouterRequest::_UnknownMethod {
8316 ordinal: header.ordinal,
8317 control_handle: DirectoryRouterControlHandle { inner: this.inner.clone() },
8318 method_type: fidl::MethodType::TwoWay,
8319 })
8320 }
8321 _ => Err(fidl::Error::UnknownOrdinal {
8322 ordinal: header.ordinal,
8323 protocol_name: <DirectoryRouterMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8324 }),
8325 }))
8326 },
8327 )
8328 }
8329}
8330
8331#[derive(Debug)]
8332pub enum DirectoryRouterRequest {
8333 Route {
8334 payload: RouteRequest,
8335 responder: DirectoryRouterRouteResponder,
8336 },
8337 #[non_exhaustive]
8339 _UnknownMethod {
8340 ordinal: u64,
8342 control_handle: DirectoryRouterControlHandle,
8343 method_type: fidl::MethodType,
8344 },
8345}
8346
8347impl DirectoryRouterRequest {
8348 #[allow(irrefutable_let_patterns)]
8349 pub fn into_route(self) -> Option<(RouteRequest, DirectoryRouterRouteResponder)> {
8350 if let DirectoryRouterRequest::Route { payload, responder } = self {
8351 Some((payload, responder))
8352 } else {
8353 None
8354 }
8355 }
8356
8357 pub fn method_name(&self) -> &'static str {
8359 match *self {
8360 DirectoryRouterRequest::Route { .. } => "route",
8361 DirectoryRouterRequest::_UnknownMethod {
8362 method_type: fidl::MethodType::OneWay,
8363 ..
8364 } => "unknown one-way method",
8365 DirectoryRouterRequest::_UnknownMethod {
8366 method_type: fidl::MethodType::TwoWay,
8367 ..
8368 } => "unknown two-way method",
8369 }
8370 }
8371}
8372
8373#[derive(Debug, Clone)]
8374pub struct DirectoryRouterControlHandle {
8375 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8376}
8377
8378impl DirectoryRouterControlHandle {
8379 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
8380 self.inner.shutdown_with_epitaph(status.into())
8381 }
8382}
8383
8384impl fdomain_client::fidl::ControlHandle for DirectoryRouterControlHandle {
8385 fn shutdown(&self) {
8386 self.inner.shutdown()
8387 }
8388
8389 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
8390 self.inner.shutdown_with_epitaph(status)
8391 }
8392
8393 fn is_closed(&self) -> bool {
8394 self.inner.channel().is_closed()
8395 }
8396 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8397 self.inner.channel().on_closed()
8398 }
8399}
8400
8401impl DirectoryRouterControlHandle {}
8402
8403#[must_use = "FIDL methods require a response to be sent"]
8404#[derive(Debug)]
8405pub struct DirectoryRouterRouteResponder {
8406 control_handle: std::mem::ManuallyDrop<DirectoryRouterControlHandle>,
8407 tx_id: u32,
8408}
8409
8410impl std::ops::Drop for DirectoryRouterRouteResponder {
8414 fn drop(&mut self) {
8415 self.control_handle.shutdown();
8416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8418 }
8419}
8420
8421impl fdomain_client::fidl::Responder for DirectoryRouterRouteResponder {
8422 type ControlHandle = DirectoryRouterControlHandle;
8423
8424 fn control_handle(&self) -> &DirectoryRouterControlHandle {
8425 &self.control_handle
8426 }
8427
8428 fn drop_without_shutdown(mut self) {
8429 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8431 std::mem::forget(self);
8433 }
8434}
8435
8436impl DirectoryRouterRouteResponder {
8437 pub fn send(
8441 self,
8442 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8443 ) -> Result<(), fidl::Error> {
8444 let _result = self.send_raw(result);
8445 if _result.is_err() {
8446 self.control_handle.shutdown();
8447 }
8448 self.drop_without_shutdown();
8449 _result
8450 }
8451
8452 pub fn send_no_shutdown_on_err(
8454 self,
8455 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8456 ) -> Result<(), fidl::Error> {
8457 let _result = self.send_raw(result);
8458 self.drop_without_shutdown();
8459 _result
8460 }
8461
8462 fn send_raw(
8463 &self,
8464 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
8465 ) -> Result<(), fidl::Error> {
8466 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8467 DirectoryRouterRouteResponse,
8468 RouterError,
8469 >>(
8470 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8471 self.tx_id,
8472 0x683b6c6be21b0f21,
8473 fidl::encoding::DynamicFlags::FLEXIBLE,
8474 )
8475 }
8476}
8477
8478#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8479pub struct ReceiverMarker;
8480
8481impl fdomain_client::fidl::ProtocolMarker for ReceiverMarker {
8482 type Proxy = ReceiverProxy;
8483 type RequestStream = ReceiverRequestStream;
8484
8485 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
8486}
8487impl fdomain_client::fidl::DiscoverableProtocolMarker for ReceiverMarker {}
8488
8489pub trait ReceiverProxyInterface: Send + Sync {
8490 fn r#receive(&self, channel: fdomain_client::Channel) -> Result<(), fidl::Error>;
8491}
8492
8493#[derive(Debug, Clone)]
8494pub struct ReceiverProxy {
8495 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
8496}
8497
8498impl fdomain_client::fidl::Proxy for ReceiverProxy {
8499 type Protocol = ReceiverMarker;
8500
8501 fn from_channel(inner: fdomain_client::Channel) -> Self {
8502 Self::new(inner)
8503 }
8504
8505 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
8506 self.client.into_channel().map_err(|client| Self { client })
8507 }
8508
8509 fn as_channel(&self) -> &fdomain_client::Channel {
8510 self.client.as_channel()
8511 }
8512}
8513
8514impl ReceiverProxy {
8515 pub fn new(channel: fdomain_client::Channel) -> Self {
8517 let protocol_name = <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
8518 Self { client: fidl::client::Client::new(channel, protocol_name) }
8519 }
8520
8521 pub fn take_event_stream(&self) -> ReceiverEventStream {
8527 ReceiverEventStream { event_receiver: self.client.take_event_receiver() }
8528 }
8529
8530 pub fn r#receive(&self, mut channel: fdomain_client::Channel) -> Result<(), fidl::Error> {
8532 ReceiverProxyInterface::r#receive(self, channel)
8533 }
8534}
8535
8536impl ReceiverProxyInterface for ReceiverProxy {
8537 fn r#receive(&self, mut channel: fdomain_client::Channel) -> Result<(), fidl::Error> {
8538 self.client.send::<ProtocolPayload>(
8539 (channel,),
8540 0x4bae18ab7aa1a94,
8541 fidl::encoding::DynamicFlags::FLEXIBLE,
8542 )
8543 }
8544}
8545
8546pub struct ReceiverEventStream {
8547 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
8548}
8549
8550impl std::marker::Unpin for ReceiverEventStream {}
8551
8552impl futures::stream::FusedStream for ReceiverEventStream {
8553 fn is_terminated(&self) -> bool {
8554 self.event_receiver.is_terminated()
8555 }
8556}
8557
8558impl futures::Stream for ReceiverEventStream {
8559 type Item = Result<ReceiverEvent, fidl::Error>;
8560
8561 fn poll_next(
8562 mut self: std::pin::Pin<&mut Self>,
8563 cx: &mut std::task::Context<'_>,
8564 ) -> std::task::Poll<Option<Self::Item>> {
8565 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8566 &mut self.event_receiver,
8567 cx
8568 )?) {
8569 Some(buf) => std::task::Poll::Ready(Some(ReceiverEvent::decode(buf))),
8570 None => std::task::Poll::Ready(None),
8571 }
8572 }
8573}
8574
8575#[derive(Debug)]
8576pub enum ReceiverEvent {
8577 #[non_exhaustive]
8578 _UnknownEvent {
8579 ordinal: u64,
8581 },
8582}
8583
8584impl ReceiverEvent {
8585 fn decode(
8587 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8588 ) -> Result<ReceiverEvent, fidl::Error> {
8589 let (bytes, _handles) = buf.split_mut();
8590 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8591 debug_assert_eq!(tx_header.tx_id, 0);
8592 match tx_header.ordinal {
8593 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8594 Ok(ReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8595 }
8596 _ => Err(fidl::Error::UnknownOrdinal {
8597 ordinal: tx_header.ordinal,
8598 protocol_name: <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8599 }),
8600 }
8601 }
8602}
8603
8604pub struct ReceiverRequestStream {
8606 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8607 is_terminated: bool,
8608}
8609
8610impl std::marker::Unpin for ReceiverRequestStream {}
8611
8612impl futures::stream::FusedStream for ReceiverRequestStream {
8613 fn is_terminated(&self) -> bool {
8614 self.is_terminated
8615 }
8616}
8617
8618impl fdomain_client::fidl::RequestStream for ReceiverRequestStream {
8619 type Protocol = ReceiverMarker;
8620 type ControlHandle = ReceiverControlHandle;
8621
8622 fn from_channel(channel: fdomain_client::Channel) -> Self {
8623 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8624 }
8625
8626 fn control_handle(&self) -> Self::ControlHandle {
8627 ReceiverControlHandle { inner: self.inner.clone() }
8628 }
8629
8630 fn into_inner(
8631 self,
8632 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
8633 {
8634 (self.inner, self.is_terminated)
8635 }
8636
8637 fn from_inner(
8638 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8639 is_terminated: bool,
8640 ) -> Self {
8641 Self { inner, is_terminated }
8642 }
8643}
8644
8645impl futures::Stream for ReceiverRequestStream {
8646 type Item = Result<ReceiverRequest, fidl::Error>;
8647
8648 fn poll_next(
8649 mut self: std::pin::Pin<&mut Self>,
8650 cx: &mut std::task::Context<'_>,
8651 ) -> std::task::Poll<Option<Self::Item>> {
8652 let this = &mut *self;
8653 if this.inner.check_shutdown(cx) {
8654 this.is_terminated = true;
8655 return std::task::Poll::Ready(None);
8656 }
8657 if this.is_terminated {
8658 panic!("polled ReceiverRequestStream after completion");
8659 }
8660 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
8661 |bytes, handles| {
8662 match this.inner.channel().read_etc(cx, bytes, handles) {
8663 std::task::Poll::Ready(Ok(())) => {}
8664 std::task::Poll::Pending => return std::task::Poll::Pending,
8665 std::task::Poll::Ready(Err(None)) => {
8666 this.is_terminated = true;
8667 return std::task::Poll::Ready(None);
8668 }
8669 std::task::Poll::Ready(Err(Some(e))) => {
8670 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8671 e.into(),
8672 ))));
8673 }
8674 }
8675
8676 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8678
8679 std::task::Poll::Ready(Some(match header.ordinal {
8680 0x4bae18ab7aa1a94 => {
8681 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
8682 let mut req = fidl::new_empty!(
8683 ProtocolPayload,
8684 fdomain_client::fidl::FDomainResourceDialect
8685 );
8686 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ProtocolPayload>(&header, _body_bytes, handles, &mut req)?;
8687 let control_handle = ReceiverControlHandle { inner: this.inner.clone() };
8688 Ok(ReceiverRequest::Receive { channel: req.channel, control_handle })
8689 }
8690 _ if header.tx_id == 0
8691 && header
8692 .dynamic_flags()
8693 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8694 {
8695 Ok(ReceiverRequest::_UnknownMethod {
8696 ordinal: header.ordinal,
8697 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
8698 method_type: fidl::MethodType::OneWay,
8699 })
8700 }
8701 _ if header
8702 .dynamic_flags()
8703 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8704 {
8705 this.inner.send_framework_err(
8706 fidl::encoding::FrameworkErr::UnknownMethod,
8707 header.tx_id,
8708 header.ordinal,
8709 header.dynamic_flags(),
8710 (bytes, handles),
8711 )?;
8712 Ok(ReceiverRequest::_UnknownMethod {
8713 ordinal: header.ordinal,
8714 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
8715 method_type: fidl::MethodType::TwoWay,
8716 })
8717 }
8718 _ => Err(fidl::Error::UnknownOrdinal {
8719 ordinal: header.ordinal,
8720 protocol_name:
8721 <ReceiverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
8722 }),
8723 }))
8724 },
8725 )
8726 }
8727}
8728
8729#[derive(Debug)]
8732pub enum ReceiverRequest {
8733 Receive { channel: fdomain_client::Channel, control_handle: ReceiverControlHandle },
8735 #[non_exhaustive]
8737 _UnknownMethod {
8738 ordinal: u64,
8740 control_handle: ReceiverControlHandle,
8741 method_type: fidl::MethodType,
8742 },
8743}
8744
8745impl ReceiverRequest {
8746 #[allow(irrefutable_let_patterns)]
8747 pub fn into_receive(self) -> Option<(fdomain_client::Channel, ReceiverControlHandle)> {
8748 if let ReceiverRequest::Receive { channel, control_handle } = self {
8749 Some((channel, control_handle))
8750 } else {
8751 None
8752 }
8753 }
8754
8755 pub fn method_name(&self) -> &'static str {
8757 match *self {
8758 ReceiverRequest::Receive { .. } => "receive",
8759 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8760 "unknown one-way method"
8761 }
8762 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8763 "unknown two-way method"
8764 }
8765 }
8766 }
8767}
8768
8769#[derive(Debug, Clone)]
8770pub struct ReceiverControlHandle {
8771 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8772}
8773
8774impl ReceiverControlHandle {
8775 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
8776 self.inner.shutdown_with_epitaph(status.into())
8777 }
8778}
8779
8780impl fdomain_client::fidl::ControlHandle for ReceiverControlHandle {
8781 fn shutdown(&self) {
8782 self.inner.shutdown()
8783 }
8784
8785 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
8786 self.inner.shutdown_with_epitaph(status)
8787 }
8788
8789 fn is_closed(&self) -> bool {
8790 self.inner.channel().is_closed()
8791 }
8792 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8793 self.inner.channel().on_closed()
8794 }
8795}
8796
8797impl ReceiverControlHandle {}
8798
8799mod internal {
8800 use super::*;
8801
8802 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorCreateRequest {
8803 type Borrowed<'a> = &'a mut Self;
8804 fn take_or_borrow<'a>(
8805 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8806 ) -> Self::Borrowed<'a> {
8807 value
8808 }
8809 }
8810
8811 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorCreateRequest {
8812 type Owned = Self;
8813
8814 #[inline(always)]
8815 fn inline_align(_context: fidl::encoding::Context) -> usize {
8816 8
8817 }
8818
8819 #[inline(always)]
8820 fn inline_size(_context: fidl::encoding::Context) -> usize {
8821 16
8822 }
8823 }
8824
8825 unsafe impl
8826 fidl::encoding::Encode<
8827 CapabilityStoreConnectorCreateRequest,
8828 fdomain_client::fidl::FDomainResourceDialect,
8829 > for &mut CapabilityStoreConnectorCreateRequest
8830 {
8831 #[inline]
8832 unsafe fn encode(
8833 self,
8834 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8835 offset: usize,
8836 _depth: fidl::encoding::Depth,
8837 ) -> fidl::Result<()> {
8838 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
8839 fidl::encoding::Encode::<CapabilityStoreConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8841 (
8842 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8843 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
8844 ),
8845 encoder, offset, _depth
8846 )
8847 }
8848 }
8849 unsafe impl<
8850 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8851 T1: fidl::encoding::Encode<
8852 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8853 fdomain_client::fidl::FDomainResourceDialect,
8854 >,
8855 >
8856 fidl::encoding::Encode<
8857 CapabilityStoreConnectorCreateRequest,
8858 fdomain_client::fidl::FDomainResourceDialect,
8859 > for (T0, T1)
8860 {
8861 #[inline]
8862 unsafe fn encode(
8863 self,
8864 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8865 offset: usize,
8866 depth: fidl::encoding::Depth,
8867 ) -> fidl::Result<()> {
8868 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
8869 unsafe {
8872 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8873 (ptr as *mut u64).write_unaligned(0);
8874 }
8875 self.0.encode(encoder, offset + 0, depth)?;
8877 self.1.encode(encoder, offset + 8, depth)?;
8878 Ok(())
8879 }
8880 }
8881
8882 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8883 for CapabilityStoreConnectorCreateRequest
8884 {
8885 #[inline(always)]
8886 fn new_empty() -> Self {
8887 Self {
8888 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
8889 receiver: fidl::new_empty!(
8890 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8891 fdomain_client::fidl::FDomainResourceDialect
8892 ),
8893 }
8894 }
8895
8896 #[inline]
8897 unsafe fn decode(
8898 &mut self,
8899 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8900 offset: usize,
8901 _depth: fidl::encoding::Depth,
8902 ) -> fidl::Result<()> {
8903 decoder.debug_check_bounds::<Self>(offset);
8904 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8906 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8907 let mask = 0xffffffff00000000u64;
8908 let maskedval = padval & mask;
8909 if maskedval != 0 {
8910 return Err(fidl::Error::NonZeroPadding {
8911 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8912 });
8913 }
8914 fidl::decode!(
8915 u64,
8916 fdomain_client::fidl::FDomainResourceDialect,
8917 &mut self.id,
8918 decoder,
8919 offset + 0,
8920 _depth
8921 )?;
8922 fidl::decode!(
8923 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ReceiverMarker>>,
8924 fdomain_client::fidl::FDomainResourceDialect,
8925 &mut self.receiver,
8926 decoder,
8927 offset + 8,
8928 _depth
8929 )?;
8930 Ok(())
8931 }
8932 }
8933
8934 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorOpenRequest {
8935 type Borrowed<'a> = &'a mut Self;
8936 fn take_or_borrow<'a>(
8937 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8938 ) -> Self::Borrowed<'a> {
8939 value
8940 }
8941 }
8942
8943 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorOpenRequest {
8944 type Owned = Self;
8945
8946 #[inline(always)]
8947 fn inline_align(_context: fidl::encoding::Context) -> usize {
8948 8
8949 }
8950
8951 #[inline(always)]
8952 fn inline_size(_context: fidl::encoding::Context) -> usize {
8953 16
8954 }
8955 }
8956
8957 unsafe impl
8958 fidl::encoding::Encode<
8959 CapabilityStoreConnectorOpenRequest,
8960 fdomain_client::fidl::FDomainResourceDialect,
8961 > for &mut CapabilityStoreConnectorOpenRequest
8962 {
8963 #[inline]
8964 unsafe fn encode(
8965 self,
8966 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8967 offset: usize,
8968 _depth: fidl::encoding::Depth,
8969 ) -> fidl::Result<()> {
8970 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
8971 fidl::encoding::Encode::<
8973 CapabilityStoreConnectorOpenRequest,
8974 fdomain_client::fidl::FDomainResourceDialect,
8975 >::encode(
8976 (
8977 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
8978 <fidl::encoding::HandleType<
8979 fdomain_client::Channel,
8980 { fidl::ObjectType::CHANNEL.into_raw() },
8981 2147483648,
8982 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8983 &mut self.server_end
8984 ),
8985 ),
8986 encoder,
8987 offset,
8988 _depth,
8989 )
8990 }
8991 }
8992 unsafe impl<
8993 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
8994 T1: fidl::encoding::Encode<
8995 fidl::encoding::HandleType<
8996 fdomain_client::Channel,
8997 { fidl::ObjectType::CHANNEL.into_raw() },
8998 2147483648,
8999 >,
9000 fdomain_client::fidl::FDomainResourceDialect,
9001 >,
9002 >
9003 fidl::encoding::Encode<
9004 CapabilityStoreConnectorOpenRequest,
9005 fdomain_client::fidl::FDomainResourceDialect,
9006 > for (T0, T1)
9007 {
9008 #[inline]
9009 unsafe fn encode(
9010 self,
9011 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9012 offset: usize,
9013 depth: fidl::encoding::Depth,
9014 ) -> fidl::Result<()> {
9015 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
9016 unsafe {
9019 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9020 (ptr as *mut u64).write_unaligned(0);
9021 }
9022 self.0.encode(encoder, offset + 0, depth)?;
9024 self.1.encode(encoder, offset + 8, depth)?;
9025 Ok(())
9026 }
9027 }
9028
9029 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9030 for CapabilityStoreConnectorOpenRequest
9031 {
9032 #[inline(always)]
9033 fn new_empty() -> Self {
9034 Self {
9035 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9036 server_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9037 }
9038 }
9039
9040 #[inline]
9041 unsafe fn decode(
9042 &mut self,
9043 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9044 offset: usize,
9045 _depth: fidl::encoding::Depth,
9046 ) -> fidl::Result<()> {
9047 decoder.debug_check_bounds::<Self>(offset);
9048 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9050 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9051 let mask = 0xffffffff00000000u64;
9052 let maskedval = padval & mask;
9053 if maskedval != 0 {
9054 return Err(fidl::Error::NonZeroPadding {
9055 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9056 });
9057 }
9058 fidl::decode!(
9059 u64,
9060 fdomain_client::fidl::FDomainResourceDialect,
9061 &mut self.id,
9062 decoder,
9063 offset + 0,
9064 _depth
9065 )?;
9066 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)?;
9067 Ok(())
9068 }
9069 }
9070
9071 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateRequest {
9072 type Borrowed<'a> = &'a mut Self;
9073 fn take_or_borrow<'a>(
9074 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9075 ) -> Self::Borrowed<'a> {
9076 value
9077 }
9078 }
9079
9080 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateRequest {
9081 type Owned = Self;
9082
9083 #[inline(always)]
9084 fn inline_align(_context: fidl::encoding::Context) -> usize {
9085 8
9086 }
9087
9088 #[inline(always)]
9089 fn inline_size(_context: fidl::encoding::Context) -> usize {
9090 16
9091 }
9092 }
9093
9094 unsafe impl
9095 fidl::encoding::Encode<
9096 CapabilityStoreCreateServiceAggregateRequest,
9097 fdomain_client::fidl::FDomainResourceDialect,
9098 > for &mut CapabilityStoreCreateServiceAggregateRequest
9099 {
9100 #[inline]
9101 unsafe fn encode(
9102 self,
9103 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9104 offset: usize,
9105 _depth: fidl::encoding::Depth,
9106 ) -> fidl::Result<()> {
9107 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
9108 fidl::encoding::Encode::<CapabilityStoreCreateServiceAggregateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9110 (
9111 <fidl::encoding::UnboundedVector<AggregateSource> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sources),
9112 ),
9113 encoder, offset, _depth
9114 )
9115 }
9116 }
9117 unsafe impl<
9118 T0: fidl::encoding::Encode<
9119 fidl::encoding::UnboundedVector<AggregateSource>,
9120 fdomain_client::fidl::FDomainResourceDialect,
9121 >,
9122 >
9123 fidl::encoding::Encode<
9124 CapabilityStoreCreateServiceAggregateRequest,
9125 fdomain_client::fidl::FDomainResourceDialect,
9126 > for (T0,)
9127 {
9128 #[inline]
9129 unsafe fn encode(
9130 self,
9131 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9132 offset: usize,
9133 depth: fidl::encoding::Depth,
9134 ) -> fidl::Result<()> {
9135 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
9136 self.0.encode(encoder, offset + 0, depth)?;
9140 Ok(())
9141 }
9142 }
9143
9144 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9145 for CapabilityStoreCreateServiceAggregateRequest
9146 {
9147 #[inline(always)]
9148 fn new_empty() -> Self {
9149 Self {
9150 sources: fidl::new_empty!(
9151 fidl::encoding::UnboundedVector<AggregateSource>,
9152 fdomain_client::fidl::FDomainResourceDialect
9153 ),
9154 }
9155 }
9156
9157 #[inline]
9158 unsafe fn decode(
9159 &mut self,
9160 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9161 offset: usize,
9162 _depth: fidl::encoding::Depth,
9163 ) -> fidl::Result<()> {
9164 decoder.debug_check_bounds::<Self>(offset);
9165 fidl::decode!(
9167 fidl::encoding::UnboundedVector<AggregateSource>,
9168 fdomain_client::fidl::FDomainResourceDialect,
9169 &mut self.sources,
9170 decoder,
9171 offset + 0,
9172 _depth
9173 )?;
9174 Ok(())
9175 }
9176 }
9177
9178 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryDrainRequest {
9179 type Borrowed<'a> = &'a mut Self;
9180 fn take_or_borrow<'a>(
9181 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9182 ) -> Self::Borrowed<'a> {
9183 value
9184 }
9185 }
9186
9187 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryDrainRequest {
9188 type Owned = Self;
9189
9190 #[inline(always)]
9191 fn inline_align(_context: fidl::encoding::Context) -> usize {
9192 8
9193 }
9194
9195 #[inline(always)]
9196 fn inline_size(_context: fidl::encoding::Context) -> usize {
9197 16
9198 }
9199 }
9200
9201 unsafe impl
9202 fidl::encoding::Encode<
9203 CapabilityStoreDictionaryDrainRequest,
9204 fdomain_client::fidl::FDomainResourceDialect,
9205 > for &mut CapabilityStoreDictionaryDrainRequest
9206 {
9207 #[inline]
9208 unsafe fn encode(
9209 self,
9210 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9211 offset: usize,
9212 _depth: fidl::encoding::Depth,
9213 ) -> fidl::Result<()> {
9214 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
9215 fidl::encoding::Encode::<
9217 CapabilityStoreDictionaryDrainRequest,
9218 fdomain_client::fidl::FDomainResourceDialect,
9219 >::encode(
9220 (
9221 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9222 <fidl::encoding::Optional<
9223 fidl::encoding::Endpoint<
9224 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9225 >,
9226 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9227 &mut self.iterator
9228 ),
9229 ),
9230 encoder,
9231 offset,
9232 _depth,
9233 )
9234 }
9235 }
9236 unsafe impl<
9237 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9238 T1: fidl::encoding::Encode<
9239 fidl::encoding::Optional<
9240 fidl::encoding::Endpoint<
9241 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9242 >,
9243 >,
9244 fdomain_client::fidl::FDomainResourceDialect,
9245 >,
9246 >
9247 fidl::encoding::Encode<
9248 CapabilityStoreDictionaryDrainRequest,
9249 fdomain_client::fidl::FDomainResourceDialect,
9250 > for (T0, T1)
9251 {
9252 #[inline]
9253 unsafe fn encode(
9254 self,
9255 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9256 offset: usize,
9257 depth: fidl::encoding::Depth,
9258 ) -> fidl::Result<()> {
9259 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
9260 unsafe {
9263 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9264 (ptr as *mut u64).write_unaligned(0);
9265 }
9266 self.0.encode(encoder, offset + 0, depth)?;
9268 self.1.encode(encoder, offset + 8, depth)?;
9269 Ok(())
9270 }
9271 }
9272
9273 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9274 for CapabilityStoreDictionaryDrainRequest
9275 {
9276 #[inline(always)]
9277 fn new_empty() -> Self {
9278 Self {
9279 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9280 iterator: fidl::new_empty!(
9281 fidl::encoding::Optional<
9282 fidl::encoding::Endpoint<
9283 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9284 >,
9285 >,
9286 fdomain_client::fidl::FDomainResourceDialect
9287 ),
9288 }
9289 }
9290
9291 #[inline]
9292 unsafe fn decode(
9293 &mut self,
9294 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9295 offset: usize,
9296 _depth: fidl::encoding::Depth,
9297 ) -> fidl::Result<()> {
9298 decoder.debug_check_bounds::<Self>(offset);
9299 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9301 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9302 let mask = 0xffffffff00000000u64;
9303 let maskedval = padval & mask;
9304 if maskedval != 0 {
9305 return Err(fidl::Error::NonZeroPadding {
9306 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9307 });
9308 }
9309 fidl::decode!(
9310 u64,
9311 fdomain_client::fidl::FDomainResourceDialect,
9312 &mut self.id,
9313 decoder,
9314 offset + 0,
9315 _depth
9316 )?;
9317 fidl::decode!(
9318 fidl::encoding::Optional<
9319 fidl::encoding::Endpoint<
9320 fdomain_client::fidl::ServerEnd<DictionaryDrainIteratorMarker>,
9321 >,
9322 >,
9323 fdomain_client::fidl::FDomainResourceDialect,
9324 &mut self.iterator,
9325 decoder,
9326 offset + 8,
9327 _depth
9328 )?;
9329 Ok(())
9330 }
9331 }
9332
9333 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryEnumerateRequest {
9334 type Borrowed<'a> = &'a mut Self;
9335 fn take_or_borrow<'a>(
9336 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9337 ) -> Self::Borrowed<'a> {
9338 value
9339 }
9340 }
9341
9342 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryEnumerateRequest {
9343 type Owned = Self;
9344
9345 #[inline(always)]
9346 fn inline_align(_context: fidl::encoding::Context) -> usize {
9347 8
9348 }
9349
9350 #[inline(always)]
9351 fn inline_size(_context: fidl::encoding::Context) -> usize {
9352 16
9353 }
9354 }
9355
9356 unsafe impl
9357 fidl::encoding::Encode<
9358 CapabilityStoreDictionaryEnumerateRequest,
9359 fdomain_client::fidl::FDomainResourceDialect,
9360 > for &mut CapabilityStoreDictionaryEnumerateRequest
9361 {
9362 #[inline]
9363 unsafe fn encode(
9364 self,
9365 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9366 offset: usize,
9367 _depth: fidl::encoding::Depth,
9368 ) -> fidl::Result<()> {
9369 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
9370 fidl::encoding::Encode::<
9372 CapabilityStoreDictionaryEnumerateRequest,
9373 fdomain_client::fidl::FDomainResourceDialect,
9374 >::encode(
9375 (
9376 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9377 <fidl::encoding::Endpoint<
9378 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9379 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9380 &mut self.iterator
9381 ),
9382 ),
9383 encoder,
9384 offset,
9385 _depth,
9386 )
9387 }
9388 }
9389 unsafe impl<
9390 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9391 T1: fidl::encoding::Encode<
9392 fidl::encoding::Endpoint<
9393 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9394 >,
9395 fdomain_client::fidl::FDomainResourceDialect,
9396 >,
9397 >
9398 fidl::encoding::Encode<
9399 CapabilityStoreDictionaryEnumerateRequest,
9400 fdomain_client::fidl::FDomainResourceDialect,
9401 > for (T0, T1)
9402 {
9403 #[inline]
9404 unsafe fn encode(
9405 self,
9406 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9407 offset: usize,
9408 depth: fidl::encoding::Depth,
9409 ) -> fidl::Result<()> {
9410 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
9411 unsafe {
9414 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9415 (ptr as *mut u64).write_unaligned(0);
9416 }
9417 self.0.encode(encoder, offset + 0, depth)?;
9419 self.1.encode(encoder, offset + 8, depth)?;
9420 Ok(())
9421 }
9422 }
9423
9424 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9425 for CapabilityStoreDictionaryEnumerateRequest
9426 {
9427 #[inline(always)]
9428 fn new_empty() -> Self {
9429 Self {
9430 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9431 iterator: fidl::new_empty!(
9432 fidl::encoding::Endpoint<
9433 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9434 >,
9435 fdomain_client::fidl::FDomainResourceDialect
9436 ),
9437 }
9438 }
9439
9440 #[inline]
9441 unsafe fn decode(
9442 &mut self,
9443 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9444 offset: usize,
9445 _depth: fidl::encoding::Depth,
9446 ) -> fidl::Result<()> {
9447 decoder.debug_check_bounds::<Self>(offset);
9448 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9450 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9451 let mask = 0xffffffff00000000u64;
9452 let maskedval = padval & mask;
9453 if maskedval != 0 {
9454 return Err(fidl::Error::NonZeroPadding {
9455 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9456 });
9457 }
9458 fidl::decode!(
9459 u64,
9460 fdomain_client::fidl::FDomainResourceDialect,
9461 &mut self.id,
9462 decoder,
9463 offset + 0,
9464 _depth
9465 )?;
9466 fidl::decode!(
9467 fidl::encoding::Endpoint<
9468 fdomain_client::fidl::ServerEnd<DictionaryEnumerateIteratorMarker>,
9469 >,
9470 fdomain_client::fidl::FDomainResourceDialect,
9471 &mut self.iterator,
9472 decoder,
9473 offset + 8,
9474 _depth
9475 )?;
9476 Ok(())
9477 }
9478 }
9479
9480 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryKeysRequest {
9481 type Borrowed<'a> = &'a mut Self;
9482 fn take_or_borrow<'a>(
9483 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9484 ) -> Self::Borrowed<'a> {
9485 value
9486 }
9487 }
9488
9489 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryKeysRequest {
9490 type Owned = Self;
9491
9492 #[inline(always)]
9493 fn inline_align(_context: fidl::encoding::Context) -> usize {
9494 8
9495 }
9496
9497 #[inline(always)]
9498 fn inline_size(_context: fidl::encoding::Context) -> usize {
9499 16
9500 }
9501 }
9502
9503 unsafe impl
9504 fidl::encoding::Encode<
9505 CapabilityStoreDictionaryKeysRequest,
9506 fdomain_client::fidl::FDomainResourceDialect,
9507 > for &mut CapabilityStoreDictionaryKeysRequest
9508 {
9509 #[inline]
9510 unsafe fn encode(
9511 self,
9512 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9513 offset: usize,
9514 _depth: fidl::encoding::Depth,
9515 ) -> fidl::Result<()> {
9516 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
9517 fidl::encoding::Encode::<
9519 CapabilityStoreDictionaryKeysRequest,
9520 fdomain_client::fidl::FDomainResourceDialect,
9521 >::encode(
9522 (
9523 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9524 <fidl::encoding::Endpoint<
9525 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9526 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9527 &mut self.iterator
9528 ),
9529 ),
9530 encoder,
9531 offset,
9532 _depth,
9533 )
9534 }
9535 }
9536 unsafe impl<
9537 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9538 T1: fidl::encoding::Encode<
9539 fidl::encoding::Endpoint<
9540 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9541 >,
9542 fdomain_client::fidl::FDomainResourceDialect,
9543 >,
9544 >
9545 fidl::encoding::Encode<
9546 CapabilityStoreDictionaryKeysRequest,
9547 fdomain_client::fidl::FDomainResourceDialect,
9548 > for (T0, T1)
9549 {
9550 #[inline]
9551 unsafe fn encode(
9552 self,
9553 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9554 offset: usize,
9555 depth: fidl::encoding::Depth,
9556 ) -> fidl::Result<()> {
9557 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
9558 unsafe {
9561 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9562 (ptr as *mut u64).write_unaligned(0);
9563 }
9564 self.0.encode(encoder, offset + 0, depth)?;
9566 self.1.encode(encoder, offset + 8, depth)?;
9567 Ok(())
9568 }
9569 }
9570
9571 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9572 for CapabilityStoreDictionaryKeysRequest
9573 {
9574 #[inline(always)]
9575 fn new_empty() -> Self {
9576 Self {
9577 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9578 iterator: fidl::new_empty!(
9579 fidl::encoding::Endpoint<
9580 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9581 >,
9582 fdomain_client::fidl::FDomainResourceDialect
9583 ),
9584 }
9585 }
9586
9587 #[inline]
9588 unsafe fn decode(
9589 &mut self,
9590 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9591 offset: usize,
9592 _depth: fidl::encoding::Depth,
9593 ) -> fidl::Result<()> {
9594 decoder.debug_check_bounds::<Self>(offset);
9595 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9597 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9598 let mask = 0xffffffff00000000u64;
9599 let maskedval = padval & mask;
9600 if maskedval != 0 {
9601 return Err(fidl::Error::NonZeroPadding {
9602 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9603 });
9604 }
9605 fidl::decode!(
9606 u64,
9607 fdomain_client::fidl::FDomainResourceDialect,
9608 &mut self.id,
9609 decoder,
9610 offset + 0,
9611 _depth
9612 )?;
9613 fidl::decode!(
9614 fidl::encoding::Endpoint<
9615 fdomain_client::fidl::ServerEnd<DictionaryKeysIteratorMarker>,
9616 >,
9617 fdomain_client::fidl::FDomainResourceDialect,
9618 &mut self.iterator,
9619 decoder,
9620 offset + 8,
9621 _depth
9622 )?;
9623 Ok(())
9624 }
9625 }
9626
9627 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
9628 type Borrowed<'a> = &'a mut Self;
9629 fn take_or_borrow<'a>(
9630 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9631 ) -> Self::Borrowed<'a> {
9632 value
9633 }
9634 }
9635
9636 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
9637 type Owned = Self;
9638
9639 #[inline(always)]
9640 fn inline_align(_context: fidl::encoding::Context) -> usize {
9641 8
9642 }
9643
9644 #[inline(always)]
9645 fn inline_size(_context: fidl::encoding::Context) -> usize {
9646 16
9647 }
9648 }
9649
9650 unsafe impl
9651 fidl::encoding::Encode<
9652 CapabilityStoreDictionaryLegacyExportRequest,
9653 fdomain_client::fidl::FDomainResourceDialect,
9654 > for &mut CapabilityStoreDictionaryLegacyExportRequest
9655 {
9656 #[inline]
9657 unsafe fn encode(
9658 self,
9659 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9660 offset: usize,
9661 _depth: fidl::encoding::Depth,
9662 ) -> fidl::Result<()> {
9663 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
9664 fidl::encoding::Encode::<
9666 CapabilityStoreDictionaryLegacyExportRequest,
9667 fdomain_client::fidl::FDomainResourceDialect,
9668 >::encode(
9669 (
9670 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9671 <fidl::encoding::HandleType<
9672 fdomain_client::Channel,
9673 { fidl::ObjectType::CHANNEL.into_raw() },
9674 2147483648,
9675 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9676 &mut self.server_end
9677 ),
9678 ),
9679 encoder,
9680 offset,
9681 _depth,
9682 )
9683 }
9684 }
9685 unsafe impl<
9686 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9687 T1: fidl::encoding::Encode<
9688 fidl::encoding::HandleType<
9689 fdomain_client::Channel,
9690 { fidl::ObjectType::CHANNEL.into_raw() },
9691 2147483648,
9692 >,
9693 fdomain_client::fidl::FDomainResourceDialect,
9694 >,
9695 >
9696 fidl::encoding::Encode<
9697 CapabilityStoreDictionaryLegacyExportRequest,
9698 fdomain_client::fidl::FDomainResourceDialect,
9699 > for (T0, T1)
9700 {
9701 #[inline]
9702 unsafe fn encode(
9703 self,
9704 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9705 offset: usize,
9706 depth: fidl::encoding::Depth,
9707 ) -> fidl::Result<()> {
9708 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
9709 unsafe {
9712 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9713 (ptr as *mut u64).write_unaligned(0);
9714 }
9715 self.0.encode(encoder, offset + 0, depth)?;
9717 self.1.encode(encoder, offset + 8, depth)?;
9718 Ok(())
9719 }
9720 }
9721
9722 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9723 for CapabilityStoreDictionaryLegacyExportRequest
9724 {
9725 #[inline(always)]
9726 fn new_empty() -> Self {
9727 Self {
9728 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9729 server_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9730 }
9731 }
9732
9733 #[inline]
9734 unsafe fn decode(
9735 &mut self,
9736 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9737 offset: usize,
9738 _depth: fidl::encoding::Depth,
9739 ) -> fidl::Result<()> {
9740 decoder.debug_check_bounds::<Self>(offset);
9741 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9743 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9744 let mask = 0xffffffff00000000u64;
9745 let maskedval = padval & mask;
9746 if maskedval != 0 {
9747 return Err(fidl::Error::NonZeroPadding {
9748 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9749 });
9750 }
9751 fidl::decode!(
9752 u64,
9753 fdomain_client::fidl::FDomainResourceDialect,
9754 &mut self.id,
9755 decoder,
9756 offset + 0,
9757 _depth
9758 )?;
9759 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)?;
9760 Ok(())
9761 }
9762 }
9763
9764 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
9765 type Borrowed<'a> = &'a mut Self;
9766 fn take_or_borrow<'a>(
9767 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9768 ) -> Self::Borrowed<'a> {
9769 value
9770 }
9771 }
9772
9773 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
9774 type Owned = Self;
9775
9776 #[inline(always)]
9777 fn inline_align(_context: fidl::encoding::Context) -> usize {
9778 8
9779 }
9780
9781 #[inline(always)]
9782 fn inline_size(_context: fidl::encoding::Context) -> usize {
9783 16
9784 }
9785 }
9786
9787 unsafe impl
9788 fidl::encoding::Encode<
9789 CapabilityStoreDictionaryLegacyImportRequest,
9790 fdomain_client::fidl::FDomainResourceDialect,
9791 > for &mut CapabilityStoreDictionaryLegacyImportRequest
9792 {
9793 #[inline]
9794 unsafe fn encode(
9795 self,
9796 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9797 offset: usize,
9798 _depth: fidl::encoding::Depth,
9799 ) -> fidl::Result<()> {
9800 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
9801 fidl::encoding::Encode::<
9803 CapabilityStoreDictionaryLegacyImportRequest,
9804 fdomain_client::fidl::FDomainResourceDialect,
9805 >::encode(
9806 (
9807 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9808 <fidl::encoding::HandleType<
9809 fdomain_client::Channel,
9810 { fidl::ObjectType::CHANNEL.into_raw() },
9811 2147483648,
9812 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9813 &mut self.client_end
9814 ),
9815 ),
9816 encoder,
9817 offset,
9818 _depth,
9819 )
9820 }
9821 }
9822 unsafe impl<
9823 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9824 T1: fidl::encoding::Encode<
9825 fidl::encoding::HandleType<
9826 fdomain_client::Channel,
9827 { fidl::ObjectType::CHANNEL.into_raw() },
9828 2147483648,
9829 >,
9830 fdomain_client::fidl::FDomainResourceDialect,
9831 >,
9832 >
9833 fidl::encoding::Encode<
9834 CapabilityStoreDictionaryLegacyImportRequest,
9835 fdomain_client::fidl::FDomainResourceDialect,
9836 > for (T0, T1)
9837 {
9838 #[inline]
9839 unsafe fn encode(
9840 self,
9841 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9842 offset: usize,
9843 depth: fidl::encoding::Depth,
9844 ) -> fidl::Result<()> {
9845 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
9846 unsafe {
9849 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9850 (ptr as *mut u64).write_unaligned(0);
9851 }
9852 self.0.encode(encoder, offset + 0, depth)?;
9854 self.1.encode(encoder, offset + 8, depth)?;
9855 Ok(())
9856 }
9857 }
9858
9859 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9860 for CapabilityStoreDictionaryLegacyImportRequest
9861 {
9862 #[inline(always)]
9863 fn new_empty() -> Self {
9864 Self {
9865 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9866 client_end: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9867 }
9868 }
9869
9870 #[inline]
9871 unsafe fn decode(
9872 &mut self,
9873 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9874 offset: usize,
9875 _depth: fidl::encoding::Depth,
9876 ) -> fidl::Result<()> {
9877 decoder.debug_check_bounds::<Self>(offset);
9878 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9880 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9881 let mask = 0xffffffff00000000u64;
9882 let maskedval = padval & mask;
9883 if maskedval != 0 {
9884 return Err(fidl::Error::NonZeroPadding {
9885 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9886 });
9887 }
9888 fidl::decode!(
9889 u64,
9890 fdomain_client::fidl::FDomainResourceDialect,
9891 &mut self.id,
9892 decoder,
9893 offset + 0,
9894 _depth
9895 )?;
9896 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)?;
9897 Ok(())
9898 }
9899 }
9900
9901 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorCreateRequest {
9902 type Borrowed<'a> = &'a mut Self;
9903 fn take_or_borrow<'a>(
9904 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9905 ) -> Self::Borrowed<'a> {
9906 value
9907 }
9908 }
9909
9910 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorCreateRequest {
9911 type Owned = Self;
9912
9913 #[inline(always)]
9914 fn inline_align(_context: fidl::encoding::Context) -> usize {
9915 8
9916 }
9917
9918 #[inline(always)]
9919 fn inline_size(_context: fidl::encoding::Context) -> usize {
9920 16
9921 }
9922 }
9923
9924 unsafe impl
9925 fidl::encoding::Encode<
9926 CapabilityStoreDirConnectorCreateRequest,
9927 fdomain_client::fidl::FDomainResourceDialect,
9928 > for &mut CapabilityStoreDirConnectorCreateRequest
9929 {
9930 #[inline]
9931 unsafe fn encode(
9932 self,
9933 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9934 offset: usize,
9935 _depth: fidl::encoding::Depth,
9936 ) -> fidl::Result<()> {
9937 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
9938 fidl::encoding::Encode::<CapabilityStoreDirConnectorCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9940 (
9941 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9942 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
9943 ),
9944 encoder, offset, _depth
9945 )
9946 }
9947 }
9948 unsafe impl<
9949 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
9950 T1: fidl::encoding::Encode<
9951 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9952 fdomain_client::fidl::FDomainResourceDialect,
9953 >,
9954 >
9955 fidl::encoding::Encode<
9956 CapabilityStoreDirConnectorCreateRequest,
9957 fdomain_client::fidl::FDomainResourceDialect,
9958 > for (T0, T1)
9959 {
9960 #[inline]
9961 unsafe fn encode(
9962 self,
9963 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9964 offset: usize,
9965 depth: fidl::encoding::Depth,
9966 ) -> fidl::Result<()> {
9967 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
9968 unsafe {
9971 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9972 (ptr as *mut u64).write_unaligned(0);
9973 }
9974 self.0.encode(encoder, offset + 0, depth)?;
9976 self.1.encode(encoder, offset + 8, depth)?;
9977 Ok(())
9978 }
9979 }
9980
9981 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9982 for CapabilityStoreDirConnectorCreateRequest
9983 {
9984 #[inline(always)]
9985 fn new_empty() -> Self {
9986 Self {
9987 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
9988 receiver: fidl::new_empty!(
9989 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
9990 fdomain_client::fidl::FDomainResourceDialect
9991 ),
9992 }
9993 }
9994
9995 #[inline]
9996 unsafe fn decode(
9997 &mut self,
9998 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9999 offset: usize,
10000 _depth: fidl::encoding::Depth,
10001 ) -> fidl::Result<()> {
10002 decoder.debug_check_bounds::<Self>(offset);
10003 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10005 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10006 let mask = 0xffffffff00000000u64;
10007 let maskedval = padval & mask;
10008 if maskedval != 0 {
10009 return Err(fidl::Error::NonZeroPadding {
10010 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10011 });
10012 }
10013 fidl::decode!(
10014 u64,
10015 fdomain_client::fidl::FDomainResourceDialect,
10016 &mut self.id,
10017 decoder,
10018 offset + 0,
10019 _depth
10020 )?;
10021 fidl::decode!(
10022 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirReceiverMarker>>,
10023 fdomain_client::fidl::FDomainResourceDialect,
10024 &mut self.receiver,
10025 decoder,
10026 offset + 8,
10027 _depth
10028 )?;
10029 Ok(())
10030 }
10031 }
10032
10033 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreImportRequest {
10034 type Borrowed<'a> = &'a mut Self;
10035 fn take_or_borrow<'a>(
10036 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10037 ) -> Self::Borrowed<'a> {
10038 value
10039 }
10040 }
10041
10042 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreImportRequest {
10043 type Owned = Self;
10044
10045 #[inline(always)]
10046 fn inline_align(_context: fidl::encoding::Context) -> usize {
10047 8
10048 }
10049
10050 #[inline(always)]
10051 fn inline_size(_context: fidl::encoding::Context) -> usize {
10052 24
10053 }
10054 }
10055
10056 unsafe impl
10057 fidl::encoding::Encode<
10058 CapabilityStoreImportRequest,
10059 fdomain_client::fidl::FDomainResourceDialect,
10060 > for &mut CapabilityStoreImportRequest
10061 {
10062 #[inline]
10063 unsafe fn encode(
10064 self,
10065 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10066 offset: usize,
10067 _depth: fidl::encoding::Depth,
10068 ) -> fidl::Result<()> {
10069 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
10070 fidl::encoding::Encode::<
10072 CapabilityStoreImportRequest,
10073 fdomain_client::fidl::FDomainResourceDialect,
10074 >::encode(
10075 (
10076 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10077 <Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10078 &mut self.capability,
10079 ),
10080 ),
10081 encoder,
10082 offset,
10083 _depth,
10084 )
10085 }
10086 }
10087 unsafe impl<
10088 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10089 T1: fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>,
10090 >
10091 fidl::encoding::Encode<
10092 CapabilityStoreImportRequest,
10093 fdomain_client::fidl::FDomainResourceDialect,
10094 > for (T0, T1)
10095 {
10096 #[inline]
10097 unsafe fn encode(
10098 self,
10099 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10100 offset: usize,
10101 depth: fidl::encoding::Depth,
10102 ) -> fidl::Result<()> {
10103 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
10104 self.0.encode(encoder, offset + 0, depth)?;
10108 self.1.encode(encoder, offset + 8, depth)?;
10109 Ok(())
10110 }
10111 }
10112
10113 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10114 for CapabilityStoreImportRequest
10115 {
10116 #[inline(always)]
10117 fn new_empty() -> Self {
10118 Self {
10119 id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10120 capability: fidl::new_empty!(
10121 Capability,
10122 fdomain_client::fidl::FDomainResourceDialect
10123 ),
10124 }
10125 }
10126
10127 #[inline]
10128 unsafe fn decode(
10129 &mut self,
10130 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10131 offset: usize,
10132 _depth: fidl::encoding::Depth,
10133 ) -> fidl::Result<()> {
10134 decoder.debug_check_bounds::<Self>(offset);
10135 fidl::decode!(
10137 u64,
10138 fdomain_client::fidl::FDomainResourceDialect,
10139 &mut self.id,
10140 decoder,
10141 offset + 0,
10142 _depth
10143 )?;
10144 fidl::decode!(
10145 Capability,
10146 fdomain_client::fidl::FDomainResourceDialect,
10147 &mut self.capability,
10148 decoder,
10149 offset + 8,
10150 _depth
10151 )?;
10152 Ok(())
10153 }
10154 }
10155
10156 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateResponse {
10157 type Borrowed<'a> = &'a mut Self;
10158 fn take_or_borrow<'a>(
10159 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10160 ) -> Self::Borrowed<'a> {
10161 value
10162 }
10163 }
10164
10165 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateResponse {
10166 type Owned = Self;
10167
10168 #[inline(always)]
10169 fn inline_align(_context: fidl::encoding::Context) -> usize {
10170 4
10171 }
10172
10173 #[inline(always)]
10174 fn inline_size(_context: fidl::encoding::Context) -> usize {
10175 4
10176 }
10177 }
10178
10179 unsafe impl
10180 fidl::encoding::Encode<
10181 CapabilityStoreCreateServiceAggregateResponse,
10182 fdomain_client::fidl::FDomainResourceDialect,
10183 > for &mut CapabilityStoreCreateServiceAggregateResponse
10184 {
10185 #[inline]
10186 unsafe fn encode(
10187 self,
10188 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10189 offset: usize,
10190 _depth: fidl::encoding::Depth,
10191 ) -> fidl::Result<()> {
10192 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
10193 fidl::encoding::Encode::<
10195 CapabilityStoreCreateServiceAggregateResponse,
10196 fdomain_client::fidl::FDomainResourceDialect,
10197 >::encode(
10198 (<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10199 &mut self.aggregate_dir_connector,
10200 ),),
10201 encoder,
10202 offset,
10203 _depth,
10204 )
10205 }
10206 }
10207 unsafe impl<
10208 T0: fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect>,
10209 >
10210 fidl::encoding::Encode<
10211 CapabilityStoreCreateServiceAggregateResponse,
10212 fdomain_client::fidl::FDomainResourceDialect,
10213 > for (T0,)
10214 {
10215 #[inline]
10216 unsafe fn encode(
10217 self,
10218 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10219 offset: usize,
10220 depth: fidl::encoding::Depth,
10221 ) -> fidl::Result<()> {
10222 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
10223 self.0.encode(encoder, offset + 0, depth)?;
10227 Ok(())
10228 }
10229 }
10230
10231 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10232 for CapabilityStoreCreateServiceAggregateResponse
10233 {
10234 #[inline(always)]
10235 fn new_empty() -> Self {
10236 Self {
10237 aggregate_dir_connector: fidl::new_empty!(
10238 DirConnector,
10239 fdomain_client::fidl::FDomainResourceDialect
10240 ),
10241 }
10242 }
10243
10244 #[inline]
10245 unsafe fn decode(
10246 &mut self,
10247 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10248 offset: usize,
10249 _depth: fidl::encoding::Depth,
10250 ) -> fidl::Result<()> {
10251 decoder.debug_check_bounds::<Self>(offset);
10252 fidl::decode!(
10254 DirConnector,
10255 fdomain_client::fidl::FDomainResourceDialect,
10256 &mut self.aggregate_dir_connector,
10257 decoder,
10258 offset + 0,
10259 _depth
10260 )?;
10261 Ok(())
10262 }
10263 }
10264
10265 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreExportResponse {
10266 type Borrowed<'a> = &'a mut Self;
10267 fn take_or_borrow<'a>(
10268 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10269 ) -> Self::Borrowed<'a> {
10270 value
10271 }
10272 }
10273
10274 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreExportResponse {
10275 type Owned = Self;
10276
10277 #[inline(always)]
10278 fn inline_align(_context: fidl::encoding::Context) -> usize {
10279 8
10280 }
10281
10282 #[inline(always)]
10283 fn inline_size(_context: fidl::encoding::Context) -> usize {
10284 16
10285 }
10286 }
10287
10288 unsafe impl
10289 fidl::encoding::Encode<
10290 CapabilityStoreExportResponse,
10291 fdomain_client::fidl::FDomainResourceDialect,
10292 > for &mut CapabilityStoreExportResponse
10293 {
10294 #[inline]
10295 unsafe fn encode(
10296 self,
10297 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10298 offset: usize,
10299 _depth: fidl::encoding::Depth,
10300 ) -> fidl::Result<()> {
10301 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
10302 fidl::encoding::Encode::<
10304 CapabilityStoreExportResponse,
10305 fdomain_client::fidl::FDomainResourceDialect,
10306 >::encode(
10307 (<Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10308 &mut self.capability,
10309 ),),
10310 encoder,
10311 offset,
10312 _depth,
10313 )
10314 }
10315 }
10316 unsafe impl<
10317 T0: fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>,
10318 >
10319 fidl::encoding::Encode<
10320 CapabilityStoreExportResponse,
10321 fdomain_client::fidl::FDomainResourceDialect,
10322 > for (T0,)
10323 {
10324 #[inline]
10325 unsafe fn encode(
10326 self,
10327 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10328 offset: usize,
10329 depth: fidl::encoding::Depth,
10330 ) -> fidl::Result<()> {
10331 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
10332 self.0.encode(encoder, offset + 0, depth)?;
10336 Ok(())
10337 }
10338 }
10339
10340 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10341 for CapabilityStoreExportResponse
10342 {
10343 #[inline(always)]
10344 fn new_empty() -> Self {
10345 Self {
10346 capability: fidl::new_empty!(
10347 Capability,
10348 fdomain_client::fidl::FDomainResourceDialect
10349 ),
10350 }
10351 }
10352
10353 #[inline]
10354 unsafe fn decode(
10355 &mut self,
10356 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10357 offset: usize,
10358 _depth: fidl::encoding::Depth,
10359 ) -> fidl::Result<()> {
10360 decoder.debug_check_bounds::<Self>(offset);
10361 fidl::decode!(
10363 Capability,
10364 fdomain_client::fidl::FDomainResourceDialect,
10365 &mut self.capability,
10366 decoder,
10367 offset + 0,
10368 _depth
10369 )?;
10370 Ok(())
10371 }
10372 }
10373
10374 impl fidl::encoding::ResourceTypeMarker for Connector {
10375 type Borrowed<'a> = &'a mut Self;
10376 fn take_or_borrow<'a>(
10377 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10378 ) -> Self::Borrowed<'a> {
10379 value
10380 }
10381 }
10382
10383 unsafe impl fidl::encoding::TypeMarker for Connector {
10384 type Owned = Self;
10385
10386 #[inline(always)]
10387 fn inline_align(_context: fidl::encoding::Context) -> usize {
10388 4
10389 }
10390
10391 #[inline(always)]
10392 fn inline_size(_context: fidl::encoding::Context) -> usize {
10393 4
10394 }
10395 }
10396
10397 unsafe impl fidl::encoding::Encode<Connector, fdomain_client::fidl::FDomainResourceDialect>
10398 for &mut Connector
10399 {
10400 #[inline]
10401 unsafe fn encode(
10402 self,
10403 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10404 offset: usize,
10405 _depth: fidl::encoding::Depth,
10406 ) -> fidl::Result<()> {
10407 encoder.debug_check_bounds::<Connector>(offset);
10408 fidl::encoding::Encode::<Connector, fdomain_client::fidl::FDomainResourceDialect>::encode(
10410 (
10411 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10412 ),
10413 encoder, offset, _depth
10414 )
10415 }
10416 }
10417 unsafe impl<
10418 T0: fidl::encoding::Encode<
10419 fidl::encoding::HandleType<
10420 fdomain_client::EventPair,
10421 { fidl::ObjectType::EVENTPAIR.into_raw() },
10422 2147483648,
10423 >,
10424 fdomain_client::fidl::FDomainResourceDialect,
10425 >,
10426 > fidl::encoding::Encode<Connector, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10427 {
10428 #[inline]
10429 unsafe fn encode(
10430 self,
10431 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10432 offset: usize,
10433 depth: fidl::encoding::Depth,
10434 ) -> fidl::Result<()> {
10435 encoder.debug_check_bounds::<Connector>(offset);
10436 self.0.encode(encoder, offset + 0, depth)?;
10440 Ok(())
10441 }
10442 }
10443
10444 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Connector {
10445 #[inline(always)]
10446 fn new_empty() -> Self {
10447 Self {
10448 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10449 }
10450 }
10451
10452 #[inline]
10453 unsafe fn decode(
10454 &mut self,
10455 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10456 offset: usize,
10457 _depth: fidl::encoding::Depth,
10458 ) -> fidl::Result<()> {
10459 decoder.debug_check_bounds::<Self>(offset);
10460 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)?;
10462 Ok(())
10463 }
10464 }
10465
10466 impl fidl::encoding::ResourceTypeMarker for DictionaryDrainIteratorGetNextResponse {
10467 type Borrowed<'a> = &'a mut Self;
10468 fn take_or_borrow<'a>(
10469 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10470 ) -> Self::Borrowed<'a> {
10471 value
10472 }
10473 }
10474
10475 unsafe impl fidl::encoding::TypeMarker for DictionaryDrainIteratorGetNextResponse {
10476 type Owned = Self;
10477
10478 #[inline(always)]
10479 fn inline_align(_context: fidl::encoding::Context) -> usize {
10480 8
10481 }
10482
10483 #[inline(always)]
10484 fn inline_size(_context: fidl::encoding::Context) -> usize {
10485 24
10486 }
10487 }
10488
10489 unsafe impl
10490 fidl::encoding::Encode<
10491 DictionaryDrainIteratorGetNextResponse,
10492 fdomain_client::fidl::FDomainResourceDialect,
10493 > for &mut DictionaryDrainIteratorGetNextResponse
10494 {
10495 #[inline]
10496 unsafe fn encode(
10497 self,
10498 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10499 offset: usize,
10500 _depth: fidl::encoding::Depth,
10501 ) -> fidl::Result<()> {
10502 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
10503 fidl::encoding::Encode::<DictionaryDrainIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10505 (
10506 <fidl::encoding::Vector<DictionaryItem, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.items),
10507 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
10508 ),
10509 encoder, offset, _depth
10510 )
10511 }
10512 }
10513 unsafe impl<
10514 T0: fidl::encoding::Encode<
10515 fidl::encoding::Vector<DictionaryItem, 128>,
10516 fdomain_client::fidl::FDomainResourceDialect,
10517 >,
10518 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10519 >
10520 fidl::encoding::Encode<
10521 DictionaryDrainIteratorGetNextResponse,
10522 fdomain_client::fidl::FDomainResourceDialect,
10523 > for (T0, T1)
10524 {
10525 #[inline]
10526 unsafe fn encode(
10527 self,
10528 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10529 offset: usize,
10530 depth: fidl::encoding::Depth,
10531 ) -> fidl::Result<()> {
10532 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
10533 self.0.encode(encoder, offset + 0, depth)?;
10537 self.1.encode(encoder, offset + 16, depth)?;
10538 Ok(())
10539 }
10540 }
10541
10542 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10543 for DictionaryDrainIteratorGetNextResponse
10544 {
10545 #[inline(always)]
10546 fn new_empty() -> Self {
10547 Self {
10548 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryItem, 128>, fdomain_client::fidl::FDomainResourceDialect),
10549 end_id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10550 }
10551 }
10552
10553 #[inline]
10554 unsafe fn decode(
10555 &mut self,
10556 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10557 offset: usize,
10558 _depth: fidl::encoding::Depth,
10559 ) -> fidl::Result<()> {
10560 decoder.debug_check_bounds::<Self>(offset);
10561 fidl::decode!(fidl::encoding::Vector<DictionaryItem, 128>, fdomain_client::fidl::FDomainResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
10563 fidl::decode!(
10564 u64,
10565 fdomain_client::fidl::FDomainResourceDialect,
10566 &mut self.end_id,
10567 decoder,
10568 offset + 16,
10569 _depth
10570 )?;
10571 Ok(())
10572 }
10573 }
10574
10575 impl fidl::encoding::ResourceTypeMarker for DictionaryEnumerateIteratorGetNextResponse {
10576 type Borrowed<'a> = &'a mut Self;
10577 fn take_or_borrow<'a>(
10578 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10579 ) -> Self::Borrowed<'a> {
10580 value
10581 }
10582 }
10583
10584 unsafe impl fidl::encoding::TypeMarker for DictionaryEnumerateIteratorGetNextResponse {
10585 type Owned = Self;
10586
10587 #[inline(always)]
10588 fn inline_align(_context: fidl::encoding::Context) -> usize {
10589 8
10590 }
10591
10592 #[inline(always)]
10593 fn inline_size(_context: fidl::encoding::Context) -> usize {
10594 24
10595 }
10596 }
10597
10598 unsafe impl
10599 fidl::encoding::Encode<
10600 DictionaryEnumerateIteratorGetNextResponse,
10601 fdomain_client::fidl::FDomainResourceDialect,
10602 > for &mut DictionaryEnumerateIteratorGetNextResponse
10603 {
10604 #[inline]
10605 unsafe fn encode(
10606 self,
10607 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10608 offset: usize,
10609 _depth: fidl::encoding::Depth,
10610 ) -> fidl::Result<()> {
10611 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
10612 fidl::encoding::Encode::<DictionaryEnumerateIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10614 (
10615 <fidl::encoding::Vector<DictionaryOptionalItem, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.items),
10616 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
10617 ),
10618 encoder, offset, _depth
10619 )
10620 }
10621 }
10622 unsafe impl<
10623 T0: fidl::encoding::Encode<
10624 fidl::encoding::Vector<DictionaryOptionalItem, 128>,
10625 fdomain_client::fidl::FDomainResourceDialect,
10626 >,
10627 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
10628 >
10629 fidl::encoding::Encode<
10630 DictionaryEnumerateIteratorGetNextResponse,
10631 fdomain_client::fidl::FDomainResourceDialect,
10632 > for (T0, T1)
10633 {
10634 #[inline]
10635 unsafe fn encode(
10636 self,
10637 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10638 offset: usize,
10639 depth: fidl::encoding::Depth,
10640 ) -> fidl::Result<()> {
10641 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
10642 self.0.encode(encoder, offset + 0, depth)?;
10646 self.1.encode(encoder, offset + 16, depth)?;
10647 Ok(())
10648 }
10649 }
10650
10651 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10652 for DictionaryEnumerateIteratorGetNextResponse
10653 {
10654 #[inline(always)]
10655 fn new_empty() -> Self {
10656 Self {
10657 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fdomain_client::fidl::FDomainResourceDialect),
10658 end_id: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
10659 }
10660 }
10661
10662 #[inline]
10663 unsafe fn decode(
10664 &mut self,
10665 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10666 offset: usize,
10667 _depth: fidl::encoding::Depth,
10668 ) -> fidl::Result<()> {
10669 decoder.debug_check_bounds::<Self>(offset);
10670 fidl::decode!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fdomain_client::fidl::FDomainResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
10672 fidl::decode!(
10673 u64,
10674 fdomain_client::fidl::FDomainResourceDialect,
10675 &mut self.end_id,
10676 decoder,
10677 offset + 16,
10678 _depth
10679 )?;
10680 Ok(())
10681 }
10682 }
10683
10684 impl fidl::encoding::ResourceTypeMarker for DictionaryKeysIteratorGetNextResponse {
10685 type Borrowed<'a> = &'a mut Self;
10686 fn take_or_borrow<'a>(
10687 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10688 ) -> Self::Borrowed<'a> {
10689 value
10690 }
10691 }
10692
10693 unsafe impl fidl::encoding::TypeMarker for DictionaryKeysIteratorGetNextResponse {
10694 type Owned = Self;
10695
10696 #[inline(always)]
10697 fn inline_align(_context: fidl::encoding::Context) -> usize {
10698 8
10699 }
10700
10701 #[inline(always)]
10702 fn inline_size(_context: fidl::encoding::Context) -> usize {
10703 16
10704 }
10705 }
10706
10707 unsafe impl
10708 fidl::encoding::Encode<
10709 DictionaryKeysIteratorGetNextResponse,
10710 fdomain_client::fidl::FDomainResourceDialect,
10711 > for &mut DictionaryKeysIteratorGetNextResponse
10712 {
10713 #[inline]
10714 unsafe fn encode(
10715 self,
10716 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10717 offset: usize,
10718 _depth: fidl::encoding::Depth,
10719 ) -> fidl::Result<()> {
10720 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
10721 fidl::encoding::Encode::<DictionaryKeysIteratorGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
10723 (
10724 <fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
10725 ),
10726 encoder, offset, _depth
10727 )
10728 }
10729 }
10730 unsafe impl<
10731 T0: fidl::encoding::Encode<
10732 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10733 fdomain_client::fidl::FDomainResourceDialect,
10734 >,
10735 >
10736 fidl::encoding::Encode<
10737 DictionaryKeysIteratorGetNextResponse,
10738 fdomain_client::fidl::FDomainResourceDialect,
10739 > for (T0,)
10740 {
10741 #[inline]
10742 unsafe fn encode(
10743 self,
10744 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10745 offset: usize,
10746 depth: fidl::encoding::Depth,
10747 ) -> fidl::Result<()> {
10748 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
10749 self.0.encode(encoder, offset + 0, depth)?;
10753 Ok(())
10754 }
10755 }
10756
10757 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10758 for DictionaryKeysIteratorGetNextResponse
10759 {
10760 #[inline(always)]
10761 fn new_empty() -> Self {
10762 Self {
10763 keys: fidl::new_empty!(
10764 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10765 fdomain_client::fidl::FDomainResourceDialect
10766 ),
10767 }
10768 }
10769
10770 #[inline]
10771 unsafe fn decode(
10772 &mut self,
10773 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10774 offset: usize,
10775 _depth: fidl::encoding::Depth,
10776 ) -> fidl::Result<()> {
10777 decoder.debug_check_bounds::<Self>(offset);
10778 fidl::decode!(
10780 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
10781 fdomain_client::fidl::FDomainResourceDialect,
10782 &mut self.keys,
10783 decoder,
10784 offset + 0,
10785 _depth
10786 )?;
10787 Ok(())
10788 }
10789 }
10790
10791 impl fidl::encoding::ResourceTypeMarker for DictionaryOptionalItem {
10792 type Borrowed<'a> = &'a mut Self;
10793 fn take_or_borrow<'a>(
10794 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10795 ) -> Self::Borrowed<'a> {
10796 value
10797 }
10798 }
10799
10800 unsafe impl fidl::encoding::TypeMarker for DictionaryOptionalItem {
10801 type Owned = Self;
10802
10803 #[inline(always)]
10804 fn inline_align(_context: fidl::encoding::Context) -> usize {
10805 8
10806 }
10807
10808 #[inline(always)]
10809 fn inline_size(_context: fidl::encoding::Context) -> usize {
10810 24
10811 }
10812 }
10813
10814 unsafe impl
10815 fidl::encoding::Encode<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>
10816 for &mut DictionaryOptionalItem
10817 {
10818 #[inline]
10819 unsafe fn encode(
10820 self,
10821 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10822 offset: usize,
10823 _depth: fidl::encoding::Depth,
10824 ) -> fidl::Result<()> {
10825 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
10826 fidl::encoding::Encode::<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>::encode(
10828 (
10829 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
10830 <fidl::encoding::Boxed<WrappedCapabilityId> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10831 ),
10832 encoder, offset, _depth
10833 )
10834 }
10835 }
10836 unsafe impl<
10837 T0: fidl::encoding::Encode<
10838 fidl::encoding::BoundedString<255>,
10839 fdomain_client::fidl::FDomainResourceDialect,
10840 >,
10841 T1: fidl::encoding::Encode<
10842 fidl::encoding::Boxed<WrappedCapabilityId>,
10843 fdomain_client::fidl::FDomainResourceDialect,
10844 >,
10845 >
10846 fidl::encoding::Encode<DictionaryOptionalItem, fdomain_client::fidl::FDomainResourceDialect>
10847 for (T0, T1)
10848 {
10849 #[inline]
10850 unsafe fn encode(
10851 self,
10852 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10853 offset: usize,
10854 depth: fidl::encoding::Depth,
10855 ) -> fidl::Result<()> {
10856 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
10857 self.0.encode(encoder, offset + 0, depth)?;
10861 self.1.encode(encoder, offset + 16, depth)?;
10862 Ok(())
10863 }
10864 }
10865
10866 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10867 for DictionaryOptionalItem
10868 {
10869 #[inline(always)]
10870 fn new_empty() -> Self {
10871 Self {
10872 key: fidl::new_empty!(
10873 fidl::encoding::BoundedString<255>,
10874 fdomain_client::fidl::FDomainResourceDialect
10875 ),
10876 value: fidl::new_empty!(
10877 fidl::encoding::Boxed<WrappedCapabilityId>,
10878 fdomain_client::fidl::FDomainResourceDialect
10879 ),
10880 }
10881 }
10882
10883 #[inline]
10884 unsafe fn decode(
10885 &mut self,
10886 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10887 offset: usize,
10888 _depth: fidl::encoding::Depth,
10889 ) -> fidl::Result<()> {
10890 decoder.debug_check_bounds::<Self>(offset);
10891 fidl::decode!(
10893 fidl::encoding::BoundedString<255>,
10894 fdomain_client::fidl::FDomainResourceDialect,
10895 &mut self.key,
10896 decoder,
10897 offset + 0,
10898 _depth
10899 )?;
10900 fidl::decode!(
10901 fidl::encoding::Boxed<WrappedCapabilityId>,
10902 fdomain_client::fidl::FDomainResourceDialect,
10903 &mut self.value,
10904 decoder,
10905 offset + 16,
10906 _depth
10907 )?;
10908 Ok(())
10909 }
10910 }
10911
10912 impl fidl::encoding::ResourceTypeMarker for DictionaryRef {
10913 type Borrowed<'a> = &'a mut Self;
10914 fn take_or_borrow<'a>(
10915 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10916 ) -> Self::Borrowed<'a> {
10917 value
10918 }
10919 }
10920
10921 unsafe impl fidl::encoding::TypeMarker for DictionaryRef {
10922 type Owned = Self;
10923
10924 #[inline(always)]
10925 fn inline_align(_context: fidl::encoding::Context) -> usize {
10926 4
10927 }
10928
10929 #[inline(always)]
10930 fn inline_size(_context: fidl::encoding::Context) -> usize {
10931 4
10932 }
10933 }
10934
10935 unsafe impl fidl::encoding::Encode<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>
10936 for &mut DictionaryRef
10937 {
10938 #[inline]
10939 unsafe fn encode(
10940 self,
10941 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10942 offset: usize,
10943 _depth: fidl::encoding::Depth,
10944 ) -> fidl::Result<()> {
10945 encoder.debug_check_bounds::<DictionaryRef>(offset);
10946 fidl::encoding::Encode::<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>::encode(
10948 (
10949 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
10950 ),
10951 encoder, offset, _depth
10952 )
10953 }
10954 }
10955 unsafe impl<
10956 T0: fidl::encoding::Encode<
10957 fidl::encoding::HandleType<
10958 fdomain_client::EventPair,
10959 { fidl::ObjectType::EVENTPAIR.into_raw() },
10960 2147483648,
10961 >,
10962 fdomain_client::fidl::FDomainResourceDialect,
10963 >,
10964 > fidl::encoding::Encode<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
10965 {
10966 #[inline]
10967 unsafe fn encode(
10968 self,
10969 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10970 offset: usize,
10971 depth: fidl::encoding::Depth,
10972 ) -> fidl::Result<()> {
10973 encoder.debug_check_bounds::<DictionaryRef>(offset);
10974 self.0.encode(encoder, offset + 0, depth)?;
10978 Ok(())
10979 }
10980 }
10981
10982 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DictionaryRef {
10983 #[inline(always)]
10984 fn new_empty() -> Self {
10985 Self {
10986 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
10987 }
10988 }
10989
10990 #[inline]
10991 unsafe fn decode(
10992 &mut self,
10993 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10994 offset: usize,
10995 _depth: fidl::encoding::Depth,
10996 ) -> fidl::Result<()> {
10997 decoder.debug_check_bounds::<Self>(offset);
10998 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)?;
11000 Ok(())
11001 }
11002 }
11003
11004 impl fidl::encoding::ResourceTypeMarker for DirConnector {
11005 type Borrowed<'a> = &'a mut Self;
11006 fn take_or_borrow<'a>(
11007 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11008 ) -> Self::Borrowed<'a> {
11009 value
11010 }
11011 }
11012
11013 unsafe impl fidl::encoding::TypeMarker for DirConnector {
11014 type Owned = Self;
11015
11016 #[inline(always)]
11017 fn inline_align(_context: fidl::encoding::Context) -> usize {
11018 4
11019 }
11020
11021 #[inline(always)]
11022 fn inline_size(_context: fidl::encoding::Context) -> usize {
11023 4
11024 }
11025 }
11026
11027 unsafe impl fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect>
11028 for &mut DirConnector
11029 {
11030 #[inline]
11031 unsafe fn encode(
11032 self,
11033 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11034 offset: usize,
11035 _depth: fidl::encoding::Depth,
11036 ) -> fidl::Result<()> {
11037 encoder.debug_check_bounds::<DirConnector>(offset);
11038 fidl::encoding::Encode::<DirConnector, fdomain_client::fidl::FDomainResourceDialect>::encode(
11040 (
11041 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
11042 ),
11043 encoder, offset, _depth
11044 )
11045 }
11046 }
11047 unsafe impl<
11048 T0: fidl::encoding::Encode<
11049 fidl::encoding::HandleType<
11050 fdomain_client::EventPair,
11051 { fidl::ObjectType::EVENTPAIR.into_raw() },
11052 2147483648,
11053 >,
11054 fdomain_client::fidl::FDomainResourceDialect,
11055 >,
11056 > fidl::encoding::Encode<DirConnector, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
11057 {
11058 #[inline]
11059 unsafe fn encode(
11060 self,
11061 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11062 offset: usize,
11063 depth: fidl::encoding::Depth,
11064 ) -> fidl::Result<()> {
11065 encoder.debug_check_bounds::<DirConnector>(offset);
11066 self.0.encode(encoder, offset + 0, depth)?;
11070 Ok(())
11071 }
11072 }
11073
11074 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DirConnector {
11075 #[inline(always)]
11076 fn new_empty() -> Self {
11077 Self {
11078 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11079 }
11080 }
11081
11082 #[inline]
11083 unsafe fn decode(
11084 &mut self,
11085 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11086 offset: usize,
11087 _depth: fidl::encoding::Depth,
11088 ) -> fidl::Result<()> {
11089 decoder.debug_check_bounds::<Self>(offset);
11090 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)?;
11092 Ok(())
11093 }
11094 }
11095
11096 impl fidl::encoding::ResourceTypeMarker for DirEntry {
11097 type Borrowed<'a> = &'a mut Self;
11098 fn take_or_borrow<'a>(
11099 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11100 ) -> Self::Borrowed<'a> {
11101 value
11102 }
11103 }
11104
11105 unsafe impl fidl::encoding::TypeMarker for DirEntry {
11106 type Owned = Self;
11107
11108 #[inline(always)]
11109 fn inline_align(_context: fidl::encoding::Context) -> usize {
11110 4
11111 }
11112
11113 #[inline(always)]
11114 fn inline_size(_context: fidl::encoding::Context) -> usize {
11115 4
11116 }
11117 }
11118
11119 unsafe impl fidl::encoding::Encode<DirEntry, fdomain_client::fidl::FDomainResourceDialect>
11120 for &mut DirEntry
11121 {
11122 #[inline]
11123 unsafe fn encode(
11124 self,
11125 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11126 offset: usize,
11127 _depth: fidl::encoding::Depth,
11128 ) -> fidl::Result<()> {
11129 encoder.debug_check_bounds::<DirEntry>(offset);
11130 fidl::encoding::Encode::<DirEntry, fdomain_client::fidl::FDomainResourceDialect>::encode(
11132 (<fidl::encoding::HandleType<
11133 fdomain_client::EventPair,
11134 { fidl::ObjectType::EVENTPAIR.into_raw() },
11135 2147483648,
11136 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11137 &mut self.token
11138 ),),
11139 encoder,
11140 offset,
11141 _depth,
11142 )
11143 }
11144 }
11145 unsafe impl<
11146 T0: fidl::encoding::Encode<
11147 fidl::encoding::HandleType<
11148 fdomain_client::EventPair,
11149 { fidl::ObjectType::EVENTPAIR.into_raw() },
11150 2147483648,
11151 >,
11152 fdomain_client::fidl::FDomainResourceDialect,
11153 >,
11154 > fidl::encoding::Encode<DirEntry, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
11155 {
11156 #[inline]
11157 unsafe fn encode(
11158 self,
11159 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11160 offset: usize,
11161 depth: fidl::encoding::Depth,
11162 ) -> fidl::Result<()> {
11163 encoder.debug_check_bounds::<DirEntry>(offset);
11164 self.0.encode(encoder, offset + 0, depth)?;
11168 Ok(())
11169 }
11170 }
11171
11172 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for DirEntry {
11173 #[inline(always)]
11174 fn new_empty() -> Self {
11175 Self {
11176 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11177 }
11178 }
11179
11180 #[inline]
11181 unsafe fn decode(
11182 &mut self,
11183 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11184 offset: usize,
11185 _depth: fidl::encoding::Depth,
11186 ) -> fidl::Result<()> {
11187 decoder.debug_check_bounds::<Self>(offset);
11188 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)?;
11190 Ok(())
11191 }
11192 }
11193
11194 impl fidl::encoding::ResourceTypeMarker for InstanceToken {
11195 type Borrowed<'a> = &'a mut Self;
11196 fn take_or_borrow<'a>(
11197 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11198 ) -> Self::Borrowed<'a> {
11199 value
11200 }
11201 }
11202
11203 unsafe impl fidl::encoding::TypeMarker for InstanceToken {
11204 type Owned = Self;
11205
11206 #[inline(always)]
11207 fn inline_align(_context: fidl::encoding::Context) -> usize {
11208 4
11209 }
11210
11211 #[inline(always)]
11212 fn inline_size(_context: fidl::encoding::Context) -> usize {
11213 4
11214 }
11215 }
11216
11217 unsafe impl fidl::encoding::Encode<InstanceToken, fdomain_client::fidl::FDomainResourceDialect>
11218 for &mut InstanceToken
11219 {
11220 #[inline]
11221 unsafe fn encode(
11222 self,
11223 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11224 offset: usize,
11225 _depth: fidl::encoding::Depth,
11226 ) -> fidl::Result<()> {
11227 encoder.debug_check_bounds::<InstanceToken>(offset);
11228 fidl::encoding::Encode::<InstanceToken, fdomain_client::fidl::FDomainResourceDialect>::encode(
11230 (
11231 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
11232 ),
11233 encoder, offset, _depth
11234 )
11235 }
11236 }
11237 unsafe impl<
11238 T0: fidl::encoding::Encode<
11239 fidl::encoding::HandleType<
11240 fdomain_client::EventPair,
11241 { fidl::ObjectType::EVENTPAIR.into_raw() },
11242 2147483648,
11243 >,
11244 fdomain_client::fidl::FDomainResourceDialect,
11245 >,
11246 > fidl::encoding::Encode<InstanceToken, fdomain_client::fidl::FDomainResourceDialect> for (T0,)
11247 {
11248 #[inline]
11249 unsafe fn encode(
11250 self,
11251 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11252 offset: usize,
11253 depth: fidl::encoding::Depth,
11254 ) -> fidl::Result<()> {
11255 encoder.debug_check_bounds::<InstanceToken>(offset);
11256 self.0.encode(encoder, offset + 0, depth)?;
11260 Ok(())
11261 }
11262 }
11263
11264 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for InstanceToken {
11265 #[inline(always)]
11266 fn new_empty() -> Self {
11267 Self {
11268 token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11269 }
11270 }
11271
11272 #[inline]
11273 unsafe fn decode(
11274 &mut self,
11275 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11276 offset: usize,
11277 _depth: fidl::encoding::Depth,
11278 ) -> fidl::Result<()> {
11279 decoder.debug_check_bounds::<Self>(offset);
11280 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)?;
11282 Ok(())
11283 }
11284 }
11285
11286 impl fidl::encoding::ResourceTypeMarker for ProtocolPayload {
11287 type Borrowed<'a> = &'a mut Self;
11288 fn take_or_borrow<'a>(
11289 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11290 ) -> Self::Borrowed<'a> {
11291 value
11292 }
11293 }
11294
11295 unsafe impl fidl::encoding::TypeMarker for ProtocolPayload {
11296 type Owned = Self;
11297
11298 #[inline(always)]
11299 fn inline_align(_context: fidl::encoding::Context) -> usize {
11300 4
11301 }
11302
11303 #[inline(always)]
11304 fn inline_size(_context: fidl::encoding::Context) -> usize {
11305 4
11306 }
11307 }
11308
11309 unsafe impl
11310 fidl::encoding::Encode<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>
11311 for &mut ProtocolPayload
11312 {
11313 #[inline]
11314 unsafe fn encode(
11315 self,
11316 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11317 offset: usize,
11318 _depth: fidl::encoding::Depth,
11319 ) -> fidl::Result<()> {
11320 encoder.debug_check_bounds::<ProtocolPayload>(offset);
11321 fidl::encoding::Encode::<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>::encode(
11323 (
11324 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.channel),
11325 ),
11326 encoder, offset, _depth
11327 )
11328 }
11329 }
11330 unsafe impl<
11331 T0: fidl::encoding::Encode<
11332 fidl::encoding::HandleType<
11333 fdomain_client::Channel,
11334 { fidl::ObjectType::CHANNEL.into_raw() },
11335 2147483648,
11336 >,
11337 fdomain_client::fidl::FDomainResourceDialect,
11338 >,
11339 > fidl::encoding::Encode<ProtocolPayload, fdomain_client::fidl::FDomainResourceDialect>
11340 for (T0,)
11341 {
11342 #[inline]
11343 unsafe fn encode(
11344 self,
11345 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11346 offset: usize,
11347 depth: fidl::encoding::Depth,
11348 ) -> fidl::Result<()> {
11349 encoder.debug_check_bounds::<ProtocolPayload>(offset);
11350 self.0.encode(encoder, offset + 0, depth)?;
11354 Ok(())
11355 }
11356 }
11357
11358 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11359 for ProtocolPayload
11360 {
11361 #[inline(always)]
11362 fn new_empty() -> Self {
11363 Self {
11364 channel: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
11365 }
11366 }
11367
11368 #[inline]
11369 unsafe fn decode(
11370 &mut self,
11371 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11372 offset: usize,
11373 _depth: fidl::encoding::Depth,
11374 ) -> fidl::Result<()> {
11375 decoder.debug_check_bounds::<Self>(offset);
11376 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)?;
11378 Ok(())
11379 }
11380 }
11381
11382 impl AggregateSource {
11383 #[inline(always)]
11384 fn max_ordinal_present(&self) -> u64 {
11385 if let Some(_) = self.renamed_instances {
11386 return 3;
11387 }
11388 if let Some(_) = self.source_instance_filter {
11389 return 2;
11390 }
11391 if let Some(_) = self.dir_connector {
11392 return 1;
11393 }
11394 0
11395 }
11396 }
11397
11398 impl fidl::encoding::ResourceTypeMarker for AggregateSource {
11399 type Borrowed<'a> = &'a mut Self;
11400 fn take_or_borrow<'a>(
11401 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11402 ) -> Self::Borrowed<'a> {
11403 value
11404 }
11405 }
11406
11407 unsafe impl fidl::encoding::TypeMarker for AggregateSource {
11408 type Owned = Self;
11409
11410 #[inline(always)]
11411 fn inline_align(_context: fidl::encoding::Context) -> usize {
11412 8
11413 }
11414
11415 #[inline(always)]
11416 fn inline_size(_context: fidl::encoding::Context) -> usize {
11417 16
11418 }
11419 }
11420
11421 unsafe impl
11422 fidl::encoding::Encode<AggregateSource, fdomain_client::fidl::FDomainResourceDialect>
11423 for &mut AggregateSource
11424 {
11425 unsafe fn encode(
11426 self,
11427 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11428 offset: usize,
11429 mut depth: fidl::encoding::Depth,
11430 ) -> fidl::Result<()> {
11431 encoder.debug_check_bounds::<AggregateSource>(offset);
11432 let max_ordinal: u64 = self.max_ordinal_present();
11434 encoder.write_num(max_ordinal, offset);
11435 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11436 if max_ordinal == 0 {
11438 return Ok(());
11439 }
11440 depth.increment()?;
11441 let envelope_size = 8;
11442 let bytes_len = max_ordinal as usize * envelope_size;
11443 #[allow(unused_variables)]
11444 let offset = encoder.out_of_line_offset(bytes_len);
11445 let mut _prev_end_offset: usize = 0;
11446 if 1 > max_ordinal {
11447 return Ok(());
11448 }
11449
11450 let cur_offset: usize = (1 - 1) * envelope_size;
11453
11454 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11456
11457 fidl::encoding::encode_in_envelope_optional::<
11462 DirConnector,
11463 fdomain_client::fidl::FDomainResourceDialect,
11464 >(
11465 self.dir_connector
11466 .as_mut()
11467 .map(<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11468 encoder,
11469 offset + cur_offset,
11470 depth,
11471 )?;
11472
11473 _prev_end_offset = cur_offset + envelope_size;
11474 if 2 > max_ordinal {
11475 return Ok(());
11476 }
11477
11478 let cur_offset: usize = (2 - 1) * envelope_size;
11481
11482 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11484
11485 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>, fdomain_client::fidl::FDomainResourceDialect>(
11490 self.source_instance_filter.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>> as fidl::encoding::ValueTypeMarker>::borrow),
11491 encoder, offset + cur_offset, depth
11492 )?;
11493
11494 _prev_end_offset = cur_offset + envelope_size;
11495 if 3 > max_ordinal {
11496 return Ok(());
11497 }
11498
11499 let cur_offset: usize = (3 - 1) * envelope_size;
11502
11503 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11505
11506 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fdomain_fuchsia_component_decl::NameMapping>, fdomain_client::fidl::FDomainResourceDialect>(
11511 self.renamed_instances.as_ref().map(<fidl::encoding::UnboundedVector<fdomain_fuchsia_component_decl::NameMapping> as fidl::encoding::ValueTypeMarker>::borrow),
11512 encoder, offset + cur_offset, depth
11513 )?;
11514
11515 _prev_end_offset = cur_offset + envelope_size;
11516
11517 Ok(())
11518 }
11519 }
11520
11521 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11522 for AggregateSource
11523 {
11524 #[inline(always)]
11525 fn new_empty() -> Self {
11526 Self::default()
11527 }
11528
11529 unsafe fn decode(
11530 &mut self,
11531 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11532 offset: usize,
11533 mut depth: fidl::encoding::Depth,
11534 ) -> fidl::Result<()> {
11535 decoder.debug_check_bounds::<Self>(offset);
11536 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11537 None => return Err(fidl::Error::NotNullable),
11538 Some(len) => len,
11539 };
11540 if len == 0 {
11542 return Ok(());
11543 };
11544 depth.increment()?;
11545 let envelope_size = 8;
11546 let bytes_len = len * envelope_size;
11547 let offset = decoder.out_of_line_offset(bytes_len)?;
11548 let mut _next_ordinal_to_read = 0;
11550 let mut next_offset = offset;
11551 let end_offset = offset + bytes_len;
11552 _next_ordinal_to_read += 1;
11553 if next_offset >= end_offset {
11554 return Ok(());
11555 }
11556
11557 while _next_ordinal_to_read < 1 {
11559 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11560 _next_ordinal_to_read += 1;
11561 next_offset += envelope_size;
11562 }
11563
11564 let next_out_of_line = decoder.next_out_of_line();
11565 let handles_before = decoder.remaining_handles();
11566 if let Some((inlined, num_bytes, num_handles)) =
11567 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11568 {
11569 let member_inline_size =
11570 <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11571 if inlined != (member_inline_size <= 4) {
11572 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11573 }
11574 let inner_offset;
11575 let mut inner_depth = depth.clone();
11576 if inlined {
11577 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11578 inner_offset = next_offset;
11579 } else {
11580 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11581 inner_depth.increment()?;
11582 }
11583 let val_ref = self.dir_connector.get_or_insert_with(|| {
11584 fidl::new_empty!(DirConnector, fdomain_client::fidl::FDomainResourceDialect)
11585 });
11586 fidl::decode!(
11587 DirConnector,
11588 fdomain_client::fidl::FDomainResourceDialect,
11589 val_ref,
11590 decoder,
11591 inner_offset,
11592 inner_depth
11593 )?;
11594 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11595 {
11596 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11597 }
11598 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11599 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11600 }
11601 }
11602
11603 next_offset += envelope_size;
11604 _next_ordinal_to_read += 1;
11605 if next_offset >= end_offset {
11606 return Ok(());
11607 }
11608
11609 while _next_ordinal_to_read < 2 {
11611 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11612 _next_ordinal_to_read += 1;
11613 next_offset += envelope_size;
11614 }
11615
11616 let next_out_of_line = decoder.next_out_of_line();
11617 let handles_before = decoder.remaining_handles();
11618 if let Some((inlined, num_bytes, num_handles)) =
11619 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11620 {
11621 let member_inline_size = <fidl::encoding::UnboundedVector<
11622 fidl::encoding::BoundedString<255>,
11623 > as fidl::encoding::TypeMarker>::inline_size(
11624 decoder.context
11625 );
11626 if inlined != (member_inline_size <= 4) {
11627 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11628 }
11629 let inner_offset;
11630 let mut inner_depth = depth.clone();
11631 if inlined {
11632 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11633 inner_offset = next_offset;
11634 } else {
11635 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11636 inner_depth.increment()?;
11637 }
11638 let val_ref = self.source_instance_filter.get_or_insert_with(|| {
11639 fidl::new_empty!(
11640 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
11641 fdomain_client::fidl::FDomainResourceDialect
11642 )
11643 });
11644 fidl::decode!(
11645 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
11646 fdomain_client::fidl::FDomainResourceDialect,
11647 val_ref,
11648 decoder,
11649 inner_offset,
11650 inner_depth
11651 )?;
11652 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11653 {
11654 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11655 }
11656 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11657 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11658 }
11659 }
11660
11661 next_offset += envelope_size;
11662 _next_ordinal_to_read += 1;
11663 if next_offset >= end_offset {
11664 return Ok(());
11665 }
11666
11667 while _next_ordinal_to_read < 3 {
11669 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11670 _next_ordinal_to_read += 1;
11671 next_offset += envelope_size;
11672 }
11673
11674 let next_out_of_line = decoder.next_out_of_line();
11675 let handles_before = decoder.remaining_handles();
11676 if let Some((inlined, num_bytes, num_handles)) =
11677 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11678 {
11679 let member_inline_size = <fidl::encoding::UnboundedVector<
11680 fdomain_fuchsia_component_decl::NameMapping,
11681 > as fidl::encoding::TypeMarker>::inline_size(
11682 decoder.context
11683 );
11684 if inlined != (member_inline_size <= 4) {
11685 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11686 }
11687 let inner_offset;
11688 let mut inner_depth = depth.clone();
11689 if inlined {
11690 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11691 inner_offset = next_offset;
11692 } else {
11693 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11694 inner_depth.increment()?;
11695 }
11696 let val_ref = self.renamed_instances.get_or_insert_with(|| {
11697 fidl::new_empty!(
11698 fidl::encoding::UnboundedVector<
11699 fdomain_fuchsia_component_decl::NameMapping,
11700 >,
11701 fdomain_client::fidl::FDomainResourceDialect
11702 )
11703 });
11704 fidl::decode!(
11705 fidl::encoding::UnboundedVector<fdomain_fuchsia_component_decl::NameMapping>,
11706 fdomain_client::fidl::FDomainResourceDialect,
11707 val_ref,
11708 decoder,
11709 inner_offset,
11710 inner_depth
11711 )?;
11712 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11713 {
11714 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11715 }
11716 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11717 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11718 }
11719 }
11720
11721 next_offset += envelope_size;
11722
11723 while next_offset < end_offset {
11725 _next_ordinal_to_read += 1;
11726 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11727 next_offset += envelope_size;
11728 }
11729
11730 Ok(())
11731 }
11732 }
11733
11734 impl CapabilityStoreDirConnectorOpenRequest {
11735 #[inline(always)]
11736 fn max_ordinal_present(&self) -> u64 {
11737 if let Some(_) = self.path {
11738 return 4;
11739 }
11740 if let Some(_) = self.flags {
11741 return 3;
11742 }
11743 if let Some(_) = self.server_end {
11744 return 2;
11745 }
11746 if let Some(_) = self.id {
11747 return 1;
11748 }
11749 0
11750 }
11751 }
11752
11753 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorOpenRequest {
11754 type Borrowed<'a> = &'a mut Self;
11755 fn take_or_borrow<'a>(
11756 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11757 ) -> Self::Borrowed<'a> {
11758 value
11759 }
11760 }
11761
11762 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorOpenRequest {
11763 type Owned = Self;
11764
11765 #[inline(always)]
11766 fn inline_align(_context: fidl::encoding::Context) -> usize {
11767 8
11768 }
11769
11770 #[inline(always)]
11771 fn inline_size(_context: fidl::encoding::Context) -> usize {
11772 16
11773 }
11774 }
11775
11776 unsafe impl
11777 fidl::encoding::Encode<
11778 CapabilityStoreDirConnectorOpenRequest,
11779 fdomain_client::fidl::FDomainResourceDialect,
11780 > for &mut CapabilityStoreDirConnectorOpenRequest
11781 {
11782 unsafe fn encode(
11783 self,
11784 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11785 offset: usize,
11786 mut depth: fidl::encoding::Depth,
11787 ) -> fidl::Result<()> {
11788 encoder.debug_check_bounds::<CapabilityStoreDirConnectorOpenRequest>(offset);
11789 let max_ordinal: u64 = self.max_ordinal_present();
11791 encoder.write_num(max_ordinal, offset);
11792 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11793 if max_ordinal == 0 {
11795 return Ok(());
11796 }
11797 depth.increment()?;
11798 let envelope_size = 8;
11799 let bytes_len = max_ordinal as usize * envelope_size;
11800 #[allow(unused_variables)]
11801 let offset = encoder.out_of_line_offset(bytes_len);
11802 let mut _prev_end_offset: usize = 0;
11803 if 1 > max_ordinal {
11804 return Ok(());
11805 }
11806
11807 let cur_offset: usize = (1 - 1) * envelope_size;
11810
11811 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11813
11814 fidl::encoding::encode_in_envelope_optional::<
11819 u64,
11820 fdomain_client::fidl::FDomainResourceDialect,
11821 >(
11822 self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
11823 encoder,
11824 offset + cur_offset,
11825 depth,
11826 )?;
11827
11828 _prev_end_offset = cur_offset + envelope_size;
11829 if 2 > max_ordinal {
11830 return Ok(());
11831 }
11832
11833 let cur_offset: usize = (2 - 1) * envelope_size;
11836
11837 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11839
11840 fidl::encoding::encode_in_envelope_optional::<
11845 fidl::encoding::Endpoint<
11846 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11847 >,
11848 fdomain_client::fidl::FDomainResourceDialect,
11849 >(
11850 self.server_end.as_mut().map(
11851 <fidl::encoding::Endpoint<
11852 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
11853 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11854 ),
11855 encoder,
11856 offset + cur_offset,
11857 depth,
11858 )?;
11859
11860 _prev_end_offset = cur_offset + envelope_size;
11861 if 3 > max_ordinal {
11862 return Ok(());
11863 }
11864
11865 let cur_offset: usize = (3 - 1) * envelope_size;
11868
11869 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11871
11872 fidl::encoding::encode_in_envelope_optional::<
11877 fdomain_fuchsia_io::Flags,
11878 fdomain_client::fidl::FDomainResourceDialect,
11879 >(
11880 self.flags
11881 .as_ref()
11882 .map(<fdomain_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
11883 encoder,
11884 offset + cur_offset,
11885 depth,
11886 )?;
11887
11888 _prev_end_offset = cur_offset + envelope_size;
11889 if 4 > max_ordinal {
11890 return Ok(());
11891 }
11892
11893 let cur_offset: usize = (4 - 1) * envelope_size;
11896
11897 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11899
11900 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
11905 self.path.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
11906 encoder, offset + cur_offset, depth
11907 )?;
11908
11909 _prev_end_offset = cur_offset + envelope_size;
11910
11911 Ok(())
11912 }
11913 }
11914
11915 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11916 for CapabilityStoreDirConnectorOpenRequest
11917 {
11918 #[inline(always)]
11919 fn new_empty() -> Self {
11920 Self::default()
11921 }
11922
11923 unsafe fn decode(
11924 &mut self,
11925 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11926 offset: usize,
11927 mut depth: fidl::encoding::Depth,
11928 ) -> fidl::Result<()> {
11929 decoder.debug_check_bounds::<Self>(offset);
11930 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11931 None => return Err(fidl::Error::NotNullable),
11932 Some(len) => len,
11933 };
11934 if len == 0 {
11936 return Ok(());
11937 };
11938 depth.increment()?;
11939 let envelope_size = 8;
11940 let bytes_len = len * envelope_size;
11941 let offset = decoder.out_of_line_offset(bytes_len)?;
11942 let mut _next_ordinal_to_read = 0;
11944 let mut next_offset = offset;
11945 let end_offset = offset + bytes_len;
11946 _next_ordinal_to_read += 1;
11947 if next_offset >= end_offset {
11948 return Ok(());
11949 }
11950
11951 while _next_ordinal_to_read < 1 {
11953 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11954 _next_ordinal_to_read += 1;
11955 next_offset += envelope_size;
11956 }
11957
11958 let next_out_of_line = decoder.next_out_of_line();
11959 let handles_before = decoder.remaining_handles();
11960 if let Some((inlined, num_bytes, num_handles)) =
11961 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11962 {
11963 let member_inline_size =
11964 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11965 if inlined != (member_inline_size <= 4) {
11966 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11967 }
11968 let inner_offset;
11969 let mut inner_depth = depth.clone();
11970 if inlined {
11971 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11972 inner_offset = next_offset;
11973 } else {
11974 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11975 inner_depth.increment()?;
11976 }
11977 let val_ref = self.id.get_or_insert_with(|| {
11978 fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect)
11979 });
11980 fidl::decode!(
11981 u64,
11982 fdomain_client::fidl::FDomainResourceDialect,
11983 val_ref,
11984 decoder,
11985 inner_offset,
11986 inner_depth
11987 )?;
11988 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11989 {
11990 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11991 }
11992 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11993 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11994 }
11995 }
11996
11997 next_offset += envelope_size;
11998 _next_ordinal_to_read += 1;
11999 if next_offset >= end_offset {
12000 return Ok(());
12001 }
12002
12003 while _next_ordinal_to_read < 2 {
12005 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12006 _next_ordinal_to_read += 1;
12007 next_offset += envelope_size;
12008 }
12009
12010 let next_out_of_line = decoder.next_out_of_line();
12011 let handles_before = decoder.remaining_handles();
12012 if let Some((inlined, num_bytes, num_handles)) =
12013 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12014 {
12015 let member_inline_size = <fidl::encoding::Endpoint<
12016 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
12017 > as fidl::encoding::TypeMarker>::inline_size(
12018 decoder.context
12019 );
12020 if inlined != (member_inline_size <= 4) {
12021 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12022 }
12023 let inner_offset;
12024 let mut inner_depth = depth.clone();
12025 if inlined {
12026 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12027 inner_offset = next_offset;
12028 } else {
12029 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12030 inner_depth.increment()?;
12031 }
12032 let val_ref = self.server_end.get_or_insert_with(|| {
12033 fidl::new_empty!(
12034 fidl::encoding::Endpoint<
12035 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
12036 >,
12037 fdomain_client::fidl::FDomainResourceDialect
12038 )
12039 });
12040 fidl::decode!(
12041 fidl::encoding::Endpoint<
12042 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
12043 >,
12044 fdomain_client::fidl::FDomainResourceDialect,
12045 val_ref,
12046 decoder,
12047 inner_offset,
12048 inner_depth
12049 )?;
12050 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12051 {
12052 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12053 }
12054 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12055 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12056 }
12057 }
12058
12059 next_offset += envelope_size;
12060 _next_ordinal_to_read += 1;
12061 if next_offset >= end_offset {
12062 return Ok(());
12063 }
12064
12065 while _next_ordinal_to_read < 3 {
12067 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12068 _next_ordinal_to_read += 1;
12069 next_offset += envelope_size;
12070 }
12071
12072 let next_out_of_line = decoder.next_out_of_line();
12073 let handles_before = decoder.remaining_handles();
12074 if let Some((inlined, num_bytes, num_handles)) =
12075 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12076 {
12077 let member_inline_size =
12078 <fdomain_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
12079 decoder.context,
12080 );
12081 if inlined != (member_inline_size <= 4) {
12082 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12083 }
12084 let inner_offset;
12085 let mut inner_depth = depth.clone();
12086 if inlined {
12087 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12088 inner_offset = next_offset;
12089 } else {
12090 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12091 inner_depth.increment()?;
12092 }
12093 let val_ref = self.flags.get_or_insert_with(|| {
12094 fidl::new_empty!(
12095 fdomain_fuchsia_io::Flags,
12096 fdomain_client::fidl::FDomainResourceDialect
12097 )
12098 });
12099 fidl::decode!(
12100 fdomain_fuchsia_io::Flags,
12101 fdomain_client::fidl::FDomainResourceDialect,
12102 val_ref,
12103 decoder,
12104 inner_offset,
12105 inner_depth
12106 )?;
12107 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12108 {
12109 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12110 }
12111 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12112 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12113 }
12114 }
12115
12116 next_offset += envelope_size;
12117 _next_ordinal_to_read += 1;
12118 if next_offset >= end_offset {
12119 return Ok(());
12120 }
12121
12122 while _next_ordinal_to_read < 4 {
12124 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12125 _next_ordinal_to_read += 1;
12126 next_offset += envelope_size;
12127 }
12128
12129 let next_out_of_line = decoder.next_out_of_line();
12130 let handles_before = decoder.remaining_handles();
12131 if let Some((inlined, num_bytes, num_handles)) =
12132 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12133 {
12134 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12135 if inlined != (member_inline_size <= 4) {
12136 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12137 }
12138 let inner_offset;
12139 let mut inner_depth = depth.clone();
12140 if inlined {
12141 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12142 inner_offset = next_offset;
12143 } else {
12144 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12145 inner_depth.increment()?;
12146 }
12147 let val_ref = self.path.get_or_insert_with(|| {
12148 fidl::new_empty!(
12149 fidl::encoding::BoundedString<4095>,
12150 fdomain_client::fidl::FDomainResourceDialect
12151 )
12152 });
12153 fidl::decode!(
12154 fidl::encoding::BoundedString<4095>,
12155 fdomain_client::fidl::FDomainResourceDialect,
12156 val_ref,
12157 decoder,
12158 inner_offset,
12159 inner_depth
12160 )?;
12161 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12162 {
12163 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12164 }
12165 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12166 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12167 }
12168 }
12169
12170 next_offset += envelope_size;
12171
12172 while next_offset < end_offset {
12174 _next_ordinal_to_read += 1;
12175 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12176 next_offset += envelope_size;
12177 }
12178
12179 Ok(())
12180 }
12181 }
12182
12183 impl DirReceiverReceiveRequest {
12184 #[inline(always)]
12185 fn max_ordinal_present(&self) -> u64 {
12186 if let Some(_) = self.subdir {
12187 return 3;
12188 }
12189 if let Some(_) = self.flags {
12190 return 2;
12191 }
12192 if let Some(_) = self.channel {
12193 return 1;
12194 }
12195 0
12196 }
12197 }
12198
12199 impl fidl::encoding::ResourceTypeMarker for DirReceiverReceiveRequest {
12200 type Borrowed<'a> = &'a mut Self;
12201 fn take_or_borrow<'a>(
12202 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12203 ) -> Self::Borrowed<'a> {
12204 value
12205 }
12206 }
12207
12208 unsafe impl fidl::encoding::TypeMarker for DirReceiverReceiveRequest {
12209 type Owned = Self;
12210
12211 #[inline(always)]
12212 fn inline_align(_context: fidl::encoding::Context) -> usize {
12213 8
12214 }
12215
12216 #[inline(always)]
12217 fn inline_size(_context: fidl::encoding::Context) -> usize {
12218 16
12219 }
12220 }
12221
12222 unsafe impl
12223 fidl::encoding::Encode<
12224 DirReceiverReceiveRequest,
12225 fdomain_client::fidl::FDomainResourceDialect,
12226 > for &mut DirReceiverReceiveRequest
12227 {
12228 unsafe fn encode(
12229 self,
12230 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12231 offset: usize,
12232 mut depth: fidl::encoding::Depth,
12233 ) -> fidl::Result<()> {
12234 encoder.debug_check_bounds::<DirReceiverReceiveRequest>(offset);
12235 let max_ordinal: u64 = self.max_ordinal_present();
12237 encoder.write_num(max_ordinal, offset);
12238 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12239 if max_ordinal == 0 {
12241 return Ok(());
12242 }
12243 depth.increment()?;
12244 let envelope_size = 8;
12245 let bytes_len = max_ordinal as usize * envelope_size;
12246 #[allow(unused_variables)]
12247 let offset = encoder.out_of_line_offset(bytes_len);
12248 let mut _prev_end_offset: usize = 0;
12249 if 1 > max_ordinal {
12250 return Ok(());
12251 }
12252
12253 let cur_offset: usize = (1 - 1) * envelope_size;
12256
12257 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12259
12260 fidl::encoding::encode_in_envelope_optional::<
12265 fidl::encoding::HandleType<
12266 fdomain_client::Channel,
12267 { fidl::ObjectType::CHANNEL.into_raw() },
12268 2147483648,
12269 >,
12270 fdomain_client::fidl::FDomainResourceDialect,
12271 >(
12272 self.channel.as_mut().map(
12273 <fidl::encoding::HandleType<
12274 fdomain_client::Channel,
12275 { fidl::ObjectType::CHANNEL.into_raw() },
12276 2147483648,
12277 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12278 ),
12279 encoder,
12280 offset + cur_offset,
12281 depth,
12282 )?;
12283
12284 _prev_end_offset = cur_offset + envelope_size;
12285 if 2 > max_ordinal {
12286 return Ok(());
12287 }
12288
12289 let cur_offset: usize = (2 - 1) * envelope_size;
12292
12293 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12295
12296 fidl::encoding::encode_in_envelope_optional::<
12301 fdomain_fuchsia_io::Flags,
12302 fdomain_client::fidl::FDomainResourceDialect,
12303 >(
12304 self.flags
12305 .as_ref()
12306 .map(<fdomain_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
12307 encoder,
12308 offset + cur_offset,
12309 depth,
12310 )?;
12311
12312 _prev_end_offset = cur_offset + envelope_size;
12313 if 3 > max_ordinal {
12314 return Ok(());
12315 }
12316
12317 let cur_offset: usize = (3 - 1) * envelope_size;
12320
12321 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12323
12324 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
12329 self.subdir.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
12330 encoder, offset + cur_offset, depth
12331 )?;
12332
12333 _prev_end_offset = cur_offset + envelope_size;
12334
12335 Ok(())
12336 }
12337 }
12338
12339 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
12340 for DirReceiverReceiveRequest
12341 {
12342 #[inline(always)]
12343 fn new_empty() -> Self {
12344 Self::default()
12345 }
12346
12347 unsafe fn decode(
12348 &mut self,
12349 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12350 offset: usize,
12351 mut depth: fidl::encoding::Depth,
12352 ) -> fidl::Result<()> {
12353 decoder.debug_check_bounds::<Self>(offset);
12354 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12355 None => return Err(fidl::Error::NotNullable),
12356 Some(len) => len,
12357 };
12358 if len == 0 {
12360 return Ok(());
12361 };
12362 depth.increment()?;
12363 let envelope_size = 8;
12364 let bytes_len = len * envelope_size;
12365 let offset = decoder.out_of_line_offset(bytes_len)?;
12366 let mut _next_ordinal_to_read = 0;
12368 let mut next_offset = offset;
12369 let end_offset = offset + bytes_len;
12370 _next_ordinal_to_read += 1;
12371 if next_offset >= end_offset {
12372 return Ok(());
12373 }
12374
12375 while _next_ordinal_to_read < 1 {
12377 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12378 _next_ordinal_to_read += 1;
12379 next_offset += envelope_size;
12380 }
12381
12382 let next_out_of_line = decoder.next_out_of_line();
12383 let handles_before = decoder.remaining_handles();
12384 if let Some((inlined, num_bytes, num_handles)) =
12385 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12386 {
12387 let member_inline_size = <fidl::encoding::HandleType<
12388 fdomain_client::Channel,
12389 { fidl::ObjectType::CHANNEL.into_raw() },
12390 2147483648,
12391 > as fidl::encoding::TypeMarker>::inline_size(
12392 decoder.context
12393 );
12394 if inlined != (member_inline_size <= 4) {
12395 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12396 }
12397 let inner_offset;
12398 let mut inner_depth = depth.clone();
12399 if inlined {
12400 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12401 inner_offset = next_offset;
12402 } else {
12403 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12404 inner_depth.increment()?;
12405 }
12406 let val_ref =
12407 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));
12408 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)?;
12409 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12410 {
12411 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12412 }
12413 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12414 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12415 }
12416 }
12417
12418 next_offset += envelope_size;
12419 _next_ordinal_to_read += 1;
12420 if next_offset >= end_offset {
12421 return Ok(());
12422 }
12423
12424 while _next_ordinal_to_read < 2 {
12426 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12427 _next_ordinal_to_read += 1;
12428 next_offset += envelope_size;
12429 }
12430
12431 let next_out_of_line = decoder.next_out_of_line();
12432 let handles_before = decoder.remaining_handles();
12433 if let Some((inlined, num_bytes, num_handles)) =
12434 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12435 {
12436 let member_inline_size =
12437 <fdomain_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
12438 decoder.context,
12439 );
12440 if inlined != (member_inline_size <= 4) {
12441 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12442 }
12443 let inner_offset;
12444 let mut inner_depth = depth.clone();
12445 if inlined {
12446 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12447 inner_offset = next_offset;
12448 } else {
12449 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12450 inner_depth.increment()?;
12451 }
12452 let val_ref = self.flags.get_or_insert_with(|| {
12453 fidl::new_empty!(
12454 fdomain_fuchsia_io::Flags,
12455 fdomain_client::fidl::FDomainResourceDialect
12456 )
12457 });
12458 fidl::decode!(
12459 fdomain_fuchsia_io::Flags,
12460 fdomain_client::fidl::FDomainResourceDialect,
12461 val_ref,
12462 decoder,
12463 inner_offset,
12464 inner_depth
12465 )?;
12466 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12467 {
12468 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12469 }
12470 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12471 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12472 }
12473 }
12474
12475 next_offset += envelope_size;
12476 _next_ordinal_to_read += 1;
12477 if next_offset >= end_offset {
12478 return Ok(());
12479 }
12480
12481 while _next_ordinal_to_read < 3 {
12483 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12484 _next_ordinal_to_read += 1;
12485 next_offset += envelope_size;
12486 }
12487
12488 let next_out_of_line = decoder.next_out_of_line();
12489 let handles_before = decoder.remaining_handles();
12490 if let Some((inlined, num_bytes, num_handles)) =
12491 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12492 {
12493 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12494 if inlined != (member_inline_size <= 4) {
12495 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12496 }
12497 let inner_offset;
12498 let mut inner_depth = depth.clone();
12499 if inlined {
12500 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12501 inner_offset = next_offset;
12502 } else {
12503 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12504 inner_depth.increment()?;
12505 }
12506 let val_ref = self.subdir.get_or_insert_with(|| {
12507 fidl::new_empty!(
12508 fidl::encoding::BoundedString<4095>,
12509 fdomain_client::fidl::FDomainResourceDialect
12510 )
12511 });
12512 fidl::decode!(
12513 fidl::encoding::BoundedString<4095>,
12514 fdomain_client::fidl::FDomainResourceDialect,
12515 val_ref,
12516 decoder,
12517 inner_offset,
12518 inner_depth
12519 )?;
12520 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12521 {
12522 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12523 }
12524 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12525 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12526 }
12527 }
12528
12529 next_offset += envelope_size;
12530
12531 while next_offset < end_offset {
12533 _next_ordinal_to_read += 1;
12534 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12535 next_offset += envelope_size;
12536 }
12537
12538 Ok(())
12539 }
12540 }
12541
12542 impl RouteRequest {
12543 #[inline(always)]
12544 fn max_ordinal_present(&self) -> u64 {
12545 if let Some(_) = self.requesting {
12546 return 1;
12547 }
12548 0
12549 }
12550 }
12551
12552 impl fidl::encoding::ResourceTypeMarker for RouteRequest {
12553 type Borrowed<'a> = &'a mut Self;
12554 fn take_or_borrow<'a>(
12555 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12556 ) -> Self::Borrowed<'a> {
12557 value
12558 }
12559 }
12560
12561 unsafe impl fidl::encoding::TypeMarker for RouteRequest {
12562 type Owned = Self;
12563
12564 #[inline(always)]
12565 fn inline_align(_context: fidl::encoding::Context) -> usize {
12566 8
12567 }
12568
12569 #[inline(always)]
12570 fn inline_size(_context: fidl::encoding::Context) -> usize {
12571 16
12572 }
12573 }
12574
12575 unsafe impl fidl::encoding::Encode<RouteRequest, fdomain_client::fidl::FDomainResourceDialect>
12576 for &mut RouteRequest
12577 {
12578 unsafe fn encode(
12579 self,
12580 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12581 offset: usize,
12582 mut depth: fidl::encoding::Depth,
12583 ) -> fidl::Result<()> {
12584 encoder.debug_check_bounds::<RouteRequest>(offset);
12585 let max_ordinal: u64 = self.max_ordinal_present();
12587 encoder.write_num(max_ordinal, offset);
12588 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12589 if max_ordinal == 0 {
12591 return Ok(());
12592 }
12593 depth.increment()?;
12594 let envelope_size = 8;
12595 let bytes_len = max_ordinal as usize * envelope_size;
12596 #[allow(unused_variables)]
12597 let offset = encoder.out_of_line_offset(bytes_len);
12598 let mut _prev_end_offset: usize = 0;
12599 if 1 > max_ordinal {
12600 return Ok(());
12601 }
12602
12603 let cur_offset: usize = (1 - 1) * envelope_size;
12606
12607 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12609
12610 fidl::encoding::encode_in_envelope_optional::<
12615 InstanceToken,
12616 fdomain_client::fidl::FDomainResourceDialect,
12617 >(
12618 self.requesting
12619 .as_mut()
12620 .map(<InstanceToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12621 encoder,
12622 offset + cur_offset,
12623 depth,
12624 )?;
12625
12626 _prev_end_offset = cur_offset + envelope_size;
12627
12628 Ok(())
12629 }
12630 }
12631
12632 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for RouteRequest {
12633 #[inline(always)]
12634 fn new_empty() -> Self {
12635 Self::default()
12636 }
12637
12638 unsafe fn decode(
12639 &mut self,
12640 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12641 offset: usize,
12642 mut depth: fidl::encoding::Depth,
12643 ) -> fidl::Result<()> {
12644 decoder.debug_check_bounds::<Self>(offset);
12645 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12646 None => return Err(fidl::Error::NotNullable),
12647 Some(len) => len,
12648 };
12649 if len == 0 {
12651 return Ok(());
12652 };
12653 depth.increment()?;
12654 let envelope_size = 8;
12655 let bytes_len = len * envelope_size;
12656 let offset = decoder.out_of_line_offset(bytes_len)?;
12657 let mut _next_ordinal_to_read = 0;
12659 let mut next_offset = offset;
12660 let end_offset = offset + bytes_len;
12661 _next_ordinal_to_read += 1;
12662 if next_offset >= end_offset {
12663 return Ok(());
12664 }
12665
12666 while _next_ordinal_to_read < 1 {
12668 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12669 _next_ordinal_to_read += 1;
12670 next_offset += envelope_size;
12671 }
12672
12673 let next_out_of_line = decoder.next_out_of_line();
12674 let handles_before = decoder.remaining_handles();
12675 if let Some((inlined, num_bytes, num_handles)) =
12676 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12677 {
12678 let member_inline_size =
12679 <InstanceToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12680 if inlined != (member_inline_size <= 4) {
12681 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12682 }
12683 let inner_offset;
12684 let mut inner_depth = depth.clone();
12685 if inlined {
12686 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12687 inner_offset = next_offset;
12688 } else {
12689 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12690 inner_depth.increment()?;
12691 }
12692 let val_ref = self.requesting.get_or_insert_with(|| {
12693 fidl::new_empty!(InstanceToken, fdomain_client::fidl::FDomainResourceDialect)
12694 });
12695 fidl::decode!(
12696 InstanceToken,
12697 fdomain_client::fidl::FDomainResourceDialect,
12698 val_ref,
12699 decoder,
12700 inner_offset,
12701 inner_depth
12702 )?;
12703 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12704 {
12705 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12706 }
12707 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12708 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12709 }
12710 }
12711
12712 next_offset += envelope_size;
12713
12714 while next_offset < end_offset {
12716 _next_ordinal_to_read += 1;
12717 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12718 next_offset += envelope_size;
12719 }
12720
12721 Ok(())
12722 }
12723 }
12724
12725 impl fidl::encoding::ResourceTypeMarker for Capability {
12726 type Borrowed<'a> = &'a mut Self;
12727 fn take_or_borrow<'a>(
12728 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12729 ) -> Self::Borrowed<'a> {
12730 value
12731 }
12732 }
12733
12734 unsafe impl fidl::encoding::TypeMarker for Capability {
12735 type Owned = Self;
12736
12737 #[inline(always)]
12738 fn inline_align(_context: fidl::encoding::Context) -> usize {
12739 8
12740 }
12741
12742 #[inline(always)]
12743 fn inline_size(_context: fidl::encoding::Context) -> usize {
12744 16
12745 }
12746 }
12747
12748 unsafe impl fidl::encoding::Encode<Capability, fdomain_client::fidl::FDomainResourceDialect>
12749 for &mut Capability
12750 {
12751 #[inline]
12752 unsafe fn encode(
12753 self,
12754 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12755 offset: usize,
12756 _depth: fidl::encoding::Depth,
12757 ) -> fidl::Result<()> {
12758 encoder.debug_check_bounds::<Capability>(offset);
12759 encoder.write_num::<u64>(self.ordinal(), offset);
12760 match self {
12761 Capability::Unit(ref val) => {
12762 fidl::encoding::encode_in_envelope::<Unit, fdomain_client::fidl::FDomainResourceDialect>(
12763 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
12764 encoder, offset + 8, _depth
12765 )
12766 }
12767 Capability::Handle(ref mut val) => {
12768 fidl::encoding::encode_in_envelope::<fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect>(
12769 <fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12770 encoder, offset + 8, _depth
12771 )
12772 }
12773 Capability::Data(ref val) => {
12774 fidl::encoding::encode_in_envelope::<Data, fdomain_client::fidl::FDomainResourceDialect>(
12775 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
12776 encoder, offset + 8, _depth
12777 )
12778 }
12779 Capability::Dictionary(ref mut val) => {
12780 fidl::encoding::encode_in_envelope::<DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>(
12781 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12782 encoder, offset + 8, _depth
12783 )
12784 }
12785 Capability::Connector(ref mut val) => {
12786 fidl::encoding::encode_in_envelope::<Connector, fdomain_client::fidl::FDomainResourceDialect>(
12787 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12788 encoder, offset + 8, _depth
12789 )
12790 }
12791 Capability::DirConnector(ref mut val) => {
12792 fidl::encoding::encode_in_envelope::<DirConnector, fdomain_client::fidl::FDomainResourceDialect>(
12793 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12794 encoder, offset + 8, _depth
12795 )
12796 }
12797 Capability::Directory(ref mut val) => {
12798 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12799 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12800 encoder, offset + 8, _depth
12801 )
12802 }
12803 Capability::DirEntry(ref mut val) => {
12804 fidl::encoding::encode_in_envelope::<DirEntry, fdomain_client::fidl::FDomainResourceDialect>(
12805 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12806 encoder, offset + 8, _depth
12807 )
12808 }
12809 Capability::ConnectorRouter(ref mut val) => {
12810 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12811 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12812 encoder, offset + 8, _depth
12813 )
12814 }
12815 Capability::DictionaryRouter(ref mut val) => {
12816 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12817 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12818 encoder, offset + 8, _depth
12819 )
12820 }
12821 Capability::DirEntryRouter(ref mut val) => {
12822 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12823 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12824 encoder, offset + 8, _depth
12825 )
12826 }
12827 Capability::DataRouter(ref mut val) => {
12828 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DataRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12829 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DataRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12830 encoder, offset + 8, _depth
12831 )
12832 }
12833 Capability::DirConnectorRouter(ref mut val) => {
12834 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
12835 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12836 encoder, offset + 8, _depth
12837 )
12838 }
12839 Capability::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
12840 }
12841 }
12842 }
12843
12844 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Capability {
12845 #[inline(always)]
12846 fn new_empty() -> Self {
12847 Self::__SourceBreaking { unknown_ordinal: 0 }
12848 }
12849
12850 #[inline]
12851 unsafe fn decode(
12852 &mut self,
12853 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12854 offset: usize,
12855 mut depth: fidl::encoding::Depth,
12856 ) -> fidl::Result<()> {
12857 decoder.debug_check_bounds::<Self>(offset);
12858 #[allow(unused_variables)]
12859 let next_out_of_line = decoder.next_out_of_line();
12860 let handles_before = decoder.remaining_handles();
12861 let (ordinal, inlined, num_bytes, num_handles) =
12862 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12863
12864 let member_inline_size =
12865 match ordinal {
12866 1 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12867 2 => <fidl::encoding::HandleType<
12868 fdomain_client::NullableHandle,
12869 { fidl::ObjectType::NONE.into_raw() },
12870 2147483648,
12871 > as fidl::encoding::TypeMarker>::inline_size(
12872 decoder.context
12873 ),
12874 3 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12875 4 => {
12876 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context)
12877 }
12878 5 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12879 6 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12880 7 => <fidl::encoding::Endpoint<
12881 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
12882 > as fidl::encoding::TypeMarker>::inline_size(
12883 decoder.context
12884 ),
12885 8 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12886 9 => <fidl::encoding::Endpoint<
12887 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
12888 > as fidl::encoding::TypeMarker>::inline_size(
12889 decoder.context
12890 ),
12891 10 => <fidl::encoding::Endpoint<
12892 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
12893 > as fidl::encoding::TypeMarker>::inline_size(
12894 decoder.context
12895 ),
12896 11 => <fidl::encoding::Endpoint<
12897 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
12898 > as fidl::encoding::TypeMarker>::inline_size(
12899 decoder.context
12900 ),
12901 12 => <fidl::encoding::Endpoint<
12902 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
12903 > as fidl::encoding::TypeMarker>::inline_size(
12904 decoder.context
12905 ),
12906 13 => <fidl::encoding::Endpoint<
12907 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
12908 > as fidl::encoding::TypeMarker>::inline_size(
12909 decoder.context
12910 ),
12911 0 => return Err(fidl::Error::UnknownUnionTag),
12912 _ => num_bytes as usize,
12913 };
12914
12915 if inlined != (member_inline_size <= 4) {
12916 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12917 }
12918 let _inner_offset;
12919 if inlined {
12920 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12921 _inner_offset = offset + 8;
12922 } else {
12923 depth.increment()?;
12924 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12925 }
12926 match ordinal {
12927 1 => {
12928 #[allow(irrefutable_let_patterns)]
12929 if let Capability::Unit(_) = self {
12930 } else {
12932 *self = Capability::Unit(fidl::new_empty!(
12934 Unit,
12935 fdomain_client::fidl::FDomainResourceDialect
12936 ));
12937 }
12938 #[allow(irrefutable_let_patterns)]
12939 if let Capability::Unit(ref mut val) = self {
12940 fidl::decode!(
12941 Unit,
12942 fdomain_client::fidl::FDomainResourceDialect,
12943 val,
12944 decoder,
12945 _inner_offset,
12946 depth
12947 )?;
12948 } else {
12949 unreachable!()
12950 }
12951 }
12952 2 => {
12953 #[allow(irrefutable_let_patterns)]
12954 if let Capability::Handle(_) = self {
12955 } else {
12957 *self = Capability::Handle(
12959 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
12960 );
12961 }
12962 #[allow(irrefutable_let_patterns)]
12963 if let Capability::Handle(ref mut val) = self {
12964 fidl::decode!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
12965 } else {
12966 unreachable!()
12967 }
12968 }
12969 3 => {
12970 #[allow(irrefutable_let_patterns)]
12971 if let Capability::Data(_) = self {
12972 } else {
12974 *self = Capability::Data(fidl::new_empty!(
12976 Data,
12977 fdomain_client::fidl::FDomainResourceDialect
12978 ));
12979 }
12980 #[allow(irrefutable_let_patterns)]
12981 if let Capability::Data(ref mut val) = self {
12982 fidl::decode!(
12983 Data,
12984 fdomain_client::fidl::FDomainResourceDialect,
12985 val,
12986 decoder,
12987 _inner_offset,
12988 depth
12989 )?;
12990 } else {
12991 unreachable!()
12992 }
12993 }
12994 4 => {
12995 #[allow(irrefutable_let_patterns)]
12996 if let Capability::Dictionary(_) = self {
12997 } else {
12999 *self = Capability::Dictionary(fidl::new_empty!(
13001 DictionaryRef,
13002 fdomain_client::fidl::FDomainResourceDialect
13003 ));
13004 }
13005 #[allow(irrefutable_let_patterns)]
13006 if let Capability::Dictionary(ref mut val) = self {
13007 fidl::decode!(
13008 DictionaryRef,
13009 fdomain_client::fidl::FDomainResourceDialect,
13010 val,
13011 decoder,
13012 _inner_offset,
13013 depth
13014 )?;
13015 } else {
13016 unreachable!()
13017 }
13018 }
13019 5 => {
13020 #[allow(irrefutable_let_patterns)]
13021 if let Capability::Connector(_) = self {
13022 } else {
13024 *self = Capability::Connector(fidl::new_empty!(
13026 Connector,
13027 fdomain_client::fidl::FDomainResourceDialect
13028 ));
13029 }
13030 #[allow(irrefutable_let_patterns)]
13031 if let Capability::Connector(ref mut val) = self {
13032 fidl::decode!(
13033 Connector,
13034 fdomain_client::fidl::FDomainResourceDialect,
13035 val,
13036 decoder,
13037 _inner_offset,
13038 depth
13039 )?;
13040 } else {
13041 unreachable!()
13042 }
13043 }
13044 6 => {
13045 #[allow(irrefutable_let_patterns)]
13046 if let Capability::DirConnector(_) = self {
13047 } else {
13049 *self = Capability::DirConnector(fidl::new_empty!(
13051 DirConnector,
13052 fdomain_client::fidl::FDomainResourceDialect
13053 ));
13054 }
13055 #[allow(irrefutable_let_patterns)]
13056 if let Capability::DirConnector(ref mut val) = self {
13057 fidl::decode!(
13058 DirConnector,
13059 fdomain_client::fidl::FDomainResourceDialect,
13060 val,
13061 decoder,
13062 _inner_offset,
13063 depth
13064 )?;
13065 } else {
13066 unreachable!()
13067 }
13068 }
13069 7 => {
13070 #[allow(irrefutable_let_patterns)]
13071 if let Capability::Directory(_) = self {
13072 } else {
13074 *self = Capability::Directory(fidl::new_empty!(
13076 fidl::encoding::Endpoint<
13077 fdomain_client::fidl::ClientEnd<
13078 fdomain_fuchsia_io::DirectoryMarker,
13079 >,
13080 >,
13081 fdomain_client::fidl::FDomainResourceDialect
13082 ));
13083 }
13084 #[allow(irrefutable_let_patterns)]
13085 if let Capability::Directory(ref mut val) = self {
13086 fidl::decode!(
13087 fidl::encoding::Endpoint<
13088 fdomain_client::fidl::ClientEnd<
13089 fdomain_fuchsia_io::DirectoryMarker,
13090 >,
13091 >,
13092 fdomain_client::fidl::FDomainResourceDialect,
13093 val,
13094 decoder,
13095 _inner_offset,
13096 depth
13097 )?;
13098 } else {
13099 unreachable!()
13100 }
13101 }
13102 8 => {
13103 #[allow(irrefutable_let_patterns)]
13104 if let Capability::DirEntry(_) = self {
13105 } else {
13107 *self = Capability::DirEntry(fidl::new_empty!(
13109 DirEntry,
13110 fdomain_client::fidl::FDomainResourceDialect
13111 ));
13112 }
13113 #[allow(irrefutable_let_patterns)]
13114 if let Capability::DirEntry(ref mut val) = self {
13115 fidl::decode!(
13116 DirEntry,
13117 fdomain_client::fidl::FDomainResourceDialect,
13118 val,
13119 decoder,
13120 _inner_offset,
13121 depth
13122 )?;
13123 } else {
13124 unreachable!()
13125 }
13126 }
13127 9 => {
13128 #[allow(irrefutable_let_patterns)]
13129 if let Capability::ConnectorRouter(_) = self {
13130 } else {
13132 *self = Capability::ConnectorRouter(fidl::new_empty!(
13134 fidl::encoding::Endpoint<
13135 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
13136 >,
13137 fdomain_client::fidl::FDomainResourceDialect
13138 ));
13139 }
13140 #[allow(irrefutable_let_patterns)]
13141 if let Capability::ConnectorRouter(ref mut val) = self {
13142 fidl::decode!(
13143 fidl::encoding::Endpoint<
13144 fdomain_client::fidl::ClientEnd<ConnectorRouterMarker>,
13145 >,
13146 fdomain_client::fidl::FDomainResourceDialect,
13147 val,
13148 decoder,
13149 _inner_offset,
13150 depth
13151 )?;
13152 } else {
13153 unreachable!()
13154 }
13155 }
13156 10 => {
13157 #[allow(irrefutable_let_patterns)]
13158 if let Capability::DictionaryRouter(_) = self {
13159 } else {
13161 *self = Capability::DictionaryRouter(fidl::new_empty!(
13163 fidl::encoding::Endpoint<
13164 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
13165 >,
13166 fdomain_client::fidl::FDomainResourceDialect
13167 ));
13168 }
13169 #[allow(irrefutable_let_patterns)]
13170 if let Capability::DictionaryRouter(ref mut val) = self {
13171 fidl::decode!(
13172 fidl::encoding::Endpoint<
13173 fdomain_client::fidl::ClientEnd<DictionaryRouterMarker>,
13174 >,
13175 fdomain_client::fidl::FDomainResourceDialect,
13176 val,
13177 decoder,
13178 _inner_offset,
13179 depth
13180 )?;
13181 } else {
13182 unreachable!()
13183 }
13184 }
13185 11 => {
13186 #[allow(irrefutable_let_patterns)]
13187 if let Capability::DirEntryRouter(_) = self {
13188 } else {
13190 *self = Capability::DirEntryRouter(fidl::new_empty!(
13192 fidl::encoding::Endpoint<
13193 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
13194 >,
13195 fdomain_client::fidl::FDomainResourceDialect
13196 ));
13197 }
13198 #[allow(irrefutable_let_patterns)]
13199 if let Capability::DirEntryRouter(ref mut val) = self {
13200 fidl::decode!(
13201 fidl::encoding::Endpoint<
13202 fdomain_client::fidl::ClientEnd<DirEntryRouterMarker>,
13203 >,
13204 fdomain_client::fidl::FDomainResourceDialect,
13205 val,
13206 decoder,
13207 _inner_offset,
13208 depth
13209 )?;
13210 } else {
13211 unreachable!()
13212 }
13213 }
13214 12 => {
13215 #[allow(irrefutable_let_patterns)]
13216 if let Capability::DataRouter(_) = self {
13217 } else {
13219 *self = Capability::DataRouter(fidl::new_empty!(
13221 fidl::encoding::Endpoint<
13222 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
13223 >,
13224 fdomain_client::fidl::FDomainResourceDialect
13225 ));
13226 }
13227 #[allow(irrefutable_let_patterns)]
13228 if let Capability::DataRouter(ref mut val) = self {
13229 fidl::decode!(
13230 fidl::encoding::Endpoint<
13231 fdomain_client::fidl::ClientEnd<DataRouterMarker>,
13232 >,
13233 fdomain_client::fidl::FDomainResourceDialect,
13234 val,
13235 decoder,
13236 _inner_offset,
13237 depth
13238 )?;
13239 } else {
13240 unreachable!()
13241 }
13242 }
13243 13 => {
13244 #[allow(irrefutable_let_patterns)]
13245 if let Capability::DirConnectorRouter(_) = self {
13246 } else {
13248 *self = Capability::DirConnectorRouter(fidl::new_empty!(
13250 fidl::encoding::Endpoint<
13251 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
13252 >,
13253 fdomain_client::fidl::FDomainResourceDialect
13254 ));
13255 }
13256 #[allow(irrefutable_let_patterns)]
13257 if let Capability::DirConnectorRouter(ref mut val) = self {
13258 fidl::decode!(
13259 fidl::encoding::Endpoint<
13260 fdomain_client::fidl::ClientEnd<DirConnectorRouterMarker>,
13261 >,
13262 fdomain_client::fidl::FDomainResourceDialect,
13263 val,
13264 decoder,
13265 _inner_offset,
13266 depth
13267 )?;
13268 } else {
13269 unreachable!()
13270 }
13271 }
13272 #[allow(deprecated)]
13273 ordinal => {
13274 for _ in 0..num_handles {
13275 decoder.drop_next_handle()?;
13276 }
13277 *self = Capability::__SourceBreaking { unknown_ordinal: ordinal };
13278 }
13279 }
13280 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13281 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13282 }
13283 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13284 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13285 }
13286 Ok(())
13287 }
13288 }
13289
13290 impl fidl::encoding::ResourceTypeMarker for ConnectorRouterRouteResponse {
13291 type Borrowed<'a> = &'a mut Self;
13292 fn take_or_borrow<'a>(
13293 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13294 ) -> Self::Borrowed<'a> {
13295 value
13296 }
13297 }
13298
13299 unsafe impl fidl::encoding::TypeMarker for ConnectorRouterRouteResponse {
13300 type Owned = Self;
13301
13302 #[inline(always)]
13303 fn inline_align(_context: fidl::encoding::Context) -> usize {
13304 8
13305 }
13306
13307 #[inline(always)]
13308 fn inline_size(_context: fidl::encoding::Context) -> usize {
13309 16
13310 }
13311 }
13312
13313 unsafe impl
13314 fidl::encoding::Encode<
13315 ConnectorRouterRouteResponse,
13316 fdomain_client::fidl::FDomainResourceDialect,
13317 > for &mut ConnectorRouterRouteResponse
13318 {
13319 #[inline]
13320 unsafe fn encode(
13321 self,
13322 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13323 offset: usize,
13324 _depth: fidl::encoding::Depth,
13325 ) -> fidl::Result<()> {
13326 encoder.debug_check_bounds::<ConnectorRouterRouteResponse>(offset);
13327 encoder.write_num::<u64>(self.ordinal(), offset);
13328 match self {
13329 ConnectorRouterRouteResponse::Connector(ref mut val) => {
13330 fidl::encoding::encode_in_envelope::<
13331 Connector,
13332 fdomain_client::fidl::FDomainResourceDialect,
13333 >(
13334 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13335 encoder,
13336 offset + 8,
13337 _depth,
13338 )
13339 }
13340 ConnectorRouterRouteResponse::Unavailable(ref val) => {
13341 fidl::encoding::encode_in_envelope::<
13342 Unit,
13343 fdomain_client::fidl::FDomainResourceDialect,
13344 >(
13345 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13346 encoder,
13347 offset + 8,
13348 _depth,
13349 )
13350 }
13351 }
13352 }
13353 }
13354
13355 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13356 for ConnectorRouterRouteResponse
13357 {
13358 #[inline(always)]
13359 fn new_empty() -> Self {
13360 Self::Connector(fidl::new_empty!(
13361 Connector,
13362 fdomain_client::fidl::FDomainResourceDialect
13363 ))
13364 }
13365
13366 #[inline]
13367 unsafe fn decode(
13368 &mut self,
13369 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13370 offset: usize,
13371 mut depth: fidl::encoding::Depth,
13372 ) -> fidl::Result<()> {
13373 decoder.debug_check_bounds::<Self>(offset);
13374 #[allow(unused_variables)]
13375 let next_out_of_line = decoder.next_out_of_line();
13376 let handles_before = decoder.remaining_handles();
13377 let (ordinal, inlined, num_bytes, num_handles) =
13378 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13379
13380 let member_inline_size = match ordinal {
13381 1 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13382 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13383 _ => return Err(fidl::Error::UnknownUnionTag),
13384 };
13385
13386 if inlined != (member_inline_size <= 4) {
13387 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13388 }
13389 let _inner_offset;
13390 if inlined {
13391 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13392 _inner_offset = offset + 8;
13393 } else {
13394 depth.increment()?;
13395 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13396 }
13397 match ordinal {
13398 1 => {
13399 #[allow(irrefutable_let_patterns)]
13400 if let ConnectorRouterRouteResponse::Connector(_) = self {
13401 } else {
13403 *self = ConnectorRouterRouteResponse::Connector(fidl::new_empty!(
13405 Connector,
13406 fdomain_client::fidl::FDomainResourceDialect
13407 ));
13408 }
13409 #[allow(irrefutable_let_patterns)]
13410 if let ConnectorRouterRouteResponse::Connector(ref mut val) = self {
13411 fidl::decode!(
13412 Connector,
13413 fdomain_client::fidl::FDomainResourceDialect,
13414 val,
13415 decoder,
13416 _inner_offset,
13417 depth
13418 )?;
13419 } else {
13420 unreachable!()
13421 }
13422 }
13423 2 => {
13424 #[allow(irrefutable_let_patterns)]
13425 if let ConnectorRouterRouteResponse::Unavailable(_) = self {
13426 } else {
13428 *self = ConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
13430 Unit,
13431 fdomain_client::fidl::FDomainResourceDialect
13432 ));
13433 }
13434 #[allow(irrefutable_let_patterns)]
13435 if let ConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
13436 fidl::decode!(
13437 Unit,
13438 fdomain_client::fidl::FDomainResourceDialect,
13439 val,
13440 decoder,
13441 _inner_offset,
13442 depth
13443 )?;
13444 } else {
13445 unreachable!()
13446 }
13447 }
13448 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13449 }
13450 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13451 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13452 }
13453 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13454 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13455 }
13456 Ok(())
13457 }
13458 }
13459
13460 impl fidl::encoding::ResourceTypeMarker for DataRouterRouteResponse {
13461 type Borrowed<'a> = &'a mut Self;
13462 fn take_or_borrow<'a>(
13463 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13464 ) -> Self::Borrowed<'a> {
13465 value
13466 }
13467 }
13468
13469 unsafe impl fidl::encoding::TypeMarker for DataRouterRouteResponse {
13470 type Owned = Self;
13471
13472 #[inline(always)]
13473 fn inline_align(_context: fidl::encoding::Context) -> usize {
13474 8
13475 }
13476
13477 #[inline(always)]
13478 fn inline_size(_context: fidl::encoding::Context) -> usize {
13479 16
13480 }
13481 }
13482
13483 unsafe impl
13484 fidl::encoding::Encode<
13485 DataRouterRouteResponse,
13486 fdomain_client::fidl::FDomainResourceDialect,
13487 > for &mut DataRouterRouteResponse
13488 {
13489 #[inline]
13490 unsafe fn encode(
13491 self,
13492 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13493 offset: usize,
13494 _depth: fidl::encoding::Depth,
13495 ) -> fidl::Result<()> {
13496 encoder.debug_check_bounds::<DataRouterRouteResponse>(offset);
13497 encoder.write_num::<u64>(self.ordinal(), offset);
13498 match self {
13499 DataRouterRouteResponse::Data(ref val) => fidl::encoding::encode_in_envelope::<
13500 Data,
13501 fdomain_client::fidl::FDomainResourceDialect,
13502 >(
13503 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
13504 encoder,
13505 offset + 8,
13506 _depth,
13507 ),
13508 DataRouterRouteResponse::Unavailable(ref val) => {
13509 fidl::encoding::encode_in_envelope::<
13510 Unit,
13511 fdomain_client::fidl::FDomainResourceDialect,
13512 >(
13513 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13514 encoder,
13515 offset + 8,
13516 _depth,
13517 )
13518 }
13519 }
13520 }
13521 }
13522
13523 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13524 for DataRouterRouteResponse
13525 {
13526 #[inline(always)]
13527 fn new_empty() -> Self {
13528 Self::Data(fidl::new_empty!(Data, fdomain_client::fidl::FDomainResourceDialect))
13529 }
13530
13531 #[inline]
13532 unsafe fn decode(
13533 &mut self,
13534 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13535 offset: usize,
13536 mut depth: fidl::encoding::Depth,
13537 ) -> fidl::Result<()> {
13538 decoder.debug_check_bounds::<Self>(offset);
13539 #[allow(unused_variables)]
13540 let next_out_of_line = decoder.next_out_of_line();
13541 let handles_before = decoder.remaining_handles();
13542 let (ordinal, inlined, num_bytes, num_handles) =
13543 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13544
13545 let member_inline_size = match ordinal {
13546 1 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13547 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13548 _ => return Err(fidl::Error::UnknownUnionTag),
13549 };
13550
13551 if inlined != (member_inline_size <= 4) {
13552 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13553 }
13554 let _inner_offset;
13555 if inlined {
13556 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13557 _inner_offset = offset + 8;
13558 } else {
13559 depth.increment()?;
13560 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13561 }
13562 match ordinal {
13563 1 => {
13564 #[allow(irrefutable_let_patterns)]
13565 if let DataRouterRouteResponse::Data(_) = self {
13566 } else {
13568 *self = DataRouterRouteResponse::Data(fidl::new_empty!(
13570 Data,
13571 fdomain_client::fidl::FDomainResourceDialect
13572 ));
13573 }
13574 #[allow(irrefutable_let_patterns)]
13575 if let DataRouterRouteResponse::Data(ref mut val) = self {
13576 fidl::decode!(
13577 Data,
13578 fdomain_client::fidl::FDomainResourceDialect,
13579 val,
13580 decoder,
13581 _inner_offset,
13582 depth
13583 )?;
13584 } else {
13585 unreachable!()
13586 }
13587 }
13588 2 => {
13589 #[allow(irrefutable_let_patterns)]
13590 if let DataRouterRouteResponse::Unavailable(_) = self {
13591 } else {
13593 *self = DataRouterRouteResponse::Unavailable(fidl::new_empty!(
13595 Unit,
13596 fdomain_client::fidl::FDomainResourceDialect
13597 ));
13598 }
13599 #[allow(irrefutable_let_patterns)]
13600 if let DataRouterRouteResponse::Unavailable(ref mut val) = self {
13601 fidl::decode!(
13602 Unit,
13603 fdomain_client::fidl::FDomainResourceDialect,
13604 val,
13605 decoder,
13606 _inner_offset,
13607 depth
13608 )?;
13609 } else {
13610 unreachable!()
13611 }
13612 }
13613 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13614 }
13615 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13616 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13617 }
13618 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13619 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13620 }
13621 Ok(())
13622 }
13623 }
13624
13625 impl fidl::encoding::ResourceTypeMarker for DictionaryRouterRouteResponse {
13626 type Borrowed<'a> = &'a mut Self;
13627 fn take_or_borrow<'a>(
13628 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13629 ) -> Self::Borrowed<'a> {
13630 value
13631 }
13632 }
13633
13634 unsafe impl fidl::encoding::TypeMarker for DictionaryRouterRouteResponse {
13635 type Owned = Self;
13636
13637 #[inline(always)]
13638 fn inline_align(_context: fidl::encoding::Context) -> usize {
13639 8
13640 }
13641
13642 #[inline(always)]
13643 fn inline_size(_context: fidl::encoding::Context) -> usize {
13644 16
13645 }
13646 }
13647
13648 unsafe impl
13649 fidl::encoding::Encode<
13650 DictionaryRouterRouteResponse,
13651 fdomain_client::fidl::FDomainResourceDialect,
13652 > for &mut DictionaryRouterRouteResponse
13653 {
13654 #[inline]
13655 unsafe fn encode(
13656 self,
13657 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13658 offset: usize,
13659 _depth: fidl::encoding::Depth,
13660 ) -> fidl::Result<()> {
13661 encoder.debug_check_bounds::<DictionaryRouterRouteResponse>(offset);
13662 encoder.write_num::<u64>(self.ordinal(), offset);
13663 match self {
13664 DictionaryRouterRouteResponse::Dictionary(ref mut val) => {
13665 fidl::encoding::encode_in_envelope::<
13666 DictionaryRef,
13667 fdomain_client::fidl::FDomainResourceDialect,
13668 >(
13669 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13670 encoder,
13671 offset + 8,
13672 _depth,
13673 )
13674 }
13675 DictionaryRouterRouteResponse::Unavailable(ref val) => {
13676 fidl::encoding::encode_in_envelope::<
13677 Unit,
13678 fdomain_client::fidl::FDomainResourceDialect,
13679 >(
13680 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13681 encoder,
13682 offset + 8,
13683 _depth,
13684 )
13685 }
13686 }
13687 }
13688 }
13689
13690 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13691 for DictionaryRouterRouteResponse
13692 {
13693 #[inline(always)]
13694 fn new_empty() -> Self {
13695 Self::Dictionary(fidl::new_empty!(
13696 DictionaryRef,
13697 fdomain_client::fidl::FDomainResourceDialect
13698 ))
13699 }
13700
13701 #[inline]
13702 unsafe fn decode(
13703 &mut self,
13704 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13705 offset: usize,
13706 mut depth: fidl::encoding::Depth,
13707 ) -> fidl::Result<()> {
13708 decoder.debug_check_bounds::<Self>(offset);
13709 #[allow(unused_variables)]
13710 let next_out_of_line = decoder.next_out_of_line();
13711 let handles_before = decoder.remaining_handles();
13712 let (ordinal, inlined, num_bytes, num_handles) =
13713 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13714
13715 let member_inline_size = match ordinal {
13716 1 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13717 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13718 _ => return Err(fidl::Error::UnknownUnionTag),
13719 };
13720
13721 if inlined != (member_inline_size <= 4) {
13722 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13723 }
13724 let _inner_offset;
13725 if inlined {
13726 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13727 _inner_offset = offset + 8;
13728 } else {
13729 depth.increment()?;
13730 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13731 }
13732 match ordinal {
13733 1 => {
13734 #[allow(irrefutable_let_patterns)]
13735 if let DictionaryRouterRouteResponse::Dictionary(_) = self {
13736 } else {
13738 *self = DictionaryRouterRouteResponse::Dictionary(fidl::new_empty!(
13740 DictionaryRef,
13741 fdomain_client::fidl::FDomainResourceDialect
13742 ));
13743 }
13744 #[allow(irrefutable_let_patterns)]
13745 if let DictionaryRouterRouteResponse::Dictionary(ref mut val) = self {
13746 fidl::decode!(
13747 DictionaryRef,
13748 fdomain_client::fidl::FDomainResourceDialect,
13749 val,
13750 decoder,
13751 _inner_offset,
13752 depth
13753 )?;
13754 } else {
13755 unreachable!()
13756 }
13757 }
13758 2 => {
13759 #[allow(irrefutable_let_patterns)]
13760 if let DictionaryRouterRouteResponse::Unavailable(_) = self {
13761 } else {
13763 *self = DictionaryRouterRouteResponse::Unavailable(fidl::new_empty!(
13765 Unit,
13766 fdomain_client::fidl::FDomainResourceDialect
13767 ));
13768 }
13769 #[allow(irrefutable_let_patterns)]
13770 if let DictionaryRouterRouteResponse::Unavailable(ref mut val) = self {
13771 fidl::decode!(
13772 Unit,
13773 fdomain_client::fidl::FDomainResourceDialect,
13774 val,
13775 decoder,
13776 _inner_offset,
13777 depth
13778 )?;
13779 } else {
13780 unreachable!()
13781 }
13782 }
13783 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13784 }
13785 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13786 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13787 }
13788 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13789 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13790 }
13791 Ok(())
13792 }
13793 }
13794
13795 impl fidl::encoding::ResourceTypeMarker for DirConnectorRouterRouteResponse {
13796 type Borrowed<'a> = &'a mut Self;
13797 fn take_or_borrow<'a>(
13798 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13799 ) -> Self::Borrowed<'a> {
13800 value
13801 }
13802 }
13803
13804 unsafe impl fidl::encoding::TypeMarker for DirConnectorRouterRouteResponse {
13805 type Owned = Self;
13806
13807 #[inline(always)]
13808 fn inline_align(_context: fidl::encoding::Context) -> usize {
13809 8
13810 }
13811
13812 #[inline(always)]
13813 fn inline_size(_context: fidl::encoding::Context) -> usize {
13814 16
13815 }
13816 }
13817
13818 unsafe impl
13819 fidl::encoding::Encode<
13820 DirConnectorRouterRouteResponse,
13821 fdomain_client::fidl::FDomainResourceDialect,
13822 > for &mut DirConnectorRouterRouteResponse
13823 {
13824 #[inline]
13825 unsafe fn encode(
13826 self,
13827 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13828 offset: usize,
13829 _depth: fidl::encoding::Depth,
13830 ) -> fidl::Result<()> {
13831 encoder.debug_check_bounds::<DirConnectorRouterRouteResponse>(offset);
13832 encoder.write_num::<u64>(self.ordinal(), offset);
13833 match self {
13834 DirConnectorRouterRouteResponse::DirConnector(ref mut val) => {
13835 fidl::encoding::encode_in_envelope::<
13836 DirConnector,
13837 fdomain_client::fidl::FDomainResourceDialect,
13838 >(
13839 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13840 encoder,
13841 offset + 8,
13842 _depth,
13843 )
13844 }
13845 DirConnectorRouterRouteResponse::Unavailable(ref val) => {
13846 fidl::encoding::encode_in_envelope::<
13847 Unit,
13848 fdomain_client::fidl::FDomainResourceDialect,
13849 >(
13850 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
13851 encoder,
13852 offset + 8,
13853 _depth,
13854 )
13855 }
13856 }
13857 }
13858 }
13859
13860 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
13861 for DirConnectorRouterRouteResponse
13862 {
13863 #[inline(always)]
13864 fn new_empty() -> Self {
13865 Self::DirConnector(fidl::new_empty!(
13866 DirConnector,
13867 fdomain_client::fidl::FDomainResourceDialect
13868 ))
13869 }
13870
13871 #[inline]
13872 unsafe fn decode(
13873 &mut self,
13874 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13875 offset: usize,
13876 mut depth: fidl::encoding::Depth,
13877 ) -> fidl::Result<()> {
13878 decoder.debug_check_bounds::<Self>(offset);
13879 #[allow(unused_variables)]
13880 let next_out_of_line = decoder.next_out_of_line();
13881 let handles_before = decoder.remaining_handles();
13882 let (ordinal, inlined, num_bytes, num_handles) =
13883 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13884
13885 let member_inline_size = match ordinal {
13886 1 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13887 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13888 _ => return Err(fidl::Error::UnknownUnionTag),
13889 };
13890
13891 if inlined != (member_inline_size <= 4) {
13892 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13893 }
13894 let _inner_offset;
13895 if inlined {
13896 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13897 _inner_offset = offset + 8;
13898 } else {
13899 depth.increment()?;
13900 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13901 }
13902 match ordinal {
13903 1 => {
13904 #[allow(irrefutable_let_patterns)]
13905 if let DirConnectorRouterRouteResponse::DirConnector(_) = self {
13906 } else {
13908 *self = DirConnectorRouterRouteResponse::DirConnector(fidl::new_empty!(
13910 DirConnector,
13911 fdomain_client::fidl::FDomainResourceDialect
13912 ));
13913 }
13914 #[allow(irrefutable_let_patterns)]
13915 if let DirConnectorRouterRouteResponse::DirConnector(ref mut val) = self {
13916 fidl::decode!(
13917 DirConnector,
13918 fdomain_client::fidl::FDomainResourceDialect,
13919 val,
13920 decoder,
13921 _inner_offset,
13922 depth
13923 )?;
13924 } else {
13925 unreachable!()
13926 }
13927 }
13928 2 => {
13929 #[allow(irrefutable_let_patterns)]
13930 if let DirConnectorRouterRouteResponse::Unavailable(_) = self {
13931 } else {
13933 *self = DirConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
13935 Unit,
13936 fdomain_client::fidl::FDomainResourceDialect
13937 ));
13938 }
13939 #[allow(irrefutable_let_patterns)]
13940 if let DirConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
13941 fidl::decode!(
13942 Unit,
13943 fdomain_client::fidl::FDomainResourceDialect,
13944 val,
13945 decoder,
13946 _inner_offset,
13947 depth
13948 )?;
13949 } else {
13950 unreachable!()
13951 }
13952 }
13953 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13954 }
13955 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13956 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13957 }
13958 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13959 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13960 }
13961 Ok(())
13962 }
13963 }
13964
13965 impl fidl::encoding::ResourceTypeMarker for DirEntryRouterRouteResponse {
13966 type Borrowed<'a> = &'a mut Self;
13967 fn take_or_borrow<'a>(
13968 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13969 ) -> Self::Borrowed<'a> {
13970 value
13971 }
13972 }
13973
13974 unsafe impl fidl::encoding::TypeMarker for DirEntryRouterRouteResponse {
13975 type Owned = Self;
13976
13977 #[inline(always)]
13978 fn inline_align(_context: fidl::encoding::Context) -> usize {
13979 8
13980 }
13981
13982 #[inline(always)]
13983 fn inline_size(_context: fidl::encoding::Context) -> usize {
13984 16
13985 }
13986 }
13987
13988 unsafe impl
13989 fidl::encoding::Encode<
13990 DirEntryRouterRouteResponse,
13991 fdomain_client::fidl::FDomainResourceDialect,
13992 > for &mut DirEntryRouterRouteResponse
13993 {
13994 #[inline]
13995 unsafe fn encode(
13996 self,
13997 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
13998 offset: usize,
13999 _depth: fidl::encoding::Depth,
14000 ) -> fidl::Result<()> {
14001 encoder.debug_check_bounds::<DirEntryRouterRouteResponse>(offset);
14002 encoder.write_num::<u64>(self.ordinal(), offset);
14003 match self {
14004 DirEntryRouterRouteResponse::DirEntry(ref mut val) => {
14005 fidl::encoding::encode_in_envelope::<
14006 DirEntry,
14007 fdomain_client::fidl::FDomainResourceDialect,
14008 >(
14009 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14010 encoder,
14011 offset + 8,
14012 _depth,
14013 )
14014 }
14015 DirEntryRouterRouteResponse::Unavailable(ref val) => {
14016 fidl::encoding::encode_in_envelope::<
14017 Unit,
14018 fdomain_client::fidl::FDomainResourceDialect,
14019 >(
14020 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
14021 encoder,
14022 offset + 8,
14023 _depth,
14024 )
14025 }
14026 }
14027 }
14028 }
14029
14030 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
14031 for DirEntryRouterRouteResponse
14032 {
14033 #[inline(always)]
14034 fn new_empty() -> Self {
14035 Self::DirEntry(fidl::new_empty!(DirEntry, fdomain_client::fidl::FDomainResourceDialect))
14036 }
14037
14038 #[inline]
14039 unsafe fn decode(
14040 &mut self,
14041 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14042 offset: usize,
14043 mut depth: fidl::encoding::Depth,
14044 ) -> fidl::Result<()> {
14045 decoder.debug_check_bounds::<Self>(offset);
14046 #[allow(unused_variables)]
14047 let next_out_of_line = decoder.next_out_of_line();
14048 let handles_before = decoder.remaining_handles();
14049 let (ordinal, inlined, num_bytes, num_handles) =
14050 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14051
14052 let member_inline_size = match ordinal {
14053 1 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14054 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14055 _ => return Err(fidl::Error::UnknownUnionTag),
14056 };
14057
14058 if inlined != (member_inline_size <= 4) {
14059 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14060 }
14061 let _inner_offset;
14062 if inlined {
14063 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14064 _inner_offset = offset + 8;
14065 } else {
14066 depth.increment()?;
14067 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14068 }
14069 match ordinal {
14070 1 => {
14071 #[allow(irrefutable_let_patterns)]
14072 if let DirEntryRouterRouteResponse::DirEntry(_) = self {
14073 } else {
14075 *self = DirEntryRouterRouteResponse::DirEntry(fidl::new_empty!(
14077 DirEntry,
14078 fdomain_client::fidl::FDomainResourceDialect
14079 ));
14080 }
14081 #[allow(irrefutable_let_patterns)]
14082 if let DirEntryRouterRouteResponse::DirEntry(ref mut val) = self {
14083 fidl::decode!(
14084 DirEntry,
14085 fdomain_client::fidl::FDomainResourceDialect,
14086 val,
14087 decoder,
14088 _inner_offset,
14089 depth
14090 )?;
14091 } else {
14092 unreachable!()
14093 }
14094 }
14095 2 => {
14096 #[allow(irrefutable_let_patterns)]
14097 if let DirEntryRouterRouteResponse::Unavailable(_) = self {
14098 } else {
14100 *self = DirEntryRouterRouteResponse::Unavailable(fidl::new_empty!(
14102 Unit,
14103 fdomain_client::fidl::FDomainResourceDialect
14104 ));
14105 }
14106 #[allow(irrefutable_let_patterns)]
14107 if let DirEntryRouterRouteResponse::Unavailable(ref mut val) = self {
14108 fidl::decode!(
14109 Unit,
14110 fdomain_client::fidl::FDomainResourceDialect,
14111 val,
14112 decoder,
14113 _inner_offset,
14114 depth
14115 )?;
14116 } else {
14117 unreachable!()
14118 }
14119 }
14120 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14121 }
14122 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14123 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14124 }
14125 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14126 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14127 }
14128 Ok(())
14129 }
14130 }
14131
14132 impl fidl::encoding::ResourceTypeMarker for DirectoryRouterRouteResponse {
14133 type Borrowed<'a> = &'a mut Self;
14134 fn take_or_borrow<'a>(
14135 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14136 ) -> Self::Borrowed<'a> {
14137 value
14138 }
14139 }
14140
14141 unsafe impl fidl::encoding::TypeMarker for DirectoryRouterRouteResponse {
14142 type Owned = Self;
14143
14144 #[inline(always)]
14145 fn inline_align(_context: fidl::encoding::Context) -> usize {
14146 8
14147 }
14148
14149 #[inline(always)]
14150 fn inline_size(_context: fidl::encoding::Context) -> usize {
14151 16
14152 }
14153 }
14154
14155 unsafe impl
14156 fidl::encoding::Encode<
14157 DirectoryRouterRouteResponse,
14158 fdomain_client::fidl::FDomainResourceDialect,
14159 > for &mut DirectoryRouterRouteResponse
14160 {
14161 #[inline]
14162 unsafe fn encode(
14163 self,
14164 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14165 offset: usize,
14166 _depth: fidl::encoding::Depth,
14167 ) -> fidl::Result<()> {
14168 encoder.debug_check_bounds::<DirectoryRouterRouteResponse>(offset);
14169 encoder.write_num::<u64>(self.ordinal(), offset);
14170 match self {
14171 DirectoryRouterRouteResponse::Directory(ref mut val) => {
14172 fidl::encoding::encode_in_envelope::<
14173 fidl::encoding::Endpoint<
14174 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14175 >,
14176 fdomain_client::fidl::FDomainResourceDialect,
14177 >(
14178 <fidl::encoding::Endpoint<
14179 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14180 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14181 val
14182 ),
14183 encoder,
14184 offset + 8,
14185 _depth,
14186 )
14187 }
14188 DirectoryRouterRouteResponse::Unavailable(ref val) => {
14189 fidl::encoding::encode_in_envelope::<
14190 Unit,
14191 fdomain_client::fidl::FDomainResourceDialect,
14192 >(
14193 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
14194 encoder,
14195 offset + 8,
14196 _depth,
14197 )
14198 }
14199 }
14200 }
14201 }
14202
14203 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
14204 for DirectoryRouterRouteResponse
14205 {
14206 #[inline(always)]
14207 fn new_empty() -> Self {
14208 Self::Directory(fidl::new_empty!(
14209 fidl::encoding::Endpoint<
14210 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14211 >,
14212 fdomain_client::fidl::FDomainResourceDialect
14213 ))
14214 }
14215
14216 #[inline]
14217 unsafe fn decode(
14218 &mut self,
14219 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
14220 offset: usize,
14221 mut depth: fidl::encoding::Depth,
14222 ) -> fidl::Result<()> {
14223 decoder.debug_check_bounds::<Self>(offset);
14224 #[allow(unused_variables)]
14225 let next_out_of_line = decoder.next_out_of_line();
14226 let handles_before = decoder.remaining_handles();
14227 let (ordinal, inlined, num_bytes, num_handles) =
14228 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14229
14230 let member_inline_size = match ordinal {
14231 1 => <fidl::encoding::Endpoint<
14232 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
14233 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14234 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14235 _ => return Err(fidl::Error::UnknownUnionTag),
14236 };
14237
14238 if inlined != (member_inline_size <= 4) {
14239 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14240 }
14241 let _inner_offset;
14242 if inlined {
14243 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14244 _inner_offset = offset + 8;
14245 } else {
14246 depth.increment()?;
14247 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14248 }
14249 match ordinal {
14250 1 => {
14251 #[allow(irrefutable_let_patterns)]
14252 if let DirectoryRouterRouteResponse::Directory(_) = self {
14253 } else {
14255 *self = DirectoryRouterRouteResponse::Directory(fidl::new_empty!(
14257 fidl::encoding::Endpoint<
14258 fdomain_client::fidl::ClientEnd<
14259 fdomain_fuchsia_io::DirectoryMarker,
14260 >,
14261 >,
14262 fdomain_client::fidl::FDomainResourceDialect
14263 ));
14264 }
14265 #[allow(irrefutable_let_patterns)]
14266 if let DirectoryRouterRouteResponse::Directory(ref mut val) = self {
14267 fidl::decode!(
14268 fidl::encoding::Endpoint<
14269 fdomain_client::fidl::ClientEnd<
14270 fdomain_fuchsia_io::DirectoryMarker,
14271 >,
14272 >,
14273 fdomain_client::fidl::FDomainResourceDialect,
14274 val,
14275 decoder,
14276 _inner_offset,
14277 depth
14278 )?;
14279 } else {
14280 unreachable!()
14281 }
14282 }
14283 2 => {
14284 #[allow(irrefutable_let_patterns)]
14285 if let DirectoryRouterRouteResponse::Unavailable(_) = self {
14286 } else {
14288 *self = DirectoryRouterRouteResponse::Unavailable(fidl::new_empty!(
14290 Unit,
14291 fdomain_client::fidl::FDomainResourceDialect
14292 ));
14293 }
14294 #[allow(irrefutable_let_patterns)]
14295 if let DirectoryRouterRouteResponse::Unavailable(ref mut val) = self {
14296 fidl::decode!(
14297 Unit,
14298 fdomain_client::fidl::FDomainResourceDialect,
14299 val,
14300 decoder,
14301 _inner_offset,
14302 depth
14303 )?;
14304 } else {
14305 unreachable!()
14306 }
14307 }
14308 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14309 }
14310 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14311 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14312 }
14313 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14314 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14315 }
14316 Ok(())
14317 }
14318 }
14319}