1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_component_sandbox::natural::*;
8
9 #[doc = " A token represents a bedrock object. Tokens are reference counted, dropping\n all counts of the token removes the object.\n"]
10 pub type Token = ::fidl_next::fuchsia::zx::EventPair;
11
12 #[derive(Debug, PartialEq)]
13 #[repr(C)]
14 pub struct DirConnector {
15 pub token: ::fidl_next::fuchsia::zx::EventPair,
16 }
17
18 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirConnector, ___E> for DirConnector
19 where
20 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21 ___E: ::fidl_next::fuchsia::HandleEncoder,
22 {
23 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::DirConnector> = unsafe {
24 ::fidl_next::CopyOptimization::enable_if(
25 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
26 ::fidl_next::wire::fuchsia::EventPair,
27 ___E,
28 >>::COPY_OPTIMIZATION
29 .is_enabled(),
30 )
31 };
32
33 #[inline]
34 fn encode(
35 self,
36 encoder_: &mut ___E,
37 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirConnector>,
38 _: (),
39 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
40 ::fidl_next::munge! {
41 let crate::wire::DirConnector {
42 token,
43
44 } = out_;
45 }
46
47 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
48
49 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
50
51 Ok(())
52 }
53 }
54
55 unsafe impl<___E>
56 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::DirConnector>, ___E>
57 for DirConnector
58 where
59 ___E: ::fidl_next::Encoder + ?Sized,
60 DirConnector: ::fidl_next::Encode<crate::wire::DirConnector, ___E>,
61 {
62 #[inline]
63 fn encode_option(
64 this: ::core::option::Option<Self>,
65 encoder: &mut ___E,
66 out: &mut ::core::mem::MaybeUninit<
67 ::fidl_next::wire::Box<'static, crate::wire::DirConnector>,
68 >,
69 _: (),
70 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
71 if let Some(inner) = this {
72 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
73 ::fidl_next::wire::Box::encode_present(out);
74 } else {
75 ::fidl_next::wire::Box::encode_absent(out);
76 }
77
78 Ok(())
79 }
80 }
81
82 impl ::fidl_next::FromWire<crate::wire::DirConnector> for DirConnector {
83 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DirConnector, Self> = unsafe {
84 ::fidl_next::CopyOptimization::enable_if(
85 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
86 ::fidl_next::wire::fuchsia::EventPair,
87 >>::COPY_OPTIMIZATION
88 .is_enabled(),
89 )
90 };
91
92 #[inline]
93 fn from_wire(wire: crate::wire::DirConnector) -> Self {
94 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
95 }
96 }
97
98 #[derive(Debug, Default, PartialEq)]
99 pub struct AggregateSource {
100 pub dir_connector: ::core::option::Option<crate::natural::DirConnector>,
101
102 pub source_instance_filter: ::core::option::Option<::std::vec::Vec<::std::string::String>>,
103
104 pub renamed_instances: ::core::option::Option<
105 ::std::vec::Vec<::fidl_next_fuchsia_component_decl::natural::NameMapping>,
106 >,
107 }
108
109 impl AggregateSource {
110 fn __max_ordinal(&self) -> usize {
111 if self.renamed_instances.is_some() {
112 return 3;
113 }
114
115 if self.source_instance_filter.is_some() {
116 return 2;
117 }
118
119 if self.dir_connector.is_some() {
120 return 1;
121 }
122
123 0
124 }
125 }
126
127 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AggregateSource<'static>, ___E>
128 for AggregateSource
129 where
130 ___E: ::fidl_next::Encoder + ?Sized,
131 ___E: ::fidl_next::fuchsia::HandleEncoder,
132 {
133 #[inline]
134 fn encode(
135 mut self,
136 encoder: &mut ___E,
137 out: &mut ::core::mem::MaybeUninit<crate::wire::AggregateSource<'static>>,
138 _: (),
139 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
140 ::fidl_next::munge!(let crate::wire::AggregateSource { table } = out);
141
142 let max_ord = self.__max_ordinal();
143
144 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
145 ::fidl_next::Wire::zero_padding(&mut out);
146
147 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
148 ::fidl_next::wire::Envelope,
149 >(encoder, max_ord);
150
151 for i in 1..=max_ord {
152 match i {
153 3 => {
154 if let Some(value) = self.renamed_instances.take() {
155 ::fidl_next::wire::Envelope::encode_value::<
156 ::fidl_next::wire::Vector<
157 'static,
158 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'static>,
159 >,
160 ___E,
161 >(
162 value, preallocated.encoder, &mut out, (4294967295, ())
163 )?;
164 } else {
165 ::fidl_next::wire::Envelope::encode_zero(&mut out)
166 }
167 }
168
169 2 => {
170 if let Some(value) = self.source_instance_filter.take() {
171 ::fidl_next::wire::Envelope::encode_value::<
172 ::fidl_next::wire::Vector<
173 'static,
174 ::fidl_next::wire::String<'static>,
175 >,
176 ___E,
177 >(
178 value, preallocated.encoder, &mut out, (4294967295, 255)
179 )?;
180 } else {
181 ::fidl_next::wire::Envelope::encode_zero(&mut out)
182 }
183 }
184
185 1 => {
186 if let Some(value) = self.dir_connector.take() {
187 ::fidl_next::wire::Envelope::encode_value::<
188 crate::wire::DirConnector,
189 ___E,
190 >(
191 value, preallocated.encoder, &mut out, ()
192 )?;
193 } else {
194 ::fidl_next::wire::Envelope::encode_zero(&mut out)
195 }
196 }
197
198 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
199 }
200 unsafe {
201 preallocated.write_next(out.assume_init_ref());
202 }
203 }
204
205 ::fidl_next::wire::Table::encode_len(table, max_ord);
206
207 Ok(())
208 }
209 }
210
211 impl<'de> ::fidl_next::FromWire<crate::wire::AggregateSource<'de>> for AggregateSource {
212 #[inline]
213 fn from_wire(wire_: crate::wire::AggregateSource<'de>) -> Self {
214 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
215
216 let dir_connector = wire_.table.get(1);
217
218 let source_instance_filter = wire_.table.get(2);
219
220 let renamed_instances = wire_.table.get(3);
221
222 Self {
223
224
225 dir_connector: dir_connector.map(|envelope| ::fidl_next::FromWire::from_wire(
226 unsafe { envelope.read_unchecked::<crate::wire::DirConnector>() }
227 )),
228
229
230 source_instance_filter: source_instance_filter.map(|envelope| ::fidl_next::FromWire::from_wire(
231 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>() }
232 )),
233
234
235 renamed_instances: renamed_instances.map(|envelope| ::fidl_next::FromWire::from_wire(
236 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>>>() }
237 )),
238
239 }
240 }
241 }
242
243 #[derive(Debug, PartialEq)]
244 #[repr(C)]
245 pub struct DictionaryRef {
246 pub token: ::fidl_next::fuchsia::zx::EventPair,
247 }
248
249 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryRef, ___E> for DictionaryRef
250 where
251 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
252 ___E: ::fidl_next::fuchsia::HandleEncoder,
253 {
254 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::DictionaryRef> = unsafe {
255 ::fidl_next::CopyOptimization::enable_if(
256 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
257 ::fidl_next::wire::fuchsia::EventPair,
258 ___E,
259 >>::COPY_OPTIMIZATION
260 .is_enabled(),
261 )
262 };
263
264 #[inline]
265 fn encode(
266 self,
267 encoder_: &mut ___E,
268 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRef>,
269 _: (),
270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
271 ::fidl_next::munge! {
272 let crate::wire::DictionaryRef {
273 token,
274
275 } = out_;
276 }
277
278 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
279
280 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
281
282 Ok(())
283 }
284 }
285
286 unsafe impl<___E>
287 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::DictionaryRef>, ___E>
288 for DictionaryRef
289 where
290 ___E: ::fidl_next::Encoder + ?Sized,
291 DictionaryRef: ::fidl_next::Encode<crate::wire::DictionaryRef, ___E>,
292 {
293 #[inline]
294 fn encode_option(
295 this: ::core::option::Option<Self>,
296 encoder: &mut ___E,
297 out: &mut ::core::mem::MaybeUninit<
298 ::fidl_next::wire::Box<'static, crate::wire::DictionaryRef>,
299 >,
300 _: (),
301 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
302 if let Some(inner) = this {
303 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
304 ::fidl_next::wire::Box::encode_present(out);
305 } else {
306 ::fidl_next::wire::Box::encode_absent(out);
307 }
308
309 Ok(())
310 }
311 }
312
313 impl ::fidl_next::FromWire<crate::wire::DictionaryRef> for DictionaryRef {
314 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DictionaryRef, Self> = unsafe {
315 ::fidl_next::CopyOptimization::enable_if(
316 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
317 ::fidl_next::wire::fuchsia::EventPair,
318 >>::COPY_OPTIMIZATION
319 .is_enabled(),
320 )
321 };
322
323 #[inline]
324 fn from_wire(wire: crate::wire::DictionaryRef) -> Self {
325 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
326 }
327 }
328
329 #[derive(Debug, PartialEq)]
330 #[repr(C)]
331 pub struct Connector {
332 pub token: ::fidl_next::fuchsia::zx::EventPair,
333 }
334
335 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Connector, ___E> for Connector
336 where
337 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
338 ___E: ::fidl_next::fuchsia::HandleEncoder,
339 {
340 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Connector> = unsafe {
341 ::fidl_next::CopyOptimization::enable_if(
342 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
343 ::fidl_next::wire::fuchsia::EventPair,
344 ___E,
345 >>::COPY_OPTIMIZATION
346 .is_enabled(),
347 )
348 };
349
350 #[inline]
351 fn encode(
352 self,
353 encoder_: &mut ___E,
354 out_: &mut ::core::mem::MaybeUninit<crate::wire::Connector>,
355 _: (),
356 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
357 ::fidl_next::munge! {
358 let crate::wire::Connector {
359 token,
360
361 } = out_;
362 }
363
364 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
365
366 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
367
368 Ok(())
369 }
370 }
371
372 unsafe impl<___E>
373 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Connector>, ___E>
374 for Connector
375 where
376 ___E: ::fidl_next::Encoder + ?Sized,
377 Connector: ::fidl_next::Encode<crate::wire::Connector, ___E>,
378 {
379 #[inline]
380 fn encode_option(
381 this: ::core::option::Option<Self>,
382 encoder: &mut ___E,
383 out: &mut ::core::mem::MaybeUninit<
384 ::fidl_next::wire::Box<'static, crate::wire::Connector>,
385 >,
386 _: (),
387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
388 if let Some(inner) = this {
389 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
390 ::fidl_next::wire::Box::encode_present(out);
391 } else {
392 ::fidl_next::wire::Box::encode_absent(out);
393 }
394
395 Ok(())
396 }
397 }
398
399 impl ::fidl_next::FromWire<crate::wire::Connector> for Connector {
400 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Connector, Self> = unsafe {
401 ::fidl_next::CopyOptimization::enable_if(
402 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
403 ::fidl_next::wire::fuchsia::EventPair,
404 >>::COPY_OPTIMIZATION
405 .is_enabled(),
406 )
407 };
408
409 #[inline]
410 fn from_wire(wire: crate::wire::Connector) -> Self {
411 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
412 }
413 }
414
415 #[derive(Debug, PartialEq)]
416 #[repr(C)]
417 pub struct DirEntry {
418 pub token: ::fidl_next::fuchsia::zx::EventPair,
419 }
420
421 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirEntry, ___E> for DirEntry
422 where
423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
424 ___E: ::fidl_next::fuchsia::HandleEncoder,
425 {
426 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::DirEntry> = unsafe {
427 ::fidl_next::CopyOptimization::enable_if(
428 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
429 ::fidl_next::wire::fuchsia::EventPair,
430 ___E,
431 >>::COPY_OPTIMIZATION
432 .is_enabled(),
433 )
434 };
435
436 #[inline]
437 fn encode(
438 self,
439 encoder_: &mut ___E,
440 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirEntry>,
441 _: (),
442 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
443 ::fidl_next::munge! {
444 let crate::wire::DirEntry {
445 token,
446
447 } = out_;
448 }
449
450 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
451
452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
453
454 Ok(())
455 }
456 }
457
458 unsafe impl<___E>
459 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::DirEntry>, ___E>
460 for DirEntry
461 where
462 ___E: ::fidl_next::Encoder + ?Sized,
463 DirEntry: ::fidl_next::Encode<crate::wire::DirEntry, ___E>,
464 {
465 #[inline]
466 fn encode_option(
467 this: ::core::option::Option<Self>,
468 encoder: &mut ___E,
469 out: &mut ::core::mem::MaybeUninit<
470 ::fidl_next::wire::Box<'static, crate::wire::DirEntry>,
471 >,
472 _: (),
473 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
474 if let Some(inner) = this {
475 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
476 ::fidl_next::wire::Box::encode_present(out);
477 } else {
478 ::fidl_next::wire::Box::encode_absent(out);
479 }
480
481 Ok(())
482 }
483 }
484
485 impl ::fidl_next::FromWire<crate::wire::DirEntry> for DirEntry {
486 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DirEntry, Self> = unsafe {
487 ::fidl_next::CopyOptimization::enable_if(
488 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
489 ::fidl_next::wire::fuchsia::EventPair,
490 >>::COPY_OPTIMIZATION
491 .is_enabled(),
492 )
493 };
494
495 #[inline]
496 fn from_wire(wire: crate::wire::DirEntry) -> Self {
497 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
498 }
499 }
500
501 #[derive(Debug, PartialEq)]
502 pub enum Capability {
503 Unit(crate::natural::Unit),
504
505 Handle(::fidl_next::fuchsia::zx::NullableHandle),
506
507 Data(crate::natural::Data),
508
509 Dictionary(crate::natural::DictionaryRef),
510
511 Connector(crate::natural::Connector),
512
513 DirConnector(crate::natural::DirConnector),
514
515 Directory(
516 ::fidl_next::ClientEnd<
517 ::fidl_next_fuchsia_io::Directory,
518 ::fidl_next::fuchsia::zx::Channel,
519 >,
520 ),
521
522 DirEntry(crate::natural::DirEntry),
523
524 ConnectorRouter(
525 ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
526 ),
527
528 DictionaryRouter(
529 ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::zx::Channel>,
530 ),
531
532 DirEntryRouter(
533 ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::zx::Channel>,
534 ),
535
536 DataRouter(::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::zx::Channel>),
537
538 DirConnectorRouter(
539 ::fidl_next::ClientEnd<crate::DirConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
540 ),
541
542 UnknownOrdinal_(u64),
543 }
544
545 impl Capability {
546 pub fn is_unknown(&self) -> bool {
547 #[allow(unreachable_patterns)]
548 match self {
549 Self::UnknownOrdinal_(_) => true,
550 _ => false,
551 }
552 }
553 }
554
555 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Capability<'static>, ___E> for Capability
556 where
557 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
558 ___E: ::fidl_next::Encoder,
559 ___E: ::fidl_next::fuchsia::HandleEncoder,
560 {
561 #[inline]
562 fn encode(
563 self,
564 encoder: &mut ___E,
565 out: &mut ::core::mem::MaybeUninit<crate::wire::Capability<'static>>,
566 _: (),
567 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
568 ::fidl_next::munge!(let crate::wire::Capability { raw, _phantom: _ } = out);
569
570 match self {
571 Self::Unit(value) => {
572 ::fidl_next::wire::Union::encode_as::<___E, crate::wire::Unit>(
573 value,
574 1,
575 encoder,
576 raw,
577 (),
578 )?
579 }
580
581 Self::Handle(value) => ::fidl_next::wire::Union::encode_as::<
582 ___E,
583 ::fidl_next::wire::fuchsia::NullableHandle,
584 >(value, 2, encoder, raw, ())?,
585
586 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
587 ___E,
588 crate::wire::Data<'static>,
589 >(value, 3, encoder, raw, ())?,
590
591 Self::Dictionary(value) => ::fidl_next::wire::Union::encode_as::<
592 ___E,
593 crate::wire::DictionaryRef,
594 >(value, 4, encoder, raw, ())?,
595
596 Self::Connector(value) => ::fidl_next::wire::Union::encode_as::<
597 ___E,
598 crate::wire::Connector,
599 >(value, 5, encoder, raw, ())?,
600
601 Self::DirConnector(value) => ::fidl_next::wire::Union::encode_as::<
602 ___E,
603 crate::wire::DirConnector,
604 >(value, 6, encoder, raw, ())?,
605
606 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
607 ___E,
608 ::fidl_next::ClientEnd<
609 ::fidl_next_fuchsia_io::Directory,
610 ::fidl_next::wire::fuchsia::Channel,
611 >,
612 >(value, 7, encoder, raw, ())?,
613
614 Self::DirEntry(value) => ::fidl_next::wire::Union::encode_as::<
615 ___E,
616 crate::wire::DirEntry,
617 >(value, 8, encoder, raw, ())?,
618
619 Self::ConnectorRouter(value) => ::fidl_next::wire::Union::encode_as::<
620 ___E,
621 ::fidl_next::ClientEnd<
622 crate::ConnectorRouter,
623 ::fidl_next::wire::fuchsia::Channel,
624 >,
625 >(value, 9, encoder, raw, ())?,
626
627 Self::DictionaryRouter(value) => ::fidl_next::wire::Union::encode_as::<
628 ___E,
629 ::fidl_next::ClientEnd<
630 crate::DictionaryRouter,
631 ::fidl_next::wire::fuchsia::Channel,
632 >,
633 >(value, 10, encoder, raw, ())?,
634
635 Self::DirEntryRouter(value) => ::fidl_next::wire::Union::encode_as::<
636 ___E,
637 ::fidl_next::ClientEnd<
638 crate::DirEntryRouter,
639 ::fidl_next::wire::fuchsia::Channel,
640 >,
641 >(value, 11, encoder, raw, ())?,
642
643 Self::DataRouter(value) => ::fidl_next::wire::Union::encode_as::<
644 ___E,
645 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
646 >(value, 12, encoder, raw, ())?,
647
648 Self::DirConnectorRouter(value) => ::fidl_next::wire::Union::encode_as::<
649 ___E,
650 ::fidl_next::ClientEnd<
651 crate::DirConnectorRouter,
652 ::fidl_next::wire::fuchsia::Channel,
653 >,
654 >(value, 13, encoder, raw, ())?,
655
656 Self::UnknownOrdinal_(ordinal) => {
657 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
658 }
659 }
660
661 Ok(())
662 }
663 }
664
665 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Capability<'static>, ___E>
666 for Capability
667 where
668 ___E: ?Sized,
669 Capability: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
670 {
671 #[inline]
672 fn encode_option(
673 this: ::core::option::Option<Self>,
674 encoder: &mut ___E,
675 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Capability<'static>>,
676 _: (),
677 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
678 ::fidl_next::munge!(let crate::wire_optional::Capability { raw, _phantom: _ } = &mut *out);
679
680 if let Some(inner) = this {
681 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
682 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
683 } else {
684 ::fidl_next::wire::Union::encode_absent(raw);
685 }
686
687 Ok(())
688 }
689 }
690
691 impl<'de> ::fidl_next::FromWire<crate::wire::Capability<'de>> for Capability {
692 #[inline]
693 fn from_wire(wire: crate::wire::Capability<'de>) -> Self {
694 let wire = ::core::mem::ManuallyDrop::new(wire);
695 match wire.raw.ordinal() {
696 1 => Self::Unit(::fidl_next::FromWire::from_wire(unsafe {
697 wire.raw.get().read_unchecked::<crate::wire::Unit>()
698 })),
699
700 2 => Self::Handle(::fidl_next::FromWire::from_wire(unsafe {
701 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
702 })),
703
704 3 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
705 wire.raw.get().read_unchecked::<crate::wire::Data<'de>>()
706 })),
707
708 4 => Self::Dictionary(::fidl_next::FromWire::from_wire(unsafe {
709 wire.raw.get().read_unchecked::<crate::wire::DictionaryRef>()
710 })),
711
712 5 => Self::Connector(::fidl_next::FromWire::from_wire(unsafe {
713 wire.raw.get().read_unchecked::<crate::wire::Connector>()
714 })),
715
716 6 => Self::DirConnector(::fidl_next::FromWire::from_wire(unsafe {
717 wire.raw.get().read_unchecked::<crate::wire::DirConnector>()
718 })),
719
720 7 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
721 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
722 ::fidl_next_fuchsia_io::Directory,
723 ::fidl_next::wire::fuchsia::Channel,
724 >>()
725 })),
726
727 8 => Self::DirEntry(::fidl_next::FromWire::from_wire(unsafe {
728 wire.raw.get().read_unchecked::<crate::wire::DirEntry>()
729 })),
730
731 9 => Self::ConnectorRouter(::fidl_next::FromWire::from_wire(unsafe {
732 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
733 crate::ConnectorRouter,
734 ::fidl_next::wire::fuchsia::Channel,
735 >>()
736 })),
737
738 10 => Self::DictionaryRouter(::fidl_next::FromWire::from_wire(unsafe {
739 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
740 crate::DictionaryRouter,
741 ::fidl_next::wire::fuchsia::Channel,
742 >>()
743 })),
744
745 11 => Self::DirEntryRouter(::fidl_next::FromWire::from_wire(unsafe {
746 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
747 crate::DirEntryRouter,
748 ::fidl_next::wire::fuchsia::Channel,
749 >>()
750 })),
751
752 12 => Self::DataRouter(::fidl_next::FromWire::from_wire(unsafe {
753 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
754 crate::DataRouter,
755 ::fidl_next::wire::fuchsia::Channel,
756 >>()
757 })),
758
759 13 => Self::DirConnectorRouter(::fidl_next::FromWire::from_wire(unsafe {
760 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
761 crate::DirConnectorRouter,
762 ::fidl_next::wire::fuchsia::Channel,
763 >>()
764 })),
765
766 ord => return Self::UnknownOrdinal_(ord as u64),
767 }
768 }
769 }
770
771 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Capability<'de>> for Capability {
772 #[inline]
773 fn from_wire_option(
774 wire: crate::wire_optional::Capability<'de>,
775 ) -> ::core::option::Option<Self> {
776 if let Some(inner) = wire.into_option() {
777 Some(::fidl_next::FromWire::from_wire(inner))
778 } else {
779 None
780 }
781 }
782 }
783
784 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Capability<'de>> for Box<Capability> {
785 #[inline]
786 fn from_wire_option(
787 wire: crate::wire_optional::Capability<'de>,
788 ) -> ::core::option::Option<Self> {
789 <
790 Capability as ::fidl_next::FromWireOption<crate::wire_optional::Capability<'de>>
791 >::from_wire_option(wire).map(Box::new)
792 }
793 }
794
795 #[derive(Debug, PartialEq)]
796 pub struct CapabilityStoreConnectorCreateRequest {
797 pub id: u64,
798
799 pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::fuchsia::zx::Channel>,
800 }
801
802 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>
803 for CapabilityStoreConnectorCreateRequest
804 where
805 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
806 ___E: ::fidl_next::fuchsia::HandleEncoder,
807 {
808 #[inline]
809 fn encode(
810 self,
811 encoder_: &mut ___E,
812 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorCreateRequest>,
813 _: (),
814 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
815 ::fidl_next::munge! {
816 let crate::wire::CapabilityStoreConnectorCreateRequest {
817 id,
818 receiver,
819
820 } = out_;
821 }
822
823 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
824
825 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
826
827 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
828
829 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(receiver.as_mut_ptr()) };
830
831 Ok(())
832 }
833 }
834
835 unsafe impl<___E>
836 ::fidl_next::EncodeOption<
837 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorCreateRequest>,
838 ___E,
839 > for CapabilityStoreConnectorCreateRequest
840 where
841 ___E: ::fidl_next::Encoder + ?Sized,
842 CapabilityStoreConnectorCreateRequest:
843 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>,
844 {
845 #[inline]
846 fn encode_option(
847 this: ::core::option::Option<Self>,
848 encoder: &mut ___E,
849 out: &mut ::core::mem::MaybeUninit<
850 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorCreateRequest>,
851 >,
852 _: (),
853 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
854 if let Some(inner) = this {
855 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
856 ::fidl_next::wire::Box::encode_present(out);
857 } else {
858 ::fidl_next::wire::Box::encode_absent(out);
859 }
860
861 Ok(())
862 }
863 }
864
865 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreConnectorCreateRequest>
866 for CapabilityStoreConnectorCreateRequest
867 {
868 #[inline]
869 fn from_wire(wire: crate::wire::CapabilityStoreConnectorCreateRequest) -> Self {
870 Self {
871 id: ::fidl_next::FromWire::from_wire(wire.id),
872
873 receiver: ::fidl_next::FromWire::from_wire(wire.receiver),
874 }
875 }
876 }
877
878 #[derive(Debug, PartialEq)]
879 pub struct CapabilityStoreConnectorOpenRequest {
880 pub id: u64,
881
882 pub server_end: ::fidl_next::fuchsia::zx::Channel,
883 }
884
885 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>
886 for CapabilityStoreConnectorOpenRequest
887 where
888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
889 ___E: ::fidl_next::fuchsia::HandleEncoder,
890 {
891 #[inline]
892 fn encode(
893 self,
894 encoder_: &mut ___E,
895 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorOpenRequest>,
896 _: (),
897 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
898 ::fidl_next::munge! {
899 let crate::wire::CapabilityStoreConnectorOpenRequest {
900 id,
901 server_end,
902
903 } = out_;
904 }
905
906 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
907
908 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
909
910 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
911
912 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
913
914 Ok(())
915 }
916 }
917
918 unsafe impl<___E>
919 ::fidl_next::EncodeOption<
920 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorOpenRequest>,
921 ___E,
922 > for CapabilityStoreConnectorOpenRequest
923 where
924 ___E: ::fidl_next::Encoder + ?Sized,
925 CapabilityStoreConnectorOpenRequest:
926 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>,
927 {
928 #[inline]
929 fn encode_option(
930 this: ::core::option::Option<Self>,
931 encoder: &mut ___E,
932 out: &mut ::core::mem::MaybeUninit<
933 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorOpenRequest>,
934 >,
935 _: (),
936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
937 if let Some(inner) = this {
938 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
939 ::fidl_next::wire::Box::encode_present(out);
940 } else {
941 ::fidl_next::wire::Box::encode_absent(out);
942 }
943
944 Ok(())
945 }
946 }
947
948 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreConnectorOpenRequest>
949 for CapabilityStoreConnectorOpenRequest
950 {
951 #[inline]
952 fn from_wire(wire: crate::wire::CapabilityStoreConnectorOpenRequest) -> Self {
953 Self {
954 id: ::fidl_next::FromWire::from_wire(wire.id),
955
956 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
957 }
958 }
959 }
960
961 #[derive(Debug, PartialEq)]
962 pub struct CapabilityStoreDirConnectorCreateRequest {
963 pub id: u64,
964
965 pub receiver: ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::fuchsia::zx::Channel>,
966 }
967
968 unsafe impl<___E>
969 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>
970 for CapabilityStoreDirConnectorCreateRequest
971 where
972 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
973 ___E: ::fidl_next::fuchsia::HandleEncoder,
974 {
975 #[inline]
976 fn encode(
977 self,
978 encoder_: &mut ___E,
979 out_: &mut ::core::mem::MaybeUninit<
980 crate::wire::CapabilityStoreDirConnectorCreateRequest,
981 >,
982 _: (),
983 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
984 ::fidl_next::munge! {
985 let crate::wire::CapabilityStoreDirConnectorCreateRequest {
986 id,
987 receiver,
988
989 } = out_;
990 }
991
992 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
993
994 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
995
996 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
997
998 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(receiver.as_mut_ptr()) };
999
1000 Ok(())
1001 }
1002 }
1003
1004 unsafe impl<___E>
1005 ::fidl_next::EncodeOption<
1006 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDirConnectorCreateRequest>,
1007 ___E,
1008 > for CapabilityStoreDirConnectorCreateRequest
1009 where
1010 ___E: ::fidl_next::Encoder + ?Sized,
1011 CapabilityStoreDirConnectorCreateRequest:
1012 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>,
1013 {
1014 #[inline]
1015 fn encode_option(
1016 this: ::core::option::Option<Self>,
1017 encoder: &mut ___E,
1018 out: &mut ::core::mem::MaybeUninit<
1019 ::fidl_next::wire::Box<
1020 'static,
1021 crate::wire::CapabilityStoreDirConnectorCreateRequest,
1022 >,
1023 >,
1024 _: (),
1025 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1026 if let Some(inner) = this {
1027 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1028 ::fidl_next::wire::Box::encode_present(out);
1029 } else {
1030 ::fidl_next::wire::Box::encode_absent(out);
1031 }
1032
1033 Ok(())
1034 }
1035 }
1036
1037 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDirConnectorCreateRequest>
1038 for CapabilityStoreDirConnectorCreateRequest
1039 {
1040 #[inline]
1041 fn from_wire(wire: crate::wire::CapabilityStoreDirConnectorCreateRequest) -> Self {
1042 Self {
1043 id: ::fidl_next::FromWire::from_wire(wire.id),
1044
1045 receiver: ::fidl_next::FromWire::from_wire(wire.receiver),
1046 }
1047 }
1048 }
1049
1050 #[derive(Debug, PartialEq)]
1051 pub struct CapabilityStoreDictionaryLegacyImportRequest {
1052 pub id: u64,
1053
1054 pub client_end: ::fidl_next::fuchsia::zx::Channel,
1055 }
1056
1057 unsafe impl<___E>
1058 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>
1059 for CapabilityStoreDictionaryLegacyImportRequest
1060 where
1061 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1062 ___E: ::fidl_next::fuchsia::HandleEncoder,
1063 {
1064 #[inline]
1065 fn encode(
1066 self,
1067 encoder_: &mut ___E,
1068 out_: &mut ::core::mem::MaybeUninit<
1069 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
1070 >,
1071 _: (),
1072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1073 ::fidl_next::munge! {
1074 let crate::wire::CapabilityStoreDictionaryLegacyImportRequest {
1075 id,
1076 client_end,
1077
1078 } = out_;
1079 }
1080
1081 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1082
1083 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1084
1085 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
1086
1087 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_end.as_mut_ptr()) };
1088
1089 Ok(())
1090 }
1091 }
1092
1093 unsafe impl<___E>
1094 ::fidl_next::EncodeOption<
1095 ::fidl_next::wire::Box<
1096 'static,
1097 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
1098 >,
1099 ___E,
1100 > for CapabilityStoreDictionaryLegacyImportRequest
1101 where
1102 ___E: ::fidl_next::Encoder + ?Sized,
1103 CapabilityStoreDictionaryLegacyImportRequest:
1104 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>,
1105 {
1106 #[inline]
1107 fn encode_option(
1108 this: ::core::option::Option<Self>,
1109 encoder: &mut ___E,
1110 out: &mut ::core::mem::MaybeUninit<
1111 ::fidl_next::wire::Box<
1112 'static,
1113 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
1114 >,
1115 >,
1116 _: (),
1117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1118 if let Some(inner) = this {
1119 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1120 ::fidl_next::wire::Box::encode_present(out);
1121 } else {
1122 ::fidl_next::wire::Box::encode_absent(out);
1123 }
1124
1125 Ok(())
1126 }
1127 }
1128
1129 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryLegacyImportRequest>
1130 for CapabilityStoreDictionaryLegacyImportRequest
1131 {
1132 #[inline]
1133 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryLegacyImportRequest) -> Self {
1134 Self {
1135 id: ::fidl_next::FromWire::from_wire(wire.id),
1136
1137 client_end: ::fidl_next::FromWire::from_wire(wire.client_end),
1138 }
1139 }
1140 }
1141
1142 #[derive(Debug, PartialEq)]
1143 pub struct CapabilityStoreDictionaryLegacyExportRequest {
1144 pub id: u64,
1145
1146 pub server_end: ::fidl_next::fuchsia::zx::Channel,
1147 }
1148
1149 unsafe impl<___E>
1150 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>
1151 for CapabilityStoreDictionaryLegacyExportRequest
1152 where
1153 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1154 ___E: ::fidl_next::fuchsia::HandleEncoder,
1155 {
1156 #[inline]
1157 fn encode(
1158 self,
1159 encoder_: &mut ___E,
1160 out_: &mut ::core::mem::MaybeUninit<
1161 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
1162 >,
1163 _: (),
1164 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1165 ::fidl_next::munge! {
1166 let crate::wire::CapabilityStoreDictionaryLegacyExportRequest {
1167 id,
1168 server_end,
1169
1170 } = out_;
1171 }
1172
1173 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1174
1175 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1176
1177 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
1178
1179 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
1180
1181 Ok(())
1182 }
1183 }
1184
1185 unsafe impl<___E>
1186 ::fidl_next::EncodeOption<
1187 ::fidl_next::wire::Box<
1188 'static,
1189 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
1190 >,
1191 ___E,
1192 > for CapabilityStoreDictionaryLegacyExportRequest
1193 where
1194 ___E: ::fidl_next::Encoder + ?Sized,
1195 CapabilityStoreDictionaryLegacyExportRequest:
1196 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>,
1197 {
1198 #[inline]
1199 fn encode_option(
1200 this: ::core::option::Option<Self>,
1201 encoder: &mut ___E,
1202 out: &mut ::core::mem::MaybeUninit<
1203 ::fidl_next::wire::Box<
1204 'static,
1205 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
1206 >,
1207 >,
1208 _: (),
1209 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1210 if let Some(inner) = this {
1211 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1212 ::fidl_next::wire::Box::encode_present(out);
1213 } else {
1214 ::fidl_next::wire::Box::encode_absent(out);
1215 }
1216
1217 Ok(())
1218 }
1219 }
1220
1221 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryLegacyExportRequest>
1222 for CapabilityStoreDictionaryLegacyExportRequest
1223 {
1224 #[inline]
1225 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryLegacyExportRequest) -> Self {
1226 Self {
1227 id: ::fidl_next::FromWire::from_wire(wire.id),
1228
1229 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
1230 }
1231 }
1232 }
1233
1234 #[derive(Debug, PartialEq)]
1235 pub struct CapabilityStoreDictionaryKeysRequest {
1236 pub id: u64,
1237
1238 pub iterator: ::fidl_next::ServerEnd<
1239 crate::DictionaryKeysIterator,
1240 ::fidl_next::fuchsia::zx::Channel,
1241 >,
1242 }
1243
1244 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>
1245 for CapabilityStoreDictionaryKeysRequest
1246 where
1247 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1248 ___E: ::fidl_next::fuchsia::HandleEncoder,
1249 {
1250 #[inline]
1251 fn encode(
1252 self,
1253 encoder_: &mut ___E,
1254 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryKeysRequest>,
1255 _: (),
1256 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1257 ::fidl_next::munge! {
1258 let crate::wire::CapabilityStoreDictionaryKeysRequest {
1259 id,
1260 iterator,
1261
1262 } = out_;
1263 }
1264
1265 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1266
1267 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1268
1269 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1270
1271 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
1272
1273 Ok(())
1274 }
1275 }
1276
1277 unsafe impl<___E>
1278 ::fidl_next::EncodeOption<
1279 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryKeysRequest>,
1280 ___E,
1281 > for CapabilityStoreDictionaryKeysRequest
1282 where
1283 ___E: ::fidl_next::Encoder + ?Sized,
1284 CapabilityStoreDictionaryKeysRequest:
1285 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>,
1286 {
1287 #[inline]
1288 fn encode_option(
1289 this: ::core::option::Option<Self>,
1290 encoder: &mut ___E,
1291 out: &mut ::core::mem::MaybeUninit<
1292 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryKeysRequest>,
1293 >,
1294 _: (),
1295 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1296 if let Some(inner) = this {
1297 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1298 ::fidl_next::wire::Box::encode_present(out);
1299 } else {
1300 ::fidl_next::wire::Box::encode_absent(out);
1301 }
1302
1303 Ok(())
1304 }
1305 }
1306
1307 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryKeysRequest>
1308 for CapabilityStoreDictionaryKeysRequest
1309 {
1310 #[inline]
1311 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryKeysRequest) -> Self {
1312 Self {
1313 id: ::fidl_next::FromWire::from_wire(wire.id),
1314
1315 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
1316 }
1317 }
1318 }
1319
1320 #[derive(Debug, PartialEq)]
1321 pub struct CapabilityStoreDictionaryEnumerateRequest {
1322 pub id: u64,
1323
1324 pub iterator: ::fidl_next::ServerEnd<
1325 crate::DictionaryEnumerateIterator,
1326 ::fidl_next::fuchsia::zx::Channel,
1327 >,
1328 }
1329
1330 unsafe impl<___E>
1331 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>
1332 for CapabilityStoreDictionaryEnumerateRequest
1333 where
1334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1335 ___E: ::fidl_next::fuchsia::HandleEncoder,
1336 {
1337 #[inline]
1338 fn encode(
1339 self,
1340 encoder_: &mut ___E,
1341 out_: &mut ::core::mem::MaybeUninit<
1342 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
1343 >,
1344 _: (),
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 ::fidl_next::munge! {
1347 let crate::wire::CapabilityStoreDictionaryEnumerateRequest {
1348 id,
1349 iterator,
1350
1351 } = out_;
1352 }
1353
1354 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1355
1356 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1357
1358 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1359
1360 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
1361
1362 Ok(())
1363 }
1364 }
1365
1366 unsafe impl<___E>
1367 ::fidl_next::EncodeOption<
1368 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryEnumerateRequest>,
1369 ___E,
1370 > for CapabilityStoreDictionaryEnumerateRequest
1371 where
1372 ___E: ::fidl_next::Encoder + ?Sized,
1373 CapabilityStoreDictionaryEnumerateRequest:
1374 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>,
1375 {
1376 #[inline]
1377 fn encode_option(
1378 this: ::core::option::Option<Self>,
1379 encoder: &mut ___E,
1380 out: &mut ::core::mem::MaybeUninit<
1381 ::fidl_next::wire::Box<
1382 'static,
1383 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
1384 >,
1385 >,
1386 _: (),
1387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1388 if let Some(inner) = this {
1389 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1390 ::fidl_next::wire::Box::encode_present(out);
1391 } else {
1392 ::fidl_next::wire::Box::encode_absent(out);
1393 }
1394
1395 Ok(())
1396 }
1397 }
1398
1399 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryEnumerateRequest>
1400 for CapabilityStoreDictionaryEnumerateRequest
1401 {
1402 #[inline]
1403 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryEnumerateRequest) -> Self {
1404 Self {
1405 id: ::fidl_next::FromWire::from_wire(wire.id),
1406
1407 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
1408 }
1409 }
1410 }
1411
1412 #[derive(Debug, PartialEq)]
1413 pub struct CapabilityStoreDictionaryDrainRequest {
1414 pub id: u64,
1415
1416 pub iterator: ::core::option::Option<
1417 ::fidl_next::ServerEnd<
1418 crate::DictionaryDrainIterator,
1419 ::fidl_next::fuchsia::zx::Channel,
1420 >,
1421 >,
1422 }
1423
1424 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>
1425 for CapabilityStoreDictionaryDrainRequest
1426 where
1427 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1428 ___E: ::fidl_next::fuchsia::HandleEncoder,
1429 {
1430 #[inline]
1431 fn encode(
1432 self,
1433 encoder_: &mut ___E,
1434 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryDrainRequest>,
1435 _: (),
1436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1437 ::fidl_next::munge! {
1438 let crate::wire::CapabilityStoreDictionaryDrainRequest {
1439 id,
1440 iterator,
1441
1442 } = out_;
1443 }
1444
1445 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1446
1447 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1448
1449 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1450
1451 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
1452
1453 Ok(())
1454 }
1455 }
1456
1457 unsafe impl<___E>
1458 ::fidl_next::EncodeOption<
1459 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryDrainRequest>,
1460 ___E,
1461 > for CapabilityStoreDictionaryDrainRequest
1462 where
1463 ___E: ::fidl_next::Encoder + ?Sized,
1464 CapabilityStoreDictionaryDrainRequest:
1465 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>,
1466 {
1467 #[inline]
1468 fn encode_option(
1469 this: ::core::option::Option<Self>,
1470 encoder: &mut ___E,
1471 out: &mut ::core::mem::MaybeUninit<
1472 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryDrainRequest>,
1473 >,
1474 _: (),
1475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1476 if let Some(inner) = this {
1477 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1478 ::fidl_next::wire::Box::encode_present(out);
1479 } else {
1480 ::fidl_next::wire::Box::encode_absent(out);
1481 }
1482
1483 Ok(())
1484 }
1485 }
1486
1487 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryDrainRequest>
1488 for CapabilityStoreDictionaryDrainRequest
1489 {
1490 #[inline]
1491 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryDrainRequest) -> Self {
1492 Self {
1493 id: ::fidl_next::FromWire::from_wire(wire.id),
1494
1495 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
1496 }
1497 }
1498 }
1499
1500 #[derive(Debug, PartialEq)]
1501 pub struct CapabilityStoreCreateServiceAggregateRequest {
1502 pub sources: ::std::vec::Vec<crate::natural::AggregateSource>,
1503 }
1504
1505 unsafe impl<___E>
1506 ::fidl_next::Encode<
1507 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1508 ___E,
1509 > for CapabilityStoreCreateServiceAggregateRequest
1510 where
1511 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1512 ___E: ::fidl_next::Encoder,
1513 ___E: ::fidl_next::fuchsia::HandleEncoder,
1514 {
1515 #[inline]
1516 fn encode(
1517 self,
1518 encoder_: &mut ___E,
1519 out_: &mut ::core::mem::MaybeUninit<
1520 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1521 >,
1522 _: (),
1523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1524 ::fidl_next::munge! {
1525 let crate::wire::CapabilityStoreCreateServiceAggregateRequest {
1526 sources,
1527
1528 } = out_;
1529 }
1530
1531 ::fidl_next::Encode::encode(self.sources, encoder_, sources, (4294967295, ()))?;
1532
1533 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sources.as_mut_ptr()) };
1534 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1535
1536 Ok(())
1537 }
1538 }
1539
1540 unsafe impl<___E>
1541 ::fidl_next::EncodeOption<
1542 ::fidl_next::wire::Box<
1543 'static,
1544 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1545 >,
1546 ___E,
1547 > for CapabilityStoreCreateServiceAggregateRequest
1548 where
1549 ___E: ::fidl_next::Encoder + ?Sized,
1550 CapabilityStoreCreateServiceAggregateRequest: ::fidl_next::Encode<
1551 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1552 ___E,
1553 >,
1554 {
1555 #[inline]
1556 fn encode_option(
1557 this: ::core::option::Option<Self>,
1558 encoder: &mut ___E,
1559 out: &mut ::core::mem::MaybeUninit<
1560 ::fidl_next::wire::Box<
1561 'static,
1562 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1563 >,
1564 >,
1565 _: (),
1566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1567 if let Some(inner) = this {
1568 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1569 ::fidl_next::wire::Box::encode_present(out);
1570 } else {
1571 ::fidl_next::wire::Box::encode_absent(out);
1572 }
1573
1574 Ok(())
1575 }
1576 }
1577
1578 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>>
1579 for CapabilityStoreCreateServiceAggregateRequest
1580 {
1581 #[inline]
1582 fn from_wire(wire: crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>) -> Self {
1583 Self { sources: ::fidl_next::FromWire::from_wire(wire.sources) }
1584 }
1585 }
1586
1587 #[derive(Debug, PartialEq)]
1588 #[repr(C)]
1589 pub struct CapabilityStoreCreateServiceAggregateResponse {
1590 pub aggregate_dir_connector: crate::natural::DirConnector,
1591 }
1592
1593 unsafe impl<___E>
1594 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>
1595 for CapabilityStoreCreateServiceAggregateResponse
1596 where
1597 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1598 ___E: ::fidl_next::fuchsia::HandleEncoder,
1599 {
1600 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1601 Self,
1602 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1603 > = unsafe {
1604 ::fidl_next::CopyOptimization::enable_if(
1605 true && <crate::natural::DirConnector as ::fidl_next::Encode<
1606 crate::wire::DirConnector,
1607 ___E,
1608 >>::COPY_OPTIMIZATION
1609 .is_enabled(),
1610 )
1611 };
1612
1613 #[inline]
1614 fn encode(
1615 self,
1616 encoder_: &mut ___E,
1617 out_: &mut ::core::mem::MaybeUninit<
1618 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1619 >,
1620 _: (),
1621 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1622 ::fidl_next::munge! {
1623 let crate::wire::CapabilityStoreCreateServiceAggregateResponse {
1624 aggregate_dir_connector,
1625
1626 } = out_;
1627 }
1628
1629 ::fidl_next::Encode::encode(
1630 self.aggregate_dir_connector,
1631 encoder_,
1632 aggregate_dir_connector,
1633 (),
1634 )?;
1635
1636 let mut _field =
1637 unsafe { ::fidl_next::Slot::new_unchecked(aggregate_dir_connector.as_mut_ptr()) };
1638
1639 Ok(())
1640 }
1641 }
1642
1643 unsafe impl<___E>
1644 ::fidl_next::EncodeOption<
1645 ::fidl_next::wire::Box<
1646 'static,
1647 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1648 >,
1649 ___E,
1650 > for CapabilityStoreCreateServiceAggregateResponse
1651 where
1652 ___E: ::fidl_next::Encoder + ?Sized,
1653 CapabilityStoreCreateServiceAggregateResponse:
1654 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>,
1655 {
1656 #[inline]
1657 fn encode_option(
1658 this: ::core::option::Option<Self>,
1659 encoder: &mut ___E,
1660 out: &mut ::core::mem::MaybeUninit<
1661 ::fidl_next::wire::Box<
1662 'static,
1663 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1664 >,
1665 >,
1666 _: (),
1667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1668 if let Some(inner) = this {
1669 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1670 ::fidl_next::wire::Box::encode_present(out);
1671 } else {
1672 ::fidl_next::wire::Box::encode_absent(out);
1673 }
1674
1675 Ok(())
1676 }
1677 }
1678
1679 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreCreateServiceAggregateResponse>
1680 for CapabilityStoreCreateServiceAggregateResponse
1681 {
1682 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1683 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1684 Self,
1685 > = unsafe {
1686 ::fidl_next::CopyOptimization::enable_if(
1687 true && <crate::natural::DirConnector as ::fidl_next::FromWire<
1688 crate::wire::DirConnector,
1689 >>::COPY_OPTIMIZATION
1690 .is_enabled(),
1691 )
1692 };
1693
1694 #[inline]
1695 fn from_wire(wire: crate::wire::CapabilityStoreCreateServiceAggregateResponse) -> Self {
1696 Self {
1697 aggregate_dir_connector: ::fidl_next::FromWire::from_wire(
1698 wire.aggregate_dir_connector,
1699 ),
1700 }
1701 }
1702 }
1703
1704 #[derive(Debug, PartialEq)]
1705 pub struct CapabilityStoreExportResponse {
1706 pub capability: crate::natural::Capability,
1707 }
1708
1709 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>
1710 for CapabilityStoreExportResponse
1711 where
1712 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1713 ___E: ::fidl_next::Encoder,
1714 ___E: ::fidl_next::fuchsia::HandleEncoder,
1715 {
1716 #[inline]
1717 fn encode(
1718 self,
1719 encoder_: &mut ___E,
1720 out_: &mut ::core::mem::MaybeUninit<
1721 crate::wire::CapabilityStoreExportResponse<'static>,
1722 >,
1723 _: (),
1724 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1725 ::fidl_next::munge! {
1726 let crate::wire::CapabilityStoreExportResponse {
1727 capability,
1728
1729 } = out_;
1730 }
1731
1732 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
1733
1734 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(capability.as_mut_ptr()) };
1735
1736 Ok(())
1737 }
1738 }
1739
1740 unsafe impl<___E>
1741 ::fidl_next::EncodeOption<
1742 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreExportResponse<'static>>,
1743 ___E,
1744 > for CapabilityStoreExportResponse
1745 where
1746 ___E: ::fidl_next::Encoder + ?Sized,
1747 CapabilityStoreExportResponse:
1748 ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>,
1749 {
1750 #[inline]
1751 fn encode_option(
1752 this: ::core::option::Option<Self>,
1753 encoder: &mut ___E,
1754 out: &mut ::core::mem::MaybeUninit<
1755 ::fidl_next::wire::Box<
1756 'static,
1757 crate::wire::CapabilityStoreExportResponse<'static>,
1758 >,
1759 >,
1760 _: (),
1761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1762 if let Some(inner) = this {
1763 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1764 ::fidl_next::wire::Box::encode_present(out);
1765 } else {
1766 ::fidl_next::wire::Box::encode_absent(out);
1767 }
1768
1769 Ok(())
1770 }
1771 }
1772
1773 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreExportResponse<'de>>
1774 for CapabilityStoreExportResponse
1775 {
1776 #[inline]
1777 fn from_wire(wire: crate::wire::CapabilityStoreExportResponse<'de>) -> Self {
1778 Self { capability: ::fidl_next::FromWire::from_wire(wire.capability) }
1779 }
1780 }
1781
1782 #[derive(Debug, PartialEq)]
1783 pub struct CapabilityStoreImportRequest {
1784 pub id: u64,
1785
1786 pub capability: crate::natural::Capability,
1787 }
1788
1789 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>
1790 for CapabilityStoreImportRequest
1791 where
1792 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1793 ___E: ::fidl_next::Encoder,
1794 ___E: ::fidl_next::fuchsia::HandleEncoder,
1795 {
1796 #[inline]
1797 fn encode(
1798 self,
1799 encoder_: &mut ___E,
1800 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreImportRequest<'static>>,
1801 _: (),
1802 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1803 ::fidl_next::munge! {
1804 let crate::wire::CapabilityStoreImportRequest {
1805 id,
1806 capability,
1807
1808 } = out_;
1809 }
1810
1811 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1812
1813 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1814
1815 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
1816
1817 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(capability.as_mut_ptr()) };
1818
1819 Ok(())
1820 }
1821 }
1822
1823 unsafe impl<___E>
1824 ::fidl_next::EncodeOption<
1825 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreImportRequest<'static>>,
1826 ___E,
1827 > for CapabilityStoreImportRequest
1828 where
1829 ___E: ::fidl_next::Encoder + ?Sized,
1830 CapabilityStoreImportRequest:
1831 ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>,
1832 {
1833 #[inline]
1834 fn encode_option(
1835 this: ::core::option::Option<Self>,
1836 encoder: &mut ___E,
1837 out: &mut ::core::mem::MaybeUninit<
1838 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreImportRequest<'static>>,
1839 >,
1840 _: (),
1841 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1842 if let Some(inner) = this {
1843 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1844 ::fidl_next::wire::Box::encode_present(out);
1845 } else {
1846 ::fidl_next::wire::Box::encode_absent(out);
1847 }
1848
1849 Ok(())
1850 }
1851 }
1852
1853 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreImportRequest<'de>>
1854 for CapabilityStoreImportRequest
1855 {
1856 #[inline]
1857 fn from_wire(wire: crate::wire::CapabilityStoreImportRequest<'de>) -> Self {
1858 Self {
1859 id: ::fidl_next::FromWire::from_wire(wire.id),
1860
1861 capability: ::fidl_next::FromWire::from_wire(wire.capability),
1862 }
1863 }
1864 }
1865
1866 #[derive(Debug, Default, PartialEq)]
1867 pub struct CapabilityStoreDirConnectorOpenRequest {
1868 pub id: ::core::option::Option<u64>,
1869
1870 pub server_end: ::core::option::Option<
1871 ::fidl_next::ServerEnd<
1872 ::fidl_next_fuchsia_io::Directory,
1873 ::fidl_next::fuchsia::zx::Channel,
1874 >,
1875 >,
1876
1877 pub flags: ::core::option::Option<::fidl_next_fuchsia_io::natural::Flags>,
1878
1879 pub path: ::core::option::Option<::std::string::String>,
1880 }
1881
1882 impl CapabilityStoreDirConnectorOpenRequest {
1883 fn __max_ordinal(&self) -> usize {
1884 if self.path.is_some() {
1885 return 4;
1886 }
1887
1888 if self.flags.is_some() {
1889 return 3;
1890 }
1891
1892 if self.server_end.is_some() {
1893 return 2;
1894 }
1895
1896 if self.id.is_some() {
1897 return 1;
1898 }
1899
1900 0
1901 }
1902 }
1903
1904 unsafe impl<___E>
1905 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>, ___E>
1906 for CapabilityStoreDirConnectorOpenRequest
1907 where
1908 ___E: ::fidl_next::Encoder + ?Sized,
1909 ___E: ::fidl_next::fuchsia::HandleEncoder,
1910 {
1911 #[inline]
1912 fn encode(
1913 mut self,
1914 encoder: &mut ___E,
1915 out: &mut ::core::mem::MaybeUninit<
1916 crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>,
1917 >,
1918 _: (),
1919 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1920 ::fidl_next::munge!(let crate::wire::CapabilityStoreDirConnectorOpenRequest { table } = out);
1921
1922 let max_ord = self.__max_ordinal();
1923
1924 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1925 ::fidl_next::Wire::zero_padding(&mut out);
1926
1927 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1928 ::fidl_next::wire::Envelope,
1929 >(encoder, max_ord);
1930
1931 for i in 1..=max_ord {
1932 match i {
1933 4 => {
1934 if let Some(value) = self.path.take() {
1935 ::fidl_next::wire::Envelope::encode_value::<
1936 ::fidl_next::wire::String<'static>,
1937 ___E,
1938 >(
1939 value, preallocated.encoder, &mut out, 4095
1940 )?;
1941 } else {
1942 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1943 }
1944 }
1945
1946 3 => {
1947 if let Some(value) = self.flags.take() {
1948 ::fidl_next::wire::Envelope::encode_value::<
1949 ::fidl_next_fuchsia_io::wire::Flags,
1950 ___E,
1951 >(
1952 value, preallocated.encoder, &mut out, ()
1953 )?;
1954 } else {
1955 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1956 }
1957 }
1958
1959 2 => {
1960 if let Some(value) = self.server_end.take() {
1961 ::fidl_next::wire::Envelope::encode_value::<
1962 ::fidl_next::ServerEnd<
1963 ::fidl_next_fuchsia_io::Directory,
1964 ::fidl_next::wire::fuchsia::Channel,
1965 >,
1966 ___E,
1967 >(
1968 value, preallocated.encoder, &mut out, ()
1969 )?;
1970 } else {
1971 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1972 }
1973 }
1974
1975 1 => {
1976 if let Some(value) = self.id.take() {
1977 ::fidl_next::wire::Envelope::encode_value::<
1978 ::fidl_next::wire::Uint64,
1979 ___E,
1980 >(
1981 value, preallocated.encoder, &mut out, ()
1982 )?;
1983 } else {
1984 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1985 }
1986 }
1987
1988 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1989 }
1990 unsafe {
1991 preallocated.write_next(out.assume_init_ref());
1992 }
1993 }
1994
1995 ::fidl_next::wire::Table::encode_len(table, max_ord);
1996
1997 Ok(())
1998 }
1999 }
2000
2001 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>>
2002 for CapabilityStoreDirConnectorOpenRequest
2003 {
2004 #[inline]
2005 fn from_wire(wire_: crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>) -> Self {
2006 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2007
2008 let id = wire_.table.get(1);
2009
2010 let server_end = wire_.table.get(2);
2011
2012 let flags = wire_.table.get(3);
2013
2014 let path = wire_.table.get(4);
2015
2016 Self {
2017 id: id.map(|envelope| {
2018 ::fidl_next::FromWire::from_wire(unsafe {
2019 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
2020 })
2021 }),
2022
2023 server_end: server_end.map(|envelope| {
2024 ::fidl_next::FromWire::from_wire(unsafe {
2025 envelope.read_unchecked::<::fidl_next::ServerEnd<
2026 ::fidl_next_fuchsia_io::Directory,
2027 ::fidl_next::wire::fuchsia::Channel,
2028 >>()
2029 })
2030 }),
2031
2032 flags: flags.map(|envelope| {
2033 ::fidl_next::FromWire::from_wire(unsafe {
2034 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
2035 })
2036 }),
2037
2038 path: path.map(|envelope| {
2039 ::fidl_next::FromWire::from_wire(unsafe {
2040 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2041 })
2042 }),
2043 }
2044 }
2045 }
2046
2047 #[doc = " Represents an instance in the component tree, either a component\n instance or component manager\'s instance.\n"]
2048 #[derive(Debug, PartialEq)]
2049 #[repr(C)]
2050 pub struct InstanceToken {
2051 pub token: ::fidl_next::fuchsia::zx::EventPair,
2052 }
2053
2054 unsafe impl<___E> ::fidl_next::Encode<crate::wire::InstanceToken, ___E> for InstanceToken
2055 where
2056 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2057 ___E: ::fidl_next::fuchsia::HandleEncoder,
2058 {
2059 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::InstanceToken> = unsafe {
2060 ::fidl_next::CopyOptimization::enable_if(
2061 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
2062 ::fidl_next::wire::fuchsia::EventPair,
2063 ___E,
2064 >>::COPY_OPTIMIZATION
2065 .is_enabled(),
2066 )
2067 };
2068
2069 #[inline]
2070 fn encode(
2071 self,
2072 encoder_: &mut ___E,
2073 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceToken>,
2074 _: (),
2075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2076 ::fidl_next::munge! {
2077 let crate::wire::InstanceToken {
2078 token,
2079
2080 } = out_;
2081 }
2082
2083 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
2084
2085 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
2086
2087 Ok(())
2088 }
2089 }
2090
2091 unsafe impl<___E>
2092 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::InstanceToken>, ___E>
2093 for InstanceToken
2094 where
2095 ___E: ::fidl_next::Encoder + ?Sized,
2096 InstanceToken: ::fidl_next::Encode<crate::wire::InstanceToken, ___E>,
2097 {
2098 #[inline]
2099 fn encode_option(
2100 this: ::core::option::Option<Self>,
2101 encoder: &mut ___E,
2102 out: &mut ::core::mem::MaybeUninit<
2103 ::fidl_next::wire::Box<'static, crate::wire::InstanceToken>,
2104 >,
2105 _: (),
2106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2107 if let Some(inner) = this {
2108 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2109 ::fidl_next::wire::Box::encode_present(out);
2110 } else {
2111 ::fidl_next::wire::Box::encode_absent(out);
2112 }
2113
2114 Ok(())
2115 }
2116 }
2117
2118 impl ::fidl_next::FromWire<crate::wire::InstanceToken> for InstanceToken {
2119 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::InstanceToken, Self> = unsafe {
2120 ::fidl_next::CopyOptimization::enable_if(
2121 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
2122 ::fidl_next::wire::fuchsia::EventPair,
2123 >>::COPY_OPTIMIZATION
2124 .is_enabled(),
2125 )
2126 };
2127
2128 #[inline]
2129 fn from_wire(wire: crate::wire::InstanceToken) -> Self {
2130 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
2131 }
2132 }
2133
2134 #[doc = " A request for a route.\n"]
2135 #[derive(Debug, Default, PartialEq)]
2136 pub struct RouteRequest {
2137 pub requesting: ::core::option::Option<crate::natural::InstanceToken>,
2138 }
2139
2140 impl RouteRequest {
2141 fn __max_ordinal(&self) -> usize {
2142 if self.requesting.is_some() {
2143 return 1;
2144 }
2145
2146 0
2147 }
2148 }
2149
2150 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RouteRequest<'static>, ___E> for RouteRequest
2151 where
2152 ___E: ::fidl_next::Encoder + ?Sized,
2153 ___E: ::fidl_next::fuchsia::HandleEncoder,
2154 {
2155 #[inline]
2156 fn encode(
2157 mut self,
2158 encoder: &mut ___E,
2159 out: &mut ::core::mem::MaybeUninit<crate::wire::RouteRequest<'static>>,
2160 _: (),
2161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2162 ::fidl_next::munge!(let crate::wire::RouteRequest { table } = out);
2163
2164 let max_ord = self.__max_ordinal();
2165
2166 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2167 ::fidl_next::Wire::zero_padding(&mut out);
2168
2169 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2170 ::fidl_next::wire::Envelope,
2171 >(encoder, max_ord);
2172
2173 for i in 1..=max_ord {
2174 match i {
2175 1 => {
2176 if let Some(value) = self.requesting.take() {
2177 ::fidl_next::wire::Envelope::encode_value::<
2178 crate::wire::InstanceToken,
2179 ___E,
2180 >(
2181 value, preallocated.encoder, &mut out, ()
2182 )?;
2183 } else {
2184 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2185 }
2186 }
2187
2188 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2189 }
2190 unsafe {
2191 preallocated.write_next(out.assume_init_ref());
2192 }
2193 }
2194
2195 ::fidl_next::wire::Table::encode_len(table, max_ord);
2196
2197 Ok(())
2198 }
2199 }
2200
2201 impl<'de> ::fidl_next::FromWire<crate::wire::RouteRequest<'de>> for RouteRequest {
2202 #[inline]
2203 fn from_wire(wire_: crate::wire::RouteRequest<'de>) -> Self {
2204 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2205
2206 let requesting = wire_.table.get(1);
2207
2208 Self {
2209 requesting: requesting.map(|envelope| {
2210 ::fidl_next::FromWire::from_wire(unsafe {
2211 envelope.read_unchecked::<crate::wire::InstanceToken>()
2212 })
2213 }),
2214 }
2215 }
2216 }
2217
2218 #[derive(Debug, PartialEq)]
2219 pub enum ConnectorRouterRouteResponse {
2220 Connector(crate::natural::Connector),
2221
2222 Unavailable(crate::natural::Unit),
2223 }
2224
2225 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConnectorRouterRouteResponse, ___E>
2226 for ConnectorRouterRouteResponse
2227 where
2228 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2229 ___E: ::fidl_next::fuchsia::HandleEncoder,
2230 {
2231 #[inline]
2232 fn encode(
2233 self,
2234 encoder: &mut ___E,
2235 out: &mut ::core::mem::MaybeUninit<crate::wire::ConnectorRouterRouteResponse>,
2236 _: (),
2237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2238 ::fidl_next::munge!(let crate::wire::ConnectorRouterRouteResponse { raw, _phantom: _ } = out);
2239
2240 match self {
2241 Self::Connector(value) => ::fidl_next::wire::Union::encode_as_static::<
2242 ___E,
2243 crate::wire::Connector,
2244 >(value, 1, encoder, raw, ())?,
2245
2246 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
2247 ___E,
2248 crate::wire::Unit,
2249 >(value, 2, encoder, raw, ())?,
2250 }
2251
2252 Ok(())
2253 }
2254 }
2255
2256 unsafe impl<___E>
2257 ::fidl_next::EncodeOption<crate::wire_optional::ConnectorRouterRouteResponse, ___E>
2258 for ConnectorRouterRouteResponse
2259 where
2260 ___E: ?Sized,
2261 ConnectorRouterRouteResponse:
2262 ::fidl_next::Encode<crate::wire::ConnectorRouterRouteResponse, ___E>,
2263 {
2264 #[inline]
2265 fn encode_option(
2266 this: ::core::option::Option<Self>,
2267 encoder: &mut ___E,
2268 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::ConnectorRouterRouteResponse>,
2269 _: (),
2270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2271 ::fidl_next::munge!(let crate::wire_optional::ConnectorRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2272
2273 if let Some(inner) = this {
2274 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2275 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2276 } else {
2277 ::fidl_next::wire::Union::encode_absent(raw);
2278 }
2279
2280 Ok(())
2281 }
2282 }
2283
2284 impl ::fidl_next::FromWire<crate::wire::ConnectorRouterRouteResponse>
2285 for ConnectorRouterRouteResponse
2286 {
2287 #[inline]
2288 fn from_wire(wire: crate::wire::ConnectorRouterRouteResponse) -> Self {
2289 let wire = ::core::mem::ManuallyDrop::new(wire);
2290 match wire.raw.ordinal() {
2291 1 => Self::Connector(::fidl_next::FromWire::from_wire(unsafe {
2292 wire.raw.get().read_unchecked::<crate::wire::Connector>()
2293 })),
2294
2295 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
2296 wire.raw.get().read_unchecked::<crate::wire::Unit>()
2297 })),
2298
2299 _ => unsafe { ::core::hint::unreachable_unchecked() },
2300 }
2301 }
2302 }
2303
2304 impl ::fidl_next::FromWireOption<crate::wire_optional::ConnectorRouterRouteResponse>
2305 for ConnectorRouterRouteResponse
2306 {
2307 #[inline]
2308 fn from_wire_option(
2309 wire: crate::wire_optional::ConnectorRouterRouteResponse,
2310 ) -> ::core::option::Option<Self> {
2311 if let Some(inner) = wire.into_option() {
2312 Some(::fidl_next::FromWire::from_wire(inner))
2313 } else {
2314 None
2315 }
2316 }
2317 }
2318
2319 impl ::fidl_next::FromWireOption<crate::wire_optional::ConnectorRouterRouteResponse>
2320 for Box<ConnectorRouterRouteResponse>
2321 {
2322 #[inline]
2323 fn from_wire_option(
2324 wire: crate::wire_optional::ConnectorRouterRouteResponse,
2325 ) -> ::core::option::Option<Self> {
2326 <ConnectorRouterRouteResponse as ::fidl_next::FromWireOption<
2327 crate::wire_optional::ConnectorRouterRouteResponse,
2328 >>::from_wire_option(wire)
2329 .map(Box::new)
2330 }
2331 }
2332
2333 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2334 pub enum DataRouterRouteResponse {
2335 Data(crate::natural::Data),
2336
2337 Unavailable(crate::natural::Unit),
2338 }
2339
2340 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataRouterRouteResponse<'static>, ___E>
2341 for DataRouterRouteResponse
2342 where
2343 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2344 ___E: ::fidl_next::Encoder,
2345 ___E: ::fidl_next::fuchsia::HandleEncoder,
2346 {
2347 #[inline]
2348 fn encode(
2349 self,
2350 encoder: &mut ___E,
2351 out: &mut ::core::mem::MaybeUninit<crate::wire::DataRouterRouteResponse<'static>>,
2352 _: (),
2353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2354 ::fidl_next::munge!(let crate::wire::DataRouterRouteResponse { raw, _phantom: _ } = out);
2355
2356 match self {
2357 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
2358 ___E,
2359 crate::wire::Data<'static>,
2360 >(value, 1, encoder, raw, ())?,
2361
2362 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as::<
2363 ___E,
2364 crate::wire::Unit,
2365 >(value, 2, encoder, raw, ())?,
2366 }
2367
2368 Ok(())
2369 }
2370 }
2371
2372 unsafe impl<___E>
2373 ::fidl_next::EncodeOption<crate::wire_optional::DataRouterRouteResponse<'static>, ___E>
2374 for DataRouterRouteResponse
2375 where
2376 ___E: ?Sized,
2377 DataRouterRouteResponse:
2378 ::fidl_next::Encode<crate::wire::DataRouterRouteResponse<'static>, ___E>,
2379 {
2380 #[inline]
2381 fn encode_option(
2382 this: ::core::option::Option<Self>,
2383 encoder: &mut ___E,
2384 out: &mut ::core::mem::MaybeUninit<
2385 crate::wire_optional::DataRouterRouteResponse<'static>,
2386 >,
2387 _: (),
2388 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2389 ::fidl_next::munge!(let crate::wire_optional::DataRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2390
2391 if let Some(inner) = this {
2392 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2393 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2394 } else {
2395 ::fidl_next::wire::Union::encode_absent(raw);
2396 }
2397
2398 Ok(())
2399 }
2400 }
2401
2402 impl<'de> ::fidl_next::FromWire<crate::wire::DataRouterRouteResponse<'de>>
2403 for DataRouterRouteResponse
2404 {
2405 #[inline]
2406 fn from_wire(wire: crate::wire::DataRouterRouteResponse<'de>) -> Self {
2407 let wire = ::core::mem::ManuallyDrop::new(wire);
2408 match wire.raw.ordinal() {
2409 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
2410 wire.raw.get().read_unchecked::<crate::wire::Data<'de>>()
2411 })),
2412
2413 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
2414 wire.raw.get().read_unchecked::<crate::wire::Unit>()
2415 })),
2416
2417 _ => unsafe { ::core::hint::unreachable_unchecked() },
2418 }
2419 }
2420 }
2421
2422 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DataRouterRouteResponse<'de>>
2423 for DataRouterRouteResponse
2424 {
2425 #[inline]
2426 fn from_wire_option(
2427 wire: crate::wire_optional::DataRouterRouteResponse<'de>,
2428 ) -> ::core::option::Option<Self> {
2429 if let Some(inner) = wire.into_option() {
2430 Some(::fidl_next::FromWire::from_wire(inner))
2431 } else {
2432 None
2433 }
2434 }
2435 }
2436
2437 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DataRouterRouteResponse<'de>>
2438 for Box<DataRouterRouteResponse>
2439 {
2440 #[inline]
2441 fn from_wire_option(
2442 wire: crate::wire_optional::DataRouterRouteResponse<'de>,
2443 ) -> ::core::option::Option<Self> {
2444 <DataRouterRouteResponse as ::fidl_next::FromWireOption<
2445 crate::wire_optional::DataRouterRouteResponse<'de>,
2446 >>::from_wire_option(wire)
2447 .map(Box::new)
2448 }
2449 }
2450
2451 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2452 pub struct DictionaryDrainIteratorGetNextResponse {
2453 pub items: ::std::vec::Vec<crate::natural::DictionaryItem>,
2454
2455 pub end_id: u64,
2456 }
2457
2458 unsafe impl<___E>
2459 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>
2460 for DictionaryDrainIteratorGetNextResponse
2461 where
2462 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2463 ___E: ::fidl_next::Encoder,
2464 ___E: ::fidl_next::fuchsia::HandleEncoder,
2465 {
2466 #[inline]
2467 fn encode(
2468 self,
2469 encoder_: &mut ___E,
2470 out_: &mut ::core::mem::MaybeUninit<
2471 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
2472 >,
2473 _: (),
2474 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2475 ::fidl_next::munge! {
2476 let crate::wire::DictionaryDrainIteratorGetNextResponse {
2477 items,
2478 end_id,
2479
2480 } = out_;
2481 }
2482
2483 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
2484
2485 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(items.as_mut_ptr()) };
2486 ::fidl_next::Constrained::validate(_field, (128, ()))?;
2487
2488 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
2489
2490 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(end_id.as_mut_ptr()) };
2491
2492 Ok(())
2493 }
2494 }
2495
2496 unsafe impl<___E>
2497 ::fidl_next::EncodeOption<
2498 ::fidl_next::wire::Box<
2499 'static,
2500 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
2501 >,
2502 ___E,
2503 > for DictionaryDrainIteratorGetNextResponse
2504 where
2505 ___E: ::fidl_next::Encoder + ?Sized,
2506 DictionaryDrainIteratorGetNextResponse:
2507 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>,
2508 {
2509 #[inline]
2510 fn encode_option(
2511 this: ::core::option::Option<Self>,
2512 encoder: &mut ___E,
2513 out: &mut ::core::mem::MaybeUninit<
2514 ::fidl_next::wire::Box<
2515 'static,
2516 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
2517 >,
2518 >,
2519 _: (),
2520 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2521 if let Some(inner) = this {
2522 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2523 ::fidl_next::wire::Box::encode_present(out);
2524 } else {
2525 ::fidl_next::wire::Box::encode_absent(out);
2526 }
2527
2528 Ok(())
2529 }
2530 }
2531
2532 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryDrainIteratorGetNextResponse<'de>>
2533 for DictionaryDrainIteratorGetNextResponse
2534 {
2535 #[inline]
2536 fn from_wire(wire: crate::wire::DictionaryDrainIteratorGetNextResponse<'de>) -> Self {
2537 Self {
2538 items: ::fidl_next::FromWire::from_wire(wire.items),
2539
2540 end_id: ::fidl_next::FromWire::from_wire(wire.end_id),
2541 }
2542 }
2543 }
2544
2545 #[doc = " A key-value pair in a [`DictionaryRef`], where the value may be elided.\n This is useful for APIs that may wish to omit the value, for example if it could not be\n duplicated.\n"]
2546 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2547 pub struct DictionaryOptionalItem {
2548 pub key: ::std::string::String,
2549
2550 pub value: ::core::option::Option<::std::boxed::Box<crate::natural::WrappedCapabilityId>>,
2551 }
2552
2553 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>
2554 for DictionaryOptionalItem
2555 where
2556 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2557 ___E: ::fidl_next::Encoder,
2558 ___E: ::fidl_next::fuchsia::HandleEncoder,
2559 {
2560 #[inline]
2561 fn encode(
2562 self,
2563 encoder_: &mut ___E,
2564 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryOptionalItem<'static>>,
2565 _: (),
2566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2567 ::fidl_next::munge! {
2568 let crate::wire::DictionaryOptionalItem {
2569 key,
2570 value,
2571
2572 } = out_;
2573 }
2574
2575 ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
2576
2577 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
2578 ::fidl_next::Constrained::validate(_field, 255)?;
2579
2580 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
2581
2582 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
2583
2584 Ok(())
2585 }
2586 }
2587
2588 unsafe impl<___E>
2589 ::fidl_next::EncodeOption<
2590 ::fidl_next::wire::Box<'static, crate::wire::DictionaryOptionalItem<'static>>,
2591 ___E,
2592 > for DictionaryOptionalItem
2593 where
2594 ___E: ::fidl_next::Encoder + ?Sized,
2595 DictionaryOptionalItem:
2596 ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>,
2597 {
2598 #[inline]
2599 fn encode_option(
2600 this: ::core::option::Option<Self>,
2601 encoder: &mut ___E,
2602 out: &mut ::core::mem::MaybeUninit<
2603 ::fidl_next::wire::Box<'static, crate::wire::DictionaryOptionalItem<'static>>,
2604 >,
2605 _: (),
2606 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2607 if let Some(inner) = this {
2608 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2609 ::fidl_next::wire::Box::encode_present(out);
2610 } else {
2611 ::fidl_next::wire::Box::encode_absent(out);
2612 }
2613
2614 Ok(())
2615 }
2616 }
2617
2618 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryOptionalItem<'de>>
2619 for DictionaryOptionalItem
2620 {
2621 #[inline]
2622 fn from_wire(wire: crate::wire::DictionaryOptionalItem<'de>) -> Self {
2623 Self {
2624 key: ::fidl_next::FromWire::from_wire(wire.key),
2625
2626 value: ::fidl_next::FromWire::from_wire(wire.value),
2627 }
2628 }
2629 }
2630
2631 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2632 pub struct DictionaryEnumerateIteratorGetNextResponse {
2633 pub items: ::std::vec::Vec<crate::natural::DictionaryOptionalItem>,
2634
2635 pub end_id: u64,
2636 }
2637
2638 unsafe impl<___E>
2639 ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>, ___E>
2640 for DictionaryEnumerateIteratorGetNextResponse
2641 where
2642 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2643 ___E: ::fidl_next::Encoder,
2644 ___E: ::fidl_next::fuchsia::HandleEncoder,
2645 {
2646 #[inline]
2647 fn encode(
2648 self,
2649 encoder_: &mut ___E,
2650 out_: &mut ::core::mem::MaybeUninit<
2651 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2652 >,
2653 _: (),
2654 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2655 ::fidl_next::munge! {
2656 let crate::wire::DictionaryEnumerateIteratorGetNextResponse {
2657 items,
2658 end_id,
2659
2660 } = out_;
2661 }
2662
2663 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
2664
2665 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(items.as_mut_ptr()) };
2666 ::fidl_next::Constrained::validate(_field, (128, ()))?;
2667
2668 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
2669
2670 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(end_id.as_mut_ptr()) };
2671
2672 Ok(())
2673 }
2674 }
2675
2676 unsafe impl<___E>
2677 ::fidl_next::EncodeOption<
2678 ::fidl_next::wire::Box<
2679 'static,
2680 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2681 >,
2682 ___E,
2683 > for DictionaryEnumerateIteratorGetNextResponse
2684 where
2685 ___E: ::fidl_next::Encoder + ?Sized,
2686 DictionaryEnumerateIteratorGetNextResponse: ::fidl_next::Encode<
2687 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2688 ___E,
2689 >,
2690 {
2691 #[inline]
2692 fn encode_option(
2693 this: ::core::option::Option<Self>,
2694 encoder: &mut ___E,
2695 out: &mut ::core::mem::MaybeUninit<
2696 ::fidl_next::wire::Box<
2697 'static,
2698 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2699 >,
2700 >,
2701 _: (),
2702 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2703 if let Some(inner) = this {
2704 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2705 ::fidl_next::wire::Box::encode_present(out);
2706 } else {
2707 ::fidl_next::wire::Box::encode_absent(out);
2708 }
2709
2710 Ok(())
2711 }
2712 }
2713
2714 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'de>>
2715 for DictionaryEnumerateIteratorGetNextResponse
2716 {
2717 #[inline]
2718 fn from_wire(wire: crate::wire::DictionaryEnumerateIteratorGetNextResponse<'de>) -> Self {
2719 Self {
2720 items: ::fidl_next::FromWire::from_wire(wire.items),
2721
2722 end_id: ::fidl_next::FromWire::from_wire(wire.end_id),
2723 }
2724 }
2725 }
2726
2727 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2728 pub struct DictionaryKeysIteratorGetNextResponse {
2729 pub keys: ::std::vec::Vec<::std::string::String>,
2730 }
2731
2732 unsafe impl<___E>
2733 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>
2734 for DictionaryKeysIteratorGetNextResponse
2735 where
2736 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2737 ___E: ::fidl_next::Encoder,
2738 ___E: ::fidl_next::fuchsia::HandleEncoder,
2739 {
2740 #[inline]
2741 fn encode(
2742 self,
2743 encoder_: &mut ___E,
2744 out_: &mut ::core::mem::MaybeUninit<
2745 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
2746 >,
2747 _: (),
2748 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2749 ::fidl_next::munge! {
2750 let crate::wire::DictionaryKeysIteratorGetNextResponse {
2751 keys,
2752
2753 } = out_;
2754 }
2755
2756 ::fidl_next::Encode::encode(self.keys, encoder_, keys, (128, 255))?;
2757
2758 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(keys.as_mut_ptr()) };
2759 ::fidl_next::Constrained::validate(_field, (128, 255))?;
2760
2761 Ok(())
2762 }
2763 }
2764
2765 unsafe impl<___E>
2766 ::fidl_next::EncodeOption<
2767 ::fidl_next::wire::Box<
2768 'static,
2769 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
2770 >,
2771 ___E,
2772 > for DictionaryKeysIteratorGetNextResponse
2773 where
2774 ___E: ::fidl_next::Encoder + ?Sized,
2775 DictionaryKeysIteratorGetNextResponse:
2776 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>,
2777 {
2778 #[inline]
2779 fn encode_option(
2780 this: ::core::option::Option<Self>,
2781 encoder: &mut ___E,
2782 out: &mut ::core::mem::MaybeUninit<
2783 ::fidl_next::wire::Box<
2784 'static,
2785 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
2786 >,
2787 >,
2788 _: (),
2789 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2790 if let Some(inner) = this {
2791 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2792 ::fidl_next::wire::Box::encode_present(out);
2793 } else {
2794 ::fidl_next::wire::Box::encode_absent(out);
2795 }
2796
2797 Ok(())
2798 }
2799 }
2800
2801 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryKeysIteratorGetNextResponse<'de>>
2802 for DictionaryKeysIteratorGetNextResponse
2803 {
2804 #[inline]
2805 fn from_wire(wire: crate::wire::DictionaryKeysIteratorGetNextResponse<'de>) -> Self {
2806 Self { keys: ::fidl_next::FromWire::from_wire(wire.keys) }
2807 }
2808 }
2809
2810 #[derive(Debug, PartialEq)]
2811 pub enum DictionaryRouterRouteResponse {
2812 Dictionary(crate::natural::DictionaryRef),
2813
2814 Unavailable(crate::natural::Unit),
2815 }
2816
2817 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryRouterRouteResponse, ___E>
2818 for DictionaryRouterRouteResponse
2819 where
2820 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2821 ___E: ::fidl_next::fuchsia::HandleEncoder,
2822 {
2823 #[inline]
2824 fn encode(
2825 self,
2826 encoder: &mut ___E,
2827 out: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRouterRouteResponse>,
2828 _: (),
2829 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2830 ::fidl_next::munge!(let crate::wire::DictionaryRouterRouteResponse { raw, _phantom: _ } = out);
2831
2832 match self {
2833 Self::Dictionary(value) => ::fidl_next::wire::Union::encode_as_static::<
2834 ___E,
2835 crate::wire::DictionaryRef,
2836 >(value, 1, encoder, raw, ())?,
2837
2838 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
2839 ___E,
2840 crate::wire::Unit,
2841 >(value, 2, encoder, raw, ())?,
2842 }
2843
2844 Ok(())
2845 }
2846 }
2847
2848 unsafe impl<___E>
2849 ::fidl_next::EncodeOption<crate::wire_optional::DictionaryRouterRouteResponse, ___E>
2850 for DictionaryRouterRouteResponse
2851 where
2852 ___E: ?Sized,
2853 DictionaryRouterRouteResponse:
2854 ::fidl_next::Encode<crate::wire::DictionaryRouterRouteResponse, ___E>,
2855 {
2856 #[inline]
2857 fn encode_option(
2858 this: ::core::option::Option<Self>,
2859 encoder: &mut ___E,
2860 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DictionaryRouterRouteResponse>,
2861 _: (),
2862 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2863 ::fidl_next::munge!(let crate::wire_optional::DictionaryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2864
2865 if let Some(inner) = this {
2866 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2867 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2868 } else {
2869 ::fidl_next::wire::Union::encode_absent(raw);
2870 }
2871
2872 Ok(())
2873 }
2874 }
2875
2876 impl ::fidl_next::FromWire<crate::wire::DictionaryRouterRouteResponse>
2877 for DictionaryRouterRouteResponse
2878 {
2879 #[inline]
2880 fn from_wire(wire: crate::wire::DictionaryRouterRouteResponse) -> Self {
2881 let wire = ::core::mem::ManuallyDrop::new(wire);
2882 match wire.raw.ordinal() {
2883 1 => Self::Dictionary(::fidl_next::FromWire::from_wire(unsafe {
2884 wire.raw.get().read_unchecked::<crate::wire::DictionaryRef>()
2885 })),
2886
2887 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
2888 wire.raw.get().read_unchecked::<crate::wire::Unit>()
2889 })),
2890
2891 _ => unsafe { ::core::hint::unreachable_unchecked() },
2892 }
2893 }
2894 }
2895
2896 impl ::fidl_next::FromWireOption<crate::wire_optional::DictionaryRouterRouteResponse>
2897 for DictionaryRouterRouteResponse
2898 {
2899 #[inline]
2900 fn from_wire_option(
2901 wire: crate::wire_optional::DictionaryRouterRouteResponse,
2902 ) -> ::core::option::Option<Self> {
2903 if let Some(inner) = wire.into_option() {
2904 Some(::fidl_next::FromWire::from_wire(inner))
2905 } else {
2906 None
2907 }
2908 }
2909 }
2910
2911 impl ::fidl_next::FromWireOption<crate::wire_optional::DictionaryRouterRouteResponse>
2912 for Box<DictionaryRouterRouteResponse>
2913 {
2914 #[inline]
2915 fn from_wire_option(
2916 wire: crate::wire_optional::DictionaryRouterRouteResponse,
2917 ) -> ::core::option::Option<Self> {
2918 <DictionaryRouterRouteResponse as ::fidl_next::FromWireOption<
2919 crate::wire_optional::DictionaryRouterRouteResponse,
2920 >>::from_wire_option(wire)
2921 .map(Box::new)
2922 }
2923 }
2924
2925 #[derive(Debug, PartialEq)]
2926 pub enum DirConnectorRouterRouteResponse {
2927 DirConnector(crate::natural::DirConnector),
2928
2929 Unavailable(crate::natural::Unit),
2930 }
2931
2932 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirConnectorRouterRouteResponse, ___E>
2933 for DirConnectorRouterRouteResponse
2934 where
2935 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2936 ___E: ::fidl_next::fuchsia::HandleEncoder,
2937 {
2938 #[inline]
2939 fn encode(
2940 self,
2941 encoder: &mut ___E,
2942 out: &mut ::core::mem::MaybeUninit<crate::wire::DirConnectorRouterRouteResponse>,
2943 _: (),
2944 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2945 ::fidl_next::munge!(let crate::wire::DirConnectorRouterRouteResponse { raw, _phantom: _ } = out);
2946
2947 match self {
2948 Self::DirConnector(value) => ::fidl_next::wire::Union::encode_as_static::<
2949 ___E,
2950 crate::wire::DirConnector,
2951 >(value, 1, encoder, raw, ())?,
2952
2953 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
2954 ___E,
2955 crate::wire::Unit,
2956 >(value, 2, encoder, raw, ())?,
2957 }
2958
2959 Ok(())
2960 }
2961 }
2962
2963 unsafe impl<___E>
2964 ::fidl_next::EncodeOption<crate::wire_optional::DirConnectorRouterRouteResponse, ___E>
2965 for DirConnectorRouterRouteResponse
2966 where
2967 ___E: ?Sized,
2968 DirConnectorRouterRouteResponse:
2969 ::fidl_next::Encode<crate::wire::DirConnectorRouterRouteResponse, ___E>,
2970 {
2971 #[inline]
2972 fn encode_option(
2973 this: ::core::option::Option<Self>,
2974 encoder: &mut ___E,
2975 out: &mut ::core::mem::MaybeUninit<
2976 crate::wire_optional::DirConnectorRouterRouteResponse,
2977 >,
2978 _: (),
2979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2980 ::fidl_next::munge!(let crate::wire_optional::DirConnectorRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2981
2982 if let Some(inner) = this {
2983 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2984 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2985 } else {
2986 ::fidl_next::wire::Union::encode_absent(raw);
2987 }
2988
2989 Ok(())
2990 }
2991 }
2992
2993 impl ::fidl_next::FromWire<crate::wire::DirConnectorRouterRouteResponse>
2994 for DirConnectorRouterRouteResponse
2995 {
2996 #[inline]
2997 fn from_wire(wire: crate::wire::DirConnectorRouterRouteResponse) -> Self {
2998 let wire = ::core::mem::ManuallyDrop::new(wire);
2999 match wire.raw.ordinal() {
3000 1 => Self::DirConnector(::fidl_next::FromWire::from_wire(unsafe {
3001 wire.raw.get().read_unchecked::<crate::wire::DirConnector>()
3002 })),
3003
3004 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
3005 wire.raw.get().read_unchecked::<crate::wire::Unit>()
3006 })),
3007
3008 _ => unsafe { ::core::hint::unreachable_unchecked() },
3009 }
3010 }
3011 }
3012
3013 impl ::fidl_next::FromWireOption<crate::wire_optional::DirConnectorRouterRouteResponse>
3014 for DirConnectorRouterRouteResponse
3015 {
3016 #[inline]
3017 fn from_wire_option(
3018 wire: crate::wire_optional::DirConnectorRouterRouteResponse,
3019 ) -> ::core::option::Option<Self> {
3020 if let Some(inner) = wire.into_option() {
3021 Some(::fidl_next::FromWire::from_wire(inner))
3022 } else {
3023 None
3024 }
3025 }
3026 }
3027
3028 impl ::fidl_next::FromWireOption<crate::wire_optional::DirConnectorRouterRouteResponse>
3029 for Box<DirConnectorRouterRouteResponse>
3030 {
3031 #[inline]
3032 fn from_wire_option(
3033 wire: crate::wire_optional::DirConnectorRouterRouteResponse,
3034 ) -> ::core::option::Option<Self> {
3035 <DirConnectorRouterRouteResponse as ::fidl_next::FromWireOption<
3036 crate::wire_optional::DirConnectorRouterRouteResponse,
3037 >>::from_wire_option(wire)
3038 .map(Box::new)
3039 }
3040 }
3041
3042 #[derive(Debug, PartialEq)]
3043 pub enum DirEntryRouterRouteResponse {
3044 DirEntry(crate::natural::DirEntry),
3045
3046 Unavailable(crate::natural::Unit),
3047 }
3048
3049 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirEntryRouterRouteResponse, ___E>
3050 for DirEntryRouterRouteResponse
3051 where
3052 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3053 ___E: ::fidl_next::fuchsia::HandleEncoder,
3054 {
3055 #[inline]
3056 fn encode(
3057 self,
3058 encoder: &mut ___E,
3059 out: &mut ::core::mem::MaybeUninit<crate::wire::DirEntryRouterRouteResponse>,
3060 _: (),
3061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3062 ::fidl_next::munge!(let crate::wire::DirEntryRouterRouteResponse { raw, _phantom: _ } = out);
3063
3064 match self {
3065 Self::DirEntry(value) => ::fidl_next::wire::Union::encode_as_static::<
3066 ___E,
3067 crate::wire::DirEntry,
3068 >(value, 1, encoder, raw, ())?,
3069
3070 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
3071 ___E,
3072 crate::wire::Unit,
3073 >(value, 2, encoder, raw, ())?,
3074 }
3075
3076 Ok(())
3077 }
3078 }
3079
3080 unsafe impl<___E>
3081 ::fidl_next::EncodeOption<crate::wire_optional::DirEntryRouterRouteResponse, ___E>
3082 for DirEntryRouterRouteResponse
3083 where
3084 ___E: ?Sized,
3085 DirEntryRouterRouteResponse:
3086 ::fidl_next::Encode<crate::wire::DirEntryRouterRouteResponse, ___E>,
3087 {
3088 #[inline]
3089 fn encode_option(
3090 this: ::core::option::Option<Self>,
3091 encoder: &mut ___E,
3092 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DirEntryRouterRouteResponse>,
3093 _: (),
3094 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3095 ::fidl_next::munge!(let crate::wire_optional::DirEntryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
3096
3097 if let Some(inner) = this {
3098 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
3099 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
3100 } else {
3101 ::fidl_next::wire::Union::encode_absent(raw);
3102 }
3103
3104 Ok(())
3105 }
3106 }
3107
3108 impl ::fidl_next::FromWire<crate::wire::DirEntryRouterRouteResponse>
3109 for DirEntryRouterRouteResponse
3110 {
3111 #[inline]
3112 fn from_wire(wire: crate::wire::DirEntryRouterRouteResponse) -> Self {
3113 let wire = ::core::mem::ManuallyDrop::new(wire);
3114 match wire.raw.ordinal() {
3115 1 => Self::DirEntry(::fidl_next::FromWire::from_wire(unsafe {
3116 wire.raw.get().read_unchecked::<crate::wire::DirEntry>()
3117 })),
3118
3119 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
3120 wire.raw.get().read_unchecked::<crate::wire::Unit>()
3121 })),
3122
3123 _ => unsafe { ::core::hint::unreachable_unchecked() },
3124 }
3125 }
3126 }
3127
3128 impl ::fidl_next::FromWireOption<crate::wire_optional::DirEntryRouterRouteResponse>
3129 for DirEntryRouterRouteResponse
3130 {
3131 #[inline]
3132 fn from_wire_option(
3133 wire: crate::wire_optional::DirEntryRouterRouteResponse,
3134 ) -> ::core::option::Option<Self> {
3135 if let Some(inner) = wire.into_option() {
3136 Some(::fidl_next::FromWire::from_wire(inner))
3137 } else {
3138 None
3139 }
3140 }
3141 }
3142
3143 impl ::fidl_next::FromWireOption<crate::wire_optional::DirEntryRouterRouteResponse>
3144 for Box<DirEntryRouterRouteResponse>
3145 {
3146 #[inline]
3147 fn from_wire_option(
3148 wire: crate::wire_optional::DirEntryRouterRouteResponse,
3149 ) -> ::core::option::Option<Self> {
3150 <DirEntryRouterRouteResponse as ::fidl_next::FromWireOption<
3151 crate::wire_optional::DirEntryRouterRouteResponse,
3152 >>::from_wire_option(wire)
3153 .map(Box::new)
3154 }
3155 }
3156
3157 #[derive(Debug, Default, PartialEq)]
3158 pub struct DirReceiverReceiveRequest {
3159 pub channel: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
3160
3161 pub flags: ::core::option::Option<::fidl_next_fuchsia_io::natural::Flags>,
3162
3163 pub subdir: ::core::option::Option<::std::string::String>,
3164 }
3165
3166 impl DirReceiverReceiveRequest {
3167 fn __max_ordinal(&self) -> usize {
3168 if self.subdir.is_some() {
3169 return 3;
3170 }
3171
3172 if self.flags.is_some() {
3173 return 2;
3174 }
3175
3176 if self.channel.is_some() {
3177 return 1;
3178 }
3179
3180 0
3181 }
3182 }
3183
3184 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirReceiverReceiveRequest<'static>, ___E>
3185 for DirReceiverReceiveRequest
3186 where
3187 ___E: ::fidl_next::Encoder + ?Sized,
3188 ___E: ::fidl_next::fuchsia::HandleEncoder,
3189 {
3190 #[inline]
3191 fn encode(
3192 mut self,
3193 encoder: &mut ___E,
3194 out: &mut ::core::mem::MaybeUninit<crate::wire::DirReceiverReceiveRequest<'static>>,
3195 _: (),
3196 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3197 ::fidl_next::munge!(let crate::wire::DirReceiverReceiveRequest { table } = out);
3198
3199 let max_ord = self.__max_ordinal();
3200
3201 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3202 ::fidl_next::Wire::zero_padding(&mut out);
3203
3204 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3205 ::fidl_next::wire::Envelope,
3206 >(encoder, max_ord);
3207
3208 for i in 1..=max_ord {
3209 match i {
3210 3 => {
3211 if let Some(value) = self.subdir.take() {
3212 ::fidl_next::wire::Envelope::encode_value::<
3213 ::fidl_next::wire::String<'static>,
3214 ___E,
3215 >(
3216 value, preallocated.encoder, &mut out, 4095
3217 )?;
3218 } else {
3219 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3220 }
3221 }
3222
3223 2 => {
3224 if let Some(value) = self.flags.take() {
3225 ::fidl_next::wire::Envelope::encode_value::<
3226 ::fidl_next_fuchsia_io::wire::Flags,
3227 ___E,
3228 >(
3229 value, preallocated.encoder, &mut out, ()
3230 )?;
3231 } else {
3232 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3233 }
3234 }
3235
3236 1 => {
3237 if let Some(value) = self.channel.take() {
3238 ::fidl_next::wire::Envelope::encode_value::<
3239 ::fidl_next::wire::fuchsia::Channel,
3240 ___E,
3241 >(
3242 value, preallocated.encoder, &mut out, ()
3243 )?;
3244 } else {
3245 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3246 }
3247 }
3248
3249 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3250 }
3251 unsafe {
3252 preallocated.write_next(out.assume_init_ref());
3253 }
3254 }
3255
3256 ::fidl_next::wire::Table::encode_len(table, max_ord);
3257
3258 Ok(())
3259 }
3260 }
3261
3262 impl<'de> ::fidl_next::FromWire<crate::wire::DirReceiverReceiveRequest<'de>>
3263 for DirReceiverReceiveRequest
3264 {
3265 #[inline]
3266 fn from_wire(wire_: crate::wire::DirReceiverReceiveRequest<'de>) -> Self {
3267 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3268
3269 let channel = wire_.table.get(1);
3270
3271 let flags = wire_.table.get(2);
3272
3273 let subdir = wire_.table.get(3);
3274
3275 Self {
3276 channel: channel.map(|envelope| {
3277 ::fidl_next::FromWire::from_wire(unsafe {
3278 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
3279 })
3280 }),
3281
3282 flags: flags.map(|envelope| {
3283 ::fidl_next::FromWire::from_wire(unsafe {
3284 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
3285 })
3286 }),
3287
3288 subdir: subdir.map(|envelope| {
3289 ::fidl_next::FromWire::from_wire(unsafe {
3290 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3291 })
3292 }),
3293 }
3294 }
3295 }
3296
3297 #[derive(Debug, PartialEq)]
3298 pub enum DirectoryRouterRouteResponse {
3299 Directory(
3300 ::fidl_next::ClientEnd<
3301 ::fidl_next_fuchsia_io::Directory,
3302 ::fidl_next::fuchsia::zx::Channel,
3303 >,
3304 ),
3305
3306 Unavailable(crate::natural::Unit),
3307 }
3308
3309 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRouterRouteResponse, ___E>
3310 for DirectoryRouterRouteResponse
3311 where
3312 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3313 ___E: ::fidl_next::fuchsia::HandleEncoder,
3314 {
3315 #[inline]
3316 fn encode(
3317 self,
3318 encoder: &mut ___E,
3319 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRouterRouteResponse>,
3320 _: (),
3321 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3322 ::fidl_next::munge!(let crate::wire::DirectoryRouterRouteResponse { raw, _phantom: _ } = out);
3323
3324 match self {
3325 Self::Directory(value) => ::fidl_next::wire::Union::encode_as_static::<
3326 ___E,
3327 ::fidl_next::ClientEnd<
3328 ::fidl_next_fuchsia_io::Directory,
3329 ::fidl_next::wire::fuchsia::Channel,
3330 >,
3331 >(value, 1, encoder, raw, ())?,
3332
3333 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
3334 ___E,
3335 crate::wire::Unit,
3336 >(value, 2, encoder, raw, ())?,
3337 }
3338
3339 Ok(())
3340 }
3341 }
3342
3343 unsafe impl<___E>
3344 ::fidl_next::EncodeOption<crate::wire_optional::DirectoryRouterRouteResponse, ___E>
3345 for DirectoryRouterRouteResponse
3346 where
3347 ___E: ?Sized,
3348 DirectoryRouterRouteResponse:
3349 ::fidl_next::Encode<crate::wire::DirectoryRouterRouteResponse, ___E>,
3350 {
3351 #[inline]
3352 fn encode_option(
3353 this: ::core::option::Option<Self>,
3354 encoder: &mut ___E,
3355 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DirectoryRouterRouteResponse>,
3356 _: (),
3357 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3358 ::fidl_next::munge!(let crate::wire_optional::DirectoryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
3359
3360 if let Some(inner) = this {
3361 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
3362 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
3363 } else {
3364 ::fidl_next::wire::Union::encode_absent(raw);
3365 }
3366
3367 Ok(())
3368 }
3369 }
3370
3371 impl ::fidl_next::FromWire<crate::wire::DirectoryRouterRouteResponse>
3372 for DirectoryRouterRouteResponse
3373 {
3374 #[inline]
3375 fn from_wire(wire: crate::wire::DirectoryRouterRouteResponse) -> Self {
3376 let wire = ::core::mem::ManuallyDrop::new(wire);
3377 match wire.raw.ordinal() {
3378 1 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
3379 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
3380 ::fidl_next_fuchsia_io::Directory,
3381 ::fidl_next::wire::fuchsia::Channel,
3382 >>()
3383 })),
3384
3385 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
3386 wire.raw.get().read_unchecked::<crate::wire::Unit>()
3387 })),
3388
3389 _ => unsafe { ::core::hint::unreachable_unchecked() },
3390 }
3391 }
3392 }
3393
3394 impl ::fidl_next::FromWireOption<crate::wire_optional::DirectoryRouterRouteResponse>
3395 for DirectoryRouterRouteResponse
3396 {
3397 #[inline]
3398 fn from_wire_option(
3399 wire: crate::wire_optional::DirectoryRouterRouteResponse,
3400 ) -> ::core::option::Option<Self> {
3401 if let Some(inner) = wire.into_option() {
3402 Some(::fidl_next::FromWire::from_wire(inner))
3403 } else {
3404 None
3405 }
3406 }
3407 }
3408
3409 impl ::fidl_next::FromWireOption<crate::wire_optional::DirectoryRouterRouteResponse>
3410 for Box<DirectoryRouterRouteResponse>
3411 {
3412 #[inline]
3413 fn from_wire_option(
3414 wire: crate::wire_optional::DirectoryRouterRouteResponse,
3415 ) -> ::core::option::Option<Self> {
3416 <DirectoryRouterRouteResponse as ::fidl_next::FromWireOption<
3417 crate::wire_optional::DirectoryRouterRouteResponse,
3418 >>::from_wire_option(wire)
3419 .map(Box::new)
3420 }
3421 }
3422
3423 #[doc = " Contains a protocol open request.\n"]
3424 #[derive(Debug, PartialEq)]
3425 #[repr(C)]
3426 pub struct ProtocolPayload {
3427 pub channel: ::fidl_next::fuchsia::zx::Channel,
3428 }
3429
3430 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E> for ProtocolPayload
3431 where
3432 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3433 ___E: ::fidl_next::fuchsia::HandleEncoder,
3434 {
3435 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ProtocolPayload> = unsafe {
3436 ::fidl_next::CopyOptimization::enable_if(
3437 true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
3438 ::fidl_next::wire::fuchsia::Channel,
3439 ___E,
3440 >>::COPY_OPTIMIZATION
3441 .is_enabled(),
3442 )
3443 };
3444
3445 #[inline]
3446 fn encode(
3447 self,
3448 encoder_: &mut ___E,
3449 out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolPayload>,
3450 _: (),
3451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3452 ::fidl_next::munge! {
3453 let crate::wire::ProtocolPayload {
3454 channel,
3455
3456 } = out_;
3457 }
3458
3459 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
3460
3461 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(channel.as_mut_ptr()) };
3462
3463 Ok(())
3464 }
3465 }
3466
3467 unsafe impl<___E>
3468 ::fidl_next::EncodeOption<
3469 ::fidl_next::wire::Box<'static, crate::wire::ProtocolPayload>,
3470 ___E,
3471 > for ProtocolPayload
3472 where
3473 ___E: ::fidl_next::Encoder + ?Sized,
3474 ProtocolPayload: ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E>,
3475 {
3476 #[inline]
3477 fn encode_option(
3478 this: ::core::option::Option<Self>,
3479 encoder: &mut ___E,
3480 out: &mut ::core::mem::MaybeUninit<
3481 ::fidl_next::wire::Box<'static, crate::wire::ProtocolPayload>,
3482 >,
3483 _: (),
3484 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3485 if let Some(inner) = this {
3486 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3487 ::fidl_next::wire::Box::encode_present(out);
3488 } else {
3489 ::fidl_next::wire::Box::encode_absent(out);
3490 }
3491
3492 Ok(())
3493 }
3494 }
3495
3496 impl ::fidl_next::FromWire<crate::wire::ProtocolPayload> for ProtocolPayload {
3497 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ProtocolPayload, Self> = unsafe {
3498 ::fidl_next::CopyOptimization::enable_if(
3499 true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3500 ::fidl_next::wire::fuchsia::Channel,
3501 >>::COPY_OPTIMIZATION
3502 .is_enabled(),
3503 )
3504 };
3505
3506 #[inline]
3507 fn from_wire(wire: crate::wire::ProtocolPayload) -> Self {
3508 Self { channel: ::fidl_next::FromWire::from_wire(wire.channel) }
3509 }
3510 }
3511}
3512
3513pub mod wire {
3514
3515 pub use fidl_next_common_fuchsia_component_sandbox::wire::*;
3516
3517 pub type Token = ::fidl_next::wire::fuchsia::EventPair;
3519
3520 #[derive(Debug)]
3522 #[repr(C)]
3523 pub struct DirConnector {
3524 pub token: ::fidl_next::wire::fuchsia::EventPair,
3525 }
3526
3527 static_assertions::const_assert_eq!(std::mem::size_of::<DirConnector>(), 4);
3528 static_assertions::const_assert_eq!(std::mem::align_of::<DirConnector>(), 4);
3529
3530 static_assertions::const_assert_eq!(std::mem::offset_of!(DirConnector, token), 0);
3531
3532 impl ::fidl_next::Constrained for DirConnector {
3533 type Constraint = ();
3534
3535 fn validate(
3536 _: ::fidl_next::Slot<'_, Self>,
3537 _: Self::Constraint,
3538 ) -> Result<(), ::fidl_next::ValidationError> {
3539 Ok(())
3540 }
3541 }
3542
3543 unsafe impl ::fidl_next::Wire for DirConnector {
3544 type Narrowed<'de> = DirConnector;
3545
3546 #[inline]
3547 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3548 ::fidl_next::munge! {
3549 let Self {
3550 token,
3551
3552 } = &mut *out_;
3553 }
3554
3555 ::fidl_next::Wire::zero_padding(token);
3556 }
3557 }
3558
3559 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnector
3560 where
3561 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3562 ___D: ::fidl_next::fuchsia::HandleDecoder,
3563 {
3564 fn decode(
3565 slot_: ::fidl_next::Slot<'_, Self>,
3566 decoder_: &mut ___D,
3567 _: (),
3568 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3569 ::fidl_next::munge! {
3570 let Self {
3571 mut token,
3572
3573 } = slot_;
3574 }
3575
3576 let _field = token.as_mut();
3577
3578 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3579
3580 Ok(())
3581 }
3582 }
3583
3584 impl ::fidl_next::IntoNatural for DirConnector {
3585 type Natural = crate::natural::DirConnector;
3586 }
3587
3588 #[repr(C)]
3590 pub struct AggregateSource<'de> {
3591 pub(crate) table: ::fidl_next::wire::Table<'de>,
3592 }
3593
3594 impl<'de> Drop for AggregateSource<'de> {
3595 fn drop(&mut self) {
3596 let _ = self
3597 .table
3598 .get(1)
3599 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::DirConnector>() });
3600
3601 let _ = self.table.get(2)
3602 .map(|envelope| unsafe {
3603 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>()
3604 });
3605
3606 let _ = self.table.get(3).map(|envelope| unsafe {
3607 envelope.read_unchecked::<::fidl_next::wire::Vector<
3608 'de,
3609 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3610 >>()
3611 });
3612 }
3613 }
3614
3615 impl ::fidl_next::Constrained for AggregateSource<'_> {
3616 type Constraint = ();
3617
3618 fn validate(
3619 _: ::fidl_next::Slot<'_, Self>,
3620 _: Self::Constraint,
3621 ) -> Result<(), ::fidl_next::ValidationError> {
3622 Ok(())
3623 }
3624 }
3625
3626 unsafe impl ::fidl_next::Wire for AggregateSource<'static> {
3627 type Narrowed<'de> = AggregateSource<'de>;
3628
3629 #[inline]
3630 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3631 ::fidl_next::munge!(let Self { table } = out);
3632 ::fidl_next::wire::Table::zero_padding(table);
3633 }
3634 }
3635
3636 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AggregateSource<'de>
3637 where
3638 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3639 ___D: ::fidl_next::fuchsia::HandleDecoder,
3640 {
3641 fn decode(
3642 slot: ::fidl_next::Slot<'_, Self>,
3643 decoder: &mut ___D,
3644 _: (),
3645 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3646 ::fidl_next::munge!(let Self { table } = slot);
3647
3648 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3649 match ordinal {
3650 0 => unsafe { ::core::hint::unreachable_unchecked() },
3651
3652 1 => {
3653 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DirConnector>(
3654 slot.as_mut(),
3655 decoder,
3656 (),
3657 )?;
3658
3659 Ok(())
3660 }
3661
3662 2 => {
3663 ::fidl_next::wire::Envelope::decode_as::<
3664 ___D,
3665 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
3666 >(slot.as_mut(), decoder, (4294967295, 255))?;
3667
3668 Ok(())
3669 }
3670
3671 3 => {
3672 ::fidl_next::wire::Envelope::decode_as::<
3673 ___D,
3674 ::fidl_next::wire::Vector<
3675 'de,
3676 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3677 >,
3678 >(slot.as_mut(), decoder, (4294967295, ()))?;
3679
3680 Ok(())
3681 }
3682
3683 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3684 }
3685 })
3686 }
3687 }
3688
3689 impl<'de> AggregateSource<'de> {
3690 pub fn dir_connector(&self) -> ::core::option::Option<&crate::wire::DirConnector> {
3691 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3692 }
3693
3694 pub fn take_dir_connector(&mut self) -> ::core::option::Option<crate::wire::DirConnector> {
3695 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3696 }
3697
3698 pub fn source_instance_filter(
3699 &self,
3700 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>
3701 {
3702 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3703 }
3704
3705 pub fn take_source_instance_filter(
3706 &mut self,
3707 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>
3708 {
3709 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3710 }
3711
3712 pub fn renamed_instances(
3713 &self,
3714 ) -> ::core::option::Option<
3715 &::fidl_next::wire::Vector<
3716 'de,
3717 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3718 >,
3719 > {
3720 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3721 }
3722
3723 pub fn take_renamed_instances(
3724 &mut self,
3725 ) -> ::core::option::Option<
3726 ::fidl_next::wire::Vector<
3727 'de,
3728 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3729 >,
3730 > {
3731 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3732 }
3733 }
3734
3735 impl<'de> ::core::fmt::Debug for AggregateSource<'de> {
3736 fn fmt(
3737 &self,
3738 f: &mut ::core::fmt::Formatter<'_>,
3739 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3740 f.debug_struct("AggregateSource")
3741 .field("dir_connector", &self.dir_connector())
3742 .field("source_instance_filter", &self.source_instance_filter())
3743 .field("renamed_instances", &self.renamed_instances())
3744 .finish()
3745 }
3746 }
3747
3748 impl<'de> ::fidl_next::IntoNatural for AggregateSource<'de> {
3749 type Natural = crate::natural::AggregateSource;
3750 }
3751
3752 #[derive(Debug)]
3754 #[repr(C)]
3755 pub struct DictionaryRef {
3756 pub token: ::fidl_next::wire::fuchsia::EventPair,
3757 }
3758
3759 static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryRef>(), 4);
3760 static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryRef>(), 4);
3761
3762 static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryRef, token), 0);
3763
3764 impl ::fidl_next::Constrained for DictionaryRef {
3765 type Constraint = ();
3766
3767 fn validate(
3768 _: ::fidl_next::Slot<'_, Self>,
3769 _: Self::Constraint,
3770 ) -> Result<(), ::fidl_next::ValidationError> {
3771 Ok(())
3772 }
3773 }
3774
3775 unsafe impl ::fidl_next::Wire for DictionaryRef {
3776 type Narrowed<'de> = DictionaryRef;
3777
3778 #[inline]
3779 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3780 ::fidl_next::munge! {
3781 let Self {
3782 token,
3783
3784 } = &mut *out_;
3785 }
3786
3787 ::fidl_next::Wire::zero_padding(token);
3788 }
3789 }
3790
3791 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRef
3792 where
3793 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3794 ___D: ::fidl_next::fuchsia::HandleDecoder,
3795 {
3796 fn decode(
3797 slot_: ::fidl_next::Slot<'_, Self>,
3798 decoder_: &mut ___D,
3799 _: (),
3800 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3801 ::fidl_next::munge! {
3802 let Self {
3803 mut token,
3804
3805 } = slot_;
3806 }
3807
3808 let _field = token.as_mut();
3809
3810 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3811
3812 Ok(())
3813 }
3814 }
3815
3816 impl ::fidl_next::IntoNatural for DictionaryRef {
3817 type Natural = crate::natural::DictionaryRef;
3818 }
3819
3820 #[derive(Debug)]
3822 #[repr(C)]
3823 pub struct Connector {
3824 pub token: ::fidl_next::wire::fuchsia::EventPair,
3825 }
3826
3827 static_assertions::const_assert_eq!(std::mem::size_of::<Connector>(), 4);
3828 static_assertions::const_assert_eq!(std::mem::align_of::<Connector>(), 4);
3829
3830 static_assertions::const_assert_eq!(std::mem::offset_of!(Connector, token), 0);
3831
3832 impl ::fidl_next::Constrained for Connector {
3833 type Constraint = ();
3834
3835 fn validate(
3836 _: ::fidl_next::Slot<'_, Self>,
3837 _: Self::Constraint,
3838 ) -> Result<(), ::fidl_next::ValidationError> {
3839 Ok(())
3840 }
3841 }
3842
3843 unsafe impl ::fidl_next::Wire for Connector {
3844 type Narrowed<'de> = Connector;
3845
3846 #[inline]
3847 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3848 ::fidl_next::munge! {
3849 let Self {
3850 token,
3851
3852 } = &mut *out_;
3853 }
3854
3855 ::fidl_next::Wire::zero_padding(token);
3856 }
3857 }
3858
3859 unsafe impl<___D> ::fidl_next::Decode<___D> for Connector
3860 where
3861 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3862 ___D: ::fidl_next::fuchsia::HandleDecoder,
3863 {
3864 fn decode(
3865 slot_: ::fidl_next::Slot<'_, Self>,
3866 decoder_: &mut ___D,
3867 _: (),
3868 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3869 ::fidl_next::munge! {
3870 let Self {
3871 mut token,
3872
3873 } = slot_;
3874 }
3875
3876 let _field = token.as_mut();
3877
3878 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3879
3880 Ok(())
3881 }
3882 }
3883
3884 impl ::fidl_next::IntoNatural for Connector {
3885 type Natural = crate::natural::Connector;
3886 }
3887
3888 #[derive(Debug)]
3890 #[repr(C)]
3891 pub struct DirEntry {
3892 pub token: ::fidl_next::wire::fuchsia::EventPair,
3893 }
3894
3895 static_assertions::const_assert_eq!(std::mem::size_of::<DirEntry>(), 4);
3896 static_assertions::const_assert_eq!(std::mem::align_of::<DirEntry>(), 4);
3897
3898 static_assertions::const_assert_eq!(std::mem::offset_of!(DirEntry, token), 0);
3899
3900 impl ::fidl_next::Constrained for DirEntry {
3901 type Constraint = ();
3902
3903 fn validate(
3904 _: ::fidl_next::Slot<'_, Self>,
3905 _: Self::Constraint,
3906 ) -> Result<(), ::fidl_next::ValidationError> {
3907 Ok(())
3908 }
3909 }
3910
3911 unsafe impl ::fidl_next::Wire for DirEntry {
3912 type Narrowed<'de> = DirEntry;
3913
3914 #[inline]
3915 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3916 ::fidl_next::munge! {
3917 let Self {
3918 token,
3919
3920 } = &mut *out_;
3921 }
3922
3923 ::fidl_next::Wire::zero_padding(token);
3924 }
3925 }
3926
3927 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntry
3928 where
3929 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3930 ___D: ::fidl_next::fuchsia::HandleDecoder,
3931 {
3932 fn decode(
3933 slot_: ::fidl_next::Slot<'_, Self>,
3934 decoder_: &mut ___D,
3935 _: (),
3936 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3937 ::fidl_next::munge! {
3938 let Self {
3939 mut token,
3940
3941 } = slot_;
3942 }
3943
3944 let _field = token.as_mut();
3945
3946 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3947
3948 Ok(())
3949 }
3950 }
3951
3952 impl ::fidl_next::IntoNatural for DirEntry {
3953 type Natural = crate::natural::DirEntry;
3954 }
3955
3956 #[repr(transparent)]
3958 pub struct Capability<'de> {
3959 pub(crate) raw: ::fidl_next::wire::Union,
3960 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3961 }
3962
3963 impl<'de> Drop for Capability<'de> {
3964 fn drop(&mut self) {
3965 match self.raw.ordinal() {
3966 1 => {
3967 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
3968 }
3969
3970 2 => {
3971 let _ = unsafe {
3972 self.raw
3973 .get()
3974 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
3975 };
3976 }
3977
3978 3 => {
3979 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Data<'de>>() };
3980 }
3981
3982 4 => {
3983 let _ =
3984 unsafe { self.raw.get().read_unchecked::<crate::wire::DictionaryRef>() };
3985 }
3986
3987 5 => {
3988 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Connector>() };
3989 }
3990
3991 6 => {
3992 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirConnector>() };
3993 }
3994
3995 7 => {
3996 let _ = unsafe {
3997 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
3998 ::fidl_next_fuchsia_io::Directory,
3999 ::fidl_next::wire::fuchsia::Channel,
4000 >>()
4001 };
4002 }
4003
4004 8 => {
4005 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirEntry>() };
4006 }
4007
4008 9 => {
4009 let _ = unsafe {
4010 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4011 crate::ConnectorRouter,
4012 ::fidl_next::wire::fuchsia::Channel,
4013 >>()
4014 };
4015 }
4016
4017 10 => {
4018 let _ = unsafe {
4019 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4020 crate::DictionaryRouter,
4021 ::fidl_next::wire::fuchsia::Channel,
4022 >>()
4023 };
4024 }
4025
4026 11 => {
4027 let _ = unsafe {
4028 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4029 crate::DirEntryRouter,
4030 ::fidl_next::wire::fuchsia::Channel,
4031 >>()
4032 };
4033 }
4034
4035 12 => {
4036 let _ = unsafe {
4037 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4038 crate::DataRouter,
4039 ::fidl_next::wire::fuchsia::Channel,
4040 >>()
4041 };
4042 }
4043
4044 13 => {
4045 let _ = unsafe {
4046 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4047 crate::DirConnectorRouter,
4048 ::fidl_next::wire::fuchsia::Channel,
4049 >>()
4050 };
4051 }
4052
4053 _ => (),
4054 }
4055 }
4056 }
4057
4058 impl ::fidl_next::Constrained for Capability<'_> {
4059 type Constraint = ();
4060
4061 fn validate(
4062 _: ::fidl_next::Slot<'_, Self>,
4063 _: Self::Constraint,
4064 ) -> Result<(), ::fidl_next::ValidationError> {
4065 Ok(())
4066 }
4067 }
4068
4069 unsafe impl ::fidl_next::Wire for Capability<'static> {
4070 type Narrowed<'de> = Capability<'de>;
4071
4072 #[inline]
4073 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4074 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4075 ::fidl_next::wire::Union::zero_padding(raw);
4076 }
4077 }
4078
4079 pub mod capability {
4080 pub enum Ref<'de> {
4081 Unit(&'de crate::wire::Unit),
4082
4083 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
4084
4085 Data(&'de crate::wire::Data<'de>),
4086
4087 Dictionary(&'de crate::wire::DictionaryRef),
4088
4089 Connector(&'de crate::wire::Connector),
4090
4091 DirConnector(&'de crate::wire::DirConnector),
4092
4093 Directory(
4094 &'de ::fidl_next::ClientEnd<
4095 ::fidl_next_fuchsia_io::Directory,
4096 ::fidl_next::wire::fuchsia::Channel,
4097 >,
4098 ),
4099
4100 DirEntry(&'de crate::wire::DirEntry),
4101
4102 ConnectorRouter(
4103 &'de ::fidl_next::ClientEnd<
4104 crate::ConnectorRouter,
4105 ::fidl_next::wire::fuchsia::Channel,
4106 >,
4107 ),
4108
4109 DictionaryRouter(
4110 &'de ::fidl_next::ClientEnd<
4111 crate::DictionaryRouter,
4112 ::fidl_next::wire::fuchsia::Channel,
4113 >,
4114 ),
4115
4116 DirEntryRouter(
4117 &'de ::fidl_next::ClientEnd<
4118 crate::DirEntryRouter,
4119 ::fidl_next::wire::fuchsia::Channel,
4120 >,
4121 ),
4122
4123 DataRouter(
4124 &'de ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4125 ),
4126
4127 DirConnectorRouter(
4128 &'de ::fidl_next::ClientEnd<
4129 crate::DirConnectorRouter,
4130 ::fidl_next::wire::fuchsia::Channel,
4131 >,
4132 ),
4133
4134 UnknownOrdinal_(u64),
4135 }
4136
4137 pub enum Value<'de> {
4138 Unit(crate::wire::Unit),
4139
4140 Handle(::fidl_next::wire::fuchsia::NullableHandle),
4141
4142 Data(crate::wire::Data<'de>),
4143
4144 Dictionary(crate::wire::DictionaryRef),
4145
4146 Connector(crate::wire::Connector),
4147
4148 DirConnector(crate::wire::DirConnector),
4149
4150 Directory(
4151 ::fidl_next::ClientEnd<
4152 ::fidl_next_fuchsia_io::Directory,
4153 ::fidl_next::wire::fuchsia::Channel,
4154 >,
4155 ),
4156
4157 DirEntry(crate::wire::DirEntry),
4158
4159 ConnectorRouter(
4160 ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::wire::fuchsia::Channel>,
4161 ),
4162
4163 DictionaryRouter(
4164 ::fidl_next::ClientEnd<
4165 crate::DictionaryRouter,
4166 ::fidl_next::wire::fuchsia::Channel,
4167 >,
4168 ),
4169
4170 DirEntryRouter(
4171 ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::wire::fuchsia::Channel>,
4172 ),
4173
4174 DataRouter(
4175 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4176 ),
4177
4178 DirConnectorRouter(
4179 ::fidl_next::ClientEnd<
4180 crate::DirConnectorRouter,
4181 ::fidl_next::wire::fuchsia::Channel,
4182 >,
4183 ),
4184
4185 UnknownOrdinal_(u64),
4186 }
4187 }
4188
4189 impl<'de> Capability<'de> {
4190 pub fn as_ref(&self) -> crate::wire::capability::Ref<'_> {
4191 match self.raw.ordinal() {
4192 1 => crate::wire::capability::Ref::Unit(unsafe {
4193 self.raw.get().deref_unchecked::<crate::wire::Unit>()
4194 }),
4195
4196 2 => crate::wire::capability::Ref::Handle(unsafe {
4197 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4198 }),
4199
4200 3 => crate::wire::capability::Ref::Data(unsafe {
4201 self.raw.get().deref_unchecked::<crate::wire::Data<'_>>()
4202 }),
4203
4204 4 => crate::wire::capability::Ref::Dictionary(unsafe {
4205 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>()
4206 }),
4207
4208 5 => crate::wire::capability::Ref::Connector(unsafe {
4209 self.raw.get().deref_unchecked::<crate::wire::Connector>()
4210 }),
4211
4212 6 => crate::wire::capability::Ref::DirConnector(unsafe {
4213 self.raw.get().deref_unchecked::<crate::wire::DirConnector>()
4214 }),
4215
4216 7 => crate::wire::capability::Ref::Directory(unsafe {
4217 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4218 ::fidl_next_fuchsia_io::Directory,
4219 ::fidl_next::wire::fuchsia::Channel,
4220 >>()
4221 }),
4222
4223 8 => crate::wire::capability::Ref::DirEntry(unsafe {
4224 self.raw.get().deref_unchecked::<crate::wire::DirEntry>()
4225 }),
4226
4227 9 => crate::wire::capability::Ref::ConnectorRouter(unsafe {
4228 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4229 crate::ConnectorRouter,
4230 ::fidl_next::wire::fuchsia::Channel,
4231 >>()
4232 }),
4233
4234 10 => crate::wire::capability::Ref::DictionaryRouter(unsafe {
4235 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4236 crate::DictionaryRouter,
4237 ::fidl_next::wire::fuchsia::Channel,
4238 >>()
4239 }),
4240
4241 11 => crate::wire::capability::Ref::DirEntryRouter(unsafe {
4242 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4243 crate::DirEntryRouter,
4244 ::fidl_next::wire::fuchsia::Channel,
4245 >>()
4246 }),
4247
4248 12 => crate::wire::capability::Ref::DataRouter(unsafe {
4249 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4250 crate::DataRouter,
4251 ::fidl_next::wire::fuchsia::Channel,
4252 >>()
4253 }),
4254
4255 13 => crate::wire::capability::Ref::DirConnectorRouter(unsafe {
4256 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4257 crate::DirConnectorRouter,
4258 ::fidl_next::wire::fuchsia::Channel,
4259 >>()
4260 }),
4261
4262 unknown => crate::wire::capability::Ref::UnknownOrdinal_(unknown),
4263 }
4264 }
4265
4266 pub fn into_inner(self) -> crate::wire::capability::Value<'de> {
4267 let this = ::core::mem::ManuallyDrop::new(self);
4268
4269 match this.raw.ordinal() {
4270 1 => crate::wire::capability::Value::Unit(unsafe {
4271 this.raw.get().read_unchecked::<crate::wire::Unit>()
4272 }),
4273
4274 2 => crate::wire::capability::Value::Handle(unsafe {
4275 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4276 }),
4277
4278 3 => crate::wire::capability::Value::Data(unsafe {
4279 this.raw.get().read_unchecked::<crate::wire::Data<'de>>()
4280 }),
4281
4282 4 => crate::wire::capability::Value::Dictionary(unsafe {
4283 this.raw.get().read_unchecked::<crate::wire::DictionaryRef>()
4284 }),
4285
4286 5 => crate::wire::capability::Value::Connector(unsafe {
4287 this.raw.get().read_unchecked::<crate::wire::Connector>()
4288 }),
4289
4290 6 => crate::wire::capability::Value::DirConnector(unsafe {
4291 this.raw.get().read_unchecked::<crate::wire::DirConnector>()
4292 }),
4293
4294 7 => crate::wire::capability::Value::Directory(unsafe {
4295 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4296 ::fidl_next_fuchsia_io::Directory,
4297 ::fidl_next::wire::fuchsia::Channel,
4298 >>()
4299 }),
4300
4301 8 => crate::wire::capability::Value::DirEntry(unsafe {
4302 this.raw.get().read_unchecked::<crate::wire::DirEntry>()
4303 }),
4304
4305 9 => crate::wire::capability::Value::ConnectorRouter(unsafe {
4306 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4307 crate::ConnectorRouter,
4308 ::fidl_next::wire::fuchsia::Channel,
4309 >>()
4310 }),
4311
4312 10 => crate::wire::capability::Value::DictionaryRouter(unsafe {
4313 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4314 crate::DictionaryRouter,
4315 ::fidl_next::wire::fuchsia::Channel,
4316 >>()
4317 }),
4318
4319 11 => crate::wire::capability::Value::DirEntryRouter(unsafe {
4320 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4321 crate::DirEntryRouter,
4322 ::fidl_next::wire::fuchsia::Channel,
4323 >>()
4324 }),
4325
4326 12 => crate::wire::capability::Value::DataRouter(unsafe {
4327 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4328 crate::DataRouter,
4329 ::fidl_next::wire::fuchsia::Channel,
4330 >>()
4331 }),
4332
4333 13 => crate::wire::capability::Value::DirConnectorRouter(unsafe {
4334 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4335 crate::DirConnectorRouter,
4336 ::fidl_next::wire::fuchsia::Channel,
4337 >>()
4338 }),
4339
4340 unknown => crate::wire::capability::Value::UnknownOrdinal_(unknown),
4341 }
4342 }
4343 }
4344
4345 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Capability<'de>
4346 where
4347 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4348 ___D: ::fidl_next::Decoder<'de>,
4349 ___D: ::fidl_next::fuchsia::HandleDecoder,
4350 {
4351 fn decode(
4352 mut slot: ::fidl_next::Slot<'_, Self>,
4353 decoder: &mut ___D,
4354 _: (),
4355 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4356 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4357 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4358 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
4359 raw,
4360 decoder,
4361 (),
4362 )?,
4363
4364 2 => ::fidl_next::wire::Union::decode_as::<
4365 ___D,
4366 ::fidl_next::wire::fuchsia::NullableHandle,
4367 >(raw, decoder, ())?,
4368
4369 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
4370 raw,
4371 decoder,
4372 (),
4373 )?,
4374
4375 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DictionaryRef>(
4376 raw,
4377 decoder,
4378 (),
4379 )?,
4380
4381 5 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Connector>(
4382 raw,
4383 decoder,
4384 (),
4385 )?,
4386
4387 6 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirConnector>(
4388 raw,
4389 decoder,
4390 (),
4391 )?,
4392
4393 7 => ::fidl_next::wire::Union::decode_as::<
4394 ___D,
4395 ::fidl_next::ClientEnd<
4396 ::fidl_next_fuchsia_io::Directory,
4397 ::fidl_next::wire::fuchsia::Channel,
4398 >,
4399 >(raw, decoder, ())?,
4400
4401 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirEntry>(
4402 raw,
4403 decoder,
4404 (),
4405 )?,
4406
4407 9 => ::fidl_next::wire::Union::decode_as::<
4408 ___D,
4409 ::fidl_next::ClientEnd<
4410 crate::ConnectorRouter,
4411 ::fidl_next::wire::fuchsia::Channel,
4412 >,
4413 >(raw, decoder, ())?,
4414
4415 10 => ::fidl_next::wire::Union::decode_as::<
4416 ___D,
4417 ::fidl_next::ClientEnd<
4418 crate::DictionaryRouter,
4419 ::fidl_next::wire::fuchsia::Channel,
4420 >,
4421 >(raw, decoder, ())?,
4422
4423 11 => ::fidl_next::wire::Union::decode_as::<
4424 ___D,
4425 ::fidl_next::ClientEnd<
4426 crate::DirEntryRouter,
4427 ::fidl_next::wire::fuchsia::Channel,
4428 >,
4429 >(raw, decoder, ())?,
4430
4431 12 => ::fidl_next::wire::Union::decode_as::<
4432 ___D,
4433 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4434 >(raw, decoder, ())?,
4435
4436 13 => ::fidl_next::wire::Union::decode_as::<
4437 ___D,
4438 ::fidl_next::ClientEnd<
4439 crate::DirConnectorRouter,
4440 ::fidl_next::wire::fuchsia::Channel,
4441 >,
4442 >(raw, decoder, ())?,
4443
4444 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4445 }
4446
4447 Ok(())
4448 }
4449 }
4450
4451 impl<'de> ::core::fmt::Debug for Capability<'de> {
4452 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4453 match self.raw.ordinal() {
4454 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
4455 2 => unsafe {
4456 self.raw
4457 .get()
4458 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4459 .fmt(f)
4460 },
4461 3 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Data<'_>>().fmt(f) },
4462 4 => unsafe {
4463 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>().fmt(f)
4464 },
4465 5 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Connector>().fmt(f) },
4466 6 => unsafe {
4467 self.raw.get().deref_unchecked::<crate::wire::DirConnector>().fmt(f)
4468 },
4469 7 => unsafe {
4470 self.raw
4471 .get()
4472 .deref_unchecked::<::fidl_next::ClientEnd<
4473 ::fidl_next_fuchsia_io::Directory,
4474 ::fidl_next::wire::fuchsia::Channel,
4475 >>()
4476 .fmt(f)
4477 },
4478 8 => unsafe { self.raw.get().deref_unchecked::<crate::wire::DirEntry>().fmt(f) },
4479 9 => unsafe {
4480 self.raw
4481 .get()
4482 .deref_unchecked::<::fidl_next::ClientEnd<
4483 crate::ConnectorRouter,
4484 ::fidl_next::wire::fuchsia::Channel,
4485 >>()
4486 .fmt(f)
4487 },
4488 10 => unsafe {
4489 self.raw
4490 .get()
4491 .deref_unchecked::<::fidl_next::ClientEnd<
4492 crate::DictionaryRouter,
4493 ::fidl_next::wire::fuchsia::Channel,
4494 >>()
4495 .fmt(f)
4496 },
4497 11 => unsafe {
4498 self.raw
4499 .get()
4500 .deref_unchecked::<::fidl_next::ClientEnd<
4501 crate::DirEntryRouter,
4502 ::fidl_next::wire::fuchsia::Channel,
4503 >>()
4504 .fmt(f)
4505 },
4506 12 => unsafe {
4507 self.raw
4508 .get()
4509 .deref_unchecked::<::fidl_next::ClientEnd<
4510 crate::DataRouter,
4511 ::fidl_next::wire::fuchsia::Channel,
4512 >>()
4513 .fmt(f)
4514 },
4515 13 => unsafe {
4516 self.raw
4517 .get()
4518 .deref_unchecked::<::fidl_next::ClientEnd<
4519 crate::DirConnectorRouter,
4520 ::fidl_next::wire::fuchsia::Channel,
4521 >>()
4522 .fmt(f)
4523 },
4524 _ => unsafe { ::core::hint::unreachable_unchecked() },
4525 }
4526 }
4527 }
4528
4529 impl<'de> ::fidl_next::IntoNatural for Capability<'de> {
4530 type Natural = crate::natural::Capability;
4531 }
4532
4533 #[derive(Debug)]
4535 #[repr(C)]
4536 pub struct CapabilityStoreConnectorCreateRequest {
4537 pub id: ::fidl_next::wire::Uint64,
4538
4539 pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
4540 }
4541
4542 static_assertions::const_assert_eq!(
4543 std::mem::size_of::<CapabilityStoreConnectorCreateRequest>(),
4544 16
4545 );
4546 static_assertions::const_assert_eq!(
4547 std::mem::align_of::<CapabilityStoreConnectorCreateRequest>(),
4548 8
4549 );
4550
4551 static_assertions::const_assert_eq!(
4552 std::mem::offset_of!(CapabilityStoreConnectorCreateRequest, id),
4553 0
4554 );
4555
4556 static_assertions::const_assert_eq!(
4557 std::mem::offset_of!(CapabilityStoreConnectorCreateRequest, receiver),
4558 8
4559 );
4560
4561 impl ::fidl_next::Constrained for CapabilityStoreConnectorCreateRequest {
4562 type Constraint = ();
4563
4564 fn validate(
4565 _: ::fidl_next::Slot<'_, Self>,
4566 _: Self::Constraint,
4567 ) -> Result<(), ::fidl_next::ValidationError> {
4568 Ok(())
4569 }
4570 }
4571
4572 unsafe impl ::fidl_next::Wire for CapabilityStoreConnectorCreateRequest {
4573 type Narrowed<'de> = CapabilityStoreConnectorCreateRequest;
4574
4575 #[inline]
4576 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4577 ::fidl_next::munge! {
4578 let Self {
4579 id,
4580 receiver,
4581
4582 } = &mut *out_;
4583 }
4584
4585 ::fidl_next::Wire::zero_padding(id);
4586
4587 ::fidl_next::Wire::zero_padding(receiver);
4588
4589 unsafe {
4590 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4591 }
4592 }
4593 }
4594
4595 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreConnectorCreateRequest
4596 where
4597 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4598 ___D: ::fidl_next::fuchsia::HandleDecoder,
4599 {
4600 fn decode(
4601 slot_: ::fidl_next::Slot<'_, Self>,
4602 decoder_: &mut ___D,
4603 _: (),
4604 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4605 if slot_.as_bytes()[12..16] != [0u8; 4] {
4606 return Err(::fidl_next::DecodeError::InvalidPadding);
4607 }
4608
4609 ::fidl_next::munge! {
4610 let Self {
4611 mut id,
4612 mut receiver,
4613
4614 } = slot_;
4615 }
4616
4617 let _field = id.as_mut();
4618
4619 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4620
4621 let _field = receiver.as_mut();
4622
4623 ::fidl_next::Decode::decode(receiver.as_mut(), decoder_, ())?;
4624
4625 Ok(())
4626 }
4627 }
4628
4629 impl ::fidl_next::IntoNatural for CapabilityStoreConnectorCreateRequest {
4630 type Natural = crate::natural::CapabilityStoreConnectorCreateRequest;
4631 }
4632
4633 #[derive(Debug)]
4635 #[repr(C)]
4636 pub struct CapabilityStoreConnectorOpenRequest {
4637 pub id: ::fidl_next::wire::Uint64,
4638
4639 pub server_end: ::fidl_next::wire::fuchsia::Channel,
4640 }
4641
4642 static_assertions::const_assert_eq!(
4643 std::mem::size_of::<CapabilityStoreConnectorOpenRequest>(),
4644 16
4645 );
4646 static_assertions::const_assert_eq!(
4647 std::mem::align_of::<CapabilityStoreConnectorOpenRequest>(),
4648 8
4649 );
4650
4651 static_assertions::const_assert_eq!(
4652 std::mem::offset_of!(CapabilityStoreConnectorOpenRequest, id),
4653 0
4654 );
4655
4656 static_assertions::const_assert_eq!(
4657 std::mem::offset_of!(CapabilityStoreConnectorOpenRequest, server_end),
4658 8
4659 );
4660
4661 impl ::fidl_next::Constrained for CapabilityStoreConnectorOpenRequest {
4662 type Constraint = ();
4663
4664 fn validate(
4665 _: ::fidl_next::Slot<'_, Self>,
4666 _: Self::Constraint,
4667 ) -> Result<(), ::fidl_next::ValidationError> {
4668 Ok(())
4669 }
4670 }
4671
4672 unsafe impl ::fidl_next::Wire for CapabilityStoreConnectorOpenRequest {
4673 type Narrowed<'de> = CapabilityStoreConnectorOpenRequest;
4674
4675 #[inline]
4676 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4677 ::fidl_next::munge! {
4678 let Self {
4679 id,
4680 server_end,
4681
4682 } = &mut *out_;
4683 }
4684
4685 ::fidl_next::Wire::zero_padding(id);
4686
4687 ::fidl_next::Wire::zero_padding(server_end);
4688
4689 unsafe {
4690 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4691 }
4692 }
4693 }
4694
4695 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreConnectorOpenRequest
4696 where
4697 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4698 ___D: ::fidl_next::fuchsia::HandleDecoder,
4699 {
4700 fn decode(
4701 slot_: ::fidl_next::Slot<'_, Self>,
4702 decoder_: &mut ___D,
4703 _: (),
4704 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4705 if slot_.as_bytes()[12..16] != [0u8; 4] {
4706 return Err(::fidl_next::DecodeError::InvalidPadding);
4707 }
4708
4709 ::fidl_next::munge! {
4710 let Self {
4711 mut id,
4712 mut server_end,
4713
4714 } = slot_;
4715 }
4716
4717 let _field = id.as_mut();
4718
4719 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4720
4721 let _field = server_end.as_mut();
4722
4723 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
4724
4725 Ok(())
4726 }
4727 }
4728
4729 impl ::fidl_next::IntoNatural for CapabilityStoreConnectorOpenRequest {
4730 type Natural = crate::natural::CapabilityStoreConnectorOpenRequest;
4731 }
4732
4733 #[derive(Debug)]
4735 #[repr(C)]
4736 pub struct CapabilityStoreDirConnectorCreateRequest {
4737 pub id: ::fidl_next::wire::Uint64,
4738
4739 pub receiver:
4740 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
4741 }
4742
4743 static_assertions::const_assert_eq!(
4744 std::mem::size_of::<CapabilityStoreDirConnectorCreateRequest>(),
4745 16
4746 );
4747 static_assertions::const_assert_eq!(
4748 std::mem::align_of::<CapabilityStoreDirConnectorCreateRequest>(),
4749 8
4750 );
4751
4752 static_assertions::const_assert_eq!(
4753 std::mem::offset_of!(CapabilityStoreDirConnectorCreateRequest, id),
4754 0
4755 );
4756
4757 static_assertions::const_assert_eq!(
4758 std::mem::offset_of!(CapabilityStoreDirConnectorCreateRequest, receiver),
4759 8
4760 );
4761
4762 impl ::fidl_next::Constrained for CapabilityStoreDirConnectorCreateRequest {
4763 type Constraint = ();
4764
4765 fn validate(
4766 _: ::fidl_next::Slot<'_, Self>,
4767 _: Self::Constraint,
4768 ) -> Result<(), ::fidl_next::ValidationError> {
4769 Ok(())
4770 }
4771 }
4772
4773 unsafe impl ::fidl_next::Wire for CapabilityStoreDirConnectorCreateRequest {
4774 type Narrowed<'de> = CapabilityStoreDirConnectorCreateRequest;
4775
4776 #[inline]
4777 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4778 ::fidl_next::munge! {
4779 let Self {
4780 id,
4781 receiver,
4782
4783 } = &mut *out_;
4784 }
4785
4786 ::fidl_next::Wire::zero_padding(id);
4787
4788 ::fidl_next::Wire::zero_padding(receiver);
4789
4790 unsafe {
4791 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4792 }
4793 }
4794 }
4795
4796 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDirConnectorCreateRequest
4797 where
4798 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4799 ___D: ::fidl_next::fuchsia::HandleDecoder,
4800 {
4801 fn decode(
4802 slot_: ::fidl_next::Slot<'_, Self>,
4803 decoder_: &mut ___D,
4804 _: (),
4805 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4806 if slot_.as_bytes()[12..16] != [0u8; 4] {
4807 return Err(::fidl_next::DecodeError::InvalidPadding);
4808 }
4809
4810 ::fidl_next::munge! {
4811 let Self {
4812 mut id,
4813 mut receiver,
4814
4815 } = slot_;
4816 }
4817
4818 let _field = id.as_mut();
4819
4820 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4821
4822 let _field = receiver.as_mut();
4823
4824 ::fidl_next::Decode::decode(receiver.as_mut(), decoder_, ())?;
4825
4826 Ok(())
4827 }
4828 }
4829
4830 impl ::fidl_next::IntoNatural for CapabilityStoreDirConnectorCreateRequest {
4831 type Natural = crate::natural::CapabilityStoreDirConnectorCreateRequest;
4832 }
4833
4834 #[derive(Debug)]
4836 #[repr(C)]
4837 pub struct CapabilityStoreDictionaryLegacyImportRequest {
4838 pub id: ::fidl_next::wire::Uint64,
4839
4840 pub client_end: ::fidl_next::wire::fuchsia::Channel,
4841 }
4842
4843 static_assertions::const_assert_eq!(
4844 std::mem::size_of::<CapabilityStoreDictionaryLegacyImportRequest>(),
4845 16
4846 );
4847 static_assertions::const_assert_eq!(
4848 std::mem::align_of::<CapabilityStoreDictionaryLegacyImportRequest>(),
4849 8
4850 );
4851
4852 static_assertions::const_assert_eq!(
4853 std::mem::offset_of!(CapabilityStoreDictionaryLegacyImportRequest, id),
4854 0
4855 );
4856
4857 static_assertions::const_assert_eq!(
4858 std::mem::offset_of!(CapabilityStoreDictionaryLegacyImportRequest, client_end),
4859 8
4860 );
4861
4862 impl ::fidl_next::Constrained for CapabilityStoreDictionaryLegacyImportRequest {
4863 type Constraint = ();
4864
4865 fn validate(
4866 _: ::fidl_next::Slot<'_, Self>,
4867 _: Self::Constraint,
4868 ) -> Result<(), ::fidl_next::ValidationError> {
4869 Ok(())
4870 }
4871 }
4872
4873 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryLegacyImportRequest {
4874 type Narrowed<'de> = CapabilityStoreDictionaryLegacyImportRequest;
4875
4876 #[inline]
4877 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4878 ::fidl_next::munge! {
4879 let Self {
4880 id,
4881 client_end,
4882
4883 } = &mut *out_;
4884 }
4885
4886 ::fidl_next::Wire::zero_padding(id);
4887
4888 ::fidl_next::Wire::zero_padding(client_end);
4889
4890 unsafe {
4891 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4892 }
4893 }
4894 }
4895
4896 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryLegacyImportRequest
4897 where
4898 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4899 ___D: ::fidl_next::fuchsia::HandleDecoder,
4900 {
4901 fn decode(
4902 slot_: ::fidl_next::Slot<'_, Self>,
4903 decoder_: &mut ___D,
4904 _: (),
4905 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4906 if slot_.as_bytes()[12..16] != [0u8; 4] {
4907 return Err(::fidl_next::DecodeError::InvalidPadding);
4908 }
4909
4910 ::fidl_next::munge! {
4911 let Self {
4912 mut id,
4913 mut client_end,
4914
4915 } = slot_;
4916 }
4917
4918 let _field = id.as_mut();
4919
4920 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4921
4922 let _field = client_end.as_mut();
4923
4924 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
4925
4926 Ok(())
4927 }
4928 }
4929
4930 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryLegacyImportRequest {
4931 type Natural = crate::natural::CapabilityStoreDictionaryLegacyImportRequest;
4932 }
4933
4934 #[derive(Debug)]
4936 #[repr(C)]
4937 pub struct CapabilityStoreDictionaryLegacyExportRequest {
4938 pub id: ::fidl_next::wire::Uint64,
4939
4940 pub server_end: ::fidl_next::wire::fuchsia::Channel,
4941 }
4942
4943 static_assertions::const_assert_eq!(
4944 std::mem::size_of::<CapabilityStoreDictionaryLegacyExportRequest>(),
4945 16
4946 );
4947 static_assertions::const_assert_eq!(
4948 std::mem::align_of::<CapabilityStoreDictionaryLegacyExportRequest>(),
4949 8
4950 );
4951
4952 static_assertions::const_assert_eq!(
4953 std::mem::offset_of!(CapabilityStoreDictionaryLegacyExportRequest, id),
4954 0
4955 );
4956
4957 static_assertions::const_assert_eq!(
4958 std::mem::offset_of!(CapabilityStoreDictionaryLegacyExportRequest, server_end),
4959 8
4960 );
4961
4962 impl ::fidl_next::Constrained for CapabilityStoreDictionaryLegacyExportRequest {
4963 type Constraint = ();
4964
4965 fn validate(
4966 _: ::fidl_next::Slot<'_, Self>,
4967 _: Self::Constraint,
4968 ) -> Result<(), ::fidl_next::ValidationError> {
4969 Ok(())
4970 }
4971 }
4972
4973 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryLegacyExportRequest {
4974 type Narrowed<'de> = CapabilityStoreDictionaryLegacyExportRequest;
4975
4976 #[inline]
4977 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4978 ::fidl_next::munge! {
4979 let Self {
4980 id,
4981 server_end,
4982
4983 } = &mut *out_;
4984 }
4985
4986 ::fidl_next::Wire::zero_padding(id);
4987
4988 ::fidl_next::Wire::zero_padding(server_end);
4989
4990 unsafe {
4991 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4992 }
4993 }
4994 }
4995
4996 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryLegacyExportRequest
4997 where
4998 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4999 ___D: ::fidl_next::fuchsia::HandleDecoder,
5000 {
5001 fn decode(
5002 slot_: ::fidl_next::Slot<'_, Self>,
5003 decoder_: &mut ___D,
5004 _: (),
5005 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5006 if slot_.as_bytes()[12..16] != [0u8; 4] {
5007 return Err(::fidl_next::DecodeError::InvalidPadding);
5008 }
5009
5010 ::fidl_next::munge! {
5011 let Self {
5012 mut id,
5013 mut server_end,
5014
5015 } = slot_;
5016 }
5017
5018 let _field = id.as_mut();
5019
5020 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5021
5022 let _field = server_end.as_mut();
5023
5024 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
5025
5026 Ok(())
5027 }
5028 }
5029
5030 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryLegacyExportRequest {
5031 type Natural = crate::natural::CapabilityStoreDictionaryLegacyExportRequest;
5032 }
5033
5034 #[derive(Debug)]
5036 #[repr(C)]
5037 pub struct CapabilityStoreDictionaryKeysRequest {
5038 pub id: ::fidl_next::wire::Uint64,
5039
5040 pub iterator: ::fidl_next::ServerEnd<
5041 crate::DictionaryKeysIterator,
5042 ::fidl_next::wire::fuchsia::Channel,
5043 >,
5044 }
5045
5046 static_assertions::const_assert_eq!(
5047 std::mem::size_of::<CapabilityStoreDictionaryKeysRequest>(),
5048 16
5049 );
5050 static_assertions::const_assert_eq!(
5051 std::mem::align_of::<CapabilityStoreDictionaryKeysRequest>(),
5052 8
5053 );
5054
5055 static_assertions::const_assert_eq!(
5056 std::mem::offset_of!(CapabilityStoreDictionaryKeysRequest, id),
5057 0
5058 );
5059
5060 static_assertions::const_assert_eq!(
5061 std::mem::offset_of!(CapabilityStoreDictionaryKeysRequest, iterator),
5062 8
5063 );
5064
5065 impl ::fidl_next::Constrained for CapabilityStoreDictionaryKeysRequest {
5066 type Constraint = ();
5067
5068 fn validate(
5069 _: ::fidl_next::Slot<'_, Self>,
5070 _: Self::Constraint,
5071 ) -> Result<(), ::fidl_next::ValidationError> {
5072 Ok(())
5073 }
5074 }
5075
5076 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryKeysRequest {
5077 type Narrowed<'de> = CapabilityStoreDictionaryKeysRequest;
5078
5079 #[inline]
5080 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5081 ::fidl_next::munge! {
5082 let Self {
5083 id,
5084 iterator,
5085
5086 } = &mut *out_;
5087 }
5088
5089 ::fidl_next::Wire::zero_padding(id);
5090
5091 ::fidl_next::Wire::zero_padding(iterator);
5092
5093 unsafe {
5094 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5095 }
5096 }
5097 }
5098
5099 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryKeysRequest
5100 where
5101 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5102 ___D: ::fidl_next::fuchsia::HandleDecoder,
5103 {
5104 fn decode(
5105 slot_: ::fidl_next::Slot<'_, Self>,
5106 decoder_: &mut ___D,
5107 _: (),
5108 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5109 if slot_.as_bytes()[12..16] != [0u8; 4] {
5110 return Err(::fidl_next::DecodeError::InvalidPadding);
5111 }
5112
5113 ::fidl_next::munge! {
5114 let Self {
5115 mut id,
5116 mut iterator,
5117
5118 } = slot_;
5119 }
5120
5121 let _field = id.as_mut();
5122
5123 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5124
5125 let _field = iterator.as_mut();
5126
5127 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5128
5129 Ok(())
5130 }
5131 }
5132
5133 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryKeysRequest {
5134 type Natural = crate::natural::CapabilityStoreDictionaryKeysRequest;
5135 }
5136
5137 #[derive(Debug)]
5139 #[repr(C)]
5140 pub struct CapabilityStoreDictionaryEnumerateRequest {
5141 pub id: ::fidl_next::wire::Uint64,
5142
5143 pub iterator: ::fidl_next::ServerEnd<
5144 crate::DictionaryEnumerateIterator,
5145 ::fidl_next::wire::fuchsia::Channel,
5146 >,
5147 }
5148
5149 static_assertions::const_assert_eq!(
5150 std::mem::size_of::<CapabilityStoreDictionaryEnumerateRequest>(),
5151 16
5152 );
5153 static_assertions::const_assert_eq!(
5154 std::mem::align_of::<CapabilityStoreDictionaryEnumerateRequest>(),
5155 8
5156 );
5157
5158 static_assertions::const_assert_eq!(
5159 std::mem::offset_of!(CapabilityStoreDictionaryEnumerateRequest, id),
5160 0
5161 );
5162
5163 static_assertions::const_assert_eq!(
5164 std::mem::offset_of!(CapabilityStoreDictionaryEnumerateRequest, iterator),
5165 8
5166 );
5167
5168 impl ::fidl_next::Constrained for CapabilityStoreDictionaryEnumerateRequest {
5169 type Constraint = ();
5170
5171 fn validate(
5172 _: ::fidl_next::Slot<'_, Self>,
5173 _: Self::Constraint,
5174 ) -> Result<(), ::fidl_next::ValidationError> {
5175 Ok(())
5176 }
5177 }
5178
5179 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryEnumerateRequest {
5180 type Narrowed<'de> = CapabilityStoreDictionaryEnumerateRequest;
5181
5182 #[inline]
5183 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5184 ::fidl_next::munge! {
5185 let Self {
5186 id,
5187 iterator,
5188
5189 } = &mut *out_;
5190 }
5191
5192 ::fidl_next::Wire::zero_padding(id);
5193
5194 ::fidl_next::Wire::zero_padding(iterator);
5195
5196 unsafe {
5197 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5198 }
5199 }
5200 }
5201
5202 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryEnumerateRequest
5203 where
5204 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5205 ___D: ::fidl_next::fuchsia::HandleDecoder,
5206 {
5207 fn decode(
5208 slot_: ::fidl_next::Slot<'_, Self>,
5209 decoder_: &mut ___D,
5210 _: (),
5211 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5212 if slot_.as_bytes()[12..16] != [0u8; 4] {
5213 return Err(::fidl_next::DecodeError::InvalidPadding);
5214 }
5215
5216 ::fidl_next::munge! {
5217 let Self {
5218 mut id,
5219 mut iterator,
5220
5221 } = slot_;
5222 }
5223
5224 let _field = id.as_mut();
5225
5226 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5227
5228 let _field = iterator.as_mut();
5229
5230 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5231
5232 Ok(())
5233 }
5234 }
5235
5236 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryEnumerateRequest {
5237 type Natural = crate::natural::CapabilityStoreDictionaryEnumerateRequest;
5238 }
5239
5240 #[derive(Debug)]
5242 #[repr(C)]
5243 pub struct CapabilityStoreDictionaryDrainRequest {
5244 pub id: ::fidl_next::wire::Uint64,
5245
5246 pub iterator: ::fidl_next::ServerEnd<
5247 crate::DictionaryDrainIterator,
5248 ::fidl_next::wire::fuchsia::OptionalChannel,
5249 >,
5250 }
5251
5252 static_assertions::const_assert_eq!(
5253 std::mem::size_of::<CapabilityStoreDictionaryDrainRequest>(),
5254 16
5255 );
5256 static_assertions::const_assert_eq!(
5257 std::mem::align_of::<CapabilityStoreDictionaryDrainRequest>(),
5258 8
5259 );
5260
5261 static_assertions::const_assert_eq!(
5262 std::mem::offset_of!(CapabilityStoreDictionaryDrainRequest, id),
5263 0
5264 );
5265
5266 static_assertions::const_assert_eq!(
5267 std::mem::offset_of!(CapabilityStoreDictionaryDrainRequest, iterator),
5268 8
5269 );
5270
5271 impl ::fidl_next::Constrained for CapabilityStoreDictionaryDrainRequest {
5272 type Constraint = ();
5273
5274 fn validate(
5275 _: ::fidl_next::Slot<'_, Self>,
5276 _: Self::Constraint,
5277 ) -> Result<(), ::fidl_next::ValidationError> {
5278 Ok(())
5279 }
5280 }
5281
5282 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryDrainRequest {
5283 type Narrowed<'de> = CapabilityStoreDictionaryDrainRequest;
5284
5285 #[inline]
5286 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5287 ::fidl_next::munge! {
5288 let Self {
5289 id,
5290 iterator,
5291
5292 } = &mut *out_;
5293 }
5294
5295 ::fidl_next::Wire::zero_padding(id);
5296
5297 ::fidl_next::Wire::zero_padding(iterator);
5298
5299 unsafe {
5300 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5301 }
5302 }
5303 }
5304
5305 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryDrainRequest
5306 where
5307 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5308 ___D: ::fidl_next::fuchsia::HandleDecoder,
5309 {
5310 fn decode(
5311 slot_: ::fidl_next::Slot<'_, Self>,
5312 decoder_: &mut ___D,
5313 _: (),
5314 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5315 if slot_.as_bytes()[12..16] != [0u8; 4] {
5316 return Err(::fidl_next::DecodeError::InvalidPadding);
5317 }
5318
5319 ::fidl_next::munge! {
5320 let Self {
5321 mut id,
5322 mut iterator,
5323
5324 } = slot_;
5325 }
5326
5327 let _field = id.as_mut();
5328
5329 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5330
5331 let _field = iterator.as_mut();
5332
5333 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5334
5335 Ok(())
5336 }
5337 }
5338
5339 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryDrainRequest {
5340 type Natural = crate::natural::CapabilityStoreDictionaryDrainRequest;
5341 }
5342
5343 #[derive(Debug)]
5345 #[repr(C)]
5346 pub struct CapabilityStoreCreateServiceAggregateRequest<'de> {
5347 pub sources: ::fidl_next::wire::Vector<'de, crate::wire::AggregateSource<'de>>,
5348 }
5349
5350 static_assertions::const_assert_eq!(
5351 std::mem::size_of::<CapabilityStoreCreateServiceAggregateRequest<'_>>(),
5352 16
5353 );
5354 static_assertions::const_assert_eq!(
5355 std::mem::align_of::<CapabilityStoreCreateServiceAggregateRequest<'_>>(),
5356 8
5357 );
5358
5359 static_assertions::const_assert_eq!(
5360 std::mem::offset_of!(CapabilityStoreCreateServiceAggregateRequest<'_>, sources),
5361 0
5362 );
5363
5364 impl ::fidl_next::Constrained for CapabilityStoreCreateServiceAggregateRequest<'_> {
5365 type Constraint = ();
5366
5367 fn validate(
5368 _: ::fidl_next::Slot<'_, Self>,
5369 _: Self::Constraint,
5370 ) -> Result<(), ::fidl_next::ValidationError> {
5371 Ok(())
5372 }
5373 }
5374
5375 unsafe impl ::fidl_next::Wire for CapabilityStoreCreateServiceAggregateRequest<'static> {
5376 type Narrowed<'de> = CapabilityStoreCreateServiceAggregateRequest<'de>;
5377
5378 #[inline]
5379 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5380 ::fidl_next::munge! {
5381 let Self {
5382 sources,
5383
5384 } = &mut *out_;
5385 }
5386
5387 ::fidl_next::Wire::zero_padding(sources);
5388 }
5389 }
5390
5391 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
5392 for CapabilityStoreCreateServiceAggregateRequest<'de>
5393 where
5394 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5395 ___D: ::fidl_next::Decoder<'de>,
5396 ___D: ::fidl_next::fuchsia::HandleDecoder,
5397 {
5398 fn decode(
5399 slot_: ::fidl_next::Slot<'_, Self>,
5400 decoder_: &mut ___D,
5401 _: (),
5402 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5403 ::fidl_next::munge! {
5404 let Self {
5405 mut sources,
5406
5407 } = slot_;
5408 }
5409
5410 let _field = sources.as_mut();
5411 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5412 ::fidl_next::Decode::decode(sources.as_mut(), decoder_, (4294967295, ()))?;
5413
5414 Ok(())
5415 }
5416 }
5417
5418 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreCreateServiceAggregateRequest<'de> {
5419 type Natural = crate::natural::CapabilityStoreCreateServiceAggregateRequest;
5420 }
5421
5422 #[derive(Debug)]
5424 #[repr(C)]
5425 pub struct CapabilityStoreCreateServiceAggregateResponse {
5426 pub aggregate_dir_connector: crate::wire::DirConnector,
5427 }
5428
5429 static_assertions::const_assert_eq!(
5430 std::mem::size_of::<CapabilityStoreCreateServiceAggregateResponse>(),
5431 4
5432 );
5433 static_assertions::const_assert_eq!(
5434 std::mem::align_of::<CapabilityStoreCreateServiceAggregateResponse>(),
5435 4
5436 );
5437
5438 static_assertions::const_assert_eq!(
5439 std::mem::offset_of!(
5440 CapabilityStoreCreateServiceAggregateResponse,
5441 aggregate_dir_connector
5442 ),
5443 0
5444 );
5445
5446 impl ::fidl_next::Constrained for CapabilityStoreCreateServiceAggregateResponse {
5447 type Constraint = ();
5448
5449 fn validate(
5450 _: ::fidl_next::Slot<'_, Self>,
5451 _: Self::Constraint,
5452 ) -> Result<(), ::fidl_next::ValidationError> {
5453 Ok(())
5454 }
5455 }
5456
5457 unsafe impl ::fidl_next::Wire for CapabilityStoreCreateServiceAggregateResponse {
5458 type Narrowed<'de> = CapabilityStoreCreateServiceAggregateResponse;
5459
5460 #[inline]
5461 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5462 ::fidl_next::munge! {
5463 let Self {
5464 aggregate_dir_connector,
5465
5466 } = &mut *out_;
5467 }
5468
5469 ::fidl_next::Wire::zero_padding(aggregate_dir_connector);
5470 }
5471 }
5472
5473 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreCreateServiceAggregateResponse
5474 where
5475 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5476 ___D: ::fidl_next::fuchsia::HandleDecoder,
5477 {
5478 fn decode(
5479 slot_: ::fidl_next::Slot<'_, Self>,
5480 decoder_: &mut ___D,
5481 _: (),
5482 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5483 ::fidl_next::munge! {
5484 let Self {
5485 mut aggregate_dir_connector,
5486
5487 } = slot_;
5488 }
5489
5490 let _field = aggregate_dir_connector.as_mut();
5491
5492 ::fidl_next::Decode::decode(aggregate_dir_connector.as_mut(), decoder_, ())?;
5493
5494 Ok(())
5495 }
5496 }
5497
5498 impl ::fidl_next::IntoNatural for CapabilityStoreCreateServiceAggregateResponse {
5499 type Natural = crate::natural::CapabilityStoreCreateServiceAggregateResponse;
5500 }
5501
5502 #[derive(Debug)]
5504 #[repr(C)]
5505 pub struct CapabilityStoreExportResponse<'de> {
5506 pub capability: crate::wire::Capability<'de>,
5507 }
5508
5509 static_assertions::const_assert_eq!(
5510 std::mem::size_of::<CapabilityStoreExportResponse<'_>>(),
5511 16
5512 );
5513 static_assertions::const_assert_eq!(
5514 std::mem::align_of::<CapabilityStoreExportResponse<'_>>(),
5515 8
5516 );
5517
5518 static_assertions::const_assert_eq!(
5519 std::mem::offset_of!(CapabilityStoreExportResponse<'_>, capability),
5520 0
5521 );
5522
5523 impl ::fidl_next::Constrained for CapabilityStoreExportResponse<'_> {
5524 type Constraint = ();
5525
5526 fn validate(
5527 _: ::fidl_next::Slot<'_, Self>,
5528 _: Self::Constraint,
5529 ) -> Result<(), ::fidl_next::ValidationError> {
5530 Ok(())
5531 }
5532 }
5533
5534 unsafe impl ::fidl_next::Wire for CapabilityStoreExportResponse<'static> {
5535 type Narrowed<'de> = CapabilityStoreExportResponse<'de>;
5536
5537 #[inline]
5538 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5539 ::fidl_next::munge! {
5540 let Self {
5541 capability,
5542
5543 } = &mut *out_;
5544 }
5545
5546 ::fidl_next::Wire::zero_padding(capability);
5547 }
5548 }
5549
5550 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreExportResponse<'de>
5551 where
5552 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5553 ___D: ::fidl_next::Decoder<'de>,
5554 ___D: ::fidl_next::fuchsia::HandleDecoder,
5555 {
5556 fn decode(
5557 slot_: ::fidl_next::Slot<'_, Self>,
5558 decoder_: &mut ___D,
5559 _: (),
5560 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5561 ::fidl_next::munge! {
5562 let Self {
5563 mut capability,
5564
5565 } = slot_;
5566 }
5567
5568 let _field = capability.as_mut();
5569
5570 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5571
5572 Ok(())
5573 }
5574 }
5575
5576 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreExportResponse<'de> {
5577 type Natural = crate::natural::CapabilityStoreExportResponse;
5578 }
5579
5580 #[derive(Debug)]
5582 #[repr(C)]
5583 pub struct CapabilityStoreImportRequest<'de> {
5584 pub id: ::fidl_next::wire::Uint64,
5585
5586 pub capability: crate::wire::Capability<'de>,
5587 }
5588
5589 static_assertions::const_assert_eq!(
5590 std::mem::size_of::<CapabilityStoreImportRequest<'_>>(),
5591 24
5592 );
5593 static_assertions::const_assert_eq!(
5594 std::mem::align_of::<CapabilityStoreImportRequest<'_>>(),
5595 8
5596 );
5597
5598 static_assertions::const_assert_eq!(
5599 std::mem::offset_of!(CapabilityStoreImportRequest<'_>, id),
5600 0
5601 );
5602
5603 static_assertions::const_assert_eq!(
5604 std::mem::offset_of!(CapabilityStoreImportRequest<'_>, capability),
5605 8
5606 );
5607
5608 impl ::fidl_next::Constrained for CapabilityStoreImportRequest<'_> {
5609 type Constraint = ();
5610
5611 fn validate(
5612 _: ::fidl_next::Slot<'_, Self>,
5613 _: Self::Constraint,
5614 ) -> Result<(), ::fidl_next::ValidationError> {
5615 Ok(())
5616 }
5617 }
5618
5619 unsafe impl ::fidl_next::Wire for CapabilityStoreImportRequest<'static> {
5620 type Narrowed<'de> = CapabilityStoreImportRequest<'de>;
5621
5622 #[inline]
5623 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5624 ::fidl_next::munge! {
5625 let Self {
5626 id,
5627 capability,
5628
5629 } = &mut *out_;
5630 }
5631
5632 ::fidl_next::Wire::zero_padding(id);
5633
5634 ::fidl_next::Wire::zero_padding(capability);
5635 }
5636 }
5637
5638 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreImportRequest<'de>
5639 where
5640 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5641 ___D: ::fidl_next::Decoder<'de>,
5642 ___D: ::fidl_next::fuchsia::HandleDecoder,
5643 {
5644 fn decode(
5645 slot_: ::fidl_next::Slot<'_, Self>,
5646 decoder_: &mut ___D,
5647 _: (),
5648 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5649 ::fidl_next::munge! {
5650 let Self {
5651 mut id,
5652 mut capability,
5653
5654 } = slot_;
5655 }
5656
5657 let _field = id.as_mut();
5658
5659 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5660
5661 let _field = capability.as_mut();
5662
5663 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5664
5665 Ok(())
5666 }
5667 }
5668
5669 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreImportRequest<'de> {
5670 type Natural = crate::natural::CapabilityStoreImportRequest;
5671 }
5672
5673 #[repr(C)]
5675 pub struct CapabilityStoreDirConnectorOpenRequest<'de> {
5676 pub(crate) table: ::fidl_next::wire::Table<'de>,
5677 }
5678
5679 impl<'de> Drop for CapabilityStoreDirConnectorOpenRequest<'de> {
5680 fn drop(&mut self) {
5681 let _ = self
5682 .table
5683 .get(1)
5684 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
5685
5686 let _ = self.table.get(2).map(|envelope| unsafe {
5687 envelope.read_unchecked::<::fidl_next::ServerEnd<
5688 ::fidl_next_fuchsia_io::Directory,
5689 ::fidl_next::wire::fuchsia::Channel,
5690 >>()
5691 });
5692
5693 let _ = self.table.get(3).map(|envelope| unsafe {
5694 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
5695 });
5696
5697 let _ = self.table.get(4).map(|envelope| unsafe {
5698 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
5699 });
5700 }
5701 }
5702
5703 impl ::fidl_next::Constrained for CapabilityStoreDirConnectorOpenRequest<'_> {
5704 type Constraint = ();
5705
5706 fn validate(
5707 _: ::fidl_next::Slot<'_, Self>,
5708 _: Self::Constraint,
5709 ) -> Result<(), ::fidl_next::ValidationError> {
5710 Ok(())
5711 }
5712 }
5713
5714 unsafe impl ::fidl_next::Wire for CapabilityStoreDirConnectorOpenRequest<'static> {
5715 type Narrowed<'de> = CapabilityStoreDirConnectorOpenRequest<'de>;
5716
5717 #[inline]
5718 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5719 ::fidl_next::munge!(let Self { table } = out);
5720 ::fidl_next::wire::Table::zero_padding(table);
5721 }
5722 }
5723
5724 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreDirConnectorOpenRequest<'de>
5725 where
5726 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5727 ___D: ::fidl_next::fuchsia::HandleDecoder,
5728 {
5729 fn decode(
5730 slot: ::fidl_next::Slot<'_, Self>,
5731 decoder: &mut ___D,
5732 _: (),
5733 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5734 ::fidl_next::munge!(let Self { table } = slot);
5735
5736 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5737 match ordinal {
5738 0 => unsafe { ::core::hint::unreachable_unchecked() },
5739
5740 1 => {
5741 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
5742 slot.as_mut(),
5743 decoder,
5744 (),
5745 )?;
5746
5747 Ok(())
5748 }
5749
5750 2 => {
5751 ::fidl_next::wire::Envelope::decode_as::<
5752 ___D,
5753 ::fidl_next::ServerEnd<
5754 ::fidl_next_fuchsia_io::Directory,
5755 ::fidl_next::wire::fuchsia::Channel,
5756 >,
5757 >(slot.as_mut(), decoder, ())?;
5758
5759 Ok(())
5760 }
5761
5762 3 => {
5763 ::fidl_next::wire::Envelope::decode_as::<
5764 ___D,
5765 ::fidl_next_fuchsia_io::wire::Flags,
5766 >(slot.as_mut(), decoder, ())?;
5767
5768 Ok(())
5769 }
5770
5771 4 => {
5772 ::fidl_next::wire::Envelope::decode_as::<
5773 ___D,
5774 ::fidl_next::wire::String<'de>,
5775 >(slot.as_mut(), decoder, 4095)?;
5776
5777 let value = unsafe {
5778 slot.deref_unchecked()
5779 .deref_unchecked::<::fidl_next::wire::String<'_>>()
5780 };
5781
5782 if value.len() > 4095 {
5783 return Err(::fidl_next::DecodeError::VectorTooLong {
5784 size: value.len() as u64,
5785 limit: 4095,
5786 });
5787 }
5788
5789 Ok(())
5790 }
5791
5792 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5793 }
5794 })
5795 }
5796 }
5797
5798 impl<'de> CapabilityStoreDirConnectorOpenRequest<'de> {
5799 pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
5800 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5801 }
5802
5803 pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
5804 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
5805 }
5806
5807 pub fn server_end(
5808 &self,
5809 ) -> ::core::option::Option<
5810 &::fidl_next::ServerEnd<
5811 ::fidl_next_fuchsia_io::Directory,
5812 ::fidl_next::wire::fuchsia::Channel,
5813 >,
5814 > {
5815 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5816 }
5817
5818 pub fn take_server_end(
5819 &mut self,
5820 ) -> ::core::option::Option<
5821 ::fidl_next::ServerEnd<
5822 ::fidl_next_fuchsia_io::Directory,
5823 ::fidl_next::wire::fuchsia::Channel,
5824 >,
5825 > {
5826 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
5827 }
5828
5829 pub fn flags(&self) -> ::core::option::Option<&::fidl_next_fuchsia_io::wire::Flags> {
5830 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5831 }
5832
5833 pub fn take_flags(
5834 &mut self,
5835 ) -> ::core::option::Option<::fidl_next_fuchsia_io::wire::Flags> {
5836 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
5837 }
5838
5839 pub fn path(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
5840 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
5841 }
5842
5843 pub fn take_path(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
5844 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
5845 }
5846 }
5847
5848 impl<'de> ::core::fmt::Debug for CapabilityStoreDirConnectorOpenRequest<'de> {
5849 fn fmt(
5850 &self,
5851 f: &mut ::core::fmt::Formatter<'_>,
5852 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5853 f.debug_struct("CapabilityStoreDirConnectorOpenRequest")
5854 .field("id", &self.id())
5855 .field("server_end", &self.server_end())
5856 .field("flags", &self.flags())
5857 .field("path", &self.path())
5858 .finish()
5859 }
5860 }
5861
5862 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreDirConnectorOpenRequest<'de> {
5863 type Natural = crate::natural::CapabilityStoreDirConnectorOpenRequest;
5864 }
5865
5866 #[derive(Debug)]
5868 #[repr(C)]
5869 pub struct InstanceToken {
5870 pub token: ::fidl_next::wire::fuchsia::EventPair,
5871 }
5872
5873 static_assertions::const_assert_eq!(std::mem::size_of::<InstanceToken>(), 4);
5874 static_assertions::const_assert_eq!(std::mem::align_of::<InstanceToken>(), 4);
5875
5876 static_assertions::const_assert_eq!(std::mem::offset_of!(InstanceToken, token), 0);
5877
5878 impl ::fidl_next::Constrained for InstanceToken {
5879 type Constraint = ();
5880
5881 fn validate(
5882 _: ::fidl_next::Slot<'_, Self>,
5883 _: Self::Constraint,
5884 ) -> Result<(), ::fidl_next::ValidationError> {
5885 Ok(())
5886 }
5887 }
5888
5889 unsafe impl ::fidl_next::Wire for InstanceToken {
5890 type Narrowed<'de> = InstanceToken;
5891
5892 #[inline]
5893 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5894 ::fidl_next::munge! {
5895 let Self {
5896 token,
5897
5898 } = &mut *out_;
5899 }
5900
5901 ::fidl_next::Wire::zero_padding(token);
5902 }
5903 }
5904
5905 unsafe impl<___D> ::fidl_next::Decode<___D> for InstanceToken
5906 where
5907 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5908 ___D: ::fidl_next::fuchsia::HandleDecoder,
5909 {
5910 fn decode(
5911 slot_: ::fidl_next::Slot<'_, Self>,
5912 decoder_: &mut ___D,
5913 _: (),
5914 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5915 ::fidl_next::munge! {
5916 let Self {
5917 mut token,
5918
5919 } = slot_;
5920 }
5921
5922 let _field = token.as_mut();
5923
5924 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
5925
5926 Ok(())
5927 }
5928 }
5929
5930 impl ::fidl_next::IntoNatural for InstanceToken {
5931 type Natural = crate::natural::InstanceToken;
5932 }
5933
5934 #[repr(C)]
5936 pub struct RouteRequest<'de> {
5937 pub(crate) table: ::fidl_next::wire::Table<'de>,
5938 }
5939
5940 impl<'de> Drop for RouteRequest<'de> {
5941 fn drop(&mut self) {
5942 let _ = self
5943 .table
5944 .get(1)
5945 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::InstanceToken>() });
5946 }
5947 }
5948
5949 impl ::fidl_next::Constrained for RouteRequest<'_> {
5950 type Constraint = ();
5951
5952 fn validate(
5953 _: ::fidl_next::Slot<'_, Self>,
5954 _: Self::Constraint,
5955 ) -> Result<(), ::fidl_next::ValidationError> {
5956 Ok(())
5957 }
5958 }
5959
5960 unsafe impl ::fidl_next::Wire for RouteRequest<'static> {
5961 type Narrowed<'de> = RouteRequest<'de>;
5962
5963 #[inline]
5964 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5965 ::fidl_next::munge!(let Self { table } = out);
5966 ::fidl_next::wire::Table::zero_padding(table);
5967 }
5968 }
5969
5970 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RouteRequest<'de>
5971 where
5972 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5973 ___D: ::fidl_next::fuchsia::HandleDecoder,
5974 {
5975 fn decode(
5976 slot: ::fidl_next::Slot<'_, Self>,
5977 decoder: &mut ___D,
5978 _: (),
5979 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5980 ::fidl_next::munge!(let Self { table } = slot);
5981
5982 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5983 match ordinal {
5984 0 => unsafe { ::core::hint::unreachable_unchecked() },
5985
5986 1 => {
5987 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::InstanceToken>(
5988 slot.as_mut(),
5989 decoder,
5990 (),
5991 )?;
5992
5993 Ok(())
5994 }
5995
5996 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5997 }
5998 })
5999 }
6000 }
6001
6002 impl<'de> RouteRequest<'de> {
6003 pub fn requesting(&self) -> ::core::option::Option<&crate::wire::InstanceToken> {
6004 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6005 }
6006
6007 pub fn take_requesting(&mut self) -> ::core::option::Option<crate::wire::InstanceToken> {
6008 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6009 }
6010 }
6011
6012 impl<'de> ::core::fmt::Debug for RouteRequest<'de> {
6013 fn fmt(
6014 &self,
6015 f: &mut ::core::fmt::Formatter<'_>,
6016 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6017 f.debug_struct("RouteRequest").field("requesting", &self.requesting()).finish()
6018 }
6019 }
6020
6021 impl<'de> ::fidl_next::IntoNatural for RouteRequest<'de> {
6022 type Natural = crate::natural::RouteRequest;
6023 }
6024
6025 #[repr(transparent)]
6027 pub struct ConnectorRouterRouteResponse {
6028 pub(crate) raw: ::fidl_next::wire::Union,
6029 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6030 }
6031
6032 impl Drop for ConnectorRouterRouteResponse {
6033 fn drop(&mut self) {
6034 match self.raw.ordinal() {
6035 1 => {
6036 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Connector>() };
6037 }
6038
6039 2 => {
6040 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6041 }
6042
6043 _ => unsafe { ::core::hint::unreachable_unchecked() },
6044 }
6045 }
6046 }
6047
6048 impl ::fidl_next::Constrained for ConnectorRouterRouteResponse {
6049 type Constraint = ();
6050
6051 fn validate(
6052 _: ::fidl_next::Slot<'_, Self>,
6053 _: Self::Constraint,
6054 ) -> Result<(), ::fidl_next::ValidationError> {
6055 Ok(())
6056 }
6057 }
6058
6059 unsafe impl ::fidl_next::Wire for ConnectorRouterRouteResponse {
6060 type Narrowed<'de> = ConnectorRouterRouteResponse;
6061
6062 #[inline]
6063 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6064 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6065 ::fidl_next::wire::Union::zero_padding(raw);
6066 }
6067 }
6068
6069 pub mod connector_router_route_response {
6070 pub enum Ref<'de> {
6071 Connector(&'de crate::wire::Connector),
6072
6073 Unavailable(&'de crate::wire::Unit),
6074 }
6075
6076 pub enum Value {
6077 Connector(crate::wire::Connector),
6078
6079 Unavailable(crate::wire::Unit),
6080 }
6081 }
6082
6083 impl ConnectorRouterRouteResponse {
6084 pub fn as_ref(&self) -> crate::wire::connector_router_route_response::Ref<'_> {
6085 match self.raw.ordinal() {
6086 1 => crate::wire::connector_router_route_response::Ref::Connector(unsafe {
6087 self.raw.get().deref_unchecked::<crate::wire::Connector>()
6088 }),
6089
6090 2 => crate::wire::connector_router_route_response::Ref::Unavailable(unsafe {
6091 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6092 }),
6093
6094 _ => unsafe { ::core::hint::unreachable_unchecked() },
6095 }
6096 }
6097
6098 pub fn into_inner(self) -> crate::wire::connector_router_route_response::Value {
6099 let this = ::core::mem::ManuallyDrop::new(self);
6100
6101 match this.raw.ordinal() {
6102 1 => crate::wire::connector_router_route_response::Value::Connector(unsafe {
6103 this.raw.get().read_unchecked::<crate::wire::Connector>()
6104 }),
6105
6106 2 => crate::wire::connector_router_route_response::Value::Unavailable(unsafe {
6107 this.raw.get().read_unchecked::<crate::wire::Unit>()
6108 }),
6109
6110 _ => unsafe { ::core::hint::unreachable_unchecked() },
6111 }
6112 }
6113 }
6114
6115 unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorRouterRouteResponse
6116 where
6117 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6118 ___D: ::fidl_next::fuchsia::HandleDecoder,
6119 {
6120 fn decode(
6121 mut slot: ::fidl_next::Slot<'_, Self>,
6122 decoder: &mut ___D,
6123 _: (),
6124 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6125 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6126 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6127 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Connector>(
6128 raw,
6129 decoder,
6130 (),
6131 )?,
6132
6133 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6134 raw,
6135 decoder,
6136 (),
6137 )?,
6138
6139 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6140 }
6141
6142 Ok(())
6143 }
6144 }
6145
6146 impl ::core::fmt::Debug for ConnectorRouterRouteResponse {
6147 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6148 match self.raw.ordinal() {
6149 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Connector>().fmt(f) },
6150 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6151 _ => unsafe { ::core::hint::unreachable_unchecked() },
6152 }
6153 }
6154 }
6155
6156 impl ::fidl_next::IntoNatural for ConnectorRouterRouteResponse {
6157 type Natural = crate::natural::ConnectorRouterRouteResponse;
6158 }
6159
6160 #[repr(transparent)]
6162 pub struct DataRouterRouteResponse<'de> {
6163 pub(crate) raw: ::fidl_next::wire::Union,
6164 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
6165 }
6166
6167 impl<'de> Drop for DataRouterRouteResponse<'de> {
6168 fn drop(&mut self) {
6169 match self.raw.ordinal() {
6170 1 => {
6171 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Data<'de>>() };
6172 }
6173
6174 2 => {
6175 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6176 }
6177
6178 _ => unsafe { ::core::hint::unreachable_unchecked() },
6179 }
6180 }
6181 }
6182
6183 impl ::fidl_next::Constrained for DataRouterRouteResponse<'_> {
6184 type Constraint = ();
6185
6186 fn validate(
6187 _: ::fidl_next::Slot<'_, Self>,
6188 _: Self::Constraint,
6189 ) -> Result<(), ::fidl_next::ValidationError> {
6190 Ok(())
6191 }
6192 }
6193
6194 unsafe impl ::fidl_next::Wire for DataRouterRouteResponse<'static> {
6195 type Narrowed<'de> = DataRouterRouteResponse<'de>;
6196
6197 #[inline]
6198 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6199 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6200 ::fidl_next::wire::Union::zero_padding(raw);
6201 }
6202 }
6203
6204 pub mod data_router_route_response {
6205 pub enum Ref<'de> {
6206 Data(&'de crate::wire::Data<'de>),
6207
6208 Unavailable(&'de crate::wire::Unit),
6209 }
6210
6211 pub enum Value<'de> {
6212 Data(crate::wire::Data<'de>),
6213
6214 Unavailable(crate::wire::Unit),
6215 }
6216 }
6217
6218 impl<'de> DataRouterRouteResponse<'de> {
6219 pub fn as_ref(&self) -> crate::wire::data_router_route_response::Ref<'_> {
6220 match self.raw.ordinal() {
6221 1 => crate::wire::data_router_route_response::Ref::Data(unsafe {
6222 self.raw.get().deref_unchecked::<crate::wire::Data<'_>>()
6223 }),
6224
6225 2 => crate::wire::data_router_route_response::Ref::Unavailable(unsafe {
6226 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6227 }),
6228
6229 _ => unsafe { ::core::hint::unreachable_unchecked() },
6230 }
6231 }
6232
6233 pub fn into_inner(self) -> crate::wire::data_router_route_response::Value<'de> {
6234 let this = ::core::mem::ManuallyDrop::new(self);
6235
6236 match this.raw.ordinal() {
6237 1 => crate::wire::data_router_route_response::Value::Data(unsafe {
6238 this.raw.get().read_unchecked::<crate::wire::Data<'de>>()
6239 }),
6240
6241 2 => crate::wire::data_router_route_response::Value::Unavailable(unsafe {
6242 this.raw.get().read_unchecked::<crate::wire::Unit>()
6243 }),
6244
6245 _ => unsafe { ::core::hint::unreachable_unchecked() },
6246 }
6247 }
6248 }
6249
6250 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataRouterRouteResponse<'de>
6251 where
6252 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6253 ___D: ::fidl_next::Decoder<'de>,
6254 ___D: ::fidl_next::fuchsia::HandleDecoder,
6255 {
6256 fn decode(
6257 mut slot: ::fidl_next::Slot<'_, Self>,
6258 decoder: &mut ___D,
6259 _: (),
6260 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6261 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6262 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6263 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
6264 raw,
6265 decoder,
6266 (),
6267 )?,
6268
6269 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
6270 raw,
6271 decoder,
6272 (),
6273 )?,
6274
6275 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6276 }
6277
6278 Ok(())
6279 }
6280 }
6281
6282 impl<'de> ::core::fmt::Debug for DataRouterRouteResponse<'de> {
6283 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6284 match self.raw.ordinal() {
6285 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Data<'_>>().fmt(f) },
6286 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6287 _ => unsafe { ::core::hint::unreachable_unchecked() },
6288 }
6289 }
6290 }
6291
6292 impl<'de> ::fidl_next::IntoNatural for DataRouterRouteResponse<'de> {
6293 type Natural = crate::natural::DataRouterRouteResponse;
6294 }
6295
6296 #[derive(Debug)]
6298 #[repr(C)]
6299 pub struct DictionaryDrainIteratorGetNextResponse<'de> {
6300 pub items: ::fidl_next::wire::Vector<'de, crate::wire::DictionaryItem<'de>>,
6301
6302 pub end_id: ::fidl_next::wire::Uint64,
6303 }
6304
6305 static_assertions::const_assert_eq!(
6306 std::mem::size_of::<DictionaryDrainIteratorGetNextResponse<'_>>(),
6307 24
6308 );
6309 static_assertions::const_assert_eq!(
6310 std::mem::align_of::<DictionaryDrainIteratorGetNextResponse<'_>>(),
6311 8
6312 );
6313
6314 static_assertions::const_assert_eq!(
6315 std::mem::offset_of!(DictionaryDrainIteratorGetNextResponse<'_>, items),
6316 0
6317 );
6318
6319 static_assertions::const_assert_eq!(
6320 std::mem::offset_of!(DictionaryDrainIteratorGetNextResponse<'_>, end_id),
6321 16
6322 );
6323
6324 impl ::fidl_next::Constrained for DictionaryDrainIteratorGetNextResponse<'_> {
6325 type Constraint = ();
6326
6327 fn validate(
6328 _: ::fidl_next::Slot<'_, Self>,
6329 _: Self::Constraint,
6330 ) -> Result<(), ::fidl_next::ValidationError> {
6331 Ok(())
6332 }
6333 }
6334
6335 unsafe impl ::fidl_next::Wire for DictionaryDrainIteratorGetNextResponse<'static> {
6336 type Narrowed<'de> = DictionaryDrainIteratorGetNextResponse<'de>;
6337
6338 #[inline]
6339 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6340 ::fidl_next::munge! {
6341 let Self {
6342 items,
6343 end_id,
6344
6345 } = &mut *out_;
6346 }
6347
6348 ::fidl_next::Wire::zero_padding(items);
6349
6350 ::fidl_next::Wire::zero_padding(end_id);
6351 }
6352 }
6353
6354 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryDrainIteratorGetNextResponse<'de>
6355 where
6356 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6357 ___D: ::fidl_next::Decoder<'de>,
6358 ___D: ::fidl_next::fuchsia::HandleDecoder,
6359 {
6360 fn decode(
6361 slot_: ::fidl_next::Slot<'_, Self>,
6362 decoder_: &mut ___D,
6363 _: (),
6364 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6365 ::fidl_next::munge! {
6366 let Self {
6367 mut items,
6368 mut end_id,
6369
6370 } = slot_;
6371 }
6372
6373 let _field = items.as_mut();
6374 ::fidl_next::Constrained::validate(_field, (128, ()))?;
6375 ::fidl_next::Decode::decode(items.as_mut(), decoder_, (128, ()))?;
6376
6377 let items = unsafe { items.deref_unchecked() };
6378
6379 if items.len() > 128 {
6380 return Err(::fidl_next::DecodeError::VectorTooLong {
6381 size: items.len() as u64,
6382 limit: 128,
6383 });
6384 }
6385
6386 let _field = end_id.as_mut();
6387
6388 ::fidl_next::Decode::decode(end_id.as_mut(), decoder_, ())?;
6389
6390 Ok(())
6391 }
6392 }
6393
6394 impl<'de> ::fidl_next::IntoNatural for DictionaryDrainIteratorGetNextResponse<'de> {
6395 type Natural = crate::natural::DictionaryDrainIteratorGetNextResponse;
6396 }
6397
6398 #[derive(Debug)]
6400 #[repr(C)]
6401 pub struct DictionaryOptionalItem<'de> {
6402 pub key: ::fidl_next::wire::String<'de>,
6403
6404 pub value: ::fidl_next::wire::Box<'de, crate::wire::WrappedCapabilityId>,
6405 }
6406
6407 static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryOptionalItem<'_>>(), 24);
6408 static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryOptionalItem<'_>>(), 8);
6409
6410 static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryOptionalItem<'_>, key), 0);
6411
6412 static_assertions::const_assert_eq!(
6413 std::mem::offset_of!(DictionaryOptionalItem<'_>, value),
6414 16
6415 );
6416
6417 impl ::fidl_next::Constrained for DictionaryOptionalItem<'_> {
6418 type Constraint = ();
6419
6420 fn validate(
6421 _: ::fidl_next::Slot<'_, Self>,
6422 _: Self::Constraint,
6423 ) -> Result<(), ::fidl_next::ValidationError> {
6424 Ok(())
6425 }
6426 }
6427
6428 unsafe impl ::fidl_next::Wire for DictionaryOptionalItem<'static> {
6429 type Narrowed<'de> = DictionaryOptionalItem<'de>;
6430
6431 #[inline]
6432 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6433 ::fidl_next::munge! {
6434 let Self {
6435 key,
6436 value,
6437
6438 } = &mut *out_;
6439 }
6440
6441 ::fidl_next::Wire::zero_padding(key);
6442
6443 ::fidl_next::Wire::zero_padding(value);
6444 }
6445 }
6446
6447 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryOptionalItem<'de>
6448 where
6449 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6450 ___D: ::fidl_next::Decoder<'de>,
6451 ___D: ::fidl_next::fuchsia::HandleDecoder,
6452 {
6453 fn decode(
6454 slot_: ::fidl_next::Slot<'_, Self>,
6455 decoder_: &mut ___D,
6456 _: (),
6457 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6458 ::fidl_next::munge! {
6459 let Self {
6460 mut key,
6461 mut value,
6462
6463 } = slot_;
6464 }
6465
6466 let _field = key.as_mut();
6467 ::fidl_next::Constrained::validate(_field, 255)?;
6468 ::fidl_next::Decode::decode(key.as_mut(), decoder_, 255)?;
6469
6470 let key = unsafe { key.deref_unchecked() };
6471
6472 if key.len() > 255 {
6473 return Err(::fidl_next::DecodeError::VectorTooLong {
6474 size: key.len() as u64,
6475 limit: 255,
6476 });
6477 }
6478
6479 let _field = value.as_mut();
6480
6481 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
6482
6483 Ok(())
6484 }
6485 }
6486
6487 impl<'de> ::fidl_next::IntoNatural for DictionaryOptionalItem<'de> {
6488 type Natural = crate::natural::DictionaryOptionalItem;
6489 }
6490
6491 #[derive(Debug)]
6493 #[repr(C)]
6494 pub struct DictionaryEnumerateIteratorGetNextResponse<'de> {
6495 pub items: ::fidl_next::wire::Vector<'de, crate::wire::DictionaryOptionalItem<'de>>,
6496
6497 pub end_id: ::fidl_next::wire::Uint64,
6498 }
6499
6500 static_assertions::const_assert_eq!(
6501 std::mem::size_of::<DictionaryEnumerateIteratorGetNextResponse<'_>>(),
6502 24
6503 );
6504 static_assertions::const_assert_eq!(
6505 std::mem::align_of::<DictionaryEnumerateIteratorGetNextResponse<'_>>(),
6506 8
6507 );
6508
6509 static_assertions::const_assert_eq!(
6510 std::mem::offset_of!(DictionaryEnumerateIteratorGetNextResponse<'_>, items),
6511 0
6512 );
6513
6514 static_assertions::const_assert_eq!(
6515 std::mem::offset_of!(DictionaryEnumerateIteratorGetNextResponse<'_>, end_id),
6516 16
6517 );
6518
6519 impl ::fidl_next::Constrained for DictionaryEnumerateIteratorGetNextResponse<'_> {
6520 type Constraint = ();
6521
6522 fn validate(
6523 _: ::fidl_next::Slot<'_, Self>,
6524 _: Self::Constraint,
6525 ) -> Result<(), ::fidl_next::ValidationError> {
6526 Ok(())
6527 }
6528 }
6529
6530 unsafe impl ::fidl_next::Wire for DictionaryEnumerateIteratorGetNextResponse<'static> {
6531 type Narrowed<'de> = DictionaryEnumerateIteratorGetNextResponse<'de>;
6532
6533 #[inline]
6534 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6535 ::fidl_next::munge! {
6536 let Self {
6537 items,
6538 end_id,
6539
6540 } = &mut *out_;
6541 }
6542
6543 ::fidl_next::Wire::zero_padding(items);
6544
6545 ::fidl_next::Wire::zero_padding(end_id);
6546 }
6547 }
6548
6549 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryEnumerateIteratorGetNextResponse<'de>
6550 where
6551 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6552 ___D: ::fidl_next::Decoder<'de>,
6553 ___D: ::fidl_next::fuchsia::HandleDecoder,
6554 {
6555 fn decode(
6556 slot_: ::fidl_next::Slot<'_, Self>,
6557 decoder_: &mut ___D,
6558 _: (),
6559 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6560 ::fidl_next::munge! {
6561 let Self {
6562 mut items,
6563 mut end_id,
6564
6565 } = slot_;
6566 }
6567
6568 let _field = items.as_mut();
6569 ::fidl_next::Constrained::validate(_field, (128, ()))?;
6570 ::fidl_next::Decode::decode(items.as_mut(), decoder_, (128, ()))?;
6571
6572 let items = unsafe { items.deref_unchecked() };
6573
6574 if items.len() > 128 {
6575 return Err(::fidl_next::DecodeError::VectorTooLong {
6576 size: items.len() as u64,
6577 limit: 128,
6578 });
6579 }
6580
6581 let _field = end_id.as_mut();
6582
6583 ::fidl_next::Decode::decode(end_id.as_mut(), decoder_, ())?;
6584
6585 Ok(())
6586 }
6587 }
6588
6589 impl<'de> ::fidl_next::IntoNatural for DictionaryEnumerateIteratorGetNextResponse<'de> {
6590 type Natural = crate::natural::DictionaryEnumerateIteratorGetNextResponse;
6591 }
6592
6593 #[derive(Debug)]
6595 #[repr(C)]
6596 pub struct DictionaryKeysIteratorGetNextResponse<'de> {
6597 pub keys: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
6598 }
6599
6600 static_assertions::const_assert_eq!(
6601 std::mem::size_of::<DictionaryKeysIteratorGetNextResponse<'_>>(),
6602 16
6603 );
6604 static_assertions::const_assert_eq!(
6605 std::mem::align_of::<DictionaryKeysIteratorGetNextResponse<'_>>(),
6606 8
6607 );
6608
6609 static_assertions::const_assert_eq!(
6610 std::mem::offset_of!(DictionaryKeysIteratorGetNextResponse<'_>, keys),
6611 0
6612 );
6613
6614 impl ::fidl_next::Constrained for DictionaryKeysIteratorGetNextResponse<'_> {
6615 type Constraint = ();
6616
6617 fn validate(
6618 _: ::fidl_next::Slot<'_, Self>,
6619 _: Self::Constraint,
6620 ) -> Result<(), ::fidl_next::ValidationError> {
6621 Ok(())
6622 }
6623 }
6624
6625 unsafe impl ::fidl_next::Wire for DictionaryKeysIteratorGetNextResponse<'static> {
6626 type Narrowed<'de> = DictionaryKeysIteratorGetNextResponse<'de>;
6627
6628 #[inline]
6629 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6630 ::fidl_next::munge! {
6631 let Self {
6632 keys,
6633
6634 } = &mut *out_;
6635 }
6636
6637 ::fidl_next::Wire::zero_padding(keys);
6638 }
6639 }
6640
6641 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryKeysIteratorGetNextResponse<'de>
6642 where
6643 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6644 ___D: ::fidl_next::Decoder<'de>,
6645 ___D: ::fidl_next::fuchsia::HandleDecoder,
6646 {
6647 fn decode(
6648 slot_: ::fidl_next::Slot<'_, Self>,
6649 decoder_: &mut ___D,
6650 _: (),
6651 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6652 ::fidl_next::munge! {
6653 let Self {
6654 mut keys,
6655
6656 } = slot_;
6657 }
6658
6659 let _field = keys.as_mut();
6660 ::fidl_next::Constrained::validate(_field, (128, 255))?;
6661 ::fidl_next::Decode::decode(keys.as_mut(), decoder_, (128, 255))?;
6662
6663 let keys = unsafe { keys.deref_unchecked() };
6664
6665 if keys.len() > 128 {
6666 return Err(::fidl_next::DecodeError::VectorTooLong {
6667 size: keys.len() as u64,
6668 limit: 128,
6669 });
6670 }
6671
6672 Ok(())
6673 }
6674 }
6675
6676 impl<'de> ::fidl_next::IntoNatural for DictionaryKeysIteratorGetNextResponse<'de> {
6677 type Natural = crate::natural::DictionaryKeysIteratorGetNextResponse;
6678 }
6679
6680 #[repr(transparent)]
6682 pub struct DictionaryRouterRouteResponse {
6683 pub(crate) raw: ::fidl_next::wire::Union,
6684 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6685 }
6686
6687 impl Drop for DictionaryRouterRouteResponse {
6688 fn drop(&mut self) {
6689 match self.raw.ordinal() {
6690 1 => {
6691 let _ =
6692 unsafe { self.raw.get().read_unchecked::<crate::wire::DictionaryRef>() };
6693 }
6694
6695 2 => {
6696 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6697 }
6698
6699 _ => unsafe { ::core::hint::unreachable_unchecked() },
6700 }
6701 }
6702 }
6703
6704 impl ::fidl_next::Constrained for DictionaryRouterRouteResponse {
6705 type Constraint = ();
6706
6707 fn validate(
6708 _: ::fidl_next::Slot<'_, Self>,
6709 _: Self::Constraint,
6710 ) -> Result<(), ::fidl_next::ValidationError> {
6711 Ok(())
6712 }
6713 }
6714
6715 unsafe impl ::fidl_next::Wire for DictionaryRouterRouteResponse {
6716 type Narrowed<'de> = DictionaryRouterRouteResponse;
6717
6718 #[inline]
6719 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6720 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6721 ::fidl_next::wire::Union::zero_padding(raw);
6722 }
6723 }
6724
6725 pub mod dictionary_router_route_response {
6726 pub enum Ref<'de> {
6727 Dictionary(&'de crate::wire::DictionaryRef),
6728
6729 Unavailable(&'de crate::wire::Unit),
6730 }
6731
6732 pub enum Value {
6733 Dictionary(crate::wire::DictionaryRef),
6734
6735 Unavailable(crate::wire::Unit),
6736 }
6737 }
6738
6739 impl DictionaryRouterRouteResponse {
6740 pub fn as_ref(&self) -> crate::wire::dictionary_router_route_response::Ref<'_> {
6741 match self.raw.ordinal() {
6742 1 => crate::wire::dictionary_router_route_response::Ref::Dictionary(unsafe {
6743 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>()
6744 }),
6745
6746 2 => crate::wire::dictionary_router_route_response::Ref::Unavailable(unsafe {
6747 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6748 }),
6749
6750 _ => unsafe { ::core::hint::unreachable_unchecked() },
6751 }
6752 }
6753
6754 pub fn into_inner(self) -> crate::wire::dictionary_router_route_response::Value {
6755 let this = ::core::mem::ManuallyDrop::new(self);
6756
6757 match this.raw.ordinal() {
6758 1 => crate::wire::dictionary_router_route_response::Value::Dictionary(unsafe {
6759 this.raw.get().read_unchecked::<crate::wire::DictionaryRef>()
6760 }),
6761
6762 2 => crate::wire::dictionary_router_route_response::Value::Unavailable(unsafe {
6763 this.raw.get().read_unchecked::<crate::wire::Unit>()
6764 }),
6765
6766 _ => unsafe { ::core::hint::unreachable_unchecked() },
6767 }
6768 }
6769 }
6770
6771 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRouterRouteResponse
6772 where
6773 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6774 ___D: ::fidl_next::fuchsia::HandleDecoder,
6775 {
6776 fn decode(
6777 mut slot: ::fidl_next::Slot<'_, Self>,
6778 decoder: &mut ___D,
6779 _: (),
6780 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6781 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6782 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6783 1 => {
6784 ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DictionaryRef>(
6785 raw,
6786 decoder,
6787 (),
6788 )?
6789 }
6790
6791 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6792 raw,
6793 decoder,
6794 (),
6795 )?,
6796
6797 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6798 }
6799
6800 Ok(())
6801 }
6802 }
6803
6804 impl ::core::fmt::Debug for DictionaryRouterRouteResponse {
6805 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6806 match self.raw.ordinal() {
6807 1 => unsafe {
6808 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>().fmt(f)
6809 },
6810 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6811 _ => unsafe { ::core::hint::unreachable_unchecked() },
6812 }
6813 }
6814 }
6815
6816 impl ::fidl_next::IntoNatural for DictionaryRouterRouteResponse {
6817 type Natural = crate::natural::DictionaryRouterRouteResponse;
6818 }
6819
6820 #[repr(transparent)]
6822 pub struct DirConnectorRouterRouteResponse {
6823 pub(crate) raw: ::fidl_next::wire::Union,
6824 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6825 }
6826
6827 impl Drop for DirConnectorRouterRouteResponse {
6828 fn drop(&mut self) {
6829 match self.raw.ordinal() {
6830 1 => {
6831 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirConnector>() };
6832 }
6833
6834 2 => {
6835 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6836 }
6837
6838 _ => unsafe { ::core::hint::unreachable_unchecked() },
6839 }
6840 }
6841 }
6842
6843 impl ::fidl_next::Constrained for DirConnectorRouterRouteResponse {
6844 type Constraint = ();
6845
6846 fn validate(
6847 _: ::fidl_next::Slot<'_, Self>,
6848 _: Self::Constraint,
6849 ) -> Result<(), ::fidl_next::ValidationError> {
6850 Ok(())
6851 }
6852 }
6853
6854 unsafe impl ::fidl_next::Wire for DirConnectorRouterRouteResponse {
6855 type Narrowed<'de> = DirConnectorRouterRouteResponse;
6856
6857 #[inline]
6858 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6859 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6860 ::fidl_next::wire::Union::zero_padding(raw);
6861 }
6862 }
6863
6864 pub mod dir_connector_router_route_response {
6865 pub enum Ref<'de> {
6866 DirConnector(&'de crate::wire::DirConnector),
6867
6868 Unavailable(&'de crate::wire::Unit),
6869 }
6870
6871 pub enum Value {
6872 DirConnector(crate::wire::DirConnector),
6873
6874 Unavailable(crate::wire::Unit),
6875 }
6876 }
6877
6878 impl DirConnectorRouterRouteResponse {
6879 pub fn as_ref(&self) -> crate::wire::dir_connector_router_route_response::Ref<'_> {
6880 match self.raw.ordinal() {
6881 1 => crate::wire::dir_connector_router_route_response::Ref::DirConnector(unsafe {
6882 self.raw.get().deref_unchecked::<crate::wire::DirConnector>()
6883 }),
6884
6885 2 => crate::wire::dir_connector_router_route_response::Ref::Unavailable(unsafe {
6886 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6887 }),
6888
6889 _ => unsafe { ::core::hint::unreachable_unchecked() },
6890 }
6891 }
6892
6893 pub fn into_inner(self) -> crate::wire::dir_connector_router_route_response::Value {
6894 let this = ::core::mem::ManuallyDrop::new(self);
6895
6896 match this.raw.ordinal() {
6897 1 => {
6898 crate::wire::dir_connector_router_route_response::Value::DirConnector(unsafe {
6899 this.raw.get().read_unchecked::<crate::wire::DirConnector>()
6900 })
6901 }
6902
6903 2 => crate::wire::dir_connector_router_route_response::Value::Unavailable(unsafe {
6904 this.raw.get().read_unchecked::<crate::wire::Unit>()
6905 }),
6906
6907 _ => unsafe { ::core::hint::unreachable_unchecked() },
6908 }
6909 }
6910 }
6911
6912 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnectorRouterRouteResponse
6913 where
6914 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6915 ___D: ::fidl_next::fuchsia::HandleDecoder,
6916 {
6917 fn decode(
6918 mut slot: ::fidl_next::Slot<'_, Self>,
6919 decoder: &mut ___D,
6920 _: (),
6921 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6922 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6923 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6924 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirConnector>(
6925 raw,
6926 decoder,
6927 (),
6928 )?,
6929
6930 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6931 raw,
6932 decoder,
6933 (),
6934 )?,
6935
6936 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6937 }
6938
6939 Ok(())
6940 }
6941 }
6942
6943 impl ::core::fmt::Debug for DirConnectorRouterRouteResponse {
6944 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6945 match self.raw.ordinal() {
6946 1 => unsafe {
6947 self.raw.get().deref_unchecked::<crate::wire::DirConnector>().fmt(f)
6948 },
6949 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6950 _ => unsafe { ::core::hint::unreachable_unchecked() },
6951 }
6952 }
6953 }
6954
6955 impl ::fidl_next::IntoNatural for DirConnectorRouterRouteResponse {
6956 type Natural = crate::natural::DirConnectorRouterRouteResponse;
6957 }
6958
6959 #[repr(transparent)]
6961 pub struct DirEntryRouterRouteResponse {
6962 pub(crate) raw: ::fidl_next::wire::Union,
6963 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6964 }
6965
6966 impl Drop for DirEntryRouterRouteResponse {
6967 fn drop(&mut self) {
6968 match self.raw.ordinal() {
6969 1 => {
6970 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirEntry>() };
6971 }
6972
6973 2 => {
6974 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6975 }
6976
6977 _ => unsafe { ::core::hint::unreachable_unchecked() },
6978 }
6979 }
6980 }
6981
6982 impl ::fidl_next::Constrained for DirEntryRouterRouteResponse {
6983 type Constraint = ();
6984
6985 fn validate(
6986 _: ::fidl_next::Slot<'_, Self>,
6987 _: Self::Constraint,
6988 ) -> Result<(), ::fidl_next::ValidationError> {
6989 Ok(())
6990 }
6991 }
6992
6993 unsafe impl ::fidl_next::Wire for DirEntryRouterRouteResponse {
6994 type Narrowed<'de> = DirEntryRouterRouteResponse;
6995
6996 #[inline]
6997 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6998 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6999 ::fidl_next::wire::Union::zero_padding(raw);
7000 }
7001 }
7002
7003 pub mod dir_entry_router_route_response {
7004 pub enum Ref<'de> {
7005 DirEntry(&'de crate::wire::DirEntry),
7006
7007 Unavailable(&'de crate::wire::Unit),
7008 }
7009
7010 pub enum Value {
7011 DirEntry(crate::wire::DirEntry),
7012
7013 Unavailable(crate::wire::Unit),
7014 }
7015 }
7016
7017 impl DirEntryRouterRouteResponse {
7018 pub fn as_ref(&self) -> crate::wire::dir_entry_router_route_response::Ref<'_> {
7019 match self.raw.ordinal() {
7020 1 => crate::wire::dir_entry_router_route_response::Ref::DirEntry(unsafe {
7021 self.raw.get().deref_unchecked::<crate::wire::DirEntry>()
7022 }),
7023
7024 2 => crate::wire::dir_entry_router_route_response::Ref::Unavailable(unsafe {
7025 self.raw.get().deref_unchecked::<crate::wire::Unit>()
7026 }),
7027
7028 _ => unsafe { ::core::hint::unreachable_unchecked() },
7029 }
7030 }
7031
7032 pub fn into_inner(self) -> crate::wire::dir_entry_router_route_response::Value {
7033 let this = ::core::mem::ManuallyDrop::new(self);
7034
7035 match this.raw.ordinal() {
7036 1 => crate::wire::dir_entry_router_route_response::Value::DirEntry(unsafe {
7037 this.raw.get().read_unchecked::<crate::wire::DirEntry>()
7038 }),
7039
7040 2 => crate::wire::dir_entry_router_route_response::Value::Unavailable(unsafe {
7041 this.raw.get().read_unchecked::<crate::wire::Unit>()
7042 }),
7043
7044 _ => unsafe { ::core::hint::unreachable_unchecked() },
7045 }
7046 }
7047 }
7048
7049 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntryRouterRouteResponse
7050 where
7051 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7052 ___D: ::fidl_next::fuchsia::HandleDecoder,
7053 {
7054 fn decode(
7055 mut slot: ::fidl_next::Slot<'_, Self>,
7056 decoder: &mut ___D,
7057 _: (),
7058 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7059 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7060 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7061 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirEntry>(
7062 raw,
7063 decoder,
7064 (),
7065 )?,
7066
7067 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7068 raw,
7069 decoder,
7070 (),
7071 )?,
7072
7073 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
7074 }
7075
7076 Ok(())
7077 }
7078 }
7079
7080 impl ::core::fmt::Debug for DirEntryRouterRouteResponse {
7081 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7082 match self.raw.ordinal() {
7083 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::DirEntry>().fmt(f) },
7084 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
7085 _ => unsafe { ::core::hint::unreachable_unchecked() },
7086 }
7087 }
7088 }
7089
7090 impl ::fidl_next::IntoNatural for DirEntryRouterRouteResponse {
7091 type Natural = crate::natural::DirEntryRouterRouteResponse;
7092 }
7093
7094 #[repr(C)]
7096 pub struct DirReceiverReceiveRequest<'de> {
7097 pub(crate) table: ::fidl_next::wire::Table<'de>,
7098 }
7099
7100 impl<'de> Drop for DirReceiverReceiveRequest<'de> {
7101 fn drop(&mut self) {
7102 let _ = self.table.get(1).map(|envelope| unsafe {
7103 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
7104 });
7105
7106 let _ = self.table.get(2).map(|envelope| unsafe {
7107 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
7108 });
7109
7110 let _ = self.table.get(3).map(|envelope| unsafe {
7111 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
7112 });
7113 }
7114 }
7115
7116 impl ::fidl_next::Constrained for DirReceiverReceiveRequest<'_> {
7117 type Constraint = ();
7118
7119 fn validate(
7120 _: ::fidl_next::Slot<'_, Self>,
7121 _: Self::Constraint,
7122 ) -> Result<(), ::fidl_next::ValidationError> {
7123 Ok(())
7124 }
7125 }
7126
7127 unsafe impl ::fidl_next::Wire for DirReceiverReceiveRequest<'static> {
7128 type Narrowed<'de> = DirReceiverReceiveRequest<'de>;
7129
7130 #[inline]
7131 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7132 ::fidl_next::munge!(let Self { table } = out);
7133 ::fidl_next::wire::Table::zero_padding(table);
7134 }
7135 }
7136
7137 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirReceiverReceiveRequest<'de>
7138 where
7139 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7140 ___D: ::fidl_next::fuchsia::HandleDecoder,
7141 {
7142 fn decode(
7143 slot: ::fidl_next::Slot<'_, Self>,
7144 decoder: &mut ___D,
7145 _: (),
7146 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7147 ::fidl_next::munge!(let Self { table } = slot);
7148
7149 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7150 match ordinal {
7151 0 => unsafe { ::core::hint::unreachable_unchecked() },
7152
7153 1 => {
7154 ::fidl_next::wire::Envelope::decode_as::<
7155 ___D,
7156 ::fidl_next::wire::fuchsia::Channel,
7157 >(slot.as_mut(), decoder, ())?;
7158
7159 Ok(())
7160 }
7161
7162 2 => {
7163 ::fidl_next::wire::Envelope::decode_as::<
7164 ___D,
7165 ::fidl_next_fuchsia_io::wire::Flags,
7166 >(slot.as_mut(), decoder, ())?;
7167
7168 Ok(())
7169 }
7170
7171 3 => {
7172 ::fidl_next::wire::Envelope::decode_as::<
7173 ___D,
7174 ::fidl_next::wire::String<'de>,
7175 >(slot.as_mut(), decoder, 4095)?;
7176
7177 let value = unsafe {
7178 slot.deref_unchecked()
7179 .deref_unchecked::<::fidl_next::wire::String<'_>>()
7180 };
7181
7182 if value.len() > 4095 {
7183 return Err(::fidl_next::DecodeError::VectorTooLong {
7184 size: value.len() as u64,
7185 limit: 4095,
7186 });
7187 }
7188
7189 Ok(())
7190 }
7191
7192 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7193 }
7194 })
7195 }
7196 }
7197
7198 impl<'de> DirReceiverReceiveRequest<'de> {
7199 pub fn channel(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
7200 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7201 }
7202
7203 pub fn take_channel(
7204 &mut self,
7205 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
7206 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7207 }
7208
7209 pub fn flags(&self) -> ::core::option::Option<&::fidl_next_fuchsia_io::wire::Flags> {
7210 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7211 }
7212
7213 pub fn take_flags(
7214 &mut self,
7215 ) -> ::core::option::Option<::fidl_next_fuchsia_io::wire::Flags> {
7216 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7217 }
7218
7219 pub fn subdir(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
7220 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
7221 }
7222
7223 pub fn take_subdir(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
7224 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
7225 }
7226 }
7227
7228 impl<'de> ::core::fmt::Debug for DirReceiverReceiveRequest<'de> {
7229 fn fmt(
7230 &self,
7231 f: &mut ::core::fmt::Formatter<'_>,
7232 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7233 f.debug_struct("DirReceiverReceiveRequest")
7234 .field("channel", &self.channel())
7235 .field("flags", &self.flags())
7236 .field("subdir", &self.subdir())
7237 .finish()
7238 }
7239 }
7240
7241 impl<'de> ::fidl_next::IntoNatural for DirReceiverReceiveRequest<'de> {
7242 type Natural = crate::natural::DirReceiverReceiveRequest;
7243 }
7244
7245 #[repr(transparent)]
7247 pub struct DirectoryRouterRouteResponse {
7248 pub(crate) raw: ::fidl_next::wire::Union,
7249 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7250 }
7251
7252 impl Drop for DirectoryRouterRouteResponse {
7253 fn drop(&mut self) {
7254 match self.raw.ordinal() {
7255 1 => {
7256 let _ = unsafe {
7257 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
7258 ::fidl_next_fuchsia_io::Directory,
7259 ::fidl_next::wire::fuchsia::Channel,
7260 >>()
7261 };
7262 }
7263
7264 2 => {
7265 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
7266 }
7267
7268 _ => unsafe { ::core::hint::unreachable_unchecked() },
7269 }
7270 }
7271 }
7272
7273 impl ::fidl_next::Constrained for DirectoryRouterRouteResponse {
7274 type Constraint = ();
7275
7276 fn validate(
7277 _: ::fidl_next::Slot<'_, Self>,
7278 _: Self::Constraint,
7279 ) -> Result<(), ::fidl_next::ValidationError> {
7280 Ok(())
7281 }
7282 }
7283
7284 unsafe impl ::fidl_next::Wire for DirectoryRouterRouteResponse {
7285 type Narrowed<'de> = DirectoryRouterRouteResponse;
7286
7287 #[inline]
7288 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7289 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7290 ::fidl_next::wire::Union::zero_padding(raw);
7291 }
7292 }
7293
7294 pub mod directory_router_route_response {
7295 pub enum Ref<'de> {
7296 Directory(
7297 &'de ::fidl_next::ClientEnd<
7298 ::fidl_next_fuchsia_io::Directory,
7299 ::fidl_next::wire::fuchsia::Channel,
7300 >,
7301 ),
7302
7303 Unavailable(&'de crate::wire::Unit),
7304 }
7305
7306 pub enum Value {
7307 Directory(
7308 ::fidl_next::ClientEnd<
7309 ::fidl_next_fuchsia_io::Directory,
7310 ::fidl_next::wire::fuchsia::Channel,
7311 >,
7312 ),
7313
7314 Unavailable(crate::wire::Unit),
7315 }
7316 }
7317
7318 impl DirectoryRouterRouteResponse {
7319 pub fn as_ref(&self) -> crate::wire::directory_router_route_response::Ref<'_> {
7320 match self.raw.ordinal() {
7321 1 => crate::wire::directory_router_route_response::Ref::Directory(unsafe {
7322 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
7323 ::fidl_next_fuchsia_io::Directory,
7324 ::fidl_next::wire::fuchsia::Channel,
7325 >>()
7326 }),
7327
7328 2 => crate::wire::directory_router_route_response::Ref::Unavailable(unsafe {
7329 self.raw.get().deref_unchecked::<crate::wire::Unit>()
7330 }),
7331
7332 _ => unsafe { ::core::hint::unreachable_unchecked() },
7333 }
7334 }
7335
7336 pub fn into_inner(self) -> crate::wire::directory_router_route_response::Value {
7337 let this = ::core::mem::ManuallyDrop::new(self);
7338
7339 match this.raw.ordinal() {
7340 1 => crate::wire::directory_router_route_response::Value::Directory(unsafe {
7341 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<
7342 ::fidl_next_fuchsia_io::Directory,
7343 ::fidl_next::wire::fuchsia::Channel,
7344 >>()
7345 }),
7346
7347 2 => crate::wire::directory_router_route_response::Value::Unavailable(unsafe {
7348 this.raw.get().read_unchecked::<crate::wire::Unit>()
7349 }),
7350
7351 _ => unsafe { ::core::hint::unreachable_unchecked() },
7352 }
7353 }
7354 }
7355
7356 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRouterRouteResponse
7357 where
7358 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7359 ___D: ::fidl_next::fuchsia::HandleDecoder,
7360 {
7361 fn decode(
7362 mut slot: ::fidl_next::Slot<'_, Self>,
7363 decoder: &mut ___D,
7364 _: (),
7365 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7366 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7367 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7368 1 => ::fidl_next::wire::Union::decode_as_static::<
7369 ___D,
7370 ::fidl_next::ClientEnd<
7371 ::fidl_next_fuchsia_io::Directory,
7372 ::fidl_next::wire::fuchsia::Channel,
7373 >,
7374 >(raw, decoder, ())?,
7375
7376 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7377 raw,
7378 decoder,
7379 (),
7380 )?,
7381
7382 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
7383 }
7384
7385 Ok(())
7386 }
7387 }
7388
7389 impl ::core::fmt::Debug for DirectoryRouterRouteResponse {
7390 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7391 match self.raw.ordinal() {
7392 1 => unsafe {
7393 self.raw
7394 .get()
7395 .deref_unchecked::<::fidl_next::ClientEnd<
7396 ::fidl_next_fuchsia_io::Directory,
7397 ::fidl_next::wire::fuchsia::Channel,
7398 >>()
7399 .fmt(f)
7400 },
7401 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
7402 _ => unsafe { ::core::hint::unreachable_unchecked() },
7403 }
7404 }
7405 }
7406
7407 impl ::fidl_next::IntoNatural for DirectoryRouterRouteResponse {
7408 type Natural = crate::natural::DirectoryRouterRouteResponse;
7409 }
7410
7411 #[derive(Debug)]
7413 #[repr(C)]
7414 pub struct ProtocolPayload {
7415 pub channel: ::fidl_next::wire::fuchsia::Channel,
7416 }
7417
7418 static_assertions::const_assert_eq!(std::mem::size_of::<ProtocolPayload>(), 4);
7419 static_assertions::const_assert_eq!(std::mem::align_of::<ProtocolPayload>(), 4);
7420
7421 static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolPayload, channel), 0);
7422
7423 impl ::fidl_next::Constrained for ProtocolPayload {
7424 type Constraint = ();
7425
7426 fn validate(
7427 _: ::fidl_next::Slot<'_, Self>,
7428 _: Self::Constraint,
7429 ) -> Result<(), ::fidl_next::ValidationError> {
7430 Ok(())
7431 }
7432 }
7433
7434 unsafe impl ::fidl_next::Wire for ProtocolPayload {
7435 type Narrowed<'de> = ProtocolPayload;
7436
7437 #[inline]
7438 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7439 ::fidl_next::munge! {
7440 let Self {
7441 channel,
7442
7443 } = &mut *out_;
7444 }
7445
7446 ::fidl_next::Wire::zero_padding(channel);
7447 }
7448 }
7449
7450 unsafe impl<___D> ::fidl_next::Decode<___D> for ProtocolPayload
7451 where
7452 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7453 ___D: ::fidl_next::fuchsia::HandleDecoder,
7454 {
7455 fn decode(
7456 slot_: ::fidl_next::Slot<'_, Self>,
7457 decoder_: &mut ___D,
7458 _: (),
7459 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7460 ::fidl_next::munge! {
7461 let Self {
7462 mut channel,
7463
7464 } = slot_;
7465 }
7466
7467 let _field = channel.as_mut();
7468
7469 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
7470
7471 Ok(())
7472 }
7473 }
7474
7475 impl ::fidl_next::IntoNatural for ProtocolPayload {
7476 type Natural = crate::natural::ProtocolPayload;
7477 }
7478}
7479
7480pub mod wire_optional {
7481
7482 pub use fidl_next_common_fuchsia_component_sandbox::wire_optional::*;
7483
7484 #[repr(transparent)]
7485 pub struct Capability<'de> {
7486 pub(crate) raw: ::fidl_next::wire::Union,
7487 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7488 }
7489
7490 impl ::fidl_next::Constrained for Capability<'_> {
7491 type Constraint = ();
7492
7493 fn validate(
7494 _: ::fidl_next::Slot<'_, Self>,
7495 _: Self::Constraint,
7496 ) -> Result<(), ::fidl_next::ValidationError> {
7497 Ok(())
7498 }
7499 }
7500
7501 unsafe impl ::fidl_next::Wire for Capability<'static> {
7502 type Narrowed<'de> = Capability<'de>;
7503
7504 #[inline]
7505 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7506 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7507 ::fidl_next::wire::Union::zero_padding(raw);
7508 }
7509 }
7510
7511 impl<'de> Capability<'de> {
7512 pub fn is_some(&self) -> bool {
7513 self.raw.is_some()
7514 }
7515
7516 pub fn is_none(&self) -> bool {
7517 self.raw.is_none()
7518 }
7519
7520 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Capability<'de>> {
7521 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7522 }
7523
7524 pub fn into_option(self) -> ::core::option::Option<crate::wire::Capability<'de>> {
7525 if self.is_some() {
7526 Some(crate::wire::Capability {
7527 raw: self.raw,
7528 _phantom: ::core::marker::PhantomData,
7529 })
7530 } else {
7531 None
7532 }
7533 }
7534 }
7535
7536 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Capability<'de>
7537 where
7538 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7539 ___D: ::fidl_next::Decoder<'de>,
7540 ___D: ::fidl_next::fuchsia::HandleDecoder,
7541 {
7542 fn decode(
7543 mut slot: ::fidl_next::Slot<'_, Self>,
7544 decoder: &mut ___D,
7545 _: (),
7546 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7547 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7548 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7549 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
7550 raw,
7551 decoder,
7552 (),
7553 )?,
7554
7555 2 => ::fidl_next::wire::Union::decode_as::<
7556 ___D,
7557 ::fidl_next::wire::fuchsia::NullableHandle,
7558 >(raw, decoder, ())?,
7559
7560 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
7561 raw,
7562 decoder,
7563 (),
7564 )?,
7565
7566 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DictionaryRef>(
7567 raw,
7568 decoder,
7569 (),
7570 )?,
7571
7572 5 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Connector>(
7573 raw,
7574 decoder,
7575 (),
7576 )?,
7577
7578 6 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirConnector>(
7579 raw,
7580 decoder,
7581 (),
7582 )?,
7583
7584 7 => ::fidl_next::wire::Union::decode_as::<
7585 ___D,
7586 ::fidl_next::ClientEnd<
7587 ::fidl_next_fuchsia_io::Directory,
7588 ::fidl_next::wire::fuchsia::Channel,
7589 >,
7590 >(raw, decoder, ())?,
7591
7592 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirEntry>(
7593 raw,
7594 decoder,
7595 (),
7596 )?,
7597
7598 9 => ::fidl_next::wire::Union::decode_as::<
7599 ___D,
7600 ::fidl_next::ClientEnd<
7601 crate::ConnectorRouter,
7602 ::fidl_next::wire::fuchsia::Channel,
7603 >,
7604 >(raw, decoder, ())?,
7605
7606 10 => ::fidl_next::wire::Union::decode_as::<
7607 ___D,
7608 ::fidl_next::ClientEnd<
7609 crate::DictionaryRouter,
7610 ::fidl_next::wire::fuchsia::Channel,
7611 >,
7612 >(raw, decoder, ())?,
7613
7614 11 => ::fidl_next::wire::Union::decode_as::<
7615 ___D,
7616 ::fidl_next::ClientEnd<
7617 crate::DirEntryRouter,
7618 ::fidl_next::wire::fuchsia::Channel,
7619 >,
7620 >(raw, decoder, ())?,
7621
7622 12 => ::fidl_next::wire::Union::decode_as::<
7623 ___D,
7624 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
7625 >(raw, decoder, ())?,
7626
7627 13 => ::fidl_next::wire::Union::decode_as::<
7628 ___D,
7629 ::fidl_next::ClientEnd<
7630 crate::DirConnectorRouter,
7631 ::fidl_next::wire::fuchsia::Channel,
7632 >,
7633 >(raw, decoder, ())?,
7634
7635 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7636 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7637 }
7638
7639 Ok(())
7640 }
7641 }
7642
7643 impl<'de> ::core::fmt::Debug for Capability<'de> {
7644 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7645 self.as_ref().fmt(f)
7646 }
7647 }
7648
7649 impl<'de> ::fidl_next::IntoNatural for Capability<'de> {
7650 type Natural = ::core::option::Option<crate::natural::Capability>;
7651 }
7652
7653 #[repr(transparent)]
7654 pub struct ConnectorRouterRouteResponse {
7655 pub(crate) raw: ::fidl_next::wire::Union,
7656 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7657 }
7658
7659 impl ::fidl_next::Constrained for ConnectorRouterRouteResponse {
7660 type Constraint = ();
7661
7662 fn validate(
7663 _: ::fidl_next::Slot<'_, Self>,
7664 _: Self::Constraint,
7665 ) -> Result<(), ::fidl_next::ValidationError> {
7666 Ok(())
7667 }
7668 }
7669
7670 unsafe impl ::fidl_next::Wire for ConnectorRouterRouteResponse {
7671 type Narrowed<'de> = ConnectorRouterRouteResponse;
7672
7673 #[inline]
7674 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7675 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7676 ::fidl_next::wire::Union::zero_padding(raw);
7677 }
7678 }
7679
7680 impl ConnectorRouterRouteResponse {
7681 pub fn is_some(&self) -> bool {
7682 self.raw.is_some()
7683 }
7684
7685 pub fn is_none(&self) -> bool {
7686 self.raw.is_none()
7687 }
7688
7689 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ConnectorRouterRouteResponse> {
7690 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7691 }
7692
7693 pub fn into_option(
7694 self,
7695 ) -> ::core::option::Option<crate::wire::ConnectorRouterRouteResponse> {
7696 if self.is_some() {
7697 Some(crate::wire::ConnectorRouterRouteResponse {
7698 raw: self.raw,
7699 _phantom: ::core::marker::PhantomData,
7700 })
7701 } else {
7702 None
7703 }
7704 }
7705 }
7706
7707 unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorRouterRouteResponse
7708 where
7709 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7710 ___D: ::fidl_next::fuchsia::HandleDecoder,
7711 {
7712 fn decode(
7713 mut slot: ::fidl_next::Slot<'_, Self>,
7714 decoder: &mut ___D,
7715 _: (),
7716 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7717 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7718 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7719 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Connector>(
7720 raw,
7721 decoder,
7722 (),
7723 )?,
7724
7725 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7726 raw,
7727 decoder,
7728 (),
7729 )?,
7730
7731 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7732 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7733 }
7734
7735 Ok(())
7736 }
7737 }
7738
7739 impl ::core::fmt::Debug for ConnectorRouterRouteResponse {
7740 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7741 self.as_ref().fmt(f)
7742 }
7743 }
7744
7745 impl ::fidl_next::IntoNatural for ConnectorRouterRouteResponse {
7746 type Natural = ::core::option::Option<crate::natural::ConnectorRouterRouteResponse>;
7747 }
7748
7749 #[repr(transparent)]
7750 pub struct DataRouterRouteResponse<'de> {
7751 pub(crate) raw: ::fidl_next::wire::Union,
7752 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7753 }
7754
7755 impl ::fidl_next::Constrained for DataRouterRouteResponse<'_> {
7756 type Constraint = ();
7757
7758 fn validate(
7759 _: ::fidl_next::Slot<'_, Self>,
7760 _: Self::Constraint,
7761 ) -> Result<(), ::fidl_next::ValidationError> {
7762 Ok(())
7763 }
7764 }
7765
7766 unsafe impl ::fidl_next::Wire for DataRouterRouteResponse<'static> {
7767 type Narrowed<'de> = DataRouterRouteResponse<'de>;
7768
7769 #[inline]
7770 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7771 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7772 ::fidl_next::wire::Union::zero_padding(raw);
7773 }
7774 }
7775
7776 impl<'de> DataRouterRouteResponse<'de> {
7777 pub fn is_some(&self) -> bool {
7778 self.raw.is_some()
7779 }
7780
7781 pub fn is_none(&self) -> bool {
7782 self.raw.is_none()
7783 }
7784
7785 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DataRouterRouteResponse<'de>> {
7786 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7787 }
7788
7789 pub fn into_option(
7790 self,
7791 ) -> ::core::option::Option<crate::wire::DataRouterRouteResponse<'de>> {
7792 if self.is_some() {
7793 Some(crate::wire::DataRouterRouteResponse {
7794 raw: self.raw,
7795 _phantom: ::core::marker::PhantomData,
7796 })
7797 } else {
7798 None
7799 }
7800 }
7801 }
7802
7803 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataRouterRouteResponse<'de>
7804 where
7805 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7806 ___D: ::fidl_next::Decoder<'de>,
7807 ___D: ::fidl_next::fuchsia::HandleDecoder,
7808 {
7809 fn decode(
7810 mut slot: ::fidl_next::Slot<'_, Self>,
7811 decoder: &mut ___D,
7812 _: (),
7813 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7814 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7815 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7816 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
7817 raw,
7818 decoder,
7819 (),
7820 )?,
7821
7822 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
7823 raw,
7824 decoder,
7825 (),
7826 )?,
7827
7828 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7829 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7830 }
7831
7832 Ok(())
7833 }
7834 }
7835
7836 impl<'de> ::core::fmt::Debug for DataRouterRouteResponse<'de> {
7837 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7838 self.as_ref().fmt(f)
7839 }
7840 }
7841
7842 impl<'de> ::fidl_next::IntoNatural for DataRouterRouteResponse<'de> {
7843 type Natural = ::core::option::Option<crate::natural::DataRouterRouteResponse>;
7844 }
7845
7846 #[repr(transparent)]
7847 pub struct DictionaryRouterRouteResponse {
7848 pub(crate) raw: ::fidl_next::wire::Union,
7849 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7850 }
7851
7852 impl ::fidl_next::Constrained for DictionaryRouterRouteResponse {
7853 type Constraint = ();
7854
7855 fn validate(
7856 _: ::fidl_next::Slot<'_, Self>,
7857 _: Self::Constraint,
7858 ) -> Result<(), ::fidl_next::ValidationError> {
7859 Ok(())
7860 }
7861 }
7862
7863 unsafe impl ::fidl_next::Wire for DictionaryRouterRouteResponse {
7864 type Narrowed<'de> = DictionaryRouterRouteResponse;
7865
7866 #[inline]
7867 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7868 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7869 ::fidl_next::wire::Union::zero_padding(raw);
7870 }
7871 }
7872
7873 impl DictionaryRouterRouteResponse {
7874 pub fn is_some(&self) -> bool {
7875 self.raw.is_some()
7876 }
7877
7878 pub fn is_none(&self) -> bool {
7879 self.raw.is_none()
7880 }
7881
7882 pub fn as_ref(
7883 &self,
7884 ) -> ::core::option::Option<&crate::wire::DictionaryRouterRouteResponse> {
7885 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7886 }
7887
7888 pub fn into_option(
7889 self,
7890 ) -> ::core::option::Option<crate::wire::DictionaryRouterRouteResponse> {
7891 if self.is_some() {
7892 Some(crate::wire::DictionaryRouterRouteResponse {
7893 raw: self.raw,
7894 _phantom: ::core::marker::PhantomData,
7895 })
7896 } else {
7897 None
7898 }
7899 }
7900 }
7901
7902 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRouterRouteResponse
7903 where
7904 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7905 ___D: ::fidl_next::fuchsia::HandleDecoder,
7906 {
7907 fn decode(
7908 mut slot: ::fidl_next::Slot<'_, Self>,
7909 decoder: &mut ___D,
7910 _: (),
7911 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7912 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7913 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7914 1 => {
7915 ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DictionaryRef>(
7916 raw,
7917 decoder,
7918 (),
7919 )?
7920 }
7921
7922 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7923 raw,
7924 decoder,
7925 (),
7926 )?,
7927
7928 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7929 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7930 }
7931
7932 Ok(())
7933 }
7934 }
7935
7936 impl ::core::fmt::Debug for DictionaryRouterRouteResponse {
7937 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7938 self.as_ref().fmt(f)
7939 }
7940 }
7941
7942 impl ::fidl_next::IntoNatural for DictionaryRouterRouteResponse {
7943 type Natural = ::core::option::Option<crate::natural::DictionaryRouterRouteResponse>;
7944 }
7945
7946 #[repr(transparent)]
7947 pub struct DirConnectorRouterRouteResponse {
7948 pub(crate) raw: ::fidl_next::wire::Union,
7949 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7950 }
7951
7952 impl ::fidl_next::Constrained for DirConnectorRouterRouteResponse {
7953 type Constraint = ();
7954
7955 fn validate(
7956 _: ::fidl_next::Slot<'_, Self>,
7957 _: Self::Constraint,
7958 ) -> Result<(), ::fidl_next::ValidationError> {
7959 Ok(())
7960 }
7961 }
7962
7963 unsafe impl ::fidl_next::Wire for DirConnectorRouterRouteResponse {
7964 type Narrowed<'de> = DirConnectorRouterRouteResponse;
7965
7966 #[inline]
7967 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7968 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7969 ::fidl_next::wire::Union::zero_padding(raw);
7970 }
7971 }
7972
7973 impl DirConnectorRouterRouteResponse {
7974 pub fn is_some(&self) -> bool {
7975 self.raw.is_some()
7976 }
7977
7978 pub fn is_none(&self) -> bool {
7979 self.raw.is_none()
7980 }
7981
7982 pub fn as_ref(
7983 &self,
7984 ) -> ::core::option::Option<&crate::wire::DirConnectorRouterRouteResponse> {
7985 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7986 }
7987
7988 pub fn into_option(
7989 self,
7990 ) -> ::core::option::Option<crate::wire::DirConnectorRouterRouteResponse> {
7991 if self.is_some() {
7992 Some(crate::wire::DirConnectorRouterRouteResponse {
7993 raw: self.raw,
7994 _phantom: ::core::marker::PhantomData,
7995 })
7996 } else {
7997 None
7998 }
7999 }
8000 }
8001
8002 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnectorRouterRouteResponse
8003 where
8004 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8005 ___D: ::fidl_next::fuchsia::HandleDecoder,
8006 {
8007 fn decode(
8008 mut slot: ::fidl_next::Slot<'_, Self>,
8009 decoder: &mut ___D,
8010 _: (),
8011 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8012 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
8013 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
8014 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirConnector>(
8015 raw,
8016 decoder,
8017 (),
8018 )?,
8019
8020 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
8021 raw,
8022 decoder,
8023 (),
8024 )?,
8025
8026 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
8027 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
8028 }
8029
8030 Ok(())
8031 }
8032 }
8033
8034 impl ::core::fmt::Debug for DirConnectorRouterRouteResponse {
8035 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8036 self.as_ref().fmt(f)
8037 }
8038 }
8039
8040 impl ::fidl_next::IntoNatural for DirConnectorRouterRouteResponse {
8041 type Natural = ::core::option::Option<crate::natural::DirConnectorRouterRouteResponse>;
8042 }
8043
8044 #[repr(transparent)]
8045 pub struct DirEntryRouterRouteResponse {
8046 pub(crate) raw: ::fidl_next::wire::Union,
8047 pub(crate) _phantom: ::core::marker::PhantomData<()>,
8048 }
8049
8050 impl ::fidl_next::Constrained for DirEntryRouterRouteResponse {
8051 type Constraint = ();
8052
8053 fn validate(
8054 _: ::fidl_next::Slot<'_, Self>,
8055 _: Self::Constraint,
8056 ) -> Result<(), ::fidl_next::ValidationError> {
8057 Ok(())
8058 }
8059 }
8060
8061 unsafe impl ::fidl_next::Wire for DirEntryRouterRouteResponse {
8062 type Narrowed<'de> = DirEntryRouterRouteResponse;
8063
8064 #[inline]
8065 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8066 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
8067 ::fidl_next::wire::Union::zero_padding(raw);
8068 }
8069 }
8070
8071 impl DirEntryRouterRouteResponse {
8072 pub fn is_some(&self) -> bool {
8073 self.raw.is_some()
8074 }
8075
8076 pub fn is_none(&self) -> bool {
8077 self.raw.is_none()
8078 }
8079
8080 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DirEntryRouterRouteResponse> {
8081 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
8082 }
8083
8084 pub fn into_option(
8085 self,
8086 ) -> ::core::option::Option<crate::wire::DirEntryRouterRouteResponse> {
8087 if self.is_some() {
8088 Some(crate::wire::DirEntryRouterRouteResponse {
8089 raw: self.raw,
8090 _phantom: ::core::marker::PhantomData,
8091 })
8092 } else {
8093 None
8094 }
8095 }
8096 }
8097
8098 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntryRouterRouteResponse
8099 where
8100 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8101 ___D: ::fidl_next::fuchsia::HandleDecoder,
8102 {
8103 fn decode(
8104 mut slot: ::fidl_next::Slot<'_, Self>,
8105 decoder: &mut ___D,
8106 _: (),
8107 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8108 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
8109 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
8110 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirEntry>(
8111 raw,
8112 decoder,
8113 (),
8114 )?,
8115
8116 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
8117 raw,
8118 decoder,
8119 (),
8120 )?,
8121
8122 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
8123 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
8124 }
8125
8126 Ok(())
8127 }
8128 }
8129
8130 impl ::core::fmt::Debug for DirEntryRouterRouteResponse {
8131 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8132 self.as_ref().fmt(f)
8133 }
8134 }
8135
8136 impl ::fidl_next::IntoNatural for DirEntryRouterRouteResponse {
8137 type Natural = ::core::option::Option<crate::natural::DirEntryRouterRouteResponse>;
8138 }
8139
8140 #[repr(transparent)]
8141 pub struct DirectoryRouterRouteResponse {
8142 pub(crate) raw: ::fidl_next::wire::Union,
8143 pub(crate) _phantom: ::core::marker::PhantomData<()>,
8144 }
8145
8146 impl ::fidl_next::Constrained for DirectoryRouterRouteResponse {
8147 type Constraint = ();
8148
8149 fn validate(
8150 _: ::fidl_next::Slot<'_, Self>,
8151 _: Self::Constraint,
8152 ) -> Result<(), ::fidl_next::ValidationError> {
8153 Ok(())
8154 }
8155 }
8156
8157 unsafe impl ::fidl_next::Wire for DirectoryRouterRouteResponse {
8158 type Narrowed<'de> = DirectoryRouterRouteResponse;
8159
8160 #[inline]
8161 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8162 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
8163 ::fidl_next::wire::Union::zero_padding(raw);
8164 }
8165 }
8166
8167 impl DirectoryRouterRouteResponse {
8168 pub fn is_some(&self) -> bool {
8169 self.raw.is_some()
8170 }
8171
8172 pub fn is_none(&self) -> bool {
8173 self.raw.is_none()
8174 }
8175
8176 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DirectoryRouterRouteResponse> {
8177 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
8178 }
8179
8180 pub fn into_option(
8181 self,
8182 ) -> ::core::option::Option<crate::wire::DirectoryRouterRouteResponse> {
8183 if self.is_some() {
8184 Some(crate::wire::DirectoryRouterRouteResponse {
8185 raw: self.raw,
8186 _phantom: ::core::marker::PhantomData,
8187 })
8188 } else {
8189 None
8190 }
8191 }
8192 }
8193
8194 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRouterRouteResponse
8195 where
8196 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8197 ___D: ::fidl_next::fuchsia::HandleDecoder,
8198 {
8199 fn decode(
8200 mut slot: ::fidl_next::Slot<'_, Self>,
8201 decoder: &mut ___D,
8202 _: (),
8203 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8204 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
8205 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
8206 1 => ::fidl_next::wire::Union::decode_as_static::<
8207 ___D,
8208 ::fidl_next::ClientEnd<
8209 ::fidl_next_fuchsia_io::Directory,
8210 ::fidl_next::wire::fuchsia::Channel,
8211 >,
8212 >(raw, decoder, ())?,
8213
8214 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
8215 raw,
8216 decoder,
8217 (),
8218 )?,
8219
8220 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
8221 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
8222 }
8223
8224 Ok(())
8225 }
8226 }
8227
8228 impl ::core::fmt::Debug for DirectoryRouterRouteResponse {
8229 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8230 self.as_ref().fmt(f)
8231 }
8232 }
8233
8234 impl ::fidl_next::IntoNatural for DirectoryRouterRouteResponse {
8235 type Natural = ::core::option::Option<crate::natural::DirectoryRouterRouteResponse>;
8236 }
8237}
8238
8239pub mod generic {
8240
8241 pub use fidl_next_common_fuchsia_component_sandbox::generic::*;
8242
8243 pub struct DirConnector<T0> {
8245 pub token: T0,
8246 }
8247
8248 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirConnector, ___E> for DirConnector<T0>
8249 where
8250 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8251 ___E: ::fidl_next::fuchsia::HandleEncoder,
8252 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8253 {
8254 #[inline]
8255 fn encode(
8256 self,
8257 encoder_: &mut ___E,
8258 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirConnector>,
8259 _: (),
8260 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8261 ::fidl_next::munge! {
8262 let crate::wire::DirConnector {
8263 token,
8264
8265 } = out_;
8266 }
8267
8268 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8269
8270 Ok(())
8271 }
8272 }
8273
8274 pub struct DictionaryRef<T0> {
8276 pub token: T0,
8277 }
8278
8279 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DictionaryRef, ___E> for DictionaryRef<T0>
8280 where
8281 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8282 ___E: ::fidl_next::fuchsia::HandleEncoder,
8283 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8284 {
8285 #[inline]
8286 fn encode(
8287 self,
8288 encoder_: &mut ___E,
8289 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRef>,
8290 _: (),
8291 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8292 ::fidl_next::munge! {
8293 let crate::wire::DictionaryRef {
8294 token,
8295
8296 } = out_;
8297 }
8298
8299 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8300
8301 Ok(())
8302 }
8303 }
8304
8305 pub struct Connector<T0> {
8307 pub token: T0,
8308 }
8309
8310 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::Connector, ___E> for Connector<T0>
8311 where
8312 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8313 ___E: ::fidl_next::fuchsia::HandleEncoder,
8314 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8315 {
8316 #[inline]
8317 fn encode(
8318 self,
8319 encoder_: &mut ___E,
8320 out_: &mut ::core::mem::MaybeUninit<crate::wire::Connector>,
8321 _: (),
8322 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8323 ::fidl_next::munge! {
8324 let crate::wire::Connector {
8325 token,
8326
8327 } = out_;
8328 }
8329
8330 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8331
8332 Ok(())
8333 }
8334 }
8335
8336 pub struct DirEntry<T0> {
8338 pub token: T0,
8339 }
8340
8341 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirEntry, ___E> for DirEntry<T0>
8342 where
8343 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8344 ___E: ::fidl_next::fuchsia::HandleEncoder,
8345 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8346 {
8347 #[inline]
8348 fn encode(
8349 self,
8350 encoder_: &mut ___E,
8351 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirEntry>,
8352 _: (),
8353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8354 ::fidl_next::munge! {
8355 let crate::wire::DirEntry {
8356 token,
8357
8358 } = out_;
8359 }
8360
8361 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8362
8363 Ok(())
8364 }
8365 }
8366
8367 pub struct CapabilityStoreConnectorCreateRequest<T0, T1> {
8369 pub id: T0,
8370
8371 pub receiver: T1,
8372 }
8373
8374 unsafe impl<___E, T0, T1>
8375 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>
8376 for CapabilityStoreConnectorCreateRequest<T0, T1>
8377 where
8378 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8379 ___E: ::fidl_next::fuchsia::HandleEncoder,
8380 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8381 T1: ::fidl_next::Encode<
8382 ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
8383 ___E,
8384 >,
8385 {
8386 #[inline]
8387 fn encode(
8388 self,
8389 encoder_: &mut ___E,
8390 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorCreateRequest>,
8391 _: (),
8392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8393 ::fidl_next::munge! {
8394 let crate::wire::CapabilityStoreConnectorCreateRequest {
8395 id,
8396 receiver,
8397
8398 } = out_;
8399 }
8400
8401 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8402
8403 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
8404
8405 Ok(())
8406 }
8407 }
8408
8409 pub struct CapabilityStoreConnectorOpenRequest<T0, T1> {
8411 pub id: T0,
8412
8413 pub server_end: T1,
8414 }
8415
8416 unsafe impl<___E, T0, T1>
8417 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>
8418 for CapabilityStoreConnectorOpenRequest<T0, T1>
8419 where
8420 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8421 ___E: ::fidl_next::fuchsia::HandleEncoder,
8422 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8423 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8424 {
8425 #[inline]
8426 fn encode(
8427 self,
8428 encoder_: &mut ___E,
8429 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorOpenRequest>,
8430 _: (),
8431 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8432 ::fidl_next::munge! {
8433 let crate::wire::CapabilityStoreConnectorOpenRequest {
8434 id,
8435 server_end,
8436
8437 } = out_;
8438 }
8439
8440 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8441
8442 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
8443
8444 Ok(())
8445 }
8446 }
8447
8448 pub struct CapabilityStoreDirConnectorCreateRequest<T0, T1> {
8450 pub id: T0,
8451
8452 pub receiver: T1,
8453 }
8454
8455 unsafe impl<___E, T0, T1>
8456 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>
8457 for CapabilityStoreDirConnectorCreateRequest<T0, T1>
8458 where
8459 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8460 ___E: ::fidl_next::fuchsia::HandleEncoder,
8461 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8462 T1: ::fidl_next::Encode<
8463 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
8464 ___E,
8465 >,
8466 {
8467 #[inline]
8468 fn encode(
8469 self,
8470 encoder_: &mut ___E,
8471 out_: &mut ::core::mem::MaybeUninit<
8472 crate::wire::CapabilityStoreDirConnectorCreateRequest,
8473 >,
8474 _: (),
8475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8476 ::fidl_next::munge! {
8477 let crate::wire::CapabilityStoreDirConnectorCreateRequest {
8478 id,
8479 receiver,
8480
8481 } = out_;
8482 }
8483
8484 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8485
8486 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
8487
8488 Ok(())
8489 }
8490 }
8491
8492 pub struct CapabilityStoreDictionaryLegacyImportRequest<T0, T1> {
8494 pub id: T0,
8495
8496 pub client_end: T1,
8497 }
8498
8499 unsafe impl<___E, T0, T1>
8500 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>
8501 for CapabilityStoreDictionaryLegacyImportRequest<T0, T1>
8502 where
8503 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8504 ___E: ::fidl_next::fuchsia::HandleEncoder,
8505 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8506 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8507 {
8508 #[inline]
8509 fn encode(
8510 self,
8511 encoder_: &mut ___E,
8512 out_: &mut ::core::mem::MaybeUninit<
8513 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
8514 >,
8515 _: (),
8516 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8517 ::fidl_next::munge! {
8518 let crate::wire::CapabilityStoreDictionaryLegacyImportRequest {
8519 id,
8520 client_end,
8521
8522 } = out_;
8523 }
8524
8525 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8526
8527 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
8528
8529 Ok(())
8530 }
8531 }
8532
8533 pub struct CapabilityStoreDictionaryLegacyExportRequest<T0, T1> {
8535 pub id: T0,
8536
8537 pub server_end: T1,
8538 }
8539
8540 unsafe impl<___E, T0, T1>
8541 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>
8542 for CapabilityStoreDictionaryLegacyExportRequest<T0, T1>
8543 where
8544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8545 ___E: ::fidl_next::fuchsia::HandleEncoder,
8546 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8547 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8548 {
8549 #[inline]
8550 fn encode(
8551 self,
8552 encoder_: &mut ___E,
8553 out_: &mut ::core::mem::MaybeUninit<
8554 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
8555 >,
8556 _: (),
8557 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8558 ::fidl_next::munge! {
8559 let crate::wire::CapabilityStoreDictionaryLegacyExportRequest {
8560 id,
8561 server_end,
8562
8563 } = out_;
8564 }
8565
8566 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8567
8568 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
8569
8570 Ok(())
8571 }
8572 }
8573
8574 pub struct CapabilityStoreDictionaryKeysRequest<T0, T1> {
8576 pub id: T0,
8577
8578 pub iterator: T1,
8579 }
8580
8581 unsafe impl<___E, T0, T1>
8582 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>
8583 for CapabilityStoreDictionaryKeysRequest<T0, T1>
8584 where
8585 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8586 ___E: ::fidl_next::fuchsia::HandleEncoder,
8587 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8588 T1: ::fidl_next::Encode<
8589 ::fidl_next::ServerEnd<
8590 crate::DictionaryKeysIterator,
8591 ::fidl_next::wire::fuchsia::Channel,
8592 >,
8593 ___E,
8594 >,
8595 {
8596 #[inline]
8597 fn encode(
8598 self,
8599 encoder_: &mut ___E,
8600 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryKeysRequest>,
8601 _: (),
8602 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8603 ::fidl_next::munge! {
8604 let crate::wire::CapabilityStoreDictionaryKeysRequest {
8605 id,
8606 iterator,
8607
8608 } = out_;
8609 }
8610
8611 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8612
8613 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8614
8615 Ok(())
8616 }
8617 }
8618
8619 pub struct CapabilityStoreDictionaryEnumerateRequest<T0, T1> {
8621 pub id: T0,
8622
8623 pub iterator: T1,
8624 }
8625
8626 unsafe impl<___E, T0, T1>
8627 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>
8628 for CapabilityStoreDictionaryEnumerateRequest<T0, T1>
8629 where
8630 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8631 ___E: ::fidl_next::fuchsia::HandleEncoder,
8632 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8633 T1: ::fidl_next::Encode<
8634 ::fidl_next::ServerEnd<
8635 crate::DictionaryEnumerateIterator,
8636 ::fidl_next::wire::fuchsia::Channel,
8637 >,
8638 ___E,
8639 >,
8640 {
8641 #[inline]
8642 fn encode(
8643 self,
8644 encoder_: &mut ___E,
8645 out_: &mut ::core::mem::MaybeUninit<
8646 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
8647 >,
8648 _: (),
8649 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8650 ::fidl_next::munge! {
8651 let crate::wire::CapabilityStoreDictionaryEnumerateRequest {
8652 id,
8653 iterator,
8654
8655 } = out_;
8656 }
8657
8658 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8659
8660 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8661
8662 Ok(())
8663 }
8664 }
8665
8666 pub struct CapabilityStoreDictionaryDrainRequest<T0, T1> {
8668 pub id: T0,
8669
8670 pub iterator: T1,
8671 }
8672
8673 unsafe impl<___E, T0, T1>
8674 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>
8675 for CapabilityStoreDictionaryDrainRequest<T0, T1>
8676 where
8677 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8678 ___E: ::fidl_next::fuchsia::HandleEncoder,
8679 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8680 T1: ::fidl_next::Encode<
8681 ::fidl_next::ServerEnd<
8682 crate::DictionaryDrainIterator,
8683 ::fidl_next::wire::fuchsia::OptionalChannel,
8684 >,
8685 ___E,
8686 >,
8687 {
8688 #[inline]
8689 fn encode(
8690 self,
8691 encoder_: &mut ___E,
8692 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryDrainRequest>,
8693 _: (),
8694 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8695 ::fidl_next::munge! {
8696 let crate::wire::CapabilityStoreDictionaryDrainRequest {
8697 id,
8698 iterator,
8699
8700 } = out_;
8701 }
8702
8703 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8704
8705 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8706
8707 Ok(())
8708 }
8709 }
8710
8711 pub struct CapabilityStoreCreateServiceAggregateRequest<T0> {
8713 pub sources: T0,
8714 }
8715
8716 unsafe impl<___E, T0>
8717 ::fidl_next::Encode<
8718 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
8719 ___E,
8720 > for CapabilityStoreCreateServiceAggregateRequest<T0>
8721 where
8722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8723 ___E: ::fidl_next::Encoder,
8724 ___E: ::fidl_next::fuchsia::HandleEncoder,
8725 T0: ::fidl_next::Encode<
8726 ::fidl_next::wire::Vector<'static, crate::wire::AggregateSource<'static>>,
8727 ___E,
8728 >,
8729 {
8730 #[inline]
8731 fn encode(
8732 self,
8733 encoder_: &mut ___E,
8734 out_: &mut ::core::mem::MaybeUninit<
8735 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
8736 >,
8737 _: (),
8738 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8739 ::fidl_next::munge! {
8740 let crate::wire::CapabilityStoreCreateServiceAggregateRequest {
8741 sources,
8742
8743 } = out_;
8744 }
8745
8746 ::fidl_next::Encode::encode(self.sources, encoder_, sources, (4294967295, ()))?;
8747
8748 Ok(())
8749 }
8750 }
8751
8752 pub struct CapabilityStoreCreateServiceAggregateResponse<T0> {
8754 pub aggregate_dir_connector: T0,
8755 }
8756
8757 unsafe impl<___E, T0>
8758 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>
8759 for CapabilityStoreCreateServiceAggregateResponse<T0>
8760 where
8761 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8762 ___E: ::fidl_next::fuchsia::HandleEncoder,
8763 T0: ::fidl_next::Encode<crate::wire::DirConnector, ___E>,
8764 {
8765 #[inline]
8766 fn encode(
8767 self,
8768 encoder_: &mut ___E,
8769 out_: &mut ::core::mem::MaybeUninit<
8770 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
8771 >,
8772 _: (),
8773 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8774 ::fidl_next::munge! {
8775 let crate::wire::CapabilityStoreCreateServiceAggregateResponse {
8776 aggregate_dir_connector,
8777
8778 } = out_;
8779 }
8780
8781 ::fidl_next::Encode::encode(
8782 self.aggregate_dir_connector,
8783 encoder_,
8784 aggregate_dir_connector,
8785 (),
8786 )?;
8787
8788 Ok(())
8789 }
8790 }
8791
8792 pub struct CapabilityStoreExportResponse<T0> {
8794 pub capability: T0,
8795 }
8796
8797 unsafe impl<___E, T0>
8798 ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>
8799 for CapabilityStoreExportResponse<T0>
8800 where
8801 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8802 ___E: ::fidl_next::Encoder,
8803 ___E: ::fidl_next::fuchsia::HandleEncoder,
8804 T0: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
8805 {
8806 #[inline]
8807 fn encode(
8808 self,
8809 encoder_: &mut ___E,
8810 out_: &mut ::core::mem::MaybeUninit<
8811 crate::wire::CapabilityStoreExportResponse<'static>,
8812 >,
8813 _: (),
8814 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8815 ::fidl_next::munge! {
8816 let crate::wire::CapabilityStoreExportResponse {
8817 capability,
8818
8819 } = out_;
8820 }
8821
8822 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
8823
8824 Ok(())
8825 }
8826 }
8827
8828 pub struct CapabilityStoreImportRequest<T0, T1> {
8830 pub id: T0,
8831
8832 pub capability: T1,
8833 }
8834
8835 unsafe impl<___E, T0, T1>
8836 ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>
8837 for CapabilityStoreImportRequest<T0, T1>
8838 where
8839 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8840 ___E: ::fidl_next::Encoder,
8841 ___E: ::fidl_next::fuchsia::HandleEncoder,
8842 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8843 T1: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
8844 {
8845 #[inline]
8846 fn encode(
8847 self,
8848 encoder_: &mut ___E,
8849 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreImportRequest<'static>>,
8850 _: (),
8851 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8852 ::fidl_next::munge! {
8853 let crate::wire::CapabilityStoreImportRequest {
8854 id,
8855 capability,
8856
8857 } = out_;
8858 }
8859
8860 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8861
8862 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
8863
8864 Ok(())
8865 }
8866 }
8867
8868 pub struct InstanceToken<T0> {
8870 pub token: T0,
8871 }
8872
8873 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::InstanceToken, ___E> for InstanceToken<T0>
8874 where
8875 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8876 ___E: ::fidl_next::fuchsia::HandleEncoder,
8877 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8878 {
8879 #[inline]
8880 fn encode(
8881 self,
8882 encoder_: &mut ___E,
8883 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceToken>,
8884 _: (),
8885 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8886 ::fidl_next::munge! {
8887 let crate::wire::InstanceToken {
8888 token,
8889
8890 } = out_;
8891 }
8892
8893 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8894
8895 Ok(())
8896 }
8897 }
8898
8899 pub struct DictionaryDrainIteratorGetNextResponse<T0, T1> {
8901 pub items: T0,
8902
8903 pub end_id: T1,
8904 }
8905
8906 unsafe impl<___E, T0, T1>
8907 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>
8908 for DictionaryDrainIteratorGetNextResponse<T0, T1>
8909 where
8910 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8911 ___E: ::fidl_next::Encoder,
8912 ___E: ::fidl_next::fuchsia::HandleEncoder,
8913 T0: ::fidl_next::Encode<
8914 ::fidl_next::wire::Vector<'static, crate::wire::DictionaryItem<'static>>,
8915 ___E,
8916 >,
8917 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8918 {
8919 #[inline]
8920 fn encode(
8921 self,
8922 encoder_: &mut ___E,
8923 out_: &mut ::core::mem::MaybeUninit<
8924 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
8925 >,
8926 _: (),
8927 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8928 ::fidl_next::munge! {
8929 let crate::wire::DictionaryDrainIteratorGetNextResponse {
8930 items,
8931 end_id,
8932
8933 } = out_;
8934 }
8935
8936 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
8937
8938 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
8939
8940 Ok(())
8941 }
8942 }
8943
8944 pub struct DictionaryOptionalItem<T0, T1> {
8946 pub key: T0,
8947
8948 pub value: T1,
8949 }
8950
8951 unsafe impl<___E, T0, T1>
8952 ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>
8953 for DictionaryOptionalItem<T0, T1>
8954 where
8955 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8956 ___E: ::fidl_next::Encoder,
8957 ___E: ::fidl_next::fuchsia::HandleEncoder,
8958 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
8959 T1: ::fidl_next::Encode<
8960 ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
8961 ___E,
8962 >,
8963 {
8964 #[inline]
8965 fn encode(
8966 self,
8967 encoder_: &mut ___E,
8968 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryOptionalItem<'static>>,
8969 _: (),
8970 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8971 ::fidl_next::munge! {
8972 let crate::wire::DictionaryOptionalItem {
8973 key,
8974 value,
8975
8976 } = out_;
8977 }
8978
8979 ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
8980
8981 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
8982
8983 Ok(())
8984 }
8985 }
8986
8987 pub struct DictionaryEnumerateIteratorGetNextResponse<T0, T1> {
8989 pub items: T0,
8990
8991 pub end_id: T1,
8992 }
8993
8994 unsafe impl<___E, T0, T1>
8995 ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>, ___E>
8996 for DictionaryEnumerateIteratorGetNextResponse<T0, T1>
8997 where
8998 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8999 ___E: ::fidl_next::Encoder,
9000 ___E: ::fidl_next::fuchsia::HandleEncoder,
9001 T0: ::fidl_next::Encode<
9002 ::fidl_next::wire::Vector<'static, crate::wire::DictionaryOptionalItem<'static>>,
9003 ___E,
9004 >,
9005 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
9006 {
9007 #[inline]
9008 fn encode(
9009 self,
9010 encoder_: &mut ___E,
9011 out_: &mut ::core::mem::MaybeUninit<
9012 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
9013 >,
9014 _: (),
9015 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9016 ::fidl_next::munge! {
9017 let crate::wire::DictionaryEnumerateIteratorGetNextResponse {
9018 items,
9019 end_id,
9020
9021 } = out_;
9022 }
9023
9024 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
9025
9026 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
9027
9028 Ok(())
9029 }
9030 }
9031
9032 pub struct DictionaryKeysIteratorGetNextResponse<T0> {
9034 pub keys: T0,
9035 }
9036
9037 unsafe impl<___E, T0>
9038 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>
9039 for DictionaryKeysIteratorGetNextResponse<T0>
9040 where
9041 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9042 ___E: ::fidl_next::Encoder,
9043 ___E: ::fidl_next::fuchsia::HandleEncoder,
9044 T0: ::fidl_next::Encode<
9045 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
9046 ___E,
9047 >,
9048 {
9049 #[inline]
9050 fn encode(
9051 self,
9052 encoder_: &mut ___E,
9053 out_: &mut ::core::mem::MaybeUninit<
9054 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
9055 >,
9056 _: (),
9057 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9058 ::fidl_next::munge! {
9059 let crate::wire::DictionaryKeysIteratorGetNextResponse {
9060 keys,
9061
9062 } = out_;
9063 }
9064
9065 ::fidl_next::Encode::encode(self.keys, encoder_, keys, (128, 255))?;
9066
9067 Ok(())
9068 }
9069 }
9070
9071 pub struct ProtocolPayload<T0> {
9073 pub channel: T0,
9074 }
9075
9076 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E>
9077 for ProtocolPayload<T0>
9078 where
9079 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9080 ___E: ::fidl_next::fuchsia::HandleEncoder,
9081 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
9082 {
9083 #[inline]
9084 fn encode(
9085 self,
9086 encoder_: &mut ___E,
9087 out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolPayload>,
9088 _: (),
9089 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9090 ::fidl_next::munge! {
9091 let crate::wire::ProtocolPayload {
9092 channel,
9093
9094 } = out_;
9095 }
9096
9097 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
9098
9099 Ok(())
9100 }
9101 }
9102}
9103
9104pub use self::natural::*;
9105
9106#[doc = " Protocol that represents the concept of a \"capability store\", a repository\n for [Capability]s that are held by the component framework runtime.\n\n [CapabilityStore] serves as the main bridge between the component runtime and clients\n that enables them to operate on and exchange [Capability]s. A [CapabilityStore] instance\n contains a set of [Capability]s, each of which has a [CapabilityId] assigned by the client.\n\n Normally, a program would not exchange a [CapabilityStore] or [CapabilityId] with other\n programs -- a [CapabilityStore] connection and its enclosed capabilities are intended to\n be \"local\" to a program. Instead, if a program wishes to exchange a [Capability] with other\n programs, it should [Export] the [Capability] out of the store, send the [Capability] to the\n target program, which can then [Import] the capability into its own store.\n\n [CapabilityStore] is also used to manage capability lifetimes. The lifetime of a capability is\n scoped to the [CapabilityStore] in which it resides; i.e. to drop the [CapabilityStore]\n connections to release the capabilities instead it. In addition, [CapabilityStore] supports a\n [Drop] API to drop an individual [Capability] reference. (Note that it is possible for a\n some capabilities, like [DictionaryRef], to have multiple references, in which case all of\n the references must be dropped for the underlying resource to be released.)\n\n A note about semantics: the [CapabilityStore] APIs do not return [CapabilityId]s, because\n [CapabilityId]s are assigned by the client. Instead, when a method would semantically return\n a capability, this is expressed by taking the destination [CapabilityId] as an output parameter.\n"]
9108#[derive(PartialEq, Debug)]
9109pub struct CapabilityStore;
9110
9111impl ::fidl_next::Discoverable for CapabilityStore {
9112 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
9113}
9114
9115#[cfg(target_os = "fuchsia")]
9116impl ::fidl_next::HasTransport for CapabilityStore {
9117 type Transport = ::fidl_next::fuchsia::zx::Channel;
9118}
9119
9120pub mod capability_store {
9121 pub mod prelude {
9122 pub use crate::{
9123 CapabilityStore, CapabilityStoreClientHandler, CapabilityStoreLocalClientHandler,
9124 CapabilityStoreLocalServerHandler, CapabilityStoreServerHandler, capability_store,
9125 };
9126
9127 pub use crate::natural::CapabilityStoreConnectorCreateRequest;
9128
9129 pub use crate::natural::CapabilityStoreConnectorOpenRequest;
9130
9131 pub use crate::natural::CapabilityStoreCreateServiceAggregateRequest;
9132
9133 pub use crate::natural::CapabilityStoreDictionaryCopyRequest;
9134
9135 pub use crate::natural::CapabilityStoreDictionaryCreateRequest;
9136
9137 pub use crate::natural::CapabilityStoreDictionaryDrainRequest;
9138
9139 pub use crate::natural::CapabilityStoreDictionaryEnumerateRequest;
9140
9141 pub use crate::natural::CapabilityStoreDictionaryGetRequest;
9142
9143 pub use crate::natural::CapabilityStoreDictionaryInsertRequest;
9144
9145 pub use crate::natural::CapabilityStoreDictionaryKeysRequest;
9146
9147 pub use crate::natural::CapabilityStoreDictionaryLegacyExportRequest;
9148
9149 pub use crate::natural::CapabilityStoreDictionaryLegacyImportRequest;
9150
9151 pub use crate::natural::CapabilityStoreDictionaryRemoveRequest;
9152
9153 pub use crate::natural::CapabilityStoreDirConnectorCreateRequest;
9154
9155 pub use crate::natural::CapabilityStoreDirConnectorOpenRequest;
9156
9157 pub use crate::natural::CapabilityStoreDropRequest;
9158
9159 pub use crate::natural::CapabilityStoreDuplicateRequest;
9160
9161 pub use crate::natural::CapabilityStoreError;
9162
9163 pub use crate::natural::CapabilityStoreExportRequest;
9164
9165 pub use crate::natural::CapabilityStoreImportRequest;
9166
9167 pub use crate::natural::CapabilityStoreConnectorCreateResponse;
9168
9169 pub use crate::natural::CapabilityStoreConnectorOpenResponse;
9170
9171 pub use crate::natural::CapabilityStoreCreateServiceAggregateResponse;
9172
9173 pub use crate::natural::CapabilityStoreDictionaryCopyResponse;
9174
9175 pub use crate::natural::CapabilityStoreDictionaryCreateResponse;
9176
9177 pub use crate::natural::CapabilityStoreDictionaryDrainResponse;
9178
9179 pub use crate::natural::CapabilityStoreDictionaryEnumerateResponse;
9180
9181 pub use crate::natural::CapabilityStoreDictionaryGetResponse;
9182
9183 pub use crate::natural::CapabilityStoreDictionaryInsertResponse;
9184
9185 pub use crate::natural::CapabilityStoreDictionaryKeysResponse;
9186
9187 pub use crate::natural::CapabilityStoreDictionaryLegacyExportResponse;
9188
9189 pub use crate::natural::CapabilityStoreDictionaryLegacyImportResponse;
9190
9191 pub use crate::natural::CapabilityStoreDictionaryRemoveResponse;
9192
9193 pub use crate::natural::CapabilityStoreDirConnectorCreateResponse;
9194
9195 pub use crate::natural::CapabilityStoreDirConnectorOpenResponse;
9196
9197 pub use crate::natural::CapabilityStoreDropResponse;
9198
9199 pub use crate::natural::CapabilityStoreDuplicateResponse;
9200
9201 pub use crate::natural::CapabilityStoreExportResponse;
9202
9203 pub use crate::natural::CapabilityStoreImportResponse;
9204 }
9205
9206 pub struct Duplicate;
9207
9208 impl ::fidl_next::Method for Duplicate {
9209 const ORDINAL: u64 = 6727592627741008260;
9210 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9211 ::fidl_next::protocol::Flexibility::Flexible;
9212
9213 type Protocol = crate::CapabilityStore;
9214
9215 type Request = crate::wire::CapabilityStoreDuplicateRequest;
9216 }
9217
9218 impl ::fidl_next::TwoWayMethod for Duplicate {
9219 type Response = ::fidl_next::wire::Result<
9220 'static,
9221 crate::wire::CapabilityStoreDuplicateResponse,
9222 crate::wire::CapabilityStoreError,
9223 >;
9224 }
9225
9226 impl<___R> ::fidl_next::Respond<___R> for Duplicate {
9227 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9228
9229 fn respond(response: ___R) -> Self::Output {
9230 ::core::result::Result::Ok(response)
9231 }
9232 }
9233
9234 impl<___R> ::fidl_next::RespondErr<___R> for Duplicate {
9235 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9236
9237 fn respond_err(response: ___R) -> Self::Output {
9238 ::core::result::Result::Err(response)
9239 }
9240 }
9241
9242 pub struct Drop;
9243
9244 impl ::fidl_next::Method for Drop {
9245 const ORDINAL: u64 = 753328233834620249;
9246 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9247 ::fidl_next::protocol::Flexibility::Flexible;
9248
9249 type Protocol = crate::CapabilityStore;
9250
9251 type Request = crate::wire::CapabilityStoreDropRequest;
9252 }
9253
9254 impl ::fidl_next::TwoWayMethod for Drop {
9255 type Response = ::fidl_next::wire::Result<
9256 'static,
9257 crate::wire::CapabilityStoreDropResponse,
9258 crate::wire::CapabilityStoreError,
9259 >;
9260 }
9261
9262 impl<___R> ::fidl_next::Respond<___R> for Drop {
9263 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9264
9265 fn respond(response: ___R) -> Self::Output {
9266 ::core::result::Result::Ok(response)
9267 }
9268 }
9269
9270 impl<___R> ::fidl_next::RespondErr<___R> for Drop {
9271 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9272
9273 fn respond_err(response: ___R) -> Self::Output {
9274 ::core::result::Result::Err(response)
9275 }
9276 }
9277
9278 pub struct Export;
9279
9280 impl ::fidl_next::Method for Export {
9281 const ORDINAL: u64 = 226159162093533951;
9282 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9283 ::fidl_next::protocol::Flexibility::Flexible;
9284
9285 type Protocol = crate::CapabilityStore;
9286
9287 type Request = crate::wire::CapabilityStoreExportRequest;
9288 }
9289
9290 impl ::fidl_next::TwoWayMethod for Export {
9291 type Response = ::fidl_next::wire::Result<
9292 'static,
9293 crate::wire::CapabilityStoreExportResponse<'static>,
9294 crate::wire::CapabilityStoreError,
9295 >;
9296 }
9297
9298 impl<___R> ::fidl_next::Respond<___R> for Export {
9299 type Output = ::core::result::Result<
9300 crate::generic::CapabilityStoreExportResponse<___R>,
9301 ::fidl_next::never::Never,
9302 >;
9303
9304 fn respond(response: ___R) -> Self::Output {
9305 ::core::result::Result::Ok(crate::generic::CapabilityStoreExportResponse {
9306 capability: response,
9307 })
9308 }
9309 }
9310
9311 impl<___R> ::fidl_next::RespondErr<___R> for Export {
9312 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9313
9314 fn respond_err(response: ___R) -> Self::Output {
9315 ::core::result::Result::Err(response)
9316 }
9317 }
9318
9319 pub struct Import;
9320
9321 impl ::fidl_next::Method for Import {
9322 const ORDINAL: u64 = 2276030276116435867;
9323 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9324 ::fidl_next::protocol::Flexibility::Flexible;
9325
9326 type Protocol = crate::CapabilityStore;
9327
9328 type Request = crate::wire::CapabilityStoreImportRequest<'static>;
9329 }
9330
9331 impl ::fidl_next::TwoWayMethod for Import {
9332 type Response = ::fidl_next::wire::Result<
9333 'static,
9334 crate::wire::CapabilityStoreImportResponse,
9335 crate::wire::CapabilityStoreError,
9336 >;
9337 }
9338
9339 impl<___R> ::fidl_next::Respond<___R> for Import {
9340 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9341
9342 fn respond(response: ___R) -> Self::Output {
9343 ::core::result::Result::Ok(response)
9344 }
9345 }
9346
9347 impl<___R> ::fidl_next::RespondErr<___R> for Import {
9348 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9349
9350 fn respond_err(response: ___R) -> Self::Output {
9351 ::core::result::Result::Err(response)
9352 }
9353 }
9354
9355 pub struct ConnectorCreate;
9356
9357 impl ::fidl_next::Method for ConnectorCreate {
9358 const ORDINAL: u64 = 2979461408102095909;
9359 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9360 ::fidl_next::protocol::Flexibility::Flexible;
9361
9362 type Protocol = crate::CapabilityStore;
9363
9364 type Request = crate::wire::CapabilityStoreConnectorCreateRequest;
9365 }
9366
9367 impl ::fidl_next::TwoWayMethod for ConnectorCreate {
9368 type Response = ::fidl_next::wire::Result<
9369 'static,
9370 crate::wire::CapabilityStoreConnectorCreateResponse,
9371 crate::wire::CapabilityStoreError,
9372 >;
9373 }
9374
9375 impl<___R> ::fidl_next::Respond<___R> for ConnectorCreate {
9376 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9377
9378 fn respond(response: ___R) -> Self::Output {
9379 ::core::result::Result::Ok(response)
9380 }
9381 }
9382
9383 impl<___R> ::fidl_next::RespondErr<___R> for ConnectorCreate {
9384 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9385
9386 fn respond_err(response: ___R) -> Self::Output {
9387 ::core::result::Result::Err(response)
9388 }
9389 }
9390
9391 pub struct ConnectorOpen;
9392
9393 impl ::fidl_next::Method for ConnectorOpen {
9394 const ORDINAL: u64 = 6016362336453278623;
9395 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9396 ::fidl_next::protocol::Flexibility::Flexible;
9397
9398 type Protocol = crate::CapabilityStore;
9399
9400 type Request = crate::wire::CapabilityStoreConnectorOpenRequest;
9401 }
9402
9403 impl ::fidl_next::TwoWayMethod for ConnectorOpen {
9404 type Response = ::fidl_next::wire::Result<
9405 'static,
9406 crate::wire::CapabilityStoreConnectorOpenResponse,
9407 crate::wire::CapabilityStoreError,
9408 >;
9409 }
9410
9411 impl<___R> ::fidl_next::Respond<___R> for ConnectorOpen {
9412 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9413
9414 fn respond(response: ___R) -> Self::Output {
9415 ::core::result::Result::Ok(response)
9416 }
9417 }
9418
9419 impl<___R> ::fidl_next::RespondErr<___R> for ConnectorOpen {
9420 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9421
9422 fn respond_err(response: ___R) -> Self::Output {
9423 ::core::result::Result::Err(response)
9424 }
9425 }
9426
9427 pub struct DirConnectorCreate;
9428
9429 impl ::fidl_next::Method for DirConnectorCreate {
9430 const ORDINAL: u64 = 1756747594275428795;
9431 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9432 ::fidl_next::protocol::Flexibility::Flexible;
9433
9434 type Protocol = crate::CapabilityStore;
9435
9436 type Request = crate::wire::CapabilityStoreDirConnectorCreateRequest;
9437 }
9438
9439 impl ::fidl_next::TwoWayMethod for DirConnectorCreate {
9440 type Response = ::fidl_next::wire::Result<
9441 'static,
9442 crate::wire::CapabilityStoreDirConnectorCreateResponse,
9443 crate::wire::CapabilityStoreError,
9444 >;
9445 }
9446
9447 impl<___R> ::fidl_next::Respond<___R> for DirConnectorCreate {
9448 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9449
9450 fn respond(response: ___R) -> Self::Output {
9451 ::core::result::Result::Ok(response)
9452 }
9453 }
9454
9455 impl<___R> ::fidl_next::RespondErr<___R> for DirConnectorCreate {
9456 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9457
9458 fn respond_err(response: ___R) -> Self::Output {
9459 ::core::result::Result::Err(response)
9460 }
9461 }
9462
9463 pub struct DirConnectorOpen;
9464
9465 impl ::fidl_next::Method for DirConnectorOpen {
9466 const ORDINAL: u64 = 6219704004220369153;
9467 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9468 ::fidl_next::protocol::Flexibility::Flexible;
9469
9470 type Protocol = crate::CapabilityStore;
9471
9472 type Request = crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>;
9473 }
9474
9475 impl ::fidl_next::TwoWayMethod for DirConnectorOpen {
9476 type Response = ::fidl_next::wire::Result<
9477 'static,
9478 crate::wire::CapabilityStoreDirConnectorOpenResponse,
9479 crate::wire::CapabilityStoreError,
9480 >;
9481 }
9482
9483 impl<___R> ::fidl_next::Respond<___R> for DirConnectorOpen {
9484 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9485
9486 fn respond(response: ___R) -> Self::Output {
9487 ::core::result::Result::Ok(response)
9488 }
9489 }
9490
9491 impl<___R> ::fidl_next::RespondErr<___R> for DirConnectorOpen {
9492 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9493
9494 fn respond_err(response: ___R) -> Self::Output {
9495 ::core::result::Result::Err(response)
9496 }
9497 }
9498
9499 pub struct DictionaryCreate;
9500
9501 impl ::fidl_next::Method for DictionaryCreate {
9502 const ORDINAL: u64 = 7608770958894948499;
9503 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9504 ::fidl_next::protocol::Flexibility::Flexible;
9505
9506 type Protocol = crate::CapabilityStore;
9507
9508 type Request = crate::wire::CapabilityStoreDictionaryCreateRequest;
9509 }
9510
9511 impl ::fidl_next::TwoWayMethod for DictionaryCreate {
9512 type Response = ::fidl_next::wire::Result<
9513 'static,
9514 crate::wire::CapabilityStoreDictionaryCreateResponse,
9515 crate::wire::CapabilityStoreError,
9516 >;
9517 }
9518
9519 impl<___R> ::fidl_next::Respond<___R> for DictionaryCreate {
9520 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9521
9522 fn respond(response: ___R) -> Self::Output {
9523 ::core::result::Result::Ok(response)
9524 }
9525 }
9526
9527 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryCreate {
9528 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9529
9530 fn respond_err(response: ___R) -> Self::Output {
9531 ::core::result::Result::Err(response)
9532 }
9533 }
9534
9535 pub struct DictionaryLegacyImport;
9536
9537 impl ::fidl_next::Method for DictionaryLegacyImport {
9538 const ORDINAL: u64 = 8285893703432012383;
9539 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9540 ::fidl_next::protocol::Flexibility::Flexible;
9541
9542 type Protocol = crate::CapabilityStore;
9543
9544 type Request = crate::wire::CapabilityStoreDictionaryLegacyImportRequest;
9545 }
9546
9547 impl ::fidl_next::TwoWayMethod for DictionaryLegacyImport {
9548 type Response = ::fidl_next::wire::Result<
9549 'static,
9550 crate::wire::CapabilityStoreDictionaryLegacyImportResponse,
9551 crate::wire::CapabilityStoreError,
9552 >;
9553 }
9554
9555 impl<___R> ::fidl_next::Respond<___R> for DictionaryLegacyImport {
9556 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9557
9558 fn respond(response: ___R) -> Self::Output {
9559 ::core::result::Result::Ok(response)
9560 }
9561 }
9562
9563 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryLegacyImport {
9564 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9565
9566 fn respond_err(response: ___R) -> Self::Output {
9567 ::core::result::Result::Err(response)
9568 }
9569 }
9570
9571 pub struct DictionaryLegacyExport;
9572
9573 impl ::fidl_next::Method for DictionaryLegacyExport {
9574 const ORDINAL: u64 = 4647175832683306445;
9575 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9576 ::fidl_next::protocol::Flexibility::Flexible;
9577
9578 type Protocol = crate::CapabilityStore;
9579
9580 type Request = crate::wire::CapabilityStoreDictionaryLegacyExportRequest;
9581 }
9582
9583 impl ::fidl_next::TwoWayMethod for DictionaryLegacyExport {
9584 type Response = ::fidl_next::wire::Result<
9585 'static,
9586 crate::wire::CapabilityStoreDictionaryLegacyExportResponse,
9587 crate::wire::CapabilityStoreError,
9588 >;
9589 }
9590
9591 impl<___R> ::fidl_next::Respond<___R> for DictionaryLegacyExport {
9592 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9593
9594 fn respond(response: ___R) -> Self::Output {
9595 ::core::result::Result::Ok(response)
9596 }
9597 }
9598
9599 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryLegacyExport {
9600 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9601
9602 fn respond_err(response: ___R) -> Self::Output {
9603 ::core::result::Result::Err(response)
9604 }
9605 }
9606
9607 pub struct DictionaryInsert;
9608
9609 impl ::fidl_next::Method for DictionaryInsert {
9610 const ORDINAL: u64 = 8575443262986538023;
9611 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9612 ::fidl_next::protocol::Flexibility::Flexible;
9613
9614 type Protocol = crate::CapabilityStore;
9615
9616 type Request = crate::wire::CapabilityStoreDictionaryInsertRequest<'static>;
9617 }
9618
9619 impl ::fidl_next::TwoWayMethod for DictionaryInsert {
9620 type Response = ::fidl_next::wire::Result<
9621 'static,
9622 crate::wire::CapabilityStoreDictionaryInsertResponse,
9623 crate::wire::CapabilityStoreError,
9624 >;
9625 }
9626
9627 impl<___R> ::fidl_next::Respond<___R> for DictionaryInsert {
9628 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9629
9630 fn respond(response: ___R) -> Self::Output {
9631 ::core::result::Result::Ok(response)
9632 }
9633 }
9634
9635 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryInsert {
9636 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9637
9638 fn respond_err(response: ___R) -> Self::Output {
9639 ::core::result::Result::Err(response)
9640 }
9641 }
9642
9643 pub struct DictionaryGet;
9644
9645 impl ::fidl_next::Method for DictionaryGet {
9646 const ORDINAL: u64 = 5592951026866236882;
9647 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9648 ::fidl_next::protocol::Flexibility::Flexible;
9649
9650 type Protocol = crate::CapabilityStore;
9651
9652 type Request = crate::wire::CapabilityStoreDictionaryGetRequest<'static>;
9653 }
9654
9655 impl ::fidl_next::TwoWayMethod for DictionaryGet {
9656 type Response = ::fidl_next::wire::Result<
9657 'static,
9658 crate::wire::CapabilityStoreDictionaryGetResponse,
9659 crate::wire::CapabilityStoreError,
9660 >;
9661 }
9662
9663 impl<___R> ::fidl_next::Respond<___R> for DictionaryGet {
9664 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9665
9666 fn respond(response: ___R) -> Self::Output {
9667 ::core::result::Result::Ok(response)
9668 }
9669 }
9670
9671 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryGet {
9672 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9673
9674 fn respond_err(response: ___R) -> Self::Output {
9675 ::core::result::Result::Err(response)
9676 }
9677 }
9678
9679 pub struct DictionaryRemove;
9680
9681 impl ::fidl_next::Method for DictionaryRemove {
9682 const ORDINAL: u64 = 343892214579320051;
9683 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9684 ::fidl_next::protocol::Flexibility::Flexible;
9685
9686 type Protocol = crate::CapabilityStore;
9687
9688 type Request = crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>;
9689 }
9690
9691 impl ::fidl_next::TwoWayMethod for DictionaryRemove {
9692 type Response = ::fidl_next::wire::Result<
9693 'static,
9694 crate::wire::CapabilityStoreDictionaryRemoveResponse,
9695 crate::wire::CapabilityStoreError,
9696 >;
9697 }
9698
9699 impl<___R> ::fidl_next::Respond<___R> for DictionaryRemove {
9700 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9701
9702 fn respond(response: ___R) -> Self::Output {
9703 ::core::result::Result::Ok(response)
9704 }
9705 }
9706
9707 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryRemove {
9708 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9709
9710 fn respond_err(response: ___R) -> Self::Output {
9711 ::core::result::Result::Err(response)
9712 }
9713 }
9714
9715 pub struct DictionaryCopy;
9716
9717 impl ::fidl_next::Method for DictionaryCopy {
9718 const ORDINAL: u64 = 3977783339739362383;
9719 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9720 ::fidl_next::protocol::Flexibility::Flexible;
9721
9722 type Protocol = crate::CapabilityStore;
9723
9724 type Request = crate::wire::CapabilityStoreDictionaryCopyRequest;
9725 }
9726
9727 impl ::fidl_next::TwoWayMethod for DictionaryCopy {
9728 type Response = ::fidl_next::wire::Result<
9729 'static,
9730 crate::wire::CapabilityStoreDictionaryCopyResponse,
9731 crate::wire::CapabilityStoreError,
9732 >;
9733 }
9734
9735 impl<___R> ::fidl_next::Respond<___R> for DictionaryCopy {
9736 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9737
9738 fn respond(response: ___R) -> Self::Output {
9739 ::core::result::Result::Ok(response)
9740 }
9741 }
9742
9743 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryCopy {
9744 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9745
9746 fn respond_err(response: ___R) -> Self::Output {
9747 ::core::result::Result::Err(response)
9748 }
9749 }
9750
9751 pub struct DictionaryKeys;
9752
9753 impl ::fidl_next::Method for DictionaryKeys {
9754 const ORDINAL: u64 = 597577248872787102;
9755 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9756 ::fidl_next::protocol::Flexibility::Flexible;
9757
9758 type Protocol = crate::CapabilityStore;
9759
9760 type Request = crate::wire::CapabilityStoreDictionaryKeysRequest;
9761 }
9762
9763 impl ::fidl_next::TwoWayMethod for DictionaryKeys {
9764 type Response = ::fidl_next::wire::Result<
9765 'static,
9766 crate::wire::CapabilityStoreDictionaryKeysResponse,
9767 crate::wire::CapabilityStoreError,
9768 >;
9769 }
9770
9771 impl<___R> ::fidl_next::Respond<___R> for DictionaryKeys {
9772 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9773
9774 fn respond(response: ___R) -> Self::Output {
9775 ::core::result::Result::Ok(response)
9776 }
9777 }
9778
9779 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryKeys {
9780 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9781
9782 fn respond_err(response: ___R) -> Self::Output {
9783 ::core::result::Result::Err(response)
9784 }
9785 }
9786
9787 pub struct DictionaryEnumerate;
9788
9789 impl ::fidl_next::Method for DictionaryEnumerate {
9790 const ORDINAL: u64 = 964467096271472193;
9791 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9792 ::fidl_next::protocol::Flexibility::Flexible;
9793
9794 type Protocol = crate::CapabilityStore;
9795
9796 type Request = crate::wire::CapabilityStoreDictionaryEnumerateRequest;
9797 }
9798
9799 impl ::fidl_next::TwoWayMethod for DictionaryEnumerate {
9800 type Response = ::fidl_next::wire::Result<
9801 'static,
9802 crate::wire::CapabilityStoreDictionaryEnumerateResponse,
9803 crate::wire::CapabilityStoreError,
9804 >;
9805 }
9806
9807 impl<___R> ::fidl_next::Respond<___R> for DictionaryEnumerate {
9808 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9809
9810 fn respond(response: ___R) -> Self::Output {
9811 ::core::result::Result::Ok(response)
9812 }
9813 }
9814
9815 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryEnumerate {
9816 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9817
9818 fn respond_err(response: ___R) -> Self::Output {
9819 ::core::result::Result::Err(response)
9820 }
9821 }
9822
9823 pub struct DictionaryDrain;
9824
9825 impl ::fidl_next::Method for DictionaryDrain {
9826 const ORDINAL: u64 = 2928364469569621208;
9827 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9828 ::fidl_next::protocol::Flexibility::Flexible;
9829
9830 type Protocol = crate::CapabilityStore;
9831
9832 type Request = crate::wire::CapabilityStoreDictionaryDrainRequest;
9833 }
9834
9835 impl ::fidl_next::TwoWayMethod for DictionaryDrain {
9836 type Response = ::fidl_next::wire::Result<
9837 'static,
9838 crate::wire::CapabilityStoreDictionaryDrainResponse,
9839 crate::wire::CapabilityStoreError,
9840 >;
9841 }
9842
9843 impl<___R> ::fidl_next::Respond<___R> for DictionaryDrain {
9844 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9845
9846 fn respond(response: ___R) -> Self::Output {
9847 ::core::result::Result::Ok(response)
9848 }
9849 }
9850
9851 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryDrain {
9852 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9853
9854 fn respond_err(response: ___R) -> Self::Output {
9855 ::core::result::Result::Err(response)
9856 }
9857 }
9858
9859 pub struct CreateServiceAggregate;
9860
9861 impl ::fidl_next::Method for CreateServiceAggregate {
9862 const ORDINAL: u64 = 5009147843253209178;
9863 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9864 ::fidl_next::protocol::Flexibility::Flexible;
9865
9866 type Protocol = crate::CapabilityStore;
9867
9868 type Request = crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>;
9869 }
9870
9871 impl ::fidl_next::TwoWayMethod for CreateServiceAggregate {
9872 type Response = ::fidl_next::wire::Result<
9873 'static,
9874 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
9875 crate::wire::CapabilityStoreError,
9876 >;
9877 }
9878
9879 impl<___R> ::fidl_next::Respond<___R> for CreateServiceAggregate {
9880 type Output = ::core::result::Result<
9881 crate::generic::CapabilityStoreCreateServiceAggregateResponse<___R>,
9882 ::fidl_next::never::Never,
9883 >;
9884
9885 fn respond(response: ___R) -> Self::Output {
9886 ::core::result::Result::Ok(
9887 crate::generic::CapabilityStoreCreateServiceAggregateResponse {
9888 aggregate_dir_connector: response,
9889 },
9890 )
9891 }
9892 }
9893
9894 impl<___R> ::fidl_next::RespondErr<___R> for CreateServiceAggregate {
9895 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9896
9897 fn respond_err(response: ___R) -> Self::Output {
9898 ::core::result::Result::Err(response)
9899 }
9900 }
9901
9902 mod ___detail {
9903 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::CapabilityStore
9904 where
9905 ___T: ::fidl_next::Transport,
9906 {
9907 type Client = CapabilityStoreClient<___T>;
9908 type Server = CapabilityStoreServer<___T>;
9909 }
9910
9911 #[repr(transparent)]
9913 pub struct CapabilityStoreClient<___T: ::fidl_next::Transport> {
9914 #[allow(dead_code)]
9915 client: ::fidl_next::protocol::Client<___T>,
9916 }
9917
9918 impl<___T> CapabilityStoreClient<___T>
9919 where
9920 ___T: ::fidl_next::Transport,
9921 {
9922 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
9923 pub fn duplicate(
9924 &self,
9925
9926 id: impl ::fidl_next::Encode<
9927 ::fidl_next::wire::Uint64,
9928 <___T as ::fidl_next::Transport>::SendBuffer,
9929 >,
9930
9931 dest_id: impl ::fidl_next::Encode<
9932 ::fidl_next::wire::Uint64,
9933 <___T as ::fidl_next::Transport>::SendBuffer,
9934 >,
9935 ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
9936 where
9937 <___T as ::fidl_next::Transport>::SendBuffer:
9938 ::fidl_next::encoder::InternalHandleEncoder,
9939 {
9940 self.duplicate_with(crate::generic::CapabilityStoreDuplicateRequest { id, dest_id })
9941 }
9942
9943 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
9944 pub fn duplicate_with<___R>(
9945 &self,
9946 request: ___R,
9947 ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
9948 where
9949 ___R: ::fidl_next::Encode<
9950 crate::wire::CapabilityStoreDuplicateRequest,
9951 <___T as ::fidl_next::Transport>::SendBuffer,
9952 >,
9953 {
9954 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9955 6727592627741008260,
9956 <super::Duplicate as ::fidl_next::Method>::FLEXIBILITY,
9957 request,
9958 ))
9959 }
9960
9961 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9962 pub fn drop(
9963 &self,
9964
9965 id: impl ::fidl_next::Encode<
9966 ::fidl_next::wire::Uint64,
9967 <___T as ::fidl_next::Transport>::SendBuffer,
9968 >,
9969 ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
9970 where
9971 <___T as ::fidl_next::Transport>::SendBuffer:
9972 ::fidl_next::encoder::InternalHandleEncoder,
9973 {
9974 self.drop_with(crate::generic::CapabilityStoreDropRequest { id })
9975 }
9976
9977 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9978 pub fn drop_with<___R>(
9979 &self,
9980 request: ___R,
9981 ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
9982 where
9983 ___R: ::fidl_next::Encode<
9984 crate::wire::CapabilityStoreDropRequest,
9985 <___T as ::fidl_next::Transport>::SendBuffer,
9986 >,
9987 {
9988 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9989 753328233834620249,
9990 <super::Drop as ::fidl_next::Method>::FLEXIBILITY,
9991 request,
9992 ))
9993 }
9994
9995 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9996 pub fn export(
9997 &self,
9998
9999 id: impl ::fidl_next::Encode<
10000 ::fidl_next::wire::Uint64,
10001 <___T as ::fidl_next::Transport>::SendBuffer,
10002 >,
10003 ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
10004 where
10005 <___T as ::fidl_next::Transport>::SendBuffer:
10006 ::fidl_next::encoder::InternalHandleEncoder,
10007 {
10008 self.export_with(crate::generic::CapabilityStoreExportRequest { id })
10009 }
10010
10011 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10012 pub fn export_with<___R>(
10013 &self,
10014 request: ___R,
10015 ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
10016 where
10017 ___R: ::fidl_next::Encode<
10018 crate::wire::CapabilityStoreExportRequest,
10019 <___T as ::fidl_next::Transport>::SendBuffer,
10020 >,
10021 {
10022 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10023 226159162093533951,
10024 <super::Export as ::fidl_next::Method>::FLEXIBILITY,
10025 request,
10026 ))
10027 }
10028
10029 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
10030 pub fn import(
10031 &self,
10032
10033 id: impl ::fidl_next::Encode<
10034 ::fidl_next::wire::Uint64,
10035 <___T as ::fidl_next::Transport>::SendBuffer,
10036 >,
10037
10038 capability: impl ::fidl_next::Encode<
10039 crate::wire::Capability<'static>,
10040 <___T as ::fidl_next::Transport>::SendBuffer,
10041 >,
10042 ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
10043 where
10044 <___T as ::fidl_next::Transport>::SendBuffer:
10045 ::fidl_next::encoder::InternalHandleEncoder,
10046 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10047 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10048 {
10049 self.import_with(crate::generic::CapabilityStoreImportRequest { id, capability })
10050 }
10051
10052 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
10053 pub fn import_with<___R>(
10054 &self,
10055 request: ___R,
10056 ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
10057 where
10058 ___R: ::fidl_next::Encode<
10059 crate::wire::CapabilityStoreImportRequest<'static>,
10060 <___T as ::fidl_next::Transport>::SendBuffer,
10061 >,
10062 {
10063 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10064 2276030276116435867,
10065 <super::Import as ::fidl_next::Method>::FLEXIBILITY,
10066 request,
10067 ))
10068 }
10069
10070 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10071 pub fn connector_create(
10072 &self,
10073
10074 id: impl ::fidl_next::Encode<
10075 ::fidl_next::wire::Uint64,
10076 <___T as ::fidl_next::Transport>::SendBuffer,
10077 >,
10078
10079 receiver: impl ::fidl_next::Encode<
10080 ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
10081 <___T as ::fidl_next::Transport>::SendBuffer,
10082 >,
10083 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
10084 where
10085 <___T as ::fidl_next::Transport>::SendBuffer:
10086 ::fidl_next::encoder::InternalHandleEncoder,
10087 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10088 {
10089 self.connector_create_with(crate::generic::CapabilityStoreConnectorCreateRequest {
10090 id,
10091
10092 receiver,
10093 })
10094 }
10095
10096 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10097 pub fn connector_create_with<___R>(
10098 &self,
10099 request: ___R,
10100 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
10101 where
10102 ___R: ::fidl_next::Encode<
10103 crate::wire::CapabilityStoreConnectorCreateRequest,
10104 <___T as ::fidl_next::Transport>::SendBuffer,
10105 >,
10106 {
10107 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10108 2979461408102095909,
10109 <super::ConnectorCreate as ::fidl_next::Method>::FLEXIBILITY,
10110 request,
10111 ))
10112 }
10113
10114 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10115 pub fn connector_open(
10116 &self,
10117
10118 id: impl ::fidl_next::Encode<
10119 ::fidl_next::wire::Uint64,
10120 <___T as ::fidl_next::Transport>::SendBuffer,
10121 >,
10122
10123 server_end: impl ::fidl_next::Encode<
10124 ::fidl_next::wire::fuchsia::Channel,
10125 <___T as ::fidl_next::Transport>::SendBuffer,
10126 >,
10127 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
10128 where
10129 <___T as ::fidl_next::Transport>::SendBuffer:
10130 ::fidl_next::encoder::InternalHandleEncoder,
10131 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10132 {
10133 self.connector_open_with(crate::generic::CapabilityStoreConnectorOpenRequest {
10134 id,
10135
10136 server_end,
10137 })
10138 }
10139
10140 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10141 pub fn connector_open_with<___R>(
10142 &self,
10143 request: ___R,
10144 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
10145 where
10146 ___R: ::fidl_next::Encode<
10147 crate::wire::CapabilityStoreConnectorOpenRequest,
10148 <___T as ::fidl_next::Transport>::SendBuffer,
10149 >,
10150 {
10151 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10152 6016362336453278623,
10153 <super::ConnectorOpen as ::fidl_next::Method>::FLEXIBILITY,
10154 request,
10155 ))
10156 }
10157
10158 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10159 pub fn dir_connector_create(
10160 &self,
10161
10162 id: impl ::fidl_next::Encode<
10163 ::fidl_next::wire::Uint64,
10164 <___T as ::fidl_next::Transport>::SendBuffer,
10165 >,
10166
10167 receiver: impl ::fidl_next::Encode<
10168 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
10169 <___T as ::fidl_next::Transport>::SendBuffer,
10170 >,
10171 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
10172 where
10173 <___T as ::fidl_next::Transport>::SendBuffer:
10174 ::fidl_next::encoder::InternalHandleEncoder,
10175 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10176 {
10177 self.dir_connector_create_with(
10178 crate::generic::CapabilityStoreDirConnectorCreateRequest { id, receiver },
10179 )
10180 }
10181
10182 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10183 pub fn dir_connector_create_with<___R>(
10184 &self,
10185 request: ___R,
10186 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
10187 where
10188 ___R: ::fidl_next::Encode<
10189 crate::wire::CapabilityStoreDirConnectorCreateRequest,
10190 <___T as ::fidl_next::Transport>::SendBuffer,
10191 >,
10192 {
10193 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10194 1756747594275428795,
10195 <super::DirConnectorCreate as ::fidl_next::Method>::FLEXIBILITY,
10196 request,
10197 ))
10198 }
10199
10200 #[doc = " Open a connection from the provided [DirConnector] capability that will\n be dispatched to the [DirReceiver] on the other end. The `id` and\n `server_end` arguments are required, and the `flags` and `path`\n arguments are optional (a path of `.` will be used if one is not\n otherwise set).\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10201 pub fn dir_connector_open_with<___R>(
10202 &self,
10203 request: ___R,
10204 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorOpen, ___T>
10205 where
10206 ___R: ::fidl_next::Encode<
10207 crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>,
10208 <___T as ::fidl_next::Transport>::SendBuffer,
10209 >,
10210 {
10211 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10212 6219704004220369153,
10213 <super::DirConnectorOpen as ::fidl_next::Method>::FLEXIBILITY,
10214 request,
10215 ))
10216 }
10217
10218 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10219 pub fn dictionary_create(
10220 &self,
10221
10222 id: impl ::fidl_next::Encode<
10223 ::fidl_next::wire::Uint64,
10224 <___T as ::fidl_next::Transport>::SendBuffer,
10225 >,
10226 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
10227 where
10228 <___T as ::fidl_next::Transport>::SendBuffer:
10229 ::fidl_next::encoder::InternalHandleEncoder,
10230 {
10231 self.dictionary_create_with(
10232 crate::generic::CapabilityStoreDictionaryCreateRequest { id },
10233 )
10234 }
10235
10236 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10237 pub fn dictionary_create_with<___R>(
10238 &self,
10239 request: ___R,
10240 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
10241 where
10242 ___R: ::fidl_next::Encode<
10243 crate::wire::CapabilityStoreDictionaryCreateRequest,
10244 <___T as ::fidl_next::Transport>::SendBuffer,
10245 >,
10246 {
10247 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10248 7608770958894948499,
10249 <super::DictionaryCreate as ::fidl_next::Method>::FLEXIBILITY,
10250 request,
10251 ))
10252 }
10253
10254 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
10255 pub fn dictionary_legacy_import(
10256 &self,
10257
10258 id: impl ::fidl_next::Encode<
10259 ::fidl_next::wire::Uint64,
10260 <___T as ::fidl_next::Transport>::SendBuffer,
10261 >,
10262
10263 client_end: impl ::fidl_next::Encode<
10264 ::fidl_next::wire::fuchsia::Channel,
10265 <___T as ::fidl_next::Transport>::SendBuffer,
10266 >,
10267 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
10268 where
10269 <___T as ::fidl_next::Transport>::SendBuffer:
10270 ::fidl_next::encoder::InternalHandleEncoder,
10271 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10272 {
10273 self.dictionary_legacy_import_with(
10274 crate::generic::CapabilityStoreDictionaryLegacyImportRequest { id, client_end },
10275 )
10276 }
10277
10278 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
10279 pub fn dictionary_legacy_import_with<___R>(
10280 &self,
10281 request: ___R,
10282 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
10283 where
10284 ___R: ::fidl_next::Encode<
10285 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
10286 <___T as ::fidl_next::Transport>::SendBuffer,
10287 >,
10288 {
10289 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10290 8285893703432012383,
10291 <super::DictionaryLegacyImport as ::fidl_next::Method>::FLEXIBILITY,
10292 request,
10293 ))
10294 }
10295
10296 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10297 pub fn dictionary_legacy_export(
10298 &self,
10299
10300 id: impl ::fidl_next::Encode<
10301 ::fidl_next::wire::Uint64,
10302 <___T as ::fidl_next::Transport>::SendBuffer,
10303 >,
10304
10305 server_end: impl ::fidl_next::Encode<
10306 ::fidl_next::wire::fuchsia::Channel,
10307 <___T as ::fidl_next::Transport>::SendBuffer,
10308 >,
10309 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
10310 where
10311 <___T as ::fidl_next::Transport>::SendBuffer:
10312 ::fidl_next::encoder::InternalHandleEncoder,
10313 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10314 {
10315 self.dictionary_legacy_export_with(
10316 crate::generic::CapabilityStoreDictionaryLegacyExportRequest { id, server_end },
10317 )
10318 }
10319
10320 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10321 pub fn dictionary_legacy_export_with<___R>(
10322 &self,
10323 request: ___R,
10324 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
10325 where
10326 ___R: ::fidl_next::Encode<
10327 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
10328 <___T as ::fidl_next::Transport>::SendBuffer,
10329 >,
10330 {
10331 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10332 4647175832683306445,
10333 <super::DictionaryLegacyExport as ::fidl_next::Method>::FLEXIBILITY,
10334 request,
10335 ))
10336 }
10337
10338 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
10339 pub fn dictionary_insert(
10340 &self,
10341
10342 id: impl ::fidl_next::Encode<
10343 ::fidl_next::wire::Uint64,
10344 <___T as ::fidl_next::Transport>::SendBuffer,
10345 >,
10346
10347 item: impl ::fidl_next::Encode<
10348 crate::wire::DictionaryItem<'static>,
10349 <___T as ::fidl_next::Transport>::SendBuffer,
10350 >,
10351 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
10352 where
10353 <___T as ::fidl_next::Transport>::SendBuffer:
10354 ::fidl_next::encoder::InternalHandleEncoder,
10355 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10356 {
10357 self.dictionary_insert_with(
10358 crate::generic::CapabilityStoreDictionaryInsertRequest { id, item },
10359 )
10360 }
10361
10362 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
10363 pub fn dictionary_insert_with<___R>(
10364 &self,
10365 request: ___R,
10366 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
10367 where
10368 ___R: ::fidl_next::Encode<
10369 crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
10370 <___T as ::fidl_next::Transport>::SendBuffer,
10371 >,
10372 {
10373 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10374 8575443262986538023,
10375 <super::DictionaryInsert as ::fidl_next::Method>::FLEXIBILITY,
10376 request,
10377 ))
10378 }
10379
10380 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
10381 pub fn dictionary_get(
10382 &self,
10383
10384 id: impl ::fidl_next::Encode<
10385 ::fidl_next::wire::Uint64,
10386 <___T as ::fidl_next::Transport>::SendBuffer,
10387 >,
10388
10389 key: impl ::fidl_next::Encode<
10390 ::fidl_next::wire::String<'static>,
10391 <___T as ::fidl_next::Transport>::SendBuffer,
10392 >,
10393
10394 dest_id: impl ::fidl_next::Encode<
10395 ::fidl_next::wire::Uint64,
10396 <___T as ::fidl_next::Transport>::SendBuffer,
10397 >,
10398 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
10399 where
10400 <___T as ::fidl_next::Transport>::SendBuffer:
10401 ::fidl_next::encoder::InternalHandleEncoder,
10402 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10403 {
10404 self.dictionary_get_with(crate::generic::CapabilityStoreDictionaryGetRequest {
10405 id,
10406
10407 key,
10408
10409 dest_id,
10410 })
10411 }
10412
10413 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
10414 pub fn dictionary_get_with<___R>(
10415 &self,
10416 request: ___R,
10417 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
10418 where
10419 ___R: ::fidl_next::Encode<
10420 crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
10421 <___T as ::fidl_next::Transport>::SendBuffer,
10422 >,
10423 {
10424 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10425 5592951026866236882,
10426 <super::DictionaryGet as ::fidl_next::Method>::FLEXIBILITY,
10427 request,
10428 ))
10429 }
10430
10431 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
10432 pub fn dictionary_remove(
10433 &self,
10434
10435 id: impl ::fidl_next::Encode<
10436 ::fidl_next::wire::Uint64,
10437 <___T as ::fidl_next::Transport>::SendBuffer,
10438 >,
10439
10440 key: impl ::fidl_next::Encode<
10441 ::fidl_next::wire::String<'static>,
10442 <___T as ::fidl_next::Transport>::SendBuffer,
10443 >,
10444
10445 dest_id: impl ::fidl_next::Encode<
10446 ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
10447 <___T as ::fidl_next::Transport>::SendBuffer,
10448 >,
10449 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
10450 where
10451 <___T as ::fidl_next::Transport>::SendBuffer:
10452 ::fidl_next::encoder::InternalHandleEncoder,
10453 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10454 {
10455 self.dictionary_remove_with(
10456 crate::generic::CapabilityStoreDictionaryRemoveRequest { id, key, dest_id },
10457 )
10458 }
10459
10460 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
10461 pub fn dictionary_remove_with<___R>(
10462 &self,
10463 request: ___R,
10464 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
10465 where
10466 ___R: ::fidl_next::Encode<
10467 crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
10468 <___T as ::fidl_next::Transport>::SendBuffer,
10469 >,
10470 {
10471 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10472 343892214579320051,
10473 <super::DictionaryRemove as ::fidl_next::Method>::FLEXIBILITY,
10474 request,
10475 ))
10476 }
10477
10478 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
10479 pub fn dictionary_copy(
10480 &self,
10481
10482 id: impl ::fidl_next::Encode<
10483 ::fidl_next::wire::Uint64,
10484 <___T as ::fidl_next::Transport>::SendBuffer,
10485 >,
10486
10487 dest_id: impl ::fidl_next::Encode<
10488 ::fidl_next::wire::Uint64,
10489 <___T as ::fidl_next::Transport>::SendBuffer,
10490 >,
10491 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
10492 where
10493 <___T as ::fidl_next::Transport>::SendBuffer:
10494 ::fidl_next::encoder::InternalHandleEncoder,
10495 {
10496 self.dictionary_copy_with(crate::generic::CapabilityStoreDictionaryCopyRequest {
10497 id,
10498
10499 dest_id,
10500 })
10501 }
10502
10503 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
10504 pub fn dictionary_copy_with<___R>(
10505 &self,
10506 request: ___R,
10507 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
10508 where
10509 ___R: ::fidl_next::Encode<
10510 crate::wire::CapabilityStoreDictionaryCopyRequest,
10511 <___T as ::fidl_next::Transport>::SendBuffer,
10512 >,
10513 {
10514 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10515 3977783339739362383,
10516 <super::DictionaryCopy as ::fidl_next::Method>::FLEXIBILITY,
10517 request,
10518 ))
10519 }
10520
10521 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10522 pub fn dictionary_keys(
10523 &self,
10524
10525 id: impl ::fidl_next::Encode<
10526 ::fidl_next::wire::Uint64,
10527 <___T as ::fidl_next::Transport>::SendBuffer,
10528 >,
10529
10530 iterator: impl ::fidl_next::Encode<
10531 ::fidl_next::ServerEnd<
10532 crate::DictionaryKeysIterator,
10533 ::fidl_next::wire::fuchsia::Channel,
10534 >,
10535 <___T as ::fidl_next::Transport>::SendBuffer,
10536 >,
10537 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
10538 where
10539 <___T as ::fidl_next::Transport>::SendBuffer:
10540 ::fidl_next::encoder::InternalHandleEncoder,
10541 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10542 {
10543 self.dictionary_keys_with(crate::generic::CapabilityStoreDictionaryKeysRequest {
10544 id,
10545
10546 iterator,
10547 })
10548 }
10549
10550 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10551 pub fn dictionary_keys_with<___R>(
10552 &self,
10553 request: ___R,
10554 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
10555 where
10556 ___R: ::fidl_next::Encode<
10557 crate::wire::CapabilityStoreDictionaryKeysRequest,
10558 <___T as ::fidl_next::Transport>::SendBuffer,
10559 >,
10560 {
10561 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10562 597577248872787102,
10563 <super::DictionaryKeys as ::fidl_next::Method>::FLEXIBILITY,
10564 request,
10565 ))
10566 }
10567
10568 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10569 pub fn dictionary_enumerate(
10570 &self,
10571
10572 id: impl ::fidl_next::Encode<
10573 ::fidl_next::wire::Uint64,
10574 <___T as ::fidl_next::Transport>::SendBuffer,
10575 >,
10576
10577 iterator: impl ::fidl_next::Encode<
10578 ::fidl_next::ServerEnd<
10579 crate::DictionaryEnumerateIterator,
10580 ::fidl_next::wire::fuchsia::Channel,
10581 >,
10582 <___T as ::fidl_next::Transport>::SendBuffer,
10583 >,
10584 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
10585 where
10586 <___T as ::fidl_next::Transport>::SendBuffer:
10587 ::fidl_next::encoder::InternalHandleEncoder,
10588 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10589 {
10590 self.dictionary_enumerate_with(
10591 crate::generic::CapabilityStoreDictionaryEnumerateRequest { id, iterator },
10592 )
10593 }
10594
10595 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10596 pub fn dictionary_enumerate_with<___R>(
10597 &self,
10598 request: ___R,
10599 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
10600 where
10601 ___R: ::fidl_next::Encode<
10602 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
10603 <___T as ::fidl_next::Transport>::SendBuffer,
10604 >,
10605 {
10606 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10607 964467096271472193,
10608 <super::DictionaryEnumerate as ::fidl_next::Method>::FLEXIBILITY,
10609 request,
10610 ))
10611 }
10612
10613 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10614 pub fn dictionary_drain(
10615 &self,
10616
10617 id: impl ::fidl_next::Encode<
10618 ::fidl_next::wire::Uint64,
10619 <___T as ::fidl_next::Transport>::SendBuffer,
10620 >,
10621
10622 iterator: impl ::fidl_next::Encode<
10623 ::fidl_next::ServerEnd<
10624 crate::DictionaryDrainIterator,
10625 ::fidl_next::wire::fuchsia::OptionalChannel,
10626 >,
10627 <___T as ::fidl_next::Transport>::SendBuffer,
10628 >,
10629 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
10630 where
10631 <___T as ::fidl_next::Transport>::SendBuffer:
10632 ::fidl_next::encoder::InternalHandleEncoder,
10633 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10634 {
10635 self.dictionary_drain_with(crate::generic::CapabilityStoreDictionaryDrainRequest {
10636 id,
10637
10638 iterator,
10639 })
10640 }
10641
10642 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10643 pub fn dictionary_drain_with<___R>(
10644 &self,
10645 request: ___R,
10646 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
10647 where
10648 ___R: ::fidl_next::Encode<
10649 crate::wire::CapabilityStoreDictionaryDrainRequest,
10650 <___T as ::fidl_next::Transport>::SendBuffer,
10651 >,
10652 {
10653 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10654 2928364469569621208,
10655 <super::DictionaryDrain as ::fidl_next::Method>::FLEXIBILITY,
10656 request,
10657 ))
10658 }
10659
10660 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10661 pub fn create_service_aggregate(
10662 &self,
10663
10664 sources: impl ::fidl_next::Encode<
10665 ::fidl_next::wire::Vector<'static, crate::wire::AggregateSource<'static>>,
10666 <___T as ::fidl_next::Transport>::SendBuffer,
10667 >,
10668 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateServiceAggregate, ___T>
10669 where
10670 <___T as ::fidl_next::Transport>::SendBuffer:
10671 ::fidl_next::encoder::InternalHandleEncoder,
10672 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10673 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10674 {
10675 self.create_service_aggregate_with(
10676 crate::generic::CapabilityStoreCreateServiceAggregateRequest { sources },
10677 )
10678 }
10679
10680 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10681 pub fn create_service_aggregate_with<___R>(
10682 &self,
10683 request: ___R,
10684 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateServiceAggregate, ___T>
10685 where
10686 ___R: ::fidl_next::Encode<
10687 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
10688 <___T as ::fidl_next::Transport>::SendBuffer,
10689 >,
10690 {
10691 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10692 5009147843253209178,
10693 <super::CreateServiceAggregate as ::fidl_next::Method>::FLEXIBILITY,
10694 request,
10695 ))
10696 }
10697 }
10698
10699 #[repr(transparent)]
10701 pub struct CapabilityStoreServer<___T: ::fidl_next::Transport> {
10702 server: ::fidl_next::protocol::Server<___T>,
10703 }
10704
10705 impl<___T> CapabilityStoreServer<___T> where ___T: ::fidl_next::Transport {}
10706 }
10707}
10708
10709#[diagnostic::on_unimplemented(
10710 note = "If {Self} implements the non-local CapabilityStoreClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10711)]
10712
10713pub trait CapabilityStoreLocalClientHandler<
10717 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10718 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10719>
10720{
10721 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10722 ::core::future::ready(())
10723 }
10724}
10725
10726impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for CapabilityStore
10727where
10728 ___H: CapabilityStoreLocalClientHandler<___T>,
10729 ___T: ::fidl_next::Transport,
10730{
10731 async fn on_event(
10732 handler: &mut ___H,
10733 mut message: ::fidl_next::Message<___T>,
10734 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10735 match *message.header().ordinal {
10736 ordinal => {
10737 handler.on_unknown_interaction(ordinal).await;
10738 if ::core::matches!(
10739 message.header().flexibility(),
10740 ::fidl_next::protocol::Flexibility::Strict
10741 ) {
10742 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10743 } else {
10744 Ok(())
10745 }
10746 }
10747 }
10748 }
10749}
10750
10751#[diagnostic::on_unimplemented(
10752 note = "If {Self} implements the non-local CapabilityStoreServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10753)]
10754
10755pub trait CapabilityStoreLocalServerHandler<
10759 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10760 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10761>
10762{
10763 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
10764 fn duplicate(
10765 &mut self,
10766
10767 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
10768
10769 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
10770 ) -> impl ::core::future::Future<Output = ()>;
10771
10772 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10773 fn drop(
10774 &mut self,
10775
10776 request: ::fidl_next::Request<capability_store::Drop, ___T>,
10777
10778 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
10779 ) -> impl ::core::future::Future<Output = ()>;
10780
10781 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10782 fn export(
10783 &mut self,
10784
10785 request: ::fidl_next::Request<capability_store::Export, ___T>,
10786
10787 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
10788 ) -> impl ::core::future::Future<Output = ()>;
10789
10790 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
10791 fn import(
10792 &mut self,
10793
10794 request: ::fidl_next::Request<capability_store::Import, ___T>,
10795
10796 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
10797 ) -> impl ::core::future::Future<Output = ()>;
10798
10799 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10800 fn connector_create(
10801 &mut self,
10802
10803 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
10804
10805 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
10806 ) -> impl ::core::future::Future<Output = ()>;
10807
10808 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10809 fn connector_open(
10810 &mut self,
10811
10812 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
10813
10814 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
10815 ) -> impl ::core::future::Future<Output = ()>;
10816
10817 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10818 fn dir_connector_create(
10819 &mut self,
10820
10821 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
10822
10823 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
10824 ) -> impl ::core::future::Future<Output = ()>;
10825
10826 #[doc = " Open a connection from the provided [DirConnector] capability that will\n be dispatched to the [DirReceiver] on the other end. The `id` and\n `server_end` arguments are required, and the `flags` and `path`\n arguments are optional (a path of `.` will be used if one is not\n otherwise set).\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10827 fn dir_connector_open(
10828 &mut self,
10829
10830 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
10831
10832 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
10833 ) -> impl ::core::future::Future<Output = ()>;
10834
10835 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10836 fn dictionary_create(
10837 &mut self,
10838
10839 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
10840
10841 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
10842 ) -> impl ::core::future::Future<Output = ()>;
10843
10844 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
10845 fn dictionary_legacy_import(
10846 &mut self,
10847
10848 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
10849
10850 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
10851 ) -> impl ::core::future::Future<Output = ()>;
10852
10853 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10854 fn dictionary_legacy_export(
10855 &mut self,
10856
10857 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
10858
10859 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
10860 ) -> impl ::core::future::Future<Output = ()>;
10861
10862 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
10863 fn dictionary_insert(
10864 &mut self,
10865
10866 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
10867
10868 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
10869 ) -> impl ::core::future::Future<Output = ()>;
10870
10871 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
10872 fn dictionary_get(
10873 &mut self,
10874
10875 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
10876
10877 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
10878 ) -> impl ::core::future::Future<Output = ()>;
10879
10880 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
10881 fn dictionary_remove(
10882 &mut self,
10883
10884 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
10885
10886 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
10887 ) -> impl ::core::future::Future<Output = ()>;
10888
10889 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
10890 fn dictionary_copy(
10891 &mut self,
10892
10893 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
10894
10895 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
10896 ) -> impl ::core::future::Future<Output = ()>;
10897
10898 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10899 fn dictionary_keys(
10900 &mut self,
10901
10902 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
10903
10904 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
10905 ) -> impl ::core::future::Future<Output = ()>;
10906
10907 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10908 fn dictionary_enumerate(
10909 &mut self,
10910
10911 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
10912
10913 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
10914 ) -> impl ::core::future::Future<Output = ()>;
10915
10916 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10917 fn dictionary_drain(
10918 &mut self,
10919
10920 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
10921
10922 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
10923 ) -> impl ::core::future::Future<Output = ()>;
10924
10925 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10926 fn create_service_aggregate(
10927 &mut self,
10928
10929 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
10930
10931 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
10932 ) -> impl ::core::future::Future<Output = ()>;
10933
10934 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10935 ::core::future::ready(())
10936 }
10937}
10938
10939impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for CapabilityStore
10940where
10941 ___H: CapabilityStoreLocalServerHandler<___T>,
10942 ___T: ::fidl_next::Transport,
10943 for<'de> crate::wire::CapabilityStoreDuplicateRequest: ::fidl_next::Decode<
10944 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10945 Constraint = (),
10946 >,
10947 for<'de> crate::wire::CapabilityStoreDropRequest: ::fidl_next::Decode<
10948 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10949 Constraint = (),
10950 >,
10951 for<'de> crate::wire::CapabilityStoreExportRequest: ::fidl_next::Decode<
10952 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10953 Constraint = (),
10954 >,
10955 for<'de> crate::wire::CapabilityStoreImportRequest<'de>: ::fidl_next::Decode<
10956 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10957 Constraint = (),
10958 >,
10959 for<'de> crate::wire::CapabilityStoreConnectorCreateRequest: ::fidl_next::Decode<
10960 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10961 Constraint = (),
10962 >,
10963 for<'de> crate::wire::CapabilityStoreConnectorOpenRequest: ::fidl_next::Decode<
10964 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10965 Constraint = (),
10966 >,
10967 for<'de> crate::wire::CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Decode<
10968 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10969 Constraint = (),
10970 >,
10971 for<'de> crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>: ::fidl_next::Decode<
10972 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10973 Constraint = (),
10974 >,
10975 for<'de> crate::wire::CapabilityStoreDictionaryCreateRequest: ::fidl_next::Decode<
10976 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10977 Constraint = (),
10978 >,
10979 for<'de> crate::wire::CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Decode<
10980 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10981 Constraint = (),
10982 >,
10983 for<'de> crate::wire::CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Decode<
10984 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10985 Constraint = (),
10986 >,
10987 for<'de> crate::wire::CapabilityStoreDictionaryInsertRequest<'de>: ::fidl_next::Decode<
10988 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10989 Constraint = (),
10990 >,
10991 for<'de> crate::wire::CapabilityStoreDictionaryGetRequest<'de>: ::fidl_next::Decode<
10992 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10993 Constraint = (),
10994 >,
10995 for<'de> crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>: ::fidl_next::Decode<
10996 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10997 Constraint = (),
10998 >,
10999 for<'de> crate::wire::CapabilityStoreDictionaryCopyRequest: ::fidl_next::Decode<
11000 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11001 Constraint = (),
11002 >,
11003 for<'de> crate::wire::CapabilityStoreDictionaryKeysRequest: ::fidl_next::Decode<
11004 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11005 Constraint = (),
11006 >,
11007 for<'de> crate::wire::CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Decode<
11008 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11009 Constraint = (),
11010 >,
11011 for<'de> crate::wire::CapabilityStoreDictionaryDrainRequest: ::fidl_next::Decode<
11012 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11013 Constraint = (),
11014 >,
11015 for<'de> crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>: ::fidl_next::Decode<
11016 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11017 Constraint = (),
11018 >,
11019{
11020 async fn on_one_way(
11021 handler: &mut ___H,
11022 mut message: ::fidl_next::Message<___T>,
11023 ) -> ::core::result::Result<
11024 (),
11025 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11026 > {
11027 match *message.header().ordinal {
11028 ordinal => {
11029 handler.on_unknown_interaction(ordinal).await;
11030 if ::core::matches!(
11031 message.header().flexibility(),
11032 ::fidl_next::protocol::Flexibility::Strict
11033 ) {
11034 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11035 } else {
11036 Ok(())
11037 }
11038 }
11039 }
11040 }
11041
11042 async fn on_two_way(
11043 handler: &mut ___H,
11044 mut message: ::fidl_next::Message<___T>,
11045 responder: ::fidl_next::protocol::Responder<___T>,
11046 ) -> ::core::result::Result<
11047 (),
11048 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11049 > {
11050 match *message.header().ordinal {
11051 6727592627741008260 => {
11052 let responder = ::fidl_next::Responder::from_untyped(responder);
11053
11054 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11055 Ok(decoded) => {
11056 handler
11057 .duplicate(::fidl_next::Request::from_decoded(decoded), responder)
11058 .await;
11059 Ok(())
11060 }
11061 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11062 ordinal: 6727592627741008260,
11063 error,
11064 }),
11065 }
11066 }
11067
11068 753328233834620249 => {
11069 let responder = ::fidl_next::Responder::from_untyped(responder);
11070
11071 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11072 Ok(decoded) => {
11073 handler.drop(::fidl_next::Request::from_decoded(decoded), responder).await;
11074 Ok(())
11075 }
11076 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11077 ordinal: 753328233834620249,
11078 error,
11079 }),
11080 }
11081 }
11082
11083 226159162093533951 => {
11084 let responder = ::fidl_next::Responder::from_untyped(responder);
11085
11086 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11087 Ok(decoded) => {
11088 handler
11089 .export(::fidl_next::Request::from_decoded(decoded), responder)
11090 .await;
11091 Ok(())
11092 }
11093 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11094 ordinal: 226159162093533951,
11095 error,
11096 }),
11097 }
11098 }
11099
11100 2276030276116435867 => {
11101 let responder = ::fidl_next::Responder::from_untyped(responder);
11102
11103 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11104 Ok(decoded) => {
11105 handler
11106 .import(::fidl_next::Request::from_decoded(decoded), responder)
11107 .await;
11108 Ok(())
11109 }
11110 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11111 ordinal: 2276030276116435867,
11112 error,
11113 }),
11114 }
11115 }
11116
11117 2979461408102095909 => {
11118 let responder = ::fidl_next::Responder::from_untyped(responder);
11119
11120 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11121 Ok(decoded) => {
11122 handler
11123 .connector_create(
11124 ::fidl_next::Request::from_decoded(decoded),
11125 responder,
11126 )
11127 .await;
11128 Ok(())
11129 }
11130 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11131 ordinal: 2979461408102095909,
11132 error,
11133 }),
11134 }
11135 }
11136
11137 6016362336453278623 => {
11138 let responder = ::fidl_next::Responder::from_untyped(responder);
11139
11140 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11141 Ok(decoded) => {
11142 handler
11143 .connector_open(::fidl_next::Request::from_decoded(decoded), responder)
11144 .await;
11145 Ok(())
11146 }
11147 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11148 ordinal: 6016362336453278623,
11149 error,
11150 }),
11151 }
11152 }
11153
11154 1756747594275428795 => {
11155 let responder = ::fidl_next::Responder::from_untyped(responder);
11156
11157 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11158 Ok(decoded) => {
11159 handler
11160 .dir_connector_create(
11161 ::fidl_next::Request::from_decoded(decoded),
11162 responder,
11163 )
11164 .await;
11165 Ok(())
11166 }
11167 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11168 ordinal: 1756747594275428795,
11169 error,
11170 }),
11171 }
11172 }
11173
11174 6219704004220369153 => {
11175 let responder = ::fidl_next::Responder::from_untyped(responder);
11176
11177 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11178 Ok(decoded) => {
11179 handler
11180 .dir_connector_open(
11181 ::fidl_next::Request::from_decoded(decoded),
11182 responder,
11183 )
11184 .await;
11185 Ok(())
11186 }
11187 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11188 ordinal: 6219704004220369153,
11189 error,
11190 }),
11191 }
11192 }
11193
11194 7608770958894948499 => {
11195 let responder = ::fidl_next::Responder::from_untyped(responder);
11196
11197 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11198 Ok(decoded) => {
11199 handler
11200 .dictionary_create(
11201 ::fidl_next::Request::from_decoded(decoded),
11202 responder,
11203 )
11204 .await;
11205 Ok(())
11206 }
11207 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11208 ordinal: 7608770958894948499,
11209 error,
11210 }),
11211 }
11212 }
11213
11214 8285893703432012383 => {
11215 let responder = ::fidl_next::Responder::from_untyped(responder);
11216
11217 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11218 Ok(decoded) => {
11219 handler
11220 .dictionary_legacy_import(
11221 ::fidl_next::Request::from_decoded(decoded),
11222 responder,
11223 )
11224 .await;
11225 Ok(())
11226 }
11227 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11228 ordinal: 8285893703432012383,
11229 error,
11230 }),
11231 }
11232 }
11233
11234 4647175832683306445 => {
11235 let responder = ::fidl_next::Responder::from_untyped(responder);
11236
11237 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11238 Ok(decoded) => {
11239 handler
11240 .dictionary_legacy_export(
11241 ::fidl_next::Request::from_decoded(decoded),
11242 responder,
11243 )
11244 .await;
11245 Ok(())
11246 }
11247 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11248 ordinal: 4647175832683306445,
11249 error,
11250 }),
11251 }
11252 }
11253
11254 8575443262986538023 => {
11255 let responder = ::fidl_next::Responder::from_untyped(responder);
11256
11257 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11258 Ok(decoded) => {
11259 handler
11260 .dictionary_insert(
11261 ::fidl_next::Request::from_decoded(decoded),
11262 responder,
11263 )
11264 .await;
11265 Ok(())
11266 }
11267 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11268 ordinal: 8575443262986538023,
11269 error,
11270 }),
11271 }
11272 }
11273
11274 5592951026866236882 => {
11275 let responder = ::fidl_next::Responder::from_untyped(responder);
11276
11277 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11278 Ok(decoded) => {
11279 handler
11280 .dictionary_get(::fidl_next::Request::from_decoded(decoded), responder)
11281 .await;
11282 Ok(())
11283 }
11284 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11285 ordinal: 5592951026866236882,
11286 error,
11287 }),
11288 }
11289 }
11290
11291 343892214579320051 => {
11292 let responder = ::fidl_next::Responder::from_untyped(responder);
11293
11294 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11295 Ok(decoded) => {
11296 handler
11297 .dictionary_remove(
11298 ::fidl_next::Request::from_decoded(decoded),
11299 responder,
11300 )
11301 .await;
11302 Ok(())
11303 }
11304 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11305 ordinal: 343892214579320051,
11306 error,
11307 }),
11308 }
11309 }
11310
11311 3977783339739362383 => {
11312 let responder = ::fidl_next::Responder::from_untyped(responder);
11313
11314 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11315 Ok(decoded) => {
11316 handler
11317 .dictionary_copy(::fidl_next::Request::from_decoded(decoded), responder)
11318 .await;
11319 Ok(())
11320 }
11321 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11322 ordinal: 3977783339739362383,
11323 error,
11324 }),
11325 }
11326 }
11327
11328 597577248872787102 => {
11329 let responder = ::fidl_next::Responder::from_untyped(responder);
11330
11331 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11332 Ok(decoded) => {
11333 handler
11334 .dictionary_keys(::fidl_next::Request::from_decoded(decoded), responder)
11335 .await;
11336 Ok(())
11337 }
11338 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11339 ordinal: 597577248872787102,
11340 error,
11341 }),
11342 }
11343 }
11344
11345 964467096271472193 => {
11346 let responder = ::fidl_next::Responder::from_untyped(responder);
11347
11348 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11349 Ok(decoded) => {
11350 handler
11351 .dictionary_enumerate(
11352 ::fidl_next::Request::from_decoded(decoded),
11353 responder,
11354 )
11355 .await;
11356 Ok(())
11357 }
11358 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11359 ordinal: 964467096271472193,
11360 error,
11361 }),
11362 }
11363 }
11364
11365 2928364469569621208 => {
11366 let responder = ::fidl_next::Responder::from_untyped(responder);
11367
11368 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11369 Ok(decoded) => {
11370 handler
11371 .dictionary_drain(
11372 ::fidl_next::Request::from_decoded(decoded),
11373 responder,
11374 )
11375 .await;
11376 Ok(())
11377 }
11378 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11379 ordinal: 2928364469569621208,
11380 error,
11381 }),
11382 }
11383 }
11384
11385 5009147843253209178 => {
11386 let responder = ::fidl_next::Responder::from_untyped(responder);
11387
11388 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11389 Ok(decoded) => {
11390 handler
11391 .create_service_aggregate(
11392 ::fidl_next::Request::from_decoded(decoded),
11393 responder,
11394 )
11395 .await;
11396 Ok(())
11397 }
11398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11399 ordinal: 5009147843253209178,
11400 error,
11401 }),
11402 }
11403 }
11404
11405 ordinal => {
11406 handler.on_unknown_interaction(ordinal).await;
11407 if ::core::matches!(
11408 message.header().flexibility(),
11409 ::fidl_next::protocol::Flexibility::Strict
11410 ) {
11411 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11412 } else {
11413 responder
11414 .respond_framework_error(
11415 ordinal,
11416 ::fidl_next::FrameworkError::UnknownMethod,
11417 )
11418 .expect("encoding a framework error should never fail")
11419 .await?;
11420 Ok(())
11421 }
11422 }
11423 }
11424 }
11425}
11426
11427pub trait CapabilityStoreClientHandler<
11431 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11432 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11433>
11434{
11435 fn on_unknown_interaction(
11436 &mut self,
11437 ordinal: u64,
11438 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11439 ::core::future::ready(())
11440 }
11441}
11442
11443impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for CapabilityStore
11444where
11445 ___H: CapabilityStoreClientHandler<___T> + ::core::marker::Send,
11446 ___T: ::fidl_next::Transport,
11447{
11448 async fn on_event(
11449 handler: &mut ___H,
11450 mut message: ::fidl_next::Message<___T>,
11451 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11452 match *message.header().ordinal {
11453 ordinal => {
11454 handler.on_unknown_interaction(ordinal).await;
11455 if ::core::matches!(
11456 message.header().flexibility(),
11457 ::fidl_next::protocol::Flexibility::Strict
11458 ) {
11459 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11460 } else {
11461 Ok(())
11462 }
11463 }
11464 }
11465 }
11466}
11467
11468pub trait CapabilityStoreServerHandler<
11472 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11473 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11474>
11475{
11476 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
11477 fn duplicate(
11478 &mut self,
11479
11480 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
11481
11482 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
11483 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11484
11485 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
11486 fn drop(
11487 &mut self,
11488
11489 request: ::fidl_next::Request<capability_store::Drop, ___T>,
11490
11491 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
11492 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11493
11494 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
11495 fn export(
11496 &mut self,
11497
11498 request: ::fidl_next::Request<capability_store::Export, ___T>,
11499
11500 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
11501 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11502
11503 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
11504 fn import(
11505 &mut self,
11506
11507 request: ::fidl_next::Request<capability_store::Import, ___T>,
11508
11509 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
11510 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11511
11512 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
11513 fn connector_create(
11514 &mut self,
11515
11516 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
11517
11518 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
11519 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11520
11521 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
11522 fn connector_open(
11523 &mut self,
11524
11525 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
11526
11527 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
11528 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11529
11530 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
11531 fn dir_connector_create(
11532 &mut self,
11533
11534 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
11535
11536 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
11537 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11538
11539 #[doc = " Open a connection from the provided [DirConnector] capability that will\n be dispatched to the [DirReceiver] on the other end. The `id` and\n `server_end` arguments are required, and the `flags` and `path`\n arguments are optional (a path of `.` will be used if one is not\n otherwise set).\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
11540 fn dir_connector_open(
11541 &mut self,
11542
11543 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
11544
11545 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
11546 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11547
11548 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
11549 fn dictionary_create(
11550 &mut self,
11551
11552 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
11553
11554 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
11555 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11556
11557 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
11558 fn dictionary_legacy_import(
11559 &mut self,
11560
11561 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
11562
11563 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
11564 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11565
11566 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
11567 fn dictionary_legacy_export(
11568 &mut self,
11569
11570 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
11571
11572 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
11573 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11574
11575 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
11576 fn dictionary_insert(
11577 &mut self,
11578
11579 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
11580
11581 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
11582 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11583
11584 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
11585 fn dictionary_get(
11586 &mut self,
11587
11588 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
11589
11590 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
11591 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11592
11593 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
11594 fn dictionary_remove(
11595 &mut self,
11596
11597 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
11598
11599 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
11600 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11601
11602 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
11603 fn dictionary_copy(
11604 &mut self,
11605
11606 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
11607
11608 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
11609 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11610
11611 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
11612 fn dictionary_keys(
11613 &mut self,
11614
11615 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
11616
11617 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
11618 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11619
11620 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
11621 fn dictionary_enumerate(
11622 &mut self,
11623
11624 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
11625
11626 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
11627 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11628
11629 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
11630 fn dictionary_drain(
11631 &mut self,
11632
11633 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
11634
11635 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
11636 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11637
11638 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
11639 fn create_service_aggregate(
11640 &mut self,
11641
11642 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
11643
11644 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
11645 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11646
11647 fn on_unknown_interaction(
11648 &mut self,
11649 ordinal: u64,
11650 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11651 ::core::future::ready(())
11652 }
11653}
11654
11655impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for CapabilityStore
11656where
11657 ___H: CapabilityStoreServerHandler<___T> + ::core::marker::Send,
11658 ___T: ::fidl_next::Transport,
11659 for<'de> crate::wire::CapabilityStoreDuplicateRequest: ::fidl_next::Decode<
11660 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11661 Constraint = (),
11662 >,
11663 for<'de> crate::wire::CapabilityStoreDropRequest: ::fidl_next::Decode<
11664 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11665 Constraint = (),
11666 >,
11667 for<'de> crate::wire::CapabilityStoreExportRequest: ::fidl_next::Decode<
11668 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11669 Constraint = (),
11670 >,
11671 for<'de> crate::wire::CapabilityStoreImportRequest<'de>: ::fidl_next::Decode<
11672 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11673 Constraint = (),
11674 >,
11675 for<'de> crate::wire::CapabilityStoreConnectorCreateRequest: ::fidl_next::Decode<
11676 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11677 Constraint = (),
11678 >,
11679 for<'de> crate::wire::CapabilityStoreConnectorOpenRequest: ::fidl_next::Decode<
11680 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11681 Constraint = (),
11682 >,
11683 for<'de> crate::wire::CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Decode<
11684 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11685 Constraint = (),
11686 >,
11687 for<'de> crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>: ::fidl_next::Decode<
11688 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11689 Constraint = (),
11690 >,
11691 for<'de> crate::wire::CapabilityStoreDictionaryCreateRequest: ::fidl_next::Decode<
11692 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11693 Constraint = (),
11694 >,
11695 for<'de> crate::wire::CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Decode<
11696 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11697 Constraint = (),
11698 >,
11699 for<'de> crate::wire::CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Decode<
11700 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11701 Constraint = (),
11702 >,
11703 for<'de> crate::wire::CapabilityStoreDictionaryInsertRequest<'de>: ::fidl_next::Decode<
11704 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11705 Constraint = (),
11706 >,
11707 for<'de> crate::wire::CapabilityStoreDictionaryGetRequest<'de>: ::fidl_next::Decode<
11708 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11709 Constraint = (),
11710 >,
11711 for<'de> crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>: ::fidl_next::Decode<
11712 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11713 Constraint = (),
11714 >,
11715 for<'de> crate::wire::CapabilityStoreDictionaryCopyRequest: ::fidl_next::Decode<
11716 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11717 Constraint = (),
11718 >,
11719 for<'de> crate::wire::CapabilityStoreDictionaryKeysRequest: ::fidl_next::Decode<
11720 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11721 Constraint = (),
11722 >,
11723 for<'de> crate::wire::CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Decode<
11724 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11725 Constraint = (),
11726 >,
11727 for<'de> crate::wire::CapabilityStoreDictionaryDrainRequest: ::fidl_next::Decode<
11728 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11729 Constraint = (),
11730 >,
11731 for<'de> crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>: ::fidl_next::Decode<
11732 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11733 Constraint = (),
11734 >,
11735{
11736 async fn on_one_way(
11737 handler: &mut ___H,
11738 mut message: ::fidl_next::Message<___T>,
11739 ) -> ::core::result::Result<
11740 (),
11741 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11742 > {
11743 match *message.header().ordinal {
11744 ordinal => {
11745 handler.on_unknown_interaction(ordinal).await;
11746 if ::core::matches!(
11747 message.header().flexibility(),
11748 ::fidl_next::protocol::Flexibility::Strict
11749 ) {
11750 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11751 } else {
11752 Ok(())
11753 }
11754 }
11755 }
11756 }
11757
11758 async fn on_two_way(
11759 handler: &mut ___H,
11760 mut message: ::fidl_next::Message<___T>,
11761 responder: ::fidl_next::protocol::Responder<___T>,
11762 ) -> ::core::result::Result<
11763 (),
11764 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11765 > {
11766 match *message.header().ordinal {
11767 6727592627741008260 => {
11768 let responder = ::fidl_next::Responder::from_untyped(responder);
11769
11770 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11771 Ok(decoded) => {
11772 handler
11773 .duplicate(::fidl_next::Request::from_decoded(decoded), responder)
11774 .await;
11775 Ok(())
11776 }
11777 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11778 ordinal: 6727592627741008260,
11779 error,
11780 }),
11781 }
11782 }
11783
11784 753328233834620249 => {
11785 let responder = ::fidl_next::Responder::from_untyped(responder);
11786
11787 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11788 Ok(decoded) => {
11789 handler.drop(::fidl_next::Request::from_decoded(decoded), responder).await;
11790 Ok(())
11791 }
11792 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11793 ordinal: 753328233834620249,
11794 error,
11795 }),
11796 }
11797 }
11798
11799 226159162093533951 => {
11800 let responder = ::fidl_next::Responder::from_untyped(responder);
11801
11802 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11803 Ok(decoded) => {
11804 handler
11805 .export(::fidl_next::Request::from_decoded(decoded), responder)
11806 .await;
11807 Ok(())
11808 }
11809 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11810 ordinal: 226159162093533951,
11811 error,
11812 }),
11813 }
11814 }
11815
11816 2276030276116435867 => {
11817 let responder = ::fidl_next::Responder::from_untyped(responder);
11818
11819 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11820 Ok(decoded) => {
11821 handler
11822 .import(::fidl_next::Request::from_decoded(decoded), responder)
11823 .await;
11824 Ok(())
11825 }
11826 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11827 ordinal: 2276030276116435867,
11828 error,
11829 }),
11830 }
11831 }
11832
11833 2979461408102095909 => {
11834 let responder = ::fidl_next::Responder::from_untyped(responder);
11835
11836 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11837 Ok(decoded) => {
11838 handler
11839 .connector_create(
11840 ::fidl_next::Request::from_decoded(decoded),
11841 responder,
11842 )
11843 .await;
11844 Ok(())
11845 }
11846 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11847 ordinal: 2979461408102095909,
11848 error,
11849 }),
11850 }
11851 }
11852
11853 6016362336453278623 => {
11854 let responder = ::fidl_next::Responder::from_untyped(responder);
11855
11856 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11857 Ok(decoded) => {
11858 handler
11859 .connector_open(::fidl_next::Request::from_decoded(decoded), responder)
11860 .await;
11861 Ok(())
11862 }
11863 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11864 ordinal: 6016362336453278623,
11865 error,
11866 }),
11867 }
11868 }
11869
11870 1756747594275428795 => {
11871 let responder = ::fidl_next::Responder::from_untyped(responder);
11872
11873 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11874 Ok(decoded) => {
11875 handler
11876 .dir_connector_create(
11877 ::fidl_next::Request::from_decoded(decoded),
11878 responder,
11879 )
11880 .await;
11881 Ok(())
11882 }
11883 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11884 ordinal: 1756747594275428795,
11885 error,
11886 }),
11887 }
11888 }
11889
11890 6219704004220369153 => {
11891 let responder = ::fidl_next::Responder::from_untyped(responder);
11892
11893 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11894 Ok(decoded) => {
11895 handler
11896 .dir_connector_open(
11897 ::fidl_next::Request::from_decoded(decoded),
11898 responder,
11899 )
11900 .await;
11901 Ok(())
11902 }
11903 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11904 ordinal: 6219704004220369153,
11905 error,
11906 }),
11907 }
11908 }
11909
11910 7608770958894948499 => {
11911 let responder = ::fidl_next::Responder::from_untyped(responder);
11912
11913 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11914 Ok(decoded) => {
11915 handler
11916 .dictionary_create(
11917 ::fidl_next::Request::from_decoded(decoded),
11918 responder,
11919 )
11920 .await;
11921 Ok(())
11922 }
11923 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11924 ordinal: 7608770958894948499,
11925 error,
11926 }),
11927 }
11928 }
11929
11930 8285893703432012383 => {
11931 let responder = ::fidl_next::Responder::from_untyped(responder);
11932
11933 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11934 Ok(decoded) => {
11935 handler
11936 .dictionary_legacy_import(
11937 ::fidl_next::Request::from_decoded(decoded),
11938 responder,
11939 )
11940 .await;
11941 Ok(())
11942 }
11943 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11944 ordinal: 8285893703432012383,
11945 error,
11946 }),
11947 }
11948 }
11949
11950 4647175832683306445 => {
11951 let responder = ::fidl_next::Responder::from_untyped(responder);
11952
11953 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11954 Ok(decoded) => {
11955 handler
11956 .dictionary_legacy_export(
11957 ::fidl_next::Request::from_decoded(decoded),
11958 responder,
11959 )
11960 .await;
11961 Ok(())
11962 }
11963 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11964 ordinal: 4647175832683306445,
11965 error,
11966 }),
11967 }
11968 }
11969
11970 8575443262986538023 => {
11971 let responder = ::fidl_next::Responder::from_untyped(responder);
11972
11973 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11974 Ok(decoded) => {
11975 handler
11976 .dictionary_insert(
11977 ::fidl_next::Request::from_decoded(decoded),
11978 responder,
11979 )
11980 .await;
11981 Ok(())
11982 }
11983 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11984 ordinal: 8575443262986538023,
11985 error,
11986 }),
11987 }
11988 }
11989
11990 5592951026866236882 => {
11991 let responder = ::fidl_next::Responder::from_untyped(responder);
11992
11993 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11994 Ok(decoded) => {
11995 handler
11996 .dictionary_get(::fidl_next::Request::from_decoded(decoded), responder)
11997 .await;
11998 Ok(())
11999 }
12000 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12001 ordinal: 5592951026866236882,
12002 error,
12003 }),
12004 }
12005 }
12006
12007 343892214579320051 => {
12008 let responder = ::fidl_next::Responder::from_untyped(responder);
12009
12010 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12011 Ok(decoded) => {
12012 handler
12013 .dictionary_remove(
12014 ::fidl_next::Request::from_decoded(decoded),
12015 responder,
12016 )
12017 .await;
12018 Ok(())
12019 }
12020 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12021 ordinal: 343892214579320051,
12022 error,
12023 }),
12024 }
12025 }
12026
12027 3977783339739362383 => {
12028 let responder = ::fidl_next::Responder::from_untyped(responder);
12029
12030 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12031 Ok(decoded) => {
12032 handler
12033 .dictionary_copy(::fidl_next::Request::from_decoded(decoded), responder)
12034 .await;
12035 Ok(())
12036 }
12037 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12038 ordinal: 3977783339739362383,
12039 error,
12040 }),
12041 }
12042 }
12043
12044 597577248872787102 => {
12045 let responder = ::fidl_next::Responder::from_untyped(responder);
12046
12047 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12048 Ok(decoded) => {
12049 handler
12050 .dictionary_keys(::fidl_next::Request::from_decoded(decoded), responder)
12051 .await;
12052 Ok(())
12053 }
12054 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12055 ordinal: 597577248872787102,
12056 error,
12057 }),
12058 }
12059 }
12060
12061 964467096271472193 => {
12062 let responder = ::fidl_next::Responder::from_untyped(responder);
12063
12064 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12065 Ok(decoded) => {
12066 handler
12067 .dictionary_enumerate(
12068 ::fidl_next::Request::from_decoded(decoded),
12069 responder,
12070 )
12071 .await;
12072 Ok(())
12073 }
12074 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12075 ordinal: 964467096271472193,
12076 error,
12077 }),
12078 }
12079 }
12080
12081 2928364469569621208 => {
12082 let responder = ::fidl_next::Responder::from_untyped(responder);
12083
12084 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12085 Ok(decoded) => {
12086 handler
12087 .dictionary_drain(
12088 ::fidl_next::Request::from_decoded(decoded),
12089 responder,
12090 )
12091 .await;
12092 Ok(())
12093 }
12094 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12095 ordinal: 2928364469569621208,
12096 error,
12097 }),
12098 }
12099 }
12100
12101 5009147843253209178 => {
12102 let responder = ::fidl_next::Responder::from_untyped(responder);
12103
12104 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12105 Ok(decoded) => {
12106 handler
12107 .create_service_aggregate(
12108 ::fidl_next::Request::from_decoded(decoded),
12109 responder,
12110 )
12111 .await;
12112 Ok(())
12113 }
12114 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12115 ordinal: 5009147843253209178,
12116 error,
12117 }),
12118 }
12119 }
12120
12121 ordinal => {
12122 handler.on_unknown_interaction(ordinal).await;
12123 if ::core::matches!(
12124 message.header().flexibility(),
12125 ::fidl_next::protocol::Flexibility::Strict
12126 ) {
12127 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12128 } else {
12129 responder
12130 .respond_framework_error(
12131 ordinal,
12132 ::fidl_next::FrameworkError::UnknownMethod,
12133 )
12134 .expect("encoding a framework error should never fail")
12135 .await?;
12136 Ok(())
12137 }
12138 }
12139 }
12140 }
12141}
12142
12143impl<___T> CapabilityStoreClientHandler<___T> for ::fidl_next::IgnoreEvents
12144where
12145 ___T: ::fidl_next::Transport,
12146{
12147 async fn on_unknown_interaction(&mut self, _: u64) {}
12148}
12149
12150impl<___H, ___T> CapabilityStoreLocalClientHandler<___T> for ::fidl_next::Local<___H>
12151where
12152 ___H: CapabilityStoreClientHandler<___T>,
12153 ___T: ::fidl_next::Transport,
12154{
12155 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12156 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12157 }
12158}
12159
12160impl<___H, ___T> CapabilityStoreLocalServerHandler<___T> for ::fidl_next::Local<___H>
12161where
12162 ___H: CapabilityStoreServerHandler<___T>,
12163 ___T: ::fidl_next::Transport,
12164{
12165 async fn duplicate(
12166 &mut self,
12167
12168 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
12169
12170 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
12171 ) {
12172 ___H::duplicate(&mut self.0, request, responder).await
12173 }
12174
12175 async fn drop(
12176 &mut self,
12177
12178 request: ::fidl_next::Request<capability_store::Drop, ___T>,
12179
12180 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
12181 ) {
12182 ___H::drop(&mut self.0, request, responder).await
12183 }
12184
12185 async fn export(
12186 &mut self,
12187
12188 request: ::fidl_next::Request<capability_store::Export, ___T>,
12189
12190 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
12191 ) {
12192 ___H::export(&mut self.0, request, responder).await
12193 }
12194
12195 async fn import(
12196 &mut self,
12197
12198 request: ::fidl_next::Request<capability_store::Import, ___T>,
12199
12200 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
12201 ) {
12202 ___H::import(&mut self.0, request, responder).await
12203 }
12204
12205 async fn connector_create(
12206 &mut self,
12207
12208 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
12209
12210 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
12211 ) {
12212 ___H::connector_create(&mut self.0, request, responder).await
12213 }
12214
12215 async fn connector_open(
12216 &mut self,
12217
12218 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
12219
12220 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
12221 ) {
12222 ___H::connector_open(&mut self.0, request, responder).await
12223 }
12224
12225 async fn dir_connector_create(
12226 &mut self,
12227
12228 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
12229
12230 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
12231 ) {
12232 ___H::dir_connector_create(&mut self.0, request, responder).await
12233 }
12234
12235 async fn dir_connector_open(
12236 &mut self,
12237
12238 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
12239
12240 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
12241 ) {
12242 ___H::dir_connector_open(&mut self.0, request, responder).await
12243 }
12244
12245 async fn dictionary_create(
12246 &mut self,
12247
12248 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
12249
12250 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
12251 ) {
12252 ___H::dictionary_create(&mut self.0, request, responder).await
12253 }
12254
12255 async fn dictionary_legacy_import(
12256 &mut self,
12257
12258 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
12259
12260 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
12261 ) {
12262 ___H::dictionary_legacy_import(&mut self.0, request, responder).await
12263 }
12264
12265 async fn dictionary_legacy_export(
12266 &mut self,
12267
12268 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
12269
12270 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
12271 ) {
12272 ___H::dictionary_legacy_export(&mut self.0, request, responder).await
12273 }
12274
12275 async fn dictionary_insert(
12276 &mut self,
12277
12278 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
12279
12280 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
12281 ) {
12282 ___H::dictionary_insert(&mut self.0, request, responder).await
12283 }
12284
12285 async fn dictionary_get(
12286 &mut self,
12287
12288 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
12289
12290 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
12291 ) {
12292 ___H::dictionary_get(&mut self.0, request, responder).await
12293 }
12294
12295 async fn dictionary_remove(
12296 &mut self,
12297
12298 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
12299
12300 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
12301 ) {
12302 ___H::dictionary_remove(&mut self.0, request, responder).await
12303 }
12304
12305 async fn dictionary_copy(
12306 &mut self,
12307
12308 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
12309
12310 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
12311 ) {
12312 ___H::dictionary_copy(&mut self.0, request, responder).await
12313 }
12314
12315 async fn dictionary_keys(
12316 &mut self,
12317
12318 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
12319
12320 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
12321 ) {
12322 ___H::dictionary_keys(&mut self.0, request, responder).await
12323 }
12324
12325 async fn dictionary_enumerate(
12326 &mut self,
12327
12328 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
12329
12330 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
12331 ) {
12332 ___H::dictionary_enumerate(&mut self.0, request, responder).await
12333 }
12334
12335 async fn dictionary_drain(
12336 &mut self,
12337
12338 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
12339
12340 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
12341 ) {
12342 ___H::dictionary_drain(&mut self.0, request, responder).await
12343 }
12344
12345 async fn create_service_aggregate(
12346 &mut self,
12347
12348 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
12349
12350 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
12351 ) {
12352 ___H::create_service_aggregate(&mut self.0, request, responder).await
12353 }
12354
12355 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12356 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12357 }
12358}
12359
12360#[derive(PartialEq, Debug)]
12362pub struct ConnectorRouter;
12363
12364impl ::fidl_next::Discoverable for ConnectorRouter {
12365 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
12366}
12367
12368#[cfg(target_os = "fuchsia")]
12369impl ::fidl_next::HasTransport for ConnectorRouter {
12370 type Transport = ::fidl_next::fuchsia::zx::Channel;
12371}
12372
12373pub mod connector_router {
12374 pub mod prelude {
12375 pub use crate::{
12376 ConnectorRouter, ConnectorRouterClientHandler, ConnectorRouterLocalClientHandler,
12377 ConnectorRouterLocalServerHandler, ConnectorRouterServerHandler, connector_router,
12378 };
12379
12380 pub use crate::natural::ConnectorRouterRouteResponse;
12381
12382 pub use crate::natural::RouteRequest;
12383
12384 pub use crate::natural::RouterError;
12385 }
12386
12387 pub struct Route;
12388
12389 impl ::fidl_next::Method for Route {
12390 const ORDINAL: u64 = 8420527046218942310;
12391 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12392 ::fidl_next::protocol::Flexibility::Flexible;
12393
12394 type Protocol = crate::ConnectorRouter;
12395
12396 type Request = crate::wire::RouteRequest<'static>;
12397 }
12398
12399 impl ::fidl_next::TwoWayMethod for Route {
12400 type Response = ::fidl_next::wire::Result<
12401 'static,
12402 crate::wire::ConnectorRouterRouteResponse,
12403 crate::wire::RouterError,
12404 >;
12405 }
12406
12407 impl<___R> ::fidl_next::Respond<___R> for Route {
12408 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
12409
12410 fn respond(response: ___R) -> Self::Output {
12411 ::core::result::Result::Ok(response)
12412 }
12413 }
12414
12415 impl<___R> ::fidl_next::RespondErr<___R> for Route {
12416 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
12417
12418 fn respond_err(response: ___R) -> Self::Output {
12419 ::core::result::Result::Err(response)
12420 }
12421 }
12422
12423 mod ___detail {
12424 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ConnectorRouter
12425 where
12426 ___T: ::fidl_next::Transport,
12427 {
12428 type Client = ConnectorRouterClient<___T>;
12429 type Server = ConnectorRouterServer<___T>;
12430 }
12431
12432 #[repr(transparent)]
12434 pub struct ConnectorRouterClient<___T: ::fidl_next::Transport> {
12435 #[allow(dead_code)]
12436 client: ::fidl_next::protocol::Client<___T>,
12437 }
12438
12439 impl<___T> ConnectorRouterClient<___T>
12440 where
12441 ___T: ::fidl_next::Transport,
12442 {
12443 pub fn route_with<___R>(
12444 &self,
12445 request: ___R,
12446 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12447 where
12448 ___R: ::fidl_next::Encode<
12449 crate::wire::RouteRequest<'static>,
12450 <___T as ::fidl_next::Transport>::SendBuffer,
12451 >,
12452 {
12453 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12454 8420527046218942310,
12455 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
12456 request,
12457 ))
12458 }
12459 }
12460
12461 #[repr(transparent)]
12463 pub struct ConnectorRouterServer<___T: ::fidl_next::Transport> {
12464 server: ::fidl_next::protocol::Server<___T>,
12465 }
12466
12467 impl<___T> ConnectorRouterServer<___T> where ___T: ::fidl_next::Transport {}
12468 }
12469}
12470
12471#[diagnostic::on_unimplemented(
12472 note = "If {Self} implements the non-local ConnectorRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12473)]
12474
12475pub trait ConnectorRouterLocalClientHandler<
12479 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12480 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12481>
12482{
12483 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12484 ::core::future::ready(())
12485 }
12486}
12487
12488impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ConnectorRouter
12489where
12490 ___H: ConnectorRouterLocalClientHandler<___T>,
12491 ___T: ::fidl_next::Transport,
12492{
12493 async fn on_event(
12494 handler: &mut ___H,
12495 mut message: ::fidl_next::Message<___T>,
12496 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12497 match *message.header().ordinal {
12498 ordinal => {
12499 handler.on_unknown_interaction(ordinal).await;
12500 if ::core::matches!(
12501 message.header().flexibility(),
12502 ::fidl_next::protocol::Flexibility::Strict
12503 ) {
12504 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12505 } else {
12506 Ok(())
12507 }
12508 }
12509 }
12510 }
12511}
12512
12513#[diagnostic::on_unimplemented(
12514 note = "If {Self} implements the non-local ConnectorRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12515)]
12516
12517pub trait ConnectorRouterLocalServerHandler<
12521 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12522 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12523>
12524{
12525 fn route(
12526 &mut self,
12527
12528 request: ::fidl_next::Request<connector_router::Route, ___T>,
12529
12530 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
12531 ) -> impl ::core::future::Future<Output = ()>;
12532
12533 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12534 ::core::future::ready(())
12535 }
12536}
12537
12538impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ConnectorRouter
12539where
12540 ___H: ConnectorRouterLocalServerHandler<___T>,
12541 ___T: ::fidl_next::Transport,
12542 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12543 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12544 Constraint = (),
12545 >,
12546{
12547 async fn on_one_way(
12548 handler: &mut ___H,
12549 mut message: ::fidl_next::Message<___T>,
12550 ) -> ::core::result::Result<
12551 (),
12552 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12553 > {
12554 match *message.header().ordinal {
12555 ordinal => {
12556 handler.on_unknown_interaction(ordinal).await;
12557 if ::core::matches!(
12558 message.header().flexibility(),
12559 ::fidl_next::protocol::Flexibility::Strict
12560 ) {
12561 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12562 } else {
12563 Ok(())
12564 }
12565 }
12566 }
12567 }
12568
12569 async fn on_two_way(
12570 handler: &mut ___H,
12571 mut message: ::fidl_next::Message<___T>,
12572 responder: ::fidl_next::protocol::Responder<___T>,
12573 ) -> ::core::result::Result<
12574 (),
12575 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12576 > {
12577 match *message.header().ordinal {
12578 8420527046218942310 => {
12579 let responder = ::fidl_next::Responder::from_untyped(responder);
12580
12581 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12582 Ok(decoded) => {
12583 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12584 Ok(())
12585 }
12586 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12587 ordinal: 8420527046218942310,
12588 error,
12589 }),
12590 }
12591 }
12592
12593 ordinal => {
12594 handler.on_unknown_interaction(ordinal).await;
12595 if ::core::matches!(
12596 message.header().flexibility(),
12597 ::fidl_next::protocol::Flexibility::Strict
12598 ) {
12599 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12600 } else {
12601 responder
12602 .respond_framework_error(
12603 ordinal,
12604 ::fidl_next::FrameworkError::UnknownMethod,
12605 )
12606 .expect("encoding a framework error should never fail")
12607 .await?;
12608 Ok(())
12609 }
12610 }
12611 }
12612 }
12613}
12614
12615pub trait ConnectorRouterClientHandler<
12619 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12620 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12621>
12622{
12623 fn on_unknown_interaction(
12624 &mut self,
12625 ordinal: u64,
12626 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12627 ::core::future::ready(())
12628 }
12629}
12630
12631impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ConnectorRouter
12632where
12633 ___H: ConnectorRouterClientHandler<___T> + ::core::marker::Send,
12634 ___T: ::fidl_next::Transport,
12635{
12636 async fn on_event(
12637 handler: &mut ___H,
12638 mut message: ::fidl_next::Message<___T>,
12639 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12640 match *message.header().ordinal {
12641 ordinal => {
12642 handler.on_unknown_interaction(ordinal).await;
12643 if ::core::matches!(
12644 message.header().flexibility(),
12645 ::fidl_next::protocol::Flexibility::Strict
12646 ) {
12647 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12648 } else {
12649 Ok(())
12650 }
12651 }
12652 }
12653 }
12654}
12655
12656pub trait ConnectorRouterServerHandler<
12660 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12661 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12662>
12663{
12664 fn route(
12665 &mut self,
12666
12667 request: ::fidl_next::Request<connector_router::Route, ___T>,
12668
12669 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
12670 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12671
12672 fn on_unknown_interaction(
12673 &mut self,
12674 ordinal: u64,
12675 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12676 ::core::future::ready(())
12677 }
12678}
12679
12680impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ConnectorRouter
12681where
12682 ___H: ConnectorRouterServerHandler<___T> + ::core::marker::Send,
12683 ___T: ::fidl_next::Transport,
12684 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12685 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12686 Constraint = (),
12687 >,
12688{
12689 async fn on_one_way(
12690 handler: &mut ___H,
12691 mut message: ::fidl_next::Message<___T>,
12692 ) -> ::core::result::Result<
12693 (),
12694 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12695 > {
12696 match *message.header().ordinal {
12697 ordinal => {
12698 handler.on_unknown_interaction(ordinal).await;
12699 if ::core::matches!(
12700 message.header().flexibility(),
12701 ::fidl_next::protocol::Flexibility::Strict
12702 ) {
12703 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12704 } else {
12705 Ok(())
12706 }
12707 }
12708 }
12709 }
12710
12711 async fn on_two_way(
12712 handler: &mut ___H,
12713 mut message: ::fidl_next::Message<___T>,
12714 responder: ::fidl_next::protocol::Responder<___T>,
12715 ) -> ::core::result::Result<
12716 (),
12717 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12718 > {
12719 match *message.header().ordinal {
12720 8420527046218942310 => {
12721 let responder = ::fidl_next::Responder::from_untyped(responder);
12722
12723 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12724 Ok(decoded) => {
12725 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12726 Ok(())
12727 }
12728 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12729 ordinal: 8420527046218942310,
12730 error,
12731 }),
12732 }
12733 }
12734
12735 ordinal => {
12736 handler.on_unknown_interaction(ordinal).await;
12737 if ::core::matches!(
12738 message.header().flexibility(),
12739 ::fidl_next::protocol::Flexibility::Strict
12740 ) {
12741 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12742 } else {
12743 responder
12744 .respond_framework_error(
12745 ordinal,
12746 ::fidl_next::FrameworkError::UnknownMethod,
12747 )
12748 .expect("encoding a framework error should never fail")
12749 .await?;
12750 Ok(())
12751 }
12752 }
12753 }
12754 }
12755}
12756
12757impl<___T> ConnectorRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
12758where
12759 ___T: ::fidl_next::Transport,
12760{
12761 async fn on_unknown_interaction(&mut self, _: u64) {}
12762}
12763
12764impl<___H, ___T> ConnectorRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
12765where
12766 ___H: ConnectorRouterClientHandler<___T>,
12767 ___T: ::fidl_next::Transport,
12768{
12769 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12770 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12771 }
12772}
12773
12774impl<___H, ___T> ConnectorRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
12775where
12776 ___H: ConnectorRouterServerHandler<___T>,
12777 ___T: ::fidl_next::Transport,
12778{
12779 async fn route(
12780 &mut self,
12781
12782 request: ::fidl_next::Request<connector_router::Route, ___T>,
12783
12784 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
12785 ) {
12786 ___H::route(&mut self.0, request, responder).await
12787 }
12788
12789 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12790 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12791 }
12792}
12793
12794#[derive(PartialEq, Debug)]
12796pub struct DataRouter;
12797
12798impl ::fidl_next::Discoverable for DataRouter {
12799 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
12800}
12801
12802#[cfg(target_os = "fuchsia")]
12803impl ::fidl_next::HasTransport for DataRouter {
12804 type Transport = ::fidl_next::fuchsia::zx::Channel;
12805}
12806
12807pub mod data_router {
12808 pub mod prelude {
12809 pub use crate::{
12810 DataRouter, DataRouterClientHandler, DataRouterLocalClientHandler,
12811 DataRouterLocalServerHandler, DataRouterServerHandler, data_router,
12812 };
12813
12814 pub use crate::natural::DataRouterRouteResponse;
12815
12816 pub use crate::natural::RouteRequest;
12817
12818 pub use crate::natural::RouterError;
12819 }
12820
12821 pub struct Route;
12822
12823 impl ::fidl_next::Method for Route {
12824 const ORDINAL: u64 = 3352890635970754564;
12825 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12826 ::fidl_next::protocol::Flexibility::Flexible;
12827
12828 type Protocol = crate::DataRouter;
12829
12830 type Request = crate::wire::RouteRequest<'static>;
12831 }
12832
12833 impl ::fidl_next::TwoWayMethod for Route {
12834 type Response = ::fidl_next::wire::Result<
12835 'static,
12836 crate::wire::DataRouterRouteResponse<'static>,
12837 crate::wire::RouterError,
12838 >;
12839 }
12840
12841 impl<___R> ::fidl_next::Respond<___R> for Route {
12842 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
12843
12844 fn respond(response: ___R) -> Self::Output {
12845 ::core::result::Result::Ok(response)
12846 }
12847 }
12848
12849 impl<___R> ::fidl_next::RespondErr<___R> for Route {
12850 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
12851
12852 fn respond_err(response: ___R) -> Self::Output {
12853 ::core::result::Result::Err(response)
12854 }
12855 }
12856
12857 mod ___detail {
12858 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DataRouter
12859 where
12860 ___T: ::fidl_next::Transport,
12861 {
12862 type Client = DataRouterClient<___T>;
12863 type Server = DataRouterServer<___T>;
12864 }
12865
12866 #[repr(transparent)]
12868 pub struct DataRouterClient<___T: ::fidl_next::Transport> {
12869 #[allow(dead_code)]
12870 client: ::fidl_next::protocol::Client<___T>,
12871 }
12872
12873 impl<___T> DataRouterClient<___T>
12874 where
12875 ___T: ::fidl_next::Transport,
12876 {
12877 pub fn route_with<___R>(
12878 &self,
12879 request: ___R,
12880 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12881 where
12882 ___R: ::fidl_next::Encode<
12883 crate::wire::RouteRequest<'static>,
12884 <___T as ::fidl_next::Transport>::SendBuffer,
12885 >,
12886 {
12887 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12888 3352890635970754564,
12889 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
12890 request,
12891 ))
12892 }
12893 }
12894
12895 #[repr(transparent)]
12897 pub struct DataRouterServer<___T: ::fidl_next::Transport> {
12898 server: ::fidl_next::protocol::Server<___T>,
12899 }
12900
12901 impl<___T> DataRouterServer<___T> where ___T: ::fidl_next::Transport {}
12902 }
12903}
12904
12905#[diagnostic::on_unimplemented(
12906 note = "If {Self} implements the non-local DataRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12907)]
12908
12909pub trait DataRouterLocalClientHandler<
12913 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12914 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12915>
12916{
12917 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12918 ::core::future::ready(())
12919 }
12920}
12921
12922impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DataRouter
12923where
12924 ___H: DataRouterLocalClientHandler<___T>,
12925 ___T: ::fidl_next::Transport,
12926{
12927 async fn on_event(
12928 handler: &mut ___H,
12929 mut message: ::fidl_next::Message<___T>,
12930 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12931 match *message.header().ordinal {
12932 ordinal => {
12933 handler.on_unknown_interaction(ordinal).await;
12934 if ::core::matches!(
12935 message.header().flexibility(),
12936 ::fidl_next::protocol::Flexibility::Strict
12937 ) {
12938 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12939 } else {
12940 Ok(())
12941 }
12942 }
12943 }
12944 }
12945}
12946
12947#[diagnostic::on_unimplemented(
12948 note = "If {Self} implements the non-local DataRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12949)]
12950
12951pub trait DataRouterLocalServerHandler<
12955 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12956 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12957>
12958{
12959 fn route(
12960 &mut self,
12961
12962 request: ::fidl_next::Request<data_router::Route, ___T>,
12963
12964 responder: ::fidl_next::Responder<data_router::Route, ___T>,
12965 ) -> impl ::core::future::Future<Output = ()>;
12966
12967 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12968 ::core::future::ready(())
12969 }
12970}
12971
12972impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DataRouter
12973where
12974 ___H: DataRouterLocalServerHandler<___T>,
12975 ___T: ::fidl_next::Transport,
12976 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12977 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12978 Constraint = (),
12979 >,
12980{
12981 async fn on_one_way(
12982 handler: &mut ___H,
12983 mut message: ::fidl_next::Message<___T>,
12984 ) -> ::core::result::Result<
12985 (),
12986 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12987 > {
12988 match *message.header().ordinal {
12989 ordinal => {
12990 handler.on_unknown_interaction(ordinal).await;
12991 if ::core::matches!(
12992 message.header().flexibility(),
12993 ::fidl_next::protocol::Flexibility::Strict
12994 ) {
12995 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12996 } else {
12997 Ok(())
12998 }
12999 }
13000 }
13001 }
13002
13003 async fn on_two_way(
13004 handler: &mut ___H,
13005 mut message: ::fidl_next::Message<___T>,
13006 responder: ::fidl_next::protocol::Responder<___T>,
13007 ) -> ::core::result::Result<
13008 (),
13009 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13010 > {
13011 match *message.header().ordinal {
13012 3352890635970754564 => {
13013 let responder = ::fidl_next::Responder::from_untyped(responder);
13014
13015 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13016 Ok(decoded) => {
13017 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
13018 Ok(())
13019 }
13020 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13021 ordinal: 3352890635970754564,
13022 error,
13023 }),
13024 }
13025 }
13026
13027 ordinal => {
13028 handler.on_unknown_interaction(ordinal).await;
13029 if ::core::matches!(
13030 message.header().flexibility(),
13031 ::fidl_next::protocol::Flexibility::Strict
13032 ) {
13033 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13034 } else {
13035 responder
13036 .respond_framework_error(
13037 ordinal,
13038 ::fidl_next::FrameworkError::UnknownMethod,
13039 )
13040 .expect("encoding a framework error should never fail")
13041 .await?;
13042 Ok(())
13043 }
13044 }
13045 }
13046 }
13047}
13048
13049pub trait DataRouterClientHandler<
13053 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13054 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13055>
13056{
13057 fn on_unknown_interaction(
13058 &mut self,
13059 ordinal: u64,
13060 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13061 ::core::future::ready(())
13062 }
13063}
13064
13065impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DataRouter
13066where
13067 ___H: DataRouterClientHandler<___T> + ::core::marker::Send,
13068 ___T: ::fidl_next::Transport,
13069{
13070 async fn on_event(
13071 handler: &mut ___H,
13072 mut message: ::fidl_next::Message<___T>,
13073 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13074 match *message.header().ordinal {
13075 ordinal => {
13076 handler.on_unknown_interaction(ordinal).await;
13077 if ::core::matches!(
13078 message.header().flexibility(),
13079 ::fidl_next::protocol::Flexibility::Strict
13080 ) {
13081 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13082 } else {
13083 Ok(())
13084 }
13085 }
13086 }
13087 }
13088}
13089
13090pub trait DataRouterServerHandler<
13094 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13095 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13096>
13097{
13098 fn route(
13099 &mut self,
13100
13101 request: ::fidl_next::Request<data_router::Route, ___T>,
13102
13103 responder: ::fidl_next::Responder<data_router::Route, ___T>,
13104 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13105
13106 fn on_unknown_interaction(
13107 &mut self,
13108 ordinal: u64,
13109 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13110 ::core::future::ready(())
13111 }
13112}
13113
13114impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DataRouter
13115where
13116 ___H: DataRouterServerHandler<___T> + ::core::marker::Send,
13117 ___T: ::fidl_next::Transport,
13118 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
13119 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13120 Constraint = (),
13121 >,
13122{
13123 async fn on_one_way(
13124 handler: &mut ___H,
13125 mut message: ::fidl_next::Message<___T>,
13126 ) -> ::core::result::Result<
13127 (),
13128 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13129 > {
13130 match *message.header().ordinal {
13131 ordinal => {
13132 handler.on_unknown_interaction(ordinal).await;
13133 if ::core::matches!(
13134 message.header().flexibility(),
13135 ::fidl_next::protocol::Flexibility::Strict
13136 ) {
13137 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13138 } else {
13139 Ok(())
13140 }
13141 }
13142 }
13143 }
13144
13145 async fn on_two_way(
13146 handler: &mut ___H,
13147 mut message: ::fidl_next::Message<___T>,
13148 responder: ::fidl_next::protocol::Responder<___T>,
13149 ) -> ::core::result::Result<
13150 (),
13151 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13152 > {
13153 match *message.header().ordinal {
13154 3352890635970754564 => {
13155 let responder = ::fidl_next::Responder::from_untyped(responder);
13156
13157 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13158 Ok(decoded) => {
13159 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
13160 Ok(())
13161 }
13162 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13163 ordinal: 3352890635970754564,
13164 error,
13165 }),
13166 }
13167 }
13168
13169 ordinal => {
13170 handler.on_unknown_interaction(ordinal).await;
13171 if ::core::matches!(
13172 message.header().flexibility(),
13173 ::fidl_next::protocol::Flexibility::Strict
13174 ) {
13175 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13176 } else {
13177 responder
13178 .respond_framework_error(
13179 ordinal,
13180 ::fidl_next::FrameworkError::UnknownMethod,
13181 )
13182 .expect("encoding a framework error should never fail")
13183 .await?;
13184 Ok(())
13185 }
13186 }
13187 }
13188 }
13189}
13190
13191impl<___T> DataRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
13192where
13193 ___T: ::fidl_next::Transport,
13194{
13195 async fn on_unknown_interaction(&mut self, _: u64) {}
13196}
13197
13198impl<___H, ___T> DataRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
13199where
13200 ___H: DataRouterClientHandler<___T>,
13201 ___T: ::fidl_next::Transport,
13202{
13203 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13204 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13205 }
13206}
13207
13208impl<___H, ___T> DataRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
13209where
13210 ___H: DataRouterServerHandler<___T>,
13211 ___T: ::fidl_next::Transport,
13212{
13213 async fn route(
13214 &mut self,
13215
13216 request: ::fidl_next::Request<data_router::Route, ___T>,
13217
13218 responder: ::fidl_next::Responder<data_router::Route, ___T>,
13219 ) {
13220 ___H::route(&mut self.0, request, responder).await
13221 }
13222
13223 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13224 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13225 }
13226}
13227
13228#[derive(PartialEq, Debug)]
13230pub struct DictionaryDrainIterator;
13231
13232#[cfg(target_os = "fuchsia")]
13233impl ::fidl_next::HasTransport for DictionaryDrainIterator {
13234 type Transport = ::fidl_next::fuchsia::zx::Channel;
13235}
13236
13237pub mod dictionary_drain_iterator {
13238 pub mod prelude {
13239 pub use crate::{
13240 DictionaryDrainIterator, DictionaryDrainIteratorClientHandler,
13241 DictionaryDrainIteratorLocalClientHandler, DictionaryDrainIteratorLocalServerHandler,
13242 DictionaryDrainIteratorServerHandler, dictionary_drain_iterator,
13243 };
13244
13245 pub use crate::natural::CapabilityStoreError;
13246
13247 pub use crate::natural::DictionaryDrainIteratorGetNextRequest;
13248
13249 pub use crate::natural::DictionaryDrainIteratorGetNextResponse;
13250 }
13251
13252 pub struct GetNext;
13253
13254 impl ::fidl_next::Method for GetNext {
13255 const ORDINAL: u64 = 5728722530628427873;
13256 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13257 ::fidl_next::protocol::Flexibility::Flexible;
13258
13259 type Protocol = crate::DictionaryDrainIterator;
13260
13261 type Request = crate::wire::DictionaryDrainIteratorGetNextRequest;
13262 }
13263
13264 impl ::fidl_next::TwoWayMethod for GetNext {
13265 type Response = ::fidl_next::wire::Result<
13266 'static,
13267 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
13268 crate::wire::CapabilityStoreError,
13269 >;
13270 }
13271
13272 impl<___R> ::fidl_next::Respond<___R> for GetNext {
13273 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13274
13275 fn respond(response: ___R) -> Self::Output {
13276 ::core::result::Result::Ok(response)
13277 }
13278 }
13279
13280 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
13281 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13282
13283 fn respond_err(response: ___R) -> Self::Output {
13284 ::core::result::Result::Err(response)
13285 }
13286 }
13287
13288 mod ___detail {
13289 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryDrainIterator
13290 where
13291 ___T: ::fidl_next::Transport,
13292 {
13293 type Client = DictionaryDrainIteratorClient<___T>;
13294 type Server = DictionaryDrainIteratorServer<___T>;
13295 }
13296
13297 #[repr(transparent)]
13299 pub struct DictionaryDrainIteratorClient<___T: ::fidl_next::Transport> {
13300 #[allow(dead_code)]
13301 client: ::fidl_next::protocol::Client<___T>,
13302 }
13303
13304 impl<___T> DictionaryDrainIteratorClient<___T>
13305 where
13306 ___T: ::fidl_next::Transport,
13307 {
13308 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13309 pub fn get_next(
13310 &self,
13311
13312 start_id: impl ::fidl_next::Encode<
13313 ::fidl_next::wire::Uint64,
13314 <___T as ::fidl_next::Transport>::SendBuffer,
13315 >,
13316
13317 limit: impl ::fidl_next::Encode<
13318 ::fidl_next::wire::Uint32,
13319 <___T as ::fidl_next::Transport>::SendBuffer,
13320 >,
13321 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
13322 where
13323 <___T as ::fidl_next::Transport>::SendBuffer:
13324 ::fidl_next::encoder::InternalHandleEncoder,
13325 {
13326 self.get_next_with(crate::generic::DictionaryDrainIteratorGetNextRequest {
13327 start_id,
13328
13329 limit,
13330 })
13331 }
13332
13333 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13334 pub fn get_next_with<___R>(
13335 &self,
13336 request: ___R,
13337 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
13338 where
13339 ___R: ::fidl_next::Encode<
13340 crate::wire::DictionaryDrainIteratorGetNextRequest,
13341 <___T as ::fidl_next::Transport>::SendBuffer,
13342 >,
13343 {
13344 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13345 5728722530628427873,
13346 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
13347 request,
13348 ))
13349 }
13350 }
13351
13352 #[repr(transparent)]
13354 pub struct DictionaryDrainIteratorServer<___T: ::fidl_next::Transport> {
13355 server: ::fidl_next::protocol::Server<___T>,
13356 }
13357
13358 impl<___T> DictionaryDrainIteratorServer<___T> where ___T: ::fidl_next::Transport {}
13359 }
13360}
13361
13362#[diagnostic::on_unimplemented(
13363 note = "If {Self} implements the non-local DictionaryDrainIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
13364)]
13365
13366pub trait DictionaryDrainIteratorLocalClientHandler<
13370 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13371 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13372>
13373{
13374 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13375 ::core::future::ready(())
13376 }
13377}
13378
13379impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryDrainIterator
13380where
13381 ___H: DictionaryDrainIteratorLocalClientHandler<___T>,
13382 ___T: ::fidl_next::Transport,
13383{
13384 async fn on_event(
13385 handler: &mut ___H,
13386 mut message: ::fidl_next::Message<___T>,
13387 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13388 match *message.header().ordinal {
13389 ordinal => {
13390 handler.on_unknown_interaction(ordinal).await;
13391 if ::core::matches!(
13392 message.header().flexibility(),
13393 ::fidl_next::protocol::Flexibility::Strict
13394 ) {
13395 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13396 } else {
13397 Ok(())
13398 }
13399 }
13400 }
13401 }
13402}
13403
13404#[diagnostic::on_unimplemented(
13405 note = "If {Self} implements the non-local DictionaryDrainIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
13406)]
13407
13408pub trait DictionaryDrainIteratorLocalServerHandler<
13412 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13413 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13414>
13415{
13416 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13417 fn get_next(
13418 &mut self,
13419
13420 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
13421
13422 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
13423 ) -> impl ::core::future::Future<Output = ()>;
13424
13425 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13426 ::core::future::ready(())
13427 }
13428}
13429
13430impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryDrainIterator
13431where
13432 ___H: DictionaryDrainIteratorLocalServerHandler<___T>,
13433 ___T: ::fidl_next::Transport,
13434 for<'de> crate::wire::DictionaryDrainIteratorGetNextRequest: ::fidl_next::Decode<
13435 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13436 Constraint = (),
13437 >,
13438{
13439 async fn on_one_way(
13440 handler: &mut ___H,
13441 mut message: ::fidl_next::Message<___T>,
13442 ) -> ::core::result::Result<
13443 (),
13444 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13445 > {
13446 match *message.header().ordinal {
13447 ordinal => {
13448 handler.on_unknown_interaction(ordinal).await;
13449 if ::core::matches!(
13450 message.header().flexibility(),
13451 ::fidl_next::protocol::Flexibility::Strict
13452 ) {
13453 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13454 } else {
13455 Ok(())
13456 }
13457 }
13458 }
13459 }
13460
13461 async fn on_two_way(
13462 handler: &mut ___H,
13463 mut message: ::fidl_next::Message<___T>,
13464 responder: ::fidl_next::protocol::Responder<___T>,
13465 ) -> ::core::result::Result<
13466 (),
13467 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13468 > {
13469 match *message.header().ordinal {
13470 5728722530628427873 => {
13471 let responder = ::fidl_next::Responder::from_untyped(responder);
13472
13473 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13474 Ok(decoded) => {
13475 handler
13476 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13477 .await;
13478 Ok(())
13479 }
13480 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13481 ordinal: 5728722530628427873,
13482 error,
13483 }),
13484 }
13485 }
13486
13487 ordinal => {
13488 handler.on_unknown_interaction(ordinal).await;
13489 if ::core::matches!(
13490 message.header().flexibility(),
13491 ::fidl_next::protocol::Flexibility::Strict
13492 ) {
13493 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13494 } else {
13495 responder
13496 .respond_framework_error(
13497 ordinal,
13498 ::fidl_next::FrameworkError::UnknownMethod,
13499 )
13500 .expect("encoding a framework error should never fail")
13501 .await?;
13502 Ok(())
13503 }
13504 }
13505 }
13506 }
13507}
13508
13509pub trait DictionaryDrainIteratorClientHandler<
13513 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13514 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13515>
13516{
13517 fn on_unknown_interaction(
13518 &mut self,
13519 ordinal: u64,
13520 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13521 ::core::future::ready(())
13522 }
13523}
13524
13525impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryDrainIterator
13526where
13527 ___H: DictionaryDrainIteratorClientHandler<___T> + ::core::marker::Send,
13528 ___T: ::fidl_next::Transport,
13529{
13530 async fn on_event(
13531 handler: &mut ___H,
13532 mut message: ::fidl_next::Message<___T>,
13533 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13534 match *message.header().ordinal {
13535 ordinal => {
13536 handler.on_unknown_interaction(ordinal).await;
13537 if ::core::matches!(
13538 message.header().flexibility(),
13539 ::fidl_next::protocol::Flexibility::Strict
13540 ) {
13541 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13542 } else {
13543 Ok(())
13544 }
13545 }
13546 }
13547 }
13548}
13549
13550pub trait DictionaryDrainIteratorServerHandler<
13554 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13555 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13556>
13557{
13558 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13559 fn get_next(
13560 &mut self,
13561
13562 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
13563
13564 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
13565 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13566
13567 fn on_unknown_interaction(
13568 &mut self,
13569 ordinal: u64,
13570 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13571 ::core::future::ready(())
13572 }
13573}
13574
13575impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryDrainIterator
13576where
13577 ___H: DictionaryDrainIteratorServerHandler<___T> + ::core::marker::Send,
13578 ___T: ::fidl_next::Transport,
13579 for<'de> crate::wire::DictionaryDrainIteratorGetNextRequest: ::fidl_next::Decode<
13580 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13581 Constraint = (),
13582 >,
13583{
13584 async fn on_one_way(
13585 handler: &mut ___H,
13586 mut message: ::fidl_next::Message<___T>,
13587 ) -> ::core::result::Result<
13588 (),
13589 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13590 > {
13591 match *message.header().ordinal {
13592 ordinal => {
13593 handler.on_unknown_interaction(ordinal).await;
13594 if ::core::matches!(
13595 message.header().flexibility(),
13596 ::fidl_next::protocol::Flexibility::Strict
13597 ) {
13598 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13599 } else {
13600 Ok(())
13601 }
13602 }
13603 }
13604 }
13605
13606 async fn on_two_way(
13607 handler: &mut ___H,
13608 mut message: ::fidl_next::Message<___T>,
13609 responder: ::fidl_next::protocol::Responder<___T>,
13610 ) -> ::core::result::Result<
13611 (),
13612 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13613 > {
13614 match *message.header().ordinal {
13615 5728722530628427873 => {
13616 let responder = ::fidl_next::Responder::from_untyped(responder);
13617
13618 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13619 Ok(decoded) => {
13620 handler
13621 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13622 .await;
13623 Ok(())
13624 }
13625 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13626 ordinal: 5728722530628427873,
13627 error,
13628 }),
13629 }
13630 }
13631
13632 ordinal => {
13633 handler.on_unknown_interaction(ordinal).await;
13634 if ::core::matches!(
13635 message.header().flexibility(),
13636 ::fidl_next::protocol::Flexibility::Strict
13637 ) {
13638 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13639 } else {
13640 responder
13641 .respond_framework_error(
13642 ordinal,
13643 ::fidl_next::FrameworkError::UnknownMethod,
13644 )
13645 .expect("encoding a framework error should never fail")
13646 .await?;
13647 Ok(())
13648 }
13649 }
13650 }
13651 }
13652}
13653
13654impl<___T> DictionaryDrainIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
13655where
13656 ___T: ::fidl_next::Transport,
13657{
13658 async fn on_unknown_interaction(&mut self, _: u64) {}
13659}
13660
13661impl<___H, ___T> DictionaryDrainIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
13662where
13663 ___H: DictionaryDrainIteratorClientHandler<___T>,
13664 ___T: ::fidl_next::Transport,
13665{
13666 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13667 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13668 }
13669}
13670
13671impl<___H, ___T> DictionaryDrainIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
13672where
13673 ___H: DictionaryDrainIteratorServerHandler<___T>,
13674 ___T: ::fidl_next::Transport,
13675{
13676 async fn get_next(
13677 &mut self,
13678
13679 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
13680
13681 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
13682 ) {
13683 ___H::get_next(&mut self.0, request, responder).await
13684 }
13685
13686 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13687 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13688 }
13689}
13690
13691#[derive(PartialEq, Debug)]
13693pub struct DictionaryEnumerateIterator;
13694
13695#[cfg(target_os = "fuchsia")]
13696impl ::fidl_next::HasTransport for DictionaryEnumerateIterator {
13697 type Transport = ::fidl_next::fuchsia::zx::Channel;
13698}
13699
13700pub mod dictionary_enumerate_iterator {
13701 pub mod prelude {
13702 pub use crate::{
13703 DictionaryEnumerateIterator, DictionaryEnumerateIteratorClientHandler,
13704 DictionaryEnumerateIteratorLocalClientHandler,
13705 DictionaryEnumerateIteratorLocalServerHandler,
13706 DictionaryEnumerateIteratorServerHandler, dictionary_enumerate_iterator,
13707 };
13708
13709 pub use crate::natural::CapabilityStoreError;
13710
13711 pub use crate::natural::DictionaryEnumerateIteratorGetNextRequest;
13712
13713 pub use crate::natural::DictionaryEnumerateIteratorGetNextResponse;
13714 }
13715
13716 pub struct GetNext;
13717
13718 impl ::fidl_next::Method for GetNext {
13719 const ORDINAL: u64 = 1511164556663256527;
13720 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13721 ::fidl_next::protocol::Flexibility::Flexible;
13722
13723 type Protocol = crate::DictionaryEnumerateIterator;
13724
13725 type Request = crate::wire::DictionaryEnumerateIteratorGetNextRequest;
13726 }
13727
13728 impl ::fidl_next::TwoWayMethod for GetNext {
13729 type Response = ::fidl_next::wire::Result<
13730 'static,
13731 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
13732 crate::wire::CapabilityStoreError,
13733 >;
13734 }
13735
13736 impl<___R> ::fidl_next::Respond<___R> for GetNext {
13737 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13738
13739 fn respond(response: ___R) -> Self::Output {
13740 ::core::result::Result::Ok(response)
13741 }
13742 }
13743
13744 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
13745 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13746
13747 fn respond_err(response: ___R) -> Self::Output {
13748 ::core::result::Result::Err(response)
13749 }
13750 }
13751
13752 mod ___detail {
13753 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryEnumerateIterator
13754 where
13755 ___T: ::fidl_next::Transport,
13756 {
13757 type Client = DictionaryEnumerateIteratorClient<___T>;
13758 type Server = DictionaryEnumerateIteratorServer<___T>;
13759 }
13760
13761 #[repr(transparent)]
13763 pub struct DictionaryEnumerateIteratorClient<___T: ::fidl_next::Transport> {
13764 #[allow(dead_code)]
13765 client: ::fidl_next::protocol::Client<___T>,
13766 }
13767
13768 impl<___T> DictionaryEnumerateIteratorClient<___T>
13769 where
13770 ___T: ::fidl_next::Transport,
13771 {
13772 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13773 pub fn get_next(
13774 &self,
13775
13776 start_id: impl ::fidl_next::Encode<
13777 ::fidl_next::wire::Uint64,
13778 <___T as ::fidl_next::Transport>::SendBuffer,
13779 >,
13780
13781 limit: impl ::fidl_next::Encode<
13782 ::fidl_next::wire::Uint32,
13783 <___T as ::fidl_next::Transport>::SendBuffer,
13784 >,
13785 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
13786 where
13787 <___T as ::fidl_next::Transport>::SendBuffer:
13788 ::fidl_next::encoder::InternalHandleEncoder,
13789 {
13790 self.get_next_with(crate::generic::DictionaryEnumerateIteratorGetNextRequest {
13791 start_id,
13792
13793 limit,
13794 })
13795 }
13796
13797 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13798 pub fn get_next_with<___R>(
13799 &self,
13800 request: ___R,
13801 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
13802 where
13803 ___R: ::fidl_next::Encode<
13804 crate::wire::DictionaryEnumerateIteratorGetNextRequest,
13805 <___T as ::fidl_next::Transport>::SendBuffer,
13806 >,
13807 {
13808 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13809 1511164556663256527,
13810 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
13811 request,
13812 ))
13813 }
13814 }
13815
13816 #[repr(transparent)]
13818 pub struct DictionaryEnumerateIteratorServer<___T: ::fidl_next::Transport> {
13819 server: ::fidl_next::protocol::Server<___T>,
13820 }
13821
13822 impl<___T> DictionaryEnumerateIteratorServer<___T> where ___T: ::fidl_next::Transport {}
13823 }
13824}
13825
13826#[diagnostic::on_unimplemented(
13827 note = "If {Self} implements the non-local DictionaryEnumerateIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
13828)]
13829
13830pub trait DictionaryEnumerateIteratorLocalClientHandler<
13834 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13835 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13836>
13837{
13838 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13839 ::core::future::ready(())
13840 }
13841}
13842
13843impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryEnumerateIterator
13844where
13845 ___H: DictionaryEnumerateIteratorLocalClientHandler<___T>,
13846 ___T: ::fidl_next::Transport,
13847{
13848 async fn on_event(
13849 handler: &mut ___H,
13850 mut message: ::fidl_next::Message<___T>,
13851 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13852 match *message.header().ordinal {
13853 ordinal => {
13854 handler.on_unknown_interaction(ordinal).await;
13855 if ::core::matches!(
13856 message.header().flexibility(),
13857 ::fidl_next::protocol::Flexibility::Strict
13858 ) {
13859 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13860 } else {
13861 Ok(())
13862 }
13863 }
13864 }
13865 }
13866}
13867
13868#[diagnostic::on_unimplemented(
13869 note = "If {Self} implements the non-local DictionaryEnumerateIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
13870)]
13871
13872pub trait DictionaryEnumerateIteratorLocalServerHandler<
13876 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13877 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13878>
13879{
13880 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
13881 fn get_next(
13882 &mut self,
13883
13884 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
13885
13886 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
13887 ) -> impl ::core::future::Future<Output = ()>;
13888
13889 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13890 ::core::future::ready(())
13891 }
13892}
13893
13894impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryEnumerateIterator
13895where
13896 ___H: DictionaryEnumerateIteratorLocalServerHandler<___T>,
13897 ___T: ::fidl_next::Transport,
13898 for<'de> crate::wire::DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Decode<
13899 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13900 Constraint = (),
13901 >,
13902{
13903 async fn on_one_way(
13904 handler: &mut ___H,
13905 mut message: ::fidl_next::Message<___T>,
13906 ) -> ::core::result::Result<
13907 (),
13908 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13909 > {
13910 match *message.header().ordinal {
13911 ordinal => {
13912 handler.on_unknown_interaction(ordinal).await;
13913 if ::core::matches!(
13914 message.header().flexibility(),
13915 ::fidl_next::protocol::Flexibility::Strict
13916 ) {
13917 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13918 } else {
13919 Ok(())
13920 }
13921 }
13922 }
13923 }
13924
13925 async fn on_two_way(
13926 handler: &mut ___H,
13927 mut message: ::fidl_next::Message<___T>,
13928 responder: ::fidl_next::protocol::Responder<___T>,
13929 ) -> ::core::result::Result<
13930 (),
13931 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13932 > {
13933 match *message.header().ordinal {
13934 1511164556663256527 => {
13935 let responder = ::fidl_next::Responder::from_untyped(responder);
13936
13937 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13938 Ok(decoded) => {
13939 handler
13940 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13941 .await;
13942 Ok(())
13943 }
13944 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13945 ordinal: 1511164556663256527,
13946 error,
13947 }),
13948 }
13949 }
13950
13951 ordinal => {
13952 handler.on_unknown_interaction(ordinal).await;
13953 if ::core::matches!(
13954 message.header().flexibility(),
13955 ::fidl_next::protocol::Flexibility::Strict
13956 ) {
13957 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13958 } else {
13959 responder
13960 .respond_framework_error(
13961 ordinal,
13962 ::fidl_next::FrameworkError::UnknownMethod,
13963 )
13964 .expect("encoding a framework error should never fail")
13965 .await?;
13966 Ok(())
13967 }
13968 }
13969 }
13970 }
13971}
13972
13973pub trait DictionaryEnumerateIteratorClientHandler<
13977 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13978 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13979>
13980{
13981 fn on_unknown_interaction(
13982 &mut self,
13983 ordinal: u64,
13984 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13985 ::core::future::ready(())
13986 }
13987}
13988
13989impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryEnumerateIterator
13990where
13991 ___H: DictionaryEnumerateIteratorClientHandler<___T> + ::core::marker::Send,
13992 ___T: ::fidl_next::Transport,
13993{
13994 async fn on_event(
13995 handler: &mut ___H,
13996 mut message: ::fidl_next::Message<___T>,
13997 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13998 match *message.header().ordinal {
13999 ordinal => {
14000 handler.on_unknown_interaction(ordinal).await;
14001 if ::core::matches!(
14002 message.header().flexibility(),
14003 ::fidl_next::protocol::Flexibility::Strict
14004 ) {
14005 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14006 } else {
14007 Ok(())
14008 }
14009 }
14010 }
14011 }
14012}
14013
14014pub trait DictionaryEnumerateIteratorServerHandler<
14018 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14019 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14020>
14021{
14022 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
14023 fn get_next(
14024 &mut self,
14025
14026 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
14027
14028 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
14029 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14030
14031 fn on_unknown_interaction(
14032 &mut self,
14033 ordinal: u64,
14034 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14035 ::core::future::ready(())
14036 }
14037}
14038
14039impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryEnumerateIterator
14040where
14041 ___H: DictionaryEnumerateIteratorServerHandler<___T> + ::core::marker::Send,
14042 ___T: ::fidl_next::Transport,
14043 for<'de> crate::wire::DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Decode<
14044 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14045 Constraint = (),
14046 >,
14047{
14048 async fn on_one_way(
14049 handler: &mut ___H,
14050 mut message: ::fidl_next::Message<___T>,
14051 ) -> ::core::result::Result<
14052 (),
14053 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14054 > {
14055 match *message.header().ordinal {
14056 ordinal => {
14057 handler.on_unknown_interaction(ordinal).await;
14058 if ::core::matches!(
14059 message.header().flexibility(),
14060 ::fidl_next::protocol::Flexibility::Strict
14061 ) {
14062 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14063 } else {
14064 Ok(())
14065 }
14066 }
14067 }
14068 }
14069
14070 async fn on_two_way(
14071 handler: &mut ___H,
14072 mut message: ::fidl_next::Message<___T>,
14073 responder: ::fidl_next::protocol::Responder<___T>,
14074 ) -> ::core::result::Result<
14075 (),
14076 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14077 > {
14078 match *message.header().ordinal {
14079 1511164556663256527 => {
14080 let responder = ::fidl_next::Responder::from_untyped(responder);
14081
14082 match ::fidl_next::AsDecoderExt::into_decoded(message) {
14083 Ok(decoded) => {
14084 handler
14085 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
14086 .await;
14087 Ok(())
14088 }
14089 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14090 ordinal: 1511164556663256527,
14091 error,
14092 }),
14093 }
14094 }
14095
14096 ordinal => {
14097 handler.on_unknown_interaction(ordinal).await;
14098 if ::core::matches!(
14099 message.header().flexibility(),
14100 ::fidl_next::protocol::Flexibility::Strict
14101 ) {
14102 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14103 } else {
14104 responder
14105 .respond_framework_error(
14106 ordinal,
14107 ::fidl_next::FrameworkError::UnknownMethod,
14108 )
14109 .expect("encoding a framework error should never fail")
14110 .await?;
14111 Ok(())
14112 }
14113 }
14114 }
14115 }
14116}
14117
14118impl<___T> DictionaryEnumerateIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
14119where
14120 ___T: ::fidl_next::Transport,
14121{
14122 async fn on_unknown_interaction(&mut self, _: u64) {}
14123}
14124
14125impl<___H, ___T> DictionaryEnumerateIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
14126where
14127 ___H: DictionaryEnumerateIteratorClientHandler<___T>,
14128 ___T: ::fidl_next::Transport,
14129{
14130 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14131 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14132 }
14133}
14134
14135impl<___H, ___T> DictionaryEnumerateIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
14136where
14137 ___H: DictionaryEnumerateIteratorServerHandler<___T>,
14138 ___T: ::fidl_next::Transport,
14139{
14140 async fn get_next(
14141 &mut self,
14142
14143 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
14144
14145 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
14146 ) {
14147 ___H::get_next(&mut self.0, request, responder).await
14148 }
14149
14150 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14151 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14152 }
14153}
14154
14155#[derive(PartialEq, Debug)]
14157pub struct DictionaryKeysIterator;
14158
14159#[cfg(target_os = "fuchsia")]
14160impl ::fidl_next::HasTransport for DictionaryKeysIterator {
14161 type Transport = ::fidl_next::fuchsia::zx::Channel;
14162}
14163
14164pub mod dictionary_keys_iterator {
14165 pub mod prelude {
14166 pub use crate::{
14167 DictionaryKeysIterator, DictionaryKeysIteratorClientHandler,
14168 DictionaryKeysIteratorLocalClientHandler, DictionaryKeysIteratorLocalServerHandler,
14169 DictionaryKeysIteratorServerHandler, dictionary_keys_iterator,
14170 };
14171
14172 pub use crate::natural::DictionaryKeysIteratorGetNextResponse;
14173 }
14174
14175 pub struct GetNext;
14176
14177 impl ::fidl_next::Method for GetNext {
14178 const ORDINAL: u64 = 4987781442555247955;
14179 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14180 ::fidl_next::protocol::Flexibility::Flexible;
14181
14182 type Protocol = crate::DictionaryKeysIterator;
14183
14184 type Request = ::fidl_next::wire::EmptyMessageBody;
14185 }
14186
14187 impl ::fidl_next::TwoWayMethod for GetNext {
14188 type Response = ::fidl_next::wire::Flexible<
14189 'static,
14190 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
14191 >;
14192 }
14193
14194 impl<___R> ::fidl_next::Respond<___R> for GetNext {
14195 type Output =
14196 ::fidl_next::Flexible<crate::generic::DictionaryKeysIteratorGetNextResponse<___R>>;
14197
14198 fn respond(response: ___R) -> Self::Output {
14199 ::fidl_next::Flexible(crate::generic::DictionaryKeysIteratorGetNextResponse {
14200 keys: response,
14201 })
14202 }
14203 }
14204
14205 mod ___detail {
14206 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryKeysIterator
14207 where
14208 ___T: ::fidl_next::Transport,
14209 {
14210 type Client = DictionaryKeysIteratorClient<___T>;
14211 type Server = DictionaryKeysIteratorServer<___T>;
14212 }
14213
14214 #[repr(transparent)]
14216 pub struct DictionaryKeysIteratorClient<___T: ::fidl_next::Transport> {
14217 #[allow(dead_code)]
14218 client: ::fidl_next::protocol::Client<___T>,
14219 }
14220
14221 impl<___T> DictionaryKeysIteratorClient<___T>
14222 where
14223 ___T: ::fidl_next::Transport,
14224 {
14225 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
14226 ::fidl_next::TwoWayFuture::from_untyped(
14227 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14228 4987781442555247955,
14229 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
14230 (),
14231 ),
14232 )
14233 }
14234 }
14235
14236 #[repr(transparent)]
14238 pub struct DictionaryKeysIteratorServer<___T: ::fidl_next::Transport> {
14239 server: ::fidl_next::protocol::Server<___T>,
14240 }
14241
14242 impl<___T> DictionaryKeysIteratorServer<___T> where ___T: ::fidl_next::Transport {}
14243 }
14244}
14245
14246#[diagnostic::on_unimplemented(
14247 note = "If {Self} implements the non-local DictionaryKeysIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14248)]
14249
14250pub trait DictionaryKeysIteratorLocalClientHandler<
14254 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14255 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14256>
14257{
14258 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14259 ::core::future::ready(())
14260 }
14261}
14262
14263impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryKeysIterator
14264where
14265 ___H: DictionaryKeysIteratorLocalClientHandler<___T>,
14266 ___T: ::fidl_next::Transport,
14267{
14268 async fn on_event(
14269 handler: &mut ___H,
14270 mut message: ::fidl_next::Message<___T>,
14271 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14272 match *message.header().ordinal {
14273 ordinal => {
14274 handler.on_unknown_interaction(ordinal).await;
14275 if ::core::matches!(
14276 message.header().flexibility(),
14277 ::fidl_next::protocol::Flexibility::Strict
14278 ) {
14279 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14280 } else {
14281 Ok(())
14282 }
14283 }
14284 }
14285 }
14286}
14287
14288#[diagnostic::on_unimplemented(
14289 note = "If {Self} implements the non-local DictionaryKeysIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14290)]
14291
14292pub trait DictionaryKeysIteratorLocalServerHandler<
14296 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14297 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14298>
14299{
14300 fn get_next(
14301 &mut self,
14302
14303 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
14304 ) -> impl ::core::future::Future<Output = ()>;
14305
14306 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14307 ::core::future::ready(())
14308 }
14309}
14310
14311impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryKeysIterator
14312where
14313 ___H: DictionaryKeysIteratorLocalServerHandler<___T>,
14314 ___T: ::fidl_next::Transport,
14315{
14316 async fn on_one_way(
14317 handler: &mut ___H,
14318 mut message: ::fidl_next::Message<___T>,
14319 ) -> ::core::result::Result<
14320 (),
14321 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14322 > {
14323 match *message.header().ordinal {
14324 ordinal => {
14325 handler.on_unknown_interaction(ordinal).await;
14326 if ::core::matches!(
14327 message.header().flexibility(),
14328 ::fidl_next::protocol::Flexibility::Strict
14329 ) {
14330 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14331 } else {
14332 Ok(())
14333 }
14334 }
14335 }
14336 }
14337
14338 async fn on_two_way(
14339 handler: &mut ___H,
14340 mut message: ::fidl_next::Message<___T>,
14341 responder: ::fidl_next::protocol::Responder<___T>,
14342 ) -> ::core::result::Result<
14343 (),
14344 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14345 > {
14346 match *message.header().ordinal {
14347 4987781442555247955 => {
14348 let responder = ::fidl_next::Responder::from_untyped(responder);
14349
14350 handler.get_next(responder).await;
14351 Ok(())
14352 }
14353
14354 ordinal => {
14355 handler.on_unknown_interaction(ordinal).await;
14356 if ::core::matches!(
14357 message.header().flexibility(),
14358 ::fidl_next::protocol::Flexibility::Strict
14359 ) {
14360 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14361 } else {
14362 responder
14363 .respond_framework_error(
14364 ordinal,
14365 ::fidl_next::FrameworkError::UnknownMethod,
14366 )
14367 .expect("encoding a framework error should never fail")
14368 .await?;
14369 Ok(())
14370 }
14371 }
14372 }
14373 }
14374}
14375
14376pub trait DictionaryKeysIteratorClientHandler<
14380 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14381 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14382>
14383{
14384 fn on_unknown_interaction(
14385 &mut self,
14386 ordinal: u64,
14387 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14388 ::core::future::ready(())
14389 }
14390}
14391
14392impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryKeysIterator
14393where
14394 ___H: DictionaryKeysIteratorClientHandler<___T> + ::core::marker::Send,
14395 ___T: ::fidl_next::Transport,
14396{
14397 async fn on_event(
14398 handler: &mut ___H,
14399 mut message: ::fidl_next::Message<___T>,
14400 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14401 match *message.header().ordinal {
14402 ordinal => {
14403 handler.on_unknown_interaction(ordinal).await;
14404 if ::core::matches!(
14405 message.header().flexibility(),
14406 ::fidl_next::protocol::Flexibility::Strict
14407 ) {
14408 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14409 } else {
14410 Ok(())
14411 }
14412 }
14413 }
14414 }
14415}
14416
14417pub trait DictionaryKeysIteratorServerHandler<
14421 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14422 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14423>
14424{
14425 fn get_next(
14426 &mut self,
14427
14428 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
14429 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14430
14431 fn on_unknown_interaction(
14432 &mut self,
14433 ordinal: u64,
14434 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14435 ::core::future::ready(())
14436 }
14437}
14438
14439impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryKeysIterator
14440where
14441 ___H: DictionaryKeysIteratorServerHandler<___T> + ::core::marker::Send,
14442 ___T: ::fidl_next::Transport,
14443{
14444 async fn on_one_way(
14445 handler: &mut ___H,
14446 mut message: ::fidl_next::Message<___T>,
14447 ) -> ::core::result::Result<
14448 (),
14449 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14450 > {
14451 match *message.header().ordinal {
14452 ordinal => {
14453 handler.on_unknown_interaction(ordinal).await;
14454 if ::core::matches!(
14455 message.header().flexibility(),
14456 ::fidl_next::protocol::Flexibility::Strict
14457 ) {
14458 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14459 } else {
14460 Ok(())
14461 }
14462 }
14463 }
14464 }
14465
14466 async fn on_two_way(
14467 handler: &mut ___H,
14468 mut message: ::fidl_next::Message<___T>,
14469 responder: ::fidl_next::protocol::Responder<___T>,
14470 ) -> ::core::result::Result<
14471 (),
14472 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14473 > {
14474 match *message.header().ordinal {
14475 4987781442555247955 => {
14476 let responder = ::fidl_next::Responder::from_untyped(responder);
14477
14478 handler.get_next(responder).await;
14479 Ok(())
14480 }
14481
14482 ordinal => {
14483 handler.on_unknown_interaction(ordinal).await;
14484 if ::core::matches!(
14485 message.header().flexibility(),
14486 ::fidl_next::protocol::Flexibility::Strict
14487 ) {
14488 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14489 } else {
14490 responder
14491 .respond_framework_error(
14492 ordinal,
14493 ::fidl_next::FrameworkError::UnknownMethod,
14494 )
14495 .expect("encoding a framework error should never fail")
14496 .await?;
14497 Ok(())
14498 }
14499 }
14500 }
14501 }
14502}
14503
14504impl<___T> DictionaryKeysIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
14505where
14506 ___T: ::fidl_next::Transport,
14507{
14508 async fn on_unknown_interaction(&mut self, _: u64) {}
14509}
14510
14511impl<___H, ___T> DictionaryKeysIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
14512where
14513 ___H: DictionaryKeysIteratorClientHandler<___T>,
14514 ___T: ::fidl_next::Transport,
14515{
14516 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14517 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14518 }
14519}
14520
14521impl<___H, ___T> DictionaryKeysIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
14522where
14523 ___H: DictionaryKeysIteratorServerHandler<___T>,
14524 ___T: ::fidl_next::Transport,
14525{
14526 async fn get_next(
14527 &mut self,
14528
14529 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
14530 ) {
14531 ___H::get_next(&mut self.0, responder).await
14532 }
14533
14534 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14535 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14536 }
14537}
14538
14539#[derive(PartialEq, Debug)]
14541pub struct DictionaryRouter;
14542
14543impl ::fidl_next::Discoverable for DictionaryRouter {
14544 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
14545}
14546
14547#[cfg(target_os = "fuchsia")]
14548impl ::fidl_next::HasTransport for DictionaryRouter {
14549 type Transport = ::fidl_next::fuchsia::zx::Channel;
14550}
14551
14552pub mod dictionary_router {
14553 pub mod prelude {
14554 pub use crate::{
14555 DictionaryRouter, DictionaryRouterClientHandler, DictionaryRouterLocalClientHandler,
14556 DictionaryRouterLocalServerHandler, DictionaryRouterServerHandler, dictionary_router,
14557 };
14558
14559 pub use crate::natural::DictionaryRouterRouteResponse;
14560
14561 pub use crate::natural::RouteRequest;
14562
14563 pub use crate::natural::RouterError;
14564 }
14565
14566 pub struct Route;
14567
14568 impl ::fidl_next::Method for Route {
14569 const ORDINAL: u64 = 8164012099375978399;
14570 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14571 ::fidl_next::protocol::Flexibility::Flexible;
14572
14573 type Protocol = crate::DictionaryRouter;
14574
14575 type Request = crate::wire::RouteRequest<'static>;
14576 }
14577
14578 impl ::fidl_next::TwoWayMethod for Route {
14579 type Response = ::fidl_next::wire::Result<
14580 'static,
14581 crate::wire::DictionaryRouterRouteResponse,
14582 crate::wire::RouterError,
14583 >;
14584 }
14585
14586 impl<___R> ::fidl_next::Respond<___R> for Route {
14587 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14588
14589 fn respond(response: ___R) -> Self::Output {
14590 ::core::result::Result::Ok(response)
14591 }
14592 }
14593
14594 impl<___R> ::fidl_next::RespondErr<___R> for Route {
14595 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14596
14597 fn respond_err(response: ___R) -> Self::Output {
14598 ::core::result::Result::Err(response)
14599 }
14600 }
14601
14602 mod ___detail {
14603 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryRouter
14604 where
14605 ___T: ::fidl_next::Transport,
14606 {
14607 type Client = DictionaryRouterClient<___T>;
14608 type Server = DictionaryRouterServer<___T>;
14609 }
14610
14611 #[repr(transparent)]
14613 pub struct DictionaryRouterClient<___T: ::fidl_next::Transport> {
14614 #[allow(dead_code)]
14615 client: ::fidl_next::protocol::Client<___T>,
14616 }
14617
14618 impl<___T> DictionaryRouterClient<___T>
14619 where
14620 ___T: ::fidl_next::Transport,
14621 {
14622 pub fn route_with<___R>(
14623 &self,
14624 request: ___R,
14625 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
14626 where
14627 ___R: ::fidl_next::Encode<
14628 crate::wire::RouteRequest<'static>,
14629 <___T as ::fidl_next::Transport>::SendBuffer,
14630 >,
14631 {
14632 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14633 8164012099375978399,
14634 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
14635 request,
14636 ))
14637 }
14638 }
14639
14640 #[repr(transparent)]
14642 pub struct DictionaryRouterServer<___T: ::fidl_next::Transport> {
14643 server: ::fidl_next::protocol::Server<___T>,
14644 }
14645
14646 impl<___T> DictionaryRouterServer<___T> where ___T: ::fidl_next::Transport {}
14647 }
14648}
14649
14650#[diagnostic::on_unimplemented(
14651 note = "If {Self} implements the non-local DictionaryRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14652)]
14653
14654pub trait DictionaryRouterLocalClientHandler<
14658 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14659 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14660>
14661{
14662 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14663 ::core::future::ready(())
14664 }
14665}
14666
14667impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryRouter
14668where
14669 ___H: DictionaryRouterLocalClientHandler<___T>,
14670 ___T: ::fidl_next::Transport,
14671{
14672 async fn on_event(
14673 handler: &mut ___H,
14674 mut message: ::fidl_next::Message<___T>,
14675 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14676 match *message.header().ordinal {
14677 ordinal => {
14678 handler.on_unknown_interaction(ordinal).await;
14679 if ::core::matches!(
14680 message.header().flexibility(),
14681 ::fidl_next::protocol::Flexibility::Strict
14682 ) {
14683 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14684 } else {
14685 Ok(())
14686 }
14687 }
14688 }
14689 }
14690}
14691
14692#[diagnostic::on_unimplemented(
14693 note = "If {Self} implements the non-local DictionaryRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14694)]
14695
14696pub trait DictionaryRouterLocalServerHandler<
14700 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14701 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14702>
14703{
14704 fn route(
14705 &mut self,
14706
14707 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
14708
14709 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
14710 ) -> impl ::core::future::Future<Output = ()>;
14711
14712 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14713 ::core::future::ready(())
14714 }
14715}
14716
14717impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryRouter
14718where
14719 ___H: DictionaryRouterLocalServerHandler<___T>,
14720 ___T: ::fidl_next::Transport,
14721 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
14722 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14723 Constraint = (),
14724 >,
14725{
14726 async fn on_one_way(
14727 handler: &mut ___H,
14728 mut message: ::fidl_next::Message<___T>,
14729 ) -> ::core::result::Result<
14730 (),
14731 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14732 > {
14733 match *message.header().ordinal {
14734 ordinal => {
14735 handler.on_unknown_interaction(ordinal).await;
14736 if ::core::matches!(
14737 message.header().flexibility(),
14738 ::fidl_next::protocol::Flexibility::Strict
14739 ) {
14740 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14741 } else {
14742 Ok(())
14743 }
14744 }
14745 }
14746 }
14747
14748 async fn on_two_way(
14749 handler: &mut ___H,
14750 mut message: ::fidl_next::Message<___T>,
14751 responder: ::fidl_next::protocol::Responder<___T>,
14752 ) -> ::core::result::Result<
14753 (),
14754 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14755 > {
14756 match *message.header().ordinal {
14757 8164012099375978399 => {
14758 let responder = ::fidl_next::Responder::from_untyped(responder);
14759
14760 match ::fidl_next::AsDecoderExt::into_decoded(message) {
14761 Ok(decoded) => {
14762 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
14763 Ok(())
14764 }
14765 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14766 ordinal: 8164012099375978399,
14767 error,
14768 }),
14769 }
14770 }
14771
14772 ordinal => {
14773 handler.on_unknown_interaction(ordinal).await;
14774 if ::core::matches!(
14775 message.header().flexibility(),
14776 ::fidl_next::protocol::Flexibility::Strict
14777 ) {
14778 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14779 } else {
14780 responder
14781 .respond_framework_error(
14782 ordinal,
14783 ::fidl_next::FrameworkError::UnknownMethod,
14784 )
14785 .expect("encoding a framework error should never fail")
14786 .await?;
14787 Ok(())
14788 }
14789 }
14790 }
14791 }
14792}
14793
14794pub trait DictionaryRouterClientHandler<
14798 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14799 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14800>
14801{
14802 fn on_unknown_interaction(
14803 &mut self,
14804 ordinal: u64,
14805 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14806 ::core::future::ready(())
14807 }
14808}
14809
14810impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryRouter
14811where
14812 ___H: DictionaryRouterClientHandler<___T> + ::core::marker::Send,
14813 ___T: ::fidl_next::Transport,
14814{
14815 async fn on_event(
14816 handler: &mut ___H,
14817 mut message: ::fidl_next::Message<___T>,
14818 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14819 match *message.header().ordinal {
14820 ordinal => {
14821 handler.on_unknown_interaction(ordinal).await;
14822 if ::core::matches!(
14823 message.header().flexibility(),
14824 ::fidl_next::protocol::Flexibility::Strict
14825 ) {
14826 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14827 } else {
14828 Ok(())
14829 }
14830 }
14831 }
14832 }
14833}
14834
14835pub trait DictionaryRouterServerHandler<
14839 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14840 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14841>
14842{
14843 fn route(
14844 &mut self,
14845
14846 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
14847
14848 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
14849 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14850
14851 fn on_unknown_interaction(
14852 &mut self,
14853 ordinal: u64,
14854 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14855 ::core::future::ready(())
14856 }
14857}
14858
14859impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryRouter
14860where
14861 ___H: DictionaryRouterServerHandler<___T> + ::core::marker::Send,
14862 ___T: ::fidl_next::Transport,
14863 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
14864 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14865 Constraint = (),
14866 >,
14867{
14868 async fn on_one_way(
14869 handler: &mut ___H,
14870 mut message: ::fidl_next::Message<___T>,
14871 ) -> ::core::result::Result<
14872 (),
14873 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14874 > {
14875 match *message.header().ordinal {
14876 ordinal => {
14877 handler.on_unknown_interaction(ordinal).await;
14878 if ::core::matches!(
14879 message.header().flexibility(),
14880 ::fidl_next::protocol::Flexibility::Strict
14881 ) {
14882 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14883 } else {
14884 Ok(())
14885 }
14886 }
14887 }
14888 }
14889
14890 async fn on_two_way(
14891 handler: &mut ___H,
14892 mut message: ::fidl_next::Message<___T>,
14893 responder: ::fidl_next::protocol::Responder<___T>,
14894 ) -> ::core::result::Result<
14895 (),
14896 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14897 > {
14898 match *message.header().ordinal {
14899 8164012099375978399 => {
14900 let responder = ::fidl_next::Responder::from_untyped(responder);
14901
14902 match ::fidl_next::AsDecoderExt::into_decoded(message) {
14903 Ok(decoded) => {
14904 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
14905 Ok(())
14906 }
14907 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14908 ordinal: 8164012099375978399,
14909 error,
14910 }),
14911 }
14912 }
14913
14914 ordinal => {
14915 handler.on_unknown_interaction(ordinal).await;
14916 if ::core::matches!(
14917 message.header().flexibility(),
14918 ::fidl_next::protocol::Flexibility::Strict
14919 ) {
14920 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14921 } else {
14922 responder
14923 .respond_framework_error(
14924 ordinal,
14925 ::fidl_next::FrameworkError::UnknownMethod,
14926 )
14927 .expect("encoding a framework error should never fail")
14928 .await?;
14929 Ok(())
14930 }
14931 }
14932 }
14933 }
14934}
14935
14936impl<___T> DictionaryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
14937where
14938 ___T: ::fidl_next::Transport,
14939{
14940 async fn on_unknown_interaction(&mut self, _: u64) {}
14941}
14942
14943impl<___H, ___T> DictionaryRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
14944where
14945 ___H: DictionaryRouterClientHandler<___T>,
14946 ___T: ::fidl_next::Transport,
14947{
14948 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14949 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14950 }
14951}
14952
14953impl<___H, ___T> DictionaryRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
14954where
14955 ___H: DictionaryRouterServerHandler<___T>,
14956 ___T: ::fidl_next::Transport,
14957{
14958 async fn route(
14959 &mut self,
14960
14961 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
14962
14963 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
14964 ) {
14965 ___H::route(&mut self.0, request, responder).await
14966 }
14967
14968 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14969 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14970 }
14971}
14972
14973#[derive(PartialEq, Debug)]
14975pub struct DirConnectorRouter;
14976
14977impl ::fidl_next::Discoverable for DirConnectorRouter {
14978 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
14979}
14980
14981#[cfg(target_os = "fuchsia")]
14982impl ::fidl_next::HasTransport for DirConnectorRouter {
14983 type Transport = ::fidl_next::fuchsia::zx::Channel;
14984}
14985
14986pub mod dir_connector_router {
14987 pub mod prelude {
14988 pub use crate::{
14989 DirConnectorRouter, DirConnectorRouterClientHandler,
14990 DirConnectorRouterLocalClientHandler, DirConnectorRouterLocalServerHandler,
14991 DirConnectorRouterServerHandler, dir_connector_router,
14992 };
14993
14994 pub use crate::natural::DirConnectorRouterRouteResponse;
14995
14996 pub use crate::natural::RouteRequest;
14997
14998 pub use crate::natural::RouterError;
14999 }
15000
15001 pub struct Route;
15002
15003 impl ::fidl_next::Method for Route {
15004 const ORDINAL: u64 = 972231070188342848;
15005 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15006 ::fidl_next::protocol::Flexibility::Flexible;
15007
15008 type Protocol = crate::DirConnectorRouter;
15009
15010 type Request = crate::wire::RouteRequest<'static>;
15011 }
15012
15013 impl ::fidl_next::TwoWayMethod for Route {
15014 type Response = ::fidl_next::wire::Result<
15015 'static,
15016 crate::wire::DirConnectorRouterRouteResponse,
15017 crate::wire::RouterError,
15018 >;
15019 }
15020
15021 impl<___R> ::fidl_next::Respond<___R> for Route {
15022 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
15023
15024 fn respond(response: ___R) -> Self::Output {
15025 ::core::result::Result::Ok(response)
15026 }
15027 }
15028
15029 impl<___R> ::fidl_next::RespondErr<___R> for Route {
15030 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
15031
15032 fn respond_err(response: ___R) -> Self::Output {
15033 ::core::result::Result::Err(response)
15034 }
15035 }
15036
15037 mod ___detail {
15038 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirConnectorRouter
15039 where
15040 ___T: ::fidl_next::Transport,
15041 {
15042 type Client = DirConnectorRouterClient<___T>;
15043 type Server = DirConnectorRouterServer<___T>;
15044 }
15045
15046 #[repr(transparent)]
15048 pub struct DirConnectorRouterClient<___T: ::fidl_next::Transport> {
15049 #[allow(dead_code)]
15050 client: ::fidl_next::protocol::Client<___T>,
15051 }
15052
15053 impl<___T> DirConnectorRouterClient<___T>
15054 where
15055 ___T: ::fidl_next::Transport,
15056 {
15057 pub fn route_with<___R>(
15058 &self,
15059 request: ___R,
15060 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
15061 where
15062 ___R: ::fidl_next::Encode<
15063 crate::wire::RouteRequest<'static>,
15064 <___T as ::fidl_next::Transport>::SendBuffer,
15065 >,
15066 {
15067 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15068 972231070188342848,
15069 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
15070 request,
15071 ))
15072 }
15073 }
15074
15075 #[repr(transparent)]
15077 pub struct DirConnectorRouterServer<___T: ::fidl_next::Transport> {
15078 server: ::fidl_next::protocol::Server<___T>,
15079 }
15080
15081 impl<___T> DirConnectorRouterServer<___T> where ___T: ::fidl_next::Transport {}
15082 }
15083}
15084
15085#[diagnostic::on_unimplemented(
15086 note = "If {Self} implements the non-local DirConnectorRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15087)]
15088
15089pub trait DirConnectorRouterLocalClientHandler<
15093 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15094 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15095>
15096{
15097 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15098 ::core::future::ready(())
15099 }
15100}
15101
15102impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirConnectorRouter
15103where
15104 ___H: DirConnectorRouterLocalClientHandler<___T>,
15105 ___T: ::fidl_next::Transport,
15106{
15107 async fn on_event(
15108 handler: &mut ___H,
15109 mut message: ::fidl_next::Message<___T>,
15110 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15111 match *message.header().ordinal {
15112 ordinal => {
15113 handler.on_unknown_interaction(ordinal).await;
15114 if ::core::matches!(
15115 message.header().flexibility(),
15116 ::fidl_next::protocol::Flexibility::Strict
15117 ) {
15118 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15119 } else {
15120 Ok(())
15121 }
15122 }
15123 }
15124 }
15125}
15126
15127#[diagnostic::on_unimplemented(
15128 note = "If {Self} implements the non-local DirConnectorRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15129)]
15130
15131pub trait DirConnectorRouterLocalServerHandler<
15135 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15136 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15137>
15138{
15139 fn route(
15140 &mut self,
15141
15142 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
15143
15144 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
15145 ) -> impl ::core::future::Future<Output = ()>;
15146
15147 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15148 ::core::future::ready(())
15149 }
15150}
15151
15152impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirConnectorRouter
15153where
15154 ___H: DirConnectorRouterLocalServerHandler<___T>,
15155 ___T: ::fidl_next::Transport,
15156 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
15157 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15158 Constraint = (),
15159 >,
15160{
15161 async fn on_one_way(
15162 handler: &mut ___H,
15163 mut message: ::fidl_next::Message<___T>,
15164 ) -> ::core::result::Result<
15165 (),
15166 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15167 > {
15168 match *message.header().ordinal {
15169 ordinal => {
15170 handler.on_unknown_interaction(ordinal).await;
15171 if ::core::matches!(
15172 message.header().flexibility(),
15173 ::fidl_next::protocol::Flexibility::Strict
15174 ) {
15175 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15176 } else {
15177 Ok(())
15178 }
15179 }
15180 }
15181 }
15182
15183 async fn on_two_way(
15184 handler: &mut ___H,
15185 mut message: ::fidl_next::Message<___T>,
15186 responder: ::fidl_next::protocol::Responder<___T>,
15187 ) -> ::core::result::Result<
15188 (),
15189 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15190 > {
15191 match *message.header().ordinal {
15192 972231070188342848 => {
15193 let responder = ::fidl_next::Responder::from_untyped(responder);
15194
15195 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15196 Ok(decoded) => {
15197 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
15198 Ok(())
15199 }
15200 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15201 ordinal: 972231070188342848,
15202 error,
15203 }),
15204 }
15205 }
15206
15207 ordinal => {
15208 handler.on_unknown_interaction(ordinal).await;
15209 if ::core::matches!(
15210 message.header().flexibility(),
15211 ::fidl_next::protocol::Flexibility::Strict
15212 ) {
15213 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15214 } else {
15215 responder
15216 .respond_framework_error(
15217 ordinal,
15218 ::fidl_next::FrameworkError::UnknownMethod,
15219 )
15220 .expect("encoding a framework error should never fail")
15221 .await?;
15222 Ok(())
15223 }
15224 }
15225 }
15226 }
15227}
15228
15229pub trait DirConnectorRouterClientHandler<
15233 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15234 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15235>
15236{
15237 fn on_unknown_interaction(
15238 &mut self,
15239 ordinal: u64,
15240 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15241 ::core::future::ready(())
15242 }
15243}
15244
15245impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirConnectorRouter
15246where
15247 ___H: DirConnectorRouterClientHandler<___T> + ::core::marker::Send,
15248 ___T: ::fidl_next::Transport,
15249{
15250 async fn on_event(
15251 handler: &mut ___H,
15252 mut message: ::fidl_next::Message<___T>,
15253 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15254 match *message.header().ordinal {
15255 ordinal => {
15256 handler.on_unknown_interaction(ordinal).await;
15257 if ::core::matches!(
15258 message.header().flexibility(),
15259 ::fidl_next::protocol::Flexibility::Strict
15260 ) {
15261 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15262 } else {
15263 Ok(())
15264 }
15265 }
15266 }
15267 }
15268}
15269
15270pub trait DirConnectorRouterServerHandler<
15274 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15275 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15276>
15277{
15278 fn route(
15279 &mut self,
15280
15281 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
15282
15283 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
15284 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15285
15286 fn on_unknown_interaction(
15287 &mut self,
15288 ordinal: u64,
15289 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15290 ::core::future::ready(())
15291 }
15292}
15293
15294impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirConnectorRouter
15295where
15296 ___H: DirConnectorRouterServerHandler<___T> + ::core::marker::Send,
15297 ___T: ::fidl_next::Transport,
15298 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
15299 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15300 Constraint = (),
15301 >,
15302{
15303 async fn on_one_way(
15304 handler: &mut ___H,
15305 mut message: ::fidl_next::Message<___T>,
15306 ) -> ::core::result::Result<
15307 (),
15308 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15309 > {
15310 match *message.header().ordinal {
15311 ordinal => {
15312 handler.on_unknown_interaction(ordinal).await;
15313 if ::core::matches!(
15314 message.header().flexibility(),
15315 ::fidl_next::protocol::Flexibility::Strict
15316 ) {
15317 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15318 } else {
15319 Ok(())
15320 }
15321 }
15322 }
15323 }
15324
15325 async fn on_two_way(
15326 handler: &mut ___H,
15327 mut message: ::fidl_next::Message<___T>,
15328 responder: ::fidl_next::protocol::Responder<___T>,
15329 ) -> ::core::result::Result<
15330 (),
15331 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15332 > {
15333 match *message.header().ordinal {
15334 972231070188342848 => {
15335 let responder = ::fidl_next::Responder::from_untyped(responder);
15336
15337 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15338 Ok(decoded) => {
15339 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
15340 Ok(())
15341 }
15342 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15343 ordinal: 972231070188342848,
15344 error,
15345 }),
15346 }
15347 }
15348
15349 ordinal => {
15350 handler.on_unknown_interaction(ordinal).await;
15351 if ::core::matches!(
15352 message.header().flexibility(),
15353 ::fidl_next::protocol::Flexibility::Strict
15354 ) {
15355 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15356 } else {
15357 responder
15358 .respond_framework_error(
15359 ordinal,
15360 ::fidl_next::FrameworkError::UnknownMethod,
15361 )
15362 .expect("encoding a framework error should never fail")
15363 .await?;
15364 Ok(())
15365 }
15366 }
15367 }
15368 }
15369}
15370
15371impl<___T> DirConnectorRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
15372where
15373 ___T: ::fidl_next::Transport,
15374{
15375 async fn on_unknown_interaction(&mut self, _: u64) {}
15376}
15377
15378impl<___H, ___T> DirConnectorRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
15379where
15380 ___H: DirConnectorRouterClientHandler<___T>,
15381 ___T: ::fidl_next::Transport,
15382{
15383 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15384 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15385 }
15386}
15387
15388impl<___H, ___T> DirConnectorRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
15389where
15390 ___H: DirConnectorRouterServerHandler<___T>,
15391 ___T: ::fidl_next::Transport,
15392{
15393 async fn route(
15394 &mut self,
15395
15396 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
15397
15398 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
15399 ) {
15400 ___H::route(&mut self.0, request, responder).await
15401 }
15402
15403 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15404 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15405 }
15406}
15407
15408#[derive(PartialEq, Debug)]
15410pub struct DirEntryRouter;
15411
15412impl ::fidl_next::Discoverable for DirEntryRouter {
15413 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
15414}
15415
15416#[cfg(target_os = "fuchsia")]
15417impl ::fidl_next::HasTransport for DirEntryRouter {
15418 type Transport = ::fidl_next::fuchsia::zx::Channel;
15419}
15420
15421pub mod dir_entry_router {
15422 pub mod prelude {
15423 pub use crate::{
15424 DirEntryRouter, DirEntryRouterClientHandler, DirEntryRouterLocalClientHandler,
15425 DirEntryRouterLocalServerHandler, DirEntryRouterServerHandler, dir_entry_router,
15426 };
15427
15428 pub use crate::natural::DirEntryRouterRouteResponse;
15429
15430 pub use crate::natural::RouteRequest;
15431
15432 pub use crate::natural::RouterError;
15433 }
15434
15435 pub struct Route;
15436
15437 impl ::fidl_next::Method for Route {
15438 const ORDINAL: u64 = 1929392218567642066;
15439 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15440 ::fidl_next::protocol::Flexibility::Flexible;
15441
15442 type Protocol = crate::DirEntryRouter;
15443
15444 type Request = crate::wire::RouteRequest<'static>;
15445 }
15446
15447 impl ::fidl_next::TwoWayMethod for Route {
15448 type Response = ::fidl_next::wire::Result<
15449 'static,
15450 crate::wire::DirEntryRouterRouteResponse,
15451 crate::wire::RouterError,
15452 >;
15453 }
15454
15455 impl<___R> ::fidl_next::Respond<___R> for Route {
15456 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
15457
15458 fn respond(response: ___R) -> Self::Output {
15459 ::core::result::Result::Ok(response)
15460 }
15461 }
15462
15463 impl<___R> ::fidl_next::RespondErr<___R> for Route {
15464 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
15465
15466 fn respond_err(response: ___R) -> Self::Output {
15467 ::core::result::Result::Err(response)
15468 }
15469 }
15470
15471 mod ___detail {
15472 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirEntryRouter
15473 where
15474 ___T: ::fidl_next::Transport,
15475 {
15476 type Client = DirEntryRouterClient<___T>;
15477 type Server = DirEntryRouterServer<___T>;
15478 }
15479
15480 #[repr(transparent)]
15482 pub struct DirEntryRouterClient<___T: ::fidl_next::Transport> {
15483 #[allow(dead_code)]
15484 client: ::fidl_next::protocol::Client<___T>,
15485 }
15486
15487 impl<___T> DirEntryRouterClient<___T>
15488 where
15489 ___T: ::fidl_next::Transport,
15490 {
15491 pub fn route_with<___R>(
15492 &self,
15493 request: ___R,
15494 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
15495 where
15496 ___R: ::fidl_next::Encode<
15497 crate::wire::RouteRequest<'static>,
15498 <___T as ::fidl_next::Transport>::SendBuffer,
15499 >,
15500 {
15501 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15502 1929392218567642066,
15503 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
15504 request,
15505 ))
15506 }
15507 }
15508
15509 #[repr(transparent)]
15511 pub struct DirEntryRouterServer<___T: ::fidl_next::Transport> {
15512 server: ::fidl_next::protocol::Server<___T>,
15513 }
15514
15515 impl<___T> DirEntryRouterServer<___T> where ___T: ::fidl_next::Transport {}
15516 }
15517}
15518
15519#[diagnostic::on_unimplemented(
15520 note = "If {Self} implements the non-local DirEntryRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15521)]
15522
15523pub trait DirEntryRouterLocalClientHandler<
15527 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15528 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15529>
15530{
15531 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15532 ::core::future::ready(())
15533 }
15534}
15535
15536impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirEntryRouter
15537where
15538 ___H: DirEntryRouterLocalClientHandler<___T>,
15539 ___T: ::fidl_next::Transport,
15540{
15541 async fn on_event(
15542 handler: &mut ___H,
15543 mut message: ::fidl_next::Message<___T>,
15544 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15545 match *message.header().ordinal {
15546 ordinal => {
15547 handler.on_unknown_interaction(ordinal).await;
15548 if ::core::matches!(
15549 message.header().flexibility(),
15550 ::fidl_next::protocol::Flexibility::Strict
15551 ) {
15552 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15553 } else {
15554 Ok(())
15555 }
15556 }
15557 }
15558 }
15559}
15560
15561#[diagnostic::on_unimplemented(
15562 note = "If {Self} implements the non-local DirEntryRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15563)]
15564
15565pub trait DirEntryRouterLocalServerHandler<
15569 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15570 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15571>
15572{
15573 fn route(
15574 &mut self,
15575
15576 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
15577
15578 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
15579 ) -> impl ::core::future::Future<Output = ()>;
15580
15581 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15582 ::core::future::ready(())
15583 }
15584}
15585
15586impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirEntryRouter
15587where
15588 ___H: DirEntryRouterLocalServerHandler<___T>,
15589 ___T: ::fidl_next::Transport,
15590 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
15591 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15592 Constraint = (),
15593 >,
15594{
15595 async fn on_one_way(
15596 handler: &mut ___H,
15597 mut message: ::fidl_next::Message<___T>,
15598 ) -> ::core::result::Result<
15599 (),
15600 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15601 > {
15602 match *message.header().ordinal {
15603 ordinal => {
15604 handler.on_unknown_interaction(ordinal).await;
15605 if ::core::matches!(
15606 message.header().flexibility(),
15607 ::fidl_next::protocol::Flexibility::Strict
15608 ) {
15609 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15610 } else {
15611 Ok(())
15612 }
15613 }
15614 }
15615 }
15616
15617 async fn on_two_way(
15618 handler: &mut ___H,
15619 mut message: ::fidl_next::Message<___T>,
15620 responder: ::fidl_next::protocol::Responder<___T>,
15621 ) -> ::core::result::Result<
15622 (),
15623 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15624 > {
15625 match *message.header().ordinal {
15626 1929392218567642066 => {
15627 let responder = ::fidl_next::Responder::from_untyped(responder);
15628
15629 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15630 Ok(decoded) => {
15631 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
15632 Ok(())
15633 }
15634 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15635 ordinal: 1929392218567642066,
15636 error,
15637 }),
15638 }
15639 }
15640
15641 ordinal => {
15642 handler.on_unknown_interaction(ordinal).await;
15643 if ::core::matches!(
15644 message.header().flexibility(),
15645 ::fidl_next::protocol::Flexibility::Strict
15646 ) {
15647 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15648 } else {
15649 responder
15650 .respond_framework_error(
15651 ordinal,
15652 ::fidl_next::FrameworkError::UnknownMethod,
15653 )
15654 .expect("encoding a framework error should never fail")
15655 .await?;
15656 Ok(())
15657 }
15658 }
15659 }
15660 }
15661}
15662
15663pub trait DirEntryRouterClientHandler<
15667 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15668 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15669>
15670{
15671 fn on_unknown_interaction(
15672 &mut self,
15673 ordinal: u64,
15674 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15675 ::core::future::ready(())
15676 }
15677}
15678
15679impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirEntryRouter
15680where
15681 ___H: DirEntryRouterClientHandler<___T> + ::core::marker::Send,
15682 ___T: ::fidl_next::Transport,
15683{
15684 async fn on_event(
15685 handler: &mut ___H,
15686 mut message: ::fidl_next::Message<___T>,
15687 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15688 match *message.header().ordinal {
15689 ordinal => {
15690 handler.on_unknown_interaction(ordinal).await;
15691 if ::core::matches!(
15692 message.header().flexibility(),
15693 ::fidl_next::protocol::Flexibility::Strict
15694 ) {
15695 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15696 } else {
15697 Ok(())
15698 }
15699 }
15700 }
15701 }
15702}
15703
15704pub trait DirEntryRouterServerHandler<
15708 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15709 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15710>
15711{
15712 fn route(
15713 &mut self,
15714
15715 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
15716
15717 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
15718 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15719
15720 fn on_unknown_interaction(
15721 &mut self,
15722 ordinal: u64,
15723 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15724 ::core::future::ready(())
15725 }
15726}
15727
15728impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirEntryRouter
15729where
15730 ___H: DirEntryRouterServerHandler<___T> + ::core::marker::Send,
15731 ___T: ::fidl_next::Transport,
15732 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
15733 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15734 Constraint = (),
15735 >,
15736{
15737 async fn on_one_way(
15738 handler: &mut ___H,
15739 mut message: ::fidl_next::Message<___T>,
15740 ) -> ::core::result::Result<
15741 (),
15742 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15743 > {
15744 match *message.header().ordinal {
15745 ordinal => {
15746 handler.on_unknown_interaction(ordinal).await;
15747 if ::core::matches!(
15748 message.header().flexibility(),
15749 ::fidl_next::protocol::Flexibility::Strict
15750 ) {
15751 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15752 } else {
15753 Ok(())
15754 }
15755 }
15756 }
15757 }
15758
15759 async fn on_two_way(
15760 handler: &mut ___H,
15761 mut message: ::fidl_next::Message<___T>,
15762 responder: ::fidl_next::protocol::Responder<___T>,
15763 ) -> ::core::result::Result<
15764 (),
15765 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15766 > {
15767 match *message.header().ordinal {
15768 1929392218567642066 => {
15769 let responder = ::fidl_next::Responder::from_untyped(responder);
15770
15771 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15772 Ok(decoded) => {
15773 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
15774 Ok(())
15775 }
15776 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15777 ordinal: 1929392218567642066,
15778 error,
15779 }),
15780 }
15781 }
15782
15783 ordinal => {
15784 handler.on_unknown_interaction(ordinal).await;
15785 if ::core::matches!(
15786 message.header().flexibility(),
15787 ::fidl_next::protocol::Flexibility::Strict
15788 ) {
15789 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15790 } else {
15791 responder
15792 .respond_framework_error(
15793 ordinal,
15794 ::fidl_next::FrameworkError::UnknownMethod,
15795 )
15796 .expect("encoding a framework error should never fail")
15797 .await?;
15798 Ok(())
15799 }
15800 }
15801 }
15802 }
15803}
15804
15805impl<___T> DirEntryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
15806where
15807 ___T: ::fidl_next::Transport,
15808{
15809 async fn on_unknown_interaction(&mut self, _: u64) {}
15810}
15811
15812impl<___H, ___T> DirEntryRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
15813where
15814 ___H: DirEntryRouterClientHandler<___T>,
15815 ___T: ::fidl_next::Transport,
15816{
15817 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15818 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15819 }
15820}
15821
15822impl<___H, ___T> DirEntryRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
15823where
15824 ___H: DirEntryRouterServerHandler<___T>,
15825 ___T: ::fidl_next::Transport,
15826{
15827 async fn route(
15828 &mut self,
15829
15830 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
15831
15832 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
15833 ) {
15834 ___H::route(&mut self.0, request, responder).await
15835 }
15836
15837 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15838 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15839 }
15840}
15841
15842#[doc = " A receiver is served by components and allows them to receive directory channels\n framework.\n"]
15844#[derive(PartialEq, Debug)]
15845pub struct DirReceiver;
15846
15847impl ::fidl_next::Discoverable for DirReceiver {
15848 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
15849}
15850
15851#[cfg(target_os = "fuchsia")]
15852impl ::fidl_next::HasTransport for DirReceiver {
15853 type Transport = ::fidl_next::fuchsia::zx::Channel;
15854}
15855
15856pub mod dir_receiver {
15857 pub mod prelude {
15858 pub use crate::{
15859 DirReceiver, DirReceiverClientHandler, DirReceiverLocalClientHandler,
15860 DirReceiverLocalServerHandler, DirReceiverServerHandler, dir_receiver,
15861 };
15862
15863 pub use crate::natural::DirReceiverReceiveRequest;
15864 }
15865
15866 pub struct Receive;
15867
15868 impl ::fidl_next::Method for Receive {
15869 const ORDINAL: u64 = 926684461087488948;
15870 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15871 ::fidl_next::protocol::Flexibility::Flexible;
15872
15873 type Protocol = crate::DirReceiver;
15874
15875 type Request = crate::wire::DirReceiverReceiveRequest<'static>;
15876 }
15877
15878 mod ___detail {
15879 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirReceiver
15880 where
15881 ___T: ::fidl_next::Transport,
15882 {
15883 type Client = DirReceiverClient<___T>;
15884 type Server = DirReceiverServer<___T>;
15885 }
15886
15887 #[repr(transparent)]
15889 pub struct DirReceiverClient<___T: ::fidl_next::Transport> {
15890 #[allow(dead_code)]
15891 client: ::fidl_next::protocol::Client<___T>,
15892 }
15893
15894 impl<___T> DirReceiverClient<___T>
15895 where
15896 ___T: ::fidl_next::Transport,
15897 {
15898 #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library.\n"]
15899 pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
15900 where
15901 ___R: ::fidl_next::Encode<
15902 crate::wire::DirReceiverReceiveRequest<'static>,
15903 <___T as ::fidl_next::Transport>::SendBuffer,
15904 >,
15905 {
15906 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
15907 926684461087488948,
15908 <super::Receive as ::fidl_next::Method>::FLEXIBILITY,
15909 request,
15910 ))
15911 }
15912 }
15913
15914 #[repr(transparent)]
15916 pub struct DirReceiverServer<___T: ::fidl_next::Transport> {
15917 server: ::fidl_next::protocol::Server<___T>,
15918 }
15919
15920 impl<___T> DirReceiverServer<___T> where ___T: ::fidl_next::Transport {}
15921 }
15922}
15923
15924#[diagnostic::on_unimplemented(
15925 note = "If {Self} implements the non-local DirReceiverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15926)]
15927
15928pub trait DirReceiverLocalClientHandler<
15932 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15933 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15934>
15935{
15936 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15937 ::core::future::ready(())
15938 }
15939}
15940
15941impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirReceiver
15942where
15943 ___H: DirReceiverLocalClientHandler<___T>,
15944 ___T: ::fidl_next::Transport,
15945{
15946 async fn on_event(
15947 handler: &mut ___H,
15948 mut message: ::fidl_next::Message<___T>,
15949 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15950 match *message.header().ordinal {
15951 ordinal => {
15952 handler.on_unknown_interaction(ordinal).await;
15953 if ::core::matches!(
15954 message.header().flexibility(),
15955 ::fidl_next::protocol::Flexibility::Strict
15956 ) {
15957 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15958 } else {
15959 Ok(())
15960 }
15961 }
15962 }
15963 }
15964}
15965
15966#[diagnostic::on_unimplemented(
15967 note = "If {Self} implements the non-local DirReceiverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15968)]
15969
15970pub trait DirReceiverLocalServerHandler<
15974 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15975 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15976>
15977{
15978 #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library.\n"]
15979 fn receive(
15980 &mut self,
15981
15982 request: ::fidl_next::Request<dir_receiver::Receive, ___T>,
15983 ) -> impl ::core::future::Future<Output = ()>;
15984
15985 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15986 ::core::future::ready(())
15987 }
15988}
15989
15990impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirReceiver
15991where
15992 ___H: DirReceiverLocalServerHandler<___T>,
15993 ___T: ::fidl_next::Transport,
15994 for<'de> crate::wire::DirReceiverReceiveRequest<'de>: ::fidl_next::Decode<
15995 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15996 Constraint = (),
15997 >,
15998{
15999 async fn on_one_way(
16000 handler: &mut ___H,
16001 mut message: ::fidl_next::Message<___T>,
16002 ) -> ::core::result::Result<
16003 (),
16004 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16005 > {
16006 match *message.header().ordinal {
16007 926684461087488948 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16008 Ok(decoded) => {
16009 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
16010 Ok(())
16011 }
16012 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16013 ordinal: 926684461087488948,
16014 error,
16015 }),
16016 },
16017
16018 ordinal => {
16019 handler.on_unknown_interaction(ordinal).await;
16020 if ::core::matches!(
16021 message.header().flexibility(),
16022 ::fidl_next::protocol::Flexibility::Strict
16023 ) {
16024 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16025 } else {
16026 Ok(())
16027 }
16028 }
16029 }
16030 }
16031
16032 async fn on_two_way(
16033 handler: &mut ___H,
16034 mut message: ::fidl_next::Message<___T>,
16035 responder: ::fidl_next::protocol::Responder<___T>,
16036 ) -> ::core::result::Result<
16037 (),
16038 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16039 > {
16040 match *message.header().ordinal {
16041 ordinal => {
16042 handler.on_unknown_interaction(ordinal).await;
16043 if ::core::matches!(
16044 message.header().flexibility(),
16045 ::fidl_next::protocol::Flexibility::Strict
16046 ) {
16047 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16048 } else {
16049 responder
16050 .respond_framework_error(
16051 ordinal,
16052 ::fidl_next::FrameworkError::UnknownMethod,
16053 )
16054 .expect("encoding a framework error should never fail")
16055 .await?;
16056 Ok(())
16057 }
16058 }
16059 }
16060 }
16061}
16062
16063pub trait DirReceiverClientHandler<
16067 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16068 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16069>
16070{
16071 fn on_unknown_interaction(
16072 &mut self,
16073 ordinal: u64,
16074 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16075 ::core::future::ready(())
16076 }
16077}
16078
16079impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirReceiver
16080where
16081 ___H: DirReceiverClientHandler<___T> + ::core::marker::Send,
16082 ___T: ::fidl_next::Transport,
16083{
16084 async fn on_event(
16085 handler: &mut ___H,
16086 mut message: ::fidl_next::Message<___T>,
16087 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16088 match *message.header().ordinal {
16089 ordinal => {
16090 handler.on_unknown_interaction(ordinal).await;
16091 if ::core::matches!(
16092 message.header().flexibility(),
16093 ::fidl_next::protocol::Flexibility::Strict
16094 ) {
16095 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16096 } else {
16097 Ok(())
16098 }
16099 }
16100 }
16101 }
16102}
16103
16104pub trait DirReceiverServerHandler<
16108 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16109 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16110>
16111{
16112 #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library.\n"]
16113 fn receive(
16114 &mut self,
16115
16116 request: ::fidl_next::Request<dir_receiver::Receive, ___T>,
16117 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16118
16119 fn on_unknown_interaction(
16120 &mut self,
16121 ordinal: u64,
16122 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16123 ::core::future::ready(())
16124 }
16125}
16126
16127impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirReceiver
16128where
16129 ___H: DirReceiverServerHandler<___T> + ::core::marker::Send,
16130 ___T: ::fidl_next::Transport,
16131 for<'de> crate::wire::DirReceiverReceiveRequest<'de>: ::fidl_next::Decode<
16132 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16133 Constraint = (),
16134 >,
16135{
16136 async fn on_one_way(
16137 handler: &mut ___H,
16138 mut message: ::fidl_next::Message<___T>,
16139 ) -> ::core::result::Result<
16140 (),
16141 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16142 > {
16143 match *message.header().ordinal {
16144 926684461087488948 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16145 Ok(decoded) => {
16146 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
16147 Ok(())
16148 }
16149 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16150 ordinal: 926684461087488948,
16151 error,
16152 }),
16153 },
16154
16155 ordinal => {
16156 handler.on_unknown_interaction(ordinal).await;
16157 if ::core::matches!(
16158 message.header().flexibility(),
16159 ::fidl_next::protocol::Flexibility::Strict
16160 ) {
16161 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16162 } else {
16163 Ok(())
16164 }
16165 }
16166 }
16167 }
16168
16169 async fn on_two_way(
16170 handler: &mut ___H,
16171 mut message: ::fidl_next::Message<___T>,
16172 responder: ::fidl_next::protocol::Responder<___T>,
16173 ) -> ::core::result::Result<
16174 (),
16175 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16176 > {
16177 match *message.header().ordinal {
16178 ordinal => {
16179 handler.on_unknown_interaction(ordinal).await;
16180 if ::core::matches!(
16181 message.header().flexibility(),
16182 ::fidl_next::protocol::Flexibility::Strict
16183 ) {
16184 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16185 } else {
16186 responder
16187 .respond_framework_error(
16188 ordinal,
16189 ::fidl_next::FrameworkError::UnknownMethod,
16190 )
16191 .expect("encoding a framework error should never fail")
16192 .await?;
16193 Ok(())
16194 }
16195 }
16196 }
16197 }
16198}
16199
16200impl<___T> DirReceiverClientHandler<___T> for ::fidl_next::IgnoreEvents
16201where
16202 ___T: ::fidl_next::Transport,
16203{
16204 async fn on_unknown_interaction(&mut self, _: u64) {}
16205}
16206
16207impl<___H, ___T> DirReceiverLocalClientHandler<___T> for ::fidl_next::Local<___H>
16208where
16209 ___H: DirReceiverClientHandler<___T>,
16210 ___T: ::fidl_next::Transport,
16211{
16212 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16213 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16214 }
16215}
16216
16217impl<___H, ___T> DirReceiverLocalServerHandler<___T> for ::fidl_next::Local<___H>
16218where
16219 ___H: DirReceiverServerHandler<___T>,
16220 ___T: ::fidl_next::Transport,
16221{
16222 async fn receive(&mut self, request: ::fidl_next::Request<dir_receiver::Receive, ___T>) {
16223 ___H::receive(&mut self.0, request).await
16224 }
16225
16226 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16227 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16228 }
16229}
16230
16231#[derive(PartialEq, Debug)]
16233pub struct DirectoryRouter;
16234
16235impl ::fidl_next::Discoverable for DirectoryRouter {
16236 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
16237}
16238
16239#[cfg(target_os = "fuchsia")]
16240impl ::fidl_next::HasTransport for DirectoryRouter {
16241 type Transport = ::fidl_next::fuchsia::zx::Channel;
16242}
16243
16244pub mod directory_router {
16245 pub mod prelude {
16246 pub use crate::{
16247 DirectoryRouter, DirectoryRouterClientHandler, DirectoryRouterLocalClientHandler,
16248 DirectoryRouterLocalServerHandler, DirectoryRouterServerHandler, directory_router,
16249 };
16250
16251 pub use crate::natural::DirectoryRouterRouteResponse;
16252
16253 pub use crate::natural::RouteRequest;
16254
16255 pub use crate::natural::RouterError;
16256 }
16257
16258 pub struct Route;
16259
16260 impl ::fidl_next::Method for Route {
16261 const ORDINAL: u64 = 7510716014181158689;
16262 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16263 ::fidl_next::protocol::Flexibility::Flexible;
16264
16265 type Protocol = crate::DirectoryRouter;
16266
16267 type Request = crate::wire::RouteRequest<'static>;
16268 }
16269
16270 impl ::fidl_next::TwoWayMethod for Route {
16271 type Response = ::fidl_next::wire::Result<
16272 'static,
16273 crate::wire::DirectoryRouterRouteResponse,
16274 crate::wire::RouterError,
16275 >;
16276 }
16277
16278 impl<___R> ::fidl_next::Respond<___R> for Route {
16279 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
16280
16281 fn respond(response: ___R) -> Self::Output {
16282 ::core::result::Result::Ok(response)
16283 }
16284 }
16285
16286 impl<___R> ::fidl_next::RespondErr<___R> for Route {
16287 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
16288
16289 fn respond_err(response: ___R) -> Self::Output {
16290 ::core::result::Result::Err(response)
16291 }
16292 }
16293
16294 mod ___detail {
16295 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryRouter
16296 where
16297 ___T: ::fidl_next::Transport,
16298 {
16299 type Client = DirectoryRouterClient<___T>;
16300 type Server = DirectoryRouterServer<___T>;
16301 }
16302
16303 #[repr(transparent)]
16305 pub struct DirectoryRouterClient<___T: ::fidl_next::Transport> {
16306 #[allow(dead_code)]
16307 client: ::fidl_next::protocol::Client<___T>,
16308 }
16309
16310 impl<___T> DirectoryRouterClient<___T>
16311 where
16312 ___T: ::fidl_next::Transport,
16313 {
16314 pub fn route_with<___R>(
16315 &self,
16316 request: ___R,
16317 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
16318 where
16319 ___R: ::fidl_next::Encode<
16320 crate::wire::RouteRequest<'static>,
16321 <___T as ::fidl_next::Transport>::SendBuffer,
16322 >,
16323 {
16324 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
16325 7510716014181158689,
16326 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
16327 request,
16328 ))
16329 }
16330 }
16331
16332 #[repr(transparent)]
16334 pub struct DirectoryRouterServer<___T: ::fidl_next::Transport> {
16335 server: ::fidl_next::protocol::Server<___T>,
16336 }
16337
16338 impl<___T> DirectoryRouterServer<___T> where ___T: ::fidl_next::Transport {}
16339 }
16340}
16341
16342#[diagnostic::on_unimplemented(
16343 note = "If {Self} implements the non-local DirectoryRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
16344)]
16345
16346pub trait DirectoryRouterLocalClientHandler<
16350 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16351 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16352>
16353{
16354 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16355 ::core::future::ready(())
16356 }
16357}
16358
16359impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirectoryRouter
16360where
16361 ___H: DirectoryRouterLocalClientHandler<___T>,
16362 ___T: ::fidl_next::Transport,
16363{
16364 async fn on_event(
16365 handler: &mut ___H,
16366 mut message: ::fidl_next::Message<___T>,
16367 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16368 match *message.header().ordinal {
16369 ordinal => {
16370 handler.on_unknown_interaction(ordinal).await;
16371 if ::core::matches!(
16372 message.header().flexibility(),
16373 ::fidl_next::protocol::Flexibility::Strict
16374 ) {
16375 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16376 } else {
16377 Ok(())
16378 }
16379 }
16380 }
16381 }
16382}
16383
16384#[diagnostic::on_unimplemented(
16385 note = "If {Self} implements the non-local DirectoryRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
16386)]
16387
16388pub trait DirectoryRouterLocalServerHandler<
16392 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16393 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16394>
16395{
16396 fn route(
16397 &mut self,
16398
16399 request: ::fidl_next::Request<directory_router::Route, ___T>,
16400
16401 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
16402 ) -> impl ::core::future::Future<Output = ()>;
16403
16404 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16405 ::core::future::ready(())
16406 }
16407}
16408
16409impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirectoryRouter
16410where
16411 ___H: DirectoryRouterLocalServerHandler<___T>,
16412 ___T: ::fidl_next::Transport,
16413 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
16414 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16415 Constraint = (),
16416 >,
16417{
16418 async fn on_one_way(
16419 handler: &mut ___H,
16420 mut message: ::fidl_next::Message<___T>,
16421 ) -> ::core::result::Result<
16422 (),
16423 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16424 > {
16425 match *message.header().ordinal {
16426 ordinal => {
16427 handler.on_unknown_interaction(ordinal).await;
16428 if ::core::matches!(
16429 message.header().flexibility(),
16430 ::fidl_next::protocol::Flexibility::Strict
16431 ) {
16432 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16433 } else {
16434 Ok(())
16435 }
16436 }
16437 }
16438 }
16439
16440 async fn on_two_way(
16441 handler: &mut ___H,
16442 mut message: ::fidl_next::Message<___T>,
16443 responder: ::fidl_next::protocol::Responder<___T>,
16444 ) -> ::core::result::Result<
16445 (),
16446 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16447 > {
16448 match *message.header().ordinal {
16449 7510716014181158689 => {
16450 let responder = ::fidl_next::Responder::from_untyped(responder);
16451
16452 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16453 Ok(decoded) => {
16454 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
16455 Ok(())
16456 }
16457 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16458 ordinal: 7510716014181158689,
16459 error,
16460 }),
16461 }
16462 }
16463
16464 ordinal => {
16465 handler.on_unknown_interaction(ordinal).await;
16466 if ::core::matches!(
16467 message.header().flexibility(),
16468 ::fidl_next::protocol::Flexibility::Strict
16469 ) {
16470 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16471 } else {
16472 responder
16473 .respond_framework_error(
16474 ordinal,
16475 ::fidl_next::FrameworkError::UnknownMethod,
16476 )
16477 .expect("encoding a framework error should never fail")
16478 .await?;
16479 Ok(())
16480 }
16481 }
16482 }
16483 }
16484}
16485
16486pub trait DirectoryRouterClientHandler<
16490 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16491 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16492>
16493{
16494 fn on_unknown_interaction(
16495 &mut self,
16496 ordinal: u64,
16497 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16498 ::core::future::ready(())
16499 }
16500}
16501
16502impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryRouter
16503where
16504 ___H: DirectoryRouterClientHandler<___T> + ::core::marker::Send,
16505 ___T: ::fidl_next::Transport,
16506{
16507 async fn on_event(
16508 handler: &mut ___H,
16509 mut message: ::fidl_next::Message<___T>,
16510 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16511 match *message.header().ordinal {
16512 ordinal => {
16513 handler.on_unknown_interaction(ordinal).await;
16514 if ::core::matches!(
16515 message.header().flexibility(),
16516 ::fidl_next::protocol::Flexibility::Strict
16517 ) {
16518 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16519 } else {
16520 Ok(())
16521 }
16522 }
16523 }
16524 }
16525}
16526
16527pub trait DirectoryRouterServerHandler<
16531 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16532 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16533>
16534{
16535 fn route(
16536 &mut self,
16537
16538 request: ::fidl_next::Request<directory_router::Route, ___T>,
16539
16540 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
16541 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16542
16543 fn on_unknown_interaction(
16544 &mut self,
16545 ordinal: u64,
16546 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16547 ::core::future::ready(())
16548 }
16549}
16550
16551impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryRouter
16552where
16553 ___H: DirectoryRouterServerHandler<___T> + ::core::marker::Send,
16554 ___T: ::fidl_next::Transport,
16555 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
16556 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16557 Constraint = (),
16558 >,
16559{
16560 async fn on_one_way(
16561 handler: &mut ___H,
16562 mut message: ::fidl_next::Message<___T>,
16563 ) -> ::core::result::Result<
16564 (),
16565 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16566 > {
16567 match *message.header().ordinal {
16568 ordinal => {
16569 handler.on_unknown_interaction(ordinal).await;
16570 if ::core::matches!(
16571 message.header().flexibility(),
16572 ::fidl_next::protocol::Flexibility::Strict
16573 ) {
16574 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16575 } else {
16576 Ok(())
16577 }
16578 }
16579 }
16580 }
16581
16582 async fn on_two_way(
16583 handler: &mut ___H,
16584 mut message: ::fidl_next::Message<___T>,
16585 responder: ::fidl_next::protocol::Responder<___T>,
16586 ) -> ::core::result::Result<
16587 (),
16588 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16589 > {
16590 match *message.header().ordinal {
16591 7510716014181158689 => {
16592 let responder = ::fidl_next::Responder::from_untyped(responder);
16593
16594 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16595 Ok(decoded) => {
16596 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
16597 Ok(())
16598 }
16599 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16600 ordinal: 7510716014181158689,
16601 error,
16602 }),
16603 }
16604 }
16605
16606 ordinal => {
16607 handler.on_unknown_interaction(ordinal).await;
16608 if ::core::matches!(
16609 message.header().flexibility(),
16610 ::fidl_next::protocol::Flexibility::Strict
16611 ) {
16612 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16613 } else {
16614 responder
16615 .respond_framework_error(
16616 ordinal,
16617 ::fidl_next::FrameworkError::UnknownMethod,
16618 )
16619 .expect("encoding a framework error should never fail")
16620 .await?;
16621 Ok(())
16622 }
16623 }
16624 }
16625 }
16626}
16627
16628impl<___T> DirectoryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
16629where
16630 ___T: ::fidl_next::Transport,
16631{
16632 async fn on_unknown_interaction(&mut self, _: u64) {}
16633}
16634
16635impl<___H, ___T> DirectoryRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
16636where
16637 ___H: DirectoryRouterClientHandler<___T>,
16638 ___T: ::fidl_next::Transport,
16639{
16640 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16641 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16642 }
16643}
16644
16645impl<___H, ___T> DirectoryRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
16646where
16647 ___H: DirectoryRouterServerHandler<___T>,
16648 ___T: ::fidl_next::Transport,
16649{
16650 async fn route(
16651 &mut self,
16652
16653 request: ::fidl_next::Request<directory_router::Route, ___T>,
16654
16655 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
16656 ) {
16657 ___H::route(&mut self.0, request, responder).await
16658 }
16659
16660 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16661 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16662 }
16663}
16664
16665#[doc = " A receiver is served by components and allows them to receive channels\n from the framework.\n"]
16667#[derive(PartialEq, Debug)]
16668pub struct Receiver;
16669
16670impl ::fidl_next::Discoverable for Receiver {
16671 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
16672}
16673
16674#[cfg(target_os = "fuchsia")]
16675impl ::fidl_next::HasTransport for Receiver {
16676 type Transport = ::fidl_next::fuchsia::zx::Channel;
16677}
16678
16679pub mod receiver {
16680 pub mod prelude {
16681 pub use crate::{
16682 Receiver, ReceiverClientHandler, ReceiverLocalClientHandler,
16683 ReceiverLocalServerHandler, ReceiverServerHandler, receiver,
16684 };
16685
16686 pub use crate::natural::ProtocolPayload;
16687 }
16688
16689 pub struct Receive;
16690
16691 impl ::fidl_next::Method for Receive {
16692 const ORDINAL: u64 = 340832707723008660;
16693 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16694 ::fidl_next::protocol::Flexibility::Flexible;
16695
16696 type Protocol = crate::Receiver;
16697
16698 type Request = crate::wire::ProtocolPayload;
16699 }
16700
16701 mod ___detail {
16702 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Receiver
16703 where
16704 ___T: ::fidl_next::Transport,
16705 {
16706 type Client = ReceiverClient<___T>;
16707 type Server = ReceiverServer<___T>;
16708 }
16709
16710 #[repr(transparent)]
16712 pub struct ReceiverClient<___T: ::fidl_next::Transport> {
16713 #[allow(dead_code)]
16714 client: ::fidl_next::protocol::Client<___T>,
16715 }
16716
16717 impl<___T> ReceiverClient<___T>
16718 where
16719 ___T: ::fidl_next::Transport,
16720 {
16721 #[doc = " Sends a channel to this receiver.\n"]
16722 pub fn receive(
16723 &self,
16724
16725 channel: impl ::fidl_next::Encode<
16726 ::fidl_next::wire::fuchsia::Channel,
16727 <___T as ::fidl_next::Transport>::SendBuffer,
16728 >,
16729 ) -> ::fidl_next::SendFuture<'_, ___T>
16730 where
16731 <___T as ::fidl_next::Transport>::SendBuffer:
16732 ::fidl_next::encoder::InternalHandleEncoder,
16733 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
16734 {
16735 self.receive_with(crate::generic::ProtocolPayload { channel })
16736 }
16737
16738 #[doc = " Sends a channel to this receiver.\n"]
16739 pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
16740 where
16741 ___R: ::fidl_next::Encode<
16742 crate::wire::ProtocolPayload,
16743 <___T as ::fidl_next::Transport>::SendBuffer,
16744 >,
16745 {
16746 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
16747 340832707723008660,
16748 <super::Receive as ::fidl_next::Method>::FLEXIBILITY,
16749 request,
16750 ))
16751 }
16752 }
16753
16754 #[repr(transparent)]
16756 pub struct ReceiverServer<___T: ::fidl_next::Transport> {
16757 server: ::fidl_next::protocol::Server<___T>,
16758 }
16759
16760 impl<___T> ReceiverServer<___T> where ___T: ::fidl_next::Transport {}
16761 }
16762}
16763
16764#[diagnostic::on_unimplemented(
16765 note = "If {Self} implements the non-local ReceiverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
16766)]
16767
16768pub trait ReceiverLocalClientHandler<
16772 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16773 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16774>
16775{
16776 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16777 ::core::future::ready(())
16778 }
16779}
16780
16781impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Receiver
16782where
16783 ___H: ReceiverLocalClientHandler<___T>,
16784 ___T: ::fidl_next::Transport,
16785{
16786 async fn on_event(
16787 handler: &mut ___H,
16788 mut message: ::fidl_next::Message<___T>,
16789 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16790 match *message.header().ordinal {
16791 ordinal => {
16792 handler.on_unknown_interaction(ordinal).await;
16793 if ::core::matches!(
16794 message.header().flexibility(),
16795 ::fidl_next::protocol::Flexibility::Strict
16796 ) {
16797 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16798 } else {
16799 Ok(())
16800 }
16801 }
16802 }
16803 }
16804}
16805
16806#[diagnostic::on_unimplemented(
16807 note = "If {Self} implements the non-local ReceiverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
16808)]
16809
16810pub trait ReceiverLocalServerHandler<
16814 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16815 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16816>
16817{
16818 #[doc = " Sends a channel to this receiver.\n"]
16819 fn receive(
16820 &mut self,
16821
16822 request: ::fidl_next::Request<receiver::Receive, ___T>,
16823 ) -> impl ::core::future::Future<Output = ()>;
16824
16825 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16826 ::core::future::ready(())
16827 }
16828}
16829
16830impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Receiver
16831where
16832 ___H: ReceiverLocalServerHandler<___T>,
16833 ___T: ::fidl_next::Transport,
16834 for<'de> crate::wire::ProtocolPayload: ::fidl_next::Decode<
16835 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16836 Constraint = (),
16837 >,
16838{
16839 async fn on_one_way(
16840 handler: &mut ___H,
16841 mut message: ::fidl_next::Message<___T>,
16842 ) -> ::core::result::Result<
16843 (),
16844 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16845 > {
16846 match *message.header().ordinal {
16847 340832707723008660 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16848 Ok(decoded) => {
16849 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
16850 Ok(())
16851 }
16852 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16853 ordinal: 340832707723008660,
16854 error,
16855 }),
16856 },
16857
16858 ordinal => {
16859 handler.on_unknown_interaction(ordinal).await;
16860 if ::core::matches!(
16861 message.header().flexibility(),
16862 ::fidl_next::protocol::Flexibility::Strict
16863 ) {
16864 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16865 } else {
16866 Ok(())
16867 }
16868 }
16869 }
16870 }
16871
16872 async fn on_two_way(
16873 handler: &mut ___H,
16874 mut message: ::fidl_next::Message<___T>,
16875 responder: ::fidl_next::protocol::Responder<___T>,
16876 ) -> ::core::result::Result<
16877 (),
16878 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16879 > {
16880 match *message.header().ordinal {
16881 ordinal => {
16882 handler.on_unknown_interaction(ordinal).await;
16883 if ::core::matches!(
16884 message.header().flexibility(),
16885 ::fidl_next::protocol::Flexibility::Strict
16886 ) {
16887 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16888 } else {
16889 responder
16890 .respond_framework_error(
16891 ordinal,
16892 ::fidl_next::FrameworkError::UnknownMethod,
16893 )
16894 .expect("encoding a framework error should never fail")
16895 .await?;
16896 Ok(())
16897 }
16898 }
16899 }
16900 }
16901}
16902
16903pub trait ReceiverClientHandler<
16907 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16908 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16909>
16910{
16911 fn on_unknown_interaction(
16912 &mut self,
16913 ordinal: u64,
16914 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16915 ::core::future::ready(())
16916 }
16917}
16918
16919impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Receiver
16920where
16921 ___H: ReceiverClientHandler<___T> + ::core::marker::Send,
16922 ___T: ::fidl_next::Transport,
16923{
16924 async fn on_event(
16925 handler: &mut ___H,
16926 mut message: ::fidl_next::Message<___T>,
16927 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16928 match *message.header().ordinal {
16929 ordinal => {
16930 handler.on_unknown_interaction(ordinal).await;
16931 if ::core::matches!(
16932 message.header().flexibility(),
16933 ::fidl_next::protocol::Flexibility::Strict
16934 ) {
16935 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16936 } else {
16937 Ok(())
16938 }
16939 }
16940 }
16941 }
16942}
16943
16944pub trait ReceiverServerHandler<
16948 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16949 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16950>
16951{
16952 #[doc = " Sends a channel to this receiver.\n"]
16953 fn receive(
16954 &mut self,
16955
16956 request: ::fidl_next::Request<receiver::Receive, ___T>,
16957 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16958
16959 fn on_unknown_interaction(
16960 &mut self,
16961 ordinal: u64,
16962 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16963 ::core::future::ready(())
16964 }
16965}
16966
16967impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Receiver
16968where
16969 ___H: ReceiverServerHandler<___T> + ::core::marker::Send,
16970 ___T: ::fidl_next::Transport,
16971 for<'de> crate::wire::ProtocolPayload: ::fidl_next::Decode<
16972 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16973 Constraint = (),
16974 >,
16975{
16976 async fn on_one_way(
16977 handler: &mut ___H,
16978 mut message: ::fidl_next::Message<___T>,
16979 ) -> ::core::result::Result<
16980 (),
16981 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16982 > {
16983 match *message.header().ordinal {
16984 340832707723008660 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16985 Ok(decoded) => {
16986 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
16987 Ok(())
16988 }
16989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16990 ordinal: 340832707723008660,
16991 error,
16992 }),
16993 },
16994
16995 ordinal => {
16996 handler.on_unknown_interaction(ordinal).await;
16997 if ::core::matches!(
16998 message.header().flexibility(),
16999 ::fidl_next::protocol::Flexibility::Strict
17000 ) {
17001 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
17002 } else {
17003 Ok(())
17004 }
17005 }
17006 }
17007 }
17008
17009 async fn on_two_way(
17010 handler: &mut ___H,
17011 mut message: ::fidl_next::Message<___T>,
17012 responder: ::fidl_next::protocol::Responder<___T>,
17013 ) -> ::core::result::Result<
17014 (),
17015 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17016 > {
17017 match *message.header().ordinal {
17018 ordinal => {
17019 handler.on_unknown_interaction(ordinal).await;
17020 if ::core::matches!(
17021 message.header().flexibility(),
17022 ::fidl_next::protocol::Flexibility::Strict
17023 ) {
17024 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
17025 } else {
17026 responder
17027 .respond_framework_error(
17028 ordinal,
17029 ::fidl_next::FrameworkError::UnknownMethod,
17030 )
17031 .expect("encoding a framework error should never fail")
17032 .await?;
17033 Ok(())
17034 }
17035 }
17036 }
17037 }
17038}
17039
17040impl<___T> ReceiverClientHandler<___T> for ::fidl_next::IgnoreEvents
17041where
17042 ___T: ::fidl_next::Transport,
17043{
17044 async fn on_unknown_interaction(&mut self, _: u64) {}
17045}
17046
17047impl<___H, ___T> ReceiverLocalClientHandler<___T> for ::fidl_next::Local<___H>
17048where
17049 ___H: ReceiverClientHandler<___T>,
17050 ___T: ::fidl_next::Transport,
17051{
17052 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17053 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17054 }
17055}
17056
17057impl<___H, ___T> ReceiverLocalServerHandler<___T> for ::fidl_next::Local<___H>
17058where
17059 ___H: ReceiverServerHandler<___T>,
17060 ___T: ::fidl_next::Transport,
17061{
17062 async fn receive(&mut self, request: ::fidl_next::Request<receiver::Receive, ___T>) {
17063 ___H::receive(&mut self.0, request).await
17064 }
17065
17066 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17067 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17068 }
17069}
17070
17071pub use fidl_next_common_fuchsia_component_sandbox::*;