1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_component_sandbox__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14pub type Token = fidl::EventPair;
17
18#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct CapabilityStoreConnectorCreateRequest {
20 pub id: u64,
21 pub receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
22}
23
24impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
25 for CapabilityStoreConnectorCreateRequest
26{
27}
28
29#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30pub struct CapabilityStoreConnectorOpenRequest {
31 pub id: u64,
32 pub server_end: fidl::Channel,
33}
34
35impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
36 for CapabilityStoreConnectorOpenRequest
37{
38}
39
40#[derive(Debug, PartialEq)]
41pub struct CapabilityStoreCreateServiceAggregateRequest {
42 pub sources: Vec<AggregateSource>,
43}
44
45impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
46 for CapabilityStoreCreateServiceAggregateRequest
47{
48}
49
50#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
51pub struct CapabilityStoreDictionaryDrainRequest {
52 pub id: u64,
53 pub iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
54}
55
56impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
57 for CapabilityStoreDictionaryDrainRequest
58{
59}
60
61#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
62pub struct CapabilityStoreDictionaryEnumerateRequest {
63 pub id: u64,
64 pub iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
65}
66
67impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
68 for CapabilityStoreDictionaryEnumerateRequest
69{
70}
71
72#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
73pub struct CapabilityStoreDictionaryKeysRequest {
74 pub id: u64,
75 pub iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
76}
77
78impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
79 for CapabilityStoreDictionaryKeysRequest
80{
81}
82
83#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
84pub struct CapabilityStoreDictionaryLegacyExportRequest {
85 pub id: u64,
86 pub server_end: fidl::Channel,
87}
88
89impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
90 for CapabilityStoreDictionaryLegacyExportRequest
91{
92}
93
94#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
95pub struct CapabilityStoreDictionaryLegacyImportRequest {
96 pub id: u64,
97 pub client_end: fidl::Channel,
98}
99
100impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
101 for CapabilityStoreDictionaryLegacyImportRequest
102{
103}
104
105#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
106pub struct CapabilityStoreDirConnectorCreateRequest {
107 pub id: u64,
108 pub receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
112 for CapabilityStoreDirConnectorCreateRequest
113{
114}
115
116#[derive(Debug, PartialEq)]
117pub struct CapabilityStoreImportRequest {
118 pub id: u64,
119 pub capability: Capability,
120}
121
122impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
123 for CapabilityStoreImportRequest
124{
125}
126
127#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
128pub struct CapabilityStoreCreateServiceAggregateResponse {
129 pub aggregate_dir_connector: DirConnector,
130}
131
132impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
133 for CapabilityStoreCreateServiceAggregateResponse
134{
135}
136
137#[derive(Debug, PartialEq)]
138pub struct CapabilityStoreExportResponse {
139 pub capability: Capability,
140}
141
142impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
143 for CapabilityStoreExportResponse
144{
145}
146
147#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
148pub struct Connector {
149 pub token: fidl::EventPair,
150}
151
152impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Connector {}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct DictionaryDrainIteratorGetNextResponse {
156 pub items: Vec<DictionaryItem>,
157 pub end_id: u64,
158}
159
160impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
161 for DictionaryDrainIteratorGetNextResponse
162{
163}
164
165#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
166pub struct DictionaryEnumerateIteratorGetNextResponse {
167 pub items: Vec<DictionaryOptionalItem>,
168 pub end_id: u64,
169}
170
171impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
172 for DictionaryEnumerateIteratorGetNextResponse
173{
174}
175
176#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
177pub struct DictionaryKeysIteratorGetNextResponse {
178 pub keys: Vec<String>,
179}
180
181impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
182 for DictionaryKeysIteratorGetNextResponse
183{
184}
185
186#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
190pub struct DictionaryOptionalItem {
191 pub key: String,
192 pub value: Option<Box<WrappedCapabilityId>>,
193}
194
195impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DictionaryOptionalItem {}
196
197#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
198pub struct DictionaryRef {
199 pub token: fidl::EventPair,
200}
201
202impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DictionaryRef {}
203
204#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
205pub struct DirConnector {
206 pub token: fidl::EventPair,
207}
208
209impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirConnector {}
210
211#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
212pub struct DirEntry {
213 pub token: fidl::EventPair,
214}
215
216impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirEntry {}
217
218#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
221pub struct InstanceToken {
222 pub token: fidl::EventPair,
223}
224
225impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for InstanceToken {}
226
227#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
229pub struct ProtocolPayload {
230 pub channel: fidl::Channel,
231}
232
233impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ProtocolPayload {}
234
235#[derive(Debug, Default, PartialEq)]
236pub struct AggregateSource {
237 pub dir_connector: Option<DirConnector>,
238 pub source_instance_filter: Option<Vec<String>>,
243 pub renamed_instances: Option<Vec<fidl_fuchsia_component_decl::NameMapping>>,
255 #[doc(hidden)]
256 pub __source_breaking: fidl::marker::SourceBreaking,
257}
258
259impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for AggregateSource {}
260
261#[derive(Debug, Default, PartialEq)]
262pub struct CapabilityStoreDirConnectorOpenRequest {
263 pub id: Option<u64>,
264 pub server_end: Option<fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>>,
265 pub flags: Option<fidl_fuchsia_io::Flags>,
266 pub path: Option<String>,
267 #[doc(hidden)]
268 pub __source_breaking: fidl::marker::SourceBreaking,
269}
270
271impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
272 for CapabilityStoreDirConnectorOpenRequest
273{
274}
275
276#[derive(Debug, Default, PartialEq)]
277pub struct DirReceiverReceiveRequest {
278 pub channel: Option<fidl::Channel>,
279 pub flags: Option<fidl_fuchsia_io::Flags>,
280 pub subdir: Option<String>,
281 #[doc(hidden)]
282 pub __source_breaking: fidl::marker::SourceBreaking,
283}
284
285impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirReceiverReceiveRequest {}
286
287#[derive(Debug, Default, PartialEq)]
289pub struct RouteRequest {
290 pub requesting: Option<InstanceToken>,
293 pub metadata: Option<DictionaryRef>,
296 #[doc(hidden)]
297 pub __source_breaking: fidl::marker::SourceBreaking,
298}
299
300impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RouteRequest {}
301
302#[derive(Debug)]
303pub enum Capability {
304 Unit(Unit),
305 Handle(fidl::NullableHandle),
306 Data(Data),
307 Dictionary(DictionaryRef),
308 Connector(Connector),
309 DirConnector(DirConnector),
310 Directory(fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>),
311 DirEntry(DirEntry),
312 ConnectorRouter(fidl::endpoints::ClientEnd<ConnectorRouterMarker>),
313 DictionaryRouter(fidl::endpoints::ClientEnd<DictionaryRouterMarker>),
314 DirEntryRouter(fidl::endpoints::ClientEnd<DirEntryRouterMarker>),
315 DataRouter(fidl::endpoints::ClientEnd<DataRouterMarker>),
316 DirConnectorRouter(fidl::endpoints::ClientEnd<DirConnectorRouterMarker>),
317 #[doc(hidden)]
318 __SourceBreaking {
319 unknown_ordinal: u64,
320 },
321}
322
323#[macro_export]
325macro_rules! CapabilityUnknown {
326 () => {
327 _
328 };
329}
330
331impl PartialEq for Capability {
333 fn eq(&self, other: &Self) -> bool {
334 match (self, other) {
335 (Self::Unit(x), Self::Unit(y)) => *x == *y,
336 (Self::Handle(x), Self::Handle(y)) => *x == *y,
337 (Self::Data(x), Self::Data(y)) => *x == *y,
338 (Self::Dictionary(x), Self::Dictionary(y)) => *x == *y,
339 (Self::Connector(x), Self::Connector(y)) => *x == *y,
340 (Self::DirConnector(x), Self::DirConnector(y)) => *x == *y,
341 (Self::Directory(x), Self::Directory(y)) => *x == *y,
342 (Self::DirEntry(x), Self::DirEntry(y)) => *x == *y,
343 (Self::ConnectorRouter(x), Self::ConnectorRouter(y)) => *x == *y,
344 (Self::DictionaryRouter(x), Self::DictionaryRouter(y)) => *x == *y,
345 (Self::DirEntryRouter(x), Self::DirEntryRouter(y)) => *x == *y,
346 (Self::DataRouter(x), Self::DataRouter(y)) => *x == *y,
347 (Self::DirConnectorRouter(x), Self::DirConnectorRouter(y)) => *x == *y,
348 _ => false,
349 }
350 }
351}
352
353impl Capability {
354 #[inline]
355 pub fn ordinal(&self) -> u64 {
356 match *self {
357 Self::Unit(_) => 1,
358 Self::Handle(_) => 2,
359 Self::Data(_) => 3,
360 Self::Dictionary(_) => 4,
361 Self::Connector(_) => 5,
362 Self::DirConnector(_) => 6,
363 Self::Directory(_) => 7,
364 Self::DirEntry(_) => 8,
365 Self::ConnectorRouter(_) => 9,
366 Self::DictionaryRouter(_) => 10,
367 Self::DirEntryRouter(_) => 11,
368 Self::DataRouter(_) => 12,
369 Self::DirConnectorRouter(_) => 13,
370 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
371 }
372 }
373
374 #[inline]
375 pub fn unknown_variant_for_testing() -> Self {
376 Self::__SourceBreaking { unknown_ordinal: 0 }
377 }
378
379 #[inline]
380 pub fn is_unknown(&self) -> bool {
381 match self {
382 Self::__SourceBreaking { .. } => true,
383 _ => false,
384 }
385 }
386}
387
388impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Capability {}
389
390#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
391pub enum ConnectorRouterRouteResponse {
392 Connector(Connector),
393 Unavailable(Unit),
394}
395
396impl ConnectorRouterRouteResponse {
397 #[inline]
398 pub fn ordinal(&self) -> u64 {
399 match *self {
400 Self::Connector(_) => 1,
401 Self::Unavailable(_) => 2,
402 }
403 }
404}
405
406impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
407 for ConnectorRouterRouteResponse
408{
409}
410
411#[derive(Debug, PartialEq)]
412pub enum DataRouterRouteResponse {
413 Data(Data),
414 Unavailable(Unit),
415}
416
417impl DataRouterRouteResponse {
418 #[inline]
419 pub fn ordinal(&self) -> u64 {
420 match *self {
421 Self::Data(_) => 1,
422 Self::Unavailable(_) => 2,
423 }
424 }
425}
426
427impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DataRouterRouteResponse {}
428
429#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
430pub enum DictionaryRouterRouteResponse {
431 Dictionary(DictionaryRef),
432 Unavailable(Unit),
433}
434
435impl DictionaryRouterRouteResponse {
436 #[inline]
437 pub fn ordinal(&self) -> u64 {
438 match *self {
439 Self::Dictionary(_) => 1,
440 Self::Unavailable(_) => 2,
441 }
442 }
443}
444
445impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
446 for DictionaryRouterRouteResponse
447{
448}
449
450#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
451pub enum DirConnectorRouterRouteResponse {
452 DirConnector(DirConnector),
453 Unavailable(Unit),
454}
455
456impl DirConnectorRouterRouteResponse {
457 #[inline]
458 pub fn ordinal(&self) -> u64 {
459 match *self {
460 Self::DirConnector(_) => 1,
461 Self::Unavailable(_) => 2,
462 }
463 }
464}
465
466impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
467 for DirConnectorRouterRouteResponse
468{
469}
470
471#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
472pub enum DirEntryRouterRouteResponse {
473 DirEntry(DirEntry),
474 Unavailable(Unit),
475}
476
477impl DirEntryRouterRouteResponse {
478 #[inline]
479 pub fn ordinal(&self) -> u64 {
480 match *self {
481 Self::DirEntry(_) => 1,
482 Self::Unavailable(_) => 2,
483 }
484 }
485}
486
487impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
488 for DirEntryRouterRouteResponse
489{
490}
491
492#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
493pub enum DirectoryRouterRouteResponse {
494 Directory(fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>),
495 Unavailable(Unit),
496}
497
498impl DirectoryRouterRouteResponse {
499 #[inline]
500 pub fn ordinal(&self) -> u64 {
501 match *self {
502 Self::Directory(_) => 1,
503 Self::Unavailable(_) => 2,
504 }
505 }
506}
507
508impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
509 for DirectoryRouterRouteResponse
510{
511}
512
513#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
514pub struct CapabilityStoreMarker;
515
516impl fidl::endpoints::ProtocolMarker for CapabilityStoreMarker {
517 type Proxy = CapabilityStoreProxy;
518 type RequestStream = CapabilityStoreRequestStream;
519 #[cfg(target_os = "fuchsia")]
520 type SynchronousProxy = CapabilityStoreSynchronousProxy;
521
522 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
523}
524impl fidl::endpoints::DiscoverableProtocolMarker for CapabilityStoreMarker {}
525pub type CapabilityStoreDuplicateResult = Result<(), CapabilityStoreError>;
526pub type CapabilityStoreDropResult = Result<(), CapabilityStoreError>;
527pub type CapabilityStoreExportResult = Result<Capability, CapabilityStoreError>;
528pub type CapabilityStoreImportResult = Result<(), CapabilityStoreError>;
529pub type CapabilityStoreConnectorCreateResult = Result<(), CapabilityStoreError>;
530pub type CapabilityStoreConnectorOpenResult = Result<(), CapabilityStoreError>;
531pub type CapabilityStoreDirConnectorCreateResult = Result<(), CapabilityStoreError>;
532pub type CapabilityStoreDirConnectorOpenResult = Result<(), CapabilityStoreError>;
533pub type CapabilityStoreDictionaryCreateResult = Result<(), CapabilityStoreError>;
534pub type CapabilityStoreDictionaryLegacyImportResult = Result<(), CapabilityStoreError>;
535pub type CapabilityStoreDictionaryLegacyExportResult = Result<(), CapabilityStoreError>;
536pub type CapabilityStoreDictionaryInsertResult = Result<(), CapabilityStoreError>;
537pub type CapabilityStoreDictionaryGetResult = Result<(), CapabilityStoreError>;
538pub type CapabilityStoreDictionaryRemoveResult = Result<(), CapabilityStoreError>;
539pub type CapabilityStoreDictionaryCopyResult = Result<(), CapabilityStoreError>;
540pub type CapabilityStoreDictionaryKeysResult = Result<(), CapabilityStoreError>;
541pub type CapabilityStoreDictionaryEnumerateResult = Result<(), CapabilityStoreError>;
542pub type CapabilityStoreDictionaryDrainResult = Result<(), CapabilityStoreError>;
543pub type CapabilityStoreCreateServiceAggregateResult = Result<DirConnector, CapabilityStoreError>;
544
545pub trait CapabilityStoreProxyInterface: Send + Sync {
546 type DuplicateResponseFut: std::future::Future<Output = Result<CapabilityStoreDuplicateResult, fidl::Error>>
547 + Send;
548 fn r#duplicate(&self, id: u64, dest_id: u64) -> Self::DuplicateResponseFut;
549 type DropResponseFut: std::future::Future<Output = Result<CapabilityStoreDropResult, fidl::Error>>
550 + Send;
551 fn r#drop(&self, id: u64) -> Self::DropResponseFut;
552 type ExportResponseFut: std::future::Future<Output = Result<CapabilityStoreExportResult, fidl::Error>>
553 + Send;
554 fn r#export(&self, id: u64) -> Self::ExportResponseFut;
555 type ImportResponseFut: std::future::Future<Output = Result<CapabilityStoreImportResult, fidl::Error>>
556 + Send;
557 fn r#import(&self, id: u64, capability: Capability) -> Self::ImportResponseFut;
558 type ConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorCreateResult, fidl::Error>>
559 + Send;
560 fn r#connector_create(
561 &self,
562 id: u64,
563 receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
564 ) -> Self::ConnectorCreateResponseFut;
565 type ConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreConnectorOpenResult, fidl::Error>>
566 + Send;
567 fn r#connector_open(
568 &self,
569 id: u64,
570 server_end: fidl::Channel,
571 ) -> Self::ConnectorOpenResponseFut;
572 type DirConnectorCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorCreateResult, fidl::Error>>
573 + Send;
574 fn r#dir_connector_create(
575 &self,
576 id: u64,
577 receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
578 ) -> Self::DirConnectorCreateResponseFut;
579 type DirConnectorOpenResponseFut: std::future::Future<Output = Result<CapabilityStoreDirConnectorOpenResult, fidl::Error>>
580 + Send;
581 fn r#dir_connector_open(
582 &self,
583 payload: CapabilityStoreDirConnectorOpenRequest,
584 ) -> Self::DirConnectorOpenResponseFut;
585 type DictionaryCreateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCreateResult, fidl::Error>>
586 + Send;
587 fn r#dictionary_create(&self, id: u64) -> Self::DictionaryCreateResponseFut;
588 type DictionaryLegacyImportResponseFut: std::future::Future<
589 Output = Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error>,
590 > + Send;
591 fn r#dictionary_legacy_import(
592 &self,
593 id: u64,
594 client_end: fidl::Channel,
595 ) -> Self::DictionaryLegacyImportResponseFut;
596 type DictionaryLegacyExportResponseFut: std::future::Future<
597 Output = Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error>,
598 > + Send;
599 fn r#dictionary_legacy_export(
600 &self,
601 id: u64,
602 server_end: fidl::Channel,
603 ) -> Self::DictionaryLegacyExportResponseFut;
604 type DictionaryInsertResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryInsertResult, fidl::Error>>
605 + Send;
606 fn r#dictionary_insert(
607 &self,
608 id: u64,
609 item: &DictionaryItem,
610 ) -> Self::DictionaryInsertResponseFut;
611 type DictionaryGetResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryGetResult, fidl::Error>>
612 + Send;
613 fn r#dictionary_get(&self, id: u64, key: &str, dest_id: u64) -> Self::DictionaryGetResponseFut;
614 type DictionaryRemoveResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryRemoveResult, fidl::Error>>
615 + Send;
616 fn r#dictionary_remove(
617 &self,
618 id: u64,
619 key: &str,
620 dest_id: Option<&WrappedCapabilityId>,
621 ) -> Self::DictionaryRemoveResponseFut;
622 type DictionaryCopyResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryCopyResult, fidl::Error>>
623 + Send;
624 fn r#dictionary_copy(&self, id: u64, dest_id: u64) -> Self::DictionaryCopyResponseFut;
625 type DictionaryKeysResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryKeysResult, fidl::Error>>
626 + Send;
627 fn r#dictionary_keys(
628 &self,
629 id: u64,
630 iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
631 ) -> Self::DictionaryKeysResponseFut;
632 type DictionaryEnumerateResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error>>
633 + Send;
634 fn r#dictionary_enumerate(
635 &self,
636 id: u64,
637 iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
638 ) -> Self::DictionaryEnumerateResponseFut;
639 type DictionaryDrainResponseFut: std::future::Future<Output = Result<CapabilityStoreDictionaryDrainResult, fidl::Error>>
640 + Send;
641 fn r#dictionary_drain(
642 &self,
643 id: u64,
644 iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
645 ) -> Self::DictionaryDrainResponseFut;
646 type CreateServiceAggregateResponseFut: std::future::Future<
647 Output = Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error>,
648 > + Send;
649 fn r#create_service_aggregate(
650 &self,
651 sources: Vec<AggregateSource>,
652 ) -> Self::CreateServiceAggregateResponseFut;
653}
654#[derive(Debug)]
655#[cfg(target_os = "fuchsia")]
656pub struct CapabilityStoreSynchronousProxy {
657 client: fidl::client::sync::Client,
658}
659
660#[cfg(target_os = "fuchsia")]
661impl fidl::endpoints::SynchronousProxy for CapabilityStoreSynchronousProxy {
662 type Proxy = CapabilityStoreProxy;
663 type Protocol = CapabilityStoreMarker;
664
665 fn from_channel(inner: fidl::Channel) -> Self {
666 Self::new(inner)
667 }
668
669 fn into_channel(self) -> fidl::Channel {
670 self.client.into_channel()
671 }
672
673 fn as_channel(&self) -> &fidl::Channel {
674 self.client.as_channel()
675 }
676}
677
678#[cfg(target_os = "fuchsia")]
679impl CapabilityStoreSynchronousProxy {
680 pub fn new(channel: fidl::Channel) -> Self {
681 Self { client: fidl::client::sync::Client::new(channel) }
682 }
683
684 pub fn into_channel(self) -> fidl::Channel {
685 self.client.into_channel()
686 }
687
688 pub fn wait_for_event(
691 &self,
692 deadline: zx::MonotonicInstant,
693 ) -> Result<CapabilityStoreEvent, fidl::Error> {
694 CapabilityStoreEvent::decode(self.client.wait_for_event::<CapabilityStoreMarker>(deadline)?)
695 }
696
697 pub fn r#duplicate(
705 &self,
706 mut id: u64,
707 mut dest_id: u64,
708 ___deadline: zx::MonotonicInstant,
709 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
710 let _response =
711 self.client
712 .send_query::<CapabilityStoreDuplicateRequest, fidl::encoding::FlexibleResultType<
713 fidl::encoding::EmptyStruct,
714 CapabilityStoreError,
715 >, CapabilityStoreMarker>(
716 (id, dest_id),
717 0x5d5d35d9c20a2184,
718 fidl::encoding::DynamicFlags::FLEXIBLE,
719 ___deadline,
720 )?
721 .into_result::<CapabilityStoreMarker>("duplicate")?;
722 Ok(_response.map(|x| x))
723 }
724
725 pub fn r#drop(
731 &self,
732 mut id: u64,
733 ___deadline: zx::MonotonicInstant,
734 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
735 let _response =
736 self.client
737 .send_query::<CapabilityStoreDropRequest, fidl::encoding::FlexibleResultType<
738 fidl::encoding::EmptyStruct,
739 CapabilityStoreError,
740 >, CapabilityStoreMarker>(
741 (id,),
742 0xa745c0990fc2559,
743 fidl::encoding::DynamicFlags::FLEXIBLE,
744 ___deadline,
745 )?
746 .into_result::<CapabilityStoreMarker>("drop")?;
747 Ok(_response.map(|x| x))
748 }
749
750 pub fn r#export(
758 &self,
759 mut id: u64,
760 ___deadline: zx::MonotonicInstant,
761 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
762 let _response =
763 self.client
764 .send_query::<CapabilityStoreExportRequest, fidl::encoding::FlexibleResultType<
765 CapabilityStoreExportResponse,
766 CapabilityStoreError,
767 >, CapabilityStoreMarker>(
768 (id,),
769 0x3237a8f4748faff,
770 fidl::encoding::DynamicFlags::FLEXIBLE,
771 ___deadline,
772 )?
773 .into_result::<CapabilityStoreMarker>("export")?;
774 Ok(_response.map(|x| x.capability))
775 }
776
777 pub fn r#import(
784 &self,
785 mut id: u64,
786 mut capability: Capability,
787 ___deadline: zx::MonotonicInstant,
788 ) -> Result<CapabilityStoreImportResult, fidl::Error> {
789 let _response =
790 self.client
791 .send_query::<CapabilityStoreImportRequest, fidl::encoding::FlexibleResultType<
792 fidl::encoding::EmptyStruct,
793 CapabilityStoreError,
794 >, CapabilityStoreMarker>(
795 (id, &mut capability),
796 0x1f96157a29f4539b,
797 fidl::encoding::DynamicFlags::FLEXIBLE,
798 ___deadline,
799 )?
800 .into_result::<CapabilityStoreMarker>("import")?;
801 Ok(_response.map(|x| x))
802 }
803
804 pub fn r#connector_create(
811 &self,
812 mut id: u64,
813 mut receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
814 ___deadline: zx::MonotonicInstant,
815 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
816 let _response = self.client.send_query::<
817 CapabilityStoreConnectorCreateRequest,
818 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
819 CapabilityStoreMarker,
820 >(
821 (id, receiver,),
822 0x29592c5d63e91c25,
823 fidl::encoding::DynamicFlags::FLEXIBLE,
824 ___deadline,
825 )?
826 .into_result::<CapabilityStoreMarker>("connector_create")?;
827 Ok(_response.map(|x| x))
828 }
829
830 pub fn r#connector_open(
840 &self,
841 mut id: u64,
842 mut server_end: fidl::Channel,
843 ___deadline: zx::MonotonicInstant,
844 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
845 let _response = self.client.send_query::<
846 CapabilityStoreConnectorOpenRequest,
847 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
848 CapabilityStoreMarker,
849 >(
850 (id, server_end,),
851 0x537e69ab40563b9f,
852 fidl::encoding::DynamicFlags::FLEXIBLE,
853 ___deadline,
854 )?
855 .into_result::<CapabilityStoreMarker>("connector_open")?;
856 Ok(_response.map(|x| x))
857 }
858
859 pub fn r#dir_connector_create(
866 &self,
867 mut id: u64,
868 mut receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
869 ___deadline: zx::MonotonicInstant,
870 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
871 let _response = self.client.send_query::<
872 CapabilityStoreDirConnectorCreateRequest,
873 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
874 CapabilityStoreMarker,
875 >(
876 (id, receiver,),
877 0x186138a11ccf19bb,
878 fidl::encoding::DynamicFlags::FLEXIBLE,
879 ___deadline,
880 )?
881 .into_result::<CapabilityStoreMarker>("dir_connector_create")?;
882 Ok(_response.map(|x| x))
883 }
884
885 pub fn r#dir_connector_open(
899 &self,
900 mut payload: CapabilityStoreDirConnectorOpenRequest,
901 ___deadline: zx::MonotonicInstant,
902 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
903 let _response = self.client.send_query::<
904 CapabilityStoreDirConnectorOpenRequest,
905 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
906 CapabilityStoreMarker,
907 >(
908 &mut payload,
909 0x5650d3d6a3a13901,
910 fidl::encoding::DynamicFlags::FLEXIBLE,
911 ___deadline,
912 )?
913 .into_result::<CapabilityStoreMarker>("dir_connector_open")?;
914 Ok(_response.map(|x| x))
915 }
916
917 pub fn r#dictionary_create(
923 &self,
924 mut id: u64,
925 ___deadline: zx::MonotonicInstant,
926 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
927 let _response = self.client.send_query::<
928 CapabilityStoreDictionaryCreateRequest,
929 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
930 CapabilityStoreMarker,
931 >(
932 (id,),
933 0x6997c8dfc63de093,
934 fidl::encoding::DynamicFlags::FLEXIBLE,
935 ___deadline,
936 )?
937 .into_result::<CapabilityStoreMarker>("dictionary_create")?;
938 Ok(_response.map(|x| x))
939 }
940
941 pub fn r#dictionary_legacy_import(
951 &self,
952 mut id: u64,
953 mut client_end: fidl::Channel,
954 ___deadline: zx::MonotonicInstant,
955 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
956 let _response = self.client.send_query::<
957 CapabilityStoreDictionaryLegacyImportRequest,
958 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
959 CapabilityStoreMarker,
960 >(
961 (id, client_end,),
962 0x72fd686c37b6025f,
963 fidl::encoding::DynamicFlags::FLEXIBLE,
964 ___deadline,
965 )?
966 .into_result::<CapabilityStoreMarker>("dictionary_legacy_import")?;
967 Ok(_response.map(|x| x))
968 }
969
970 pub fn r#dictionary_legacy_export(
980 &self,
981 mut id: u64,
982 mut server_end: fidl::Channel,
983 ___deadline: zx::MonotonicInstant,
984 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
985 let _response = self.client.send_query::<
986 CapabilityStoreDictionaryLegacyExportRequest,
987 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
988 CapabilityStoreMarker,
989 >(
990 (id, server_end,),
991 0x407e15cc4bde5dcd,
992 fidl::encoding::DynamicFlags::FLEXIBLE,
993 ___deadline,
994 )?
995 .into_result::<CapabilityStoreMarker>("dictionary_legacy_export")?;
996 Ok(_response.map(|x| x))
997 }
998
999 pub fn r#dictionary_insert(
1009 &self,
1010 mut id: u64,
1011 mut item: &DictionaryItem,
1012 ___deadline: zx::MonotonicInstant,
1013 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
1014 let _response = self.client.send_query::<
1015 CapabilityStoreDictionaryInsertRequest,
1016 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1017 CapabilityStoreMarker,
1018 >(
1019 (id, item,),
1020 0x7702183689d44c27,
1021 fidl::encoding::DynamicFlags::FLEXIBLE,
1022 ___deadline,
1023 )?
1024 .into_result::<CapabilityStoreMarker>("dictionary_insert")?;
1025 Ok(_response.map(|x| x))
1026 }
1027
1028 pub fn r#dictionary_get(
1040 &self,
1041 mut id: u64,
1042 mut key: &str,
1043 mut dest_id: u64,
1044 ___deadline: zx::MonotonicInstant,
1045 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
1046 let _response = self.client.send_query::<
1047 CapabilityStoreDictionaryGetRequest,
1048 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1049 CapabilityStoreMarker,
1050 >(
1051 (id, key, dest_id,),
1052 0x4d9e27538284add2,
1053 fidl::encoding::DynamicFlags::FLEXIBLE,
1054 ___deadline,
1055 )?
1056 .into_result::<CapabilityStoreMarker>("dictionary_get")?;
1057 Ok(_response.map(|x| x))
1058 }
1059
1060 pub fn r#dictionary_remove(
1071 &self,
1072 mut id: u64,
1073 mut key: &str,
1074 mut dest_id: Option<&WrappedCapabilityId>,
1075 ___deadline: zx::MonotonicInstant,
1076 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
1077 let _response = self.client.send_query::<
1078 CapabilityStoreDictionaryRemoveRequest,
1079 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1080 CapabilityStoreMarker,
1081 >(
1082 (id, key, dest_id,),
1083 0x4c5c025ab05d4f3,
1084 fidl::encoding::DynamicFlags::FLEXIBLE,
1085 ___deadline,
1086 )?
1087 .into_result::<CapabilityStoreMarker>("dictionary_remove")?;
1088 Ok(_response.map(|x| x))
1089 }
1090
1091 pub fn r#dictionary_copy(
1107 &self,
1108 mut id: u64,
1109 mut dest_id: u64,
1110 ___deadline: zx::MonotonicInstant,
1111 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
1112 let _response = self.client.send_query::<
1113 CapabilityStoreDictionaryCopyRequest,
1114 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1115 CapabilityStoreMarker,
1116 >(
1117 (id, dest_id,),
1118 0x3733ecdf4ea1b44f,
1119 fidl::encoding::DynamicFlags::FLEXIBLE,
1120 ___deadline,
1121 )?
1122 .into_result::<CapabilityStoreMarker>("dictionary_copy")?;
1123 Ok(_response.map(|x| x))
1124 }
1125
1126 pub fn r#dictionary_keys(
1133 &self,
1134 mut id: u64,
1135 mut iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
1136 ___deadline: zx::MonotonicInstant,
1137 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
1138 let _response = self.client.send_query::<
1139 CapabilityStoreDictionaryKeysRequest,
1140 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1141 CapabilityStoreMarker,
1142 >(
1143 (id, iterator,),
1144 0x84b05577ceaec9e,
1145 fidl::encoding::DynamicFlags::FLEXIBLE,
1146 ___deadline,
1147 )?
1148 .into_result::<CapabilityStoreMarker>("dictionary_keys")?;
1149 Ok(_response.map(|x| x))
1150 }
1151
1152 pub fn r#dictionary_enumerate(
1162 &self,
1163 mut id: u64,
1164 mut iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
1165 ___deadline: zx::MonotonicInstant,
1166 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
1167 let _response = self.client.send_query::<
1168 CapabilityStoreDictionaryEnumerateRequest,
1169 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1170 CapabilityStoreMarker,
1171 >(
1172 (id, iterator,),
1173 0xd6279b6ced04641,
1174 fidl::encoding::DynamicFlags::FLEXIBLE,
1175 ___deadline,
1176 )?
1177 .into_result::<CapabilityStoreMarker>("dictionary_enumerate")?;
1178 Ok(_response.map(|x| x))
1179 }
1180
1181 pub fn r#dictionary_drain(
1189 &self,
1190 mut id: u64,
1191 mut iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
1192 ___deadline: zx::MonotonicInstant,
1193 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
1194 let _response = self.client.send_query::<
1195 CapabilityStoreDictionaryDrainRequest,
1196 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1197 CapabilityStoreMarker,
1198 >(
1199 (id, iterator,),
1200 0x28a3a3f84d928cd8,
1201 fidl::encoding::DynamicFlags::FLEXIBLE,
1202 ___deadline,
1203 )?
1204 .into_result::<CapabilityStoreMarker>("dictionary_drain")?;
1205 Ok(_response.map(|x| x))
1206 }
1207
1208 pub fn r#create_service_aggregate(
1211 &self,
1212 mut sources: Vec<AggregateSource>,
1213 ___deadline: zx::MonotonicInstant,
1214 ) -> Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error> {
1215 let _response = self.client.send_query::<
1216 CapabilityStoreCreateServiceAggregateRequest,
1217 fidl::encoding::FlexibleResultType<CapabilityStoreCreateServiceAggregateResponse, CapabilityStoreError>,
1218 CapabilityStoreMarker,
1219 >(
1220 (sources.as_mut(),),
1221 0x4584116c8085885a,
1222 fidl::encoding::DynamicFlags::FLEXIBLE,
1223 ___deadline,
1224 )?
1225 .into_result::<CapabilityStoreMarker>("create_service_aggregate")?;
1226 Ok(_response.map(|x| x.aggregate_dir_connector))
1227 }
1228}
1229
1230#[cfg(target_os = "fuchsia")]
1231impl From<CapabilityStoreSynchronousProxy> for zx::NullableHandle {
1232 fn from(value: CapabilityStoreSynchronousProxy) -> Self {
1233 value.into_channel().into()
1234 }
1235}
1236
1237#[cfg(target_os = "fuchsia")]
1238impl From<fidl::Channel> for CapabilityStoreSynchronousProxy {
1239 fn from(value: fidl::Channel) -> Self {
1240 Self::new(value)
1241 }
1242}
1243
1244#[cfg(target_os = "fuchsia")]
1245impl fidl::endpoints::FromClient for CapabilityStoreSynchronousProxy {
1246 type Protocol = CapabilityStoreMarker;
1247
1248 fn from_client(value: fidl::endpoints::ClientEnd<CapabilityStoreMarker>) -> Self {
1249 Self::new(value.into_channel())
1250 }
1251}
1252
1253#[derive(Debug, Clone)]
1254pub struct CapabilityStoreProxy {
1255 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1256}
1257
1258impl fidl::endpoints::Proxy for CapabilityStoreProxy {
1259 type Protocol = CapabilityStoreMarker;
1260
1261 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1262 Self::new(inner)
1263 }
1264
1265 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1266 self.client.into_channel().map_err(|client| Self { client })
1267 }
1268
1269 fn as_channel(&self) -> &::fidl::AsyncChannel {
1270 self.client.as_channel()
1271 }
1272}
1273
1274impl CapabilityStoreProxy {
1275 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1277 let protocol_name = <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1278 Self { client: fidl::client::Client::new(channel, protocol_name) }
1279 }
1280
1281 pub fn take_event_stream(&self) -> CapabilityStoreEventStream {
1287 CapabilityStoreEventStream { event_receiver: self.client.take_event_receiver() }
1288 }
1289
1290 pub fn r#duplicate(
1298 &self,
1299 mut id: u64,
1300 mut dest_id: u64,
1301 ) -> fidl::client::QueryResponseFut<
1302 CapabilityStoreDuplicateResult,
1303 fidl::encoding::DefaultFuchsiaResourceDialect,
1304 > {
1305 CapabilityStoreProxyInterface::r#duplicate(self, id, dest_id)
1306 }
1307
1308 pub fn r#drop(
1314 &self,
1315 mut id: u64,
1316 ) -> fidl::client::QueryResponseFut<
1317 CapabilityStoreDropResult,
1318 fidl::encoding::DefaultFuchsiaResourceDialect,
1319 > {
1320 CapabilityStoreProxyInterface::r#drop(self, id)
1321 }
1322
1323 pub fn r#export(
1331 &self,
1332 mut id: u64,
1333 ) -> fidl::client::QueryResponseFut<
1334 CapabilityStoreExportResult,
1335 fidl::encoding::DefaultFuchsiaResourceDialect,
1336 > {
1337 CapabilityStoreProxyInterface::r#export(self, id)
1338 }
1339
1340 pub fn r#import(
1347 &self,
1348 mut id: u64,
1349 mut capability: Capability,
1350 ) -> fidl::client::QueryResponseFut<
1351 CapabilityStoreImportResult,
1352 fidl::encoding::DefaultFuchsiaResourceDialect,
1353 > {
1354 CapabilityStoreProxyInterface::r#import(self, id, capability)
1355 }
1356
1357 pub fn r#connector_create(
1364 &self,
1365 mut id: u64,
1366 mut receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
1367 ) -> fidl::client::QueryResponseFut<
1368 CapabilityStoreConnectorCreateResult,
1369 fidl::encoding::DefaultFuchsiaResourceDialect,
1370 > {
1371 CapabilityStoreProxyInterface::r#connector_create(self, id, receiver)
1372 }
1373
1374 pub fn r#connector_open(
1384 &self,
1385 mut id: u64,
1386 mut server_end: fidl::Channel,
1387 ) -> fidl::client::QueryResponseFut<
1388 CapabilityStoreConnectorOpenResult,
1389 fidl::encoding::DefaultFuchsiaResourceDialect,
1390 > {
1391 CapabilityStoreProxyInterface::r#connector_open(self, id, server_end)
1392 }
1393
1394 pub fn r#dir_connector_create(
1401 &self,
1402 mut id: u64,
1403 mut receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
1404 ) -> fidl::client::QueryResponseFut<
1405 CapabilityStoreDirConnectorCreateResult,
1406 fidl::encoding::DefaultFuchsiaResourceDialect,
1407 > {
1408 CapabilityStoreProxyInterface::r#dir_connector_create(self, id, receiver)
1409 }
1410
1411 pub fn r#dir_connector_open(
1425 &self,
1426 mut payload: CapabilityStoreDirConnectorOpenRequest,
1427 ) -> fidl::client::QueryResponseFut<
1428 CapabilityStoreDirConnectorOpenResult,
1429 fidl::encoding::DefaultFuchsiaResourceDialect,
1430 > {
1431 CapabilityStoreProxyInterface::r#dir_connector_open(self, payload)
1432 }
1433
1434 pub fn r#dictionary_create(
1440 &self,
1441 mut id: u64,
1442 ) -> fidl::client::QueryResponseFut<
1443 CapabilityStoreDictionaryCreateResult,
1444 fidl::encoding::DefaultFuchsiaResourceDialect,
1445 > {
1446 CapabilityStoreProxyInterface::r#dictionary_create(self, id)
1447 }
1448
1449 pub fn r#dictionary_legacy_import(
1459 &self,
1460 mut id: u64,
1461 mut client_end: fidl::Channel,
1462 ) -> fidl::client::QueryResponseFut<
1463 CapabilityStoreDictionaryLegacyImportResult,
1464 fidl::encoding::DefaultFuchsiaResourceDialect,
1465 > {
1466 CapabilityStoreProxyInterface::r#dictionary_legacy_import(self, id, client_end)
1467 }
1468
1469 pub fn r#dictionary_legacy_export(
1479 &self,
1480 mut id: u64,
1481 mut server_end: fidl::Channel,
1482 ) -> fidl::client::QueryResponseFut<
1483 CapabilityStoreDictionaryLegacyExportResult,
1484 fidl::encoding::DefaultFuchsiaResourceDialect,
1485 > {
1486 CapabilityStoreProxyInterface::r#dictionary_legacy_export(self, id, server_end)
1487 }
1488
1489 pub fn r#dictionary_insert(
1499 &self,
1500 mut id: u64,
1501 mut item: &DictionaryItem,
1502 ) -> fidl::client::QueryResponseFut<
1503 CapabilityStoreDictionaryInsertResult,
1504 fidl::encoding::DefaultFuchsiaResourceDialect,
1505 > {
1506 CapabilityStoreProxyInterface::r#dictionary_insert(self, id, item)
1507 }
1508
1509 pub fn r#dictionary_get(
1521 &self,
1522 mut id: u64,
1523 mut key: &str,
1524 mut dest_id: u64,
1525 ) -> fidl::client::QueryResponseFut<
1526 CapabilityStoreDictionaryGetResult,
1527 fidl::encoding::DefaultFuchsiaResourceDialect,
1528 > {
1529 CapabilityStoreProxyInterface::r#dictionary_get(self, id, key, dest_id)
1530 }
1531
1532 pub fn r#dictionary_remove(
1543 &self,
1544 mut id: u64,
1545 mut key: &str,
1546 mut dest_id: Option<&WrappedCapabilityId>,
1547 ) -> fidl::client::QueryResponseFut<
1548 CapabilityStoreDictionaryRemoveResult,
1549 fidl::encoding::DefaultFuchsiaResourceDialect,
1550 > {
1551 CapabilityStoreProxyInterface::r#dictionary_remove(self, id, key, dest_id)
1552 }
1553
1554 pub fn r#dictionary_copy(
1570 &self,
1571 mut id: u64,
1572 mut dest_id: u64,
1573 ) -> fidl::client::QueryResponseFut<
1574 CapabilityStoreDictionaryCopyResult,
1575 fidl::encoding::DefaultFuchsiaResourceDialect,
1576 > {
1577 CapabilityStoreProxyInterface::r#dictionary_copy(self, id, dest_id)
1578 }
1579
1580 pub fn r#dictionary_keys(
1587 &self,
1588 mut id: u64,
1589 mut iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
1590 ) -> fidl::client::QueryResponseFut<
1591 CapabilityStoreDictionaryKeysResult,
1592 fidl::encoding::DefaultFuchsiaResourceDialect,
1593 > {
1594 CapabilityStoreProxyInterface::r#dictionary_keys(self, id, iterator)
1595 }
1596
1597 pub fn r#dictionary_enumerate(
1607 &self,
1608 mut id: u64,
1609 mut iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
1610 ) -> fidl::client::QueryResponseFut<
1611 CapabilityStoreDictionaryEnumerateResult,
1612 fidl::encoding::DefaultFuchsiaResourceDialect,
1613 > {
1614 CapabilityStoreProxyInterface::r#dictionary_enumerate(self, id, iterator)
1615 }
1616
1617 pub fn r#dictionary_drain(
1625 &self,
1626 mut id: u64,
1627 mut iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
1628 ) -> fidl::client::QueryResponseFut<
1629 CapabilityStoreDictionaryDrainResult,
1630 fidl::encoding::DefaultFuchsiaResourceDialect,
1631 > {
1632 CapabilityStoreProxyInterface::r#dictionary_drain(self, id, iterator)
1633 }
1634
1635 pub fn r#create_service_aggregate(
1638 &self,
1639 mut sources: Vec<AggregateSource>,
1640 ) -> fidl::client::QueryResponseFut<
1641 CapabilityStoreCreateServiceAggregateResult,
1642 fidl::encoding::DefaultFuchsiaResourceDialect,
1643 > {
1644 CapabilityStoreProxyInterface::r#create_service_aggregate(self, sources)
1645 }
1646}
1647
1648impl CapabilityStoreProxyInterface for CapabilityStoreProxy {
1649 type DuplicateResponseFut = fidl::client::QueryResponseFut<
1650 CapabilityStoreDuplicateResult,
1651 fidl::encoding::DefaultFuchsiaResourceDialect,
1652 >;
1653 fn r#duplicate(&self, mut id: u64, mut dest_id: u64) -> Self::DuplicateResponseFut {
1654 fn _decode(
1655 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1656 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
1657 let _response = fidl::client::decode_transaction_body::<
1658 fidl::encoding::FlexibleResultType<
1659 fidl::encoding::EmptyStruct,
1660 CapabilityStoreError,
1661 >,
1662 fidl::encoding::DefaultFuchsiaResourceDialect,
1663 0x5d5d35d9c20a2184,
1664 >(_buf?)?
1665 .into_result::<CapabilityStoreMarker>("duplicate")?;
1666 Ok(_response.map(|x| x))
1667 }
1668 self.client.send_query_and_decode::<
1669 CapabilityStoreDuplicateRequest,
1670 CapabilityStoreDuplicateResult,
1671 >(
1672 (id, dest_id,),
1673 0x5d5d35d9c20a2184,
1674 fidl::encoding::DynamicFlags::FLEXIBLE,
1675 _decode,
1676 )
1677 }
1678
1679 type DropResponseFut = fidl::client::QueryResponseFut<
1680 CapabilityStoreDropResult,
1681 fidl::encoding::DefaultFuchsiaResourceDialect,
1682 >;
1683 fn r#drop(&self, mut id: u64) -> Self::DropResponseFut {
1684 fn _decode(
1685 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1686 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
1687 let _response = fidl::client::decode_transaction_body::<
1688 fidl::encoding::FlexibleResultType<
1689 fidl::encoding::EmptyStruct,
1690 CapabilityStoreError,
1691 >,
1692 fidl::encoding::DefaultFuchsiaResourceDialect,
1693 0xa745c0990fc2559,
1694 >(_buf?)?
1695 .into_result::<CapabilityStoreMarker>("drop")?;
1696 Ok(_response.map(|x| x))
1697 }
1698 self.client.send_query_and_decode::<CapabilityStoreDropRequest, CapabilityStoreDropResult>(
1699 (id,),
1700 0xa745c0990fc2559,
1701 fidl::encoding::DynamicFlags::FLEXIBLE,
1702 _decode,
1703 )
1704 }
1705
1706 type ExportResponseFut = fidl::client::QueryResponseFut<
1707 CapabilityStoreExportResult,
1708 fidl::encoding::DefaultFuchsiaResourceDialect,
1709 >;
1710 fn r#export(&self, mut id: u64) -> Self::ExportResponseFut {
1711 fn _decode(
1712 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1713 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
1714 let _response = fidl::client::decode_transaction_body::<
1715 fidl::encoding::FlexibleResultType<
1716 CapabilityStoreExportResponse,
1717 CapabilityStoreError,
1718 >,
1719 fidl::encoding::DefaultFuchsiaResourceDialect,
1720 0x3237a8f4748faff,
1721 >(_buf?)?
1722 .into_result::<CapabilityStoreMarker>("export")?;
1723 Ok(_response.map(|x| x.capability))
1724 }
1725 self.client
1726 .send_query_and_decode::<CapabilityStoreExportRequest, CapabilityStoreExportResult>(
1727 (id,),
1728 0x3237a8f4748faff,
1729 fidl::encoding::DynamicFlags::FLEXIBLE,
1730 _decode,
1731 )
1732 }
1733
1734 type ImportResponseFut = fidl::client::QueryResponseFut<
1735 CapabilityStoreImportResult,
1736 fidl::encoding::DefaultFuchsiaResourceDialect,
1737 >;
1738 fn r#import(&self, mut id: u64, mut capability: Capability) -> Self::ImportResponseFut {
1739 fn _decode(
1740 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1741 ) -> Result<CapabilityStoreImportResult, fidl::Error> {
1742 let _response = fidl::client::decode_transaction_body::<
1743 fidl::encoding::FlexibleResultType<
1744 fidl::encoding::EmptyStruct,
1745 CapabilityStoreError,
1746 >,
1747 fidl::encoding::DefaultFuchsiaResourceDialect,
1748 0x1f96157a29f4539b,
1749 >(_buf?)?
1750 .into_result::<CapabilityStoreMarker>("import")?;
1751 Ok(_response.map(|x| x))
1752 }
1753 self.client
1754 .send_query_and_decode::<CapabilityStoreImportRequest, CapabilityStoreImportResult>(
1755 (id, &mut capability),
1756 0x1f96157a29f4539b,
1757 fidl::encoding::DynamicFlags::FLEXIBLE,
1758 _decode,
1759 )
1760 }
1761
1762 type ConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1763 CapabilityStoreConnectorCreateResult,
1764 fidl::encoding::DefaultFuchsiaResourceDialect,
1765 >;
1766 fn r#connector_create(
1767 &self,
1768 mut id: u64,
1769 mut receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
1770 ) -> Self::ConnectorCreateResponseFut {
1771 fn _decode(
1772 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1773 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
1774 let _response = fidl::client::decode_transaction_body::<
1775 fidl::encoding::FlexibleResultType<
1776 fidl::encoding::EmptyStruct,
1777 CapabilityStoreError,
1778 >,
1779 fidl::encoding::DefaultFuchsiaResourceDialect,
1780 0x29592c5d63e91c25,
1781 >(_buf?)?
1782 .into_result::<CapabilityStoreMarker>("connector_create")?;
1783 Ok(_response.map(|x| x))
1784 }
1785 self.client.send_query_and_decode::<
1786 CapabilityStoreConnectorCreateRequest,
1787 CapabilityStoreConnectorCreateResult,
1788 >(
1789 (id, receiver,),
1790 0x29592c5d63e91c25,
1791 fidl::encoding::DynamicFlags::FLEXIBLE,
1792 _decode,
1793 )
1794 }
1795
1796 type ConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1797 CapabilityStoreConnectorOpenResult,
1798 fidl::encoding::DefaultFuchsiaResourceDialect,
1799 >;
1800 fn r#connector_open(
1801 &self,
1802 mut id: u64,
1803 mut server_end: fidl::Channel,
1804 ) -> Self::ConnectorOpenResponseFut {
1805 fn _decode(
1806 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1807 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
1808 let _response = fidl::client::decode_transaction_body::<
1809 fidl::encoding::FlexibleResultType<
1810 fidl::encoding::EmptyStruct,
1811 CapabilityStoreError,
1812 >,
1813 fidl::encoding::DefaultFuchsiaResourceDialect,
1814 0x537e69ab40563b9f,
1815 >(_buf?)?
1816 .into_result::<CapabilityStoreMarker>("connector_open")?;
1817 Ok(_response.map(|x| x))
1818 }
1819 self.client.send_query_and_decode::<
1820 CapabilityStoreConnectorOpenRequest,
1821 CapabilityStoreConnectorOpenResult,
1822 >(
1823 (id, server_end,),
1824 0x537e69ab40563b9f,
1825 fidl::encoding::DynamicFlags::FLEXIBLE,
1826 _decode,
1827 )
1828 }
1829
1830 type DirConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1831 CapabilityStoreDirConnectorCreateResult,
1832 fidl::encoding::DefaultFuchsiaResourceDialect,
1833 >;
1834 fn r#dir_connector_create(
1835 &self,
1836 mut id: u64,
1837 mut receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
1838 ) -> Self::DirConnectorCreateResponseFut {
1839 fn _decode(
1840 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1841 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
1842 let _response = fidl::client::decode_transaction_body::<
1843 fidl::encoding::FlexibleResultType<
1844 fidl::encoding::EmptyStruct,
1845 CapabilityStoreError,
1846 >,
1847 fidl::encoding::DefaultFuchsiaResourceDialect,
1848 0x186138a11ccf19bb,
1849 >(_buf?)?
1850 .into_result::<CapabilityStoreMarker>("dir_connector_create")?;
1851 Ok(_response.map(|x| x))
1852 }
1853 self.client.send_query_and_decode::<
1854 CapabilityStoreDirConnectorCreateRequest,
1855 CapabilityStoreDirConnectorCreateResult,
1856 >(
1857 (id, receiver,),
1858 0x186138a11ccf19bb,
1859 fidl::encoding::DynamicFlags::FLEXIBLE,
1860 _decode,
1861 )
1862 }
1863
1864 type DirConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1865 CapabilityStoreDirConnectorOpenResult,
1866 fidl::encoding::DefaultFuchsiaResourceDialect,
1867 >;
1868 fn r#dir_connector_open(
1869 &self,
1870 mut payload: CapabilityStoreDirConnectorOpenRequest,
1871 ) -> Self::DirConnectorOpenResponseFut {
1872 fn _decode(
1873 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1874 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
1875 let _response = fidl::client::decode_transaction_body::<
1876 fidl::encoding::FlexibleResultType<
1877 fidl::encoding::EmptyStruct,
1878 CapabilityStoreError,
1879 >,
1880 fidl::encoding::DefaultFuchsiaResourceDialect,
1881 0x5650d3d6a3a13901,
1882 >(_buf?)?
1883 .into_result::<CapabilityStoreMarker>("dir_connector_open")?;
1884 Ok(_response.map(|x| x))
1885 }
1886 self.client.send_query_and_decode::<
1887 CapabilityStoreDirConnectorOpenRequest,
1888 CapabilityStoreDirConnectorOpenResult,
1889 >(
1890 &mut payload,
1891 0x5650d3d6a3a13901,
1892 fidl::encoding::DynamicFlags::FLEXIBLE,
1893 _decode,
1894 )
1895 }
1896
1897 type DictionaryCreateResponseFut = fidl::client::QueryResponseFut<
1898 CapabilityStoreDictionaryCreateResult,
1899 fidl::encoding::DefaultFuchsiaResourceDialect,
1900 >;
1901 fn r#dictionary_create(&self, mut id: u64) -> Self::DictionaryCreateResponseFut {
1902 fn _decode(
1903 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1904 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
1905 let _response = fidl::client::decode_transaction_body::<
1906 fidl::encoding::FlexibleResultType<
1907 fidl::encoding::EmptyStruct,
1908 CapabilityStoreError,
1909 >,
1910 fidl::encoding::DefaultFuchsiaResourceDialect,
1911 0x6997c8dfc63de093,
1912 >(_buf?)?
1913 .into_result::<CapabilityStoreMarker>("dictionary_create")?;
1914 Ok(_response.map(|x| x))
1915 }
1916 self.client.send_query_and_decode::<
1917 CapabilityStoreDictionaryCreateRequest,
1918 CapabilityStoreDictionaryCreateResult,
1919 >(
1920 (id,),
1921 0x6997c8dfc63de093,
1922 fidl::encoding::DynamicFlags::FLEXIBLE,
1923 _decode,
1924 )
1925 }
1926
1927 type DictionaryLegacyImportResponseFut = fidl::client::QueryResponseFut<
1928 CapabilityStoreDictionaryLegacyImportResult,
1929 fidl::encoding::DefaultFuchsiaResourceDialect,
1930 >;
1931 fn r#dictionary_legacy_import(
1932 &self,
1933 mut id: u64,
1934 mut client_end: fidl::Channel,
1935 ) -> Self::DictionaryLegacyImportResponseFut {
1936 fn _decode(
1937 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1938 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
1939 let _response = fidl::client::decode_transaction_body::<
1940 fidl::encoding::FlexibleResultType<
1941 fidl::encoding::EmptyStruct,
1942 CapabilityStoreError,
1943 >,
1944 fidl::encoding::DefaultFuchsiaResourceDialect,
1945 0x72fd686c37b6025f,
1946 >(_buf?)?
1947 .into_result::<CapabilityStoreMarker>("dictionary_legacy_import")?;
1948 Ok(_response.map(|x| x))
1949 }
1950 self.client.send_query_and_decode::<
1951 CapabilityStoreDictionaryLegacyImportRequest,
1952 CapabilityStoreDictionaryLegacyImportResult,
1953 >(
1954 (id, client_end,),
1955 0x72fd686c37b6025f,
1956 fidl::encoding::DynamicFlags::FLEXIBLE,
1957 _decode,
1958 )
1959 }
1960
1961 type DictionaryLegacyExportResponseFut = fidl::client::QueryResponseFut<
1962 CapabilityStoreDictionaryLegacyExportResult,
1963 fidl::encoding::DefaultFuchsiaResourceDialect,
1964 >;
1965 fn r#dictionary_legacy_export(
1966 &self,
1967 mut id: u64,
1968 mut server_end: fidl::Channel,
1969 ) -> Self::DictionaryLegacyExportResponseFut {
1970 fn _decode(
1971 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1972 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
1973 let _response = fidl::client::decode_transaction_body::<
1974 fidl::encoding::FlexibleResultType<
1975 fidl::encoding::EmptyStruct,
1976 CapabilityStoreError,
1977 >,
1978 fidl::encoding::DefaultFuchsiaResourceDialect,
1979 0x407e15cc4bde5dcd,
1980 >(_buf?)?
1981 .into_result::<CapabilityStoreMarker>("dictionary_legacy_export")?;
1982 Ok(_response.map(|x| x))
1983 }
1984 self.client.send_query_and_decode::<
1985 CapabilityStoreDictionaryLegacyExportRequest,
1986 CapabilityStoreDictionaryLegacyExportResult,
1987 >(
1988 (id, server_end,),
1989 0x407e15cc4bde5dcd,
1990 fidl::encoding::DynamicFlags::FLEXIBLE,
1991 _decode,
1992 )
1993 }
1994
1995 type DictionaryInsertResponseFut = fidl::client::QueryResponseFut<
1996 CapabilityStoreDictionaryInsertResult,
1997 fidl::encoding::DefaultFuchsiaResourceDialect,
1998 >;
1999 fn r#dictionary_insert(
2000 &self,
2001 mut id: u64,
2002 mut item: &DictionaryItem,
2003 ) -> Self::DictionaryInsertResponseFut {
2004 fn _decode(
2005 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2006 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
2007 let _response = fidl::client::decode_transaction_body::<
2008 fidl::encoding::FlexibleResultType<
2009 fidl::encoding::EmptyStruct,
2010 CapabilityStoreError,
2011 >,
2012 fidl::encoding::DefaultFuchsiaResourceDialect,
2013 0x7702183689d44c27,
2014 >(_buf?)?
2015 .into_result::<CapabilityStoreMarker>("dictionary_insert")?;
2016 Ok(_response.map(|x| x))
2017 }
2018 self.client.send_query_and_decode::<
2019 CapabilityStoreDictionaryInsertRequest,
2020 CapabilityStoreDictionaryInsertResult,
2021 >(
2022 (id, item,),
2023 0x7702183689d44c27,
2024 fidl::encoding::DynamicFlags::FLEXIBLE,
2025 _decode,
2026 )
2027 }
2028
2029 type DictionaryGetResponseFut = fidl::client::QueryResponseFut<
2030 CapabilityStoreDictionaryGetResult,
2031 fidl::encoding::DefaultFuchsiaResourceDialect,
2032 >;
2033 fn r#dictionary_get(
2034 &self,
2035 mut id: u64,
2036 mut key: &str,
2037 mut dest_id: u64,
2038 ) -> Self::DictionaryGetResponseFut {
2039 fn _decode(
2040 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2041 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
2042 let _response = fidl::client::decode_transaction_body::<
2043 fidl::encoding::FlexibleResultType<
2044 fidl::encoding::EmptyStruct,
2045 CapabilityStoreError,
2046 >,
2047 fidl::encoding::DefaultFuchsiaResourceDialect,
2048 0x4d9e27538284add2,
2049 >(_buf?)?
2050 .into_result::<CapabilityStoreMarker>("dictionary_get")?;
2051 Ok(_response.map(|x| x))
2052 }
2053 self.client.send_query_and_decode::<
2054 CapabilityStoreDictionaryGetRequest,
2055 CapabilityStoreDictionaryGetResult,
2056 >(
2057 (id, key, dest_id,),
2058 0x4d9e27538284add2,
2059 fidl::encoding::DynamicFlags::FLEXIBLE,
2060 _decode,
2061 )
2062 }
2063
2064 type DictionaryRemoveResponseFut = fidl::client::QueryResponseFut<
2065 CapabilityStoreDictionaryRemoveResult,
2066 fidl::encoding::DefaultFuchsiaResourceDialect,
2067 >;
2068 fn r#dictionary_remove(
2069 &self,
2070 mut id: u64,
2071 mut key: &str,
2072 mut dest_id: Option<&WrappedCapabilityId>,
2073 ) -> Self::DictionaryRemoveResponseFut {
2074 fn _decode(
2075 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2076 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
2077 let _response = fidl::client::decode_transaction_body::<
2078 fidl::encoding::FlexibleResultType<
2079 fidl::encoding::EmptyStruct,
2080 CapabilityStoreError,
2081 >,
2082 fidl::encoding::DefaultFuchsiaResourceDialect,
2083 0x4c5c025ab05d4f3,
2084 >(_buf?)?
2085 .into_result::<CapabilityStoreMarker>("dictionary_remove")?;
2086 Ok(_response.map(|x| x))
2087 }
2088 self.client.send_query_and_decode::<
2089 CapabilityStoreDictionaryRemoveRequest,
2090 CapabilityStoreDictionaryRemoveResult,
2091 >(
2092 (id, key, dest_id,),
2093 0x4c5c025ab05d4f3,
2094 fidl::encoding::DynamicFlags::FLEXIBLE,
2095 _decode,
2096 )
2097 }
2098
2099 type DictionaryCopyResponseFut = fidl::client::QueryResponseFut<
2100 CapabilityStoreDictionaryCopyResult,
2101 fidl::encoding::DefaultFuchsiaResourceDialect,
2102 >;
2103 fn r#dictionary_copy(&self, mut id: u64, mut dest_id: u64) -> Self::DictionaryCopyResponseFut {
2104 fn _decode(
2105 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2106 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
2107 let _response = fidl::client::decode_transaction_body::<
2108 fidl::encoding::FlexibleResultType<
2109 fidl::encoding::EmptyStruct,
2110 CapabilityStoreError,
2111 >,
2112 fidl::encoding::DefaultFuchsiaResourceDialect,
2113 0x3733ecdf4ea1b44f,
2114 >(_buf?)?
2115 .into_result::<CapabilityStoreMarker>("dictionary_copy")?;
2116 Ok(_response.map(|x| x))
2117 }
2118 self.client.send_query_and_decode::<
2119 CapabilityStoreDictionaryCopyRequest,
2120 CapabilityStoreDictionaryCopyResult,
2121 >(
2122 (id, dest_id,),
2123 0x3733ecdf4ea1b44f,
2124 fidl::encoding::DynamicFlags::FLEXIBLE,
2125 _decode,
2126 )
2127 }
2128
2129 type DictionaryKeysResponseFut = fidl::client::QueryResponseFut<
2130 CapabilityStoreDictionaryKeysResult,
2131 fidl::encoding::DefaultFuchsiaResourceDialect,
2132 >;
2133 fn r#dictionary_keys(
2134 &self,
2135 mut id: u64,
2136 mut iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
2137 ) -> Self::DictionaryKeysResponseFut {
2138 fn _decode(
2139 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2140 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
2141 let _response = fidl::client::decode_transaction_body::<
2142 fidl::encoding::FlexibleResultType<
2143 fidl::encoding::EmptyStruct,
2144 CapabilityStoreError,
2145 >,
2146 fidl::encoding::DefaultFuchsiaResourceDialect,
2147 0x84b05577ceaec9e,
2148 >(_buf?)?
2149 .into_result::<CapabilityStoreMarker>("dictionary_keys")?;
2150 Ok(_response.map(|x| x))
2151 }
2152 self.client.send_query_and_decode::<
2153 CapabilityStoreDictionaryKeysRequest,
2154 CapabilityStoreDictionaryKeysResult,
2155 >(
2156 (id, iterator,),
2157 0x84b05577ceaec9e,
2158 fidl::encoding::DynamicFlags::FLEXIBLE,
2159 _decode,
2160 )
2161 }
2162
2163 type DictionaryEnumerateResponseFut = fidl::client::QueryResponseFut<
2164 CapabilityStoreDictionaryEnumerateResult,
2165 fidl::encoding::DefaultFuchsiaResourceDialect,
2166 >;
2167 fn r#dictionary_enumerate(
2168 &self,
2169 mut id: u64,
2170 mut iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
2171 ) -> Self::DictionaryEnumerateResponseFut {
2172 fn _decode(
2173 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2174 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
2175 let _response = fidl::client::decode_transaction_body::<
2176 fidl::encoding::FlexibleResultType<
2177 fidl::encoding::EmptyStruct,
2178 CapabilityStoreError,
2179 >,
2180 fidl::encoding::DefaultFuchsiaResourceDialect,
2181 0xd6279b6ced04641,
2182 >(_buf?)?
2183 .into_result::<CapabilityStoreMarker>("dictionary_enumerate")?;
2184 Ok(_response.map(|x| x))
2185 }
2186 self.client.send_query_and_decode::<
2187 CapabilityStoreDictionaryEnumerateRequest,
2188 CapabilityStoreDictionaryEnumerateResult,
2189 >(
2190 (id, iterator,),
2191 0xd6279b6ced04641,
2192 fidl::encoding::DynamicFlags::FLEXIBLE,
2193 _decode,
2194 )
2195 }
2196
2197 type DictionaryDrainResponseFut = fidl::client::QueryResponseFut<
2198 CapabilityStoreDictionaryDrainResult,
2199 fidl::encoding::DefaultFuchsiaResourceDialect,
2200 >;
2201 fn r#dictionary_drain(
2202 &self,
2203 mut id: u64,
2204 mut iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
2205 ) -> Self::DictionaryDrainResponseFut {
2206 fn _decode(
2207 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2208 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
2209 let _response = fidl::client::decode_transaction_body::<
2210 fidl::encoding::FlexibleResultType<
2211 fidl::encoding::EmptyStruct,
2212 CapabilityStoreError,
2213 >,
2214 fidl::encoding::DefaultFuchsiaResourceDialect,
2215 0x28a3a3f84d928cd8,
2216 >(_buf?)?
2217 .into_result::<CapabilityStoreMarker>("dictionary_drain")?;
2218 Ok(_response.map(|x| x))
2219 }
2220 self.client.send_query_and_decode::<
2221 CapabilityStoreDictionaryDrainRequest,
2222 CapabilityStoreDictionaryDrainResult,
2223 >(
2224 (id, iterator,),
2225 0x28a3a3f84d928cd8,
2226 fidl::encoding::DynamicFlags::FLEXIBLE,
2227 _decode,
2228 )
2229 }
2230
2231 type CreateServiceAggregateResponseFut = fidl::client::QueryResponseFut<
2232 CapabilityStoreCreateServiceAggregateResult,
2233 fidl::encoding::DefaultFuchsiaResourceDialect,
2234 >;
2235 fn r#create_service_aggregate(
2236 &self,
2237 mut sources: Vec<AggregateSource>,
2238 ) -> Self::CreateServiceAggregateResponseFut {
2239 fn _decode(
2240 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2241 ) -> Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error> {
2242 let _response = fidl::client::decode_transaction_body::<
2243 fidl::encoding::FlexibleResultType<
2244 CapabilityStoreCreateServiceAggregateResponse,
2245 CapabilityStoreError,
2246 >,
2247 fidl::encoding::DefaultFuchsiaResourceDialect,
2248 0x4584116c8085885a,
2249 >(_buf?)?
2250 .into_result::<CapabilityStoreMarker>("create_service_aggregate")?;
2251 Ok(_response.map(|x| x.aggregate_dir_connector))
2252 }
2253 self.client.send_query_and_decode::<
2254 CapabilityStoreCreateServiceAggregateRequest,
2255 CapabilityStoreCreateServiceAggregateResult,
2256 >(
2257 (sources.as_mut(),),
2258 0x4584116c8085885a,
2259 fidl::encoding::DynamicFlags::FLEXIBLE,
2260 _decode,
2261 )
2262 }
2263}
2264
2265pub struct CapabilityStoreEventStream {
2266 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2267}
2268
2269impl std::marker::Unpin for CapabilityStoreEventStream {}
2270
2271impl futures::stream::FusedStream for CapabilityStoreEventStream {
2272 fn is_terminated(&self) -> bool {
2273 self.event_receiver.is_terminated()
2274 }
2275}
2276
2277impl futures::Stream for CapabilityStoreEventStream {
2278 type Item = Result<CapabilityStoreEvent, fidl::Error>;
2279
2280 fn poll_next(
2281 mut self: std::pin::Pin<&mut Self>,
2282 cx: &mut std::task::Context<'_>,
2283 ) -> std::task::Poll<Option<Self::Item>> {
2284 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2285 &mut self.event_receiver,
2286 cx
2287 )?) {
2288 Some(buf) => std::task::Poll::Ready(Some(CapabilityStoreEvent::decode(buf))),
2289 None => std::task::Poll::Ready(None),
2290 }
2291 }
2292}
2293
2294#[derive(Debug)]
2295pub enum CapabilityStoreEvent {
2296 #[non_exhaustive]
2297 _UnknownEvent {
2298 ordinal: u64,
2300 },
2301}
2302
2303impl CapabilityStoreEvent {
2304 fn decode(
2306 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2307 ) -> Result<CapabilityStoreEvent, fidl::Error> {
2308 let (bytes, _handles) = buf.split_mut();
2309 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2310 debug_assert_eq!(tx_header.tx_id, 0);
2311 match tx_header.ordinal {
2312 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2313 Ok(CapabilityStoreEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2314 }
2315 _ => Err(fidl::Error::UnknownOrdinal {
2316 ordinal: tx_header.ordinal,
2317 protocol_name:
2318 <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2319 }),
2320 }
2321 }
2322}
2323
2324pub struct CapabilityStoreRequestStream {
2326 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2327 is_terminated: bool,
2328}
2329
2330impl std::marker::Unpin for CapabilityStoreRequestStream {}
2331
2332impl futures::stream::FusedStream for CapabilityStoreRequestStream {
2333 fn is_terminated(&self) -> bool {
2334 self.is_terminated
2335 }
2336}
2337
2338impl fidl::endpoints::RequestStream for CapabilityStoreRequestStream {
2339 type Protocol = CapabilityStoreMarker;
2340 type ControlHandle = CapabilityStoreControlHandle;
2341
2342 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2343 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2344 }
2345
2346 fn control_handle(&self) -> Self::ControlHandle {
2347 CapabilityStoreControlHandle { inner: self.inner.clone() }
2348 }
2349
2350 fn into_inner(
2351 self,
2352 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2353 {
2354 (self.inner, self.is_terminated)
2355 }
2356
2357 fn from_inner(
2358 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2359 is_terminated: bool,
2360 ) -> Self {
2361 Self { inner, is_terminated }
2362 }
2363}
2364
2365impl futures::Stream for CapabilityStoreRequestStream {
2366 type Item = Result<CapabilityStoreRequest, fidl::Error>;
2367
2368 fn poll_next(
2369 mut self: std::pin::Pin<&mut Self>,
2370 cx: &mut std::task::Context<'_>,
2371 ) -> std::task::Poll<Option<Self::Item>> {
2372 let this = &mut *self;
2373 if this.inner.check_shutdown(cx) {
2374 this.is_terminated = true;
2375 return std::task::Poll::Ready(None);
2376 }
2377 if this.is_terminated {
2378 panic!("polled CapabilityStoreRequestStream after completion");
2379 }
2380 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2381 |bytes, handles| {
2382 match this.inner.channel().read_etc(cx, bytes, handles) {
2383 std::task::Poll::Ready(Ok(())) => {}
2384 std::task::Poll::Pending => return std::task::Poll::Pending,
2385 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2386 this.is_terminated = true;
2387 return std::task::Poll::Ready(None);
2388 }
2389 std::task::Poll::Ready(Err(e)) => {
2390 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2391 e.into(),
2392 ))));
2393 }
2394 }
2395
2396 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2398
2399 std::task::Poll::Ready(Some(match header.ordinal {
2400 0x5d5d35d9c20a2184 => {
2401 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2402 let mut req = fidl::new_empty!(
2403 CapabilityStoreDuplicateRequest,
2404 fidl::encoding::DefaultFuchsiaResourceDialect
2405 );
2406 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDuplicateRequest>(&header, _body_bytes, handles, &mut req)?;
2407 let control_handle =
2408 CapabilityStoreControlHandle { inner: this.inner.clone() };
2409 Ok(CapabilityStoreRequest::Duplicate {
2410 id: req.id,
2411 dest_id: req.dest_id,
2412
2413 responder: CapabilityStoreDuplicateResponder {
2414 control_handle: std::mem::ManuallyDrop::new(control_handle),
2415 tx_id: header.tx_id,
2416 },
2417 })
2418 }
2419 0xa745c0990fc2559 => {
2420 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2421 let mut req = fidl::new_empty!(
2422 CapabilityStoreDropRequest,
2423 fidl::encoding::DefaultFuchsiaResourceDialect
2424 );
2425 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDropRequest>(&header, _body_bytes, handles, &mut req)?;
2426 let control_handle =
2427 CapabilityStoreControlHandle { inner: this.inner.clone() };
2428 Ok(CapabilityStoreRequest::Drop {
2429 id: req.id,
2430
2431 responder: CapabilityStoreDropResponder {
2432 control_handle: std::mem::ManuallyDrop::new(control_handle),
2433 tx_id: header.tx_id,
2434 },
2435 })
2436 }
2437 0x3237a8f4748faff => {
2438 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2439 let mut req = fidl::new_empty!(
2440 CapabilityStoreExportRequest,
2441 fidl::encoding::DefaultFuchsiaResourceDialect
2442 );
2443 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreExportRequest>(&header, _body_bytes, handles, &mut req)?;
2444 let control_handle =
2445 CapabilityStoreControlHandle { inner: this.inner.clone() };
2446 Ok(CapabilityStoreRequest::Export {
2447 id: req.id,
2448
2449 responder: CapabilityStoreExportResponder {
2450 control_handle: std::mem::ManuallyDrop::new(control_handle),
2451 tx_id: header.tx_id,
2452 },
2453 })
2454 }
2455 0x1f96157a29f4539b => {
2456 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2457 let mut req = fidl::new_empty!(
2458 CapabilityStoreImportRequest,
2459 fidl::encoding::DefaultFuchsiaResourceDialect
2460 );
2461 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreImportRequest>(&header, _body_bytes, handles, &mut req)?;
2462 let control_handle =
2463 CapabilityStoreControlHandle { inner: this.inner.clone() };
2464 Ok(CapabilityStoreRequest::Import {
2465 id: req.id,
2466 capability: req.capability,
2467
2468 responder: CapabilityStoreImportResponder {
2469 control_handle: std::mem::ManuallyDrop::new(control_handle),
2470 tx_id: header.tx_id,
2471 },
2472 })
2473 }
2474 0x29592c5d63e91c25 => {
2475 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2476 let mut req = fidl::new_empty!(
2477 CapabilityStoreConnectorCreateRequest,
2478 fidl::encoding::DefaultFuchsiaResourceDialect
2479 );
2480 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
2481 let control_handle =
2482 CapabilityStoreControlHandle { inner: this.inner.clone() };
2483 Ok(CapabilityStoreRequest::ConnectorCreate {
2484 id: req.id,
2485 receiver: req.receiver,
2486
2487 responder: CapabilityStoreConnectorCreateResponder {
2488 control_handle: std::mem::ManuallyDrop::new(control_handle),
2489 tx_id: header.tx_id,
2490 },
2491 })
2492 }
2493 0x537e69ab40563b9f => {
2494 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2495 let mut req = fidl::new_empty!(
2496 CapabilityStoreConnectorOpenRequest,
2497 fidl::encoding::DefaultFuchsiaResourceDialect
2498 );
2499 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2500 let control_handle =
2501 CapabilityStoreControlHandle { inner: this.inner.clone() };
2502 Ok(CapabilityStoreRequest::ConnectorOpen {
2503 id: req.id,
2504 server_end: req.server_end,
2505
2506 responder: CapabilityStoreConnectorOpenResponder {
2507 control_handle: std::mem::ManuallyDrop::new(control_handle),
2508 tx_id: header.tx_id,
2509 },
2510 })
2511 }
2512 0x186138a11ccf19bb => {
2513 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2514 let mut req = fidl::new_empty!(
2515 CapabilityStoreDirConnectorCreateRequest,
2516 fidl::encoding::DefaultFuchsiaResourceDialect
2517 );
2518 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDirConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
2519 let control_handle =
2520 CapabilityStoreControlHandle { inner: this.inner.clone() };
2521 Ok(CapabilityStoreRequest::DirConnectorCreate {
2522 id: req.id,
2523 receiver: req.receiver,
2524
2525 responder: CapabilityStoreDirConnectorCreateResponder {
2526 control_handle: std::mem::ManuallyDrop::new(control_handle),
2527 tx_id: header.tx_id,
2528 },
2529 })
2530 }
2531 0x5650d3d6a3a13901 => {
2532 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2533 let mut req = fidl::new_empty!(
2534 CapabilityStoreDirConnectorOpenRequest,
2535 fidl::encoding::DefaultFuchsiaResourceDialect
2536 );
2537 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDirConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2538 let control_handle =
2539 CapabilityStoreControlHandle { inner: this.inner.clone() };
2540 Ok(CapabilityStoreRequest::DirConnectorOpen {
2541 payload: req,
2542 responder: CapabilityStoreDirConnectorOpenResponder {
2543 control_handle: std::mem::ManuallyDrop::new(control_handle),
2544 tx_id: header.tx_id,
2545 },
2546 })
2547 }
2548 0x6997c8dfc63de093 => {
2549 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2550 let mut req = fidl::new_empty!(
2551 CapabilityStoreDictionaryCreateRequest,
2552 fidl::encoding::DefaultFuchsiaResourceDialect
2553 );
2554 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryCreateRequest>(&header, _body_bytes, handles, &mut req)?;
2555 let control_handle =
2556 CapabilityStoreControlHandle { inner: this.inner.clone() };
2557 Ok(CapabilityStoreRequest::DictionaryCreate {
2558 id: req.id,
2559
2560 responder: CapabilityStoreDictionaryCreateResponder {
2561 control_handle: std::mem::ManuallyDrop::new(control_handle),
2562 tx_id: header.tx_id,
2563 },
2564 })
2565 }
2566 0x72fd686c37b6025f => {
2567 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2568 let mut req = fidl::new_empty!(
2569 CapabilityStoreDictionaryLegacyImportRequest,
2570 fidl::encoding::DefaultFuchsiaResourceDialect
2571 );
2572 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyImportRequest>(&header, _body_bytes, handles, &mut req)?;
2573 let control_handle =
2574 CapabilityStoreControlHandle { inner: this.inner.clone() };
2575 Ok(CapabilityStoreRequest::DictionaryLegacyImport {
2576 id: req.id,
2577 client_end: req.client_end,
2578
2579 responder: CapabilityStoreDictionaryLegacyImportResponder {
2580 control_handle: std::mem::ManuallyDrop::new(control_handle),
2581 tx_id: header.tx_id,
2582 },
2583 })
2584 }
2585 0x407e15cc4bde5dcd => {
2586 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2587 let mut req = fidl::new_empty!(
2588 CapabilityStoreDictionaryLegacyExportRequest,
2589 fidl::encoding::DefaultFuchsiaResourceDialect
2590 );
2591 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyExportRequest>(&header, _body_bytes, handles, &mut req)?;
2592 let control_handle =
2593 CapabilityStoreControlHandle { inner: this.inner.clone() };
2594 Ok(CapabilityStoreRequest::DictionaryLegacyExport {
2595 id: req.id,
2596 server_end: req.server_end,
2597
2598 responder: CapabilityStoreDictionaryLegacyExportResponder {
2599 control_handle: std::mem::ManuallyDrop::new(control_handle),
2600 tx_id: header.tx_id,
2601 },
2602 })
2603 }
2604 0x7702183689d44c27 => {
2605 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2606 let mut req = fidl::new_empty!(
2607 CapabilityStoreDictionaryInsertRequest,
2608 fidl::encoding::DefaultFuchsiaResourceDialect
2609 );
2610 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryInsertRequest>(&header, _body_bytes, handles, &mut req)?;
2611 let control_handle =
2612 CapabilityStoreControlHandle { inner: this.inner.clone() };
2613 Ok(CapabilityStoreRequest::DictionaryInsert {
2614 id: req.id,
2615 item: req.item,
2616
2617 responder: CapabilityStoreDictionaryInsertResponder {
2618 control_handle: std::mem::ManuallyDrop::new(control_handle),
2619 tx_id: header.tx_id,
2620 },
2621 })
2622 }
2623 0x4d9e27538284add2 => {
2624 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2625 let mut req = fidl::new_empty!(
2626 CapabilityStoreDictionaryGetRequest,
2627 fidl::encoding::DefaultFuchsiaResourceDialect
2628 );
2629 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryGetRequest>(&header, _body_bytes, handles, &mut req)?;
2630 let control_handle =
2631 CapabilityStoreControlHandle { inner: this.inner.clone() };
2632 Ok(CapabilityStoreRequest::DictionaryGet {
2633 id: req.id,
2634 key: req.key,
2635 dest_id: req.dest_id,
2636
2637 responder: CapabilityStoreDictionaryGetResponder {
2638 control_handle: std::mem::ManuallyDrop::new(control_handle),
2639 tx_id: header.tx_id,
2640 },
2641 })
2642 }
2643 0x4c5c025ab05d4f3 => {
2644 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2645 let mut req = fidl::new_empty!(
2646 CapabilityStoreDictionaryRemoveRequest,
2647 fidl::encoding::DefaultFuchsiaResourceDialect
2648 );
2649 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryRemoveRequest>(&header, _body_bytes, handles, &mut req)?;
2650 let control_handle =
2651 CapabilityStoreControlHandle { inner: this.inner.clone() };
2652 Ok(CapabilityStoreRequest::DictionaryRemove {
2653 id: req.id,
2654 key: req.key,
2655 dest_id: req.dest_id,
2656
2657 responder: CapabilityStoreDictionaryRemoveResponder {
2658 control_handle: std::mem::ManuallyDrop::new(control_handle),
2659 tx_id: header.tx_id,
2660 },
2661 })
2662 }
2663 0x3733ecdf4ea1b44f => {
2664 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2665 let mut req = fidl::new_empty!(
2666 CapabilityStoreDictionaryCopyRequest,
2667 fidl::encoding::DefaultFuchsiaResourceDialect
2668 );
2669 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryCopyRequest>(&header, _body_bytes, handles, &mut req)?;
2670 let control_handle =
2671 CapabilityStoreControlHandle { inner: this.inner.clone() };
2672 Ok(CapabilityStoreRequest::DictionaryCopy {
2673 id: req.id,
2674 dest_id: req.dest_id,
2675
2676 responder: CapabilityStoreDictionaryCopyResponder {
2677 control_handle: std::mem::ManuallyDrop::new(control_handle),
2678 tx_id: header.tx_id,
2679 },
2680 })
2681 }
2682 0x84b05577ceaec9e => {
2683 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2684 let mut req = fidl::new_empty!(
2685 CapabilityStoreDictionaryKeysRequest,
2686 fidl::encoding::DefaultFuchsiaResourceDialect
2687 );
2688 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryKeysRequest>(&header, _body_bytes, handles, &mut req)?;
2689 let control_handle =
2690 CapabilityStoreControlHandle { inner: this.inner.clone() };
2691 Ok(CapabilityStoreRequest::DictionaryKeys {
2692 id: req.id,
2693 iterator: req.iterator,
2694
2695 responder: CapabilityStoreDictionaryKeysResponder {
2696 control_handle: std::mem::ManuallyDrop::new(control_handle),
2697 tx_id: header.tx_id,
2698 },
2699 })
2700 }
2701 0xd6279b6ced04641 => {
2702 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2703 let mut req = fidl::new_empty!(
2704 CapabilityStoreDictionaryEnumerateRequest,
2705 fidl::encoding::DefaultFuchsiaResourceDialect
2706 );
2707 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
2708 let control_handle =
2709 CapabilityStoreControlHandle { inner: this.inner.clone() };
2710 Ok(CapabilityStoreRequest::DictionaryEnumerate {
2711 id: req.id,
2712 iterator: req.iterator,
2713
2714 responder: CapabilityStoreDictionaryEnumerateResponder {
2715 control_handle: std::mem::ManuallyDrop::new(control_handle),
2716 tx_id: header.tx_id,
2717 },
2718 })
2719 }
2720 0x28a3a3f84d928cd8 => {
2721 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2722 let mut req = fidl::new_empty!(
2723 CapabilityStoreDictionaryDrainRequest,
2724 fidl::encoding::DefaultFuchsiaResourceDialect
2725 );
2726 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryDrainRequest>(&header, _body_bytes, handles, &mut req)?;
2727 let control_handle =
2728 CapabilityStoreControlHandle { inner: this.inner.clone() };
2729 Ok(CapabilityStoreRequest::DictionaryDrain {
2730 id: req.id,
2731 iterator: req.iterator,
2732
2733 responder: CapabilityStoreDictionaryDrainResponder {
2734 control_handle: std::mem::ManuallyDrop::new(control_handle),
2735 tx_id: header.tx_id,
2736 },
2737 })
2738 }
2739 0x4584116c8085885a => {
2740 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2741 let mut req = fidl::new_empty!(
2742 CapabilityStoreCreateServiceAggregateRequest,
2743 fidl::encoding::DefaultFuchsiaResourceDialect
2744 );
2745 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreCreateServiceAggregateRequest>(&header, _body_bytes, handles, &mut req)?;
2746 let control_handle =
2747 CapabilityStoreControlHandle { inner: this.inner.clone() };
2748 Ok(CapabilityStoreRequest::CreateServiceAggregate {
2749 sources: req.sources,
2750
2751 responder: CapabilityStoreCreateServiceAggregateResponder {
2752 control_handle: std::mem::ManuallyDrop::new(control_handle),
2753 tx_id: header.tx_id,
2754 },
2755 })
2756 }
2757 _ if header.tx_id == 0
2758 && header
2759 .dynamic_flags()
2760 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2761 {
2762 Ok(CapabilityStoreRequest::_UnknownMethod {
2763 ordinal: header.ordinal,
2764 control_handle: CapabilityStoreControlHandle {
2765 inner: this.inner.clone(),
2766 },
2767 method_type: fidl::MethodType::OneWay,
2768 })
2769 }
2770 _ if header
2771 .dynamic_flags()
2772 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2773 {
2774 this.inner.send_framework_err(
2775 fidl::encoding::FrameworkErr::UnknownMethod,
2776 header.tx_id,
2777 header.ordinal,
2778 header.dynamic_flags(),
2779 (bytes, handles),
2780 )?;
2781 Ok(CapabilityStoreRequest::_UnknownMethod {
2782 ordinal: header.ordinal,
2783 control_handle: CapabilityStoreControlHandle {
2784 inner: this.inner.clone(),
2785 },
2786 method_type: fidl::MethodType::TwoWay,
2787 })
2788 }
2789 _ => Err(fidl::Error::UnknownOrdinal {
2790 ordinal: header.ordinal,
2791 protocol_name:
2792 <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2793 }),
2794 }))
2795 },
2796 )
2797 }
2798}
2799
2800#[derive(Debug)]
2824pub enum CapabilityStoreRequest {
2825 Duplicate { id: u64, dest_id: u64, responder: CapabilityStoreDuplicateResponder },
2833 Drop { id: u64, responder: CapabilityStoreDropResponder },
2839 Export { id: u64, responder: CapabilityStoreExportResponder },
2847 Import { id: u64, capability: Capability, responder: CapabilityStoreImportResponder },
2854 ConnectorCreate {
2861 id: u64,
2862 receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
2863 responder: CapabilityStoreConnectorCreateResponder,
2864 },
2865 ConnectorOpen {
2875 id: u64,
2876 server_end: fidl::Channel,
2877 responder: CapabilityStoreConnectorOpenResponder,
2878 },
2879 DirConnectorCreate {
2886 id: u64,
2887 receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
2888 responder: CapabilityStoreDirConnectorCreateResponder,
2889 },
2890 DirConnectorOpen {
2904 payload: CapabilityStoreDirConnectorOpenRequest,
2905 responder: CapabilityStoreDirConnectorOpenResponder,
2906 },
2907 DictionaryCreate { id: u64, responder: CapabilityStoreDictionaryCreateResponder },
2913 DictionaryLegacyImport {
2923 id: u64,
2924 client_end: fidl::Channel,
2925 responder: CapabilityStoreDictionaryLegacyImportResponder,
2926 },
2927 DictionaryLegacyExport {
2937 id: u64,
2938 server_end: fidl::Channel,
2939 responder: CapabilityStoreDictionaryLegacyExportResponder,
2940 },
2941 DictionaryInsert {
2951 id: u64,
2952 item: DictionaryItem,
2953 responder: CapabilityStoreDictionaryInsertResponder,
2954 },
2955 DictionaryGet {
2967 id: u64,
2968 key: String,
2969 dest_id: u64,
2970 responder: CapabilityStoreDictionaryGetResponder,
2971 },
2972 DictionaryRemove {
2983 id: u64,
2984 key: String,
2985 dest_id: Option<Box<WrappedCapabilityId>>,
2986 responder: CapabilityStoreDictionaryRemoveResponder,
2987 },
2988 DictionaryCopy { id: u64, dest_id: u64, responder: CapabilityStoreDictionaryCopyResponder },
3004 DictionaryKeys {
3011 id: u64,
3012 iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
3013 responder: CapabilityStoreDictionaryKeysResponder,
3014 },
3015 DictionaryEnumerate {
3025 id: u64,
3026 iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
3027 responder: CapabilityStoreDictionaryEnumerateResponder,
3028 },
3029 DictionaryDrain {
3037 id: u64,
3038 iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
3039 responder: CapabilityStoreDictionaryDrainResponder,
3040 },
3041 CreateServiceAggregate {
3044 sources: Vec<AggregateSource>,
3045 responder: CapabilityStoreCreateServiceAggregateResponder,
3046 },
3047 #[non_exhaustive]
3049 _UnknownMethod {
3050 ordinal: u64,
3052 control_handle: CapabilityStoreControlHandle,
3053 method_type: fidl::MethodType,
3054 },
3055}
3056
3057impl CapabilityStoreRequest {
3058 #[allow(irrefutable_let_patterns)]
3059 pub fn into_duplicate(self) -> Option<(u64, u64, CapabilityStoreDuplicateResponder)> {
3060 if let CapabilityStoreRequest::Duplicate { id, dest_id, responder } = self {
3061 Some((id, dest_id, responder))
3062 } else {
3063 None
3064 }
3065 }
3066
3067 #[allow(irrefutable_let_patterns)]
3068 pub fn into_drop(self) -> Option<(u64, CapabilityStoreDropResponder)> {
3069 if let CapabilityStoreRequest::Drop { id, responder } = self {
3070 Some((id, responder))
3071 } else {
3072 None
3073 }
3074 }
3075
3076 #[allow(irrefutable_let_patterns)]
3077 pub fn into_export(self) -> Option<(u64, CapabilityStoreExportResponder)> {
3078 if let CapabilityStoreRequest::Export { id, responder } = self {
3079 Some((id, responder))
3080 } else {
3081 None
3082 }
3083 }
3084
3085 #[allow(irrefutable_let_patterns)]
3086 pub fn into_import(self) -> Option<(u64, Capability, CapabilityStoreImportResponder)> {
3087 if let CapabilityStoreRequest::Import { id, capability, responder } = self {
3088 Some((id, capability, responder))
3089 } else {
3090 None
3091 }
3092 }
3093
3094 #[allow(irrefutable_let_patterns)]
3095 pub fn into_connector_create(
3096 self,
3097 ) -> Option<(
3098 u64,
3099 fidl::endpoints::ClientEnd<ReceiverMarker>,
3100 CapabilityStoreConnectorCreateResponder,
3101 )> {
3102 if let CapabilityStoreRequest::ConnectorCreate { id, receiver, responder } = self {
3103 Some((id, receiver, responder))
3104 } else {
3105 None
3106 }
3107 }
3108
3109 #[allow(irrefutable_let_patterns)]
3110 pub fn into_connector_open(
3111 self,
3112 ) -> Option<(u64, fidl::Channel, CapabilityStoreConnectorOpenResponder)> {
3113 if let CapabilityStoreRequest::ConnectorOpen { id, server_end, responder } = self {
3114 Some((id, server_end, responder))
3115 } else {
3116 None
3117 }
3118 }
3119
3120 #[allow(irrefutable_let_patterns)]
3121 pub fn into_dir_connector_create(
3122 self,
3123 ) -> Option<(
3124 u64,
3125 fidl::endpoints::ClientEnd<DirReceiverMarker>,
3126 CapabilityStoreDirConnectorCreateResponder,
3127 )> {
3128 if let CapabilityStoreRequest::DirConnectorCreate { id, receiver, responder } = self {
3129 Some((id, receiver, responder))
3130 } else {
3131 None
3132 }
3133 }
3134
3135 #[allow(irrefutable_let_patterns)]
3136 pub fn into_dir_connector_open(
3137 self,
3138 ) -> Option<(CapabilityStoreDirConnectorOpenRequest, CapabilityStoreDirConnectorOpenResponder)>
3139 {
3140 if let CapabilityStoreRequest::DirConnectorOpen { payload, responder } = self {
3141 Some((payload, responder))
3142 } else {
3143 None
3144 }
3145 }
3146
3147 #[allow(irrefutable_let_patterns)]
3148 pub fn into_dictionary_create(self) -> Option<(u64, CapabilityStoreDictionaryCreateResponder)> {
3149 if let CapabilityStoreRequest::DictionaryCreate { id, responder } = self {
3150 Some((id, responder))
3151 } else {
3152 None
3153 }
3154 }
3155
3156 #[allow(irrefutable_let_patterns)]
3157 pub fn into_dictionary_legacy_import(
3158 self,
3159 ) -> Option<(u64, fidl::Channel, CapabilityStoreDictionaryLegacyImportResponder)> {
3160 if let CapabilityStoreRequest::DictionaryLegacyImport { id, client_end, responder } = self {
3161 Some((id, client_end, responder))
3162 } else {
3163 None
3164 }
3165 }
3166
3167 #[allow(irrefutable_let_patterns)]
3168 pub fn into_dictionary_legacy_export(
3169 self,
3170 ) -> Option<(u64, fidl::Channel, CapabilityStoreDictionaryLegacyExportResponder)> {
3171 if let CapabilityStoreRequest::DictionaryLegacyExport { id, server_end, responder } = self {
3172 Some((id, server_end, responder))
3173 } else {
3174 None
3175 }
3176 }
3177
3178 #[allow(irrefutable_let_patterns)]
3179 pub fn into_dictionary_insert(
3180 self,
3181 ) -> Option<(u64, DictionaryItem, CapabilityStoreDictionaryInsertResponder)> {
3182 if let CapabilityStoreRequest::DictionaryInsert { id, item, responder } = self {
3183 Some((id, item, responder))
3184 } else {
3185 None
3186 }
3187 }
3188
3189 #[allow(irrefutable_let_patterns)]
3190 pub fn into_dictionary_get(
3191 self,
3192 ) -> Option<(u64, String, u64, CapabilityStoreDictionaryGetResponder)> {
3193 if let CapabilityStoreRequest::DictionaryGet { id, key, dest_id, responder } = self {
3194 Some((id, key, dest_id, responder))
3195 } else {
3196 None
3197 }
3198 }
3199
3200 #[allow(irrefutable_let_patterns)]
3201 pub fn into_dictionary_remove(
3202 self,
3203 ) -> Option<(
3204 u64,
3205 String,
3206 Option<Box<WrappedCapabilityId>>,
3207 CapabilityStoreDictionaryRemoveResponder,
3208 )> {
3209 if let CapabilityStoreRequest::DictionaryRemove { id, key, dest_id, responder } = self {
3210 Some((id, key, dest_id, responder))
3211 } else {
3212 None
3213 }
3214 }
3215
3216 #[allow(irrefutable_let_patterns)]
3217 pub fn into_dictionary_copy(
3218 self,
3219 ) -> Option<(u64, u64, CapabilityStoreDictionaryCopyResponder)> {
3220 if let CapabilityStoreRequest::DictionaryCopy { id, dest_id, responder } = self {
3221 Some((id, dest_id, responder))
3222 } else {
3223 None
3224 }
3225 }
3226
3227 #[allow(irrefutable_let_patterns)]
3228 pub fn into_dictionary_keys(
3229 self,
3230 ) -> Option<(
3231 u64,
3232 fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
3233 CapabilityStoreDictionaryKeysResponder,
3234 )> {
3235 if let CapabilityStoreRequest::DictionaryKeys { id, iterator, responder } = self {
3236 Some((id, iterator, responder))
3237 } else {
3238 None
3239 }
3240 }
3241
3242 #[allow(irrefutable_let_patterns)]
3243 pub fn into_dictionary_enumerate(
3244 self,
3245 ) -> Option<(
3246 u64,
3247 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
3248 CapabilityStoreDictionaryEnumerateResponder,
3249 )> {
3250 if let CapabilityStoreRequest::DictionaryEnumerate { id, iterator, responder } = self {
3251 Some((id, iterator, responder))
3252 } else {
3253 None
3254 }
3255 }
3256
3257 #[allow(irrefutable_let_patterns)]
3258 pub fn into_dictionary_drain(
3259 self,
3260 ) -> Option<(
3261 u64,
3262 Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
3263 CapabilityStoreDictionaryDrainResponder,
3264 )> {
3265 if let CapabilityStoreRequest::DictionaryDrain { id, iterator, responder } = self {
3266 Some((id, iterator, responder))
3267 } else {
3268 None
3269 }
3270 }
3271
3272 #[allow(irrefutable_let_patterns)]
3273 pub fn into_create_service_aggregate(
3274 self,
3275 ) -> Option<(Vec<AggregateSource>, CapabilityStoreCreateServiceAggregateResponder)> {
3276 if let CapabilityStoreRequest::CreateServiceAggregate { sources, responder } = self {
3277 Some((sources, responder))
3278 } else {
3279 None
3280 }
3281 }
3282
3283 pub fn method_name(&self) -> &'static str {
3285 match *self {
3286 CapabilityStoreRequest::Duplicate { .. } => "duplicate",
3287 CapabilityStoreRequest::Drop { .. } => "drop",
3288 CapabilityStoreRequest::Export { .. } => "export",
3289 CapabilityStoreRequest::Import { .. } => "import",
3290 CapabilityStoreRequest::ConnectorCreate { .. } => "connector_create",
3291 CapabilityStoreRequest::ConnectorOpen { .. } => "connector_open",
3292 CapabilityStoreRequest::DirConnectorCreate { .. } => "dir_connector_create",
3293 CapabilityStoreRequest::DirConnectorOpen { .. } => "dir_connector_open",
3294 CapabilityStoreRequest::DictionaryCreate { .. } => "dictionary_create",
3295 CapabilityStoreRequest::DictionaryLegacyImport { .. } => "dictionary_legacy_import",
3296 CapabilityStoreRequest::DictionaryLegacyExport { .. } => "dictionary_legacy_export",
3297 CapabilityStoreRequest::DictionaryInsert { .. } => "dictionary_insert",
3298 CapabilityStoreRequest::DictionaryGet { .. } => "dictionary_get",
3299 CapabilityStoreRequest::DictionaryRemove { .. } => "dictionary_remove",
3300 CapabilityStoreRequest::DictionaryCopy { .. } => "dictionary_copy",
3301 CapabilityStoreRequest::DictionaryKeys { .. } => "dictionary_keys",
3302 CapabilityStoreRequest::DictionaryEnumerate { .. } => "dictionary_enumerate",
3303 CapabilityStoreRequest::DictionaryDrain { .. } => "dictionary_drain",
3304 CapabilityStoreRequest::CreateServiceAggregate { .. } => "create_service_aggregate",
3305 CapabilityStoreRequest::_UnknownMethod {
3306 method_type: fidl::MethodType::OneWay,
3307 ..
3308 } => "unknown one-way method",
3309 CapabilityStoreRequest::_UnknownMethod {
3310 method_type: fidl::MethodType::TwoWay,
3311 ..
3312 } => "unknown two-way method",
3313 }
3314 }
3315}
3316
3317#[derive(Debug, Clone)]
3318pub struct CapabilityStoreControlHandle {
3319 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3320}
3321
3322impl fidl::endpoints::ControlHandle for CapabilityStoreControlHandle {
3323 fn shutdown(&self) {
3324 self.inner.shutdown()
3325 }
3326
3327 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3328 self.inner.shutdown_with_epitaph(status)
3329 }
3330
3331 fn is_closed(&self) -> bool {
3332 self.inner.channel().is_closed()
3333 }
3334 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3335 self.inner.channel().on_closed()
3336 }
3337
3338 #[cfg(target_os = "fuchsia")]
3339 fn signal_peer(
3340 &self,
3341 clear_mask: zx::Signals,
3342 set_mask: zx::Signals,
3343 ) -> Result<(), zx_status::Status> {
3344 use fidl::Peered;
3345 self.inner.channel().signal_peer(clear_mask, set_mask)
3346 }
3347}
3348
3349impl CapabilityStoreControlHandle {}
3350
3351#[must_use = "FIDL methods require a response to be sent"]
3352#[derive(Debug)]
3353pub struct CapabilityStoreDuplicateResponder {
3354 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3355 tx_id: u32,
3356}
3357
3358impl std::ops::Drop for CapabilityStoreDuplicateResponder {
3362 fn drop(&mut self) {
3363 self.control_handle.shutdown();
3364 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3366 }
3367}
3368
3369impl fidl::endpoints::Responder for CapabilityStoreDuplicateResponder {
3370 type ControlHandle = CapabilityStoreControlHandle;
3371
3372 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3373 &self.control_handle
3374 }
3375
3376 fn drop_without_shutdown(mut self) {
3377 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3379 std::mem::forget(self);
3381 }
3382}
3383
3384impl CapabilityStoreDuplicateResponder {
3385 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3389 let _result = self.send_raw(result);
3390 if _result.is_err() {
3391 self.control_handle.shutdown();
3392 }
3393 self.drop_without_shutdown();
3394 _result
3395 }
3396
3397 pub fn send_no_shutdown_on_err(
3399 self,
3400 mut result: Result<(), CapabilityStoreError>,
3401 ) -> Result<(), fidl::Error> {
3402 let _result = self.send_raw(result);
3403 self.drop_without_shutdown();
3404 _result
3405 }
3406
3407 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3408 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3409 fidl::encoding::EmptyStruct,
3410 CapabilityStoreError,
3411 >>(
3412 fidl::encoding::FlexibleResult::new(result),
3413 self.tx_id,
3414 0x5d5d35d9c20a2184,
3415 fidl::encoding::DynamicFlags::FLEXIBLE,
3416 )
3417 }
3418}
3419
3420#[must_use = "FIDL methods require a response to be sent"]
3421#[derive(Debug)]
3422pub struct CapabilityStoreDropResponder {
3423 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3424 tx_id: u32,
3425}
3426
3427impl std::ops::Drop for CapabilityStoreDropResponder {
3431 fn drop(&mut self) {
3432 self.control_handle.shutdown();
3433 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3435 }
3436}
3437
3438impl fidl::endpoints::Responder for CapabilityStoreDropResponder {
3439 type ControlHandle = CapabilityStoreControlHandle;
3440
3441 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3442 &self.control_handle
3443 }
3444
3445 fn drop_without_shutdown(mut self) {
3446 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3448 std::mem::forget(self);
3450 }
3451}
3452
3453impl CapabilityStoreDropResponder {
3454 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3458 let _result = self.send_raw(result);
3459 if _result.is_err() {
3460 self.control_handle.shutdown();
3461 }
3462 self.drop_without_shutdown();
3463 _result
3464 }
3465
3466 pub fn send_no_shutdown_on_err(
3468 self,
3469 mut result: Result<(), CapabilityStoreError>,
3470 ) -> Result<(), fidl::Error> {
3471 let _result = self.send_raw(result);
3472 self.drop_without_shutdown();
3473 _result
3474 }
3475
3476 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3477 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3478 fidl::encoding::EmptyStruct,
3479 CapabilityStoreError,
3480 >>(
3481 fidl::encoding::FlexibleResult::new(result),
3482 self.tx_id,
3483 0xa745c0990fc2559,
3484 fidl::encoding::DynamicFlags::FLEXIBLE,
3485 )
3486 }
3487}
3488
3489#[must_use = "FIDL methods require a response to be sent"]
3490#[derive(Debug)]
3491pub struct CapabilityStoreExportResponder {
3492 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3493 tx_id: u32,
3494}
3495
3496impl std::ops::Drop for CapabilityStoreExportResponder {
3500 fn drop(&mut self) {
3501 self.control_handle.shutdown();
3502 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3504 }
3505}
3506
3507impl fidl::endpoints::Responder for CapabilityStoreExportResponder {
3508 type ControlHandle = CapabilityStoreControlHandle;
3509
3510 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3511 &self.control_handle
3512 }
3513
3514 fn drop_without_shutdown(mut self) {
3515 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3517 std::mem::forget(self);
3519 }
3520}
3521
3522impl CapabilityStoreExportResponder {
3523 pub fn send(
3527 self,
3528 mut result: Result<Capability, CapabilityStoreError>,
3529 ) -> Result<(), fidl::Error> {
3530 let _result = self.send_raw(result);
3531 if _result.is_err() {
3532 self.control_handle.shutdown();
3533 }
3534 self.drop_without_shutdown();
3535 _result
3536 }
3537
3538 pub fn send_no_shutdown_on_err(
3540 self,
3541 mut result: Result<Capability, CapabilityStoreError>,
3542 ) -> Result<(), fidl::Error> {
3543 let _result = self.send_raw(result);
3544 self.drop_without_shutdown();
3545 _result
3546 }
3547
3548 fn send_raw(
3549 &self,
3550 mut result: Result<Capability, CapabilityStoreError>,
3551 ) -> Result<(), fidl::Error> {
3552 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3553 CapabilityStoreExportResponse,
3554 CapabilityStoreError,
3555 >>(
3556 fidl::encoding::FlexibleResult::new(
3557 result.as_mut().map_err(|e| *e).map(|capability| (capability,)),
3558 ),
3559 self.tx_id,
3560 0x3237a8f4748faff,
3561 fidl::encoding::DynamicFlags::FLEXIBLE,
3562 )
3563 }
3564}
3565
3566#[must_use = "FIDL methods require a response to be sent"]
3567#[derive(Debug)]
3568pub struct CapabilityStoreImportResponder {
3569 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3570 tx_id: u32,
3571}
3572
3573impl std::ops::Drop for CapabilityStoreImportResponder {
3577 fn drop(&mut self) {
3578 self.control_handle.shutdown();
3579 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3581 }
3582}
3583
3584impl fidl::endpoints::Responder for CapabilityStoreImportResponder {
3585 type ControlHandle = CapabilityStoreControlHandle;
3586
3587 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3588 &self.control_handle
3589 }
3590
3591 fn drop_without_shutdown(mut self) {
3592 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3594 std::mem::forget(self);
3596 }
3597}
3598
3599impl CapabilityStoreImportResponder {
3600 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3604 let _result = self.send_raw(result);
3605 if _result.is_err() {
3606 self.control_handle.shutdown();
3607 }
3608 self.drop_without_shutdown();
3609 _result
3610 }
3611
3612 pub fn send_no_shutdown_on_err(
3614 self,
3615 mut result: Result<(), CapabilityStoreError>,
3616 ) -> Result<(), fidl::Error> {
3617 let _result = self.send_raw(result);
3618 self.drop_without_shutdown();
3619 _result
3620 }
3621
3622 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3623 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3624 fidl::encoding::EmptyStruct,
3625 CapabilityStoreError,
3626 >>(
3627 fidl::encoding::FlexibleResult::new(result),
3628 self.tx_id,
3629 0x1f96157a29f4539b,
3630 fidl::encoding::DynamicFlags::FLEXIBLE,
3631 )
3632 }
3633}
3634
3635#[must_use = "FIDL methods require a response to be sent"]
3636#[derive(Debug)]
3637pub struct CapabilityStoreConnectorCreateResponder {
3638 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3639 tx_id: u32,
3640}
3641
3642impl std::ops::Drop for CapabilityStoreConnectorCreateResponder {
3646 fn drop(&mut self) {
3647 self.control_handle.shutdown();
3648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3650 }
3651}
3652
3653impl fidl::endpoints::Responder for CapabilityStoreConnectorCreateResponder {
3654 type ControlHandle = CapabilityStoreControlHandle;
3655
3656 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3657 &self.control_handle
3658 }
3659
3660 fn drop_without_shutdown(mut self) {
3661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3663 std::mem::forget(self);
3665 }
3666}
3667
3668impl CapabilityStoreConnectorCreateResponder {
3669 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3673 let _result = self.send_raw(result);
3674 if _result.is_err() {
3675 self.control_handle.shutdown();
3676 }
3677 self.drop_without_shutdown();
3678 _result
3679 }
3680
3681 pub fn send_no_shutdown_on_err(
3683 self,
3684 mut result: Result<(), CapabilityStoreError>,
3685 ) -> Result<(), fidl::Error> {
3686 let _result = self.send_raw(result);
3687 self.drop_without_shutdown();
3688 _result
3689 }
3690
3691 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3692 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3693 fidl::encoding::EmptyStruct,
3694 CapabilityStoreError,
3695 >>(
3696 fidl::encoding::FlexibleResult::new(result),
3697 self.tx_id,
3698 0x29592c5d63e91c25,
3699 fidl::encoding::DynamicFlags::FLEXIBLE,
3700 )
3701 }
3702}
3703
3704#[must_use = "FIDL methods require a response to be sent"]
3705#[derive(Debug)]
3706pub struct CapabilityStoreConnectorOpenResponder {
3707 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3708 tx_id: u32,
3709}
3710
3711impl std::ops::Drop for CapabilityStoreConnectorOpenResponder {
3715 fn drop(&mut self) {
3716 self.control_handle.shutdown();
3717 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3719 }
3720}
3721
3722impl fidl::endpoints::Responder for CapabilityStoreConnectorOpenResponder {
3723 type ControlHandle = CapabilityStoreControlHandle;
3724
3725 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3726 &self.control_handle
3727 }
3728
3729 fn drop_without_shutdown(mut self) {
3730 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3732 std::mem::forget(self);
3734 }
3735}
3736
3737impl CapabilityStoreConnectorOpenResponder {
3738 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3742 let _result = self.send_raw(result);
3743 if _result.is_err() {
3744 self.control_handle.shutdown();
3745 }
3746 self.drop_without_shutdown();
3747 _result
3748 }
3749
3750 pub fn send_no_shutdown_on_err(
3752 self,
3753 mut result: Result<(), CapabilityStoreError>,
3754 ) -> Result<(), fidl::Error> {
3755 let _result = self.send_raw(result);
3756 self.drop_without_shutdown();
3757 _result
3758 }
3759
3760 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3761 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3762 fidl::encoding::EmptyStruct,
3763 CapabilityStoreError,
3764 >>(
3765 fidl::encoding::FlexibleResult::new(result),
3766 self.tx_id,
3767 0x537e69ab40563b9f,
3768 fidl::encoding::DynamicFlags::FLEXIBLE,
3769 )
3770 }
3771}
3772
3773#[must_use = "FIDL methods require a response to be sent"]
3774#[derive(Debug)]
3775pub struct CapabilityStoreDirConnectorCreateResponder {
3776 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3777 tx_id: u32,
3778}
3779
3780impl std::ops::Drop for CapabilityStoreDirConnectorCreateResponder {
3784 fn drop(&mut self) {
3785 self.control_handle.shutdown();
3786 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3788 }
3789}
3790
3791impl fidl::endpoints::Responder for CapabilityStoreDirConnectorCreateResponder {
3792 type ControlHandle = CapabilityStoreControlHandle;
3793
3794 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3795 &self.control_handle
3796 }
3797
3798 fn drop_without_shutdown(mut self) {
3799 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3801 std::mem::forget(self);
3803 }
3804}
3805
3806impl CapabilityStoreDirConnectorCreateResponder {
3807 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3811 let _result = self.send_raw(result);
3812 if _result.is_err() {
3813 self.control_handle.shutdown();
3814 }
3815 self.drop_without_shutdown();
3816 _result
3817 }
3818
3819 pub fn send_no_shutdown_on_err(
3821 self,
3822 mut result: Result<(), CapabilityStoreError>,
3823 ) -> Result<(), fidl::Error> {
3824 let _result = self.send_raw(result);
3825 self.drop_without_shutdown();
3826 _result
3827 }
3828
3829 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3830 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3831 fidl::encoding::EmptyStruct,
3832 CapabilityStoreError,
3833 >>(
3834 fidl::encoding::FlexibleResult::new(result),
3835 self.tx_id,
3836 0x186138a11ccf19bb,
3837 fidl::encoding::DynamicFlags::FLEXIBLE,
3838 )
3839 }
3840}
3841
3842#[must_use = "FIDL methods require a response to be sent"]
3843#[derive(Debug)]
3844pub struct CapabilityStoreDirConnectorOpenResponder {
3845 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3846 tx_id: u32,
3847}
3848
3849impl std::ops::Drop for CapabilityStoreDirConnectorOpenResponder {
3853 fn drop(&mut self) {
3854 self.control_handle.shutdown();
3855 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3857 }
3858}
3859
3860impl fidl::endpoints::Responder for CapabilityStoreDirConnectorOpenResponder {
3861 type ControlHandle = CapabilityStoreControlHandle;
3862
3863 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3864 &self.control_handle
3865 }
3866
3867 fn drop_without_shutdown(mut self) {
3868 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3870 std::mem::forget(self);
3872 }
3873}
3874
3875impl CapabilityStoreDirConnectorOpenResponder {
3876 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3880 let _result = self.send_raw(result);
3881 if _result.is_err() {
3882 self.control_handle.shutdown();
3883 }
3884 self.drop_without_shutdown();
3885 _result
3886 }
3887
3888 pub fn send_no_shutdown_on_err(
3890 self,
3891 mut result: Result<(), CapabilityStoreError>,
3892 ) -> Result<(), fidl::Error> {
3893 let _result = self.send_raw(result);
3894 self.drop_without_shutdown();
3895 _result
3896 }
3897
3898 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3899 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3900 fidl::encoding::EmptyStruct,
3901 CapabilityStoreError,
3902 >>(
3903 fidl::encoding::FlexibleResult::new(result),
3904 self.tx_id,
3905 0x5650d3d6a3a13901,
3906 fidl::encoding::DynamicFlags::FLEXIBLE,
3907 )
3908 }
3909}
3910
3911#[must_use = "FIDL methods require a response to be sent"]
3912#[derive(Debug)]
3913pub struct CapabilityStoreDictionaryCreateResponder {
3914 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3915 tx_id: u32,
3916}
3917
3918impl std::ops::Drop for CapabilityStoreDictionaryCreateResponder {
3922 fn drop(&mut self) {
3923 self.control_handle.shutdown();
3924 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3926 }
3927}
3928
3929impl fidl::endpoints::Responder for CapabilityStoreDictionaryCreateResponder {
3930 type ControlHandle = CapabilityStoreControlHandle;
3931
3932 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3933 &self.control_handle
3934 }
3935
3936 fn drop_without_shutdown(mut self) {
3937 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3939 std::mem::forget(self);
3941 }
3942}
3943
3944impl CapabilityStoreDictionaryCreateResponder {
3945 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3949 let _result = self.send_raw(result);
3950 if _result.is_err() {
3951 self.control_handle.shutdown();
3952 }
3953 self.drop_without_shutdown();
3954 _result
3955 }
3956
3957 pub fn send_no_shutdown_on_err(
3959 self,
3960 mut result: Result<(), CapabilityStoreError>,
3961 ) -> Result<(), fidl::Error> {
3962 let _result = self.send_raw(result);
3963 self.drop_without_shutdown();
3964 _result
3965 }
3966
3967 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3968 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3969 fidl::encoding::EmptyStruct,
3970 CapabilityStoreError,
3971 >>(
3972 fidl::encoding::FlexibleResult::new(result),
3973 self.tx_id,
3974 0x6997c8dfc63de093,
3975 fidl::encoding::DynamicFlags::FLEXIBLE,
3976 )
3977 }
3978}
3979
3980#[must_use = "FIDL methods require a response to be sent"]
3981#[derive(Debug)]
3982pub struct CapabilityStoreDictionaryLegacyImportResponder {
3983 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3984 tx_id: u32,
3985}
3986
3987impl std::ops::Drop for CapabilityStoreDictionaryLegacyImportResponder {
3991 fn drop(&mut self) {
3992 self.control_handle.shutdown();
3993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3995 }
3996}
3997
3998impl fidl::endpoints::Responder for CapabilityStoreDictionaryLegacyImportResponder {
3999 type ControlHandle = CapabilityStoreControlHandle;
4000
4001 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4002 &self.control_handle
4003 }
4004
4005 fn drop_without_shutdown(mut self) {
4006 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4008 std::mem::forget(self);
4010 }
4011}
4012
4013impl CapabilityStoreDictionaryLegacyImportResponder {
4014 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4018 let _result = self.send_raw(result);
4019 if _result.is_err() {
4020 self.control_handle.shutdown();
4021 }
4022 self.drop_without_shutdown();
4023 _result
4024 }
4025
4026 pub fn send_no_shutdown_on_err(
4028 self,
4029 mut result: Result<(), CapabilityStoreError>,
4030 ) -> Result<(), fidl::Error> {
4031 let _result = self.send_raw(result);
4032 self.drop_without_shutdown();
4033 _result
4034 }
4035
4036 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4037 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4038 fidl::encoding::EmptyStruct,
4039 CapabilityStoreError,
4040 >>(
4041 fidl::encoding::FlexibleResult::new(result),
4042 self.tx_id,
4043 0x72fd686c37b6025f,
4044 fidl::encoding::DynamicFlags::FLEXIBLE,
4045 )
4046 }
4047}
4048
4049#[must_use = "FIDL methods require a response to be sent"]
4050#[derive(Debug)]
4051pub struct CapabilityStoreDictionaryLegacyExportResponder {
4052 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4053 tx_id: u32,
4054}
4055
4056impl std::ops::Drop for CapabilityStoreDictionaryLegacyExportResponder {
4060 fn drop(&mut self) {
4061 self.control_handle.shutdown();
4062 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4064 }
4065}
4066
4067impl fidl::endpoints::Responder for CapabilityStoreDictionaryLegacyExportResponder {
4068 type ControlHandle = CapabilityStoreControlHandle;
4069
4070 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4071 &self.control_handle
4072 }
4073
4074 fn drop_without_shutdown(mut self) {
4075 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4077 std::mem::forget(self);
4079 }
4080}
4081
4082impl CapabilityStoreDictionaryLegacyExportResponder {
4083 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4087 let _result = self.send_raw(result);
4088 if _result.is_err() {
4089 self.control_handle.shutdown();
4090 }
4091 self.drop_without_shutdown();
4092 _result
4093 }
4094
4095 pub fn send_no_shutdown_on_err(
4097 self,
4098 mut result: Result<(), CapabilityStoreError>,
4099 ) -> Result<(), fidl::Error> {
4100 let _result = self.send_raw(result);
4101 self.drop_without_shutdown();
4102 _result
4103 }
4104
4105 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4106 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4107 fidl::encoding::EmptyStruct,
4108 CapabilityStoreError,
4109 >>(
4110 fidl::encoding::FlexibleResult::new(result),
4111 self.tx_id,
4112 0x407e15cc4bde5dcd,
4113 fidl::encoding::DynamicFlags::FLEXIBLE,
4114 )
4115 }
4116}
4117
4118#[must_use = "FIDL methods require a response to be sent"]
4119#[derive(Debug)]
4120pub struct CapabilityStoreDictionaryInsertResponder {
4121 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4122 tx_id: u32,
4123}
4124
4125impl std::ops::Drop for CapabilityStoreDictionaryInsertResponder {
4129 fn drop(&mut self) {
4130 self.control_handle.shutdown();
4131 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4133 }
4134}
4135
4136impl fidl::endpoints::Responder for CapabilityStoreDictionaryInsertResponder {
4137 type ControlHandle = CapabilityStoreControlHandle;
4138
4139 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4140 &self.control_handle
4141 }
4142
4143 fn drop_without_shutdown(mut self) {
4144 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4146 std::mem::forget(self);
4148 }
4149}
4150
4151impl CapabilityStoreDictionaryInsertResponder {
4152 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4156 let _result = self.send_raw(result);
4157 if _result.is_err() {
4158 self.control_handle.shutdown();
4159 }
4160 self.drop_without_shutdown();
4161 _result
4162 }
4163
4164 pub fn send_no_shutdown_on_err(
4166 self,
4167 mut result: Result<(), CapabilityStoreError>,
4168 ) -> Result<(), fidl::Error> {
4169 let _result = self.send_raw(result);
4170 self.drop_without_shutdown();
4171 _result
4172 }
4173
4174 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4175 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4176 fidl::encoding::EmptyStruct,
4177 CapabilityStoreError,
4178 >>(
4179 fidl::encoding::FlexibleResult::new(result),
4180 self.tx_id,
4181 0x7702183689d44c27,
4182 fidl::encoding::DynamicFlags::FLEXIBLE,
4183 )
4184 }
4185}
4186
4187#[must_use = "FIDL methods require a response to be sent"]
4188#[derive(Debug)]
4189pub struct CapabilityStoreDictionaryGetResponder {
4190 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4191 tx_id: u32,
4192}
4193
4194impl std::ops::Drop for CapabilityStoreDictionaryGetResponder {
4198 fn drop(&mut self) {
4199 self.control_handle.shutdown();
4200 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4202 }
4203}
4204
4205impl fidl::endpoints::Responder for CapabilityStoreDictionaryGetResponder {
4206 type ControlHandle = CapabilityStoreControlHandle;
4207
4208 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4209 &self.control_handle
4210 }
4211
4212 fn drop_without_shutdown(mut self) {
4213 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4215 std::mem::forget(self);
4217 }
4218}
4219
4220impl CapabilityStoreDictionaryGetResponder {
4221 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4225 let _result = self.send_raw(result);
4226 if _result.is_err() {
4227 self.control_handle.shutdown();
4228 }
4229 self.drop_without_shutdown();
4230 _result
4231 }
4232
4233 pub fn send_no_shutdown_on_err(
4235 self,
4236 mut result: Result<(), CapabilityStoreError>,
4237 ) -> Result<(), fidl::Error> {
4238 let _result = self.send_raw(result);
4239 self.drop_without_shutdown();
4240 _result
4241 }
4242
4243 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4244 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4245 fidl::encoding::EmptyStruct,
4246 CapabilityStoreError,
4247 >>(
4248 fidl::encoding::FlexibleResult::new(result),
4249 self.tx_id,
4250 0x4d9e27538284add2,
4251 fidl::encoding::DynamicFlags::FLEXIBLE,
4252 )
4253 }
4254}
4255
4256#[must_use = "FIDL methods require a response to be sent"]
4257#[derive(Debug)]
4258pub struct CapabilityStoreDictionaryRemoveResponder {
4259 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4260 tx_id: u32,
4261}
4262
4263impl std::ops::Drop for CapabilityStoreDictionaryRemoveResponder {
4267 fn drop(&mut self) {
4268 self.control_handle.shutdown();
4269 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4271 }
4272}
4273
4274impl fidl::endpoints::Responder for CapabilityStoreDictionaryRemoveResponder {
4275 type ControlHandle = CapabilityStoreControlHandle;
4276
4277 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4278 &self.control_handle
4279 }
4280
4281 fn drop_without_shutdown(mut self) {
4282 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4284 std::mem::forget(self);
4286 }
4287}
4288
4289impl CapabilityStoreDictionaryRemoveResponder {
4290 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4294 let _result = self.send_raw(result);
4295 if _result.is_err() {
4296 self.control_handle.shutdown();
4297 }
4298 self.drop_without_shutdown();
4299 _result
4300 }
4301
4302 pub fn send_no_shutdown_on_err(
4304 self,
4305 mut result: Result<(), CapabilityStoreError>,
4306 ) -> Result<(), fidl::Error> {
4307 let _result = self.send_raw(result);
4308 self.drop_without_shutdown();
4309 _result
4310 }
4311
4312 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4313 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4314 fidl::encoding::EmptyStruct,
4315 CapabilityStoreError,
4316 >>(
4317 fidl::encoding::FlexibleResult::new(result),
4318 self.tx_id,
4319 0x4c5c025ab05d4f3,
4320 fidl::encoding::DynamicFlags::FLEXIBLE,
4321 )
4322 }
4323}
4324
4325#[must_use = "FIDL methods require a response to be sent"]
4326#[derive(Debug)]
4327pub struct CapabilityStoreDictionaryCopyResponder {
4328 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4329 tx_id: u32,
4330}
4331
4332impl std::ops::Drop for CapabilityStoreDictionaryCopyResponder {
4336 fn drop(&mut self) {
4337 self.control_handle.shutdown();
4338 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4340 }
4341}
4342
4343impl fidl::endpoints::Responder for CapabilityStoreDictionaryCopyResponder {
4344 type ControlHandle = CapabilityStoreControlHandle;
4345
4346 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4347 &self.control_handle
4348 }
4349
4350 fn drop_without_shutdown(mut self) {
4351 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4353 std::mem::forget(self);
4355 }
4356}
4357
4358impl CapabilityStoreDictionaryCopyResponder {
4359 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4363 let _result = self.send_raw(result);
4364 if _result.is_err() {
4365 self.control_handle.shutdown();
4366 }
4367 self.drop_without_shutdown();
4368 _result
4369 }
4370
4371 pub fn send_no_shutdown_on_err(
4373 self,
4374 mut result: Result<(), CapabilityStoreError>,
4375 ) -> Result<(), fidl::Error> {
4376 let _result = self.send_raw(result);
4377 self.drop_without_shutdown();
4378 _result
4379 }
4380
4381 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4382 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4383 fidl::encoding::EmptyStruct,
4384 CapabilityStoreError,
4385 >>(
4386 fidl::encoding::FlexibleResult::new(result),
4387 self.tx_id,
4388 0x3733ecdf4ea1b44f,
4389 fidl::encoding::DynamicFlags::FLEXIBLE,
4390 )
4391 }
4392}
4393
4394#[must_use = "FIDL methods require a response to be sent"]
4395#[derive(Debug)]
4396pub struct CapabilityStoreDictionaryKeysResponder {
4397 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4398 tx_id: u32,
4399}
4400
4401impl std::ops::Drop for CapabilityStoreDictionaryKeysResponder {
4405 fn drop(&mut self) {
4406 self.control_handle.shutdown();
4407 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4409 }
4410}
4411
4412impl fidl::endpoints::Responder for CapabilityStoreDictionaryKeysResponder {
4413 type ControlHandle = CapabilityStoreControlHandle;
4414
4415 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4416 &self.control_handle
4417 }
4418
4419 fn drop_without_shutdown(mut self) {
4420 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4422 std::mem::forget(self);
4424 }
4425}
4426
4427impl CapabilityStoreDictionaryKeysResponder {
4428 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4432 let _result = self.send_raw(result);
4433 if _result.is_err() {
4434 self.control_handle.shutdown();
4435 }
4436 self.drop_without_shutdown();
4437 _result
4438 }
4439
4440 pub fn send_no_shutdown_on_err(
4442 self,
4443 mut result: Result<(), CapabilityStoreError>,
4444 ) -> Result<(), fidl::Error> {
4445 let _result = self.send_raw(result);
4446 self.drop_without_shutdown();
4447 _result
4448 }
4449
4450 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4451 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4452 fidl::encoding::EmptyStruct,
4453 CapabilityStoreError,
4454 >>(
4455 fidl::encoding::FlexibleResult::new(result),
4456 self.tx_id,
4457 0x84b05577ceaec9e,
4458 fidl::encoding::DynamicFlags::FLEXIBLE,
4459 )
4460 }
4461}
4462
4463#[must_use = "FIDL methods require a response to be sent"]
4464#[derive(Debug)]
4465pub struct CapabilityStoreDictionaryEnumerateResponder {
4466 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4467 tx_id: u32,
4468}
4469
4470impl std::ops::Drop for CapabilityStoreDictionaryEnumerateResponder {
4474 fn drop(&mut self) {
4475 self.control_handle.shutdown();
4476 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4478 }
4479}
4480
4481impl fidl::endpoints::Responder for CapabilityStoreDictionaryEnumerateResponder {
4482 type ControlHandle = CapabilityStoreControlHandle;
4483
4484 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4485 &self.control_handle
4486 }
4487
4488 fn drop_without_shutdown(mut self) {
4489 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4491 std::mem::forget(self);
4493 }
4494}
4495
4496impl CapabilityStoreDictionaryEnumerateResponder {
4497 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4501 let _result = self.send_raw(result);
4502 if _result.is_err() {
4503 self.control_handle.shutdown();
4504 }
4505 self.drop_without_shutdown();
4506 _result
4507 }
4508
4509 pub fn send_no_shutdown_on_err(
4511 self,
4512 mut result: Result<(), CapabilityStoreError>,
4513 ) -> Result<(), fidl::Error> {
4514 let _result = self.send_raw(result);
4515 self.drop_without_shutdown();
4516 _result
4517 }
4518
4519 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4520 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4521 fidl::encoding::EmptyStruct,
4522 CapabilityStoreError,
4523 >>(
4524 fidl::encoding::FlexibleResult::new(result),
4525 self.tx_id,
4526 0xd6279b6ced04641,
4527 fidl::encoding::DynamicFlags::FLEXIBLE,
4528 )
4529 }
4530}
4531
4532#[must_use = "FIDL methods require a response to be sent"]
4533#[derive(Debug)]
4534pub struct CapabilityStoreDictionaryDrainResponder {
4535 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4536 tx_id: u32,
4537}
4538
4539impl std::ops::Drop for CapabilityStoreDictionaryDrainResponder {
4543 fn drop(&mut self) {
4544 self.control_handle.shutdown();
4545 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4547 }
4548}
4549
4550impl fidl::endpoints::Responder for CapabilityStoreDictionaryDrainResponder {
4551 type ControlHandle = CapabilityStoreControlHandle;
4552
4553 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4554 &self.control_handle
4555 }
4556
4557 fn drop_without_shutdown(mut self) {
4558 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4560 std::mem::forget(self);
4562 }
4563}
4564
4565impl CapabilityStoreDictionaryDrainResponder {
4566 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4570 let _result = self.send_raw(result);
4571 if _result.is_err() {
4572 self.control_handle.shutdown();
4573 }
4574 self.drop_without_shutdown();
4575 _result
4576 }
4577
4578 pub fn send_no_shutdown_on_err(
4580 self,
4581 mut result: Result<(), CapabilityStoreError>,
4582 ) -> Result<(), fidl::Error> {
4583 let _result = self.send_raw(result);
4584 self.drop_without_shutdown();
4585 _result
4586 }
4587
4588 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4589 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4590 fidl::encoding::EmptyStruct,
4591 CapabilityStoreError,
4592 >>(
4593 fidl::encoding::FlexibleResult::new(result),
4594 self.tx_id,
4595 0x28a3a3f84d928cd8,
4596 fidl::encoding::DynamicFlags::FLEXIBLE,
4597 )
4598 }
4599}
4600
4601#[must_use = "FIDL methods require a response to be sent"]
4602#[derive(Debug)]
4603pub struct CapabilityStoreCreateServiceAggregateResponder {
4604 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4605 tx_id: u32,
4606}
4607
4608impl std::ops::Drop for CapabilityStoreCreateServiceAggregateResponder {
4612 fn drop(&mut self) {
4613 self.control_handle.shutdown();
4614 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4616 }
4617}
4618
4619impl fidl::endpoints::Responder for CapabilityStoreCreateServiceAggregateResponder {
4620 type ControlHandle = CapabilityStoreControlHandle;
4621
4622 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4623 &self.control_handle
4624 }
4625
4626 fn drop_without_shutdown(mut self) {
4627 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4629 std::mem::forget(self);
4631 }
4632}
4633
4634impl CapabilityStoreCreateServiceAggregateResponder {
4635 pub fn send(
4639 self,
4640 mut result: Result<DirConnector, CapabilityStoreError>,
4641 ) -> Result<(), fidl::Error> {
4642 let _result = self.send_raw(result);
4643 if _result.is_err() {
4644 self.control_handle.shutdown();
4645 }
4646 self.drop_without_shutdown();
4647 _result
4648 }
4649
4650 pub fn send_no_shutdown_on_err(
4652 self,
4653 mut result: Result<DirConnector, CapabilityStoreError>,
4654 ) -> Result<(), fidl::Error> {
4655 let _result = self.send_raw(result);
4656 self.drop_without_shutdown();
4657 _result
4658 }
4659
4660 fn send_raw(
4661 &self,
4662 mut result: Result<DirConnector, CapabilityStoreError>,
4663 ) -> Result<(), fidl::Error> {
4664 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4665 CapabilityStoreCreateServiceAggregateResponse,
4666 CapabilityStoreError,
4667 >>(
4668 fidl::encoding::FlexibleResult::new(
4669 result
4670 .as_mut()
4671 .map_err(|e| *e)
4672 .map(|aggregate_dir_connector| (aggregate_dir_connector,)),
4673 ),
4674 self.tx_id,
4675 0x4584116c8085885a,
4676 fidl::encoding::DynamicFlags::FLEXIBLE,
4677 )
4678 }
4679}
4680
4681#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4682pub struct ConnectorRouterMarker;
4683
4684impl fidl::endpoints::ProtocolMarker for ConnectorRouterMarker {
4685 type Proxy = ConnectorRouterProxy;
4686 type RequestStream = ConnectorRouterRequestStream;
4687 #[cfg(target_os = "fuchsia")]
4688 type SynchronousProxy = ConnectorRouterSynchronousProxy;
4689
4690 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
4691}
4692impl fidl::endpoints::DiscoverableProtocolMarker for ConnectorRouterMarker {}
4693pub type ConnectorRouterRouteResult = Result<ConnectorRouterRouteResponse, RouterError>;
4694
4695pub trait ConnectorRouterProxyInterface: Send + Sync {
4696 type RouteResponseFut: std::future::Future<Output = Result<ConnectorRouterRouteResult, fidl::Error>>
4697 + Send;
4698 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4699}
4700#[derive(Debug)]
4701#[cfg(target_os = "fuchsia")]
4702pub struct ConnectorRouterSynchronousProxy {
4703 client: fidl::client::sync::Client,
4704}
4705
4706#[cfg(target_os = "fuchsia")]
4707impl fidl::endpoints::SynchronousProxy for ConnectorRouterSynchronousProxy {
4708 type Proxy = ConnectorRouterProxy;
4709 type Protocol = ConnectorRouterMarker;
4710
4711 fn from_channel(inner: fidl::Channel) -> Self {
4712 Self::new(inner)
4713 }
4714
4715 fn into_channel(self) -> fidl::Channel {
4716 self.client.into_channel()
4717 }
4718
4719 fn as_channel(&self) -> &fidl::Channel {
4720 self.client.as_channel()
4721 }
4722}
4723
4724#[cfg(target_os = "fuchsia")]
4725impl ConnectorRouterSynchronousProxy {
4726 pub fn new(channel: fidl::Channel) -> Self {
4727 Self { client: fidl::client::sync::Client::new(channel) }
4728 }
4729
4730 pub fn into_channel(self) -> fidl::Channel {
4731 self.client.into_channel()
4732 }
4733
4734 pub fn wait_for_event(
4737 &self,
4738 deadline: zx::MonotonicInstant,
4739 ) -> Result<ConnectorRouterEvent, fidl::Error> {
4740 ConnectorRouterEvent::decode(self.client.wait_for_event::<ConnectorRouterMarker>(deadline)?)
4741 }
4742
4743 pub fn r#route(
4744 &self,
4745 mut payload: RouteRequest,
4746 ___deadline: zx::MonotonicInstant,
4747 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
4748 let _response = self.client.send_query::<
4749 RouteRequest,
4750 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
4751 ConnectorRouterMarker,
4752 >(
4753 &mut payload,
4754 0x74dbb8bc13730766,
4755 fidl::encoding::DynamicFlags::FLEXIBLE,
4756 ___deadline,
4757 )?
4758 .into_result::<ConnectorRouterMarker>("route")?;
4759 Ok(_response.map(|x| x))
4760 }
4761}
4762
4763#[cfg(target_os = "fuchsia")]
4764impl From<ConnectorRouterSynchronousProxy> for zx::NullableHandle {
4765 fn from(value: ConnectorRouterSynchronousProxy) -> Self {
4766 value.into_channel().into()
4767 }
4768}
4769
4770#[cfg(target_os = "fuchsia")]
4771impl From<fidl::Channel> for ConnectorRouterSynchronousProxy {
4772 fn from(value: fidl::Channel) -> Self {
4773 Self::new(value)
4774 }
4775}
4776
4777#[cfg(target_os = "fuchsia")]
4778impl fidl::endpoints::FromClient for ConnectorRouterSynchronousProxy {
4779 type Protocol = ConnectorRouterMarker;
4780
4781 fn from_client(value: fidl::endpoints::ClientEnd<ConnectorRouterMarker>) -> Self {
4782 Self::new(value.into_channel())
4783 }
4784}
4785
4786#[derive(Debug, Clone)]
4787pub struct ConnectorRouterProxy {
4788 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4789}
4790
4791impl fidl::endpoints::Proxy for ConnectorRouterProxy {
4792 type Protocol = ConnectorRouterMarker;
4793
4794 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4795 Self::new(inner)
4796 }
4797
4798 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4799 self.client.into_channel().map_err(|client| Self { client })
4800 }
4801
4802 fn as_channel(&self) -> &::fidl::AsyncChannel {
4803 self.client.as_channel()
4804 }
4805}
4806
4807impl ConnectorRouterProxy {
4808 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4810 let protocol_name = <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4811 Self { client: fidl::client::Client::new(channel, protocol_name) }
4812 }
4813
4814 pub fn take_event_stream(&self) -> ConnectorRouterEventStream {
4820 ConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
4821 }
4822
4823 pub fn r#route(
4824 &self,
4825 mut payload: RouteRequest,
4826 ) -> fidl::client::QueryResponseFut<
4827 ConnectorRouterRouteResult,
4828 fidl::encoding::DefaultFuchsiaResourceDialect,
4829 > {
4830 ConnectorRouterProxyInterface::r#route(self, payload)
4831 }
4832}
4833
4834impl ConnectorRouterProxyInterface for ConnectorRouterProxy {
4835 type RouteResponseFut = fidl::client::QueryResponseFut<
4836 ConnectorRouterRouteResult,
4837 fidl::encoding::DefaultFuchsiaResourceDialect,
4838 >;
4839 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4840 fn _decode(
4841 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4842 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
4843 let _response = fidl::client::decode_transaction_body::<
4844 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
4845 fidl::encoding::DefaultFuchsiaResourceDialect,
4846 0x74dbb8bc13730766,
4847 >(_buf?)?
4848 .into_result::<ConnectorRouterMarker>("route")?;
4849 Ok(_response.map(|x| x))
4850 }
4851 self.client.send_query_and_decode::<RouteRequest, ConnectorRouterRouteResult>(
4852 &mut payload,
4853 0x74dbb8bc13730766,
4854 fidl::encoding::DynamicFlags::FLEXIBLE,
4855 _decode,
4856 )
4857 }
4858}
4859
4860pub struct ConnectorRouterEventStream {
4861 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4862}
4863
4864impl std::marker::Unpin for ConnectorRouterEventStream {}
4865
4866impl futures::stream::FusedStream for ConnectorRouterEventStream {
4867 fn is_terminated(&self) -> bool {
4868 self.event_receiver.is_terminated()
4869 }
4870}
4871
4872impl futures::Stream for ConnectorRouterEventStream {
4873 type Item = Result<ConnectorRouterEvent, fidl::Error>;
4874
4875 fn poll_next(
4876 mut self: std::pin::Pin<&mut Self>,
4877 cx: &mut std::task::Context<'_>,
4878 ) -> std::task::Poll<Option<Self::Item>> {
4879 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4880 &mut self.event_receiver,
4881 cx
4882 )?) {
4883 Some(buf) => std::task::Poll::Ready(Some(ConnectorRouterEvent::decode(buf))),
4884 None => std::task::Poll::Ready(None),
4885 }
4886 }
4887}
4888
4889#[derive(Debug)]
4890pub enum ConnectorRouterEvent {
4891 #[non_exhaustive]
4892 _UnknownEvent {
4893 ordinal: u64,
4895 },
4896}
4897
4898impl ConnectorRouterEvent {
4899 fn decode(
4901 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4902 ) -> Result<ConnectorRouterEvent, fidl::Error> {
4903 let (bytes, _handles) = buf.split_mut();
4904 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4905 debug_assert_eq!(tx_header.tx_id, 0);
4906 match tx_header.ordinal {
4907 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4908 Ok(ConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4909 }
4910 _ => Err(fidl::Error::UnknownOrdinal {
4911 ordinal: tx_header.ordinal,
4912 protocol_name:
4913 <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4914 }),
4915 }
4916 }
4917}
4918
4919pub struct ConnectorRouterRequestStream {
4921 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4922 is_terminated: bool,
4923}
4924
4925impl std::marker::Unpin for ConnectorRouterRequestStream {}
4926
4927impl futures::stream::FusedStream for ConnectorRouterRequestStream {
4928 fn is_terminated(&self) -> bool {
4929 self.is_terminated
4930 }
4931}
4932
4933impl fidl::endpoints::RequestStream for ConnectorRouterRequestStream {
4934 type Protocol = ConnectorRouterMarker;
4935 type ControlHandle = ConnectorRouterControlHandle;
4936
4937 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4938 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4939 }
4940
4941 fn control_handle(&self) -> Self::ControlHandle {
4942 ConnectorRouterControlHandle { inner: self.inner.clone() }
4943 }
4944
4945 fn into_inner(
4946 self,
4947 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4948 {
4949 (self.inner, self.is_terminated)
4950 }
4951
4952 fn from_inner(
4953 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4954 is_terminated: bool,
4955 ) -> Self {
4956 Self { inner, is_terminated }
4957 }
4958}
4959
4960impl futures::Stream for ConnectorRouterRequestStream {
4961 type Item = Result<ConnectorRouterRequest, fidl::Error>;
4962
4963 fn poll_next(
4964 mut self: std::pin::Pin<&mut Self>,
4965 cx: &mut std::task::Context<'_>,
4966 ) -> std::task::Poll<Option<Self::Item>> {
4967 let this = &mut *self;
4968 if this.inner.check_shutdown(cx) {
4969 this.is_terminated = true;
4970 return std::task::Poll::Ready(None);
4971 }
4972 if this.is_terminated {
4973 panic!("polled ConnectorRouterRequestStream after completion");
4974 }
4975 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4976 |bytes, handles| {
4977 match this.inner.channel().read_etc(cx, bytes, handles) {
4978 std::task::Poll::Ready(Ok(())) => {}
4979 std::task::Poll::Pending => return std::task::Poll::Pending,
4980 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4981 this.is_terminated = true;
4982 return std::task::Poll::Ready(None);
4983 }
4984 std::task::Poll::Ready(Err(e)) => {
4985 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4986 e.into(),
4987 ))));
4988 }
4989 }
4990
4991 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4993
4994 std::task::Poll::Ready(Some(match header.ordinal {
4995 0x74dbb8bc13730766 => {
4996 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4997 let mut req = fidl::new_empty!(
4998 RouteRequest,
4999 fidl::encoding::DefaultFuchsiaResourceDialect
5000 );
5001 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
5002 let control_handle =
5003 ConnectorRouterControlHandle { inner: this.inner.clone() };
5004 Ok(ConnectorRouterRequest::Route {
5005 payload: req,
5006 responder: ConnectorRouterRouteResponder {
5007 control_handle: std::mem::ManuallyDrop::new(control_handle),
5008 tx_id: header.tx_id,
5009 },
5010 })
5011 }
5012 _ if header.tx_id == 0
5013 && header
5014 .dynamic_flags()
5015 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5016 {
5017 Ok(ConnectorRouterRequest::_UnknownMethod {
5018 ordinal: header.ordinal,
5019 control_handle: ConnectorRouterControlHandle {
5020 inner: this.inner.clone(),
5021 },
5022 method_type: fidl::MethodType::OneWay,
5023 })
5024 }
5025 _ if header
5026 .dynamic_flags()
5027 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5028 {
5029 this.inner.send_framework_err(
5030 fidl::encoding::FrameworkErr::UnknownMethod,
5031 header.tx_id,
5032 header.ordinal,
5033 header.dynamic_flags(),
5034 (bytes, handles),
5035 )?;
5036 Ok(ConnectorRouterRequest::_UnknownMethod {
5037 ordinal: header.ordinal,
5038 control_handle: ConnectorRouterControlHandle {
5039 inner: this.inner.clone(),
5040 },
5041 method_type: fidl::MethodType::TwoWay,
5042 })
5043 }
5044 _ => Err(fidl::Error::UnknownOrdinal {
5045 ordinal: header.ordinal,
5046 protocol_name:
5047 <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5048 }),
5049 }))
5050 },
5051 )
5052 }
5053}
5054
5055#[derive(Debug)]
5056pub enum ConnectorRouterRequest {
5057 Route {
5058 payload: RouteRequest,
5059 responder: ConnectorRouterRouteResponder,
5060 },
5061 #[non_exhaustive]
5063 _UnknownMethod {
5064 ordinal: u64,
5066 control_handle: ConnectorRouterControlHandle,
5067 method_type: fidl::MethodType,
5068 },
5069}
5070
5071impl ConnectorRouterRequest {
5072 #[allow(irrefutable_let_patterns)]
5073 pub fn into_route(self) -> Option<(RouteRequest, ConnectorRouterRouteResponder)> {
5074 if let ConnectorRouterRequest::Route { payload, responder } = self {
5075 Some((payload, responder))
5076 } else {
5077 None
5078 }
5079 }
5080
5081 pub fn method_name(&self) -> &'static str {
5083 match *self {
5084 ConnectorRouterRequest::Route { .. } => "route",
5085 ConnectorRouterRequest::_UnknownMethod {
5086 method_type: fidl::MethodType::OneWay,
5087 ..
5088 } => "unknown one-way method",
5089 ConnectorRouterRequest::_UnknownMethod {
5090 method_type: fidl::MethodType::TwoWay,
5091 ..
5092 } => "unknown two-way method",
5093 }
5094 }
5095}
5096
5097#[derive(Debug, Clone)]
5098pub struct ConnectorRouterControlHandle {
5099 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5100}
5101
5102impl fidl::endpoints::ControlHandle for ConnectorRouterControlHandle {
5103 fn shutdown(&self) {
5104 self.inner.shutdown()
5105 }
5106
5107 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5108 self.inner.shutdown_with_epitaph(status)
5109 }
5110
5111 fn is_closed(&self) -> bool {
5112 self.inner.channel().is_closed()
5113 }
5114 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5115 self.inner.channel().on_closed()
5116 }
5117
5118 #[cfg(target_os = "fuchsia")]
5119 fn signal_peer(
5120 &self,
5121 clear_mask: zx::Signals,
5122 set_mask: zx::Signals,
5123 ) -> Result<(), zx_status::Status> {
5124 use fidl::Peered;
5125 self.inner.channel().signal_peer(clear_mask, set_mask)
5126 }
5127}
5128
5129impl ConnectorRouterControlHandle {}
5130
5131#[must_use = "FIDL methods require a response to be sent"]
5132#[derive(Debug)]
5133pub struct ConnectorRouterRouteResponder {
5134 control_handle: std::mem::ManuallyDrop<ConnectorRouterControlHandle>,
5135 tx_id: u32,
5136}
5137
5138impl std::ops::Drop for ConnectorRouterRouteResponder {
5142 fn drop(&mut self) {
5143 self.control_handle.shutdown();
5144 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5146 }
5147}
5148
5149impl fidl::endpoints::Responder for ConnectorRouterRouteResponder {
5150 type ControlHandle = ConnectorRouterControlHandle;
5151
5152 fn control_handle(&self) -> &ConnectorRouterControlHandle {
5153 &self.control_handle
5154 }
5155
5156 fn drop_without_shutdown(mut self) {
5157 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5159 std::mem::forget(self);
5161 }
5162}
5163
5164impl ConnectorRouterRouteResponder {
5165 pub fn send(
5169 self,
5170 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
5171 ) -> Result<(), fidl::Error> {
5172 let _result = self.send_raw(result);
5173 if _result.is_err() {
5174 self.control_handle.shutdown();
5175 }
5176 self.drop_without_shutdown();
5177 _result
5178 }
5179
5180 pub fn send_no_shutdown_on_err(
5182 self,
5183 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
5184 ) -> Result<(), fidl::Error> {
5185 let _result = self.send_raw(result);
5186 self.drop_without_shutdown();
5187 _result
5188 }
5189
5190 fn send_raw(
5191 &self,
5192 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
5193 ) -> Result<(), fidl::Error> {
5194 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5195 ConnectorRouterRouteResponse,
5196 RouterError,
5197 >>(
5198 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
5199 self.tx_id,
5200 0x74dbb8bc13730766,
5201 fidl::encoding::DynamicFlags::FLEXIBLE,
5202 )
5203 }
5204}
5205
5206#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5207pub struct DataRouterMarker;
5208
5209impl fidl::endpoints::ProtocolMarker for DataRouterMarker {
5210 type Proxy = DataRouterProxy;
5211 type RequestStream = DataRouterRequestStream;
5212 #[cfg(target_os = "fuchsia")]
5213 type SynchronousProxy = DataRouterSynchronousProxy;
5214
5215 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
5216}
5217impl fidl::endpoints::DiscoverableProtocolMarker for DataRouterMarker {}
5218pub type DataRouterRouteResult = Result<DataRouterRouteResponse, RouterError>;
5219
5220pub trait DataRouterProxyInterface: Send + Sync {
5221 type RouteResponseFut: std::future::Future<Output = Result<DataRouterRouteResult, fidl::Error>>
5222 + Send;
5223 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
5224}
5225#[derive(Debug)]
5226#[cfg(target_os = "fuchsia")]
5227pub struct DataRouterSynchronousProxy {
5228 client: fidl::client::sync::Client,
5229}
5230
5231#[cfg(target_os = "fuchsia")]
5232impl fidl::endpoints::SynchronousProxy for DataRouterSynchronousProxy {
5233 type Proxy = DataRouterProxy;
5234 type Protocol = DataRouterMarker;
5235
5236 fn from_channel(inner: fidl::Channel) -> Self {
5237 Self::new(inner)
5238 }
5239
5240 fn into_channel(self) -> fidl::Channel {
5241 self.client.into_channel()
5242 }
5243
5244 fn as_channel(&self) -> &fidl::Channel {
5245 self.client.as_channel()
5246 }
5247}
5248
5249#[cfg(target_os = "fuchsia")]
5250impl DataRouterSynchronousProxy {
5251 pub fn new(channel: fidl::Channel) -> Self {
5252 Self { client: fidl::client::sync::Client::new(channel) }
5253 }
5254
5255 pub fn into_channel(self) -> fidl::Channel {
5256 self.client.into_channel()
5257 }
5258
5259 pub fn wait_for_event(
5262 &self,
5263 deadline: zx::MonotonicInstant,
5264 ) -> Result<DataRouterEvent, fidl::Error> {
5265 DataRouterEvent::decode(self.client.wait_for_event::<DataRouterMarker>(deadline)?)
5266 }
5267
5268 pub fn r#route(
5269 &self,
5270 mut payload: RouteRequest,
5271 ___deadline: zx::MonotonicInstant,
5272 ) -> Result<DataRouterRouteResult, fidl::Error> {
5273 let _response = self.client.send_query::<
5274 RouteRequest,
5275 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
5276 DataRouterMarker,
5277 >(
5278 &mut payload,
5279 0x2e87dc44dfc53804,
5280 fidl::encoding::DynamicFlags::FLEXIBLE,
5281 ___deadline,
5282 )?
5283 .into_result::<DataRouterMarker>("route")?;
5284 Ok(_response.map(|x| x))
5285 }
5286}
5287
5288#[cfg(target_os = "fuchsia")]
5289impl From<DataRouterSynchronousProxy> for zx::NullableHandle {
5290 fn from(value: DataRouterSynchronousProxy) -> Self {
5291 value.into_channel().into()
5292 }
5293}
5294
5295#[cfg(target_os = "fuchsia")]
5296impl From<fidl::Channel> for DataRouterSynchronousProxy {
5297 fn from(value: fidl::Channel) -> Self {
5298 Self::new(value)
5299 }
5300}
5301
5302#[cfg(target_os = "fuchsia")]
5303impl fidl::endpoints::FromClient for DataRouterSynchronousProxy {
5304 type Protocol = DataRouterMarker;
5305
5306 fn from_client(value: fidl::endpoints::ClientEnd<DataRouterMarker>) -> Self {
5307 Self::new(value.into_channel())
5308 }
5309}
5310
5311#[derive(Debug, Clone)]
5312pub struct DataRouterProxy {
5313 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5314}
5315
5316impl fidl::endpoints::Proxy for DataRouterProxy {
5317 type Protocol = DataRouterMarker;
5318
5319 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5320 Self::new(inner)
5321 }
5322
5323 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5324 self.client.into_channel().map_err(|client| Self { client })
5325 }
5326
5327 fn as_channel(&self) -> &::fidl::AsyncChannel {
5328 self.client.as_channel()
5329 }
5330}
5331
5332impl DataRouterProxy {
5333 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5335 let protocol_name = <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5336 Self { client: fidl::client::Client::new(channel, protocol_name) }
5337 }
5338
5339 pub fn take_event_stream(&self) -> DataRouterEventStream {
5345 DataRouterEventStream { event_receiver: self.client.take_event_receiver() }
5346 }
5347
5348 pub fn r#route(
5349 &self,
5350 mut payload: RouteRequest,
5351 ) -> fidl::client::QueryResponseFut<
5352 DataRouterRouteResult,
5353 fidl::encoding::DefaultFuchsiaResourceDialect,
5354 > {
5355 DataRouterProxyInterface::r#route(self, payload)
5356 }
5357}
5358
5359impl DataRouterProxyInterface for DataRouterProxy {
5360 type RouteResponseFut = fidl::client::QueryResponseFut<
5361 DataRouterRouteResult,
5362 fidl::encoding::DefaultFuchsiaResourceDialect,
5363 >;
5364 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
5365 fn _decode(
5366 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5367 ) -> Result<DataRouterRouteResult, fidl::Error> {
5368 let _response = fidl::client::decode_transaction_body::<
5369 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
5370 fidl::encoding::DefaultFuchsiaResourceDialect,
5371 0x2e87dc44dfc53804,
5372 >(_buf?)?
5373 .into_result::<DataRouterMarker>("route")?;
5374 Ok(_response.map(|x| x))
5375 }
5376 self.client.send_query_and_decode::<RouteRequest, DataRouterRouteResult>(
5377 &mut payload,
5378 0x2e87dc44dfc53804,
5379 fidl::encoding::DynamicFlags::FLEXIBLE,
5380 _decode,
5381 )
5382 }
5383}
5384
5385pub struct DataRouterEventStream {
5386 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5387}
5388
5389impl std::marker::Unpin for DataRouterEventStream {}
5390
5391impl futures::stream::FusedStream for DataRouterEventStream {
5392 fn is_terminated(&self) -> bool {
5393 self.event_receiver.is_terminated()
5394 }
5395}
5396
5397impl futures::Stream for DataRouterEventStream {
5398 type Item = Result<DataRouterEvent, fidl::Error>;
5399
5400 fn poll_next(
5401 mut self: std::pin::Pin<&mut Self>,
5402 cx: &mut std::task::Context<'_>,
5403 ) -> std::task::Poll<Option<Self::Item>> {
5404 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5405 &mut self.event_receiver,
5406 cx
5407 )?) {
5408 Some(buf) => std::task::Poll::Ready(Some(DataRouterEvent::decode(buf))),
5409 None => std::task::Poll::Ready(None),
5410 }
5411 }
5412}
5413
5414#[derive(Debug)]
5415pub enum DataRouterEvent {
5416 #[non_exhaustive]
5417 _UnknownEvent {
5418 ordinal: u64,
5420 },
5421}
5422
5423impl DataRouterEvent {
5424 fn decode(
5426 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5427 ) -> Result<DataRouterEvent, fidl::Error> {
5428 let (bytes, _handles) = buf.split_mut();
5429 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5430 debug_assert_eq!(tx_header.tx_id, 0);
5431 match tx_header.ordinal {
5432 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5433 Ok(DataRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5434 }
5435 _ => Err(fidl::Error::UnknownOrdinal {
5436 ordinal: tx_header.ordinal,
5437 protocol_name: <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5438 }),
5439 }
5440 }
5441}
5442
5443pub struct DataRouterRequestStream {
5445 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5446 is_terminated: bool,
5447}
5448
5449impl std::marker::Unpin for DataRouterRequestStream {}
5450
5451impl futures::stream::FusedStream for DataRouterRequestStream {
5452 fn is_terminated(&self) -> bool {
5453 self.is_terminated
5454 }
5455}
5456
5457impl fidl::endpoints::RequestStream for DataRouterRequestStream {
5458 type Protocol = DataRouterMarker;
5459 type ControlHandle = DataRouterControlHandle;
5460
5461 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5462 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5463 }
5464
5465 fn control_handle(&self) -> Self::ControlHandle {
5466 DataRouterControlHandle { inner: self.inner.clone() }
5467 }
5468
5469 fn into_inner(
5470 self,
5471 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5472 {
5473 (self.inner, self.is_terminated)
5474 }
5475
5476 fn from_inner(
5477 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5478 is_terminated: bool,
5479 ) -> Self {
5480 Self { inner, is_terminated }
5481 }
5482}
5483
5484impl futures::Stream for DataRouterRequestStream {
5485 type Item = Result<DataRouterRequest, fidl::Error>;
5486
5487 fn poll_next(
5488 mut self: std::pin::Pin<&mut Self>,
5489 cx: &mut std::task::Context<'_>,
5490 ) -> std::task::Poll<Option<Self::Item>> {
5491 let this = &mut *self;
5492 if this.inner.check_shutdown(cx) {
5493 this.is_terminated = true;
5494 return std::task::Poll::Ready(None);
5495 }
5496 if this.is_terminated {
5497 panic!("polled DataRouterRequestStream after completion");
5498 }
5499 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5500 |bytes, handles| {
5501 match this.inner.channel().read_etc(cx, bytes, handles) {
5502 std::task::Poll::Ready(Ok(())) => {}
5503 std::task::Poll::Pending => return std::task::Poll::Pending,
5504 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5505 this.is_terminated = true;
5506 return std::task::Poll::Ready(None);
5507 }
5508 std::task::Poll::Ready(Err(e)) => {
5509 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5510 e.into(),
5511 ))));
5512 }
5513 }
5514
5515 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5517
5518 std::task::Poll::Ready(Some(match header.ordinal {
5519 0x2e87dc44dfc53804 => {
5520 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5521 let mut req = fidl::new_empty!(
5522 RouteRequest,
5523 fidl::encoding::DefaultFuchsiaResourceDialect
5524 );
5525 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
5526 let control_handle = DataRouterControlHandle { inner: this.inner.clone() };
5527 Ok(DataRouterRequest::Route {
5528 payload: req,
5529 responder: DataRouterRouteResponder {
5530 control_handle: std::mem::ManuallyDrop::new(control_handle),
5531 tx_id: header.tx_id,
5532 },
5533 })
5534 }
5535 _ if header.tx_id == 0
5536 && header
5537 .dynamic_flags()
5538 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5539 {
5540 Ok(DataRouterRequest::_UnknownMethod {
5541 ordinal: header.ordinal,
5542 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
5543 method_type: fidl::MethodType::OneWay,
5544 })
5545 }
5546 _ if header
5547 .dynamic_flags()
5548 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5549 {
5550 this.inner.send_framework_err(
5551 fidl::encoding::FrameworkErr::UnknownMethod,
5552 header.tx_id,
5553 header.ordinal,
5554 header.dynamic_flags(),
5555 (bytes, handles),
5556 )?;
5557 Ok(DataRouterRequest::_UnknownMethod {
5558 ordinal: header.ordinal,
5559 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
5560 method_type: fidl::MethodType::TwoWay,
5561 })
5562 }
5563 _ => Err(fidl::Error::UnknownOrdinal {
5564 ordinal: header.ordinal,
5565 protocol_name:
5566 <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5567 }),
5568 }))
5569 },
5570 )
5571 }
5572}
5573
5574#[derive(Debug)]
5575pub enum DataRouterRequest {
5576 Route {
5577 payload: RouteRequest,
5578 responder: DataRouterRouteResponder,
5579 },
5580 #[non_exhaustive]
5582 _UnknownMethod {
5583 ordinal: u64,
5585 control_handle: DataRouterControlHandle,
5586 method_type: fidl::MethodType,
5587 },
5588}
5589
5590impl DataRouterRequest {
5591 #[allow(irrefutable_let_patterns)]
5592 pub fn into_route(self) -> Option<(RouteRequest, DataRouterRouteResponder)> {
5593 if let DataRouterRequest::Route { payload, responder } = self {
5594 Some((payload, responder))
5595 } else {
5596 None
5597 }
5598 }
5599
5600 pub fn method_name(&self) -> &'static str {
5602 match *self {
5603 DataRouterRequest::Route { .. } => "route",
5604 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
5605 "unknown one-way method"
5606 }
5607 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
5608 "unknown two-way method"
5609 }
5610 }
5611 }
5612}
5613
5614#[derive(Debug, Clone)]
5615pub struct DataRouterControlHandle {
5616 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5617}
5618
5619impl fidl::endpoints::ControlHandle for DataRouterControlHandle {
5620 fn shutdown(&self) {
5621 self.inner.shutdown()
5622 }
5623
5624 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5625 self.inner.shutdown_with_epitaph(status)
5626 }
5627
5628 fn is_closed(&self) -> bool {
5629 self.inner.channel().is_closed()
5630 }
5631 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5632 self.inner.channel().on_closed()
5633 }
5634
5635 #[cfg(target_os = "fuchsia")]
5636 fn signal_peer(
5637 &self,
5638 clear_mask: zx::Signals,
5639 set_mask: zx::Signals,
5640 ) -> Result<(), zx_status::Status> {
5641 use fidl::Peered;
5642 self.inner.channel().signal_peer(clear_mask, set_mask)
5643 }
5644}
5645
5646impl DataRouterControlHandle {}
5647
5648#[must_use = "FIDL methods require a response to be sent"]
5649#[derive(Debug)]
5650pub struct DataRouterRouteResponder {
5651 control_handle: std::mem::ManuallyDrop<DataRouterControlHandle>,
5652 tx_id: u32,
5653}
5654
5655impl std::ops::Drop for DataRouterRouteResponder {
5659 fn drop(&mut self) {
5660 self.control_handle.shutdown();
5661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5663 }
5664}
5665
5666impl fidl::endpoints::Responder for DataRouterRouteResponder {
5667 type ControlHandle = DataRouterControlHandle;
5668
5669 fn control_handle(&self) -> &DataRouterControlHandle {
5670 &self.control_handle
5671 }
5672
5673 fn drop_without_shutdown(mut self) {
5674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5676 std::mem::forget(self);
5678 }
5679}
5680
5681impl DataRouterRouteResponder {
5682 pub fn send(
5686 self,
5687 mut result: Result<DataRouterRouteResponse, RouterError>,
5688 ) -> Result<(), fidl::Error> {
5689 let _result = self.send_raw(result);
5690 if _result.is_err() {
5691 self.control_handle.shutdown();
5692 }
5693 self.drop_without_shutdown();
5694 _result
5695 }
5696
5697 pub fn send_no_shutdown_on_err(
5699 self,
5700 mut result: Result<DataRouterRouteResponse, RouterError>,
5701 ) -> Result<(), fidl::Error> {
5702 let _result = self.send_raw(result);
5703 self.drop_without_shutdown();
5704 _result
5705 }
5706
5707 fn send_raw(
5708 &self,
5709 mut result: Result<DataRouterRouteResponse, RouterError>,
5710 ) -> Result<(), fidl::Error> {
5711 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5712 DataRouterRouteResponse,
5713 RouterError,
5714 >>(
5715 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
5716 self.tx_id,
5717 0x2e87dc44dfc53804,
5718 fidl::encoding::DynamicFlags::FLEXIBLE,
5719 )
5720 }
5721}
5722
5723#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5724pub struct DictionaryMarker;
5725
5726impl fidl::endpoints::ProtocolMarker for DictionaryMarker {
5727 type Proxy = DictionaryProxy;
5728 type RequestStream = DictionaryRequestStream;
5729 #[cfg(target_os = "fuchsia")]
5730 type SynchronousProxy = DictionarySynchronousProxy;
5731
5732 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
5733}
5734impl fidl::endpoints::DiscoverableProtocolMarker for DictionaryMarker {}
5735
5736pub trait DictionaryProxyInterface: Send + Sync {}
5737#[derive(Debug)]
5738#[cfg(target_os = "fuchsia")]
5739pub struct DictionarySynchronousProxy {
5740 client: fidl::client::sync::Client,
5741}
5742
5743#[cfg(target_os = "fuchsia")]
5744impl fidl::endpoints::SynchronousProxy for DictionarySynchronousProxy {
5745 type Proxy = DictionaryProxy;
5746 type Protocol = DictionaryMarker;
5747
5748 fn from_channel(inner: fidl::Channel) -> Self {
5749 Self::new(inner)
5750 }
5751
5752 fn into_channel(self) -> fidl::Channel {
5753 self.client.into_channel()
5754 }
5755
5756 fn as_channel(&self) -> &fidl::Channel {
5757 self.client.as_channel()
5758 }
5759}
5760
5761#[cfg(target_os = "fuchsia")]
5762impl DictionarySynchronousProxy {
5763 pub fn new(channel: fidl::Channel) -> Self {
5764 Self { client: fidl::client::sync::Client::new(channel) }
5765 }
5766
5767 pub fn into_channel(self) -> fidl::Channel {
5768 self.client.into_channel()
5769 }
5770
5771 pub fn wait_for_event(
5774 &self,
5775 deadline: zx::MonotonicInstant,
5776 ) -> Result<DictionaryEvent, fidl::Error> {
5777 DictionaryEvent::decode(self.client.wait_for_event::<DictionaryMarker>(deadline)?)
5778 }
5779}
5780
5781#[cfg(target_os = "fuchsia")]
5782impl From<DictionarySynchronousProxy> for zx::NullableHandle {
5783 fn from(value: DictionarySynchronousProxy) -> Self {
5784 value.into_channel().into()
5785 }
5786}
5787
5788#[cfg(target_os = "fuchsia")]
5789impl From<fidl::Channel> for DictionarySynchronousProxy {
5790 fn from(value: fidl::Channel) -> Self {
5791 Self::new(value)
5792 }
5793}
5794
5795#[cfg(target_os = "fuchsia")]
5796impl fidl::endpoints::FromClient for DictionarySynchronousProxy {
5797 type Protocol = DictionaryMarker;
5798
5799 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryMarker>) -> Self {
5800 Self::new(value.into_channel())
5801 }
5802}
5803
5804#[derive(Debug, Clone)]
5805pub struct DictionaryProxy {
5806 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5807}
5808
5809impl fidl::endpoints::Proxy for DictionaryProxy {
5810 type Protocol = DictionaryMarker;
5811
5812 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5813 Self::new(inner)
5814 }
5815
5816 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5817 self.client.into_channel().map_err(|client| Self { client })
5818 }
5819
5820 fn as_channel(&self) -> &::fidl::AsyncChannel {
5821 self.client.as_channel()
5822 }
5823}
5824
5825impl DictionaryProxy {
5826 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5828 let protocol_name = <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5829 Self { client: fidl::client::Client::new(channel, protocol_name) }
5830 }
5831
5832 pub fn take_event_stream(&self) -> DictionaryEventStream {
5838 DictionaryEventStream { event_receiver: self.client.take_event_receiver() }
5839 }
5840}
5841
5842impl DictionaryProxyInterface for DictionaryProxy {}
5843
5844pub struct DictionaryEventStream {
5845 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5846}
5847
5848impl std::marker::Unpin for DictionaryEventStream {}
5849
5850impl futures::stream::FusedStream for DictionaryEventStream {
5851 fn is_terminated(&self) -> bool {
5852 self.event_receiver.is_terminated()
5853 }
5854}
5855
5856impl futures::Stream for DictionaryEventStream {
5857 type Item = Result<DictionaryEvent, fidl::Error>;
5858
5859 fn poll_next(
5860 mut self: std::pin::Pin<&mut Self>,
5861 cx: &mut std::task::Context<'_>,
5862 ) -> std::task::Poll<Option<Self::Item>> {
5863 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5864 &mut self.event_receiver,
5865 cx
5866 )?) {
5867 Some(buf) => std::task::Poll::Ready(Some(DictionaryEvent::decode(buf))),
5868 None => std::task::Poll::Ready(None),
5869 }
5870 }
5871}
5872
5873#[derive(Debug)]
5874pub enum DictionaryEvent {
5875 #[non_exhaustive]
5876 _UnknownEvent {
5877 ordinal: u64,
5879 },
5880}
5881
5882impl DictionaryEvent {
5883 fn decode(
5885 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5886 ) -> Result<DictionaryEvent, fidl::Error> {
5887 let (bytes, _handles) = buf.split_mut();
5888 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5889 debug_assert_eq!(tx_header.tx_id, 0);
5890 match tx_header.ordinal {
5891 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5892 Ok(DictionaryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5893 }
5894 _ => Err(fidl::Error::UnknownOrdinal {
5895 ordinal: tx_header.ordinal,
5896 protocol_name: <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5897 }),
5898 }
5899 }
5900}
5901
5902pub struct DictionaryRequestStream {
5904 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5905 is_terminated: bool,
5906}
5907
5908impl std::marker::Unpin for DictionaryRequestStream {}
5909
5910impl futures::stream::FusedStream for DictionaryRequestStream {
5911 fn is_terminated(&self) -> bool {
5912 self.is_terminated
5913 }
5914}
5915
5916impl fidl::endpoints::RequestStream for DictionaryRequestStream {
5917 type Protocol = DictionaryMarker;
5918 type ControlHandle = DictionaryControlHandle;
5919
5920 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5921 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5922 }
5923
5924 fn control_handle(&self) -> Self::ControlHandle {
5925 DictionaryControlHandle { inner: self.inner.clone() }
5926 }
5927
5928 fn into_inner(
5929 self,
5930 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5931 {
5932 (self.inner, self.is_terminated)
5933 }
5934
5935 fn from_inner(
5936 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5937 is_terminated: bool,
5938 ) -> Self {
5939 Self { inner, is_terminated }
5940 }
5941}
5942
5943impl futures::Stream for DictionaryRequestStream {
5944 type Item = Result<DictionaryRequest, fidl::Error>;
5945
5946 fn poll_next(
5947 mut self: std::pin::Pin<&mut Self>,
5948 cx: &mut std::task::Context<'_>,
5949 ) -> std::task::Poll<Option<Self::Item>> {
5950 let this = &mut *self;
5951 if this.inner.check_shutdown(cx) {
5952 this.is_terminated = true;
5953 return std::task::Poll::Ready(None);
5954 }
5955 if this.is_terminated {
5956 panic!("polled DictionaryRequestStream after completion");
5957 }
5958 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5959 |bytes, handles| {
5960 match this.inner.channel().read_etc(cx, bytes, handles) {
5961 std::task::Poll::Ready(Ok(())) => {}
5962 std::task::Poll::Pending => return std::task::Poll::Pending,
5963 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5964 this.is_terminated = true;
5965 return std::task::Poll::Ready(None);
5966 }
5967 std::task::Poll::Ready(Err(e)) => {
5968 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5969 e.into(),
5970 ))));
5971 }
5972 }
5973
5974 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5976
5977 std::task::Poll::Ready(Some(match header.ordinal {
5978 _ if header.tx_id == 0
5979 && header
5980 .dynamic_flags()
5981 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5982 {
5983 Ok(DictionaryRequest::_UnknownMethod {
5984 ordinal: header.ordinal,
5985 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5986 method_type: fidl::MethodType::OneWay,
5987 })
5988 }
5989 _ if header
5990 .dynamic_flags()
5991 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5992 {
5993 this.inner.send_framework_err(
5994 fidl::encoding::FrameworkErr::UnknownMethod,
5995 header.tx_id,
5996 header.ordinal,
5997 header.dynamic_flags(),
5998 (bytes, handles),
5999 )?;
6000 Ok(DictionaryRequest::_UnknownMethod {
6001 ordinal: header.ordinal,
6002 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
6003 method_type: fidl::MethodType::TwoWay,
6004 })
6005 }
6006 _ => Err(fidl::Error::UnknownOrdinal {
6007 ordinal: header.ordinal,
6008 protocol_name:
6009 <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6010 }),
6011 }))
6012 },
6013 )
6014 }
6015}
6016
6017#[derive(Debug)]
6018pub enum DictionaryRequest {
6019 #[non_exhaustive]
6021 _UnknownMethod {
6022 ordinal: u64,
6024 control_handle: DictionaryControlHandle,
6025 method_type: fidl::MethodType,
6026 },
6027}
6028
6029impl DictionaryRequest {
6030 pub fn method_name(&self) -> &'static str {
6032 match *self {
6033 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
6034 "unknown one-way method"
6035 }
6036 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
6037 "unknown two-way method"
6038 }
6039 }
6040 }
6041}
6042
6043#[derive(Debug, Clone)]
6044pub struct DictionaryControlHandle {
6045 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6046}
6047
6048impl fidl::endpoints::ControlHandle for DictionaryControlHandle {
6049 fn shutdown(&self) {
6050 self.inner.shutdown()
6051 }
6052
6053 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6054 self.inner.shutdown_with_epitaph(status)
6055 }
6056
6057 fn is_closed(&self) -> bool {
6058 self.inner.channel().is_closed()
6059 }
6060 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6061 self.inner.channel().on_closed()
6062 }
6063
6064 #[cfg(target_os = "fuchsia")]
6065 fn signal_peer(
6066 &self,
6067 clear_mask: zx::Signals,
6068 set_mask: zx::Signals,
6069 ) -> Result<(), zx_status::Status> {
6070 use fidl::Peered;
6071 self.inner.channel().signal_peer(clear_mask, set_mask)
6072 }
6073}
6074
6075impl DictionaryControlHandle {}
6076
6077#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6078pub struct DictionaryDrainIteratorMarker;
6079
6080impl fidl::endpoints::ProtocolMarker for DictionaryDrainIteratorMarker {
6081 type Proxy = DictionaryDrainIteratorProxy;
6082 type RequestStream = DictionaryDrainIteratorRequestStream;
6083 #[cfg(target_os = "fuchsia")]
6084 type SynchronousProxy = DictionaryDrainIteratorSynchronousProxy;
6085
6086 const DEBUG_NAME: &'static str = "(anonymous) DictionaryDrainIterator";
6087}
6088pub type DictionaryDrainIteratorGetNextResult =
6089 Result<(Vec<DictionaryItem>, u64), CapabilityStoreError>;
6090
6091pub trait DictionaryDrainIteratorProxyInterface: Send + Sync {
6092 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryDrainIteratorGetNextResult, fidl::Error>>
6093 + Send;
6094 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
6095}
6096#[derive(Debug)]
6097#[cfg(target_os = "fuchsia")]
6098pub struct DictionaryDrainIteratorSynchronousProxy {
6099 client: fidl::client::sync::Client,
6100}
6101
6102#[cfg(target_os = "fuchsia")]
6103impl fidl::endpoints::SynchronousProxy for DictionaryDrainIteratorSynchronousProxy {
6104 type Proxy = DictionaryDrainIteratorProxy;
6105 type Protocol = DictionaryDrainIteratorMarker;
6106
6107 fn from_channel(inner: fidl::Channel) -> Self {
6108 Self::new(inner)
6109 }
6110
6111 fn into_channel(self) -> fidl::Channel {
6112 self.client.into_channel()
6113 }
6114
6115 fn as_channel(&self) -> &fidl::Channel {
6116 self.client.as_channel()
6117 }
6118}
6119
6120#[cfg(target_os = "fuchsia")]
6121impl DictionaryDrainIteratorSynchronousProxy {
6122 pub fn new(channel: fidl::Channel) -> Self {
6123 Self { client: fidl::client::sync::Client::new(channel) }
6124 }
6125
6126 pub fn into_channel(self) -> fidl::Channel {
6127 self.client.into_channel()
6128 }
6129
6130 pub fn wait_for_event(
6133 &self,
6134 deadline: zx::MonotonicInstant,
6135 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
6136 DictionaryDrainIteratorEvent::decode(
6137 self.client.wait_for_event::<DictionaryDrainIteratorMarker>(deadline)?,
6138 )
6139 }
6140
6141 pub fn r#get_next(
6158 &self,
6159 mut start_id: u64,
6160 mut limit: u32,
6161 ___deadline: zx::MonotonicInstant,
6162 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
6163 let _response = self
6164 .client
6165 .send_query::<DictionaryDrainIteratorGetNextRequest, fidl::encoding::FlexibleResultType<
6166 DictionaryDrainIteratorGetNextResponse,
6167 CapabilityStoreError,
6168 >, DictionaryDrainIteratorMarker>(
6169 (start_id, limit),
6170 0x4f8082ca1ee26061,
6171 fidl::encoding::DynamicFlags::FLEXIBLE,
6172 ___deadline,
6173 )?
6174 .into_result::<DictionaryDrainIteratorMarker>("get_next")?;
6175 Ok(_response.map(|x| (x.items, x.end_id)))
6176 }
6177}
6178
6179#[cfg(target_os = "fuchsia")]
6180impl From<DictionaryDrainIteratorSynchronousProxy> for zx::NullableHandle {
6181 fn from(value: DictionaryDrainIteratorSynchronousProxy) -> Self {
6182 value.into_channel().into()
6183 }
6184}
6185
6186#[cfg(target_os = "fuchsia")]
6187impl From<fidl::Channel> for DictionaryDrainIteratorSynchronousProxy {
6188 fn from(value: fidl::Channel) -> Self {
6189 Self::new(value)
6190 }
6191}
6192
6193#[cfg(target_os = "fuchsia")]
6194impl fidl::endpoints::FromClient for DictionaryDrainIteratorSynchronousProxy {
6195 type Protocol = DictionaryDrainIteratorMarker;
6196
6197 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryDrainIteratorMarker>) -> Self {
6198 Self::new(value.into_channel())
6199 }
6200}
6201
6202#[derive(Debug, Clone)]
6203pub struct DictionaryDrainIteratorProxy {
6204 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6205}
6206
6207impl fidl::endpoints::Proxy for DictionaryDrainIteratorProxy {
6208 type Protocol = DictionaryDrainIteratorMarker;
6209
6210 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6211 Self::new(inner)
6212 }
6213
6214 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6215 self.client.into_channel().map_err(|client| Self { client })
6216 }
6217
6218 fn as_channel(&self) -> &::fidl::AsyncChannel {
6219 self.client.as_channel()
6220 }
6221}
6222
6223impl DictionaryDrainIteratorProxy {
6224 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6226 let protocol_name =
6227 <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6228 Self { client: fidl::client::Client::new(channel, protocol_name) }
6229 }
6230
6231 pub fn take_event_stream(&self) -> DictionaryDrainIteratorEventStream {
6237 DictionaryDrainIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6238 }
6239
6240 pub fn r#get_next(
6257 &self,
6258 mut start_id: u64,
6259 mut limit: u32,
6260 ) -> fidl::client::QueryResponseFut<
6261 DictionaryDrainIteratorGetNextResult,
6262 fidl::encoding::DefaultFuchsiaResourceDialect,
6263 > {
6264 DictionaryDrainIteratorProxyInterface::r#get_next(self, start_id, limit)
6265 }
6266}
6267
6268impl DictionaryDrainIteratorProxyInterface for DictionaryDrainIteratorProxy {
6269 type GetNextResponseFut = fidl::client::QueryResponseFut<
6270 DictionaryDrainIteratorGetNextResult,
6271 fidl::encoding::DefaultFuchsiaResourceDialect,
6272 >;
6273 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
6274 fn _decode(
6275 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6276 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
6277 let _response = fidl::client::decode_transaction_body::<
6278 fidl::encoding::FlexibleResultType<
6279 DictionaryDrainIteratorGetNextResponse,
6280 CapabilityStoreError,
6281 >,
6282 fidl::encoding::DefaultFuchsiaResourceDialect,
6283 0x4f8082ca1ee26061,
6284 >(_buf?)?
6285 .into_result::<DictionaryDrainIteratorMarker>("get_next")?;
6286 Ok(_response.map(|x| (x.items, x.end_id)))
6287 }
6288 self.client.send_query_and_decode::<
6289 DictionaryDrainIteratorGetNextRequest,
6290 DictionaryDrainIteratorGetNextResult,
6291 >(
6292 (start_id, limit,),
6293 0x4f8082ca1ee26061,
6294 fidl::encoding::DynamicFlags::FLEXIBLE,
6295 _decode,
6296 )
6297 }
6298}
6299
6300pub struct DictionaryDrainIteratorEventStream {
6301 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6302}
6303
6304impl std::marker::Unpin for DictionaryDrainIteratorEventStream {}
6305
6306impl futures::stream::FusedStream for DictionaryDrainIteratorEventStream {
6307 fn is_terminated(&self) -> bool {
6308 self.event_receiver.is_terminated()
6309 }
6310}
6311
6312impl futures::Stream for DictionaryDrainIteratorEventStream {
6313 type Item = Result<DictionaryDrainIteratorEvent, fidl::Error>;
6314
6315 fn poll_next(
6316 mut self: std::pin::Pin<&mut Self>,
6317 cx: &mut std::task::Context<'_>,
6318 ) -> std::task::Poll<Option<Self::Item>> {
6319 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6320 &mut self.event_receiver,
6321 cx
6322 )?) {
6323 Some(buf) => std::task::Poll::Ready(Some(DictionaryDrainIteratorEvent::decode(buf))),
6324 None => std::task::Poll::Ready(None),
6325 }
6326 }
6327}
6328
6329#[derive(Debug)]
6330pub enum DictionaryDrainIteratorEvent {
6331 #[non_exhaustive]
6332 _UnknownEvent {
6333 ordinal: u64,
6335 },
6336}
6337
6338impl DictionaryDrainIteratorEvent {
6339 fn decode(
6341 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6342 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
6343 let (bytes, _handles) = buf.split_mut();
6344 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6345 debug_assert_eq!(tx_header.tx_id, 0);
6346 match tx_header.ordinal {
6347 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6348 Ok(DictionaryDrainIteratorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6349 }
6350 _ => Err(fidl::Error::UnknownOrdinal {
6351 ordinal: tx_header.ordinal,
6352 protocol_name:
6353 <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6354 }),
6355 }
6356 }
6357}
6358
6359pub struct DictionaryDrainIteratorRequestStream {
6361 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6362 is_terminated: bool,
6363}
6364
6365impl std::marker::Unpin for DictionaryDrainIteratorRequestStream {}
6366
6367impl futures::stream::FusedStream for DictionaryDrainIteratorRequestStream {
6368 fn is_terminated(&self) -> bool {
6369 self.is_terminated
6370 }
6371}
6372
6373impl fidl::endpoints::RequestStream for DictionaryDrainIteratorRequestStream {
6374 type Protocol = DictionaryDrainIteratorMarker;
6375 type ControlHandle = DictionaryDrainIteratorControlHandle;
6376
6377 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6378 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6379 }
6380
6381 fn control_handle(&self) -> Self::ControlHandle {
6382 DictionaryDrainIteratorControlHandle { inner: self.inner.clone() }
6383 }
6384
6385 fn into_inner(
6386 self,
6387 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6388 {
6389 (self.inner, self.is_terminated)
6390 }
6391
6392 fn from_inner(
6393 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6394 is_terminated: bool,
6395 ) -> Self {
6396 Self { inner, is_terminated }
6397 }
6398}
6399
6400impl futures::Stream for DictionaryDrainIteratorRequestStream {
6401 type Item = Result<DictionaryDrainIteratorRequest, fidl::Error>;
6402
6403 fn poll_next(
6404 mut self: std::pin::Pin<&mut Self>,
6405 cx: &mut std::task::Context<'_>,
6406 ) -> std::task::Poll<Option<Self::Item>> {
6407 let this = &mut *self;
6408 if this.inner.check_shutdown(cx) {
6409 this.is_terminated = true;
6410 return std::task::Poll::Ready(None);
6411 }
6412 if this.is_terminated {
6413 panic!("polled DictionaryDrainIteratorRequestStream after completion");
6414 }
6415 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6416 |bytes, handles| {
6417 match this.inner.channel().read_etc(cx, bytes, handles) {
6418 std::task::Poll::Ready(Ok(())) => {}
6419 std::task::Poll::Pending => return std::task::Poll::Pending,
6420 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6421 this.is_terminated = true;
6422 return std::task::Poll::Ready(None);
6423 }
6424 std::task::Poll::Ready(Err(e)) => {
6425 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6426 e.into(),
6427 ))));
6428 }
6429 }
6430
6431 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6433
6434 std::task::Poll::Ready(Some(match header.ordinal {
6435 0x4f8082ca1ee26061 => {
6436 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6437 let mut req = fidl::new_empty!(DictionaryDrainIteratorGetNextRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
6438 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DictionaryDrainIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
6439 let control_handle = DictionaryDrainIteratorControlHandle {
6440 inner: this.inner.clone(),
6441 };
6442 Ok(DictionaryDrainIteratorRequest::GetNext {start_id: req.start_id,
6443limit: req.limit,
6444
6445 responder: DictionaryDrainIteratorGetNextResponder {
6446 control_handle: std::mem::ManuallyDrop::new(control_handle),
6447 tx_id: header.tx_id,
6448 },
6449 })
6450 }
6451 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6452 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
6453 ordinal: header.ordinal,
6454 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
6455 method_type: fidl::MethodType::OneWay,
6456 })
6457 }
6458 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6459 this.inner.send_framework_err(
6460 fidl::encoding::FrameworkErr::UnknownMethod,
6461 header.tx_id,
6462 header.ordinal,
6463 header.dynamic_flags(),
6464 (bytes, handles),
6465 )?;
6466 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
6467 ordinal: header.ordinal,
6468 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
6469 method_type: fidl::MethodType::TwoWay,
6470 })
6471 }
6472 _ => Err(fidl::Error::UnknownOrdinal {
6473 ordinal: header.ordinal,
6474 protocol_name: <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6475 }),
6476 }))
6477 },
6478 )
6479 }
6480}
6481
6482#[derive(Debug)]
6483pub enum DictionaryDrainIteratorRequest {
6484 GetNext { start_id: u64, limit: u32, responder: DictionaryDrainIteratorGetNextResponder },
6501 #[non_exhaustive]
6503 _UnknownMethod {
6504 ordinal: u64,
6506 control_handle: DictionaryDrainIteratorControlHandle,
6507 method_type: fidl::MethodType,
6508 },
6509}
6510
6511impl DictionaryDrainIteratorRequest {
6512 #[allow(irrefutable_let_patterns)]
6513 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryDrainIteratorGetNextResponder)> {
6514 if let DictionaryDrainIteratorRequest::GetNext { start_id, limit, responder } = self {
6515 Some((start_id, limit, responder))
6516 } else {
6517 None
6518 }
6519 }
6520
6521 pub fn method_name(&self) -> &'static str {
6523 match *self {
6524 DictionaryDrainIteratorRequest::GetNext { .. } => "get_next",
6525 DictionaryDrainIteratorRequest::_UnknownMethod {
6526 method_type: fidl::MethodType::OneWay,
6527 ..
6528 } => "unknown one-way method",
6529 DictionaryDrainIteratorRequest::_UnknownMethod {
6530 method_type: fidl::MethodType::TwoWay,
6531 ..
6532 } => "unknown two-way method",
6533 }
6534 }
6535}
6536
6537#[derive(Debug, Clone)]
6538pub struct DictionaryDrainIteratorControlHandle {
6539 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6540}
6541
6542impl fidl::endpoints::ControlHandle for DictionaryDrainIteratorControlHandle {
6543 fn shutdown(&self) {
6544 self.inner.shutdown()
6545 }
6546
6547 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6548 self.inner.shutdown_with_epitaph(status)
6549 }
6550
6551 fn is_closed(&self) -> bool {
6552 self.inner.channel().is_closed()
6553 }
6554 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6555 self.inner.channel().on_closed()
6556 }
6557
6558 #[cfg(target_os = "fuchsia")]
6559 fn signal_peer(
6560 &self,
6561 clear_mask: zx::Signals,
6562 set_mask: zx::Signals,
6563 ) -> Result<(), zx_status::Status> {
6564 use fidl::Peered;
6565 self.inner.channel().signal_peer(clear_mask, set_mask)
6566 }
6567}
6568
6569impl DictionaryDrainIteratorControlHandle {}
6570
6571#[must_use = "FIDL methods require a response to be sent"]
6572#[derive(Debug)]
6573pub struct DictionaryDrainIteratorGetNextResponder {
6574 control_handle: std::mem::ManuallyDrop<DictionaryDrainIteratorControlHandle>,
6575 tx_id: u32,
6576}
6577
6578impl std::ops::Drop for DictionaryDrainIteratorGetNextResponder {
6582 fn drop(&mut self) {
6583 self.control_handle.shutdown();
6584 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6586 }
6587}
6588
6589impl fidl::endpoints::Responder for DictionaryDrainIteratorGetNextResponder {
6590 type ControlHandle = DictionaryDrainIteratorControlHandle;
6591
6592 fn control_handle(&self) -> &DictionaryDrainIteratorControlHandle {
6593 &self.control_handle
6594 }
6595
6596 fn drop_without_shutdown(mut self) {
6597 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6599 std::mem::forget(self);
6601 }
6602}
6603
6604impl DictionaryDrainIteratorGetNextResponder {
6605 pub fn send(
6609 self,
6610 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
6611 ) -> Result<(), fidl::Error> {
6612 let _result = self.send_raw(result);
6613 if _result.is_err() {
6614 self.control_handle.shutdown();
6615 }
6616 self.drop_without_shutdown();
6617 _result
6618 }
6619
6620 pub fn send_no_shutdown_on_err(
6622 self,
6623 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
6624 ) -> Result<(), fidl::Error> {
6625 let _result = self.send_raw(result);
6626 self.drop_without_shutdown();
6627 _result
6628 }
6629
6630 fn send_raw(
6631 &self,
6632 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
6633 ) -> Result<(), fidl::Error> {
6634 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6635 DictionaryDrainIteratorGetNextResponse,
6636 CapabilityStoreError,
6637 >>(
6638 fidl::encoding::FlexibleResult::new(result),
6639 self.tx_id,
6640 0x4f8082ca1ee26061,
6641 fidl::encoding::DynamicFlags::FLEXIBLE,
6642 )
6643 }
6644}
6645
6646#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6647pub struct DictionaryEnumerateIteratorMarker;
6648
6649impl fidl::endpoints::ProtocolMarker for DictionaryEnumerateIteratorMarker {
6650 type Proxy = DictionaryEnumerateIteratorProxy;
6651 type RequestStream = DictionaryEnumerateIteratorRequestStream;
6652 #[cfg(target_os = "fuchsia")]
6653 type SynchronousProxy = DictionaryEnumerateIteratorSynchronousProxy;
6654
6655 const DEBUG_NAME: &'static str = "(anonymous) DictionaryEnumerateIterator";
6656}
6657pub type DictionaryEnumerateIteratorGetNextResult =
6658 Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>;
6659
6660pub trait DictionaryEnumerateIteratorProxyInterface: Send + Sync {
6661 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error>>
6662 + Send;
6663 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
6664}
6665#[derive(Debug)]
6666#[cfg(target_os = "fuchsia")]
6667pub struct DictionaryEnumerateIteratorSynchronousProxy {
6668 client: fidl::client::sync::Client,
6669}
6670
6671#[cfg(target_os = "fuchsia")]
6672impl fidl::endpoints::SynchronousProxy for DictionaryEnumerateIteratorSynchronousProxy {
6673 type Proxy = DictionaryEnumerateIteratorProxy;
6674 type Protocol = DictionaryEnumerateIteratorMarker;
6675
6676 fn from_channel(inner: fidl::Channel) -> Self {
6677 Self::new(inner)
6678 }
6679
6680 fn into_channel(self) -> fidl::Channel {
6681 self.client.into_channel()
6682 }
6683
6684 fn as_channel(&self) -> &fidl::Channel {
6685 self.client.as_channel()
6686 }
6687}
6688
6689#[cfg(target_os = "fuchsia")]
6690impl DictionaryEnumerateIteratorSynchronousProxy {
6691 pub fn new(channel: fidl::Channel) -> Self {
6692 Self { client: fidl::client::sync::Client::new(channel) }
6693 }
6694
6695 pub fn into_channel(self) -> fidl::Channel {
6696 self.client.into_channel()
6697 }
6698
6699 pub fn wait_for_event(
6702 &self,
6703 deadline: zx::MonotonicInstant,
6704 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
6705 DictionaryEnumerateIteratorEvent::decode(
6706 self.client.wait_for_event::<DictionaryEnumerateIteratorMarker>(deadline)?,
6707 )
6708 }
6709
6710 pub fn r#get_next(
6731 &self,
6732 mut start_id: u64,
6733 mut limit: u32,
6734 ___deadline: zx::MonotonicInstant,
6735 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
6736 let _response = self.client.send_query::<
6737 DictionaryEnumerateIteratorGetNextRequest,
6738 fidl::encoding::FlexibleResultType<DictionaryEnumerateIteratorGetNextResponse, CapabilityStoreError>,
6739 DictionaryEnumerateIteratorMarker,
6740 >(
6741 (start_id, limit,),
6742 0x14f8bc286512f5cf,
6743 fidl::encoding::DynamicFlags::FLEXIBLE,
6744 ___deadline,
6745 )?
6746 .into_result::<DictionaryEnumerateIteratorMarker>("get_next")?;
6747 Ok(_response.map(|x| (x.items, x.end_id)))
6748 }
6749}
6750
6751#[cfg(target_os = "fuchsia")]
6752impl From<DictionaryEnumerateIteratorSynchronousProxy> for zx::NullableHandle {
6753 fn from(value: DictionaryEnumerateIteratorSynchronousProxy) -> Self {
6754 value.into_channel().into()
6755 }
6756}
6757
6758#[cfg(target_os = "fuchsia")]
6759impl From<fidl::Channel> for DictionaryEnumerateIteratorSynchronousProxy {
6760 fn from(value: fidl::Channel) -> Self {
6761 Self::new(value)
6762 }
6763}
6764
6765#[cfg(target_os = "fuchsia")]
6766impl fidl::endpoints::FromClient for DictionaryEnumerateIteratorSynchronousProxy {
6767 type Protocol = DictionaryEnumerateIteratorMarker;
6768
6769 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryEnumerateIteratorMarker>) -> Self {
6770 Self::new(value.into_channel())
6771 }
6772}
6773
6774#[derive(Debug, Clone)]
6775pub struct DictionaryEnumerateIteratorProxy {
6776 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6777}
6778
6779impl fidl::endpoints::Proxy for DictionaryEnumerateIteratorProxy {
6780 type Protocol = DictionaryEnumerateIteratorMarker;
6781
6782 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6783 Self::new(inner)
6784 }
6785
6786 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6787 self.client.into_channel().map_err(|client| Self { client })
6788 }
6789
6790 fn as_channel(&self) -> &::fidl::AsyncChannel {
6791 self.client.as_channel()
6792 }
6793}
6794
6795impl DictionaryEnumerateIteratorProxy {
6796 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6798 let protocol_name =
6799 <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6800 Self { client: fidl::client::Client::new(channel, protocol_name) }
6801 }
6802
6803 pub fn take_event_stream(&self) -> DictionaryEnumerateIteratorEventStream {
6809 DictionaryEnumerateIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6810 }
6811
6812 pub fn r#get_next(
6833 &self,
6834 mut start_id: u64,
6835 mut limit: u32,
6836 ) -> fidl::client::QueryResponseFut<
6837 DictionaryEnumerateIteratorGetNextResult,
6838 fidl::encoding::DefaultFuchsiaResourceDialect,
6839 > {
6840 DictionaryEnumerateIteratorProxyInterface::r#get_next(self, start_id, limit)
6841 }
6842}
6843
6844impl DictionaryEnumerateIteratorProxyInterface for DictionaryEnumerateIteratorProxy {
6845 type GetNextResponseFut = fidl::client::QueryResponseFut<
6846 DictionaryEnumerateIteratorGetNextResult,
6847 fidl::encoding::DefaultFuchsiaResourceDialect,
6848 >;
6849 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
6850 fn _decode(
6851 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6852 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
6853 let _response = fidl::client::decode_transaction_body::<
6854 fidl::encoding::FlexibleResultType<
6855 DictionaryEnumerateIteratorGetNextResponse,
6856 CapabilityStoreError,
6857 >,
6858 fidl::encoding::DefaultFuchsiaResourceDialect,
6859 0x14f8bc286512f5cf,
6860 >(_buf?)?
6861 .into_result::<DictionaryEnumerateIteratorMarker>("get_next")?;
6862 Ok(_response.map(|x| (x.items, x.end_id)))
6863 }
6864 self.client.send_query_and_decode::<
6865 DictionaryEnumerateIteratorGetNextRequest,
6866 DictionaryEnumerateIteratorGetNextResult,
6867 >(
6868 (start_id, limit,),
6869 0x14f8bc286512f5cf,
6870 fidl::encoding::DynamicFlags::FLEXIBLE,
6871 _decode,
6872 )
6873 }
6874}
6875
6876pub struct DictionaryEnumerateIteratorEventStream {
6877 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6878}
6879
6880impl std::marker::Unpin for DictionaryEnumerateIteratorEventStream {}
6881
6882impl futures::stream::FusedStream for DictionaryEnumerateIteratorEventStream {
6883 fn is_terminated(&self) -> bool {
6884 self.event_receiver.is_terminated()
6885 }
6886}
6887
6888impl futures::Stream for DictionaryEnumerateIteratorEventStream {
6889 type Item = Result<DictionaryEnumerateIteratorEvent, fidl::Error>;
6890
6891 fn poll_next(
6892 mut self: std::pin::Pin<&mut Self>,
6893 cx: &mut std::task::Context<'_>,
6894 ) -> std::task::Poll<Option<Self::Item>> {
6895 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6896 &mut self.event_receiver,
6897 cx
6898 )?) {
6899 Some(buf) => {
6900 std::task::Poll::Ready(Some(DictionaryEnumerateIteratorEvent::decode(buf)))
6901 }
6902 None => std::task::Poll::Ready(None),
6903 }
6904 }
6905}
6906
6907#[derive(Debug)]
6908pub enum DictionaryEnumerateIteratorEvent {
6909 #[non_exhaustive]
6910 _UnknownEvent {
6911 ordinal: u64,
6913 },
6914}
6915
6916impl DictionaryEnumerateIteratorEvent {
6917 fn decode(
6919 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6920 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
6921 let (bytes, _handles) = buf.split_mut();
6922 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6923 debug_assert_eq!(tx_header.tx_id, 0);
6924 match tx_header.ordinal {
6925 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6926 Ok(DictionaryEnumerateIteratorEvent::_UnknownEvent {
6927 ordinal: tx_header.ordinal,
6928 })
6929 }
6930 _ => Err(fidl::Error::UnknownOrdinal {
6931 ordinal: tx_header.ordinal,
6932 protocol_name: <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6933 })
6934 }
6935 }
6936}
6937
6938pub struct DictionaryEnumerateIteratorRequestStream {
6940 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6941 is_terminated: bool,
6942}
6943
6944impl std::marker::Unpin for DictionaryEnumerateIteratorRequestStream {}
6945
6946impl futures::stream::FusedStream for DictionaryEnumerateIteratorRequestStream {
6947 fn is_terminated(&self) -> bool {
6948 self.is_terminated
6949 }
6950}
6951
6952impl fidl::endpoints::RequestStream for DictionaryEnumerateIteratorRequestStream {
6953 type Protocol = DictionaryEnumerateIteratorMarker;
6954 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
6955
6956 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6957 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6958 }
6959
6960 fn control_handle(&self) -> Self::ControlHandle {
6961 DictionaryEnumerateIteratorControlHandle { inner: self.inner.clone() }
6962 }
6963
6964 fn into_inner(
6965 self,
6966 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6967 {
6968 (self.inner, self.is_terminated)
6969 }
6970
6971 fn from_inner(
6972 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6973 is_terminated: bool,
6974 ) -> Self {
6975 Self { inner, is_terminated }
6976 }
6977}
6978
6979impl futures::Stream for DictionaryEnumerateIteratorRequestStream {
6980 type Item = Result<DictionaryEnumerateIteratorRequest, fidl::Error>;
6981
6982 fn poll_next(
6983 mut self: std::pin::Pin<&mut Self>,
6984 cx: &mut std::task::Context<'_>,
6985 ) -> std::task::Poll<Option<Self::Item>> {
6986 let this = &mut *self;
6987 if this.inner.check_shutdown(cx) {
6988 this.is_terminated = true;
6989 return std::task::Poll::Ready(None);
6990 }
6991 if this.is_terminated {
6992 panic!("polled DictionaryEnumerateIteratorRequestStream after completion");
6993 }
6994 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6995 |bytes, handles| {
6996 match this.inner.channel().read_etc(cx, bytes, handles) {
6997 std::task::Poll::Ready(Ok(())) => {}
6998 std::task::Poll::Pending => return std::task::Poll::Pending,
6999 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7000 this.is_terminated = true;
7001 return std::task::Poll::Ready(None);
7002 }
7003 std::task::Poll::Ready(Err(e)) => {
7004 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7005 e.into(),
7006 ))));
7007 }
7008 }
7009
7010 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7012
7013 std::task::Poll::Ready(Some(match header.ordinal {
7014 0x14f8bc286512f5cf => {
7015 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7016 let mut req = fidl::new_empty!(DictionaryEnumerateIteratorGetNextRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
7017 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DictionaryEnumerateIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
7018 let control_handle = DictionaryEnumerateIteratorControlHandle {
7019 inner: this.inner.clone(),
7020 };
7021 Ok(DictionaryEnumerateIteratorRequest::GetNext {start_id: req.start_id,
7022limit: req.limit,
7023
7024 responder: DictionaryEnumerateIteratorGetNextResponder {
7025 control_handle: std::mem::ManuallyDrop::new(control_handle),
7026 tx_id: header.tx_id,
7027 },
7028 })
7029 }
7030 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7031 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
7032 ordinal: header.ordinal,
7033 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
7034 method_type: fidl::MethodType::OneWay,
7035 })
7036 }
7037 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7038 this.inner.send_framework_err(
7039 fidl::encoding::FrameworkErr::UnknownMethod,
7040 header.tx_id,
7041 header.ordinal,
7042 header.dynamic_flags(),
7043 (bytes, handles),
7044 )?;
7045 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
7046 ordinal: header.ordinal,
7047 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
7048 method_type: fidl::MethodType::TwoWay,
7049 })
7050 }
7051 _ => Err(fidl::Error::UnknownOrdinal {
7052 ordinal: header.ordinal,
7053 protocol_name: <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7054 }),
7055 }))
7056 },
7057 )
7058 }
7059}
7060
7061#[derive(Debug)]
7062pub enum DictionaryEnumerateIteratorRequest {
7063 GetNext { start_id: u64, limit: u32, responder: DictionaryEnumerateIteratorGetNextResponder },
7084 #[non_exhaustive]
7086 _UnknownMethod {
7087 ordinal: u64,
7089 control_handle: DictionaryEnumerateIteratorControlHandle,
7090 method_type: fidl::MethodType,
7091 },
7092}
7093
7094impl DictionaryEnumerateIteratorRequest {
7095 #[allow(irrefutable_let_patterns)]
7096 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryEnumerateIteratorGetNextResponder)> {
7097 if let DictionaryEnumerateIteratorRequest::GetNext { start_id, limit, responder } = self {
7098 Some((start_id, limit, responder))
7099 } else {
7100 None
7101 }
7102 }
7103
7104 pub fn method_name(&self) -> &'static str {
7106 match *self {
7107 DictionaryEnumerateIteratorRequest::GetNext { .. } => "get_next",
7108 DictionaryEnumerateIteratorRequest::_UnknownMethod {
7109 method_type: fidl::MethodType::OneWay,
7110 ..
7111 } => "unknown one-way method",
7112 DictionaryEnumerateIteratorRequest::_UnknownMethod {
7113 method_type: fidl::MethodType::TwoWay,
7114 ..
7115 } => "unknown two-way method",
7116 }
7117 }
7118}
7119
7120#[derive(Debug, Clone)]
7121pub struct DictionaryEnumerateIteratorControlHandle {
7122 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7123}
7124
7125impl fidl::endpoints::ControlHandle for DictionaryEnumerateIteratorControlHandle {
7126 fn shutdown(&self) {
7127 self.inner.shutdown()
7128 }
7129
7130 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7131 self.inner.shutdown_with_epitaph(status)
7132 }
7133
7134 fn is_closed(&self) -> bool {
7135 self.inner.channel().is_closed()
7136 }
7137 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7138 self.inner.channel().on_closed()
7139 }
7140
7141 #[cfg(target_os = "fuchsia")]
7142 fn signal_peer(
7143 &self,
7144 clear_mask: zx::Signals,
7145 set_mask: zx::Signals,
7146 ) -> Result<(), zx_status::Status> {
7147 use fidl::Peered;
7148 self.inner.channel().signal_peer(clear_mask, set_mask)
7149 }
7150}
7151
7152impl DictionaryEnumerateIteratorControlHandle {}
7153
7154#[must_use = "FIDL methods require a response to be sent"]
7155#[derive(Debug)]
7156pub struct DictionaryEnumerateIteratorGetNextResponder {
7157 control_handle: std::mem::ManuallyDrop<DictionaryEnumerateIteratorControlHandle>,
7158 tx_id: u32,
7159}
7160
7161impl std::ops::Drop for DictionaryEnumerateIteratorGetNextResponder {
7165 fn drop(&mut self) {
7166 self.control_handle.shutdown();
7167 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7169 }
7170}
7171
7172impl fidl::endpoints::Responder for DictionaryEnumerateIteratorGetNextResponder {
7173 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
7174
7175 fn control_handle(&self) -> &DictionaryEnumerateIteratorControlHandle {
7176 &self.control_handle
7177 }
7178
7179 fn drop_without_shutdown(mut self) {
7180 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7182 std::mem::forget(self);
7184 }
7185}
7186
7187impl DictionaryEnumerateIteratorGetNextResponder {
7188 pub fn send(
7192 self,
7193 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
7194 ) -> Result<(), fidl::Error> {
7195 let _result = self.send_raw(result);
7196 if _result.is_err() {
7197 self.control_handle.shutdown();
7198 }
7199 self.drop_without_shutdown();
7200 _result
7201 }
7202
7203 pub fn send_no_shutdown_on_err(
7205 self,
7206 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
7207 ) -> Result<(), fidl::Error> {
7208 let _result = self.send_raw(result);
7209 self.drop_without_shutdown();
7210 _result
7211 }
7212
7213 fn send_raw(
7214 &self,
7215 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
7216 ) -> Result<(), fidl::Error> {
7217 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7218 DictionaryEnumerateIteratorGetNextResponse,
7219 CapabilityStoreError,
7220 >>(
7221 fidl::encoding::FlexibleResult::new(
7222 result
7223 .as_mut()
7224 .map_err(|e| *e)
7225 .map(|(items, end_id)| (items.as_mut_slice(), *end_id)),
7226 ),
7227 self.tx_id,
7228 0x14f8bc286512f5cf,
7229 fidl::encoding::DynamicFlags::FLEXIBLE,
7230 )
7231 }
7232}
7233
7234#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7235pub struct DictionaryKeysIteratorMarker;
7236
7237impl fidl::endpoints::ProtocolMarker for DictionaryKeysIteratorMarker {
7238 type Proxy = DictionaryKeysIteratorProxy;
7239 type RequestStream = DictionaryKeysIteratorRequestStream;
7240 #[cfg(target_os = "fuchsia")]
7241 type SynchronousProxy = DictionaryKeysIteratorSynchronousProxy;
7242
7243 const DEBUG_NAME: &'static str = "(anonymous) DictionaryKeysIterator";
7244}
7245
7246pub trait DictionaryKeysIteratorProxyInterface: Send + Sync {
7247 type GetNextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
7248 fn r#get_next(&self) -> Self::GetNextResponseFut;
7249}
7250#[derive(Debug)]
7251#[cfg(target_os = "fuchsia")]
7252pub struct DictionaryKeysIteratorSynchronousProxy {
7253 client: fidl::client::sync::Client,
7254}
7255
7256#[cfg(target_os = "fuchsia")]
7257impl fidl::endpoints::SynchronousProxy for DictionaryKeysIteratorSynchronousProxy {
7258 type Proxy = DictionaryKeysIteratorProxy;
7259 type Protocol = DictionaryKeysIteratorMarker;
7260
7261 fn from_channel(inner: fidl::Channel) -> Self {
7262 Self::new(inner)
7263 }
7264
7265 fn into_channel(self) -> fidl::Channel {
7266 self.client.into_channel()
7267 }
7268
7269 fn as_channel(&self) -> &fidl::Channel {
7270 self.client.as_channel()
7271 }
7272}
7273
7274#[cfg(target_os = "fuchsia")]
7275impl DictionaryKeysIteratorSynchronousProxy {
7276 pub fn new(channel: fidl::Channel) -> Self {
7277 Self { client: fidl::client::sync::Client::new(channel) }
7278 }
7279
7280 pub fn into_channel(self) -> fidl::Channel {
7281 self.client.into_channel()
7282 }
7283
7284 pub fn wait_for_event(
7287 &self,
7288 deadline: zx::MonotonicInstant,
7289 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
7290 DictionaryKeysIteratorEvent::decode(
7291 self.client.wait_for_event::<DictionaryKeysIteratorMarker>(deadline)?,
7292 )
7293 }
7294
7295 pub fn r#get_next(
7296 &self,
7297 ___deadline: zx::MonotonicInstant,
7298 ) -> Result<Vec<String>, fidl::Error> {
7299 let _response = self.client.send_query::<
7300 fidl::encoding::EmptyPayload,
7301 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
7302 DictionaryKeysIteratorMarker,
7303 >(
7304 (),
7305 0x453828cbacca7d53,
7306 fidl::encoding::DynamicFlags::FLEXIBLE,
7307 ___deadline,
7308 )?
7309 .into_result::<DictionaryKeysIteratorMarker>("get_next")?;
7310 Ok(_response.keys)
7311 }
7312}
7313
7314#[cfg(target_os = "fuchsia")]
7315impl From<DictionaryKeysIteratorSynchronousProxy> for zx::NullableHandle {
7316 fn from(value: DictionaryKeysIteratorSynchronousProxy) -> Self {
7317 value.into_channel().into()
7318 }
7319}
7320
7321#[cfg(target_os = "fuchsia")]
7322impl From<fidl::Channel> for DictionaryKeysIteratorSynchronousProxy {
7323 fn from(value: fidl::Channel) -> Self {
7324 Self::new(value)
7325 }
7326}
7327
7328#[cfg(target_os = "fuchsia")]
7329impl fidl::endpoints::FromClient for DictionaryKeysIteratorSynchronousProxy {
7330 type Protocol = DictionaryKeysIteratorMarker;
7331
7332 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryKeysIteratorMarker>) -> Self {
7333 Self::new(value.into_channel())
7334 }
7335}
7336
7337#[derive(Debug, Clone)]
7338pub struct DictionaryKeysIteratorProxy {
7339 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7340}
7341
7342impl fidl::endpoints::Proxy for DictionaryKeysIteratorProxy {
7343 type Protocol = DictionaryKeysIteratorMarker;
7344
7345 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7346 Self::new(inner)
7347 }
7348
7349 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7350 self.client.into_channel().map_err(|client| Self { client })
7351 }
7352
7353 fn as_channel(&self) -> &::fidl::AsyncChannel {
7354 self.client.as_channel()
7355 }
7356}
7357
7358impl DictionaryKeysIteratorProxy {
7359 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7361 let protocol_name =
7362 <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7363 Self { client: fidl::client::Client::new(channel, protocol_name) }
7364 }
7365
7366 pub fn take_event_stream(&self) -> DictionaryKeysIteratorEventStream {
7372 DictionaryKeysIteratorEventStream { event_receiver: self.client.take_event_receiver() }
7373 }
7374
7375 pub fn r#get_next(
7376 &self,
7377 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
7378 {
7379 DictionaryKeysIteratorProxyInterface::r#get_next(self)
7380 }
7381}
7382
7383impl DictionaryKeysIteratorProxyInterface for DictionaryKeysIteratorProxy {
7384 type GetNextResponseFut =
7385 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
7386 fn r#get_next(&self) -> Self::GetNextResponseFut {
7387 fn _decode(
7388 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7389 ) -> Result<Vec<String>, fidl::Error> {
7390 let _response = fidl::client::decode_transaction_body::<
7391 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
7392 fidl::encoding::DefaultFuchsiaResourceDialect,
7393 0x453828cbacca7d53,
7394 >(_buf?)?
7395 .into_result::<DictionaryKeysIteratorMarker>("get_next")?;
7396 Ok(_response.keys)
7397 }
7398 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
7399 (),
7400 0x453828cbacca7d53,
7401 fidl::encoding::DynamicFlags::FLEXIBLE,
7402 _decode,
7403 )
7404 }
7405}
7406
7407pub struct DictionaryKeysIteratorEventStream {
7408 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7409}
7410
7411impl std::marker::Unpin for DictionaryKeysIteratorEventStream {}
7412
7413impl futures::stream::FusedStream for DictionaryKeysIteratorEventStream {
7414 fn is_terminated(&self) -> bool {
7415 self.event_receiver.is_terminated()
7416 }
7417}
7418
7419impl futures::Stream for DictionaryKeysIteratorEventStream {
7420 type Item = Result<DictionaryKeysIteratorEvent, fidl::Error>;
7421
7422 fn poll_next(
7423 mut self: std::pin::Pin<&mut Self>,
7424 cx: &mut std::task::Context<'_>,
7425 ) -> std::task::Poll<Option<Self::Item>> {
7426 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7427 &mut self.event_receiver,
7428 cx
7429 )?) {
7430 Some(buf) => std::task::Poll::Ready(Some(DictionaryKeysIteratorEvent::decode(buf))),
7431 None => std::task::Poll::Ready(None),
7432 }
7433 }
7434}
7435
7436#[derive(Debug)]
7437pub enum DictionaryKeysIteratorEvent {
7438 #[non_exhaustive]
7439 _UnknownEvent {
7440 ordinal: u64,
7442 },
7443}
7444
7445impl DictionaryKeysIteratorEvent {
7446 fn decode(
7448 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7449 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
7450 let (bytes, _handles) = buf.split_mut();
7451 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7452 debug_assert_eq!(tx_header.tx_id, 0);
7453 match tx_header.ordinal {
7454 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7455 Ok(DictionaryKeysIteratorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7456 }
7457 _ => Err(fidl::Error::UnknownOrdinal {
7458 ordinal: tx_header.ordinal,
7459 protocol_name:
7460 <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7461 }),
7462 }
7463 }
7464}
7465
7466pub struct DictionaryKeysIteratorRequestStream {
7468 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7469 is_terminated: bool,
7470}
7471
7472impl std::marker::Unpin for DictionaryKeysIteratorRequestStream {}
7473
7474impl futures::stream::FusedStream for DictionaryKeysIteratorRequestStream {
7475 fn is_terminated(&self) -> bool {
7476 self.is_terminated
7477 }
7478}
7479
7480impl fidl::endpoints::RequestStream for DictionaryKeysIteratorRequestStream {
7481 type Protocol = DictionaryKeysIteratorMarker;
7482 type ControlHandle = DictionaryKeysIteratorControlHandle;
7483
7484 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7485 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7486 }
7487
7488 fn control_handle(&self) -> Self::ControlHandle {
7489 DictionaryKeysIteratorControlHandle { inner: self.inner.clone() }
7490 }
7491
7492 fn into_inner(
7493 self,
7494 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7495 {
7496 (self.inner, self.is_terminated)
7497 }
7498
7499 fn from_inner(
7500 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7501 is_terminated: bool,
7502 ) -> Self {
7503 Self { inner, is_terminated }
7504 }
7505}
7506
7507impl futures::Stream for DictionaryKeysIteratorRequestStream {
7508 type Item = Result<DictionaryKeysIteratorRequest, fidl::Error>;
7509
7510 fn poll_next(
7511 mut self: std::pin::Pin<&mut Self>,
7512 cx: &mut std::task::Context<'_>,
7513 ) -> std::task::Poll<Option<Self::Item>> {
7514 let this = &mut *self;
7515 if this.inner.check_shutdown(cx) {
7516 this.is_terminated = true;
7517 return std::task::Poll::Ready(None);
7518 }
7519 if this.is_terminated {
7520 panic!("polled DictionaryKeysIteratorRequestStream after completion");
7521 }
7522 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7523 |bytes, handles| {
7524 match this.inner.channel().read_etc(cx, bytes, handles) {
7525 std::task::Poll::Ready(Ok(())) => {}
7526 std::task::Poll::Pending => return std::task::Poll::Pending,
7527 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7528 this.is_terminated = true;
7529 return std::task::Poll::Ready(None);
7530 }
7531 std::task::Poll::Ready(Err(e)) => {
7532 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7533 e.into(),
7534 ))));
7535 }
7536 }
7537
7538 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7540
7541 std::task::Poll::Ready(Some(match header.ordinal {
7542 0x453828cbacca7d53 => {
7543 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7544 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
7545 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7546 let control_handle = DictionaryKeysIteratorControlHandle {
7547 inner: this.inner.clone(),
7548 };
7549 Ok(DictionaryKeysIteratorRequest::GetNext {
7550 responder: DictionaryKeysIteratorGetNextResponder {
7551 control_handle: std::mem::ManuallyDrop::new(control_handle),
7552 tx_id: header.tx_id,
7553 },
7554 })
7555 }
7556 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7557 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
7558 ordinal: header.ordinal,
7559 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
7560 method_type: fidl::MethodType::OneWay,
7561 })
7562 }
7563 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7564 this.inner.send_framework_err(
7565 fidl::encoding::FrameworkErr::UnknownMethod,
7566 header.tx_id,
7567 header.ordinal,
7568 header.dynamic_flags(),
7569 (bytes, handles),
7570 )?;
7571 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
7572 ordinal: header.ordinal,
7573 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
7574 method_type: fidl::MethodType::TwoWay,
7575 })
7576 }
7577 _ => Err(fidl::Error::UnknownOrdinal {
7578 ordinal: header.ordinal,
7579 protocol_name: <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7580 }),
7581 }))
7582 },
7583 )
7584 }
7585}
7586
7587#[derive(Debug)]
7588pub enum DictionaryKeysIteratorRequest {
7589 GetNext {
7590 responder: DictionaryKeysIteratorGetNextResponder,
7591 },
7592 #[non_exhaustive]
7594 _UnknownMethod {
7595 ordinal: u64,
7597 control_handle: DictionaryKeysIteratorControlHandle,
7598 method_type: fidl::MethodType,
7599 },
7600}
7601
7602impl DictionaryKeysIteratorRequest {
7603 #[allow(irrefutable_let_patterns)]
7604 pub fn into_get_next(self) -> Option<(DictionaryKeysIteratorGetNextResponder)> {
7605 if let DictionaryKeysIteratorRequest::GetNext { responder } = self {
7606 Some((responder))
7607 } else {
7608 None
7609 }
7610 }
7611
7612 pub fn method_name(&self) -> &'static str {
7614 match *self {
7615 DictionaryKeysIteratorRequest::GetNext { .. } => "get_next",
7616 DictionaryKeysIteratorRequest::_UnknownMethod {
7617 method_type: fidl::MethodType::OneWay,
7618 ..
7619 } => "unknown one-way method",
7620 DictionaryKeysIteratorRequest::_UnknownMethod {
7621 method_type: fidl::MethodType::TwoWay,
7622 ..
7623 } => "unknown two-way method",
7624 }
7625 }
7626}
7627
7628#[derive(Debug, Clone)]
7629pub struct DictionaryKeysIteratorControlHandle {
7630 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7631}
7632
7633impl fidl::endpoints::ControlHandle for DictionaryKeysIteratorControlHandle {
7634 fn shutdown(&self) {
7635 self.inner.shutdown()
7636 }
7637
7638 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7639 self.inner.shutdown_with_epitaph(status)
7640 }
7641
7642 fn is_closed(&self) -> bool {
7643 self.inner.channel().is_closed()
7644 }
7645 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7646 self.inner.channel().on_closed()
7647 }
7648
7649 #[cfg(target_os = "fuchsia")]
7650 fn signal_peer(
7651 &self,
7652 clear_mask: zx::Signals,
7653 set_mask: zx::Signals,
7654 ) -> Result<(), zx_status::Status> {
7655 use fidl::Peered;
7656 self.inner.channel().signal_peer(clear_mask, set_mask)
7657 }
7658}
7659
7660impl DictionaryKeysIteratorControlHandle {}
7661
7662#[must_use = "FIDL methods require a response to be sent"]
7663#[derive(Debug)]
7664pub struct DictionaryKeysIteratorGetNextResponder {
7665 control_handle: std::mem::ManuallyDrop<DictionaryKeysIteratorControlHandle>,
7666 tx_id: u32,
7667}
7668
7669impl std::ops::Drop for DictionaryKeysIteratorGetNextResponder {
7673 fn drop(&mut self) {
7674 self.control_handle.shutdown();
7675 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7677 }
7678}
7679
7680impl fidl::endpoints::Responder for DictionaryKeysIteratorGetNextResponder {
7681 type ControlHandle = DictionaryKeysIteratorControlHandle;
7682
7683 fn control_handle(&self) -> &DictionaryKeysIteratorControlHandle {
7684 &self.control_handle
7685 }
7686
7687 fn drop_without_shutdown(mut self) {
7688 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7690 std::mem::forget(self);
7692 }
7693}
7694
7695impl DictionaryKeysIteratorGetNextResponder {
7696 pub fn send(self, mut keys: &[String]) -> Result<(), fidl::Error> {
7700 let _result = self.send_raw(keys);
7701 if _result.is_err() {
7702 self.control_handle.shutdown();
7703 }
7704 self.drop_without_shutdown();
7705 _result
7706 }
7707
7708 pub fn send_no_shutdown_on_err(self, mut keys: &[String]) -> Result<(), fidl::Error> {
7710 let _result = self.send_raw(keys);
7711 self.drop_without_shutdown();
7712 _result
7713 }
7714
7715 fn send_raw(&self, mut keys: &[String]) -> Result<(), fidl::Error> {
7716 self.control_handle
7717 .inner
7718 .send::<fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>>(
7719 fidl::encoding::Flexible::new((keys,)),
7720 self.tx_id,
7721 0x453828cbacca7d53,
7722 fidl::encoding::DynamicFlags::FLEXIBLE,
7723 )
7724 }
7725}
7726
7727#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7728pub struct DictionaryRouterMarker;
7729
7730impl fidl::endpoints::ProtocolMarker for DictionaryRouterMarker {
7731 type Proxy = DictionaryRouterProxy;
7732 type RequestStream = DictionaryRouterRequestStream;
7733 #[cfg(target_os = "fuchsia")]
7734 type SynchronousProxy = DictionaryRouterSynchronousProxy;
7735
7736 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
7737}
7738impl fidl::endpoints::DiscoverableProtocolMarker for DictionaryRouterMarker {}
7739pub type DictionaryRouterRouteResult = Result<DictionaryRouterRouteResponse, RouterError>;
7740
7741pub trait DictionaryRouterProxyInterface: Send + Sync {
7742 type RouteResponseFut: std::future::Future<Output = Result<DictionaryRouterRouteResult, fidl::Error>>
7743 + Send;
7744 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
7745}
7746#[derive(Debug)]
7747#[cfg(target_os = "fuchsia")]
7748pub struct DictionaryRouterSynchronousProxy {
7749 client: fidl::client::sync::Client,
7750}
7751
7752#[cfg(target_os = "fuchsia")]
7753impl fidl::endpoints::SynchronousProxy for DictionaryRouterSynchronousProxy {
7754 type Proxy = DictionaryRouterProxy;
7755 type Protocol = DictionaryRouterMarker;
7756
7757 fn from_channel(inner: fidl::Channel) -> Self {
7758 Self::new(inner)
7759 }
7760
7761 fn into_channel(self) -> fidl::Channel {
7762 self.client.into_channel()
7763 }
7764
7765 fn as_channel(&self) -> &fidl::Channel {
7766 self.client.as_channel()
7767 }
7768}
7769
7770#[cfg(target_os = "fuchsia")]
7771impl DictionaryRouterSynchronousProxy {
7772 pub fn new(channel: fidl::Channel) -> Self {
7773 Self { client: fidl::client::sync::Client::new(channel) }
7774 }
7775
7776 pub fn into_channel(self) -> fidl::Channel {
7777 self.client.into_channel()
7778 }
7779
7780 pub fn wait_for_event(
7783 &self,
7784 deadline: zx::MonotonicInstant,
7785 ) -> Result<DictionaryRouterEvent, fidl::Error> {
7786 DictionaryRouterEvent::decode(
7787 self.client.wait_for_event::<DictionaryRouterMarker>(deadline)?,
7788 )
7789 }
7790
7791 pub fn r#route(
7792 &self,
7793 mut payload: RouteRequest,
7794 ___deadline: zx::MonotonicInstant,
7795 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
7796 let _response = self.client.send_query::<
7797 RouteRequest,
7798 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
7799 DictionaryRouterMarker,
7800 >(
7801 &mut payload,
7802 0x714c65bfe54bd79f,
7803 fidl::encoding::DynamicFlags::FLEXIBLE,
7804 ___deadline,
7805 )?
7806 .into_result::<DictionaryRouterMarker>("route")?;
7807 Ok(_response.map(|x| x))
7808 }
7809}
7810
7811#[cfg(target_os = "fuchsia")]
7812impl From<DictionaryRouterSynchronousProxy> for zx::NullableHandle {
7813 fn from(value: DictionaryRouterSynchronousProxy) -> Self {
7814 value.into_channel().into()
7815 }
7816}
7817
7818#[cfg(target_os = "fuchsia")]
7819impl From<fidl::Channel> for DictionaryRouterSynchronousProxy {
7820 fn from(value: fidl::Channel) -> Self {
7821 Self::new(value)
7822 }
7823}
7824
7825#[cfg(target_os = "fuchsia")]
7826impl fidl::endpoints::FromClient for DictionaryRouterSynchronousProxy {
7827 type Protocol = DictionaryRouterMarker;
7828
7829 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryRouterMarker>) -> Self {
7830 Self::new(value.into_channel())
7831 }
7832}
7833
7834#[derive(Debug, Clone)]
7835pub struct DictionaryRouterProxy {
7836 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7837}
7838
7839impl fidl::endpoints::Proxy for DictionaryRouterProxy {
7840 type Protocol = DictionaryRouterMarker;
7841
7842 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7843 Self::new(inner)
7844 }
7845
7846 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7847 self.client.into_channel().map_err(|client| Self { client })
7848 }
7849
7850 fn as_channel(&self) -> &::fidl::AsyncChannel {
7851 self.client.as_channel()
7852 }
7853}
7854
7855impl DictionaryRouterProxy {
7856 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7858 let protocol_name = <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7859 Self { client: fidl::client::Client::new(channel, protocol_name) }
7860 }
7861
7862 pub fn take_event_stream(&self) -> DictionaryRouterEventStream {
7868 DictionaryRouterEventStream { event_receiver: self.client.take_event_receiver() }
7869 }
7870
7871 pub fn r#route(
7872 &self,
7873 mut payload: RouteRequest,
7874 ) -> fidl::client::QueryResponseFut<
7875 DictionaryRouterRouteResult,
7876 fidl::encoding::DefaultFuchsiaResourceDialect,
7877 > {
7878 DictionaryRouterProxyInterface::r#route(self, payload)
7879 }
7880}
7881
7882impl DictionaryRouterProxyInterface for DictionaryRouterProxy {
7883 type RouteResponseFut = fidl::client::QueryResponseFut<
7884 DictionaryRouterRouteResult,
7885 fidl::encoding::DefaultFuchsiaResourceDialect,
7886 >;
7887 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
7888 fn _decode(
7889 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7890 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
7891 let _response = fidl::client::decode_transaction_body::<
7892 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
7893 fidl::encoding::DefaultFuchsiaResourceDialect,
7894 0x714c65bfe54bd79f,
7895 >(_buf?)?
7896 .into_result::<DictionaryRouterMarker>("route")?;
7897 Ok(_response.map(|x| x))
7898 }
7899 self.client.send_query_and_decode::<RouteRequest, DictionaryRouterRouteResult>(
7900 &mut payload,
7901 0x714c65bfe54bd79f,
7902 fidl::encoding::DynamicFlags::FLEXIBLE,
7903 _decode,
7904 )
7905 }
7906}
7907
7908pub struct DictionaryRouterEventStream {
7909 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7910}
7911
7912impl std::marker::Unpin for DictionaryRouterEventStream {}
7913
7914impl futures::stream::FusedStream for DictionaryRouterEventStream {
7915 fn is_terminated(&self) -> bool {
7916 self.event_receiver.is_terminated()
7917 }
7918}
7919
7920impl futures::Stream for DictionaryRouterEventStream {
7921 type Item = Result<DictionaryRouterEvent, fidl::Error>;
7922
7923 fn poll_next(
7924 mut self: std::pin::Pin<&mut Self>,
7925 cx: &mut std::task::Context<'_>,
7926 ) -> std::task::Poll<Option<Self::Item>> {
7927 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7928 &mut self.event_receiver,
7929 cx
7930 )?) {
7931 Some(buf) => std::task::Poll::Ready(Some(DictionaryRouterEvent::decode(buf))),
7932 None => std::task::Poll::Ready(None),
7933 }
7934 }
7935}
7936
7937#[derive(Debug)]
7938pub enum DictionaryRouterEvent {
7939 #[non_exhaustive]
7940 _UnknownEvent {
7941 ordinal: u64,
7943 },
7944}
7945
7946impl DictionaryRouterEvent {
7947 fn decode(
7949 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7950 ) -> Result<DictionaryRouterEvent, fidl::Error> {
7951 let (bytes, _handles) = buf.split_mut();
7952 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7953 debug_assert_eq!(tx_header.tx_id, 0);
7954 match tx_header.ordinal {
7955 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7956 Ok(DictionaryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7957 }
7958 _ => Err(fidl::Error::UnknownOrdinal {
7959 ordinal: tx_header.ordinal,
7960 protocol_name:
7961 <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7962 }),
7963 }
7964 }
7965}
7966
7967pub struct DictionaryRouterRequestStream {
7969 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7970 is_terminated: bool,
7971}
7972
7973impl std::marker::Unpin for DictionaryRouterRequestStream {}
7974
7975impl futures::stream::FusedStream for DictionaryRouterRequestStream {
7976 fn is_terminated(&self) -> bool {
7977 self.is_terminated
7978 }
7979}
7980
7981impl fidl::endpoints::RequestStream for DictionaryRouterRequestStream {
7982 type Protocol = DictionaryRouterMarker;
7983 type ControlHandle = DictionaryRouterControlHandle;
7984
7985 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7986 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7987 }
7988
7989 fn control_handle(&self) -> Self::ControlHandle {
7990 DictionaryRouterControlHandle { inner: self.inner.clone() }
7991 }
7992
7993 fn into_inner(
7994 self,
7995 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7996 {
7997 (self.inner, self.is_terminated)
7998 }
7999
8000 fn from_inner(
8001 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8002 is_terminated: bool,
8003 ) -> Self {
8004 Self { inner, is_terminated }
8005 }
8006}
8007
8008impl futures::Stream for DictionaryRouterRequestStream {
8009 type Item = Result<DictionaryRouterRequest, fidl::Error>;
8010
8011 fn poll_next(
8012 mut self: std::pin::Pin<&mut Self>,
8013 cx: &mut std::task::Context<'_>,
8014 ) -> std::task::Poll<Option<Self::Item>> {
8015 let this = &mut *self;
8016 if this.inner.check_shutdown(cx) {
8017 this.is_terminated = true;
8018 return std::task::Poll::Ready(None);
8019 }
8020 if this.is_terminated {
8021 panic!("polled DictionaryRouterRequestStream after completion");
8022 }
8023 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8024 |bytes, handles| {
8025 match this.inner.channel().read_etc(cx, bytes, handles) {
8026 std::task::Poll::Ready(Ok(())) => {}
8027 std::task::Poll::Pending => return std::task::Poll::Pending,
8028 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8029 this.is_terminated = true;
8030 return std::task::Poll::Ready(None);
8031 }
8032 std::task::Poll::Ready(Err(e)) => {
8033 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8034 e.into(),
8035 ))));
8036 }
8037 }
8038
8039 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8041
8042 std::task::Poll::Ready(Some(match header.ordinal {
8043 0x714c65bfe54bd79f => {
8044 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8045 let mut req = fidl::new_empty!(
8046 RouteRequest,
8047 fidl::encoding::DefaultFuchsiaResourceDialect
8048 );
8049 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8050 let control_handle =
8051 DictionaryRouterControlHandle { inner: this.inner.clone() };
8052 Ok(DictionaryRouterRequest::Route {
8053 payload: req,
8054 responder: DictionaryRouterRouteResponder {
8055 control_handle: std::mem::ManuallyDrop::new(control_handle),
8056 tx_id: header.tx_id,
8057 },
8058 })
8059 }
8060 _ if header.tx_id == 0
8061 && header
8062 .dynamic_flags()
8063 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8064 {
8065 Ok(DictionaryRouterRequest::_UnknownMethod {
8066 ordinal: header.ordinal,
8067 control_handle: DictionaryRouterControlHandle {
8068 inner: this.inner.clone(),
8069 },
8070 method_type: fidl::MethodType::OneWay,
8071 })
8072 }
8073 _ if header
8074 .dynamic_flags()
8075 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8076 {
8077 this.inner.send_framework_err(
8078 fidl::encoding::FrameworkErr::UnknownMethod,
8079 header.tx_id,
8080 header.ordinal,
8081 header.dynamic_flags(),
8082 (bytes, handles),
8083 )?;
8084 Ok(DictionaryRouterRequest::_UnknownMethod {
8085 ordinal: header.ordinal,
8086 control_handle: DictionaryRouterControlHandle {
8087 inner: this.inner.clone(),
8088 },
8089 method_type: fidl::MethodType::TwoWay,
8090 })
8091 }
8092 _ => Err(fidl::Error::UnknownOrdinal {
8093 ordinal: header.ordinal,
8094 protocol_name:
8095 <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8096 }),
8097 }))
8098 },
8099 )
8100 }
8101}
8102
8103#[derive(Debug)]
8104pub enum DictionaryRouterRequest {
8105 Route {
8106 payload: RouteRequest,
8107 responder: DictionaryRouterRouteResponder,
8108 },
8109 #[non_exhaustive]
8111 _UnknownMethod {
8112 ordinal: u64,
8114 control_handle: DictionaryRouterControlHandle,
8115 method_type: fidl::MethodType,
8116 },
8117}
8118
8119impl DictionaryRouterRequest {
8120 #[allow(irrefutable_let_patterns)]
8121 pub fn into_route(self) -> Option<(RouteRequest, DictionaryRouterRouteResponder)> {
8122 if let DictionaryRouterRequest::Route { payload, responder } = self {
8123 Some((payload, responder))
8124 } else {
8125 None
8126 }
8127 }
8128
8129 pub fn method_name(&self) -> &'static str {
8131 match *self {
8132 DictionaryRouterRequest::Route { .. } => "route",
8133 DictionaryRouterRequest::_UnknownMethod {
8134 method_type: fidl::MethodType::OneWay,
8135 ..
8136 } => "unknown one-way method",
8137 DictionaryRouterRequest::_UnknownMethod {
8138 method_type: fidl::MethodType::TwoWay,
8139 ..
8140 } => "unknown two-way method",
8141 }
8142 }
8143}
8144
8145#[derive(Debug, Clone)]
8146pub struct DictionaryRouterControlHandle {
8147 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8148}
8149
8150impl fidl::endpoints::ControlHandle for DictionaryRouterControlHandle {
8151 fn shutdown(&self) {
8152 self.inner.shutdown()
8153 }
8154
8155 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8156 self.inner.shutdown_with_epitaph(status)
8157 }
8158
8159 fn is_closed(&self) -> bool {
8160 self.inner.channel().is_closed()
8161 }
8162 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8163 self.inner.channel().on_closed()
8164 }
8165
8166 #[cfg(target_os = "fuchsia")]
8167 fn signal_peer(
8168 &self,
8169 clear_mask: zx::Signals,
8170 set_mask: zx::Signals,
8171 ) -> Result<(), zx_status::Status> {
8172 use fidl::Peered;
8173 self.inner.channel().signal_peer(clear_mask, set_mask)
8174 }
8175}
8176
8177impl DictionaryRouterControlHandle {}
8178
8179#[must_use = "FIDL methods require a response to be sent"]
8180#[derive(Debug)]
8181pub struct DictionaryRouterRouteResponder {
8182 control_handle: std::mem::ManuallyDrop<DictionaryRouterControlHandle>,
8183 tx_id: u32,
8184}
8185
8186impl std::ops::Drop for DictionaryRouterRouteResponder {
8190 fn drop(&mut self) {
8191 self.control_handle.shutdown();
8192 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8194 }
8195}
8196
8197impl fidl::endpoints::Responder for DictionaryRouterRouteResponder {
8198 type ControlHandle = DictionaryRouterControlHandle;
8199
8200 fn control_handle(&self) -> &DictionaryRouterControlHandle {
8201 &self.control_handle
8202 }
8203
8204 fn drop_without_shutdown(mut self) {
8205 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8207 std::mem::forget(self);
8209 }
8210}
8211
8212impl DictionaryRouterRouteResponder {
8213 pub fn send(
8217 self,
8218 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
8219 ) -> Result<(), fidl::Error> {
8220 let _result = self.send_raw(result);
8221 if _result.is_err() {
8222 self.control_handle.shutdown();
8223 }
8224 self.drop_without_shutdown();
8225 _result
8226 }
8227
8228 pub fn send_no_shutdown_on_err(
8230 self,
8231 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
8232 ) -> Result<(), fidl::Error> {
8233 let _result = self.send_raw(result);
8234 self.drop_without_shutdown();
8235 _result
8236 }
8237
8238 fn send_raw(
8239 &self,
8240 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
8241 ) -> Result<(), fidl::Error> {
8242 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8243 DictionaryRouterRouteResponse,
8244 RouterError,
8245 >>(
8246 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8247 self.tx_id,
8248 0x714c65bfe54bd79f,
8249 fidl::encoding::DynamicFlags::FLEXIBLE,
8250 )
8251 }
8252}
8253
8254#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8255pub struct DirConnectorRouterMarker;
8256
8257impl fidl::endpoints::ProtocolMarker for DirConnectorRouterMarker {
8258 type Proxy = DirConnectorRouterProxy;
8259 type RequestStream = DirConnectorRouterRequestStream;
8260 #[cfg(target_os = "fuchsia")]
8261 type SynchronousProxy = DirConnectorRouterSynchronousProxy;
8262
8263 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
8264}
8265impl fidl::endpoints::DiscoverableProtocolMarker for DirConnectorRouterMarker {}
8266pub type DirConnectorRouterRouteResult = Result<DirConnectorRouterRouteResponse, RouterError>;
8267
8268pub trait DirConnectorRouterProxyInterface: Send + Sync {
8269 type RouteResponseFut: std::future::Future<Output = Result<DirConnectorRouterRouteResult, fidl::Error>>
8270 + Send;
8271 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
8272}
8273#[derive(Debug)]
8274#[cfg(target_os = "fuchsia")]
8275pub struct DirConnectorRouterSynchronousProxy {
8276 client: fidl::client::sync::Client,
8277}
8278
8279#[cfg(target_os = "fuchsia")]
8280impl fidl::endpoints::SynchronousProxy for DirConnectorRouterSynchronousProxy {
8281 type Proxy = DirConnectorRouterProxy;
8282 type Protocol = DirConnectorRouterMarker;
8283
8284 fn from_channel(inner: fidl::Channel) -> Self {
8285 Self::new(inner)
8286 }
8287
8288 fn into_channel(self) -> fidl::Channel {
8289 self.client.into_channel()
8290 }
8291
8292 fn as_channel(&self) -> &fidl::Channel {
8293 self.client.as_channel()
8294 }
8295}
8296
8297#[cfg(target_os = "fuchsia")]
8298impl DirConnectorRouterSynchronousProxy {
8299 pub fn new(channel: fidl::Channel) -> Self {
8300 Self { client: fidl::client::sync::Client::new(channel) }
8301 }
8302
8303 pub fn into_channel(self) -> fidl::Channel {
8304 self.client.into_channel()
8305 }
8306
8307 pub fn wait_for_event(
8310 &self,
8311 deadline: zx::MonotonicInstant,
8312 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
8313 DirConnectorRouterEvent::decode(
8314 self.client.wait_for_event::<DirConnectorRouterMarker>(deadline)?,
8315 )
8316 }
8317
8318 pub fn r#route(
8319 &self,
8320 mut payload: RouteRequest,
8321 ___deadline: zx::MonotonicInstant,
8322 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
8323 let _response = self.client.send_query::<
8324 RouteRequest,
8325 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
8326 DirConnectorRouterMarker,
8327 >(
8328 &mut payload,
8329 0xd7e0f01da2c8e40,
8330 fidl::encoding::DynamicFlags::FLEXIBLE,
8331 ___deadline,
8332 )?
8333 .into_result::<DirConnectorRouterMarker>("route")?;
8334 Ok(_response.map(|x| x))
8335 }
8336}
8337
8338#[cfg(target_os = "fuchsia")]
8339impl From<DirConnectorRouterSynchronousProxy> for zx::NullableHandle {
8340 fn from(value: DirConnectorRouterSynchronousProxy) -> Self {
8341 value.into_channel().into()
8342 }
8343}
8344
8345#[cfg(target_os = "fuchsia")]
8346impl From<fidl::Channel> for DirConnectorRouterSynchronousProxy {
8347 fn from(value: fidl::Channel) -> Self {
8348 Self::new(value)
8349 }
8350}
8351
8352#[cfg(target_os = "fuchsia")]
8353impl fidl::endpoints::FromClient for DirConnectorRouterSynchronousProxy {
8354 type Protocol = DirConnectorRouterMarker;
8355
8356 fn from_client(value: fidl::endpoints::ClientEnd<DirConnectorRouterMarker>) -> Self {
8357 Self::new(value.into_channel())
8358 }
8359}
8360
8361#[derive(Debug, Clone)]
8362pub struct DirConnectorRouterProxy {
8363 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8364}
8365
8366impl fidl::endpoints::Proxy for DirConnectorRouterProxy {
8367 type Protocol = DirConnectorRouterMarker;
8368
8369 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8370 Self::new(inner)
8371 }
8372
8373 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8374 self.client.into_channel().map_err(|client| Self { client })
8375 }
8376
8377 fn as_channel(&self) -> &::fidl::AsyncChannel {
8378 self.client.as_channel()
8379 }
8380}
8381
8382impl DirConnectorRouterProxy {
8383 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8385 let protocol_name =
8386 <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8387 Self { client: fidl::client::Client::new(channel, protocol_name) }
8388 }
8389
8390 pub fn take_event_stream(&self) -> DirConnectorRouterEventStream {
8396 DirConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
8397 }
8398
8399 pub fn r#route(
8400 &self,
8401 mut payload: RouteRequest,
8402 ) -> fidl::client::QueryResponseFut<
8403 DirConnectorRouterRouteResult,
8404 fidl::encoding::DefaultFuchsiaResourceDialect,
8405 > {
8406 DirConnectorRouterProxyInterface::r#route(self, payload)
8407 }
8408}
8409
8410impl DirConnectorRouterProxyInterface for DirConnectorRouterProxy {
8411 type RouteResponseFut = fidl::client::QueryResponseFut<
8412 DirConnectorRouterRouteResult,
8413 fidl::encoding::DefaultFuchsiaResourceDialect,
8414 >;
8415 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
8416 fn _decode(
8417 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8418 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
8419 let _response = fidl::client::decode_transaction_body::<
8420 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
8421 fidl::encoding::DefaultFuchsiaResourceDialect,
8422 0xd7e0f01da2c8e40,
8423 >(_buf?)?
8424 .into_result::<DirConnectorRouterMarker>("route")?;
8425 Ok(_response.map(|x| x))
8426 }
8427 self.client.send_query_and_decode::<RouteRequest, DirConnectorRouterRouteResult>(
8428 &mut payload,
8429 0xd7e0f01da2c8e40,
8430 fidl::encoding::DynamicFlags::FLEXIBLE,
8431 _decode,
8432 )
8433 }
8434}
8435
8436pub struct DirConnectorRouterEventStream {
8437 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8438}
8439
8440impl std::marker::Unpin for DirConnectorRouterEventStream {}
8441
8442impl futures::stream::FusedStream for DirConnectorRouterEventStream {
8443 fn is_terminated(&self) -> bool {
8444 self.event_receiver.is_terminated()
8445 }
8446}
8447
8448impl futures::Stream for DirConnectorRouterEventStream {
8449 type Item = Result<DirConnectorRouterEvent, fidl::Error>;
8450
8451 fn poll_next(
8452 mut self: std::pin::Pin<&mut Self>,
8453 cx: &mut std::task::Context<'_>,
8454 ) -> std::task::Poll<Option<Self::Item>> {
8455 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8456 &mut self.event_receiver,
8457 cx
8458 )?) {
8459 Some(buf) => std::task::Poll::Ready(Some(DirConnectorRouterEvent::decode(buf))),
8460 None => std::task::Poll::Ready(None),
8461 }
8462 }
8463}
8464
8465#[derive(Debug)]
8466pub enum DirConnectorRouterEvent {
8467 #[non_exhaustive]
8468 _UnknownEvent {
8469 ordinal: u64,
8471 },
8472}
8473
8474impl DirConnectorRouterEvent {
8475 fn decode(
8477 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8478 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
8479 let (bytes, _handles) = buf.split_mut();
8480 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8481 debug_assert_eq!(tx_header.tx_id, 0);
8482 match tx_header.ordinal {
8483 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8484 Ok(DirConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8485 }
8486 _ => Err(fidl::Error::UnknownOrdinal {
8487 ordinal: tx_header.ordinal,
8488 protocol_name:
8489 <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8490 }),
8491 }
8492 }
8493}
8494
8495pub struct DirConnectorRouterRequestStream {
8497 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8498 is_terminated: bool,
8499}
8500
8501impl std::marker::Unpin for DirConnectorRouterRequestStream {}
8502
8503impl futures::stream::FusedStream for DirConnectorRouterRequestStream {
8504 fn is_terminated(&self) -> bool {
8505 self.is_terminated
8506 }
8507}
8508
8509impl fidl::endpoints::RequestStream for DirConnectorRouterRequestStream {
8510 type Protocol = DirConnectorRouterMarker;
8511 type ControlHandle = DirConnectorRouterControlHandle;
8512
8513 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8514 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8515 }
8516
8517 fn control_handle(&self) -> Self::ControlHandle {
8518 DirConnectorRouterControlHandle { inner: self.inner.clone() }
8519 }
8520
8521 fn into_inner(
8522 self,
8523 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8524 {
8525 (self.inner, self.is_terminated)
8526 }
8527
8528 fn from_inner(
8529 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8530 is_terminated: bool,
8531 ) -> Self {
8532 Self { inner, is_terminated }
8533 }
8534}
8535
8536impl futures::Stream for DirConnectorRouterRequestStream {
8537 type Item = Result<DirConnectorRouterRequest, fidl::Error>;
8538
8539 fn poll_next(
8540 mut self: std::pin::Pin<&mut Self>,
8541 cx: &mut std::task::Context<'_>,
8542 ) -> std::task::Poll<Option<Self::Item>> {
8543 let this = &mut *self;
8544 if this.inner.check_shutdown(cx) {
8545 this.is_terminated = true;
8546 return std::task::Poll::Ready(None);
8547 }
8548 if this.is_terminated {
8549 panic!("polled DirConnectorRouterRequestStream after completion");
8550 }
8551 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8552 |bytes, handles| {
8553 match this.inner.channel().read_etc(cx, bytes, handles) {
8554 std::task::Poll::Ready(Ok(())) => {}
8555 std::task::Poll::Pending => return std::task::Poll::Pending,
8556 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8557 this.is_terminated = true;
8558 return std::task::Poll::Ready(None);
8559 }
8560 std::task::Poll::Ready(Err(e)) => {
8561 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8562 e.into(),
8563 ))));
8564 }
8565 }
8566
8567 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8569
8570 std::task::Poll::Ready(Some(match header.ordinal {
8571 0xd7e0f01da2c8e40 => {
8572 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8573 let mut req = fidl::new_empty!(RouteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
8574 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8575 let control_handle = DirConnectorRouterControlHandle {
8576 inner: this.inner.clone(),
8577 };
8578 Ok(DirConnectorRouterRequest::Route {payload: req,
8579 responder: DirConnectorRouterRouteResponder {
8580 control_handle: std::mem::ManuallyDrop::new(control_handle),
8581 tx_id: header.tx_id,
8582 },
8583 })
8584 }
8585 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8586 Ok(DirConnectorRouterRequest::_UnknownMethod {
8587 ordinal: header.ordinal,
8588 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
8589 method_type: fidl::MethodType::OneWay,
8590 })
8591 }
8592 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8593 this.inner.send_framework_err(
8594 fidl::encoding::FrameworkErr::UnknownMethod,
8595 header.tx_id,
8596 header.ordinal,
8597 header.dynamic_flags(),
8598 (bytes, handles),
8599 )?;
8600 Ok(DirConnectorRouterRequest::_UnknownMethod {
8601 ordinal: header.ordinal,
8602 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
8603 method_type: fidl::MethodType::TwoWay,
8604 })
8605 }
8606 _ => Err(fidl::Error::UnknownOrdinal {
8607 ordinal: header.ordinal,
8608 protocol_name: <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8609 }),
8610 }))
8611 },
8612 )
8613 }
8614}
8615
8616#[derive(Debug)]
8617pub enum DirConnectorRouterRequest {
8618 Route {
8619 payload: RouteRequest,
8620 responder: DirConnectorRouterRouteResponder,
8621 },
8622 #[non_exhaustive]
8624 _UnknownMethod {
8625 ordinal: u64,
8627 control_handle: DirConnectorRouterControlHandle,
8628 method_type: fidl::MethodType,
8629 },
8630}
8631
8632impl DirConnectorRouterRequest {
8633 #[allow(irrefutable_let_patterns)]
8634 pub fn into_route(self) -> Option<(RouteRequest, DirConnectorRouterRouteResponder)> {
8635 if let DirConnectorRouterRequest::Route { payload, responder } = self {
8636 Some((payload, responder))
8637 } else {
8638 None
8639 }
8640 }
8641
8642 pub fn method_name(&self) -> &'static str {
8644 match *self {
8645 DirConnectorRouterRequest::Route { .. } => "route",
8646 DirConnectorRouterRequest::_UnknownMethod {
8647 method_type: fidl::MethodType::OneWay,
8648 ..
8649 } => "unknown one-way method",
8650 DirConnectorRouterRequest::_UnknownMethod {
8651 method_type: fidl::MethodType::TwoWay,
8652 ..
8653 } => "unknown two-way method",
8654 }
8655 }
8656}
8657
8658#[derive(Debug, Clone)]
8659pub struct DirConnectorRouterControlHandle {
8660 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8661}
8662
8663impl fidl::endpoints::ControlHandle for DirConnectorRouterControlHandle {
8664 fn shutdown(&self) {
8665 self.inner.shutdown()
8666 }
8667
8668 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8669 self.inner.shutdown_with_epitaph(status)
8670 }
8671
8672 fn is_closed(&self) -> bool {
8673 self.inner.channel().is_closed()
8674 }
8675 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8676 self.inner.channel().on_closed()
8677 }
8678
8679 #[cfg(target_os = "fuchsia")]
8680 fn signal_peer(
8681 &self,
8682 clear_mask: zx::Signals,
8683 set_mask: zx::Signals,
8684 ) -> Result<(), zx_status::Status> {
8685 use fidl::Peered;
8686 self.inner.channel().signal_peer(clear_mask, set_mask)
8687 }
8688}
8689
8690impl DirConnectorRouterControlHandle {}
8691
8692#[must_use = "FIDL methods require a response to be sent"]
8693#[derive(Debug)]
8694pub struct DirConnectorRouterRouteResponder {
8695 control_handle: std::mem::ManuallyDrop<DirConnectorRouterControlHandle>,
8696 tx_id: u32,
8697}
8698
8699impl std::ops::Drop for DirConnectorRouterRouteResponder {
8703 fn drop(&mut self) {
8704 self.control_handle.shutdown();
8705 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8707 }
8708}
8709
8710impl fidl::endpoints::Responder for DirConnectorRouterRouteResponder {
8711 type ControlHandle = DirConnectorRouterControlHandle;
8712
8713 fn control_handle(&self) -> &DirConnectorRouterControlHandle {
8714 &self.control_handle
8715 }
8716
8717 fn drop_without_shutdown(mut self) {
8718 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8720 std::mem::forget(self);
8722 }
8723}
8724
8725impl DirConnectorRouterRouteResponder {
8726 pub fn send(
8730 self,
8731 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
8732 ) -> Result<(), fidl::Error> {
8733 let _result = self.send_raw(result);
8734 if _result.is_err() {
8735 self.control_handle.shutdown();
8736 }
8737 self.drop_without_shutdown();
8738 _result
8739 }
8740
8741 pub fn send_no_shutdown_on_err(
8743 self,
8744 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
8745 ) -> Result<(), fidl::Error> {
8746 let _result = self.send_raw(result);
8747 self.drop_without_shutdown();
8748 _result
8749 }
8750
8751 fn send_raw(
8752 &self,
8753 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
8754 ) -> Result<(), fidl::Error> {
8755 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8756 DirConnectorRouterRouteResponse,
8757 RouterError,
8758 >>(
8759 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8760 self.tx_id,
8761 0xd7e0f01da2c8e40,
8762 fidl::encoding::DynamicFlags::FLEXIBLE,
8763 )
8764 }
8765}
8766
8767#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8768pub struct DirEntryRouterMarker;
8769
8770impl fidl::endpoints::ProtocolMarker for DirEntryRouterMarker {
8771 type Proxy = DirEntryRouterProxy;
8772 type RequestStream = DirEntryRouterRequestStream;
8773 #[cfg(target_os = "fuchsia")]
8774 type SynchronousProxy = DirEntryRouterSynchronousProxy;
8775
8776 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
8777}
8778impl fidl::endpoints::DiscoverableProtocolMarker for DirEntryRouterMarker {}
8779pub type DirEntryRouterRouteResult = Result<DirEntryRouterRouteResponse, RouterError>;
8780
8781pub trait DirEntryRouterProxyInterface: Send + Sync {
8782 type RouteResponseFut: std::future::Future<Output = Result<DirEntryRouterRouteResult, fidl::Error>>
8783 + Send;
8784 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
8785}
8786#[derive(Debug)]
8787#[cfg(target_os = "fuchsia")]
8788pub struct DirEntryRouterSynchronousProxy {
8789 client: fidl::client::sync::Client,
8790}
8791
8792#[cfg(target_os = "fuchsia")]
8793impl fidl::endpoints::SynchronousProxy for DirEntryRouterSynchronousProxy {
8794 type Proxy = DirEntryRouterProxy;
8795 type Protocol = DirEntryRouterMarker;
8796
8797 fn from_channel(inner: fidl::Channel) -> Self {
8798 Self::new(inner)
8799 }
8800
8801 fn into_channel(self) -> fidl::Channel {
8802 self.client.into_channel()
8803 }
8804
8805 fn as_channel(&self) -> &fidl::Channel {
8806 self.client.as_channel()
8807 }
8808}
8809
8810#[cfg(target_os = "fuchsia")]
8811impl DirEntryRouterSynchronousProxy {
8812 pub fn new(channel: fidl::Channel) -> Self {
8813 Self { client: fidl::client::sync::Client::new(channel) }
8814 }
8815
8816 pub fn into_channel(self) -> fidl::Channel {
8817 self.client.into_channel()
8818 }
8819
8820 pub fn wait_for_event(
8823 &self,
8824 deadline: zx::MonotonicInstant,
8825 ) -> Result<DirEntryRouterEvent, fidl::Error> {
8826 DirEntryRouterEvent::decode(self.client.wait_for_event::<DirEntryRouterMarker>(deadline)?)
8827 }
8828
8829 pub fn r#route(
8830 &self,
8831 mut payload: RouteRequest,
8832 ___deadline: zx::MonotonicInstant,
8833 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
8834 let _response = self.client.send_query::<
8835 RouteRequest,
8836 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
8837 DirEntryRouterMarker,
8838 >(
8839 &mut payload,
8840 0x1ac694001c208bd2,
8841 fidl::encoding::DynamicFlags::FLEXIBLE,
8842 ___deadline,
8843 )?
8844 .into_result::<DirEntryRouterMarker>("route")?;
8845 Ok(_response.map(|x| x))
8846 }
8847}
8848
8849#[cfg(target_os = "fuchsia")]
8850impl From<DirEntryRouterSynchronousProxy> for zx::NullableHandle {
8851 fn from(value: DirEntryRouterSynchronousProxy) -> Self {
8852 value.into_channel().into()
8853 }
8854}
8855
8856#[cfg(target_os = "fuchsia")]
8857impl From<fidl::Channel> for DirEntryRouterSynchronousProxy {
8858 fn from(value: fidl::Channel) -> Self {
8859 Self::new(value)
8860 }
8861}
8862
8863#[cfg(target_os = "fuchsia")]
8864impl fidl::endpoints::FromClient for DirEntryRouterSynchronousProxy {
8865 type Protocol = DirEntryRouterMarker;
8866
8867 fn from_client(value: fidl::endpoints::ClientEnd<DirEntryRouterMarker>) -> Self {
8868 Self::new(value.into_channel())
8869 }
8870}
8871
8872#[derive(Debug, Clone)]
8873pub struct DirEntryRouterProxy {
8874 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8875}
8876
8877impl fidl::endpoints::Proxy for DirEntryRouterProxy {
8878 type Protocol = DirEntryRouterMarker;
8879
8880 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8881 Self::new(inner)
8882 }
8883
8884 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8885 self.client.into_channel().map_err(|client| Self { client })
8886 }
8887
8888 fn as_channel(&self) -> &::fidl::AsyncChannel {
8889 self.client.as_channel()
8890 }
8891}
8892
8893impl DirEntryRouterProxy {
8894 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8896 let protocol_name = <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8897 Self { client: fidl::client::Client::new(channel, protocol_name) }
8898 }
8899
8900 pub fn take_event_stream(&self) -> DirEntryRouterEventStream {
8906 DirEntryRouterEventStream { event_receiver: self.client.take_event_receiver() }
8907 }
8908
8909 pub fn r#route(
8910 &self,
8911 mut payload: RouteRequest,
8912 ) -> fidl::client::QueryResponseFut<
8913 DirEntryRouterRouteResult,
8914 fidl::encoding::DefaultFuchsiaResourceDialect,
8915 > {
8916 DirEntryRouterProxyInterface::r#route(self, payload)
8917 }
8918}
8919
8920impl DirEntryRouterProxyInterface for DirEntryRouterProxy {
8921 type RouteResponseFut = fidl::client::QueryResponseFut<
8922 DirEntryRouterRouteResult,
8923 fidl::encoding::DefaultFuchsiaResourceDialect,
8924 >;
8925 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
8926 fn _decode(
8927 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8928 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
8929 let _response = fidl::client::decode_transaction_body::<
8930 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
8931 fidl::encoding::DefaultFuchsiaResourceDialect,
8932 0x1ac694001c208bd2,
8933 >(_buf?)?
8934 .into_result::<DirEntryRouterMarker>("route")?;
8935 Ok(_response.map(|x| x))
8936 }
8937 self.client.send_query_and_decode::<RouteRequest, DirEntryRouterRouteResult>(
8938 &mut payload,
8939 0x1ac694001c208bd2,
8940 fidl::encoding::DynamicFlags::FLEXIBLE,
8941 _decode,
8942 )
8943 }
8944}
8945
8946pub struct DirEntryRouterEventStream {
8947 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8948}
8949
8950impl std::marker::Unpin for DirEntryRouterEventStream {}
8951
8952impl futures::stream::FusedStream for DirEntryRouterEventStream {
8953 fn is_terminated(&self) -> bool {
8954 self.event_receiver.is_terminated()
8955 }
8956}
8957
8958impl futures::Stream for DirEntryRouterEventStream {
8959 type Item = Result<DirEntryRouterEvent, fidl::Error>;
8960
8961 fn poll_next(
8962 mut self: std::pin::Pin<&mut Self>,
8963 cx: &mut std::task::Context<'_>,
8964 ) -> std::task::Poll<Option<Self::Item>> {
8965 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8966 &mut self.event_receiver,
8967 cx
8968 )?) {
8969 Some(buf) => std::task::Poll::Ready(Some(DirEntryRouterEvent::decode(buf))),
8970 None => std::task::Poll::Ready(None),
8971 }
8972 }
8973}
8974
8975#[derive(Debug)]
8976pub enum DirEntryRouterEvent {
8977 #[non_exhaustive]
8978 _UnknownEvent {
8979 ordinal: u64,
8981 },
8982}
8983
8984impl DirEntryRouterEvent {
8985 fn decode(
8987 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8988 ) -> Result<DirEntryRouterEvent, fidl::Error> {
8989 let (bytes, _handles) = buf.split_mut();
8990 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8991 debug_assert_eq!(tx_header.tx_id, 0);
8992 match tx_header.ordinal {
8993 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8994 Ok(DirEntryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8995 }
8996 _ => Err(fidl::Error::UnknownOrdinal {
8997 ordinal: tx_header.ordinal,
8998 protocol_name:
8999 <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9000 }),
9001 }
9002 }
9003}
9004
9005pub struct DirEntryRouterRequestStream {
9007 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9008 is_terminated: bool,
9009}
9010
9011impl std::marker::Unpin for DirEntryRouterRequestStream {}
9012
9013impl futures::stream::FusedStream for DirEntryRouterRequestStream {
9014 fn is_terminated(&self) -> bool {
9015 self.is_terminated
9016 }
9017}
9018
9019impl fidl::endpoints::RequestStream for DirEntryRouterRequestStream {
9020 type Protocol = DirEntryRouterMarker;
9021 type ControlHandle = DirEntryRouterControlHandle;
9022
9023 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9024 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9025 }
9026
9027 fn control_handle(&self) -> Self::ControlHandle {
9028 DirEntryRouterControlHandle { inner: self.inner.clone() }
9029 }
9030
9031 fn into_inner(
9032 self,
9033 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9034 {
9035 (self.inner, self.is_terminated)
9036 }
9037
9038 fn from_inner(
9039 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9040 is_terminated: bool,
9041 ) -> Self {
9042 Self { inner, is_terminated }
9043 }
9044}
9045
9046impl futures::Stream for DirEntryRouterRequestStream {
9047 type Item = Result<DirEntryRouterRequest, fidl::Error>;
9048
9049 fn poll_next(
9050 mut self: std::pin::Pin<&mut Self>,
9051 cx: &mut std::task::Context<'_>,
9052 ) -> std::task::Poll<Option<Self::Item>> {
9053 let this = &mut *self;
9054 if this.inner.check_shutdown(cx) {
9055 this.is_terminated = true;
9056 return std::task::Poll::Ready(None);
9057 }
9058 if this.is_terminated {
9059 panic!("polled DirEntryRouterRequestStream after completion");
9060 }
9061 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9062 |bytes, handles| {
9063 match this.inner.channel().read_etc(cx, bytes, handles) {
9064 std::task::Poll::Ready(Ok(())) => {}
9065 std::task::Poll::Pending => return std::task::Poll::Pending,
9066 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9067 this.is_terminated = true;
9068 return std::task::Poll::Ready(None);
9069 }
9070 std::task::Poll::Ready(Err(e)) => {
9071 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9072 e.into(),
9073 ))));
9074 }
9075 }
9076
9077 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9079
9080 std::task::Poll::Ready(Some(match header.ordinal {
9081 0x1ac694001c208bd2 => {
9082 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9083 let mut req = fidl::new_empty!(
9084 RouteRequest,
9085 fidl::encoding::DefaultFuchsiaResourceDialect
9086 );
9087 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
9088 let control_handle =
9089 DirEntryRouterControlHandle { inner: this.inner.clone() };
9090 Ok(DirEntryRouterRequest::Route {
9091 payload: req,
9092 responder: DirEntryRouterRouteResponder {
9093 control_handle: std::mem::ManuallyDrop::new(control_handle),
9094 tx_id: header.tx_id,
9095 },
9096 })
9097 }
9098 _ if header.tx_id == 0
9099 && header
9100 .dynamic_flags()
9101 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9102 {
9103 Ok(DirEntryRouterRequest::_UnknownMethod {
9104 ordinal: header.ordinal,
9105 control_handle: DirEntryRouterControlHandle {
9106 inner: this.inner.clone(),
9107 },
9108 method_type: fidl::MethodType::OneWay,
9109 })
9110 }
9111 _ if header
9112 .dynamic_flags()
9113 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9114 {
9115 this.inner.send_framework_err(
9116 fidl::encoding::FrameworkErr::UnknownMethod,
9117 header.tx_id,
9118 header.ordinal,
9119 header.dynamic_flags(),
9120 (bytes, handles),
9121 )?;
9122 Ok(DirEntryRouterRequest::_UnknownMethod {
9123 ordinal: header.ordinal,
9124 control_handle: DirEntryRouterControlHandle {
9125 inner: this.inner.clone(),
9126 },
9127 method_type: fidl::MethodType::TwoWay,
9128 })
9129 }
9130 _ => Err(fidl::Error::UnknownOrdinal {
9131 ordinal: header.ordinal,
9132 protocol_name:
9133 <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9134 }),
9135 }))
9136 },
9137 )
9138 }
9139}
9140
9141#[derive(Debug)]
9142pub enum DirEntryRouterRequest {
9143 Route {
9144 payload: RouteRequest,
9145 responder: DirEntryRouterRouteResponder,
9146 },
9147 #[non_exhaustive]
9149 _UnknownMethod {
9150 ordinal: u64,
9152 control_handle: DirEntryRouterControlHandle,
9153 method_type: fidl::MethodType,
9154 },
9155}
9156
9157impl DirEntryRouterRequest {
9158 #[allow(irrefutable_let_patterns)]
9159 pub fn into_route(self) -> Option<(RouteRequest, DirEntryRouterRouteResponder)> {
9160 if let DirEntryRouterRequest::Route { payload, responder } = self {
9161 Some((payload, responder))
9162 } else {
9163 None
9164 }
9165 }
9166
9167 pub fn method_name(&self) -> &'static str {
9169 match *self {
9170 DirEntryRouterRequest::Route { .. } => "route",
9171 DirEntryRouterRequest::_UnknownMethod {
9172 method_type: fidl::MethodType::OneWay, ..
9173 } => "unknown one-way method",
9174 DirEntryRouterRequest::_UnknownMethod {
9175 method_type: fidl::MethodType::TwoWay, ..
9176 } => "unknown two-way method",
9177 }
9178 }
9179}
9180
9181#[derive(Debug, Clone)]
9182pub struct DirEntryRouterControlHandle {
9183 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9184}
9185
9186impl fidl::endpoints::ControlHandle for DirEntryRouterControlHandle {
9187 fn shutdown(&self) {
9188 self.inner.shutdown()
9189 }
9190
9191 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9192 self.inner.shutdown_with_epitaph(status)
9193 }
9194
9195 fn is_closed(&self) -> bool {
9196 self.inner.channel().is_closed()
9197 }
9198 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9199 self.inner.channel().on_closed()
9200 }
9201
9202 #[cfg(target_os = "fuchsia")]
9203 fn signal_peer(
9204 &self,
9205 clear_mask: zx::Signals,
9206 set_mask: zx::Signals,
9207 ) -> Result<(), zx_status::Status> {
9208 use fidl::Peered;
9209 self.inner.channel().signal_peer(clear_mask, set_mask)
9210 }
9211}
9212
9213impl DirEntryRouterControlHandle {}
9214
9215#[must_use = "FIDL methods require a response to be sent"]
9216#[derive(Debug)]
9217pub struct DirEntryRouterRouteResponder {
9218 control_handle: std::mem::ManuallyDrop<DirEntryRouterControlHandle>,
9219 tx_id: u32,
9220}
9221
9222impl std::ops::Drop for DirEntryRouterRouteResponder {
9226 fn drop(&mut self) {
9227 self.control_handle.shutdown();
9228 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9230 }
9231}
9232
9233impl fidl::endpoints::Responder for DirEntryRouterRouteResponder {
9234 type ControlHandle = DirEntryRouterControlHandle;
9235
9236 fn control_handle(&self) -> &DirEntryRouterControlHandle {
9237 &self.control_handle
9238 }
9239
9240 fn drop_without_shutdown(mut self) {
9241 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9243 std::mem::forget(self);
9245 }
9246}
9247
9248impl DirEntryRouterRouteResponder {
9249 pub fn send(
9253 self,
9254 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
9255 ) -> Result<(), fidl::Error> {
9256 let _result = self.send_raw(result);
9257 if _result.is_err() {
9258 self.control_handle.shutdown();
9259 }
9260 self.drop_without_shutdown();
9261 _result
9262 }
9263
9264 pub fn send_no_shutdown_on_err(
9266 self,
9267 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
9268 ) -> Result<(), fidl::Error> {
9269 let _result = self.send_raw(result);
9270 self.drop_without_shutdown();
9271 _result
9272 }
9273
9274 fn send_raw(
9275 &self,
9276 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
9277 ) -> Result<(), fidl::Error> {
9278 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9279 DirEntryRouterRouteResponse,
9280 RouterError,
9281 >>(
9282 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
9283 self.tx_id,
9284 0x1ac694001c208bd2,
9285 fidl::encoding::DynamicFlags::FLEXIBLE,
9286 )
9287 }
9288}
9289
9290#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9291pub struct DirReceiverMarker;
9292
9293impl fidl::endpoints::ProtocolMarker for DirReceiverMarker {
9294 type Proxy = DirReceiverProxy;
9295 type RequestStream = DirReceiverRequestStream;
9296 #[cfg(target_os = "fuchsia")]
9297 type SynchronousProxy = DirReceiverSynchronousProxy;
9298
9299 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
9300}
9301impl fidl::endpoints::DiscoverableProtocolMarker for DirReceiverMarker {}
9302
9303pub trait DirReceiverProxyInterface: Send + Sync {
9304 fn r#receive(&self, payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error>;
9305}
9306#[derive(Debug)]
9307#[cfg(target_os = "fuchsia")]
9308pub struct DirReceiverSynchronousProxy {
9309 client: fidl::client::sync::Client,
9310}
9311
9312#[cfg(target_os = "fuchsia")]
9313impl fidl::endpoints::SynchronousProxy for DirReceiverSynchronousProxy {
9314 type Proxy = DirReceiverProxy;
9315 type Protocol = DirReceiverMarker;
9316
9317 fn from_channel(inner: fidl::Channel) -> Self {
9318 Self::new(inner)
9319 }
9320
9321 fn into_channel(self) -> fidl::Channel {
9322 self.client.into_channel()
9323 }
9324
9325 fn as_channel(&self) -> &fidl::Channel {
9326 self.client.as_channel()
9327 }
9328}
9329
9330#[cfg(target_os = "fuchsia")]
9331impl DirReceiverSynchronousProxy {
9332 pub fn new(channel: fidl::Channel) -> Self {
9333 Self { client: fidl::client::sync::Client::new(channel) }
9334 }
9335
9336 pub fn into_channel(self) -> fidl::Channel {
9337 self.client.into_channel()
9338 }
9339
9340 pub fn wait_for_event(
9343 &self,
9344 deadline: zx::MonotonicInstant,
9345 ) -> Result<DirReceiverEvent, fidl::Error> {
9346 DirReceiverEvent::decode(self.client.wait_for_event::<DirReceiverMarker>(deadline)?)
9347 }
9348
9349 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
9354 self.client.send::<DirReceiverReceiveRequest>(
9355 &mut payload,
9356 0xcdc3e9b89fe7bb4,
9357 fidl::encoding::DynamicFlags::FLEXIBLE,
9358 )
9359 }
9360}
9361
9362#[cfg(target_os = "fuchsia")]
9363impl From<DirReceiverSynchronousProxy> for zx::NullableHandle {
9364 fn from(value: DirReceiverSynchronousProxy) -> Self {
9365 value.into_channel().into()
9366 }
9367}
9368
9369#[cfg(target_os = "fuchsia")]
9370impl From<fidl::Channel> for DirReceiverSynchronousProxy {
9371 fn from(value: fidl::Channel) -> Self {
9372 Self::new(value)
9373 }
9374}
9375
9376#[cfg(target_os = "fuchsia")]
9377impl fidl::endpoints::FromClient for DirReceiverSynchronousProxy {
9378 type Protocol = DirReceiverMarker;
9379
9380 fn from_client(value: fidl::endpoints::ClientEnd<DirReceiverMarker>) -> Self {
9381 Self::new(value.into_channel())
9382 }
9383}
9384
9385#[derive(Debug, Clone)]
9386pub struct DirReceiverProxy {
9387 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9388}
9389
9390impl fidl::endpoints::Proxy for DirReceiverProxy {
9391 type Protocol = DirReceiverMarker;
9392
9393 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9394 Self::new(inner)
9395 }
9396
9397 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9398 self.client.into_channel().map_err(|client| Self { client })
9399 }
9400
9401 fn as_channel(&self) -> &::fidl::AsyncChannel {
9402 self.client.as_channel()
9403 }
9404}
9405
9406impl DirReceiverProxy {
9407 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9409 let protocol_name = <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9410 Self { client: fidl::client::Client::new(channel, protocol_name) }
9411 }
9412
9413 pub fn take_event_stream(&self) -> DirReceiverEventStream {
9419 DirReceiverEventStream { event_receiver: self.client.take_event_receiver() }
9420 }
9421
9422 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
9427 DirReceiverProxyInterface::r#receive(self, payload)
9428 }
9429}
9430
9431impl DirReceiverProxyInterface for DirReceiverProxy {
9432 fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
9433 self.client.send::<DirReceiverReceiveRequest>(
9434 &mut payload,
9435 0xcdc3e9b89fe7bb4,
9436 fidl::encoding::DynamicFlags::FLEXIBLE,
9437 )
9438 }
9439}
9440
9441pub struct DirReceiverEventStream {
9442 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9443}
9444
9445impl std::marker::Unpin for DirReceiverEventStream {}
9446
9447impl futures::stream::FusedStream for DirReceiverEventStream {
9448 fn is_terminated(&self) -> bool {
9449 self.event_receiver.is_terminated()
9450 }
9451}
9452
9453impl futures::Stream for DirReceiverEventStream {
9454 type Item = Result<DirReceiverEvent, fidl::Error>;
9455
9456 fn poll_next(
9457 mut self: std::pin::Pin<&mut Self>,
9458 cx: &mut std::task::Context<'_>,
9459 ) -> std::task::Poll<Option<Self::Item>> {
9460 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9461 &mut self.event_receiver,
9462 cx
9463 )?) {
9464 Some(buf) => std::task::Poll::Ready(Some(DirReceiverEvent::decode(buf))),
9465 None => std::task::Poll::Ready(None),
9466 }
9467 }
9468}
9469
9470#[derive(Debug)]
9471pub enum DirReceiverEvent {
9472 #[non_exhaustive]
9473 _UnknownEvent {
9474 ordinal: u64,
9476 },
9477}
9478
9479impl DirReceiverEvent {
9480 fn decode(
9482 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9483 ) -> Result<DirReceiverEvent, fidl::Error> {
9484 let (bytes, _handles) = buf.split_mut();
9485 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9486 debug_assert_eq!(tx_header.tx_id, 0);
9487 match tx_header.ordinal {
9488 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9489 Ok(DirReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9490 }
9491 _ => Err(fidl::Error::UnknownOrdinal {
9492 ordinal: tx_header.ordinal,
9493 protocol_name: <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9494 }),
9495 }
9496 }
9497}
9498
9499pub struct DirReceiverRequestStream {
9501 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9502 is_terminated: bool,
9503}
9504
9505impl std::marker::Unpin for DirReceiverRequestStream {}
9506
9507impl futures::stream::FusedStream for DirReceiverRequestStream {
9508 fn is_terminated(&self) -> bool {
9509 self.is_terminated
9510 }
9511}
9512
9513impl fidl::endpoints::RequestStream for DirReceiverRequestStream {
9514 type Protocol = DirReceiverMarker;
9515 type ControlHandle = DirReceiverControlHandle;
9516
9517 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9518 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9519 }
9520
9521 fn control_handle(&self) -> Self::ControlHandle {
9522 DirReceiverControlHandle { inner: self.inner.clone() }
9523 }
9524
9525 fn into_inner(
9526 self,
9527 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9528 {
9529 (self.inner, self.is_terminated)
9530 }
9531
9532 fn from_inner(
9533 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9534 is_terminated: bool,
9535 ) -> Self {
9536 Self { inner, is_terminated }
9537 }
9538}
9539
9540impl futures::Stream for DirReceiverRequestStream {
9541 type Item = Result<DirReceiverRequest, fidl::Error>;
9542
9543 fn poll_next(
9544 mut self: std::pin::Pin<&mut Self>,
9545 cx: &mut std::task::Context<'_>,
9546 ) -> std::task::Poll<Option<Self::Item>> {
9547 let this = &mut *self;
9548 if this.inner.check_shutdown(cx) {
9549 this.is_terminated = true;
9550 return std::task::Poll::Ready(None);
9551 }
9552 if this.is_terminated {
9553 panic!("polled DirReceiverRequestStream after completion");
9554 }
9555 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9556 |bytes, handles| {
9557 match this.inner.channel().read_etc(cx, bytes, handles) {
9558 std::task::Poll::Ready(Ok(())) => {}
9559 std::task::Poll::Pending => return std::task::Poll::Pending,
9560 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9561 this.is_terminated = true;
9562 return std::task::Poll::Ready(None);
9563 }
9564 std::task::Poll::Ready(Err(e)) => {
9565 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9566 e.into(),
9567 ))));
9568 }
9569 }
9570
9571 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9573
9574 std::task::Poll::Ready(Some(match header.ordinal {
9575 0xcdc3e9b89fe7bb4 => {
9576 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9577 let mut req = fidl::new_empty!(
9578 DirReceiverReceiveRequest,
9579 fidl::encoding::DefaultFuchsiaResourceDialect
9580 );
9581 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirReceiverReceiveRequest>(&header, _body_bytes, handles, &mut req)?;
9582 let control_handle = DirReceiverControlHandle { inner: this.inner.clone() };
9583 Ok(DirReceiverRequest::Receive { payload: req, control_handle })
9584 }
9585 _ if header.tx_id == 0
9586 && header
9587 .dynamic_flags()
9588 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9589 {
9590 Ok(DirReceiverRequest::_UnknownMethod {
9591 ordinal: header.ordinal,
9592 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
9593 method_type: fidl::MethodType::OneWay,
9594 })
9595 }
9596 _ if header
9597 .dynamic_flags()
9598 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9599 {
9600 this.inner.send_framework_err(
9601 fidl::encoding::FrameworkErr::UnknownMethod,
9602 header.tx_id,
9603 header.ordinal,
9604 header.dynamic_flags(),
9605 (bytes, handles),
9606 )?;
9607 Ok(DirReceiverRequest::_UnknownMethod {
9608 ordinal: header.ordinal,
9609 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
9610 method_type: fidl::MethodType::TwoWay,
9611 })
9612 }
9613 _ => Err(fidl::Error::UnknownOrdinal {
9614 ordinal: header.ordinal,
9615 protocol_name:
9616 <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9617 }),
9618 }))
9619 },
9620 )
9621 }
9622}
9623
9624#[derive(Debug)]
9627pub enum DirReceiverRequest {
9628 Receive { payload: DirReceiverReceiveRequest, control_handle: DirReceiverControlHandle },
9633 #[non_exhaustive]
9635 _UnknownMethod {
9636 ordinal: u64,
9638 control_handle: DirReceiverControlHandle,
9639 method_type: fidl::MethodType,
9640 },
9641}
9642
9643impl DirReceiverRequest {
9644 #[allow(irrefutable_let_patterns)]
9645 pub fn into_receive(self) -> Option<(DirReceiverReceiveRequest, DirReceiverControlHandle)> {
9646 if let DirReceiverRequest::Receive { payload, control_handle } = self {
9647 Some((payload, control_handle))
9648 } else {
9649 None
9650 }
9651 }
9652
9653 pub fn method_name(&self) -> &'static str {
9655 match *self {
9656 DirReceiverRequest::Receive { .. } => "receive",
9657 DirReceiverRequest::_UnknownMethod {
9658 method_type: fidl::MethodType::OneWay, ..
9659 } => "unknown one-way method",
9660 DirReceiverRequest::_UnknownMethod {
9661 method_type: fidl::MethodType::TwoWay, ..
9662 } => "unknown two-way method",
9663 }
9664 }
9665}
9666
9667#[derive(Debug, Clone)]
9668pub struct DirReceiverControlHandle {
9669 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9670}
9671
9672impl fidl::endpoints::ControlHandle for DirReceiverControlHandle {
9673 fn shutdown(&self) {
9674 self.inner.shutdown()
9675 }
9676
9677 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9678 self.inner.shutdown_with_epitaph(status)
9679 }
9680
9681 fn is_closed(&self) -> bool {
9682 self.inner.channel().is_closed()
9683 }
9684 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9685 self.inner.channel().on_closed()
9686 }
9687
9688 #[cfg(target_os = "fuchsia")]
9689 fn signal_peer(
9690 &self,
9691 clear_mask: zx::Signals,
9692 set_mask: zx::Signals,
9693 ) -> Result<(), zx_status::Status> {
9694 use fidl::Peered;
9695 self.inner.channel().signal_peer(clear_mask, set_mask)
9696 }
9697}
9698
9699impl DirReceiverControlHandle {}
9700
9701#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9702pub struct DirectoryRouterMarker;
9703
9704impl fidl::endpoints::ProtocolMarker for DirectoryRouterMarker {
9705 type Proxy = DirectoryRouterProxy;
9706 type RequestStream = DirectoryRouterRequestStream;
9707 #[cfg(target_os = "fuchsia")]
9708 type SynchronousProxy = DirectoryRouterSynchronousProxy;
9709
9710 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
9711}
9712impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryRouterMarker {}
9713pub type DirectoryRouterRouteResult = Result<DirectoryRouterRouteResponse, RouterError>;
9714
9715pub trait DirectoryRouterProxyInterface: Send + Sync {
9716 type RouteResponseFut: std::future::Future<Output = Result<DirectoryRouterRouteResult, fidl::Error>>
9717 + Send;
9718 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
9719}
9720#[derive(Debug)]
9721#[cfg(target_os = "fuchsia")]
9722pub struct DirectoryRouterSynchronousProxy {
9723 client: fidl::client::sync::Client,
9724}
9725
9726#[cfg(target_os = "fuchsia")]
9727impl fidl::endpoints::SynchronousProxy for DirectoryRouterSynchronousProxy {
9728 type Proxy = DirectoryRouterProxy;
9729 type Protocol = DirectoryRouterMarker;
9730
9731 fn from_channel(inner: fidl::Channel) -> Self {
9732 Self::new(inner)
9733 }
9734
9735 fn into_channel(self) -> fidl::Channel {
9736 self.client.into_channel()
9737 }
9738
9739 fn as_channel(&self) -> &fidl::Channel {
9740 self.client.as_channel()
9741 }
9742}
9743
9744#[cfg(target_os = "fuchsia")]
9745impl DirectoryRouterSynchronousProxy {
9746 pub fn new(channel: fidl::Channel) -> Self {
9747 Self { client: fidl::client::sync::Client::new(channel) }
9748 }
9749
9750 pub fn into_channel(self) -> fidl::Channel {
9751 self.client.into_channel()
9752 }
9753
9754 pub fn wait_for_event(
9757 &self,
9758 deadline: zx::MonotonicInstant,
9759 ) -> Result<DirectoryRouterEvent, fidl::Error> {
9760 DirectoryRouterEvent::decode(self.client.wait_for_event::<DirectoryRouterMarker>(deadline)?)
9761 }
9762
9763 pub fn r#route(
9764 &self,
9765 mut payload: RouteRequest,
9766 ___deadline: zx::MonotonicInstant,
9767 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
9768 let _response = self.client.send_query::<
9769 RouteRequest,
9770 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
9771 DirectoryRouterMarker,
9772 >(
9773 &mut payload,
9774 0x683b6c6be21b0f21,
9775 fidl::encoding::DynamicFlags::FLEXIBLE,
9776 ___deadline,
9777 )?
9778 .into_result::<DirectoryRouterMarker>("route")?;
9779 Ok(_response.map(|x| x))
9780 }
9781}
9782
9783#[cfg(target_os = "fuchsia")]
9784impl From<DirectoryRouterSynchronousProxy> for zx::NullableHandle {
9785 fn from(value: DirectoryRouterSynchronousProxy) -> Self {
9786 value.into_channel().into()
9787 }
9788}
9789
9790#[cfg(target_os = "fuchsia")]
9791impl From<fidl::Channel> for DirectoryRouterSynchronousProxy {
9792 fn from(value: fidl::Channel) -> Self {
9793 Self::new(value)
9794 }
9795}
9796
9797#[cfg(target_os = "fuchsia")]
9798impl fidl::endpoints::FromClient for DirectoryRouterSynchronousProxy {
9799 type Protocol = DirectoryRouterMarker;
9800
9801 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryRouterMarker>) -> Self {
9802 Self::new(value.into_channel())
9803 }
9804}
9805
9806#[derive(Debug, Clone)]
9807pub struct DirectoryRouterProxy {
9808 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9809}
9810
9811impl fidl::endpoints::Proxy for DirectoryRouterProxy {
9812 type Protocol = DirectoryRouterMarker;
9813
9814 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9815 Self::new(inner)
9816 }
9817
9818 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9819 self.client.into_channel().map_err(|client| Self { client })
9820 }
9821
9822 fn as_channel(&self) -> &::fidl::AsyncChannel {
9823 self.client.as_channel()
9824 }
9825}
9826
9827impl DirectoryRouterProxy {
9828 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9830 let protocol_name = <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9831 Self { client: fidl::client::Client::new(channel, protocol_name) }
9832 }
9833
9834 pub fn take_event_stream(&self) -> DirectoryRouterEventStream {
9840 DirectoryRouterEventStream { event_receiver: self.client.take_event_receiver() }
9841 }
9842
9843 pub fn r#route(
9844 &self,
9845 mut payload: RouteRequest,
9846 ) -> fidl::client::QueryResponseFut<
9847 DirectoryRouterRouteResult,
9848 fidl::encoding::DefaultFuchsiaResourceDialect,
9849 > {
9850 DirectoryRouterProxyInterface::r#route(self, payload)
9851 }
9852}
9853
9854impl DirectoryRouterProxyInterface for DirectoryRouterProxy {
9855 type RouteResponseFut = fidl::client::QueryResponseFut<
9856 DirectoryRouterRouteResult,
9857 fidl::encoding::DefaultFuchsiaResourceDialect,
9858 >;
9859 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
9860 fn _decode(
9861 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9862 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
9863 let _response = fidl::client::decode_transaction_body::<
9864 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
9865 fidl::encoding::DefaultFuchsiaResourceDialect,
9866 0x683b6c6be21b0f21,
9867 >(_buf?)?
9868 .into_result::<DirectoryRouterMarker>("route")?;
9869 Ok(_response.map(|x| x))
9870 }
9871 self.client.send_query_and_decode::<RouteRequest, DirectoryRouterRouteResult>(
9872 &mut payload,
9873 0x683b6c6be21b0f21,
9874 fidl::encoding::DynamicFlags::FLEXIBLE,
9875 _decode,
9876 )
9877 }
9878}
9879
9880pub struct DirectoryRouterEventStream {
9881 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9882}
9883
9884impl std::marker::Unpin for DirectoryRouterEventStream {}
9885
9886impl futures::stream::FusedStream for DirectoryRouterEventStream {
9887 fn is_terminated(&self) -> bool {
9888 self.event_receiver.is_terminated()
9889 }
9890}
9891
9892impl futures::Stream for DirectoryRouterEventStream {
9893 type Item = Result<DirectoryRouterEvent, fidl::Error>;
9894
9895 fn poll_next(
9896 mut self: std::pin::Pin<&mut Self>,
9897 cx: &mut std::task::Context<'_>,
9898 ) -> std::task::Poll<Option<Self::Item>> {
9899 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9900 &mut self.event_receiver,
9901 cx
9902 )?) {
9903 Some(buf) => std::task::Poll::Ready(Some(DirectoryRouterEvent::decode(buf))),
9904 None => std::task::Poll::Ready(None),
9905 }
9906 }
9907}
9908
9909#[derive(Debug)]
9910pub enum DirectoryRouterEvent {
9911 #[non_exhaustive]
9912 _UnknownEvent {
9913 ordinal: u64,
9915 },
9916}
9917
9918impl DirectoryRouterEvent {
9919 fn decode(
9921 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9922 ) -> Result<DirectoryRouterEvent, fidl::Error> {
9923 let (bytes, _handles) = buf.split_mut();
9924 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9925 debug_assert_eq!(tx_header.tx_id, 0);
9926 match tx_header.ordinal {
9927 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9928 Ok(DirectoryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9929 }
9930 _ => Err(fidl::Error::UnknownOrdinal {
9931 ordinal: tx_header.ordinal,
9932 protocol_name:
9933 <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9934 }),
9935 }
9936 }
9937}
9938
9939pub struct DirectoryRouterRequestStream {
9941 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9942 is_terminated: bool,
9943}
9944
9945impl std::marker::Unpin for DirectoryRouterRequestStream {}
9946
9947impl futures::stream::FusedStream for DirectoryRouterRequestStream {
9948 fn is_terminated(&self) -> bool {
9949 self.is_terminated
9950 }
9951}
9952
9953impl fidl::endpoints::RequestStream for DirectoryRouterRequestStream {
9954 type Protocol = DirectoryRouterMarker;
9955 type ControlHandle = DirectoryRouterControlHandle;
9956
9957 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9958 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9959 }
9960
9961 fn control_handle(&self) -> Self::ControlHandle {
9962 DirectoryRouterControlHandle { inner: self.inner.clone() }
9963 }
9964
9965 fn into_inner(
9966 self,
9967 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9968 {
9969 (self.inner, self.is_terminated)
9970 }
9971
9972 fn from_inner(
9973 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9974 is_terminated: bool,
9975 ) -> Self {
9976 Self { inner, is_terminated }
9977 }
9978}
9979
9980impl futures::Stream for DirectoryRouterRequestStream {
9981 type Item = Result<DirectoryRouterRequest, fidl::Error>;
9982
9983 fn poll_next(
9984 mut self: std::pin::Pin<&mut Self>,
9985 cx: &mut std::task::Context<'_>,
9986 ) -> std::task::Poll<Option<Self::Item>> {
9987 let this = &mut *self;
9988 if this.inner.check_shutdown(cx) {
9989 this.is_terminated = true;
9990 return std::task::Poll::Ready(None);
9991 }
9992 if this.is_terminated {
9993 panic!("polled DirectoryRouterRequestStream after completion");
9994 }
9995 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9996 |bytes, handles| {
9997 match this.inner.channel().read_etc(cx, bytes, handles) {
9998 std::task::Poll::Ready(Ok(())) => {}
9999 std::task::Poll::Pending => return std::task::Poll::Pending,
10000 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
10001 this.is_terminated = true;
10002 return std::task::Poll::Ready(None);
10003 }
10004 std::task::Poll::Ready(Err(e)) => {
10005 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10006 e.into(),
10007 ))));
10008 }
10009 }
10010
10011 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10013
10014 std::task::Poll::Ready(Some(match header.ordinal {
10015 0x683b6c6be21b0f21 => {
10016 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10017 let mut req = fidl::new_empty!(
10018 RouteRequest,
10019 fidl::encoding::DefaultFuchsiaResourceDialect
10020 );
10021 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
10022 let control_handle =
10023 DirectoryRouterControlHandle { inner: this.inner.clone() };
10024 Ok(DirectoryRouterRequest::Route {
10025 payload: req,
10026 responder: DirectoryRouterRouteResponder {
10027 control_handle: std::mem::ManuallyDrop::new(control_handle),
10028 tx_id: header.tx_id,
10029 },
10030 })
10031 }
10032 _ if header.tx_id == 0
10033 && header
10034 .dynamic_flags()
10035 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10036 {
10037 Ok(DirectoryRouterRequest::_UnknownMethod {
10038 ordinal: header.ordinal,
10039 control_handle: DirectoryRouterControlHandle {
10040 inner: this.inner.clone(),
10041 },
10042 method_type: fidl::MethodType::OneWay,
10043 })
10044 }
10045 _ if header
10046 .dynamic_flags()
10047 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10048 {
10049 this.inner.send_framework_err(
10050 fidl::encoding::FrameworkErr::UnknownMethod,
10051 header.tx_id,
10052 header.ordinal,
10053 header.dynamic_flags(),
10054 (bytes, handles),
10055 )?;
10056 Ok(DirectoryRouterRequest::_UnknownMethod {
10057 ordinal: header.ordinal,
10058 control_handle: DirectoryRouterControlHandle {
10059 inner: this.inner.clone(),
10060 },
10061 method_type: fidl::MethodType::TwoWay,
10062 })
10063 }
10064 _ => Err(fidl::Error::UnknownOrdinal {
10065 ordinal: header.ordinal,
10066 protocol_name:
10067 <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10068 }),
10069 }))
10070 },
10071 )
10072 }
10073}
10074
10075#[derive(Debug)]
10076pub enum DirectoryRouterRequest {
10077 Route {
10078 payload: RouteRequest,
10079 responder: DirectoryRouterRouteResponder,
10080 },
10081 #[non_exhaustive]
10083 _UnknownMethod {
10084 ordinal: u64,
10086 control_handle: DirectoryRouterControlHandle,
10087 method_type: fidl::MethodType,
10088 },
10089}
10090
10091impl DirectoryRouterRequest {
10092 #[allow(irrefutable_let_patterns)]
10093 pub fn into_route(self) -> Option<(RouteRequest, DirectoryRouterRouteResponder)> {
10094 if let DirectoryRouterRequest::Route { payload, responder } = self {
10095 Some((payload, responder))
10096 } else {
10097 None
10098 }
10099 }
10100
10101 pub fn method_name(&self) -> &'static str {
10103 match *self {
10104 DirectoryRouterRequest::Route { .. } => "route",
10105 DirectoryRouterRequest::_UnknownMethod {
10106 method_type: fidl::MethodType::OneWay,
10107 ..
10108 } => "unknown one-way method",
10109 DirectoryRouterRequest::_UnknownMethod {
10110 method_type: fidl::MethodType::TwoWay,
10111 ..
10112 } => "unknown two-way method",
10113 }
10114 }
10115}
10116
10117#[derive(Debug, Clone)]
10118pub struct DirectoryRouterControlHandle {
10119 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10120}
10121
10122impl fidl::endpoints::ControlHandle for DirectoryRouterControlHandle {
10123 fn shutdown(&self) {
10124 self.inner.shutdown()
10125 }
10126
10127 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10128 self.inner.shutdown_with_epitaph(status)
10129 }
10130
10131 fn is_closed(&self) -> bool {
10132 self.inner.channel().is_closed()
10133 }
10134 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10135 self.inner.channel().on_closed()
10136 }
10137
10138 #[cfg(target_os = "fuchsia")]
10139 fn signal_peer(
10140 &self,
10141 clear_mask: zx::Signals,
10142 set_mask: zx::Signals,
10143 ) -> Result<(), zx_status::Status> {
10144 use fidl::Peered;
10145 self.inner.channel().signal_peer(clear_mask, set_mask)
10146 }
10147}
10148
10149impl DirectoryRouterControlHandle {}
10150
10151#[must_use = "FIDL methods require a response to be sent"]
10152#[derive(Debug)]
10153pub struct DirectoryRouterRouteResponder {
10154 control_handle: std::mem::ManuallyDrop<DirectoryRouterControlHandle>,
10155 tx_id: u32,
10156}
10157
10158impl std::ops::Drop for DirectoryRouterRouteResponder {
10162 fn drop(&mut self) {
10163 self.control_handle.shutdown();
10164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10166 }
10167}
10168
10169impl fidl::endpoints::Responder for DirectoryRouterRouteResponder {
10170 type ControlHandle = DirectoryRouterControlHandle;
10171
10172 fn control_handle(&self) -> &DirectoryRouterControlHandle {
10173 &self.control_handle
10174 }
10175
10176 fn drop_without_shutdown(mut self) {
10177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10179 std::mem::forget(self);
10181 }
10182}
10183
10184impl DirectoryRouterRouteResponder {
10185 pub fn send(
10189 self,
10190 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
10191 ) -> Result<(), fidl::Error> {
10192 let _result = self.send_raw(result);
10193 if _result.is_err() {
10194 self.control_handle.shutdown();
10195 }
10196 self.drop_without_shutdown();
10197 _result
10198 }
10199
10200 pub fn send_no_shutdown_on_err(
10202 self,
10203 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
10204 ) -> Result<(), fidl::Error> {
10205 let _result = self.send_raw(result);
10206 self.drop_without_shutdown();
10207 _result
10208 }
10209
10210 fn send_raw(
10211 &self,
10212 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
10213 ) -> Result<(), fidl::Error> {
10214 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10215 DirectoryRouterRouteResponse,
10216 RouterError,
10217 >>(
10218 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
10219 self.tx_id,
10220 0x683b6c6be21b0f21,
10221 fidl::encoding::DynamicFlags::FLEXIBLE,
10222 )
10223 }
10224}
10225
10226#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10227pub struct ReceiverMarker;
10228
10229impl fidl::endpoints::ProtocolMarker for ReceiverMarker {
10230 type Proxy = ReceiverProxy;
10231 type RequestStream = ReceiverRequestStream;
10232 #[cfg(target_os = "fuchsia")]
10233 type SynchronousProxy = ReceiverSynchronousProxy;
10234
10235 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
10236}
10237impl fidl::endpoints::DiscoverableProtocolMarker for ReceiverMarker {}
10238
10239pub trait ReceiverProxyInterface: Send + Sync {
10240 fn r#receive(&self, channel: fidl::Channel) -> Result<(), fidl::Error>;
10241}
10242#[derive(Debug)]
10243#[cfg(target_os = "fuchsia")]
10244pub struct ReceiverSynchronousProxy {
10245 client: fidl::client::sync::Client,
10246}
10247
10248#[cfg(target_os = "fuchsia")]
10249impl fidl::endpoints::SynchronousProxy for ReceiverSynchronousProxy {
10250 type Proxy = ReceiverProxy;
10251 type Protocol = ReceiverMarker;
10252
10253 fn from_channel(inner: fidl::Channel) -> Self {
10254 Self::new(inner)
10255 }
10256
10257 fn into_channel(self) -> fidl::Channel {
10258 self.client.into_channel()
10259 }
10260
10261 fn as_channel(&self) -> &fidl::Channel {
10262 self.client.as_channel()
10263 }
10264}
10265
10266#[cfg(target_os = "fuchsia")]
10267impl ReceiverSynchronousProxy {
10268 pub fn new(channel: fidl::Channel) -> Self {
10269 Self { client: fidl::client::sync::Client::new(channel) }
10270 }
10271
10272 pub fn into_channel(self) -> fidl::Channel {
10273 self.client.into_channel()
10274 }
10275
10276 pub fn wait_for_event(
10279 &self,
10280 deadline: zx::MonotonicInstant,
10281 ) -> Result<ReceiverEvent, fidl::Error> {
10282 ReceiverEvent::decode(self.client.wait_for_event::<ReceiverMarker>(deadline)?)
10283 }
10284
10285 pub fn r#receive(&self, mut channel: fidl::Channel) -> Result<(), fidl::Error> {
10287 self.client.send::<ProtocolPayload>(
10288 (channel,),
10289 0x4bae18ab7aa1a94,
10290 fidl::encoding::DynamicFlags::FLEXIBLE,
10291 )
10292 }
10293}
10294
10295#[cfg(target_os = "fuchsia")]
10296impl From<ReceiverSynchronousProxy> for zx::NullableHandle {
10297 fn from(value: ReceiverSynchronousProxy) -> Self {
10298 value.into_channel().into()
10299 }
10300}
10301
10302#[cfg(target_os = "fuchsia")]
10303impl From<fidl::Channel> for ReceiverSynchronousProxy {
10304 fn from(value: fidl::Channel) -> Self {
10305 Self::new(value)
10306 }
10307}
10308
10309#[cfg(target_os = "fuchsia")]
10310impl fidl::endpoints::FromClient for ReceiverSynchronousProxy {
10311 type Protocol = ReceiverMarker;
10312
10313 fn from_client(value: fidl::endpoints::ClientEnd<ReceiverMarker>) -> Self {
10314 Self::new(value.into_channel())
10315 }
10316}
10317
10318#[derive(Debug, Clone)]
10319pub struct ReceiverProxy {
10320 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
10321}
10322
10323impl fidl::endpoints::Proxy for ReceiverProxy {
10324 type Protocol = ReceiverMarker;
10325
10326 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
10327 Self::new(inner)
10328 }
10329
10330 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
10331 self.client.into_channel().map_err(|client| Self { client })
10332 }
10333
10334 fn as_channel(&self) -> &::fidl::AsyncChannel {
10335 self.client.as_channel()
10336 }
10337}
10338
10339impl ReceiverProxy {
10340 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
10342 let protocol_name = <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
10343 Self { client: fidl::client::Client::new(channel, protocol_name) }
10344 }
10345
10346 pub fn take_event_stream(&self) -> ReceiverEventStream {
10352 ReceiverEventStream { event_receiver: self.client.take_event_receiver() }
10353 }
10354
10355 pub fn r#receive(&self, mut channel: fidl::Channel) -> Result<(), fidl::Error> {
10357 ReceiverProxyInterface::r#receive(self, channel)
10358 }
10359}
10360
10361impl ReceiverProxyInterface for ReceiverProxy {
10362 fn r#receive(&self, mut channel: fidl::Channel) -> Result<(), fidl::Error> {
10363 self.client.send::<ProtocolPayload>(
10364 (channel,),
10365 0x4bae18ab7aa1a94,
10366 fidl::encoding::DynamicFlags::FLEXIBLE,
10367 )
10368 }
10369}
10370
10371pub struct ReceiverEventStream {
10372 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
10373}
10374
10375impl std::marker::Unpin for ReceiverEventStream {}
10376
10377impl futures::stream::FusedStream for ReceiverEventStream {
10378 fn is_terminated(&self) -> bool {
10379 self.event_receiver.is_terminated()
10380 }
10381}
10382
10383impl futures::Stream for ReceiverEventStream {
10384 type Item = Result<ReceiverEvent, fidl::Error>;
10385
10386 fn poll_next(
10387 mut self: std::pin::Pin<&mut Self>,
10388 cx: &mut std::task::Context<'_>,
10389 ) -> std::task::Poll<Option<Self::Item>> {
10390 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10391 &mut self.event_receiver,
10392 cx
10393 )?) {
10394 Some(buf) => std::task::Poll::Ready(Some(ReceiverEvent::decode(buf))),
10395 None => std::task::Poll::Ready(None),
10396 }
10397 }
10398}
10399
10400#[derive(Debug)]
10401pub enum ReceiverEvent {
10402 #[non_exhaustive]
10403 _UnknownEvent {
10404 ordinal: u64,
10406 },
10407}
10408
10409impl ReceiverEvent {
10410 fn decode(
10412 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10413 ) -> Result<ReceiverEvent, fidl::Error> {
10414 let (bytes, _handles) = buf.split_mut();
10415 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10416 debug_assert_eq!(tx_header.tx_id, 0);
10417 match tx_header.ordinal {
10418 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
10419 Ok(ReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
10420 }
10421 _ => Err(fidl::Error::UnknownOrdinal {
10422 ordinal: tx_header.ordinal,
10423 protocol_name: <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10424 }),
10425 }
10426 }
10427}
10428
10429pub struct ReceiverRequestStream {
10431 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10432 is_terminated: bool,
10433}
10434
10435impl std::marker::Unpin for ReceiverRequestStream {}
10436
10437impl futures::stream::FusedStream for ReceiverRequestStream {
10438 fn is_terminated(&self) -> bool {
10439 self.is_terminated
10440 }
10441}
10442
10443impl fidl::endpoints::RequestStream for ReceiverRequestStream {
10444 type Protocol = ReceiverMarker;
10445 type ControlHandle = ReceiverControlHandle;
10446
10447 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
10448 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10449 }
10450
10451 fn control_handle(&self) -> Self::ControlHandle {
10452 ReceiverControlHandle { inner: self.inner.clone() }
10453 }
10454
10455 fn into_inner(
10456 self,
10457 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
10458 {
10459 (self.inner, self.is_terminated)
10460 }
10461
10462 fn from_inner(
10463 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10464 is_terminated: bool,
10465 ) -> Self {
10466 Self { inner, is_terminated }
10467 }
10468}
10469
10470impl futures::Stream for ReceiverRequestStream {
10471 type Item = Result<ReceiverRequest, fidl::Error>;
10472
10473 fn poll_next(
10474 mut self: std::pin::Pin<&mut Self>,
10475 cx: &mut std::task::Context<'_>,
10476 ) -> std::task::Poll<Option<Self::Item>> {
10477 let this = &mut *self;
10478 if this.inner.check_shutdown(cx) {
10479 this.is_terminated = true;
10480 return std::task::Poll::Ready(None);
10481 }
10482 if this.is_terminated {
10483 panic!("polled ReceiverRequestStream after completion");
10484 }
10485 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
10486 |bytes, handles| {
10487 match this.inner.channel().read_etc(cx, bytes, handles) {
10488 std::task::Poll::Ready(Ok(())) => {}
10489 std::task::Poll::Pending => return std::task::Poll::Pending,
10490 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
10491 this.is_terminated = true;
10492 return std::task::Poll::Ready(None);
10493 }
10494 std::task::Poll::Ready(Err(e)) => {
10495 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10496 e.into(),
10497 ))));
10498 }
10499 }
10500
10501 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10503
10504 std::task::Poll::Ready(Some(match header.ordinal {
10505 0x4bae18ab7aa1a94 => {
10506 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
10507 let mut req = fidl::new_empty!(
10508 ProtocolPayload,
10509 fidl::encoding::DefaultFuchsiaResourceDialect
10510 );
10511 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ProtocolPayload>(&header, _body_bytes, handles, &mut req)?;
10512 let control_handle = ReceiverControlHandle { inner: this.inner.clone() };
10513 Ok(ReceiverRequest::Receive { channel: req.channel, control_handle })
10514 }
10515 _ if header.tx_id == 0
10516 && header
10517 .dynamic_flags()
10518 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10519 {
10520 Ok(ReceiverRequest::_UnknownMethod {
10521 ordinal: header.ordinal,
10522 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
10523 method_type: fidl::MethodType::OneWay,
10524 })
10525 }
10526 _ if header
10527 .dynamic_flags()
10528 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10529 {
10530 this.inner.send_framework_err(
10531 fidl::encoding::FrameworkErr::UnknownMethod,
10532 header.tx_id,
10533 header.ordinal,
10534 header.dynamic_flags(),
10535 (bytes, handles),
10536 )?;
10537 Ok(ReceiverRequest::_UnknownMethod {
10538 ordinal: header.ordinal,
10539 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
10540 method_type: fidl::MethodType::TwoWay,
10541 })
10542 }
10543 _ => Err(fidl::Error::UnknownOrdinal {
10544 ordinal: header.ordinal,
10545 protocol_name:
10546 <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10547 }),
10548 }))
10549 },
10550 )
10551 }
10552}
10553
10554#[derive(Debug)]
10557pub enum ReceiverRequest {
10558 Receive { channel: fidl::Channel, control_handle: ReceiverControlHandle },
10560 #[non_exhaustive]
10562 _UnknownMethod {
10563 ordinal: u64,
10565 control_handle: ReceiverControlHandle,
10566 method_type: fidl::MethodType,
10567 },
10568}
10569
10570impl ReceiverRequest {
10571 #[allow(irrefutable_let_patterns)]
10572 pub fn into_receive(self) -> Option<(fidl::Channel, ReceiverControlHandle)> {
10573 if let ReceiverRequest::Receive { channel, control_handle } = self {
10574 Some((channel, control_handle))
10575 } else {
10576 None
10577 }
10578 }
10579
10580 pub fn method_name(&self) -> &'static str {
10582 match *self {
10583 ReceiverRequest::Receive { .. } => "receive",
10584 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10585 "unknown one-way method"
10586 }
10587 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10588 "unknown two-way method"
10589 }
10590 }
10591 }
10592}
10593
10594#[derive(Debug, Clone)]
10595pub struct ReceiverControlHandle {
10596 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10597}
10598
10599impl fidl::endpoints::ControlHandle for ReceiverControlHandle {
10600 fn shutdown(&self) {
10601 self.inner.shutdown()
10602 }
10603
10604 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10605 self.inner.shutdown_with_epitaph(status)
10606 }
10607
10608 fn is_closed(&self) -> bool {
10609 self.inner.channel().is_closed()
10610 }
10611 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10612 self.inner.channel().on_closed()
10613 }
10614
10615 #[cfg(target_os = "fuchsia")]
10616 fn signal_peer(
10617 &self,
10618 clear_mask: zx::Signals,
10619 set_mask: zx::Signals,
10620 ) -> Result<(), zx_status::Status> {
10621 use fidl::Peered;
10622 self.inner.channel().signal_peer(clear_mask, set_mask)
10623 }
10624}
10625
10626impl ReceiverControlHandle {}
10627
10628mod internal {
10629 use super::*;
10630
10631 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorCreateRequest {
10632 type Borrowed<'a> = &'a mut Self;
10633 fn take_or_borrow<'a>(
10634 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10635 ) -> Self::Borrowed<'a> {
10636 value
10637 }
10638 }
10639
10640 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorCreateRequest {
10641 type Owned = Self;
10642
10643 #[inline(always)]
10644 fn inline_align(_context: fidl::encoding::Context) -> usize {
10645 8
10646 }
10647
10648 #[inline(always)]
10649 fn inline_size(_context: fidl::encoding::Context) -> usize {
10650 16
10651 }
10652 }
10653
10654 unsafe impl
10655 fidl::encoding::Encode<
10656 CapabilityStoreConnectorCreateRequest,
10657 fidl::encoding::DefaultFuchsiaResourceDialect,
10658 > for &mut CapabilityStoreConnectorCreateRequest
10659 {
10660 #[inline]
10661 unsafe fn encode(
10662 self,
10663 encoder: &mut fidl::encoding::Encoder<
10664 '_,
10665 fidl::encoding::DefaultFuchsiaResourceDialect,
10666 >,
10667 offset: usize,
10668 _depth: fidl::encoding::Depth,
10669 ) -> fidl::Result<()> {
10670 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
10671 fidl::encoding::Encode::<CapabilityStoreConnectorCreateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10673 (
10674 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10675 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
10676 ),
10677 encoder, offset, _depth
10678 )
10679 }
10680 }
10681 unsafe impl<
10682 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10683 T1: fidl::encoding::Encode<
10684 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>>,
10685 fidl::encoding::DefaultFuchsiaResourceDialect,
10686 >,
10687 >
10688 fidl::encoding::Encode<
10689 CapabilityStoreConnectorCreateRequest,
10690 fidl::encoding::DefaultFuchsiaResourceDialect,
10691 > for (T0, T1)
10692 {
10693 #[inline]
10694 unsafe fn encode(
10695 self,
10696 encoder: &mut fidl::encoding::Encoder<
10697 '_,
10698 fidl::encoding::DefaultFuchsiaResourceDialect,
10699 >,
10700 offset: usize,
10701 depth: fidl::encoding::Depth,
10702 ) -> fidl::Result<()> {
10703 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
10704 unsafe {
10707 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10708 (ptr as *mut u64).write_unaligned(0);
10709 }
10710 self.0.encode(encoder, offset + 0, depth)?;
10712 self.1.encode(encoder, offset + 8, depth)?;
10713 Ok(())
10714 }
10715 }
10716
10717 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10718 for CapabilityStoreConnectorCreateRequest
10719 {
10720 #[inline(always)]
10721 fn new_empty() -> Self {
10722 Self {
10723 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10724 receiver: fidl::new_empty!(
10725 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>>,
10726 fidl::encoding::DefaultFuchsiaResourceDialect
10727 ),
10728 }
10729 }
10730
10731 #[inline]
10732 unsafe fn decode(
10733 &mut self,
10734 decoder: &mut fidl::encoding::Decoder<
10735 '_,
10736 fidl::encoding::DefaultFuchsiaResourceDialect,
10737 >,
10738 offset: usize,
10739 _depth: fidl::encoding::Depth,
10740 ) -> fidl::Result<()> {
10741 decoder.debug_check_bounds::<Self>(offset);
10742 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10744 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10745 let mask = 0xffffffff00000000u64;
10746 let maskedval = padval & mask;
10747 if maskedval != 0 {
10748 return Err(fidl::Error::NonZeroPadding {
10749 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10750 });
10751 }
10752 fidl::decode!(
10753 u64,
10754 fidl::encoding::DefaultFuchsiaResourceDialect,
10755 &mut self.id,
10756 decoder,
10757 offset + 0,
10758 _depth
10759 )?;
10760 fidl::decode!(
10761 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>>,
10762 fidl::encoding::DefaultFuchsiaResourceDialect,
10763 &mut self.receiver,
10764 decoder,
10765 offset + 8,
10766 _depth
10767 )?;
10768 Ok(())
10769 }
10770 }
10771
10772 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorOpenRequest {
10773 type Borrowed<'a> = &'a mut Self;
10774 fn take_or_borrow<'a>(
10775 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10776 ) -> Self::Borrowed<'a> {
10777 value
10778 }
10779 }
10780
10781 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorOpenRequest {
10782 type Owned = Self;
10783
10784 #[inline(always)]
10785 fn inline_align(_context: fidl::encoding::Context) -> usize {
10786 8
10787 }
10788
10789 #[inline(always)]
10790 fn inline_size(_context: fidl::encoding::Context) -> usize {
10791 16
10792 }
10793 }
10794
10795 unsafe impl
10796 fidl::encoding::Encode<
10797 CapabilityStoreConnectorOpenRequest,
10798 fidl::encoding::DefaultFuchsiaResourceDialect,
10799 > for &mut CapabilityStoreConnectorOpenRequest
10800 {
10801 #[inline]
10802 unsafe fn encode(
10803 self,
10804 encoder: &mut fidl::encoding::Encoder<
10805 '_,
10806 fidl::encoding::DefaultFuchsiaResourceDialect,
10807 >,
10808 offset: usize,
10809 _depth: fidl::encoding::Depth,
10810 ) -> fidl::Result<()> {
10811 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
10812 fidl::encoding::Encode::<
10814 CapabilityStoreConnectorOpenRequest,
10815 fidl::encoding::DefaultFuchsiaResourceDialect,
10816 >::encode(
10817 (
10818 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10819 <fidl::encoding::HandleType<
10820 fidl::Channel,
10821 { fidl::ObjectType::CHANNEL.into_raw() },
10822 2147483648,
10823 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10824 &mut self.server_end
10825 ),
10826 ),
10827 encoder,
10828 offset,
10829 _depth,
10830 )
10831 }
10832 }
10833 unsafe impl<
10834 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10835 T1: fidl::encoding::Encode<
10836 fidl::encoding::HandleType<
10837 fidl::Channel,
10838 { fidl::ObjectType::CHANNEL.into_raw() },
10839 2147483648,
10840 >,
10841 fidl::encoding::DefaultFuchsiaResourceDialect,
10842 >,
10843 >
10844 fidl::encoding::Encode<
10845 CapabilityStoreConnectorOpenRequest,
10846 fidl::encoding::DefaultFuchsiaResourceDialect,
10847 > for (T0, T1)
10848 {
10849 #[inline]
10850 unsafe fn encode(
10851 self,
10852 encoder: &mut fidl::encoding::Encoder<
10853 '_,
10854 fidl::encoding::DefaultFuchsiaResourceDialect,
10855 >,
10856 offset: usize,
10857 depth: fidl::encoding::Depth,
10858 ) -> fidl::Result<()> {
10859 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
10860 unsafe {
10863 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10864 (ptr as *mut u64).write_unaligned(0);
10865 }
10866 self.0.encode(encoder, offset + 0, depth)?;
10868 self.1.encode(encoder, offset + 8, depth)?;
10869 Ok(())
10870 }
10871 }
10872
10873 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10874 for CapabilityStoreConnectorOpenRequest
10875 {
10876 #[inline(always)]
10877 fn new_empty() -> Self {
10878 Self {
10879 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10880 server_end: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10881 }
10882 }
10883
10884 #[inline]
10885 unsafe fn decode(
10886 &mut self,
10887 decoder: &mut fidl::encoding::Decoder<
10888 '_,
10889 fidl::encoding::DefaultFuchsiaResourceDialect,
10890 >,
10891 offset: usize,
10892 _depth: fidl::encoding::Depth,
10893 ) -> fidl::Result<()> {
10894 decoder.debug_check_bounds::<Self>(offset);
10895 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10897 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10898 let mask = 0xffffffff00000000u64;
10899 let maskedval = padval & mask;
10900 if maskedval != 0 {
10901 return Err(fidl::Error::NonZeroPadding {
10902 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10903 });
10904 }
10905 fidl::decode!(
10906 u64,
10907 fidl::encoding::DefaultFuchsiaResourceDialect,
10908 &mut self.id,
10909 decoder,
10910 offset + 0,
10911 _depth
10912 )?;
10913 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.server_end, decoder, offset + 8, _depth)?;
10914 Ok(())
10915 }
10916 }
10917
10918 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateRequest {
10919 type Borrowed<'a> = &'a mut Self;
10920 fn take_or_borrow<'a>(
10921 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10922 ) -> Self::Borrowed<'a> {
10923 value
10924 }
10925 }
10926
10927 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateRequest {
10928 type Owned = Self;
10929
10930 #[inline(always)]
10931 fn inline_align(_context: fidl::encoding::Context) -> usize {
10932 8
10933 }
10934
10935 #[inline(always)]
10936 fn inline_size(_context: fidl::encoding::Context) -> usize {
10937 16
10938 }
10939 }
10940
10941 unsafe impl
10942 fidl::encoding::Encode<
10943 CapabilityStoreCreateServiceAggregateRequest,
10944 fidl::encoding::DefaultFuchsiaResourceDialect,
10945 > for &mut CapabilityStoreCreateServiceAggregateRequest
10946 {
10947 #[inline]
10948 unsafe fn encode(
10949 self,
10950 encoder: &mut fidl::encoding::Encoder<
10951 '_,
10952 fidl::encoding::DefaultFuchsiaResourceDialect,
10953 >,
10954 offset: usize,
10955 _depth: fidl::encoding::Depth,
10956 ) -> fidl::Result<()> {
10957 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
10958 fidl::encoding::Encode::<CapabilityStoreCreateServiceAggregateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10960 (
10961 <fidl::encoding::UnboundedVector<AggregateSource> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sources),
10962 ),
10963 encoder, offset, _depth
10964 )
10965 }
10966 }
10967 unsafe impl<
10968 T0: fidl::encoding::Encode<
10969 fidl::encoding::UnboundedVector<AggregateSource>,
10970 fidl::encoding::DefaultFuchsiaResourceDialect,
10971 >,
10972 >
10973 fidl::encoding::Encode<
10974 CapabilityStoreCreateServiceAggregateRequest,
10975 fidl::encoding::DefaultFuchsiaResourceDialect,
10976 > for (T0,)
10977 {
10978 #[inline]
10979 unsafe fn encode(
10980 self,
10981 encoder: &mut fidl::encoding::Encoder<
10982 '_,
10983 fidl::encoding::DefaultFuchsiaResourceDialect,
10984 >,
10985 offset: usize,
10986 depth: fidl::encoding::Depth,
10987 ) -> fidl::Result<()> {
10988 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
10989 self.0.encode(encoder, offset + 0, depth)?;
10993 Ok(())
10994 }
10995 }
10996
10997 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10998 for CapabilityStoreCreateServiceAggregateRequest
10999 {
11000 #[inline(always)]
11001 fn new_empty() -> Self {
11002 Self {
11003 sources: fidl::new_empty!(
11004 fidl::encoding::UnboundedVector<AggregateSource>,
11005 fidl::encoding::DefaultFuchsiaResourceDialect
11006 ),
11007 }
11008 }
11009
11010 #[inline]
11011 unsafe fn decode(
11012 &mut self,
11013 decoder: &mut fidl::encoding::Decoder<
11014 '_,
11015 fidl::encoding::DefaultFuchsiaResourceDialect,
11016 >,
11017 offset: usize,
11018 _depth: fidl::encoding::Depth,
11019 ) -> fidl::Result<()> {
11020 decoder.debug_check_bounds::<Self>(offset);
11021 fidl::decode!(
11023 fidl::encoding::UnboundedVector<AggregateSource>,
11024 fidl::encoding::DefaultFuchsiaResourceDialect,
11025 &mut self.sources,
11026 decoder,
11027 offset + 0,
11028 _depth
11029 )?;
11030 Ok(())
11031 }
11032 }
11033
11034 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryDrainRequest {
11035 type Borrowed<'a> = &'a mut Self;
11036 fn take_or_borrow<'a>(
11037 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11038 ) -> Self::Borrowed<'a> {
11039 value
11040 }
11041 }
11042
11043 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryDrainRequest {
11044 type Owned = Self;
11045
11046 #[inline(always)]
11047 fn inline_align(_context: fidl::encoding::Context) -> usize {
11048 8
11049 }
11050
11051 #[inline(always)]
11052 fn inline_size(_context: fidl::encoding::Context) -> usize {
11053 16
11054 }
11055 }
11056
11057 unsafe impl
11058 fidl::encoding::Encode<
11059 CapabilityStoreDictionaryDrainRequest,
11060 fidl::encoding::DefaultFuchsiaResourceDialect,
11061 > for &mut CapabilityStoreDictionaryDrainRequest
11062 {
11063 #[inline]
11064 unsafe fn encode(
11065 self,
11066 encoder: &mut fidl::encoding::Encoder<
11067 '_,
11068 fidl::encoding::DefaultFuchsiaResourceDialect,
11069 >,
11070 offset: usize,
11071 _depth: fidl::encoding::Depth,
11072 ) -> fidl::Result<()> {
11073 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
11074 fidl::encoding::Encode::<
11076 CapabilityStoreDictionaryDrainRequest,
11077 fidl::encoding::DefaultFuchsiaResourceDialect,
11078 >::encode(
11079 (
11080 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11081 <fidl::encoding::Optional<
11082 fidl::encoding::Endpoint<
11083 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11084 >,
11085 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11086 &mut self.iterator
11087 ),
11088 ),
11089 encoder,
11090 offset,
11091 _depth,
11092 )
11093 }
11094 }
11095 unsafe impl<
11096 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11097 T1: fidl::encoding::Encode<
11098 fidl::encoding::Optional<
11099 fidl::encoding::Endpoint<
11100 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11101 >,
11102 >,
11103 fidl::encoding::DefaultFuchsiaResourceDialect,
11104 >,
11105 >
11106 fidl::encoding::Encode<
11107 CapabilityStoreDictionaryDrainRequest,
11108 fidl::encoding::DefaultFuchsiaResourceDialect,
11109 > for (T0, T1)
11110 {
11111 #[inline]
11112 unsafe fn encode(
11113 self,
11114 encoder: &mut fidl::encoding::Encoder<
11115 '_,
11116 fidl::encoding::DefaultFuchsiaResourceDialect,
11117 >,
11118 offset: usize,
11119 depth: fidl::encoding::Depth,
11120 ) -> fidl::Result<()> {
11121 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
11122 unsafe {
11125 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11126 (ptr as *mut u64).write_unaligned(0);
11127 }
11128 self.0.encode(encoder, offset + 0, depth)?;
11130 self.1.encode(encoder, offset + 8, depth)?;
11131 Ok(())
11132 }
11133 }
11134
11135 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11136 for CapabilityStoreDictionaryDrainRequest
11137 {
11138 #[inline(always)]
11139 fn new_empty() -> Self {
11140 Self {
11141 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11142 iterator: fidl::new_empty!(
11143 fidl::encoding::Optional<
11144 fidl::encoding::Endpoint<
11145 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11146 >,
11147 >,
11148 fidl::encoding::DefaultFuchsiaResourceDialect
11149 ),
11150 }
11151 }
11152
11153 #[inline]
11154 unsafe fn decode(
11155 &mut self,
11156 decoder: &mut fidl::encoding::Decoder<
11157 '_,
11158 fidl::encoding::DefaultFuchsiaResourceDialect,
11159 >,
11160 offset: usize,
11161 _depth: fidl::encoding::Depth,
11162 ) -> fidl::Result<()> {
11163 decoder.debug_check_bounds::<Self>(offset);
11164 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11166 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11167 let mask = 0xffffffff00000000u64;
11168 let maskedval = padval & mask;
11169 if maskedval != 0 {
11170 return Err(fidl::Error::NonZeroPadding {
11171 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11172 });
11173 }
11174 fidl::decode!(
11175 u64,
11176 fidl::encoding::DefaultFuchsiaResourceDialect,
11177 &mut self.id,
11178 decoder,
11179 offset + 0,
11180 _depth
11181 )?;
11182 fidl::decode!(
11183 fidl::encoding::Optional<
11184 fidl::encoding::Endpoint<
11185 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11186 >,
11187 >,
11188 fidl::encoding::DefaultFuchsiaResourceDialect,
11189 &mut self.iterator,
11190 decoder,
11191 offset + 8,
11192 _depth
11193 )?;
11194 Ok(())
11195 }
11196 }
11197
11198 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryEnumerateRequest {
11199 type Borrowed<'a> = &'a mut Self;
11200 fn take_or_borrow<'a>(
11201 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11202 ) -> Self::Borrowed<'a> {
11203 value
11204 }
11205 }
11206
11207 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryEnumerateRequest {
11208 type Owned = Self;
11209
11210 #[inline(always)]
11211 fn inline_align(_context: fidl::encoding::Context) -> usize {
11212 8
11213 }
11214
11215 #[inline(always)]
11216 fn inline_size(_context: fidl::encoding::Context) -> usize {
11217 16
11218 }
11219 }
11220
11221 unsafe impl
11222 fidl::encoding::Encode<
11223 CapabilityStoreDictionaryEnumerateRequest,
11224 fidl::encoding::DefaultFuchsiaResourceDialect,
11225 > for &mut CapabilityStoreDictionaryEnumerateRequest
11226 {
11227 #[inline]
11228 unsafe fn encode(
11229 self,
11230 encoder: &mut fidl::encoding::Encoder<
11231 '_,
11232 fidl::encoding::DefaultFuchsiaResourceDialect,
11233 >,
11234 offset: usize,
11235 _depth: fidl::encoding::Depth,
11236 ) -> fidl::Result<()> {
11237 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
11238 fidl::encoding::Encode::<
11240 CapabilityStoreDictionaryEnumerateRequest,
11241 fidl::encoding::DefaultFuchsiaResourceDialect,
11242 >::encode(
11243 (
11244 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11245 <fidl::encoding::Endpoint<
11246 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11247 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11248 &mut self.iterator
11249 ),
11250 ),
11251 encoder,
11252 offset,
11253 _depth,
11254 )
11255 }
11256 }
11257 unsafe impl<
11258 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11259 T1: fidl::encoding::Encode<
11260 fidl::encoding::Endpoint<
11261 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11262 >,
11263 fidl::encoding::DefaultFuchsiaResourceDialect,
11264 >,
11265 >
11266 fidl::encoding::Encode<
11267 CapabilityStoreDictionaryEnumerateRequest,
11268 fidl::encoding::DefaultFuchsiaResourceDialect,
11269 > for (T0, T1)
11270 {
11271 #[inline]
11272 unsafe fn encode(
11273 self,
11274 encoder: &mut fidl::encoding::Encoder<
11275 '_,
11276 fidl::encoding::DefaultFuchsiaResourceDialect,
11277 >,
11278 offset: usize,
11279 depth: fidl::encoding::Depth,
11280 ) -> fidl::Result<()> {
11281 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
11282 unsafe {
11285 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11286 (ptr as *mut u64).write_unaligned(0);
11287 }
11288 self.0.encode(encoder, offset + 0, depth)?;
11290 self.1.encode(encoder, offset + 8, depth)?;
11291 Ok(())
11292 }
11293 }
11294
11295 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11296 for CapabilityStoreDictionaryEnumerateRequest
11297 {
11298 #[inline(always)]
11299 fn new_empty() -> Self {
11300 Self {
11301 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11302 iterator: fidl::new_empty!(
11303 fidl::encoding::Endpoint<
11304 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11305 >,
11306 fidl::encoding::DefaultFuchsiaResourceDialect
11307 ),
11308 }
11309 }
11310
11311 #[inline]
11312 unsafe fn decode(
11313 &mut self,
11314 decoder: &mut fidl::encoding::Decoder<
11315 '_,
11316 fidl::encoding::DefaultFuchsiaResourceDialect,
11317 >,
11318 offset: usize,
11319 _depth: fidl::encoding::Depth,
11320 ) -> fidl::Result<()> {
11321 decoder.debug_check_bounds::<Self>(offset);
11322 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11324 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11325 let mask = 0xffffffff00000000u64;
11326 let maskedval = padval & mask;
11327 if maskedval != 0 {
11328 return Err(fidl::Error::NonZeroPadding {
11329 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11330 });
11331 }
11332 fidl::decode!(
11333 u64,
11334 fidl::encoding::DefaultFuchsiaResourceDialect,
11335 &mut self.id,
11336 decoder,
11337 offset + 0,
11338 _depth
11339 )?;
11340 fidl::decode!(
11341 fidl::encoding::Endpoint<
11342 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11343 >,
11344 fidl::encoding::DefaultFuchsiaResourceDialect,
11345 &mut self.iterator,
11346 decoder,
11347 offset + 8,
11348 _depth
11349 )?;
11350 Ok(())
11351 }
11352 }
11353
11354 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryKeysRequest {
11355 type Borrowed<'a> = &'a mut Self;
11356 fn take_or_borrow<'a>(
11357 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11358 ) -> Self::Borrowed<'a> {
11359 value
11360 }
11361 }
11362
11363 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryKeysRequest {
11364 type Owned = Self;
11365
11366 #[inline(always)]
11367 fn inline_align(_context: fidl::encoding::Context) -> usize {
11368 8
11369 }
11370
11371 #[inline(always)]
11372 fn inline_size(_context: fidl::encoding::Context) -> usize {
11373 16
11374 }
11375 }
11376
11377 unsafe impl
11378 fidl::encoding::Encode<
11379 CapabilityStoreDictionaryKeysRequest,
11380 fidl::encoding::DefaultFuchsiaResourceDialect,
11381 > for &mut CapabilityStoreDictionaryKeysRequest
11382 {
11383 #[inline]
11384 unsafe fn encode(
11385 self,
11386 encoder: &mut fidl::encoding::Encoder<
11387 '_,
11388 fidl::encoding::DefaultFuchsiaResourceDialect,
11389 >,
11390 offset: usize,
11391 _depth: fidl::encoding::Depth,
11392 ) -> fidl::Result<()> {
11393 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
11394 fidl::encoding::Encode::<
11396 CapabilityStoreDictionaryKeysRequest,
11397 fidl::encoding::DefaultFuchsiaResourceDialect,
11398 >::encode(
11399 (
11400 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11401 <fidl::encoding::Endpoint<
11402 fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
11403 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11404 &mut self.iterator
11405 ),
11406 ),
11407 encoder,
11408 offset,
11409 _depth,
11410 )
11411 }
11412 }
11413 unsafe impl<
11414 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11415 T1: fidl::encoding::Encode<
11416 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>>,
11417 fidl::encoding::DefaultFuchsiaResourceDialect,
11418 >,
11419 >
11420 fidl::encoding::Encode<
11421 CapabilityStoreDictionaryKeysRequest,
11422 fidl::encoding::DefaultFuchsiaResourceDialect,
11423 > for (T0, T1)
11424 {
11425 #[inline]
11426 unsafe fn encode(
11427 self,
11428 encoder: &mut fidl::encoding::Encoder<
11429 '_,
11430 fidl::encoding::DefaultFuchsiaResourceDialect,
11431 >,
11432 offset: usize,
11433 depth: fidl::encoding::Depth,
11434 ) -> fidl::Result<()> {
11435 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
11436 unsafe {
11439 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11440 (ptr as *mut u64).write_unaligned(0);
11441 }
11442 self.0.encode(encoder, offset + 0, depth)?;
11444 self.1.encode(encoder, offset + 8, depth)?;
11445 Ok(())
11446 }
11447 }
11448
11449 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11450 for CapabilityStoreDictionaryKeysRequest
11451 {
11452 #[inline(always)]
11453 fn new_empty() -> Self {
11454 Self {
11455 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11456 iterator: fidl::new_empty!(
11457 fidl::encoding::Endpoint<
11458 fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
11459 >,
11460 fidl::encoding::DefaultFuchsiaResourceDialect
11461 ),
11462 }
11463 }
11464
11465 #[inline]
11466 unsafe fn decode(
11467 &mut self,
11468 decoder: &mut fidl::encoding::Decoder<
11469 '_,
11470 fidl::encoding::DefaultFuchsiaResourceDialect,
11471 >,
11472 offset: usize,
11473 _depth: fidl::encoding::Depth,
11474 ) -> fidl::Result<()> {
11475 decoder.debug_check_bounds::<Self>(offset);
11476 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11478 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11479 let mask = 0xffffffff00000000u64;
11480 let maskedval = padval & mask;
11481 if maskedval != 0 {
11482 return Err(fidl::Error::NonZeroPadding {
11483 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11484 });
11485 }
11486 fidl::decode!(
11487 u64,
11488 fidl::encoding::DefaultFuchsiaResourceDialect,
11489 &mut self.id,
11490 decoder,
11491 offset + 0,
11492 _depth
11493 )?;
11494 fidl::decode!(
11495 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>>,
11496 fidl::encoding::DefaultFuchsiaResourceDialect,
11497 &mut self.iterator,
11498 decoder,
11499 offset + 8,
11500 _depth
11501 )?;
11502 Ok(())
11503 }
11504 }
11505
11506 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
11507 type Borrowed<'a> = &'a mut Self;
11508 fn take_or_borrow<'a>(
11509 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11510 ) -> Self::Borrowed<'a> {
11511 value
11512 }
11513 }
11514
11515 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
11516 type Owned = Self;
11517
11518 #[inline(always)]
11519 fn inline_align(_context: fidl::encoding::Context) -> usize {
11520 8
11521 }
11522
11523 #[inline(always)]
11524 fn inline_size(_context: fidl::encoding::Context) -> usize {
11525 16
11526 }
11527 }
11528
11529 unsafe impl
11530 fidl::encoding::Encode<
11531 CapabilityStoreDictionaryLegacyExportRequest,
11532 fidl::encoding::DefaultFuchsiaResourceDialect,
11533 > for &mut CapabilityStoreDictionaryLegacyExportRequest
11534 {
11535 #[inline]
11536 unsafe fn encode(
11537 self,
11538 encoder: &mut fidl::encoding::Encoder<
11539 '_,
11540 fidl::encoding::DefaultFuchsiaResourceDialect,
11541 >,
11542 offset: usize,
11543 _depth: fidl::encoding::Depth,
11544 ) -> fidl::Result<()> {
11545 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
11546 fidl::encoding::Encode::<
11548 CapabilityStoreDictionaryLegacyExportRequest,
11549 fidl::encoding::DefaultFuchsiaResourceDialect,
11550 >::encode(
11551 (
11552 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11553 <fidl::encoding::HandleType<
11554 fidl::Channel,
11555 { fidl::ObjectType::CHANNEL.into_raw() },
11556 2147483648,
11557 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11558 &mut self.server_end
11559 ),
11560 ),
11561 encoder,
11562 offset,
11563 _depth,
11564 )
11565 }
11566 }
11567 unsafe impl<
11568 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11569 T1: fidl::encoding::Encode<
11570 fidl::encoding::HandleType<
11571 fidl::Channel,
11572 { fidl::ObjectType::CHANNEL.into_raw() },
11573 2147483648,
11574 >,
11575 fidl::encoding::DefaultFuchsiaResourceDialect,
11576 >,
11577 >
11578 fidl::encoding::Encode<
11579 CapabilityStoreDictionaryLegacyExportRequest,
11580 fidl::encoding::DefaultFuchsiaResourceDialect,
11581 > for (T0, T1)
11582 {
11583 #[inline]
11584 unsafe fn encode(
11585 self,
11586 encoder: &mut fidl::encoding::Encoder<
11587 '_,
11588 fidl::encoding::DefaultFuchsiaResourceDialect,
11589 >,
11590 offset: usize,
11591 depth: fidl::encoding::Depth,
11592 ) -> fidl::Result<()> {
11593 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
11594 unsafe {
11597 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11598 (ptr as *mut u64).write_unaligned(0);
11599 }
11600 self.0.encode(encoder, offset + 0, depth)?;
11602 self.1.encode(encoder, offset + 8, depth)?;
11603 Ok(())
11604 }
11605 }
11606
11607 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11608 for CapabilityStoreDictionaryLegacyExportRequest
11609 {
11610 #[inline(always)]
11611 fn new_empty() -> Self {
11612 Self {
11613 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11614 server_end: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11615 }
11616 }
11617
11618 #[inline]
11619 unsafe fn decode(
11620 &mut self,
11621 decoder: &mut fidl::encoding::Decoder<
11622 '_,
11623 fidl::encoding::DefaultFuchsiaResourceDialect,
11624 >,
11625 offset: usize,
11626 _depth: fidl::encoding::Depth,
11627 ) -> fidl::Result<()> {
11628 decoder.debug_check_bounds::<Self>(offset);
11629 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11631 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11632 let mask = 0xffffffff00000000u64;
11633 let maskedval = padval & mask;
11634 if maskedval != 0 {
11635 return Err(fidl::Error::NonZeroPadding {
11636 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11637 });
11638 }
11639 fidl::decode!(
11640 u64,
11641 fidl::encoding::DefaultFuchsiaResourceDialect,
11642 &mut self.id,
11643 decoder,
11644 offset + 0,
11645 _depth
11646 )?;
11647 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.server_end, decoder, offset + 8, _depth)?;
11648 Ok(())
11649 }
11650 }
11651
11652 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
11653 type Borrowed<'a> = &'a mut Self;
11654 fn take_or_borrow<'a>(
11655 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11656 ) -> Self::Borrowed<'a> {
11657 value
11658 }
11659 }
11660
11661 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
11662 type Owned = Self;
11663
11664 #[inline(always)]
11665 fn inline_align(_context: fidl::encoding::Context) -> usize {
11666 8
11667 }
11668
11669 #[inline(always)]
11670 fn inline_size(_context: fidl::encoding::Context) -> usize {
11671 16
11672 }
11673 }
11674
11675 unsafe impl
11676 fidl::encoding::Encode<
11677 CapabilityStoreDictionaryLegacyImportRequest,
11678 fidl::encoding::DefaultFuchsiaResourceDialect,
11679 > for &mut CapabilityStoreDictionaryLegacyImportRequest
11680 {
11681 #[inline]
11682 unsafe fn encode(
11683 self,
11684 encoder: &mut fidl::encoding::Encoder<
11685 '_,
11686 fidl::encoding::DefaultFuchsiaResourceDialect,
11687 >,
11688 offset: usize,
11689 _depth: fidl::encoding::Depth,
11690 ) -> fidl::Result<()> {
11691 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
11692 fidl::encoding::Encode::<
11694 CapabilityStoreDictionaryLegacyImportRequest,
11695 fidl::encoding::DefaultFuchsiaResourceDialect,
11696 >::encode(
11697 (
11698 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11699 <fidl::encoding::HandleType<
11700 fidl::Channel,
11701 { fidl::ObjectType::CHANNEL.into_raw() },
11702 2147483648,
11703 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11704 &mut self.client_end
11705 ),
11706 ),
11707 encoder,
11708 offset,
11709 _depth,
11710 )
11711 }
11712 }
11713 unsafe impl<
11714 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11715 T1: fidl::encoding::Encode<
11716 fidl::encoding::HandleType<
11717 fidl::Channel,
11718 { fidl::ObjectType::CHANNEL.into_raw() },
11719 2147483648,
11720 >,
11721 fidl::encoding::DefaultFuchsiaResourceDialect,
11722 >,
11723 >
11724 fidl::encoding::Encode<
11725 CapabilityStoreDictionaryLegacyImportRequest,
11726 fidl::encoding::DefaultFuchsiaResourceDialect,
11727 > for (T0, T1)
11728 {
11729 #[inline]
11730 unsafe fn encode(
11731 self,
11732 encoder: &mut fidl::encoding::Encoder<
11733 '_,
11734 fidl::encoding::DefaultFuchsiaResourceDialect,
11735 >,
11736 offset: usize,
11737 depth: fidl::encoding::Depth,
11738 ) -> fidl::Result<()> {
11739 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
11740 unsafe {
11743 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11744 (ptr as *mut u64).write_unaligned(0);
11745 }
11746 self.0.encode(encoder, offset + 0, depth)?;
11748 self.1.encode(encoder, offset + 8, depth)?;
11749 Ok(())
11750 }
11751 }
11752
11753 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11754 for CapabilityStoreDictionaryLegacyImportRequest
11755 {
11756 #[inline(always)]
11757 fn new_empty() -> Self {
11758 Self {
11759 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11760 client_end: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11761 }
11762 }
11763
11764 #[inline]
11765 unsafe fn decode(
11766 &mut self,
11767 decoder: &mut fidl::encoding::Decoder<
11768 '_,
11769 fidl::encoding::DefaultFuchsiaResourceDialect,
11770 >,
11771 offset: usize,
11772 _depth: fidl::encoding::Depth,
11773 ) -> fidl::Result<()> {
11774 decoder.debug_check_bounds::<Self>(offset);
11775 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11777 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11778 let mask = 0xffffffff00000000u64;
11779 let maskedval = padval & mask;
11780 if maskedval != 0 {
11781 return Err(fidl::Error::NonZeroPadding {
11782 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11783 });
11784 }
11785 fidl::decode!(
11786 u64,
11787 fidl::encoding::DefaultFuchsiaResourceDialect,
11788 &mut self.id,
11789 decoder,
11790 offset + 0,
11791 _depth
11792 )?;
11793 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.client_end, decoder, offset + 8, _depth)?;
11794 Ok(())
11795 }
11796 }
11797
11798 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorCreateRequest {
11799 type Borrowed<'a> = &'a mut Self;
11800 fn take_or_borrow<'a>(
11801 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11802 ) -> Self::Borrowed<'a> {
11803 value
11804 }
11805 }
11806
11807 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorCreateRequest {
11808 type Owned = Self;
11809
11810 #[inline(always)]
11811 fn inline_align(_context: fidl::encoding::Context) -> usize {
11812 8
11813 }
11814
11815 #[inline(always)]
11816 fn inline_size(_context: fidl::encoding::Context) -> usize {
11817 16
11818 }
11819 }
11820
11821 unsafe impl
11822 fidl::encoding::Encode<
11823 CapabilityStoreDirConnectorCreateRequest,
11824 fidl::encoding::DefaultFuchsiaResourceDialect,
11825 > for &mut CapabilityStoreDirConnectorCreateRequest
11826 {
11827 #[inline]
11828 unsafe fn encode(
11829 self,
11830 encoder: &mut fidl::encoding::Encoder<
11831 '_,
11832 fidl::encoding::DefaultFuchsiaResourceDialect,
11833 >,
11834 offset: usize,
11835 _depth: fidl::encoding::Depth,
11836 ) -> fidl::Result<()> {
11837 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
11838 fidl::encoding::Encode::<CapabilityStoreDirConnectorCreateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
11840 (
11841 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11842 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
11843 ),
11844 encoder, offset, _depth
11845 )
11846 }
11847 }
11848 unsafe impl<
11849 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11850 T1: fidl::encoding::Encode<
11851 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>>,
11852 fidl::encoding::DefaultFuchsiaResourceDialect,
11853 >,
11854 >
11855 fidl::encoding::Encode<
11856 CapabilityStoreDirConnectorCreateRequest,
11857 fidl::encoding::DefaultFuchsiaResourceDialect,
11858 > for (T0, T1)
11859 {
11860 #[inline]
11861 unsafe fn encode(
11862 self,
11863 encoder: &mut fidl::encoding::Encoder<
11864 '_,
11865 fidl::encoding::DefaultFuchsiaResourceDialect,
11866 >,
11867 offset: usize,
11868 depth: fidl::encoding::Depth,
11869 ) -> fidl::Result<()> {
11870 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
11871 unsafe {
11874 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11875 (ptr as *mut u64).write_unaligned(0);
11876 }
11877 self.0.encode(encoder, offset + 0, depth)?;
11879 self.1.encode(encoder, offset + 8, depth)?;
11880 Ok(())
11881 }
11882 }
11883
11884 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11885 for CapabilityStoreDirConnectorCreateRequest
11886 {
11887 #[inline(always)]
11888 fn new_empty() -> Self {
11889 Self {
11890 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11891 receiver: fidl::new_empty!(
11892 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>>,
11893 fidl::encoding::DefaultFuchsiaResourceDialect
11894 ),
11895 }
11896 }
11897
11898 #[inline]
11899 unsafe fn decode(
11900 &mut self,
11901 decoder: &mut fidl::encoding::Decoder<
11902 '_,
11903 fidl::encoding::DefaultFuchsiaResourceDialect,
11904 >,
11905 offset: usize,
11906 _depth: fidl::encoding::Depth,
11907 ) -> fidl::Result<()> {
11908 decoder.debug_check_bounds::<Self>(offset);
11909 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11911 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11912 let mask = 0xffffffff00000000u64;
11913 let maskedval = padval & mask;
11914 if maskedval != 0 {
11915 return Err(fidl::Error::NonZeroPadding {
11916 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11917 });
11918 }
11919 fidl::decode!(
11920 u64,
11921 fidl::encoding::DefaultFuchsiaResourceDialect,
11922 &mut self.id,
11923 decoder,
11924 offset + 0,
11925 _depth
11926 )?;
11927 fidl::decode!(
11928 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>>,
11929 fidl::encoding::DefaultFuchsiaResourceDialect,
11930 &mut self.receiver,
11931 decoder,
11932 offset + 8,
11933 _depth
11934 )?;
11935 Ok(())
11936 }
11937 }
11938
11939 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreImportRequest {
11940 type Borrowed<'a> = &'a mut Self;
11941 fn take_or_borrow<'a>(
11942 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11943 ) -> Self::Borrowed<'a> {
11944 value
11945 }
11946 }
11947
11948 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreImportRequest {
11949 type Owned = Self;
11950
11951 #[inline(always)]
11952 fn inline_align(_context: fidl::encoding::Context) -> usize {
11953 8
11954 }
11955
11956 #[inline(always)]
11957 fn inline_size(_context: fidl::encoding::Context) -> usize {
11958 24
11959 }
11960 }
11961
11962 unsafe impl
11963 fidl::encoding::Encode<
11964 CapabilityStoreImportRequest,
11965 fidl::encoding::DefaultFuchsiaResourceDialect,
11966 > for &mut CapabilityStoreImportRequest
11967 {
11968 #[inline]
11969 unsafe fn encode(
11970 self,
11971 encoder: &mut fidl::encoding::Encoder<
11972 '_,
11973 fidl::encoding::DefaultFuchsiaResourceDialect,
11974 >,
11975 offset: usize,
11976 _depth: fidl::encoding::Depth,
11977 ) -> fidl::Result<()> {
11978 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
11979 fidl::encoding::Encode::<
11981 CapabilityStoreImportRequest,
11982 fidl::encoding::DefaultFuchsiaResourceDialect,
11983 >::encode(
11984 (
11985 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11986 <Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11987 &mut self.capability,
11988 ),
11989 ),
11990 encoder,
11991 offset,
11992 _depth,
11993 )
11994 }
11995 }
11996 unsafe impl<
11997 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11998 T1: fidl::encoding::Encode<Capability, fidl::encoding::DefaultFuchsiaResourceDialect>,
11999 >
12000 fidl::encoding::Encode<
12001 CapabilityStoreImportRequest,
12002 fidl::encoding::DefaultFuchsiaResourceDialect,
12003 > for (T0, T1)
12004 {
12005 #[inline]
12006 unsafe fn encode(
12007 self,
12008 encoder: &mut fidl::encoding::Encoder<
12009 '_,
12010 fidl::encoding::DefaultFuchsiaResourceDialect,
12011 >,
12012 offset: usize,
12013 depth: fidl::encoding::Depth,
12014 ) -> fidl::Result<()> {
12015 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
12016 self.0.encode(encoder, offset + 0, depth)?;
12020 self.1.encode(encoder, offset + 8, depth)?;
12021 Ok(())
12022 }
12023 }
12024
12025 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12026 for CapabilityStoreImportRequest
12027 {
12028 #[inline(always)]
12029 fn new_empty() -> Self {
12030 Self {
12031 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12032 capability: fidl::new_empty!(
12033 Capability,
12034 fidl::encoding::DefaultFuchsiaResourceDialect
12035 ),
12036 }
12037 }
12038
12039 #[inline]
12040 unsafe fn decode(
12041 &mut self,
12042 decoder: &mut fidl::encoding::Decoder<
12043 '_,
12044 fidl::encoding::DefaultFuchsiaResourceDialect,
12045 >,
12046 offset: usize,
12047 _depth: fidl::encoding::Depth,
12048 ) -> fidl::Result<()> {
12049 decoder.debug_check_bounds::<Self>(offset);
12050 fidl::decode!(
12052 u64,
12053 fidl::encoding::DefaultFuchsiaResourceDialect,
12054 &mut self.id,
12055 decoder,
12056 offset + 0,
12057 _depth
12058 )?;
12059 fidl::decode!(
12060 Capability,
12061 fidl::encoding::DefaultFuchsiaResourceDialect,
12062 &mut self.capability,
12063 decoder,
12064 offset + 8,
12065 _depth
12066 )?;
12067 Ok(())
12068 }
12069 }
12070
12071 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateResponse {
12072 type Borrowed<'a> = &'a mut Self;
12073 fn take_or_borrow<'a>(
12074 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12075 ) -> Self::Borrowed<'a> {
12076 value
12077 }
12078 }
12079
12080 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateResponse {
12081 type Owned = Self;
12082
12083 #[inline(always)]
12084 fn inline_align(_context: fidl::encoding::Context) -> usize {
12085 4
12086 }
12087
12088 #[inline(always)]
12089 fn inline_size(_context: fidl::encoding::Context) -> usize {
12090 4
12091 }
12092 }
12093
12094 unsafe impl
12095 fidl::encoding::Encode<
12096 CapabilityStoreCreateServiceAggregateResponse,
12097 fidl::encoding::DefaultFuchsiaResourceDialect,
12098 > for &mut CapabilityStoreCreateServiceAggregateResponse
12099 {
12100 #[inline]
12101 unsafe fn encode(
12102 self,
12103 encoder: &mut fidl::encoding::Encoder<
12104 '_,
12105 fidl::encoding::DefaultFuchsiaResourceDialect,
12106 >,
12107 offset: usize,
12108 _depth: fidl::encoding::Depth,
12109 ) -> fidl::Result<()> {
12110 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
12111 fidl::encoding::Encode::<
12113 CapabilityStoreCreateServiceAggregateResponse,
12114 fidl::encoding::DefaultFuchsiaResourceDialect,
12115 >::encode(
12116 (<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12117 &mut self.aggregate_dir_connector,
12118 ),),
12119 encoder,
12120 offset,
12121 _depth,
12122 )
12123 }
12124 }
12125 unsafe impl<
12126 T0: fidl::encoding::Encode<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>,
12127 >
12128 fidl::encoding::Encode<
12129 CapabilityStoreCreateServiceAggregateResponse,
12130 fidl::encoding::DefaultFuchsiaResourceDialect,
12131 > for (T0,)
12132 {
12133 #[inline]
12134 unsafe fn encode(
12135 self,
12136 encoder: &mut fidl::encoding::Encoder<
12137 '_,
12138 fidl::encoding::DefaultFuchsiaResourceDialect,
12139 >,
12140 offset: usize,
12141 depth: fidl::encoding::Depth,
12142 ) -> fidl::Result<()> {
12143 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
12144 self.0.encode(encoder, offset + 0, depth)?;
12148 Ok(())
12149 }
12150 }
12151
12152 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12153 for CapabilityStoreCreateServiceAggregateResponse
12154 {
12155 #[inline(always)]
12156 fn new_empty() -> Self {
12157 Self {
12158 aggregate_dir_connector: fidl::new_empty!(
12159 DirConnector,
12160 fidl::encoding::DefaultFuchsiaResourceDialect
12161 ),
12162 }
12163 }
12164
12165 #[inline]
12166 unsafe fn decode(
12167 &mut self,
12168 decoder: &mut fidl::encoding::Decoder<
12169 '_,
12170 fidl::encoding::DefaultFuchsiaResourceDialect,
12171 >,
12172 offset: usize,
12173 _depth: fidl::encoding::Depth,
12174 ) -> fidl::Result<()> {
12175 decoder.debug_check_bounds::<Self>(offset);
12176 fidl::decode!(
12178 DirConnector,
12179 fidl::encoding::DefaultFuchsiaResourceDialect,
12180 &mut self.aggregate_dir_connector,
12181 decoder,
12182 offset + 0,
12183 _depth
12184 )?;
12185 Ok(())
12186 }
12187 }
12188
12189 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreExportResponse {
12190 type Borrowed<'a> = &'a mut Self;
12191 fn take_or_borrow<'a>(
12192 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12193 ) -> Self::Borrowed<'a> {
12194 value
12195 }
12196 }
12197
12198 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreExportResponse {
12199 type Owned = Self;
12200
12201 #[inline(always)]
12202 fn inline_align(_context: fidl::encoding::Context) -> usize {
12203 8
12204 }
12205
12206 #[inline(always)]
12207 fn inline_size(_context: fidl::encoding::Context) -> usize {
12208 16
12209 }
12210 }
12211
12212 unsafe impl
12213 fidl::encoding::Encode<
12214 CapabilityStoreExportResponse,
12215 fidl::encoding::DefaultFuchsiaResourceDialect,
12216 > for &mut CapabilityStoreExportResponse
12217 {
12218 #[inline]
12219 unsafe fn encode(
12220 self,
12221 encoder: &mut fidl::encoding::Encoder<
12222 '_,
12223 fidl::encoding::DefaultFuchsiaResourceDialect,
12224 >,
12225 offset: usize,
12226 _depth: fidl::encoding::Depth,
12227 ) -> fidl::Result<()> {
12228 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
12229 fidl::encoding::Encode::<
12231 CapabilityStoreExportResponse,
12232 fidl::encoding::DefaultFuchsiaResourceDialect,
12233 >::encode(
12234 (<Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12235 &mut self.capability,
12236 ),),
12237 encoder,
12238 offset,
12239 _depth,
12240 )
12241 }
12242 }
12243 unsafe impl<
12244 T0: fidl::encoding::Encode<Capability, fidl::encoding::DefaultFuchsiaResourceDialect>,
12245 >
12246 fidl::encoding::Encode<
12247 CapabilityStoreExportResponse,
12248 fidl::encoding::DefaultFuchsiaResourceDialect,
12249 > for (T0,)
12250 {
12251 #[inline]
12252 unsafe fn encode(
12253 self,
12254 encoder: &mut fidl::encoding::Encoder<
12255 '_,
12256 fidl::encoding::DefaultFuchsiaResourceDialect,
12257 >,
12258 offset: usize,
12259 depth: fidl::encoding::Depth,
12260 ) -> fidl::Result<()> {
12261 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
12262 self.0.encode(encoder, offset + 0, depth)?;
12266 Ok(())
12267 }
12268 }
12269
12270 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12271 for CapabilityStoreExportResponse
12272 {
12273 #[inline(always)]
12274 fn new_empty() -> Self {
12275 Self {
12276 capability: fidl::new_empty!(
12277 Capability,
12278 fidl::encoding::DefaultFuchsiaResourceDialect
12279 ),
12280 }
12281 }
12282
12283 #[inline]
12284 unsafe fn decode(
12285 &mut self,
12286 decoder: &mut fidl::encoding::Decoder<
12287 '_,
12288 fidl::encoding::DefaultFuchsiaResourceDialect,
12289 >,
12290 offset: usize,
12291 _depth: fidl::encoding::Depth,
12292 ) -> fidl::Result<()> {
12293 decoder.debug_check_bounds::<Self>(offset);
12294 fidl::decode!(
12296 Capability,
12297 fidl::encoding::DefaultFuchsiaResourceDialect,
12298 &mut self.capability,
12299 decoder,
12300 offset + 0,
12301 _depth
12302 )?;
12303 Ok(())
12304 }
12305 }
12306
12307 impl fidl::encoding::ResourceTypeMarker for Connector {
12308 type Borrowed<'a> = &'a mut Self;
12309 fn take_or_borrow<'a>(
12310 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12311 ) -> Self::Borrowed<'a> {
12312 value
12313 }
12314 }
12315
12316 unsafe impl fidl::encoding::TypeMarker for Connector {
12317 type Owned = Self;
12318
12319 #[inline(always)]
12320 fn inline_align(_context: fidl::encoding::Context) -> usize {
12321 4
12322 }
12323
12324 #[inline(always)]
12325 fn inline_size(_context: fidl::encoding::Context) -> usize {
12326 4
12327 }
12328 }
12329
12330 unsafe impl fidl::encoding::Encode<Connector, fidl::encoding::DefaultFuchsiaResourceDialect>
12331 for &mut Connector
12332 {
12333 #[inline]
12334 unsafe fn encode(
12335 self,
12336 encoder: &mut fidl::encoding::Encoder<
12337 '_,
12338 fidl::encoding::DefaultFuchsiaResourceDialect,
12339 >,
12340 offset: usize,
12341 _depth: fidl::encoding::Depth,
12342 ) -> fidl::Result<()> {
12343 encoder.debug_check_bounds::<Connector>(offset);
12344 fidl::encoding::Encode::<Connector, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12346 (
12347 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
12348 ),
12349 encoder, offset, _depth
12350 )
12351 }
12352 }
12353 unsafe impl<
12354 T0: fidl::encoding::Encode<
12355 fidl::encoding::HandleType<
12356 fidl::EventPair,
12357 { fidl::ObjectType::EVENTPAIR.into_raw() },
12358 2147483648,
12359 >,
12360 fidl::encoding::DefaultFuchsiaResourceDialect,
12361 >,
12362 > fidl::encoding::Encode<Connector, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
12363 {
12364 #[inline]
12365 unsafe fn encode(
12366 self,
12367 encoder: &mut fidl::encoding::Encoder<
12368 '_,
12369 fidl::encoding::DefaultFuchsiaResourceDialect,
12370 >,
12371 offset: usize,
12372 depth: fidl::encoding::Depth,
12373 ) -> fidl::Result<()> {
12374 encoder.debug_check_bounds::<Connector>(offset);
12375 self.0.encode(encoder, offset + 0, depth)?;
12379 Ok(())
12380 }
12381 }
12382
12383 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Connector {
12384 #[inline(always)]
12385 fn new_empty() -> Self {
12386 Self {
12387 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12388 }
12389 }
12390
12391 #[inline]
12392 unsafe fn decode(
12393 &mut self,
12394 decoder: &mut fidl::encoding::Decoder<
12395 '_,
12396 fidl::encoding::DefaultFuchsiaResourceDialect,
12397 >,
12398 offset: usize,
12399 _depth: fidl::encoding::Depth,
12400 ) -> fidl::Result<()> {
12401 decoder.debug_check_bounds::<Self>(offset);
12402 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
12404 Ok(())
12405 }
12406 }
12407
12408 impl fidl::encoding::ResourceTypeMarker for DictionaryDrainIteratorGetNextResponse {
12409 type Borrowed<'a> = &'a mut Self;
12410 fn take_or_borrow<'a>(
12411 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12412 ) -> Self::Borrowed<'a> {
12413 value
12414 }
12415 }
12416
12417 unsafe impl fidl::encoding::TypeMarker for DictionaryDrainIteratorGetNextResponse {
12418 type Owned = Self;
12419
12420 #[inline(always)]
12421 fn inline_align(_context: fidl::encoding::Context) -> usize {
12422 8
12423 }
12424
12425 #[inline(always)]
12426 fn inline_size(_context: fidl::encoding::Context) -> usize {
12427 24
12428 }
12429 }
12430
12431 unsafe impl
12432 fidl::encoding::Encode<
12433 DictionaryDrainIteratorGetNextResponse,
12434 fidl::encoding::DefaultFuchsiaResourceDialect,
12435 > for &mut DictionaryDrainIteratorGetNextResponse
12436 {
12437 #[inline]
12438 unsafe fn encode(
12439 self,
12440 encoder: &mut fidl::encoding::Encoder<
12441 '_,
12442 fidl::encoding::DefaultFuchsiaResourceDialect,
12443 >,
12444 offset: usize,
12445 _depth: fidl::encoding::Depth,
12446 ) -> fidl::Result<()> {
12447 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
12448 fidl::encoding::Encode::<DictionaryDrainIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12450 (
12451 <fidl::encoding::Vector<DictionaryItem, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.items),
12452 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
12453 ),
12454 encoder, offset, _depth
12455 )
12456 }
12457 }
12458 unsafe impl<
12459 T0: fidl::encoding::Encode<
12460 fidl::encoding::Vector<DictionaryItem, 128>,
12461 fidl::encoding::DefaultFuchsiaResourceDialect,
12462 >,
12463 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
12464 >
12465 fidl::encoding::Encode<
12466 DictionaryDrainIteratorGetNextResponse,
12467 fidl::encoding::DefaultFuchsiaResourceDialect,
12468 > for (T0, T1)
12469 {
12470 #[inline]
12471 unsafe fn encode(
12472 self,
12473 encoder: &mut fidl::encoding::Encoder<
12474 '_,
12475 fidl::encoding::DefaultFuchsiaResourceDialect,
12476 >,
12477 offset: usize,
12478 depth: fidl::encoding::Depth,
12479 ) -> fidl::Result<()> {
12480 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
12481 self.0.encode(encoder, offset + 0, depth)?;
12485 self.1.encode(encoder, offset + 16, depth)?;
12486 Ok(())
12487 }
12488 }
12489
12490 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12491 for DictionaryDrainIteratorGetNextResponse
12492 {
12493 #[inline(always)]
12494 fn new_empty() -> Self {
12495 Self {
12496 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect),
12497 end_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12498 }
12499 }
12500
12501 #[inline]
12502 unsafe fn decode(
12503 &mut self,
12504 decoder: &mut fidl::encoding::Decoder<
12505 '_,
12506 fidl::encoding::DefaultFuchsiaResourceDialect,
12507 >,
12508 offset: usize,
12509 _depth: fidl::encoding::Depth,
12510 ) -> fidl::Result<()> {
12511 decoder.debug_check_bounds::<Self>(offset);
12512 fidl::decode!(fidl::encoding::Vector<DictionaryItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
12514 fidl::decode!(
12515 u64,
12516 fidl::encoding::DefaultFuchsiaResourceDialect,
12517 &mut self.end_id,
12518 decoder,
12519 offset + 16,
12520 _depth
12521 )?;
12522 Ok(())
12523 }
12524 }
12525
12526 impl fidl::encoding::ResourceTypeMarker for DictionaryEnumerateIteratorGetNextResponse {
12527 type Borrowed<'a> = &'a mut Self;
12528 fn take_or_borrow<'a>(
12529 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12530 ) -> Self::Borrowed<'a> {
12531 value
12532 }
12533 }
12534
12535 unsafe impl fidl::encoding::TypeMarker for DictionaryEnumerateIteratorGetNextResponse {
12536 type Owned = Self;
12537
12538 #[inline(always)]
12539 fn inline_align(_context: fidl::encoding::Context) -> usize {
12540 8
12541 }
12542
12543 #[inline(always)]
12544 fn inline_size(_context: fidl::encoding::Context) -> usize {
12545 24
12546 }
12547 }
12548
12549 unsafe impl
12550 fidl::encoding::Encode<
12551 DictionaryEnumerateIteratorGetNextResponse,
12552 fidl::encoding::DefaultFuchsiaResourceDialect,
12553 > for &mut DictionaryEnumerateIteratorGetNextResponse
12554 {
12555 #[inline]
12556 unsafe fn encode(
12557 self,
12558 encoder: &mut fidl::encoding::Encoder<
12559 '_,
12560 fidl::encoding::DefaultFuchsiaResourceDialect,
12561 >,
12562 offset: usize,
12563 _depth: fidl::encoding::Depth,
12564 ) -> fidl::Result<()> {
12565 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
12566 fidl::encoding::Encode::<DictionaryEnumerateIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12568 (
12569 <fidl::encoding::Vector<DictionaryOptionalItem, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.items),
12570 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
12571 ),
12572 encoder, offset, _depth
12573 )
12574 }
12575 }
12576 unsafe impl<
12577 T0: fidl::encoding::Encode<
12578 fidl::encoding::Vector<DictionaryOptionalItem, 128>,
12579 fidl::encoding::DefaultFuchsiaResourceDialect,
12580 >,
12581 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
12582 >
12583 fidl::encoding::Encode<
12584 DictionaryEnumerateIteratorGetNextResponse,
12585 fidl::encoding::DefaultFuchsiaResourceDialect,
12586 > for (T0, T1)
12587 {
12588 #[inline]
12589 unsafe fn encode(
12590 self,
12591 encoder: &mut fidl::encoding::Encoder<
12592 '_,
12593 fidl::encoding::DefaultFuchsiaResourceDialect,
12594 >,
12595 offset: usize,
12596 depth: fidl::encoding::Depth,
12597 ) -> fidl::Result<()> {
12598 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
12599 self.0.encode(encoder, offset + 0, depth)?;
12603 self.1.encode(encoder, offset + 16, depth)?;
12604 Ok(())
12605 }
12606 }
12607
12608 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12609 for DictionaryEnumerateIteratorGetNextResponse
12610 {
12611 #[inline(always)]
12612 fn new_empty() -> Self {
12613 Self {
12614 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect),
12615 end_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12616 }
12617 }
12618
12619 #[inline]
12620 unsafe fn decode(
12621 &mut self,
12622 decoder: &mut fidl::encoding::Decoder<
12623 '_,
12624 fidl::encoding::DefaultFuchsiaResourceDialect,
12625 >,
12626 offset: usize,
12627 _depth: fidl::encoding::Depth,
12628 ) -> fidl::Result<()> {
12629 decoder.debug_check_bounds::<Self>(offset);
12630 fidl::decode!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
12632 fidl::decode!(
12633 u64,
12634 fidl::encoding::DefaultFuchsiaResourceDialect,
12635 &mut self.end_id,
12636 decoder,
12637 offset + 16,
12638 _depth
12639 )?;
12640 Ok(())
12641 }
12642 }
12643
12644 impl fidl::encoding::ResourceTypeMarker for DictionaryKeysIteratorGetNextResponse {
12645 type Borrowed<'a> = &'a mut Self;
12646 fn take_or_borrow<'a>(
12647 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12648 ) -> Self::Borrowed<'a> {
12649 value
12650 }
12651 }
12652
12653 unsafe impl fidl::encoding::TypeMarker for DictionaryKeysIteratorGetNextResponse {
12654 type Owned = Self;
12655
12656 #[inline(always)]
12657 fn inline_align(_context: fidl::encoding::Context) -> usize {
12658 8
12659 }
12660
12661 #[inline(always)]
12662 fn inline_size(_context: fidl::encoding::Context) -> usize {
12663 16
12664 }
12665 }
12666
12667 unsafe impl
12668 fidl::encoding::Encode<
12669 DictionaryKeysIteratorGetNextResponse,
12670 fidl::encoding::DefaultFuchsiaResourceDialect,
12671 > for &mut DictionaryKeysIteratorGetNextResponse
12672 {
12673 #[inline]
12674 unsafe fn encode(
12675 self,
12676 encoder: &mut fidl::encoding::Encoder<
12677 '_,
12678 fidl::encoding::DefaultFuchsiaResourceDialect,
12679 >,
12680 offset: usize,
12681 _depth: fidl::encoding::Depth,
12682 ) -> fidl::Result<()> {
12683 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
12684 fidl::encoding::Encode::<DictionaryKeysIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12686 (
12687 <fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
12688 ),
12689 encoder, offset, _depth
12690 )
12691 }
12692 }
12693 unsafe impl<
12694 T0: fidl::encoding::Encode<
12695 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
12696 fidl::encoding::DefaultFuchsiaResourceDialect,
12697 >,
12698 >
12699 fidl::encoding::Encode<
12700 DictionaryKeysIteratorGetNextResponse,
12701 fidl::encoding::DefaultFuchsiaResourceDialect,
12702 > for (T0,)
12703 {
12704 #[inline]
12705 unsafe fn encode(
12706 self,
12707 encoder: &mut fidl::encoding::Encoder<
12708 '_,
12709 fidl::encoding::DefaultFuchsiaResourceDialect,
12710 >,
12711 offset: usize,
12712 depth: fidl::encoding::Depth,
12713 ) -> fidl::Result<()> {
12714 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
12715 self.0.encode(encoder, offset + 0, depth)?;
12719 Ok(())
12720 }
12721 }
12722
12723 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12724 for DictionaryKeysIteratorGetNextResponse
12725 {
12726 #[inline(always)]
12727 fn new_empty() -> Self {
12728 Self {
12729 keys: fidl::new_empty!(
12730 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
12731 fidl::encoding::DefaultFuchsiaResourceDialect
12732 ),
12733 }
12734 }
12735
12736 #[inline]
12737 unsafe fn decode(
12738 &mut self,
12739 decoder: &mut fidl::encoding::Decoder<
12740 '_,
12741 fidl::encoding::DefaultFuchsiaResourceDialect,
12742 >,
12743 offset: usize,
12744 _depth: fidl::encoding::Depth,
12745 ) -> fidl::Result<()> {
12746 decoder.debug_check_bounds::<Self>(offset);
12747 fidl::decode!(
12749 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
12750 fidl::encoding::DefaultFuchsiaResourceDialect,
12751 &mut self.keys,
12752 decoder,
12753 offset + 0,
12754 _depth
12755 )?;
12756 Ok(())
12757 }
12758 }
12759
12760 impl fidl::encoding::ResourceTypeMarker for DictionaryOptionalItem {
12761 type Borrowed<'a> = &'a mut Self;
12762 fn take_or_borrow<'a>(
12763 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12764 ) -> Self::Borrowed<'a> {
12765 value
12766 }
12767 }
12768
12769 unsafe impl fidl::encoding::TypeMarker for DictionaryOptionalItem {
12770 type Owned = Self;
12771
12772 #[inline(always)]
12773 fn inline_align(_context: fidl::encoding::Context) -> usize {
12774 8
12775 }
12776
12777 #[inline(always)]
12778 fn inline_size(_context: fidl::encoding::Context) -> usize {
12779 24
12780 }
12781 }
12782
12783 unsafe impl
12784 fidl::encoding::Encode<
12785 DictionaryOptionalItem,
12786 fidl::encoding::DefaultFuchsiaResourceDialect,
12787 > for &mut DictionaryOptionalItem
12788 {
12789 #[inline]
12790 unsafe fn encode(
12791 self,
12792 encoder: &mut fidl::encoding::Encoder<
12793 '_,
12794 fidl::encoding::DefaultFuchsiaResourceDialect,
12795 >,
12796 offset: usize,
12797 _depth: fidl::encoding::Depth,
12798 ) -> fidl::Result<()> {
12799 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
12800 fidl::encoding::Encode::<DictionaryOptionalItem, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12802 (
12803 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
12804 <fidl::encoding::Boxed<WrappedCapabilityId> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
12805 ),
12806 encoder, offset, _depth
12807 )
12808 }
12809 }
12810 unsafe impl<
12811 T0: fidl::encoding::Encode<
12812 fidl::encoding::BoundedString<255>,
12813 fidl::encoding::DefaultFuchsiaResourceDialect,
12814 >,
12815 T1: fidl::encoding::Encode<
12816 fidl::encoding::Boxed<WrappedCapabilityId>,
12817 fidl::encoding::DefaultFuchsiaResourceDialect,
12818 >,
12819 >
12820 fidl::encoding::Encode<
12821 DictionaryOptionalItem,
12822 fidl::encoding::DefaultFuchsiaResourceDialect,
12823 > for (T0, T1)
12824 {
12825 #[inline]
12826 unsafe fn encode(
12827 self,
12828 encoder: &mut fidl::encoding::Encoder<
12829 '_,
12830 fidl::encoding::DefaultFuchsiaResourceDialect,
12831 >,
12832 offset: usize,
12833 depth: fidl::encoding::Depth,
12834 ) -> fidl::Result<()> {
12835 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
12836 self.0.encode(encoder, offset + 0, depth)?;
12840 self.1.encode(encoder, offset + 16, depth)?;
12841 Ok(())
12842 }
12843 }
12844
12845 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12846 for DictionaryOptionalItem
12847 {
12848 #[inline(always)]
12849 fn new_empty() -> Self {
12850 Self {
12851 key: fidl::new_empty!(
12852 fidl::encoding::BoundedString<255>,
12853 fidl::encoding::DefaultFuchsiaResourceDialect
12854 ),
12855 value: fidl::new_empty!(
12856 fidl::encoding::Boxed<WrappedCapabilityId>,
12857 fidl::encoding::DefaultFuchsiaResourceDialect
12858 ),
12859 }
12860 }
12861
12862 #[inline]
12863 unsafe fn decode(
12864 &mut self,
12865 decoder: &mut fidl::encoding::Decoder<
12866 '_,
12867 fidl::encoding::DefaultFuchsiaResourceDialect,
12868 >,
12869 offset: usize,
12870 _depth: fidl::encoding::Depth,
12871 ) -> fidl::Result<()> {
12872 decoder.debug_check_bounds::<Self>(offset);
12873 fidl::decode!(
12875 fidl::encoding::BoundedString<255>,
12876 fidl::encoding::DefaultFuchsiaResourceDialect,
12877 &mut self.key,
12878 decoder,
12879 offset + 0,
12880 _depth
12881 )?;
12882 fidl::decode!(
12883 fidl::encoding::Boxed<WrappedCapabilityId>,
12884 fidl::encoding::DefaultFuchsiaResourceDialect,
12885 &mut self.value,
12886 decoder,
12887 offset + 16,
12888 _depth
12889 )?;
12890 Ok(())
12891 }
12892 }
12893
12894 impl fidl::encoding::ResourceTypeMarker for DictionaryRef {
12895 type Borrowed<'a> = &'a mut Self;
12896 fn take_or_borrow<'a>(
12897 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12898 ) -> Self::Borrowed<'a> {
12899 value
12900 }
12901 }
12902
12903 unsafe impl fidl::encoding::TypeMarker for DictionaryRef {
12904 type Owned = Self;
12905
12906 #[inline(always)]
12907 fn inline_align(_context: fidl::encoding::Context) -> usize {
12908 4
12909 }
12910
12911 #[inline(always)]
12912 fn inline_size(_context: fidl::encoding::Context) -> usize {
12913 4
12914 }
12915 }
12916
12917 unsafe impl fidl::encoding::Encode<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>
12918 for &mut DictionaryRef
12919 {
12920 #[inline]
12921 unsafe fn encode(
12922 self,
12923 encoder: &mut fidl::encoding::Encoder<
12924 '_,
12925 fidl::encoding::DefaultFuchsiaResourceDialect,
12926 >,
12927 offset: usize,
12928 _depth: fidl::encoding::Depth,
12929 ) -> fidl::Result<()> {
12930 encoder.debug_check_bounds::<DictionaryRef>(offset);
12931 fidl::encoding::Encode::<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12933 (
12934 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
12935 ),
12936 encoder, offset, _depth
12937 )
12938 }
12939 }
12940 unsafe impl<
12941 T0: fidl::encoding::Encode<
12942 fidl::encoding::HandleType<
12943 fidl::EventPair,
12944 { fidl::ObjectType::EVENTPAIR.into_raw() },
12945 2147483648,
12946 >,
12947 fidl::encoding::DefaultFuchsiaResourceDialect,
12948 >,
12949 > fidl::encoding::Encode<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>
12950 for (T0,)
12951 {
12952 #[inline]
12953 unsafe fn encode(
12954 self,
12955 encoder: &mut fidl::encoding::Encoder<
12956 '_,
12957 fidl::encoding::DefaultFuchsiaResourceDialect,
12958 >,
12959 offset: usize,
12960 depth: fidl::encoding::Depth,
12961 ) -> fidl::Result<()> {
12962 encoder.debug_check_bounds::<DictionaryRef>(offset);
12963 self.0.encode(encoder, offset + 0, depth)?;
12967 Ok(())
12968 }
12969 }
12970
12971 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DictionaryRef {
12972 #[inline(always)]
12973 fn new_empty() -> Self {
12974 Self {
12975 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12976 }
12977 }
12978
12979 #[inline]
12980 unsafe fn decode(
12981 &mut self,
12982 decoder: &mut fidl::encoding::Decoder<
12983 '_,
12984 fidl::encoding::DefaultFuchsiaResourceDialect,
12985 >,
12986 offset: usize,
12987 _depth: fidl::encoding::Depth,
12988 ) -> fidl::Result<()> {
12989 decoder.debug_check_bounds::<Self>(offset);
12990 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
12992 Ok(())
12993 }
12994 }
12995
12996 impl fidl::encoding::ResourceTypeMarker for DirConnector {
12997 type Borrowed<'a> = &'a mut Self;
12998 fn take_or_borrow<'a>(
12999 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13000 ) -> Self::Borrowed<'a> {
13001 value
13002 }
13003 }
13004
13005 unsafe impl fidl::encoding::TypeMarker for DirConnector {
13006 type Owned = Self;
13007
13008 #[inline(always)]
13009 fn inline_align(_context: fidl::encoding::Context) -> usize {
13010 4
13011 }
13012
13013 #[inline(always)]
13014 fn inline_size(_context: fidl::encoding::Context) -> usize {
13015 4
13016 }
13017 }
13018
13019 unsafe impl fidl::encoding::Encode<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>
13020 for &mut DirConnector
13021 {
13022 #[inline]
13023 unsafe fn encode(
13024 self,
13025 encoder: &mut fidl::encoding::Encoder<
13026 '_,
13027 fidl::encoding::DefaultFuchsiaResourceDialect,
13028 >,
13029 offset: usize,
13030 _depth: fidl::encoding::Depth,
13031 ) -> fidl::Result<()> {
13032 encoder.debug_check_bounds::<DirConnector>(offset);
13033 fidl::encoding::Encode::<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13035 (
13036 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13037 ),
13038 encoder, offset, _depth
13039 )
13040 }
13041 }
13042 unsafe impl<
13043 T0: fidl::encoding::Encode<
13044 fidl::encoding::HandleType<
13045 fidl::EventPair,
13046 { fidl::ObjectType::EVENTPAIR.into_raw() },
13047 2147483648,
13048 >,
13049 fidl::encoding::DefaultFuchsiaResourceDialect,
13050 >,
13051 > fidl::encoding::Encode<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
13052 {
13053 #[inline]
13054 unsafe fn encode(
13055 self,
13056 encoder: &mut fidl::encoding::Encoder<
13057 '_,
13058 fidl::encoding::DefaultFuchsiaResourceDialect,
13059 >,
13060 offset: usize,
13061 depth: fidl::encoding::Depth,
13062 ) -> fidl::Result<()> {
13063 encoder.debug_check_bounds::<DirConnector>(offset);
13064 self.0.encode(encoder, offset + 0, depth)?;
13068 Ok(())
13069 }
13070 }
13071
13072 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DirConnector {
13073 #[inline(always)]
13074 fn new_empty() -> Self {
13075 Self {
13076 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13077 }
13078 }
13079
13080 #[inline]
13081 unsafe fn decode(
13082 &mut self,
13083 decoder: &mut fidl::encoding::Decoder<
13084 '_,
13085 fidl::encoding::DefaultFuchsiaResourceDialect,
13086 >,
13087 offset: usize,
13088 _depth: fidl::encoding::Depth,
13089 ) -> fidl::Result<()> {
13090 decoder.debug_check_bounds::<Self>(offset);
13091 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
13093 Ok(())
13094 }
13095 }
13096
13097 impl fidl::encoding::ResourceTypeMarker for DirEntry {
13098 type Borrowed<'a> = &'a mut Self;
13099 fn take_or_borrow<'a>(
13100 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13101 ) -> Self::Borrowed<'a> {
13102 value
13103 }
13104 }
13105
13106 unsafe impl fidl::encoding::TypeMarker for DirEntry {
13107 type Owned = Self;
13108
13109 #[inline(always)]
13110 fn inline_align(_context: fidl::encoding::Context) -> usize {
13111 4
13112 }
13113
13114 #[inline(always)]
13115 fn inline_size(_context: fidl::encoding::Context) -> usize {
13116 4
13117 }
13118 }
13119
13120 unsafe impl fidl::encoding::Encode<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect>
13121 for &mut DirEntry
13122 {
13123 #[inline]
13124 unsafe fn encode(
13125 self,
13126 encoder: &mut fidl::encoding::Encoder<
13127 '_,
13128 fidl::encoding::DefaultFuchsiaResourceDialect,
13129 >,
13130 offset: usize,
13131 _depth: fidl::encoding::Depth,
13132 ) -> fidl::Result<()> {
13133 encoder.debug_check_bounds::<DirEntry>(offset);
13134 fidl::encoding::Encode::<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13136 (
13137 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13138 ),
13139 encoder, offset, _depth
13140 )
13141 }
13142 }
13143 unsafe impl<
13144 T0: fidl::encoding::Encode<
13145 fidl::encoding::HandleType<
13146 fidl::EventPair,
13147 { fidl::ObjectType::EVENTPAIR.into_raw() },
13148 2147483648,
13149 >,
13150 fidl::encoding::DefaultFuchsiaResourceDialect,
13151 >,
13152 > fidl::encoding::Encode<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
13153 {
13154 #[inline]
13155 unsafe fn encode(
13156 self,
13157 encoder: &mut fidl::encoding::Encoder<
13158 '_,
13159 fidl::encoding::DefaultFuchsiaResourceDialect,
13160 >,
13161 offset: usize,
13162 depth: fidl::encoding::Depth,
13163 ) -> fidl::Result<()> {
13164 encoder.debug_check_bounds::<DirEntry>(offset);
13165 self.0.encode(encoder, offset + 0, depth)?;
13169 Ok(())
13170 }
13171 }
13172
13173 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DirEntry {
13174 #[inline(always)]
13175 fn new_empty() -> Self {
13176 Self {
13177 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13178 }
13179 }
13180
13181 #[inline]
13182 unsafe fn decode(
13183 &mut self,
13184 decoder: &mut fidl::encoding::Decoder<
13185 '_,
13186 fidl::encoding::DefaultFuchsiaResourceDialect,
13187 >,
13188 offset: usize,
13189 _depth: fidl::encoding::Depth,
13190 ) -> fidl::Result<()> {
13191 decoder.debug_check_bounds::<Self>(offset);
13192 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
13194 Ok(())
13195 }
13196 }
13197
13198 impl fidl::encoding::ResourceTypeMarker for InstanceToken {
13199 type Borrowed<'a> = &'a mut Self;
13200 fn take_or_borrow<'a>(
13201 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13202 ) -> Self::Borrowed<'a> {
13203 value
13204 }
13205 }
13206
13207 unsafe impl fidl::encoding::TypeMarker for InstanceToken {
13208 type Owned = Self;
13209
13210 #[inline(always)]
13211 fn inline_align(_context: fidl::encoding::Context) -> usize {
13212 4
13213 }
13214
13215 #[inline(always)]
13216 fn inline_size(_context: fidl::encoding::Context) -> usize {
13217 4
13218 }
13219 }
13220
13221 unsafe impl fidl::encoding::Encode<InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect>
13222 for &mut InstanceToken
13223 {
13224 #[inline]
13225 unsafe fn encode(
13226 self,
13227 encoder: &mut fidl::encoding::Encoder<
13228 '_,
13229 fidl::encoding::DefaultFuchsiaResourceDialect,
13230 >,
13231 offset: usize,
13232 _depth: fidl::encoding::Depth,
13233 ) -> fidl::Result<()> {
13234 encoder.debug_check_bounds::<InstanceToken>(offset);
13235 fidl::encoding::Encode::<InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13237 (
13238 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13239 ),
13240 encoder, offset, _depth
13241 )
13242 }
13243 }
13244 unsafe impl<
13245 T0: fidl::encoding::Encode<
13246 fidl::encoding::HandleType<
13247 fidl::EventPair,
13248 { fidl::ObjectType::EVENTPAIR.into_raw() },
13249 2147483648,
13250 >,
13251 fidl::encoding::DefaultFuchsiaResourceDialect,
13252 >,
13253 > fidl::encoding::Encode<InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect>
13254 for (T0,)
13255 {
13256 #[inline]
13257 unsafe fn encode(
13258 self,
13259 encoder: &mut fidl::encoding::Encoder<
13260 '_,
13261 fidl::encoding::DefaultFuchsiaResourceDialect,
13262 >,
13263 offset: usize,
13264 depth: fidl::encoding::Depth,
13265 ) -> fidl::Result<()> {
13266 encoder.debug_check_bounds::<InstanceToken>(offset);
13267 self.0.encode(encoder, offset + 0, depth)?;
13271 Ok(())
13272 }
13273 }
13274
13275 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for InstanceToken {
13276 #[inline(always)]
13277 fn new_empty() -> Self {
13278 Self {
13279 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13280 }
13281 }
13282
13283 #[inline]
13284 unsafe fn decode(
13285 &mut self,
13286 decoder: &mut fidl::encoding::Decoder<
13287 '_,
13288 fidl::encoding::DefaultFuchsiaResourceDialect,
13289 >,
13290 offset: usize,
13291 _depth: fidl::encoding::Depth,
13292 ) -> fidl::Result<()> {
13293 decoder.debug_check_bounds::<Self>(offset);
13294 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
13296 Ok(())
13297 }
13298 }
13299
13300 impl fidl::encoding::ResourceTypeMarker for ProtocolPayload {
13301 type Borrowed<'a> = &'a mut Self;
13302 fn take_or_borrow<'a>(
13303 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13304 ) -> Self::Borrowed<'a> {
13305 value
13306 }
13307 }
13308
13309 unsafe impl fidl::encoding::TypeMarker for ProtocolPayload {
13310 type Owned = Self;
13311
13312 #[inline(always)]
13313 fn inline_align(_context: fidl::encoding::Context) -> usize {
13314 4
13315 }
13316
13317 #[inline(always)]
13318 fn inline_size(_context: fidl::encoding::Context) -> usize {
13319 4
13320 }
13321 }
13322
13323 unsafe impl
13324 fidl::encoding::Encode<ProtocolPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
13325 for &mut ProtocolPayload
13326 {
13327 #[inline]
13328 unsafe fn encode(
13329 self,
13330 encoder: &mut fidl::encoding::Encoder<
13331 '_,
13332 fidl::encoding::DefaultFuchsiaResourceDialect,
13333 >,
13334 offset: usize,
13335 _depth: fidl::encoding::Depth,
13336 ) -> fidl::Result<()> {
13337 encoder.debug_check_bounds::<ProtocolPayload>(offset);
13338 fidl::encoding::Encode::<ProtocolPayload, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13340 (
13341 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.channel),
13342 ),
13343 encoder, offset, _depth
13344 )
13345 }
13346 }
13347 unsafe impl<
13348 T0: fidl::encoding::Encode<
13349 fidl::encoding::HandleType<
13350 fidl::Channel,
13351 { fidl::ObjectType::CHANNEL.into_raw() },
13352 2147483648,
13353 >,
13354 fidl::encoding::DefaultFuchsiaResourceDialect,
13355 >,
13356 > fidl::encoding::Encode<ProtocolPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
13357 for (T0,)
13358 {
13359 #[inline]
13360 unsafe fn encode(
13361 self,
13362 encoder: &mut fidl::encoding::Encoder<
13363 '_,
13364 fidl::encoding::DefaultFuchsiaResourceDialect,
13365 >,
13366 offset: usize,
13367 depth: fidl::encoding::Depth,
13368 ) -> fidl::Result<()> {
13369 encoder.debug_check_bounds::<ProtocolPayload>(offset);
13370 self.0.encode(encoder, offset + 0, depth)?;
13374 Ok(())
13375 }
13376 }
13377
13378 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13379 for ProtocolPayload
13380 {
13381 #[inline(always)]
13382 fn new_empty() -> Self {
13383 Self {
13384 channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13385 }
13386 }
13387
13388 #[inline]
13389 unsafe fn decode(
13390 &mut self,
13391 decoder: &mut fidl::encoding::Decoder<
13392 '_,
13393 fidl::encoding::DefaultFuchsiaResourceDialect,
13394 >,
13395 offset: usize,
13396 _depth: fidl::encoding::Depth,
13397 ) -> fidl::Result<()> {
13398 decoder.debug_check_bounds::<Self>(offset);
13399 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 0, _depth)?;
13401 Ok(())
13402 }
13403 }
13404
13405 impl AggregateSource {
13406 #[inline(always)]
13407 fn max_ordinal_present(&self) -> u64 {
13408 if let Some(_) = self.renamed_instances {
13409 return 3;
13410 }
13411 if let Some(_) = self.source_instance_filter {
13412 return 2;
13413 }
13414 if let Some(_) = self.dir_connector {
13415 return 1;
13416 }
13417 0
13418 }
13419 }
13420
13421 impl fidl::encoding::ResourceTypeMarker for AggregateSource {
13422 type Borrowed<'a> = &'a mut Self;
13423 fn take_or_borrow<'a>(
13424 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13425 ) -> Self::Borrowed<'a> {
13426 value
13427 }
13428 }
13429
13430 unsafe impl fidl::encoding::TypeMarker for AggregateSource {
13431 type Owned = Self;
13432
13433 #[inline(always)]
13434 fn inline_align(_context: fidl::encoding::Context) -> usize {
13435 8
13436 }
13437
13438 #[inline(always)]
13439 fn inline_size(_context: fidl::encoding::Context) -> usize {
13440 16
13441 }
13442 }
13443
13444 unsafe impl
13445 fidl::encoding::Encode<AggregateSource, fidl::encoding::DefaultFuchsiaResourceDialect>
13446 for &mut AggregateSource
13447 {
13448 unsafe fn encode(
13449 self,
13450 encoder: &mut fidl::encoding::Encoder<
13451 '_,
13452 fidl::encoding::DefaultFuchsiaResourceDialect,
13453 >,
13454 offset: usize,
13455 mut depth: fidl::encoding::Depth,
13456 ) -> fidl::Result<()> {
13457 encoder.debug_check_bounds::<AggregateSource>(offset);
13458 let max_ordinal: u64 = self.max_ordinal_present();
13460 encoder.write_num(max_ordinal, offset);
13461 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13462 if max_ordinal == 0 {
13464 return Ok(());
13465 }
13466 depth.increment()?;
13467 let envelope_size = 8;
13468 let bytes_len = max_ordinal as usize * envelope_size;
13469 #[allow(unused_variables)]
13470 let offset = encoder.out_of_line_offset(bytes_len);
13471 let mut _prev_end_offset: usize = 0;
13472 if 1 > max_ordinal {
13473 return Ok(());
13474 }
13475
13476 let cur_offset: usize = (1 - 1) * envelope_size;
13479
13480 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13482
13483 fidl::encoding::encode_in_envelope_optional::<
13488 DirConnector,
13489 fidl::encoding::DefaultFuchsiaResourceDialect,
13490 >(
13491 self.dir_connector
13492 .as_mut()
13493 .map(<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
13494 encoder,
13495 offset + cur_offset,
13496 depth,
13497 )?;
13498
13499 _prev_end_offset = cur_offset + envelope_size;
13500 if 2 > max_ordinal {
13501 return Ok(());
13502 }
13503
13504 let cur_offset: usize = (2 - 1) * envelope_size;
13507
13508 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13510
13511 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13516 self.source_instance_filter.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>> as fidl::encoding::ValueTypeMarker>::borrow),
13517 encoder, offset + cur_offset, depth
13518 )?;
13519
13520 _prev_end_offset = cur_offset + envelope_size;
13521 if 3 > max_ordinal {
13522 return Ok(());
13523 }
13524
13525 let cur_offset: usize = (3 - 1) * envelope_size;
13528
13529 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13531
13532 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13537 self.renamed_instances.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping> as fidl::encoding::ValueTypeMarker>::borrow),
13538 encoder, offset + cur_offset, depth
13539 )?;
13540
13541 _prev_end_offset = cur_offset + envelope_size;
13542
13543 Ok(())
13544 }
13545 }
13546
13547 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13548 for AggregateSource
13549 {
13550 #[inline(always)]
13551 fn new_empty() -> Self {
13552 Self::default()
13553 }
13554
13555 unsafe fn decode(
13556 &mut self,
13557 decoder: &mut fidl::encoding::Decoder<
13558 '_,
13559 fidl::encoding::DefaultFuchsiaResourceDialect,
13560 >,
13561 offset: usize,
13562 mut depth: fidl::encoding::Depth,
13563 ) -> fidl::Result<()> {
13564 decoder.debug_check_bounds::<Self>(offset);
13565 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13566 None => return Err(fidl::Error::NotNullable),
13567 Some(len) => len,
13568 };
13569 if len == 0 {
13571 return Ok(());
13572 };
13573 depth.increment()?;
13574 let envelope_size = 8;
13575 let bytes_len = len * envelope_size;
13576 let offset = decoder.out_of_line_offset(bytes_len)?;
13577 let mut _next_ordinal_to_read = 0;
13579 let mut next_offset = offset;
13580 let end_offset = offset + bytes_len;
13581 _next_ordinal_to_read += 1;
13582 if next_offset >= end_offset {
13583 return Ok(());
13584 }
13585
13586 while _next_ordinal_to_read < 1 {
13588 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13589 _next_ordinal_to_read += 1;
13590 next_offset += envelope_size;
13591 }
13592
13593 let next_out_of_line = decoder.next_out_of_line();
13594 let handles_before = decoder.remaining_handles();
13595 if let Some((inlined, num_bytes, num_handles)) =
13596 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13597 {
13598 let member_inline_size =
13599 <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13600 if inlined != (member_inline_size <= 4) {
13601 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13602 }
13603 let inner_offset;
13604 let mut inner_depth = depth.clone();
13605 if inlined {
13606 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13607 inner_offset = next_offset;
13608 } else {
13609 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13610 inner_depth.increment()?;
13611 }
13612 let val_ref = self.dir_connector.get_or_insert_with(|| {
13613 fidl::new_empty!(DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect)
13614 });
13615 fidl::decode!(
13616 DirConnector,
13617 fidl::encoding::DefaultFuchsiaResourceDialect,
13618 val_ref,
13619 decoder,
13620 inner_offset,
13621 inner_depth
13622 )?;
13623 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13624 {
13625 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13626 }
13627 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13628 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13629 }
13630 }
13631
13632 next_offset += envelope_size;
13633 _next_ordinal_to_read += 1;
13634 if next_offset >= end_offset {
13635 return Ok(());
13636 }
13637
13638 while _next_ordinal_to_read < 2 {
13640 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13641 _next_ordinal_to_read += 1;
13642 next_offset += envelope_size;
13643 }
13644
13645 let next_out_of_line = decoder.next_out_of_line();
13646 let handles_before = decoder.remaining_handles();
13647 if let Some((inlined, num_bytes, num_handles)) =
13648 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13649 {
13650 let member_inline_size = <fidl::encoding::UnboundedVector<
13651 fidl::encoding::BoundedString<255>,
13652 > as fidl::encoding::TypeMarker>::inline_size(
13653 decoder.context
13654 );
13655 if inlined != (member_inline_size <= 4) {
13656 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13657 }
13658 let inner_offset;
13659 let mut inner_depth = depth.clone();
13660 if inlined {
13661 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13662 inner_offset = next_offset;
13663 } else {
13664 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13665 inner_depth.increment()?;
13666 }
13667 let val_ref = self.source_instance_filter.get_or_insert_with(|| {
13668 fidl::new_empty!(
13669 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
13670 fidl::encoding::DefaultFuchsiaResourceDialect
13671 )
13672 });
13673 fidl::decode!(
13674 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
13675 fidl::encoding::DefaultFuchsiaResourceDialect,
13676 val_ref,
13677 decoder,
13678 inner_offset,
13679 inner_depth
13680 )?;
13681 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13682 {
13683 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13684 }
13685 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13686 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13687 }
13688 }
13689
13690 next_offset += envelope_size;
13691 _next_ordinal_to_read += 1;
13692 if next_offset >= end_offset {
13693 return Ok(());
13694 }
13695
13696 while _next_ordinal_to_read < 3 {
13698 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13699 _next_ordinal_to_read += 1;
13700 next_offset += envelope_size;
13701 }
13702
13703 let next_out_of_line = decoder.next_out_of_line();
13704 let handles_before = decoder.remaining_handles();
13705 if let Some((inlined, num_bytes, num_handles)) =
13706 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13707 {
13708 let member_inline_size = <fidl::encoding::UnboundedVector<
13709 fidl_fuchsia_component_decl::NameMapping,
13710 > as fidl::encoding::TypeMarker>::inline_size(
13711 decoder.context
13712 );
13713 if inlined != (member_inline_size <= 4) {
13714 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13715 }
13716 let inner_offset;
13717 let mut inner_depth = depth.clone();
13718 if inlined {
13719 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13720 inner_offset = next_offset;
13721 } else {
13722 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13723 inner_depth.increment()?;
13724 }
13725 let val_ref = self.renamed_instances.get_or_insert_with(|| {
13726 fidl::new_empty!(
13727 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping>,
13728 fidl::encoding::DefaultFuchsiaResourceDialect
13729 )
13730 });
13731 fidl::decode!(
13732 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping>,
13733 fidl::encoding::DefaultFuchsiaResourceDialect,
13734 val_ref,
13735 decoder,
13736 inner_offset,
13737 inner_depth
13738 )?;
13739 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13740 {
13741 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13742 }
13743 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13744 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13745 }
13746 }
13747
13748 next_offset += envelope_size;
13749
13750 while next_offset < end_offset {
13752 _next_ordinal_to_read += 1;
13753 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13754 next_offset += envelope_size;
13755 }
13756
13757 Ok(())
13758 }
13759 }
13760
13761 impl CapabilityStoreDirConnectorOpenRequest {
13762 #[inline(always)]
13763 fn max_ordinal_present(&self) -> u64 {
13764 if let Some(_) = self.path {
13765 return 4;
13766 }
13767 if let Some(_) = self.flags {
13768 return 3;
13769 }
13770 if let Some(_) = self.server_end {
13771 return 2;
13772 }
13773 if let Some(_) = self.id {
13774 return 1;
13775 }
13776 0
13777 }
13778 }
13779
13780 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorOpenRequest {
13781 type Borrowed<'a> = &'a mut Self;
13782 fn take_or_borrow<'a>(
13783 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13784 ) -> Self::Borrowed<'a> {
13785 value
13786 }
13787 }
13788
13789 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorOpenRequest {
13790 type Owned = Self;
13791
13792 #[inline(always)]
13793 fn inline_align(_context: fidl::encoding::Context) -> usize {
13794 8
13795 }
13796
13797 #[inline(always)]
13798 fn inline_size(_context: fidl::encoding::Context) -> usize {
13799 16
13800 }
13801 }
13802
13803 unsafe impl
13804 fidl::encoding::Encode<
13805 CapabilityStoreDirConnectorOpenRequest,
13806 fidl::encoding::DefaultFuchsiaResourceDialect,
13807 > for &mut CapabilityStoreDirConnectorOpenRequest
13808 {
13809 unsafe fn encode(
13810 self,
13811 encoder: &mut fidl::encoding::Encoder<
13812 '_,
13813 fidl::encoding::DefaultFuchsiaResourceDialect,
13814 >,
13815 offset: usize,
13816 mut depth: fidl::encoding::Depth,
13817 ) -> fidl::Result<()> {
13818 encoder.debug_check_bounds::<CapabilityStoreDirConnectorOpenRequest>(offset);
13819 let max_ordinal: u64 = self.max_ordinal_present();
13821 encoder.write_num(max_ordinal, offset);
13822 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13823 if max_ordinal == 0 {
13825 return Ok(());
13826 }
13827 depth.increment()?;
13828 let envelope_size = 8;
13829 let bytes_len = max_ordinal as usize * envelope_size;
13830 #[allow(unused_variables)]
13831 let offset = encoder.out_of_line_offset(bytes_len);
13832 let mut _prev_end_offset: usize = 0;
13833 if 1 > max_ordinal {
13834 return Ok(());
13835 }
13836
13837 let cur_offset: usize = (1 - 1) * envelope_size;
13840
13841 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13843
13844 fidl::encoding::encode_in_envelope_optional::<
13849 u64,
13850 fidl::encoding::DefaultFuchsiaResourceDialect,
13851 >(
13852 self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
13853 encoder,
13854 offset + cur_offset,
13855 depth,
13856 )?;
13857
13858 _prev_end_offset = cur_offset + envelope_size;
13859 if 2 > max_ordinal {
13860 return Ok(());
13861 }
13862
13863 let cur_offset: usize = (2 - 1) * envelope_size;
13866
13867 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13869
13870 fidl::encoding::encode_in_envelope_optional::<
13875 fidl::encoding::Endpoint<
13876 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
13877 >,
13878 fidl::encoding::DefaultFuchsiaResourceDialect,
13879 >(
13880 self.server_end.as_mut().map(
13881 <fidl::encoding::Endpoint<
13882 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
13883 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13884 ),
13885 encoder,
13886 offset + cur_offset,
13887 depth,
13888 )?;
13889
13890 _prev_end_offset = cur_offset + envelope_size;
13891 if 3 > max_ordinal {
13892 return Ok(());
13893 }
13894
13895 let cur_offset: usize = (3 - 1) * envelope_size;
13898
13899 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13901
13902 fidl::encoding::encode_in_envelope_optional::<
13907 fidl_fuchsia_io::Flags,
13908 fidl::encoding::DefaultFuchsiaResourceDialect,
13909 >(
13910 self.flags
13911 .as_ref()
13912 .map(<fidl_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
13913 encoder,
13914 offset + cur_offset,
13915 depth,
13916 )?;
13917
13918 _prev_end_offset = cur_offset + envelope_size;
13919 if 4 > max_ordinal {
13920 return Ok(());
13921 }
13922
13923 let cur_offset: usize = (4 - 1) * envelope_size;
13926
13927 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13929
13930 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13935 self.path.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
13936 encoder, offset + cur_offset, depth
13937 )?;
13938
13939 _prev_end_offset = cur_offset + envelope_size;
13940
13941 Ok(())
13942 }
13943 }
13944
13945 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13946 for CapabilityStoreDirConnectorOpenRequest
13947 {
13948 #[inline(always)]
13949 fn new_empty() -> Self {
13950 Self::default()
13951 }
13952
13953 unsafe fn decode(
13954 &mut self,
13955 decoder: &mut fidl::encoding::Decoder<
13956 '_,
13957 fidl::encoding::DefaultFuchsiaResourceDialect,
13958 >,
13959 offset: usize,
13960 mut depth: fidl::encoding::Depth,
13961 ) -> fidl::Result<()> {
13962 decoder.debug_check_bounds::<Self>(offset);
13963 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13964 None => return Err(fidl::Error::NotNullable),
13965 Some(len) => len,
13966 };
13967 if len == 0 {
13969 return Ok(());
13970 };
13971 depth.increment()?;
13972 let envelope_size = 8;
13973 let bytes_len = len * envelope_size;
13974 let offset = decoder.out_of_line_offset(bytes_len)?;
13975 let mut _next_ordinal_to_read = 0;
13977 let mut next_offset = offset;
13978 let end_offset = offset + bytes_len;
13979 _next_ordinal_to_read += 1;
13980 if next_offset >= end_offset {
13981 return Ok(());
13982 }
13983
13984 while _next_ordinal_to_read < 1 {
13986 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13987 _next_ordinal_to_read += 1;
13988 next_offset += envelope_size;
13989 }
13990
13991 let next_out_of_line = decoder.next_out_of_line();
13992 let handles_before = decoder.remaining_handles();
13993 if let Some((inlined, num_bytes, num_handles)) =
13994 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13995 {
13996 let member_inline_size =
13997 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13998 if inlined != (member_inline_size <= 4) {
13999 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14000 }
14001 let inner_offset;
14002 let mut inner_depth = depth.clone();
14003 if inlined {
14004 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14005 inner_offset = next_offset;
14006 } else {
14007 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14008 inner_depth.increment()?;
14009 }
14010 let val_ref = self.id.get_or_insert_with(|| {
14011 fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect)
14012 });
14013 fidl::decode!(
14014 u64,
14015 fidl::encoding::DefaultFuchsiaResourceDialect,
14016 val_ref,
14017 decoder,
14018 inner_offset,
14019 inner_depth
14020 )?;
14021 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14022 {
14023 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14024 }
14025 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14026 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14027 }
14028 }
14029
14030 next_offset += envelope_size;
14031 _next_ordinal_to_read += 1;
14032 if next_offset >= end_offset {
14033 return Ok(());
14034 }
14035
14036 while _next_ordinal_to_read < 2 {
14038 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14039 _next_ordinal_to_read += 1;
14040 next_offset += envelope_size;
14041 }
14042
14043 let next_out_of_line = decoder.next_out_of_line();
14044 let handles_before = decoder.remaining_handles();
14045 if let Some((inlined, num_bytes, num_handles)) =
14046 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14047 {
14048 let member_inline_size = <fidl::encoding::Endpoint<
14049 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
14050 > as fidl::encoding::TypeMarker>::inline_size(
14051 decoder.context
14052 );
14053 if inlined != (member_inline_size <= 4) {
14054 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14055 }
14056 let inner_offset;
14057 let mut inner_depth = depth.clone();
14058 if inlined {
14059 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14060 inner_offset = next_offset;
14061 } else {
14062 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14063 inner_depth.increment()?;
14064 }
14065 let val_ref = self.server_end.get_or_insert_with(|| {
14066 fidl::new_empty!(
14067 fidl::encoding::Endpoint<
14068 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
14069 >,
14070 fidl::encoding::DefaultFuchsiaResourceDialect
14071 )
14072 });
14073 fidl::decode!(
14074 fidl::encoding::Endpoint<
14075 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
14076 >,
14077 fidl::encoding::DefaultFuchsiaResourceDialect,
14078 val_ref,
14079 decoder,
14080 inner_offset,
14081 inner_depth
14082 )?;
14083 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14084 {
14085 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14086 }
14087 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14088 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14089 }
14090 }
14091
14092 next_offset += envelope_size;
14093 _next_ordinal_to_read += 1;
14094 if next_offset >= end_offset {
14095 return Ok(());
14096 }
14097
14098 while _next_ordinal_to_read < 3 {
14100 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14101 _next_ordinal_to_read += 1;
14102 next_offset += envelope_size;
14103 }
14104
14105 let next_out_of_line = decoder.next_out_of_line();
14106 let handles_before = decoder.remaining_handles();
14107 if let Some((inlined, num_bytes, num_handles)) =
14108 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14109 {
14110 let member_inline_size =
14111 <fidl_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
14112 decoder.context,
14113 );
14114 if inlined != (member_inline_size <= 4) {
14115 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14116 }
14117 let inner_offset;
14118 let mut inner_depth = depth.clone();
14119 if inlined {
14120 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14121 inner_offset = next_offset;
14122 } else {
14123 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14124 inner_depth.increment()?;
14125 }
14126 let val_ref = self.flags.get_or_insert_with(|| {
14127 fidl::new_empty!(
14128 fidl_fuchsia_io::Flags,
14129 fidl::encoding::DefaultFuchsiaResourceDialect
14130 )
14131 });
14132 fidl::decode!(
14133 fidl_fuchsia_io::Flags,
14134 fidl::encoding::DefaultFuchsiaResourceDialect,
14135 val_ref,
14136 decoder,
14137 inner_offset,
14138 inner_depth
14139 )?;
14140 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14141 {
14142 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14143 }
14144 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14145 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14146 }
14147 }
14148
14149 next_offset += envelope_size;
14150 _next_ordinal_to_read += 1;
14151 if next_offset >= end_offset {
14152 return Ok(());
14153 }
14154
14155 while _next_ordinal_to_read < 4 {
14157 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14158 _next_ordinal_to_read += 1;
14159 next_offset += envelope_size;
14160 }
14161
14162 let next_out_of_line = decoder.next_out_of_line();
14163 let handles_before = decoder.remaining_handles();
14164 if let Some((inlined, num_bytes, num_handles)) =
14165 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14166 {
14167 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14168 if inlined != (member_inline_size <= 4) {
14169 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14170 }
14171 let inner_offset;
14172 let mut inner_depth = depth.clone();
14173 if inlined {
14174 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14175 inner_offset = next_offset;
14176 } else {
14177 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14178 inner_depth.increment()?;
14179 }
14180 let val_ref = self.path.get_or_insert_with(|| {
14181 fidl::new_empty!(
14182 fidl::encoding::BoundedString<4095>,
14183 fidl::encoding::DefaultFuchsiaResourceDialect
14184 )
14185 });
14186 fidl::decode!(
14187 fidl::encoding::BoundedString<4095>,
14188 fidl::encoding::DefaultFuchsiaResourceDialect,
14189 val_ref,
14190 decoder,
14191 inner_offset,
14192 inner_depth
14193 )?;
14194 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14195 {
14196 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14197 }
14198 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14199 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14200 }
14201 }
14202
14203 next_offset += envelope_size;
14204
14205 while next_offset < end_offset {
14207 _next_ordinal_to_read += 1;
14208 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14209 next_offset += envelope_size;
14210 }
14211
14212 Ok(())
14213 }
14214 }
14215
14216 impl DirReceiverReceiveRequest {
14217 #[inline(always)]
14218 fn max_ordinal_present(&self) -> u64 {
14219 if let Some(_) = self.subdir {
14220 return 3;
14221 }
14222 if let Some(_) = self.flags {
14223 return 2;
14224 }
14225 if let Some(_) = self.channel {
14226 return 1;
14227 }
14228 0
14229 }
14230 }
14231
14232 impl fidl::encoding::ResourceTypeMarker for DirReceiverReceiveRequest {
14233 type Borrowed<'a> = &'a mut Self;
14234 fn take_or_borrow<'a>(
14235 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14236 ) -> Self::Borrowed<'a> {
14237 value
14238 }
14239 }
14240
14241 unsafe impl fidl::encoding::TypeMarker for DirReceiverReceiveRequest {
14242 type Owned = Self;
14243
14244 #[inline(always)]
14245 fn inline_align(_context: fidl::encoding::Context) -> usize {
14246 8
14247 }
14248
14249 #[inline(always)]
14250 fn inline_size(_context: fidl::encoding::Context) -> usize {
14251 16
14252 }
14253 }
14254
14255 unsafe impl
14256 fidl::encoding::Encode<
14257 DirReceiverReceiveRequest,
14258 fidl::encoding::DefaultFuchsiaResourceDialect,
14259 > for &mut DirReceiverReceiveRequest
14260 {
14261 unsafe fn encode(
14262 self,
14263 encoder: &mut fidl::encoding::Encoder<
14264 '_,
14265 fidl::encoding::DefaultFuchsiaResourceDialect,
14266 >,
14267 offset: usize,
14268 mut depth: fidl::encoding::Depth,
14269 ) -> fidl::Result<()> {
14270 encoder.debug_check_bounds::<DirReceiverReceiveRequest>(offset);
14271 let max_ordinal: u64 = self.max_ordinal_present();
14273 encoder.write_num(max_ordinal, offset);
14274 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14275 if max_ordinal == 0 {
14277 return Ok(());
14278 }
14279 depth.increment()?;
14280 let envelope_size = 8;
14281 let bytes_len = max_ordinal as usize * envelope_size;
14282 #[allow(unused_variables)]
14283 let offset = encoder.out_of_line_offset(bytes_len);
14284 let mut _prev_end_offset: usize = 0;
14285 if 1 > max_ordinal {
14286 return Ok(());
14287 }
14288
14289 let cur_offset: usize = (1 - 1) * envelope_size;
14292
14293 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14295
14296 fidl::encoding::encode_in_envelope_optional::<
14301 fidl::encoding::HandleType<
14302 fidl::Channel,
14303 { fidl::ObjectType::CHANNEL.into_raw() },
14304 2147483648,
14305 >,
14306 fidl::encoding::DefaultFuchsiaResourceDialect,
14307 >(
14308 self.channel.as_mut().map(
14309 <fidl::encoding::HandleType<
14310 fidl::Channel,
14311 { fidl::ObjectType::CHANNEL.into_raw() },
14312 2147483648,
14313 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
14314 ),
14315 encoder,
14316 offset + cur_offset,
14317 depth,
14318 )?;
14319
14320 _prev_end_offset = cur_offset + envelope_size;
14321 if 2 > max_ordinal {
14322 return Ok(());
14323 }
14324
14325 let cur_offset: usize = (2 - 1) * envelope_size;
14328
14329 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14331
14332 fidl::encoding::encode_in_envelope_optional::<
14337 fidl_fuchsia_io::Flags,
14338 fidl::encoding::DefaultFuchsiaResourceDialect,
14339 >(
14340 self.flags
14341 .as_ref()
14342 .map(<fidl_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
14343 encoder,
14344 offset + cur_offset,
14345 depth,
14346 )?;
14347
14348 _prev_end_offset = cur_offset + envelope_size;
14349 if 3 > max_ordinal {
14350 return Ok(());
14351 }
14352
14353 let cur_offset: usize = (3 - 1) * envelope_size;
14356
14357 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14359
14360 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14365 self.subdir.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
14366 encoder, offset + cur_offset, depth
14367 )?;
14368
14369 _prev_end_offset = cur_offset + envelope_size;
14370
14371 Ok(())
14372 }
14373 }
14374
14375 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14376 for DirReceiverReceiveRequest
14377 {
14378 #[inline(always)]
14379 fn new_empty() -> Self {
14380 Self::default()
14381 }
14382
14383 unsafe fn decode(
14384 &mut self,
14385 decoder: &mut fidl::encoding::Decoder<
14386 '_,
14387 fidl::encoding::DefaultFuchsiaResourceDialect,
14388 >,
14389 offset: usize,
14390 mut depth: fidl::encoding::Depth,
14391 ) -> fidl::Result<()> {
14392 decoder.debug_check_bounds::<Self>(offset);
14393 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14394 None => return Err(fidl::Error::NotNullable),
14395 Some(len) => len,
14396 };
14397 if len == 0 {
14399 return Ok(());
14400 };
14401 depth.increment()?;
14402 let envelope_size = 8;
14403 let bytes_len = len * envelope_size;
14404 let offset = decoder.out_of_line_offset(bytes_len)?;
14405 let mut _next_ordinal_to_read = 0;
14407 let mut next_offset = offset;
14408 let end_offset = offset + bytes_len;
14409 _next_ordinal_to_read += 1;
14410 if next_offset >= end_offset {
14411 return Ok(());
14412 }
14413
14414 while _next_ordinal_to_read < 1 {
14416 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14417 _next_ordinal_to_read += 1;
14418 next_offset += envelope_size;
14419 }
14420
14421 let next_out_of_line = decoder.next_out_of_line();
14422 let handles_before = decoder.remaining_handles();
14423 if let Some((inlined, num_bytes, num_handles)) =
14424 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14425 {
14426 let member_inline_size = <fidl::encoding::HandleType<
14427 fidl::Channel,
14428 { fidl::ObjectType::CHANNEL.into_raw() },
14429 2147483648,
14430 > as fidl::encoding::TypeMarker>::inline_size(
14431 decoder.context
14432 );
14433 if inlined != (member_inline_size <= 4) {
14434 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14435 }
14436 let inner_offset;
14437 let mut inner_depth = depth.clone();
14438 if inlined {
14439 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14440 inner_offset = next_offset;
14441 } else {
14442 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14443 inner_depth.increment()?;
14444 }
14445 let val_ref =
14446 self.channel.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
14447 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
14448 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14449 {
14450 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14451 }
14452 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14453 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14454 }
14455 }
14456
14457 next_offset += envelope_size;
14458 _next_ordinal_to_read += 1;
14459 if next_offset >= end_offset {
14460 return Ok(());
14461 }
14462
14463 while _next_ordinal_to_read < 2 {
14465 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14466 _next_ordinal_to_read += 1;
14467 next_offset += envelope_size;
14468 }
14469
14470 let next_out_of_line = decoder.next_out_of_line();
14471 let handles_before = decoder.remaining_handles();
14472 if let Some((inlined, num_bytes, num_handles)) =
14473 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14474 {
14475 let member_inline_size =
14476 <fidl_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
14477 decoder.context,
14478 );
14479 if inlined != (member_inline_size <= 4) {
14480 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14481 }
14482 let inner_offset;
14483 let mut inner_depth = depth.clone();
14484 if inlined {
14485 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14486 inner_offset = next_offset;
14487 } else {
14488 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14489 inner_depth.increment()?;
14490 }
14491 let val_ref = self.flags.get_or_insert_with(|| {
14492 fidl::new_empty!(
14493 fidl_fuchsia_io::Flags,
14494 fidl::encoding::DefaultFuchsiaResourceDialect
14495 )
14496 });
14497 fidl::decode!(
14498 fidl_fuchsia_io::Flags,
14499 fidl::encoding::DefaultFuchsiaResourceDialect,
14500 val_ref,
14501 decoder,
14502 inner_offset,
14503 inner_depth
14504 )?;
14505 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14506 {
14507 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14508 }
14509 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14510 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14511 }
14512 }
14513
14514 next_offset += envelope_size;
14515 _next_ordinal_to_read += 1;
14516 if next_offset >= end_offset {
14517 return Ok(());
14518 }
14519
14520 while _next_ordinal_to_read < 3 {
14522 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14523 _next_ordinal_to_read += 1;
14524 next_offset += envelope_size;
14525 }
14526
14527 let next_out_of_line = decoder.next_out_of_line();
14528 let handles_before = decoder.remaining_handles();
14529 if let Some((inlined, num_bytes, num_handles)) =
14530 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14531 {
14532 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14533 if inlined != (member_inline_size <= 4) {
14534 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14535 }
14536 let inner_offset;
14537 let mut inner_depth = depth.clone();
14538 if inlined {
14539 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14540 inner_offset = next_offset;
14541 } else {
14542 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14543 inner_depth.increment()?;
14544 }
14545 let val_ref = self.subdir.get_or_insert_with(|| {
14546 fidl::new_empty!(
14547 fidl::encoding::BoundedString<4095>,
14548 fidl::encoding::DefaultFuchsiaResourceDialect
14549 )
14550 });
14551 fidl::decode!(
14552 fidl::encoding::BoundedString<4095>,
14553 fidl::encoding::DefaultFuchsiaResourceDialect,
14554 val_ref,
14555 decoder,
14556 inner_offset,
14557 inner_depth
14558 )?;
14559 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14560 {
14561 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14562 }
14563 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14564 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14565 }
14566 }
14567
14568 next_offset += envelope_size;
14569
14570 while next_offset < end_offset {
14572 _next_ordinal_to_read += 1;
14573 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14574 next_offset += envelope_size;
14575 }
14576
14577 Ok(())
14578 }
14579 }
14580
14581 impl RouteRequest {
14582 #[inline(always)]
14583 fn max_ordinal_present(&self) -> u64 {
14584 if let Some(_) = self.metadata {
14585 return 2;
14586 }
14587 if let Some(_) = self.requesting {
14588 return 1;
14589 }
14590 0
14591 }
14592 }
14593
14594 impl fidl::encoding::ResourceTypeMarker for RouteRequest {
14595 type Borrowed<'a> = &'a mut Self;
14596 fn take_or_borrow<'a>(
14597 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14598 ) -> Self::Borrowed<'a> {
14599 value
14600 }
14601 }
14602
14603 unsafe impl fidl::encoding::TypeMarker for RouteRequest {
14604 type Owned = Self;
14605
14606 #[inline(always)]
14607 fn inline_align(_context: fidl::encoding::Context) -> usize {
14608 8
14609 }
14610
14611 #[inline(always)]
14612 fn inline_size(_context: fidl::encoding::Context) -> usize {
14613 16
14614 }
14615 }
14616
14617 unsafe impl fidl::encoding::Encode<RouteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
14618 for &mut RouteRequest
14619 {
14620 unsafe fn encode(
14621 self,
14622 encoder: &mut fidl::encoding::Encoder<
14623 '_,
14624 fidl::encoding::DefaultFuchsiaResourceDialect,
14625 >,
14626 offset: usize,
14627 mut depth: fidl::encoding::Depth,
14628 ) -> fidl::Result<()> {
14629 encoder.debug_check_bounds::<RouteRequest>(offset);
14630 let max_ordinal: u64 = self.max_ordinal_present();
14632 encoder.write_num(max_ordinal, offset);
14633 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14634 if max_ordinal == 0 {
14636 return Ok(());
14637 }
14638 depth.increment()?;
14639 let envelope_size = 8;
14640 let bytes_len = max_ordinal as usize * envelope_size;
14641 #[allow(unused_variables)]
14642 let offset = encoder.out_of_line_offset(bytes_len);
14643 let mut _prev_end_offset: usize = 0;
14644 if 1 > max_ordinal {
14645 return Ok(());
14646 }
14647
14648 let cur_offset: usize = (1 - 1) * envelope_size;
14651
14652 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14654
14655 fidl::encoding::encode_in_envelope_optional::<
14660 InstanceToken,
14661 fidl::encoding::DefaultFuchsiaResourceDialect,
14662 >(
14663 self.requesting
14664 .as_mut()
14665 .map(<InstanceToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
14666 encoder,
14667 offset + cur_offset,
14668 depth,
14669 )?;
14670
14671 _prev_end_offset = cur_offset + envelope_size;
14672 if 2 > max_ordinal {
14673 return Ok(());
14674 }
14675
14676 let cur_offset: usize = (2 - 1) * envelope_size;
14679
14680 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14682
14683 fidl::encoding::encode_in_envelope_optional::<
14688 DictionaryRef,
14689 fidl::encoding::DefaultFuchsiaResourceDialect,
14690 >(
14691 self.metadata
14692 .as_mut()
14693 .map(<DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
14694 encoder,
14695 offset + cur_offset,
14696 depth,
14697 )?;
14698
14699 _prev_end_offset = cur_offset + envelope_size;
14700
14701 Ok(())
14702 }
14703 }
14704
14705 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RouteRequest {
14706 #[inline(always)]
14707 fn new_empty() -> Self {
14708 Self::default()
14709 }
14710
14711 unsafe fn decode(
14712 &mut self,
14713 decoder: &mut fidl::encoding::Decoder<
14714 '_,
14715 fidl::encoding::DefaultFuchsiaResourceDialect,
14716 >,
14717 offset: usize,
14718 mut depth: fidl::encoding::Depth,
14719 ) -> fidl::Result<()> {
14720 decoder.debug_check_bounds::<Self>(offset);
14721 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14722 None => return Err(fidl::Error::NotNullable),
14723 Some(len) => len,
14724 };
14725 if len == 0 {
14727 return Ok(());
14728 };
14729 depth.increment()?;
14730 let envelope_size = 8;
14731 let bytes_len = len * envelope_size;
14732 let offset = decoder.out_of_line_offset(bytes_len)?;
14733 let mut _next_ordinal_to_read = 0;
14735 let mut next_offset = offset;
14736 let end_offset = offset + bytes_len;
14737 _next_ordinal_to_read += 1;
14738 if next_offset >= end_offset {
14739 return Ok(());
14740 }
14741
14742 while _next_ordinal_to_read < 1 {
14744 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14745 _next_ordinal_to_read += 1;
14746 next_offset += envelope_size;
14747 }
14748
14749 let next_out_of_line = decoder.next_out_of_line();
14750 let handles_before = decoder.remaining_handles();
14751 if let Some((inlined, num_bytes, num_handles)) =
14752 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14753 {
14754 let member_inline_size =
14755 <InstanceToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14756 if inlined != (member_inline_size <= 4) {
14757 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14758 }
14759 let inner_offset;
14760 let mut inner_depth = depth.clone();
14761 if inlined {
14762 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14763 inner_offset = next_offset;
14764 } else {
14765 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14766 inner_depth.increment()?;
14767 }
14768 let val_ref = self.requesting.get_or_insert_with(|| {
14769 fidl::new_empty!(InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect)
14770 });
14771 fidl::decode!(
14772 InstanceToken,
14773 fidl::encoding::DefaultFuchsiaResourceDialect,
14774 val_ref,
14775 decoder,
14776 inner_offset,
14777 inner_depth
14778 )?;
14779 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14780 {
14781 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14782 }
14783 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14784 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14785 }
14786 }
14787
14788 next_offset += envelope_size;
14789 _next_ordinal_to_read += 1;
14790 if next_offset >= end_offset {
14791 return Ok(());
14792 }
14793
14794 while _next_ordinal_to_read < 2 {
14796 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14797 _next_ordinal_to_read += 1;
14798 next_offset += envelope_size;
14799 }
14800
14801 let next_out_of_line = decoder.next_out_of_line();
14802 let handles_before = decoder.remaining_handles();
14803 if let Some((inlined, num_bytes, num_handles)) =
14804 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14805 {
14806 let member_inline_size =
14807 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14808 if inlined != (member_inline_size <= 4) {
14809 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14810 }
14811 let inner_offset;
14812 let mut inner_depth = depth.clone();
14813 if inlined {
14814 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14815 inner_offset = next_offset;
14816 } else {
14817 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14818 inner_depth.increment()?;
14819 }
14820 let val_ref = self.metadata.get_or_insert_with(|| {
14821 fidl::new_empty!(DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect)
14822 });
14823 fidl::decode!(
14824 DictionaryRef,
14825 fidl::encoding::DefaultFuchsiaResourceDialect,
14826 val_ref,
14827 decoder,
14828 inner_offset,
14829 inner_depth
14830 )?;
14831 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14832 {
14833 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14834 }
14835 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14836 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14837 }
14838 }
14839
14840 next_offset += envelope_size;
14841
14842 while next_offset < end_offset {
14844 _next_ordinal_to_read += 1;
14845 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14846 next_offset += envelope_size;
14847 }
14848
14849 Ok(())
14850 }
14851 }
14852
14853 impl fidl::encoding::ResourceTypeMarker for Capability {
14854 type Borrowed<'a> = &'a mut Self;
14855 fn take_or_borrow<'a>(
14856 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14857 ) -> Self::Borrowed<'a> {
14858 value
14859 }
14860 }
14861
14862 unsafe impl fidl::encoding::TypeMarker for Capability {
14863 type Owned = Self;
14864
14865 #[inline(always)]
14866 fn inline_align(_context: fidl::encoding::Context) -> usize {
14867 8
14868 }
14869
14870 #[inline(always)]
14871 fn inline_size(_context: fidl::encoding::Context) -> usize {
14872 16
14873 }
14874 }
14875
14876 unsafe impl fidl::encoding::Encode<Capability, fidl::encoding::DefaultFuchsiaResourceDialect>
14877 for &mut Capability
14878 {
14879 #[inline]
14880 unsafe fn encode(
14881 self,
14882 encoder: &mut fidl::encoding::Encoder<
14883 '_,
14884 fidl::encoding::DefaultFuchsiaResourceDialect,
14885 >,
14886 offset: usize,
14887 _depth: fidl::encoding::Depth,
14888 ) -> fidl::Result<()> {
14889 encoder.debug_check_bounds::<Capability>(offset);
14890 encoder.write_num::<u64>(self.ordinal(), offset);
14891 match self {
14892 Capability::Unit(ref val) => {
14893 fidl::encoding::encode_in_envelope::<Unit, fidl::encoding::DefaultFuchsiaResourceDialect>(
14894 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
14895 encoder, offset + 8, _depth
14896 )
14897 }
14898 Capability::Handle(ref mut val) => {
14899 fidl::encoding::encode_in_envelope::<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14900 <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14901 encoder, offset + 8, _depth
14902 )
14903 }
14904 Capability::Data(ref val) => {
14905 fidl::encoding::encode_in_envelope::<Data, fidl::encoding::DefaultFuchsiaResourceDialect>(
14906 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
14907 encoder, offset + 8, _depth
14908 )
14909 }
14910 Capability::Dictionary(ref mut val) => {
14911 fidl::encoding::encode_in_envelope::<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>(
14912 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14913 encoder, offset + 8, _depth
14914 )
14915 }
14916 Capability::Connector(ref mut val) => {
14917 fidl::encoding::encode_in_envelope::<Connector, fidl::encoding::DefaultFuchsiaResourceDialect>(
14918 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14919 encoder, offset + 8, _depth
14920 )
14921 }
14922 Capability::DirConnector(ref mut val) => {
14923 fidl::encoding::encode_in_envelope::<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>(
14924 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14925 encoder, offset + 8, _depth
14926 )
14927 }
14928 Capability::Directory(ref mut val) => {
14929 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14930 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14931 encoder, offset + 8, _depth
14932 )
14933 }
14934 Capability::DirEntry(ref mut val) => {
14935 fidl::encoding::encode_in_envelope::<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect>(
14936 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14937 encoder, offset + 8, _depth
14938 )
14939 }
14940 Capability::ConnectorRouter(ref mut val) => {
14941 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ConnectorRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14942 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14943 encoder, offset + 8, _depth
14944 )
14945 }
14946 Capability::DictionaryRouter(ref mut val) => {
14947 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DictionaryRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14948 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14949 encoder, offset + 8, _depth
14950 )
14951 }
14952 Capability::DirEntryRouter(ref mut val) => {
14953 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirEntryRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14954 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14955 encoder, offset + 8, _depth
14956 )
14957 }
14958 Capability::DataRouter(ref mut val) => {
14959 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14960 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14961 encoder, offset + 8, _depth
14962 )
14963 }
14964 Capability::DirConnectorRouter(ref mut val) => {
14965 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirConnectorRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14966 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14967 encoder, offset + 8, _depth
14968 )
14969 }
14970 Capability::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14971 }
14972 }
14973 }
14974
14975 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Capability {
14976 #[inline(always)]
14977 fn new_empty() -> Self {
14978 Self::__SourceBreaking { unknown_ordinal: 0 }
14979 }
14980
14981 #[inline]
14982 unsafe fn decode(
14983 &mut self,
14984 decoder: &mut fidl::encoding::Decoder<
14985 '_,
14986 fidl::encoding::DefaultFuchsiaResourceDialect,
14987 >,
14988 offset: usize,
14989 mut depth: fidl::encoding::Depth,
14990 ) -> fidl::Result<()> {
14991 decoder.debug_check_bounds::<Self>(offset);
14992 #[allow(unused_variables)]
14993 let next_out_of_line = decoder.next_out_of_line();
14994 let handles_before = decoder.remaining_handles();
14995 let (ordinal, inlined, num_bytes, num_handles) =
14996 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14997
14998 let member_inline_size = match ordinal {
14999 1 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15000 2 => <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15001 3 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15002 4 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15003 5 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15004 6 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15005 7 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15006 8 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15007 9 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15008 10 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15009 11 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15010 12 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15011 13 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15012 0 => return Err(fidl::Error::UnknownUnionTag),
15013 _ => num_bytes as usize,
15014 };
15015
15016 if inlined != (member_inline_size <= 4) {
15017 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15018 }
15019 let _inner_offset;
15020 if inlined {
15021 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15022 _inner_offset = offset + 8;
15023 } else {
15024 depth.increment()?;
15025 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15026 }
15027 match ordinal {
15028 1 => {
15029 #[allow(irrefutable_let_patterns)]
15030 if let Capability::Unit(_) = self {
15031 } else {
15033 *self = Capability::Unit(fidl::new_empty!(
15035 Unit,
15036 fidl::encoding::DefaultFuchsiaResourceDialect
15037 ));
15038 }
15039 #[allow(irrefutable_let_patterns)]
15040 if let Capability::Unit(ref mut val) = self {
15041 fidl::decode!(
15042 Unit,
15043 fidl::encoding::DefaultFuchsiaResourceDialect,
15044 val,
15045 decoder,
15046 _inner_offset,
15047 depth
15048 )?;
15049 } else {
15050 unreachable!()
15051 }
15052 }
15053 2 => {
15054 #[allow(irrefutable_let_patterns)]
15055 if let Capability::Handle(_) = self {
15056 } else {
15058 *self = Capability::Handle(
15060 fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
15061 );
15062 }
15063 #[allow(irrefutable_let_patterns)]
15064 if let Capability::Handle(ref mut val) = self {
15065 fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15066 } else {
15067 unreachable!()
15068 }
15069 }
15070 3 => {
15071 #[allow(irrefutable_let_patterns)]
15072 if let Capability::Data(_) = self {
15073 } else {
15075 *self = Capability::Data(fidl::new_empty!(
15077 Data,
15078 fidl::encoding::DefaultFuchsiaResourceDialect
15079 ));
15080 }
15081 #[allow(irrefutable_let_patterns)]
15082 if let Capability::Data(ref mut val) = self {
15083 fidl::decode!(
15084 Data,
15085 fidl::encoding::DefaultFuchsiaResourceDialect,
15086 val,
15087 decoder,
15088 _inner_offset,
15089 depth
15090 )?;
15091 } else {
15092 unreachable!()
15093 }
15094 }
15095 4 => {
15096 #[allow(irrefutable_let_patterns)]
15097 if let Capability::Dictionary(_) = self {
15098 } else {
15100 *self = Capability::Dictionary(fidl::new_empty!(
15102 DictionaryRef,
15103 fidl::encoding::DefaultFuchsiaResourceDialect
15104 ));
15105 }
15106 #[allow(irrefutable_let_patterns)]
15107 if let Capability::Dictionary(ref mut val) = self {
15108 fidl::decode!(
15109 DictionaryRef,
15110 fidl::encoding::DefaultFuchsiaResourceDialect,
15111 val,
15112 decoder,
15113 _inner_offset,
15114 depth
15115 )?;
15116 } else {
15117 unreachable!()
15118 }
15119 }
15120 5 => {
15121 #[allow(irrefutable_let_patterns)]
15122 if let Capability::Connector(_) = self {
15123 } else {
15125 *self = Capability::Connector(fidl::new_empty!(
15127 Connector,
15128 fidl::encoding::DefaultFuchsiaResourceDialect
15129 ));
15130 }
15131 #[allow(irrefutable_let_patterns)]
15132 if let Capability::Connector(ref mut val) = self {
15133 fidl::decode!(
15134 Connector,
15135 fidl::encoding::DefaultFuchsiaResourceDialect,
15136 val,
15137 decoder,
15138 _inner_offset,
15139 depth
15140 )?;
15141 } else {
15142 unreachable!()
15143 }
15144 }
15145 6 => {
15146 #[allow(irrefutable_let_patterns)]
15147 if let Capability::DirConnector(_) = self {
15148 } else {
15150 *self = Capability::DirConnector(fidl::new_empty!(
15152 DirConnector,
15153 fidl::encoding::DefaultFuchsiaResourceDialect
15154 ));
15155 }
15156 #[allow(irrefutable_let_patterns)]
15157 if let Capability::DirConnector(ref mut val) = self {
15158 fidl::decode!(
15159 DirConnector,
15160 fidl::encoding::DefaultFuchsiaResourceDialect,
15161 val,
15162 decoder,
15163 _inner_offset,
15164 depth
15165 )?;
15166 } else {
15167 unreachable!()
15168 }
15169 }
15170 7 => {
15171 #[allow(irrefutable_let_patterns)]
15172 if let Capability::Directory(_) = self {
15173 } else {
15175 *self = Capability::Directory(fidl::new_empty!(
15177 fidl::encoding::Endpoint<
15178 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
15179 >,
15180 fidl::encoding::DefaultFuchsiaResourceDialect
15181 ));
15182 }
15183 #[allow(irrefutable_let_patterns)]
15184 if let Capability::Directory(ref mut val) = self {
15185 fidl::decode!(
15186 fidl::encoding::Endpoint<
15187 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
15188 >,
15189 fidl::encoding::DefaultFuchsiaResourceDialect,
15190 val,
15191 decoder,
15192 _inner_offset,
15193 depth
15194 )?;
15195 } else {
15196 unreachable!()
15197 }
15198 }
15199 8 => {
15200 #[allow(irrefutable_let_patterns)]
15201 if let Capability::DirEntry(_) = self {
15202 } else {
15204 *self = Capability::DirEntry(fidl::new_empty!(
15206 DirEntry,
15207 fidl::encoding::DefaultFuchsiaResourceDialect
15208 ));
15209 }
15210 #[allow(irrefutable_let_patterns)]
15211 if let Capability::DirEntry(ref mut val) = self {
15212 fidl::decode!(
15213 DirEntry,
15214 fidl::encoding::DefaultFuchsiaResourceDialect,
15215 val,
15216 decoder,
15217 _inner_offset,
15218 depth
15219 )?;
15220 } else {
15221 unreachable!()
15222 }
15223 }
15224 9 => {
15225 #[allow(irrefutable_let_patterns)]
15226 if let Capability::ConnectorRouter(_) = self {
15227 } else {
15229 *self = Capability::ConnectorRouter(fidl::new_empty!(
15231 fidl::encoding::Endpoint<
15232 fidl::endpoints::ClientEnd<ConnectorRouterMarker>,
15233 >,
15234 fidl::encoding::DefaultFuchsiaResourceDialect
15235 ));
15236 }
15237 #[allow(irrefutable_let_patterns)]
15238 if let Capability::ConnectorRouter(ref mut val) = self {
15239 fidl::decode!(
15240 fidl::encoding::Endpoint<
15241 fidl::endpoints::ClientEnd<ConnectorRouterMarker>,
15242 >,
15243 fidl::encoding::DefaultFuchsiaResourceDialect,
15244 val,
15245 decoder,
15246 _inner_offset,
15247 depth
15248 )?;
15249 } else {
15250 unreachable!()
15251 }
15252 }
15253 10 => {
15254 #[allow(irrefutable_let_patterns)]
15255 if let Capability::DictionaryRouter(_) = self {
15256 } else {
15258 *self = Capability::DictionaryRouter(fidl::new_empty!(
15260 fidl::encoding::Endpoint<
15261 fidl::endpoints::ClientEnd<DictionaryRouterMarker>,
15262 >,
15263 fidl::encoding::DefaultFuchsiaResourceDialect
15264 ));
15265 }
15266 #[allow(irrefutable_let_patterns)]
15267 if let Capability::DictionaryRouter(ref mut val) = self {
15268 fidl::decode!(
15269 fidl::encoding::Endpoint<
15270 fidl::endpoints::ClientEnd<DictionaryRouterMarker>,
15271 >,
15272 fidl::encoding::DefaultFuchsiaResourceDialect,
15273 val,
15274 decoder,
15275 _inner_offset,
15276 depth
15277 )?;
15278 } else {
15279 unreachable!()
15280 }
15281 }
15282 11 => {
15283 #[allow(irrefutable_let_patterns)]
15284 if let Capability::DirEntryRouter(_) = self {
15285 } else {
15287 *self = Capability::DirEntryRouter(fidl::new_empty!(
15289 fidl::encoding::Endpoint<
15290 fidl::endpoints::ClientEnd<DirEntryRouterMarker>,
15291 >,
15292 fidl::encoding::DefaultFuchsiaResourceDialect
15293 ));
15294 }
15295 #[allow(irrefutable_let_patterns)]
15296 if let Capability::DirEntryRouter(ref mut val) = self {
15297 fidl::decode!(
15298 fidl::encoding::Endpoint<
15299 fidl::endpoints::ClientEnd<DirEntryRouterMarker>,
15300 >,
15301 fidl::encoding::DefaultFuchsiaResourceDialect,
15302 val,
15303 decoder,
15304 _inner_offset,
15305 depth
15306 )?;
15307 } else {
15308 unreachable!()
15309 }
15310 }
15311 12 => {
15312 #[allow(irrefutable_let_patterns)]
15313 if let Capability::DataRouter(_) = self {
15314 } else {
15316 *self = Capability::DataRouter(fidl::new_empty!(
15318 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>>,
15319 fidl::encoding::DefaultFuchsiaResourceDialect
15320 ));
15321 }
15322 #[allow(irrefutable_let_patterns)]
15323 if let Capability::DataRouter(ref mut val) = self {
15324 fidl::decode!(
15325 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>>,
15326 fidl::encoding::DefaultFuchsiaResourceDialect,
15327 val,
15328 decoder,
15329 _inner_offset,
15330 depth
15331 )?;
15332 } else {
15333 unreachable!()
15334 }
15335 }
15336 13 => {
15337 #[allow(irrefutable_let_patterns)]
15338 if let Capability::DirConnectorRouter(_) = self {
15339 } else {
15341 *self = Capability::DirConnectorRouter(fidl::new_empty!(
15343 fidl::encoding::Endpoint<
15344 fidl::endpoints::ClientEnd<DirConnectorRouterMarker>,
15345 >,
15346 fidl::encoding::DefaultFuchsiaResourceDialect
15347 ));
15348 }
15349 #[allow(irrefutable_let_patterns)]
15350 if let Capability::DirConnectorRouter(ref mut val) = self {
15351 fidl::decode!(
15352 fidl::encoding::Endpoint<
15353 fidl::endpoints::ClientEnd<DirConnectorRouterMarker>,
15354 >,
15355 fidl::encoding::DefaultFuchsiaResourceDialect,
15356 val,
15357 decoder,
15358 _inner_offset,
15359 depth
15360 )?;
15361 } else {
15362 unreachable!()
15363 }
15364 }
15365 #[allow(deprecated)]
15366 ordinal => {
15367 for _ in 0..num_handles {
15368 decoder.drop_next_handle()?;
15369 }
15370 *self = Capability::__SourceBreaking { unknown_ordinal: ordinal };
15371 }
15372 }
15373 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15374 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15375 }
15376 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15377 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15378 }
15379 Ok(())
15380 }
15381 }
15382
15383 impl fidl::encoding::ResourceTypeMarker for ConnectorRouterRouteResponse {
15384 type Borrowed<'a> = &'a mut Self;
15385 fn take_or_borrow<'a>(
15386 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15387 ) -> Self::Borrowed<'a> {
15388 value
15389 }
15390 }
15391
15392 unsafe impl fidl::encoding::TypeMarker for ConnectorRouterRouteResponse {
15393 type Owned = Self;
15394
15395 #[inline(always)]
15396 fn inline_align(_context: fidl::encoding::Context) -> usize {
15397 8
15398 }
15399
15400 #[inline(always)]
15401 fn inline_size(_context: fidl::encoding::Context) -> usize {
15402 16
15403 }
15404 }
15405
15406 unsafe impl
15407 fidl::encoding::Encode<
15408 ConnectorRouterRouteResponse,
15409 fidl::encoding::DefaultFuchsiaResourceDialect,
15410 > for &mut ConnectorRouterRouteResponse
15411 {
15412 #[inline]
15413 unsafe fn encode(
15414 self,
15415 encoder: &mut fidl::encoding::Encoder<
15416 '_,
15417 fidl::encoding::DefaultFuchsiaResourceDialect,
15418 >,
15419 offset: usize,
15420 _depth: fidl::encoding::Depth,
15421 ) -> fidl::Result<()> {
15422 encoder.debug_check_bounds::<ConnectorRouterRouteResponse>(offset);
15423 encoder.write_num::<u64>(self.ordinal(), offset);
15424 match self {
15425 ConnectorRouterRouteResponse::Connector(ref mut val) => {
15426 fidl::encoding::encode_in_envelope::<
15427 Connector,
15428 fidl::encoding::DefaultFuchsiaResourceDialect,
15429 >(
15430 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15431 encoder,
15432 offset + 8,
15433 _depth,
15434 )
15435 }
15436 ConnectorRouterRouteResponse::Unavailable(ref val) => {
15437 fidl::encoding::encode_in_envelope::<
15438 Unit,
15439 fidl::encoding::DefaultFuchsiaResourceDialect,
15440 >(
15441 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15442 encoder,
15443 offset + 8,
15444 _depth,
15445 )
15446 }
15447 }
15448 }
15449 }
15450
15451 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15452 for ConnectorRouterRouteResponse
15453 {
15454 #[inline(always)]
15455 fn new_empty() -> Self {
15456 Self::Connector(fidl::new_empty!(
15457 Connector,
15458 fidl::encoding::DefaultFuchsiaResourceDialect
15459 ))
15460 }
15461
15462 #[inline]
15463 unsafe fn decode(
15464 &mut self,
15465 decoder: &mut fidl::encoding::Decoder<
15466 '_,
15467 fidl::encoding::DefaultFuchsiaResourceDialect,
15468 >,
15469 offset: usize,
15470 mut depth: fidl::encoding::Depth,
15471 ) -> fidl::Result<()> {
15472 decoder.debug_check_bounds::<Self>(offset);
15473 #[allow(unused_variables)]
15474 let next_out_of_line = decoder.next_out_of_line();
15475 let handles_before = decoder.remaining_handles();
15476 let (ordinal, inlined, num_bytes, num_handles) =
15477 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15478
15479 let member_inline_size = match ordinal {
15480 1 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15481 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15482 _ => return Err(fidl::Error::UnknownUnionTag),
15483 };
15484
15485 if inlined != (member_inline_size <= 4) {
15486 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15487 }
15488 let _inner_offset;
15489 if inlined {
15490 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15491 _inner_offset = offset + 8;
15492 } else {
15493 depth.increment()?;
15494 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15495 }
15496 match ordinal {
15497 1 => {
15498 #[allow(irrefutable_let_patterns)]
15499 if let ConnectorRouterRouteResponse::Connector(_) = self {
15500 } else {
15502 *self = ConnectorRouterRouteResponse::Connector(fidl::new_empty!(
15504 Connector,
15505 fidl::encoding::DefaultFuchsiaResourceDialect
15506 ));
15507 }
15508 #[allow(irrefutable_let_patterns)]
15509 if let ConnectorRouterRouteResponse::Connector(ref mut val) = self {
15510 fidl::decode!(
15511 Connector,
15512 fidl::encoding::DefaultFuchsiaResourceDialect,
15513 val,
15514 decoder,
15515 _inner_offset,
15516 depth
15517 )?;
15518 } else {
15519 unreachable!()
15520 }
15521 }
15522 2 => {
15523 #[allow(irrefutable_let_patterns)]
15524 if let ConnectorRouterRouteResponse::Unavailable(_) = self {
15525 } else {
15527 *self = ConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
15529 Unit,
15530 fidl::encoding::DefaultFuchsiaResourceDialect
15531 ));
15532 }
15533 #[allow(irrefutable_let_patterns)]
15534 if let ConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
15535 fidl::decode!(
15536 Unit,
15537 fidl::encoding::DefaultFuchsiaResourceDialect,
15538 val,
15539 decoder,
15540 _inner_offset,
15541 depth
15542 )?;
15543 } else {
15544 unreachable!()
15545 }
15546 }
15547 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15548 }
15549 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15550 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15551 }
15552 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15553 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15554 }
15555 Ok(())
15556 }
15557 }
15558
15559 impl fidl::encoding::ResourceTypeMarker for DataRouterRouteResponse {
15560 type Borrowed<'a> = &'a mut Self;
15561 fn take_or_borrow<'a>(
15562 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15563 ) -> Self::Borrowed<'a> {
15564 value
15565 }
15566 }
15567
15568 unsafe impl fidl::encoding::TypeMarker for DataRouterRouteResponse {
15569 type Owned = Self;
15570
15571 #[inline(always)]
15572 fn inline_align(_context: fidl::encoding::Context) -> usize {
15573 8
15574 }
15575
15576 #[inline(always)]
15577 fn inline_size(_context: fidl::encoding::Context) -> usize {
15578 16
15579 }
15580 }
15581
15582 unsafe impl
15583 fidl::encoding::Encode<
15584 DataRouterRouteResponse,
15585 fidl::encoding::DefaultFuchsiaResourceDialect,
15586 > for &mut DataRouterRouteResponse
15587 {
15588 #[inline]
15589 unsafe fn encode(
15590 self,
15591 encoder: &mut fidl::encoding::Encoder<
15592 '_,
15593 fidl::encoding::DefaultFuchsiaResourceDialect,
15594 >,
15595 offset: usize,
15596 _depth: fidl::encoding::Depth,
15597 ) -> fidl::Result<()> {
15598 encoder.debug_check_bounds::<DataRouterRouteResponse>(offset);
15599 encoder.write_num::<u64>(self.ordinal(), offset);
15600 match self {
15601 DataRouterRouteResponse::Data(ref val) => fidl::encoding::encode_in_envelope::<
15602 Data,
15603 fidl::encoding::DefaultFuchsiaResourceDialect,
15604 >(
15605 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
15606 encoder,
15607 offset + 8,
15608 _depth,
15609 ),
15610 DataRouterRouteResponse::Unavailable(ref val) => {
15611 fidl::encoding::encode_in_envelope::<
15612 Unit,
15613 fidl::encoding::DefaultFuchsiaResourceDialect,
15614 >(
15615 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15616 encoder,
15617 offset + 8,
15618 _depth,
15619 )
15620 }
15621 }
15622 }
15623 }
15624
15625 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15626 for DataRouterRouteResponse
15627 {
15628 #[inline(always)]
15629 fn new_empty() -> Self {
15630 Self::Data(fidl::new_empty!(Data, fidl::encoding::DefaultFuchsiaResourceDialect))
15631 }
15632
15633 #[inline]
15634 unsafe fn decode(
15635 &mut self,
15636 decoder: &mut fidl::encoding::Decoder<
15637 '_,
15638 fidl::encoding::DefaultFuchsiaResourceDialect,
15639 >,
15640 offset: usize,
15641 mut depth: fidl::encoding::Depth,
15642 ) -> fidl::Result<()> {
15643 decoder.debug_check_bounds::<Self>(offset);
15644 #[allow(unused_variables)]
15645 let next_out_of_line = decoder.next_out_of_line();
15646 let handles_before = decoder.remaining_handles();
15647 let (ordinal, inlined, num_bytes, num_handles) =
15648 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15649
15650 let member_inline_size = match ordinal {
15651 1 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15652 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15653 _ => return Err(fidl::Error::UnknownUnionTag),
15654 };
15655
15656 if inlined != (member_inline_size <= 4) {
15657 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15658 }
15659 let _inner_offset;
15660 if inlined {
15661 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15662 _inner_offset = offset + 8;
15663 } else {
15664 depth.increment()?;
15665 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15666 }
15667 match ordinal {
15668 1 => {
15669 #[allow(irrefutable_let_patterns)]
15670 if let DataRouterRouteResponse::Data(_) = self {
15671 } else {
15673 *self = DataRouterRouteResponse::Data(fidl::new_empty!(
15675 Data,
15676 fidl::encoding::DefaultFuchsiaResourceDialect
15677 ));
15678 }
15679 #[allow(irrefutable_let_patterns)]
15680 if let DataRouterRouteResponse::Data(ref mut val) = self {
15681 fidl::decode!(
15682 Data,
15683 fidl::encoding::DefaultFuchsiaResourceDialect,
15684 val,
15685 decoder,
15686 _inner_offset,
15687 depth
15688 )?;
15689 } else {
15690 unreachable!()
15691 }
15692 }
15693 2 => {
15694 #[allow(irrefutable_let_patterns)]
15695 if let DataRouterRouteResponse::Unavailable(_) = self {
15696 } else {
15698 *self = DataRouterRouteResponse::Unavailable(fidl::new_empty!(
15700 Unit,
15701 fidl::encoding::DefaultFuchsiaResourceDialect
15702 ));
15703 }
15704 #[allow(irrefutable_let_patterns)]
15705 if let DataRouterRouteResponse::Unavailable(ref mut val) = self {
15706 fidl::decode!(
15707 Unit,
15708 fidl::encoding::DefaultFuchsiaResourceDialect,
15709 val,
15710 decoder,
15711 _inner_offset,
15712 depth
15713 )?;
15714 } else {
15715 unreachable!()
15716 }
15717 }
15718 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15719 }
15720 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15721 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15722 }
15723 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15724 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15725 }
15726 Ok(())
15727 }
15728 }
15729
15730 impl fidl::encoding::ResourceTypeMarker for DictionaryRouterRouteResponse {
15731 type Borrowed<'a> = &'a mut Self;
15732 fn take_or_borrow<'a>(
15733 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15734 ) -> Self::Borrowed<'a> {
15735 value
15736 }
15737 }
15738
15739 unsafe impl fidl::encoding::TypeMarker for DictionaryRouterRouteResponse {
15740 type Owned = Self;
15741
15742 #[inline(always)]
15743 fn inline_align(_context: fidl::encoding::Context) -> usize {
15744 8
15745 }
15746
15747 #[inline(always)]
15748 fn inline_size(_context: fidl::encoding::Context) -> usize {
15749 16
15750 }
15751 }
15752
15753 unsafe impl
15754 fidl::encoding::Encode<
15755 DictionaryRouterRouteResponse,
15756 fidl::encoding::DefaultFuchsiaResourceDialect,
15757 > for &mut DictionaryRouterRouteResponse
15758 {
15759 #[inline]
15760 unsafe fn encode(
15761 self,
15762 encoder: &mut fidl::encoding::Encoder<
15763 '_,
15764 fidl::encoding::DefaultFuchsiaResourceDialect,
15765 >,
15766 offset: usize,
15767 _depth: fidl::encoding::Depth,
15768 ) -> fidl::Result<()> {
15769 encoder.debug_check_bounds::<DictionaryRouterRouteResponse>(offset);
15770 encoder.write_num::<u64>(self.ordinal(), offset);
15771 match self {
15772 DictionaryRouterRouteResponse::Dictionary(ref mut val) => {
15773 fidl::encoding::encode_in_envelope::<
15774 DictionaryRef,
15775 fidl::encoding::DefaultFuchsiaResourceDialect,
15776 >(
15777 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15778 encoder,
15779 offset + 8,
15780 _depth,
15781 )
15782 }
15783 DictionaryRouterRouteResponse::Unavailable(ref val) => {
15784 fidl::encoding::encode_in_envelope::<
15785 Unit,
15786 fidl::encoding::DefaultFuchsiaResourceDialect,
15787 >(
15788 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15789 encoder,
15790 offset + 8,
15791 _depth,
15792 )
15793 }
15794 }
15795 }
15796 }
15797
15798 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15799 for DictionaryRouterRouteResponse
15800 {
15801 #[inline(always)]
15802 fn new_empty() -> Self {
15803 Self::Dictionary(fidl::new_empty!(
15804 DictionaryRef,
15805 fidl::encoding::DefaultFuchsiaResourceDialect
15806 ))
15807 }
15808
15809 #[inline]
15810 unsafe fn decode(
15811 &mut self,
15812 decoder: &mut fidl::encoding::Decoder<
15813 '_,
15814 fidl::encoding::DefaultFuchsiaResourceDialect,
15815 >,
15816 offset: usize,
15817 mut depth: fidl::encoding::Depth,
15818 ) -> fidl::Result<()> {
15819 decoder.debug_check_bounds::<Self>(offset);
15820 #[allow(unused_variables)]
15821 let next_out_of_line = decoder.next_out_of_line();
15822 let handles_before = decoder.remaining_handles();
15823 let (ordinal, inlined, num_bytes, num_handles) =
15824 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15825
15826 let member_inline_size = match ordinal {
15827 1 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15828 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15829 _ => return Err(fidl::Error::UnknownUnionTag),
15830 };
15831
15832 if inlined != (member_inline_size <= 4) {
15833 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15834 }
15835 let _inner_offset;
15836 if inlined {
15837 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15838 _inner_offset = offset + 8;
15839 } else {
15840 depth.increment()?;
15841 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15842 }
15843 match ordinal {
15844 1 => {
15845 #[allow(irrefutable_let_patterns)]
15846 if let DictionaryRouterRouteResponse::Dictionary(_) = self {
15847 } else {
15849 *self = DictionaryRouterRouteResponse::Dictionary(fidl::new_empty!(
15851 DictionaryRef,
15852 fidl::encoding::DefaultFuchsiaResourceDialect
15853 ));
15854 }
15855 #[allow(irrefutable_let_patterns)]
15856 if let DictionaryRouterRouteResponse::Dictionary(ref mut val) = self {
15857 fidl::decode!(
15858 DictionaryRef,
15859 fidl::encoding::DefaultFuchsiaResourceDialect,
15860 val,
15861 decoder,
15862 _inner_offset,
15863 depth
15864 )?;
15865 } else {
15866 unreachable!()
15867 }
15868 }
15869 2 => {
15870 #[allow(irrefutable_let_patterns)]
15871 if let DictionaryRouterRouteResponse::Unavailable(_) = self {
15872 } else {
15874 *self = DictionaryRouterRouteResponse::Unavailable(fidl::new_empty!(
15876 Unit,
15877 fidl::encoding::DefaultFuchsiaResourceDialect
15878 ));
15879 }
15880 #[allow(irrefutable_let_patterns)]
15881 if let DictionaryRouterRouteResponse::Unavailable(ref mut val) = self {
15882 fidl::decode!(
15883 Unit,
15884 fidl::encoding::DefaultFuchsiaResourceDialect,
15885 val,
15886 decoder,
15887 _inner_offset,
15888 depth
15889 )?;
15890 } else {
15891 unreachable!()
15892 }
15893 }
15894 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15895 }
15896 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15897 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15898 }
15899 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15900 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15901 }
15902 Ok(())
15903 }
15904 }
15905
15906 impl fidl::encoding::ResourceTypeMarker for DirConnectorRouterRouteResponse {
15907 type Borrowed<'a> = &'a mut Self;
15908 fn take_or_borrow<'a>(
15909 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15910 ) -> Self::Borrowed<'a> {
15911 value
15912 }
15913 }
15914
15915 unsafe impl fidl::encoding::TypeMarker for DirConnectorRouterRouteResponse {
15916 type Owned = Self;
15917
15918 #[inline(always)]
15919 fn inline_align(_context: fidl::encoding::Context) -> usize {
15920 8
15921 }
15922
15923 #[inline(always)]
15924 fn inline_size(_context: fidl::encoding::Context) -> usize {
15925 16
15926 }
15927 }
15928
15929 unsafe impl
15930 fidl::encoding::Encode<
15931 DirConnectorRouterRouteResponse,
15932 fidl::encoding::DefaultFuchsiaResourceDialect,
15933 > for &mut DirConnectorRouterRouteResponse
15934 {
15935 #[inline]
15936 unsafe fn encode(
15937 self,
15938 encoder: &mut fidl::encoding::Encoder<
15939 '_,
15940 fidl::encoding::DefaultFuchsiaResourceDialect,
15941 >,
15942 offset: usize,
15943 _depth: fidl::encoding::Depth,
15944 ) -> fidl::Result<()> {
15945 encoder.debug_check_bounds::<DirConnectorRouterRouteResponse>(offset);
15946 encoder.write_num::<u64>(self.ordinal(), offset);
15947 match self {
15948 DirConnectorRouterRouteResponse::DirConnector(ref mut val) => {
15949 fidl::encoding::encode_in_envelope::<
15950 DirConnector,
15951 fidl::encoding::DefaultFuchsiaResourceDialect,
15952 >(
15953 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15954 encoder,
15955 offset + 8,
15956 _depth,
15957 )
15958 }
15959 DirConnectorRouterRouteResponse::Unavailable(ref val) => {
15960 fidl::encoding::encode_in_envelope::<
15961 Unit,
15962 fidl::encoding::DefaultFuchsiaResourceDialect,
15963 >(
15964 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15965 encoder,
15966 offset + 8,
15967 _depth,
15968 )
15969 }
15970 }
15971 }
15972 }
15973
15974 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15975 for DirConnectorRouterRouteResponse
15976 {
15977 #[inline(always)]
15978 fn new_empty() -> Self {
15979 Self::DirConnector(fidl::new_empty!(
15980 DirConnector,
15981 fidl::encoding::DefaultFuchsiaResourceDialect
15982 ))
15983 }
15984
15985 #[inline]
15986 unsafe fn decode(
15987 &mut self,
15988 decoder: &mut fidl::encoding::Decoder<
15989 '_,
15990 fidl::encoding::DefaultFuchsiaResourceDialect,
15991 >,
15992 offset: usize,
15993 mut depth: fidl::encoding::Depth,
15994 ) -> fidl::Result<()> {
15995 decoder.debug_check_bounds::<Self>(offset);
15996 #[allow(unused_variables)]
15997 let next_out_of_line = decoder.next_out_of_line();
15998 let handles_before = decoder.remaining_handles();
15999 let (ordinal, inlined, num_bytes, num_handles) =
16000 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16001
16002 let member_inline_size = match ordinal {
16003 1 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16004 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16005 _ => return Err(fidl::Error::UnknownUnionTag),
16006 };
16007
16008 if inlined != (member_inline_size <= 4) {
16009 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16010 }
16011 let _inner_offset;
16012 if inlined {
16013 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16014 _inner_offset = offset + 8;
16015 } else {
16016 depth.increment()?;
16017 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16018 }
16019 match ordinal {
16020 1 => {
16021 #[allow(irrefutable_let_patterns)]
16022 if let DirConnectorRouterRouteResponse::DirConnector(_) = self {
16023 } else {
16025 *self = DirConnectorRouterRouteResponse::DirConnector(fidl::new_empty!(
16027 DirConnector,
16028 fidl::encoding::DefaultFuchsiaResourceDialect
16029 ));
16030 }
16031 #[allow(irrefutable_let_patterns)]
16032 if let DirConnectorRouterRouteResponse::DirConnector(ref mut val) = self {
16033 fidl::decode!(
16034 DirConnector,
16035 fidl::encoding::DefaultFuchsiaResourceDialect,
16036 val,
16037 decoder,
16038 _inner_offset,
16039 depth
16040 )?;
16041 } else {
16042 unreachable!()
16043 }
16044 }
16045 2 => {
16046 #[allow(irrefutable_let_patterns)]
16047 if let DirConnectorRouterRouteResponse::Unavailable(_) = self {
16048 } else {
16050 *self = DirConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
16052 Unit,
16053 fidl::encoding::DefaultFuchsiaResourceDialect
16054 ));
16055 }
16056 #[allow(irrefutable_let_patterns)]
16057 if let DirConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
16058 fidl::decode!(
16059 Unit,
16060 fidl::encoding::DefaultFuchsiaResourceDialect,
16061 val,
16062 decoder,
16063 _inner_offset,
16064 depth
16065 )?;
16066 } else {
16067 unreachable!()
16068 }
16069 }
16070 ordinal => panic!("unexpected ordinal {:?}", ordinal),
16071 }
16072 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
16073 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16074 }
16075 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16076 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16077 }
16078 Ok(())
16079 }
16080 }
16081
16082 impl fidl::encoding::ResourceTypeMarker for DirEntryRouterRouteResponse {
16083 type Borrowed<'a> = &'a mut Self;
16084 fn take_or_borrow<'a>(
16085 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
16086 ) -> Self::Borrowed<'a> {
16087 value
16088 }
16089 }
16090
16091 unsafe impl fidl::encoding::TypeMarker for DirEntryRouterRouteResponse {
16092 type Owned = Self;
16093
16094 #[inline(always)]
16095 fn inline_align(_context: fidl::encoding::Context) -> usize {
16096 8
16097 }
16098
16099 #[inline(always)]
16100 fn inline_size(_context: fidl::encoding::Context) -> usize {
16101 16
16102 }
16103 }
16104
16105 unsafe impl
16106 fidl::encoding::Encode<
16107 DirEntryRouterRouteResponse,
16108 fidl::encoding::DefaultFuchsiaResourceDialect,
16109 > for &mut DirEntryRouterRouteResponse
16110 {
16111 #[inline]
16112 unsafe fn encode(
16113 self,
16114 encoder: &mut fidl::encoding::Encoder<
16115 '_,
16116 fidl::encoding::DefaultFuchsiaResourceDialect,
16117 >,
16118 offset: usize,
16119 _depth: fidl::encoding::Depth,
16120 ) -> fidl::Result<()> {
16121 encoder.debug_check_bounds::<DirEntryRouterRouteResponse>(offset);
16122 encoder.write_num::<u64>(self.ordinal(), offset);
16123 match self {
16124 DirEntryRouterRouteResponse::DirEntry(ref mut val) => {
16125 fidl::encoding::encode_in_envelope::<
16126 DirEntry,
16127 fidl::encoding::DefaultFuchsiaResourceDialect,
16128 >(
16129 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
16130 encoder,
16131 offset + 8,
16132 _depth,
16133 )
16134 }
16135 DirEntryRouterRouteResponse::Unavailable(ref val) => {
16136 fidl::encoding::encode_in_envelope::<
16137 Unit,
16138 fidl::encoding::DefaultFuchsiaResourceDialect,
16139 >(
16140 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
16141 encoder,
16142 offset + 8,
16143 _depth,
16144 )
16145 }
16146 }
16147 }
16148 }
16149
16150 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
16151 for DirEntryRouterRouteResponse
16152 {
16153 #[inline(always)]
16154 fn new_empty() -> Self {
16155 Self::DirEntry(fidl::new_empty!(
16156 DirEntry,
16157 fidl::encoding::DefaultFuchsiaResourceDialect
16158 ))
16159 }
16160
16161 #[inline]
16162 unsafe fn decode(
16163 &mut self,
16164 decoder: &mut fidl::encoding::Decoder<
16165 '_,
16166 fidl::encoding::DefaultFuchsiaResourceDialect,
16167 >,
16168 offset: usize,
16169 mut depth: fidl::encoding::Depth,
16170 ) -> fidl::Result<()> {
16171 decoder.debug_check_bounds::<Self>(offset);
16172 #[allow(unused_variables)]
16173 let next_out_of_line = decoder.next_out_of_line();
16174 let handles_before = decoder.remaining_handles();
16175 let (ordinal, inlined, num_bytes, num_handles) =
16176 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16177
16178 let member_inline_size = match ordinal {
16179 1 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16180 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16181 _ => return Err(fidl::Error::UnknownUnionTag),
16182 };
16183
16184 if inlined != (member_inline_size <= 4) {
16185 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16186 }
16187 let _inner_offset;
16188 if inlined {
16189 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16190 _inner_offset = offset + 8;
16191 } else {
16192 depth.increment()?;
16193 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16194 }
16195 match ordinal {
16196 1 => {
16197 #[allow(irrefutable_let_patterns)]
16198 if let DirEntryRouterRouteResponse::DirEntry(_) = self {
16199 } else {
16201 *self = DirEntryRouterRouteResponse::DirEntry(fidl::new_empty!(
16203 DirEntry,
16204 fidl::encoding::DefaultFuchsiaResourceDialect
16205 ));
16206 }
16207 #[allow(irrefutable_let_patterns)]
16208 if let DirEntryRouterRouteResponse::DirEntry(ref mut val) = self {
16209 fidl::decode!(
16210 DirEntry,
16211 fidl::encoding::DefaultFuchsiaResourceDialect,
16212 val,
16213 decoder,
16214 _inner_offset,
16215 depth
16216 )?;
16217 } else {
16218 unreachable!()
16219 }
16220 }
16221 2 => {
16222 #[allow(irrefutable_let_patterns)]
16223 if let DirEntryRouterRouteResponse::Unavailable(_) = self {
16224 } else {
16226 *self = DirEntryRouterRouteResponse::Unavailable(fidl::new_empty!(
16228 Unit,
16229 fidl::encoding::DefaultFuchsiaResourceDialect
16230 ));
16231 }
16232 #[allow(irrefutable_let_patterns)]
16233 if let DirEntryRouterRouteResponse::Unavailable(ref mut val) = self {
16234 fidl::decode!(
16235 Unit,
16236 fidl::encoding::DefaultFuchsiaResourceDialect,
16237 val,
16238 decoder,
16239 _inner_offset,
16240 depth
16241 )?;
16242 } else {
16243 unreachable!()
16244 }
16245 }
16246 ordinal => panic!("unexpected ordinal {:?}", ordinal),
16247 }
16248 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
16249 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16250 }
16251 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16252 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16253 }
16254 Ok(())
16255 }
16256 }
16257
16258 impl fidl::encoding::ResourceTypeMarker for DirectoryRouterRouteResponse {
16259 type Borrowed<'a> = &'a mut Self;
16260 fn take_or_borrow<'a>(
16261 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
16262 ) -> Self::Borrowed<'a> {
16263 value
16264 }
16265 }
16266
16267 unsafe impl fidl::encoding::TypeMarker for DirectoryRouterRouteResponse {
16268 type Owned = Self;
16269
16270 #[inline(always)]
16271 fn inline_align(_context: fidl::encoding::Context) -> usize {
16272 8
16273 }
16274
16275 #[inline(always)]
16276 fn inline_size(_context: fidl::encoding::Context) -> usize {
16277 16
16278 }
16279 }
16280
16281 unsafe impl
16282 fidl::encoding::Encode<
16283 DirectoryRouterRouteResponse,
16284 fidl::encoding::DefaultFuchsiaResourceDialect,
16285 > for &mut DirectoryRouterRouteResponse
16286 {
16287 #[inline]
16288 unsafe fn encode(
16289 self,
16290 encoder: &mut fidl::encoding::Encoder<
16291 '_,
16292 fidl::encoding::DefaultFuchsiaResourceDialect,
16293 >,
16294 offset: usize,
16295 _depth: fidl::encoding::Depth,
16296 ) -> fidl::Result<()> {
16297 encoder.debug_check_bounds::<DirectoryRouterRouteResponse>(offset);
16298 encoder.write_num::<u64>(self.ordinal(), offset);
16299 match self {
16300 DirectoryRouterRouteResponse::Directory(ref mut val) => {
16301 fidl::encoding::encode_in_envelope::<
16302 fidl::encoding::Endpoint<
16303 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16304 >,
16305 fidl::encoding::DefaultFuchsiaResourceDialect,
16306 >(
16307 <fidl::encoding::Endpoint<
16308 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16309 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
16310 val
16311 ),
16312 encoder,
16313 offset + 8,
16314 _depth,
16315 )
16316 }
16317 DirectoryRouterRouteResponse::Unavailable(ref val) => {
16318 fidl::encoding::encode_in_envelope::<
16319 Unit,
16320 fidl::encoding::DefaultFuchsiaResourceDialect,
16321 >(
16322 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
16323 encoder,
16324 offset + 8,
16325 _depth,
16326 )
16327 }
16328 }
16329 }
16330 }
16331
16332 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
16333 for DirectoryRouterRouteResponse
16334 {
16335 #[inline(always)]
16336 fn new_empty() -> Self {
16337 Self::Directory(fidl::new_empty!(
16338 fidl::encoding::Endpoint<
16339 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16340 >,
16341 fidl::encoding::DefaultFuchsiaResourceDialect
16342 ))
16343 }
16344
16345 #[inline]
16346 unsafe fn decode(
16347 &mut self,
16348 decoder: &mut fidl::encoding::Decoder<
16349 '_,
16350 fidl::encoding::DefaultFuchsiaResourceDialect,
16351 >,
16352 offset: usize,
16353 mut depth: fidl::encoding::Depth,
16354 ) -> fidl::Result<()> {
16355 decoder.debug_check_bounds::<Self>(offset);
16356 #[allow(unused_variables)]
16357 let next_out_of_line = decoder.next_out_of_line();
16358 let handles_before = decoder.remaining_handles();
16359 let (ordinal, inlined, num_bytes, num_handles) =
16360 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16361
16362 let member_inline_size = match ordinal {
16363 1 => <fidl::encoding::Endpoint<
16364 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16365 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16366 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16367 _ => return Err(fidl::Error::UnknownUnionTag),
16368 };
16369
16370 if inlined != (member_inline_size <= 4) {
16371 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16372 }
16373 let _inner_offset;
16374 if inlined {
16375 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16376 _inner_offset = offset + 8;
16377 } else {
16378 depth.increment()?;
16379 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16380 }
16381 match ordinal {
16382 1 => {
16383 #[allow(irrefutable_let_patterns)]
16384 if let DirectoryRouterRouteResponse::Directory(_) = self {
16385 } else {
16387 *self = DirectoryRouterRouteResponse::Directory(fidl::new_empty!(
16389 fidl::encoding::Endpoint<
16390 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16391 >,
16392 fidl::encoding::DefaultFuchsiaResourceDialect
16393 ));
16394 }
16395 #[allow(irrefutable_let_patterns)]
16396 if let DirectoryRouterRouteResponse::Directory(ref mut val) = self {
16397 fidl::decode!(
16398 fidl::encoding::Endpoint<
16399 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16400 >,
16401 fidl::encoding::DefaultFuchsiaResourceDialect,
16402 val,
16403 decoder,
16404 _inner_offset,
16405 depth
16406 )?;
16407 } else {
16408 unreachable!()
16409 }
16410 }
16411 2 => {
16412 #[allow(irrefutable_let_patterns)]
16413 if let DirectoryRouterRouteResponse::Unavailable(_) = self {
16414 } else {
16416 *self = DirectoryRouterRouteResponse::Unavailable(fidl::new_empty!(
16418 Unit,
16419 fidl::encoding::DefaultFuchsiaResourceDialect
16420 ));
16421 }
16422 #[allow(irrefutable_let_patterns)]
16423 if let DirectoryRouterRouteResponse::Unavailable(ref mut val) = self {
16424 fidl::decode!(
16425 Unit,
16426 fidl::encoding::DefaultFuchsiaResourceDialect,
16427 val,
16428 decoder,
16429 _inner_offset,
16430 depth
16431 )?;
16432 } else {
16433 unreachable!()
16434 }
16435 }
16436 ordinal => panic!("unexpected ordinal {:?}", ordinal),
16437 }
16438 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
16439 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16440 }
16441 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16442 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16443 }
16444 Ok(())
16445 }
16446 }
16447}