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 let protocol_name = <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
682 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
683 }
684
685 pub fn into_channel(self) -> fidl::Channel {
686 self.client.into_channel()
687 }
688
689 pub fn wait_for_event(
692 &self,
693 deadline: zx::MonotonicInstant,
694 ) -> Result<CapabilityStoreEvent, fidl::Error> {
695 CapabilityStoreEvent::decode(self.client.wait_for_event(deadline)?)
696 }
697
698 pub fn r#duplicate(
706 &self,
707 mut id: u64,
708 mut dest_id: u64,
709 ___deadline: zx::MonotonicInstant,
710 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
711 let _response =
712 self.client
713 .send_query::<CapabilityStoreDuplicateRequest, fidl::encoding::FlexibleResultType<
714 fidl::encoding::EmptyStruct,
715 CapabilityStoreError,
716 >>(
717 (id, dest_id),
718 0x5d5d35d9c20a2184,
719 fidl::encoding::DynamicFlags::FLEXIBLE,
720 ___deadline,
721 )?
722 .into_result::<CapabilityStoreMarker>("duplicate")?;
723 Ok(_response.map(|x| x))
724 }
725
726 pub fn r#drop(
732 &self,
733 mut id: u64,
734 ___deadline: zx::MonotonicInstant,
735 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
736 let _response =
737 self.client
738 .send_query::<CapabilityStoreDropRequest, fidl::encoding::FlexibleResultType<
739 fidl::encoding::EmptyStruct,
740 CapabilityStoreError,
741 >>(
742 (id,), 0xa745c0990fc2559, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
743 )?
744 .into_result::<CapabilityStoreMarker>("drop")?;
745 Ok(_response.map(|x| x))
746 }
747
748 pub fn r#export(
756 &self,
757 mut id: u64,
758 ___deadline: zx::MonotonicInstant,
759 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
760 let _response =
761 self.client
762 .send_query::<CapabilityStoreExportRequest, fidl::encoding::FlexibleResultType<
763 CapabilityStoreExportResponse,
764 CapabilityStoreError,
765 >>(
766 (id,), 0x3237a8f4748faff, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
767 )?
768 .into_result::<CapabilityStoreMarker>("export")?;
769 Ok(_response.map(|x| x.capability))
770 }
771
772 pub fn r#import(
779 &self,
780 mut id: u64,
781 mut capability: Capability,
782 ___deadline: zx::MonotonicInstant,
783 ) -> Result<CapabilityStoreImportResult, fidl::Error> {
784 let _response =
785 self.client
786 .send_query::<CapabilityStoreImportRequest, fidl::encoding::FlexibleResultType<
787 fidl::encoding::EmptyStruct,
788 CapabilityStoreError,
789 >>(
790 (id, &mut capability),
791 0x1f96157a29f4539b,
792 fidl::encoding::DynamicFlags::FLEXIBLE,
793 ___deadline,
794 )?
795 .into_result::<CapabilityStoreMarker>("import")?;
796 Ok(_response.map(|x| x))
797 }
798
799 pub fn r#connector_create(
806 &self,
807 mut id: u64,
808 mut receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
809 ___deadline: zx::MonotonicInstant,
810 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
811 let _response = self.client.send_query::<
812 CapabilityStoreConnectorCreateRequest,
813 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
814 >(
815 (id, receiver,),
816 0x29592c5d63e91c25,
817 fidl::encoding::DynamicFlags::FLEXIBLE,
818 ___deadline,
819 )?
820 .into_result::<CapabilityStoreMarker>("connector_create")?;
821 Ok(_response.map(|x| x))
822 }
823
824 pub fn r#connector_open(
834 &self,
835 mut id: u64,
836 mut server_end: fidl::Channel,
837 ___deadline: zx::MonotonicInstant,
838 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
839 let _response = self.client.send_query::<
840 CapabilityStoreConnectorOpenRequest,
841 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
842 >(
843 (id, server_end,),
844 0x537e69ab40563b9f,
845 fidl::encoding::DynamicFlags::FLEXIBLE,
846 ___deadline,
847 )?
848 .into_result::<CapabilityStoreMarker>("connector_open")?;
849 Ok(_response.map(|x| x))
850 }
851
852 pub fn r#dir_connector_create(
859 &self,
860 mut id: u64,
861 mut receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
862 ___deadline: zx::MonotonicInstant,
863 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
864 let _response = self.client.send_query::<
865 CapabilityStoreDirConnectorCreateRequest,
866 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
867 >(
868 (id, receiver,),
869 0x186138a11ccf19bb,
870 fidl::encoding::DynamicFlags::FLEXIBLE,
871 ___deadline,
872 )?
873 .into_result::<CapabilityStoreMarker>("dir_connector_create")?;
874 Ok(_response.map(|x| x))
875 }
876
877 pub fn r#dir_connector_open(
891 &self,
892 mut payload: CapabilityStoreDirConnectorOpenRequest,
893 ___deadline: zx::MonotonicInstant,
894 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
895 let _response = self.client.send_query::<
896 CapabilityStoreDirConnectorOpenRequest,
897 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
898 >(
899 &mut payload,
900 0x5650d3d6a3a13901,
901 fidl::encoding::DynamicFlags::FLEXIBLE,
902 ___deadline,
903 )?
904 .into_result::<CapabilityStoreMarker>("dir_connector_open")?;
905 Ok(_response.map(|x| x))
906 }
907
908 pub fn r#dictionary_create(
914 &self,
915 mut id: u64,
916 ___deadline: zx::MonotonicInstant,
917 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
918 let _response = self.client.send_query::<
919 CapabilityStoreDictionaryCreateRequest,
920 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
921 >(
922 (id,),
923 0x6997c8dfc63de093,
924 fidl::encoding::DynamicFlags::FLEXIBLE,
925 ___deadline,
926 )?
927 .into_result::<CapabilityStoreMarker>("dictionary_create")?;
928 Ok(_response.map(|x| x))
929 }
930
931 pub fn r#dictionary_legacy_import(
941 &self,
942 mut id: u64,
943 mut client_end: fidl::Channel,
944 ___deadline: zx::MonotonicInstant,
945 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
946 let _response = self.client.send_query::<
947 CapabilityStoreDictionaryLegacyImportRequest,
948 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
949 >(
950 (id, client_end,),
951 0x72fd686c37b6025f,
952 fidl::encoding::DynamicFlags::FLEXIBLE,
953 ___deadline,
954 )?
955 .into_result::<CapabilityStoreMarker>("dictionary_legacy_import")?;
956 Ok(_response.map(|x| x))
957 }
958
959 pub fn r#dictionary_legacy_export(
969 &self,
970 mut id: u64,
971 mut server_end: fidl::Channel,
972 ___deadline: zx::MonotonicInstant,
973 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
974 let _response = self.client.send_query::<
975 CapabilityStoreDictionaryLegacyExportRequest,
976 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
977 >(
978 (id, server_end,),
979 0x407e15cc4bde5dcd,
980 fidl::encoding::DynamicFlags::FLEXIBLE,
981 ___deadline,
982 )?
983 .into_result::<CapabilityStoreMarker>("dictionary_legacy_export")?;
984 Ok(_response.map(|x| x))
985 }
986
987 pub fn r#dictionary_insert(
997 &self,
998 mut id: u64,
999 mut item: &DictionaryItem,
1000 ___deadline: zx::MonotonicInstant,
1001 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
1002 let _response = self.client.send_query::<
1003 CapabilityStoreDictionaryInsertRequest,
1004 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1005 >(
1006 (id, item,),
1007 0x7702183689d44c27,
1008 fidl::encoding::DynamicFlags::FLEXIBLE,
1009 ___deadline,
1010 )?
1011 .into_result::<CapabilityStoreMarker>("dictionary_insert")?;
1012 Ok(_response.map(|x| x))
1013 }
1014
1015 pub fn r#dictionary_get(
1027 &self,
1028 mut id: u64,
1029 mut key: &str,
1030 mut dest_id: u64,
1031 ___deadline: zx::MonotonicInstant,
1032 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
1033 let _response = self.client.send_query::<
1034 CapabilityStoreDictionaryGetRequest,
1035 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1036 >(
1037 (id, key, dest_id,),
1038 0x4d9e27538284add2,
1039 fidl::encoding::DynamicFlags::FLEXIBLE,
1040 ___deadline,
1041 )?
1042 .into_result::<CapabilityStoreMarker>("dictionary_get")?;
1043 Ok(_response.map(|x| x))
1044 }
1045
1046 pub fn r#dictionary_remove(
1057 &self,
1058 mut id: u64,
1059 mut key: &str,
1060 mut dest_id: Option<&WrappedCapabilityId>,
1061 ___deadline: zx::MonotonicInstant,
1062 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
1063 let _response = self.client.send_query::<
1064 CapabilityStoreDictionaryRemoveRequest,
1065 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1066 >(
1067 (id, key, dest_id,),
1068 0x4c5c025ab05d4f3,
1069 fidl::encoding::DynamicFlags::FLEXIBLE,
1070 ___deadline,
1071 )?
1072 .into_result::<CapabilityStoreMarker>("dictionary_remove")?;
1073 Ok(_response.map(|x| x))
1074 }
1075
1076 pub fn r#dictionary_copy(
1092 &self,
1093 mut id: u64,
1094 mut dest_id: u64,
1095 ___deadline: zx::MonotonicInstant,
1096 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
1097 let _response = self.client.send_query::<
1098 CapabilityStoreDictionaryCopyRequest,
1099 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1100 >(
1101 (id, dest_id,),
1102 0x3733ecdf4ea1b44f,
1103 fidl::encoding::DynamicFlags::FLEXIBLE,
1104 ___deadline,
1105 )?
1106 .into_result::<CapabilityStoreMarker>("dictionary_copy")?;
1107 Ok(_response.map(|x| x))
1108 }
1109
1110 pub fn r#dictionary_keys(
1117 &self,
1118 mut id: u64,
1119 mut iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
1120 ___deadline: zx::MonotonicInstant,
1121 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
1122 let _response = self.client.send_query::<
1123 CapabilityStoreDictionaryKeysRequest,
1124 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1125 >(
1126 (id, iterator,),
1127 0x84b05577ceaec9e,
1128 fidl::encoding::DynamicFlags::FLEXIBLE,
1129 ___deadline,
1130 )?
1131 .into_result::<CapabilityStoreMarker>("dictionary_keys")?;
1132 Ok(_response.map(|x| x))
1133 }
1134
1135 pub fn r#dictionary_enumerate(
1145 &self,
1146 mut id: u64,
1147 mut iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
1148 ___deadline: zx::MonotonicInstant,
1149 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
1150 let _response = self.client.send_query::<
1151 CapabilityStoreDictionaryEnumerateRequest,
1152 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1153 >(
1154 (id, iterator,),
1155 0xd6279b6ced04641,
1156 fidl::encoding::DynamicFlags::FLEXIBLE,
1157 ___deadline,
1158 )?
1159 .into_result::<CapabilityStoreMarker>("dictionary_enumerate")?;
1160 Ok(_response.map(|x| x))
1161 }
1162
1163 pub fn r#dictionary_drain(
1171 &self,
1172 mut id: u64,
1173 mut iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
1174 ___deadline: zx::MonotonicInstant,
1175 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
1176 let _response = self.client.send_query::<
1177 CapabilityStoreDictionaryDrainRequest,
1178 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, CapabilityStoreError>,
1179 >(
1180 (id, iterator,),
1181 0x28a3a3f84d928cd8,
1182 fidl::encoding::DynamicFlags::FLEXIBLE,
1183 ___deadline,
1184 )?
1185 .into_result::<CapabilityStoreMarker>("dictionary_drain")?;
1186 Ok(_response.map(|x| x))
1187 }
1188
1189 pub fn r#create_service_aggregate(
1192 &self,
1193 mut sources: Vec<AggregateSource>,
1194 ___deadline: zx::MonotonicInstant,
1195 ) -> Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error> {
1196 let _response = self.client.send_query::<
1197 CapabilityStoreCreateServiceAggregateRequest,
1198 fidl::encoding::FlexibleResultType<CapabilityStoreCreateServiceAggregateResponse, CapabilityStoreError>,
1199 >(
1200 (sources.as_mut(),),
1201 0x4584116c8085885a,
1202 fidl::encoding::DynamicFlags::FLEXIBLE,
1203 ___deadline,
1204 )?
1205 .into_result::<CapabilityStoreMarker>("create_service_aggregate")?;
1206 Ok(_response.map(|x| x.aggregate_dir_connector))
1207 }
1208}
1209
1210#[cfg(target_os = "fuchsia")]
1211impl From<CapabilityStoreSynchronousProxy> for zx::NullableHandle {
1212 fn from(value: CapabilityStoreSynchronousProxy) -> Self {
1213 value.into_channel().into()
1214 }
1215}
1216
1217#[cfg(target_os = "fuchsia")]
1218impl From<fidl::Channel> for CapabilityStoreSynchronousProxy {
1219 fn from(value: fidl::Channel) -> Self {
1220 Self::new(value)
1221 }
1222}
1223
1224#[cfg(target_os = "fuchsia")]
1225impl fidl::endpoints::FromClient for CapabilityStoreSynchronousProxy {
1226 type Protocol = CapabilityStoreMarker;
1227
1228 fn from_client(value: fidl::endpoints::ClientEnd<CapabilityStoreMarker>) -> Self {
1229 Self::new(value.into_channel())
1230 }
1231}
1232
1233#[derive(Debug, Clone)]
1234pub struct CapabilityStoreProxy {
1235 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1236}
1237
1238impl fidl::endpoints::Proxy for CapabilityStoreProxy {
1239 type Protocol = CapabilityStoreMarker;
1240
1241 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1242 Self::new(inner)
1243 }
1244
1245 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1246 self.client.into_channel().map_err(|client| Self { client })
1247 }
1248
1249 fn as_channel(&self) -> &::fidl::AsyncChannel {
1250 self.client.as_channel()
1251 }
1252}
1253
1254impl CapabilityStoreProxy {
1255 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1257 let protocol_name = <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1258 Self { client: fidl::client::Client::new(channel, protocol_name) }
1259 }
1260
1261 pub fn take_event_stream(&self) -> CapabilityStoreEventStream {
1267 CapabilityStoreEventStream { event_receiver: self.client.take_event_receiver() }
1268 }
1269
1270 pub fn r#duplicate(
1278 &self,
1279 mut id: u64,
1280 mut dest_id: u64,
1281 ) -> fidl::client::QueryResponseFut<
1282 CapabilityStoreDuplicateResult,
1283 fidl::encoding::DefaultFuchsiaResourceDialect,
1284 > {
1285 CapabilityStoreProxyInterface::r#duplicate(self, id, dest_id)
1286 }
1287
1288 pub fn r#drop(
1294 &self,
1295 mut id: u64,
1296 ) -> fidl::client::QueryResponseFut<
1297 CapabilityStoreDropResult,
1298 fidl::encoding::DefaultFuchsiaResourceDialect,
1299 > {
1300 CapabilityStoreProxyInterface::r#drop(self, id)
1301 }
1302
1303 pub fn r#export(
1311 &self,
1312 mut id: u64,
1313 ) -> fidl::client::QueryResponseFut<
1314 CapabilityStoreExportResult,
1315 fidl::encoding::DefaultFuchsiaResourceDialect,
1316 > {
1317 CapabilityStoreProxyInterface::r#export(self, id)
1318 }
1319
1320 pub fn r#import(
1327 &self,
1328 mut id: u64,
1329 mut capability: Capability,
1330 ) -> fidl::client::QueryResponseFut<
1331 CapabilityStoreImportResult,
1332 fidl::encoding::DefaultFuchsiaResourceDialect,
1333 > {
1334 CapabilityStoreProxyInterface::r#import(self, id, capability)
1335 }
1336
1337 pub fn r#connector_create(
1344 &self,
1345 mut id: u64,
1346 mut receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
1347 ) -> fidl::client::QueryResponseFut<
1348 CapabilityStoreConnectorCreateResult,
1349 fidl::encoding::DefaultFuchsiaResourceDialect,
1350 > {
1351 CapabilityStoreProxyInterface::r#connector_create(self, id, receiver)
1352 }
1353
1354 pub fn r#connector_open(
1364 &self,
1365 mut id: u64,
1366 mut server_end: fidl::Channel,
1367 ) -> fidl::client::QueryResponseFut<
1368 CapabilityStoreConnectorOpenResult,
1369 fidl::encoding::DefaultFuchsiaResourceDialect,
1370 > {
1371 CapabilityStoreProxyInterface::r#connector_open(self, id, server_end)
1372 }
1373
1374 pub fn r#dir_connector_create(
1381 &self,
1382 mut id: u64,
1383 mut receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
1384 ) -> fidl::client::QueryResponseFut<
1385 CapabilityStoreDirConnectorCreateResult,
1386 fidl::encoding::DefaultFuchsiaResourceDialect,
1387 > {
1388 CapabilityStoreProxyInterface::r#dir_connector_create(self, id, receiver)
1389 }
1390
1391 pub fn r#dir_connector_open(
1405 &self,
1406 mut payload: CapabilityStoreDirConnectorOpenRequest,
1407 ) -> fidl::client::QueryResponseFut<
1408 CapabilityStoreDirConnectorOpenResult,
1409 fidl::encoding::DefaultFuchsiaResourceDialect,
1410 > {
1411 CapabilityStoreProxyInterface::r#dir_connector_open(self, payload)
1412 }
1413
1414 pub fn r#dictionary_create(
1420 &self,
1421 mut id: u64,
1422 ) -> fidl::client::QueryResponseFut<
1423 CapabilityStoreDictionaryCreateResult,
1424 fidl::encoding::DefaultFuchsiaResourceDialect,
1425 > {
1426 CapabilityStoreProxyInterface::r#dictionary_create(self, id)
1427 }
1428
1429 pub fn r#dictionary_legacy_import(
1439 &self,
1440 mut id: u64,
1441 mut client_end: fidl::Channel,
1442 ) -> fidl::client::QueryResponseFut<
1443 CapabilityStoreDictionaryLegacyImportResult,
1444 fidl::encoding::DefaultFuchsiaResourceDialect,
1445 > {
1446 CapabilityStoreProxyInterface::r#dictionary_legacy_import(self, id, client_end)
1447 }
1448
1449 pub fn r#dictionary_legacy_export(
1459 &self,
1460 mut id: u64,
1461 mut server_end: fidl::Channel,
1462 ) -> fidl::client::QueryResponseFut<
1463 CapabilityStoreDictionaryLegacyExportResult,
1464 fidl::encoding::DefaultFuchsiaResourceDialect,
1465 > {
1466 CapabilityStoreProxyInterface::r#dictionary_legacy_export(self, id, server_end)
1467 }
1468
1469 pub fn r#dictionary_insert(
1479 &self,
1480 mut id: u64,
1481 mut item: &DictionaryItem,
1482 ) -> fidl::client::QueryResponseFut<
1483 CapabilityStoreDictionaryInsertResult,
1484 fidl::encoding::DefaultFuchsiaResourceDialect,
1485 > {
1486 CapabilityStoreProxyInterface::r#dictionary_insert(self, id, item)
1487 }
1488
1489 pub fn r#dictionary_get(
1501 &self,
1502 mut id: u64,
1503 mut key: &str,
1504 mut dest_id: u64,
1505 ) -> fidl::client::QueryResponseFut<
1506 CapabilityStoreDictionaryGetResult,
1507 fidl::encoding::DefaultFuchsiaResourceDialect,
1508 > {
1509 CapabilityStoreProxyInterface::r#dictionary_get(self, id, key, dest_id)
1510 }
1511
1512 pub fn r#dictionary_remove(
1523 &self,
1524 mut id: u64,
1525 mut key: &str,
1526 mut dest_id: Option<&WrappedCapabilityId>,
1527 ) -> fidl::client::QueryResponseFut<
1528 CapabilityStoreDictionaryRemoveResult,
1529 fidl::encoding::DefaultFuchsiaResourceDialect,
1530 > {
1531 CapabilityStoreProxyInterface::r#dictionary_remove(self, id, key, dest_id)
1532 }
1533
1534 pub fn r#dictionary_copy(
1550 &self,
1551 mut id: u64,
1552 mut dest_id: u64,
1553 ) -> fidl::client::QueryResponseFut<
1554 CapabilityStoreDictionaryCopyResult,
1555 fidl::encoding::DefaultFuchsiaResourceDialect,
1556 > {
1557 CapabilityStoreProxyInterface::r#dictionary_copy(self, id, dest_id)
1558 }
1559
1560 pub fn r#dictionary_keys(
1567 &self,
1568 mut id: u64,
1569 mut iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
1570 ) -> fidl::client::QueryResponseFut<
1571 CapabilityStoreDictionaryKeysResult,
1572 fidl::encoding::DefaultFuchsiaResourceDialect,
1573 > {
1574 CapabilityStoreProxyInterface::r#dictionary_keys(self, id, iterator)
1575 }
1576
1577 pub fn r#dictionary_enumerate(
1587 &self,
1588 mut id: u64,
1589 mut iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
1590 ) -> fidl::client::QueryResponseFut<
1591 CapabilityStoreDictionaryEnumerateResult,
1592 fidl::encoding::DefaultFuchsiaResourceDialect,
1593 > {
1594 CapabilityStoreProxyInterface::r#dictionary_enumerate(self, id, iterator)
1595 }
1596
1597 pub fn r#dictionary_drain(
1605 &self,
1606 mut id: u64,
1607 mut iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
1608 ) -> fidl::client::QueryResponseFut<
1609 CapabilityStoreDictionaryDrainResult,
1610 fidl::encoding::DefaultFuchsiaResourceDialect,
1611 > {
1612 CapabilityStoreProxyInterface::r#dictionary_drain(self, id, iterator)
1613 }
1614
1615 pub fn r#create_service_aggregate(
1618 &self,
1619 mut sources: Vec<AggregateSource>,
1620 ) -> fidl::client::QueryResponseFut<
1621 CapabilityStoreCreateServiceAggregateResult,
1622 fidl::encoding::DefaultFuchsiaResourceDialect,
1623 > {
1624 CapabilityStoreProxyInterface::r#create_service_aggregate(self, sources)
1625 }
1626}
1627
1628impl CapabilityStoreProxyInterface for CapabilityStoreProxy {
1629 type DuplicateResponseFut = fidl::client::QueryResponseFut<
1630 CapabilityStoreDuplicateResult,
1631 fidl::encoding::DefaultFuchsiaResourceDialect,
1632 >;
1633 fn r#duplicate(&self, mut id: u64, mut dest_id: u64) -> Self::DuplicateResponseFut {
1634 fn _decode(
1635 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1636 ) -> Result<CapabilityStoreDuplicateResult, fidl::Error> {
1637 let _response = fidl::client::decode_transaction_body::<
1638 fidl::encoding::FlexibleResultType<
1639 fidl::encoding::EmptyStruct,
1640 CapabilityStoreError,
1641 >,
1642 fidl::encoding::DefaultFuchsiaResourceDialect,
1643 0x5d5d35d9c20a2184,
1644 >(_buf?)?
1645 .into_result::<CapabilityStoreMarker>("duplicate")?;
1646 Ok(_response.map(|x| x))
1647 }
1648 self.client.send_query_and_decode::<
1649 CapabilityStoreDuplicateRequest,
1650 CapabilityStoreDuplicateResult,
1651 >(
1652 (id, dest_id,),
1653 0x5d5d35d9c20a2184,
1654 fidl::encoding::DynamicFlags::FLEXIBLE,
1655 _decode,
1656 )
1657 }
1658
1659 type DropResponseFut = fidl::client::QueryResponseFut<
1660 CapabilityStoreDropResult,
1661 fidl::encoding::DefaultFuchsiaResourceDialect,
1662 >;
1663 fn r#drop(&self, mut id: u64) -> Self::DropResponseFut {
1664 fn _decode(
1665 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1666 ) -> Result<CapabilityStoreDropResult, fidl::Error> {
1667 let _response = fidl::client::decode_transaction_body::<
1668 fidl::encoding::FlexibleResultType<
1669 fidl::encoding::EmptyStruct,
1670 CapabilityStoreError,
1671 >,
1672 fidl::encoding::DefaultFuchsiaResourceDialect,
1673 0xa745c0990fc2559,
1674 >(_buf?)?
1675 .into_result::<CapabilityStoreMarker>("drop")?;
1676 Ok(_response.map(|x| x))
1677 }
1678 self.client.send_query_and_decode::<CapabilityStoreDropRequest, CapabilityStoreDropResult>(
1679 (id,),
1680 0xa745c0990fc2559,
1681 fidl::encoding::DynamicFlags::FLEXIBLE,
1682 _decode,
1683 )
1684 }
1685
1686 type ExportResponseFut = fidl::client::QueryResponseFut<
1687 CapabilityStoreExportResult,
1688 fidl::encoding::DefaultFuchsiaResourceDialect,
1689 >;
1690 fn r#export(&self, mut id: u64) -> Self::ExportResponseFut {
1691 fn _decode(
1692 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1693 ) -> Result<CapabilityStoreExportResult, fidl::Error> {
1694 let _response = fidl::client::decode_transaction_body::<
1695 fidl::encoding::FlexibleResultType<
1696 CapabilityStoreExportResponse,
1697 CapabilityStoreError,
1698 >,
1699 fidl::encoding::DefaultFuchsiaResourceDialect,
1700 0x3237a8f4748faff,
1701 >(_buf?)?
1702 .into_result::<CapabilityStoreMarker>("export")?;
1703 Ok(_response.map(|x| x.capability))
1704 }
1705 self.client
1706 .send_query_and_decode::<CapabilityStoreExportRequest, CapabilityStoreExportResult>(
1707 (id,),
1708 0x3237a8f4748faff,
1709 fidl::encoding::DynamicFlags::FLEXIBLE,
1710 _decode,
1711 )
1712 }
1713
1714 type ImportResponseFut = fidl::client::QueryResponseFut<
1715 CapabilityStoreImportResult,
1716 fidl::encoding::DefaultFuchsiaResourceDialect,
1717 >;
1718 fn r#import(&self, mut id: u64, mut capability: Capability) -> Self::ImportResponseFut {
1719 fn _decode(
1720 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1721 ) -> Result<CapabilityStoreImportResult, fidl::Error> {
1722 let _response = fidl::client::decode_transaction_body::<
1723 fidl::encoding::FlexibleResultType<
1724 fidl::encoding::EmptyStruct,
1725 CapabilityStoreError,
1726 >,
1727 fidl::encoding::DefaultFuchsiaResourceDialect,
1728 0x1f96157a29f4539b,
1729 >(_buf?)?
1730 .into_result::<CapabilityStoreMarker>("import")?;
1731 Ok(_response.map(|x| x))
1732 }
1733 self.client
1734 .send_query_and_decode::<CapabilityStoreImportRequest, CapabilityStoreImportResult>(
1735 (id, &mut capability),
1736 0x1f96157a29f4539b,
1737 fidl::encoding::DynamicFlags::FLEXIBLE,
1738 _decode,
1739 )
1740 }
1741
1742 type ConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1743 CapabilityStoreConnectorCreateResult,
1744 fidl::encoding::DefaultFuchsiaResourceDialect,
1745 >;
1746 fn r#connector_create(
1747 &self,
1748 mut id: u64,
1749 mut receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
1750 ) -> Self::ConnectorCreateResponseFut {
1751 fn _decode(
1752 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1753 ) -> Result<CapabilityStoreConnectorCreateResult, fidl::Error> {
1754 let _response = fidl::client::decode_transaction_body::<
1755 fidl::encoding::FlexibleResultType<
1756 fidl::encoding::EmptyStruct,
1757 CapabilityStoreError,
1758 >,
1759 fidl::encoding::DefaultFuchsiaResourceDialect,
1760 0x29592c5d63e91c25,
1761 >(_buf?)?
1762 .into_result::<CapabilityStoreMarker>("connector_create")?;
1763 Ok(_response.map(|x| x))
1764 }
1765 self.client.send_query_and_decode::<
1766 CapabilityStoreConnectorCreateRequest,
1767 CapabilityStoreConnectorCreateResult,
1768 >(
1769 (id, receiver,),
1770 0x29592c5d63e91c25,
1771 fidl::encoding::DynamicFlags::FLEXIBLE,
1772 _decode,
1773 )
1774 }
1775
1776 type ConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1777 CapabilityStoreConnectorOpenResult,
1778 fidl::encoding::DefaultFuchsiaResourceDialect,
1779 >;
1780 fn r#connector_open(
1781 &self,
1782 mut id: u64,
1783 mut server_end: fidl::Channel,
1784 ) -> Self::ConnectorOpenResponseFut {
1785 fn _decode(
1786 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1787 ) -> Result<CapabilityStoreConnectorOpenResult, fidl::Error> {
1788 let _response = fidl::client::decode_transaction_body::<
1789 fidl::encoding::FlexibleResultType<
1790 fidl::encoding::EmptyStruct,
1791 CapabilityStoreError,
1792 >,
1793 fidl::encoding::DefaultFuchsiaResourceDialect,
1794 0x537e69ab40563b9f,
1795 >(_buf?)?
1796 .into_result::<CapabilityStoreMarker>("connector_open")?;
1797 Ok(_response.map(|x| x))
1798 }
1799 self.client.send_query_and_decode::<
1800 CapabilityStoreConnectorOpenRequest,
1801 CapabilityStoreConnectorOpenResult,
1802 >(
1803 (id, server_end,),
1804 0x537e69ab40563b9f,
1805 fidl::encoding::DynamicFlags::FLEXIBLE,
1806 _decode,
1807 )
1808 }
1809
1810 type DirConnectorCreateResponseFut = fidl::client::QueryResponseFut<
1811 CapabilityStoreDirConnectorCreateResult,
1812 fidl::encoding::DefaultFuchsiaResourceDialect,
1813 >;
1814 fn r#dir_connector_create(
1815 &self,
1816 mut id: u64,
1817 mut receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
1818 ) -> Self::DirConnectorCreateResponseFut {
1819 fn _decode(
1820 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1821 ) -> Result<CapabilityStoreDirConnectorCreateResult, fidl::Error> {
1822 let _response = fidl::client::decode_transaction_body::<
1823 fidl::encoding::FlexibleResultType<
1824 fidl::encoding::EmptyStruct,
1825 CapabilityStoreError,
1826 >,
1827 fidl::encoding::DefaultFuchsiaResourceDialect,
1828 0x186138a11ccf19bb,
1829 >(_buf?)?
1830 .into_result::<CapabilityStoreMarker>("dir_connector_create")?;
1831 Ok(_response.map(|x| x))
1832 }
1833 self.client.send_query_and_decode::<
1834 CapabilityStoreDirConnectorCreateRequest,
1835 CapabilityStoreDirConnectorCreateResult,
1836 >(
1837 (id, receiver,),
1838 0x186138a11ccf19bb,
1839 fidl::encoding::DynamicFlags::FLEXIBLE,
1840 _decode,
1841 )
1842 }
1843
1844 type DirConnectorOpenResponseFut = fidl::client::QueryResponseFut<
1845 CapabilityStoreDirConnectorOpenResult,
1846 fidl::encoding::DefaultFuchsiaResourceDialect,
1847 >;
1848 fn r#dir_connector_open(
1849 &self,
1850 mut payload: CapabilityStoreDirConnectorOpenRequest,
1851 ) -> Self::DirConnectorOpenResponseFut {
1852 fn _decode(
1853 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1854 ) -> Result<CapabilityStoreDirConnectorOpenResult, fidl::Error> {
1855 let _response = fidl::client::decode_transaction_body::<
1856 fidl::encoding::FlexibleResultType<
1857 fidl::encoding::EmptyStruct,
1858 CapabilityStoreError,
1859 >,
1860 fidl::encoding::DefaultFuchsiaResourceDialect,
1861 0x5650d3d6a3a13901,
1862 >(_buf?)?
1863 .into_result::<CapabilityStoreMarker>("dir_connector_open")?;
1864 Ok(_response.map(|x| x))
1865 }
1866 self.client.send_query_and_decode::<
1867 CapabilityStoreDirConnectorOpenRequest,
1868 CapabilityStoreDirConnectorOpenResult,
1869 >(
1870 &mut payload,
1871 0x5650d3d6a3a13901,
1872 fidl::encoding::DynamicFlags::FLEXIBLE,
1873 _decode,
1874 )
1875 }
1876
1877 type DictionaryCreateResponseFut = fidl::client::QueryResponseFut<
1878 CapabilityStoreDictionaryCreateResult,
1879 fidl::encoding::DefaultFuchsiaResourceDialect,
1880 >;
1881 fn r#dictionary_create(&self, mut id: u64) -> Self::DictionaryCreateResponseFut {
1882 fn _decode(
1883 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1884 ) -> Result<CapabilityStoreDictionaryCreateResult, fidl::Error> {
1885 let _response = fidl::client::decode_transaction_body::<
1886 fidl::encoding::FlexibleResultType<
1887 fidl::encoding::EmptyStruct,
1888 CapabilityStoreError,
1889 >,
1890 fidl::encoding::DefaultFuchsiaResourceDialect,
1891 0x6997c8dfc63de093,
1892 >(_buf?)?
1893 .into_result::<CapabilityStoreMarker>("dictionary_create")?;
1894 Ok(_response.map(|x| x))
1895 }
1896 self.client.send_query_and_decode::<
1897 CapabilityStoreDictionaryCreateRequest,
1898 CapabilityStoreDictionaryCreateResult,
1899 >(
1900 (id,),
1901 0x6997c8dfc63de093,
1902 fidl::encoding::DynamicFlags::FLEXIBLE,
1903 _decode,
1904 )
1905 }
1906
1907 type DictionaryLegacyImportResponseFut = fidl::client::QueryResponseFut<
1908 CapabilityStoreDictionaryLegacyImportResult,
1909 fidl::encoding::DefaultFuchsiaResourceDialect,
1910 >;
1911 fn r#dictionary_legacy_import(
1912 &self,
1913 mut id: u64,
1914 mut client_end: fidl::Channel,
1915 ) -> Self::DictionaryLegacyImportResponseFut {
1916 fn _decode(
1917 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1918 ) -> Result<CapabilityStoreDictionaryLegacyImportResult, fidl::Error> {
1919 let _response = fidl::client::decode_transaction_body::<
1920 fidl::encoding::FlexibleResultType<
1921 fidl::encoding::EmptyStruct,
1922 CapabilityStoreError,
1923 >,
1924 fidl::encoding::DefaultFuchsiaResourceDialect,
1925 0x72fd686c37b6025f,
1926 >(_buf?)?
1927 .into_result::<CapabilityStoreMarker>("dictionary_legacy_import")?;
1928 Ok(_response.map(|x| x))
1929 }
1930 self.client.send_query_and_decode::<
1931 CapabilityStoreDictionaryLegacyImportRequest,
1932 CapabilityStoreDictionaryLegacyImportResult,
1933 >(
1934 (id, client_end,),
1935 0x72fd686c37b6025f,
1936 fidl::encoding::DynamicFlags::FLEXIBLE,
1937 _decode,
1938 )
1939 }
1940
1941 type DictionaryLegacyExportResponseFut = fidl::client::QueryResponseFut<
1942 CapabilityStoreDictionaryLegacyExportResult,
1943 fidl::encoding::DefaultFuchsiaResourceDialect,
1944 >;
1945 fn r#dictionary_legacy_export(
1946 &self,
1947 mut id: u64,
1948 mut server_end: fidl::Channel,
1949 ) -> Self::DictionaryLegacyExportResponseFut {
1950 fn _decode(
1951 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1952 ) -> Result<CapabilityStoreDictionaryLegacyExportResult, fidl::Error> {
1953 let _response = fidl::client::decode_transaction_body::<
1954 fidl::encoding::FlexibleResultType<
1955 fidl::encoding::EmptyStruct,
1956 CapabilityStoreError,
1957 >,
1958 fidl::encoding::DefaultFuchsiaResourceDialect,
1959 0x407e15cc4bde5dcd,
1960 >(_buf?)?
1961 .into_result::<CapabilityStoreMarker>("dictionary_legacy_export")?;
1962 Ok(_response.map(|x| x))
1963 }
1964 self.client.send_query_and_decode::<
1965 CapabilityStoreDictionaryLegacyExportRequest,
1966 CapabilityStoreDictionaryLegacyExportResult,
1967 >(
1968 (id, server_end,),
1969 0x407e15cc4bde5dcd,
1970 fidl::encoding::DynamicFlags::FLEXIBLE,
1971 _decode,
1972 )
1973 }
1974
1975 type DictionaryInsertResponseFut = fidl::client::QueryResponseFut<
1976 CapabilityStoreDictionaryInsertResult,
1977 fidl::encoding::DefaultFuchsiaResourceDialect,
1978 >;
1979 fn r#dictionary_insert(
1980 &self,
1981 mut id: u64,
1982 mut item: &DictionaryItem,
1983 ) -> Self::DictionaryInsertResponseFut {
1984 fn _decode(
1985 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1986 ) -> Result<CapabilityStoreDictionaryInsertResult, fidl::Error> {
1987 let _response = fidl::client::decode_transaction_body::<
1988 fidl::encoding::FlexibleResultType<
1989 fidl::encoding::EmptyStruct,
1990 CapabilityStoreError,
1991 >,
1992 fidl::encoding::DefaultFuchsiaResourceDialect,
1993 0x7702183689d44c27,
1994 >(_buf?)?
1995 .into_result::<CapabilityStoreMarker>("dictionary_insert")?;
1996 Ok(_response.map(|x| x))
1997 }
1998 self.client.send_query_and_decode::<
1999 CapabilityStoreDictionaryInsertRequest,
2000 CapabilityStoreDictionaryInsertResult,
2001 >(
2002 (id, item,),
2003 0x7702183689d44c27,
2004 fidl::encoding::DynamicFlags::FLEXIBLE,
2005 _decode,
2006 )
2007 }
2008
2009 type DictionaryGetResponseFut = fidl::client::QueryResponseFut<
2010 CapabilityStoreDictionaryGetResult,
2011 fidl::encoding::DefaultFuchsiaResourceDialect,
2012 >;
2013 fn r#dictionary_get(
2014 &self,
2015 mut id: u64,
2016 mut key: &str,
2017 mut dest_id: u64,
2018 ) -> Self::DictionaryGetResponseFut {
2019 fn _decode(
2020 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2021 ) -> Result<CapabilityStoreDictionaryGetResult, fidl::Error> {
2022 let _response = fidl::client::decode_transaction_body::<
2023 fidl::encoding::FlexibleResultType<
2024 fidl::encoding::EmptyStruct,
2025 CapabilityStoreError,
2026 >,
2027 fidl::encoding::DefaultFuchsiaResourceDialect,
2028 0x4d9e27538284add2,
2029 >(_buf?)?
2030 .into_result::<CapabilityStoreMarker>("dictionary_get")?;
2031 Ok(_response.map(|x| x))
2032 }
2033 self.client.send_query_and_decode::<
2034 CapabilityStoreDictionaryGetRequest,
2035 CapabilityStoreDictionaryGetResult,
2036 >(
2037 (id, key, dest_id,),
2038 0x4d9e27538284add2,
2039 fidl::encoding::DynamicFlags::FLEXIBLE,
2040 _decode,
2041 )
2042 }
2043
2044 type DictionaryRemoveResponseFut = fidl::client::QueryResponseFut<
2045 CapabilityStoreDictionaryRemoveResult,
2046 fidl::encoding::DefaultFuchsiaResourceDialect,
2047 >;
2048 fn r#dictionary_remove(
2049 &self,
2050 mut id: u64,
2051 mut key: &str,
2052 mut dest_id: Option<&WrappedCapabilityId>,
2053 ) -> Self::DictionaryRemoveResponseFut {
2054 fn _decode(
2055 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2056 ) -> Result<CapabilityStoreDictionaryRemoveResult, fidl::Error> {
2057 let _response = fidl::client::decode_transaction_body::<
2058 fidl::encoding::FlexibleResultType<
2059 fidl::encoding::EmptyStruct,
2060 CapabilityStoreError,
2061 >,
2062 fidl::encoding::DefaultFuchsiaResourceDialect,
2063 0x4c5c025ab05d4f3,
2064 >(_buf?)?
2065 .into_result::<CapabilityStoreMarker>("dictionary_remove")?;
2066 Ok(_response.map(|x| x))
2067 }
2068 self.client.send_query_and_decode::<
2069 CapabilityStoreDictionaryRemoveRequest,
2070 CapabilityStoreDictionaryRemoveResult,
2071 >(
2072 (id, key, dest_id,),
2073 0x4c5c025ab05d4f3,
2074 fidl::encoding::DynamicFlags::FLEXIBLE,
2075 _decode,
2076 )
2077 }
2078
2079 type DictionaryCopyResponseFut = fidl::client::QueryResponseFut<
2080 CapabilityStoreDictionaryCopyResult,
2081 fidl::encoding::DefaultFuchsiaResourceDialect,
2082 >;
2083 fn r#dictionary_copy(&self, mut id: u64, mut dest_id: u64) -> Self::DictionaryCopyResponseFut {
2084 fn _decode(
2085 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2086 ) -> Result<CapabilityStoreDictionaryCopyResult, fidl::Error> {
2087 let _response = fidl::client::decode_transaction_body::<
2088 fidl::encoding::FlexibleResultType<
2089 fidl::encoding::EmptyStruct,
2090 CapabilityStoreError,
2091 >,
2092 fidl::encoding::DefaultFuchsiaResourceDialect,
2093 0x3733ecdf4ea1b44f,
2094 >(_buf?)?
2095 .into_result::<CapabilityStoreMarker>("dictionary_copy")?;
2096 Ok(_response.map(|x| x))
2097 }
2098 self.client.send_query_and_decode::<
2099 CapabilityStoreDictionaryCopyRequest,
2100 CapabilityStoreDictionaryCopyResult,
2101 >(
2102 (id, dest_id,),
2103 0x3733ecdf4ea1b44f,
2104 fidl::encoding::DynamicFlags::FLEXIBLE,
2105 _decode,
2106 )
2107 }
2108
2109 type DictionaryKeysResponseFut = fidl::client::QueryResponseFut<
2110 CapabilityStoreDictionaryKeysResult,
2111 fidl::encoding::DefaultFuchsiaResourceDialect,
2112 >;
2113 fn r#dictionary_keys(
2114 &self,
2115 mut id: u64,
2116 mut iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
2117 ) -> Self::DictionaryKeysResponseFut {
2118 fn _decode(
2119 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2120 ) -> Result<CapabilityStoreDictionaryKeysResult, fidl::Error> {
2121 let _response = fidl::client::decode_transaction_body::<
2122 fidl::encoding::FlexibleResultType<
2123 fidl::encoding::EmptyStruct,
2124 CapabilityStoreError,
2125 >,
2126 fidl::encoding::DefaultFuchsiaResourceDialect,
2127 0x84b05577ceaec9e,
2128 >(_buf?)?
2129 .into_result::<CapabilityStoreMarker>("dictionary_keys")?;
2130 Ok(_response.map(|x| x))
2131 }
2132 self.client.send_query_and_decode::<
2133 CapabilityStoreDictionaryKeysRequest,
2134 CapabilityStoreDictionaryKeysResult,
2135 >(
2136 (id, iterator,),
2137 0x84b05577ceaec9e,
2138 fidl::encoding::DynamicFlags::FLEXIBLE,
2139 _decode,
2140 )
2141 }
2142
2143 type DictionaryEnumerateResponseFut = fidl::client::QueryResponseFut<
2144 CapabilityStoreDictionaryEnumerateResult,
2145 fidl::encoding::DefaultFuchsiaResourceDialect,
2146 >;
2147 fn r#dictionary_enumerate(
2148 &self,
2149 mut id: u64,
2150 mut iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
2151 ) -> Self::DictionaryEnumerateResponseFut {
2152 fn _decode(
2153 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2154 ) -> Result<CapabilityStoreDictionaryEnumerateResult, fidl::Error> {
2155 let _response = fidl::client::decode_transaction_body::<
2156 fidl::encoding::FlexibleResultType<
2157 fidl::encoding::EmptyStruct,
2158 CapabilityStoreError,
2159 >,
2160 fidl::encoding::DefaultFuchsiaResourceDialect,
2161 0xd6279b6ced04641,
2162 >(_buf?)?
2163 .into_result::<CapabilityStoreMarker>("dictionary_enumerate")?;
2164 Ok(_response.map(|x| x))
2165 }
2166 self.client.send_query_and_decode::<
2167 CapabilityStoreDictionaryEnumerateRequest,
2168 CapabilityStoreDictionaryEnumerateResult,
2169 >(
2170 (id, iterator,),
2171 0xd6279b6ced04641,
2172 fidl::encoding::DynamicFlags::FLEXIBLE,
2173 _decode,
2174 )
2175 }
2176
2177 type DictionaryDrainResponseFut = fidl::client::QueryResponseFut<
2178 CapabilityStoreDictionaryDrainResult,
2179 fidl::encoding::DefaultFuchsiaResourceDialect,
2180 >;
2181 fn r#dictionary_drain(
2182 &self,
2183 mut id: u64,
2184 mut iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
2185 ) -> Self::DictionaryDrainResponseFut {
2186 fn _decode(
2187 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2188 ) -> Result<CapabilityStoreDictionaryDrainResult, fidl::Error> {
2189 let _response = fidl::client::decode_transaction_body::<
2190 fidl::encoding::FlexibleResultType<
2191 fidl::encoding::EmptyStruct,
2192 CapabilityStoreError,
2193 >,
2194 fidl::encoding::DefaultFuchsiaResourceDialect,
2195 0x28a3a3f84d928cd8,
2196 >(_buf?)?
2197 .into_result::<CapabilityStoreMarker>("dictionary_drain")?;
2198 Ok(_response.map(|x| x))
2199 }
2200 self.client.send_query_and_decode::<
2201 CapabilityStoreDictionaryDrainRequest,
2202 CapabilityStoreDictionaryDrainResult,
2203 >(
2204 (id, iterator,),
2205 0x28a3a3f84d928cd8,
2206 fidl::encoding::DynamicFlags::FLEXIBLE,
2207 _decode,
2208 )
2209 }
2210
2211 type CreateServiceAggregateResponseFut = fidl::client::QueryResponseFut<
2212 CapabilityStoreCreateServiceAggregateResult,
2213 fidl::encoding::DefaultFuchsiaResourceDialect,
2214 >;
2215 fn r#create_service_aggregate(
2216 &self,
2217 mut sources: Vec<AggregateSource>,
2218 ) -> Self::CreateServiceAggregateResponseFut {
2219 fn _decode(
2220 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2221 ) -> Result<CapabilityStoreCreateServiceAggregateResult, fidl::Error> {
2222 let _response = fidl::client::decode_transaction_body::<
2223 fidl::encoding::FlexibleResultType<
2224 CapabilityStoreCreateServiceAggregateResponse,
2225 CapabilityStoreError,
2226 >,
2227 fidl::encoding::DefaultFuchsiaResourceDialect,
2228 0x4584116c8085885a,
2229 >(_buf?)?
2230 .into_result::<CapabilityStoreMarker>("create_service_aggregate")?;
2231 Ok(_response.map(|x| x.aggregate_dir_connector))
2232 }
2233 self.client.send_query_and_decode::<
2234 CapabilityStoreCreateServiceAggregateRequest,
2235 CapabilityStoreCreateServiceAggregateResult,
2236 >(
2237 (sources.as_mut(),),
2238 0x4584116c8085885a,
2239 fidl::encoding::DynamicFlags::FLEXIBLE,
2240 _decode,
2241 )
2242 }
2243}
2244
2245pub struct CapabilityStoreEventStream {
2246 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2247}
2248
2249impl std::marker::Unpin for CapabilityStoreEventStream {}
2250
2251impl futures::stream::FusedStream for CapabilityStoreEventStream {
2252 fn is_terminated(&self) -> bool {
2253 self.event_receiver.is_terminated()
2254 }
2255}
2256
2257impl futures::Stream for CapabilityStoreEventStream {
2258 type Item = Result<CapabilityStoreEvent, fidl::Error>;
2259
2260 fn poll_next(
2261 mut self: std::pin::Pin<&mut Self>,
2262 cx: &mut std::task::Context<'_>,
2263 ) -> std::task::Poll<Option<Self::Item>> {
2264 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2265 &mut self.event_receiver,
2266 cx
2267 )?) {
2268 Some(buf) => std::task::Poll::Ready(Some(CapabilityStoreEvent::decode(buf))),
2269 None => std::task::Poll::Ready(None),
2270 }
2271 }
2272}
2273
2274#[derive(Debug)]
2275pub enum CapabilityStoreEvent {
2276 #[non_exhaustive]
2277 _UnknownEvent {
2278 ordinal: u64,
2280 },
2281}
2282
2283impl CapabilityStoreEvent {
2284 fn decode(
2286 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2287 ) -> Result<CapabilityStoreEvent, fidl::Error> {
2288 let (bytes, _handles) = buf.split_mut();
2289 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2290 debug_assert_eq!(tx_header.tx_id, 0);
2291 match tx_header.ordinal {
2292 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2293 Ok(CapabilityStoreEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2294 }
2295 _ => Err(fidl::Error::UnknownOrdinal {
2296 ordinal: tx_header.ordinal,
2297 protocol_name:
2298 <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2299 }),
2300 }
2301 }
2302}
2303
2304pub struct CapabilityStoreRequestStream {
2306 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2307 is_terminated: bool,
2308}
2309
2310impl std::marker::Unpin for CapabilityStoreRequestStream {}
2311
2312impl futures::stream::FusedStream for CapabilityStoreRequestStream {
2313 fn is_terminated(&self) -> bool {
2314 self.is_terminated
2315 }
2316}
2317
2318impl fidl::endpoints::RequestStream for CapabilityStoreRequestStream {
2319 type Protocol = CapabilityStoreMarker;
2320 type ControlHandle = CapabilityStoreControlHandle;
2321
2322 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2323 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2324 }
2325
2326 fn control_handle(&self) -> Self::ControlHandle {
2327 CapabilityStoreControlHandle { inner: self.inner.clone() }
2328 }
2329
2330 fn into_inner(
2331 self,
2332 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2333 {
2334 (self.inner, self.is_terminated)
2335 }
2336
2337 fn from_inner(
2338 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2339 is_terminated: bool,
2340 ) -> Self {
2341 Self { inner, is_terminated }
2342 }
2343}
2344
2345impl futures::Stream for CapabilityStoreRequestStream {
2346 type Item = Result<CapabilityStoreRequest, fidl::Error>;
2347
2348 fn poll_next(
2349 mut self: std::pin::Pin<&mut Self>,
2350 cx: &mut std::task::Context<'_>,
2351 ) -> std::task::Poll<Option<Self::Item>> {
2352 let this = &mut *self;
2353 if this.inner.check_shutdown(cx) {
2354 this.is_terminated = true;
2355 return std::task::Poll::Ready(None);
2356 }
2357 if this.is_terminated {
2358 panic!("polled CapabilityStoreRequestStream after completion");
2359 }
2360 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2361 |bytes, handles| {
2362 match this.inner.channel().read_etc(cx, bytes, handles) {
2363 std::task::Poll::Ready(Ok(())) => {}
2364 std::task::Poll::Pending => return std::task::Poll::Pending,
2365 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2366 this.is_terminated = true;
2367 return std::task::Poll::Ready(None);
2368 }
2369 std::task::Poll::Ready(Err(e)) => {
2370 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2371 e.into(),
2372 ))));
2373 }
2374 }
2375
2376 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2378
2379 std::task::Poll::Ready(Some(match header.ordinal {
2380 0x5d5d35d9c20a2184 => {
2381 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2382 let mut req = fidl::new_empty!(
2383 CapabilityStoreDuplicateRequest,
2384 fidl::encoding::DefaultFuchsiaResourceDialect
2385 );
2386 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDuplicateRequest>(&header, _body_bytes, handles, &mut req)?;
2387 let control_handle =
2388 CapabilityStoreControlHandle { inner: this.inner.clone() };
2389 Ok(CapabilityStoreRequest::Duplicate {
2390 id: req.id,
2391 dest_id: req.dest_id,
2392
2393 responder: CapabilityStoreDuplicateResponder {
2394 control_handle: std::mem::ManuallyDrop::new(control_handle),
2395 tx_id: header.tx_id,
2396 },
2397 })
2398 }
2399 0xa745c0990fc2559 => {
2400 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2401 let mut req = fidl::new_empty!(
2402 CapabilityStoreDropRequest,
2403 fidl::encoding::DefaultFuchsiaResourceDialect
2404 );
2405 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDropRequest>(&header, _body_bytes, handles, &mut req)?;
2406 let control_handle =
2407 CapabilityStoreControlHandle { inner: this.inner.clone() };
2408 Ok(CapabilityStoreRequest::Drop {
2409 id: req.id,
2410
2411 responder: CapabilityStoreDropResponder {
2412 control_handle: std::mem::ManuallyDrop::new(control_handle),
2413 tx_id: header.tx_id,
2414 },
2415 })
2416 }
2417 0x3237a8f4748faff => {
2418 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2419 let mut req = fidl::new_empty!(
2420 CapabilityStoreExportRequest,
2421 fidl::encoding::DefaultFuchsiaResourceDialect
2422 );
2423 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreExportRequest>(&header, _body_bytes, handles, &mut req)?;
2424 let control_handle =
2425 CapabilityStoreControlHandle { inner: this.inner.clone() };
2426 Ok(CapabilityStoreRequest::Export {
2427 id: req.id,
2428
2429 responder: CapabilityStoreExportResponder {
2430 control_handle: std::mem::ManuallyDrop::new(control_handle),
2431 tx_id: header.tx_id,
2432 },
2433 })
2434 }
2435 0x1f96157a29f4539b => {
2436 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2437 let mut req = fidl::new_empty!(
2438 CapabilityStoreImportRequest,
2439 fidl::encoding::DefaultFuchsiaResourceDialect
2440 );
2441 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreImportRequest>(&header, _body_bytes, handles, &mut req)?;
2442 let control_handle =
2443 CapabilityStoreControlHandle { inner: this.inner.clone() };
2444 Ok(CapabilityStoreRequest::Import {
2445 id: req.id,
2446 capability: req.capability,
2447
2448 responder: CapabilityStoreImportResponder {
2449 control_handle: std::mem::ManuallyDrop::new(control_handle),
2450 tx_id: header.tx_id,
2451 },
2452 })
2453 }
2454 0x29592c5d63e91c25 => {
2455 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2456 let mut req = fidl::new_empty!(
2457 CapabilityStoreConnectorCreateRequest,
2458 fidl::encoding::DefaultFuchsiaResourceDialect
2459 );
2460 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
2461 let control_handle =
2462 CapabilityStoreControlHandle { inner: this.inner.clone() };
2463 Ok(CapabilityStoreRequest::ConnectorCreate {
2464 id: req.id,
2465 receiver: req.receiver,
2466
2467 responder: CapabilityStoreConnectorCreateResponder {
2468 control_handle: std::mem::ManuallyDrop::new(control_handle),
2469 tx_id: header.tx_id,
2470 },
2471 })
2472 }
2473 0x537e69ab40563b9f => {
2474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2475 let mut req = fidl::new_empty!(
2476 CapabilityStoreConnectorOpenRequest,
2477 fidl::encoding::DefaultFuchsiaResourceDialect
2478 );
2479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2480 let control_handle =
2481 CapabilityStoreControlHandle { inner: this.inner.clone() };
2482 Ok(CapabilityStoreRequest::ConnectorOpen {
2483 id: req.id,
2484 server_end: req.server_end,
2485
2486 responder: CapabilityStoreConnectorOpenResponder {
2487 control_handle: std::mem::ManuallyDrop::new(control_handle),
2488 tx_id: header.tx_id,
2489 },
2490 })
2491 }
2492 0x186138a11ccf19bb => {
2493 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2494 let mut req = fidl::new_empty!(
2495 CapabilityStoreDirConnectorCreateRequest,
2496 fidl::encoding::DefaultFuchsiaResourceDialect
2497 );
2498 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDirConnectorCreateRequest>(&header, _body_bytes, handles, &mut req)?;
2499 let control_handle =
2500 CapabilityStoreControlHandle { inner: this.inner.clone() };
2501 Ok(CapabilityStoreRequest::DirConnectorCreate {
2502 id: req.id,
2503 receiver: req.receiver,
2504
2505 responder: CapabilityStoreDirConnectorCreateResponder {
2506 control_handle: std::mem::ManuallyDrop::new(control_handle),
2507 tx_id: header.tx_id,
2508 },
2509 })
2510 }
2511 0x5650d3d6a3a13901 => {
2512 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2513 let mut req = fidl::new_empty!(
2514 CapabilityStoreDirConnectorOpenRequest,
2515 fidl::encoding::DefaultFuchsiaResourceDialect
2516 );
2517 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDirConnectorOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2518 let control_handle =
2519 CapabilityStoreControlHandle { inner: this.inner.clone() };
2520 Ok(CapabilityStoreRequest::DirConnectorOpen {
2521 payload: req,
2522 responder: CapabilityStoreDirConnectorOpenResponder {
2523 control_handle: std::mem::ManuallyDrop::new(control_handle),
2524 tx_id: header.tx_id,
2525 },
2526 })
2527 }
2528 0x6997c8dfc63de093 => {
2529 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2530 let mut req = fidl::new_empty!(
2531 CapabilityStoreDictionaryCreateRequest,
2532 fidl::encoding::DefaultFuchsiaResourceDialect
2533 );
2534 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryCreateRequest>(&header, _body_bytes, handles, &mut req)?;
2535 let control_handle =
2536 CapabilityStoreControlHandle { inner: this.inner.clone() };
2537 Ok(CapabilityStoreRequest::DictionaryCreate {
2538 id: req.id,
2539
2540 responder: CapabilityStoreDictionaryCreateResponder {
2541 control_handle: std::mem::ManuallyDrop::new(control_handle),
2542 tx_id: header.tx_id,
2543 },
2544 })
2545 }
2546 0x72fd686c37b6025f => {
2547 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2548 let mut req = fidl::new_empty!(
2549 CapabilityStoreDictionaryLegacyImportRequest,
2550 fidl::encoding::DefaultFuchsiaResourceDialect
2551 );
2552 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyImportRequest>(&header, _body_bytes, handles, &mut req)?;
2553 let control_handle =
2554 CapabilityStoreControlHandle { inner: this.inner.clone() };
2555 Ok(CapabilityStoreRequest::DictionaryLegacyImport {
2556 id: req.id,
2557 client_end: req.client_end,
2558
2559 responder: CapabilityStoreDictionaryLegacyImportResponder {
2560 control_handle: std::mem::ManuallyDrop::new(control_handle),
2561 tx_id: header.tx_id,
2562 },
2563 })
2564 }
2565 0x407e15cc4bde5dcd => {
2566 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2567 let mut req = fidl::new_empty!(
2568 CapabilityStoreDictionaryLegacyExportRequest,
2569 fidl::encoding::DefaultFuchsiaResourceDialect
2570 );
2571 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryLegacyExportRequest>(&header, _body_bytes, handles, &mut req)?;
2572 let control_handle =
2573 CapabilityStoreControlHandle { inner: this.inner.clone() };
2574 Ok(CapabilityStoreRequest::DictionaryLegacyExport {
2575 id: req.id,
2576 server_end: req.server_end,
2577
2578 responder: CapabilityStoreDictionaryLegacyExportResponder {
2579 control_handle: std::mem::ManuallyDrop::new(control_handle),
2580 tx_id: header.tx_id,
2581 },
2582 })
2583 }
2584 0x7702183689d44c27 => {
2585 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2586 let mut req = fidl::new_empty!(
2587 CapabilityStoreDictionaryInsertRequest,
2588 fidl::encoding::DefaultFuchsiaResourceDialect
2589 );
2590 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryInsertRequest>(&header, _body_bytes, handles, &mut req)?;
2591 let control_handle =
2592 CapabilityStoreControlHandle { inner: this.inner.clone() };
2593 Ok(CapabilityStoreRequest::DictionaryInsert {
2594 id: req.id,
2595 item: req.item,
2596
2597 responder: CapabilityStoreDictionaryInsertResponder {
2598 control_handle: std::mem::ManuallyDrop::new(control_handle),
2599 tx_id: header.tx_id,
2600 },
2601 })
2602 }
2603 0x4d9e27538284add2 => {
2604 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2605 let mut req = fidl::new_empty!(
2606 CapabilityStoreDictionaryGetRequest,
2607 fidl::encoding::DefaultFuchsiaResourceDialect
2608 );
2609 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryGetRequest>(&header, _body_bytes, handles, &mut req)?;
2610 let control_handle =
2611 CapabilityStoreControlHandle { inner: this.inner.clone() };
2612 Ok(CapabilityStoreRequest::DictionaryGet {
2613 id: req.id,
2614 key: req.key,
2615 dest_id: req.dest_id,
2616
2617 responder: CapabilityStoreDictionaryGetResponder {
2618 control_handle: std::mem::ManuallyDrop::new(control_handle),
2619 tx_id: header.tx_id,
2620 },
2621 })
2622 }
2623 0x4c5c025ab05d4f3 => {
2624 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2625 let mut req = fidl::new_empty!(
2626 CapabilityStoreDictionaryRemoveRequest,
2627 fidl::encoding::DefaultFuchsiaResourceDialect
2628 );
2629 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryRemoveRequest>(&header, _body_bytes, handles, &mut req)?;
2630 let control_handle =
2631 CapabilityStoreControlHandle { inner: this.inner.clone() };
2632 Ok(CapabilityStoreRequest::DictionaryRemove {
2633 id: req.id,
2634 key: req.key,
2635 dest_id: req.dest_id,
2636
2637 responder: CapabilityStoreDictionaryRemoveResponder {
2638 control_handle: std::mem::ManuallyDrop::new(control_handle),
2639 tx_id: header.tx_id,
2640 },
2641 })
2642 }
2643 0x3733ecdf4ea1b44f => {
2644 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2645 let mut req = fidl::new_empty!(
2646 CapabilityStoreDictionaryCopyRequest,
2647 fidl::encoding::DefaultFuchsiaResourceDialect
2648 );
2649 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryCopyRequest>(&header, _body_bytes, handles, &mut req)?;
2650 let control_handle =
2651 CapabilityStoreControlHandle { inner: this.inner.clone() };
2652 Ok(CapabilityStoreRequest::DictionaryCopy {
2653 id: req.id,
2654 dest_id: req.dest_id,
2655
2656 responder: CapabilityStoreDictionaryCopyResponder {
2657 control_handle: std::mem::ManuallyDrop::new(control_handle),
2658 tx_id: header.tx_id,
2659 },
2660 })
2661 }
2662 0x84b05577ceaec9e => {
2663 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2664 let mut req = fidl::new_empty!(
2665 CapabilityStoreDictionaryKeysRequest,
2666 fidl::encoding::DefaultFuchsiaResourceDialect
2667 );
2668 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryKeysRequest>(&header, _body_bytes, handles, &mut req)?;
2669 let control_handle =
2670 CapabilityStoreControlHandle { inner: this.inner.clone() };
2671 Ok(CapabilityStoreRequest::DictionaryKeys {
2672 id: req.id,
2673 iterator: req.iterator,
2674
2675 responder: CapabilityStoreDictionaryKeysResponder {
2676 control_handle: std::mem::ManuallyDrop::new(control_handle),
2677 tx_id: header.tx_id,
2678 },
2679 })
2680 }
2681 0xd6279b6ced04641 => {
2682 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2683 let mut req = fidl::new_empty!(
2684 CapabilityStoreDictionaryEnumerateRequest,
2685 fidl::encoding::DefaultFuchsiaResourceDialect
2686 );
2687 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
2688 let control_handle =
2689 CapabilityStoreControlHandle { inner: this.inner.clone() };
2690 Ok(CapabilityStoreRequest::DictionaryEnumerate {
2691 id: req.id,
2692 iterator: req.iterator,
2693
2694 responder: CapabilityStoreDictionaryEnumerateResponder {
2695 control_handle: std::mem::ManuallyDrop::new(control_handle),
2696 tx_id: header.tx_id,
2697 },
2698 })
2699 }
2700 0x28a3a3f84d928cd8 => {
2701 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2702 let mut req = fidl::new_empty!(
2703 CapabilityStoreDictionaryDrainRequest,
2704 fidl::encoding::DefaultFuchsiaResourceDialect
2705 );
2706 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreDictionaryDrainRequest>(&header, _body_bytes, handles, &mut req)?;
2707 let control_handle =
2708 CapabilityStoreControlHandle { inner: this.inner.clone() };
2709 Ok(CapabilityStoreRequest::DictionaryDrain {
2710 id: req.id,
2711 iterator: req.iterator,
2712
2713 responder: CapabilityStoreDictionaryDrainResponder {
2714 control_handle: std::mem::ManuallyDrop::new(control_handle),
2715 tx_id: header.tx_id,
2716 },
2717 })
2718 }
2719 0x4584116c8085885a => {
2720 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2721 let mut req = fidl::new_empty!(
2722 CapabilityStoreCreateServiceAggregateRequest,
2723 fidl::encoding::DefaultFuchsiaResourceDialect
2724 );
2725 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CapabilityStoreCreateServiceAggregateRequest>(&header, _body_bytes, handles, &mut req)?;
2726 let control_handle =
2727 CapabilityStoreControlHandle { inner: this.inner.clone() };
2728 Ok(CapabilityStoreRequest::CreateServiceAggregate {
2729 sources: req.sources,
2730
2731 responder: CapabilityStoreCreateServiceAggregateResponder {
2732 control_handle: std::mem::ManuallyDrop::new(control_handle),
2733 tx_id: header.tx_id,
2734 },
2735 })
2736 }
2737 _ if header.tx_id == 0
2738 && header
2739 .dynamic_flags()
2740 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2741 {
2742 Ok(CapabilityStoreRequest::_UnknownMethod {
2743 ordinal: header.ordinal,
2744 control_handle: CapabilityStoreControlHandle {
2745 inner: this.inner.clone(),
2746 },
2747 method_type: fidl::MethodType::OneWay,
2748 })
2749 }
2750 _ if header
2751 .dynamic_flags()
2752 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2753 {
2754 this.inner.send_framework_err(
2755 fidl::encoding::FrameworkErr::UnknownMethod,
2756 header.tx_id,
2757 header.ordinal,
2758 header.dynamic_flags(),
2759 (bytes, handles),
2760 )?;
2761 Ok(CapabilityStoreRequest::_UnknownMethod {
2762 ordinal: header.ordinal,
2763 control_handle: CapabilityStoreControlHandle {
2764 inner: this.inner.clone(),
2765 },
2766 method_type: fidl::MethodType::TwoWay,
2767 })
2768 }
2769 _ => Err(fidl::Error::UnknownOrdinal {
2770 ordinal: header.ordinal,
2771 protocol_name:
2772 <CapabilityStoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2773 }),
2774 }))
2775 },
2776 )
2777 }
2778}
2779
2780#[derive(Debug)]
2804pub enum CapabilityStoreRequest {
2805 Duplicate { id: u64, dest_id: u64, responder: CapabilityStoreDuplicateResponder },
2813 Drop { id: u64, responder: CapabilityStoreDropResponder },
2819 Export { id: u64, responder: CapabilityStoreExportResponder },
2827 Import { id: u64, capability: Capability, responder: CapabilityStoreImportResponder },
2834 ConnectorCreate {
2841 id: u64,
2842 receiver: fidl::endpoints::ClientEnd<ReceiverMarker>,
2843 responder: CapabilityStoreConnectorCreateResponder,
2844 },
2845 ConnectorOpen {
2855 id: u64,
2856 server_end: fidl::Channel,
2857 responder: CapabilityStoreConnectorOpenResponder,
2858 },
2859 DirConnectorCreate {
2866 id: u64,
2867 receiver: fidl::endpoints::ClientEnd<DirReceiverMarker>,
2868 responder: CapabilityStoreDirConnectorCreateResponder,
2869 },
2870 DirConnectorOpen {
2884 payload: CapabilityStoreDirConnectorOpenRequest,
2885 responder: CapabilityStoreDirConnectorOpenResponder,
2886 },
2887 DictionaryCreate { id: u64, responder: CapabilityStoreDictionaryCreateResponder },
2893 DictionaryLegacyImport {
2903 id: u64,
2904 client_end: fidl::Channel,
2905 responder: CapabilityStoreDictionaryLegacyImportResponder,
2906 },
2907 DictionaryLegacyExport {
2917 id: u64,
2918 server_end: fidl::Channel,
2919 responder: CapabilityStoreDictionaryLegacyExportResponder,
2920 },
2921 DictionaryInsert {
2931 id: u64,
2932 item: DictionaryItem,
2933 responder: CapabilityStoreDictionaryInsertResponder,
2934 },
2935 DictionaryGet {
2947 id: u64,
2948 key: String,
2949 dest_id: u64,
2950 responder: CapabilityStoreDictionaryGetResponder,
2951 },
2952 DictionaryRemove {
2963 id: u64,
2964 key: String,
2965 dest_id: Option<Box<WrappedCapabilityId>>,
2966 responder: CapabilityStoreDictionaryRemoveResponder,
2967 },
2968 DictionaryCopy { id: u64, dest_id: u64, responder: CapabilityStoreDictionaryCopyResponder },
2984 DictionaryKeys {
2991 id: u64,
2992 iterator: fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
2993 responder: CapabilityStoreDictionaryKeysResponder,
2994 },
2995 DictionaryEnumerate {
3005 id: u64,
3006 iterator: fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
3007 responder: CapabilityStoreDictionaryEnumerateResponder,
3008 },
3009 DictionaryDrain {
3017 id: u64,
3018 iterator: Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
3019 responder: CapabilityStoreDictionaryDrainResponder,
3020 },
3021 CreateServiceAggregate {
3024 sources: Vec<AggregateSource>,
3025 responder: CapabilityStoreCreateServiceAggregateResponder,
3026 },
3027 #[non_exhaustive]
3029 _UnknownMethod {
3030 ordinal: u64,
3032 control_handle: CapabilityStoreControlHandle,
3033 method_type: fidl::MethodType,
3034 },
3035}
3036
3037impl CapabilityStoreRequest {
3038 #[allow(irrefutable_let_patterns)]
3039 pub fn into_duplicate(self) -> Option<(u64, u64, CapabilityStoreDuplicateResponder)> {
3040 if let CapabilityStoreRequest::Duplicate { id, dest_id, responder } = self {
3041 Some((id, dest_id, responder))
3042 } else {
3043 None
3044 }
3045 }
3046
3047 #[allow(irrefutable_let_patterns)]
3048 pub fn into_drop(self) -> Option<(u64, CapabilityStoreDropResponder)> {
3049 if let CapabilityStoreRequest::Drop { id, responder } = self {
3050 Some((id, responder))
3051 } else {
3052 None
3053 }
3054 }
3055
3056 #[allow(irrefutable_let_patterns)]
3057 pub fn into_export(self) -> Option<(u64, CapabilityStoreExportResponder)> {
3058 if let CapabilityStoreRequest::Export { id, responder } = self {
3059 Some((id, responder))
3060 } else {
3061 None
3062 }
3063 }
3064
3065 #[allow(irrefutable_let_patterns)]
3066 pub fn into_import(self) -> Option<(u64, Capability, CapabilityStoreImportResponder)> {
3067 if let CapabilityStoreRequest::Import { id, capability, responder } = self {
3068 Some((id, capability, responder))
3069 } else {
3070 None
3071 }
3072 }
3073
3074 #[allow(irrefutable_let_patterns)]
3075 pub fn into_connector_create(
3076 self,
3077 ) -> Option<(
3078 u64,
3079 fidl::endpoints::ClientEnd<ReceiverMarker>,
3080 CapabilityStoreConnectorCreateResponder,
3081 )> {
3082 if let CapabilityStoreRequest::ConnectorCreate { id, receiver, responder } = self {
3083 Some((id, receiver, responder))
3084 } else {
3085 None
3086 }
3087 }
3088
3089 #[allow(irrefutable_let_patterns)]
3090 pub fn into_connector_open(
3091 self,
3092 ) -> Option<(u64, fidl::Channel, CapabilityStoreConnectorOpenResponder)> {
3093 if let CapabilityStoreRequest::ConnectorOpen { id, server_end, responder } = self {
3094 Some((id, server_end, responder))
3095 } else {
3096 None
3097 }
3098 }
3099
3100 #[allow(irrefutable_let_patterns)]
3101 pub fn into_dir_connector_create(
3102 self,
3103 ) -> Option<(
3104 u64,
3105 fidl::endpoints::ClientEnd<DirReceiverMarker>,
3106 CapabilityStoreDirConnectorCreateResponder,
3107 )> {
3108 if let CapabilityStoreRequest::DirConnectorCreate { id, receiver, responder } = self {
3109 Some((id, receiver, responder))
3110 } else {
3111 None
3112 }
3113 }
3114
3115 #[allow(irrefutable_let_patterns)]
3116 pub fn into_dir_connector_open(
3117 self,
3118 ) -> Option<(CapabilityStoreDirConnectorOpenRequest, CapabilityStoreDirConnectorOpenResponder)>
3119 {
3120 if let CapabilityStoreRequest::DirConnectorOpen { payload, responder } = self {
3121 Some((payload, responder))
3122 } else {
3123 None
3124 }
3125 }
3126
3127 #[allow(irrefutable_let_patterns)]
3128 pub fn into_dictionary_create(self) -> Option<(u64, CapabilityStoreDictionaryCreateResponder)> {
3129 if let CapabilityStoreRequest::DictionaryCreate { id, responder } = self {
3130 Some((id, responder))
3131 } else {
3132 None
3133 }
3134 }
3135
3136 #[allow(irrefutable_let_patterns)]
3137 pub fn into_dictionary_legacy_import(
3138 self,
3139 ) -> Option<(u64, fidl::Channel, CapabilityStoreDictionaryLegacyImportResponder)> {
3140 if let CapabilityStoreRequest::DictionaryLegacyImport { id, client_end, responder } = self {
3141 Some((id, client_end, responder))
3142 } else {
3143 None
3144 }
3145 }
3146
3147 #[allow(irrefutable_let_patterns)]
3148 pub fn into_dictionary_legacy_export(
3149 self,
3150 ) -> Option<(u64, fidl::Channel, CapabilityStoreDictionaryLegacyExportResponder)> {
3151 if let CapabilityStoreRequest::DictionaryLegacyExport { id, server_end, responder } = self {
3152 Some((id, server_end, responder))
3153 } else {
3154 None
3155 }
3156 }
3157
3158 #[allow(irrefutable_let_patterns)]
3159 pub fn into_dictionary_insert(
3160 self,
3161 ) -> Option<(u64, DictionaryItem, CapabilityStoreDictionaryInsertResponder)> {
3162 if let CapabilityStoreRequest::DictionaryInsert { id, item, responder } = self {
3163 Some((id, item, responder))
3164 } else {
3165 None
3166 }
3167 }
3168
3169 #[allow(irrefutable_let_patterns)]
3170 pub fn into_dictionary_get(
3171 self,
3172 ) -> Option<(u64, String, u64, CapabilityStoreDictionaryGetResponder)> {
3173 if let CapabilityStoreRequest::DictionaryGet { id, key, dest_id, responder } = self {
3174 Some((id, key, dest_id, responder))
3175 } else {
3176 None
3177 }
3178 }
3179
3180 #[allow(irrefutable_let_patterns)]
3181 pub fn into_dictionary_remove(
3182 self,
3183 ) -> Option<(
3184 u64,
3185 String,
3186 Option<Box<WrappedCapabilityId>>,
3187 CapabilityStoreDictionaryRemoveResponder,
3188 )> {
3189 if let CapabilityStoreRequest::DictionaryRemove { id, key, dest_id, responder } = self {
3190 Some((id, key, dest_id, responder))
3191 } else {
3192 None
3193 }
3194 }
3195
3196 #[allow(irrefutable_let_patterns)]
3197 pub fn into_dictionary_copy(
3198 self,
3199 ) -> Option<(u64, u64, CapabilityStoreDictionaryCopyResponder)> {
3200 if let CapabilityStoreRequest::DictionaryCopy { id, dest_id, responder } = self {
3201 Some((id, dest_id, responder))
3202 } else {
3203 None
3204 }
3205 }
3206
3207 #[allow(irrefutable_let_patterns)]
3208 pub fn into_dictionary_keys(
3209 self,
3210 ) -> Option<(
3211 u64,
3212 fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
3213 CapabilityStoreDictionaryKeysResponder,
3214 )> {
3215 if let CapabilityStoreRequest::DictionaryKeys { id, iterator, responder } = self {
3216 Some((id, iterator, responder))
3217 } else {
3218 None
3219 }
3220 }
3221
3222 #[allow(irrefutable_let_patterns)]
3223 pub fn into_dictionary_enumerate(
3224 self,
3225 ) -> Option<(
3226 u64,
3227 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
3228 CapabilityStoreDictionaryEnumerateResponder,
3229 )> {
3230 if let CapabilityStoreRequest::DictionaryEnumerate { id, iterator, responder } = self {
3231 Some((id, iterator, responder))
3232 } else {
3233 None
3234 }
3235 }
3236
3237 #[allow(irrefutable_let_patterns)]
3238 pub fn into_dictionary_drain(
3239 self,
3240 ) -> Option<(
3241 u64,
3242 Option<fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>>,
3243 CapabilityStoreDictionaryDrainResponder,
3244 )> {
3245 if let CapabilityStoreRequest::DictionaryDrain { id, iterator, responder } = self {
3246 Some((id, iterator, responder))
3247 } else {
3248 None
3249 }
3250 }
3251
3252 #[allow(irrefutable_let_patterns)]
3253 pub fn into_create_service_aggregate(
3254 self,
3255 ) -> Option<(Vec<AggregateSource>, CapabilityStoreCreateServiceAggregateResponder)> {
3256 if let CapabilityStoreRequest::CreateServiceAggregate { sources, responder } = self {
3257 Some((sources, responder))
3258 } else {
3259 None
3260 }
3261 }
3262
3263 pub fn method_name(&self) -> &'static str {
3265 match *self {
3266 CapabilityStoreRequest::Duplicate { .. } => "duplicate",
3267 CapabilityStoreRequest::Drop { .. } => "drop",
3268 CapabilityStoreRequest::Export { .. } => "export",
3269 CapabilityStoreRequest::Import { .. } => "import",
3270 CapabilityStoreRequest::ConnectorCreate { .. } => "connector_create",
3271 CapabilityStoreRequest::ConnectorOpen { .. } => "connector_open",
3272 CapabilityStoreRequest::DirConnectorCreate { .. } => "dir_connector_create",
3273 CapabilityStoreRequest::DirConnectorOpen { .. } => "dir_connector_open",
3274 CapabilityStoreRequest::DictionaryCreate { .. } => "dictionary_create",
3275 CapabilityStoreRequest::DictionaryLegacyImport { .. } => "dictionary_legacy_import",
3276 CapabilityStoreRequest::DictionaryLegacyExport { .. } => "dictionary_legacy_export",
3277 CapabilityStoreRequest::DictionaryInsert { .. } => "dictionary_insert",
3278 CapabilityStoreRequest::DictionaryGet { .. } => "dictionary_get",
3279 CapabilityStoreRequest::DictionaryRemove { .. } => "dictionary_remove",
3280 CapabilityStoreRequest::DictionaryCopy { .. } => "dictionary_copy",
3281 CapabilityStoreRequest::DictionaryKeys { .. } => "dictionary_keys",
3282 CapabilityStoreRequest::DictionaryEnumerate { .. } => "dictionary_enumerate",
3283 CapabilityStoreRequest::DictionaryDrain { .. } => "dictionary_drain",
3284 CapabilityStoreRequest::CreateServiceAggregate { .. } => "create_service_aggregate",
3285 CapabilityStoreRequest::_UnknownMethod {
3286 method_type: fidl::MethodType::OneWay,
3287 ..
3288 } => "unknown one-way method",
3289 CapabilityStoreRequest::_UnknownMethod {
3290 method_type: fidl::MethodType::TwoWay,
3291 ..
3292 } => "unknown two-way method",
3293 }
3294 }
3295}
3296
3297#[derive(Debug, Clone)]
3298pub struct CapabilityStoreControlHandle {
3299 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3300}
3301
3302impl fidl::endpoints::ControlHandle for CapabilityStoreControlHandle {
3303 fn shutdown(&self) {
3304 self.inner.shutdown()
3305 }
3306
3307 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3308 self.inner.shutdown_with_epitaph(status)
3309 }
3310
3311 fn is_closed(&self) -> bool {
3312 self.inner.channel().is_closed()
3313 }
3314 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3315 self.inner.channel().on_closed()
3316 }
3317
3318 #[cfg(target_os = "fuchsia")]
3319 fn signal_peer(
3320 &self,
3321 clear_mask: zx::Signals,
3322 set_mask: zx::Signals,
3323 ) -> Result<(), zx_status::Status> {
3324 use fidl::Peered;
3325 self.inner.channel().signal_peer(clear_mask, set_mask)
3326 }
3327}
3328
3329impl CapabilityStoreControlHandle {}
3330
3331#[must_use = "FIDL methods require a response to be sent"]
3332#[derive(Debug)]
3333pub struct CapabilityStoreDuplicateResponder {
3334 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3335 tx_id: u32,
3336}
3337
3338impl std::ops::Drop for CapabilityStoreDuplicateResponder {
3342 fn drop(&mut self) {
3343 self.control_handle.shutdown();
3344 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3346 }
3347}
3348
3349impl fidl::endpoints::Responder for CapabilityStoreDuplicateResponder {
3350 type ControlHandle = CapabilityStoreControlHandle;
3351
3352 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3353 &self.control_handle
3354 }
3355
3356 fn drop_without_shutdown(mut self) {
3357 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3359 std::mem::forget(self);
3361 }
3362}
3363
3364impl CapabilityStoreDuplicateResponder {
3365 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3369 let _result = self.send_raw(result);
3370 if _result.is_err() {
3371 self.control_handle.shutdown();
3372 }
3373 self.drop_without_shutdown();
3374 _result
3375 }
3376
3377 pub fn send_no_shutdown_on_err(
3379 self,
3380 mut result: Result<(), CapabilityStoreError>,
3381 ) -> Result<(), fidl::Error> {
3382 let _result = self.send_raw(result);
3383 self.drop_without_shutdown();
3384 _result
3385 }
3386
3387 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3388 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3389 fidl::encoding::EmptyStruct,
3390 CapabilityStoreError,
3391 >>(
3392 fidl::encoding::FlexibleResult::new(result),
3393 self.tx_id,
3394 0x5d5d35d9c20a2184,
3395 fidl::encoding::DynamicFlags::FLEXIBLE,
3396 )
3397 }
3398}
3399
3400#[must_use = "FIDL methods require a response to be sent"]
3401#[derive(Debug)]
3402pub struct CapabilityStoreDropResponder {
3403 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3404 tx_id: u32,
3405}
3406
3407impl std::ops::Drop for CapabilityStoreDropResponder {
3411 fn drop(&mut self) {
3412 self.control_handle.shutdown();
3413 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3415 }
3416}
3417
3418impl fidl::endpoints::Responder for CapabilityStoreDropResponder {
3419 type ControlHandle = CapabilityStoreControlHandle;
3420
3421 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3422 &self.control_handle
3423 }
3424
3425 fn drop_without_shutdown(mut self) {
3426 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3428 std::mem::forget(self);
3430 }
3431}
3432
3433impl CapabilityStoreDropResponder {
3434 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3438 let _result = self.send_raw(result);
3439 if _result.is_err() {
3440 self.control_handle.shutdown();
3441 }
3442 self.drop_without_shutdown();
3443 _result
3444 }
3445
3446 pub fn send_no_shutdown_on_err(
3448 self,
3449 mut result: Result<(), CapabilityStoreError>,
3450 ) -> Result<(), fidl::Error> {
3451 let _result = self.send_raw(result);
3452 self.drop_without_shutdown();
3453 _result
3454 }
3455
3456 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3457 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3458 fidl::encoding::EmptyStruct,
3459 CapabilityStoreError,
3460 >>(
3461 fidl::encoding::FlexibleResult::new(result),
3462 self.tx_id,
3463 0xa745c0990fc2559,
3464 fidl::encoding::DynamicFlags::FLEXIBLE,
3465 )
3466 }
3467}
3468
3469#[must_use = "FIDL methods require a response to be sent"]
3470#[derive(Debug)]
3471pub struct CapabilityStoreExportResponder {
3472 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3473 tx_id: u32,
3474}
3475
3476impl std::ops::Drop for CapabilityStoreExportResponder {
3480 fn drop(&mut self) {
3481 self.control_handle.shutdown();
3482 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3484 }
3485}
3486
3487impl fidl::endpoints::Responder for CapabilityStoreExportResponder {
3488 type ControlHandle = CapabilityStoreControlHandle;
3489
3490 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3491 &self.control_handle
3492 }
3493
3494 fn drop_without_shutdown(mut self) {
3495 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3497 std::mem::forget(self);
3499 }
3500}
3501
3502impl CapabilityStoreExportResponder {
3503 pub fn send(
3507 self,
3508 mut result: Result<Capability, CapabilityStoreError>,
3509 ) -> Result<(), fidl::Error> {
3510 let _result = self.send_raw(result);
3511 if _result.is_err() {
3512 self.control_handle.shutdown();
3513 }
3514 self.drop_without_shutdown();
3515 _result
3516 }
3517
3518 pub fn send_no_shutdown_on_err(
3520 self,
3521 mut result: Result<Capability, CapabilityStoreError>,
3522 ) -> Result<(), fidl::Error> {
3523 let _result = self.send_raw(result);
3524 self.drop_without_shutdown();
3525 _result
3526 }
3527
3528 fn send_raw(
3529 &self,
3530 mut result: Result<Capability, CapabilityStoreError>,
3531 ) -> Result<(), fidl::Error> {
3532 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3533 CapabilityStoreExportResponse,
3534 CapabilityStoreError,
3535 >>(
3536 fidl::encoding::FlexibleResult::new(
3537 result.as_mut().map_err(|e| *e).map(|capability| (capability,)),
3538 ),
3539 self.tx_id,
3540 0x3237a8f4748faff,
3541 fidl::encoding::DynamicFlags::FLEXIBLE,
3542 )
3543 }
3544}
3545
3546#[must_use = "FIDL methods require a response to be sent"]
3547#[derive(Debug)]
3548pub struct CapabilityStoreImportResponder {
3549 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3550 tx_id: u32,
3551}
3552
3553impl std::ops::Drop for CapabilityStoreImportResponder {
3557 fn drop(&mut self) {
3558 self.control_handle.shutdown();
3559 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3561 }
3562}
3563
3564impl fidl::endpoints::Responder for CapabilityStoreImportResponder {
3565 type ControlHandle = CapabilityStoreControlHandle;
3566
3567 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3568 &self.control_handle
3569 }
3570
3571 fn drop_without_shutdown(mut self) {
3572 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3574 std::mem::forget(self);
3576 }
3577}
3578
3579impl CapabilityStoreImportResponder {
3580 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3584 let _result = self.send_raw(result);
3585 if _result.is_err() {
3586 self.control_handle.shutdown();
3587 }
3588 self.drop_without_shutdown();
3589 _result
3590 }
3591
3592 pub fn send_no_shutdown_on_err(
3594 self,
3595 mut result: Result<(), CapabilityStoreError>,
3596 ) -> Result<(), fidl::Error> {
3597 let _result = self.send_raw(result);
3598 self.drop_without_shutdown();
3599 _result
3600 }
3601
3602 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3603 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3604 fidl::encoding::EmptyStruct,
3605 CapabilityStoreError,
3606 >>(
3607 fidl::encoding::FlexibleResult::new(result),
3608 self.tx_id,
3609 0x1f96157a29f4539b,
3610 fidl::encoding::DynamicFlags::FLEXIBLE,
3611 )
3612 }
3613}
3614
3615#[must_use = "FIDL methods require a response to be sent"]
3616#[derive(Debug)]
3617pub struct CapabilityStoreConnectorCreateResponder {
3618 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3619 tx_id: u32,
3620}
3621
3622impl std::ops::Drop for CapabilityStoreConnectorCreateResponder {
3626 fn drop(&mut self) {
3627 self.control_handle.shutdown();
3628 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3630 }
3631}
3632
3633impl fidl::endpoints::Responder for CapabilityStoreConnectorCreateResponder {
3634 type ControlHandle = CapabilityStoreControlHandle;
3635
3636 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3637 &self.control_handle
3638 }
3639
3640 fn drop_without_shutdown(mut self) {
3641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3643 std::mem::forget(self);
3645 }
3646}
3647
3648impl CapabilityStoreConnectorCreateResponder {
3649 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3653 let _result = self.send_raw(result);
3654 if _result.is_err() {
3655 self.control_handle.shutdown();
3656 }
3657 self.drop_without_shutdown();
3658 _result
3659 }
3660
3661 pub fn send_no_shutdown_on_err(
3663 self,
3664 mut result: Result<(), CapabilityStoreError>,
3665 ) -> Result<(), fidl::Error> {
3666 let _result = self.send_raw(result);
3667 self.drop_without_shutdown();
3668 _result
3669 }
3670
3671 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3672 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3673 fidl::encoding::EmptyStruct,
3674 CapabilityStoreError,
3675 >>(
3676 fidl::encoding::FlexibleResult::new(result),
3677 self.tx_id,
3678 0x29592c5d63e91c25,
3679 fidl::encoding::DynamicFlags::FLEXIBLE,
3680 )
3681 }
3682}
3683
3684#[must_use = "FIDL methods require a response to be sent"]
3685#[derive(Debug)]
3686pub struct CapabilityStoreConnectorOpenResponder {
3687 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3688 tx_id: u32,
3689}
3690
3691impl std::ops::Drop for CapabilityStoreConnectorOpenResponder {
3695 fn drop(&mut self) {
3696 self.control_handle.shutdown();
3697 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3699 }
3700}
3701
3702impl fidl::endpoints::Responder for CapabilityStoreConnectorOpenResponder {
3703 type ControlHandle = CapabilityStoreControlHandle;
3704
3705 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3706 &self.control_handle
3707 }
3708
3709 fn drop_without_shutdown(mut self) {
3710 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3712 std::mem::forget(self);
3714 }
3715}
3716
3717impl CapabilityStoreConnectorOpenResponder {
3718 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3722 let _result = self.send_raw(result);
3723 if _result.is_err() {
3724 self.control_handle.shutdown();
3725 }
3726 self.drop_without_shutdown();
3727 _result
3728 }
3729
3730 pub fn send_no_shutdown_on_err(
3732 self,
3733 mut result: Result<(), CapabilityStoreError>,
3734 ) -> Result<(), fidl::Error> {
3735 let _result = self.send_raw(result);
3736 self.drop_without_shutdown();
3737 _result
3738 }
3739
3740 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3741 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3742 fidl::encoding::EmptyStruct,
3743 CapabilityStoreError,
3744 >>(
3745 fidl::encoding::FlexibleResult::new(result),
3746 self.tx_id,
3747 0x537e69ab40563b9f,
3748 fidl::encoding::DynamicFlags::FLEXIBLE,
3749 )
3750 }
3751}
3752
3753#[must_use = "FIDL methods require a response to be sent"]
3754#[derive(Debug)]
3755pub struct CapabilityStoreDirConnectorCreateResponder {
3756 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3757 tx_id: u32,
3758}
3759
3760impl std::ops::Drop for CapabilityStoreDirConnectorCreateResponder {
3764 fn drop(&mut self) {
3765 self.control_handle.shutdown();
3766 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3768 }
3769}
3770
3771impl fidl::endpoints::Responder for CapabilityStoreDirConnectorCreateResponder {
3772 type ControlHandle = CapabilityStoreControlHandle;
3773
3774 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3775 &self.control_handle
3776 }
3777
3778 fn drop_without_shutdown(mut self) {
3779 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3781 std::mem::forget(self);
3783 }
3784}
3785
3786impl CapabilityStoreDirConnectorCreateResponder {
3787 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3791 let _result = self.send_raw(result);
3792 if _result.is_err() {
3793 self.control_handle.shutdown();
3794 }
3795 self.drop_without_shutdown();
3796 _result
3797 }
3798
3799 pub fn send_no_shutdown_on_err(
3801 self,
3802 mut result: Result<(), CapabilityStoreError>,
3803 ) -> Result<(), fidl::Error> {
3804 let _result = self.send_raw(result);
3805 self.drop_without_shutdown();
3806 _result
3807 }
3808
3809 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3810 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3811 fidl::encoding::EmptyStruct,
3812 CapabilityStoreError,
3813 >>(
3814 fidl::encoding::FlexibleResult::new(result),
3815 self.tx_id,
3816 0x186138a11ccf19bb,
3817 fidl::encoding::DynamicFlags::FLEXIBLE,
3818 )
3819 }
3820}
3821
3822#[must_use = "FIDL methods require a response to be sent"]
3823#[derive(Debug)]
3824pub struct CapabilityStoreDirConnectorOpenResponder {
3825 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3826 tx_id: u32,
3827}
3828
3829impl std::ops::Drop for CapabilityStoreDirConnectorOpenResponder {
3833 fn drop(&mut self) {
3834 self.control_handle.shutdown();
3835 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3837 }
3838}
3839
3840impl fidl::endpoints::Responder for CapabilityStoreDirConnectorOpenResponder {
3841 type ControlHandle = CapabilityStoreControlHandle;
3842
3843 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3844 &self.control_handle
3845 }
3846
3847 fn drop_without_shutdown(mut self) {
3848 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3850 std::mem::forget(self);
3852 }
3853}
3854
3855impl CapabilityStoreDirConnectorOpenResponder {
3856 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3860 let _result = self.send_raw(result);
3861 if _result.is_err() {
3862 self.control_handle.shutdown();
3863 }
3864 self.drop_without_shutdown();
3865 _result
3866 }
3867
3868 pub fn send_no_shutdown_on_err(
3870 self,
3871 mut result: Result<(), CapabilityStoreError>,
3872 ) -> Result<(), fidl::Error> {
3873 let _result = self.send_raw(result);
3874 self.drop_without_shutdown();
3875 _result
3876 }
3877
3878 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3879 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3880 fidl::encoding::EmptyStruct,
3881 CapabilityStoreError,
3882 >>(
3883 fidl::encoding::FlexibleResult::new(result),
3884 self.tx_id,
3885 0x5650d3d6a3a13901,
3886 fidl::encoding::DynamicFlags::FLEXIBLE,
3887 )
3888 }
3889}
3890
3891#[must_use = "FIDL methods require a response to be sent"]
3892#[derive(Debug)]
3893pub struct CapabilityStoreDictionaryCreateResponder {
3894 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3895 tx_id: u32,
3896}
3897
3898impl std::ops::Drop for CapabilityStoreDictionaryCreateResponder {
3902 fn drop(&mut self) {
3903 self.control_handle.shutdown();
3904 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3906 }
3907}
3908
3909impl fidl::endpoints::Responder for CapabilityStoreDictionaryCreateResponder {
3910 type ControlHandle = CapabilityStoreControlHandle;
3911
3912 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3913 &self.control_handle
3914 }
3915
3916 fn drop_without_shutdown(mut self) {
3917 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3919 std::mem::forget(self);
3921 }
3922}
3923
3924impl CapabilityStoreDictionaryCreateResponder {
3925 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3929 let _result = self.send_raw(result);
3930 if _result.is_err() {
3931 self.control_handle.shutdown();
3932 }
3933 self.drop_without_shutdown();
3934 _result
3935 }
3936
3937 pub fn send_no_shutdown_on_err(
3939 self,
3940 mut result: Result<(), CapabilityStoreError>,
3941 ) -> Result<(), fidl::Error> {
3942 let _result = self.send_raw(result);
3943 self.drop_without_shutdown();
3944 _result
3945 }
3946
3947 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3948 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3949 fidl::encoding::EmptyStruct,
3950 CapabilityStoreError,
3951 >>(
3952 fidl::encoding::FlexibleResult::new(result),
3953 self.tx_id,
3954 0x6997c8dfc63de093,
3955 fidl::encoding::DynamicFlags::FLEXIBLE,
3956 )
3957 }
3958}
3959
3960#[must_use = "FIDL methods require a response to be sent"]
3961#[derive(Debug)]
3962pub struct CapabilityStoreDictionaryLegacyImportResponder {
3963 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
3964 tx_id: u32,
3965}
3966
3967impl std::ops::Drop for CapabilityStoreDictionaryLegacyImportResponder {
3971 fn drop(&mut self) {
3972 self.control_handle.shutdown();
3973 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3975 }
3976}
3977
3978impl fidl::endpoints::Responder for CapabilityStoreDictionaryLegacyImportResponder {
3979 type ControlHandle = CapabilityStoreControlHandle;
3980
3981 fn control_handle(&self) -> &CapabilityStoreControlHandle {
3982 &self.control_handle
3983 }
3984
3985 fn drop_without_shutdown(mut self) {
3986 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3988 std::mem::forget(self);
3990 }
3991}
3992
3993impl CapabilityStoreDictionaryLegacyImportResponder {
3994 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
3998 let _result = self.send_raw(result);
3999 if _result.is_err() {
4000 self.control_handle.shutdown();
4001 }
4002 self.drop_without_shutdown();
4003 _result
4004 }
4005
4006 pub fn send_no_shutdown_on_err(
4008 self,
4009 mut result: Result<(), CapabilityStoreError>,
4010 ) -> Result<(), fidl::Error> {
4011 let _result = self.send_raw(result);
4012 self.drop_without_shutdown();
4013 _result
4014 }
4015
4016 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4017 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4018 fidl::encoding::EmptyStruct,
4019 CapabilityStoreError,
4020 >>(
4021 fidl::encoding::FlexibleResult::new(result),
4022 self.tx_id,
4023 0x72fd686c37b6025f,
4024 fidl::encoding::DynamicFlags::FLEXIBLE,
4025 )
4026 }
4027}
4028
4029#[must_use = "FIDL methods require a response to be sent"]
4030#[derive(Debug)]
4031pub struct CapabilityStoreDictionaryLegacyExportResponder {
4032 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4033 tx_id: u32,
4034}
4035
4036impl std::ops::Drop for CapabilityStoreDictionaryLegacyExportResponder {
4040 fn drop(&mut self) {
4041 self.control_handle.shutdown();
4042 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4044 }
4045}
4046
4047impl fidl::endpoints::Responder for CapabilityStoreDictionaryLegacyExportResponder {
4048 type ControlHandle = CapabilityStoreControlHandle;
4049
4050 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4051 &self.control_handle
4052 }
4053
4054 fn drop_without_shutdown(mut self) {
4055 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4057 std::mem::forget(self);
4059 }
4060}
4061
4062impl CapabilityStoreDictionaryLegacyExportResponder {
4063 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4067 let _result = self.send_raw(result);
4068 if _result.is_err() {
4069 self.control_handle.shutdown();
4070 }
4071 self.drop_without_shutdown();
4072 _result
4073 }
4074
4075 pub fn send_no_shutdown_on_err(
4077 self,
4078 mut result: Result<(), CapabilityStoreError>,
4079 ) -> Result<(), fidl::Error> {
4080 let _result = self.send_raw(result);
4081 self.drop_without_shutdown();
4082 _result
4083 }
4084
4085 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4086 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4087 fidl::encoding::EmptyStruct,
4088 CapabilityStoreError,
4089 >>(
4090 fidl::encoding::FlexibleResult::new(result),
4091 self.tx_id,
4092 0x407e15cc4bde5dcd,
4093 fidl::encoding::DynamicFlags::FLEXIBLE,
4094 )
4095 }
4096}
4097
4098#[must_use = "FIDL methods require a response to be sent"]
4099#[derive(Debug)]
4100pub struct CapabilityStoreDictionaryInsertResponder {
4101 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4102 tx_id: u32,
4103}
4104
4105impl std::ops::Drop for CapabilityStoreDictionaryInsertResponder {
4109 fn drop(&mut self) {
4110 self.control_handle.shutdown();
4111 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4113 }
4114}
4115
4116impl fidl::endpoints::Responder for CapabilityStoreDictionaryInsertResponder {
4117 type ControlHandle = CapabilityStoreControlHandle;
4118
4119 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4120 &self.control_handle
4121 }
4122
4123 fn drop_without_shutdown(mut self) {
4124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4126 std::mem::forget(self);
4128 }
4129}
4130
4131impl CapabilityStoreDictionaryInsertResponder {
4132 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4136 let _result = self.send_raw(result);
4137 if _result.is_err() {
4138 self.control_handle.shutdown();
4139 }
4140 self.drop_without_shutdown();
4141 _result
4142 }
4143
4144 pub fn send_no_shutdown_on_err(
4146 self,
4147 mut result: Result<(), CapabilityStoreError>,
4148 ) -> Result<(), fidl::Error> {
4149 let _result = self.send_raw(result);
4150 self.drop_without_shutdown();
4151 _result
4152 }
4153
4154 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4155 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4156 fidl::encoding::EmptyStruct,
4157 CapabilityStoreError,
4158 >>(
4159 fidl::encoding::FlexibleResult::new(result),
4160 self.tx_id,
4161 0x7702183689d44c27,
4162 fidl::encoding::DynamicFlags::FLEXIBLE,
4163 )
4164 }
4165}
4166
4167#[must_use = "FIDL methods require a response to be sent"]
4168#[derive(Debug)]
4169pub struct CapabilityStoreDictionaryGetResponder {
4170 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4171 tx_id: u32,
4172}
4173
4174impl std::ops::Drop for CapabilityStoreDictionaryGetResponder {
4178 fn drop(&mut self) {
4179 self.control_handle.shutdown();
4180 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4182 }
4183}
4184
4185impl fidl::endpoints::Responder for CapabilityStoreDictionaryGetResponder {
4186 type ControlHandle = CapabilityStoreControlHandle;
4187
4188 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4189 &self.control_handle
4190 }
4191
4192 fn drop_without_shutdown(mut self) {
4193 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4195 std::mem::forget(self);
4197 }
4198}
4199
4200impl CapabilityStoreDictionaryGetResponder {
4201 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4205 let _result = self.send_raw(result);
4206 if _result.is_err() {
4207 self.control_handle.shutdown();
4208 }
4209 self.drop_without_shutdown();
4210 _result
4211 }
4212
4213 pub fn send_no_shutdown_on_err(
4215 self,
4216 mut result: Result<(), CapabilityStoreError>,
4217 ) -> Result<(), fidl::Error> {
4218 let _result = self.send_raw(result);
4219 self.drop_without_shutdown();
4220 _result
4221 }
4222
4223 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4224 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4225 fidl::encoding::EmptyStruct,
4226 CapabilityStoreError,
4227 >>(
4228 fidl::encoding::FlexibleResult::new(result),
4229 self.tx_id,
4230 0x4d9e27538284add2,
4231 fidl::encoding::DynamicFlags::FLEXIBLE,
4232 )
4233 }
4234}
4235
4236#[must_use = "FIDL methods require a response to be sent"]
4237#[derive(Debug)]
4238pub struct CapabilityStoreDictionaryRemoveResponder {
4239 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4240 tx_id: u32,
4241}
4242
4243impl std::ops::Drop for CapabilityStoreDictionaryRemoveResponder {
4247 fn drop(&mut self) {
4248 self.control_handle.shutdown();
4249 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4251 }
4252}
4253
4254impl fidl::endpoints::Responder for CapabilityStoreDictionaryRemoveResponder {
4255 type ControlHandle = CapabilityStoreControlHandle;
4256
4257 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4258 &self.control_handle
4259 }
4260
4261 fn drop_without_shutdown(mut self) {
4262 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4264 std::mem::forget(self);
4266 }
4267}
4268
4269impl CapabilityStoreDictionaryRemoveResponder {
4270 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4274 let _result = self.send_raw(result);
4275 if _result.is_err() {
4276 self.control_handle.shutdown();
4277 }
4278 self.drop_without_shutdown();
4279 _result
4280 }
4281
4282 pub fn send_no_shutdown_on_err(
4284 self,
4285 mut result: Result<(), CapabilityStoreError>,
4286 ) -> Result<(), fidl::Error> {
4287 let _result = self.send_raw(result);
4288 self.drop_without_shutdown();
4289 _result
4290 }
4291
4292 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4293 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4294 fidl::encoding::EmptyStruct,
4295 CapabilityStoreError,
4296 >>(
4297 fidl::encoding::FlexibleResult::new(result),
4298 self.tx_id,
4299 0x4c5c025ab05d4f3,
4300 fidl::encoding::DynamicFlags::FLEXIBLE,
4301 )
4302 }
4303}
4304
4305#[must_use = "FIDL methods require a response to be sent"]
4306#[derive(Debug)]
4307pub struct CapabilityStoreDictionaryCopyResponder {
4308 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4309 tx_id: u32,
4310}
4311
4312impl std::ops::Drop for CapabilityStoreDictionaryCopyResponder {
4316 fn drop(&mut self) {
4317 self.control_handle.shutdown();
4318 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4320 }
4321}
4322
4323impl fidl::endpoints::Responder for CapabilityStoreDictionaryCopyResponder {
4324 type ControlHandle = CapabilityStoreControlHandle;
4325
4326 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4327 &self.control_handle
4328 }
4329
4330 fn drop_without_shutdown(mut self) {
4331 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4333 std::mem::forget(self);
4335 }
4336}
4337
4338impl CapabilityStoreDictionaryCopyResponder {
4339 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4343 let _result = self.send_raw(result);
4344 if _result.is_err() {
4345 self.control_handle.shutdown();
4346 }
4347 self.drop_without_shutdown();
4348 _result
4349 }
4350
4351 pub fn send_no_shutdown_on_err(
4353 self,
4354 mut result: Result<(), CapabilityStoreError>,
4355 ) -> Result<(), fidl::Error> {
4356 let _result = self.send_raw(result);
4357 self.drop_without_shutdown();
4358 _result
4359 }
4360
4361 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4362 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4363 fidl::encoding::EmptyStruct,
4364 CapabilityStoreError,
4365 >>(
4366 fidl::encoding::FlexibleResult::new(result),
4367 self.tx_id,
4368 0x3733ecdf4ea1b44f,
4369 fidl::encoding::DynamicFlags::FLEXIBLE,
4370 )
4371 }
4372}
4373
4374#[must_use = "FIDL methods require a response to be sent"]
4375#[derive(Debug)]
4376pub struct CapabilityStoreDictionaryKeysResponder {
4377 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4378 tx_id: u32,
4379}
4380
4381impl std::ops::Drop for CapabilityStoreDictionaryKeysResponder {
4385 fn drop(&mut self) {
4386 self.control_handle.shutdown();
4387 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4389 }
4390}
4391
4392impl fidl::endpoints::Responder for CapabilityStoreDictionaryKeysResponder {
4393 type ControlHandle = CapabilityStoreControlHandle;
4394
4395 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4396 &self.control_handle
4397 }
4398
4399 fn drop_without_shutdown(mut self) {
4400 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4402 std::mem::forget(self);
4404 }
4405}
4406
4407impl CapabilityStoreDictionaryKeysResponder {
4408 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4412 let _result = self.send_raw(result);
4413 if _result.is_err() {
4414 self.control_handle.shutdown();
4415 }
4416 self.drop_without_shutdown();
4417 _result
4418 }
4419
4420 pub fn send_no_shutdown_on_err(
4422 self,
4423 mut result: Result<(), CapabilityStoreError>,
4424 ) -> Result<(), fidl::Error> {
4425 let _result = self.send_raw(result);
4426 self.drop_without_shutdown();
4427 _result
4428 }
4429
4430 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4431 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4432 fidl::encoding::EmptyStruct,
4433 CapabilityStoreError,
4434 >>(
4435 fidl::encoding::FlexibleResult::new(result),
4436 self.tx_id,
4437 0x84b05577ceaec9e,
4438 fidl::encoding::DynamicFlags::FLEXIBLE,
4439 )
4440 }
4441}
4442
4443#[must_use = "FIDL methods require a response to be sent"]
4444#[derive(Debug)]
4445pub struct CapabilityStoreDictionaryEnumerateResponder {
4446 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4447 tx_id: u32,
4448}
4449
4450impl std::ops::Drop for CapabilityStoreDictionaryEnumerateResponder {
4454 fn drop(&mut self) {
4455 self.control_handle.shutdown();
4456 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4458 }
4459}
4460
4461impl fidl::endpoints::Responder for CapabilityStoreDictionaryEnumerateResponder {
4462 type ControlHandle = CapabilityStoreControlHandle;
4463
4464 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4465 &self.control_handle
4466 }
4467
4468 fn drop_without_shutdown(mut self) {
4469 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4471 std::mem::forget(self);
4473 }
4474}
4475
4476impl CapabilityStoreDictionaryEnumerateResponder {
4477 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4481 let _result = self.send_raw(result);
4482 if _result.is_err() {
4483 self.control_handle.shutdown();
4484 }
4485 self.drop_without_shutdown();
4486 _result
4487 }
4488
4489 pub fn send_no_shutdown_on_err(
4491 self,
4492 mut result: Result<(), CapabilityStoreError>,
4493 ) -> Result<(), fidl::Error> {
4494 let _result = self.send_raw(result);
4495 self.drop_without_shutdown();
4496 _result
4497 }
4498
4499 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4500 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4501 fidl::encoding::EmptyStruct,
4502 CapabilityStoreError,
4503 >>(
4504 fidl::encoding::FlexibleResult::new(result),
4505 self.tx_id,
4506 0xd6279b6ced04641,
4507 fidl::encoding::DynamicFlags::FLEXIBLE,
4508 )
4509 }
4510}
4511
4512#[must_use = "FIDL methods require a response to be sent"]
4513#[derive(Debug)]
4514pub struct CapabilityStoreDictionaryDrainResponder {
4515 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4516 tx_id: u32,
4517}
4518
4519impl std::ops::Drop for CapabilityStoreDictionaryDrainResponder {
4523 fn drop(&mut self) {
4524 self.control_handle.shutdown();
4525 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4527 }
4528}
4529
4530impl fidl::endpoints::Responder for CapabilityStoreDictionaryDrainResponder {
4531 type ControlHandle = CapabilityStoreControlHandle;
4532
4533 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4534 &self.control_handle
4535 }
4536
4537 fn drop_without_shutdown(mut self) {
4538 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4540 std::mem::forget(self);
4542 }
4543}
4544
4545impl CapabilityStoreDictionaryDrainResponder {
4546 pub fn send(self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4550 let _result = self.send_raw(result);
4551 if _result.is_err() {
4552 self.control_handle.shutdown();
4553 }
4554 self.drop_without_shutdown();
4555 _result
4556 }
4557
4558 pub fn send_no_shutdown_on_err(
4560 self,
4561 mut result: Result<(), CapabilityStoreError>,
4562 ) -> Result<(), fidl::Error> {
4563 let _result = self.send_raw(result);
4564 self.drop_without_shutdown();
4565 _result
4566 }
4567
4568 fn send_raw(&self, mut result: Result<(), CapabilityStoreError>) -> Result<(), fidl::Error> {
4569 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4570 fidl::encoding::EmptyStruct,
4571 CapabilityStoreError,
4572 >>(
4573 fidl::encoding::FlexibleResult::new(result),
4574 self.tx_id,
4575 0x28a3a3f84d928cd8,
4576 fidl::encoding::DynamicFlags::FLEXIBLE,
4577 )
4578 }
4579}
4580
4581#[must_use = "FIDL methods require a response to be sent"]
4582#[derive(Debug)]
4583pub struct CapabilityStoreCreateServiceAggregateResponder {
4584 control_handle: std::mem::ManuallyDrop<CapabilityStoreControlHandle>,
4585 tx_id: u32,
4586}
4587
4588impl std::ops::Drop for CapabilityStoreCreateServiceAggregateResponder {
4592 fn drop(&mut self) {
4593 self.control_handle.shutdown();
4594 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4596 }
4597}
4598
4599impl fidl::endpoints::Responder for CapabilityStoreCreateServiceAggregateResponder {
4600 type ControlHandle = CapabilityStoreControlHandle;
4601
4602 fn control_handle(&self) -> &CapabilityStoreControlHandle {
4603 &self.control_handle
4604 }
4605
4606 fn drop_without_shutdown(mut self) {
4607 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4609 std::mem::forget(self);
4611 }
4612}
4613
4614impl CapabilityStoreCreateServiceAggregateResponder {
4615 pub fn send(
4619 self,
4620 mut result: Result<DirConnector, CapabilityStoreError>,
4621 ) -> Result<(), fidl::Error> {
4622 let _result = self.send_raw(result);
4623 if _result.is_err() {
4624 self.control_handle.shutdown();
4625 }
4626 self.drop_without_shutdown();
4627 _result
4628 }
4629
4630 pub fn send_no_shutdown_on_err(
4632 self,
4633 mut result: Result<DirConnector, CapabilityStoreError>,
4634 ) -> Result<(), fidl::Error> {
4635 let _result = self.send_raw(result);
4636 self.drop_without_shutdown();
4637 _result
4638 }
4639
4640 fn send_raw(
4641 &self,
4642 mut result: Result<DirConnector, CapabilityStoreError>,
4643 ) -> Result<(), fidl::Error> {
4644 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4645 CapabilityStoreCreateServiceAggregateResponse,
4646 CapabilityStoreError,
4647 >>(
4648 fidl::encoding::FlexibleResult::new(
4649 result
4650 .as_mut()
4651 .map_err(|e| *e)
4652 .map(|aggregate_dir_connector| (aggregate_dir_connector,)),
4653 ),
4654 self.tx_id,
4655 0x4584116c8085885a,
4656 fidl::encoding::DynamicFlags::FLEXIBLE,
4657 )
4658 }
4659}
4660
4661#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4662pub struct ConnectorRouterMarker;
4663
4664impl fidl::endpoints::ProtocolMarker for ConnectorRouterMarker {
4665 type Proxy = ConnectorRouterProxy;
4666 type RequestStream = ConnectorRouterRequestStream;
4667 #[cfg(target_os = "fuchsia")]
4668 type SynchronousProxy = ConnectorRouterSynchronousProxy;
4669
4670 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
4671}
4672impl fidl::endpoints::DiscoverableProtocolMarker for ConnectorRouterMarker {}
4673pub type ConnectorRouterRouteResult = Result<ConnectorRouterRouteResponse, RouterError>;
4674
4675pub trait ConnectorRouterProxyInterface: Send + Sync {
4676 type RouteResponseFut: std::future::Future<Output = Result<ConnectorRouterRouteResult, fidl::Error>>
4677 + Send;
4678 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
4679}
4680#[derive(Debug)]
4681#[cfg(target_os = "fuchsia")]
4682pub struct ConnectorRouterSynchronousProxy {
4683 client: fidl::client::sync::Client,
4684}
4685
4686#[cfg(target_os = "fuchsia")]
4687impl fidl::endpoints::SynchronousProxy for ConnectorRouterSynchronousProxy {
4688 type Proxy = ConnectorRouterProxy;
4689 type Protocol = ConnectorRouterMarker;
4690
4691 fn from_channel(inner: fidl::Channel) -> Self {
4692 Self::new(inner)
4693 }
4694
4695 fn into_channel(self) -> fidl::Channel {
4696 self.client.into_channel()
4697 }
4698
4699 fn as_channel(&self) -> &fidl::Channel {
4700 self.client.as_channel()
4701 }
4702}
4703
4704#[cfg(target_os = "fuchsia")]
4705impl ConnectorRouterSynchronousProxy {
4706 pub fn new(channel: fidl::Channel) -> Self {
4707 let protocol_name = <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4708 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4709 }
4710
4711 pub fn into_channel(self) -> fidl::Channel {
4712 self.client.into_channel()
4713 }
4714
4715 pub fn wait_for_event(
4718 &self,
4719 deadline: zx::MonotonicInstant,
4720 ) -> Result<ConnectorRouterEvent, fidl::Error> {
4721 ConnectorRouterEvent::decode(self.client.wait_for_event(deadline)?)
4722 }
4723
4724 pub fn r#route(
4725 &self,
4726 mut payload: RouteRequest,
4727 ___deadline: zx::MonotonicInstant,
4728 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
4729 let _response = self.client.send_query::<
4730 RouteRequest,
4731 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
4732 >(
4733 &mut payload,
4734 0x74dbb8bc13730766,
4735 fidl::encoding::DynamicFlags::FLEXIBLE,
4736 ___deadline,
4737 )?
4738 .into_result::<ConnectorRouterMarker>("route")?;
4739 Ok(_response.map(|x| x))
4740 }
4741}
4742
4743#[cfg(target_os = "fuchsia")]
4744impl From<ConnectorRouterSynchronousProxy> for zx::NullableHandle {
4745 fn from(value: ConnectorRouterSynchronousProxy) -> Self {
4746 value.into_channel().into()
4747 }
4748}
4749
4750#[cfg(target_os = "fuchsia")]
4751impl From<fidl::Channel> for ConnectorRouterSynchronousProxy {
4752 fn from(value: fidl::Channel) -> Self {
4753 Self::new(value)
4754 }
4755}
4756
4757#[cfg(target_os = "fuchsia")]
4758impl fidl::endpoints::FromClient for ConnectorRouterSynchronousProxy {
4759 type Protocol = ConnectorRouterMarker;
4760
4761 fn from_client(value: fidl::endpoints::ClientEnd<ConnectorRouterMarker>) -> Self {
4762 Self::new(value.into_channel())
4763 }
4764}
4765
4766#[derive(Debug, Clone)]
4767pub struct ConnectorRouterProxy {
4768 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4769}
4770
4771impl fidl::endpoints::Proxy for ConnectorRouterProxy {
4772 type Protocol = ConnectorRouterMarker;
4773
4774 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4775 Self::new(inner)
4776 }
4777
4778 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4779 self.client.into_channel().map_err(|client| Self { client })
4780 }
4781
4782 fn as_channel(&self) -> &::fidl::AsyncChannel {
4783 self.client.as_channel()
4784 }
4785}
4786
4787impl ConnectorRouterProxy {
4788 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4790 let protocol_name = <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4791 Self { client: fidl::client::Client::new(channel, protocol_name) }
4792 }
4793
4794 pub fn take_event_stream(&self) -> ConnectorRouterEventStream {
4800 ConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
4801 }
4802
4803 pub fn r#route(
4804 &self,
4805 mut payload: RouteRequest,
4806 ) -> fidl::client::QueryResponseFut<
4807 ConnectorRouterRouteResult,
4808 fidl::encoding::DefaultFuchsiaResourceDialect,
4809 > {
4810 ConnectorRouterProxyInterface::r#route(self, payload)
4811 }
4812}
4813
4814impl ConnectorRouterProxyInterface for ConnectorRouterProxy {
4815 type RouteResponseFut = fidl::client::QueryResponseFut<
4816 ConnectorRouterRouteResult,
4817 fidl::encoding::DefaultFuchsiaResourceDialect,
4818 >;
4819 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
4820 fn _decode(
4821 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4822 ) -> Result<ConnectorRouterRouteResult, fidl::Error> {
4823 let _response = fidl::client::decode_transaction_body::<
4824 fidl::encoding::FlexibleResultType<ConnectorRouterRouteResponse, RouterError>,
4825 fidl::encoding::DefaultFuchsiaResourceDialect,
4826 0x74dbb8bc13730766,
4827 >(_buf?)?
4828 .into_result::<ConnectorRouterMarker>("route")?;
4829 Ok(_response.map(|x| x))
4830 }
4831 self.client.send_query_and_decode::<RouteRequest, ConnectorRouterRouteResult>(
4832 &mut payload,
4833 0x74dbb8bc13730766,
4834 fidl::encoding::DynamicFlags::FLEXIBLE,
4835 _decode,
4836 )
4837 }
4838}
4839
4840pub struct ConnectorRouterEventStream {
4841 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4842}
4843
4844impl std::marker::Unpin for ConnectorRouterEventStream {}
4845
4846impl futures::stream::FusedStream for ConnectorRouterEventStream {
4847 fn is_terminated(&self) -> bool {
4848 self.event_receiver.is_terminated()
4849 }
4850}
4851
4852impl futures::Stream for ConnectorRouterEventStream {
4853 type Item = Result<ConnectorRouterEvent, fidl::Error>;
4854
4855 fn poll_next(
4856 mut self: std::pin::Pin<&mut Self>,
4857 cx: &mut std::task::Context<'_>,
4858 ) -> std::task::Poll<Option<Self::Item>> {
4859 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4860 &mut self.event_receiver,
4861 cx
4862 )?) {
4863 Some(buf) => std::task::Poll::Ready(Some(ConnectorRouterEvent::decode(buf))),
4864 None => std::task::Poll::Ready(None),
4865 }
4866 }
4867}
4868
4869#[derive(Debug)]
4870pub enum ConnectorRouterEvent {
4871 #[non_exhaustive]
4872 _UnknownEvent {
4873 ordinal: u64,
4875 },
4876}
4877
4878impl ConnectorRouterEvent {
4879 fn decode(
4881 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4882 ) -> Result<ConnectorRouterEvent, fidl::Error> {
4883 let (bytes, _handles) = buf.split_mut();
4884 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4885 debug_assert_eq!(tx_header.tx_id, 0);
4886 match tx_header.ordinal {
4887 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4888 Ok(ConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4889 }
4890 _ => Err(fidl::Error::UnknownOrdinal {
4891 ordinal: tx_header.ordinal,
4892 protocol_name:
4893 <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4894 }),
4895 }
4896 }
4897}
4898
4899pub struct ConnectorRouterRequestStream {
4901 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4902 is_terminated: bool,
4903}
4904
4905impl std::marker::Unpin for ConnectorRouterRequestStream {}
4906
4907impl futures::stream::FusedStream for ConnectorRouterRequestStream {
4908 fn is_terminated(&self) -> bool {
4909 self.is_terminated
4910 }
4911}
4912
4913impl fidl::endpoints::RequestStream for ConnectorRouterRequestStream {
4914 type Protocol = ConnectorRouterMarker;
4915 type ControlHandle = ConnectorRouterControlHandle;
4916
4917 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4918 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4919 }
4920
4921 fn control_handle(&self) -> Self::ControlHandle {
4922 ConnectorRouterControlHandle { inner: self.inner.clone() }
4923 }
4924
4925 fn into_inner(
4926 self,
4927 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4928 {
4929 (self.inner, self.is_terminated)
4930 }
4931
4932 fn from_inner(
4933 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4934 is_terminated: bool,
4935 ) -> Self {
4936 Self { inner, is_terminated }
4937 }
4938}
4939
4940impl futures::Stream for ConnectorRouterRequestStream {
4941 type Item = Result<ConnectorRouterRequest, fidl::Error>;
4942
4943 fn poll_next(
4944 mut self: std::pin::Pin<&mut Self>,
4945 cx: &mut std::task::Context<'_>,
4946 ) -> std::task::Poll<Option<Self::Item>> {
4947 let this = &mut *self;
4948 if this.inner.check_shutdown(cx) {
4949 this.is_terminated = true;
4950 return std::task::Poll::Ready(None);
4951 }
4952 if this.is_terminated {
4953 panic!("polled ConnectorRouterRequestStream after completion");
4954 }
4955 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4956 |bytes, handles| {
4957 match this.inner.channel().read_etc(cx, bytes, handles) {
4958 std::task::Poll::Ready(Ok(())) => {}
4959 std::task::Poll::Pending => return std::task::Poll::Pending,
4960 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4961 this.is_terminated = true;
4962 return std::task::Poll::Ready(None);
4963 }
4964 std::task::Poll::Ready(Err(e)) => {
4965 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4966 e.into(),
4967 ))));
4968 }
4969 }
4970
4971 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4973
4974 std::task::Poll::Ready(Some(match header.ordinal {
4975 0x74dbb8bc13730766 => {
4976 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4977 let mut req = fidl::new_empty!(
4978 RouteRequest,
4979 fidl::encoding::DefaultFuchsiaResourceDialect
4980 );
4981 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
4982 let control_handle =
4983 ConnectorRouterControlHandle { inner: this.inner.clone() };
4984 Ok(ConnectorRouterRequest::Route {
4985 payload: req,
4986 responder: ConnectorRouterRouteResponder {
4987 control_handle: std::mem::ManuallyDrop::new(control_handle),
4988 tx_id: header.tx_id,
4989 },
4990 })
4991 }
4992 _ if header.tx_id == 0
4993 && header
4994 .dynamic_flags()
4995 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4996 {
4997 Ok(ConnectorRouterRequest::_UnknownMethod {
4998 ordinal: header.ordinal,
4999 control_handle: ConnectorRouterControlHandle {
5000 inner: this.inner.clone(),
5001 },
5002 method_type: fidl::MethodType::OneWay,
5003 })
5004 }
5005 _ if header
5006 .dynamic_flags()
5007 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5008 {
5009 this.inner.send_framework_err(
5010 fidl::encoding::FrameworkErr::UnknownMethod,
5011 header.tx_id,
5012 header.ordinal,
5013 header.dynamic_flags(),
5014 (bytes, handles),
5015 )?;
5016 Ok(ConnectorRouterRequest::_UnknownMethod {
5017 ordinal: header.ordinal,
5018 control_handle: ConnectorRouterControlHandle {
5019 inner: this.inner.clone(),
5020 },
5021 method_type: fidl::MethodType::TwoWay,
5022 })
5023 }
5024 _ => Err(fidl::Error::UnknownOrdinal {
5025 ordinal: header.ordinal,
5026 protocol_name:
5027 <ConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5028 }),
5029 }))
5030 },
5031 )
5032 }
5033}
5034
5035#[derive(Debug)]
5036pub enum ConnectorRouterRequest {
5037 Route {
5038 payload: RouteRequest,
5039 responder: ConnectorRouterRouteResponder,
5040 },
5041 #[non_exhaustive]
5043 _UnknownMethod {
5044 ordinal: u64,
5046 control_handle: ConnectorRouterControlHandle,
5047 method_type: fidl::MethodType,
5048 },
5049}
5050
5051impl ConnectorRouterRequest {
5052 #[allow(irrefutable_let_patterns)]
5053 pub fn into_route(self) -> Option<(RouteRequest, ConnectorRouterRouteResponder)> {
5054 if let ConnectorRouterRequest::Route { payload, responder } = self {
5055 Some((payload, responder))
5056 } else {
5057 None
5058 }
5059 }
5060
5061 pub fn method_name(&self) -> &'static str {
5063 match *self {
5064 ConnectorRouterRequest::Route { .. } => "route",
5065 ConnectorRouterRequest::_UnknownMethod {
5066 method_type: fidl::MethodType::OneWay,
5067 ..
5068 } => "unknown one-way method",
5069 ConnectorRouterRequest::_UnknownMethod {
5070 method_type: fidl::MethodType::TwoWay,
5071 ..
5072 } => "unknown two-way method",
5073 }
5074 }
5075}
5076
5077#[derive(Debug, Clone)]
5078pub struct ConnectorRouterControlHandle {
5079 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5080}
5081
5082impl fidl::endpoints::ControlHandle for ConnectorRouterControlHandle {
5083 fn shutdown(&self) {
5084 self.inner.shutdown()
5085 }
5086
5087 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5088 self.inner.shutdown_with_epitaph(status)
5089 }
5090
5091 fn is_closed(&self) -> bool {
5092 self.inner.channel().is_closed()
5093 }
5094 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5095 self.inner.channel().on_closed()
5096 }
5097
5098 #[cfg(target_os = "fuchsia")]
5099 fn signal_peer(
5100 &self,
5101 clear_mask: zx::Signals,
5102 set_mask: zx::Signals,
5103 ) -> Result<(), zx_status::Status> {
5104 use fidl::Peered;
5105 self.inner.channel().signal_peer(clear_mask, set_mask)
5106 }
5107}
5108
5109impl ConnectorRouterControlHandle {}
5110
5111#[must_use = "FIDL methods require a response to be sent"]
5112#[derive(Debug)]
5113pub struct ConnectorRouterRouteResponder {
5114 control_handle: std::mem::ManuallyDrop<ConnectorRouterControlHandle>,
5115 tx_id: u32,
5116}
5117
5118impl std::ops::Drop for ConnectorRouterRouteResponder {
5122 fn drop(&mut self) {
5123 self.control_handle.shutdown();
5124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5126 }
5127}
5128
5129impl fidl::endpoints::Responder for ConnectorRouterRouteResponder {
5130 type ControlHandle = ConnectorRouterControlHandle;
5131
5132 fn control_handle(&self) -> &ConnectorRouterControlHandle {
5133 &self.control_handle
5134 }
5135
5136 fn drop_without_shutdown(mut self) {
5137 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5139 std::mem::forget(self);
5141 }
5142}
5143
5144impl ConnectorRouterRouteResponder {
5145 pub fn send(
5149 self,
5150 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
5151 ) -> Result<(), fidl::Error> {
5152 let _result = self.send_raw(result);
5153 if _result.is_err() {
5154 self.control_handle.shutdown();
5155 }
5156 self.drop_without_shutdown();
5157 _result
5158 }
5159
5160 pub fn send_no_shutdown_on_err(
5162 self,
5163 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
5164 ) -> Result<(), fidl::Error> {
5165 let _result = self.send_raw(result);
5166 self.drop_without_shutdown();
5167 _result
5168 }
5169
5170 fn send_raw(
5171 &self,
5172 mut result: Result<ConnectorRouterRouteResponse, RouterError>,
5173 ) -> Result<(), fidl::Error> {
5174 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5175 ConnectorRouterRouteResponse,
5176 RouterError,
5177 >>(
5178 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
5179 self.tx_id,
5180 0x74dbb8bc13730766,
5181 fidl::encoding::DynamicFlags::FLEXIBLE,
5182 )
5183 }
5184}
5185
5186#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5187pub struct DataRouterMarker;
5188
5189impl fidl::endpoints::ProtocolMarker for DataRouterMarker {
5190 type Proxy = DataRouterProxy;
5191 type RequestStream = DataRouterRequestStream;
5192 #[cfg(target_os = "fuchsia")]
5193 type SynchronousProxy = DataRouterSynchronousProxy;
5194
5195 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
5196}
5197impl fidl::endpoints::DiscoverableProtocolMarker for DataRouterMarker {}
5198pub type DataRouterRouteResult = Result<DataRouterRouteResponse, RouterError>;
5199
5200pub trait DataRouterProxyInterface: Send + Sync {
5201 type RouteResponseFut: std::future::Future<Output = Result<DataRouterRouteResult, fidl::Error>>
5202 + Send;
5203 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
5204}
5205#[derive(Debug)]
5206#[cfg(target_os = "fuchsia")]
5207pub struct DataRouterSynchronousProxy {
5208 client: fidl::client::sync::Client,
5209}
5210
5211#[cfg(target_os = "fuchsia")]
5212impl fidl::endpoints::SynchronousProxy for DataRouterSynchronousProxy {
5213 type Proxy = DataRouterProxy;
5214 type Protocol = DataRouterMarker;
5215
5216 fn from_channel(inner: fidl::Channel) -> Self {
5217 Self::new(inner)
5218 }
5219
5220 fn into_channel(self) -> fidl::Channel {
5221 self.client.into_channel()
5222 }
5223
5224 fn as_channel(&self) -> &fidl::Channel {
5225 self.client.as_channel()
5226 }
5227}
5228
5229#[cfg(target_os = "fuchsia")]
5230impl DataRouterSynchronousProxy {
5231 pub fn new(channel: fidl::Channel) -> Self {
5232 let protocol_name = <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5233 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5234 }
5235
5236 pub fn into_channel(self) -> fidl::Channel {
5237 self.client.into_channel()
5238 }
5239
5240 pub fn wait_for_event(
5243 &self,
5244 deadline: zx::MonotonicInstant,
5245 ) -> Result<DataRouterEvent, fidl::Error> {
5246 DataRouterEvent::decode(self.client.wait_for_event(deadline)?)
5247 }
5248
5249 pub fn r#route(
5250 &self,
5251 mut payload: RouteRequest,
5252 ___deadline: zx::MonotonicInstant,
5253 ) -> Result<DataRouterRouteResult, fidl::Error> {
5254 let _response = self.client.send_query::<
5255 RouteRequest,
5256 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
5257 >(
5258 &mut payload,
5259 0x2e87dc44dfc53804,
5260 fidl::encoding::DynamicFlags::FLEXIBLE,
5261 ___deadline,
5262 )?
5263 .into_result::<DataRouterMarker>("route")?;
5264 Ok(_response.map(|x| x))
5265 }
5266}
5267
5268#[cfg(target_os = "fuchsia")]
5269impl From<DataRouterSynchronousProxy> for zx::NullableHandle {
5270 fn from(value: DataRouterSynchronousProxy) -> Self {
5271 value.into_channel().into()
5272 }
5273}
5274
5275#[cfg(target_os = "fuchsia")]
5276impl From<fidl::Channel> for DataRouterSynchronousProxy {
5277 fn from(value: fidl::Channel) -> Self {
5278 Self::new(value)
5279 }
5280}
5281
5282#[cfg(target_os = "fuchsia")]
5283impl fidl::endpoints::FromClient for DataRouterSynchronousProxy {
5284 type Protocol = DataRouterMarker;
5285
5286 fn from_client(value: fidl::endpoints::ClientEnd<DataRouterMarker>) -> Self {
5287 Self::new(value.into_channel())
5288 }
5289}
5290
5291#[derive(Debug, Clone)]
5292pub struct DataRouterProxy {
5293 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5294}
5295
5296impl fidl::endpoints::Proxy for DataRouterProxy {
5297 type Protocol = DataRouterMarker;
5298
5299 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5300 Self::new(inner)
5301 }
5302
5303 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5304 self.client.into_channel().map_err(|client| Self { client })
5305 }
5306
5307 fn as_channel(&self) -> &::fidl::AsyncChannel {
5308 self.client.as_channel()
5309 }
5310}
5311
5312impl DataRouterProxy {
5313 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5315 let protocol_name = <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5316 Self { client: fidl::client::Client::new(channel, protocol_name) }
5317 }
5318
5319 pub fn take_event_stream(&self) -> DataRouterEventStream {
5325 DataRouterEventStream { event_receiver: self.client.take_event_receiver() }
5326 }
5327
5328 pub fn r#route(
5329 &self,
5330 mut payload: RouteRequest,
5331 ) -> fidl::client::QueryResponseFut<
5332 DataRouterRouteResult,
5333 fidl::encoding::DefaultFuchsiaResourceDialect,
5334 > {
5335 DataRouterProxyInterface::r#route(self, payload)
5336 }
5337}
5338
5339impl DataRouterProxyInterface for DataRouterProxy {
5340 type RouteResponseFut = fidl::client::QueryResponseFut<
5341 DataRouterRouteResult,
5342 fidl::encoding::DefaultFuchsiaResourceDialect,
5343 >;
5344 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
5345 fn _decode(
5346 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5347 ) -> Result<DataRouterRouteResult, fidl::Error> {
5348 let _response = fidl::client::decode_transaction_body::<
5349 fidl::encoding::FlexibleResultType<DataRouterRouteResponse, RouterError>,
5350 fidl::encoding::DefaultFuchsiaResourceDialect,
5351 0x2e87dc44dfc53804,
5352 >(_buf?)?
5353 .into_result::<DataRouterMarker>("route")?;
5354 Ok(_response.map(|x| x))
5355 }
5356 self.client.send_query_and_decode::<RouteRequest, DataRouterRouteResult>(
5357 &mut payload,
5358 0x2e87dc44dfc53804,
5359 fidl::encoding::DynamicFlags::FLEXIBLE,
5360 _decode,
5361 )
5362 }
5363}
5364
5365pub struct DataRouterEventStream {
5366 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5367}
5368
5369impl std::marker::Unpin for DataRouterEventStream {}
5370
5371impl futures::stream::FusedStream for DataRouterEventStream {
5372 fn is_terminated(&self) -> bool {
5373 self.event_receiver.is_terminated()
5374 }
5375}
5376
5377impl futures::Stream for DataRouterEventStream {
5378 type Item = Result<DataRouterEvent, fidl::Error>;
5379
5380 fn poll_next(
5381 mut self: std::pin::Pin<&mut Self>,
5382 cx: &mut std::task::Context<'_>,
5383 ) -> std::task::Poll<Option<Self::Item>> {
5384 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5385 &mut self.event_receiver,
5386 cx
5387 )?) {
5388 Some(buf) => std::task::Poll::Ready(Some(DataRouterEvent::decode(buf))),
5389 None => std::task::Poll::Ready(None),
5390 }
5391 }
5392}
5393
5394#[derive(Debug)]
5395pub enum DataRouterEvent {
5396 #[non_exhaustive]
5397 _UnknownEvent {
5398 ordinal: u64,
5400 },
5401}
5402
5403impl DataRouterEvent {
5404 fn decode(
5406 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5407 ) -> Result<DataRouterEvent, fidl::Error> {
5408 let (bytes, _handles) = buf.split_mut();
5409 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5410 debug_assert_eq!(tx_header.tx_id, 0);
5411 match tx_header.ordinal {
5412 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5413 Ok(DataRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5414 }
5415 _ => Err(fidl::Error::UnknownOrdinal {
5416 ordinal: tx_header.ordinal,
5417 protocol_name: <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5418 }),
5419 }
5420 }
5421}
5422
5423pub struct DataRouterRequestStream {
5425 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5426 is_terminated: bool,
5427}
5428
5429impl std::marker::Unpin for DataRouterRequestStream {}
5430
5431impl futures::stream::FusedStream for DataRouterRequestStream {
5432 fn is_terminated(&self) -> bool {
5433 self.is_terminated
5434 }
5435}
5436
5437impl fidl::endpoints::RequestStream for DataRouterRequestStream {
5438 type Protocol = DataRouterMarker;
5439 type ControlHandle = DataRouterControlHandle;
5440
5441 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5442 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5443 }
5444
5445 fn control_handle(&self) -> Self::ControlHandle {
5446 DataRouterControlHandle { inner: self.inner.clone() }
5447 }
5448
5449 fn into_inner(
5450 self,
5451 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5452 {
5453 (self.inner, self.is_terminated)
5454 }
5455
5456 fn from_inner(
5457 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5458 is_terminated: bool,
5459 ) -> Self {
5460 Self { inner, is_terminated }
5461 }
5462}
5463
5464impl futures::Stream for DataRouterRequestStream {
5465 type Item = Result<DataRouterRequest, fidl::Error>;
5466
5467 fn poll_next(
5468 mut self: std::pin::Pin<&mut Self>,
5469 cx: &mut std::task::Context<'_>,
5470 ) -> std::task::Poll<Option<Self::Item>> {
5471 let this = &mut *self;
5472 if this.inner.check_shutdown(cx) {
5473 this.is_terminated = true;
5474 return std::task::Poll::Ready(None);
5475 }
5476 if this.is_terminated {
5477 panic!("polled DataRouterRequestStream after completion");
5478 }
5479 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5480 |bytes, handles| {
5481 match this.inner.channel().read_etc(cx, bytes, handles) {
5482 std::task::Poll::Ready(Ok(())) => {}
5483 std::task::Poll::Pending => return std::task::Poll::Pending,
5484 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5485 this.is_terminated = true;
5486 return std::task::Poll::Ready(None);
5487 }
5488 std::task::Poll::Ready(Err(e)) => {
5489 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5490 e.into(),
5491 ))));
5492 }
5493 }
5494
5495 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5497
5498 std::task::Poll::Ready(Some(match header.ordinal {
5499 0x2e87dc44dfc53804 => {
5500 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5501 let mut req = fidl::new_empty!(
5502 RouteRequest,
5503 fidl::encoding::DefaultFuchsiaResourceDialect
5504 );
5505 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
5506 let control_handle = DataRouterControlHandle { inner: this.inner.clone() };
5507 Ok(DataRouterRequest::Route {
5508 payload: req,
5509 responder: DataRouterRouteResponder {
5510 control_handle: std::mem::ManuallyDrop::new(control_handle),
5511 tx_id: header.tx_id,
5512 },
5513 })
5514 }
5515 _ if header.tx_id == 0
5516 && header
5517 .dynamic_flags()
5518 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5519 {
5520 Ok(DataRouterRequest::_UnknownMethod {
5521 ordinal: header.ordinal,
5522 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
5523 method_type: fidl::MethodType::OneWay,
5524 })
5525 }
5526 _ if header
5527 .dynamic_flags()
5528 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5529 {
5530 this.inner.send_framework_err(
5531 fidl::encoding::FrameworkErr::UnknownMethod,
5532 header.tx_id,
5533 header.ordinal,
5534 header.dynamic_flags(),
5535 (bytes, handles),
5536 )?;
5537 Ok(DataRouterRequest::_UnknownMethod {
5538 ordinal: header.ordinal,
5539 control_handle: DataRouterControlHandle { inner: this.inner.clone() },
5540 method_type: fidl::MethodType::TwoWay,
5541 })
5542 }
5543 _ => Err(fidl::Error::UnknownOrdinal {
5544 ordinal: header.ordinal,
5545 protocol_name:
5546 <DataRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5547 }),
5548 }))
5549 },
5550 )
5551 }
5552}
5553
5554#[derive(Debug)]
5555pub enum DataRouterRequest {
5556 Route {
5557 payload: RouteRequest,
5558 responder: DataRouterRouteResponder,
5559 },
5560 #[non_exhaustive]
5562 _UnknownMethod {
5563 ordinal: u64,
5565 control_handle: DataRouterControlHandle,
5566 method_type: fidl::MethodType,
5567 },
5568}
5569
5570impl DataRouterRequest {
5571 #[allow(irrefutable_let_patterns)]
5572 pub fn into_route(self) -> Option<(RouteRequest, DataRouterRouteResponder)> {
5573 if let DataRouterRequest::Route { payload, responder } = self {
5574 Some((payload, responder))
5575 } else {
5576 None
5577 }
5578 }
5579
5580 pub fn method_name(&self) -> &'static str {
5582 match *self {
5583 DataRouterRequest::Route { .. } => "route",
5584 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
5585 "unknown one-way method"
5586 }
5587 DataRouterRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
5588 "unknown two-way method"
5589 }
5590 }
5591 }
5592}
5593
5594#[derive(Debug, Clone)]
5595pub struct DataRouterControlHandle {
5596 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5597}
5598
5599impl fidl::endpoints::ControlHandle for DataRouterControlHandle {
5600 fn shutdown(&self) {
5601 self.inner.shutdown()
5602 }
5603
5604 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5605 self.inner.shutdown_with_epitaph(status)
5606 }
5607
5608 fn is_closed(&self) -> bool {
5609 self.inner.channel().is_closed()
5610 }
5611 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5612 self.inner.channel().on_closed()
5613 }
5614
5615 #[cfg(target_os = "fuchsia")]
5616 fn signal_peer(
5617 &self,
5618 clear_mask: zx::Signals,
5619 set_mask: zx::Signals,
5620 ) -> Result<(), zx_status::Status> {
5621 use fidl::Peered;
5622 self.inner.channel().signal_peer(clear_mask, set_mask)
5623 }
5624}
5625
5626impl DataRouterControlHandle {}
5627
5628#[must_use = "FIDL methods require a response to be sent"]
5629#[derive(Debug)]
5630pub struct DataRouterRouteResponder {
5631 control_handle: std::mem::ManuallyDrop<DataRouterControlHandle>,
5632 tx_id: u32,
5633}
5634
5635impl std::ops::Drop for DataRouterRouteResponder {
5639 fn drop(&mut self) {
5640 self.control_handle.shutdown();
5641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5643 }
5644}
5645
5646impl fidl::endpoints::Responder for DataRouterRouteResponder {
5647 type ControlHandle = DataRouterControlHandle;
5648
5649 fn control_handle(&self) -> &DataRouterControlHandle {
5650 &self.control_handle
5651 }
5652
5653 fn drop_without_shutdown(mut self) {
5654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5656 std::mem::forget(self);
5658 }
5659}
5660
5661impl DataRouterRouteResponder {
5662 pub fn send(
5666 self,
5667 mut result: Result<DataRouterRouteResponse, RouterError>,
5668 ) -> Result<(), fidl::Error> {
5669 let _result = self.send_raw(result);
5670 if _result.is_err() {
5671 self.control_handle.shutdown();
5672 }
5673 self.drop_without_shutdown();
5674 _result
5675 }
5676
5677 pub fn send_no_shutdown_on_err(
5679 self,
5680 mut result: Result<DataRouterRouteResponse, RouterError>,
5681 ) -> Result<(), fidl::Error> {
5682 let _result = self.send_raw(result);
5683 self.drop_without_shutdown();
5684 _result
5685 }
5686
5687 fn send_raw(
5688 &self,
5689 mut result: Result<DataRouterRouteResponse, RouterError>,
5690 ) -> Result<(), fidl::Error> {
5691 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5692 DataRouterRouteResponse,
5693 RouterError,
5694 >>(
5695 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
5696 self.tx_id,
5697 0x2e87dc44dfc53804,
5698 fidl::encoding::DynamicFlags::FLEXIBLE,
5699 )
5700 }
5701}
5702
5703#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5704pub struct DictionaryMarker;
5705
5706impl fidl::endpoints::ProtocolMarker for DictionaryMarker {
5707 type Proxy = DictionaryProxy;
5708 type RequestStream = DictionaryRequestStream;
5709 #[cfg(target_os = "fuchsia")]
5710 type SynchronousProxy = DictionarySynchronousProxy;
5711
5712 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
5713}
5714impl fidl::endpoints::DiscoverableProtocolMarker for DictionaryMarker {}
5715
5716pub trait DictionaryProxyInterface: Send + Sync {}
5717#[derive(Debug)]
5718#[cfg(target_os = "fuchsia")]
5719pub struct DictionarySynchronousProxy {
5720 client: fidl::client::sync::Client,
5721}
5722
5723#[cfg(target_os = "fuchsia")]
5724impl fidl::endpoints::SynchronousProxy for DictionarySynchronousProxy {
5725 type Proxy = DictionaryProxy;
5726 type Protocol = DictionaryMarker;
5727
5728 fn from_channel(inner: fidl::Channel) -> Self {
5729 Self::new(inner)
5730 }
5731
5732 fn into_channel(self) -> fidl::Channel {
5733 self.client.into_channel()
5734 }
5735
5736 fn as_channel(&self) -> &fidl::Channel {
5737 self.client.as_channel()
5738 }
5739}
5740
5741#[cfg(target_os = "fuchsia")]
5742impl DictionarySynchronousProxy {
5743 pub fn new(channel: fidl::Channel) -> Self {
5744 let protocol_name = <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5745 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5746 }
5747
5748 pub fn into_channel(self) -> fidl::Channel {
5749 self.client.into_channel()
5750 }
5751
5752 pub fn wait_for_event(
5755 &self,
5756 deadline: zx::MonotonicInstant,
5757 ) -> Result<DictionaryEvent, fidl::Error> {
5758 DictionaryEvent::decode(self.client.wait_for_event(deadline)?)
5759 }
5760}
5761
5762#[cfg(target_os = "fuchsia")]
5763impl From<DictionarySynchronousProxy> for zx::NullableHandle {
5764 fn from(value: DictionarySynchronousProxy) -> Self {
5765 value.into_channel().into()
5766 }
5767}
5768
5769#[cfg(target_os = "fuchsia")]
5770impl From<fidl::Channel> for DictionarySynchronousProxy {
5771 fn from(value: fidl::Channel) -> Self {
5772 Self::new(value)
5773 }
5774}
5775
5776#[cfg(target_os = "fuchsia")]
5777impl fidl::endpoints::FromClient for DictionarySynchronousProxy {
5778 type Protocol = DictionaryMarker;
5779
5780 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryMarker>) -> Self {
5781 Self::new(value.into_channel())
5782 }
5783}
5784
5785#[derive(Debug, Clone)]
5786pub struct DictionaryProxy {
5787 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5788}
5789
5790impl fidl::endpoints::Proxy for DictionaryProxy {
5791 type Protocol = DictionaryMarker;
5792
5793 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5794 Self::new(inner)
5795 }
5796
5797 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5798 self.client.into_channel().map_err(|client| Self { client })
5799 }
5800
5801 fn as_channel(&self) -> &::fidl::AsyncChannel {
5802 self.client.as_channel()
5803 }
5804}
5805
5806impl DictionaryProxy {
5807 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5809 let protocol_name = <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5810 Self { client: fidl::client::Client::new(channel, protocol_name) }
5811 }
5812
5813 pub fn take_event_stream(&self) -> DictionaryEventStream {
5819 DictionaryEventStream { event_receiver: self.client.take_event_receiver() }
5820 }
5821}
5822
5823impl DictionaryProxyInterface for DictionaryProxy {}
5824
5825pub struct DictionaryEventStream {
5826 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5827}
5828
5829impl std::marker::Unpin for DictionaryEventStream {}
5830
5831impl futures::stream::FusedStream for DictionaryEventStream {
5832 fn is_terminated(&self) -> bool {
5833 self.event_receiver.is_terminated()
5834 }
5835}
5836
5837impl futures::Stream for DictionaryEventStream {
5838 type Item = Result<DictionaryEvent, fidl::Error>;
5839
5840 fn poll_next(
5841 mut self: std::pin::Pin<&mut Self>,
5842 cx: &mut std::task::Context<'_>,
5843 ) -> std::task::Poll<Option<Self::Item>> {
5844 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5845 &mut self.event_receiver,
5846 cx
5847 )?) {
5848 Some(buf) => std::task::Poll::Ready(Some(DictionaryEvent::decode(buf))),
5849 None => std::task::Poll::Ready(None),
5850 }
5851 }
5852}
5853
5854#[derive(Debug)]
5855pub enum DictionaryEvent {
5856 #[non_exhaustive]
5857 _UnknownEvent {
5858 ordinal: u64,
5860 },
5861}
5862
5863impl DictionaryEvent {
5864 fn decode(
5866 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5867 ) -> Result<DictionaryEvent, fidl::Error> {
5868 let (bytes, _handles) = buf.split_mut();
5869 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5870 debug_assert_eq!(tx_header.tx_id, 0);
5871 match tx_header.ordinal {
5872 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5873 Ok(DictionaryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5874 }
5875 _ => Err(fidl::Error::UnknownOrdinal {
5876 ordinal: tx_header.ordinal,
5877 protocol_name: <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5878 }),
5879 }
5880 }
5881}
5882
5883pub struct DictionaryRequestStream {
5885 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5886 is_terminated: bool,
5887}
5888
5889impl std::marker::Unpin for DictionaryRequestStream {}
5890
5891impl futures::stream::FusedStream for DictionaryRequestStream {
5892 fn is_terminated(&self) -> bool {
5893 self.is_terminated
5894 }
5895}
5896
5897impl fidl::endpoints::RequestStream for DictionaryRequestStream {
5898 type Protocol = DictionaryMarker;
5899 type ControlHandle = DictionaryControlHandle;
5900
5901 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5902 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5903 }
5904
5905 fn control_handle(&self) -> Self::ControlHandle {
5906 DictionaryControlHandle { inner: self.inner.clone() }
5907 }
5908
5909 fn into_inner(
5910 self,
5911 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5912 {
5913 (self.inner, self.is_terminated)
5914 }
5915
5916 fn from_inner(
5917 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5918 is_terminated: bool,
5919 ) -> Self {
5920 Self { inner, is_terminated }
5921 }
5922}
5923
5924impl futures::Stream for DictionaryRequestStream {
5925 type Item = Result<DictionaryRequest, fidl::Error>;
5926
5927 fn poll_next(
5928 mut self: std::pin::Pin<&mut Self>,
5929 cx: &mut std::task::Context<'_>,
5930 ) -> std::task::Poll<Option<Self::Item>> {
5931 let this = &mut *self;
5932 if this.inner.check_shutdown(cx) {
5933 this.is_terminated = true;
5934 return std::task::Poll::Ready(None);
5935 }
5936 if this.is_terminated {
5937 panic!("polled DictionaryRequestStream after completion");
5938 }
5939 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5940 |bytes, handles| {
5941 match this.inner.channel().read_etc(cx, bytes, handles) {
5942 std::task::Poll::Ready(Ok(())) => {}
5943 std::task::Poll::Pending => return std::task::Poll::Pending,
5944 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5945 this.is_terminated = true;
5946 return std::task::Poll::Ready(None);
5947 }
5948 std::task::Poll::Ready(Err(e)) => {
5949 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5950 e.into(),
5951 ))));
5952 }
5953 }
5954
5955 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5957
5958 std::task::Poll::Ready(Some(match header.ordinal {
5959 _ if header.tx_id == 0
5960 && header
5961 .dynamic_flags()
5962 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5963 {
5964 Ok(DictionaryRequest::_UnknownMethod {
5965 ordinal: header.ordinal,
5966 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5967 method_type: fidl::MethodType::OneWay,
5968 })
5969 }
5970 _ if header
5971 .dynamic_flags()
5972 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5973 {
5974 this.inner.send_framework_err(
5975 fidl::encoding::FrameworkErr::UnknownMethod,
5976 header.tx_id,
5977 header.ordinal,
5978 header.dynamic_flags(),
5979 (bytes, handles),
5980 )?;
5981 Ok(DictionaryRequest::_UnknownMethod {
5982 ordinal: header.ordinal,
5983 control_handle: DictionaryControlHandle { inner: this.inner.clone() },
5984 method_type: fidl::MethodType::TwoWay,
5985 })
5986 }
5987 _ => Err(fidl::Error::UnknownOrdinal {
5988 ordinal: header.ordinal,
5989 protocol_name:
5990 <DictionaryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5991 }),
5992 }))
5993 },
5994 )
5995 }
5996}
5997
5998#[derive(Debug)]
5999pub enum DictionaryRequest {
6000 #[non_exhaustive]
6002 _UnknownMethod {
6003 ordinal: u64,
6005 control_handle: DictionaryControlHandle,
6006 method_type: fidl::MethodType,
6007 },
6008}
6009
6010impl DictionaryRequest {
6011 pub fn method_name(&self) -> &'static str {
6013 match *self {
6014 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
6015 "unknown one-way method"
6016 }
6017 DictionaryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
6018 "unknown two-way method"
6019 }
6020 }
6021 }
6022}
6023
6024#[derive(Debug, Clone)]
6025pub struct DictionaryControlHandle {
6026 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6027}
6028
6029impl fidl::endpoints::ControlHandle for DictionaryControlHandle {
6030 fn shutdown(&self) {
6031 self.inner.shutdown()
6032 }
6033
6034 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6035 self.inner.shutdown_with_epitaph(status)
6036 }
6037
6038 fn is_closed(&self) -> bool {
6039 self.inner.channel().is_closed()
6040 }
6041 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6042 self.inner.channel().on_closed()
6043 }
6044
6045 #[cfg(target_os = "fuchsia")]
6046 fn signal_peer(
6047 &self,
6048 clear_mask: zx::Signals,
6049 set_mask: zx::Signals,
6050 ) -> Result<(), zx_status::Status> {
6051 use fidl::Peered;
6052 self.inner.channel().signal_peer(clear_mask, set_mask)
6053 }
6054}
6055
6056impl DictionaryControlHandle {}
6057
6058#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6059pub struct DictionaryDrainIteratorMarker;
6060
6061impl fidl::endpoints::ProtocolMarker for DictionaryDrainIteratorMarker {
6062 type Proxy = DictionaryDrainIteratorProxy;
6063 type RequestStream = DictionaryDrainIteratorRequestStream;
6064 #[cfg(target_os = "fuchsia")]
6065 type SynchronousProxy = DictionaryDrainIteratorSynchronousProxy;
6066
6067 const DEBUG_NAME: &'static str = "(anonymous) DictionaryDrainIterator";
6068}
6069pub type DictionaryDrainIteratorGetNextResult =
6070 Result<(Vec<DictionaryItem>, u64), CapabilityStoreError>;
6071
6072pub trait DictionaryDrainIteratorProxyInterface: Send + Sync {
6073 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryDrainIteratorGetNextResult, fidl::Error>>
6074 + Send;
6075 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
6076}
6077#[derive(Debug)]
6078#[cfg(target_os = "fuchsia")]
6079pub struct DictionaryDrainIteratorSynchronousProxy {
6080 client: fidl::client::sync::Client,
6081}
6082
6083#[cfg(target_os = "fuchsia")]
6084impl fidl::endpoints::SynchronousProxy for DictionaryDrainIteratorSynchronousProxy {
6085 type Proxy = DictionaryDrainIteratorProxy;
6086 type Protocol = DictionaryDrainIteratorMarker;
6087
6088 fn from_channel(inner: fidl::Channel) -> Self {
6089 Self::new(inner)
6090 }
6091
6092 fn into_channel(self) -> fidl::Channel {
6093 self.client.into_channel()
6094 }
6095
6096 fn as_channel(&self) -> &fidl::Channel {
6097 self.client.as_channel()
6098 }
6099}
6100
6101#[cfg(target_os = "fuchsia")]
6102impl DictionaryDrainIteratorSynchronousProxy {
6103 pub fn new(channel: fidl::Channel) -> Self {
6104 let protocol_name =
6105 <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6106 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6107 }
6108
6109 pub fn into_channel(self) -> fidl::Channel {
6110 self.client.into_channel()
6111 }
6112
6113 pub fn wait_for_event(
6116 &self,
6117 deadline: zx::MonotonicInstant,
6118 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
6119 DictionaryDrainIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6120 }
6121
6122 pub fn r#get_next(
6139 &self,
6140 mut start_id: u64,
6141 mut limit: u32,
6142 ___deadline: zx::MonotonicInstant,
6143 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
6144 let _response = self
6145 .client
6146 .send_query::<DictionaryDrainIteratorGetNextRequest, fidl::encoding::FlexibleResultType<
6147 DictionaryDrainIteratorGetNextResponse,
6148 CapabilityStoreError,
6149 >>(
6150 (start_id, limit),
6151 0x4f8082ca1ee26061,
6152 fidl::encoding::DynamicFlags::FLEXIBLE,
6153 ___deadline,
6154 )?
6155 .into_result::<DictionaryDrainIteratorMarker>("get_next")?;
6156 Ok(_response.map(|x| (x.items, x.end_id)))
6157 }
6158}
6159
6160#[cfg(target_os = "fuchsia")]
6161impl From<DictionaryDrainIteratorSynchronousProxy> for zx::NullableHandle {
6162 fn from(value: DictionaryDrainIteratorSynchronousProxy) -> Self {
6163 value.into_channel().into()
6164 }
6165}
6166
6167#[cfg(target_os = "fuchsia")]
6168impl From<fidl::Channel> for DictionaryDrainIteratorSynchronousProxy {
6169 fn from(value: fidl::Channel) -> Self {
6170 Self::new(value)
6171 }
6172}
6173
6174#[cfg(target_os = "fuchsia")]
6175impl fidl::endpoints::FromClient for DictionaryDrainIteratorSynchronousProxy {
6176 type Protocol = DictionaryDrainIteratorMarker;
6177
6178 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryDrainIteratorMarker>) -> Self {
6179 Self::new(value.into_channel())
6180 }
6181}
6182
6183#[derive(Debug, Clone)]
6184pub struct DictionaryDrainIteratorProxy {
6185 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6186}
6187
6188impl fidl::endpoints::Proxy for DictionaryDrainIteratorProxy {
6189 type Protocol = DictionaryDrainIteratorMarker;
6190
6191 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6192 Self::new(inner)
6193 }
6194
6195 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6196 self.client.into_channel().map_err(|client| Self { client })
6197 }
6198
6199 fn as_channel(&self) -> &::fidl::AsyncChannel {
6200 self.client.as_channel()
6201 }
6202}
6203
6204impl DictionaryDrainIteratorProxy {
6205 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6207 let protocol_name =
6208 <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6209 Self { client: fidl::client::Client::new(channel, protocol_name) }
6210 }
6211
6212 pub fn take_event_stream(&self) -> DictionaryDrainIteratorEventStream {
6218 DictionaryDrainIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6219 }
6220
6221 pub fn r#get_next(
6238 &self,
6239 mut start_id: u64,
6240 mut limit: u32,
6241 ) -> fidl::client::QueryResponseFut<
6242 DictionaryDrainIteratorGetNextResult,
6243 fidl::encoding::DefaultFuchsiaResourceDialect,
6244 > {
6245 DictionaryDrainIteratorProxyInterface::r#get_next(self, start_id, limit)
6246 }
6247}
6248
6249impl DictionaryDrainIteratorProxyInterface for DictionaryDrainIteratorProxy {
6250 type GetNextResponseFut = fidl::client::QueryResponseFut<
6251 DictionaryDrainIteratorGetNextResult,
6252 fidl::encoding::DefaultFuchsiaResourceDialect,
6253 >;
6254 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
6255 fn _decode(
6256 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6257 ) -> Result<DictionaryDrainIteratorGetNextResult, fidl::Error> {
6258 let _response = fidl::client::decode_transaction_body::<
6259 fidl::encoding::FlexibleResultType<
6260 DictionaryDrainIteratorGetNextResponse,
6261 CapabilityStoreError,
6262 >,
6263 fidl::encoding::DefaultFuchsiaResourceDialect,
6264 0x4f8082ca1ee26061,
6265 >(_buf?)?
6266 .into_result::<DictionaryDrainIteratorMarker>("get_next")?;
6267 Ok(_response.map(|x| (x.items, x.end_id)))
6268 }
6269 self.client.send_query_and_decode::<
6270 DictionaryDrainIteratorGetNextRequest,
6271 DictionaryDrainIteratorGetNextResult,
6272 >(
6273 (start_id, limit,),
6274 0x4f8082ca1ee26061,
6275 fidl::encoding::DynamicFlags::FLEXIBLE,
6276 _decode,
6277 )
6278 }
6279}
6280
6281pub struct DictionaryDrainIteratorEventStream {
6282 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6283}
6284
6285impl std::marker::Unpin for DictionaryDrainIteratorEventStream {}
6286
6287impl futures::stream::FusedStream for DictionaryDrainIteratorEventStream {
6288 fn is_terminated(&self) -> bool {
6289 self.event_receiver.is_terminated()
6290 }
6291}
6292
6293impl futures::Stream for DictionaryDrainIteratorEventStream {
6294 type Item = Result<DictionaryDrainIteratorEvent, fidl::Error>;
6295
6296 fn poll_next(
6297 mut self: std::pin::Pin<&mut Self>,
6298 cx: &mut std::task::Context<'_>,
6299 ) -> std::task::Poll<Option<Self::Item>> {
6300 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6301 &mut self.event_receiver,
6302 cx
6303 )?) {
6304 Some(buf) => std::task::Poll::Ready(Some(DictionaryDrainIteratorEvent::decode(buf))),
6305 None => std::task::Poll::Ready(None),
6306 }
6307 }
6308}
6309
6310#[derive(Debug)]
6311pub enum DictionaryDrainIteratorEvent {
6312 #[non_exhaustive]
6313 _UnknownEvent {
6314 ordinal: u64,
6316 },
6317}
6318
6319impl DictionaryDrainIteratorEvent {
6320 fn decode(
6322 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6323 ) -> Result<DictionaryDrainIteratorEvent, fidl::Error> {
6324 let (bytes, _handles) = buf.split_mut();
6325 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6326 debug_assert_eq!(tx_header.tx_id, 0);
6327 match tx_header.ordinal {
6328 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6329 Ok(DictionaryDrainIteratorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6330 }
6331 _ => Err(fidl::Error::UnknownOrdinal {
6332 ordinal: tx_header.ordinal,
6333 protocol_name:
6334 <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6335 }),
6336 }
6337 }
6338}
6339
6340pub struct DictionaryDrainIteratorRequestStream {
6342 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6343 is_terminated: bool,
6344}
6345
6346impl std::marker::Unpin for DictionaryDrainIteratorRequestStream {}
6347
6348impl futures::stream::FusedStream for DictionaryDrainIteratorRequestStream {
6349 fn is_terminated(&self) -> bool {
6350 self.is_terminated
6351 }
6352}
6353
6354impl fidl::endpoints::RequestStream for DictionaryDrainIteratorRequestStream {
6355 type Protocol = DictionaryDrainIteratorMarker;
6356 type ControlHandle = DictionaryDrainIteratorControlHandle;
6357
6358 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6359 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6360 }
6361
6362 fn control_handle(&self) -> Self::ControlHandle {
6363 DictionaryDrainIteratorControlHandle { inner: self.inner.clone() }
6364 }
6365
6366 fn into_inner(
6367 self,
6368 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6369 {
6370 (self.inner, self.is_terminated)
6371 }
6372
6373 fn from_inner(
6374 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6375 is_terminated: bool,
6376 ) -> Self {
6377 Self { inner, is_terminated }
6378 }
6379}
6380
6381impl futures::Stream for DictionaryDrainIteratorRequestStream {
6382 type Item = Result<DictionaryDrainIteratorRequest, fidl::Error>;
6383
6384 fn poll_next(
6385 mut self: std::pin::Pin<&mut Self>,
6386 cx: &mut std::task::Context<'_>,
6387 ) -> std::task::Poll<Option<Self::Item>> {
6388 let this = &mut *self;
6389 if this.inner.check_shutdown(cx) {
6390 this.is_terminated = true;
6391 return std::task::Poll::Ready(None);
6392 }
6393 if this.is_terminated {
6394 panic!("polled DictionaryDrainIteratorRequestStream after completion");
6395 }
6396 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6397 |bytes, handles| {
6398 match this.inner.channel().read_etc(cx, bytes, handles) {
6399 std::task::Poll::Ready(Ok(())) => {}
6400 std::task::Poll::Pending => return std::task::Poll::Pending,
6401 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6402 this.is_terminated = true;
6403 return std::task::Poll::Ready(None);
6404 }
6405 std::task::Poll::Ready(Err(e)) => {
6406 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6407 e.into(),
6408 ))));
6409 }
6410 }
6411
6412 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6414
6415 std::task::Poll::Ready(Some(match header.ordinal {
6416 0x4f8082ca1ee26061 => {
6417 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6418 let mut req = fidl::new_empty!(DictionaryDrainIteratorGetNextRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
6419 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DictionaryDrainIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
6420 let control_handle = DictionaryDrainIteratorControlHandle {
6421 inner: this.inner.clone(),
6422 };
6423 Ok(DictionaryDrainIteratorRequest::GetNext {start_id: req.start_id,
6424limit: req.limit,
6425
6426 responder: DictionaryDrainIteratorGetNextResponder {
6427 control_handle: std::mem::ManuallyDrop::new(control_handle),
6428 tx_id: header.tx_id,
6429 },
6430 })
6431 }
6432 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6433 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
6434 ordinal: header.ordinal,
6435 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
6436 method_type: fidl::MethodType::OneWay,
6437 })
6438 }
6439 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6440 this.inner.send_framework_err(
6441 fidl::encoding::FrameworkErr::UnknownMethod,
6442 header.tx_id,
6443 header.ordinal,
6444 header.dynamic_flags(),
6445 (bytes, handles),
6446 )?;
6447 Ok(DictionaryDrainIteratorRequest::_UnknownMethod {
6448 ordinal: header.ordinal,
6449 control_handle: DictionaryDrainIteratorControlHandle { inner: this.inner.clone() },
6450 method_type: fidl::MethodType::TwoWay,
6451 })
6452 }
6453 _ => Err(fidl::Error::UnknownOrdinal {
6454 ordinal: header.ordinal,
6455 protocol_name: <DictionaryDrainIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6456 }),
6457 }))
6458 },
6459 )
6460 }
6461}
6462
6463#[derive(Debug)]
6464pub enum DictionaryDrainIteratorRequest {
6465 GetNext { start_id: u64, limit: u32, responder: DictionaryDrainIteratorGetNextResponder },
6482 #[non_exhaustive]
6484 _UnknownMethod {
6485 ordinal: u64,
6487 control_handle: DictionaryDrainIteratorControlHandle,
6488 method_type: fidl::MethodType,
6489 },
6490}
6491
6492impl DictionaryDrainIteratorRequest {
6493 #[allow(irrefutable_let_patterns)]
6494 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryDrainIteratorGetNextResponder)> {
6495 if let DictionaryDrainIteratorRequest::GetNext { start_id, limit, responder } = self {
6496 Some((start_id, limit, responder))
6497 } else {
6498 None
6499 }
6500 }
6501
6502 pub fn method_name(&self) -> &'static str {
6504 match *self {
6505 DictionaryDrainIteratorRequest::GetNext { .. } => "get_next",
6506 DictionaryDrainIteratorRequest::_UnknownMethod {
6507 method_type: fidl::MethodType::OneWay,
6508 ..
6509 } => "unknown one-way method",
6510 DictionaryDrainIteratorRequest::_UnknownMethod {
6511 method_type: fidl::MethodType::TwoWay,
6512 ..
6513 } => "unknown two-way method",
6514 }
6515 }
6516}
6517
6518#[derive(Debug, Clone)]
6519pub struct DictionaryDrainIteratorControlHandle {
6520 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6521}
6522
6523impl fidl::endpoints::ControlHandle for DictionaryDrainIteratorControlHandle {
6524 fn shutdown(&self) {
6525 self.inner.shutdown()
6526 }
6527
6528 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6529 self.inner.shutdown_with_epitaph(status)
6530 }
6531
6532 fn is_closed(&self) -> bool {
6533 self.inner.channel().is_closed()
6534 }
6535 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6536 self.inner.channel().on_closed()
6537 }
6538
6539 #[cfg(target_os = "fuchsia")]
6540 fn signal_peer(
6541 &self,
6542 clear_mask: zx::Signals,
6543 set_mask: zx::Signals,
6544 ) -> Result<(), zx_status::Status> {
6545 use fidl::Peered;
6546 self.inner.channel().signal_peer(clear_mask, set_mask)
6547 }
6548}
6549
6550impl DictionaryDrainIteratorControlHandle {}
6551
6552#[must_use = "FIDL methods require a response to be sent"]
6553#[derive(Debug)]
6554pub struct DictionaryDrainIteratorGetNextResponder {
6555 control_handle: std::mem::ManuallyDrop<DictionaryDrainIteratorControlHandle>,
6556 tx_id: u32,
6557}
6558
6559impl std::ops::Drop for DictionaryDrainIteratorGetNextResponder {
6563 fn drop(&mut self) {
6564 self.control_handle.shutdown();
6565 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6567 }
6568}
6569
6570impl fidl::endpoints::Responder for DictionaryDrainIteratorGetNextResponder {
6571 type ControlHandle = DictionaryDrainIteratorControlHandle;
6572
6573 fn control_handle(&self) -> &DictionaryDrainIteratorControlHandle {
6574 &self.control_handle
6575 }
6576
6577 fn drop_without_shutdown(mut self) {
6578 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6580 std::mem::forget(self);
6582 }
6583}
6584
6585impl DictionaryDrainIteratorGetNextResponder {
6586 pub fn send(
6590 self,
6591 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
6592 ) -> Result<(), fidl::Error> {
6593 let _result = self.send_raw(result);
6594 if _result.is_err() {
6595 self.control_handle.shutdown();
6596 }
6597 self.drop_without_shutdown();
6598 _result
6599 }
6600
6601 pub fn send_no_shutdown_on_err(
6603 self,
6604 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
6605 ) -> Result<(), fidl::Error> {
6606 let _result = self.send_raw(result);
6607 self.drop_without_shutdown();
6608 _result
6609 }
6610
6611 fn send_raw(
6612 &self,
6613 mut result: Result<(&[DictionaryItem], u64), CapabilityStoreError>,
6614 ) -> Result<(), fidl::Error> {
6615 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6616 DictionaryDrainIteratorGetNextResponse,
6617 CapabilityStoreError,
6618 >>(
6619 fidl::encoding::FlexibleResult::new(result),
6620 self.tx_id,
6621 0x4f8082ca1ee26061,
6622 fidl::encoding::DynamicFlags::FLEXIBLE,
6623 )
6624 }
6625}
6626
6627#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6628pub struct DictionaryEnumerateIteratorMarker;
6629
6630impl fidl::endpoints::ProtocolMarker for DictionaryEnumerateIteratorMarker {
6631 type Proxy = DictionaryEnumerateIteratorProxy;
6632 type RequestStream = DictionaryEnumerateIteratorRequestStream;
6633 #[cfg(target_os = "fuchsia")]
6634 type SynchronousProxy = DictionaryEnumerateIteratorSynchronousProxy;
6635
6636 const DEBUG_NAME: &'static str = "(anonymous) DictionaryEnumerateIterator";
6637}
6638pub type DictionaryEnumerateIteratorGetNextResult =
6639 Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>;
6640
6641pub trait DictionaryEnumerateIteratorProxyInterface: Send + Sync {
6642 type GetNextResponseFut: std::future::Future<Output = Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error>>
6643 + Send;
6644 fn r#get_next(&self, start_id: u64, limit: u32) -> Self::GetNextResponseFut;
6645}
6646#[derive(Debug)]
6647#[cfg(target_os = "fuchsia")]
6648pub struct DictionaryEnumerateIteratorSynchronousProxy {
6649 client: fidl::client::sync::Client,
6650}
6651
6652#[cfg(target_os = "fuchsia")]
6653impl fidl::endpoints::SynchronousProxy for DictionaryEnumerateIteratorSynchronousProxy {
6654 type Proxy = DictionaryEnumerateIteratorProxy;
6655 type Protocol = DictionaryEnumerateIteratorMarker;
6656
6657 fn from_channel(inner: fidl::Channel) -> Self {
6658 Self::new(inner)
6659 }
6660
6661 fn into_channel(self) -> fidl::Channel {
6662 self.client.into_channel()
6663 }
6664
6665 fn as_channel(&self) -> &fidl::Channel {
6666 self.client.as_channel()
6667 }
6668}
6669
6670#[cfg(target_os = "fuchsia")]
6671impl DictionaryEnumerateIteratorSynchronousProxy {
6672 pub fn new(channel: fidl::Channel) -> Self {
6673 let protocol_name =
6674 <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6675 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6676 }
6677
6678 pub fn into_channel(self) -> fidl::Channel {
6679 self.client.into_channel()
6680 }
6681
6682 pub fn wait_for_event(
6685 &self,
6686 deadline: zx::MonotonicInstant,
6687 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
6688 DictionaryEnumerateIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6689 }
6690
6691 pub fn r#get_next(
6712 &self,
6713 mut start_id: u64,
6714 mut limit: u32,
6715 ___deadline: zx::MonotonicInstant,
6716 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
6717 let _response = self.client.send_query::<
6718 DictionaryEnumerateIteratorGetNextRequest,
6719 fidl::encoding::FlexibleResultType<DictionaryEnumerateIteratorGetNextResponse, CapabilityStoreError>,
6720 >(
6721 (start_id, limit,),
6722 0x14f8bc286512f5cf,
6723 fidl::encoding::DynamicFlags::FLEXIBLE,
6724 ___deadline,
6725 )?
6726 .into_result::<DictionaryEnumerateIteratorMarker>("get_next")?;
6727 Ok(_response.map(|x| (x.items, x.end_id)))
6728 }
6729}
6730
6731#[cfg(target_os = "fuchsia")]
6732impl From<DictionaryEnumerateIteratorSynchronousProxy> for zx::NullableHandle {
6733 fn from(value: DictionaryEnumerateIteratorSynchronousProxy) -> Self {
6734 value.into_channel().into()
6735 }
6736}
6737
6738#[cfg(target_os = "fuchsia")]
6739impl From<fidl::Channel> for DictionaryEnumerateIteratorSynchronousProxy {
6740 fn from(value: fidl::Channel) -> Self {
6741 Self::new(value)
6742 }
6743}
6744
6745#[cfg(target_os = "fuchsia")]
6746impl fidl::endpoints::FromClient for DictionaryEnumerateIteratorSynchronousProxy {
6747 type Protocol = DictionaryEnumerateIteratorMarker;
6748
6749 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryEnumerateIteratorMarker>) -> Self {
6750 Self::new(value.into_channel())
6751 }
6752}
6753
6754#[derive(Debug, Clone)]
6755pub struct DictionaryEnumerateIteratorProxy {
6756 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6757}
6758
6759impl fidl::endpoints::Proxy for DictionaryEnumerateIteratorProxy {
6760 type Protocol = DictionaryEnumerateIteratorMarker;
6761
6762 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6763 Self::new(inner)
6764 }
6765
6766 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6767 self.client.into_channel().map_err(|client| Self { client })
6768 }
6769
6770 fn as_channel(&self) -> &::fidl::AsyncChannel {
6771 self.client.as_channel()
6772 }
6773}
6774
6775impl DictionaryEnumerateIteratorProxy {
6776 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6778 let protocol_name =
6779 <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6780 Self { client: fidl::client::Client::new(channel, protocol_name) }
6781 }
6782
6783 pub fn take_event_stream(&self) -> DictionaryEnumerateIteratorEventStream {
6789 DictionaryEnumerateIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6790 }
6791
6792 pub fn r#get_next(
6813 &self,
6814 mut start_id: u64,
6815 mut limit: u32,
6816 ) -> fidl::client::QueryResponseFut<
6817 DictionaryEnumerateIteratorGetNextResult,
6818 fidl::encoding::DefaultFuchsiaResourceDialect,
6819 > {
6820 DictionaryEnumerateIteratorProxyInterface::r#get_next(self, start_id, limit)
6821 }
6822}
6823
6824impl DictionaryEnumerateIteratorProxyInterface for DictionaryEnumerateIteratorProxy {
6825 type GetNextResponseFut = fidl::client::QueryResponseFut<
6826 DictionaryEnumerateIteratorGetNextResult,
6827 fidl::encoding::DefaultFuchsiaResourceDialect,
6828 >;
6829 fn r#get_next(&self, mut start_id: u64, mut limit: u32) -> Self::GetNextResponseFut {
6830 fn _decode(
6831 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6832 ) -> Result<DictionaryEnumerateIteratorGetNextResult, fidl::Error> {
6833 let _response = fidl::client::decode_transaction_body::<
6834 fidl::encoding::FlexibleResultType<
6835 DictionaryEnumerateIteratorGetNextResponse,
6836 CapabilityStoreError,
6837 >,
6838 fidl::encoding::DefaultFuchsiaResourceDialect,
6839 0x14f8bc286512f5cf,
6840 >(_buf?)?
6841 .into_result::<DictionaryEnumerateIteratorMarker>("get_next")?;
6842 Ok(_response.map(|x| (x.items, x.end_id)))
6843 }
6844 self.client.send_query_and_decode::<
6845 DictionaryEnumerateIteratorGetNextRequest,
6846 DictionaryEnumerateIteratorGetNextResult,
6847 >(
6848 (start_id, limit,),
6849 0x14f8bc286512f5cf,
6850 fidl::encoding::DynamicFlags::FLEXIBLE,
6851 _decode,
6852 )
6853 }
6854}
6855
6856pub struct DictionaryEnumerateIteratorEventStream {
6857 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6858}
6859
6860impl std::marker::Unpin for DictionaryEnumerateIteratorEventStream {}
6861
6862impl futures::stream::FusedStream for DictionaryEnumerateIteratorEventStream {
6863 fn is_terminated(&self) -> bool {
6864 self.event_receiver.is_terminated()
6865 }
6866}
6867
6868impl futures::Stream for DictionaryEnumerateIteratorEventStream {
6869 type Item = Result<DictionaryEnumerateIteratorEvent, fidl::Error>;
6870
6871 fn poll_next(
6872 mut self: std::pin::Pin<&mut Self>,
6873 cx: &mut std::task::Context<'_>,
6874 ) -> std::task::Poll<Option<Self::Item>> {
6875 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6876 &mut self.event_receiver,
6877 cx
6878 )?) {
6879 Some(buf) => {
6880 std::task::Poll::Ready(Some(DictionaryEnumerateIteratorEvent::decode(buf)))
6881 }
6882 None => std::task::Poll::Ready(None),
6883 }
6884 }
6885}
6886
6887#[derive(Debug)]
6888pub enum DictionaryEnumerateIteratorEvent {
6889 #[non_exhaustive]
6890 _UnknownEvent {
6891 ordinal: u64,
6893 },
6894}
6895
6896impl DictionaryEnumerateIteratorEvent {
6897 fn decode(
6899 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6900 ) -> Result<DictionaryEnumerateIteratorEvent, fidl::Error> {
6901 let (bytes, _handles) = buf.split_mut();
6902 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6903 debug_assert_eq!(tx_header.tx_id, 0);
6904 match tx_header.ordinal {
6905 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6906 Ok(DictionaryEnumerateIteratorEvent::_UnknownEvent {
6907 ordinal: tx_header.ordinal,
6908 })
6909 }
6910 _ => Err(fidl::Error::UnknownOrdinal {
6911 ordinal: tx_header.ordinal,
6912 protocol_name: <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6913 })
6914 }
6915 }
6916}
6917
6918pub struct DictionaryEnumerateIteratorRequestStream {
6920 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6921 is_terminated: bool,
6922}
6923
6924impl std::marker::Unpin for DictionaryEnumerateIteratorRequestStream {}
6925
6926impl futures::stream::FusedStream for DictionaryEnumerateIteratorRequestStream {
6927 fn is_terminated(&self) -> bool {
6928 self.is_terminated
6929 }
6930}
6931
6932impl fidl::endpoints::RequestStream for DictionaryEnumerateIteratorRequestStream {
6933 type Protocol = DictionaryEnumerateIteratorMarker;
6934 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
6935
6936 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6937 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6938 }
6939
6940 fn control_handle(&self) -> Self::ControlHandle {
6941 DictionaryEnumerateIteratorControlHandle { inner: self.inner.clone() }
6942 }
6943
6944 fn into_inner(
6945 self,
6946 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6947 {
6948 (self.inner, self.is_terminated)
6949 }
6950
6951 fn from_inner(
6952 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6953 is_terminated: bool,
6954 ) -> Self {
6955 Self { inner, is_terminated }
6956 }
6957}
6958
6959impl futures::Stream for DictionaryEnumerateIteratorRequestStream {
6960 type Item = Result<DictionaryEnumerateIteratorRequest, fidl::Error>;
6961
6962 fn poll_next(
6963 mut self: std::pin::Pin<&mut Self>,
6964 cx: &mut std::task::Context<'_>,
6965 ) -> std::task::Poll<Option<Self::Item>> {
6966 let this = &mut *self;
6967 if this.inner.check_shutdown(cx) {
6968 this.is_terminated = true;
6969 return std::task::Poll::Ready(None);
6970 }
6971 if this.is_terminated {
6972 panic!("polled DictionaryEnumerateIteratorRequestStream after completion");
6973 }
6974 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6975 |bytes, handles| {
6976 match this.inner.channel().read_etc(cx, bytes, handles) {
6977 std::task::Poll::Ready(Ok(())) => {}
6978 std::task::Poll::Pending => return std::task::Poll::Pending,
6979 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6980 this.is_terminated = true;
6981 return std::task::Poll::Ready(None);
6982 }
6983 std::task::Poll::Ready(Err(e)) => {
6984 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6985 e.into(),
6986 ))));
6987 }
6988 }
6989
6990 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6992
6993 std::task::Poll::Ready(Some(match header.ordinal {
6994 0x14f8bc286512f5cf => {
6995 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6996 let mut req = fidl::new_empty!(DictionaryEnumerateIteratorGetNextRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
6997 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DictionaryEnumerateIteratorGetNextRequest>(&header, _body_bytes, handles, &mut req)?;
6998 let control_handle = DictionaryEnumerateIteratorControlHandle {
6999 inner: this.inner.clone(),
7000 };
7001 Ok(DictionaryEnumerateIteratorRequest::GetNext {start_id: req.start_id,
7002limit: req.limit,
7003
7004 responder: DictionaryEnumerateIteratorGetNextResponder {
7005 control_handle: std::mem::ManuallyDrop::new(control_handle),
7006 tx_id: header.tx_id,
7007 },
7008 })
7009 }
7010 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7011 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
7012 ordinal: header.ordinal,
7013 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
7014 method_type: fidl::MethodType::OneWay,
7015 })
7016 }
7017 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7018 this.inner.send_framework_err(
7019 fidl::encoding::FrameworkErr::UnknownMethod,
7020 header.tx_id,
7021 header.ordinal,
7022 header.dynamic_flags(),
7023 (bytes, handles),
7024 )?;
7025 Ok(DictionaryEnumerateIteratorRequest::_UnknownMethod {
7026 ordinal: header.ordinal,
7027 control_handle: DictionaryEnumerateIteratorControlHandle { inner: this.inner.clone() },
7028 method_type: fidl::MethodType::TwoWay,
7029 })
7030 }
7031 _ => Err(fidl::Error::UnknownOrdinal {
7032 ordinal: header.ordinal,
7033 protocol_name: <DictionaryEnumerateIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7034 }),
7035 }))
7036 },
7037 )
7038 }
7039}
7040
7041#[derive(Debug)]
7042pub enum DictionaryEnumerateIteratorRequest {
7043 GetNext { start_id: u64, limit: u32, responder: DictionaryEnumerateIteratorGetNextResponder },
7064 #[non_exhaustive]
7066 _UnknownMethod {
7067 ordinal: u64,
7069 control_handle: DictionaryEnumerateIteratorControlHandle,
7070 method_type: fidl::MethodType,
7071 },
7072}
7073
7074impl DictionaryEnumerateIteratorRequest {
7075 #[allow(irrefutable_let_patterns)]
7076 pub fn into_get_next(self) -> Option<(u64, u32, DictionaryEnumerateIteratorGetNextResponder)> {
7077 if let DictionaryEnumerateIteratorRequest::GetNext { start_id, limit, responder } = self {
7078 Some((start_id, limit, responder))
7079 } else {
7080 None
7081 }
7082 }
7083
7084 pub fn method_name(&self) -> &'static str {
7086 match *self {
7087 DictionaryEnumerateIteratorRequest::GetNext { .. } => "get_next",
7088 DictionaryEnumerateIteratorRequest::_UnknownMethod {
7089 method_type: fidl::MethodType::OneWay,
7090 ..
7091 } => "unknown one-way method",
7092 DictionaryEnumerateIteratorRequest::_UnknownMethod {
7093 method_type: fidl::MethodType::TwoWay,
7094 ..
7095 } => "unknown two-way method",
7096 }
7097 }
7098}
7099
7100#[derive(Debug, Clone)]
7101pub struct DictionaryEnumerateIteratorControlHandle {
7102 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7103}
7104
7105impl fidl::endpoints::ControlHandle for DictionaryEnumerateIteratorControlHandle {
7106 fn shutdown(&self) {
7107 self.inner.shutdown()
7108 }
7109
7110 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7111 self.inner.shutdown_with_epitaph(status)
7112 }
7113
7114 fn is_closed(&self) -> bool {
7115 self.inner.channel().is_closed()
7116 }
7117 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7118 self.inner.channel().on_closed()
7119 }
7120
7121 #[cfg(target_os = "fuchsia")]
7122 fn signal_peer(
7123 &self,
7124 clear_mask: zx::Signals,
7125 set_mask: zx::Signals,
7126 ) -> Result<(), zx_status::Status> {
7127 use fidl::Peered;
7128 self.inner.channel().signal_peer(clear_mask, set_mask)
7129 }
7130}
7131
7132impl DictionaryEnumerateIteratorControlHandle {}
7133
7134#[must_use = "FIDL methods require a response to be sent"]
7135#[derive(Debug)]
7136pub struct DictionaryEnumerateIteratorGetNextResponder {
7137 control_handle: std::mem::ManuallyDrop<DictionaryEnumerateIteratorControlHandle>,
7138 tx_id: u32,
7139}
7140
7141impl std::ops::Drop for DictionaryEnumerateIteratorGetNextResponder {
7145 fn drop(&mut self) {
7146 self.control_handle.shutdown();
7147 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7149 }
7150}
7151
7152impl fidl::endpoints::Responder for DictionaryEnumerateIteratorGetNextResponder {
7153 type ControlHandle = DictionaryEnumerateIteratorControlHandle;
7154
7155 fn control_handle(&self) -> &DictionaryEnumerateIteratorControlHandle {
7156 &self.control_handle
7157 }
7158
7159 fn drop_without_shutdown(mut self) {
7160 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7162 std::mem::forget(self);
7164 }
7165}
7166
7167impl DictionaryEnumerateIteratorGetNextResponder {
7168 pub fn send(
7172 self,
7173 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
7174 ) -> Result<(), fidl::Error> {
7175 let _result = self.send_raw(result);
7176 if _result.is_err() {
7177 self.control_handle.shutdown();
7178 }
7179 self.drop_without_shutdown();
7180 _result
7181 }
7182
7183 pub fn send_no_shutdown_on_err(
7185 self,
7186 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
7187 ) -> Result<(), fidl::Error> {
7188 let _result = self.send_raw(result);
7189 self.drop_without_shutdown();
7190 _result
7191 }
7192
7193 fn send_raw(
7194 &self,
7195 mut result: Result<(Vec<DictionaryOptionalItem>, u64), CapabilityStoreError>,
7196 ) -> Result<(), fidl::Error> {
7197 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
7198 DictionaryEnumerateIteratorGetNextResponse,
7199 CapabilityStoreError,
7200 >>(
7201 fidl::encoding::FlexibleResult::new(
7202 result
7203 .as_mut()
7204 .map_err(|e| *e)
7205 .map(|(items, end_id)| (items.as_mut_slice(), *end_id)),
7206 ),
7207 self.tx_id,
7208 0x14f8bc286512f5cf,
7209 fidl::encoding::DynamicFlags::FLEXIBLE,
7210 )
7211 }
7212}
7213
7214#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7215pub struct DictionaryKeysIteratorMarker;
7216
7217impl fidl::endpoints::ProtocolMarker for DictionaryKeysIteratorMarker {
7218 type Proxy = DictionaryKeysIteratorProxy;
7219 type RequestStream = DictionaryKeysIteratorRequestStream;
7220 #[cfg(target_os = "fuchsia")]
7221 type SynchronousProxy = DictionaryKeysIteratorSynchronousProxy;
7222
7223 const DEBUG_NAME: &'static str = "(anonymous) DictionaryKeysIterator";
7224}
7225
7226pub trait DictionaryKeysIteratorProxyInterface: Send + Sync {
7227 type GetNextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
7228 fn r#get_next(&self) -> Self::GetNextResponseFut;
7229}
7230#[derive(Debug)]
7231#[cfg(target_os = "fuchsia")]
7232pub struct DictionaryKeysIteratorSynchronousProxy {
7233 client: fidl::client::sync::Client,
7234}
7235
7236#[cfg(target_os = "fuchsia")]
7237impl fidl::endpoints::SynchronousProxy for DictionaryKeysIteratorSynchronousProxy {
7238 type Proxy = DictionaryKeysIteratorProxy;
7239 type Protocol = DictionaryKeysIteratorMarker;
7240
7241 fn from_channel(inner: fidl::Channel) -> Self {
7242 Self::new(inner)
7243 }
7244
7245 fn into_channel(self) -> fidl::Channel {
7246 self.client.into_channel()
7247 }
7248
7249 fn as_channel(&self) -> &fidl::Channel {
7250 self.client.as_channel()
7251 }
7252}
7253
7254#[cfg(target_os = "fuchsia")]
7255impl DictionaryKeysIteratorSynchronousProxy {
7256 pub fn new(channel: fidl::Channel) -> Self {
7257 let protocol_name =
7258 <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7259 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7260 }
7261
7262 pub fn into_channel(self) -> fidl::Channel {
7263 self.client.into_channel()
7264 }
7265
7266 pub fn wait_for_event(
7269 &self,
7270 deadline: zx::MonotonicInstant,
7271 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
7272 DictionaryKeysIteratorEvent::decode(self.client.wait_for_event(deadline)?)
7273 }
7274
7275 pub fn r#get_next(
7276 &self,
7277 ___deadline: zx::MonotonicInstant,
7278 ) -> Result<Vec<String>, fidl::Error> {
7279 let _response = self.client.send_query::<
7280 fidl::encoding::EmptyPayload,
7281 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
7282 >(
7283 (),
7284 0x453828cbacca7d53,
7285 fidl::encoding::DynamicFlags::FLEXIBLE,
7286 ___deadline,
7287 )?
7288 .into_result::<DictionaryKeysIteratorMarker>("get_next")?;
7289 Ok(_response.keys)
7290 }
7291}
7292
7293#[cfg(target_os = "fuchsia")]
7294impl From<DictionaryKeysIteratorSynchronousProxy> for zx::NullableHandle {
7295 fn from(value: DictionaryKeysIteratorSynchronousProxy) -> Self {
7296 value.into_channel().into()
7297 }
7298}
7299
7300#[cfg(target_os = "fuchsia")]
7301impl From<fidl::Channel> for DictionaryKeysIteratorSynchronousProxy {
7302 fn from(value: fidl::Channel) -> Self {
7303 Self::new(value)
7304 }
7305}
7306
7307#[cfg(target_os = "fuchsia")]
7308impl fidl::endpoints::FromClient for DictionaryKeysIteratorSynchronousProxy {
7309 type Protocol = DictionaryKeysIteratorMarker;
7310
7311 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryKeysIteratorMarker>) -> Self {
7312 Self::new(value.into_channel())
7313 }
7314}
7315
7316#[derive(Debug, Clone)]
7317pub struct DictionaryKeysIteratorProxy {
7318 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7319}
7320
7321impl fidl::endpoints::Proxy for DictionaryKeysIteratorProxy {
7322 type Protocol = DictionaryKeysIteratorMarker;
7323
7324 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7325 Self::new(inner)
7326 }
7327
7328 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7329 self.client.into_channel().map_err(|client| Self { client })
7330 }
7331
7332 fn as_channel(&self) -> &::fidl::AsyncChannel {
7333 self.client.as_channel()
7334 }
7335}
7336
7337impl DictionaryKeysIteratorProxy {
7338 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7340 let protocol_name =
7341 <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7342 Self { client: fidl::client::Client::new(channel, protocol_name) }
7343 }
7344
7345 pub fn take_event_stream(&self) -> DictionaryKeysIteratorEventStream {
7351 DictionaryKeysIteratorEventStream { event_receiver: self.client.take_event_receiver() }
7352 }
7353
7354 pub fn r#get_next(
7355 &self,
7356 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
7357 {
7358 DictionaryKeysIteratorProxyInterface::r#get_next(self)
7359 }
7360}
7361
7362impl DictionaryKeysIteratorProxyInterface for DictionaryKeysIteratorProxy {
7363 type GetNextResponseFut =
7364 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
7365 fn r#get_next(&self) -> Self::GetNextResponseFut {
7366 fn _decode(
7367 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7368 ) -> Result<Vec<String>, fidl::Error> {
7369 let _response = fidl::client::decode_transaction_body::<
7370 fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>,
7371 fidl::encoding::DefaultFuchsiaResourceDialect,
7372 0x453828cbacca7d53,
7373 >(_buf?)?
7374 .into_result::<DictionaryKeysIteratorMarker>("get_next")?;
7375 Ok(_response.keys)
7376 }
7377 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
7378 (),
7379 0x453828cbacca7d53,
7380 fidl::encoding::DynamicFlags::FLEXIBLE,
7381 _decode,
7382 )
7383 }
7384}
7385
7386pub struct DictionaryKeysIteratorEventStream {
7387 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7388}
7389
7390impl std::marker::Unpin for DictionaryKeysIteratorEventStream {}
7391
7392impl futures::stream::FusedStream for DictionaryKeysIteratorEventStream {
7393 fn is_terminated(&self) -> bool {
7394 self.event_receiver.is_terminated()
7395 }
7396}
7397
7398impl futures::Stream for DictionaryKeysIteratorEventStream {
7399 type Item = Result<DictionaryKeysIteratorEvent, fidl::Error>;
7400
7401 fn poll_next(
7402 mut self: std::pin::Pin<&mut Self>,
7403 cx: &mut std::task::Context<'_>,
7404 ) -> std::task::Poll<Option<Self::Item>> {
7405 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7406 &mut self.event_receiver,
7407 cx
7408 )?) {
7409 Some(buf) => std::task::Poll::Ready(Some(DictionaryKeysIteratorEvent::decode(buf))),
7410 None => std::task::Poll::Ready(None),
7411 }
7412 }
7413}
7414
7415#[derive(Debug)]
7416pub enum DictionaryKeysIteratorEvent {
7417 #[non_exhaustive]
7418 _UnknownEvent {
7419 ordinal: u64,
7421 },
7422}
7423
7424impl DictionaryKeysIteratorEvent {
7425 fn decode(
7427 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7428 ) -> Result<DictionaryKeysIteratorEvent, fidl::Error> {
7429 let (bytes, _handles) = buf.split_mut();
7430 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7431 debug_assert_eq!(tx_header.tx_id, 0);
7432 match tx_header.ordinal {
7433 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7434 Ok(DictionaryKeysIteratorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7435 }
7436 _ => Err(fidl::Error::UnknownOrdinal {
7437 ordinal: tx_header.ordinal,
7438 protocol_name:
7439 <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7440 }),
7441 }
7442 }
7443}
7444
7445pub struct DictionaryKeysIteratorRequestStream {
7447 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7448 is_terminated: bool,
7449}
7450
7451impl std::marker::Unpin for DictionaryKeysIteratorRequestStream {}
7452
7453impl futures::stream::FusedStream for DictionaryKeysIteratorRequestStream {
7454 fn is_terminated(&self) -> bool {
7455 self.is_terminated
7456 }
7457}
7458
7459impl fidl::endpoints::RequestStream for DictionaryKeysIteratorRequestStream {
7460 type Protocol = DictionaryKeysIteratorMarker;
7461 type ControlHandle = DictionaryKeysIteratorControlHandle;
7462
7463 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7464 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7465 }
7466
7467 fn control_handle(&self) -> Self::ControlHandle {
7468 DictionaryKeysIteratorControlHandle { inner: self.inner.clone() }
7469 }
7470
7471 fn into_inner(
7472 self,
7473 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7474 {
7475 (self.inner, self.is_terminated)
7476 }
7477
7478 fn from_inner(
7479 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7480 is_terminated: bool,
7481 ) -> Self {
7482 Self { inner, is_terminated }
7483 }
7484}
7485
7486impl futures::Stream for DictionaryKeysIteratorRequestStream {
7487 type Item = Result<DictionaryKeysIteratorRequest, fidl::Error>;
7488
7489 fn poll_next(
7490 mut self: std::pin::Pin<&mut Self>,
7491 cx: &mut std::task::Context<'_>,
7492 ) -> std::task::Poll<Option<Self::Item>> {
7493 let this = &mut *self;
7494 if this.inner.check_shutdown(cx) {
7495 this.is_terminated = true;
7496 return std::task::Poll::Ready(None);
7497 }
7498 if this.is_terminated {
7499 panic!("polled DictionaryKeysIteratorRequestStream after completion");
7500 }
7501 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7502 |bytes, handles| {
7503 match this.inner.channel().read_etc(cx, bytes, handles) {
7504 std::task::Poll::Ready(Ok(())) => {}
7505 std::task::Poll::Pending => return std::task::Poll::Pending,
7506 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7507 this.is_terminated = true;
7508 return std::task::Poll::Ready(None);
7509 }
7510 std::task::Poll::Ready(Err(e)) => {
7511 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7512 e.into(),
7513 ))));
7514 }
7515 }
7516
7517 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7519
7520 std::task::Poll::Ready(Some(match header.ordinal {
7521 0x453828cbacca7d53 => {
7522 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7523 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
7524 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7525 let control_handle = DictionaryKeysIteratorControlHandle {
7526 inner: this.inner.clone(),
7527 };
7528 Ok(DictionaryKeysIteratorRequest::GetNext {
7529 responder: DictionaryKeysIteratorGetNextResponder {
7530 control_handle: std::mem::ManuallyDrop::new(control_handle),
7531 tx_id: header.tx_id,
7532 },
7533 })
7534 }
7535 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7536 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
7537 ordinal: header.ordinal,
7538 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
7539 method_type: fidl::MethodType::OneWay,
7540 })
7541 }
7542 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7543 this.inner.send_framework_err(
7544 fidl::encoding::FrameworkErr::UnknownMethod,
7545 header.tx_id,
7546 header.ordinal,
7547 header.dynamic_flags(),
7548 (bytes, handles),
7549 )?;
7550 Ok(DictionaryKeysIteratorRequest::_UnknownMethod {
7551 ordinal: header.ordinal,
7552 control_handle: DictionaryKeysIteratorControlHandle { inner: this.inner.clone() },
7553 method_type: fidl::MethodType::TwoWay,
7554 })
7555 }
7556 _ => Err(fidl::Error::UnknownOrdinal {
7557 ordinal: header.ordinal,
7558 protocol_name: <DictionaryKeysIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7559 }),
7560 }))
7561 },
7562 )
7563 }
7564}
7565
7566#[derive(Debug)]
7567pub enum DictionaryKeysIteratorRequest {
7568 GetNext {
7569 responder: DictionaryKeysIteratorGetNextResponder,
7570 },
7571 #[non_exhaustive]
7573 _UnknownMethod {
7574 ordinal: u64,
7576 control_handle: DictionaryKeysIteratorControlHandle,
7577 method_type: fidl::MethodType,
7578 },
7579}
7580
7581impl DictionaryKeysIteratorRequest {
7582 #[allow(irrefutable_let_patterns)]
7583 pub fn into_get_next(self) -> Option<(DictionaryKeysIteratorGetNextResponder)> {
7584 if let DictionaryKeysIteratorRequest::GetNext { responder } = self {
7585 Some((responder))
7586 } else {
7587 None
7588 }
7589 }
7590
7591 pub fn method_name(&self) -> &'static str {
7593 match *self {
7594 DictionaryKeysIteratorRequest::GetNext { .. } => "get_next",
7595 DictionaryKeysIteratorRequest::_UnknownMethod {
7596 method_type: fidl::MethodType::OneWay,
7597 ..
7598 } => "unknown one-way method",
7599 DictionaryKeysIteratorRequest::_UnknownMethod {
7600 method_type: fidl::MethodType::TwoWay,
7601 ..
7602 } => "unknown two-way method",
7603 }
7604 }
7605}
7606
7607#[derive(Debug, Clone)]
7608pub struct DictionaryKeysIteratorControlHandle {
7609 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7610}
7611
7612impl fidl::endpoints::ControlHandle for DictionaryKeysIteratorControlHandle {
7613 fn shutdown(&self) {
7614 self.inner.shutdown()
7615 }
7616
7617 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7618 self.inner.shutdown_with_epitaph(status)
7619 }
7620
7621 fn is_closed(&self) -> bool {
7622 self.inner.channel().is_closed()
7623 }
7624 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7625 self.inner.channel().on_closed()
7626 }
7627
7628 #[cfg(target_os = "fuchsia")]
7629 fn signal_peer(
7630 &self,
7631 clear_mask: zx::Signals,
7632 set_mask: zx::Signals,
7633 ) -> Result<(), zx_status::Status> {
7634 use fidl::Peered;
7635 self.inner.channel().signal_peer(clear_mask, set_mask)
7636 }
7637}
7638
7639impl DictionaryKeysIteratorControlHandle {}
7640
7641#[must_use = "FIDL methods require a response to be sent"]
7642#[derive(Debug)]
7643pub struct DictionaryKeysIteratorGetNextResponder {
7644 control_handle: std::mem::ManuallyDrop<DictionaryKeysIteratorControlHandle>,
7645 tx_id: u32,
7646}
7647
7648impl std::ops::Drop for DictionaryKeysIteratorGetNextResponder {
7652 fn drop(&mut self) {
7653 self.control_handle.shutdown();
7654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7656 }
7657}
7658
7659impl fidl::endpoints::Responder for DictionaryKeysIteratorGetNextResponder {
7660 type ControlHandle = DictionaryKeysIteratorControlHandle;
7661
7662 fn control_handle(&self) -> &DictionaryKeysIteratorControlHandle {
7663 &self.control_handle
7664 }
7665
7666 fn drop_without_shutdown(mut self) {
7667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7669 std::mem::forget(self);
7671 }
7672}
7673
7674impl DictionaryKeysIteratorGetNextResponder {
7675 pub fn send(self, mut keys: &[String]) -> Result<(), fidl::Error> {
7679 let _result = self.send_raw(keys);
7680 if _result.is_err() {
7681 self.control_handle.shutdown();
7682 }
7683 self.drop_without_shutdown();
7684 _result
7685 }
7686
7687 pub fn send_no_shutdown_on_err(self, mut keys: &[String]) -> Result<(), fidl::Error> {
7689 let _result = self.send_raw(keys);
7690 self.drop_without_shutdown();
7691 _result
7692 }
7693
7694 fn send_raw(&self, mut keys: &[String]) -> Result<(), fidl::Error> {
7695 self.control_handle
7696 .inner
7697 .send::<fidl::encoding::FlexibleType<DictionaryKeysIteratorGetNextResponse>>(
7698 fidl::encoding::Flexible::new((keys,)),
7699 self.tx_id,
7700 0x453828cbacca7d53,
7701 fidl::encoding::DynamicFlags::FLEXIBLE,
7702 )
7703 }
7704}
7705
7706#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7707pub struct DictionaryRouterMarker;
7708
7709impl fidl::endpoints::ProtocolMarker for DictionaryRouterMarker {
7710 type Proxy = DictionaryRouterProxy;
7711 type RequestStream = DictionaryRouterRequestStream;
7712 #[cfg(target_os = "fuchsia")]
7713 type SynchronousProxy = DictionaryRouterSynchronousProxy;
7714
7715 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
7716}
7717impl fidl::endpoints::DiscoverableProtocolMarker for DictionaryRouterMarker {}
7718pub type DictionaryRouterRouteResult = Result<DictionaryRouterRouteResponse, RouterError>;
7719
7720pub trait DictionaryRouterProxyInterface: Send + Sync {
7721 type RouteResponseFut: std::future::Future<Output = Result<DictionaryRouterRouteResult, fidl::Error>>
7722 + Send;
7723 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
7724}
7725#[derive(Debug)]
7726#[cfg(target_os = "fuchsia")]
7727pub struct DictionaryRouterSynchronousProxy {
7728 client: fidl::client::sync::Client,
7729}
7730
7731#[cfg(target_os = "fuchsia")]
7732impl fidl::endpoints::SynchronousProxy for DictionaryRouterSynchronousProxy {
7733 type Proxy = DictionaryRouterProxy;
7734 type Protocol = DictionaryRouterMarker;
7735
7736 fn from_channel(inner: fidl::Channel) -> Self {
7737 Self::new(inner)
7738 }
7739
7740 fn into_channel(self) -> fidl::Channel {
7741 self.client.into_channel()
7742 }
7743
7744 fn as_channel(&self) -> &fidl::Channel {
7745 self.client.as_channel()
7746 }
7747}
7748
7749#[cfg(target_os = "fuchsia")]
7750impl DictionaryRouterSynchronousProxy {
7751 pub fn new(channel: fidl::Channel) -> Self {
7752 let protocol_name = <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7753 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7754 }
7755
7756 pub fn into_channel(self) -> fidl::Channel {
7757 self.client.into_channel()
7758 }
7759
7760 pub fn wait_for_event(
7763 &self,
7764 deadline: zx::MonotonicInstant,
7765 ) -> Result<DictionaryRouterEvent, fidl::Error> {
7766 DictionaryRouterEvent::decode(self.client.wait_for_event(deadline)?)
7767 }
7768
7769 pub fn r#route(
7770 &self,
7771 mut payload: RouteRequest,
7772 ___deadline: zx::MonotonicInstant,
7773 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
7774 let _response = self.client.send_query::<
7775 RouteRequest,
7776 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
7777 >(
7778 &mut payload,
7779 0x714c65bfe54bd79f,
7780 fidl::encoding::DynamicFlags::FLEXIBLE,
7781 ___deadline,
7782 )?
7783 .into_result::<DictionaryRouterMarker>("route")?;
7784 Ok(_response.map(|x| x))
7785 }
7786}
7787
7788#[cfg(target_os = "fuchsia")]
7789impl From<DictionaryRouterSynchronousProxy> for zx::NullableHandle {
7790 fn from(value: DictionaryRouterSynchronousProxy) -> Self {
7791 value.into_channel().into()
7792 }
7793}
7794
7795#[cfg(target_os = "fuchsia")]
7796impl From<fidl::Channel> for DictionaryRouterSynchronousProxy {
7797 fn from(value: fidl::Channel) -> Self {
7798 Self::new(value)
7799 }
7800}
7801
7802#[cfg(target_os = "fuchsia")]
7803impl fidl::endpoints::FromClient for DictionaryRouterSynchronousProxy {
7804 type Protocol = DictionaryRouterMarker;
7805
7806 fn from_client(value: fidl::endpoints::ClientEnd<DictionaryRouterMarker>) -> Self {
7807 Self::new(value.into_channel())
7808 }
7809}
7810
7811#[derive(Debug, Clone)]
7812pub struct DictionaryRouterProxy {
7813 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7814}
7815
7816impl fidl::endpoints::Proxy for DictionaryRouterProxy {
7817 type Protocol = DictionaryRouterMarker;
7818
7819 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7820 Self::new(inner)
7821 }
7822
7823 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7824 self.client.into_channel().map_err(|client| Self { client })
7825 }
7826
7827 fn as_channel(&self) -> &::fidl::AsyncChannel {
7828 self.client.as_channel()
7829 }
7830}
7831
7832impl DictionaryRouterProxy {
7833 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7835 let protocol_name = <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7836 Self { client: fidl::client::Client::new(channel, protocol_name) }
7837 }
7838
7839 pub fn take_event_stream(&self) -> DictionaryRouterEventStream {
7845 DictionaryRouterEventStream { event_receiver: self.client.take_event_receiver() }
7846 }
7847
7848 pub fn r#route(
7849 &self,
7850 mut payload: RouteRequest,
7851 ) -> fidl::client::QueryResponseFut<
7852 DictionaryRouterRouteResult,
7853 fidl::encoding::DefaultFuchsiaResourceDialect,
7854 > {
7855 DictionaryRouterProxyInterface::r#route(self, payload)
7856 }
7857}
7858
7859impl DictionaryRouterProxyInterface for DictionaryRouterProxy {
7860 type RouteResponseFut = fidl::client::QueryResponseFut<
7861 DictionaryRouterRouteResult,
7862 fidl::encoding::DefaultFuchsiaResourceDialect,
7863 >;
7864 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
7865 fn _decode(
7866 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7867 ) -> Result<DictionaryRouterRouteResult, fidl::Error> {
7868 let _response = fidl::client::decode_transaction_body::<
7869 fidl::encoding::FlexibleResultType<DictionaryRouterRouteResponse, RouterError>,
7870 fidl::encoding::DefaultFuchsiaResourceDialect,
7871 0x714c65bfe54bd79f,
7872 >(_buf?)?
7873 .into_result::<DictionaryRouterMarker>("route")?;
7874 Ok(_response.map(|x| x))
7875 }
7876 self.client.send_query_and_decode::<RouteRequest, DictionaryRouterRouteResult>(
7877 &mut payload,
7878 0x714c65bfe54bd79f,
7879 fidl::encoding::DynamicFlags::FLEXIBLE,
7880 _decode,
7881 )
7882 }
7883}
7884
7885pub struct DictionaryRouterEventStream {
7886 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7887}
7888
7889impl std::marker::Unpin for DictionaryRouterEventStream {}
7890
7891impl futures::stream::FusedStream for DictionaryRouterEventStream {
7892 fn is_terminated(&self) -> bool {
7893 self.event_receiver.is_terminated()
7894 }
7895}
7896
7897impl futures::Stream for DictionaryRouterEventStream {
7898 type Item = Result<DictionaryRouterEvent, fidl::Error>;
7899
7900 fn poll_next(
7901 mut self: std::pin::Pin<&mut Self>,
7902 cx: &mut std::task::Context<'_>,
7903 ) -> std::task::Poll<Option<Self::Item>> {
7904 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7905 &mut self.event_receiver,
7906 cx
7907 )?) {
7908 Some(buf) => std::task::Poll::Ready(Some(DictionaryRouterEvent::decode(buf))),
7909 None => std::task::Poll::Ready(None),
7910 }
7911 }
7912}
7913
7914#[derive(Debug)]
7915pub enum DictionaryRouterEvent {
7916 #[non_exhaustive]
7917 _UnknownEvent {
7918 ordinal: u64,
7920 },
7921}
7922
7923impl DictionaryRouterEvent {
7924 fn decode(
7926 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7927 ) -> Result<DictionaryRouterEvent, fidl::Error> {
7928 let (bytes, _handles) = buf.split_mut();
7929 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7930 debug_assert_eq!(tx_header.tx_id, 0);
7931 match tx_header.ordinal {
7932 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7933 Ok(DictionaryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7934 }
7935 _ => Err(fidl::Error::UnknownOrdinal {
7936 ordinal: tx_header.ordinal,
7937 protocol_name:
7938 <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7939 }),
7940 }
7941 }
7942}
7943
7944pub struct DictionaryRouterRequestStream {
7946 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7947 is_terminated: bool,
7948}
7949
7950impl std::marker::Unpin for DictionaryRouterRequestStream {}
7951
7952impl futures::stream::FusedStream for DictionaryRouterRequestStream {
7953 fn is_terminated(&self) -> bool {
7954 self.is_terminated
7955 }
7956}
7957
7958impl fidl::endpoints::RequestStream for DictionaryRouterRequestStream {
7959 type Protocol = DictionaryRouterMarker;
7960 type ControlHandle = DictionaryRouterControlHandle;
7961
7962 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7963 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7964 }
7965
7966 fn control_handle(&self) -> Self::ControlHandle {
7967 DictionaryRouterControlHandle { inner: self.inner.clone() }
7968 }
7969
7970 fn into_inner(
7971 self,
7972 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7973 {
7974 (self.inner, self.is_terminated)
7975 }
7976
7977 fn from_inner(
7978 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7979 is_terminated: bool,
7980 ) -> Self {
7981 Self { inner, is_terminated }
7982 }
7983}
7984
7985impl futures::Stream for DictionaryRouterRequestStream {
7986 type Item = Result<DictionaryRouterRequest, fidl::Error>;
7987
7988 fn poll_next(
7989 mut self: std::pin::Pin<&mut Self>,
7990 cx: &mut std::task::Context<'_>,
7991 ) -> std::task::Poll<Option<Self::Item>> {
7992 let this = &mut *self;
7993 if this.inner.check_shutdown(cx) {
7994 this.is_terminated = true;
7995 return std::task::Poll::Ready(None);
7996 }
7997 if this.is_terminated {
7998 panic!("polled DictionaryRouterRequestStream after completion");
7999 }
8000 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8001 |bytes, handles| {
8002 match this.inner.channel().read_etc(cx, bytes, handles) {
8003 std::task::Poll::Ready(Ok(())) => {}
8004 std::task::Poll::Pending => return std::task::Poll::Pending,
8005 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8006 this.is_terminated = true;
8007 return std::task::Poll::Ready(None);
8008 }
8009 std::task::Poll::Ready(Err(e)) => {
8010 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8011 e.into(),
8012 ))));
8013 }
8014 }
8015
8016 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8018
8019 std::task::Poll::Ready(Some(match header.ordinal {
8020 0x714c65bfe54bd79f => {
8021 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8022 let mut req = fidl::new_empty!(
8023 RouteRequest,
8024 fidl::encoding::DefaultFuchsiaResourceDialect
8025 );
8026 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8027 let control_handle =
8028 DictionaryRouterControlHandle { inner: this.inner.clone() };
8029 Ok(DictionaryRouterRequest::Route {
8030 payload: req,
8031 responder: DictionaryRouterRouteResponder {
8032 control_handle: std::mem::ManuallyDrop::new(control_handle),
8033 tx_id: header.tx_id,
8034 },
8035 })
8036 }
8037 _ if header.tx_id == 0
8038 && header
8039 .dynamic_flags()
8040 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8041 {
8042 Ok(DictionaryRouterRequest::_UnknownMethod {
8043 ordinal: header.ordinal,
8044 control_handle: DictionaryRouterControlHandle {
8045 inner: this.inner.clone(),
8046 },
8047 method_type: fidl::MethodType::OneWay,
8048 })
8049 }
8050 _ if header
8051 .dynamic_flags()
8052 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
8053 {
8054 this.inner.send_framework_err(
8055 fidl::encoding::FrameworkErr::UnknownMethod,
8056 header.tx_id,
8057 header.ordinal,
8058 header.dynamic_flags(),
8059 (bytes, handles),
8060 )?;
8061 Ok(DictionaryRouterRequest::_UnknownMethod {
8062 ordinal: header.ordinal,
8063 control_handle: DictionaryRouterControlHandle {
8064 inner: this.inner.clone(),
8065 },
8066 method_type: fidl::MethodType::TwoWay,
8067 })
8068 }
8069 _ => Err(fidl::Error::UnknownOrdinal {
8070 ordinal: header.ordinal,
8071 protocol_name:
8072 <DictionaryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8073 }),
8074 }))
8075 },
8076 )
8077 }
8078}
8079
8080#[derive(Debug)]
8081pub enum DictionaryRouterRequest {
8082 Route {
8083 payload: RouteRequest,
8084 responder: DictionaryRouterRouteResponder,
8085 },
8086 #[non_exhaustive]
8088 _UnknownMethod {
8089 ordinal: u64,
8091 control_handle: DictionaryRouterControlHandle,
8092 method_type: fidl::MethodType,
8093 },
8094}
8095
8096impl DictionaryRouterRequest {
8097 #[allow(irrefutable_let_patterns)]
8098 pub fn into_route(self) -> Option<(RouteRequest, DictionaryRouterRouteResponder)> {
8099 if let DictionaryRouterRequest::Route { payload, responder } = self {
8100 Some((payload, responder))
8101 } else {
8102 None
8103 }
8104 }
8105
8106 pub fn method_name(&self) -> &'static str {
8108 match *self {
8109 DictionaryRouterRequest::Route { .. } => "route",
8110 DictionaryRouterRequest::_UnknownMethod {
8111 method_type: fidl::MethodType::OneWay,
8112 ..
8113 } => "unknown one-way method",
8114 DictionaryRouterRequest::_UnknownMethod {
8115 method_type: fidl::MethodType::TwoWay,
8116 ..
8117 } => "unknown two-way method",
8118 }
8119 }
8120}
8121
8122#[derive(Debug, Clone)]
8123pub struct DictionaryRouterControlHandle {
8124 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8125}
8126
8127impl fidl::endpoints::ControlHandle for DictionaryRouterControlHandle {
8128 fn shutdown(&self) {
8129 self.inner.shutdown()
8130 }
8131
8132 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8133 self.inner.shutdown_with_epitaph(status)
8134 }
8135
8136 fn is_closed(&self) -> bool {
8137 self.inner.channel().is_closed()
8138 }
8139 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8140 self.inner.channel().on_closed()
8141 }
8142
8143 #[cfg(target_os = "fuchsia")]
8144 fn signal_peer(
8145 &self,
8146 clear_mask: zx::Signals,
8147 set_mask: zx::Signals,
8148 ) -> Result<(), zx_status::Status> {
8149 use fidl::Peered;
8150 self.inner.channel().signal_peer(clear_mask, set_mask)
8151 }
8152}
8153
8154impl DictionaryRouterControlHandle {}
8155
8156#[must_use = "FIDL methods require a response to be sent"]
8157#[derive(Debug)]
8158pub struct DictionaryRouterRouteResponder {
8159 control_handle: std::mem::ManuallyDrop<DictionaryRouterControlHandle>,
8160 tx_id: u32,
8161}
8162
8163impl std::ops::Drop for DictionaryRouterRouteResponder {
8167 fn drop(&mut self) {
8168 self.control_handle.shutdown();
8169 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8171 }
8172}
8173
8174impl fidl::endpoints::Responder for DictionaryRouterRouteResponder {
8175 type ControlHandle = DictionaryRouterControlHandle;
8176
8177 fn control_handle(&self) -> &DictionaryRouterControlHandle {
8178 &self.control_handle
8179 }
8180
8181 fn drop_without_shutdown(mut self) {
8182 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8184 std::mem::forget(self);
8186 }
8187}
8188
8189impl DictionaryRouterRouteResponder {
8190 pub fn send(
8194 self,
8195 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
8196 ) -> Result<(), fidl::Error> {
8197 let _result = self.send_raw(result);
8198 if _result.is_err() {
8199 self.control_handle.shutdown();
8200 }
8201 self.drop_without_shutdown();
8202 _result
8203 }
8204
8205 pub fn send_no_shutdown_on_err(
8207 self,
8208 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
8209 ) -> Result<(), fidl::Error> {
8210 let _result = self.send_raw(result);
8211 self.drop_without_shutdown();
8212 _result
8213 }
8214
8215 fn send_raw(
8216 &self,
8217 mut result: Result<DictionaryRouterRouteResponse, RouterError>,
8218 ) -> Result<(), fidl::Error> {
8219 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8220 DictionaryRouterRouteResponse,
8221 RouterError,
8222 >>(
8223 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8224 self.tx_id,
8225 0x714c65bfe54bd79f,
8226 fidl::encoding::DynamicFlags::FLEXIBLE,
8227 )
8228 }
8229}
8230
8231#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8232pub struct DirConnectorRouterMarker;
8233
8234impl fidl::endpoints::ProtocolMarker for DirConnectorRouterMarker {
8235 type Proxy = DirConnectorRouterProxy;
8236 type RequestStream = DirConnectorRouterRequestStream;
8237 #[cfg(target_os = "fuchsia")]
8238 type SynchronousProxy = DirConnectorRouterSynchronousProxy;
8239
8240 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
8241}
8242impl fidl::endpoints::DiscoverableProtocolMarker for DirConnectorRouterMarker {}
8243pub type DirConnectorRouterRouteResult = Result<DirConnectorRouterRouteResponse, RouterError>;
8244
8245pub trait DirConnectorRouterProxyInterface: Send + Sync {
8246 type RouteResponseFut: std::future::Future<Output = Result<DirConnectorRouterRouteResult, fidl::Error>>
8247 + Send;
8248 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
8249}
8250#[derive(Debug)]
8251#[cfg(target_os = "fuchsia")]
8252pub struct DirConnectorRouterSynchronousProxy {
8253 client: fidl::client::sync::Client,
8254}
8255
8256#[cfg(target_os = "fuchsia")]
8257impl fidl::endpoints::SynchronousProxy for DirConnectorRouterSynchronousProxy {
8258 type Proxy = DirConnectorRouterProxy;
8259 type Protocol = DirConnectorRouterMarker;
8260
8261 fn from_channel(inner: fidl::Channel) -> Self {
8262 Self::new(inner)
8263 }
8264
8265 fn into_channel(self) -> fidl::Channel {
8266 self.client.into_channel()
8267 }
8268
8269 fn as_channel(&self) -> &fidl::Channel {
8270 self.client.as_channel()
8271 }
8272}
8273
8274#[cfg(target_os = "fuchsia")]
8275impl DirConnectorRouterSynchronousProxy {
8276 pub fn new(channel: fidl::Channel) -> Self {
8277 let protocol_name =
8278 <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8279 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
8280 }
8281
8282 pub fn into_channel(self) -> fidl::Channel {
8283 self.client.into_channel()
8284 }
8285
8286 pub fn wait_for_event(
8289 &self,
8290 deadline: zx::MonotonicInstant,
8291 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
8292 DirConnectorRouterEvent::decode(self.client.wait_for_event(deadline)?)
8293 }
8294
8295 pub fn r#route(
8296 &self,
8297 mut payload: RouteRequest,
8298 ___deadline: zx::MonotonicInstant,
8299 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
8300 let _response = self.client.send_query::<
8301 RouteRequest,
8302 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
8303 >(
8304 &mut payload,
8305 0xd7e0f01da2c8e40,
8306 fidl::encoding::DynamicFlags::FLEXIBLE,
8307 ___deadline,
8308 )?
8309 .into_result::<DirConnectorRouterMarker>("route")?;
8310 Ok(_response.map(|x| x))
8311 }
8312}
8313
8314#[cfg(target_os = "fuchsia")]
8315impl From<DirConnectorRouterSynchronousProxy> for zx::NullableHandle {
8316 fn from(value: DirConnectorRouterSynchronousProxy) -> Self {
8317 value.into_channel().into()
8318 }
8319}
8320
8321#[cfg(target_os = "fuchsia")]
8322impl From<fidl::Channel> for DirConnectorRouterSynchronousProxy {
8323 fn from(value: fidl::Channel) -> Self {
8324 Self::new(value)
8325 }
8326}
8327
8328#[cfg(target_os = "fuchsia")]
8329impl fidl::endpoints::FromClient for DirConnectorRouterSynchronousProxy {
8330 type Protocol = DirConnectorRouterMarker;
8331
8332 fn from_client(value: fidl::endpoints::ClientEnd<DirConnectorRouterMarker>) -> Self {
8333 Self::new(value.into_channel())
8334 }
8335}
8336
8337#[derive(Debug, Clone)]
8338pub struct DirConnectorRouterProxy {
8339 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8340}
8341
8342impl fidl::endpoints::Proxy for DirConnectorRouterProxy {
8343 type Protocol = DirConnectorRouterMarker;
8344
8345 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8346 Self::new(inner)
8347 }
8348
8349 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8350 self.client.into_channel().map_err(|client| Self { client })
8351 }
8352
8353 fn as_channel(&self) -> &::fidl::AsyncChannel {
8354 self.client.as_channel()
8355 }
8356}
8357
8358impl DirConnectorRouterProxy {
8359 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8361 let protocol_name =
8362 <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8363 Self { client: fidl::client::Client::new(channel, protocol_name) }
8364 }
8365
8366 pub fn take_event_stream(&self) -> DirConnectorRouterEventStream {
8372 DirConnectorRouterEventStream { event_receiver: self.client.take_event_receiver() }
8373 }
8374
8375 pub fn r#route(
8376 &self,
8377 mut payload: RouteRequest,
8378 ) -> fidl::client::QueryResponseFut<
8379 DirConnectorRouterRouteResult,
8380 fidl::encoding::DefaultFuchsiaResourceDialect,
8381 > {
8382 DirConnectorRouterProxyInterface::r#route(self, payload)
8383 }
8384}
8385
8386impl DirConnectorRouterProxyInterface for DirConnectorRouterProxy {
8387 type RouteResponseFut = fidl::client::QueryResponseFut<
8388 DirConnectorRouterRouteResult,
8389 fidl::encoding::DefaultFuchsiaResourceDialect,
8390 >;
8391 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
8392 fn _decode(
8393 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8394 ) -> Result<DirConnectorRouterRouteResult, fidl::Error> {
8395 let _response = fidl::client::decode_transaction_body::<
8396 fidl::encoding::FlexibleResultType<DirConnectorRouterRouteResponse, RouterError>,
8397 fidl::encoding::DefaultFuchsiaResourceDialect,
8398 0xd7e0f01da2c8e40,
8399 >(_buf?)?
8400 .into_result::<DirConnectorRouterMarker>("route")?;
8401 Ok(_response.map(|x| x))
8402 }
8403 self.client.send_query_and_decode::<RouteRequest, DirConnectorRouterRouteResult>(
8404 &mut payload,
8405 0xd7e0f01da2c8e40,
8406 fidl::encoding::DynamicFlags::FLEXIBLE,
8407 _decode,
8408 )
8409 }
8410}
8411
8412pub struct DirConnectorRouterEventStream {
8413 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8414}
8415
8416impl std::marker::Unpin for DirConnectorRouterEventStream {}
8417
8418impl futures::stream::FusedStream for DirConnectorRouterEventStream {
8419 fn is_terminated(&self) -> bool {
8420 self.event_receiver.is_terminated()
8421 }
8422}
8423
8424impl futures::Stream for DirConnectorRouterEventStream {
8425 type Item = Result<DirConnectorRouterEvent, fidl::Error>;
8426
8427 fn poll_next(
8428 mut self: std::pin::Pin<&mut Self>,
8429 cx: &mut std::task::Context<'_>,
8430 ) -> std::task::Poll<Option<Self::Item>> {
8431 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8432 &mut self.event_receiver,
8433 cx
8434 )?) {
8435 Some(buf) => std::task::Poll::Ready(Some(DirConnectorRouterEvent::decode(buf))),
8436 None => std::task::Poll::Ready(None),
8437 }
8438 }
8439}
8440
8441#[derive(Debug)]
8442pub enum DirConnectorRouterEvent {
8443 #[non_exhaustive]
8444 _UnknownEvent {
8445 ordinal: u64,
8447 },
8448}
8449
8450impl DirConnectorRouterEvent {
8451 fn decode(
8453 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8454 ) -> Result<DirConnectorRouterEvent, fidl::Error> {
8455 let (bytes, _handles) = buf.split_mut();
8456 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8457 debug_assert_eq!(tx_header.tx_id, 0);
8458 match tx_header.ordinal {
8459 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8460 Ok(DirConnectorRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8461 }
8462 _ => Err(fidl::Error::UnknownOrdinal {
8463 ordinal: tx_header.ordinal,
8464 protocol_name:
8465 <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8466 }),
8467 }
8468 }
8469}
8470
8471pub struct DirConnectorRouterRequestStream {
8473 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8474 is_terminated: bool,
8475}
8476
8477impl std::marker::Unpin for DirConnectorRouterRequestStream {}
8478
8479impl futures::stream::FusedStream for DirConnectorRouterRequestStream {
8480 fn is_terminated(&self) -> bool {
8481 self.is_terminated
8482 }
8483}
8484
8485impl fidl::endpoints::RequestStream for DirConnectorRouterRequestStream {
8486 type Protocol = DirConnectorRouterMarker;
8487 type ControlHandle = DirConnectorRouterControlHandle;
8488
8489 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8490 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8491 }
8492
8493 fn control_handle(&self) -> Self::ControlHandle {
8494 DirConnectorRouterControlHandle { inner: self.inner.clone() }
8495 }
8496
8497 fn into_inner(
8498 self,
8499 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8500 {
8501 (self.inner, self.is_terminated)
8502 }
8503
8504 fn from_inner(
8505 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8506 is_terminated: bool,
8507 ) -> Self {
8508 Self { inner, is_terminated }
8509 }
8510}
8511
8512impl futures::Stream for DirConnectorRouterRequestStream {
8513 type Item = Result<DirConnectorRouterRequest, fidl::Error>;
8514
8515 fn poll_next(
8516 mut self: std::pin::Pin<&mut Self>,
8517 cx: &mut std::task::Context<'_>,
8518 ) -> std::task::Poll<Option<Self::Item>> {
8519 let this = &mut *self;
8520 if this.inner.check_shutdown(cx) {
8521 this.is_terminated = true;
8522 return std::task::Poll::Ready(None);
8523 }
8524 if this.is_terminated {
8525 panic!("polled DirConnectorRouterRequestStream after completion");
8526 }
8527 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8528 |bytes, handles| {
8529 match this.inner.channel().read_etc(cx, bytes, handles) {
8530 std::task::Poll::Ready(Ok(())) => {}
8531 std::task::Poll::Pending => return std::task::Poll::Pending,
8532 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8533 this.is_terminated = true;
8534 return std::task::Poll::Ready(None);
8535 }
8536 std::task::Poll::Ready(Err(e)) => {
8537 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8538 e.into(),
8539 ))));
8540 }
8541 }
8542
8543 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8545
8546 std::task::Poll::Ready(Some(match header.ordinal {
8547 0xd7e0f01da2c8e40 => {
8548 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8549 let mut req = fidl::new_empty!(RouteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
8550 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
8551 let control_handle = DirConnectorRouterControlHandle {
8552 inner: this.inner.clone(),
8553 };
8554 Ok(DirConnectorRouterRequest::Route {payload: req,
8555 responder: DirConnectorRouterRouteResponder {
8556 control_handle: std::mem::ManuallyDrop::new(control_handle),
8557 tx_id: header.tx_id,
8558 },
8559 })
8560 }
8561 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8562 Ok(DirConnectorRouterRequest::_UnknownMethod {
8563 ordinal: header.ordinal,
8564 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
8565 method_type: fidl::MethodType::OneWay,
8566 })
8567 }
8568 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8569 this.inner.send_framework_err(
8570 fidl::encoding::FrameworkErr::UnknownMethod,
8571 header.tx_id,
8572 header.ordinal,
8573 header.dynamic_flags(),
8574 (bytes, handles),
8575 )?;
8576 Ok(DirConnectorRouterRequest::_UnknownMethod {
8577 ordinal: header.ordinal,
8578 control_handle: DirConnectorRouterControlHandle { inner: this.inner.clone() },
8579 method_type: fidl::MethodType::TwoWay,
8580 })
8581 }
8582 _ => Err(fidl::Error::UnknownOrdinal {
8583 ordinal: header.ordinal,
8584 protocol_name: <DirConnectorRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8585 }),
8586 }))
8587 },
8588 )
8589 }
8590}
8591
8592#[derive(Debug)]
8593pub enum DirConnectorRouterRequest {
8594 Route {
8595 payload: RouteRequest,
8596 responder: DirConnectorRouterRouteResponder,
8597 },
8598 #[non_exhaustive]
8600 _UnknownMethod {
8601 ordinal: u64,
8603 control_handle: DirConnectorRouterControlHandle,
8604 method_type: fidl::MethodType,
8605 },
8606}
8607
8608impl DirConnectorRouterRequest {
8609 #[allow(irrefutable_let_patterns)]
8610 pub fn into_route(self) -> Option<(RouteRequest, DirConnectorRouterRouteResponder)> {
8611 if let DirConnectorRouterRequest::Route { payload, responder } = self {
8612 Some((payload, responder))
8613 } else {
8614 None
8615 }
8616 }
8617
8618 pub fn method_name(&self) -> &'static str {
8620 match *self {
8621 DirConnectorRouterRequest::Route { .. } => "route",
8622 DirConnectorRouterRequest::_UnknownMethod {
8623 method_type: fidl::MethodType::OneWay,
8624 ..
8625 } => "unknown one-way method",
8626 DirConnectorRouterRequest::_UnknownMethod {
8627 method_type: fidl::MethodType::TwoWay,
8628 ..
8629 } => "unknown two-way method",
8630 }
8631 }
8632}
8633
8634#[derive(Debug, Clone)]
8635pub struct DirConnectorRouterControlHandle {
8636 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8637}
8638
8639impl fidl::endpoints::ControlHandle for DirConnectorRouterControlHandle {
8640 fn shutdown(&self) {
8641 self.inner.shutdown()
8642 }
8643
8644 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8645 self.inner.shutdown_with_epitaph(status)
8646 }
8647
8648 fn is_closed(&self) -> bool {
8649 self.inner.channel().is_closed()
8650 }
8651 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8652 self.inner.channel().on_closed()
8653 }
8654
8655 #[cfg(target_os = "fuchsia")]
8656 fn signal_peer(
8657 &self,
8658 clear_mask: zx::Signals,
8659 set_mask: zx::Signals,
8660 ) -> Result<(), zx_status::Status> {
8661 use fidl::Peered;
8662 self.inner.channel().signal_peer(clear_mask, set_mask)
8663 }
8664}
8665
8666impl DirConnectorRouterControlHandle {}
8667
8668#[must_use = "FIDL methods require a response to be sent"]
8669#[derive(Debug)]
8670pub struct DirConnectorRouterRouteResponder {
8671 control_handle: std::mem::ManuallyDrop<DirConnectorRouterControlHandle>,
8672 tx_id: u32,
8673}
8674
8675impl std::ops::Drop for DirConnectorRouterRouteResponder {
8679 fn drop(&mut self) {
8680 self.control_handle.shutdown();
8681 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8683 }
8684}
8685
8686impl fidl::endpoints::Responder for DirConnectorRouterRouteResponder {
8687 type ControlHandle = DirConnectorRouterControlHandle;
8688
8689 fn control_handle(&self) -> &DirConnectorRouterControlHandle {
8690 &self.control_handle
8691 }
8692
8693 fn drop_without_shutdown(mut self) {
8694 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8696 std::mem::forget(self);
8698 }
8699}
8700
8701impl DirConnectorRouterRouteResponder {
8702 pub fn send(
8706 self,
8707 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
8708 ) -> Result<(), fidl::Error> {
8709 let _result = self.send_raw(result);
8710 if _result.is_err() {
8711 self.control_handle.shutdown();
8712 }
8713 self.drop_without_shutdown();
8714 _result
8715 }
8716
8717 pub fn send_no_shutdown_on_err(
8719 self,
8720 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
8721 ) -> Result<(), fidl::Error> {
8722 let _result = self.send_raw(result);
8723 self.drop_without_shutdown();
8724 _result
8725 }
8726
8727 fn send_raw(
8728 &self,
8729 mut result: Result<DirConnectorRouterRouteResponse, RouterError>,
8730 ) -> Result<(), fidl::Error> {
8731 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
8732 DirConnectorRouterRouteResponse,
8733 RouterError,
8734 >>(
8735 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
8736 self.tx_id,
8737 0xd7e0f01da2c8e40,
8738 fidl::encoding::DynamicFlags::FLEXIBLE,
8739 )
8740 }
8741}
8742
8743#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8744pub struct DirEntryRouterMarker;
8745
8746impl fidl::endpoints::ProtocolMarker for DirEntryRouterMarker {
8747 type Proxy = DirEntryRouterProxy;
8748 type RequestStream = DirEntryRouterRequestStream;
8749 #[cfg(target_os = "fuchsia")]
8750 type SynchronousProxy = DirEntryRouterSynchronousProxy;
8751
8752 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
8753}
8754impl fidl::endpoints::DiscoverableProtocolMarker for DirEntryRouterMarker {}
8755pub type DirEntryRouterRouteResult = Result<DirEntryRouterRouteResponse, RouterError>;
8756
8757pub trait DirEntryRouterProxyInterface: Send + Sync {
8758 type RouteResponseFut: std::future::Future<Output = Result<DirEntryRouterRouteResult, fidl::Error>>
8759 + Send;
8760 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
8761}
8762#[derive(Debug)]
8763#[cfg(target_os = "fuchsia")]
8764pub struct DirEntryRouterSynchronousProxy {
8765 client: fidl::client::sync::Client,
8766}
8767
8768#[cfg(target_os = "fuchsia")]
8769impl fidl::endpoints::SynchronousProxy for DirEntryRouterSynchronousProxy {
8770 type Proxy = DirEntryRouterProxy;
8771 type Protocol = DirEntryRouterMarker;
8772
8773 fn from_channel(inner: fidl::Channel) -> Self {
8774 Self::new(inner)
8775 }
8776
8777 fn into_channel(self) -> fidl::Channel {
8778 self.client.into_channel()
8779 }
8780
8781 fn as_channel(&self) -> &fidl::Channel {
8782 self.client.as_channel()
8783 }
8784}
8785
8786#[cfg(target_os = "fuchsia")]
8787impl DirEntryRouterSynchronousProxy {
8788 pub fn new(channel: fidl::Channel) -> Self {
8789 let protocol_name = <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8790 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
8791 }
8792
8793 pub fn into_channel(self) -> fidl::Channel {
8794 self.client.into_channel()
8795 }
8796
8797 pub fn wait_for_event(
8800 &self,
8801 deadline: zx::MonotonicInstant,
8802 ) -> Result<DirEntryRouterEvent, fidl::Error> {
8803 DirEntryRouterEvent::decode(self.client.wait_for_event(deadline)?)
8804 }
8805
8806 pub fn r#route(
8807 &self,
8808 mut payload: RouteRequest,
8809 ___deadline: zx::MonotonicInstant,
8810 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
8811 let _response = self.client.send_query::<
8812 RouteRequest,
8813 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
8814 >(
8815 &mut payload,
8816 0x1ac694001c208bd2,
8817 fidl::encoding::DynamicFlags::FLEXIBLE,
8818 ___deadline,
8819 )?
8820 .into_result::<DirEntryRouterMarker>("route")?;
8821 Ok(_response.map(|x| x))
8822 }
8823}
8824
8825#[cfg(target_os = "fuchsia")]
8826impl From<DirEntryRouterSynchronousProxy> for zx::NullableHandle {
8827 fn from(value: DirEntryRouterSynchronousProxy) -> Self {
8828 value.into_channel().into()
8829 }
8830}
8831
8832#[cfg(target_os = "fuchsia")]
8833impl From<fidl::Channel> for DirEntryRouterSynchronousProxy {
8834 fn from(value: fidl::Channel) -> Self {
8835 Self::new(value)
8836 }
8837}
8838
8839#[cfg(target_os = "fuchsia")]
8840impl fidl::endpoints::FromClient for DirEntryRouterSynchronousProxy {
8841 type Protocol = DirEntryRouterMarker;
8842
8843 fn from_client(value: fidl::endpoints::ClientEnd<DirEntryRouterMarker>) -> Self {
8844 Self::new(value.into_channel())
8845 }
8846}
8847
8848#[derive(Debug, Clone)]
8849pub struct DirEntryRouterProxy {
8850 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8851}
8852
8853impl fidl::endpoints::Proxy for DirEntryRouterProxy {
8854 type Protocol = DirEntryRouterMarker;
8855
8856 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8857 Self::new(inner)
8858 }
8859
8860 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8861 self.client.into_channel().map_err(|client| Self { client })
8862 }
8863
8864 fn as_channel(&self) -> &::fidl::AsyncChannel {
8865 self.client.as_channel()
8866 }
8867}
8868
8869impl DirEntryRouterProxy {
8870 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8872 let protocol_name = <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8873 Self { client: fidl::client::Client::new(channel, protocol_name) }
8874 }
8875
8876 pub fn take_event_stream(&self) -> DirEntryRouterEventStream {
8882 DirEntryRouterEventStream { event_receiver: self.client.take_event_receiver() }
8883 }
8884
8885 pub fn r#route(
8886 &self,
8887 mut payload: RouteRequest,
8888 ) -> fidl::client::QueryResponseFut<
8889 DirEntryRouterRouteResult,
8890 fidl::encoding::DefaultFuchsiaResourceDialect,
8891 > {
8892 DirEntryRouterProxyInterface::r#route(self, payload)
8893 }
8894}
8895
8896impl DirEntryRouterProxyInterface for DirEntryRouterProxy {
8897 type RouteResponseFut = fidl::client::QueryResponseFut<
8898 DirEntryRouterRouteResult,
8899 fidl::encoding::DefaultFuchsiaResourceDialect,
8900 >;
8901 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
8902 fn _decode(
8903 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8904 ) -> Result<DirEntryRouterRouteResult, fidl::Error> {
8905 let _response = fidl::client::decode_transaction_body::<
8906 fidl::encoding::FlexibleResultType<DirEntryRouterRouteResponse, RouterError>,
8907 fidl::encoding::DefaultFuchsiaResourceDialect,
8908 0x1ac694001c208bd2,
8909 >(_buf?)?
8910 .into_result::<DirEntryRouterMarker>("route")?;
8911 Ok(_response.map(|x| x))
8912 }
8913 self.client.send_query_and_decode::<RouteRequest, DirEntryRouterRouteResult>(
8914 &mut payload,
8915 0x1ac694001c208bd2,
8916 fidl::encoding::DynamicFlags::FLEXIBLE,
8917 _decode,
8918 )
8919 }
8920}
8921
8922pub struct DirEntryRouterEventStream {
8923 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8924}
8925
8926impl std::marker::Unpin for DirEntryRouterEventStream {}
8927
8928impl futures::stream::FusedStream for DirEntryRouterEventStream {
8929 fn is_terminated(&self) -> bool {
8930 self.event_receiver.is_terminated()
8931 }
8932}
8933
8934impl futures::Stream for DirEntryRouterEventStream {
8935 type Item = Result<DirEntryRouterEvent, fidl::Error>;
8936
8937 fn poll_next(
8938 mut self: std::pin::Pin<&mut Self>,
8939 cx: &mut std::task::Context<'_>,
8940 ) -> std::task::Poll<Option<Self::Item>> {
8941 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8942 &mut self.event_receiver,
8943 cx
8944 )?) {
8945 Some(buf) => std::task::Poll::Ready(Some(DirEntryRouterEvent::decode(buf))),
8946 None => std::task::Poll::Ready(None),
8947 }
8948 }
8949}
8950
8951#[derive(Debug)]
8952pub enum DirEntryRouterEvent {
8953 #[non_exhaustive]
8954 _UnknownEvent {
8955 ordinal: u64,
8957 },
8958}
8959
8960impl DirEntryRouterEvent {
8961 fn decode(
8963 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8964 ) -> Result<DirEntryRouterEvent, fidl::Error> {
8965 let (bytes, _handles) = buf.split_mut();
8966 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8967 debug_assert_eq!(tx_header.tx_id, 0);
8968 match tx_header.ordinal {
8969 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
8970 Ok(DirEntryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
8971 }
8972 _ => Err(fidl::Error::UnknownOrdinal {
8973 ordinal: tx_header.ordinal,
8974 protocol_name:
8975 <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8976 }),
8977 }
8978 }
8979}
8980
8981pub struct DirEntryRouterRequestStream {
8983 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8984 is_terminated: bool,
8985}
8986
8987impl std::marker::Unpin for DirEntryRouterRequestStream {}
8988
8989impl futures::stream::FusedStream for DirEntryRouterRequestStream {
8990 fn is_terminated(&self) -> bool {
8991 self.is_terminated
8992 }
8993}
8994
8995impl fidl::endpoints::RequestStream for DirEntryRouterRequestStream {
8996 type Protocol = DirEntryRouterMarker;
8997 type ControlHandle = DirEntryRouterControlHandle;
8998
8999 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9000 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9001 }
9002
9003 fn control_handle(&self) -> Self::ControlHandle {
9004 DirEntryRouterControlHandle { inner: self.inner.clone() }
9005 }
9006
9007 fn into_inner(
9008 self,
9009 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9010 {
9011 (self.inner, self.is_terminated)
9012 }
9013
9014 fn from_inner(
9015 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9016 is_terminated: bool,
9017 ) -> Self {
9018 Self { inner, is_terminated }
9019 }
9020}
9021
9022impl futures::Stream for DirEntryRouterRequestStream {
9023 type Item = Result<DirEntryRouterRequest, fidl::Error>;
9024
9025 fn poll_next(
9026 mut self: std::pin::Pin<&mut Self>,
9027 cx: &mut std::task::Context<'_>,
9028 ) -> std::task::Poll<Option<Self::Item>> {
9029 let this = &mut *self;
9030 if this.inner.check_shutdown(cx) {
9031 this.is_terminated = true;
9032 return std::task::Poll::Ready(None);
9033 }
9034 if this.is_terminated {
9035 panic!("polled DirEntryRouterRequestStream after completion");
9036 }
9037 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9038 |bytes, handles| {
9039 match this.inner.channel().read_etc(cx, bytes, handles) {
9040 std::task::Poll::Ready(Ok(())) => {}
9041 std::task::Poll::Pending => return std::task::Poll::Pending,
9042 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9043 this.is_terminated = true;
9044 return std::task::Poll::Ready(None);
9045 }
9046 std::task::Poll::Ready(Err(e)) => {
9047 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9048 e.into(),
9049 ))));
9050 }
9051 }
9052
9053 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9055
9056 std::task::Poll::Ready(Some(match header.ordinal {
9057 0x1ac694001c208bd2 => {
9058 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9059 let mut req = fidl::new_empty!(
9060 RouteRequest,
9061 fidl::encoding::DefaultFuchsiaResourceDialect
9062 );
9063 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
9064 let control_handle =
9065 DirEntryRouterControlHandle { inner: this.inner.clone() };
9066 Ok(DirEntryRouterRequest::Route {
9067 payload: req,
9068 responder: DirEntryRouterRouteResponder {
9069 control_handle: std::mem::ManuallyDrop::new(control_handle),
9070 tx_id: header.tx_id,
9071 },
9072 })
9073 }
9074 _ if header.tx_id == 0
9075 && header
9076 .dynamic_flags()
9077 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9078 {
9079 Ok(DirEntryRouterRequest::_UnknownMethod {
9080 ordinal: header.ordinal,
9081 control_handle: DirEntryRouterControlHandle {
9082 inner: this.inner.clone(),
9083 },
9084 method_type: fidl::MethodType::OneWay,
9085 })
9086 }
9087 _ if header
9088 .dynamic_flags()
9089 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9090 {
9091 this.inner.send_framework_err(
9092 fidl::encoding::FrameworkErr::UnknownMethod,
9093 header.tx_id,
9094 header.ordinal,
9095 header.dynamic_flags(),
9096 (bytes, handles),
9097 )?;
9098 Ok(DirEntryRouterRequest::_UnknownMethod {
9099 ordinal: header.ordinal,
9100 control_handle: DirEntryRouterControlHandle {
9101 inner: this.inner.clone(),
9102 },
9103 method_type: fidl::MethodType::TwoWay,
9104 })
9105 }
9106 _ => Err(fidl::Error::UnknownOrdinal {
9107 ordinal: header.ordinal,
9108 protocol_name:
9109 <DirEntryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9110 }),
9111 }))
9112 },
9113 )
9114 }
9115}
9116
9117#[derive(Debug)]
9118pub enum DirEntryRouterRequest {
9119 Route {
9120 payload: RouteRequest,
9121 responder: DirEntryRouterRouteResponder,
9122 },
9123 #[non_exhaustive]
9125 _UnknownMethod {
9126 ordinal: u64,
9128 control_handle: DirEntryRouterControlHandle,
9129 method_type: fidl::MethodType,
9130 },
9131}
9132
9133impl DirEntryRouterRequest {
9134 #[allow(irrefutable_let_patterns)]
9135 pub fn into_route(self) -> Option<(RouteRequest, DirEntryRouterRouteResponder)> {
9136 if let DirEntryRouterRequest::Route { payload, responder } = self {
9137 Some((payload, responder))
9138 } else {
9139 None
9140 }
9141 }
9142
9143 pub fn method_name(&self) -> &'static str {
9145 match *self {
9146 DirEntryRouterRequest::Route { .. } => "route",
9147 DirEntryRouterRequest::_UnknownMethod {
9148 method_type: fidl::MethodType::OneWay, ..
9149 } => "unknown one-way method",
9150 DirEntryRouterRequest::_UnknownMethod {
9151 method_type: fidl::MethodType::TwoWay, ..
9152 } => "unknown two-way method",
9153 }
9154 }
9155}
9156
9157#[derive(Debug, Clone)]
9158pub struct DirEntryRouterControlHandle {
9159 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9160}
9161
9162impl fidl::endpoints::ControlHandle for DirEntryRouterControlHandle {
9163 fn shutdown(&self) {
9164 self.inner.shutdown()
9165 }
9166
9167 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9168 self.inner.shutdown_with_epitaph(status)
9169 }
9170
9171 fn is_closed(&self) -> bool {
9172 self.inner.channel().is_closed()
9173 }
9174 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9175 self.inner.channel().on_closed()
9176 }
9177
9178 #[cfg(target_os = "fuchsia")]
9179 fn signal_peer(
9180 &self,
9181 clear_mask: zx::Signals,
9182 set_mask: zx::Signals,
9183 ) -> Result<(), zx_status::Status> {
9184 use fidl::Peered;
9185 self.inner.channel().signal_peer(clear_mask, set_mask)
9186 }
9187}
9188
9189impl DirEntryRouterControlHandle {}
9190
9191#[must_use = "FIDL methods require a response to be sent"]
9192#[derive(Debug)]
9193pub struct DirEntryRouterRouteResponder {
9194 control_handle: std::mem::ManuallyDrop<DirEntryRouterControlHandle>,
9195 tx_id: u32,
9196}
9197
9198impl std::ops::Drop for DirEntryRouterRouteResponder {
9202 fn drop(&mut self) {
9203 self.control_handle.shutdown();
9204 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9206 }
9207}
9208
9209impl fidl::endpoints::Responder for DirEntryRouterRouteResponder {
9210 type ControlHandle = DirEntryRouterControlHandle;
9211
9212 fn control_handle(&self) -> &DirEntryRouterControlHandle {
9213 &self.control_handle
9214 }
9215
9216 fn drop_without_shutdown(mut self) {
9217 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9219 std::mem::forget(self);
9221 }
9222}
9223
9224impl DirEntryRouterRouteResponder {
9225 pub fn send(
9229 self,
9230 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
9231 ) -> Result<(), fidl::Error> {
9232 let _result = self.send_raw(result);
9233 if _result.is_err() {
9234 self.control_handle.shutdown();
9235 }
9236 self.drop_without_shutdown();
9237 _result
9238 }
9239
9240 pub fn send_no_shutdown_on_err(
9242 self,
9243 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
9244 ) -> Result<(), fidl::Error> {
9245 let _result = self.send_raw(result);
9246 self.drop_without_shutdown();
9247 _result
9248 }
9249
9250 fn send_raw(
9251 &self,
9252 mut result: Result<DirEntryRouterRouteResponse, RouterError>,
9253 ) -> Result<(), fidl::Error> {
9254 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9255 DirEntryRouterRouteResponse,
9256 RouterError,
9257 >>(
9258 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
9259 self.tx_id,
9260 0x1ac694001c208bd2,
9261 fidl::encoding::DynamicFlags::FLEXIBLE,
9262 )
9263 }
9264}
9265
9266#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9267pub struct DirReceiverMarker;
9268
9269impl fidl::endpoints::ProtocolMarker for DirReceiverMarker {
9270 type Proxy = DirReceiverProxy;
9271 type RequestStream = DirReceiverRequestStream;
9272 #[cfg(target_os = "fuchsia")]
9273 type SynchronousProxy = DirReceiverSynchronousProxy;
9274
9275 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
9276}
9277impl fidl::endpoints::DiscoverableProtocolMarker for DirReceiverMarker {}
9278
9279pub trait DirReceiverProxyInterface: Send + Sync {
9280 fn r#receive(&self, payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error>;
9281}
9282#[derive(Debug)]
9283#[cfg(target_os = "fuchsia")]
9284pub struct DirReceiverSynchronousProxy {
9285 client: fidl::client::sync::Client,
9286}
9287
9288#[cfg(target_os = "fuchsia")]
9289impl fidl::endpoints::SynchronousProxy for DirReceiverSynchronousProxy {
9290 type Proxy = DirReceiverProxy;
9291 type Protocol = DirReceiverMarker;
9292
9293 fn from_channel(inner: fidl::Channel) -> Self {
9294 Self::new(inner)
9295 }
9296
9297 fn into_channel(self) -> fidl::Channel {
9298 self.client.into_channel()
9299 }
9300
9301 fn as_channel(&self) -> &fidl::Channel {
9302 self.client.as_channel()
9303 }
9304}
9305
9306#[cfg(target_os = "fuchsia")]
9307impl DirReceiverSynchronousProxy {
9308 pub fn new(channel: fidl::Channel) -> Self {
9309 let protocol_name = <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9310 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
9311 }
9312
9313 pub fn into_channel(self) -> fidl::Channel {
9314 self.client.into_channel()
9315 }
9316
9317 pub fn wait_for_event(
9320 &self,
9321 deadline: zx::MonotonicInstant,
9322 ) -> Result<DirReceiverEvent, fidl::Error> {
9323 DirReceiverEvent::decode(self.client.wait_for_event(deadline)?)
9324 }
9325
9326 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
9331 self.client.send::<DirReceiverReceiveRequest>(
9332 &mut payload,
9333 0xcdc3e9b89fe7bb4,
9334 fidl::encoding::DynamicFlags::FLEXIBLE,
9335 )
9336 }
9337}
9338
9339#[cfg(target_os = "fuchsia")]
9340impl From<DirReceiverSynchronousProxy> for zx::NullableHandle {
9341 fn from(value: DirReceiverSynchronousProxy) -> Self {
9342 value.into_channel().into()
9343 }
9344}
9345
9346#[cfg(target_os = "fuchsia")]
9347impl From<fidl::Channel> for DirReceiverSynchronousProxy {
9348 fn from(value: fidl::Channel) -> Self {
9349 Self::new(value)
9350 }
9351}
9352
9353#[cfg(target_os = "fuchsia")]
9354impl fidl::endpoints::FromClient for DirReceiverSynchronousProxy {
9355 type Protocol = DirReceiverMarker;
9356
9357 fn from_client(value: fidl::endpoints::ClientEnd<DirReceiverMarker>) -> Self {
9358 Self::new(value.into_channel())
9359 }
9360}
9361
9362#[derive(Debug, Clone)]
9363pub struct DirReceiverProxy {
9364 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9365}
9366
9367impl fidl::endpoints::Proxy for DirReceiverProxy {
9368 type Protocol = DirReceiverMarker;
9369
9370 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9371 Self::new(inner)
9372 }
9373
9374 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9375 self.client.into_channel().map_err(|client| Self { client })
9376 }
9377
9378 fn as_channel(&self) -> &::fidl::AsyncChannel {
9379 self.client.as_channel()
9380 }
9381}
9382
9383impl DirReceiverProxy {
9384 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9386 let protocol_name = <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9387 Self { client: fidl::client::Client::new(channel, protocol_name) }
9388 }
9389
9390 pub fn take_event_stream(&self) -> DirReceiverEventStream {
9396 DirReceiverEventStream { event_receiver: self.client.take_event_receiver() }
9397 }
9398
9399 pub fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
9404 DirReceiverProxyInterface::r#receive(self, payload)
9405 }
9406}
9407
9408impl DirReceiverProxyInterface for DirReceiverProxy {
9409 fn r#receive(&self, mut payload: DirReceiverReceiveRequest) -> Result<(), fidl::Error> {
9410 self.client.send::<DirReceiverReceiveRequest>(
9411 &mut payload,
9412 0xcdc3e9b89fe7bb4,
9413 fidl::encoding::DynamicFlags::FLEXIBLE,
9414 )
9415 }
9416}
9417
9418pub struct DirReceiverEventStream {
9419 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9420}
9421
9422impl std::marker::Unpin for DirReceiverEventStream {}
9423
9424impl futures::stream::FusedStream for DirReceiverEventStream {
9425 fn is_terminated(&self) -> bool {
9426 self.event_receiver.is_terminated()
9427 }
9428}
9429
9430impl futures::Stream for DirReceiverEventStream {
9431 type Item = Result<DirReceiverEvent, fidl::Error>;
9432
9433 fn poll_next(
9434 mut self: std::pin::Pin<&mut Self>,
9435 cx: &mut std::task::Context<'_>,
9436 ) -> std::task::Poll<Option<Self::Item>> {
9437 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9438 &mut self.event_receiver,
9439 cx
9440 )?) {
9441 Some(buf) => std::task::Poll::Ready(Some(DirReceiverEvent::decode(buf))),
9442 None => std::task::Poll::Ready(None),
9443 }
9444 }
9445}
9446
9447#[derive(Debug)]
9448pub enum DirReceiverEvent {
9449 #[non_exhaustive]
9450 _UnknownEvent {
9451 ordinal: u64,
9453 },
9454}
9455
9456impl DirReceiverEvent {
9457 fn decode(
9459 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9460 ) -> Result<DirReceiverEvent, fidl::Error> {
9461 let (bytes, _handles) = buf.split_mut();
9462 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9463 debug_assert_eq!(tx_header.tx_id, 0);
9464 match tx_header.ordinal {
9465 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9466 Ok(DirReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9467 }
9468 _ => Err(fidl::Error::UnknownOrdinal {
9469 ordinal: tx_header.ordinal,
9470 protocol_name: <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9471 }),
9472 }
9473 }
9474}
9475
9476pub struct DirReceiverRequestStream {
9478 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9479 is_terminated: bool,
9480}
9481
9482impl std::marker::Unpin for DirReceiverRequestStream {}
9483
9484impl futures::stream::FusedStream for DirReceiverRequestStream {
9485 fn is_terminated(&self) -> bool {
9486 self.is_terminated
9487 }
9488}
9489
9490impl fidl::endpoints::RequestStream for DirReceiverRequestStream {
9491 type Protocol = DirReceiverMarker;
9492 type ControlHandle = DirReceiverControlHandle;
9493
9494 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9495 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9496 }
9497
9498 fn control_handle(&self) -> Self::ControlHandle {
9499 DirReceiverControlHandle { inner: self.inner.clone() }
9500 }
9501
9502 fn into_inner(
9503 self,
9504 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9505 {
9506 (self.inner, self.is_terminated)
9507 }
9508
9509 fn from_inner(
9510 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9511 is_terminated: bool,
9512 ) -> Self {
9513 Self { inner, is_terminated }
9514 }
9515}
9516
9517impl futures::Stream for DirReceiverRequestStream {
9518 type Item = Result<DirReceiverRequest, fidl::Error>;
9519
9520 fn poll_next(
9521 mut self: std::pin::Pin<&mut Self>,
9522 cx: &mut std::task::Context<'_>,
9523 ) -> std::task::Poll<Option<Self::Item>> {
9524 let this = &mut *self;
9525 if this.inner.check_shutdown(cx) {
9526 this.is_terminated = true;
9527 return std::task::Poll::Ready(None);
9528 }
9529 if this.is_terminated {
9530 panic!("polled DirReceiverRequestStream after completion");
9531 }
9532 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9533 |bytes, handles| {
9534 match this.inner.channel().read_etc(cx, bytes, handles) {
9535 std::task::Poll::Ready(Ok(())) => {}
9536 std::task::Poll::Pending => return std::task::Poll::Pending,
9537 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9538 this.is_terminated = true;
9539 return std::task::Poll::Ready(None);
9540 }
9541 std::task::Poll::Ready(Err(e)) => {
9542 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9543 e.into(),
9544 ))));
9545 }
9546 }
9547
9548 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9550
9551 std::task::Poll::Ready(Some(match header.ordinal {
9552 0xcdc3e9b89fe7bb4 => {
9553 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9554 let mut req = fidl::new_empty!(
9555 DirReceiverReceiveRequest,
9556 fidl::encoding::DefaultFuchsiaResourceDialect
9557 );
9558 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirReceiverReceiveRequest>(&header, _body_bytes, handles, &mut req)?;
9559 let control_handle = DirReceiverControlHandle { inner: this.inner.clone() };
9560 Ok(DirReceiverRequest::Receive { payload: req, control_handle })
9561 }
9562 _ if header.tx_id == 0
9563 && header
9564 .dynamic_flags()
9565 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9566 {
9567 Ok(DirReceiverRequest::_UnknownMethod {
9568 ordinal: header.ordinal,
9569 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
9570 method_type: fidl::MethodType::OneWay,
9571 })
9572 }
9573 _ if header
9574 .dynamic_flags()
9575 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9576 {
9577 this.inner.send_framework_err(
9578 fidl::encoding::FrameworkErr::UnknownMethod,
9579 header.tx_id,
9580 header.ordinal,
9581 header.dynamic_flags(),
9582 (bytes, handles),
9583 )?;
9584 Ok(DirReceiverRequest::_UnknownMethod {
9585 ordinal: header.ordinal,
9586 control_handle: DirReceiverControlHandle { inner: this.inner.clone() },
9587 method_type: fidl::MethodType::TwoWay,
9588 })
9589 }
9590 _ => Err(fidl::Error::UnknownOrdinal {
9591 ordinal: header.ordinal,
9592 protocol_name:
9593 <DirReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9594 }),
9595 }))
9596 },
9597 )
9598 }
9599}
9600
9601#[derive(Debug)]
9604pub enum DirReceiverRequest {
9605 Receive { payload: DirReceiverReceiveRequest, control_handle: DirReceiverControlHandle },
9610 #[non_exhaustive]
9612 _UnknownMethod {
9613 ordinal: u64,
9615 control_handle: DirReceiverControlHandle,
9616 method_type: fidl::MethodType,
9617 },
9618}
9619
9620impl DirReceiverRequest {
9621 #[allow(irrefutable_let_patterns)]
9622 pub fn into_receive(self) -> Option<(DirReceiverReceiveRequest, DirReceiverControlHandle)> {
9623 if let DirReceiverRequest::Receive { payload, control_handle } = self {
9624 Some((payload, control_handle))
9625 } else {
9626 None
9627 }
9628 }
9629
9630 pub fn method_name(&self) -> &'static str {
9632 match *self {
9633 DirReceiverRequest::Receive { .. } => "receive",
9634 DirReceiverRequest::_UnknownMethod {
9635 method_type: fidl::MethodType::OneWay, ..
9636 } => "unknown one-way method",
9637 DirReceiverRequest::_UnknownMethod {
9638 method_type: fidl::MethodType::TwoWay, ..
9639 } => "unknown two-way method",
9640 }
9641 }
9642}
9643
9644#[derive(Debug, Clone)]
9645pub struct DirReceiverControlHandle {
9646 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9647}
9648
9649impl fidl::endpoints::ControlHandle for DirReceiverControlHandle {
9650 fn shutdown(&self) {
9651 self.inner.shutdown()
9652 }
9653
9654 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9655 self.inner.shutdown_with_epitaph(status)
9656 }
9657
9658 fn is_closed(&self) -> bool {
9659 self.inner.channel().is_closed()
9660 }
9661 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9662 self.inner.channel().on_closed()
9663 }
9664
9665 #[cfg(target_os = "fuchsia")]
9666 fn signal_peer(
9667 &self,
9668 clear_mask: zx::Signals,
9669 set_mask: zx::Signals,
9670 ) -> Result<(), zx_status::Status> {
9671 use fidl::Peered;
9672 self.inner.channel().signal_peer(clear_mask, set_mask)
9673 }
9674}
9675
9676impl DirReceiverControlHandle {}
9677
9678#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9679pub struct DirectoryRouterMarker;
9680
9681impl fidl::endpoints::ProtocolMarker for DirectoryRouterMarker {
9682 type Proxy = DirectoryRouterProxy;
9683 type RequestStream = DirectoryRouterRequestStream;
9684 #[cfg(target_os = "fuchsia")]
9685 type SynchronousProxy = DirectoryRouterSynchronousProxy;
9686
9687 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
9688}
9689impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryRouterMarker {}
9690pub type DirectoryRouterRouteResult = Result<DirectoryRouterRouteResponse, RouterError>;
9691
9692pub trait DirectoryRouterProxyInterface: Send + Sync {
9693 type RouteResponseFut: std::future::Future<Output = Result<DirectoryRouterRouteResult, fidl::Error>>
9694 + Send;
9695 fn r#route(&self, payload: RouteRequest) -> Self::RouteResponseFut;
9696}
9697#[derive(Debug)]
9698#[cfg(target_os = "fuchsia")]
9699pub struct DirectoryRouterSynchronousProxy {
9700 client: fidl::client::sync::Client,
9701}
9702
9703#[cfg(target_os = "fuchsia")]
9704impl fidl::endpoints::SynchronousProxy for DirectoryRouterSynchronousProxy {
9705 type Proxy = DirectoryRouterProxy;
9706 type Protocol = DirectoryRouterMarker;
9707
9708 fn from_channel(inner: fidl::Channel) -> Self {
9709 Self::new(inner)
9710 }
9711
9712 fn into_channel(self) -> fidl::Channel {
9713 self.client.into_channel()
9714 }
9715
9716 fn as_channel(&self) -> &fidl::Channel {
9717 self.client.as_channel()
9718 }
9719}
9720
9721#[cfg(target_os = "fuchsia")]
9722impl DirectoryRouterSynchronousProxy {
9723 pub fn new(channel: fidl::Channel) -> Self {
9724 let protocol_name = <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9725 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
9726 }
9727
9728 pub fn into_channel(self) -> fidl::Channel {
9729 self.client.into_channel()
9730 }
9731
9732 pub fn wait_for_event(
9735 &self,
9736 deadline: zx::MonotonicInstant,
9737 ) -> Result<DirectoryRouterEvent, fidl::Error> {
9738 DirectoryRouterEvent::decode(self.client.wait_for_event(deadline)?)
9739 }
9740
9741 pub fn r#route(
9742 &self,
9743 mut payload: RouteRequest,
9744 ___deadline: zx::MonotonicInstant,
9745 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
9746 let _response = self.client.send_query::<
9747 RouteRequest,
9748 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
9749 >(
9750 &mut payload,
9751 0x683b6c6be21b0f21,
9752 fidl::encoding::DynamicFlags::FLEXIBLE,
9753 ___deadline,
9754 )?
9755 .into_result::<DirectoryRouterMarker>("route")?;
9756 Ok(_response.map(|x| x))
9757 }
9758}
9759
9760#[cfg(target_os = "fuchsia")]
9761impl From<DirectoryRouterSynchronousProxy> for zx::NullableHandle {
9762 fn from(value: DirectoryRouterSynchronousProxy) -> Self {
9763 value.into_channel().into()
9764 }
9765}
9766
9767#[cfg(target_os = "fuchsia")]
9768impl From<fidl::Channel> for DirectoryRouterSynchronousProxy {
9769 fn from(value: fidl::Channel) -> Self {
9770 Self::new(value)
9771 }
9772}
9773
9774#[cfg(target_os = "fuchsia")]
9775impl fidl::endpoints::FromClient for DirectoryRouterSynchronousProxy {
9776 type Protocol = DirectoryRouterMarker;
9777
9778 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryRouterMarker>) -> Self {
9779 Self::new(value.into_channel())
9780 }
9781}
9782
9783#[derive(Debug, Clone)]
9784pub struct DirectoryRouterProxy {
9785 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9786}
9787
9788impl fidl::endpoints::Proxy for DirectoryRouterProxy {
9789 type Protocol = DirectoryRouterMarker;
9790
9791 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9792 Self::new(inner)
9793 }
9794
9795 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9796 self.client.into_channel().map_err(|client| Self { client })
9797 }
9798
9799 fn as_channel(&self) -> &::fidl::AsyncChannel {
9800 self.client.as_channel()
9801 }
9802}
9803
9804impl DirectoryRouterProxy {
9805 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9807 let protocol_name = <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9808 Self { client: fidl::client::Client::new(channel, protocol_name) }
9809 }
9810
9811 pub fn take_event_stream(&self) -> DirectoryRouterEventStream {
9817 DirectoryRouterEventStream { event_receiver: self.client.take_event_receiver() }
9818 }
9819
9820 pub fn r#route(
9821 &self,
9822 mut payload: RouteRequest,
9823 ) -> fidl::client::QueryResponseFut<
9824 DirectoryRouterRouteResult,
9825 fidl::encoding::DefaultFuchsiaResourceDialect,
9826 > {
9827 DirectoryRouterProxyInterface::r#route(self, payload)
9828 }
9829}
9830
9831impl DirectoryRouterProxyInterface for DirectoryRouterProxy {
9832 type RouteResponseFut = fidl::client::QueryResponseFut<
9833 DirectoryRouterRouteResult,
9834 fidl::encoding::DefaultFuchsiaResourceDialect,
9835 >;
9836 fn r#route(&self, mut payload: RouteRequest) -> Self::RouteResponseFut {
9837 fn _decode(
9838 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9839 ) -> Result<DirectoryRouterRouteResult, fidl::Error> {
9840 let _response = fidl::client::decode_transaction_body::<
9841 fidl::encoding::FlexibleResultType<DirectoryRouterRouteResponse, RouterError>,
9842 fidl::encoding::DefaultFuchsiaResourceDialect,
9843 0x683b6c6be21b0f21,
9844 >(_buf?)?
9845 .into_result::<DirectoryRouterMarker>("route")?;
9846 Ok(_response.map(|x| x))
9847 }
9848 self.client.send_query_and_decode::<RouteRequest, DirectoryRouterRouteResult>(
9849 &mut payload,
9850 0x683b6c6be21b0f21,
9851 fidl::encoding::DynamicFlags::FLEXIBLE,
9852 _decode,
9853 )
9854 }
9855}
9856
9857pub struct DirectoryRouterEventStream {
9858 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9859}
9860
9861impl std::marker::Unpin for DirectoryRouterEventStream {}
9862
9863impl futures::stream::FusedStream for DirectoryRouterEventStream {
9864 fn is_terminated(&self) -> bool {
9865 self.event_receiver.is_terminated()
9866 }
9867}
9868
9869impl futures::Stream for DirectoryRouterEventStream {
9870 type Item = Result<DirectoryRouterEvent, fidl::Error>;
9871
9872 fn poll_next(
9873 mut self: std::pin::Pin<&mut Self>,
9874 cx: &mut std::task::Context<'_>,
9875 ) -> std::task::Poll<Option<Self::Item>> {
9876 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9877 &mut self.event_receiver,
9878 cx
9879 )?) {
9880 Some(buf) => std::task::Poll::Ready(Some(DirectoryRouterEvent::decode(buf))),
9881 None => std::task::Poll::Ready(None),
9882 }
9883 }
9884}
9885
9886#[derive(Debug)]
9887pub enum DirectoryRouterEvent {
9888 #[non_exhaustive]
9889 _UnknownEvent {
9890 ordinal: u64,
9892 },
9893}
9894
9895impl DirectoryRouterEvent {
9896 fn decode(
9898 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9899 ) -> Result<DirectoryRouterEvent, fidl::Error> {
9900 let (bytes, _handles) = buf.split_mut();
9901 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9902 debug_assert_eq!(tx_header.tx_id, 0);
9903 match tx_header.ordinal {
9904 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9905 Ok(DirectoryRouterEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9906 }
9907 _ => Err(fidl::Error::UnknownOrdinal {
9908 ordinal: tx_header.ordinal,
9909 protocol_name:
9910 <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9911 }),
9912 }
9913 }
9914}
9915
9916pub struct DirectoryRouterRequestStream {
9918 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9919 is_terminated: bool,
9920}
9921
9922impl std::marker::Unpin for DirectoryRouterRequestStream {}
9923
9924impl futures::stream::FusedStream for DirectoryRouterRequestStream {
9925 fn is_terminated(&self) -> bool {
9926 self.is_terminated
9927 }
9928}
9929
9930impl fidl::endpoints::RequestStream for DirectoryRouterRequestStream {
9931 type Protocol = DirectoryRouterMarker;
9932 type ControlHandle = DirectoryRouterControlHandle;
9933
9934 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9935 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9936 }
9937
9938 fn control_handle(&self) -> Self::ControlHandle {
9939 DirectoryRouterControlHandle { inner: self.inner.clone() }
9940 }
9941
9942 fn into_inner(
9943 self,
9944 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9945 {
9946 (self.inner, self.is_terminated)
9947 }
9948
9949 fn from_inner(
9950 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9951 is_terminated: bool,
9952 ) -> Self {
9953 Self { inner, is_terminated }
9954 }
9955}
9956
9957impl futures::Stream for DirectoryRouterRequestStream {
9958 type Item = Result<DirectoryRouterRequest, fidl::Error>;
9959
9960 fn poll_next(
9961 mut self: std::pin::Pin<&mut Self>,
9962 cx: &mut std::task::Context<'_>,
9963 ) -> std::task::Poll<Option<Self::Item>> {
9964 let this = &mut *self;
9965 if this.inner.check_shutdown(cx) {
9966 this.is_terminated = true;
9967 return std::task::Poll::Ready(None);
9968 }
9969 if this.is_terminated {
9970 panic!("polled DirectoryRouterRequestStream after completion");
9971 }
9972 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9973 |bytes, handles| {
9974 match this.inner.channel().read_etc(cx, bytes, handles) {
9975 std::task::Poll::Ready(Ok(())) => {}
9976 std::task::Poll::Pending => return std::task::Poll::Pending,
9977 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9978 this.is_terminated = true;
9979 return std::task::Poll::Ready(None);
9980 }
9981 std::task::Poll::Ready(Err(e)) => {
9982 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9983 e.into(),
9984 ))));
9985 }
9986 }
9987
9988 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9990
9991 std::task::Poll::Ready(Some(match header.ordinal {
9992 0x683b6c6be21b0f21 => {
9993 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9994 let mut req = fidl::new_empty!(
9995 RouteRequest,
9996 fidl::encoding::DefaultFuchsiaResourceDialect
9997 );
9998 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RouteRequest>(&header, _body_bytes, handles, &mut req)?;
9999 let control_handle =
10000 DirectoryRouterControlHandle { inner: this.inner.clone() };
10001 Ok(DirectoryRouterRequest::Route {
10002 payload: req,
10003 responder: DirectoryRouterRouteResponder {
10004 control_handle: std::mem::ManuallyDrop::new(control_handle),
10005 tx_id: header.tx_id,
10006 },
10007 })
10008 }
10009 _ if header.tx_id == 0
10010 && header
10011 .dynamic_flags()
10012 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10013 {
10014 Ok(DirectoryRouterRequest::_UnknownMethod {
10015 ordinal: header.ordinal,
10016 control_handle: DirectoryRouterControlHandle {
10017 inner: this.inner.clone(),
10018 },
10019 method_type: fidl::MethodType::OneWay,
10020 })
10021 }
10022 _ if header
10023 .dynamic_flags()
10024 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10025 {
10026 this.inner.send_framework_err(
10027 fidl::encoding::FrameworkErr::UnknownMethod,
10028 header.tx_id,
10029 header.ordinal,
10030 header.dynamic_flags(),
10031 (bytes, handles),
10032 )?;
10033 Ok(DirectoryRouterRequest::_UnknownMethod {
10034 ordinal: header.ordinal,
10035 control_handle: DirectoryRouterControlHandle {
10036 inner: this.inner.clone(),
10037 },
10038 method_type: fidl::MethodType::TwoWay,
10039 })
10040 }
10041 _ => Err(fidl::Error::UnknownOrdinal {
10042 ordinal: header.ordinal,
10043 protocol_name:
10044 <DirectoryRouterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10045 }),
10046 }))
10047 },
10048 )
10049 }
10050}
10051
10052#[derive(Debug)]
10053pub enum DirectoryRouterRequest {
10054 Route {
10055 payload: RouteRequest,
10056 responder: DirectoryRouterRouteResponder,
10057 },
10058 #[non_exhaustive]
10060 _UnknownMethod {
10061 ordinal: u64,
10063 control_handle: DirectoryRouterControlHandle,
10064 method_type: fidl::MethodType,
10065 },
10066}
10067
10068impl DirectoryRouterRequest {
10069 #[allow(irrefutable_let_patterns)]
10070 pub fn into_route(self) -> Option<(RouteRequest, DirectoryRouterRouteResponder)> {
10071 if let DirectoryRouterRequest::Route { payload, responder } = self {
10072 Some((payload, responder))
10073 } else {
10074 None
10075 }
10076 }
10077
10078 pub fn method_name(&self) -> &'static str {
10080 match *self {
10081 DirectoryRouterRequest::Route { .. } => "route",
10082 DirectoryRouterRequest::_UnknownMethod {
10083 method_type: fidl::MethodType::OneWay,
10084 ..
10085 } => "unknown one-way method",
10086 DirectoryRouterRequest::_UnknownMethod {
10087 method_type: fidl::MethodType::TwoWay,
10088 ..
10089 } => "unknown two-way method",
10090 }
10091 }
10092}
10093
10094#[derive(Debug, Clone)]
10095pub struct DirectoryRouterControlHandle {
10096 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10097}
10098
10099impl fidl::endpoints::ControlHandle for DirectoryRouterControlHandle {
10100 fn shutdown(&self) {
10101 self.inner.shutdown()
10102 }
10103
10104 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10105 self.inner.shutdown_with_epitaph(status)
10106 }
10107
10108 fn is_closed(&self) -> bool {
10109 self.inner.channel().is_closed()
10110 }
10111 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10112 self.inner.channel().on_closed()
10113 }
10114
10115 #[cfg(target_os = "fuchsia")]
10116 fn signal_peer(
10117 &self,
10118 clear_mask: zx::Signals,
10119 set_mask: zx::Signals,
10120 ) -> Result<(), zx_status::Status> {
10121 use fidl::Peered;
10122 self.inner.channel().signal_peer(clear_mask, set_mask)
10123 }
10124}
10125
10126impl DirectoryRouterControlHandle {}
10127
10128#[must_use = "FIDL methods require a response to be sent"]
10129#[derive(Debug)]
10130pub struct DirectoryRouterRouteResponder {
10131 control_handle: std::mem::ManuallyDrop<DirectoryRouterControlHandle>,
10132 tx_id: u32,
10133}
10134
10135impl std::ops::Drop for DirectoryRouterRouteResponder {
10139 fn drop(&mut self) {
10140 self.control_handle.shutdown();
10141 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10143 }
10144}
10145
10146impl fidl::endpoints::Responder for DirectoryRouterRouteResponder {
10147 type ControlHandle = DirectoryRouterControlHandle;
10148
10149 fn control_handle(&self) -> &DirectoryRouterControlHandle {
10150 &self.control_handle
10151 }
10152
10153 fn drop_without_shutdown(mut self) {
10154 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10156 std::mem::forget(self);
10158 }
10159}
10160
10161impl DirectoryRouterRouteResponder {
10162 pub fn send(
10166 self,
10167 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
10168 ) -> Result<(), fidl::Error> {
10169 let _result = self.send_raw(result);
10170 if _result.is_err() {
10171 self.control_handle.shutdown();
10172 }
10173 self.drop_without_shutdown();
10174 _result
10175 }
10176
10177 pub fn send_no_shutdown_on_err(
10179 self,
10180 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
10181 ) -> Result<(), fidl::Error> {
10182 let _result = self.send_raw(result);
10183 self.drop_without_shutdown();
10184 _result
10185 }
10186
10187 fn send_raw(
10188 &self,
10189 mut result: Result<DirectoryRouterRouteResponse, RouterError>,
10190 ) -> Result<(), fidl::Error> {
10191 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10192 DirectoryRouterRouteResponse,
10193 RouterError,
10194 >>(
10195 fidl::encoding::FlexibleResult::new(result.as_mut().map_err(|e| *e)),
10196 self.tx_id,
10197 0x683b6c6be21b0f21,
10198 fidl::encoding::DynamicFlags::FLEXIBLE,
10199 )
10200 }
10201}
10202
10203#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10204pub struct ReceiverMarker;
10205
10206impl fidl::endpoints::ProtocolMarker for ReceiverMarker {
10207 type Proxy = ReceiverProxy;
10208 type RequestStream = ReceiverRequestStream;
10209 #[cfg(target_os = "fuchsia")]
10210 type SynchronousProxy = ReceiverSynchronousProxy;
10211
10212 const DEBUG_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
10213}
10214impl fidl::endpoints::DiscoverableProtocolMarker for ReceiverMarker {}
10215
10216pub trait ReceiverProxyInterface: Send + Sync {
10217 fn r#receive(&self, channel: fidl::Channel) -> Result<(), fidl::Error>;
10218}
10219#[derive(Debug)]
10220#[cfg(target_os = "fuchsia")]
10221pub struct ReceiverSynchronousProxy {
10222 client: fidl::client::sync::Client,
10223}
10224
10225#[cfg(target_os = "fuchsia")]
10226impl fidl::endpoints::SynchronousProxy for ReceiverSynchronousProxy {
10227 type Proxy = ReceiverProxy;
10228 type Protocol = ReceiverMarker;
10229
10230 fn from_channel(inner: fidl::Channel) -> Self {
10231 Self::new(inner)
10232 }
10233
10234 fn into_channel(self) -> fidl::Channel {
10235 self.client.into_channel()
10236 }
10237
10238 fn as_channel(&self) -> &fidl::Channel {
10239 self.client.as_channel()
10240 }
10241}
10242
10243#[cfg(target_os = "fuchsia")]
10244impl ReceiverSynchronousProxy {
10245 pub fn new(channel: fidl::Channel) -> Self {
10246 let protocol_name = <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
10247 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
10248 }
10249
10250 pub fn into_channel(self) -> fidl::Channel {
10251 self.client.into_channel()
10252 }
10253
10254 pub fn wait_for_event(
10257 &self,
10258 deadline: zx::MonotonicInstant,
10259 ) -> Result<ReceiverEvent, fidl::Error> {
10260 ReceiverEvent::decode(self.client.wait_for_event(deadline)?)
10261 }
10262
10263 pub fn r#receive(&self, mut channel: fidl::Channel) -> Result<(), fidl::Error> {
10265 self.client.send::<ProtocolPayload>(
10266 (channel,),
10267 0x4bae18ab7aa1a94,
10268 fidl::encoding::DynamicFlags::FLEXIBLE,
10269 )
10270 }
10271}
10272
10273#[cfg(target_os = "fuchsia")]
10274impl From<ReceiverSynchronousProxy> for zx::NullableHandle {
10275 fn from(value: ReceiverSynchronousProxy) -> Self {
10276 value.into_channel().into()
10277 }
10278}
10279
10280#[cfg(target_os = "fuchsia")]
10281impl From<fidl::Channel> for ReceiverSynchronousProxy {
10282 fn from(value: fidl::Channel) -> Self {
10283 Self::new(value)
10284 }
10285}
10286
10287#[cfg(target_os = "fuchsia")]
10288impl fidl::endpoints::FromClient for ReceiverSynchronousProxy {
10289 type Protocol = ReceiverMarker;
10290
10291 fn from_client(value: fidl::endpoints::ClientEnd<ReceiverMarker>) -> Self {
10292 Self::new(value.into_channel())
10293 }
10294}
10295
10296#[derive(Debug, Clone)]
10297pub struct ReceiverProxy {
10298 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
10299}
10300
10301impl fidl::endpoints::Proxy for ReceiverProxy {
10302 type Protocol = ReceiverMarker;
10303
10304 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
10305 Self::new(inner)
10306 }
10307
10308 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
10309 self.client.into_channel().map_err(|client| Self { client })
10310 }
10311
10312 fn as_channel(&self) -> &::fidl::AsyncChannel {
10313 self.client.as_channel()
10314 }
10315}
10316
10317impl ReceiverProxy {
10318 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
10320 let protocol_name = <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
10321 Self { client: fidl::client::Client::new(channel, protocol_name) }
10322 }
10323
10324 pub fn take_event_stream(&self) -> ReceiverEventStream {
10330 ReceiverEventStream { event_receiver: self.client.take_event_receiver() }
10331 }
10332
10333 pub fn r#receive(&self, mut channel: fidl::Channel) -> Result<(), fidl::Error> {
10335 ReceiverProxyInterface::r#receive(self, channel)
10336 }
10337}
10338
10339impl ReceiverProxyInterface for ReceiverProxy {
10340 fn r#receive(&self, mut channel: fidl::Channel) -> Result<(), fidl::Error> {
10341 self.client.send::<ProtocolPayload>(
10342 (channel,),
10343 0x4bae18ab7aa1a94,
10344 fidl::encoding::DynamicFlags::FLEXIBLE,
10345 )
10346 }
10347}
10348
10349pub struct ReceiverEventStream {
10350 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
10351}
10352
10353impl std::marker::Unpin for ReceiverEventStream {}
10354
10355impl futures::stream::FusedStream for ReceiverEventStream {
10356 fn is_terminated(&self) -> bool {
10357 self.event_receiver.is_terminated()
10358 }
10359}
10360
10361impl futures::Stream for ReceiverEventStream {
10362 type Item = Result<ReceiverEvent, fidl::Error>;
10363
10364 fn poll_next(
10365 mut self: std::pin::Pin<&mut Self>,
10366 cx: &mut std::task::Context<'_>,
10367 ) -> std::task::Poll<Option<Self::Item>> {
10368 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10369 &mut self.event_receiver,
10370 cx
10371 )?) {
10372 Some(buf) => std::task::Poll::Ready(Some(ReceiverEvent::decode(buf))),
10373 None => std::task::Poll::Ready(None),
10374 }
10375 }
10376}
10377
10378#[derive(Debug)]
10379pub enum ReceiverEvent {
10380 #[non_exhaustive]
10381 _UnknownEvent {
10382 ordinal: u64,
10384 },
10385}
10386
10387impl ReceiverEvent {
10388 fn decode(
10390 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10391 ) -> Result<ReceiverEvent, fidl::Error> {
10392 let (bytes, _handles) = buf.split_mut();
10393 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10394 debug_assert_eq!(tx_header.tx_id, 0);
10395 match tx_header.ordinal {
10396 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
10397 Ok(ReceiverEvent::_UnknownEvent { ordinal: tx_header.ordinal })
10398 }
10399 _ => Err(fidl::Error::UnknownOrdinal {
10400 ordinal: tx_header.ordinal,
10401 protocol_name: <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10402 }),
10403 }
10404 }
10405}
10406
10407pub struct ReceiverRequestStream {
10409 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10410 is_terminated: bool,
10411}
10412
10413impl std::marker::Unpin for ReceiverRequestStream {}
10414
10415impl futures::stream::FusedStream for ReceiverRequestStream {
10416 fn is_terminated(&self) -> bool {
10417 self.is_terminated
10418 }
10419}
10420
10421impl fidl::endpoints::RequestStream for ReceiverRequestStream {
10422 type Protocol = ReceiverMarker;
10423 type ControlHandle = ReceiverControlHandle;
10424
10425 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
10426 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10427 }
10428
10429 fn control_handle(&self) -> Self::ControlHandle {
10430 ReceiverControlHandle { inner: self.inner.clone() }
10431 }
10432
10433 fn into_inner(
10434 self,
10435 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
10436 {
10437 (self.inner, self.is_terminated)
10438 }
10439
10440 fn from_inner(
10441 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10442 is_terminated: bool,
10443 ) -> Self {
10444 Self { inner, is_terminated }
10445 }
10446}
10447
10448impl futures::Stream for ReceiverRequestStream {
10449 type Item = Result<ReceiverRequest, fidl::Error>;
10450
10451 fn poll_next(
10452 mut self: std::pin::Pin<&mut Self>,
10453 cx: &mut std::task::Context<'_>,
10454 ) -> std::task::Poll<Option<Self::Item>> {
10455 let this = &mut *self;
10456 if this.inner.check_shutdown(cx) {
10457 this.is_terminated = true;
10458 return std::task::Poll::Ready(None);
10459 }
10460 if this.is_terminated {
10461 panic!("polled ReceiverRequestStream after completion");
10462 }
10463 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
10464 |bytes, handles| {
10465 match this.inner.channel().read_etc(cx, bytes, handles) {
10466 std::task::Poll::Ready(Ok(())) => {}
10467 std::task::Poll::Pending => return std::task::Poll::Pending,
10468 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
10469 this.is_terminated = true;
10470 return std::task::Poll::Ready(None);
10471 }
10472 std::task::Poll::Ready(Err(e)) => {
10473 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10474 e.into(),
10475 ))));
10476 }
10477 }
10478
10479 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10481
10482 std::task::Poll::Ready(Some(match header.ordinal {
10483 0x4bae18ab7aa1a94 => {
10484 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
10485 let mut req = fidl::new_empty!(
10486 ProtocolPayload,
10487 fidl::encoding::DefaultFuchsiaResourceDialect
10488 );
10489 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ProtocolPayload>(&header, _body_bytes, handles, &mut req)?;
10490 let control_handle = ReceiverControlHandle { inner: this.inner.clone() };
10491 Ok(ReceiverRequest::Receive { channel: req.channel, control_handle })
10492 }
10493 _ if header.tx_id == 0
10494 && header
10495 .dynamic_flags()
10496 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10497 {
10498 Ok(ReceiverRequest::_UnknownMethod {
10499 ordinal: header.ordinal,
10500 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
10501 method_type: fidl::MethodType::OneWay,
10502 })
10503 }
10504 _ if header
10505 .dynamic_flags()
10506 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
10507 {
10508 this.inner.send_framework_err(
10509 fidl::encoding::FrameworkErr::UnknownMethod,
10510 header.tx_id,
10511 header.ordinal,
10512 header.dynamic_flags(),
10513 (bytes, handles),
10514 )?;
10515 Ok(ReceiverRequest::_UnknownMethod {
10516 ordinal: header.ordinal,
10517 control_handle: ReceiverControlHandle { inner: this.inner.clone() },
10518 method_type: fidl::MethodType::TwoWay,
10519 })
10520 }
10521 _ => Err(fidl::Error::UnknownOrdinal {
10522 ordinal: header.ordinal,
10523 protocol_name:
10524 <ReceiverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10525 }),
10526 }))
10527 },
10528 )
10529 }
10530}
10531
10532#[derive(Debug)]
10535pub enum ReceiverRequest {
10536 Receive { channel: fidl::Channel, control_handle: ReceiverControlHandle },
10538 #[non_exhaustive]
10540 _UnknownMethod {
10541 ordinal: u64,
10543 control_handle: ReceiverControlHandle,
10544 method_type: fidl::MethodType,
10545 },
10546}
10547
10548impl ReceiverRequest {
10549 #[allow(irrefutable_let_patterns)]
10550 pub fn into_receive(self) -> Option<(fidl::Channel, ReceiverControlHandle)> {
10551 if let ReceiverRequest::Receive { channel, control_handle } = self {
10552 Some((channel, control_handle))
10553 } else {
10554 None
10555 }
10556 }
10557
10558 pub fn method_name(&self) -> &'static str {
10560 match *self {
10561 ReceiverRequest::Receive { .. } => "receive",
10562 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10563 "unknown one-way method"
10564 }
10565 ReceiverRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10566 "unknown two-way method"
10567 }
10568 }
10569 }
10570}
10571
10572#[derive(Debug, Clone)]
10573pub struct ReceiverControlHandle {
10574 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10575}
10576
10577impl fidl::endpoints::ControlHandle for ReceiverControlHandle {
10578 fn shutdown(&self) {
10579 self.inner.shutdown()
10580 }
10581
10582 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10583 self.inner.shutdown_with_epitaph(status)
10584 }
10585
10586 fn is_closed(&self) -> bool {
10587 self.inner.channel().is_closed()
10588 }
10589 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10590 self.inner.channel().on_closed()
10591 }
10592
10593 #[cfg(target_os = "fuchsia")]
10594 fn signal_peer(
10595 &self,
10596 clear_mask: zx::Signals,
10597 set_mask: zx::Signals,
10598 ) -> Result<(), zx_status::Status> {
10599 use fidl::Peered;
10600 self.inner.channel().signal_peer(clear_mask, set_mask)
10601 }
10602}
10603
10604impl ReceiverControlHandle {}
10605
10606mod internal {
10607 use super::*;
10608
10609 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorCreateRequest {
10610 type Borrowed<'a> = &'a mut Self;
10611 fn take_or_borrow<'a>(
10612 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10613 ) -> Self::Borrowed<'a> {
10614 value
10615 }
10616 }
10617
10618 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorCreateRequest {
10619 type Owned = Self;
10620
10621 #[inline(always)]
10622 fn inline_align(_context: fidl::encoding::Context) -> usize {
10623 8
10624 }
10625
10626 #[inline(always)]
10627 fn inline_size(_context: fidl::encoding::Context) -> usize {
10628 16
10629 }
10630 }
10631
10632 unsafe impl
10633 fidl::encoding::Encode<
10634 CapabilityStoreConnectorCreateRequest,
10635 fidl::encoding::DefaultFuchsiaResourceDialect,
10636 > for &mut CapabilityStoreConnectorCreateRequest
10637 {
10638 #[inline]
10639 unsafe fn encode(
10640 self,
10641 encoder: &mut fidl::encoding::Encoder<
10642 '_,
10643 fidl::encoding::DefaultFuchsiaResourceDialect,
10644 >,
10645 offset: usize,
10646 _depth: fidl::encoding::Depth,
10647 ) -> fidl::Result<()> {
10648 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
10649 fidl::encoding::Encode::<CapabilityStoreConnectorCreateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10651 (
10652 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10653 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
10654 ),
10655 encoder, offset, _depth
10656 )
10657 }
10658 }
10659 unsafe impl<
10660 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10661 T1: fidl::encoding::Encode<
10662 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>>,
10663 fidl::encoding::DefaultFuchsiaResourceDialect,
10664 >,
10665 >
10666 fidl::encoding::Encode<
10667 CapabilityStoreConnectorCreateRequest,
10668 fidl::encoding::DefaultFuchsiaResourceDialect,
10669 > for (T0, T1)
10670 {
10671 #[inline]
10672 unsafe fn encode(
10673 self,
10674 encoder: &mut fidl::encoding::Encoder<
10675 '_,
10676 fidl::encoding::DefaultFuchsiaResourceDialect,
10677 >,
10678 offset: usize,
10679 depth: fidl::encoding::Depth,
10680 ) -> fidl::Result<()> {
10681 encoder.debug_check_bounds::<CapabilityStoreConnectorCreateRequest>(offset);
10682 unsafe {
10685 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10686 (ptr as *mut u64).write_unaligned(0);
10687 }
10688 self.0.encode(encoder, offset + 0, depth)?;
10690 self.1.encode(encoder, offset + 8, depth)?;
10691 Ok(())
10692 }
10693 }
10694
10695 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10696 for CapabilityStoreConnectorCreateRequest
10697 {
10698 #[inline(always)]
10699 fn new_empty() -> Self {
10700 Self {
10701 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10702 receiver: fidl::new_empty!(
10703 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>>,
10704 fidl::encoding::DefaultFuchsiaResourceDialect
10705 ),
10706 }
10707 }
10708
10709 #[inline]
10710 unsafe fn decode(
10711 &mut self,
10712 decoder: &mut fidl::encoding::Decoder<
10713 '_,
10714 fidl::encoding::DefaultFuchsiaResourceDialect,
10715 >,
10716 offset: usize,
10717 _depth: fidl::encoding::Depth,
10718 ) -> fidl::Result<()> {
10719 decoder.debug_check_bounds::<Self>(offset);
10720 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10722 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10723 let mask = 0xffffffff00000000u64;
10724 let maskedval = padval & mask;
10725 if maskedval != 0 {
10726 return Err(fidl::Error::NonZeroPadding {
10727 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10728 });
10729 }
10730 fidl::decode!(
10731 u64,
10732 fidl::encoding::DefaultFuchsiaResourceDialect,
10733 &mut self.id,
10734 decoder,
10735 offset + 0,
10736 _depth
10737 )?;
10738 fidl::decode!(
10739 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ReceiverMarker>>,
10740 fidl::encoding::DefaultFuchsiaResourceDialect,
10741 &mut self.receiver,
10742 decoder,
10743 offset + 8,
10744 _depth
10745 )?;
10746 Ok(())
10747 }
10748 }
10749
10750 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreConnectorOpenRequest {
10751 type Borrowed<'a> = &'a mut Self;
10752 fn take_or_borrow<'a>(
10753 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10754 ) -> Self::Borrowed<'a> {
10755 value
10756 }
10757 }
10758
10759 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreConnectorOpenRequest {
10760 type Owned = Self;
10761
10762 #[inline(always)]
10763 fn inline_align(_context: fidl::encoding::Context) -> usize {
10764 8
10765 }
10766
10767 #[inline(always)]
10768 fn inline_size(_context: fidl::encoding::Context) -> usize {
10769 16
10770 }
10771 }
10772
10773 unsafe impl
10774 fidl::encoding::Encode<
10775 CapabilityStoreConnectorOpenRequest,
10776 fidl::encoding::DefaultFuchsiaResourceDialect,
10777 > for &mut CapabilityStoreConnectorOpenRequest
10778 {
10779 #[inline]
10780 unsafe fn encode(
10781 self,
10782 encoder: &mut fidl::encoding::Encoder<
10783 '_,
10784 fidl::encoding::DefaultFuchsiaResourceDialect,
10785 >,
10786 offset: usize,
10787 _depth: fidl::encoding::Depth,
10788 ) -> fidl::Result<()> {
10789 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
10790 fidl::encoding::Encode::<
10792 CapabilityStoreConnectorOpenRequest,
10793 fidl::encoding::DefaultFuchsiaResourceDialect,
10794 >::encode(
10795 (
10796 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10797 <fidl::encoding::HandleType<
10798 fidl::Channel,
10799 { fidl::ObjectType::CHANNEL.into_raw() },
10800 2147483648,
10801 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10802 &mut self.server_end
10803 ),
10804 ),
10805 encoder,
10806 offset,
10807 _depth,
10808 )
10809 }
10810 }
10811 unsafe impl<
10812 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10813 T1: fidl::encoding::Encode<
10814 fidl::encoding::HandleType<
10815 fidl::Channel,
10816 { fidl::ObjectType::CHANNEL.into_raw() },
10817 2147483648,
10818 >,
10819 fidl::encoding::DefaultFuchsiaResourceDialect,
10820 >,
10821 >
10822 fidl::encoding::Encode<
10823 CapabilityStoreConnectorOpenRequest,
10824 fidl::encoding::DefaultFuchsiaResourceDialect,
10825 > for (T0, T1)
10826 {
10827 #[inline]
10828 unsafe fn encode(
10829 self,
10830 encoder: &mut fidl::encoding::Encoder<
10831 '_,
10832 fidl::encoding::DefaultFuchsiaResourceDialect,
10833 >,
10834 offset: usize,
10835 depth: fidl::encoding::Depth,
10836 ) -> fidl::Result<()> {
10837 encoder.debug_check_bounds::<CapabilityStoreConnectorOpenRequest>(offset);
10838 unsafe {
10841 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10842 (ptr as *mut u64).write_unaligned(0);
10843 }
10844 self.0.encode(encoder, offset + 0, depth)?;
10846 self.1.encode(encoder, offset + 8, depth)?;
10847 Ok(())
10848 }
10849 }
10850
10851 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10852 for CapabilityStoreConnectorOpenRequest
10853 {
10854 #[inline(always)]
10855 fn new_empty() -> Self {
10856 Self {
10857 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10858 server_end: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10859 }
10860 }
10861
10862 #[inline]
10863 unsafe fn decode(
10864 &mut self,
10865 decoder: &mut fidl::encoding::Decoder<
10866 '_,
10867 fidl::encoding::DefaultFuchsiaResourceDialect,
10868 >,
10869 offset: usize,
10870 _depth: fidl::encoding::Depth,
10871 ) -> fidl::Result<()> {
10872 decoder.debug_check_bounds::<Self>(offset);
10873 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10875 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10876 let mask = 0xffffffff00000000u64;
10877 let maskedval = padval & mask;
10878 if maskedval != 0 {
10879 return Err(fidl::Error::NonZeroPadding {
10880 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10881 });
10882 }
10883 fidl::decode!(
10884 u64,
10885 fidl::encoding::DefaultFuchsiaResourceDialect,
10886 &mut self.id,
10887 decoder,
10888 offset + 0,
10889 _depth
10890 )?;
10891 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.server_end, decoder, offset + 8, _depth)?;
10892 Ok(())
10893 }
10894 }
10895
10896 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateRequest {
10897 type Borrowed<'a> = &'a mut Self;
10898 fn take_or_borrow<'a>(
10899 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10900 ) -> Self::Borrowed<'a> {
10901 value
10902 }
10903 }
10904
10905 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateRequest {
10906 type Owned = Self;
10907
10908 #[inline(always)]
10909 fn inline_align(_context: fidl::encoding::Context) -> usize {
10910 8
10911 }
10912
10913 #[inline(always)]
10914 fn inline_size(_context: fidl::encoding::Context) -> usize {
10915 16
10916 }
10917 }
10918
10919 unsafe impl
10920 fidl::encoding::Encode<
10921 CapabilityStoreCreateServiceAggregateRequest,
10922 fidl::encoding::DefaultFuchsiaResourceDialect,
10923 > for &mut CapabilityStoreCreateServiceAggregateRequest
10924 {
10925 #[inline]
10926 unsafe fn encode(
10927 self,
10928 encoder: &mut fidl::encoding::Encoder<
10929 '_,
10930 fidl::encoding::DefaultFuchsiaResourceDialect,
10931 >,
10932 offset: usize,
10933 _depth: fidl::encoding::Depth,
10934 ) -> fidl::Result<()> {
10935 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
10936 fidl::encoding::Encode::<CapabilityStoreCreateServiceAggregateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10938 (
10939 <fidl::encoding::UnboundedVector<AggregateSource> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sources),
10940 ),
10941 encoder, offset, _depth
10942 )
10943 }
10944 }
10945 unsafe impl<
10946 T0: fidl::encoding::Encode<
10947 fidl::encoding::UnboundedVector<AggregateSource>,
10948 fidl::encoding::DefaultFuchsiaResourceDialect,
10949 >,
10950 >
10951 fidl::encoding::Encode<
10952 CapabilityStoreCreateServiceAggregateRequest,
10953 fidl::encoding::DefaultFuchsiaResourceDialect,
10954 > for (T0,)
10955 {
10956 #[inline]
10957 unsafe fn encode(
10958 self,
10959 encoder: &mut fidl::encoding::Encoder<
10960 '_,
10961 fidl::encoding::DefaultFuchsiaResourceDialect,
10962 >,
10963 offset: usize,
10964 depth: fidl::encoding::Depth,
10965 ) -> fidl::Result<()> {
10966 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateRequest>(offset);
10967 self.0.encode(encoder, offset + 0, depth)?;
10971 Ok(())
10972 }
10973 }
10974
10975 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10976 for CapabilityStoreCreateServiceAggregateRequest
10977 {
10978 #[inline(always)]
10979 fn new_empty() -> Self {
10980 Self {
10981 sources: fidl::new_empty!(
10982 fidl::encoding::UnboundedVector<AggregateSource>,
10983 fidl::encoding::DefaultFuchsiaResourceDialect
10984 ),
10985 }
10986 }
10987
10988 #[inline]
10989 unsafe fn decode(
10990 &mut self,
10991 decoder: &mut fidl::encoding::Decoder<
10992 '_,
10993 fidl::encoding::DefaultFuchsiaResourceDialect,
10994 >,
10995 offset: usize,
10996 _depth: fidl::encoding::Depth,
10997 ) -> fidl::Result<()> {
10998 decoder.debug_check_bounds::<Self>(offset);
10999 fidl::decode!(
11001 fidl::encoding::UnboundedVector<AggregateSource>,
11002 fidl::encoding::DefaultFuchsiaResourceDialect,
11003 &mut self.sources,
11004 decoder,
11005 offset + 0,
11006 _depth
11007 )?;
11008 Ok(())
11009 }
11010 }
11011
11012 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryDrainRequest {
11013 type Borrowed<'a> = &'a mut Self;
11014 fn take_or_borrow<'a>(
11015 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11016 ) -> Self::Borrowed<'a> {
11017 value
11018 }
11019 }
11020
11021 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryDrainRequest {
11022 type Owned = Self;
11023
11024 #[inline(always)]
11025 fn inline_align(_context: fidl::encoding::Context) -> usize {
11026 8
11027 }
11028
11029 #[inline(always)]
11030 fn inline_size(_context: fidl::encoding::Context) -> usize {
11031 16
11032 }
11033 }
11034
11035 unsafe impl
11036 fidl::encoding::Encode<
11037 CapabilityStoreDictionaryDrainRequest,
11038 fidl::encoding::DefaultFuchsiaResourceDialect,
11039 > for &mut CapabilityStoreDictionaryDrainRequest
11040 {
11041 #[inline]
11042 unsafe fn encode(
11043 self,
11044 encoder: &mut fidl::encoding::Encoder<
11045 '_,
11046 fidl::encoding::DefaultFuchsiaResourceDialect,
11047 >,
11048 offset: usize,
11049 _depth: fidl::encoding::Depth,
11050 ) -> fidl::Result<()> {
11051 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
11052 fidl::encoding::Encode::<
11054 CapabilityStoreDictionaryDrainRequest,
11055 fidl::encoding::DefaultFuchsiaResourceDialect,
11056 >::encode(
11057 (
11058 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11059 <fidl::encoding::Optional<
11060 fidl::encoding::Endpoint<
11061 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11062 >,
11063 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11064 &mut self.iterator
11065 ),
11066 ),
11067 encoder,
11068 offset,
11069 _depth,
11070 )
11071 }
11072 }
11073 unsafe impl<
11074 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11075 T1: fidl::encoding::Encode<
11076 fidl::encoding::Optional<
11077 fidl::encoding::Endpoint<
11078 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11079 >,
11080 >,
11081 fidl::encoding::DefaultFuchsiaResourceDialect,
11082 >,
11083 >
11084 fidl::encoding::Encode<
11085 CapabilityStoreDictionaryDrainRequest,
11086 fidl::encoding::DefaultFuchsiaResourceDialect,
11087 > for (T0, T1)
11088 {
11089 #[inline]
11090 unsafe fn encode(
11091 self,
11092 encoder: &mut fidl::encoding::Encoder<
11093 '_,
11094 fidl::encoding::DefaultFuchsiaResourceDialect,
11095 >,
11096 offset: usize,
11097 depth: fidl::encoding::Depth,
11098 ) -> fidl::Result<()> {
11099 encoder.debug_check_bounds::<CapabilityStoreDictionaryDrainRequest>(offset);
11100 unsafe {
11103 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11104 (ptr as *mut u64).write_unaligned(0);
11105 }
11106 self.0.encode(encoder, offset + 0, depth)?;
11108 self.1.encode(encoder, offset + 8, depth)?;
11109 Ok(())
11110 }
11111 }
11112
11113 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11114 for CapabilityStoreDictionaryDrainRequest
11115 {
11116 #[inline(always)]
11117 fn new_empty() -> Self {
11118 Self {
11119 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11120 iterator: fidl::new_empty!(
11121 fidl::encoding::Optional<
11122 fidl::encoding::Endpoint<
11123 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11124 >,
11125 >,
11126 fidl::encoding::DefaultFuchsiaResourceDialect
11127 ),
11128 }
11129 }
11130
11131 #[inline]
11132 unsafe fn decode(
11133 &mut self,
11134 decoder: &mut fidl::encoding::Decoder<
11135 '_,
11136 fidl::encoding::DefaultFuchsiaResourceDialect,
11137 >,
11138 offset: usize,
11139 _depth: fidl::encoding::Depth,
11140 ) -> fidl::Result<()> {
11141 decoder.debug_check_bounds::<Self>(offset);
11142 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11144 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11145 let mask = 0xffffffff00000000u64;
11146 let maskedval = padval & mask;
11147 if maskedval != 0 {
11148 return Err(fidl::Error::NonZeroPadding {
11149 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11150 });
11151 }
11152 fidl::decode!(
11153 u64,
11154 fidl::encoding::DefaultFuchsiaResourceDialect,
11155 &mut self.id,
11156 decoder,
11157 offset + 0,
11158 _depth
11159 )?;
11160 fidl::decode!(
11161 fidl::encoding::Optional<
11162 fidl::encoding::Endpoint<
11163 fidl::endpoints::ServerEnd<DictionaryDrainIteratorMarker>,
11164 >,
11165 >,
11166 fidl::encoding::DefaultFuchsiaResourceDialect,
11167 &mut self.iterator,
11168 decoder,
11169 offset + 8,
11170 _depth
11171 )?;
11172 Ok(())
11173 }
11174 }
11175
11176 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryEnumerateRequest {
11177 type Borrowed<'a> = &'a mut Self;
11178 fn take_or_borrow<'a>(
11179 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11180 ) -> Self::Borrowed<'a> {
11181 value
11182 }
11183 }
11184
11185 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryEnumerateRequest {
11186 type Owned = Self;
11187
11188 #[inline(always)]
11189 fn inline_align(_context: fidl::encoding::Context) -> usize {
11190 8
11191 }
11192
11193 #[inline(always)]
11194 fn inline_size(_context: fidl::encoding::Context) -> usize {
11195 16
11196 }
11197 }
11198
11199 unsafe impl
11200 fidl::encoding::Encode<
11201 CapabilityStoreDictionaryEnumerateRequest,
11202 fidl::encoding::DefaultFuchsiaResourceDialect,
11203 > for &mut CapabilityStoreDictionaryEnumerateRequest
11204 {
11205 #[inline]
11206 unsafe fn encode(
11207 self,
11208 encoder: &mut fidl::encoding::Encoder<
11209 '_,
11210 fidl::encoding::DefaultFuchsiaResourceDialect,
11211 >,
11212 offset: usize,
11213 _depth: fidl::encoding::Depth,
11214 ) -> fidl::Result<()> {
11215 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
11216 fidl::encoding::Encode::<
11218 CapabilityStoreDictionaryEnumerateRequest,
11219 fidl::encoding::DefaultFuchsiaResourceDialect,
11220 >::encode(
11221 (
11222 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11223 <fidl::encoding::Endpoint<
11224 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11225 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11226 &mut self.iterator
11227 ),
11228 ),
11229 encoder,
11230 offset,
11231 _depth,
11232 )
11233 }
11234 }
11235 unsafe impl<
11236 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11237 T1: fidl::encoding::Encode<
11238 fidl::encoding::Endpoint<
11239 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11240 >,
11241 fidl::encoding::DefaultFuchsiaResourceDialect,
11242 >,
11243 >
11244 fidl::encoding::Encode<
11245 CapabilityStoreDictionaryEnumerateRequest,
11246 fidl::encoding::DefaultFuchsiaResourceDialect,
11247 > for (T0, T1)
11248 {
11249 #[inline]
11250 unsafe fn encode(
11251 self,
11252 encoder: &mut fidl::encoding::Encoder<
11253 '_,
11254 fidl::encoding::DefaultFuchsiaResourceDialect,
11255 >,
11256 offset: usize,
11257 depth: fidl::encoding::Depth,
11258 ) -> fidl::Result<()> {
11259 encoder.debug_check_bounds::<CapabilityStoreDictionaryEnumerateRequest>(offset);
11260 unsafe {
11263 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11264 (ptr as *mut u64).write_unaligned(0);
11265 }
11266 self.0.encode(encoder, offset + 0, depth)?;
11268 self.1.encode(encoder, offset + 8, depth)?;
11269 Ok(())
11270 }
11271 }
11272
11273 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11274 for CapabilityStoreDictionaryEnumerateRequest
11275 {
11276 #[inline(always)]
11277 fn new_empty() -> Self {
11278 Self {
11279 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11280 iterator: fidl::new_empty!(
11281 fidl::encoding::Endpoint<
11282 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11283 >,
11284 fidl::encoding::DefaultFuchsiaResourceDialect
11285 ),
11286 }
11287 }
11288
11289 #[inline]
11290 unsafe fn decode(
11291 &mut self,
11292 decoder: &mut fidl::encoding::Decoder<
11293 '_,
11294 fidl::encoding::DefaultFuchsiaResourceDialect,
11295 >,
11296 offset: usize,
11297 _depth: fidl::encoding::Depth,
11298 ) -> fidl::Result<()> {
11299 decoder.debug_check_bounds::<Self>(offset);
11300 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11302 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11303 let mask = 0xffffffff00000000u64;
11304 let maskedval = padval & mask;
11305 if maskedval != 0 {
11306 return Err(fidl::Error::NonZeroPadding {
11307 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11308 });
11309 }
11310 fidl::decode!(
11311 u64,
11312 fidl::encoding::DefaultFuchsiaResourceDialect,
11313 &mut self.id,
11314 decoder,
11315 offset + 0,
11316 _depth
11317 )?;
11318 fidl::decode!(
11319 fidl::encoding::Endpoint<
11320 fidl::endpoints::ServerEnd<DictionaryEnumerateIteratorMarker>,
11321 >,
11322 fidl::encoding::DefaultFuchsiaResourceDialect,
11323 &mut self.iterator,
11324 decoder,
11325 offset + 8,
11326 _depth
11327 )?;
11328 Ok(())
11329 }
11330 }
11331
11332 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryKeysRequest {
11333 type Borrowed<'a> = &'a mut Self;
11334 fn take_or_borrow<'a>(
11335 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11336 ) -> Self::Borrowed<'a> {
11337 value
11338 }
11339 }
11340
11341 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryKeysRequest {
11342 type Owned = Self;
11343
11344 #[inline(always)]
11345 fn inline_align(_context: fidl::encoding::Context) -> usize {
11346 8
11347 }
11348
11349 #[inline(always)]
11350 fn inline_size(_context: fidl::encoding::Context) -> usize {
11351 16
11352 }
11353 }
11354
11355 unsafe impl
11356 fidl::encoding::Encode<
11357 CapabilityStoreDictionaryKeysRequest,
11358 fidl::encoding::DefaultFuchsiaResourceDialect,
11359 > for &mut CapabilityStoreDictionaryKeysRequest
11360 {
11361 #[inline]
11362 unsafe fn encode(
11363 self,
11364 encoder: &mut fidl::encoding::Encoder<
11365 '_,
11366 fidl::encoding::DefaultFuchsiaResourceDialect,
11367 >,
11368 offset: usize,
11369 _depth: fidl::encoding::Depth,
11370 ) -> fidl::Result<()> {
11371 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
11372 fidl::encoding::Encode::<
11374 CapabilityStoreDictionaryKeysRequest,
11375 fidl::encoding::DefaultFuchsiaResourceDialect,
11376 >::encode(
11377 (
11378 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11379 <fidl::encoding::Endpoint<
11380 fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
11381 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11382 &mut self.iterator
11383 ),
11384 ),
11385 encoder,
11386 offset,
11387 _depth,
11388 )
11389 }
11390 }
11391 unsafe impl<
11392 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11393 T1: fidl::encoding::Encode<
11394 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>>,
11395 fidl::encoding::DefaultFuchsiaResourceDialect,
11396 >,
11397 >
11398 fidl::encoding::Encode<
11399 CapabilityStoreDictionaryKeysRequest,
11400 fidl::encoding::DefaultFuchsiaResourceDialect,
11401 > for (T0, T1)
11402 {
11403 #[inline]
11404 unsafe fn encode(
11405 self,
11406 encoder: &mut fidl::encoding::Encoder<
11407 '_,
11408 fidl::encoding::DefaultFuchsiaResourceDialect,
11409 >,
11410 offset: usize,
11411 depth: fidl::encoding::Depth,
11412 ) -> fidl::Result<()> {
11413 encoder.debug_check_bounds::<CapabilityStoreDictionaryKeysRequest>(offset);
11414 unsafe {
11417 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11418 (ptr as *mut u64).write_unaligned(0);
11419 }
11420 self.0.encode(encoder, offset + 0, depth)?;
11422 self.1.encode(encoder, offset + 8, depth)?;
11423 Ok(())
11424 }
11425 }
11426
11427 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11428 for CapabilityStoreDictionaryKeysRequest
11429 {
11430 #[inline(always)]
11431 fn new_empty() -> Self {
11432 Self {
11433 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11434 iterator: fidl::new_empty!(
11435 fidl::encoding::Endpoint<
11436 fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>,
11437 >,
11438 fidl::encoding::DefaultFuchsiaResourceDialect
11439 ),
11440 }
11441 }
11442
11443 #[inline]
11444 unsafe fn decode(
11445 &mut self,
11446 decoder: &mut fidl::encoding::Decoder<
11447 '_,
11448 fidl::encoding::DefaultFuchsiaResourceDialect,
11449 >,
11450 offset: usize,
11451 _depth: fidl::encoding::Depth,
11452 ) -> fidl::Result<()> {
11453 decoder.debug_check_bounds::<Self>(offset);
11454 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11456 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11457 let mask = 0xffffffff00000000u64;
11458 let maskedval = padval & mask;
11459 if maskedval != 0 {
11460 return Err(fidl::Error::NonZeroPadding {
11461 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11462 });
11463 }
11464 fidl::decode!(
11465 u64,
11466 fidl::encoding::DefaultFuchsiaResourceDialect,
11467 &mut self.id,
11468 decoder,
11469 offset + 0,
11470 _depth
11471 )?;
11472 fidl::decode!(
11473 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DictionaryKeysIteratorMarker>>,
11474 fidl::encoding::DefaultFuchsiaResourceDialect,
11475 &mut self.iterator,
11476 decoder,
11477 offset + 8,
11478 _depth
11479 )?;
11480 Ok(())
11481 }
11482 }
11483
11484 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
11485 type Borrowed<'a> = &'a mut Self;
11486 fn take_or_borrow<'a>(
11487 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11488 ) -> Self::Borrowed<'a> {
11489 value
11490 }
11491 }
11492
11493 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyExportRequest {
11494 type Owned = Self;
11495
11496 #[inline(always)]
11497 fn inline_align(_context: fidl::encoding::Context) -> usize {
11498 8
11499 }
11500
11501 #[inline(always)]
11502 fn inline_size(_context: fidl::encoding::Context) -> usize {
11503 16
11504 }
11505 }
11506
11507 unsafe impl
11508 fidl::encoding::Encode<
11509 CapabilityStoreDictionaryLegacyExportRequest,
11510 fidl::encoding::DefaultFuchsiaResourceDialect,
11511 > for &mut CapabilityStoreDictionaryLegacyExportRequest
11512 {
11513 #[inline]
11514 unsafe fn encode(
11515 self,
11516 encoder: &mut fidl::encoding::Encoder<
11517 '_,
11518 fidl::encoding::DefaultFuchsiaResourceDialect,
11519 >,
11520 offset: usize,
11521 _depth: fidl::encoding::Depth,
11522 ) -> fidl::Result<()> {
11523 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
11524 fidl::encoding::Encode::<
11526 CapabilityStoreDictionaryLegacyExportRequest,
11527 fidl::encoding::DefaultFuchsiaResourceDialect,
11528 >::encode(
11529 (
11530 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11531 <fidl::encoding::HandleType<
11532 fidl::Channel,
11533 { fidl::ObjectType::CHANNEL.into_raw() },
11534 2147483648,
11535 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11536 &mut self.server_end
11537 ),
11538 ),
11539 encoder,
11540 offset,
11541 _depth,
11542 )
11543 }
11544 }
11545 unsafe impl<
11546 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11547 T1: fidl::encoding::Encode<
11548 fidl::encoding::HandleType<
11549 fidl::Channel,
11550 { fidl::ObjectType::CHANNEL.into_raw() },
11551 2147483648,
11552 >,
11553 fidl::encoding::DefaultFuchsiaResourceDialect,
11554 >,
11555 >
11556 fidl::encoding::Encode<
11557 CapabilityStoreDictionaryLegacyExportRequest,
11558 fidl::encoding::DefaultFuchsiaResourceDialect,
11559 > for (T0, T1)
11560 {
11561 #[inline]
11562 unsafe fn encode(
11563 self,
11564 encoder: &mut fidl::encoding::Encoder<
11565 '_,
11566 fidl::encoding::DefaultFuchsiaResourceDialect,
11567 >,
11568 offset: usize,
11569 depth: fidl::encoding::Depth,
11570 ) -> fidl::Result<()> {
11571 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyExportRequest>(offset);
11572 unsafe {
11575 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11576 (ptr as *mut u64).write_unaligned(0);
11577 }
11578 self.0.encode(encoder, offset + 0, depth)?;
11580 self.1.encode(encoder, offset + 8, depth)?;
11581 Ok(())
11582 }
11583 }
11584
11585 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11586 for CapabilityStoreDictionaryLegacyExportRequest
11587 {
11588 #[inline(always)]
11589 fn new_empty() -> Self {
11590 Self {
11591 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11592 server_end: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11593 }
11594 }
11595
11596 #[inline]
11597 unsafe fn decode(
11598 &mut self,
11599 decoder: &mut fidl::encoding::Decoder<
11600 '_,
11601 fidl::encoding::DefaultFuchsiaResourceDialect,
11602 >,
11603 offset: usize,
11604 _depth: fidl::encoding::Depth,
11605 ) -> fidl::Result<()> {
11606 decoder.debug_check_bounds::<Self>(offset);
11607 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11609 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11610 let mask = 0xffffffff00000000u64;
11611 let maskedval = padval & mask;
11612 if maskedval != 0 {
11613 return Err(fidl::Error::NonZeroPadding {
11614 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11615 });
11616 }
11617 fidl::decode!(
11618 u64,
11619 fidl::encoding::DefaultFuchsiaResourceDialect,
11620 &mut self.id,
11621 decoder,
11622 offset + 0,
11623 _depth
11624 )?;
11625 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.server_end, decoder, offset + 8, _depth)?;
11626 Ok(())
11627 }
11628 }
11629
11630 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
11631 type Borrowed<'a> = &'a mut Self;
11632 fn take_or_borrow<'a>(
11633 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11634 ) -> Self::Borrowed<'a> {
11635 value
11636 }
11637 }
11638
11639 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDictionaryLegacyImportRequest {
11640 type Owned = Self;
11641
11642 #[inline(always)]
11643 fn inline_align(_context: fidl::encoding::Context) -> usize {
11644 8
11645 }
11646
11647 #[inline(always)]
11648 fn inline_size(_context: fidl::encoding::Context) -> usize {
11649 16
11650 }
11651 }
11652
11653 unsafe impl
11654 fidl::encoding::Encode<
11655 CapabilityStoreDictionaryLegacyImportRequest,
11656 fidl::encoding::DefaultFuchsiaResourceDialect,
11657 > for &mut CapabilityStoreDictionaryLegacyImportRequest
11658 {
11659 #[inline]
11660 unsafe fn encode(
11661 self,
11662 encoder: &mut fidl::encoding::Encoder<
11663 '_,
11664 fidl::encoding::DefaultFuchsiaResourceDialect,
11665 >,
11666 offset: usize,
11667 _depth: fidl::encoding::Depth,
11668 ) -> fidl::Result<()> {
11669 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
11670 fidl::encoding::Encode::<
11672 CapabilityStoreDictionaryLegacyImportRequest,
11673 fidl::encoding::DefaultFuchsiaResourceDialect,
11674 >::encode(
11675 (
11676 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11677 <fidl::encoding::HandleType<
11678 fidl::Channel,
11679 { fidl::ObjectType::CHANNEL.into_raw() },
11680 2147483648,
11681 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11682 &mut self.client_end
11683 ),
11684 ),
11685 encoder,
11686 offset,
11687 _depth,
11688 )
11689 }
11690 }
11691 unsafe impl<
11692 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11693 T1: fidl::encoding::Encode<
11694 fidl::encoding::HandleType<
11695 fidl::Channel,
11696 { fidl::ObjectType::CHANNEL.into_raw() },
11697 2147483648,
11698 >,
11699 fidl::encoding::DefaultFuchsiaResourceDialect,
11700 >,
11701 >
11702 fidl::encoding::Encode<
11703 CapabilityStoreDictionaryLegacyImportRequest,
11704 fidl::encoding::DefaultFuchsiaResourceDialect,
11705 > for (T0, T1)
11706 {
11707 #[inline]
11708 unsafe fn encode(
11709 self,
11710 encoder: &mut fidl::encoding::Encoder<
11711 '_,
11712 fidl::encoding::DefaultFuchsiaResourceDialect,
11713 >,
11714 offset: usize,
11715 depth: fidl::encoding::Depth,
11716 ) -> fidl::Result<()> {
11717 encoder.debug_check_bounds::<CapabilityStoreDictionaryLegacyImportRequest>(offset);
11718 unsafe {
11721 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11722 (ptr as *mut u64).write_unaligned(0);
11723 }
11724 self.0.encode(encoder, offset + 0, depth)?;
11726 self.1.encode(encoder, offset + 8, depth)?;
11727 Ok(())
11728 }
11729 }
11730
11731 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11732 for CapabilityStoreDictionaryLegacyImportRequest
11733 {
11734 #[inline(always)]
11735 fn new_empty() -> Self {
11736 Self {
11737 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11738 client_end: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11739 }
11740 }
11741
11742 #[inline]
11743 unsafe fn decode(
11744 &mut self,
11745 decoder: &mut fidl::encoding::Decoder<
11746 '_,
11747 fidl::encoding::DefaultFuchsiaResourceDialect,
11748 >,
11749 offset: usize,
11750 _depth: fidl::encoding::Depth,
11751 ) -> fidl::Result<()> {
11752 decoder.debug_check_bounds::<Self>(offset);
11753 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11755 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11756 let mask = 0xffffffff00000000u64;
11757 let maskedval = padval & mask;
11758 if maskedval != 0 {
11759 return Err(fidl::Error::NonZeroPadding {
11760 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11761 });
11762 }
11763 fidl::decode!(
11764 u64,
11765 fidl::encoding::DefaultFuchsiaResourceDialect,
11766 &mut self.id,
11767 decoder,
11768 offset + 0,
11769 _depth
11770 )?;
11771 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.client_end, decoder, offset + 8, _depth)?;
11772 Ok(())
11773 }
11774 }
11775
11776 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorCreateRequest {
11777 type Borrowed<'a> = &'a mut Self;
11778 fn take_or_borrow<'a>(
11779 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11780 ) -> Self::Borrowed<'a> {
11781 value
11782 }
11783 }
11784
11785 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorCreateRequest {
11786 type Owned = Self;
11787
11788 #[inline(always)]
11789 fn inline_align(_context: fidl::encoding::Context) -> usize {
11790 8
11791 }
11792
11793 #[inline(always)]
11794 fn inline_size(_context: fidl::encoding::Context) -> usize {
11795 16
11796 }
11797 }
11798
11799 unsafe impl
11800 fidl::encoding::Encode<
11801 CapabilityStoreDirConnectorCreateRequest,
11802 fidl::encoding::DefaultFuchsiaResourceDialect,
11803 > for &mut CapabilityStoreDirConnectorCreateRequest
11804 {
11805 #[inline]
11806 unsafe fn encode(
11807 self,
11808 encoder: &mut fidl::encoding::Encoder<
11809 '_,
11810 fidl::encoding::DefaultFuchsiaResourceDialect,
11811 >,
11812 offset: usize,
11813 _depth: fidl::encoding::Depth,
11814 ) -> fidl::Result<()> {
11815 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
11816 fidl::encoding::Encode::<CapabilityStoreDirConnectorCreateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
11818 (
11819 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11820 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.receiver),
11821 ),
11822 encoder, offset, _depth
11823 )
11824 }
11825 }
11826 unsafe impl<
11827 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11828 T1: fidl::encoding::Encode<
11829 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>>,
11830 fidl::encoding::DefaultFuchsiaResourceDialect,
11831 >,
11832 >
11833 fidl::encoding::Encode<
11834 CapabilityStoreDirConnectorCreateRequest,
11835 fidl::encoding::DefaultFuchsiaResourceDialect,
11836 > for (T0, T1)
11837 {
11838 #[inline]
11839 unsafe fn encode(
11840 self,
11841 encoder: &mut fidl::encoding::Encoder<
11842 '_,
11843 fidl::encoding::DefaultFuchsiaResourceDialect,
11844 >,
11845 offset: usize,
11846 depth: fidl::encoding::Depth,
11847 ) -> fidl::Result<()> {
11848 encoder.debug_check_bounds::<CapabilityStoreDirConnectorCreateRequest>(offset);
11849 unsafe {
11852 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11853 (ptr as *mut u64).write_unaligned(0);
11854 }
11855 self.0.encode(encoder, offset + 0, depth)?;
11857 self.1.encode(encoder, offset + 8, depth)?;
11858 Ok(())
11859 }
11860 }
11861
11862 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11863 for CapabilityStoreDirConnectorCreateRequest
11864 {
11865 #[inline(always)]
11866 fn new_empty() -> Self {
11867 Self {
11868 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
11869 receiver: fidl::new_empty!(
11870 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>>,
11871 fidl::encoding::DefaultFuchsiaResourceDialect
11872 ),
11873 }
11874 }
11875
11876 #[inline]
11877 unsafe fn decode(
11878 &mut self,
11879 decoder: &mut fidl::encoding::Decoder<
11880 '_,
11881 fidl::encoding::DefaultFuchsiaResourceDialect,
11882 >,
11883 offset: usize,
11884 _depth: fidl::encoding::Depth,
11885 ) -> fidl::Result<()> {
11886 decoder.debug_check_bounds::<Self>(offset);
11887 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11889 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11890 let mask = 0xffffffff00000000u64;
11891 let maskedval = padval & mask;
11892 if maskedval != 0 {
11893 return Err(fidl::Error::NonZeroPadding {
11894 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11895 });
11896 }
11897 fidl::decode!(
11898 u64,
11899 fidl::encoding::DefaultFuchsiaResourceDialect,
11900 &mut self.id,
11901 decoder,
11902 offset + 0,
11903 _depth
11904 )?;
11905 fidl::decode!(
11906 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirReceiverMarker>>,
11907 fidl::encoding::DefaultFuchsiaResourceDialect,
11908 &mut self.receiver,
11909 decoder,
11910 offset + 8,
11911 _depth
11912 )?;
11913 Ok(())
11914 }
11915 }
11916
11917 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreImportRequest {
11918 type Borrowed<'a> = &'a mut Self;
11919 fn take_or_borrow<'a>(
11920 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11921 ) -> Self::Borrowed<'a> {
11922 value
11923 }
11924 }
11925
11926 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreImportRequest {
11927 type Owned = Self;
11928
11929 #[inline(always)]
11930 fn inline_align(_context: fidl::encoding::Context) -> usize {
11931 8
11932 }
11933
11934 #[inline(always)]
11935 fn inline_size(_context: fidl::encoding::Context) -> usize {
11936 24
11937 }
11938 }
11939
11940 unsafe impl
11941 fidl::encoding::Encode<
11942 CapabilityStoreImportRequest,
11943 fidl::encoding::DefaultFuchsiaResourceDialect,
11944 > for &mut CapabilityStoreImportRequest
11945 {
11946 #[inline]
11947 unsafe fn encode(
11948 self,
11949 encoder: &mut fidl::encoding::Encoder<
11950 '_,
11951 fidl::encoding::DefaultFuchsiaResourceDialect,
11952 >,
11953 offset: usize,
11954 _depth: fidl::encoding::Depth,
11955 ) -> fidl::Result<()> {
11956 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
11957 fidl::encoding::Encode::<
11959 CapabilityStoreImportRequest,
11960 fidl::encoding::DefaultFuchsiaResourceDialect,
11961 >::encode(
11962 (
11963 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11964 <Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11965 &mut self.capability,
11966 ),
11967 ),
11968 encoder,
11969 offset,
11970 _depth,
11971 )
11972 }
11973 }
11974 unsafe impl<
11975 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11976 T1: fidl::encoding::Encode<Capability, fidl::encoding::DefaultFuchsiaResourceDialect>,
11977 >
11978 fidl::encoding::Encode<
11979 CapabilityStoreImportRequest,
11980 fidl::encoding::DefaultFuchsiaResourceDialect,
11981 > for (T0, T1)
11982 {
11983 #[inline]
11984 unsafe fn encode(
11985 self,
11986 encoder: &mut fidl::encoding::Encoder<
11987 '_,
11988 fidl::encoding::DefaultFuchsiaResourceDialect,
11989 >,
11990 offset: usize,
11991 depth: fidl::encoding::Depth,
11992 ) -> fidl::Result<()> {
11993 encoder.debug_check_bounds::<CapabilityStoreImportRequest>(offset);
11994 self.0.encode(encoder, offset + 0, depth)?;
11998 self.1.encode(encoder, offset + 8, depth)?;
11999 Ok(())
12000 }
12001 }
12002
12003 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12004 for CapabilityStoreImportRequest
12005 {
12006 #[inline(always)]
12007 fn new_empty() -> Self {
12008 Self {
12009 id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12010 capability: fidl::new_empty!(
12011 Capability,
12012 fidl::encoding::DefaultFuchsiaResourceDialect
12013 ),
12014 }
12015 }
12016
12017 #[inline]
12018 unsafe fn decode(
12019 &mut self,
12020 decoder: &mut fidl::encoding::Decoder<
12021 '_,
12022 fidl::encoding::DefaultFuchsiaResourceDialect,
12023 >,
12024 offset: usize,
12025 _depth: fidl::encoding::Depth,
12026 ) -> fidl::Result<()> {
12027 decoder.debug_check_bounds::<Self>(offset);
12028 fidl::decode!(
12030 u64,
12031 fidl::encoding::DefaultFuchsiaResourceDialect,
12032 &mut self.id,
12033 decoder,
12034 offset + 0,
12035 _depth
12036 )?;
12037 fidl::decode!(
12038 Capability,
12039 fidl::encoding::DefaultFuchsiaResourceDialect,
12040 &mut self.capability,
12041 decoder,
12042 offset + 8,
12043 _depth
12044 )?;
12045 Ok(())
12046 }
12047 }
12048
12049 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreCreateServiceAggregateResponse {
12050 type Borrowed<'a> = &'a mut Self;
12051 fn take_or_borrow<'a>(
12052 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12053 ) -> Self::Borrowed<'a> {
12054 value
12055 }
12056 }
12057
12058 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreCreateServiceAggregateResponse {
12059 type Owned = Self;
12060
12061 #[inline(always)]
12062 fn inline_align(_context: fidl::encoding::Context) -> usize {
12063 4
12064 }
12065
12066 #[inline(always)]
12067 fn inline_size(_context: fidl::encoding::Context) -> usize {
12068 4
12069 }
12070 }
12071
12072 unsafe impl
12073 fidl::encoding::Encode<
12074 CapabilityStoreCreateServiceAggregateResponse,
12075 fidl::encoding::DefaultFuchsiaResourceDialect,
12076 > for &mut CapabilityStoreCreateServiceAggregateResponse
12077 {
12078 #[inline]
12079 unsafe fn encode(
12080 self,
12081 encoder: &mut fidl::encoding::Encoder<
12082 '_,
12083 fidl::encoding::DefaultFuchsiaResourceDialect,
12084 >,
12085 offset: usize,
12086 _depth: fidl::encoding::Depth,
12087 ) -> fidl::Result<()> {
12088 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
12089 fidl::encoding::Encode::<
12091 CapabilityStoreCreateServiceAggregateResponse,
12092 fidl::encoding::DefaultFuchsiaResourceDialect,
12093 >::encode(
12094 (<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12095 &mut self.aggregate_dir_connector,
12096 ),),
12097 encoder,
12098 offset,
12099 _depth,
12100 )
12101 }
12102 }
12103 unsafe impl<
12104 T0: fidl::encoding::Encode<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>,
12105 >
12106 fidl::encoding::Encode<
12107 CapabilityStoreCreateServiceAggregateResponse,
12108 fidl::encoding::DefaultFuchsiaResourceDialect,
12109 > for (T0,)
12110 {
12111 #[inline]
12112 unsafe fn encode(
12113 self,
12114 encoder: &mut fidl::encoding::Encoder<
12115 '_,
12116 fidl::encoding::DefaultFuchsiaResourceDialect,
12117 >,
12118 offset: usize,
12119 depth: fidl::encoding::Depth,
12120 ) -> fidl::Result<()> {
12121 encoder.debug_check_bounds::<CapabilityStoreCreateServiceAggregateResponse>(offset);
12122 self.0.encode(encoder, offset + 0, depth)?;
12126 Ok(())
12127 }
12128 }
12129
12130 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12131 for CapabilityStoreCreateServiceAggregateResponse
12132 {
12133 #[inline(always)]
12134 fn new_empty() -> Self {
12135 Self {
12136 aggregate_dir_connector: fidl::new_empty!(
12137 DirConnector,
12138 fidl::encoding::DefaultFuchsiaResourceDialect
12139 ),
12140 }
12141 }
12142
12143 #[inline]
12144 unsafe fn decode(
12145 &mut self,
12146 decoder: &mut fidl::encoding::Decoder<
12147 '_,
12148 fidl::encoding::DefaultFuchsiaResourceDialect,
12149 >,
12150 offset: usize,
12151 _depth: fidl::encoding::Depth,
12152 ) -> fidl::Result<()> {
12153 decoder.debug_check_bounds::<Self>(offset);
12154 fidl::decode!(
12156 DirConnector,
12157 fidl::encoding::DefaultFuchsiaResourceDialect,
12158 &mut self.aggregate_dir_connector,
12159 decoder,
12160 offset + 0,
12161 _depth
12162 )?;
12163 Ok(())
12164 }
12165 }
12166
12167 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreExportResponse {
12168 type Borrowed<'a> = &'a mut Self;
12169 fn take_or_borrow<'a>(
12170 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12171 ) -> Self::Borrowed<'a> {
12172 value
12173 }
12174 }
12175
12176 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreExportResponse {
12177 type Owned = Self;
12178
12179 #[inline(always)]
12180 fn inline_align(_context: fidl::encoding::Context) -> usize {
12181 8
12182 }
12183
12184 #[inline(always)]
12185 fn inline_size(_context: fidl::encoding::Context) -> usize {
12186 16
12187 }
12188 }
12189
12190 unsafe impl
12191 fidl::encoding::Encode<
12192 CapabilityStoreExportResponse,
12193 fidl::encoding::DefaultFuchsiaResourceDialect,
12194 > for &mut CapabilityStoreExportResponse
12195 {
12196 #[inline]
12197 unsafe fn encode(
12198 self,
12199 encoder: &mut fidl::encoding::Encoder<
12200 '_,
12201 fidl::encoding::DefaultFuchsiaResourceDialect,
12202 >,
12203 offset: usize,
12204 _depth: fidl::encoding::Depth,
12205 ) -> fidl::Result<()> {
12206 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
12207 fidl::encoding::Encode::<
12209 CapabilityStoreExportResponse,
12210 fidl::encoding::DefaultFuchsiaResourceDialect,
12211 >::encode(
12212 (<Capability as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12213 &mut self.capability,
12214 ),),
12215 encoder,
12216 offset,
12217 _depth,
12218 )
12219 }
12220 }
12221 unsafe impl<
12222 T0: fidl::encoding::Encode<Capability, fidl::encoding::DefaultFuchsiaResourceDialect>,
12223 >
12224 fidl::encoding::Encode<
12225 CapabilityStoreExportResponse,
12226 fidl::encoding::DefaultFuchsiaResourceDialect,
12227 > for (T0,)
12228 {
12229 #[inline]
12230 unsafe fn encode(
12231 self,
12232 encoder: &mut fidl::encoding::Encoder<
12233 '_,
12234 fidl::encoding::DefaultFuchsiaResourceDialect,
12235 >,
12236 offset: usize,
12237 depth: fidl::encoding::Depth,
12238 ) -> fidl::Result<()> {
12239 encoder.debug_check_bounds::<CapabilityStoreExportResponse>(offset);
12240 self.0.encode(encoder, offset + 0, depth)?;
12244 Ok(())
12245 }
12246 }
12247
12248 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12249 for CapabilityStoreExportResponse
12250 {
12251 #[inline(always)]
12252 fn new_empty() -> Self {
12253 Self {
12254 capability: fidl::new_empty!(
12255 Capability,
12256 fidl::encoding::DefaultFuchsiaResourceDialect
12257 ),
12258 }
12259 }
12260
12261 #[inline]
12262 unsafe fn decode(
12263 &mut self,
12264 decoder: &mut fidl::encoding::Decoder<
12265 '_,
12266 fidl::encoding::DefaultFuchsiaResourceDialect,
12267 >,
12268 offset: usize,
12269 _depth: fidl::encoding::Depth,
12270 ) -> fidl::Result<()> {
12271 decoder.debug_check_bounds::<Self>(offset);
12272 fidl::decode!(
12274 Capability,
12275 fidl::encoding::DefaultFuchsiaResourceDialect,
12276 &mut self.capability,
12277 decoder,
12278 offset + 0,
12279 _depth
12280 )?;
12281 Ok(())
12282 }
12283 }
12284
12285 impl fidl::encoding::ResourceTypeMarker for Connector {
12286 type Borrowed<'a> = &'a mut Self;
12287 fn take_or_borrow<'a>(
12288 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12289 ) -> Self::Borrowed<'a> {
12290 value
12291 }
12292 }
12293
12294 unsafe impl fidl::encoding::TypeMarker for Connector {
12295 type Owned = Self;
12296
12297 #[inline(always)]
12298 fn inline_align(_context: fidl::encoding::Context) -> usize {
12299 4
12300 }
12301
12302 #[inline(always)]
12303 fn inline_size(_context: fidl::encoding::Context) -> usize {
12304 4
12305 }
12306 }
12307
12308 unsafe impl fidl::encoding::Encode<Connector, fidl::encoding::DefaultFuchsiaResourceDialect>
12309 for &mut Connector
12310 {
12311 #[inline]
12312 unsafe fn encode(
12313 self,
12314 encoder: &mut fidl::encoding::Encoder<
12315 '_,
12316 fidl::encoding::DefaultFuchsiaResourceDialect,
12317 >,
12318 offset: usize,
12319 _depth: fidl::encoding::Depth,
12320 ) -> fidl::Result<()> {
12321 encoder.debug_check_bounds::<Connector>(offset);
12322 fidl::encoding::Encode::<Connector, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12324 (
12325 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
12326 ),
12327 encoder, offset, _depth
12328 )
12329 }
12330 }
12331 unsafe impl<
12332 T0: fidl::encoding::Encode<
12333 fidl::encoding::HandleType<
12334 fidl::EventPair,
12335 { fidl::ObjectType::EVENTPAIR.into_raw() },
12336 2147483648,
12337 >,
12338 fidl::encoding::DefaultFuchsiaResourceDialect,
12339 >,
12340 > fidl::encoding::Encode<Connector, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
12341 {
12342 #[inline]
12343 unsafe fn encode(
12344 self,
12345 encoder: &mut fidl::encoding::Encoder<
12346 '_,
12347 fidl::encoding::DefaultFuchsiaResourceDialect,
12348 >,
12349 offset: usize,
12350 depth: fidl::encoding::Depth,
12351 ) -> fidl::Result<()> {
12352 encoder.debug_check_bounds::<Connector>(offset);
12353 self.0.encode(encoder, offset + 0, depth)?;
12357 Ok(())
12358 }
12359 }
12360
12361 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Connector {
12362 #[inline(always)]
12363 fn new_empty() -> Self {
12364 Self {
12365 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12366 }
12367 }
12368
12369 #[inline]
12370 unsafe fn decode(
12371 &mut self,
12372 decoder: &mut fidl::encoding::Decoder<
12373 '_,
12374 fidl::encoding::DefaultFuchsiaResourceDialect,
12375 >,
12376 offset: usize,
12377 _depth: fidl::encoding::Depth,
12378 ) -> fidl::Result<()> {
12379 decoder.debug_check_bounds::<Self>(offset);
12380 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
12382 Ok(())
12383 }
12384 }
12385
12386 impl fidl::encoding::ResourceTypeMarker for DictionaryDrainIteratorGetNextResponse {
12387 type Borrowed<'a> = &'a mut Self;
12388 fn take_or_borrow<'a>(
12389 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12390 ) -> Self::Borrowed<'a> {
12391 value
12392 }
12393 }
12394
12395 unsafe impl fidl::encoding::TypeMarker for DictionaryDrainIteratorGetNextResponse {
12396 type Owned = Self;
12397
12398 #[inline(always)]
12399 fn inline_align(_context: fidl::encoding::Context) -> usize {
12400 8
12401 }
12402
12403 #[inline(always)]
12404 fn inline_size(_context: fidl::encoding::Context) -> usize {
12405 24
12406 }
12407 }
12408
12409 unsafe impl
12410 fidl::encoding::Encode<
12411 DictionaryDrainIteratorGetNextResponse,
12412 fidl::encoding::DefaultFuchsiaResourceDialect,
12413 > for &mut DictionaryDrainIteratorGetNextResponse
12414 {
12415 #[inline]
12416 unsafe fn encode(
12417 self,
12418 encoder: &mut fidl::encoding::Encoder<
12419 '_,
12420 fidl::encoding::DefaultFuchsiaResourceDialect,
12421 >,
12422 offset: usize,
12423 _depth: fidl::encoding::Depth,
12424 ) -> fidl::Result<()> {
12425 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
12426 fidl::encoding::Encode::<DictionaryDrainIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12428 (
12429 <fidl::encoding::Vector<DictionaryItem, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.items),
12430 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
12431 ),
12432 encoder, offset, _depth
12433 )
12434 }
12435 }
12436 unsafe impl<
12437 T0: fidl::encoding::Encode<
12438 fidl::encoding::Vector<DictionaryItem, 128>,
12439 fidl::encoding::DefaultFuchsiaResourceDialect,
12440 >,
12441 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
12442 >
12443 fidl::encoding::Encode<
12444 DictionaryDrainIteratorGetNextResponse,
12445 fidl::encoding::DefaultFuchsiaResourceDialect,
12446 > for (T0, T1)
12447 {
12448 #[inline]
12449 unsafe fn encode(
12450 self,
12451 encoder: &mut fidl::encoding::Encoder<
12452 '_,
12453 fidl::encoding::DefaultFuchsiaResourceDialect,
12454 >,
12455 offset: usize,
12456 depth: fidl::encoding::Depth,
12457 ) -> fidl::Result<()> {
12458 encoder.debug_check_bounds::<DictionaryDrainIteratorGetNextResponse>(offset);
12459 self.0.encode(encoder, offset + 0, depth)?;
12463 self.1.encode(encoder, offset + 16, depth)?;
12464 Ok(())
12465 }
12466 }
12467
12468 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12469 for DictionaryDrainIteratorGetNextResponse
12470 {
12471 #[inline(always)]
12472 fn new_empty() -> Self {
12473 Self {
12474 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect),
12475 end_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12476 }
12477 }
12478
12479 #[inline]
12480 unsafe fn decode(
12481 &mut self,
12482 decoder: &mut fidl::encoding::Decoder<
12483 '_,
12484 fidl::encoding::DefaultFuchsiaResourceDialect,
12485 >,
12486 offset: usize,
12487 _depth: fidl::encoding::Depth,
12488 ) -> fidl::Result<()> {
12489 decoder.debug_check_bounds::<Self>(offset);
12490 fidl::decode!(fidl::encoding::Vector<DictionaryItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
12492 fidl::decode!(
12493 u64,
12494 fidl::encoding::DefaultFuchsiaResourceDialect,
12495 &mut self.end_id,
12496 decoder,
12497 offset + 16,
12498 _depth
12499 )?;
12500 Ok(())
12501 }
12502 }
12503
12504 impl fidl::encoding::ResourceTypeMarker for DictionaryEnumerateIteratorGetNextResponse {
12505 type Borrowed<'a> = &'a mut Self;
12506 fn take_or_borrow<'a>(
12507 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12508 ) -> Self::Borrowed<'a> {
12509 value
12510 }
12511 }
12512
12513 unsafe impl fidl::encoding::TypeMarker for DictionaryEnumerateIteratorGetNextResponse {
12514 type Owned = Self;
12515
12516 #[inline(always)]
12517 fn inline_align(_context: fidl::encoding::Context) -> usize {
12518 8
12519 }
12520
12521 #[inline(always)]
12522 fn inline_size(_context: fidl::encoding::Context) -> usize {
12523 24
12524 }
12525 }
12526
12527 unsafe impl
12528 fidl::encoding::Encode<
12529 DictionaryEnumerateIteratorGetNextResponse,
12530 fidl::encoding::DefaultFuchsiaResourceDialect,
12531 > for &mut DictionaryEnumerateIteratorGetNextResponse
12532 {
12533 #[inline]
12534 unsafe fn encode(
12535 self,
12536 encoder: &mut fidl::encoding::Encoder<
12537 '_,
12538 fidl::encoding::DefaultFuchsiaResourceDialect,
12539 >,
12540 offset: usize,
12541 _depth: fidl::encoding::Depth,
12542 ) -> fidl::Result<()> {
12543 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
12544 fidl::encoding::Encode::<DictionaryEnumerateIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12546 (
12547 <fidl::encoding::Vector<DictionaryOptionalItem, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.items),
12548 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.end_id),
12549 ),
12550 encoder, offset, _depth
12551 )
12552 }
12553 }
12554 unsafe impl<
12555 T0: fidl::encoding::Encode<
12556 fidl::encoding::Vector<DictionaryOptionalItem, 128>,
12557 fidl::encoding::DefaultFuchsiaResourceDialect,
12558 >,
12559 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
12560 >
12561 fidl::encoding::Encode<
12562 DictionaryEnumerateIteratorGetNextResponse,
12563 fidl::encoding::DefaultFuchsiaResourceDialect,
12564 > for (T0, T1)
12565 {
12566 #[inline]
12567 unsafe fn encode(
12568 self,
12569 encoder: &mut fidl::encoding::Encoder<
12570 '_,
12571 fidl::encoding::DefaultFuchsiaResourceDialect,
12572 >,
12573 offset: usize,
12574 depth: fidl::encoding::Depth,
12575 ) -> fidl::Result<()> {
12576 encoder.debug_check_bounds::<DictionaryEnumerateIteratorGetNextResponse>(offset);
12577 self.0.encode(encoder, offset + 0, depth)?;
12581 self.1.encode(encoder, offset + 16, depth)?;
12582 Ok(())
12583 }
12584 }
12585
12586 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12587 for DictionaryEnumerateIteratorGetNextResponse
12588 {
12589 #[inline(always)]
12590 fn new_empty() -> Self {
12591 Self {
12592 items: fidl::new_empty!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect),
12593 end_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12594 }
12595 }
12596
12597 #[inline]
12598 unsafe fn decode(
12599 &mut self,
12600 decoder: &mut fidl::encoding::Decoder<
12601 '_,
12602 fidl::encoding::DefaultFuchsiaResourceDialect,
12603 >,
12604 offset: usize,
12605 _depth: fidl::encoding::Depth,
12606 ) -> fidl::Result<()> {
12607 decoder.debug_check_bounds::<Self>(offset);
12608 fidl::decode!(fidl::encoding::Vector<DictionaryOptionalItem, 128>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.items, decoder, offset + 0, _depth)?;
12610 fidl::decode!(
12611 u64,
12612 fidl::encoding::DefaultFuchsiaResourceDialect,
12613 &mut self.end_id,
12614 decoder,
12615 offset + 16,
12616 _depth
12617 )?;
12618 Ok(())
12619 }
12620 }
12621
12622 impl fidl::encoding::ResourceTypeMarker for DictionaryKeysIteratorGetNextResponse {
12623 type Borrowed<'a> = &'a mut Self;
12624 fn take_or_borrow<'a>(
12625 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12626 ) -> Self::Borrowed<'a> {
12627 value
12628 }
12629 }
12630
12631 unsafe impl fidl::encoding::TypeMarker for DictionaryKeysIteratorGetNextResponse {
12632 type Owned = Self;
12633
12634 #[inline(always)]
12635 fn inline_align(_context: fidl::encoding::Context) -> usize {
12636 8
12637 }
12638
12639 #[inline(always)]
12640 fn inline_size(_context: fidl::encoding::Context) -> usize {
12641 16
12642 }
12643 }
12644
12645 unsafe impl
12646 fidl::encoding::Encode<
12647 DictionaryKeysIteratorGetNextResponse,
12648 fidl::encoding::DefaultFuchsiaResourceDialect,
12649 > for &mut DictionaryKeysIteratorGetNextResponse
12650 {
12651 #[inline]
12652 unsafe fn encode(
12653 self,
12654 encoder: &mut fidl::encoding::Encoder<
12655 '_,
12656 fidl::encoding::DefaultFuchsiaResourceDialect,
12657 >,
12658 offset: usize,
12659 _depth: fidl::encoding::Depth,
12660 ) -> fidl::Result<()> {
12661 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
12662 fidl::encoding::Encode::<DictionaryKeysIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12664 (
12665 <fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
12666 ),
12667 encoder, offset, _depth
12668 )
12669 }
12670 }
12671 unsafe impl<
12672 T0: fidl::encoding::Encode<
12673 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
12674 fidl::encoding::DefaultFuchsiaResourceDialect,
12675 >,
12676 >
12677 fidl::encoding::Encode<
12678 DictionaryKeysIteratorGetNextResponse,
12679 fidl::encoding::DefaultFuchsiaResourceDialect,
12680 > for (T0,)
12681 {
12682 #[inline]
12683 unsafe fn encode(
12684 self,
12685 encoder: &mut fidl::encoding::Encoder<
12686 '_,
12687 fidl::encoding::DefaultFuchsiaResourceDialect,
12688 >,
12689 offset: usize,
12690 depth: fidl::encoding::Depth,
12691 ) -> fidl::Result<()> {
12692 encoder.debug_check_bounds::<DictionaryKeysIteratorGetNextResponse>(offset);
12693 self.0.encode(encoder, offset + 0, depth)?;
12697 Ok(())
12698 }
12699 }
12700
12701 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12702 for DictionaryKeysIteratorGetNextResponse
12703 {
12704 #[inline(always)]
12705 fn new_empty() -> Self {
12706 Self {
12707 keys: fidl::new_empty!(
12708 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
12709 fidl::encoding::DefaultFuchsiaResourceDialect
12710 ),
12711 }
12712 }
12713
12714 #[inline]
12715 unsafe fn decode(
12716 &mut self,
12717 decoder: &mut fidl::encoding::Decoder<
12718 '_,
12719 fidl::encoding::DefaultFuchsiaResourceDialect,
12720 >,
12721 offset: usize,
12722 _depth: fidl::encoding::Depth,
12723 ) -> fidl::Result<()> {
12724 decoder.debug_check_bounds::<Self>(offset);
12725 fidl::decode!(
12727 fidl::encoding::Vector<fidl::encoding::BoundedString<255>, 128>,
12728 fidl::encoding::DefaultFuchsiaResourceDialect,
12729 &mut self.keys,
12730 decoder,
12731 offset + 0,
12732 _depth
12733 )?;
12734 Ok(())
12735 }
12736 }
12737
12738 impl fidl::encoding::ResourceTypeMarker for DictionaryOptionalItem {
12739 type Borrowed<'a> = &'a mut Self;
12740 fn take_or_borrow<'a>(
12741 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12742 ) -> Self::Borrowed<'a> {
12743 value
12744 }
12745 }
12746
12747 unsafe impl fidl::encoding::TypeMarker for DictionaryOptionalItem {
12748 type Owned = Self;
12749
12750 #[inline(always)]
12751 fn inline_align(_context: fidl::encoding::Context) -> usize {
12752 8
12753 }
12754
12755 #[inline(always)]
12756 fn inline_size(_context: fidl::encoding::Context) -> usize {
12757 24
12758 }
12759 }
12760
12761 unsafe impl
12762 fidl::encoding::Encode<
12763 DictionaryOptionalItem,
12764 fidl::encoding::DefaultFuchsiaResourceDialect,
12765 > for &mut DictionaryOptionalItem
12766 {
12767 #[inline]
12768 unsafe fn encode(
12769 self,
12770 encoder: &mut fidl::encoding::Encoder<
12771 '_,
12772 fidl::encoding::DefaultFuchsiaResourceDialect,
12773 >,
12774 offset: usize,
12775 _depth: fidl::encoding::Depth,
12776 ) -> fidl::Result<()> {
12777 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
12778 fidl::encoding::Encode::<DictionaryOptionalItem, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12780 (
12781 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
12782 <fidl::encoding::Boxed<WrappedCapabilityId> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
12783 ),
12784 encoder, offset, _depth
12785 )
12786 }
12787 }
12788 unsafe impl<
12789 T0: fidl::encoding::Encode<
12790 fidl::encoding::BoundedString<255>,
12791 fidl::encoding::DefaultFuchsiaResourceDialect,
12792 >,
12793 T1: fidl::encoding::Encode<
12794 fidl::encoding::Boxed<WrappedCapabilityId>,
12795 fidl::encoding::DefaultFuchsiaResourceDialect,
12796 >,
12797 >
12798 fidl::encoding::Encode<
12799 DictionaryOptionalItem,
12800 fidl::encoding::DefaultFuchsiaResourceDialect,
12801 > for (T0, T1)
12802 {
12803 #[inline]
12804 unsafe fn encode(
12805 self,
12806 encoder: &mut fidl::encoding::Encoder<
12807 '_,
12808 fidl::encoding::DefaultFuchsiaResourceDialect,
12809 >,
12810 offset: usize,
12811 depth: fidl::encoding::Depth,
12812 ) -> fidl::Result<()> {
12813 encoder.debug_check_bounds::<DictionaryOptionalItem>(offset);
12814 self.0.encode(encoder, offset + 0, depth)?;
12818 self.1.encode(encoder, offset + 16, depth)?;
12819 Ok(())
12820 }
12821 }
12822
12823 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12824 for DictionaryOptionalItem
12825 {
12826 #[inline(always)]
12827 fn new_empty() -> Self {
12828 Self {
12829 key: fidl::new_empty!(
12830 fidl::encoding::BoundedString<255>,
12831 fidl::encoding::DefaultFuchsiaResourceDialect
12832 ),
12833 value: fidl::new_empty!(
12834 fidl::encoding::Boxed<WrappedCapabilityId>,
12835 fidl::encoding::DefaultFuchsiaResourceDialect
12836 ),
12837 }
12838 }
12839
12840 #[inline]
12841 unsafe fn decode(
12842 &mut self,
12843 decoder: &mut fidl::encoding::Decoder<
12844 '_,
12845 fidl::encoding::DefaultFuchsiaResourceDialect,
12846 >,
12847 offset: usize,
12848 _depth: fidl::encoding::Depth,
12849 ) -> fidl::Result<()> {
12850 decoder.debug_check_bounds::<Self>(offset);
12851 fidl::decode!(
12853 fidl::encoding::BoundedString<255>,
12854 fidl::encoding::DefaultFuchsiaResourceDialect,
12855 &mut self.key,
12856 decoder,
12857 offset + 0,
12858 _depth
12859 )?;
12860 fidl::decode!(
12861 fidl::encoding::Boxed<WrappedCapabilityId>,
12862 fidl::encoding::DefaultFuchsiaResourceDialect,
12863 &mut self.value,
12864 decoder,
12865 offset + 16,
12866 _depth
12867 )?;
12868 Ok(())
12869 }
12870 }
12871
12872 impl fidl::encoding::ResourceTypeMarker for DictionaryRef {
12873 type Borrowed<'a> = &'a mut Self;
12874 fn take_or_borrow<'a>(
12875 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12876 ) -> Self::Borrowed<'a> {
12877 value
12878 }
12879 }
12880
12881 unsafe impl fidl::encoding::TypeMarker for DictionaryRef {
12882 type Owned = Self;
12883
12884 #[inline(always)]
12885 fn inline_align(_context: fidl::encoding::Context) -> usize {
12886 4
12887 }
12888
12889 #[inline(always)]
12890 fn inline_size(_context: fidl::encoding::Context) -> usize {
12891 4
12892 }
12893 }
12894
12895 unsafe impl fidl::encoding::Encode<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>
12896 for &mut DictionaryRef
12897 {
12898 #[inline]
12899 unsafe fn encode(
12900 self,
12901 encoder: &mut fidl::encoding::Encoder<
12902 '_,
12903 fidl::encoding::DefaultFuchsiaResourceDialect,
12904 >,
12905 offset: usize,
12906 _depth: fidl::encoding::Depth,
12907 ) -> fidl::Result<()> {
12908 encoder.debug_check_bounds::<DictionaryRef>(offset);
12909 fidl::encoding::Encode::<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12911 (
12912 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
12913 ),
12914 encoder, offset, _depth
12915 )
12916 }
12917 }
12918 unsafe impl<
12919 T0: fidl::encoding::Encode<
12920 fidl::encoding::HandleType<
12921 fidl::EventPair,
12922 { fidl::ObjectType::EVENTPAIR.into_raw() },
12923 2147483648,
12924 >,
12925 fidl::encoding::DefaultFuchsiaResourceDialect,
12926 >,
12927 > fidl::encoding::Encode<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>
12928 for (T0,)
12929 {
12930 #[inline]
12931 unsafe fn encode(
12932 self,
12933 encoder: &mut fidl::encoding::Encoder<
12934 '_,
12935 fidl::encoding::DefaultFuchsiaResourceDialect,
12936 >,
12937 offset: usize,
12938 depth: fidl::encoding::Depth,
12939 ) -> fidl::Result<()> {
12940 encoder.debug_check_bounds::<DictionaryRef>(offset);
12941 self.0.encode(encoder, offset + 0, depth)?;
12945 Ok(())
12946 }
12947 }
12948
12949 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DictionaryRef {
12950 #[inline(always)]
12951 fn new_empty() -> Self {
12952 Self {
12953 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12954 }
12955 }
12956
12957 #[inline]
12958 unsafe fn decode(
12959 &mut self,
12960 decoder: &mut fidl::encoding::Decoder<
12961 '_,
12962 fidl::encoding::DefaultFuchsiaResourceDialect,
12963 >,
12964 offset: usize,
12965 _depth: fidl::encoding::Depth,
12966 ) -> fidl::Result<()> {
12967 decoder.debug_check_bounds::<Self>(offset);
12968 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
12970 Ok(())
12971 }
12972 }
12973
12974 impl fidl::encoding::ResourceTypeMarker for DirConnector {
12975 type Borrowed<'a> = &'a mut Self;
12976 fn take_or_borrow<'a>(
12977 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12978 ) -> Self::Borrowed<'a> {
12979 value
12980 }
12981 }
12982
12983 unsafe impl fidl::encoding::TypeMarker for DirConnector {
12984 type Owned = Self;
12985
12986 #[inline(always)]
12987 fn inline_align(_context: fidl::encoding::Context) -> usize {
12988 4
12989 }
12990
12991 #[inline(always)]
12992 fn inline_size(_context: fidl::encoding::Context) -> usize {
12993 4
12994 }
12995 }
12996
12997 unsafe impl fidl::encoding::Encode<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>
12998 for &mut DirConnector
12999 {
13000 #[inline]
13001 unsafe fn encode(
13002 self,
13003 encoder: &mut fidl::encoding::Encoder<
13004 '_,
13005 fidl::encoding::DefaultFuchsiaResourceDialect,
13006 >,
13007 offset: usize,
13008 _depth: fidl::encoding::Depth,
13009 ) -> fidl::Result<()> {
13010 encoder.debug_check_bounds::<DirConnector>(offset);
13011 fidl::encoding::Encode::<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13013 (
13014 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13015 ),
13016 encoder, offset, _depth
13017 )
13018 }
13019 }
13020 unsafe impl<
13021 T0: fidl::encoding::Encode<
13022 fidl::encoding::HandleType<
13023 fidl::EventPair,
13024 { fidl::ObjectType::EVENTPAIR.into_raw() },
13025 2147483648,
13026 >,
13027 fidl::encoding::DefaultFuchsiaResourceDialect,
13028 >,
13029 > fidl::encoding::Encode<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
13030 {
13031 #[inline]
13032 unsafe fn encode(
13033 self,
13034 encoder: &mut fidl::encoding::Encoder<
13035 '_,
13036 fidl::encoding::DefaultFuchsiaResourceDialect,
13037 >,
13038 offset: usize,
13039 depth: fidl::encoding::Depth,
13040 ) -> fidl::Result<()> {
13041 encoder.debug_check_bounds::<DirConnector>(offset);
13042 self.0.encode(encoder, offset + 0, depth)?;
13046 Ok(())
13047 }
13048 }
13049
13050 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DirConnector {
13051 #[inline(always)]
13052 fn new_empty() -> Self {
13053 Self {
13054 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13055 }
13056 }
13057
13058 #[inline]
13059 unsafe fn decode(
13060 &mut self,
13061 decoder: &mut fidl::encoding::Decoder<
13062 '_,
13063 fidl::encoding::DefaultFuchsiaResourceDialect,
13064 >,
13065 offset: usize,
13066 _depth: fidl::encoding::Depth,
13067 ) -> fidl::Result<()> {
13068 decoder.debug_check_bounds::<Self>(offset);
13069 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
13071 Ok(())
13072 }
13073 }
13074
13075 impl fidl::encoding::ResourceTypeMarker for DirEntry {
13076 type Borrowed<'a> = &'a mut Self;
13077 fn take_or_borrow<'a>(
13078 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13079 ) -> Self::Borrowed<'a> {
13080 value
13081 }
13082 }
13083
13084 unsafe impl fidl::encoding::TypeMarker for DirEntry {
13085 type Owned = Self;
13086
13087 #[inline(always)]
13088 fn inline_align(_context: fidl::encoding::Context) -> usize {
13089 4
13090 }
13091
13092 #[inline(always)]
13093 fn inline_size(_context: fidl::encoding::Context) -> usize {
13094 4
13095 }
13096 }
13097
13098 unsafe impl fidl::encoding::Encode<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect>
13099 for &mut DirEntry
13100 {
13101 #[inline]
13102 unsafe fn encode(
13103 self,
13104 encoder: &mut fidl::encoding::Encoder<
13105 '_,
13106 fidl::encoding::DefaultFuchsiaResourceDialect,
13107 >,
13108 offset: usize,
13109 _depth: fidl::encoding::Depth,
13110 ) -> fidl::Result<()> {
13111 encoder.debug_check_bounds::<DirEntry>(offset);
13112 fidl::encoding::Encode::<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13114 (
13115 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13116 ),
13117 encoder, offset, _depth
13118 )
13119 }
13120 }
13121 unsafe impl<
13122 T0: fidl::encoding::Encode<
13123 fidl::encoding::HandleType<
13124 fidl::EventPair,
13125 { fidl::ObjectType::EVENTPAIR.into_raw() },
13126 2147483648,
13127 >,
13128 fidl::encoding::DefaultFuchsiaResourceDialect,
13129 >,
13130 > fidl::encoding::Encode<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
13131 {
13132 #[inline]
13133 unsafe fn encode(
13134 self,
13135 encoder: &mut fidl::encoding::Encoder<
13136 '_,
13137 fidl::encoding::DefaultFuchsiaResourceDialect,
13138 >,
13139 offset: usize,
13140 depth: fidl::encoding::Depth,
13141 ) -> fidl::Result<()> {
13142 encoder.debug_check_bounds::<DirEntry>(offset);
13143 self.0.encode(encoder, offset + 0, depth)?;
13147 Ok(())
13148 }
13149 }
13150
13151 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DirEntry {
13152 #[inline(always)]
13153 fn new_empty() -> Self {
13154 Self {
13155 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13156 }
13157 }
13158
13159 #[inline]
13160 unsafe fn decode(
13161 &mut self,
13162 decoder: &mut fidl::encoding::Decoder<
13163 '_,
13164 fidl::encoding::DefaultFuchsiaResourceDialect,
13165 >,
13166 offset: usize,
13167 _depth: fidl::encoding::Depth,
13168 ) -> fidl::Result<()> {
13169 decoder.debug_check_bounds::<Self>(offset);
13170 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
13172 Ok(())
13173 }
13174 }
13175
13176 impl fidl::encoding::ResourceTypeMarker for InstanceToken {
13177 type Borrowed<'a> = &'a mut Self;
13178 fn take_or_borrow<'a>(
13179 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13180 ) -> Self::Borrowed<'a> {
13181 value
13182 }
13183 }
13184
13185 unsafe impl fidl::encoding::TypeMarker for InstanceToken {
13186 type Owned = Self;
13187
13188 #[inline(always)]
13189 fn inline_align(_context: fidl::encoding::Context) -> usize {
13190 4
13191 }
13192
13193 #[inline(always)]
13194 fn inline_size(_context: fidl::encoding::Context) -> usize {
13195 4
13196 }
13197 }
13198
13199 unsafe impl fidl::encoding::Encode<InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect>
13200 for &mut InstanceToken
13201 {
13202 #[inline]
13203 unsafe fn encode(
13204 self,
13205 encoder: &mut fidl::encoding::Encoder<
13206 '_,
13207 fidl::encoding::DefaultFuchsiaResourceDialect,
13208 >,
13209 offset: usize,
13210 _depth: fidl::encoding::Depth,
13211 ) -> fidl::Result<()> {
13212 encoder.debug_check_bounds::<InstanceToken>(offset);
13213 fidl::encoding::Encode::<InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13215 (
13216 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13217 ),
13218 encoder, offset, _depth
13219 )
13220 }
13221 }
13222 unsafe impl<
13223 T0: fidl::encoding::Encode<
13224 fidl::encoding::HandleType<
13225 fidl::EventPair,
13226 { fidl::ObjectType::EVENTPAIR.into_raw() },
13227 2147483648,
13228 >,
13229 fidl::encoding::DefaultFuchsiaResourceDialect,
13230 >,
13231 > fidl::encoding::Encode<InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect>
13232 for (T0,)
13233 {
13234 #[inline]
13235 unsafe fn encode(
13236 self,
13237 encoder: &mut fidl::encoding::Encoder<
13238 '_,
13239 fidl::encoding::DefaultFuchsiaResourceDialect,
13240 >,
13241 offset: usize,
13242 depth: fidl::encoding::Depth,
13243 ) -> fidl::Result<()> {
13244 encoder.debug_check_bounds::<InstanceToken>(offset);
13245 self.0.encode(encoder, offset + 0, depth)?;
13249 Ok(())
13250 }
13251 }
13252
13253 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for InstanceToken {
13254 #[inline(always)]
13255 fn new_empty() -> Self {
13256 Self {
13257 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13258 }
13259 }
13260
13261 #[inline]
13262 unsafe fn decode(
13263 &mut self,
13264 decoder: &mut fidl::encoding::Decoder<
13265 '_,
13266 fidl::encoding::DefaultFuchsiaResourceDialect,
13267 >,
13268 offset: usize,
13269 _depth: fidl::encoding::Depth,
13270 ) -> fidl::Result<()> {
13271 decoder.debug_check_bounds::<Self>(offset);
13272 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
13274 Ok(())
13275 }
13276 }
13277
13278 impl fidl::encoding::ResourceTypeMarker for ProtocolPayload {
13279 type Borrowed<'a> = &'a mut Self;
13280 fn take_or_borrow<'a>(
13281 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13282 ) -> Self::Borrowed<'a> {
13283 value
13284 }
13285 }
13286
13287 unsafe impl fidl::encoding::TypeMarker for ProtocolPayload {
13288 type Owned = Self;
13289
13290 #[inline(always)]
13291 fn inline_align(_context: fidl::encoding::Context) -> usize {
13292 4
13293 }
13294
13295 #[inline(always)]
13296 fn inline_size(_context: fidl::encoding::Context) -> usize {
13297 4
13298 }
13299 }
13300
13301 unsafe impl
13302 fidl::encoding::Encode<ProtocolPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
13303 for &mut ProtocolPayload
13304 {
13305 #[inline]
13306 unsafe fn encode(
13307 self,
13308 encoder: &mut fidl::encoding::Encoder<
13309 '_,
13310 fidl::encoding::DefaultFuchsiaResourceDialect,
13311 >,
13312 offset: usize,
13313 _depth: fidl::encoding::Depth,
13314 ) -> fidl::Result<()> {
13315 encoder.debug_check_bounds::<ProtocolPayload>(offset);
13316 fidl::encoding::Encode::<ProtocolPayload, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13318 (
13319 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.channel),
13320 ),
13321 encoder, offset, _depth
13322 )
13323 }
13324 }
13325 unsafe impl<
13326 T0: fidl::encoding::Encode<
13327 fidl::encoding::HandleType<
13328 fidl::Channel,
13329 { fidl::ObjectType::CHANNEL.into_raw() },
13330 2147483648,
13331 >,
13332 fidl::encoding::DefaultFuchsiaResourceDialect,
13333 >,
13334 > fidl::encoding::Encode<ProtocolPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
13335 for (T0,)
13336 {
13337 #[inline]
13338 unsafe fn encode(
13339 self,
13340 encoder: &mut fidl::encoding::Encoder<
13341 '_,
13342 fidl::encoding::DefaultFuchsiaResourceDialect,
13343 >,
13344 offset: usize,
13345 depth: fidl::encoding::Depth,
13346 ) -> fidl::Result<()> {
13347 encoder.debug_check_bounds::<ProtocolPayload>(offset);
13348 self.0.encode(encoder, offset + 0, depth)?;
13352 Ok(())
13353 }
13354 }
13355
13356 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13357 for ProtocolPayload
13358 {
13359 #[inline(always)]
13360 fn new_empty() -> Self {
13361 Self {
13362 channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13363 }
13364 }
13365
13366 #[inline]
13367 unsafe fn decode(
13368 &mut self,
13369 decoder: &mut fidl::encoding::Decoder<
13370 '_,
13371 fidl::encoding::DefaultFuchsiaResourceDialect,
13372 >,
13373 offset: usize,
13374 _depth: fidl::encoding::Depth,
13375 ) -> fidl::Result<()> {
13376 decoder.debug_check_bounds::<Self>(offset);
13377 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 0, _depth)?;
13379 Ok(())
13380 }
13381 }
13382
13383 impl AggregateSource {
13384 #[inline(always)]
13385 fn max_ordinal_present(&self) -> u64 {
13386 if let Some(_) = self.renamed_instances {
13387 return 3;
13388 }
13389 if let Some(_) = self.source_instance_filter {
13390 return 2;
13391 }
13392 if let Some(_) = self.dir_connector {
13393 return 1;
13394 }
13395 0
13396 }
13397 }
13398
13399 impl fidl::encoding::ResourceTypeMarker for AggregateSource {
13400 type Borrowed<'a> = &'a mut Self;
13401 fn take_or_borrow<'a>(
13402 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13403 ) -> Self::Borrowed<'a> {
13404 value
13405 }
13406 }
13407
13408 unsafe impl fidl::encoding::TypeMarker for AggregateSource {
13409 type Owned = Self;
13410
13411 #[inline(always)]
13412 fn inline_align(_context: fidl::encoding::Context) -> usize {
13413 8
13414 }
13415
13416 #[inline(always)]
13417 fn inline_size(_context: fidl::encoding::Context) -> usize {
13418 16
13419 }
13420 }
13421
13422 unsafe impl
13423 fidl::encoding::Encode<AggregateSource, fidl::encoding::DefaultFuchsiaResourceDialect>
13424 for &mut AggregateSource
13425 {
13426 unsafe fn encode(
13427 self,
13428 encoder: &mut fidl::encoding::Encoder<
13429 '_,
13430 fidl::encoding::DefaultFuchsiaResourceDialect,
13431 >,
13432 offset: usize,
13433 mut depth: fidl::encoding::Depth,
13434 ) -> fidl::Result<()> {
13435 encoder.debug_check_bounds::<AggregateSource>(offset);
13436 let max_ordinal: u64 = self.max_ordinal_present();
13438 encoder.write_num(max_ordinal, offset);
13439 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13440 if max_ordinal == 0 {
13442 return Ok(());
13443 }
13444 depth.increment()?;
13445 let envelope_size = 8;
13446 let bytes_len = max_ordinal as usize * envelope_size;
13447 #[allow(unused_variables)]
13448 let offset = encoder.out_of_line_offset(bytes_len);
13449 let mut _prev_end_offset: usize = 0;
13450 if 1 > max_ordinal {
13451 return Ok(());
13452 }
13453
13454 let cur_offset: usize = (1 - 1) * envelope_size;
13457
13458 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13460
13461 fidl::encoding::encode_in_envelope_optional::<
13466 DirConnector,
13467 fidl::encoding::DefaultFuchsiaResourceDialect,
13468 >(
13469 self.dir_connector
13470 .as_mut()
13471 .map(<DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
13472 encoder,
13473 offset + cur_offset,
13474 depth,
13475 )?;
13476
13477 _prev_end_offset = cur_offset + envelope_size;
13478 if 2 > max_ordinal {
13479 return Ok(());
13480 }
13481
13482 let cur_offset: usize = (2 - 1) * envelope_size;
13485
13486 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13488
13489 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13494 self.source_instance_filter.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>> as fidl::encoding::ValueTypeMarker>::borrow),
13495 encoder, offset + cur_offset, depth
13496 )?;
13497
13498 _prev_end_offset = cur_offset + envelope_size;
13499 if 3 > max_ordinal {
13500 return Ok(());
13501 }
13502
13503 let cur_offset: usize = (3 - 1) * envelope_size;
13506
13507 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13509
13510 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13515 self.renamed_instances.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping> as fidl::encoding::ValueTypeMarker>::borrow),
13516 encoder, offset + cur_offset, depth
13517 )?;
13518
13519 _prev_end_offset = cur_offset + envelope_size;
13520
13521 Ok(())
13522 }
13523 }
13524
13525 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13526 for AggregateSource
13527 {
13528 #[inline(always)]
13529 fn new_empty() -> Self {
13530 Self::default()
13531 }
13532
13533 unsafe fn decode(
13534 &mut self,
13535 decoder: &mut fidl::encoding::Decoder<
13536 '_,
13537 fidl::encoding::DefaultFuchsiaResourceDialect,
13538 >,
13539 offset: usize,
13540 mut depth: fidl::encoding::Depth,
13541 ) -> fidl::Result<()> {
13542 decoder.debug_check_bounds::<Self>(offset);
13543 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13544 None => return Err(fidl::Error::NotNullable),
13545 Some(len) => len,
13546 };
13547 if len == 0 {
13549 return Ok(());
13550 };
13551 depth.increment()?;
13552 let envelope_size = 8;
13553 let bytes_len = len * envelope_size;
13554 let offset = decoder.out_of_line_offset(bytes_len)?;
13555 let mut _next_ordinal_to_read = 0;
13557 let mut next_offset = offset;
13558 let end_offset = offset + bytes_len;
13559 _next_ordinal_to_read += 1;
13560 if next_offset >= end_offset {
13561 return Ok(());
13562 }
13563
13564 while _next_ordinal_to_read < 1 {
13566 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13567 _next_ordinal_to_read += 1;
13568 next_offset += envelope_size;
13569 }
13570
13571 let next_out_of_line = decoder.next_out_of_line();
13572 let handles_before = decoder.remaining_handles();
13573 if let Some((inlined, num_bytes, num_handles)) =
13574 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13575 {
13576 let member_inline_size =
13577 <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13578 if inlined != (member_inline_size <= 4) {
13579 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13580 }
13581 let inner_offset;
13582 let mut inner_depth = depth.clone();
13583 if inlined {
13584 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13585 inner_offset = next_offset;
13586 } else {
13587 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13588 inner_depth.increment()?;
13589 }
13590 let val_ref = self.dir_connector.get_or_insert_with(|| {
13591 fidl::new_empty!(DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect)
13592 });
13593 fidl::decode!(
13594 DirConnector,
13595 fidl::encoding::DefaultFuchsiaResourceDialect,
13596 val_ref,
13597 decoder,
13598 inner_offset,
13599 inner_depth
13600 )?;
13601 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13602 {
13603 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13604 }
13605 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13606 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13607 }
13608 }
13609
13610 next_offset += envelope_size;
13611 _next_ordinal_to_read += 1;
13612 if next_offset >= end_offset {
13613 return Ok(());
13614 }
13615
13616 while _next_ordinal_to_read < 2 {
13618 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13619 _next_ordinal_to_read += 1;
13620 next_offset += envelope_size;
13621 }
13622
13623 let next_out_of_line = decoder.next_out_of_line();
13624 let handles_before = decoder.remaining_handles();
13625 if let Some((inlined, num_bytes, num_handles)) =
13626 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13627 {
13628 let member_inline_size = <fidl::encoding::UnboundedVector<
13629 fidl::encoding::BoundedString<255>,
13630 > as fidl::encoding::TypeMarker>::inline_size(
13631 decoder.context
13632 );
13633 if inlined != (member_inline_size <= 4) {
13634 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13635 }
13636 let inner_offset;
13637 let mut inner_depth = depth.clone();
13638 if inlined {
13639 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13640 inner_offset = next_offset;
13641 } else {
13642 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13643 inner_depth.increment()?;
13644 }
13645 let val_ref = self.source_instance_filter.get_or_insert_with(|| {
13646 fidl::new_empty!(
13647 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
13648 fidl::encoding::DefaultFuchsiaResourceDialect
13649 )
13650 });
13651 fidl::decode!(
13652 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<255>>,
13653 fidl::encoding::DefaultFuchsiaResourceDialect,
13654 val_ref,
13655 decoder,
13656 inner_offset,
13657 inner_depth
13658 )?;
13659 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13660 {
13661 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13662 }
13663 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13664 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13665 }
13666 }
13667
13668 next_offset += envelope_size;
13669 _next_ordinal_to_read += 1;
13670 if next_offset >= end_offset {
13671 return Ok(());
13672 }
13673
13674 while _next_ordinal_to_read < 3 {
13676 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13677 _next_ordinal_to_read += 1;
13678 next_offset += envelope_size;
13679 }
13680
13681 let next_out_of_line = decoder.next_out_of_line();
13682 let handles_before = decoder.remaining_handles();
13683 if let Some((inlined, num_bytes, num_handles)) =
13684 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13685 {
13686 let member_inline_size = <fidl::encoding::UnboundedVector<
13687 fidl_fuchsia_component_decl::NameMapping,
13688 > as fidl::encoding::TypeMarker>::inline_size(
13689 decoder.context
13690 );
13691 if inlined != (member_inline_size <= 4) {
13692 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13693 }
13694 let inner_offset;
13695 let mut inner_depth = depth.clone();
13696 if inlined {
13697 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13698 inner_offset = next_offset;
13699 } else {
13700 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13701 inner_depth.increment()?;
13702 }
13703 let val_ref = self.renamed_instances.get_or_insert_with(|| {
13704 fidl::new_empty!(
13705 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping>,
13706 fidl::encoding::DefaultFuchsiaResourceDialect
13707 )
13708 });
13709 fidl::decode!(
13710 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::NameMapping>,
13711 fidl::encoding::DefaultFuchsiaResourceDialect,
13712 val_ref,
13713 decoder,
13714 inner_offset,
13715 inner_depth
13716 )?;
13717 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13718 {
13719 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13720 }
13721 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13722 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13723 }
13724 }
13725
13726 next_offset += envelope_size;
13727
13728 while next_offset < end_offset {
13730 _next_ordinal_to_read += 1;
13731 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13732 next_offset += envelope_size;
13733 }
13734
13735 Ok(())
13736 }
13737 }
13738
13739 impl CapabilityStoreDirConnectorOpenRequest {
13740 #[inline(always)]
13741 fn max_ordinal_present(&self) -> u64 {
13742 if let Some(_) = self.path {
13743 return 4;
13744 }
13745 if let Some(_) = self.flags {
13746 return 3;
13747 }
13748 if let Some(_) = self.server_end {
13749 return 2;
13750 }
13751 if let Some(_) = self.id {
13752 return 1;
13753 }
13754 0
13755 }
13756 }
13757
13758 impl fidl::encoding::ResourceTypeMarker for CapabilityStoreDirConnectorOpenRequest {
13759 type Borrowed<'a> = &'a mut Self;
13760 fn take_or_borrow<'a>(
13761 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13762 ) -> Self::Borrowed<'a> {
13763 value
13764 }
13765 }
13766
13767 unsafe impl fidl::encoding::TypeMarker for CapabilityStoreDirConnectorOpenRequest {
13768 type Owned = Self;
13769
13770 #[inline(always)]
13771 fn inline_align(_context: fidl::encoding::Context) -> usize {
13772 8
13773 }
13774
13775 #[inline(always)]
13776 fn inline_size(_context: fidl::encoding::Context) -> usize {
13777 16
13778 }
13779 }
13780
13781 unsafe impl
13782 fidl::encoding::Encode<
13783 CapabilityStoreDirConnectorOpenRequest,
13784 fidl::encoding::DefaultFuchsiaResourceDialect,
13785 > for &mut CapabilityStoreDirConnectorOpenRequest
13786 {
13787 unsafe fn encode(
13788 self,
13789 encoder: &mut fidl::encoding::Encoder<
13790 '_,
13791 fidl::encoding::DefaultFuchsiaResourceDialect,
13792 >,
13793 offset: usize,
13794 mut depth: fidl::encoding::Depth,
13795 ) -> fidl::Result<()> {
13796 encoder.debug_check_bounds::<CapabilityStoreDirConnectorOpenRequest>(offset);
13797 let max_ordinal: u64 = self.max_ordinal_present();
13799 encoder.write_num(max_ordinal, offset);
13800 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13801 if max_ordinal == 0 {
13803 return Ok(());
13804 }
13805 depth.increment()?;
13806 let envelope_size = 8;
13807 let bytes_len = max_ordinal as usize * envelope_size;
13808 #[allow(unused_variables)]
13809 let offset = encoder.out_of_line_offset(bytes_len);
13810 let mut _prev_end_offset: usize = 0;
13811 if 1 > max_ordinal {
13812 return Ok(());
13813 }
13814
13815 let cur_offset: usize = (1 - 1) * envelope_size;
13818
13819 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13821
13822 fidl::encoding::encode_in_envelope_optional::<
13827 u64,
13828 fidl::encoding::DefaultFuchsiaResourceDialect,
13829 >(
13830 self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
13831 encoder,
13832 offset + cur_offset,
13833 depth,
13834 )?;
13835
13836 _prev_end_offset = cur_offset + envelope_size;
13837 if 2 > max_ordinal {
13838 return Ok(());
13839 }
13840
13841 let cur_offset: usize = (2 - 1) * envelope_size;
13844
13845 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13847
13848 fidl::encoding::encode_in_envelope_optional::<
13853 fidl::encoding::Endpoint<
13854 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
13855 >,
13856 fidl::encoding::DefaultFuchsiaResourceDialect,
13857 >(
13858 self.server_end.as_mut().map(
13859 <fidl::encoding::Endpoint<
13860 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
13861 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13862 ),
13863 encoder,
13864 offset + cur_offset,
13865 depth,
13866 )?;
13867
13868 _prev_end_offset = cur_offset + envelope_size;
13869 if 3 > max_ordinal {
13870 return Ok(());
13871 }
13872
13873 let cur_offset: usize = (3 - 1) * envelope_size;
13876
13877 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13879
13880 fidl::encoding::encode_in_envelope_optional::<
13885 fidl_fuchsia_io::Flags,
13886 fidl::encoding::DefaultFuchsiaResourceDialect,
13887 >(
13888 self.flags
13889 .as_ref()
13890 .map(<fidl_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
13891 encoder,
13892 offset + cur_offset,
13893 depth,
13894 )?;
13895
13896 _prev_end_offset = cur_offset + envelope_size;
13897 if 4 > max_ordinal {
13898 return Ok(());
13899 }
13900
13901 let cur_offset: usize = (4 - 1) * envelope_size;
13904
13905 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13907
13908 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13913 self.path.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
13914 encoder, offset + cur_offset, depth
13915 )?;
13916
13917 _prev_end_offset = cur_offset + envelope_size;
13918
13919 Ok(())
13920 }
13921 }
13922
13923 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13924 for CapabilityStoreDirConnectorOpenRequest
13925 {
13926 #[inline(always)]
13927 fn new_empty() -> Self {
13928 Self::default()
13929 }
13930
13931 unsafe fn decode(
13932 &mut self,
13933 decoder: &mut fidl::encoding::Decoder<
13934 '_,
13935 fidl::encoding::DefaultFuchsiaResourceDialect,
13936 >,
13937 offset: usize,
13938 mut depth: fidl::encoding::Depth,
13939 ) -> fidl::Result<()> {
13940 decoder.debug_check_bounds::<Self>(offset);
13941 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13942 None => return Err(fidl::Error::NotNullable),
13943 Some(len) => len,
13944 };
13945 if len == 0 {
13947 return Ok(());
13948 };
13949 depth.increment()?;
13950 let envelope_size = 8;
13951 let bytes_len = len * envelope_size;
13952 let offset = decoder.out_of_line_offset(bytes_len)?;
13953 let mut _next_ordinal_to_read = 0;
13955 let mut next_offset = offset;
13956 let end_offset = offset + bytes_len;
13957 _next_ordinal_to_read += 1;
13958 if next_offset >= end_offset {
13959 return Ok(());
13960 }
13961
13962 while _next_ordinal_to_read < 1 {
13964 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13965 _next_ordinal_to_read += 1;
13966 next_offset += envelope_size;
13967 }
13968
13969 let next_out_of_line = decoder.next_out_of_line();
13970 let handles_before = decoder.remaining_handles();
13971 if let Some((inlined, num_bytes, num_handles)) =
13972 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13973 {
13974 let member_inline_size =
13975 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13976 if inlined != (member_inline_size <= 4) {
13977 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13978 }
13979 let inner_offset;
13980 let mut inner_depth = depth.clone();
13981 if inlined {
13982 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13983 inner_offset = next_offset;
13984 } else {
13985 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13986 inner_depth.increment()?;
13987 }
13988 let val_ref = self.id.get_or_insert_with(|| {
13989 fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect)
13990 });
13991 fidl::decode!(
13992 u64,
13993 fidl::encoding::DefaultFuchsiaResourceDialect,
13994 val_ref,
13995 decoder,
13996 inner_offset,
13997 inner_depth
13998 )?;
13999 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14000 {
14001 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14002 }
14003 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14004 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14005 }
14006 }
14007
14008 next_offset += envelope_size;
14009 _next_ordinal_to_read += 1;
14010 if next_offset >= end_offset {
14011 return Ok(());
14012 }
14013
14014 while _next_ordinal_to_read < 2 {
14016 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14017 _next_ordinal_to_read += 1;
14018 next_offset += envelope_size;
14019 }
14020
14021 let next_out_of_line = decoder.next_out_of_line();
14022 let handles_before = decoder.remaining_handles();
14023 if let Some((inlined, num_bytes, num_handles)) =
14024 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14025 {
14026 let member_inline_size = <fidl::encoding::Endpoint<
14027 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
14028 > as fidl::encoding::TypeMarker>::inline_size(
14029 decoder.context
14030 );
14031 if inlined != (member_inline_size <= 4) {
14032 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14033 }
14034 let inner_offset;
14035 let mut inner_depth = depth.clone();
14036 if inlined {
14037 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14038 inner_offset = next_offset;
14039 } else {
14040 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14041 inner_depth.increment()?;
14042 }
14043 let val_ref = self.server_end.get_or_insert_with(|| {
14044 fidl::new_empty!(
14045 fidl::encoding::Endpoint<
14046 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
14047 >,
14048 fidl::encoding::DefaultFuchsiaResourceDialect
14049 )
14050 });
14051 fidl::decode!(
14052 fidl::encoding::Endpoint<
14053 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
14054 >,
14055 fidl::encoding::DefaultFuchsiaResourceDialect,
14056 val_ref,
14057 decoder,
14058 inner_offset,
14059 inner_depth
14060 )?;
14061 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14062 {
14063 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14064 }
14065 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14066 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14067 }
14068 }
14069
14070 next_offset += envelope_size;
14071 _next_ordinal_to_read += 1;
14072 if next_offset >= end_offset {
14073 return Ok(());
14074 }
14075
14076 while _next_ordinal_to_read < 3 {
14078 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14079 _next_ordinal_to_read += 1;
14080 next_offset += envelope_size;
14081 }
14082
14083 let next_out_of_line = decoder.next_out_of_line();
14084 let handles_before = decoder.remaining_handles();
14085 if let Some((inlined, num_bytes, num_handles)) =
14086 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14087 {
14088 let member_inline_size =
14089 <fidl_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
14090 decoder.context,
14091 );
14092 if inlined != (member_inline_size <= 4) {
14093 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14094 }
14095 let inner_offset;
14096 let mut inner_depth = depth.clone();
14097 if inlined {
14098 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14099 inner_offset = next_offset;
14100 } else {
14101 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14102 inner_depth.increment()?;
14103 }
14104 let val_ref = self.flags.get_or_insert_with(|| {
14105 fidl::new_empty!(
14106 fidl_fuchsia_io::Flags,
14107 fidl::encoding::DefaultFuchsiaResourceDialect
14108 )
14109 });
14110 fidl::decode!(
14111 fidl_fuchsia_io::Flags,
14112 fidl::encoding::DefaultFuchsiaResourceDialect,
14113 val_ref,
14114 decoder,
14115 inner_offset,
14116 inner_depth
14117 )?;
14118 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14119 {
14120 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14121 }
14122 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14123 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14124 }
14125 }
14126
14127 next_offset += envelope_size;
14128 _next_ordinal_to_read += 1;
14129 if next_offset >= end_offset {
14130 return Ok(());
14131 }
14132
14133 while _next_ordinal_to_read < 4 {
14135 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14136 _next_ordinal_to_read += 1;
14137 next_offset += envelope_size;
14138 }
14139
14140 let next_out_of_line = decoder.next_out_of_line();
14141 let handles_before = decoder.remaining_handles();
14142 if let Some((inlined, num_bytes, num_handles)) =
14143 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14144 {
14145 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14146 if inlined != (member_inline_size <= 4) {
14147 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14148 }
14149 let inner_offset;
14150 let mut inner_depth = depth.clone();
14151 if inlined {
14152 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14153 inner_offset = next_offset;
14154 } else {
14155 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14156 inner_depth.increment()?;
14157 }
14158 let val_ref = self.path.get_or_insert_with(|| {
14159 fidl::new_empty!(
14160 fidl::encoding::BoundedString<4095>,
14161 fidl::encoding::DefaultFuchsiaResourceDialect
14162 )
14163 });
14164 fidl::decode!(
14165 fidl::encoding::BoundedString<4095>,
14166 fidl::encoding::DefaultFuchsiaResourceDialect,
14167 val_ref,
14168 decoder,
14169 inner_offset,
14170 inner_depth
14171 )?;
14172 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14173 {
14174 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14175 }
14176 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14177 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14178 }
14179 }
14180
14181 next_offset += envelope_size;
14182
14183 while next_offset < end_offset {
14185 _next_ordinal_to_read += 1;
14186 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14187 next_offset += envelope_size;
14188 }
14189
14190 Ok(())
14191 }
14192 }
14193
14194 impl DirReceiverReceiveRequest {
14195 #[inline(always)]
14196 fn max_ordinal_present(&self) -> u64 {
14197 if let Some(_) = self.subdir {
14198 return 3;
14199 }
14200 if let Some(_) = self.flags {
14201 return 2;
14202 }
14203 if let Some(_) = self.channel {
14204 return 1;
14205 }
14206 0
14207 }
14208 }
14209
14210 impl fidl::encoding::ResourceTypeMarker for DirReceiverReceiveRequest {
14211 type Borrowed<'a> = &'a mut Self;
14212 fn take_or_borrow<'a>(
14213 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14214 ) -> Self::Borrowed<'a> {
14215 value
14216 }
14217 }
14218
14219 unsafe impl fidl::encoding::TypeMarker for DirReceiverReceiveRequest {
14220 type Owned = Self;
14221
14222 #[inline(always)]
14223 fn inline_align(_context: fidl::encoding::Context) -> usize {
14224 8
14225 }
14226
14227 #[inline(always)]
14228 fn inline_size(_context: fidl::encoding::Context) -> usize {
14229 16
14230 }
14231 }
14232
14233 unsafe impl
14234 fidl::encoding::Encode<
14235 DirReceiverReceiveRequest,
14236 fidl::encoding::DefaultFuchsiaResourceDialect,
14237 > for &mut DirReceiverReceiveRequest
14238 {
14239 unsafe fn encode(
14240 self,
14241 encoder: &mut fidl::encoding::Encoder<
14242 '_,
14243 fidl::encoding::DefaultFuchsiaResourceDialect,
14244 >,
14245 offset: usize,
14246 mut depth: fidl::encoding::Depth,
14247 ) -> fidl::Result<()> {
14248 encoder.debug_check_bounds::<DirReceiverReceiveRequest>(offset);
14249 let max_ordinal: u64 = self.max_ordinal_present();
14251 encoder.write_num(max_ordinal, offset);
14252 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14253 if max_ordinal == 0 {
14255 return Ok(());
14256 }
14257 depth.increment()?;
14258 let envelope_size = 8;
14259 let bytes_len = max_ordinal as usize * envelope_size;
14260 #[allow(unused_variables)]
14261 let offset = encoder.out_of_line_offset(bytes_len);
14262 let mut _prev_end_offset: usize = 0;
14263 if 1 > max_ordinal {
14264 return Ok(());
14265 }
14266
14267 let cur_offset: usize = (1 - 1) * envelope_size;
14270
14271 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14273
14274 fidl::encoding::encode_in_envelope_optional::<
14279 fidl::encoding::HandleType<
14280 fidl::Channel,
14281 { fidl::ObjectType::CHANNEL.into_raw() },
14282 2147483648,
14283 >,
14284 fidl::encoding::DefaultFuchsiaResourceDialect,
14285 >(
14286 self.channel.as_mut().map(
14287 <fidl::encoding::HandleType<
14288 fidl::Channel,
14289 { fidl::ObjectType::CHANNEL.into_raw() },
14290 2147483648,
14291 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
14292 ),
14293 encoder,
14294 offset + cur_offset,
14295 depth,
14296 )?;
14297
14298 _prev_end_offset = cur_offset + envelope_size;
14299 if 2 > max_ordinal {
14300 return Ok(());
14301 }
14302
14303 let cur_offset: usize = (2 - 1) * envelope_size;
14306
14307 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14309
14310 fidl::encoding::encode_in_envelope_optional::<
14315 fidl_fuchsia_io::Flags,
14316 fidl::encoding::DefaultFuchsiaResourceDialect,
14317 >(
14318 self.flags
14319 .as_ref()
14320 .map(<fidl_fuchsia_io::Flags as fidl::encoding::ValueTypeMarker>::borrow),
14321 encoder,
14322 offset + cur_offset,
14323 depth,
14324 )?;
14325
14326 _prev_end_offset = cur_offset + envelope_size;
14327 if 3 > max_ordinal {
14328 return Ok(());
14329 }
14330
14331 let cur_offset: usize = (3 - 1) * envelope_size;
14334
14335 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14337
14338 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14343 self.subdir.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
14344 encoder, offset + cur_offset, depth
14345 )?;
14346
14347 _prev_end_offset = cur_offset + envelope_size;
14348
14349 Ok(())
14350 }
14351 }
14352
14353 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14354 for DirReceiverReceiveRequest
14355 {
14356 #[inline(always)]
14357 fn new_empty() -> Self {
14358 Self::default()
14359 }
14360
14361 unsafe fn decode(
14362 &mut self,
14363 decoder: &mut fidl::encoding::Decoder<
14364 '_,
14365 fidl::encoding::DefaultFuchsiaResourceDialect,
14366 >,
14367 offset: usize,
14368 mut depth: fidl::encoding::Depth,
14369 ) -> fidl::Result<()> {
14370 decoder.debug_check_bounds::<Self>(offset);
14371 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14372 None => return Err(fidl::Error::NotNullable),
14373 Some(len) => len,
14374 };
14375 if len == 0 {
14377 return Ok(());
14378 };
14379 depth.increment()?;
14380 let envelope_size = 8;
14381 let bytes_len = len * envelope_size;
14382 let offset = decoder.out_of_line_offset(bytes_len)?;
14383 let mut _next_ordinal_to_read = 0;
14385 let mut next_offset = offset;
14386 let end_offset = offset + bytes_len;
14387 _next_ordinal_to_read += 1;
14388 if next_offset >= end_offset {
14389 return Ok(());
14390 }
14391
14392 while _next_ordinal_to_read < 1 {
14394 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14395 _next_ordinal_to_read += 1;
14396 next_offset += envelope_size;
14397 }
14398
14399 let next_out_of_line = decoder.next_out_of_line();
14400 let handles_before = decoder.remaining_handles();
14401 if let Some((inlined, num_bytes, num_handles)) =
14402 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14403 {
14404 let member_inline_size = <fidl::encoding::HandleType<
14405 fidl::Channel,
14406 { fidl::ObjectType::CHANNEL.into_raw() },
14407 2147483648,
14408 > as fidl::encoding::TypeMarker>::inline_size(
14409 decoder.context
14410 );
14411 if inlined != (member_inline_size <= 4) {
14412 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14413 }
14414 let inner_offset;
14415 let mut inner_depth = depth.clone();
14416 if inlined {
14417 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14418 inner_offset = next_offset;
14419 } else {
14420 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14421 inner_depth.increment()?;
14422 }
14423 let val_ref =
14424 self.channel.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
14425 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
14426 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14427 {
14428 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14429 }
14430 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14431 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14432 }
14433 }
14434
14435 next_offset += envelope_size;
14436 _next_ordinal_to_read += 1;
14437 if next_offset >= end_offset {
14438 return Ok(());
14439 }
14440
14441 while _next_ordinal_to_read < 2 {
14443 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14444 _next_ordinal_to_read += 1;
14445 next_offset += envelope_size;
14446 }
14447
14448 let next_out_of_line = decoder.next_out_of_line();
14449 let handles_before = decoder.remaining_handles();
14450 if let Some((inlined, num_bytes, num_handles)) =
14451 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14452 {
14453 let member_inline_size =
14454 <fidl_fuchsia_io::Flags as fidl::encoding::TypeMarker>::inline_size(
14455 decoder.context,
14456 );
14457 if inlined != (member_inline_size <= 4) {
14458 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14459 }
14460 let inner_offset;
14461 let mut inner_depth = depth.clone();
14462 if inlined {
14463 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14464 inner_offset = next_offset;
14465 } else {
14466 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14467 inner_depth.increment()?;
14468 }
14469 let val_ref = self.flags.get_or_insert_with(|| {
14470 fidl::new_empty!(
14471 fidl_fuchsia_io::Flags,
14472 fidl::encoding::DefaultFuchsiaResourceDialect
14473 )
14474 });
14475 fidl::decode!(
14476 fidl_fuchsia_io::Flags,
14477 fidl::encoding::DefaultFuchsiaResourceDialect,
14478 val_ref,
14479 decoder,
14480 inner_offset,
14481 inner_depth
14482 )?;
14483 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14484 {
14485 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14486 }
14487 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14488 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14489 }
14490 }
14491
14492 next_offset += envelope_size;
14493 _next_ordinal_to_read += 1;
14494 if next_offset >= end_offset {
14495 return Ok(());
14496 }
14497
14498 while _next_ordinal_to_read < 3 {
14500 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14501 _next_ordinal_to_read += 1;
14502 next_offset += envelope_size;
14503 }
14504
14505 let next_out_of_line = decoder.next_out_of_line();
14506 let handles_before = decoder.remaining_handles();
14507 if let Some((inlined, num_bytes, num_handles)) =
14508 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14509 {
14510 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14511 if inlined != (member_inline_size <= 4) {
14512 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14513 }
14514 let inner_offset;
14515 let mut inner_depth = depth.clone();
14516 if inlined {
14517 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14518 inner_offset = next_offset;
14519 } else {
14520 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14521 inner_depth.increment()?;
14522 }
14523 let val_ref = self.subdir.get_or_insert_with(|| {
14524 fidl::new_empty!(
14525 fidl::encoding::BoundedString<4095>,
14526 fidl::encoding::DefaultFuchsiaResourceDialect
14527 )
14528 });
14529 fidl::decode!(
14530 fidl::encoding::BoundedString<4095>,
14531 fidl::encoding::DefaultFuchsiaResourceDialect,
14532 val_ref,
14533 decoder,
14534 inner_offset,
14535 inner_depth
14536 )?;
14537 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14538 {
14539 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14540 }
14541 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14542 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14543 }
14544 }
14545
14546 next_offset += envelope_size;
14547
14548 while next_offset < end_offset {
14550 _next_ordinal_to_read += 1;
14551 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14552 next_offset += envelope_size;
14553 }
14554
14555 Ok(())
14556 }
14557 }
14558
14559 impl RouteRequest {
14560 #[inline(always)]
14561 fn max_ordinal_present(&self) -> u64 {
14562 if let Some(_) = self.metadata {
14563 return 2;
14564 }
14565 if let Some(_) = self.requesting {
14566 return 1;
14567 }
14568 0
14569 }
14570 }
14571
14572 impl fidl::encoding::ResourceTypeMarker for RouteRequest {
14573 type Borrowed<'a> = &'a mut Self;
14574 fn take_or_borrow<'a>(
14575 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14576 ) -> Self::Borrowed<'a> {
14577 value
14578 }
14579 }
14580
14581 unsafe impl fidl::encoding::TypeMarker for RouteRequest {
14582 type Owned = Self;
14583
14584 #[inline(always)]
14585 fn inline_align(_context: fidl::encoding::Context) -> usize {
14586 8
14587 }
14588
14589 #[inline(always)]
14590 fn inline_size(_context: fidl::encoding::Context) -> usize {
14591 16
14592 }
14593 }
14594
14595 unsafe impl fidl::encoding::Encode<RouteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
14596 for &mut RouteRequest
14597 {
14598 unsafe fn encode(
14599 self,
14600 encoder: &mut fidl::encoding::Encoder<
14601 '_,
14602 fidl::encoding::DefaultFuchsiaResourceDialect,
14603 >,
14604 offset: usize,
14605 mut depth: fidl::encoding::Depth,
14606 ) -> fidl::Result<()> {
14607 encoder.debug_check_bounds::<RouteRequest>(offset);
14608 let max_ordinal: u64 = self.max_ordinal_present();
14610 encoder.write_num(max_ordinal, offset);
14611 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14612 if max_ordinal == 0 {
14614 return Ok(());
14615 }
14616 depth.increment()?;
14617 let envelope_size = 8;
14618 let bytes_len = max_ordinal as usize * envelope_size;
14619 #[allow(unused_variables)]
14620 let offset = encoder.out_of_line_offset(bytes_len);
14621 let mut _prev_end_offset: usize = 0;
14622 if 1 > max_ordinal {
14623 return Ok(());
14624 }
14625
14626 let cur_offset: usize = (1 - 1) * envelope_size;
14629
14630 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14632
14633 fidl::encoding::encode_in_envelope_optional::<
14638 InstanceToken,
14639 fidl::encoding::DefaultFuchsiaResourceDialect,
14640 >(
14641 self.requesting
14642 .as_mut()
14643 .map(<InstanceToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
14644 encoder,
14645 offset + cur_offset,
14646 depth,
14647 )?;
14648
14649 _prev_end_offset = cur_offset + envelope_size;
14650 if 2 > max_ordinal {
14651 return Ok(());
14652 }
14653
14654 let cur_offset: usize = (2 - 1) * envelope_size;
14657
14658 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14660
14661 fidl::encoding::encode_in_envelope_optional::<
14666 DictionaryRef,
14667 fidl::encoding::DefaultFuchsiaResourceDialect,
14668 >(
14669 self.metadata
14670 .as_mut()
14671 .map(<DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
14672 encoder,
14673 offset + cur_offset,
14674 depth,
14675 )?;
14676
14677 _prev_end_offset = cur_offset + envelope_size;
14678
14679 Ok(())
14680 }
14681 }
14682
14683 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RouteRequest {
14684 #[inline(always)]
14685 fn new_empty() -> Self {
14686 Self::default()
14687 }
14688
14689 unsafe fn decode(
14690 &mut self,
14691 decoder: &mut fidl::encoding::Decoder<
14692 '_,
14693 fidl::encoding::DefaultFuchsiaResourceDialect,
14694 >,
14695 offset: usize,
14696 mut depth: fidl::encoding::Depth,
14697 ) -> fidl::Result<()> {
14698 decoder.debug_check_bounds::<Self>(offset);
14699 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14700 None => return Err(fidl::Error::NotNullable),
14701 Some(len) => len,
14702 };
14703 if len == 0 {
14705 return Ok(());
14706 };
14707 depth.increment()?;
14708 let envelope_size = 8;
14709 let bytes_len = len * envelope_size;
14710 let offset = decoder.out_of_line_offset(bytes_len)?;
14711 let mut _next_ordinal_to_read = 0;
14713 let mut next_offset = offset;
14714 let end_offset = offset + bytes_len;
14715 _next_ordinal_to_read += 1;
14716 if next_offset >= end_offset {
14717 return Ok(());
14718 }
14719
14720 while _next_ordinal_to_read < 1 {
14722 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14723 _next_ordinal_to_read += 1;
14724 next_offset += envelope_size;
14725 }
14726
14727 let next_out_of_line = decoder.next_out_of_line();
14728 let handles_before = decoder.remaining_handles();
14729 if let Some((inlined, num_bytes, num_handles)) =
14730 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14731 {
14732 let member_inline_size =
14733 <InstanceToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14734 if inlined != (member_inline_size <= 4) {
14735 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14736 }
14737 let inner_offset;
14738 let mut inner_depth = depth.clone();
14739 if inlined {
14740 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14741 inner_offset = next_offset;
14742 } else {
14743 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14744 inner_depth.increment()?;
14745 }
14746 let val_ref = self.requesting.get_or_insert_with(|| {
14747 fidl::new_empty!(InstanceToken, fidl::encoding::DefaultFuchsiaResourceDialect)
14748 });
14749 fidl::decode!(
14750 InstanceToken,
14751 fidl::encoding::DefaultFuchsiaResourceDialect,
14752 val_ref,
14753 decoder,
14754 inner_offset,
14755 inner_depth
14756 )?;
14757 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14758 {
14759 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14760 }
14761 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14762 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14763 }
14764 }
14765
14766 next_offset += envelope_size;
14767 _next_ordinal_to_read += 1;
14768 if next_offset >= end_offset {
14769 return Ok(());
14770 }
14771
14772 while _next_ordinal_to_read < 2 {
14774 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14775 _next_ordinal_to_read += 1;
14776 next_offset += envelope_size;
14777 }
14778
14779 let next_out_of_line = decoder.next_out_of_line();
14780 let handles_before = decoder.remaining_handles();
14781 if let Some((inlined, num_bytes, num_handles)) =
14782 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14783 {
14784 let member_inline_size =
14785 <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14786 if inlined != (member_inline_size <= 4) {
14787 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14788 }
14789 let inner_offset;
14790 let mut inner_depth = depth.clone();
14791 if inlined {
14792 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14793 inner_offset = next_offset;
14794 } else {
14795 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14796 inner_depth.increment()?;
14797 }
14798 let val_ref = self.metadata.get_or_insert_with(|| {
14799 fidl::new_empty!(DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect)
14800 });
14801 fidl::decode!(
14802 DictionaryRef,
14803 fidl::encoding::DefaultFuchsiaResourceDialect,
14804 val_ref,
14805 decoder,
14806 inner_offset,
14807 inner_depth
14808 )?;
14809 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14810 {
14811 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14812 }
14813 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14814 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14815 }
14816 }
14817
14818 next_offset += envelope_size;
14819
14820 while next_offset < end_offset {
14822 _next_ordinal_to_read += 1;
14823 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14824 next_offset += envelope_size;
14825 }
14826
14827 Ok(())
14828 }
14829 }
14830
14831 impl fidl::encoding::ResourceTypeMarker for Capability {
14832 type Borrowed<'a> = &'a mut Self;
14833 fn take_or_borrow<'a>(
14834 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14835 ) -> Self::Borrowed<'a> {
14836 value
14837 }
14838 }
14839
14840 unsafe impl fidl::encoding::TypeMarker for Capability {
14841 type Owned = Self;
14842
14843 #[inline(always)]
14844 fn inline_align(_context: fidl::encoding::Context) -> usize {
14845 8
14846 }
14847
14848 #[inline(always)]
14849 fn inline_size(_context: fidl::encoding::Context) -> usize {
14850 16
14851 }
14852 }
14853
14854 unsafe impl fidl::encoding::Encode<Capability, fidl::encoding::DefaultFuchsiaResourceDialect>
14855 for &mut Capability
14856 {
14857 #[inline]
14858 unsafe fn encode(
14859 self,
14860 encoder: &mut fidl::encoding::Encoder<
14861 '_,
14862 fidl::encoding::DefaultFuchsiaResourceDialect,
14863 >,
14864 offset: usize,
14865 _depth: fidl::encoding::Depth,
14866 ) -> fidl::Result<()> {
14867 encoder.debug_check_bounds::<Capability>(offset);
14868 encoder.write_num::<u64>(self.ordinal(), offset);
14869 match self {
14870 Capability::Unit(ref val) => {
14871 fidl::encoding::encode_in_envelope::<Unit, fidl::encoding::DefaultFuchsiaResourceDialect>(
14872 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
14873 encoder, offset + 8, _depth
14874 )
14875 }
14876 Capability::Handle(ref mut val) => {
14877 fidl::encoding::encode_in_envelope::<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14878 <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14879 encoder, offset + 8, _depth
14880 )
14881 }
14882 Capability::Data(ref val) => {
14883 fidl::encoding::encode_in_envelope::<Data, fidl::encoding::DefaultFuchsiaResourceDialect>(
14884 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
14885 encoder, offset + 8, _depth
14886 )
14887 }
14888 Capability::Dictionary(ref mut val) => {
14889 fidl::encoding::encode_in_envelope::<DictionaryRef, fidl::encoding::DefaultFuchsiaResourceDialect>(
14890 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14891 encoder, offset + 8, _depth
14892 )
14893 }
14894 Capability::Connector(ref mut val) => {
14895 fidl::encoding::encode_in_envelope::<Connector, fidl::encoding::DefaultFuchsiaResourceDialect>(
14896 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14897 encoder, offset + 8, _depth
14898 )
14899 }
14900 Capability::DirConnector(ref mut val) => {
14901 fidl::encoding::encode_in_envelope::<DirConnector, fidl::encoding::DefaultFuchsiaResourceDialect>(
14902 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14903 encoder, offset + 8, _depth
14904 )
14905 }
14906 Capability::Directory(ref mut val) => {
14907 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14908 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14909 encoder, offset + 8, _depth
14910 )
14911 }
14912 Capability::DirEntry(ref mut val) => {
14913 fidl::encoding::encode_in_envelope::<DirEntry, fidl::encoding::DefaultFuchsiaResourceDialect>(
14914 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14915 encoder, offset + 8, _depth
14916 )
14917 }
14918 Capability::ConnectorRouter(ref mut val) => {
14919 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ConnectorRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14920 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14921 encoder, offset + 8, _depth
14922 )
14923 }
14924 Capability::DictionaryRouter(ref mut val) => {
14925 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DictionaryRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14926 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14927 encoder, offset + 8, _depth
14928 )
14929 }
14930 Capability::DirEntryRouter(ref mut val) => {
14931 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirEntryRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14932 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14933 encoder, offset + 8, _depth
14934 )
14935 }
14936 Capability::DataRouter(ref mut val) => {
14937 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14938 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14939 encoder, offset + 8, _depth
14940 )
14941 }
14942 Capability::DirConnectorRouter(ref mut val) => {
14943 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirConnectorRouterMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14944 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14945 encoder, offset + 8, _depth
14946 )
14947 }
14948 Capability::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14949 }
14950 }
14951 }
14952
14953 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Capability {
14954 #[inline(always)]
14955 fn new_empty() -> Self {
14956 Self::__SourceBreaking { unknown_ordinal: 0 }
14957 }
14958
14959 #[inline]
14960 unsafe fn decode(
14961 &mut self,
14962 decoder: &mut fidl::encoding::Decoder<
14963 '_,
14964 fidl::encoding::DefaultFuchsiaResourceDialect,
14965 >,
14966 offset: usize,
14967 mut depth: fidl::encoding::Depth,
14968 ) -> fidl::Result<()> {
14969 decoder.debug_check_bounds::<Self>(offset);
14970 #[allow(unused_variables)]
14971 let next_out_of_line = decoder.next_out_of_line();
14972 let handles_before = decoder.remaining_handles();
14973 let (ordinal, inlined, num_bytes, num_handles) =
14974 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14975
14976 let member_inline_size = match ordinal {
14977 1 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14978 2 => <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14979 3 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14980 4 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14981 5 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14982 6 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14983 7 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14984 8 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14985 9 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ConnectorRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14986 10 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DictionaryRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14987 11 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirEntryRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14988 12 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14989 13 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DirConnectorRouterMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14990 0 => return Err(fidl::Error::UnknownUnionTag),
14991 _ => num_bytes as usize,
14992 };
14993
14994 if inlined != (member_inline_size <= 4) {
14995 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14996 }
14997 let _inner_offset;
14998 if inlined {
14999 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15000 _inner_offset = offset + 8;
15001 } else {
15002 depth.increment()?;
15003 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15004 }
15005 match ordinal {
15006 1 => {
15007 #[allow(irrefutable_let_patterns)]
15008 if let Capability::Unit(_) = self {
15009 } else {
15011 *self = Capability::Unit(fidl::new_empty!(
15013 Unit,
15014 fidl::encoding::DefaultFuchsiaResourceDialect
15015 ));
15016 }
15017 #[allow(irrefutable_let_patterns)]
15018 if let Capability::Unit(ref mut val) = self {
15019 fidl::decode!(
15020 Unit,
15021 fidl::encoding::DefaultFuchsiaResourceDialect,
15022 val,
15023 decoder,
15024 _inner_offset,
15025 depth
15026 )?;
15027 } else {
15028 unreachable!()
15029 }
15030 }
15031 2 => {
15032 #[allow(irrefutable_let_patterns)]
15033 if let Capability::Handle(_) = self {
15034 } else {
15036 *self = Capability::Handle(
15038 fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
15039 );
15040 }
15041 #[allow(irrefutable_let_patterns)]
15042 if let Capability::Handle(ref mut val) = self {
15043 fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15044 } else {
15045 unreachable!()
15046 }
15047 }
15048 3 => {
15049 #[allow(irrefutable_let_patterns)]
15050 if let Capability::Data(_) = self {
15051 } else {
15053 *self = Capability::Data(fidl::new_empty!(
15055 Data,
15056 fidl::encoding::DefaultFuchsiaResourceDialect
15057 ));
15058 }
15059 #[allow(irrefutable_let_patterns)]
15060 if let Capability::Data(ref mut val) = self {
15061 fidl::decode!(
15062 Data,
15063 fidl::encoding::DefaultFuchsiaResourceDialect,
15064 val,
15065 decoder,
15066 _inner_offset,
15067 depth
15068 )?;
15069 } else {
15070 unreachable!()
15071 }
15072 }
15073 4 => {
15074 #[allow(irrefutable_let_patterns)]
15075 if let Capability::Dictionary(_) = self {
15076 } else {
15078 *self = Capability::Dictionary(fidl::new_empty!(
15080 DictionaryRef,
15081 fidl::encoding::DefaultFuchsiaResourceDialect
15082 ));
15083 }
15084 #[allow(irrefutable_let_patterns)]
15085 if let Capability::Dictionary(ref mut val) = self {
15086 fidl::decode!(
15087 DictionaryRef,
15088 fidl::encoding::DefaultFuchsiaResourceDialect,
15089 val,
15090 decoder,
15091 _inner_offset,
15092 depth
15093 )?;
15094 } else {
15095 unreachable!()
15096 }
15097 }
15098 5 => {
15099 #[allow(irrefutable_let_patterns)]
15100 if let Capability::Connector(_) = self {
15101 } else {
15103 *self = Capability::Connector(fidl::new_empty!(
15105 Connector,
15106 fidl::encoding::DefaultFuchsiaResourceDialect
15107 ));
15108 }
15109 #[allow(irrefutable_let_patterns)]
15110 if let Capability::Connector(ref mut val) = self {
15111 fidl::decode!(
15112 Connector,
15113 fidl::encoding::DefaultFuchsiaResourceDialect,
15114 val,
15115 decoder,
15116 _inner_offset,
15117 depth
15118 )?;
15119 } else {
15120 unreachable!()
15121 }
15122 }
15123 6 => {
15124 #[allow(irrefutable_let_patterns)]
15125 if let Capability::DirConnector(_) = self {
15126 } else {
15128 *self = Capability::DirConnector(fidl::new_empty!(
15130 DirConnector,
15131 fidl::encoding::DefaultFuchsiaResourceDialect
15132 ));
15133 }
15134 #[allow(irrefutable_let_patterns)]
15135 if let Capability::DirConnector(ref mut val) = self {
15136 fidl::decode!(
15137 DirConnector,
15138 fidl::encoding::DefaultFuchsiaResourceDialect,
15139 val,
15140 decoder,
15141 _inner_offset,
15142 depth
15143 )?;
15144 } else {
15145 unreachable!()
15146 }
15147 }
15148 7 => {
15149 #[allow(irrefutable_let_patterns)]
15150 if let Capability::Directory(_) = self {
15151 } else {
15153 *self = Capability::Directory(fidl::new_empty!(
15155 fidl::encoding::Endpoint<
15156 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
15157 >,
15158 fidl::encoding::DefaultFuchsiaResourceDialect
15159 ));
15160 }
15161 #[allow(irrefutable_let_patterns)]
15162 if let Capability::Directory(ref mut val) = self {
15163 fidl::decode!(
15164 fidl::encoding::Endpoint<
15165 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
15166 >,
15167 fidl::encoding::DefaultFuchsiaResourceDialect,
15168 val,
15169 decoder,
15170 _inner_offset,
15171 depth
15172 )?;
15173 } else {
15174 unreachable!()
15175 }
15176 }
15177 8 => {
15178 #[allow(irrefutable_let_patterns)]
15179 if let Capability::DirEntry(_) = self {
15180 } else {
15182 *self = Capability::DirEntry(fidl::new_empty!(
15184 DirEntry,
15185 fidl::encoding::DefaultFuchsiaResourceDialect
15186 ));
15187 }
15188 #[allow(irrefutable_let_patterns)]
15189 if let Capability::DirEntry(ref mut val) = self {
15190 fidl::decode!(
15191 DirEntry,
15192 fidl::encoding::DefaultFuchsiaResourceDialect,
15193 val,
15194 decoder,
15195 _inner_offset,
15196 depth
15197 )?;
15198 } else {
15199 unreachable!()
15200 }
15201 }
15202 9 => {
15203 #[allow(irrefutable_let_patterns)]
15204 if let Capability::ConnectorRouter(_) = self {
15205 } else {
15207 *self = Capability::ConnectorRouter(fidl::new_empty!(
15209 fidl::encoding::Endpoint<
15210 fidl::endpoints::ClientEnd<ConnectorRouterMarker>,
15211 >,
15212 fidl::encoding::DefaultFuchsiaResourceDialect
15213 ));
15214 }
15215 #[allow(irrefutable_let_patterns)]
15216 if let Capability::ConnectorRouter(ref mut val) = self {
15217 fidl::decode!(
15218 fidl::encoding::Endpoint<
15219 fidl::endpoints::ClientEnd<ConnectorRouterMarker>,
15220 >,
15221 fidl::encoding::DefaultFuchsiaResourceDialect,
15222 val,
15223 decoder,
15224 _inner_offset,
15225 depth
15226 )?;
15227 } else {
15228 unreachable!()
15229 }
15230 }
15231 10 => {
15232 #[allow(irrefutable_let_patterns)]
15233 if let Capability::DictionaryRouter(_) = self {
15234 } else {
15236 *self = Capability::DictionaryRouter(fidl::new_empty!(
15238 fidl::encoding::Endpoint<
15239 fidl::endpoints::ClientEnd<DictionaryRouterMarker>,
15240 >,
15241 fidl::encoding::DefaultFuchsiaResourceDialect
15242 ));
15243 }
15244 #[allow(irrefutable_let_patterns)]
15245 if let Capability::DictionaryRouter(ref mut val) = self {
15246 fidl::decode!(
15247 fidl::encoding::Endpoint<
15248 fidl::endpoints::ClientEnd<DictionaryRouterMarker>,
15249 >,
15250 fidl::encoding::DefaultFuchsiaResourceDialect,
15251 val,
15252 decoder,
15253 _inner_offset,
15254 depth
15255 )?;
15256 } else {
15257 unreachable!()
15258 }
15259 }
15260 11 => {
15261 #[allow(irrefutable_let_patterns)]
15262 if let Capability::DirEntryRouter(_) = self {
15263 } else {
15265 *self = Capability::DirEntryRouter(fidl::new_empty!(
15267 fidl::encoding::Endpoint<
15268 fidl::endpoints::ClientEnd<DirEntryRouterMarker>,
15269 >,
15270 fidl::encoding::DefaultFuchsiaResourceDialect
15271 ));
15272 }
15273 #[allow(irrefutable_let_patterns)]
15274 if let Capability::DirEntryRouter(ref mut val) = self {
15275 fidl::decode!(
15276 fidl::encoding::Endpoint<
15277 fidl::endpoints::ClientEnd<DirEntryRouterMarker>,
15278 >,
15279 fidl::encoding::DefaultFuchsiaResourceDialect,
15280 val,
15281 decoder,
15282 _inner_offset,
15283 depth
15284 )?;
15285 } else {
15286 unreachable!()
15287 }
15288 }
15289 12 => {
15290 #[allow(irrefutable_let_patterns)]
15291 if let Capability::DataRouter(_) = self {
15292 } else {
15294 *self = Capability::DataRouter(fidl::new_empty!(
15296 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>>,
15297 fidl::encoding::DefaultFuchsiaResourceDialect
15298 ));
15299 }
15300 #[allow(irrefutable_let_patterns)]
15301 if let Capability::DataRouter(ref mut val) = self {
15302 fidl::decode!(
15303 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<DataRouterMarker>>,
15304 fidl::encoding::DefaultFuchsiaResourceDialect,
15305 val,
15306 decoder,
15307 _inner_offset,
15308 depth
15309 )?;
15310 } else {
15311 unreachable!()
15312 }
15313 }
15314 13 => {
15315 #[allow(irrefutable_let_patterns)]
15316 if let Capability::DirConnectorRouter(_) = self {
15317 } else {
15319 *self = Capability::DirConnectorRouter(fidl::new_empty!(
15321 fidl::encoding::Endpoint<
15322 fidl::endpoints::ClientEnd<DirConnectorRouterMarker>,
15323 >,
15324 fidl::encoding::DefaultFuchsiaResourceDialect
15325 ));
15326 }
15327 #[allow(irrefutable_let_patterns)]
15328 if let Capability::DirConnectorRouter(ref mut val) = self {
15329 fidl::decode!(
15330 fidl::encoding::Endpoint<
15331 fidl::endpoints::ClientEnd<DirConnectorRouterMarker>,
15332 >,
15333 fidl::encoding::DefaultFuchsiaResourceDialect,
15334 val,
15335 decoder,
15336 _inner_offset,
15337 depth
15338 )?;
15339 } else {
15340 unreachable!()
15341 }
15342 }
15343 #[allow(deprecated)]
15344 ordinal => {
15345 for _ in 0..num_handles {
15346 decoder.drop_next_handle()?;
15347 }
15348 *self = Capability::__SourceBreaking { unknown_ordinal: ordinal };
15349 }
15350 }
15351 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15352 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15353 }
15354 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15355 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15356 }
15357 Ok(())
15358 }
15359 }
15360
15361 impl fidl::encoding::ResourceTypeMarker for ConnectorRouterRouteResponse {
15362 type Borrowed<'a> = &'a mut Self;
15363 fn take_or_borrow<'a>(
15364 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15365 ) -> Self::Borrowed<'a> {
15366 value
15367 }
15368 }
15369
15370 unsafe impl fidl::encoding::TypeMarker for ConnectorRouterRouteResponse {
15371 type Owned = Self;
15372
15373 #[inline(always)]
15374 fn inline_align(_context: fidl::encoding::Context) -> usize {
15375 8
15376 }
15377
15378 #[inline(always)]
15379 fn inline_size(_context: fidl::encoding::Context) -> usize {
15380 16
15381 }
15382 }
15383
15384 unsafe impl
15385 fidl::encoding::Encode<
15386 ConnectorRouterRouteResponse,
15387 fidl::encoding::DefaultFuchsiaResourceDialect,
15388 > for &mut ConnectorRouterRouteResponse
15389 {
15390 #[inline]
15391 unsafe fn encode(
15392 self,
15393 encoder: &mut fidl::encoding::Encoder<
15394 '_,
15395 fidl::encoding::DefaultFuchsiaResourceDialect,
15396 >,
15397 offset: usize,
15398 _depth: fidl::encoding::Depth,
15399 ) -> fidl::Result<()> {
15400 encoder.debug_check_bounds::<ConnectorRouterRouteResponse>(offset);
15401 encoder.write_num::<u64>(self.ordinal(), offset);
15402 match self {
15403 ConnectorRouterRouteResponse::Connector(ref mut val) => {
15404 fidl::encoding::encode_in_envelope::<
15405 Connector,
15406 fidl::encoding::DefaultFuchsiaResourceDialect,
15407 >(
15408 <Connector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15409 encoder,
15410 offset + 8,
15411 _depth,
15412 )
15413 }
15414 ConnectorRouterRouteResponse::Unavailable(ref val) => {
15415 fidl::encoding::encode_in_envelope::<
15416 Unit,
15417 fidl::encoding::DefaultFuchsiaResourceDialect,
15418 >(
15419 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15420 encoder,
15421 offset + 8,
15422 _depth,
15423 )
15424 }
15425 }
15426 }
15427 }
15428
15429 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15430 for ConnectorRouterRouteResponse
15431 {
15432 #[inline(always)]
15433 fn new_empty() -> Self {
15434 Self::Connector(fidl::new_empty!(
15435 Connector,
15436 fidl::encoding::DefaultFuchsiaResourceDialect
15437 ))
15438 }
15439
15440 #[inline]
15441 unsafe fn decode(
15442 &mut self,
15443 decoder: &mut fidl::encoding::Decoder<
15444 '_,
15445 fidl::encoding::DefaultFuchsiaResourceDialect,
15446 >,
15447 offset: usize,
15448 mut depth: fidl::encoding::Depth,
15449 ) -> fidl::Result<()> {
15450 decoder.debug_check_bounds::<Self>(offset);
15451 #[allow(unused_variables)]
15452 let next_out_of_line = decoder.next_out_of_line();
15453 let handles_before = decoder.remaining_handles();
15454 let (ordinal, inlined, num_bytes, num_handles) =
15455 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15456
15457 let member_inline_size = match ordinal {
15458 1 => <Connector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15459 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15460 _ => return Err(fidl::Error::UnknownUnionTag),
15461 };
15462
15463 if inlined != (member_inline_size <= 4) {
15464 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15465 }
15466 let _inner_offset;
15467 if inlined {
15468 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15469 _inner_offset = offset + 8;
15470 } else {
15471 depth.increment()?;
15472 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15473 }
15474 match ordinal {
15475 1 => {
15476 #[allow(irrefutable_let_patterns)]
15477 if let ConnectorRouterRouteResponse::Connector(_) = self {
15478 } else {
15480 *self = ConnectorRouterRouteResponse::Connector(fidl::new_empty!(
15482 Connector,
15483 fidl::encoding::DefaultFuchsiaResourceDialect
15484 ));
15485 }
15486 #[allow(irrefutable_let_patterns)]
15487 if let ConnectorRouterRouteResponse::Connector(ref mut val) = self {
15488 fidl::decode!(
15489 Connector,
15490 fidl::encoding::DefaultFuchsiaResourceDialect,
15491 val,
15492 decoder,
15493 _inner_offset,
15494 depth
15495 )?;
15496 } else {
15497 unreachable!()
15498 }
15499 }
15500 2 => {
15501 #[allow(irrefutable_let_patterns)]
15502 if let ConnectorRouterRouteResponse::Unavailable(_) = self {
15503 } else {
15505 *self = ConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
15507 Unit,
15508 fidl::encoding::DefaultFuchsiaResourceDialect
15509 ));
15510 }
15511 #[allow(irrefutable_let_patterns)]
15512 if let ConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
15513 fidl::decode!(
15514 Unit,
15515 fidl::encoding::DefaultFuchsiaResourceDialect,
15516 val,
15517 decoder,
15518 _inner_offset,
15519 depth
15520 )?;
15521 } else {
15522 unreachable!()
15523 }
15524 }
15525 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15526 }
15527 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15528 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15529 }
15530 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15531 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15532 }
15533 Ok(())
15534 }
15535 }
15536
15537 impl fidl::encoding::ResourceTypeMarker for DataRouterRouteResponse {
15538 type Borrowed<'a> = &'a mut Self;
15539 fn take_or_borrow<'a>(
15540 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15541 ) -> Self::Borrowed<'a> {
15542 value
15543 }
15544 }
15545
15546 unsafe impl fidl::encoding::TypeMarker for DataRouterRouteResponse {
15547 type Owned = Self;
15548
15549 #[inline(always)]
15550 fn inline_align(_context: fidl::encoding::Context) -> usize {
15551 8
15552 }
15553
15554 #[inline(always)]
15555 fn inline_size(_context: fidl::encoding::Context) -> usize {
15556 16
15557 }
15558 }
15559
15560 unsafe impl
15561 fidl::encoding::Encode<
15562 DataRouterRouteResponse,
15563 fidl::encoding::DefaultFuchsiaResourceDialect,
15564 > for &mut DataRouterRouteResponse
15565 {
15566 #[inline]
15567 unsafe fn encode(
15568 self,
15569 encoder: &mut fidl::encoding::Encoder<
15570 '_,
15571 fidl::encoding::DefaultFuchsiaResourceDialect,
15572 >,
15573 offset: usize,
15574 _depth: fidl::encoding::Depth,
15575 ) -> fidl::Result<()> {
15576 encoder.debug_check_bounds::<DataRouterRouteResponse>(offset);
15577 encoder.write_num::<u64>(self.ordinal(), offset);
15578 match self {
15579 DataRouterRouteResponse::Data(ref val) => fidl::encoding::encode_in_envelope::<
15580 Data,
15581 fidl::encoding::DefaultFuchsiaResourceDialect,
15582 >(
15583 <Data as fidl::encoding::ValueTypeMarker>::borrow(val),
15584 encoder,
15585 offset + 8,
15586 _depth,
15587 ),
15588 DataRouterRouteResponse::Unavailable(ref val) => {
15589 fidl::encoding::encode_in_envelope::<
15590 Unit,
15591 fidl::encoding::DefaultFuchsiaResourceDialect,
15592 >(
15593 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15594 encoder,
15595 offset + 8,
15596 _depth,
15597 )
15598 }
15599 }
15600 }
15601 }
15602
15603 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15604 for DataRouterRouteResponse
15605 {
15606 #[inline(always)]
15607 fn new_empty() -> Self {
15608 Self::Data(fidl::new_empty!(Data, fidl::encoding::DefaultFuchsiaResourceDialect))
15609 }
15610
15611 #[inline]
15612 unsafe fn decode(
15613 &mut self,
15614 decoder: &mut fidl::encoding::Decoder<
15615 '_,
15616 fidl::encoding::DefaultFuchsiaResourceDialect,
15617 >,
15618 offset: usize,
15619 mut depth: fidl::encoding::Depth,
15620 ) -> fidl::Result<()> {
15621 decoder.debug_check_bounds::<Self>(offset);
15622 #[allow(unused_variables)]
15623 let next_out_of_line = decoder.next_out_of_line();
15624 let handles_before = decoder.remaining_handles();
15625 let (ordinal, inlined, num_bytes, num_handles) =
15626 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15627
15628 let member_inline_size = match ordinal {
15629 1 => <Data as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15630 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15631 _ => return Err(fidl::Error::UnknownUnionTag),
15632 };
15633
15634 if inlined != (member_inline_size <= 4) {
15635 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15636 }
15637 let _inner_offset;
15638 if inlined {
15639 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15640 _inner_offset = offset + 8;
15641 } else {
15642 depth.increment()?;
15643 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15644 }
15645 match ordinal {
15646 1 => {
15647 #[allow(irrefutable_let_patterns)]
15648 if let DataRouterRouteResponse::Data(_) = self {
15649 } else {
15651 *self = DataRouterRouteResponse::Data(fidl::new_empty!(
15653 Data,
15654 fidl::encoding::DefaultFuchsiaResourceDialect
15655 ));
15656 }
15657 #[allow(irrefutable_let_patterns)]
15658 if let DataRouterRouteResponse::Data(ref mut val) = self {
15659 fidl::decode!(
15660 Data,
15661 fidl::encoding::DefaultFuchsiaResourceDialect,
15662 val,
15663 decoder,
15664 _inner_offset,
15665 depth
15666 )?;
15667 } else {
15668 unreachable!()
15669 }
15670 }
15671 2 => {
15672 #[allow(irrefutable_let_patterns)]
15673 if let DataRouterRouteResponse::Unavailable(_) = self {
15674 } else {
15676 *self = DataRouterRouteResponse::Unavailable(fidl::new_empty!(
15678 Unit,
15679 fidl::encoding::DefaultFuchsiaResourceDialect
15680 ));
15681 }
15682 #[allow(irrefutable_let_patterns)]
15683 if let DataRouterRouteResponse::Unavailable(ref mut val) = self {
15684 fidl::decode!(
15685 Unit,
15686 fidl::encoding::DefaultFuchsiaResourceDialect,
15687 val,
15688 decoder,
15689 _inner_offset,
15690 depth
15691 )?;
15692 } else {
15693 unreachable!()
15694 }
15695 }
15696 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15697 }
15698 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15699 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15700 }
15701 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15702 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15703 }
15704 Ok(())
15705 }
15706 }
15707
15708 impl fidl::encoding::ResourceTypeMarker for DictionaryRouterRouteResponse {
15709 type Borrowed<'a> = &'a mut Self;
15710 fn take_or_borrow<'a>(
15711 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15712 ) -> Self::Borrowed<'a> {
15713 value
15714 }
15715 }
15716
15717 unsafe impl fidl::encoding::TypeMarker for DictionaryRouterRouteResponse {
15718 type Owned = Self;
15719
15720 #[inline(always)]
15721 fn inline_align(_context: fidl::encoding::Context) -> usize {
15722 8
15723 }
15724
15725 #[inline(always)]
15726 fn inline_size(_context: fidl::encoding::Context) -> usize {
15727 16
15728 }
15729 }
15730
15731 unsafe impl
15732 fidl::encoding::Encode<
15733 DictionaryRouterRouteResponse,
15734 fidl::encoding::DefaultFuchsiaResourceDialect,
15735 > for &mut DictionaryRouterRouteResponse
15736 {
15737 #[inline]
15738 unsafe fn encode(
15739 self,
15740 encoder: &mut fidl::encoding::Encoder<
15741 '_,
15742 fidl::encoding::DefaultFuchsiaResourceDialect,
15743 >,
15744 offset: usize,
15745 _depth: fidl::encoding::Depth,
15746 ) -> fidl::Result<()> {
15747 encoder.debug_check_bounds::<DictionaryRouterRouteResponse>(offset);
15748 encoder.write_num::<u64>(self.ordinal(), offset);
15749 match self {
15750 DictionaryRouterRouteResponse::Dictionary(ref mut val) => {
15751 fidl::encoding::encode_in_envelope::<
15752 DictionaryRef,
15753 fidl::encoding::DefaultFuchsiaResourceDialect,
15754 >(
15755 <DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15756 encoder,
15757 offset + 8,
15758 _depth,
15759 )
15760 }
15761 DictionaryRouterRouteResponse::Unavailable(ref val) => {
15762 fidl::encoding::encode_in_envelope::<
15763 Unit,
15764 fidl::encoding::DefaultFuchsiaResourceDialect,
15765 >(
15766 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15767 encoder,
15768 offset + 8,
15769 _depth,
15770 )
15771 }
15772 }
15773 }
15774 }
15775
15776 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15777 for DictionaryRouterRouteResponse
15778 {
15779 #[inline(always)]
15780 fn new_empty() -> Self {
15781 Self::Dictionary(fidl::new_empty!(
15782 DictionaryRef,
15783 fidl::encoding::DefaultFuchsiaResourceDialect
15784 ))
15785 }
15786
15787 #[inline]
15788 unsafe fn decode(
15789 &mut self,
15790 decoder: &mut fidl::encoding::Decoder<
15791 '_,
15792 fidl::encoding::DefaultFuchsiaResourceDialect,
15793 >,
15794 offset: usize,
15795 mut depth: fidl::encoding::Depth,
15796 ) -> fidl::Result<()> {
15797 decoder.debug_check_bounds::<Self>(offset);
15798 #[allow(unused_variables)]
15799 let next_out_of_line = decoder.next_out_of_line();
15800 let handles_before = decoder.remaining_handles();
15801 let (ordinal, inlined, num_bytes, num_handles) =
15802 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15803
15804 let member_inline_size = match ordinal {
15805 1 => <DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15806 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15807 _ => return Err(fidl::Error::UnknownUnionTag),
15808 };
15809
15810 if inlined != (member_inline_size <= 4) {
15811 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15812 }
15813 let _inner_offset;
15814 if inlined {
15815 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15816 _inner_offset = offset + 8;
15817 } else {
15818 depth.increment()?;
15819 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15820 }
15821 match ordinal {
15822 1 => {
15823 #[allow(irrefutable_let_patterns)]
15824 if let DictionaryRouterRouteResponse::Dictionary(_) = self {
15825 } else {
15827 *self = DictionaryRouterRouteResponse::Dictionary(fidl::new_empty!(
15829 DictionaryRef,
15830 fidl::encoding::DefaultFuchsiaResourceDialect
15831 ));
15832 }
15833 #[allow(irrefutable_let_patterns)]
15834 if let DictionaryRouterRouteResponse::Dictionary(ref mut val) = self {
15835 fidl::decode!(
15836 DictionaryRef,
15837 fidl::encoding::DefaultFuchsiaResourceDialect,
15838 val,
15839 decoder,
15840 _inner_offset,
15841 depth
15842 )?;
15843 } else {
15844 unreachable!()
15845 }
15846 }
15847 2 => {
15848 #[allow(irrefutable_let_patterns)]
15849 if let DictionaryRouterRouteResponse::Unavailable(_) = self {
15850 } else {
15852 *self = DictionaryRouterRouteResponse::Unavailable(fidl::new_empty!(
15854 Unit,
15855 fidl::encoding::DefaultFuchsiaResourceDialect
15856 ));
15857 }
15858 #[allow(irrefutable_let_patterns)]
15859 if let DictionaryRouterRouteResponse::Unavailable(ref mut val) = self {
15860 fidl::decode!(
15861 Unit,
15862 fidl::encoding::DefaultFuchsiaResourceDialect,
15863 val,
15864 decoder,
15865 _inner_offset,
15866 depth
15867 )?;
15868 } else {
15869 unreachable!()
15870 }
15871 }
15872 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15873 }
15874 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15875 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15876 }
15877 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15878 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15879 }
15880 Ok(())
15881 }
15882 }
15883
15884 impl fidl::encoding::ResourceTypeMarker for DirConnectorRouterRouteResponse {
15885 type Borrowed<'a> = &'a mut Self;
15886 fn take_or_borrow<'a>(
15887 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15888 ) -> Self::Borrowed<'a> {
15889 value
15890 }
15891 }
15892
15893 unsafe impl fidl::encoding::TypeMarker for DirConnectorRouterRouteResponse {
15894 type Owned = Self;
15895
15896 #[inline(always)]
15897 fn inline_align(_context: fidl::encoding::Context) -> usize {
15898 8
15899 }
15900
15901 #[inline(always)]
15902 fn inline_size(_context: fidl::encoding::Context) -> usize {
15903 16
15904 }
15905 }
15906
15907 unsafe impl
15908 fidl::encoding::Encode<
15909 DirConnectorRouterRouteResponse,
15910 fidl::encoding::DefaultFuchsiaResourceDialect,
15911 > for &mut DirConnectorRouterRouteResponse
15912 {
15913 #[inline]
15914 unsafe fn encode(
15915 self,
15916 encoder: &mut fidl::encoding::Encoder<
15917 '_,
15918 fidl::encoding::DefaultFuchsiaResourceDialect,
15919 >,
15920 offset: usize,
15921 _depth: fidl::encoding::Depth,
15922 ) -> fidl::Result<()> {
15923 encoder.debug_check_bounds::<DirConnectorRouterRouteResponse>(offset);
15924 encoder.write_num::<u64>(self.ordinal(), offset);
15925 match self {
15926 DirConnectorRouterRouteResponse::DirConnector(ref mut val) => {
15927 fidl::encoding::encode_in_envelope::<
15928 DirConnector,
15929 fidl::encoding::DefaultFuchsiaResourceDialect,
15930 >(
15931 <DirConnector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15932 encoder,
15933 offset + 8,
15934 _depth,
15935 )
15936 }
15937 DirConnectorRouterRouteResponse::Unavailable(ref val) => {
15938 fidl::encoding::encode_in_envelope::<
15939 Unit,
15940 fidl::encoding::DefaultFuchsiaResourceDialect,
15941 >(
15942 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
15943 encoder,
15944 offset + 8,
15945 _depth,
15946 )
15947 }
15948 }
15949 }
15950 }
15951
15952 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15953 for DirConnectorRouterRouteResponse
15954 {
15955 #[inline(always)]
15956 fn new_empty() -> Self {
15957 Self::DirConnector(fidl::new_empty!(
15958 DirConnector,
15959 fidl::encoding::DefaultFuchsiaResourceDialect
15960 ))
15961 }
15962
15963 #[inline]
15964 unsafe fn decode(
15965 &mut self,
15966 decoder: &mut fidl::encoding::Decoder<
15967 '_,
15968 fidl::encoding::DefaultFuchsiaResourceDialect,
15969 >,
15970 offset: usize,
15971 mut depth: fidl::encoding::Depth,
15972 ) -> fidl::Result<()> {
15973 decoder.debug_check_bounds::<Self>(offset);
15974 #[allow(unused_variables)]
15975 let next_out_of_line = decoder.next_out_of_line();
15976 let handles_before = decoder.remaining_handles();
15977 let (ordinal, inlined, num_bytes, num_handles) =
15978 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15979
15980 let member_inline_size = match ordinal {
15981 1 => <DirConnector as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15982 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15983 _ => return Err(fidl::Error::UnknownUnionTag),
15984 };
15985
15986 if inlined != (member_inline_size <= 4) {
15987 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15988 }
15989 let _inner_offset;
15990 if inlined {
15991 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15992 _inner_offset = offset + 8;
15993 } else {
15994 depth.increment()?;
15995 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15996 }
15997 match ordinal {
15998 1 => {
15999 #[allow(irrefutable_let_patterns)]
16000 if let DirConnectorRouterRouteResponse::DirConnector(_) = self {
16001 } else {
16003 *self = DirConnectorRouterRouteResponse::DirConnector(fidl::new_empty!(
16005 DirConnector,
16006 fidl::encoding::DefaultFuchsiaResourceDialect
16007 ));
16008 }
16009 #[allow(irrefutable_let_patterns)]
16010 if let DirConnectorRouterRouteResponse::DirConnector(ref mut val) = self {
16011 fidl::decode!(
16012 DirConnector,
16013 fidl::encoding::DefaultFuchsiaResourceDialect,
16014 val,
16015 decoder,
16016 _inner_offset,
16017 depth
16018 )?;
16019 } else {
16020 unreachable!()
16021 }
16022 }
16023 2 => {
16024 #[allow(irrefutable_let_patterns)]
16025 if let DirConnectorRouterRouteResponse::Unavailable(_) = self {
16026 } else {
16028 *self = DirConnectorRouterRouteResponse::Unavailable(fidl::new_empty!(
16030 Unit,
16031 fidl::encoding::DefaultFuchsiaResourceDialect
16032 ));
16033 }
16034 #[allow(irrefutable_let_patterns)]
16035 if let DirConnectorRouterRouteResponse::Unavailable(ref mut val) = self {
16036 fidl::decode!(
16037 Unit,
16038 fidl::encoding::DefaultFuchsiaResourceDialect,
16039 val,
16040 decoder,
16041 _inner_offset,
16042 depth
16043 )?;
16044 } else {
16045 unreachable!()
16046 }
16047 }
16048 ordinal => panic!("unexpected ordinal {:?}", ordinal),
16049 }
16050 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
16051 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16052 }
16053 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16054 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16055 }
16056 Ok(())
16057 }
16058 }
16059
16060 impl fidl::encoding::ResourceTypeMarker for DirEntryRouterRouteResponse {
16061 type Borrowed<'a> = &'a mut Self;
16062 fn take_or_borrow<'a>(
16063 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
16064 ) -> Self::Borrowed<'a> {
16065 value
16066 }
16067 }
16068
16069 unsafe impl fidl::encoding::TypeMarker for DirEntryRouterRouteResponse {
16070 type Owned = Self;
16071
16072 #[inline(always)]
16073 fn inline_align(_context: fidl::encoding::Context) -> usize {
16074 8
16075 }
16076
16077 #[inline(always)]
16078 fn inline_size(_context: fidl::encoding::Context) -> usize {
16079 16
16080 }
16081 }
16082
16083 unsafe impl
16084 fidl::encoding::Encode<
16085 DirEntryRouterRouteResponse,
16086 fidl::encoding::DefaultFuchsiaResourceDialect,
16087 > for &mut DirEntryRouterRouteResponse
16088 {
16089 #[inline]
16090 unsafe fn encode(
16091 self,
16092 encoder: &mut fidl::encoding::Encoder<
16093 '_,
16094 fidl::encoding::DefaultFuchsiaResourceDialect,
16095 >,
16096 offset: usize,
16097 _depth: fidl::encoding::Depth,
16098 ) -> fidl::Result<()> {
16099 encoder.debug_check_bounds::<DirEntryRouterRouteResponse>(offset);
16100 encoder.write_num::<u64>(self.ordinal(), offset);
16101 match self {
16102 DirEntryRouterRouteResponse::DirEntry(ref mut val) => {
16103 fidl::encoding::encode_in_envelope::<
16104 DirEntry,
16105 fidl::encoding::DefaultFuchsiaResourceDialect,
16106 >(
16107 <DirEntry as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
16108 encoder,
16109 offset + 8,
16110 _depth,
16111 )
16112 }
16113 DirEntryRouterRouteResponse::Unavailable(ref val) => {
16114 fidl::encoding::encode_in_envelope::<
16115 Unit,
16116 fidl::encoding::DefaultFuchsiaResourceDialect,
16117 >(
16118 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
16119 encoder,
16120 offset + 8,
16121 _depth,
16122 )
16123 }
16124 }
16125 }
16126 }
16127
16128 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
16129 for DirEntryRouterRouteResponse
16130 {
16131 #[inline(always)]
16132 fn new_empty() -> Self {
16133 Self::DirEntry(fidl::new_empty!(
16134 DirEntry,
16135 fidl::encoding::DefaultFuchsiaResourceDialect
16136 ))
16137 }
16138
16139 #[inline]
16140 unsafe fn decode(
16141 &mut self,
16142 decoder: &mut fidl::encoding::Decoder<
16143 '_,
16144 fidl::encoding::DefaultFuchsiaResourceDialect,
16145 >,
16146 offset: usize,
16147 mut depth: fidl::encoding::Depth,
16148 ) -> fidl::Result<()> {
16149 decoder.debug_check_bounds::<Self>(offset);
16150 #[allow(unused_variables)]
16151 let next_out_of_line = decoder.next_out_of_line();
16152 let handles_before = decoder.remaining_handles();
16153 let (ordinal, inlined, num_bytes, num_handles) =
16154 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16155
16156 let member_inline_size = match ordinal {
16157 1 => <DirEntry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16158 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16159 _ => return Err(fidl::Error::UnknownUnionTag),
16160 };
16161
16162 if inlined != (member_inline_size <= 4) {
16163 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16164 }
16165 let _inner_offset;
16166 if inlined {
16167 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16168 _inner_offset = offset + 8;
16169 } else {
16170 depth.increment()?;
16171 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16172 }
16173 match ordinal {
16174 1 => {
16175 #[allow(irrefutable_let_patterns)]
16176 if let DirEntryRouterRouteResponse::DirEntry(_) = self {
16177 } else {
16179 *self = DirEntryRouterRouteResponse::DirEntry(fidl::new_empty!(
16181 DirEntry,
16182 fidl::encoding::DefaultFuchsiaResourceDialect
16183 ));
16184 }
16185 #[allow(irrefutable_let_patterns)]
16186 if let DirEntryRouterRouteResponse::DirEntry(ref mut val) = self {
16187 fidl::decode!(
16188 DirEntry,
16189 fidl::encoding::DefaultFuchsiaResourceDialect,
16190 val,
16191 decoder,
16192 _inner_offset,
16193 depth
16194 )?;
16195 } else {
16196 unreachable!()
16197 }
16198 }
16199 2 => {
16200 #[allow(irrefutable_let_patterns)]
16201 if let DirEntryRouterRouteResponse::Unavailable(_) = self {
16202 } else {
16204 *self = DirEntryRouterRouteResponse::Unavailable(fidl::new_empty!(
16206 Unit,
16207 fidl::encoding::DefaultFuchsiaResourceDialect
16208 ));
16209 }
16210 #[allow(irrefutable_let_patterns)]
16211 if let DirEntryRouterRouteResponse::Unavailable(ref mut val) = self {
16212 fidl::decode!(
16213 Unit,
16214 fidl::encoding::DefaultFuchsiaResourceDialect,
16215 val,
16216 decoder,
16217 _inner_offset,
16218 depth
16219 )?;
16220 } else {
16221 unreachable!()
16222 }
16223 }
16224 ordinal => panic!("unexpected ordinal {:?}", ordinal),
16225 }
16226 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
16227 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16228 }
16229 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16230 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16231 }
16232 Ok(())
16233 }
16234 }
16235
16236 impl fidl::encoding::ResourceTypeMarker for DirectoryRouterRouteResponse {
16237 type Borrowed<'a> = &'a mut Self;
16238 fn take_or_borrow<'a>(
16239 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
16240 ) -> Self::Borrowed<'a> {
16241 value
16242 }
16243 }
16244
16245 unsafe impl fidl::encoding::TypeMarker for DirectoryRouterRouteResponse {
16246 type Owned = Self;
16247
16248 #[inline(always)]
16249 fn inline_align(_context: fidl::encoding::Context) -> usize {
16250 8
16251 }
16252
16253 #[inline(always)]
16254 fn inline_size(_context: fidl::encoding::Context) -> usize {
16255 16
16256 }
16257 }
16258
16259 unsafe impl
16260 fidl::encoding::Encode<
16261 DirectoryRouterRouteResponse,
16262 fidl::encoding::DefaultFuchsiaResourceDialect,
16263 > for &mut DirectoryRouterRouteResponse
16264 {
16265 #[inline]
16266 unsafe fn encode(
16267 self,
16268 encoder: &mut fidl::encoding::Encoder<
16269 '_,
16270 fidl::encoding::DefaultFuchsiaResourceDialect,
16271 >,
16272 offset: usize,
16273 _depth: fidl::encoding::Depth,
16274 ) -> fidl::Result<()> {
16275 encoder.debug_check_bounds::<DirectoryRouterRouteResponse>(offset);
16276 encoder.write_num::<u64>(self.ordinal(), offset);
16277 match self {
16278 DirectoryRouterRouteResponse::Directory(ref mut val) => {
16279 fidl::encoding::encode_in_envelope::<
16280 fidl::encoding::Endpoint<
16281 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16282 >,
16283 fidl::encoding::DefaultFuchsiaResourceDialect,
16284 >(
16285 <fidl::encoding::Endpoint<
16286 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16287 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
16288 val
16289 ),
16290 encoder,
16291 offset + 8,
16292 _depth,
16293 )
16294 }
16295 DirectoryRouterRouteResponse::Unavailable(ref val) => {
16296 fidl::encoding::encode_in_envelope::<
16297 Unit,
16298 fidl::encoding::DefaultFuchsiaResourceDialect,
16299 >(
16300 <Unit as fidl::encoding::ValueTypeMarker>::borrow(val),
16301 encoder,
16302 offset + 8,
16303 _depth,
16304 )
16305 }
16306 }
16307 }
16308 }
16309
16310 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
16311 for DirectoryRouterRouteResponse
16312 {
16313 #[inline(always)]
16314 fn new_empty() -> Self {
16315 Self::Directory(fidl::new_empty!(
16316 fidl::encoding::Endpoint<
16317 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16318 >,
16319 fidl::encoding::DefaultFuchsiaResourceDialect
16320 ))
16321 }
16322
16323 #[inline]
16324 unsafe fn decode(
16325 &mut self,
16326 decoder: &mut fidl::encoding::Decoder<
16327 '_,
16328 fidl::encoding::DefaultFuchsiaResourceDialect,
16329 >,
16330 offset: usize,
16331 mut depth: fidl::encoding::Depth,
16332 ) -> fidl::Result<()> {
16333 decoder.debug_check_bounds::<Self>(offset);
16334 #[allow(unused_variables)]
16335 let next_out_of_line = decoder.next_out_of_line();
16336 let handles_before = decoder.remaining_handles();
16337 let (ordinal, inlined, num_bytes, num_handles) =
16338 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16339
16340 let member_inline_size = match ordinal {
16341 1 => <fidl::encoding::Endpoint<
16342 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16343 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16344 2 => <Unit as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16345 _ => return Err(fidl::Error::UnknownUnionTag),
16346 };
16347
16348 if inlined != (member_inline_size <= 4) {
16349 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16350 }
16351 let _inner_offset;
16352 if inlined {
16353 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16354 _inner_offset = offset + 8;
16355 } else {
16356 depth.increment()?;
16357 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16358 }
16359 match ordinal {
16360 1 => {
16361 #[allow(irrefutable_let_patterns)]
16362 if let DirectoryRouterRouteResponse::Directory(_) = self {
16363 } else {
16365 *self = DirectoryRouterRouteResponse::Directory(fidl::new_empty!(
16367 fidl::encoding::Endpoint<
16368 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16369 >,
16370 fidl::encoding::DefaultFuchsiaResourceDialect
16371 ));
16372 }
16373 #[allow(irrefutable_let_patterns)]
16374 if let DirectoryRouterRouteResponse::Directory(ref mut val) = self {
16375 fidl::decode!(
16376 fidl::encoding::Endpoint<
16377 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
16378 >,
16379 fidl::encoding::DefaultFuchsiaResourceDialect,
16380 val,
16381 decoder,
16382 _inner_offset,
16383 depth
16384 )?;
16385 } else {
16386 unreachable!()
16387 }
16388 }
16389 2 => {
16390 #[allow(irrefutable_let_patterns)]
16391 if let DirectoryRouterRouteResponse::Unavailable(_) = self {
16392 } else {
16394 *self = DirectoryRouterRouteResponse::Unavailable(fidl::new_empty!(
16396 Unit,
16397 fidl::encoding::DefaultFuchsiaResourceDialect
16398 ));
16399 }
16400 #[allow(irrefutable_let_patterns)]
16401 if let DirectoryRouterRouteResponse::Unavailable(ref mut val) = self {
16402 fidl::decode!(
16403 Unit,
16404 fidl::encoding::DefaultFuchsiaResourceDialect,
16405 val,
16406 decoder,
16407 _inner_offset,
16408 depth
16409 )?;
16410 } else {
16411 unreachable!()
16412 }
16413 }
16414 ordinal => panic!("unexpected ordinal {:?}", ordinal),
16415 }
16416 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
16417 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16418 }
16419 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16420 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16421 }
16422 Ok(())
16423 }
16424 }
16425}