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 source_instance_filter(
3695 &self,
3696 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>
3697 {
3698 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3699 }
3700
3701 pub fn renamed_instances(
3702 &self,
3703 ) -> ::core::option::Option<
3704 &::fidl_next::wire::Vector<
3705 'de,
3706 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3707 >,
3708 > {
3709 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3710 }
3711 }
3712
3713 impl<'de> ::core::fmt::Debug for AggregateSource<'de> {
3714 fn fmt(
3715 &self,
3716 f: &mut ::core::fmt::Formatter<'_>,
3717 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3718 f.debug_struct("AggregateSource")
3719 .field("dir_connector", &self.dir_connector())
3720 .field("source_instance_filter", &self.source_instance_filter())
3721 .field("renamed_instances", &self.renamed_instances())
3722 .finish()
3723 }
3724 }
3725
3726 impl<'de> ::fidl_next::IntoNatural for AggregateSource<'de> {
3727 type Natural = crate::natural::AggregateSource;
3728 }
3729
3730 #[derive(Debug)]
3732 #[repr(C)]
3733 pub struct DictionaryRef {
3734 pub token: ::fidl_next::wire::fuchsia::EventPair,
3735 }
3736
3737 static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryRef>(), 4);
3738 static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryRef>(), 4);
3739
3740 static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryRef, token), 0);
3741
3742 impl ::fidl_next::Constrained for DictionaryRef {
3743 type Constraint = ();
3744
3745 fn validate(
3746 _: ::fidl_next::Slot<'_, Self>,
3747 _: Self::Constraint,
3748 ) -> Result<(), ::fidl_next::ValidationError> {
3749 Ok(())
3750 }
3751 }
3752
3753 unsafe impl ::fidl_next::Wire for DictionaryRef {
3754 type Narrowed<'de> = DictionaryRef;
3755
3756 #[inline]
3757 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3758 ::fidl_next::munge! {
3759 let Self {
3760 token,
3761
3762 } = &mut *out_;
3763 }
3764
3765 ::fidl_next::Wire::zero_padding(token);
3766 }
3767 }
3768
3769 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRef
3770 where
3771 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3772 ___D: ::fidl_next::fuchsia::HandleDecoder,
3773 {
3774 fn decode(
3775 slot_: ::fidl_next::Slot<'_, Self>,
3776 decoder_: &mut ___D,
3777 _: (),
3778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3779 ::fidl_next::munge! {
3780 let Self {
3781 mut token,
3782
3783 } = slot_;
3784 }
3785
3786 let _field = token.as_mut();
3787
3788 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3789
3790 Ok(())
3791 }
3792 }
3793
3794 impl ::fidl_next::IntoNatural for DictionaryRef {
3795 type Natural = crate::natural::DictionaryRef;
3796 }
3797
3798 #[derive(Debug)]
3800 #[repr(C)]
3801 pub struct Connector {
3802 pub token: ::fidl_next::wire::fuchsia::EventPair,
3803 }
3804
3805 static_assertions::const_assert_eq!(std::mem::size_of::<Connector>(), 4);
3806 static_assertions::const_assert_eq!(std::mem::align_of::<Connector>(), 4);
3807
3808 static_assertions::const_assert_eq!(std::mem::offset_of!(Connector, token), 0);
3809
3810 impl ::fidl_next::Constrained for Connector {
3811 type Constraint = ();
3812
3813 fn validate(
3814 _: ::fidl_next::Slot<'_, Self>,
3815 _: Self::Constraint,
3816 ) -> Result<(), ::fidl_next::ValidationError> {
3817 Ok(())
3818 }
3819 }
3820
3821 unsafe impl ::fidl_next::Wire for Connector {
3822 type Narrowed<'de> = Connector;
3823
3824 #[inline]
3825 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3826 ::fidl_next::munge! {
3827 let Self {
3828 token,
3829
3830 } = &mut *out_;
3831 }
3832
3833 ::fidl_next::Wire::zero_padding(token);
3834 }
3835 }
3836
3837 unsafe impl<___D> ::fidl_next::Decode<___D> for Connector
3838 where
3839 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3840 ___D: ::fidl_next::fuchsia::HandleDecoder,
3841 {
3842 fn decode(
3843 slot_: ::fidl_next::Slot<'_, Self>,
3844 decoder_: &mut ___D,
3845 _: (),
3846 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3847 ::fidl_next::munge! {
3848 let Self {
3849 mut token,
3850
3851 } = slot_;
3852 }
3853
3854 let _field = token.as_mut();
3855
3856 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3857
3858 Ok(())
3859 }
3860 }
3861
3862 impl ::fidl_next::IntoNatural for Connector {
3863 type Natural = crate::natural::Connector;
3864 }
3865
3866 #[derive(Debug)]
3868 #[repr(C)]
3869 pub struct DirEntry {
3870 pub token: ::fidl_next::wire::fuchsia::EventPair,
3871 }
3872
3873 static_assertions::const_assert_eq!(std::mem::size_of::<DirEntry>(), 4);
3874 static_assertions::const_assert_eq!(std::mem::align_of::<DirEntry>(), 4);
3875
3876 static_assertions::const_assert_eq!(std::mem::offset_of!(DirEntry, token), 0);
3877
3878 impl ::fidl_next::Constrained for DirEntry {
3879 type Constraint = ();
3880
3881 fn validate(
3882 _: ::fidl_next::Slot<'_, Self>,
3883 _: Self::Constraint,
3884 ) -> Result<(), ::fidl_next::ValidationError> {
3885 Ok(())
3886 }
3887 }
3888
3889 unsafe impl ::fidl_next::Wire for DirEntry {
3890 type Narrowed<'de> = DirEntry;
3891
3892 #[inline]
3893 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3894 ::fidl_next::munge! {
3895 let Self {
3896 token,
3897
3898 } = &mut *out_;
3899 }
3900
3901 ::fidl_next::Wire::zero_padding(token);
3902 }
3903 }
3904
3905 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntry
3906 where
3907 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3908 ___D: ::fidl_next::fuchsia::HandleDecoder,
3909 {
3910 fn decode(
3911 slot_: ::fidl_next::Slot<'_, Self>,
3912 decoder_: &mut ___D,
3913 _: (),
3914 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3915 ::fidl_next::munge! {
3916 let Self {
3917 mut token,
3918
3919 } = slot_;
3920 }
3921
3922 let _field = token.as_mut();
3923
3924 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3925
3926 Ok(())
3927 }
3928 }
3929
3930 impl ::fidl_next::IntoNatural for DirEntry {
3931 type Natural = crate::natural::DirEntry;
3932 }
3933
3934 #[repr(transparent)]
3936 pub struct Capability<'de> {
3937 pub(crate) raw: ::fidl_next::wire::Union,
3938 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3939 }
3940
3941 impl<'de> Drop for Capability<'de> {
3942 fn drop(&mut self) {
3943 match self.raw.ordinal() {
3944 1 => {
3945 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
3946 }
3947
3948 2 => {
3949 let _ = unsafe {
3950 self.raw
3951 .get()
3952 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
3953 };
3954 }
3955
3956 3 => {
3957 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Data<'de>>() };
3958 }
3959
3960 4 => {
3961 let _ =
3962 unsafe { self.raw.get().read_unchecked::<crate::wire::DictionaryRef>() };
3963 }
3964
3965 5 => {
3966 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Connector>() };
3967 }
3968
3969 6 => {
3970 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirConnector>() };
3971 }
3972
3973 7 => {
3974 let _ = unsafe {
3975 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
3976 ::fidl_next_fuchsia_io::Directory,
3977 ::fidl_next::wire::fuchsia::Channel,
3978 >>()
3979 };
3980 }
3981
3982 8 => {
3983 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirEntry>() };
3984 }
3985
3986 9 => {
3987 let _ = unsafe {
3988 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
3989 crate::ConnectorRouter,
3990 ::fidl_next::wire::fuchsia::Channel,
3991 >>()
3992 };
3993 }
3994
3995 10 => {
3996 let _ = unsafe {
3997 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
3998 crate::DictionaryRouter,
3999 ::fidl_next::wire::fuchsia::Channel,
4000 >>()
4001 };
4002 }
4003
4004 11 => {
4005 let _ = unsafe {
4006 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4007 crate::DirEntryRouter,
4008 ::fidl_next::wire::fuchsia::Channel,
4009 >>()
4010 };
4011 }
4012
4013 12 => {
4014 let _ = unsafe {
4015 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4016 crate::DataRouter,
4017 ::fidl_next::wire::fuchsia::Channel,
4018 >>()
4019 };
4020 }
4021
4022 13 => {
4023 let _ = unsafe {
4024 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4025 crate::DirConnectorRouter,
4026 ::fidl_next::wire::fuchsia::Channel,
4027 >>()
4028 };
4029 }
4030
4031 _ => (),
4032 }
4033 }
4034 }
4035
4036 impl ::fidl_next::Constrained for Capability<'_> {
4037 type Constraint = ();
4038
4039 fn validate(
4040 _: ::fidl_next::Slot<'_, Self>,
4041 _: Self::Constraint,
4042 ) -> Result<(), ::fidl_next::ValidationError> {
4043 Ok(())
4044 }
4045 }
4046
4047 unsafe impl ::fidl_next::Wire for Capability<'static> {
4048 type Narrowed<'de> = Capability<'de>;
4049
4050 #[inline]
4051 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4052 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4053 ::fidl_next::wire::Union::zero_padding(raw);
4054 }
4055 }
4056
4057 pub mod capability {
4058 pub enum Ref<'de> {
4059 Unit(&'de crate::wire::Unit),
4060
4061 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
4062
4063 Data(&'de crate::wire::Data<'de>),
4064
4065 Dictionary(&'de crate::wire::DictionaryRef),
4066
4067 Connector(&'de crate::wire::Connector),
4068
4069 DirConnector(&'de crate::wire::DirConnector),
4070
4071 Directory(
4072 &'de ::fidl_next::ClientEnd<
4073 ::fidl_next_fuchsia_io::Directory,
4074 ::fidl_next::wire::fuchsia::Channel,
4075 >,
4076 ),
4077
4078 DirEntry(&'de crate::wire::DirEntry),
4079
4080 ConnectorRouter(
4081 &'de ::fidl_next::ClientEnd<
4082 crate::ConnectorRouter,
4083 ::fidl_next::wire::fuchsia::Channel,
4084 >,
4085 ),
4086
4087 DictionaryRouter(
4088 &'de ::fidl_next::ClientEnd<
4089 crate::DictionaryRouter,
4090 ::fidl_next::wire::fuchsia::Channel,
4091 >,
4092 ),
4093
4094 DirEntryRouter(
4095 &'de ::fidl_next::ClientEnd<
4096 crate::DirEntryRouter,
4097 ::fidl_next::wire::fuchsia::Channel,
4098 >,
4099 ),
4100
4101 DataRouter(
4102 &'de ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4103 ),
4104
4105 DirConnectorRouter(
4106 &'de ::fidl_next::ClientEnd<
4107 crate::DirConnectorRouter,
4108 ::fidl_next::wire::fuchsia::Channel,
4109 >,
4110 ),
4111
4112 UnknownOrdinal_(u64),
4113 }
4114 }
4115
4116 impl<'de> Capability<'de> {
4117 pub fn as_ref(&self) -> crate::wire::capability::Ref<'_> {
4118 match self.raw.ordinal() {
4119 1 => crate::wire::capability::Ref::Unit(unsafe {
4120 self.raw.get().deref_unchecked::<crate::wire::Unit>()
4121 }),
4122
4123 2 => crate::wire::capability::Ref::Handle(unsafe {
4124 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4125 }),
4126
4127 3 => crate::wire::capability::Ref::Data(unsafe {
4128 self.raw.get().deref_unchecked::<crate::wire::Data<'_>>()
4129 }),
4130
4131 4 => crate::wire::capability::Ref::Dictionary(unsafe {
4132 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>()
4133 }),
4134
4135 5 => crate::wire::capability::Ref::Connector(unsafe {
4136 self.raw.get().deref_unchecked::<crate::wire::Connector>()
4137 }),
4138
4139 6 => crate::wire::capability::Ref::DirConnector(unsafe {
4140 self.raw.get().deref_unchecked::<crate::wire::DirConnector>()
4141 }),
4142
4143 7 => crate::wire::capability::Ref::Directory(unsafe {
4144 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4145 ::fidl_next_fuchsia_io::Directory,
4146 ::fidl_next::wire::fuchsia::Channel,
4147 >>()
4148 }),
4149
4150 8 => crate::wire::capability::Ref::DirEntry(unsafe {
4151 self.raw.get().deref_unchecked::<crate::wire::DirEntry>()
4152 }),
4153
4154 9 => crate::wire::capability::Ref::ConnectorRouter(unsafe {
4155 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4156 crate::ConnectorRouter,
4157 ::fidl_next::wire::fuchsia::Channel,
4158 >>()
4159 }),
4160
4161 10 => crate::wire::capability::Ref::DictionaryRouter(unsafe {
4162 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4163 crate::DictionaryRouter,
4164 ::fidl_next::wire::fuchsia::Channel,
4165 >>()
4166 }),
4167
4168 11 => crate::wire::capability::Ref::DirEntryRouter(unsafe {
4169 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4170 crate::DirEntryRouter,
4171 ::fidl_next::wire::fuchsia::Channel,
4172 >>()
4173 }),
4174
4175 12 => crate::wire::capability::Ref::DataRouter(unsafe {
4176 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4177 crate::DataRouter,
4178 ::fidl_next::wire::fuchsia::Channel,
4179 >>()
4180 }),
4181
4182 13 => crate::wire::capability::Ref::DirConnectorRouter(unsafe {
4183 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4184 crate::DirConnectorRouter,
4185 ::fidl_next::wire::fuchsia::Channel,
4186 >>()
4187 }),
4188
4189 unknown => crate::wire::capability::Ref::UnknownOrdinal_(unknown),
4190 }
4191 }
4192 }
4193
4194 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Capability<'de>
4195 where
4196 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4197 ___D: ::fidl_next::Decoder<'de>,
4198 ___D: ::fidl_next::fuchsia::HandleDecoder,
4199 {
4200 fn decode(
4201 mut slot: ::fidl_next::Slot<'_, Self>,
4202 decoder: &mut ___D,
4203 _: (),
4204 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4205 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4206 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4207 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
4208 raw,
4209 decoder,
4210 (),
4211 )?,
4212
4213 2 => ::fidl_next::wire::Union::decode_as::<
4214 ___D,
4215 ::fidl_next::wire::fuchsia::NullableHandle,
4216 >(raw, decoder, ())?,
4217
4218 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
4219 raw,
4220 decoder,
4221 (),
4222 )?,
4223
4224 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DictionaryRef>(
4225 raw,
4226 decoder,
4227 (),
4228 )?,
4229
4230 5 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Connector>(
4231 raw,
4232 decoder,
4233 (),
4234 )?,
4235
4236 6 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirConnector>(
4237 raw,
4238 decoder,
4239 (),
4240 )?,
4241
4242 7 => ::fidl_next::wire::Union::decode_as::<
4243 ___D,
4244 ::fidl_next::ClientEnd<
4245 ::fidl_next_fuchsia_io::Directory,
4246 ::fidl_next::wire::fuchsia::Channel,
4247 >,
4248 >(raw, decoder, ())?,
4249
4250 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirEntry>(
4251 raw,
4252 decoder,
4253 (),
4254 )?,
4255
4256 9 => ::fidl_next::wire::Union::decode_as::<
4257 ___D,
4258 ::fidl_next::ClientEnd<
4259 crate::ConnectorRouter,
4260 ::fidl_next::wire::fuchsia::Channel,
4261 >,
4262 >(raw, decoder, ())?,
4263
4264 10 => ::fidl_next::wire::Union::decode_as::<
4265 ___D,
4266 ::fidl_next::ClientEnd<
4267 crate::DictionaryRouter,
4268 ::fidl_next::wire::fuchsia::Channel,
4269 >,
4270 >(raw, decoder, ())?,
4271
4272 11 => ::fidl_next::wire::Union::decode_as::<
4273 ___D,
4274 ::fidl_next::ClientEnd<
4275 crate::DirEntryRouter,
4276 ::fidl_next::wire::fuchsia::Channel,
4277 >,
4278 >(raw, decoder, ())?,
4279
4280 12 => ::fidl_next::wire::Union::decode_as::<
4281 ___D,
4282 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4283 >(raw, decoder, ())?,
4284
4285 13 => ::fidl_next::wire::Union::decode_as::<
4286 ___D,
4287 ::fidl_next::ClientEnd<
4288 crate::DirConnectorRouter,
4289 ::fidl_next::wire::fuchsia::Channel,
4290 >,
4291 >(raw, decoder, ())?,
4292
4293 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4294 }
4295
4296 Ok(())
4297 }
4298 }
4299
4300 impl<'de> ::core::fmt::Debug for Capability<'de> {
4301 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4302 match self.raw.ordinal() {
4303 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
4304 2 => unsafe {
4305 self.raw
4306 .get()
4307 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4308 .fmt(f)
4309 },
4310 3 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Data<'_>>().fmt(f) },
4311 4 => unsafe {
4312 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>().fmt(f)
4313 },
4314 5 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Connector>().fmt(f) },
4315 6 => unsafe {
4316 self.raw.get().deref_unchecked::<crate::wire::DirConnector>().fmt(f)
4317 },
4318 7 => unsafe {
4319 self.raw
4320 .get()
4321 .deref_unchecked::<::fidl_next::ClientEnd<
4322 ::fidl_next_fuchsia_io::Directory,
4323 ::fidl_next::wire::fuchsia::Channel,
4324 >>()
4325 .fmt(f)
4326 },
4327 8 => unsafe { self.raw.get().deref_unchecked::<crate::wire::DirEntry>().fmt(f) },
4328 9 => unsafe {
4329 self.raw
4330 .get()
4331 .deref_unchecked::<::fidl_next::ClientEnd<
4332 crate::ConnectorRouter,
4333 ::fidl_next::wire::fuchsia::Channel,
4334 >>()
4335 .fmt(f)
4336 },
4337 10 => unsafe {
4338 self.raw
4339 .get()
4340 .deref_unchecked::<::fidl_next::ClientEnd<
4341 crate::DictionaryRouter,
4342 ::fidl_next::wire::fuchsia::Channel,
4343 >>()
4344 .fmt(f)
4345 },
4346 11 => unsafe {
4347 self.raw
4348 .get()
4349 .deref_unchecked::<::fidl_next::ClientEnd<
4350 crate::DirEntryRouter,
4351 ::fidl_next::wire::fuchsia::Channel,
4352 >>()
4353 .fmt(f)
4354 },
4355 12 => unsafe {
4356 self.raw
4357 .get()
4358 .deref_unchecked::<::fidl_next::ClientEnd<
4359 crate::DataRouter,
4360 ::fidl_next::wire::fuchsia::Channel,
4361 >>()
4362 .fmt(f)
4363 },
4364 13 => unsafe {
4365 self.raw
4366 .get()
4367 .deref_unchecked::<::fidl_next::ClientEnd<
4368 crate::DirConnectorRouter,
4369 ::fidl_next::wire::fuchsia::Channel,
4370 >>()
4371 .fmt(f)
4372 },
4373 _ => unsafe { ::core::hint::unreachable_unchecked() },
4374 }
4375 }
4376 }
4377
4378 impl<'de> ::fidl_next::IntoNatural for Capability<'de> {
4379 type Natural = crate::natural::Capability;
4380 }
4381
4382 #[derive(Debug)]
4384 #[repr(C)]
4385 pub struct CapabilityStoreConnectorCreateRequest {
4386 pub id: ::fidl_next::wire::Uint64,
4387
4388 pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
4389 }
4390
4391 static_assertions::const_assert_eq!(
4392 std::mem::size_of::<CapabilityStoreConnectorCreateRequest>(),
4393 16
4394 );
4395 static_assertions::const_assert_eq!(
4396 std::mem::align_of::<CapabilityStoreConnectorCreateRequest>(),
4397 8
4398 );
4399
4400 static_assertions::const_assert_eq!(
4401 std::mem::offset_of!(CapabilityStoreConnectorCreateRequest, id),
4402 0
4403 );
4404
4405 static_assertions::const_assert_eq!(
4406 std::mem::offset_of!(CapabilityStoreConnectorCreateRequest, receiver),
4407 8
4408 );
4409
4410 impl ::fidl_next::Constrained for CapabilityStoreConnectorCreateRequest {
4411 type Constraint = ();
4412
4413 fn validate(
4414 _: ::fidl_next::Slot<'_, Self>,
4415 _: Self::Constraint,
4416 ) -> Result<(), ::fidl_next::ValidationError> {
4417 Ok(())
4418 }
4419 }
4420
4421 unsafe impl ::fidl_next::Wire for CapabilityStoreConnectorCreateRequest {
4422 type Narrowed<'de> = CapabilityStoreConnectorCreateRequest;
4423
4424 #[inline]
4425 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4426 ::fidl_next::munge! {
4427 let Self {
4428 id,
4429 receiver,
4430
4431 } = &mut *out_;
4432 }
4433
4434 ::fidl_next::Wire::zero_padding(id);
4435
4436 ::fidl_next::Wire::zero_padding(receiver);
4437
4438 unsafe {
4439 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4440 }
4441 }
4442 }
4443
4444 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreConnectorCreateRequest
4445 where
4446 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4447 ___D: ::fidl_next::fuchsia::HandleDecoder,
4448 {
4449 fn decode(
4450 slot_: ::fidl_next::Slot<'_, Self>,
4451 decoder_: &mut ___D,
4452 _: (),
4453 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4454 if slot_.as_bytes()[12..16] != [0u8; 4] {
4455 return Err(::fidl_next::DecodeError::InvalidPadding);
4456 }
4457
4458 ::fidl_next::munge! {
4459 let Self {
4460 mut id,
4461 mut receiver,
4462
4463 } = slot_;
4464 }
4465
4466 let _field = id.as_mut();
4467
4468 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4469
4470 let _field = receiver.as_mut();
4471
4472 ::fidl_next::Decode::decode(receiver.as_mut(), decoder_, ())?;
4473
4474 Ok(())
4475 }
4476 }
4477
4478 impl ::fidl_next::IntoNatural for CapabilityStoreConnectorCreateRequest {
4479 type Natural = crate::natural::CapabilityStoreConnectorCreateRequest;
4480 }
4481
4482 #[derive(Debug)]
4484 #[repr(C)]
4485 pub struct CapabilityStoreConnectorOpenRequest {
4486 pub id: ::fidl_next::wire::Uint64,
4487
4488 pub server_end: ::fidl_next::wire::fuchsia::Channel,
4489 }
4490
4491 static_assertions::const_assert_eq!(
4492 std::mem::size_of::<CapabilityStoreConnectorOpenRequest>(),
4493 16
4494 );
4495 static_assertions::const_assert_eq!(
4496 std::mem::align_of::<CapabilityStoreConnectorOpenRequest>(),
4497 8
4498 );
4499
4500 static_assertions::const_assert_eq!(
4501 std::mem::offset_of!(CapabilityStoreConnectorOpenRequest, id),
4502 0
4503 );
4504
4505 static_assertions::const_assert_eq!(
4506 std::mem::offset_of!(CapabilityStoreConnectorOpenRequest, server_end),
4507 8
4508 );
4509
4510 impl ::fidl_next::Constrained for CapabilityStoreConnectorOpenRequest {
4511 type Constraint = ();
4512
4513 fn validate(
4514 _: ::fidl_next::Slot<'_, Self>,
4515 _: Self::Constraint,
4516 ) -> Result<(), ::fidl_next::ValidationError> {
4517 Ok(())
4518 }
4519 }
4520
4521 unsafe impl ::fidl_next::Wire for CapabilityStoreConnectorOpenRequest {
4522 type Narrowed<'de> = CapabilityStoreConnectorOpenRequest;
4523
4524 #[inline]
4525 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4526 ::fidl_next::munge! {
4527 let Self {
4528 id,
4529 server_end,
4530
4531 } = &mut *out_;
4532 }
4533
4534 ::fidl_next::Wire::zero_padding(id);
4535
4536 ::fidl_next::Wire::zero_padding(server_end);
4537
4538 unsafe {
4539 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4540 }
4541 }
4542 }
4543
4544 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreConnectorOpenRequest
4545 where
4546 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4547 ___D: ::fidl_next::fuchsia::HandleDecoder,
4548 {
4549 fn decode(
4550 slot_: ::fidl_next::Slot<'_, Self>,
4551 decoder_: &mut ___D,
4552 _: (),
4553 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4554 if slot_.as_bytes()[12..16] != [0u8; 4] {
4555 return Err(::fidl_next::DecodeError::InvalidPadding);
4556 }
4557
4558 ::fidl_next::munge! {
4559 let Self {
4560 mut id,
4561 mut server_end,
4562
4563 } = slot_;
4564 }
4565
4566 let _field = id.as_mut();
4567
4568 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4569
4570 let _field = server_end.as_mut();
4571
4572 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
4573
4574 Ok(())
4575 }
4576 }
4577
4578 impl ::fidl_next::IntoNatural for CapabilityStoreConnectorOpenRequest {
4579 type Natural = crate::natural::CapabilityStoreConnectorOpenRequest;
4580 }
4581
4582 #[derive(Debug)]
4584 #[repr(C)]
4585 pub struct CapabilityStoreDirConnectorCreateRequest {
4586 pub id: ::fidl_next::wire::Uint64,
4587
4588 pub receiver:
4589 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
4590 }
4591
4592 static_assertions::const_assert_eq!(
4593 std::mem::size_of::<CapabilityStoreDirConnectorCreateRequest>(),
4594 16
4595 );
4596 static_assertions::const_assert_eq!(
4597 std::mem::align_of::<CapabilityStoreDirConnectorCreateRequest>(),
4598 8
4599 );
4600
4601 static_assertions::const_assert_eq!(
4602 std::mem::offset_of!(CapabilityStoreDirConnectorCreateRequest, id),
4603 0
4604 );
4605
4606 static_assertions::const_assert_eq!(
4607 std::mem::offset_of!(CapabilityStoreDirConnectorCreateRequest, receiver),
4608 8
4609 );
4610
4611 impl ::fidl_next::Constrained for CapabilityStoreDirConnectorCreateRequest {
4612 type Constraint = ();
4613
4614 fn validate(
4615 _: ::fidl_next::Slot<'_, Self>,
4616 _: Self::Constraint,
4617 ) -> Result<(), ::fidl_next::ValidationError> {
4618 Ok(())
4619 }
4620 }
4621
4622 unsafe impl ::fidl_next::Wire for CapabilityStoreDirConnectorCreateRequest {
4623 type Narrowed<'de> = CapabilityStoreDirConnectorCreateRequest;
4624
4625 #[inline]
4626 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4627 ::fidl_next::munge! {
4628 let Self {
4629 id,
4630 receiver,
4631
4632 } = &mut *out_;
4633 }
4634
4635 ::fidl_next::Wire::zero_padding(id);
4636
4637 ::fidl_next::Wire::zero_padding(receiver);
4638
4639 unsafe {
4640 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4641 }
4642 }
4643 }
4644
4645 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDirConnectorCreateRequest
4646 where
4647 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4648 ___D: ::fidl_next::fuchsia::HandleDecoder,
4649 {
4650 fn decode(
4651 slot_: ::fidl_next::Slot<'_, Self>,
4652 decoder_: &mut ___D,
4653 _: (),
4654 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4655 if slot_.as_bytes()[12..16] != [0u8; 4] {
4656 return Err(::fidl_next::DecodeError::InvalidPadding);
4657 }
4658
4659 ::fidl_next::munge! {
4660 let Self {
4661 mut id,
4662 mut receiver,
4663
4664 } = slot_;
4665 }
4666
4667 let _field = id.as_mut();
4668
4669 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4670
4671 let _field = receiver.as_mut();
4672
4673 ::fidl_next::Decode::decode(receiver.as_mut(), decoder_, ())?;
4674
4675 Ok(())
4676 }
4677 }
4678
4679 impl ::fidl_next::IntoNatural for CapabilityStoreDirConnectorCreateRequest {
4680 type Natural = crate::natural::CapabilityStoreDirConnectorCreateRequest;
4681 }
4682
4683 #[derive(Debug)]
4685 #[repr(C)]
4686 pub struct CapabilityStoreDictionaryLegacyImportRequest {
4687 pub id: ::fidl_next::wire::Uint64,
4688
4689 pub client_end: ::fidl_next::wire::fuchsia::Channel,
4690 }
4691
4692 static_assertions::const_assert_eq!(
4693 std::mem::size_of::<CapabilityStoreDictionaryLegacyImportRequest>(),
4694 16
4695 );
4696 static_assertions::const_assert_eq!(
4697 std::mem::align_of::<CapabilityStoreDictionaryLegacyImportRequest>(),
4698 8
4699 );
4700
4701 static_assertions::const_assert_eq!(
4702 std::mem::offset_of!(CapabilityStoreDictionaryLegacyImportRequest, id),
4703 0
4704 );
4705
4706 static_assertions::const_assert_eq!(
4707 std::mem::offset_of!(CapabilityStoreDictionaryLegacyImportRequest, client_end),
4708 8
4709 );
4710
4711 impl ::fidl_next::Constrained for CapabilityStoreDictionaryLegacyImportRequest {
4712 type Constraint = ();
4713
4714 fn validate(
4715 _: ::fidl_next::Slot<'_, Self>,
4716 _: Self::Constraint,
4717 ) -> Result<(), ::fidl_next::ValidationError> {
4718 Ok(())
4719 }
4720 }
4721
4722 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryLegacyImportRequest {
4723 type Narrowed<'de> = CapabilityStoreDictionaryLegacyImportRequest;
4724
4725 #[inline]
4726 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4727 ::fidl_next::munge! {
4728 let Self {
4729 id,
4730 client_end,
4731
4732 } = &mut *out_;
4733 }
4734
4735 ::fidl_next::Wire::zero_padding(id);
4736
4737 ::fidl_next::Wire::zero_padding(client_end);
4738
4739 unsafe {
4740 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4741 }
4742 }
4743 }
4744
4745 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryLegacyImportRequest
4746 where
4747 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4748 ___D: ::fidl_next::fuchsia::HandleDecoder,
4749 {
4750 fn decode(
4751 slot_: ::fidl_next::Slot<'_, Self>,
4752 decoder_: &mut ___D,
4753 _: (),
4754 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4755 if slot_.as_bytes()[12..16] != [0u8; 4] {
4756 return Err(::fidl_next::DecodeError::InvalidPadding);
4757 }
4758
4759 ::fidl_next::munge! {
4760 let Self {
4761 mut id,
4762 mut client_end,
4763
4764 } = slot_;
4765 }
4766
4767 let _field = id.as_mut();
4768
4769 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4770
4771 let _field = client_end.as_mut();
4772
4773 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
4774
4775 Ok(())
4776 }
4777 }
4778
4779 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryLegacyImportRequest {
4780 type Natural = crate::natural::CapabilityStoreDictionaryLegacyImportRequest;
4781 }
4782
4783 #[derive(Debug)]
4785 #[repr(C)]
4786 pub struct CapabilityStoreDictionaryLegacyExportRequest {
4787 pub id: ::fidl_next::wire::Uint64,
4788
4789 pub server_end: ::fidl_next::wire::fuchsia::Channel,
4790 }
4791
4792 static_assertions::const_assert_eq!(
4793 std::mem::size_of::<CapabilityStoreDictionaryLegacyExportRequest>(),
4794 16
4795 );
4796 static_assertions::const_assert_eq!(
4797 std::mem::align_of::<CapabilityStoreDictionaryLegacyExportRequest>(),
4798 8
4799 );
4800
4801 static_assertions::const_assert_eq!(
4802 std::mem::offset_of!(CapabilityStoreDictionaryLegacyExportRequest, id),
4803 0
4804 );
4805
4806 static_assertions::const_assert_eq!(
4807 std::mem::offset_of!(CapabilityStoreDictionaryLegacyExportRequest, server_end),
4808 8
4809 );
4810
4811 impl ::fidl_next::Constrained for CapabilityStoreDictionaryLegacyExportRequest {
4812 type Constraint = ();
4813
4814 fn validate(
4815 _: ::fidl_next::Slot<'_, Self>,
4816 _: Self::Constraint,
4817 ) -> Result<(), ::fidl_next::ValidationError> {
4818 Ok(())
4819 }
4820 }
4821
4822 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryLegacyExportRequest {
4823 type Narrowed<'de> = CapabilityStoreDictionaryLegacyExportRequest;
4824
4825 #[inline]
4826 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4827 ::fidl_next::munge! {
4828 let Self {
4829 id,
4830 server_end,
4831
4832 } = &mut *out_;
4833 }
4834
4835 ::fidl_next::Wire::zero_padding(id);
4836
4837 ::fidl_next::Wire::zero_padding(server_end);
4838
4839 unsafe {
4840 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4841 }
4842 }
4843 }
4844
4845 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryLegacyExportRequest
4846 where
4847 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4848 ___D: ::fidl_next::fuchsia::HandleDecoder,
4849 {
4850 fn decode(
4851 slot_: ::fidl_next::Slot<'_, Self>,
4852 decoder_: &mut ___D,
4853 _: (),
4854 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4855 if slot_.as_bytes()[12..16] != [0u8; 4] {
4856 return Err(::fidl_next::DecodeError::InvalidPadding);
4857 }
4858
4859 ::fidl_next::munge! {
4860 let Self {
4861 mut id,
4862 mut server_end,
4863
4864 } = slot_;
4865 }
4866
4867 let _field = id.as_mut();
4868
4869 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4870
4871 let _field = server_end.as_mut();
4872
4873 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
4874
4875 Ok(())
4876 }
4877 }
4878
4879 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryLegacyExportRequest {
4880 type Natural = crate::natural::CapabilityStoreDictionaryLegacyExportRequest;
4881 }
4882
4883 #[derive(Debug)]
4885 #[repr(C)]
4886 pub struct CapabilityStoreDictionaryKeysRequest {
4887 pub id: ::fidl_next::wire::Uint64,
4888
4889 pub iterator: ::fidl_next::ServerEnd<
4890 crate::DictionaryKeysIterator,
4891 ::fidl_next::wire::fuchsia::Channel,
4892 >,
4893 }
4894
4895 static_assertions::const_assert_eq!(
4896 std::mem::size_of::<CapabilityStoreDictionaryKeysRequest>(),
4897 16
4898 );
4899 static_assertions::const_assert_eq!(
4900 std::mem::align_of::<CapabilityStoreDictionaryKeysRequest>(),
4901 8
4902 );
4903
4904 static_assertions::const_assert_eq!(
4905 std::mem::offset_of!(CapabilityStoreDictionaryKeysRequest, id),
4906 0
4907 );
4908
4909 static_assertions::const_assert_eq!(
4910 std::mem::offset_of!(CapabilityStoreDictionaryKeysRequest, iterator),
4911 8
4912 );
4913
4914 impl ::fidl_next::Constrained for CapabilityStoreDictionaryKeysRequest {
4915 type Constraint = ();
4916
4917 fn validate(
4918 _: ::fidl_next::Slot<'_, Self>,
4919 _: Self::Constraint,
4920 ) -> Result<(), ::fidl_next::ValidationError> {
4921 Ok(())
4922 }
4923 }
4924
4925 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryKeysRequest {
4926 type Narrowed<'de> = CapabilityStoreDictionaryKeysRequest;
4927
4928 #[inline]
4929 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4930 ::fidl_next::munge! {
4931 let Self {
4932 id,
4933 iterator,
4934
4935 } = &mut *out_;
4936 }
4937
4938 ::fidl_next::Wire::zero_padding(id);
4939
4940 ::fidl_next::Wire::zero_padding(iterator);
4941
4942 unsafe {
4943 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4944 }
4945 }
4946 }
4947
4948 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryKeysRequest
4949 where
4950 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4951 ___D: ::fidl_next::fuchsia::HandleDecoder,
4952 {
4953 fn decode(
4954 slot_: ::fidl_next::Slot<'_, Self>,
4955 decoder_: &mut ___D,
4956 _: (),
4957 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4958 if slot_.as_bytes()[12..16] != [0u8; 4] {
4959 return Err(::fidl_next::DecodeError::InvalidPadding);
4960 }
4961
4962 ::fidl_next::munge! {
4963 let Self {
4964 mut id,
4965 mut iterator,
4966
4967 } = slot_;
4968 }
4969
4970 let _field = id.as_mut();
4971
4972 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4973
4974 let _field = iterator.as_mut();
4975
4976 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
4977
4978 Ok(())
4979 }
4980 }
4981
4982 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryKeysRequest {
4983 type Natural = crate::natural::CapabilityStoreDictionaryKeysRequest;
4984 }
4985
4986 #[derive(Debug)]
4988 #[repr(C)]
4989 pub struct CapabilityStoreDictionaryEnumerateRequest {
4990 pub id: ::fidl_next::wire::Uint64,
4991
4992 pub iterator: ::fidl_next::ServerEnd<
4993 crate::DictionaryEnumerateIterator,
4994 ::fidl_next::wire::fuchsia::Channel,
4995 >,
4996 }
4997
4998 static_assertions::const_assert_eq!(
4999 std::mem::size_of::<CapabilityStoreDictionaryEnumerateRequest>(),
5000 16
5001 );
5002 static_assertions::const_assert_eq!(
5003 std::mem::align_of::<CapabilityStoreDictionaryEnumerateRequest>(),
5004 8
5005 );
5006
5007 static_assertions::const_assert_eq!(
5008 std::mem::offset_of!(CapabilityStoreDictionaryEnumerateRequest, id),
5009 0
5010 );
5011
5012 static_assertions::const_assert_eq!(
5013 std::mem::offset_of!(CapabilityStoreDictionaryEnumerateRequest, iterator),
5014 8
5015 );
5016
5017 impl ::fidl_next::Constrained for CapabilityStoreDictionaryEnumerateRequest {
5018 type Constraint = ();
5019
5020 fn validate(
5021 _: ::fidl_next::Slot<'_, Self>,
5022 _: Self::Constraint,
5023 ) -> Result<(), ::fidl_next::ValidationError> {
5024 Ok(())
5025 }
5026 }
5027
5028 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryEnumerateRequest {
5029 type Narrowed<'de> = CapabilityStoreDictionaryEnumerateRequest;
5030
5031 #[inline]
5032 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5033 ::fidl_next::munge! {
5034 let Self {
5035 id,
5036 iterator,
5037
5038 } = &mut *out_;
5039 }
5040
5041 ::fidl_next::Wire::zero_padding(id);
5042
5043 ::fidl_next::Wire::zero_padding(iterator);
5044
5045 unsafe {
5046 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5047 }
5048 }
5049 }
5050
5051 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryEnumerateRequest
5052 where
5053 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5054 ___D: ::fidl_next::fuchsia::HandleDecoder,
5055 {
5056 fn decode(
5057 slot_: ::fidl_next::Slot<'_, Self>,
5058 decoder_: &mut ___D,
5059 _: (),
5060 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5061 if slot_.as_bytes()[12..16] != [0u8; 4] {
5062 return Err(::fidl_next::DecodeError::InvalidPadding);
5063 }
5064
5065 ::fidl_next::munge! {
5066 let Self {
5067 mut id,
5068 mut iterator,
5069
5070 } = slot_;
5071 }
5072
5073 let _field = id.as_mut();
5074
5075 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5076
5077 let _field = iterator.as_mut();
5078
5079 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5080
5081 Ok(())
5082 }
5083 }
5084
5085 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryEnumerateRequest {
5086 type Natural = crate::natural::CapabilityStoreDictionaryEnumerateRequest;
5087 }
5088
5089 #[derive(Debug)]
5091 #[repr(C)]
5092 pub struct CapabilityStoreDictionaryDrainRequest {
5093 pub id: ::fidl_next::wire::Uint64,
5094
5095 pub iterator: ::fidl_next::ServerEnd<
5096 crate::DictionaryDrainIterator,
5097 ::fidl_next::wire::fuchsia::OptionalChannel,
5098 >,
5099 }
5100
5101 static_assertions::const_assert_eq!(
5102 std::mem::size_of::<CapabilityStoreDictionaryDrainRequest>(),
5103 16
5104 );
5105 static_assertions::const_assert_eq!(
5106 std::mem::align_of::<CapabilityStoreDictionaryDrainRequest>(),
5107 8
5108 );
5109
5110 static_assertions::const_assert_eq!(
5111 std::mem::offset_of!(CapabilityStoreDictionaryDrainRequest, id),
5112 0
5113 );
5114
5115 static_assertions::const_assert_eq!(
5116 std::mem::offset_of!(CapabilityStoreDictionaryDrainRequest, iterator),
5117 8
5118 );
5119
5120 impl ::fidl_next::Constrained for CapabilityStoreDictionaryDrainRequest {
5121 type Constraint = ();
5122
5123 fn validate(
5124 _: ::fidl_next::Slot<'_, Self>,
5125 _: Self::Constraint,
5126 ) -> Result<(), ::fidl_next::ValidationError> {
5127 Ok(())
5128 }
5129 }
5130
5131 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryDrainRequest {
5132 type Narrowed<'de> = CapabilityStoreDictionaryDrainRequest;
5133
5134 #[inline]
5135 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5136 ::fidl_next::munge! {
5137 let Self {
5138 id,
5139 iterator,
5140
5141 } = &mut *out_;
5142 }
5143
5144 ::fidl_next::Wire::zero_padding(id);
5145
5146 ::fidl_next::Wire::zero_padding(iterator);
5147
5148 unsafe {
5149 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5150 }
5151 }
5152 }
5153
5154 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryDrainRequest
5155 where
5156 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5157 ___D: ::fidl_next::fuchsia::HandleDecoder,
5158 {
5159 fn decode(
5160 slot_: ::fidl_next::Slot<'_, Self>,
5161 decoder_: &mut ___D,
5162 _: (),
5163 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5164 if slot_.as_bytes()[12..16] != [0u8; 4] {
5165 return Err(::fidl_next::DecodeError::InvalidPadding);
5166 }
5167
5168 ::fidl_next::munge! {
5169 let Self {
5170 mut id,
5171 mut iterator,
5172
5173 } = slot_;
5174 }
5175
5176 let _field = id.as_mut();
5177
5178 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5179
5180 let _field = iterator.as_mut();
5181
5182 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5183
5184 Ok(())
5185 }
5186 }
5187
5188 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryDrainRequest {
5189 type Natural = crate::natural::CapabilityStoreDictionaryDrainRequest;
5190 }
5191
5192 #[derive(Debug)]
5194 #[repr(C)]
5195 pub struct CapabilityStoreCreateServiceAggregateRequest<'de> {
5196 pub sources: ::fidl_next::wire::Vector<'de, crate::wire::AggregateSource<'de>>,
5197 }
5198
5199 static_assertions::const_assert_eq!(
5200 std::mem::size_of::<CapabilityStoreCreateServiceAggregateRequest<'_>>(),
5201 16
5202 );
5203 static_assertions::const_assert_eq!(
5204 std::mem::align_of::<CapabilityStoreCreateServiceAggregateRequest<'_>>(),
5205 8
5206 );
5207
5208 static_assertions::const_assert_eq!(
5209 std::mem::offset_of!(CapabilityStoreCreateServiceAggregateRequest<'_>, sources),
5210 0
5211 );
5212
5213 impl ::fidl_next::Constrained for CapabilityStoreCreateServiceAggregateRequest<'_> {
5214 type Constraint = ();
5215
5216 fn validate(
5217 _: ::fidl_next::Slot<'_, Self>,
5218 _: Self::Constraint,
5219 ) -> Result<(), ::fidl_next::ValidationError> {
5220 Ok(())
5221 }
5222 }
5223
5224 unsafe impl ::fidl_next::Wire for CapabilityStoreCreateServiceAggregateRequest<'static> {
5225 type Narrowed<'de> = CapabilityStoreCreateServiceAggregateRequest<'de>;
5226
5227 #[inline]
5228 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5229 ::fidl_next::munge! {
5230 let Self {
5231 sources,
5232
5233 } = &mut *out_;
5234 }
5235
5236 ::fidl_next::Wire::zero_padding(sources);
5237 }
5238 }
5239
5240 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
5241 for CapabilityStoreCreateServiceAggregateRequest<'de>
5242 where
5243 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5244 ___D: ::fidl_next::Decoder<'de>,
5245 ___D: ::fidl_next::fuchsia::HandleDecoder,
5246 {
5247 fn decode(
5248 slot_: ::fidl_next::Slot<'_, Self>,
5249 decoder_: &mut ___D,
5250 _: (),
5251 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5252 ::fidl_next::munge! {
5253 let Self {
5254 mut sources,
5255
5256 } = slot_;
5257 }
5258
5259 let _field = sources.as_mut();
5260 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5261 ::fidl_next::Decode::decode(sources.as_mut(), decoder_, (4294967295, ()))?;
5262
5263 Ok(())
5264 }
5265 }
5266
5267 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreCreateServiceAggregateRequest<'de> {
5268 type Natural = crate::natural::CapabilityStoreCreateServiceAggregateRequest;
5269 }
5270
5271 #[derive(Debug)]
5273 #[repr(C)]
5274 pub struct CapabilityStoreCreateServiceAggregateResponse {
5275 pub aggregate_dir_connector: crate::wire::DirConnector,
5276 }
5277
5278 static_assertions::const_assert_eq!(
5279 std::mem::size_of::<CapabilityStoreCreateServiceAggregateResponse>(),
5280 4
5281 );
5282 static_assertions::const_assert_eq!(
5283 std::mem::align_of::<CapabilityStoreCreateServiceAggregateResponse>(),
5284 4
5285 );
5286
5287 static_assertions::const_assert_eq!(
5288 std::mem::offset_of!(
5289 CapabilityStoreCreateServiceAggregateResponse,
5290 aggregate_dir_connector
5291 ),
5292 0
5293 );
5294
5295 impl ::fidl_next::Constrained for CapabilityStoreCreateServiceAggregateResponse {
5296 type Constraint = ();
5297
5298 fn validate(
5299 _: ::fidl_next::Slot<'_, Self>,
5300 _: Self::Constraint,
5301 ) -> Result<(), ::fidl_next::ValidationError> {
5302 Ok(())
5303 }
5304 }
5305
5306 unsafe impl ::fidl_next::Wire for CapabilityStoreCreateServiceAggregateResponse {
5307 type Narrowed<'de> = CapabilityStoreCreateServiceAggregateResponse;
5308
5309 #[inline]
5310 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5311 ::fidl_next::munge! {
5312 let Self {
5313 aggregate_dir_connector,
5314
5315 } = &mut *out_;
5316 }
5317
5318 ::fidl_next::Wire::zero_padding(aggregate_dir_connector);
5319 }
5320 }
5321
5322 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreCreateServiceAggregateResponse
5323 where
5324 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5325 ___D: ::fidl_next::fuchsia::HandleDecoder,
5326 {
5327 fn decode(
5328 slot_: ::fidl_next::Slot<'_, Self>,
5329 decoder_: &mut ___D,
5330 _: (),
5331 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5332 ::fidl_next::munge! {
5333 let Self {
5334 mut aggregate_dir_connector,
5335
5336 } = slot_;
5337 }
5338
5339 let _field = aggregate_dir_connector.as_mut();
5340
5341 ::fidl_next::Decode::decode(aggregate_dir_connector.as_mut(), decoder_, ())?;
5342
5343 Ok(())
5344 }
5345 }
5346
5347 impl ::fidl_next::IntoNatural for CapabilityStoreCreateServiceAggregateResponse {
5348 type Natural = crate::natural::CapabilityStoreCreateServiceAggregateResponse;
5349 }
5350
5351 #[derive(Debug)]
5353 #[repr(C)]
5354 pub struct CapabilityStoreExportResponse<'de> {
5355 pub capability: crate::wire::Capability<'de>,
5356 }
5357
5358 static_assertions::const_assert_eq!(
5359 std::mem::size_of::<CapabilityStoreExportResponse<'_>>(),
5360 16
5361 );
5362 static_assertions::const_assert_eq!(
5363 std::mem::align_of::<CapabilityStoreExportResponse<'_>>(),
5364 8
5365 );
5366
5367 static_assertions::const_assert_eq!(
5368 std::mem::offset_of!(CapabilityStoreExportResponse<'_>, capability),
5369 0
5370 );
5371
5372 impl ::fidl_next::Constrained for CapabilityStoreExportResponse<'_> {
5373 type Constraint = ();
5374
5375 fn validate(
5376 _: ::fidl_next::Slot<'_, Self>,
5377 _: Self::Constraint,
5378 ) -> Result<(), ::fidl_next::ValidationError> {
5379 Ok(())
5380 }
5381 }
5382
5383 unsafe impl ::fidl_next::Wire for CapabilityStoreExportResponse<'static> {
5384 type Narrowed<'de> = CapabilityStoreExportResponse<'de>;
5385
5386 #[inline]
5387 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5388 ::fidl_next::munge! {
5389 let Self {
5390 capability,
5391
5392 } = &mut *out_;
5393 }
5394
5395 ::fidl_next::Wire::zero_padding(capability);
5396 }
5397 }
5398
5399 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreExportResponse<'de>
5400 where
5401 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5402 ___D: ::fidl_next::Decoder<'de>,
5403 ___D: ::fidl_next::fuchsia::HandleDecoder,
5404 {
5405 fn decode(
5406 slot_: ::fidl_next::Slot<'_, Self>,
5407 decoder_: &mut ___D,
5408 _: (),
5409 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5410 ::fidl_next::munge! {
5411 let Self {
5412 mut capability,
5413
5414 } = slot_;
5415 }
5416
5417 let _field = capability.as_mut();
5418
5419 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5420
5421 Ok(())
5422 }
5423 }
5424
5425 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreExportResponse<'de> {
5426 type Natural = crate::natural::CapabilityStoreExportResponse;
5427 }
5428
5429 #[derive(Debug)]
5431 #[repr(C)]
5432 pub struct CapabilityStoreImportRequest<'de> {
5433 pub id: ::fidl_next::wire::Uint64,
5434
5435 pub capability: crate::wire::Capability<'de>,
5436 }
5437
5438 static_assertions::const_assert_eq!(
5439 std::mem::size_of::<CapabilityStoreImportRequest<'_>>(),
5440 24
5441 );
5442 static_assertions::const_assert_eq!(
5443 std::mem::align_of::<CapabilityStoreImportRequest<'_>>(),
5444 8
5445 );
5446
5447 static_assertions::const_assert_eq!(
5448 std::mem::offset_of!(CapabilityStoreImportRequest<'_>, id),
5449 0
5450 );
5451
5452 static_assertions::const_assert_eq!(
5453 std::mem::offset_of!(CapabilityStoreImportRequest<'_>, capability),
5454 8
5455 );
5456
5457 impl ::fidl_next::Constrained for CapabilityStoreImportRequest<'_> {
5458 type Constraint = ();
5459
5460 fn validate(
5461 _: ::fidl_next::Slot<'_, Self>,
5462 _: Self::Constraint,
5463 ) -> Result<(), ::fidl_next::ValidationError> {
5464 Ok(())
5465 }
5466 }
5467
5468 unsafe impl ::fidl_next::Wire for CapabilityStoreImportRequest<'static> {
5469 type Narrowed<'de> = CapabilityStoreImportRequest<'de>;
5470
5471 #[inline]
5472 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5473 ::fidl_next::munge! {
5474 let Self {
5475 id,
5476 capability,
5477
5478 } = &mut *out_;
5479 }
5480
5481 ::fidl_next::Wire::zero_padding(id);
5482
5483 ::fidl_next::Wire::zero_padding(capability);
5484 }
5485 }
5486
5487 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreImportRequest<'de>
5488 where
5489 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5490 ___D: ::fidl_next::Decoder<'de>,
5491 ___D: ::fidl_next::fuchsia::HandleDecoder,
5492 {
5493 fn decode(
5494 slot_: ::fidl_next::Slot<'_, Self>,
5495 decoder_: &mut ___D,
5496 _: (),
5497 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5498 ::fidl_next::munge! {
5499 let Self {
5500 mut id,
5501 mut capability,
5502
5503 } = slot_;
5504 }
5505
5506 let _field = id.as_mut();
5507
5508 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5509
5510 let _field = capability.as_mut();
5511
5512 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5513
5514 Ok(())
5515 }
5516 }
5517
5518 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreImportRequest<'de> {
5519 type Natural = crate::natural::CapabilityStoreImportRequest;
5520 }
5521
5522 #[repr(C)]
5524 pub struct CapabilityStoreDirConnectorOpenRequest<'de> {
5525 pub(crate) table: ::fidl_next::wire::Table<'de>,
5526 }
5527
5528 impl<'de> Drop for CapabilityStoreDirConnectorOpenRequest<'de> {
5529 fn drop(&mut self) {
5530 let _ = self
5531 .table
5532 .get(1)
5533 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
5534
5535 let _ = self.table.get(2).map(|envelope| unsafe {
5536 envelope.read_unchecked::<::fidl_next::ServerEnd<
5537 ::fidl_next_fuchsia_io::Directory,
5538 ::fidl_next::wire::fuchsia::Channel,
5539 >>()
5540 });
5541
5542 let _ = self.table.get(3).map(|envelope| unsafe {
5543 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
5544 });
5545
5546 let _ = self.table.get(4).map(|envelope| unsafe {
5547 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
5548 });
5549 }
5550 }
5551
5552 impl ::fidl_next::Constrained for CapabilityStoreDirConnectorOpenRequest<'_> {
5553 type Constraint = ();
5554
5555 fn validate(
5556 _: ::fidl_next::Slot<'_, Self>,
5557 _: Self::Constraint,
5558 ) -> Result<(), ::fidl_next::ValidationError> {
5559 Ok(())
5560 }
5561 }
5562
5563 unsafe impl ::fidl_next::Wire for CapabilityStoreDirConnectorOpenRequest<'static> {
5564 type Narrowed<'de> = CapabilityStoreDirConnectorOpenRequest<'de>;
5565
5566 #[inline]
5567 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5568 ::fidl_next::munge!(let Self { table } = out);
5569 ::fidl_next::wire::Table::zero_padding(table);
5570 }
5571 }
5572
5573 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreDirConnectorOpenRequest<'de>
5574 where
5575 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5576 ___D: ::fidl_next::fuchsia::HandleDecoder,
5577 {
5578 fn decode(
5579 slot: ::fidl_next::Slot<'_, Self>,
5580 decoder: &mut ___D,
5581 _: (),
5582 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5583 ::fidl_next::munge!(let Self { table } = slot);
5584
5585 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5586 match ordinal {
5587 0 => unsafe { ::core::hint::unreachable_unchecked() },
5588
5589 1 => {
5590 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
5591 slot.as_mut(),
5592 decoder,
5593 (),
5594 )?;
5595
5596 Ok(())
5597 }
5598
5599 2 => {
5600 ::fidl_next::wire::Envelope::decode_as::<
5601 ___D,
5602 ::fidl_next::ServerEnd<
5603 ::fidl_next_fuchsia_io::Directory,
5604 ::fidl_next::wire::fuchsia::Channel,
5605 >,
5606 >(slot.as_mut(), decoder, ())?;
5607
5608 Ok(())
5609 }
5610
5611 3 => {
5612 ::fidl_next::wire::Envelope::decode_as::<
5613 ___D,
5614 ::fidl_next_fuchsia_io::wire::Flags,
5615 >(slot.as_mut(), decoder, ())?;
5616
5617 Ok(())
5618 }
5619
5620 4 => {
5621 ::fidl_next::wire::Envelope::decode_as::<
5622 ___D,
5623 ::fidl_next::wire::String<'de>,
5624 >(slot.as_mut(), decoder, 4095)?;
5625
5626 let value = unsafe {
5627 slot.deref_unchecked()
5628 .deref_unchecked::<::fidl_next::wire::String<'_>>()
5629 };
5630
5631 if value.len() > 4095 {
5632 return Err(::fidl_next::DecodeError::VectorTooLong {
5633 size: value.len() as u64,
5634 limit: 4095,
5635 });
5636 }
5637
5638 Ok(())
5639 }
5640
5641 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5642 }
5643 })
5644 }
5645 }
5646
5647 impl<'de> CapabilityStoreDirConnectorOpenRequest<'de> {
5648 pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
5649 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5650 }
5651
5652 pub fn server_end(
5653 &self,
5654 ) -> ::core::option::Option<
5655 &::fidl_next::ServerEnd<
5656 ::fidl_next_fuchsia_io::Directory,
5657 ::fidl_next::wire::fuchsia::Channel,
5658 >,
5659 > {
5660 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5661 }
5662
5663 pub fn flags(&self) -> ::core::option::Option<&::fidl_next_fuchsia_io::wire::Flags> {
5664 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5665 }
5666
5667 pub fn path(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
5668 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
5669 }
5670 }
5671
5672 impl<'de> ::core::fmt::Debug for CapabilityStoreDirConnectorOpenRequest<'de> {
5673 fn fmt(
5674 &self,
5675 f: &mut ::core::fmt::Formatter<'_>,
5676 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5677 f.debug_struct("CapabilityStoreDirConnectorOpenRequest")
5678 .field("id", &self.id())
5679 .field("server_end", &self.server_end())
5680 .field("flags", &self.flags())
5681 .field("path", &self.path())
5682 .finish()
5683 }
5684 }
5685
5686 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreDirConnectorOpenRequest<'de> {
5687 type Natural = crate::natural::CapabilityStoreDirConnectorOpenRequest;
5688 }
5689
5690 #[derive(Debug)]
5692 #[repr(C)]
5693 pub struct InstanceToken {
5694 pub token: ::fidl_next::wire::fuchsia::EventPair,
5695 }
5696
5697 static_assertions::const_assert_eq!(std::mem::size_of::<InstanceToken>(), 4);
5698 static_assertions::const_assert_eq!(std::mem::align_of::<InstanceToken>(), 4);
5699
5700 static_assertions::const_assert_eq!(std::mem::offset_of!(InstanceToken, token), 0);
5701
5702 impl ::fidl_next::Constrained for InstanceToken {
5703 type Constraint = ();
5704
5705 fn validate(
5706 _: ::fidl_next::Slot<'_, Self>,
5707 _: Self::Constraint,
5708 ) -> Result<(), ::fidl_next::ValidationError> {
5709 Ok(())
5710 }
5711 }
5712
5713 unsafe impl ::fidl_next::Wire for InstanceToken {
5714 type Narrowed<'de> = InstanceToken;
5715
5716 #[inline]
5717 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5718 ::fidl_next::munge! {
5719 let Self {
5720 token,
5721
5722 } = &mut *out_;
5723 }
5724
5725 ::fidl_next::Wire::zero_padding(token);
5726 }
5727 }
5728
5729 unsafe impl<___D> ::fidl_next::Decode<___D> for InstanceToken
5730 where
5731 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5732 ___D: ::fidl_next::fuchsia::HandleDecoder,
5733 {
5734 fn decode(
5735 slot_: ::fidl_next::Slot<'_, Self>,
5736 decoder_: &mut ___D,
5737 _: (),
5738 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5739 ::fidl_next::munge! {
5740 let Self {
5741 mut token,
5742
5743 } = slot_;
5744 }
5745
5746 let _field = token.as_mut();
5747
5748 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
5749
5750 Ok(())
5751 }
5752 }
5753
5754 impl ::fidl_next::IntoNatural for InstanceToken {
5755 type Natural = crate::natural::InstanceToken;
5756 }
5757
5758 #[repr(C)]
5760 pub struct RouteRequest<'de> {
5761 pub(crate) table: ::fidl_next::wire::Table<'de>,
5762 }
5763
5764 impl<'de> Drop for RouteRequest<'de> {
5765 fn drop(&mut self) {
5766 let _ = self
5767 .table
5768 .get(1)
5769 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::InstanceToken>() });
5770 }
5771 }
5772
5773 impl ::fidl_next::Constrained for RouteRequest<'_> {
5774 type Constraint = ();
5775
5776 fn validate(
5777 _: ::fidl_next::Slot<'_, Self>,
5778 _: Self::Constraint,
5779 ) -> Result<(), ::fidl_next::ValidationError> {
5780 Ok(())
5781 }
5782 }
5783
5784 unsafe impl ::fidl_next::Wire for RouteRequest<'static> {
5785 type Narrowed<'de> = RouteRequest<'de>;
5786
5787 #[inline]
5788 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5789 ::fidl_next::munge!(let Self { table } = out);
5790 ::fidl_next::wire::Table::zero_padding(table);
5791 }
5792 }
5793
5794 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RouteRequest<'de>
5795 where
5796 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5797 ___D: ::fidl_next::fuchsia::HandleDecoder,
5798 {
5799 fn decode(
5800 slot: ::fidl_next::Slot<'_, Self>,
5801 decoder: &mut ___D,
5802 _: (),
5803 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5804 ::fidl_next::munge!(let Self { table } = slot);
5805
5806 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5807 match ordinal {
5808 0 => unsafe { ::core::hint::unreachable_unchecked() },
5809
5810 1 => {
5811 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::InstanceToken>(
5812 slot.as_mut(),
5813 decoder,
5814 (),
5815 )?;
5816
5817 Ok(())
5818 }
5819
5820 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5821 }
5822 })
5823 }
5824 }
5825
5826 impl<'de> RouteRequest<'de> {
5827 pub fn requesting(&self) -> ::core::option::Option<&crate::wire::InstanceToken> {
5828 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5829 }
5830 }
5831
5832 impl<'de> ::core::fmt::Debug for RouteRequest<'de> {
5833 fn fmt(
5834 &self,
5835 f: &mut ::core::fmt::Formatter<'_>,
5836 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5837 f.debug_struct("RouteRequest").field("requesting", &self.requesting()).finish()
5838 }
5839 }
5840
5841 impl<'de> ::fidl_next::IntoNatural for RouteRequest<'de> {
5842 type Natural = crate::natural::RouteRequest;
5843 }
5844
5845 #[repr(transparent)]
5847 pub struct ConnectorRouterRouteResponse {
5848 pub(crate) raw: ::fidl_next::wire::Union,
5849 pub(crate) _phantom: ::core::marker::PhantomData<()>,
5850 }
5851
5852 impl Drop for ConnectorRouterRouteResponse {
5853 fn drop(&mut self) {
5854 match self.raw.ordinal() {
5855 1 => {
5856 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Connector>() };
5857 }
5858
5859 2 => {
5860 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
5861 }
5862
5863 _ => unsafe { ::core::hint::unreachable_unchecked() },
5864 }
5865 }
5866 }
5867
5868 impl ::fidl_next::Constrained for ConnectorRouterRouteResponse {
5869 type Constraint = ();
5870
5871 fn validate(
5872 _: ::fidl_next::Slot<'_, Self>,
5873 _: Self::Constraint,
5874 ) -> Result<(), ::fidl_next::ValidationError> {
5875 Ok(())
5876 }
5877 }
5878
5879 unsafe impl ::fidl_next::Wire for ConnectorRouterRouteResponse {
5880 type Narrowed<'de> = ConnectorRouterRouteResponse;
5881
5882 #[inline]
5883 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5884 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5885 ::fidl_next::wire::Union::zero_padding(raw);
5886 }
5887 }
5888
5889 pub mod connector_router_route_response {
5890 pub enum Ref<'de> {
5891 Connector(&'de crate::wire::Connector),
5892
5893 Unavailable(&'de crate::wire::Unit),
5894 }
5895 }
5896
5897 impl ConnectorRouterRouteResponse {
5898 pub fn as_ref(&self) -> crate::wire::connector_router_route_response::Ref<'_> {
5899 match self.raw.ordinal() {
5900 1 => crate::wire::connector_router_route_response::Ref::Connector(unsafe {
5901 self.raw.get().deref_unchecked::<crate::wire::Connector>()
5902 }),
5903
5904 2 => crate::wire::connector_router_route_response::Ref::Unavailable(unsafe {
5905 self.raw.get().deref_unchecked::<crate::wire::Unit>()
5906 }),
5907
5908 _ => unsafe { ::core::hint::unreachable_unchecked() },
5909 }
5910 }
5911 }
5912
5913 unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorRouterRouteResponse
5914 where
5915 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5916 ___D: ::fidl_next::fuchsia::HandleDecoder,
5917 {
5918 fn decode(
5919 mut slot: ::fidl_next::Slot<'_, Self>,
5920 decoder: &mut ___D,
5921 _: (),
5922 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5923 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5924 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5925 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Connector>(
5926 raw,
5927 decoder,
5928 (),
5929 )?,
5930
5931 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
5932 raw,
5933 decoder,
5934 (),
5935 )?,
5936
5937 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
5938 }
5939
5940 Ok(())
5941 }
5942 }
5943
5944 impl ::core::fmt::Debug for ConnectorRouterRouteResponse {
5945 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5946 match self.raw.ordinal() {
5947 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Connector>().fmt(f) },
5948 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
5949 _ => unsafe { ::core::hint::unreachable_unchecked() },
5950 }
5951 }
5952 }
5953
5954 impl ::fidl_next::IntoNatural for ConnectorRouterRouteResponse {
5955 type Natural = crate::natural::ConnectorRouterRouteResponse;
5956 }
5957
5958 #[repr(transparent)]
5960 pub struct DataRouterRouteResponse<'de> {
5961 pub(crate) raw: ::fidl_next::wire::Union,
5962 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5963 }
5964
5965 impl<'de> Drop for DataRouterRouteResponse<'de> {
5966 fn drop(&mut self) {
5967 match self.raw.ordinal() {
5968 1 => {
5969 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Data<'de>>() };
5970 }
5971
5972 2 => {
5973 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
5974 }
5975
5976 _ => unsafe { ::core::hint::unreachable_unchecked() },
5977 }
5978 }
5979 }
5980
5981 impl ::fidl_next::Constrained for DataRouterRouteResponse<'_> {
5982 type Constraint = ();
5983
5984 fn validate(
5985 _: ::fidl_next::Slot<'_, Self>,
5986 _: Self::Constraint,
5987 ) -> Result<(), ::fidl_next::ValidationError> {
5988 Ok(())
5989 }
5990 }
5991
5992 unsafe impl ::fidl_next::Wire for DataRouterRouteResponse<'static> {
5993 type Narrowed<'de> = DataRouterRouteResponse<'de>;
5994
5995 #[inline]
5996 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5997 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5998 ::fidl_next::wire::Union::zero_padding(raw);
5999 }
6000 }
6001
6002 pub mod data_router_route_response {
6003 pub enum Ref<'de> {
6004 Data(&'de crate::wire::Data<'de>),
6005
6006 Unavailable(&'de crate::wire::Unit),
6007 }
6008 }
6009
6010 impl<'de> DataRouterRouteResponse<'de> {
6011 pub fn as_ref(&self) -> crate::wire::data_router_route_response::Ref<'_> {
6012 match self.raw.ordinal() {
6013 1 => crate::wire::data_router_route_response::Ref::Data(unsafe {
6014 self.raw.get().deref_unchecked::<crate::wire::Data<'_>>()
6015 }),
6016
6017 2 => crate::wire::data_router_route_response::Ref::Unavailable(unsafe {
6018 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6019 }),
6020
6021 _ => unsafe { ::core::hint::unreachable_unchecked() },
6022 }
6023 }
6024 }
6025
6026 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataRouterRouteResponse<'de>
6027 where
6028 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6029 ___D: ::fidl_next::Decoder<'de>,
6030 ___D: ::fidl_next::fuchsia::HandleDecoder,
6031 {
6032 fn decode(
6033 mut slot: ::fidl_next::Slot<'_, Self>,
6034 decoder: &mut ___D,
6035 _: (),
6036 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6037 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6038 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6039 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
6040 raw,
6041 decoder,
6042 (),
6043 )?,
6044
6045 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
6046 raw,
6047 decoder,
6048 (),
6049 )?,
6050
6051 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6052 }
6053
6054 Ok(())
6055 }
6056 }
6057
6058 impl<'de> ::core::fmt::Debug for DataRouterRouteResponse<'de> {
6059 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6060 match self.raw.ordinal() {
6061 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Data<'_>>().fmt(f) },
6062 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6063 _ => unsafe { ::core::hint::unreachable_unchecked() },
6064 }
6065 }
6066 }
6067
6068 impl<'de> ::fidl_next::IntoNatural for DataRouterRouteResponse<'de> {
6069 type Natural = crate::natural::DataRouterRouteResponse;
6070 }
6071
6072 #[derive(Debug)]
6074 #[repr(C)]
6075 pub struct DictionaryDrainIteratorGetNextResponse<'de> {
6076 pub items: ::fidl_next::wire::Vector<'de, crate::wire::DictionaryItem<'de>>,
6077
6078 pub end_id: ::fidl_next::wire::Uint64,
6079 }
6080
6081 static_assertions::const_assert_eq!(
6082 std::mem::size_of::<DictionaryDrainIteratorGetNextResponse<'_>>(),
6083 24
6084 );
6085 static_assertions::const_assert_eq!(
6086 std::mem::align_of::<DictionaryDrainIteratorGetNextResponse<'_>>(),
6087 8
6088 );
6089
6090 static_assertions::const_assert_eq!(
6091 std::mem::offset_of!(DictionaryDrainIteratorGetNextResponse<'_>, items),
6092 0
6093 );
6094
6095 static_assertions::const_assert_eq!(
6096 std::mem::offset_of!(DictionaryDrainIteratorGetNextResponse<'_>, end_id),
6097 16
6098 );
6099
6100 impl ::fidl_next::Constrained for DictionaryDrainIteratorGetNextResponse<'_> {
6101 type Constraint = ();
6102
6103 fn validate(
6104 _: ::fidl_next::Slot<'_, Self>,
6105 _: Self::Constraint,
6106 ) -> Result<(), ::fidl_next::ValidationError> {
6107 Ok(())
6108 }
6109 }
6110
6111 unsafe impl ::fidl_next::Wire for DictionaryDrainIteratorGetNextResponse<'static> {
6112 type Narrowed<'de> = DictionaryDrainIteratorGetNextResponse<'de>;
6113
6114 #[inline]
6115 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6116 ::fidl_next::munge! {
6117 let Self {
6118 items,
6119 end_id,
6120
6121 } = &mut *out_;
6122 }
6123
6124 ::fidl_next::Wire::zero_padding(items);
6125
6126 ::fidl_next::Wire::zero_padding(end_id);
6127 }
6128 }
6129
6130 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryDrainIteratorGetNextResponse<'de>
6131 where
6132 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6133 ___D: ::fidl_next::Decoder<'de>,
6134 ___D: ::fidl_next::fuchsia::HandleDecoder,
6135 {
6136 fn decode(
6137 slot_: ::fidl_next::Slot<'_, Self>,
6138 decoder_: &mut ___D,
6139 _: (),
6140 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6141 ::fidl_next::munge! {
6142 let Self {
6143 mut items,
6144 mut end_id,
6145
6146 } = slot_;
6147 }
6148
6149 let _field = items.as_mut();
6150 ::fidl_next::Constrained::validate(_field, (128, ()))?;
6151 ::fidl_next::Decode::decode(items.as_mut(), decoder_, (128, ()))?;
6152
6153 let items = unsafe { items.deref_unchecked() };
6154
6155 if items.len() > 128 {
6156 return Err(::fidl_next::DecodeError::VectorTooLong {
6157 size: items.len() as u64,
6158 limit: 128,
6159 });
6160 }
6161
6162 let _field = end_id.as_mut();
6163
6164 ::fidl_next::Decode::decode(end_id.as_mut(), decoder_, ())?;
6165
6166 Ok(())
6167 }
6168 }
6169
6170 impl<'de> ::fidl_next::IntoNatural for DictionaryDrainIteratorGetNextResponse<'de> {
6171 type Natural = crate::natural::DictionaryDrainIteratorGetNextResponse;
6172 }
6173
6174 #[derive(Debug)]
6176 #[repr(C)]
6177 pub struct DictionaryOptionalItem<'de> {
6178 pub key: ::fidl_next::wire::String<'de>,
6179
6180 pub value: ::fidl_next::wire::Box<'de, crate::wire::WrappedCapabilityId>,
6181 }
6182
6183 static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryOptionalItem<'_>>(), 24);
6184 static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryOptionalItem<'_>>(), 8);
6185
6186 static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryOptionalItem<'_>, key), 0);
6187
6188 static_assertions::const_assert_eq!(
6189 std::mem::offset_of!(DictionaryOptionalItem<'_>, value),
6190 16
6191 );
6192
6193 impl ::fidl_next::Constrained for DictionaryOptionalItem<'_> {
6194 type Constraint = ();
6195
6196 fn validate(
6197 _: ::fidl_next::Slot<'_, Self>,
6198 _: Self::Constraint,
6199 ) -> Result<(), ::fidl_next::ValidationError> {
6200 Ok(())
6201 }
6202 }
6203
6204 unsafe impl ::fidl_next::Wire for DictionaryOptionalItem<'static> {
6205 type Narrowed<'de> = DictionaryOptionalItem<'de>;
6206
6207 #[inline]
6208 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6209 ::fidl_next::munge! {
6210 let Self {
6211 key,
6212 value,
6213
6214 } = &mut *out_;
6215 }
6216
6217 ::fidl_next::Wire::zero_padding(key);
6218
6219 ::fidl_next::Wire::zero_padding(value);
6220 }
6221 }
6222
6223 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryOptionalItem<'de>
6224 where
6225 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6226 ___D: ::fidl_next::Decoder<'de>,
6227 ___D: ::fidl_next::fuchsia::HandleDecoder,
6228 {
6229 fn decode(
6230 slot_: ::fidl_next::Slot<'_, Self>,
6231 decoder_: &mut ___D,
6232 _: (),
6233 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6234 ::fidl_next::munge! {
6235 let Self {
6236 mut key,
6237 mut value,
6238
6239 } = slot_;
6240 }
6241
6242 let _field = key.as_mut();
6243 ::fidl_next::Constrained::validate(_field, 255)?;
6244 ::fidl_next::Decode::decode(key.as_mut(), decoder_, 255)?;
6245
6246 let key = unsafe { key.deref_unchecked() };
6247
6248 if key.len() > 255 {
6249 return Err(::fidl_next::DecodeError::VectorTooLong {
6250 size: key.len() as u64,
6251 limit: 255,
6252 });
6253 }
6254
6255 let _field = value.as_mut();
6256
6257 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
6258
6259 Ok(())
6260 }
6261 }
6262
6263 impl<'de> ::fidl_next::IntoNatural for DictionaryOptionalItem<'de> {
6264 type Natural = crate::natural::DictionaryOptionalItem;
6265 }
6266
6267 #[derive(Debug)]
6269 #[repr(C)]
6270 pub struct DictionaryEnumerateIteratorGetNextResponse<'de> {
6271 pub items: ::fidl_next::wire::Vector<'de, crate::wire::DictionaryOptionalItem<'de>>,
6272
6273 pub end_id: ::fidl_next::wire::Uint64,
6274 }
6275
6276 static_assertions::const_assert_eq!(
6277 std::mem::size_of::<DictionaryEnumerateIteratorGetNextResponse<'_>>(),
6278 24
6279 );
6280 static_assertions::const_assert_eq!(
6281 std::mem::align_of::<DictionaryEnumerateIteratorGetNextResponse<'_>>(),
6282 8
6283 );
6284
6285 static_assertions::const_assert_eq!(
6286 std::mem::offset_of!(DictionaryEnumerateIteratorGetNextResponse<'_>, items),
6287 0
6288 );
6289
6290 static_assertions::const_assert_eq!(
6291 std::mem::offset_of!(DictionaryEnumerateIteratorGetNextResponse<'_>, end_id),
6292 16
6293 );
6294
6295 impl ::fidl_next::Constrained for DictionaryEnumerateIteratorGetNextResponse<'_> {
6296 type Constraint = ();
6297
6298 fn validate(
6299 _: ::fidl_next::Slot<'_, Self>,
6300 _: Self::Constraint,
6301 ) -> Result<(), ::fidl_next::ValidationError> {
6302 Ok(())
6303 }
6304 }
6305
6306 unsafe impl ::fidl_next::Wire for DictionaryEnumerateIteratorGetNextResponse<'static> {
6307 type Narrowed<'de> = DictionaryEnumerateIteratorGetNextResponse<'de>;
6308
6309 #[inline]
6310 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6311 ::fidl_next::munge! {
6312 let Self {
6313 items,
6314 end_id,
6315
6316 } = &mut *out_;
6317 }
6318
6319 ::fidl_next::Wire::zero_padding(items);
6320
6321 ::fidl_next::Wire::zero_padding(end_id);
6322 }
6323 }
6324
6325 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryEnumerateIteratorGetNextResponse<'de>
6326 where
6327 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6328 ___D: ::fidl_next::Decoder<'de>,
6329 ___D: ::fidl_next::fuchsia::HandleDecoder,
6330 {
6331 fn decode(
6332 slot_: ::fidl_next::Slot<'_, Self>,
6333 decoder_: &mut ___D,
6334 _: (),
6335 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6336 ::fidl_next::munge! {
6337 let Self {
6338 mut items,
6339 mut end_id,
6340
6341 } = slot_;
6342 }
6343
6344 let _field = items.as_mut();
6345 ::fidl_next::Constrained::validate(_field, (128, ()))?;
6346 ::fidl_next::Decode::decode(items.as_mut(), decoder_, (128, ()))?;
6347
6348 let items = unsafe { items.deref_unchecked() };
6349
6350 if items.len() > 128 {
6351 return Err(::fidl_next::DecodeError::VectorTooLong {
6352 size: items.len() as u64,
6353 limit: 128,
6354 });
6355 }
6356
6357 let _field = end_id.as_mut();
6358
6359 ::fidl_next::Decode::decode(end_id.as_mut(), decoder_, ())?;
6360
6361 Ok(())
6362 }
6363 }
6364
6365 impl<'de> ::fidl_next::IntoNatural for DictionaryEnumerateIteratorGetNextResponse<'de> {
6366 type Natural = crate::natural::DictionaryEnumerateIteratorGetNextResponse;
6367 }
6368
6369 #[derive(Debug)]
6371 #[repr(C)]
6372 pub struct DictionaryKeysIteratorGetNextResponse<'de> {
6373 pub keys: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
6374 }
6375
6376 static_assertions::const_assert_eq!(
6377 std::mem::size_of::<DictionaryKeysIteratorGetNextResponse<'_>>(),
6378 16
6379 );
6380 static_assertions::const_assert_eq!(
6381 std::mem::align_of::<DictionaryKeysIteratorGetNextResponse<'_>>(),
6382 8
6383 );
6384
6385 static_assertions::const_assert_eq!(
6386 std::mem::offset_of!(DictionaryKeysIteratorGetNextResponse<'_>, keys),
6387 0
6388 );
6389
6390 impl ::fidl_next::Constrained for DictionaryKeysIteratorGetNextResponse<'_> {
6391 type Constraint = ();
6392
6393 fn validate(
6394 _: ::fidl_next::Slot<'_, Self>,
6395 _: Self::Constraint,
6396 ) -> Result<(), ::fidl_next::ValidationError> {
6397 Ok(())
6398 }
6399 }
6400
6401 unsafe impl ::fidl_next::Wire for DictionaryKeysIteratorGetNextResponse<'static> {
6402 type Narrowed<'de> = DictionaryKeysIteratorGetNextResponse<'de>;
6403
6404 #[inline]
6405 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6406 ::fidl_next::munge! {
6407 let Self {
6408 keys,
6409
6410 } = &mut *out_;
6411 }
6412
6413 ::fidl_next::Wire::zero_padding(keys);
6414 }
6415 }
6416
6417 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryKeysIteratorGetNextResponse<'de>
6418 where
6419 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6420 ___D: ::fidl_next::Decoder<'de>,
6421 ___D: ::fidl_next::fuchsia::HandleDecoder,
6422 {
6423 fn decode(
6424 slot_: ::fidl_next::Slot<'_, Self>,
6425 decoder_: &mut ___D,
6426 _: (),
6427 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6428 ::fidl_next::munge! {
6429 let Self {
6430 mut keys,
6431
6432 } = slot_;
6433 }
6434
6435 let _field = keys.as_mut();
6436 ::fidl_next::Constrained::validate(_field, (128, 255))?;
6437 ::fidl_next::Decode::decode(keys.as_mut(), decoder_, (128, 255))?;
6438
6439 let keys = unsafe { keys.deref_unchecked() };
6440
6441 if keys.len() > 128 {
6442 return Err(::fidl_next::DecodeError::VectorTooLong {
6443 size: keys.len() as u64,
6444 limit: 128,
6445 });
6446 }
6447
6448 Ok(())
6449 }
6450 }
6451
6452 impl<'de> ::fidl_next::IntoNatural for DictionaryKeysIteratorGetNextResponse<'de> {
6453 type Natural = crate::natural::DictionaryKeysIteratorGetNextResponse;
6454 }
6455
6456 #[repr(transparent)]
6458 pub struct DictionaryRouterRouteResponse {
6459 pub(crate) raw: ::fidl_next::wire::Union,
6460 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6461 }
6462
6463 impl Drop for DictionaryRouterRouteResponse {
6464 fn drop(&mut self) {
6465 match self.raw.ordinal() {
6466 1 => {
6467 let _ =
6468 unsafe { self.raw.get().read_unchecked::<crate::wire::DictionaryRef>() };
6469 }
6470
6471 2 => {
6472 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6473 }
6474
6475 _ => unsafe { ::core::hint::unreachable_unchecked() },
6476 }
6477 }
6478 }
6479
6480 impl ::fidl_next::Constrained for DictionaryRouterRouteResponse {
6481 type Constraint = ();
6482
6483 fn validate(
6484 _: ::fidl_next::Slot<'_, Self>,
6485 _: Self::Constraint,
6486 ) -> Result<(), ::fidl_next::ValidationError> {
6487 Ok(())
6488 }
6489 }
6490
6491 unsafe impl ::fidl_next::Wire for DictionaryRouterRouteResponse {
6492 type Narrowed<'de> = DictionaryRouterRouteResponse;
6493
6494 #[inline]
6495 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6496 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6497 ::fidl_next::wire::Union::zero_padding(raw);
6498 }
6499 }
6500
6501 pub mod dictionary_router_route_response {
6502 pub enum Ref<'de> {
6503 Dictionary(&'de crate::wire::DictionaryRef),
6504
6505 Unavailable(&'de crate::wire::Unit),
6506 }
6507 }
6508
6509 impl DictionaryRouterRouteResponse {
6510 pub fn as_ref(&self) -> crate::wire::dictionary_router_route_response::Ref<'_> {
6511 match self.raw.ordinal() {
6512 1 => crate::wire::dictionary_router_route_response::Ref::Dictionary(unsafe {
6513 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>()
6514 }),
6515
6516 2 => crate::wire::dictionary_router_route_response::Ref::Unavailable(unsafe {
6517 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6518 }),
6519
6520 _ => unsafe { ::core::hint::unreachable_unchecked() },
6521 }
6522 }
6523 }
6524
6525 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRouterRouteResponse
6526 where
6527 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6528 ___D: ::fidl_next::fuchsia::HandleDecoder,
6529 {
6530 fn decode(
6531 mut slot: ::fidl_next::Slot<'_, Self>,
6532 decoder: &mut ___D,
6533 _: (),
6534 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6535 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6536 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6537 1 => {
6538 ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DictionaryRef>(
6539 raw,
6540 decoder,
6541 (),
6542 )?
6543 }
6544
6545 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6546 raw,
6547 decoder,
6548 (),
6549 )?,
6550
6551 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6552 }
6553
6554 Ok(())
6555 }
6556 }
6557
6558 impl ::core::fmt::Debug for DictionaryRouterRouteResponse {
6559 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6560 match self.raw.ordinal() {
6561 1 => unsafe {
6562 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>().fmt(f)
6563 },
6564 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6565 _ => unsafe { ::core::hint::unreachable_unchecked() },
6566 }
6567 }
6568 }
6569
6570 impl ::fidl_next::IntoNatural for DictionaryRouterRouteResponse {
6571 type Natural = crate::natural::DictionaryRouterRouteResponse;
6572 }
6573
6574 #[repr(transparent)]
6576 pub struct DirConnectorRouterRouteResponse {
6577 pub(crate) raw: ::fidl_next::wire::Union,
6578 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6579 }
6580
6581 impl Drop for DirConnectorRouterRouteResponse {
6582 fn drop(&mut self) {
6583 match self.raw.ordinal() {
6584 1 => {
6585 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirConnector>() };
6586 }
6587
6588 2 => {
6589 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6590 }
6591
6592 _ => unsafe { ::core::hint::unreachable_unchecked() },
6593 }
6594 }
6595 }
6596
6597 impl ::fidl_next::Constrained for DirConnectorRouterRouteResponse {
6598 type Constraint = ();
6599
6600 fn validate(
6601 _: ::fidl_next::Slot<'_, Self>,
6602 _: Self::Constraint,
6603 ) -> Result<(), ::fidl_next::ValidationError> {
6604 Ok(())
6605 }
6606 }
6607
6608 unsafe impl ::fidl_next::Wire for DirConnectorRouterRouteResponse {
6609 type Narrowed<'de> = DirConnectorRouterRouteResponse;
6610
6611 #[inline]
6612 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6613 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6614 ::fidl_next::wire::Union::zero_padding(raw);
6615 }
6616 }
6617
6618 pub mod dir_connector_router_route_response {
6619 pub enum Ref<'de> {
6620 DirConnector(&'de crate::wire::DirConnector),
6621
6622 Unavailable(&'de crate::wire::Unit),
6623 }
6624 }
6625
6626 impl DirConnectorRouterRouteResponse {
6627 pub fn as_ref(&self) -> crate::wire::dir_connector_router_route_response::Ref<'_> {
6628 match self.raw.ordinal() {
6629 1 => crate::wire::dir_connector_router_route_response::Ref::DirConnector(unsafe {
6630 self.raw.get().deref_unchecked::<crate::wire::DirConnector>()
6631 }),
6632
6633 2 => crate::wire::dir_connector_router_route_response::Ref::Unavailable(unsafe {
6634 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6635 }),
6636
6637 _ => unsafe { ::core::hint::unreachable_unchecked() },
6638 }
6639 }
6640 }
6641
6642 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnectorRouterRouteResponse
6643 where
6644 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6645 ___D: ::fidl_next::fuchsia::HandleDecoder,
6646 {
6647 fn decode(
6648 mut slot: ::fidl_next::Slot<'_, Self>,
6649 decoder: &mut ___D,
6650 _: (),
6651 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6652 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6653 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6654 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirConnector>(
6655 raw,
6656 decoder,
6657 (),
6658 )?,
6659
6660 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6661 raw,
6662 decoder,
6663 (),
6664 )?,
6665
6666 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6667 }
6668
6669 Ok(())
6670 }
6671 }
6672
6673 impl ::core::fmt::Debug for DirConnectorRouterRouteResponse {
6674 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6675 match self.raw.ordinal() {
6676 1 => unsafe {
6677 self.raw.get().deref_unchecked::<crate::wire::DirConnector>().fmt(f)
6678 },
6679 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6680 _ => unsafe { ::core::hint::unreachable_unchecked() },
6681 }
6682 }
6683 }
6684
6685 impl ::fidl_next::IntoNatural for DirConnectorRouterRouteResponse {
6686 type Natural = crate::natural::DirConnectorRouterRouteResponse;
6687 }
6688
6689 #[repr(transparent)]
6691 pub struct DirEntryRouterRouteResponse {
6692 pub(crate) raw: ::fidl_next::wire::Union,
6693 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6694 }
6695
6696 impl Drop for DirEntryRouterRouteResponse {
6697 fn drop(&mut self) {
6698 match self.raw.ordinal() {
6699 1 => {
6700 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirEntry>() };
6701 }
6702
6703 2 => {
6704 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6705 }
6706
6707 _ => unsafe { ::core::hint::unreachable_unchecked() },
6708 }
6709 }
6710 }
6711
6712 impl ::fidl_next::Constrained for DirEntryRouterRouteResponse {
6713 type Constraint = ();
6714
6715 fn validate(
6716 _: ::fidl_next::Slot<'_, Self>,
6717 _: Self::Constraint,
6718 ) -> Result<(), ::fidl_next::ValidationError> {
6719 Ok(())
6720 }
6721 }
6722
6723 unsafe impl ::fidl_next::Wire for DirEntryRouterRouteResponse {
6724 type Narrowed<'de> = DirEntryRouterRouteResponse;
6725
6726 #[inline]
6727 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6728 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6729 ::fidl_next::wire::Union::zero_padding(raw);
6730 }
6731 }
6732
6733 pub mod dir_entry_router_route_response {
6734 pub enum Ref<'de> {
6735 DirEntry(&'de crate::wire::DirEntry),
6736
6737 Unavailable(&'de crate::wire::Unit),
6738 }
6739 }
6740
6741 impl DirEntryRouterRouteResponse {
6742 pub fn as_ref(&self) -> crate::wire::dir_entry_router_route_response::Ref<'_> {
6743 match self.raw.ordinal() {
6744 1 => crate::wire::dir_entry_router_route_response::Ref::DirEntry(unsafe {
6745 self.raw.get().deref_unchecked::<crate::wire::DirEntry>()
6746 }),
6747
6748 2 => crate::wire::dir_entry_router_route_response::Ref::Unavailable(unsafe {
6749 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6750 }),
6751
6752 _ => unsafe { ::core::hint::unreachable_unchecked() },
6753 }
6754 }
6755 }
6756
6757 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntryRouterRouteResponse
6758 where
6759 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6760 ___D: ::fidl_next::fuchsia::HandleDecoder,
6761 {
6762 fn decode(
6763 mut slot: ::fidl_next::Slot<'_, Self>,
6764 decoder: &mut ___D,
6765 _: (),
6766 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6767 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6768 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6769 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirEntry>(
6770 raw,
6771 decoder,
6772 (),
6773 )?,
6774
6775 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6776 raw,
6777 decoder,
6778 (),
6779 )?,
6780
6781 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6782 }
6783
6784 Ok(())
6785 }
6786 }
6787
6788 impl ::core::fmt::Debug for DirEntryRouterRouteResponse {
6789 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6790 match self.raw.ordinal() {
6791 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::DirEntry>().fmt(f) },
6792 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6793 _ => unsafe { ::core::hint::unreachable_unchecked() },
6794 }
6795 }
6796 }
6797
6798 impl ::fidl_next::IntoNatural for DirEntryRouterRouteResponse {
6799 type Natural = crate::natural::DirEntryRouterRouteResponse;
6800 }
6801
6802 #[repr(C)]
6804 pub struct DirReceiverReceiveRequest<'de> {
6805 pub(crate) table: ::fidl_next::wire::Table<'de>,
6806 }
6807
6808 impl<'de> Drop for DirReceiverReceiveRequest<'de> {
6809 fn drop(&mut self) {
6810 let _ = self.table.get(1).map(|envelope| unsafe {
6811 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
6812 });
6813
6814 let _ = self.table.get(2).map(|envelope| unsafe {
6815 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
6816 });
6817
6818 let _ = self.table.get(3).map(|envelope| unsafe {
6819 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
6820 });
6821 }
6822 }
6823
6824 impl ::fidl_next::Constrained for DirReceiverReceiveRequest<'_> {
6825 type Constraint = ();
6826
6827 fn validate(
6828 _: ::fidl_next::Slot<'_, Self>,
6829 _: Self::Constraint,
6830 ) -> Result<(), ::fidl_next::ValidationError> {
6831 Ok(())
6832 }
6833 }
6834
6835 unsafe impl ::fidl_next::Wire for DirReceiverReceiveRequest<'static> {
6836 type Narrowed<'de> = DirReceiverReceiveRequest<'de>;
6837
6838 #[inline]
6839 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6840 ::fidl_next::munge!(let Self { table } = out);
6841 ::fidl_next::wire::Table::zero_padding(table);
6842 }
6843 }
6844
6845 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirReceiverReceiveRequest<'de>
6846 where
6847 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6848 ___D: ::fidl_next::fuchsia::HandleDecoder,
6849 {
6850 fn decode(
6851 slot: ::fidl_next::Slot<'_, Self>,
6852 decoder: &mut ___D,
6853 _: (),
6854 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6855 ::fidl_next::munge!(let Self { table } = slot);
6856
6857 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6858 match ordinal {
6859 0 => unsafe { ::core::hint::unreachable_unchecked() },
6860
6861 1 => {
6862 ::fidl_next::wire::Envelope::decode_as::<
6863 ___D,
6864 ::fidl_next::wire::fuchsia::Channel,
6865 >(slot.as_mut(), decoder, ())?;
6866
6867 Ok(())
6868 }
6869
6870 2 => {
6871 ::fidl_next::wire::Envelope::decode_as::<
6872 ___D,
6873 ::fidl_next_fuchsia_io::wire::Flags,
6874 >(slot.as_mut(), decoder, ())?;
6875
6876 Ok(())
6877 }
6878
6879 3 => {
6880 ::fidl_next::wire::Envelope::decode_as::<
6881 ___D,
6882 ::fidl_next::wire::String<'de>,
6883 >(slot.as_mut(), decoder, 4095)?;
6884
6885 let value = unsafe {
6886 slot.deref_unchecked()
6887 .deref_unchecked::<::fidl_next::wire::String<'_>>()
6888 };
6889
6890 if value.len() > 4095 {
6891 return Err(::fidl_next::DecodeError::VectorTooLong {
6892 size: value.len() as u64,
6893 limit: 4095,
6894 });
6895 }
6896
6897 Ok(())
6898 }
6899
6900 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6901 }
6902 })
6903 }
6904 }
6905
6906 impl<'de> DirReceiverReceiveRequest<'de> {
6907 pub fn channel(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
6908 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6909 }
6910
6911 pub fn flags(&self) -> ::core::option::Option<&::fidl_next_fuchsia_io::wire::Flags> {
6912 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6913 }
6914
6915 pub fn subdir(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
6916 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6917 }
6918 }
6919
6920 impl<'de> ::core::fmt::Debug for DirReceiverReceiveRequest<'de> {
6921 fn fmt(
6922 &self,
6923 f: &mut ::core::fmt::Formatter<'_>,
6924 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6925 f.debug_struct("DirReceiverReceiveRequest")
6926 .field("channel", &self.channel())
6927 .field("flags", &self.flags())
6928 .field("subdir", &self.subdir())
6929 .finish()
6930 }
6931 }
6932
6933 impl<'de> ::fidl_next::IntoNatural for DirReceiverReceiveRequest<'de> {
6934 type Natural = crate::natural::DirReceiverReceiveRequest;
6935 }
6936
6937 #[repr(transparent)]
6939 pub struct DirectoryRouterRouteResponse {
6940 pub(crate) raw: ::fidl_next::wire::Union,
6941 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6942 }
6943
6944 impl Drop for DirectoryRouterRouteResponse {
6945 fn drop(&mut self) {
6946 match self.raw.ordinal() {
6947 1 => {
6948 let _ = unsafe {
6949 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
6950 ::fidl_next_fuchsia_io::Directory,
6951 ::fidl_next::wire::fuchsia::Channel,
6952 >>()
6953 };
6954 }
6955
6956 2 => {
6957 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6958 }
6959
6960 _ => unsafe { ::core::hint::unreachable_unchecked() },
6961 }
6962 }
6963 }
6964
6965 impl ::fidl_next::Constrained for DirectoryRouterRouteResponse {
6966 type Constraint = ();
6967
6968 fn validate(
6969 _: ::fidl_next::Slot<'_, Self>,
6970 _: Self::Constraint,
6971 ) -> Result<(), ::fidl_next::ValidationError> {
6972 Ok(())
6973 }
6974 }
6975
6976 unsafe impl ::fidl_next::Wire for DirectoryRouterRouteResponse {
6977 type Narrowed<'de> = DirectoryRouterRouteResponse;
6978
6979 #[inline]
6980 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6981 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6982 ::fidl_next::wire::Union::zero_padding(raw);
6983 }
6984 }
6985
6986 pub mod directory_router_route_response {
6987 pub enum Ref<'de> {
6988 Directory(
6989 &'de ::fidl_next::ClientEnd<
6990 ::fidl_next_fuchsia_io::Directory,
6991 ::fidl_next::wire::fuchsia::Channel,
6992 >,
6993 ),
6994
6995 Unavailable(&'de crate::wire::Unit),
6996 }
6997 }
6998
6999 impl DirectoryRouterRouteResponse {
7000 pub fn as_ref(&self) -> crate::wire::directory_router_route_response::Ref<'_> {
7001 match self.raw.ordinal() {
7002 1 => crate::wire::directory_router_route_response::Ref::Directory(unsafe {
7003 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
7004 ::fidl_next_fuchsia_io::Directory,
7005 ::fidl_next::wire::fuchsia::Channel,
7006 >>()
7007 }),
7008
7009 2 => crate::wire::directory_router_route_response::Ref::Unavailable(unsafe {
7010 self.raw.get().deref_unchecked::<crate::wire::Unit>()
7011 }),
7012
7013 _ => unsafe { ::core::hint::unreachable_unchecked() },
7014 }
7015 }
7016 }
7017
7018 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRouterRouteResponse
7019 where
7020 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7021 ___D: ::fidl_next::fuchsia::HandleDecoder,
7022 {
7023 fn decode(
7024 mut slot: ::fidl_next::Slot<'_, Self>,
7025 decoder: &mut ___D,
7026 _: (),
7027 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7028 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7029 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7030 1 => ::fidl_next::wire::Union::decode_as_static::<
7031 ___D,
7032 ::fidl_next::ClientEnd<
7033 ::fidl_next_fuchsia_io::Directory,
7034 ::fidl_next::wire::fuchsia::Channel,
7035 >,
7036 >(raw, decoder, ())?,
7037
7038 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7039 raw,
7040 decoder,
7041 (),
7042 )?,
7043
7044 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
7045 }
7046
7047 Ok(())
7048 }
7049 }
7050
7051 impl ::core::fmt::Debug for DirectoryRouterRouteResponse {
7052 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7053 match self.raw.ordinal() {
7054 1 => unsafe {
7055 self.raw
7056 .get()
7057 .deref_unchecked::<::fidl_next::ClientEnd<
7058 ::fidl_next_fuchsia_io::Directory,
7059 ::fidl_next::wire::fuchsia::Channel,
7060 >>()
7061 .fmt(f)
7062 },
7063 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
7064 _ => unsafe { ::core::hint::unreachable_unchecked() },
7065 }
7066 }
7067 }
7068
7069 impl ::fidl_next::IntoNatural for DirectoryRouterRouteResponse {
7070 type Natural = crate::natural::DirectoryRouterRouteResponse;
7071 }
7072
7073 #[derive(Debug)]
7075 #[repr(C)]
7076 pub struct ProtocolPayload {
7077 pub channel: ::fidl_next::wire::fuchsia::Channel,
7078 }
7079
7080 static_assertions::const_assert_eq!(std::mem::size_of::<ProtocolPayload>(), 4);
7081 static_assertions::const_assert_eq!(std::mem::align_of::<ProtocolPayload>(), 4);
7082
7083 static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolPayload, channel), 0);
7084
7085 impl ::fidl_next::Constrained for ProtocolPayload {
7086 type Constraint = ();
7087
7088 fn validate(
7089 _: ::fidl_next::Slot<'_, Self>,
7090 _: Self::Constraint,
7091 ) -> Result<(), ::fidl_next::ValidationError> {
7092 Ok(())
7093 }
7094 }
7095
7096 unsafe impl ::fidl_next::Wire for ProtocolPayload {
7097 type Narrowed<'de> = ProtocolPayload;
7098
7099 #[inline]
7100 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7101 ::fidl_next::munge! {
7102 let Self {
7103 channel,
7104
7105 } = &mut *out_;
7106 }
7107
7108 ::fidl_next::Wire::zero_padding(channel);
7109 }
7110 }
7111
7112 unsafe impl<___D> ::fidl_next::Decode<___D> for ProtocolPayload
7113 where
7114 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7115 ___D: ::fidl_next::fuchsia::HandleDecoder,
7116 {
7117 fn decode(
7118 slot_: ::fidl_next::Slot<'_, Self>,
7119 decoder_: &mut ___D,
7120 _: (),
7121 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7122 ::fidl_next::munge! {
7123 let Self {
7124 mut channel,
7125
7126 } = slot_;
7127 }
7128
7129 let _field = channel.as_mut();
7130
7131 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
7132
7133 Ok(())
7134 }
7135 }
7136
7137 impl ::fidl_next::IntoNatural for ProtocolPayload {
7138 type Natural = crate::natural::ProtocolPayload;
7139 }
7140}
7141
7142pub mod wire_optional {
7143
7144 pub use fidl_next_common_fuchsia_component_sandbox::wire_optional::*;
7145
7146 #[repr(transparent)]
7147 pub struct Capability<'de> {
7148 pub(crate) raw: ::fidl_next::wire::Union,
7149 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7150 }
7151
7152 impl ::fidl_next::Constrained for Capability<'_> {
7153 type Constraint = ();
7154
7155 fn validate(
7156 _: ::fidl_next::Slot<'_, Self>,
7157 _: Self::Constraint,
7158 ) -> Result<(), ::fidl_next::ValidationError> {
7159 Ok(())
7160 }
7161 }
7162
7163 unsafe impl ::fidl_next::Wire for Capability<'static> {
7164 type Narrowed<'de> = Capability<'de>;
7165
7166 #[inline]
7167 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7168 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7169 ::fidl_next::wire::Union::zero_padding(raw);
7170 }
7171 }
7172
7173 impl<'de> Capability<'de> {
7174 pub fn is_some(&self) -> bool {
7175 self.raw.is_some()
7176 }
7177
7178 pub fn is_none(&self) -> bool {
7179 self.raw.is_none()
7180 }
7181
7182 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Capability<'de>> {
7183 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7184 }
7185
7186 pub fn into_option(self) -> ::core::option::Option<crate::wire::Capability<'de>> {
7187 if self.is_some() {
7188 Some(crate::wire::Capability {
7189 raw: self.raw,
7190 _phantom: ::core::marker::PhantomData,
7191 })
7192 } else {
7193 None
7194 }
7195 }
7196 }
7197
7198 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Capability<'de>
7199 where
7200 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7201 ___D: ::fidl_next::Decoder<'de>,
7202 ___D: ::fidl_next::fuchsia::HandleDecoder,
7203 {
7204 fn decode(
7205 mut slot: ::fidl_next::Slot<'_, Self>,
7206 decoder: &mut ___D,
7207 _: (),
7208 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7209 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7210 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7211 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
7212 raw,
7213 decoder,
7214 (),
7215 )?,
7216
7217 2 => ::fidl_next::wire::Union::decode_as::<
7218 ___D,
7219 ::fidl_next::wire::fuchsia::NullableHandle,
7220 >(raw, decoder, ())?,
7221
7222 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
7223 raw,
7224 decoder,
7225 (),
7226 )?,
7227
7228 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DictionaryRef>(
7229 raw,
7230 decoder,
7231 (),
7232 )?,
7233
7234 5 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Connector>(
7235 raw,
7236 decoder,
7237 (),
7238 )?,
7239
7240 6 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirConnector>(
7241 raw,
7242 decoder,
7243 (),
7244 )?,
7245
7246 7 => ::fidl_next::wire::Union::decode_as::<
7247 ___D,
7248 ::fidl_next::ClientEnd<
7249 ::fidl_next_fuchsia_io::Directory,
7250 ::fidl_next::wire::fuchsia::Channel,
7251 >,
7252 >(raw, decoder, ())?,
7253
7254 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirEntry>(
7255 raw,
7256 decoder,
7257 (),
7258 )?,
7259
7260 9 => ::fidl_next::wire::Union::decode_as::<
7261 ___D,
7262 ::fidl_next::ClientEnd<
7263 crate::ConnectorRouter,
7264 ::fidl_next::wire::fuchsia::Channel,
7265 >,
7266 >(raw, decoder, ())?,
7267
7268 10 => ::fidl_next::wire::Union::decode_as::<
7269 ___D,
7270 ::fidl_next::ClientEnd<
7271 crate::DictionaryRouter,
7272 ::fidl_next::wire::fuchsia::Channel,
7273 >,
7274 >(raw, decoder, ())?,
7275
7276 11 => ::fidl_next::wire::Union::decode_as::<
7277 ___D,
7278 ::fidl_next::ClientEnd<
7279 crate::DirEntryRouter,
7280 ::fidl_next::wire::fuchsia::Channel,
7281 >,
7282 >(raw, decoder, ())?,
7283
7284 12 => ::fidl_next::wire::Union::decode_as::<
7285 ___D,
7286 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
7287 >(raw, decoder, ())?,
7288
7289 13 => ::fidl_next::wire::Union::decode_as::<
7290 ___D,
7291 ::fidl_next::ClientEnd<
7292 crate::DirConnectorRouter,
7293 ::fidl_next::wire::fuchsia::Channel,
7294 >,
7295 >(raw, decoder, ())?,
7296
7297 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7298 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7299 }
7300
7301 Ok(())
7302 }
7303 }
7304
7305 impl<'de> ::core::fmt::Debug for Capability<'de> {
7306 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7307 self.as_ref().fmt(f)
7308 }
7309 }
7310
7311 impl<'de> ::fidl_next::IntoNatural for Capability<'de> {
7312 type Natural = ::core::option::Option<crate::natural::Capability>;
7313 }
7314
7315 #[repr(transparent)]
7316 pub struct ConnectorRouterRouteResponse {
7317 pub(crate) raw: ::fidl_next::wire::Union,
7318 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7319 }
7320
7321 impl ::fidl_next::Constrained for ConnectorRouterRouteResponse {
7322 type Constraint = ();
7323
7324 fn validate(
7325 _: ::fidl_next::Slot<'_, Self>,
7326 _: Self::Constraint,
7327 ) -> Result<(), ::fidl_next::ValidationError> {
7328 Ok(())
7329 }
7330 }
7331
7332 unsafe impl ::fidl_next::Wire for ConnectorRouterRouteResponse {
7333 type Narrowed<'de> = ConnectorRouterRouteResponse;
7334
7335 #[inline]
7336 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7337 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7338 ::fidl_next::wire::Union::zero_padding(raw);
7339 }
7340 }
7341
7342 impl ConnectorRouterRouteResponse {
7343 pub fn is_some(&self) -> bool {
7344 self.raw.is_some()
7345 }
7346
7347 pub fn is_none(&self) -> bool {
7348 self.raw.is_none()
7349 }
7350
7351 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ConnectorRouterRouteResponse> {
7352 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7353 }
7354
7355 pub fn into_option(
7356 self,
7357 ) -> ::core::option::Option<crate::wire::ConnectorRouterRouteResponse> {
7358 if self.is_some() {
7359 Some(crate::wire::ConnectorRouterRouteResponse {
7360 raw: self.raw,
7361 _phantom: ::core::marker::PhantomData,
7362 })
7363 } else {
7364 None
7365 }
7366 }
7367 }
7368
7369 unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorRouterRouteResponse
7370 where
7371 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7372 ___D: ::fidl_next::fuchsia::HandleDecoder,
7373 {
7374 fn decode(
7375 mut slot: ::fidl_next::Slot<'_, Self>,
7376 decoder: &mut ___D,
7377 _: (),
7378 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7379 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7380 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7381 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Connector>(
7382 raw,
7383 decoder,
7384 (),
7385 )?,
7386
7387 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7388 raw,
7389 decoder,
7390 (),
7391 )?,
7392
7393 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7394 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7395 }
7396
7397 Ok(())
7398 }
7399 }
7400
7401 impl ::core::fmt::Debug for ConnectorRouterRouteResponse {
7402 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7403 self.as_ref().fmt(f)
7404 }
7405 }
7406
7407 impl ::fidl_next::IntoNatural for ConnectorRouterRouteResponse {
7408 type Natural = ::core::option::Option<crate::natural::ConnectorRouterRouteResponse>;
7409 }
7410
7411 #[repr(transparent)]
7412 pub struct DataRouterRouteResponse<'de> {
7413 pub(crate) raw: ::fidl_next::wire::Union,
7414 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7415 }
7416
7417 impl ::fidl_next::Constrained for DataRouterRouteResponse<'_> {
7418 type Constraint = ();
7419
7420 fn validate(
7421 _: ::fidl_next::Slot<'_, Self>,
7422 _: Self::Constraint,
7423 ) -> Result<(), ::fidl_next::ValidationError> {
7424 Ok(())
7425 }
7426 }
7427
7428 unsafe impl ::fidl_next::Wire for DataRouterRouteResponse<'static> {
7429 type Narrowed<'de> = DataRouterRouteResponse<'de>;
7430
7431 #[inline]
7432 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7433 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7434 ::fidl_next::wire::Union::zero_padding(raw);
7435 }
7436 }
7437
7438 impl<'de> DataRouterRouteResponse<'de> {
7439 pub fn is_some(&self) -> bool {
7440 self.raw.is_some()
7441 }
7442
7443 pub fn is_none(&self) -> bool {
7444 self.raw.is_none()
7445 }
7446
7447 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DataRouterRouteResponse<'de>> {
7448 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7449 }
7450
7451 pub fn into_option(
7452 self,
7453 ) -> ::core::option::Option<crate::wire::DataRouterRouteResponse<'de>> {
7454 if self.is_some() {
7455 Some(crate::wire::DataRouterRouteResponse {
7456 raw: self.raw,
7457 _phantom: ::core::marker::PhantomData,
7458 })
7459 } else {
7460 None
7461 }
7462 }
7463 }
7464
7465 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataRouterRouteResponse<'de>
7466 where
7467 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7468 ___D: ::fidl_next::Decoder<'de>,
7469 ___D: ::fidl_next::fuchsia::HandleDecoder,
7470 {
7471 fn decode(
7472 mut slot: ::fidl_next::Slot<'_, Self>,
7473 decoder: &mut ___D,
7474 _: (),
7475 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7476 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7477 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7478 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
7479 raw,
7480 decoder,
7481 (),
7482 )?,
7483
7484 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
7485 raw,
7486 decoder,
7487 (),
7488 )?,
7489
7490 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7491 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7492 }
7493
7494 Ok(())
7495 }
7496 }
7497
7498 impl<'de> ::core::fmt::Debug for DataRouterRouteResponse<'de> {
7499 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7500 self.as_ref().fmt(f)
7501 }
7502 }
7503
7504 impl<'de> ::fidl_next::IntoNatural for DataRouterRouteResponse<'de> {
7505 type Natural = ::core::option::Option<crate::natural::DataRouterRouteResponse>;
7506 }
7507
7508 #[repr(transparent)]
7509 pub struct DictionaryRouterRouteResponse {
7510 pub(crate) raw: ::fidl_next::wire::Union,
7511 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7512 }
7513
7514 impl ::fidl_next::Constrained for DictionaryRouterRouteResponse {
7515 type Constraint = ();
7516
7517 fn validate(
7518 _: ::fidl_next::Slot<'_, Self>,
7519 _: Self::Constraint,
7520 ) -> Result<(), ::fidl_next::ValidationError> {
7521 Ok(())
7522 }
7523 }
7524
7525 unsafe impl ::fidl_next::Wire for DictionaryRouterRouteResponse {
7526 type Narrowed<'de> = DictionaryRouterRouteResponse;
7527
7528 #[inline]
7529 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7530 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7531 ::fidl_next::wire::Union::zero_padding(raw);
7532 }
7533 }
7534
7535 impl DictionaryRouterRouteResponse {
7536 pub fn is_some(&self) -> bool {
7537 self.raw.is_some()
7538 }
7539
7540 pub fn is_none(&self) -> bool {
7541 self.raw.is_none()
7542 }
7543
7544 pub fn as_ref(
7545 &self,
7546 ) -> ::core::option::Option<&crate::wire::DictionaryRouterRouteResponse> {
7547 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7548 }
7549
7550 pub fn into_option(
7551 self,
7552 ) -> ::core::option::Option<crate::wire::DictionaryRouterRouteResponse> {
7553 if self.is_some() {
7554 Some(crate::wire::DictionaryRouterRouteResponse {
7555 raw: self.raw,
7556 _phantom: ::core::marker::PhantomData,
7557 })
7558 } else {
7559 None
7560 }
7561 }
7562 }
7563
7564 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRouterRouteResponse
7565 where
7566 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7567 ___D: ::fidl_next::fuchsia::HandleDecoder,
7568 {
7569 fn decode(
7570 mut slot: ::fidl_next::Slot<'_, Self>,
7571 decoder: &mut ___D,
7572 _: (),
7573 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7574 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7575 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7576 1 => {
7577 ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DictionaryRef>(
7578 raw,
7579 decoder,
7580 (),
7581 )?
7582 }
7583
7584 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7585 raw,
7586 decoder,
7587 (),
7588 )?,
7589
7590 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7591 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7592 }
7593
7594 Ok(())
7595 }
7596 }
7597
7598 impl ::core::fmt::Debug for DictionaryRouterRouteResponse {
7599 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7600 self.as_ref().fmt(f)
7601 }
7602 }
7603
7604 impl ::fidl_next::IntoNatural for DictionaryRouterRouteResponse {
7605 type Natural = ::core::option::Option<crate::natural::DictionaryRouterRouteResponse>;
7606 }
7607
7608 #[repr(transparent)]
7609 pub struct DirConnectorRouterRouteResponse {
7610 pub(crate) raw: ::fidl_next::wire::Union,
7611 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7612 }
7613
7614 impl ::fidl_next::Constrained for DirConnectorRouterRouteResponse {
7615 type Constraint = ();
7616
7617 fn validate(
7618 _: ::fidl_next::Slot<'_, Self>,
7619 _: Self::Constraint,
7620 ) -> Result<(), ::fidl_next::ValidationError> {
7621 Ok(())
7622 }
7623 }
7624
7625 unsafe impl ::fidl_next::Wire for DirConnectorRouterRouteResponse {
7626 type Narrowed<'de> = DirConnectorRouterRouteResponse;
7627
7628 #[inline]
7629 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7630 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7631 ::fidl_next::wire::Union::zero_padding(raw);
7632 }
7633 }
7634
7635 impl DirConnectorRouterRouteResponse {
7636 pub fn is_some(&self) -> bool {
7637 self.raw.is_some()
7638 }
7639
7640 pub fn is_none(&self) -> bool {
7641 self.raw.is_none()
7642 }
7643
7644 pub fn as_ref(
7645 &self,
7646 ) -> ::core::option::Option<&crate::wire::DirConnectorRouterRouteResponse> {
7647 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7648 }
7649
7650 pub fn into_option(
7651 self,
7652 ) -> ::core::option::Option<crate::wire::DirConnectorRouterRouteResponse> {
7653 if self.is_some() {
7654 Some(crate::wire::DirConnectorRouterRouteResponse {
7655 raw: self.raw,
7656 _phantom: ::core::marker::PhantomData,
7657 })
7658 } else {
7659 None
7660 }
7661 }
7662 }
7663
7664 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnectorRouterRouteResponse
7665 where
7666 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7667 ___D: ::fidl_next::fuchsia::HandleDecoder,
7668 {
7669 fn decode(
7670 mut slot: ::fidl_next::Slot<'_, Self>,
7671 decoder: &mut ___D,
7672 _: (),
7673 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7674 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7675 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7676 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirConnector>(
7677 raw,
7678 decoder,
7679 (),
7680 )?,
7681
7682 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7683 raw,
7684 decoder,
7685 (),
7686 )?,
7687
7688 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7689 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7690 }
7691
7692 Ok(())
7693 }
7694 }
7695
7696 impl ::core::fmt::Debug for DirConnectorRouterRouteResponse {
7697 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7698 self.as_ref().fmt(f)
7699 }
7700 }
7701
7702 impl ::fidl_next::IntoNatural for DirConnectorRouterRouteResponse {
7703 type Natural = ::core::option::Option<crate::natural::DirConnectorRouterRouteResponse>;
7704 }
7705
7706 #[repr(transparent)]
7707 pub struct DirEntryRouterRouteResponse {
7708 pub(crate) raw: ::fidl_next::wire::Union,
7709 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7710 }
7711
7712 impl ::fidl_next::Constrained for DirEntryRouterRouteResponse {
7713 type Constraint = ();
7714
7715 fn validate(
7716 _: ::fidl_next::Slot<'_, Self>,
7717 _: Self::Constraint,
7718 ) -> Result<(), ::fidl_next::ValidationError> {
7719 Ok(())
7720 }
7721 }
7722
7723 unsafe impl ::fidl_next::Wire for DirEntryRouterRouteResponse {
7724 type Narrowed<'de> = DirEntryRouterRouteResponse;
7725
7726 #[inline]
7727 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7728 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7729 ::fidl_next::wire::Union::zero_padding(raw);
7730 }
7731 }
7732
7733 impl DirEntryRouterRouteResponse {
7734 pub fn is_some(&self) -> bool {
7735 self.raw.is_some()
7736 }
7737
7738 pub fn is_none(&self) -> bool {
7739 self.raw.is_none()
7740 }
7741
7742 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DirEntryRouterRouteResponse> {
7743 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7744 }
7745
7746 pub fn into_option(
7747 self,
7748 ) -> ::core::option::Option<crate::wire::DirEntryRouterRouteResponse> {
7749 if self.is_some() {
7750 Some(crate::wire::DirEntryRouterRouteResponse {
7751 raw: self.raw,
7752 _phantom: ::core::marker::PhantomData,
7753 })
7754 } else {
7755 None
7756 }
7757 }
7758 }
7759
7760 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntryRouterRouteResponse
7761 where
7762 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7763 ___D: ::fidl_next::fuchsia::HandleDecoder,
7764 {
7765 fn decode(
7766 mut slot: ::fidl_next::Slot<'_, Self>,
7767 decoder: &mut ___D,
7768 _: (),
7769 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7770 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7771 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7772 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirEntry>(
7773 raw,
7774 decoder,
7775 (),
7776 )?,
7777
7778 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7779 raw,
7780 decoder,
7781 (),
7782 )?,
7783
7784 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7785 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7786 }
7787
7788 Ok(())
7789 }
7790 }
7791
7792 impl ::core::fmt::Debug for DirEntryRouterRouteResponse {
7793 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7794 self.as_ref().fmt(f)
7795 }
7796 }
7797
7798 impl ::fidl_next::IntoNatural for DirEntryRouterRouteResponse {
7799 type Natural = ::core::option::Option<crate::natural::DirEntryRouterRouteResponse>;
7800 }
7801
7802 #[repr(transparent)]
7803 pub struct DirectoryRouterRouteResponse {
7804 pub(crate) raw: ::fidl_next::wire::Union,
7805 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7806 }
7807
7808 impl ::fidl_next::Constrained for DirectoryRouterRouteResponse {
7809 type Constraint = ();
7810
7811 fn validate(
7812 _: ::fidl_next::Slot<'_, Self>,
7813 _: Self::Constraint,
7814 ) -> Result<(), ::fidl_next::ValidationError> {
7815 Ok(())
7816 }
7817 }
7818
7819 unsafe impl ::fidl_next::Wire for DirectoryRouterRouteResponse {
7820 type Narrowed<'de> = DirectoryRouterRouteResponse;
7821
7822 #[inline]
7823 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7824 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7825 ::fidl_next::wire::Union::zero_padding(raw);
7826 }
7827 }
7828
7829 impl DirectoryRouterRouteResponse {
7830 pub fn is_some(&self) -> bool {
7831 self.raw.is_some()
7832 }
7833
7834 pub fn is_none(&self) -> bool {
7835 self.raw.is_none()
7836 }
7837
7838 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DirectoryRouterRouteResponse> {
7839 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7840 }
7841
7842 pub fn into_option(
7843 self,
7844 ) -> ::core::option::Option<crate::wire::DirectoryRouterRouteResponse> {
7845 if self.is_some() {
7846 Some(crate::wire::DirectoryRouterRouteResponse {
7847 raw: self.raw,
7848 _phantom: ::core::marker::PhantomData,
7849 })
7850 } else {
7851 None
7852 }
7853 }
7854 }
7855
7856 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRouterRouteResponse
7857 where
7858 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7859 ___D: ::fidl_next::fuchsia::HandleDecoder,
7860 {
7861 fn decode(
7862 mut slot: ::fidl_next::Slot<'_, Self>,
7863 decoder: &mut ___D,
7864 _: (),
7865 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7866 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7867 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7868 1 => ::fidl_next::wire::Union::decode_as_static::<
7869 ___D,
7870 ::fidl_next::ClientEnd<
7871 ::fidl_next_fuchsia_io::Directory,
7872 ::fidl_next::wire::fuchsia::Channel,
7873 >,
7874 >(raw, decoder, ())?,
7875
7876 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7877 raw,
7878 decoder,
7879 (),
7880 )?,
7881
7882 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7883 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7884 }
7885
7886 Ok(())
7887 }
7888 }
7889
7890 impl ::core::fmt::Debug for DirectoryRouterRouteResponse {
7891 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7892 self.as_ref().fmt(f)
7893 }
7894 }
7895
7896 impl ::fidl_next::IntoNatural for DirectoryRouterRouteResponse {
7897 type Natural = ::core::option::Option<crate::natural::DirectoryRouterRouteResponse>;
7898 }
7899}
7900
7901pub mod generic {
7902
7903 pub use fidl_next_common_fuchsia_component_sandbox::generic::*;
7904
7905 pub struct DirConnector<T0> {
7907 pub token: T0,
7908 }
7909
7910 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirConnector, ___E> for DirConnector<T0>
7911 where
7912 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7913 ___E: ::fidl_next::fuchsia::HandleEncoder,
7914 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7915 {
7916 #[inline]
7917 fn encode(
7918 self,
7919 encoder_: &mut ___E,
7920 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirConnector>,
7921 _: (),
7922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7923 ::fidl_next::munge! {
7924 let crate::wire::DirConnector {
7925 token,
7926
7927 } = out_;
7928 }
7929
7930 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
7931
7932 Ok(())
7933 }
7934 }
7935
7936 pub struct DictionaryRef<T0> {
7938 pub token: T0,
7939 }
7940
7941 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DictionaryRef, ___E> for DictionaryRef<T0>
7942 where
7943 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7944 ___E: ::fidl_next::fuchsia::HandleEncoder,
7945 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7946 {
7947 #[inline]
7948 fn encode(
7949 self,
7950 encoder_: &mut ___E,
7951 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRef>,
7952 _: (),
7953 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7954 ::fidl_next::munge! {
7955 let crate::wire::DictionaryRef {
7956 token,
7957
7958 } = out_;
7959 }
7960
7961 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
7962
7963 Ok(())
7964 }
7965 }
7966
7967 pub struct Connector<T0> {
7969 pub token: T0,
7970 }
7971
7972 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::Connector, ___E> for Connector<T0>
7973 where
7974 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7975 ___E: ::fidl_next::fuchsia::HandleEncoder,
7976 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7977 {
7978 #[inline]
7979 fn encode(
7980 self,
7981 encoder_: &mut ___E,
7982 out_: &mut ::core::mem::MaybeUninit<crate::wire::Connector>,
7983 _: (),
7984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7985 ::fidl_next::munge! {
7986 let crate::wire::Connector {
7987 token,
7988
7989 } = out_;
7990 }
7991
7992 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
7993
7994 Ok(())
7995 }
7996 }
7997
7998 pub struct DirEntry<T0> {
8000 pub token: T0,
8001 }
8002
8003 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirEntry, ___E> for DirEntry<T0>
8004 where
8005 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8006 ___E: ::fidl_next::fuchsia::HandleEncoder,
8007 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8008 {
8009 #[inline]
8010 fn encode(
8011 self,
8012 encoder_: &mut ___E,
8013 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirEntry>,
8014 _: (),
8015 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8016 ::fidl_next::munge! {
8017 let crate::wire::DirEntry {
8018 token,
8019
8020 } = out_;
8021 }
8022
8023 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8024
8025 Ok(())
8026 }
8027 }
8028
8029 pub struct CapabilityStoreConnectorCreateRequest<T0, T1> {
8031 pub id: T0,
8032
8033 pub receiver: T1,
8034 }
8035
8036 unsafe impl<___E, T0, T1>
8037 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>
8038 for CapabilityStoreConnectorCreateRequest<T0, T1>
8039 where
8040 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8041 ___E: ::fidl_next::fuchsia::HandleEncoder,
8042 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8043 T1: ::fidl_next::Encode<
8044 ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
8045 ___E,
8046 >,
8047 {
8048 #[inline]
8049 fn encode(
8050 self,
8051 encoder_: &mut ___E,
8052 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorCreateRequest>,
8053 _: (),
8054 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8055 ::fidl_next::munge! {
8056 let crate::wire::CapabilityStoreConnectorCreateRequest {
8057 id,
8058 receiver,
8059
8060 } = out_;
8061 }
8062
8063 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8064
8065 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
8066
8067 Ok(())
8068 }
8069 }
8070
8071 pub struct CapabilityStoreConnectorOpenRequest<T0, T1> {
8073 pub id: T0,
8074
8075 pub server_end: T1,
8076 }
8077
8078 unsafe impl<___E, T0, T1>
8079 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>
8080 for CapabilityStoreConnectorOpenRequest<T0, T1>
8081 where
8082 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8083 ___E: ::fidl_next::fuchsia::HandleEncoder,
8084 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8085 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8086 {
8087 #[inline]
8088 fn encode(
8089 self,
8090 encoder_: &mut ___E,
8091 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorOpenRequest>,
8092 _: (),
8093 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8094 ::fidl_next::munge! {
8095 let crate::wire::CapabilityStoreConnectorOpenRequest {
8096 id,
8097 server_end,
8098
8099 } = out_;
8100 }
8101
8102 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8103
8104 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
8105
8106 Ok(())
8107 }
8108 }
8109
8110 pub struct CapabilityStoreDirConnectorCreateRequest<T0, T1> {
8112 pub id: T0,
8113
8114 pub receiver: T1,
8115 }
8116
8117 unsafe impl<___E, T0, T1>
8118 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>
8119 for CapabilityStoreDirConnectorCreateRequest<T0, T1>
8120 where
8121 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8122 ___E: ::fidl_next::fuchsia::HandleEncoder,
8123 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8124 T1: ::fidl_next::Encode<
8125 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
8126 ___E,
8127 >,
8128 {
8129 #[inline]
8130 fn encode(
8131 self,
8132 encoder_: &mut ___E,
8133 out_: &mut ::core::mem::MaybeUninit<
8134 crate::wire::CapabilityStoreDirConnectorCreateRequest,
8135 >,
8136 _: (),
8137 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8138 ::fidl_next::munge! {
8139 let crate::wire::CapabilityStoreDirConnectorCreateRequest {
8140 id,
8141 receiver,
8142
8143 } = out_;
8144 }
8145
8146 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8147
8148 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
8149
8150 Ok(())
8151 }
8152 }
8153
8154 pub struct CapabilityStoreDictionaryLegacyImportRequest<T0, T1> {
8156 pub id: T0,
8157
8158 pub client_end: T1,
8159 }
8160
8161 unsafe impl<___E, T0, T1>
8162 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>
8163 for CapabilityStoreDictionaryLegacyImportRequest<T0, T1>
8164 where
8165 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8166 ___E: ::fidl_next::fuchsia::HandleEncoder,
8167 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8168 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8169 {
8170 #[inline]
8171 fn encode(
8172 self,
8173 encoder_: &mut ___E,
8174 out_: &mut ::core::mem::MaybeUninit<
8175 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
8176 >,
8177 _: (),
8178 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8179 ::fidl_next::munge! {
8180 let crate::wire::CapabilityStoreDictionaryLegacyImportRequest {
8181 id,
8182 client_end,
8183
8184 } = out_;
8185 }
8186
8187 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8188
8189 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
8190
8191 Ok(())
8192 }
8193 }
8194
8195 pub struct CapabilityStoreDictionaryLegacyExportRequest<T0, T1> {
8197 pub id: T0,
8198
8199 pub server_end: T1,
8200 }
8201
8202 unsafe impl<___E, T0, T1>
8203 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>
8204 for CapabilityStoreDictionaryLegacyExportRequest<T0, T1>
8205 where
8206 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8207 ___E: ::fidl_next::fuchsia::HandleEncoder,
8208 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8209 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8210 {
8211 #[inline]
8212 fn encode(
8213 self,
8214 encoder_: &mut ___E,
8215 out_: &mut ::core::mem::MaybeUninit<
8216 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
8217 >,
8218 _: (),
8219 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8220 ::fidl_next::munge! {
8221 let crate::wire::CapabilityStoreDictionaryLegacyExportRequest {
8222 id,
8223 server_end,
8224
8225 } = out_;
8226 }
8227
8228 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8229
8230 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
8231
8232 Ok(())
8233 }
8234 }
8235
8236 pub struct CapabilityStoreDictionaryKeysRequest<T0, T1> {
8238 pub id: T0,
8239
8240 pub iterator: T1,
8241 }
8242
8243 unsafe impl<___E, T0, T1>
8244 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>
8245 for CapabilityStoreDictionaryKeysRequest<T0, T1>
8246 where
8247 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8248 ___E: ::fidl_next::fuchsia::HandleEncoder,
8249 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8250 T1: ::fidl_next::Encode<
8251 ::fidl_next::ServerEnd<
8252 crate::DictionaryKeysIterator,
8253 ::fidl_next::wire::fuchsia::Channel,
8254 >,
8255 ___E,
8256 >,
8257 {
8258 #[inline]
8259 fn encode(
8260 self,
8261 encoder_: &mut ___E,
8262 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryKeysRequest>,
8263 _: (),
8264 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8265 ::fidl_next::munge! {
8266 let crate::wire::CapabilityStoreDictionaryKeysRequest {
8267 id,
8268 iterator,
8269
8270 } = out_;
8271 }
8272
8273 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8274
8275 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8276
8277 Ok(())
8278 }
8279 }
8280
8281 pub struct CapabilityStoreDictionaryEnumerateRequest<T0, T1> {
8283 pub id: T0,
8284
8285 pub iterator: T1,
8286 }
8287
8288 unsafe impl<___E, T0, T1>
8289 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>
8290 for CapabilityStoreDictionaryEnumerateRequest<T0, T1>
8291 where
8292 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8293 ___E: ::fidl_next::fuchsia::HandleEncoder,
8294 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8295 T1: ::fidl_next::Encode<
8296 ::fidl_next::ServerEnd<
8297 crate::DictionaryEnumerateIterator,
8298 ::fidl_next::wire::fuchsia::Channel,
8299 >,
8300 ___E,
8301 >,
8302 {
8303 #[inline]
8304 fn encode(
8305 self,
8306 encoder_: &mut ___E,
8307 out_: &mut ::core::mem::MaybeUninit<
8308 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
8309 >,
8310 _: (),
8311 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8312 ::fidl_next::munge! {
8313 let crate::wire::CapabilityStoreDictionaryEnumerateRequest {
8314 id,
8315 iterator,
8316
8317 } = out_;
8318 }
8319
8320 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8321
8322 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8323
8324 Ok(())
8325 }
8326 }
8327
8328 pub struct CapabilityStoreDictionaryDrainRequest<T0, T1> {
8330 pub id: T0,
8331
8332 pub iterator: T1,
8333 }
8334
8335 unsafe impl<___E, T0, T1>
8336 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>
8337 for CapabilityStoreDictionaryDrainRequest<T0, T1>
8338 where
8339 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8340 ___E: ::fidl_next::fuchsia::HandleEncoder,
8341 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8342 T1: ::fidl_next::Encode<
8343 ::fidl_next::ServerEnd<
8344 crate::DictionaryDrainIterator,
8345 ::fidl_next::wire::fuchsia::OptionalChannel,
8346 >,
8347 ___E,
8348 >,
8349 {
8350 #[inline]
8351 fn encode(
8352 self,
8353 encoder_: &mut ___E,
8354 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryDrainRequest>,
8355 _: (),
8356 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8357 ::fidl_next::munge! {
8358 let crate::wire::CapabilityStoreDictionaryDrainRequest {
8359 id,
8360 iterator,
8361
8362 } = out_;
8363 }
8364
8365 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8366
8367 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8368
8369 Ok(())
8370 }
8371 }
8372
8373 pub struct CapabilityStoreCreateServiceAggregateRequest<T0> {
8375 pub sources: T0,
8376 }
8377
8378 unsafe impl<___E, T0>
8379 ::fidl_next::Encode<
8380 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
8381 ___E,
8382 > for CapabilityStoreCreateServiceAggregateRequest<T0>
8383 where
8384 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8385 ___E: ::fidl_next::Encoder,
8386 ___E: ::fidl_next::fuchsia::HandleEncoder,
8387 T0: ::fidl_next::Encode<
8388 ::fidl_next::wire::Vector<'static, crate::wire::AggregateSource<'static>>,
8389 ___E,
8390 >,
8391 {
8392 #[inline]
8393 fn encode(
8394 self,
8395 encoder_: &mut ___E,
8396 out_: &mut ::core::mem::MaybeUninit<
8397 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
8398 >,
8399 _: (),
8400 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8401 ::fidl_next::munge! {
8402 let crate::wire::CapabilityStoreCreateServiceAggregateRequest {
8403 sources,
8404
8405 } = out_;
8406 }
8407
8408 ::fidl_next::Encode::encode(self.sources, encoder_, sources, (4294967295, ()))?;
8409
8410 Ok(())
8411 }
8412 }
8413
8414 pub struct CapabilityStoreCreateServiceAggregateResponse<T0> {
8416 pub aggregate_dir_connector: T0,
8417 }
8418
8419 unsafe impl<___E, T0>
8420 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>
8421 for CapabilityStoreCreateServiceAggregateResponse<T0>
8422 where
8423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8424 ___E: ::fidl_next::fuchsia::HandleEncoder,
8425 T0: ::fidl_next::Encode<crate::wire::DirConnector, ___E>,
8426 {
8427 #[inline]
8428 fn encode(
8429 self,
8430 encoder_: &mut ___E,
8431 out_: &mut ::core::mem::MaybeUninit<
8432 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
8433 >,
8434 _: (),
8435 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8436 ::fidl_next::munge! {
8437 let crate::wire::CapabilityStoreCreateServiceAggregateResponse {
8438 aggregate_dir_connector,
8439
8440 } = out_;
8441 }
8442
8443 ::fidl_next::Encode::encode(
8444 self.aggregate_dir_connector,
8445 encoder_,
8446 aggregate_dir_connector,
8447 (),
8448 )?;
8449
8450 Ok(())
8451 }
8452 }
8453
8454 pub struct CapabilityStoreExportResponse<T0> {
8456 pub capability: T0,
8457 }
8458
8459 unsafe impl<___E, T0>
8460 ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>
8461 for CapabilityStoreExportResponse<T0>
8462 where
8463 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8464 ___E: ::fidl_next::Encoder,
8465 ___E: ::fidl_next::fuchsia::HandleEncoder,
8466 T0: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
8467 {
8468 #[inline]
8469 fn encode(
8470 self,
8471 encoder_: &mut ___E,
8472 out_: &mut ::core::mem::MaybeUninit<
8473 crate::wire::CapabilityStoreExportResponse<'static>,
8474 >,
8475 _: (),
8476 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8477 ::fidl_next::munge! {
8478 let crate::wire::CapabilityStoreExportResponse {
8479 capability,
8480
8481 } = out_;
8482 }
8483
8484 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
8485
8486 Ok(())
8487 }
8488 }
8489
8490 pub struct CapabilityStoreImportRequest<T0, T1> {
8492 pub id: T0,
8493
8494 pub capability: T1,
8495 }
8496
8497 unsafe impl<___E, T0, T1>
8498 ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>
8499 for CapabilityStoreImportRequest<T0, T1>
8500 where
8501 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8502 ___E: ::fidl_next::Encoder,
8503 ___E: ::fidl_next::fuchsia::HandleEncoder,
8504 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8505 T1: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
8506 {
8507 #[inline]
8508 fn encode(
8509 self,
8510 encoder_: &mut ___E,
8511 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreImportRequest<'static>>,
8512 _: (),
8513 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8514 ::fidl_next::munge! {
8515 let crate::wire::CapabilityStoreImportRequest {
8516 id,
8517 capability,
8518
8519 } = out_;
8520 }
8521
8522 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8523
8524 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
8525
8526 Ok(())
8527 }
8528 }
8529
8530 pub struct InstanceToken<T0> {
8532 pub token: T0,
8533 }
8534
8535 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::InstanceToken, ___E> for InstanceToken<T0>
8536 where
8537 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8538 ___E: ::fidl_next::fuchsia::HandleEncoder,
8539 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8540 {
8541 #[inline]
8542 fn encode(
8543 self,
8544 encoder_: &mut ___E,
8545 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceToken>,
8546 _: (),
8547 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8548 ::fidl_next::munge! {
8549 let crate::wire::InstanceToken {
8550 token,
8551
8552 } = out_;
8553 }
8554
8555 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8556
8557 Ok(())
8558 }
8559 }
8560
8561 pub struct DictionaryDrainIteratorGetNextResponse<T0, T1> {
8563 pub items: T0,
8564
8565 pub end_id: T1,
8566 }
8567
8568 unsafe impl<___E, T0, T1>
8569 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>
8570 for DictionaryDrainIteratorGetNextResponse<T0, T1>
8571 where
8572 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8573 ___E: ::fidl_next::Encoder,
8574 ___E: ::fidl_next::fuchsia::HandleEncoder,
8575 T0: ::fidl_next::Encode<
8576 ::fidl_next::wire::Vector<'static, crate::wire::DictionaryItem<'static>>,
8577 ___E,
8578 >,
8579 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8580 {
8581 #[inline]
8582 fn encode(
8583 self,
8584 encoder_: &mut ___E,
8585 out_: &mut ::core::mem::MaybeUninit<
8586 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
8587 >,
8588 _: (),
8589 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8590 ::fidl_next::munge! {
8591 let crate::wire::DictionaryDrainIteratorGetNextResponse {
8592 items,
8593 end_id,
8594
8595 } = out_;
8596 }
8597
8598 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
8599
8600 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
8601
8602 Ok(())
8603 }
8604 }
8605
8606 pub struct DictionaryOptionalItem<T0, T1> {
8608 pub key: T0,
8609
8610 pub value: T1,
8611 }
8612
8613 unsafe impl<___E, T0, T1>
8614 ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>
8615 for DictionaryOptionalItem<T0, T1>
8616 where
8617 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8618 ___E: ::fidl_next::Encoder,
8619 ___E: ::fidl_next::fuchsia::HandleEncoder,
8620 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
8621 T1: ::fidl_next::Encode<
8622 ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
8623 ___E,
8624 >,
8625 {
8626 #[inline]
8627 fn encode(
8628 self,
8629 encoder_: &mut ___E,
8630 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryOptionalItem<'static>>,
8631 _: (),
8632 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8633 ::fidl_next::munge! {
8634 let crate::wire::DictionaryOptionalItem {
8635 key,
8636 value,
8637
8638 } = out_;
8639 }
8640
8641 ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
8642
8643 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
8644
8645 Ok(())
8646 }
8647 }
8648
8649 pub struct DictionaryEnumerateIteratorGetNextResponse<T0, T1> {
8651 pub items: T0,
8652
8653 pub end_id: T1,
8654 }
8655
8656 unsafe impl<___E, T0, T1>
8657 ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>, ___E>
8658 for DictionaryEnumerateIteratorGetNextResponse<T0, T1>
8659 where
8660 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8661 ___E: ::fidl_next::Encoder,
8662 ___E: ::fidl_next::fuchsia::HandleEncoder,
8663 T0: ::fidl_next::Encode<
8664 ::fidl_next::wire::Vector<'static, crate::wire::DictionaryOptionalItem<'static>>,
8665 ___E,
8666 >,
8667 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8668 {
8669 #[inline]
8670 fn encode(
8671 self,
8672 encoder_: &mut ___E,
8673 out_: &mut ::core::mem::MaybeUninit<
8674 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
8675 >,
8676 _: (),
8677 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8678 ::fidl_next::munge! {
8679 let crate::wire::DictionaryEnumerateIteratorGetNextResponse {
8680 items,
8681 end_id,
8682
8683 } = out_;
8684 }
8685
8686 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
8687
8688 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
8689
8690 Ok(())
8691 }
8692 }
8693
8694 pub struct DictionaryKeysIteratorGetNextResponse<T0> {
8696 pub keys: T0,
8697 }
8698
8699 unsafe impl<___E, T0>
8700 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>
8701 for DictionaryKeysIteratorGetNextResponse<T0>
8702 where
8703 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8704 ___E: ::fidl_next::Encoder,
8705 ___E: ::fidl_next::fuchsia::HandleEncoder,
8706 T0: ::fidl_next::Encode<
8707 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
8708 ___E,
8709 >,
8710 {
8711 #[inline]
8712 fn encode(
8713 self,
8714 encoder_: &mut ___E,
8715 out_: &mut ::core::mem::MaybeUninit<
8716 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
8717 >,
8718 _: (),
8719 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8720 ::fidl_next::munge! {
8721 let crate::wire::DictionaryKeysIteratorGetNextResponse {
8722 keys,
8723
8724 } = out_;
8725 }
8726
8727 ::fidl_next::Encode::encode(self.keys, encoder_, keys, (128, 255))?;
8728
8729 Ok(())
8730 }
8731 }
8732
8733 pub struct ProtocolPayload<T0> {
8735 pub channel: T0,
8736 }
8737
8738 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E>
8739 for ProtocolPayload<T0>
8740 where
8741 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8742 ___E: ::fidl_next::fuchsia::HandleEncoder,
8743 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8744 {
8745 #[inline]
8746 fn encode(
8747 self,
8748 encoder_: &mut ___E,
8749 out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolPayload>,
8750 _: (),
8751 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8752 ::fidl_next::munge! {
8753 let crate::wire::ProtocolPayload {
8754 channel,
8755
8756 } = out_;
8757 }
8758
8759 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
8760
8761 Ok(())
8762 }
8763 }
8764}
8765
8766pub use self::natural::*;
8767
8768#[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"]
8770#[derive(PartialEq, Debug)]
8771pub struct CapabilityStore;
8772
8773impl ::fidl_next::Discoverable for CapabilityStore {
8774 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
8775}
8776
8777#[cfg(target_os = "fuchsia")]
8778impl ::fidl_next::HasTransport for CapabilityStore {
8779 type Transport = ::fidl_next::fuchsia::zx::Channel;
8780}
8781
8782pub mod capability_store {
8783 pub mod prelude {
8784 pub use crate::{
8785 CapabilityStore, CapabilityStoreClientHandler, CapabilityStoreLocalClientHandler,
8786 CapabilityStoreLocalServerHandler, CapabilityStoreServerHandler, capability_store,
8787 };
8788
8789 pub use crate::natural::CapabilityStoreConnectorCreateRequest;
8790
8791 pub use crate::natural::CapabilityStoreConnectorOpenRequest;
8792
8793 pub use crate::natural::CapabilityStoreCreateServiceAggregateRequest;
8794
8795 pub use crate::natural::CapabilityStoreDictionaryCopyRequest;
8796
8797 pub use crate::natural::CapabilityStoreDictionaryCreateRequest;
8798
8799 pub use crate::natural::CapabilityStoreDictionaryDrainRequest;
8800
8801 pub use crate::natural::CapabilityStoreDictionaryEnumerateRequest;
8802
8803 pub use crate::natural::CapabilityStoreDictionaryGetRequest;
8804
8805 pub use crate::natural::CapabilityStoreDictionaryInsertRequest;
8806
8807 pub use crate::natural::CapabilityStoreDictionaryKeysRequest;
8808
8809 pub use crate::natural::CapabilityStoreDictionaryLegacyExportRequest;
8810
8811 pub use crate::natural::CapabilityStoreDictionaryLegacyImportRequest;
8812
8813 pub use crate::natural::CapabilityStoreDictionaryRemoveRequest;
8814
8815 pub use crate::natural::CapabilityStoreDirConnectorCreateRequest;
8816
8817 pub use crate::natural::CapabilityStoreDirConnectorOpenRequest;
8818
8819 pub use crate::natural::CapabilityStoreDropRequest;
8820
8821 pub use crate::natural::CapabilityStoreDuplicateRequest;
8822
8823 pub use crate::natural::CapabilityStoreError;
8824
8825 pub use crate::natural::CapabilityStoreExportRequest;
8826
8827 pub use crate::natural::CapabilityStoreImportRequest;
8828
8829 pub use crate::natural::CapabilityStoreConnectorCreateResponse;
8830
8831 pub use crate::natural::CapabilityStoreConnectorOpenResponse;
8832
8833 pub use crate::natural::CapabilityStoreCreateServiceAggregateResponse;
8834
8835 pub use crate::natural::CapabilityStoreDictionaryCopyResponse;
8836
8837 pub use crate::natural::CapabilityStoreDictionaryCreateResponse;
8838
8839 pub use crate::natural::CapabilityStoreDictionaryDrainResponse;
8840
8841 pub use crate::natural::CapabilityStoreDictionaryEnumerateResponse;
8842
8843 pub use crate::natural::CapabilityStoreDictionaryGetResponse;
8844
8845 pub use crate::natural::CapabilityStoreDictionaryInsertResponse;
8846
8847 pub use crate::natural::CapabilityStoreDictionaryKeysResponse;
8848
8849 pub use crate::natural::CapabilityStoreDictionaryLegacyExportResponse;
8850
8851 pub use crate::natural::CapabilityStoreDictionaryLegacyImportResponse;
8852
8853 pub use crate::natural::CapabilityStoreDictionaryRemoveResponse;
8854
8855 pub use crate::natural::CapabilityStoreDirConnectorCreateResponse;
8856
8857 pub use crate::natural::CapabilityStoreDirConnectorOpenResponse;
8858
8859 pub use crate::natural::CapabilityStoreDropResponse;
8860
8861 pub use crate::natural::CapabilityStoreDuplicateResponse;
8862
8863 pub use crate::natural::CapabilityStoreExportResponse;
8864
8865 pub use crate::natural::CapabilityStoreImportResponse;
8866 }
8867
8868 pub struct Duplicate;
8869
8870 impl ::fidl_next::Method for Duplicate {
8871 const ORDINAL: u64 = 6727592627741008260;
8872 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8873 ::fidl_next::protocol::Flexibility::Flexible;
8874
8875 type Protocol = crate::CapabilityStore;
8876
8877 type Request = crate::wire::CapabilityStoreDuplicateRequest;
8878 }
8879
8880 impl ::fidl_next::TwoWayMethod for Duplicate {
8881 type Response = ::fidl_next::wire::FlexibleResult<
8882 'static,
8883 crate::wire::CapabilityStoreDuplicateResponse,
8884 crate::wire::CapabilityStoreError,
8885 >;
8886 }
8887
8888 impl<___R> ::fidl_next::Respond<___R> for Duplicate {
8889 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8890
8891 fn respond(response: ___R) -> Self::Output {
8892 ::fidl_next::FlexibleResult::Ok(response)
8893 }
8894 }
8895
8896 impl<___R> ::fidl_next::RespondErr<___R> for Duplicate {
8897 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8898
8899 fn respond_err(response: ___R) -> Self::Output {
8900 ::fidl_next::FlexibleResult::Err(response)
8901 }
8902 }
8903
8904 pub struct Drop;
8905
8906 impl ::fidl_next::Method for Drop {
8907 const ORDINAL: u64 = 753328233834620249;
8908 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8909 ::fidl_next::protocol::Flexibility::Flexible;
8910
8911 type Protocol = crate::CapabilityStore;
8912
8913 type Request = crate::wire::CapabilityStoreDropRequest;
8914 }
8915
8916 impl ::fidl_next::TwoWayMethod for Drop {
8917 type Response = ::fidl_next::wire::FlexibleResult<
8918 'static,
8919 crate::wire::CapabilityStoreDropResponse,
8920 crate::wire::CapabilityStoreError,
8921 >;
8922 }
8923
8924 impl<___R> ::fidl_next::Respond<___R> for Drop {
8925 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8926
8927 fn respond(response: ___R) -> Self::Output {
8928 ::fidl_next::FlexibleResult::Ok(response)
8929 }
8930 }
8931
8932 impl<___R> ::fidl_next::RespondErr<___R> for Drop {
8933 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8934
8935 fn respond_err(response: ___R) -> Self::Output {
8936 ::fidl_next::FlexibleResult::Err(response)
8937 }
8938 }
8939
8940 pub struct Export;
8941
8942 impl ::fidl_next::Method for Export {
8943 const ORDINAL: u64 = 226159162093533951;
8944 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8945 ::fidl_next::protocol::Flexibility::Flexible;
8946
8947 type Protocol = crate::CapabilityStore;
8948
8949 type Request = crate::wire::CapabilityStoreExportRequest;
8950 }
8951
8952 impl ::fidl_next::TwoWayMethod for Export {
8953 type Response = ::fidl_next::wire::FlexibleResult<
8954 'static,
8955 crate::wire::CapabilityStoreExportResponse<'static>,
8956 crate::wire::CapabilityStoreError,
8957 >;
8958 }
8959
8960 impl<___R> ::fidl_next::Respond<___R> for Export {
8961 type Output = ::fidl_next::FlexibleResult<
8962 crate::generic::CapabilityStoreExportResponse<___R>,
8963 ::fidl_next::util::Never,
8964 >;
8965
8966 fn respond(response: ___R) -> Self::Output {
8967 ::fidl_next::FlexibleResult::Ok(crate::generic::CapabilityStoreExportResponse {
8968 capability: response,
8969 })
8970 }
8971 }
8972
8973 impl<___R> ::fidl_next::RespondErr<___R> for Export {
8974 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8975
8976 fn respond_err(response: ___R) -> Self::Output {
8977 ::fidl_next::FlexibleResult::Err(response)
8978 }
8979 }
8980
8981 pub struct Import;
8982
8983 impl ::fidl_next::Method for Import {
8984 const ORDINAL: u64 = 2276030276116435867;
8985 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8986 ::fidl_next::protocol::Flexibility::Flexible;
8987
8988 type Protocol = crate::CapabilityStore;
8989
8990 type Request = crate::wire::CapabilityStoreImportRequest<'static>;
8991 }
8992
8993 impl ::fidl_next::TwoWayMethod for Import {
8994 type Response = ::fidl_next::wire::FlexibleResult<
8995 'static,
8996 crate::wire::CapabilityStoreImportResponse,
8997 crate::wire::CapabilityStoreError,
8998 >;
8999 }
9000
9001 impl<___R> ::fidl_next::Respond<___R> for Import {
9002 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9003
9004 fn respond(response: ___R) -> Self::Output {
9005 ::fidl_next::FlexibleResult::Ok(response)
9006 }
9007 }
9008
9009 impl<___R> ::fidl_next::RespondErr<___R> for Import {
9010 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9011
9012 fn respond_err(response: ___R) -> Self::Output {
9013 ::fidl_next::FlexibleResult::Err(response)
9014 }
9015 }
9016
9017 pub struct ConnectorCreate;
9018
9019 impl ::fidl_next::Method for ConnectorCreate {
9020 const ORDINAL: u64 = 2979461408102095909;
9021 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9022 ::fidl_next::protocol::Flexibility::Flexible;
9023
9024 type Protocol = crate::CapabilityStore;
9025
9026 type Request = crate::wire::CapabilityStoreConnectorCreateRequest;
9027 }
9028
9029 impl ::fidl_next::TwoWayMethod for ConnectorCreate {
9030 type Response = ::fidl_next::wire::FlexibleResult<
9031 'static,
9032 crate::wire::CapabilityStoreConnectorCreateResponse,
9033 crate::wire::CapabilityStoreError,
9034 >;
9035 }
9036
9037 impl<___R> ::fidl_next::Respond<___R> for ConnectorCreate {
9038 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9039
9040 fn respond(response: ___R) -> Self::Output {
9041 ::fidl_next::FlexibleResult::Ok(response)
9042 }
9043 }
9044
9045 impl<___R> ::fidl_next::RespondErr<___R> for ConnectorCreate {
9046 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9047
9048 fn respond_err(response: ___R) -> Self::Output {
9049 ::fidl_next::FlexibleResult::Err(response)
9050 }
9051 }
9052
9053 pub struct ConnectorOpen;
9054
9055 impl ::fidl_next::Method for ConnectorOpen {
9056 const ORDINAL: u64 = 6016362336453278623;
9057 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9058 ::fidl_next::protocol::Flexibility::Flexible;
9059
9060 type Protocol = crate::CapabilityStore;
9061
9062 type Request = crate::wire::CapabilityStoreConnectorOpenRequest;
9063 }
9064
9065 impl ::fidl_next::TwoWayMethod for ConnectorOpen {
9066 type Response = ::fidl_next::wire::FlexibleResult<
9067 'static,
9068 crate::wire::CapabilityStoreConnectorOpenResponse,
9069 crate::wire::CapabilityStoreError,
9070 >;
9071 }
9072
9073 impl<___R> ::fidl_next::Respond<___R> for ConnectorOpen {
9074 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9075
9076 fn respond(response: ___R) -> Self::Output {
9077 ::fidl_next::FlexibleResult::Ok(response)
9078 }
9079 }
9080
9081 impl<___R> ::fidl_next::RespondErr<___R> for ConnectorOpen {
9082 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9083
9084 fn respond_err(response: ___R) -> Self::Output {
9085 ::fidl_next::FlexibleResult::Err(response)
9086 }
9087 }
9088
9089 pub struct DirConnectorCreate;
9090
9091 impl ::fidl_next::Method for DirConnectorCreate {
9092 const ORDINAL: u64 = 1756747594275428795;
9093 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9094 ::fidl_next::protocol::Flexibility::Flexible;
9095
9096 type Protocol = crate::CapabilityStore;
9097
9098 type Request = crate::wire::CapabilityStoreDirConnectorCreateRequest;
9099 }
9100
9101 impl ::fidl_next::TwoWayMethod for DirConnectorCreate {
9102 type Response = ::fidl_next::wire::FlexibleResult<
9103 'static,
9104 crate::wire::CapabilityStoreDirConnectorCreateResponse,
9105 crate::wire::CapabilityStoreError,
9106 >;
9107 }
9108
9109 impl<___R> ::fidl_next::Respond<___R> for DirConnectorCreate {
9110 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9111
9112 fn respond(response: ___R) -> Self::Output {
9113 ::fidl_next::FlexibleResult::Ok(response)
9114 }
9115 }
9116
9117 impl<___R> ::fidl_next::RespondErr<___R> for DirConnectorCreate {
9118 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9119
9120 fn respond_err(response: ___R) -> Self::Output {
9121 ::fidl_next::FlexibleResult::Err(response)
9122 }
9123 }
9124
9125 pub struct DirConnectorOpen;
9126
9127 impl ::fidl_next::Method for DirConnectorOpen {
9128 const ORDINAL: u64 = 6219704004220369153;
9129 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9130 ::fidl_next::protocol::Flexibility::Flexible;
9131
9132 type Protocol = crate::CapabilityStore;
9133
9134 type Request = crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>;
9135 }
9136
9137 impl ::fidl_next::TwoWayMethod for DirConnectorOpen {
9138 type Response = ::fidl_next::wire::FlexibleResult<
9139 'static,
9140 crate::wire::CapabilityStoreDirConnectorOpenResponse,
9141 crate::wire::CapabilityStoreError,
9142 >;
9143 }
9144
9145 impl<___R> ::fidl_next::Respond<___R> for DirConnectorOpen {
9146 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9147
9148 fn respond(response: ___R) -> Self::Output {
9149 ::fidl_next::FlexibleResult::Ok(response)
9150 }
9151 }
9152
9153 impl<___R> ::fidl_next::RespondErr<___R> for DirConnectorOpen {
9154 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9155
9156 fn respond_err(response: ___R) -> Self::Output {
9157 ::fidl_next::FlexibleResult::Err(response)
9158 }
9159 }
9160
9161 pub struct DictionaryCreate;
9162
9163 impl ::fidl_next::Method for DictionaryCreate {
9164 const ORDINAL: u64 = 7608770958894948499;
9165 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9166 ::fidl_next::protocol::Flexibility::Flexible;
9167
9168 type Protocol = crate::CapabilityStore;
9169
9170 type Request = crate::wire::CapabilityStoreDictionaryCreateRequest;
9171 }
9172
9173 impl ::fidl_next::TwoWayMethod for DictionaryCreate {
9174 type Response = ::fidl_next::wire::FlexibleResult<
9175 'static,
9176 crate::wire::CapabilityStoreDictionaryCreateResponse,
9177 crate::wire::CapabilityStoreError,
9178 >;
9179 }
9180
9181 impl<___R> ::fidl_next::Respond<___R> for DictionaryCreate {
9182 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9183
9184 fn respond(response: ___R) -> Self::Output {
9185 ::fidl_next::FlexibleResult::Ok(response)
9186 }
9187 }
9188
9189 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryCreate {
9190 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9191
9192 fn respond_err(response: ___R) -> Self::Output {
9193 ::fidl_next::FlexibleResult::Err(response)
9194 }
9195 }
9196
9197 pub struct DictionaryLegacyImport;
9198
9199 impl ::fidl_next::Method for DictionaryLegacyImport {
9200 const ORDINAL: u64 = 8285893703432012383;
9201 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9202 ::fidl_next::protocol::Flexibility::Flexible;
9203
9204 type Protocol = crate::CapabilityStore;
9205
9206 type Request = crate::wire::CapabilityStoreDictionaryLegacyImportRequest;
9207 }
9208
9209 impl ::fidl_next::TwoWayMethod for DictionaryLegacyImport {
9210 type Response = ::fidl_next::wire::FlexibleResult<
9211 'static,
9212 crate::wire::CapabilityStoreDictionaryLegacyImportResponse,
9213 crate::wire::CapabilityStoreError,
9214 >;
9215 }
9216
9217 impl<___R> ::fidl_next::Respond<___R> for DictionaryLegacyImport {
9218 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9219
9220 fn respond(response: ___R) -> Self::Output {
9221 ::fidl_next::FlexibleResult::Ok(response)
9222 }
9223 }
9224
9225 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryLegacyImport {
9226 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9227
9228 fn respond_err(response: ___R) -> Self::Output {
9229 ::fidl_next::FlexibleResult::Err(response)
9230 }
9231 }
9232
9233 pub struct DictionaryLegacyExport;
9234
9235 impl ::fidl_next::Method for DictionaryLegacyExport {
9236 const ORDINAL: u64 = 4647175832683306445;
9237 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9238 ::fidl_next::protocol::Flexibility::Flexible;
9239
9240 type Protocol = crate::CapabilityStore;
9241
9242 type Request = crate::wire::CapabilityStoreDictionaryLegacyExportRequest;
9243 }
9244
9245 impl ::fidl_next::TwoWayMethod for DictionaryLegacyExport {
9246 type Response = ::fidl_next::wire::FlexibleResult<
9247 'static,
9248 crate::wire::CapabilityStoreDictionaryLegacyExportResponse,
9249 crate::wire::CapabilityStoreError,
9250 >;
9251 }
9252
9253 impl<___R> ::fidl_next::Respond<___R> for DictionaryLegacyExport {
9254 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9255
9256 fn respond(response: ___R) -> Self::Output {
9257 ::fidl_next::FlexibleResult::Ok(response)
9258 }
9259 }
9260
9261 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryLegacyExport {
9262 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9263
9264 fn respond_err(response: ___R) -> Self::Output {
9265 ::fidl_next::FlexibleResult::Err(response)
9266 }
9267 }
9268
9269 pub struct DictionaryInsert;
9270
9271 impl ::fidl_next::Method for DictionaryInsert {
9272 const ORDINAL: u64 = 8575443262986538023;
9273 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9274 ::fidl_next::protocol::Flexibility::Flexible;
9275
9276 type Protocol = crate::CapabilityStore;
9277
9278 type Request = crate::wire::CapabilityStoreDictionaryInsertRequest<'static>;
9279 }
9280
9281 impl ::fidl_next::TwoWayMethod for DictionaryInsert {
9282 type Response = ::fidl_next::wire::FlexibleResult<
9283 'static,
9284 crate::wire::CapabilityStoreDictionaryInsertResponse,
9285 crate::wire::CapabilityStoreError,
9286 >;
9287 }
9288
9289 impl<___R> ::fidl_next::Respond<___R> for DictionaryInsert {
9290 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9291
9292 fn respond(response: ___R) -> Self::Output {
9293 ::fidl_next::FlexibleResult::Ok(response)
9294 }
9295 }
9296
9297 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryInsert {
9298 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9299
9300 fn respond_err(response: ___R) -> Self::Output {
9301 ::fidl_next::FlexibleResult::Err(response)
9302 }
9303 }
9304
9305 pub struct DictionaryGet;
9306
9307 impl ::fidl_next::Method for DictionaryGet {
9308 const ORDINAL: u64 = 5592951026866236882;
9309 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9310 ::fidl_next::protocol::Flexibility::Flexible;
9311
9312 type Protocol = crate::CapabilityStore;
9313
9314 type Request = crate::wire::CapabilityStoreDictionaryGetRequest<'static>;
9315 }
9316
9317 impl ::fidl_next::TwoWayMethod for DictionaryGet {
9318 type Response = ::fidl_next::wire::FlexibleResult<
9319 'static,
9320 crate::wire::CapabilityStoreDictionaryGetResponse,
9321 crate::wire::CapabilityStoreError,
9322 >;
9323 }
9324
9325 impl<___R> ::fidl_next::Respond<___R> for DictionaryGet {
9326 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9327
9328 fn respond(response: ___R) -> Self::Output {
9329 ::fidl_next::FlexibleResult::Ok(response)
9330 }
9331 }
9332
9333 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryGet {
9334 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9335
9336 fn respond_err(response: ___R) -> Self::Output {
9337 ::fidl_next::FlexibleResult::Err(response)
9338 }
9339 }
9340
9341 pub struct DictionaryRemove;
9342
9343 impl ::fidl_next::Method for DictionaryRemove {
9344 const ORDINAL: u64 = 343892214579320051;
9345 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9346 ::fidl_next::protocol::Flexibility::Flexible;
9347
9348 type Protocol = crate::CapabilityStore;
9349
9350 type Request = crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>;
9351 }
9352
9353 impl ::fidl_next::TwoWayMethod for DictionaryRemove {
9354 type Response = ::fidl_next::wire::FlexibleResult<
9355 'static,
9356 crate::wire::CapabilityStoreDictionaryRemoveResponse,
9357 crate::wire::CapabilityStoreError,
9358 >;
9359 }
9360
9361 impl<___R> ::fidl_next::Respond<___R> for DictionaryRemove {
9362 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9363
9364 fn respond(response: ___R) -> Self::Output {
9365 ::fidl_next::FlexibleResult::Ok(response)
9366 }
9367 }
9368
9369 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryRemove {
9370 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9371
9372 fn respond_err(response: ___R) -> Self::Output {
9373 ::fidl_next::FlexibleResult::Err(response)
9374 }
9375 }
9376
9377 pub struct DictionaryCopy;
9378
9379 impl ::fidl_next::Method for DictionaryCopy {
9380 const ORDINAL: u64 = 3977783339739362383;
9381 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9382 ::fidl_next::protocol::Flexibility::Flexible;
9383
9384 type Protocol = crate::CapabilityStore;
9385
9386 type Request = crate::wire::CapabilityStoreDictionaryCopyRequest;
9387 }
9388
9389 impl ::fidl_next::TwoWayMethod for DictionaryCopy {
9390 type Response = ::fidl_next::wire::FlexibleResult<
9391 'static,
9392 crate::wire::CapabilityStoreDictionaryCopyResponse,
9393 crate::wire::CapabilityStoreError,
9394 >;
9395 }
9396
9397 impl<___R> ::fidl_next::Respond<___R> for DictionaryCopy {
9398 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9399
9400 fn respond(response: ___R) -> Self::Output {
9401 ::fidl_next::FlexibleResult::Ok(response)
9402 }
9403 }
9404
9405 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryCopy {
9406 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9407
9408 fn respond_err(response: ___R) -> Self::Output {
9409 ::fidl_next::FlexibleResult::Err(response)
9410 }
9411 }
9412
9413 pub struct DictionaryKeys;
9414
9415 impl ::fidl_next::Method for DictionaryKeys {
9416 const ORDINAL: u64 = 597577248872787102;
9417 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9418 ::fidl_next::protocol::Flexibility::Flexible;
9419
9420 type Protocol = crate::CapabilityStore;
9421
9422 type Request = crate::wire::CapabilityStoreDictionaryKeysRequest;
9423 }
9424
9425 impl ::fidl_next::TwoWayMethod for DictionaryKeys {
9426 type Response = ::fidl_next::wire::FlexibleResult<
9427 'static,
9428 crate::wire::CapabilityStoreDictionaryKeysResponse,
9429 crate::wire::CapabilityStoreError,
9430 >;
9431 }
9432
9433 impl<___R> ::fidl_next::Respond<___R> for DictionaryKeys {
9434 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9435
9436 fn respond(response: ___R) -> Self::Output {
9437 ::fidl_next::FlexibleResult::Ok(response)
9438 }
9439 }
9440
9441 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryKeys {
9442 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9443
9444 fn respond_err(response: ___R) -> Self::Output {
9445 ::fidl_next::FlexibleResult::Err(response)
9446 }
9447 }
9448
9449 pub struct DictionaryEnumerate;
9450
9451 impl ::fidl_next::Method for DictionaryEnumerate {
9452 const ORDINAL: u64 = 964467096271472193;
9453 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9454 ::fidl_next::protocol::Flexibility::Flexible;
9455
9456 type Protocol = crate::CapabilityStore;
9457
9458 type Request = crate::wire::CapabilityStoreDictionaryEnumerateRequest;
9459 }
9460
9461 impl ::fidl_next::TwoWayMethod for DictionaryEnumerate {
9462 type Response = ::fidl_next::wire::FlexibleResult<
9463 'static,
9464 crate::wire::CapabilityStoreDictionaryEnumerateResponse,
9465 crate::wire::CapabilityStoreError,
9466 >;
9467 }
9468
9469 impl<___R> ::fidl_next::Respond<___R> for DictionaryEnumerate {
9470 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9471
9472 fn respond(response: ___R) -> Self::Output {
9473 ::fidl_next::FlexibleResult::Ok(response)
9474 }
9475 }
9476
9477 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryEnumerate {
9478 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9479
9480 fn respond_err(response: ___R) -> Self::Output {
9481 ::fidl_next::FlexibleResult::Err(response)
9482 }
9483 }
9484
9485 pub struct DictionaryDrain;
9486
9487 impl ::fidl_next::Method for DictionaryDrain {
9488 const ORDINAL: u64 = 2928364469569621208;
9489 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9490 ::fidl_next::protocol::Flexibility::Flexible;
9491
9492 type Protocol = crate::CapabilityStore;
9493
9494 type Request = crate::wire::CapabilityStoreDictionaryDrainRequest;
9495 }
9496
9497 impl ::fidl_next::TwoWayMethod for DictionaryDrain {
9498 type Response = ::fidl_next::wire::FlexibleResult<
9499 'static,
9500 crate::wire::CapabilityStoreDictionaryDrainResponse,
9501 crate::wire::CapabilityStoreError,
9502 >;
9503 }
9504
9505 impl<___R> ::fidl_next::Respond<___R> for DictionaryDrain {
9506 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9507
9508 fn respond(response: ___R) -> Self::Output {
9509 ::fidl_next::FlexibleResult::Ok(response)
9510 }
9511 }
9512
9513 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryDrain {
9514 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9515
9516 fn respond_err(response: ___R) -> Self::Output {
9517 ::fidl_next::FlexibleResult::Err(response)
9518 }
9519 }
9520
9521 pub struct CreateServiceAggregate;
9522
9523 impl ::fidl_next::Method for CreateServiceAggregate {
9524 const ORDINAL: u64 = 5009147843253209178;
9525 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9526 ::fidl_next::protocol::Flexibility::Flexible;
9527
9528 type Protocol = crate::CapabilityStore;
9529
9530 type Request = crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>;
9531 }
9532
9533 impl ::fidl_next::TwoWayMethod for CreateServiceAggregate {
9534 type Response = ::fidl_next::wire::FlexibleResult<
9535 'static,
9536 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
9537 crate::wire::CapabilityStoreError,
9538 >;
9539 }
9540
9541 impl<___R> ::fidl_next::Respond<___R> for CreateServiceAggregate {
9542 type Output = ::fidl_next::FlexibleResult<
9543 crate::generic::CapabilityStoreCreateServiceAggregateResponse<___R>,
9544 ::fidl_next::util::Never,
9545 >;
9546
9547 fn respond(response: ___R) -> Self::Output {
9548 ::fidl_next::FlexibleResult::Ok(
9549 crate::generic::CapabilityStoreCreateServiceAggregateResponse {
9550 aggregate_dir_connector: response,
9551 },
9552 )
9553 }
9554 }
9555
9556 impl<___R> ::fidl_next::RespondErr<___R> for CreateServiceAggregate {
9557 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9558
9559 fn respond_err(response: ___R) -> Self::Output {
9560 ::fidl_next::FlexibleResult::Err(response)
9561 }
9562 }
9563
9564 mod ___detail {
9565 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::CapabilityStore
9566 where
9567 ___T: ::fidl_next::Transport,
9568 {
9569 type Client = CapabilityStoreClient<___T>;
9570 type Server = CapabilityStoreServer<___T>;
9571 }
9572
9573 #[repr(transparent)]
9575 pub struct CapabilityStoreClient<___T: ::fidl_next::Transport> {
9576 #[allow(dead_code)]
9577 client: ::fidl_next::protocol::Client<___T>,
9578 }
9579
9580 impl<___T> CapabilityStoreClient<___T>
9581 where
9582 ___T: ::fidl_next::Transport,
9583 {
9584 #[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"]
9585 pub fn duplicate(
9586 &self,
9587
9588 id: impl ::fidl_next::Encode<
9589 ::fidl_next::wire::Uint64,
9590 <___T as ::fidl_next::Transport>::SendBuffer,
9591 >,
9592
9593 dest_id: impl ::fidl_next::Encode<
9594 ::fidl_next::wire::Uint64,
9595 <___T as ::fidl_next::Transport>::SendBuffer,
9596 >,
9597 ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
9598 where
9599 <___T as ::fidl_next::Transport>::SendBuffer:
9600 ::fidl_next::encoder::InternalHandleEncoder,
9601 {
9602 self.duplicate_with(crate::generic::CapabilityStoreDuplicateRequest { id, dest_id })
9603 }
9604
9605 #[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"]
9606 pub fn duplicate_with<___R>(
9607 &self,
9608 request: ___R,
9609 ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
9610 where
9611 ___R: ::fidl_next::Encode<
9612 crate::wire::CapabilityStoreDuplicateRequest,
9613 <___T as ::fidl_next::Transport>::SendBuffer,
9614 >,
9615 {
9616 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9617 6727592627741008260,
9618 <super::Duplicate as ::fidl_next::Method>::FLEXIBILITY,
9619 request,
9620 ))
9621 }
9622
9623 #[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"]
9624 pub fn drop(
9625 &self,
9626
9627 id: impl ::fidl_next::Encode<
9628 ::fidl_next::wire::Uint64,
9629 <___T as ::fidl_next::Transport>::SendBuffer,
9630 >,
9631 ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
9632 where
9633 <___T as ::fidl_next::Transport>::SendBuffer:
9634 ::fidl_next::encoder::InternalHandleEncoder,
9635 {
9636 self.drop_with(crate::generic::CapabilityStoreDropRequest { id })
9637 }
9638
9639 #[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"]
9640 pub fn drop_with<___R>(
9641 &self,
9642 request: ___R,
9643 ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
9644 where
9645 ___R: ::fidl_next::Encode<
9646 crate::wire::CapabilityStoreDropRequest,
9647 <___T as ::fidl_next::Transport>::SendBuffer,
9648 >,
9649 {
9650 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9651 753328233834620249,
9652 <super::Drop as ::fidl_next::Method>::FLEXIBILITY,
9653 request,
9654 ))
9655 }
9656
9657 #[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"]
9658 pub fn export(
9659 &self,
9660
9661 id: impl ::fidl_next::Encode<
9662 ::fidl_next::wire::Uint64,
9663 <___T as ::fidl_next::Transport>::SendBuffer,
9664 >,
9665 ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
9666 where
9667 <___T as ::fidl_next::Transport>::SendBuffer:
9668 ::fidl_next::encoder::InternalHandleEncoder,
9669 {
9670 self.export_with(crate::generic::CapabilityStoreExportRequest { id })
9671 }
9672
9673 #[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"]
9674 pub fn export_with<___R>(
9675 &self,
9676 request: ___R,
9677 ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
9678 where
9679 ___R: ::fidl_next::Encode<
9680 crate::wire::CapabilityStoreExportRequest,
9681 <___T as ::fidl_next::Transport>::SendBuffer,
9682 >,
9683 {
9684 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9685 226159162093533951,
9686 <super::Export as ::fidl_next::Method>::FLEXIBILITY,
9687 request,
9688 ))
9689 }
9690
9691 #[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"]
9692 pub fn import(
9693 &self,
9694
9695 id: impl ::fidl_next::Encode<
9696 ::fidl_next::wire::Uint64,
9697 <___T as ::fidl_next::Transport>::SendBuffer,
9698 >,
9699
9700 capability: impl ::fidl_next::Encode<
9701 crate::wire::Capability<'static>,
9702 <___T as ::fidl_next::Transport>::SendBuffer,
9703 >,
9704 ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
9705 where
9706 <___T as ::fidl_next::Transport>::SendBuffer:
9707 ::fidl_next::encoder::InternalHandleEncoder,
9708 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9709 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9710 {
9711 self.import_with(crate::generic::CapabilityStoreImportRequest { id, capability })
9712 }
9713
9714 #[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"]
9715 pub fn import_with<___R>(
9716 &self,
9717 request: ___R,
9718 ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
9719 where
9720 ___R: ::fidl_next::Encode<
9721 crate::wire::CapabilityStoreImportRequest<'static>,
9722 <___T as ::fidl_next::Transport>::SendBuffer,
9723 >,
9724 {
9725 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9726 2276030276116435867,
9727 <super::Import as ::fidl_next::Method>::FLEXIBILITY,
9728 request,
9729 ))
9730 }
9731
9732 #[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"]
9733 pub fn connector_create(
9734 &self,
9735
9736 id: impl ::fidl_next::Encode<
9737 ::fidl_next::wire::Uint64,
9738 <___T as ::fidl_next::Transport>::SendBuffer,
9739 >,
9740
9741 receiver: impl ::fidl_next::Encode<
9742 ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
9743 <___T as ::fidl_next::Transport>::SendBuffer,
9744 >,
9745 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
9746 where
9747 <___T as ::fidl_next::Transport>::SendBuffer:
9748 ::fidl_next::encoder::InternalHandleEncoder,
9749 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9750 {
9751 self.connector_create_with(crate::generic::CapabilityStoreConnectorCreateRequest {
9752 id,
9753
9754 receiver,
9755 })
9756 }
9757
9758 #[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"]
9759 pub fn connector_create_with<___R>(
9760 &self,
9761 request: ___R,
9762 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
9763 where
9764 ___R: ::fidl_next::Encode<
9765 crate::wire::CapabilityStoreConnectorCreateRequest,
9766 <___T as ::fidl_next::Transport>::SendBuffer,
9767 >,
9768 {
9769 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9770 2979461408102095909,
9771 <super::ConnectorCreate as ::fidl_next::Method>::FLEXIBILITY,
9772 request,
9773 ))
9774 }
9775
9776 #[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"]
9777 pub fn connector_open(
9778 &self,
9779
9780 id: impl ::fidl_next::Encode<
9781 ::fidl_next::wire::Uint64,
9782 <___T as ::fidl_next::Transport>::SendBuffer,
9783 >,
9784
9785 server_end: impl ::fidl_next::Encode<
9786 ::fidl_next::wire::fuchsia::Channel,
9787 <___T as ::fidl_next::Transport>::SendBuffer,
9788 >,
9789 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
9790 where
9791 <___T as ::fidl_next::Transport>::SendBuffer:
9792 ::fidl_next::encoder::InternalHandleEncoder,
9793 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9794 {
9795 self.connector_open_with(crate::generic::CapabilityStoreConnectorOpenRequest {
9796 id,
9797
9798 server_end,
9799 })
9800 }
9801
9802 #[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"]
9803 pub fn connector_open_with<___R>(
9804 &self,
9805 request: ___R,
9806 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
9807 where
9808 ___R: ::fidl_next::Encode<
9809 crate::wire::CapabilityStoreConnectorOpenRequest,
9810 <___T as ::fidl_next::Transport>::SendBuffer,
9811 >,
9812 {
9813 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9814 6016362336453278623,
9815 <super::ConnectorOpen as ::fidl_next::Method>::FLEXIBILITY,
9816 request,
9817 ))
9818 }
9819
9820 #[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"]
9821 pub fn dir_connector_create(
9822 &self,
9823
9824 id: impl ::fidl_next::Encode<
9825 ::fidl_next::wire::Uint64,
9826 <___T as ::fidl_next::Transport>::SendBuffer,
9827 >,
9828
9829 receiver: impl ::fidl_next::Encode<
9830 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
9831 <___T as ::fidl_next::Transport>::SendBuffer,
9832 >,
9833 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
9834 where
9835 <___T as ::fidl_next::Transport>::SendBuffer:
9836 ::fidl_next::encoder::InternalHandleEncoder,
9837 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9838 {
9839 self.dir_connector_create_with(
9840 crate::generic::CapabilityStoreDirConnectorCreateRequest { id, receiver },
9841 )
9842 }
9843
9844 #[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"]
9845 pub fn dir_connector_create_with<___R>(
9846 &self,
9847 request: ___R,
9848 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
9849 where
9850 ___R: ::fidl_next::Encode<
9851 crate::wire::CapabilityStoreDirConnectorCreateRequest,
9852 <___T as ::fidl_next::Transport>::SendBuffer,
9853 >,
9854 {
9855 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9856 1756747594275428795,
9857 <super::DirConnectorCreate as ::fidl_next::Method>::FLEXIBILITY,
9858 request,
9859 ))
9860 }
9861
9862 #[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"]
9863 pub fn dir_connector_open_with<___R>(
9864 &self,
9865 request: ___R,
9866 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorOpen, ___T>
9867 where
9868 ___R: ::fidl_next::Encode<
9869 crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>,
9870 <___T as ::fidl_next::Transport>::SendBuffer,
9871 >,
9872 {
9873 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9874 6219704004220369153,
9875 <super::DirConnectorOpen as ::fidl_next::Method>::FLEXIBILITY,
9876 request,
9877 ))
9878 }
9879
9880 #[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"]
9881 pub fn dictionary_create(
9882 &self,
9883
9884 id: impl ::fidl_next::Encode<
9885 ::fidl_next::wire::Uint64,
9886 <___T as ::fidl_next::Transport>::SendBuffer,
9887 >,
9888 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
9889 where
9890 <___T as ::fidl_next::Transport>::SendBuffer:
9891 ::fidl_next::encoder::InternalHandleEncoder,
9892 {
9893 self.dictionary_create_with(
9894 crate::generic::CapabilityStoreDictionaryCreateRequest { id },
9895 )
9896 }
9897
9898 #[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"]
9899 pub fn dictionary_create_with<___R>(
9900 &self,
9901 request: ___R,
9902 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
9903 where
9904 ___R: ::fidl_next::Encode<
9905 crate::wire::CapabilityStoreDictionaryCreateRequest,
9906 <___T as ::fidl_next::Transport>::SendBuffer,
9907 >,
9908 {
9909 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9910 7608770958894948499,
9911 <super::DictionaryCreate as ::fidl_next::Method>::FLEXIBILITY,
9912 request,
9913 ))
9914 }
9915
9916 #[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"]
9917 pub fn dictionary_legacy_import(
9918 &self,
9919
9920 id: impl ::fidl_next::Encode<
9921 ::fidl_next::wire::Uint64,
9922 <___T as ::fidl_next::Transport>::SendBuffer,
9923 >,
9924
9925 client_end: impl ::fidl_next::Encode<
9926 ::fidl_next::wire::fuchsia::Channel,
9927 <___T as ::fidl_next::Transport>::SendBuffer,
9928 >,
9929 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
9930 where
9931 <___T as ::fidl_next::Transport>::SendBuffer:
9932 ::fidl_next::encoder::InternalHandleEncoder,
9933 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9934 {
9935 self.dictionary_legacy_import_with(
9936 crate::generic::CapabilityStoreDictionaryLegacyImportRequest { id, client_end },
9937 )
9938 }
9939
9940 #[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"]
9941 pub fn dictionary_legacy_import_with<___R>(
9942 &self,
9943 request: ___R,
9944 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
9945 where
9946 ___R: ::fidl_next::Encode<
9947 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
9948 <___T as ::fidl_next::Transport>::SendBuffer,
9949 >,
9950 {
9951 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9952 8285893703432012383,
9953 <super::DictionaryLegacyImport as ::fidl_next::Method>::FLEXIBILITY,
9954 request,
9955 ))
9956 }
9957
9958 #[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"]
9959 pub fn dictionary_legacy_export(
9960 &self,
9961
9962 id: impl ::fidl_next::Encode<
9963 ::fidl_next::wire::Uint64,
9964 <___T as ::fidl_next::Transport>::SendBuffer,
9965 >,
9966
9967 server_end: impl ::fidl_next::Encode<
9968 ::fidl_next::wire::fuchsia::Channel,
9969 <___T as ::fidl_next::Transport>::SendBuffer,
9970 >,
9971 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
9972 where
9973 <___T as ::fidl_next::Transport>::SendBuffer:
9974 ::fidl_next::encoder::InternalHandleEncoder,
9975 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9976 {
9977 self.dictionary_legacy_export_with(
9978 crate::generic::CapabilityStoreDictionaryLegacyExportRequest { id, server_end },
9979 )
9980 }
9981
9982 #[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"]
9983 pub fn dictionary_legacy_export_with<___R>(
9984 &self,
9985 request: ___R,
9986 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
9987 where
9988 ___R: ::fidl_next::Encode<
9989 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
9990 <___T as ::fidl_next::Transport>::SendBuffer,
9991 >,
9992 {
9993 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9994 4647175832683306445,
9995 <super::DictionaryLegacyExport as ::fidl_next::Method>::FLEXIBILITY,
9996 request,
9997 ))
9998 }
9999
10000 #[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"]
10001 pub fn dictionary_insert(
10002 &self,
10003
10004 id: impl ::fidl_next::Encode<
10005 ::fidl_next::wire::Uint64,
10006 <___T as ::fidl_next::Transport>::SendBuffer,
10007 >,
10008
10009 item: impl ::fidl_next::Encode<
10010 crate::wire::DictionaryItem<'static>,
10011 <___T as ::fidl_next::Transport>::SendBuffer,
10012 >,
10013 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
10014 where
10015 <___T as ::fidl_next::Transport>::SendBuffer:
10016 ::fidl_next::encoder::InternalHandleEncoder,
10017 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10018 {
10019 self.dictionary_insert_with(
10020 crate::generic::CapabilityStoreDictionaryInsertRequest { id, item },
10021 )
10022 }
10023
10024 #[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"]
10025 pub fn dictionary_insert_with<___R>(
10026 &self,
10027 request: ___R,
10028 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
10029 where
10030 ___R: ::fidl_next::Encode<
10031 crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
10032 <___T as ::fidl_next::Transport>::SendBuffer,
10033 >,
10034 {
10035 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10036 8575443262986538023,
10037 <super::DictionaryInsert as ::fidl_next::Method>::FLEXIBILITY,
10038 request,
10039 ))
10040 }
10041
10042 #[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"]
10043 pub fn dictionary_get(
10044 &self,
10045
10046 id: impl ::fidl_next::Encode<
10047 ::fidl_next::wire::Uint64,
10048 <___T as ::fidl_next::Transport>::SendBuffer,
10049 >,
10050
10051 key: impl ::fidl_next::Encode<
10052 ::fidl_next::wire::String<'static>,
10053 <___T as ::fidl_next::Transport>::SendBuffer,
10054 >,
10055
10056 dest_id: impl ::fidl_next::Encode<
10057 ::fidl_next::wire::Uint64,
10058 <___T as ::fidl_next::Transport>::SendBuffer,
10059 >,
10060 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
10061 where
10062 <___T as ::fidl_next::Transport>::SendBuffer:
10063 ::fidl_next::encoder::InternalHandleEncoder,
10064 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10065 {
10066 self.dictionary_get_with(crate::generic::CapabilityStoreDictionaryGetRequest {
10067 id,
10068
10069 key,
10070
10071 dest_id,
10072 })
10073 }
10074
10075 #[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"]
10076 pub fn dictionary_get_with<___R>(
10077 &self,
10078 request: ___R,
10079 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
10080 where
10081 ___R: ::fidl_next::Encode<
10082 crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
10083 <___T as ::fidl_next::Transport>::SendBuffer,
10084 >,
10085 {
10086 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10087 5592951026866236882,
10088 <super::DictionaryGet as ::fidl_next::Method>::FLEXIBILITY,
10089 request,
10090 ))
10091 }
10092
10093 #[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"]
10094 pub fn dictionary_remove(
10095 &self,
10096
10097 id: impl ::fidl_next::Encode<
10098 ::fidl_next::wire::Uint64,
10099 <___T as ::fidl_next::Transport>::SendBuffer,
10100 >,
10101
10102 key: impl ::fidl_next::Encode<
10103 ::fidl_next::wire::String<'static>,
10104 <___T as ::fidl_next::Transport>::SendBuffer,
10105 >,
10106
10107 dest_id: impl ::fidl_next::Encode<
10108 ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
10109 <___T as ::fidl_next::Transport>::SendBuffer,
10110 >,
10111 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
10112 where
10113 <___T as ::fidl_next::Transport>::SendBuffer:
10114 ::fidl_next::encoder::InternalHandleEncoder,
10115 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10116 {
10117 self.dictionary_remove_with(
10118 crate::generic::CapabilityStoreDictionaryRemoveRequest { id, key, dest_id },
10119 )
10120 }
10121
10122 #[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"]
10123 pub fn dictionary_remove_with<___R>(
10124 &self,
10125 request: ___R,
10126 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
10127 where
10128 ___R: ::fidl_next::Encode<
10129 crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
10130 <___T as ::fidl_next::Transport>::SendBuffer,
10131 >,
10132 {
10133 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10134 343892214579320051,
10135 <super::DictionaryRemove as ::fidl_next::Method>::FLEXIBILITY,
10136 request,
10137 ))
10138 }
10139
10140 #[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"]
10141 pub fn dictionary_copy(
10142 &self,
10143
10144 id: impl ::fidl_next::Encode<
10145 ::fidl_next::wire::Uint64,
10146 <___T as ::fidl_next::Transport>::SendBuffer,
10147 >,
10148
10149 dest_id: impl ::fidl_next::Encode<
10150 ::fidl_next::wire::Uint64,
10151 <___T as ::fidl_next::Transport>::SendBuffer,
10152 >,
10153 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
10154 where
10155 <___T as ::fidl_next::Transport>::SendBuffer:
10156 ::fidl_next::encoder::InternalHandleEncoder,
10157 {
10158 self.dictionary_copy_with(crate::generic::CapabilityStoreDictionaryCopyRequest {
10159 id,
10160
10161 dest_id,
10162 })
10163 }
10164
10165 #[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"]
10166 pub fn dictionary_copy_with<___R>(
10167 &self,
10168 request: ___R,
10169 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
10170 where
10171 ___R: ::fidl_next::Encode<
10172 crate::wire::CapabilityStoreDictionaryCopyRequest,
10173 <___T as ::fidl_next::Transport>::SendBuffer,
10174 >,
10175 {
10176 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10177 3977783339739362383,
10178 <super::DictionaryCopy as ::fidl_next::Method>::FLEXIBILITY,
10179 request,
10180 ))
10181 }
10182
10183 #[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"]
10184 pub fn dictionary_keys(
10185 &self,
10186
10187 id: impl ::fidl_next::Encode<
10188 ::fidl_next::wire::Uint64,
10189 <___T as ::fidl_next::Transport>::SendBuffer,
10190 >,
10191
10192 iterator: impl ::fidl_next::Encode<
10193 ::fidl_next::ServerEnd<
10194 crate::DictionaryKeysIterator,
10195 ::fidl_next::wire::fuchsia::Channel,
10196 >,
10197 <___T as ::fidl_next::Transport>::SendBuffer,
10198 >,
10199 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
10200 where
10201 <___T as ::fidl_next::Transport>::SendBuffer:
10202 ::fidl_next::encoder::InternalHandleEncoder,
10203 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10204 {
10205 self.dictionary_keys_with(crate::generic::CapabilityStoreDictionaryKeysRequest {
10206 id,
10207
10208 iterator,
10209 })
10210 }
10211
10212 #[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"]
10213 pub fn dictionary_keys_with<___R>(
10214 &self,
10215 request: ___R,
10216 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
10217 where
10218 ___R: ::fidl_next::Encode<
10219 crate::wire::CapabilityStoreDictionaryKeysRequest,
10220 <___T as ::fidl_next::Transport>::SendBuffer,
10221 >,
10222 {
10223 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10224 597577248872787102,
10225 <super::DictionaryKeys as ::fidl_next::Method>::FLEXIBILITY,
10226 request,
10227 ))
10228 }
10229
10230 #[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"]
10231 pub fn dictionary_enumerate(
10232 &self,
10233
10234 id: impl ::fidl_next::Encode<
10235 ::fidl_next::wire::Uint64,
10236 <___T as ::fidl_next::Transport>::SendBuffer,
10237 >,
10238
10239 iterator: impl ::fidl_next::Encode<
10240 ::fidl_next::ServerEnd<
10241 crate::DictionaryEnumerateIterator,
10242 ::fidl_next::wire::fuchsia::Channel,
10243 >,
10244 <___T as ::fidl_next::Transport>::SendBuffer,
10245 >,
10246 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
10247 where
10248 <___T as ::fidl_next::Transport>::SendBuffer:
10249 ::fidl_next::encoder::InternalHandleEncoder,
10250 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10251 {
10252 self.dictionary_enumerate_with(
10253 crate::generic::CapabilityStoreDictionaryEnumerateRequest { id, iterator },
10254 )
10255 }
10256
10257 #[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"]
10258 pub fn dictionary_enumerate_with<___R>(
10259 &self,
10260 request: ___R,
10261 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
10262 where
10263 ___R: ::fidl_next::Encode<
10264 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
10265 <___T as ::fidl_next::Transport>::SendBuffer,
10266 >,
10267 {
10268 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10269 964467096271472193,
10270 <super::DictionaryEnumerate as ::fidl_next::Method>::FLEXIBILITY,
10271 request,
10272 ))
10273 }
10274
10275 #[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"]
10276 pub fn dictionary_drain(
10277 &self,
10278
10279 id: impl ::fidl_next::Encode<
10280 ::fidl_next::wire::Uint64,
10281 <___T as ::fidl_next::Transport>::SendBuffer,
10282 >,
10283
10284 iterator: impl ::fidl_next::Encode<
10285 ::fidl_next::ServerEnd<
10286 crate::DictionaryDrainIterator,
10287 ::fidl_next::wire::fuchsia::OptionalChannel,
10288 >,
10289 <___T as ::fidl_next::Transport>::SendBuffer,
10290 >,
10291 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
10292 where
10293 <___T as ::fidl_next::Transport>::SendBuffer:
10294 ::fidl_next::encoder::InternalHandleEncoder,
10295 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10296 {
10297 self.dictionary_drain_with(crate::generic::CapabilityStoreDictionaryDrainRequest {
10298 id,
10299
10300 iterator,
10301 })
10302 }
10303
10304 #[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"]
10305 pub fn dictionary_drain_with<___R>(
10306 &self,
10307 request: ___R,
10308 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
10309 where
10310 ___R: ::fidl_next::Encode<
10311 crate::wire::CapabilityStoreDictionaryDrainRequest,
10312 <___T as ::fidl_next::Transport>::SendBuffer,
10313 >,
10314 {
10315 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10316 2928364469569621208,
10317 <super::DictionaryDrain as ::fidl_next::Method>::FLEXIBILITY,
10318 request,
10319 ))
10320 }
10321
10322 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10323 pub fn create_service_aggregate(
10324 &self,
10325
10326 sources: impl ::fidl_next::Encode<
10327 ::fidl_next::wire::Vector<'static, crate::wire::AggregateSource<'static>>,
10328 <___T as ::fidl_next::Transport>::SendBuffer,
10329 >,
10330 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateServiceAggregate, ___T>
10331 where
10332 <___T as ::fidl_next::Transport>::SendBuffer:
10333 ::fidl_next::encoder::InternalHandleEncoder,
10334 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10335 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10336 {
10337 self.create_service_aggregate_with(
10338 crate::generic::CapabilityStoreCreateServiceAggregateRequest { sources },
10339 )
10340 }
10341
10342 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10343 pub fn create_service_aggregate_with<___R>(
10344 &self,
10345 request: ___R,
10346 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateServiceAggregate, ___T>
10347 where
10348 ___R: ::fidl_next::Encode<
10349 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
10350 <___T as ::fidl_next::Transport>::SendBuffer,
10351 >,
10352 {
10353 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10354 5009147843253209178,
10355 <super::CreateServiceAggregate as ::fidl_next::Method>::FLEXIBILITY,
10356 request,
10357 ))
10358 }
10359 }
10360
10361 #[repr(transparent)]
10363 pub struct CapabilityStoreServer<___T: ::fidl_next::Transport> {
10364 server: ::fidl_next::protocol::Server<___T>,
10365 }
10366
10367 impl<___T> CapabilityStoreServer<___T> where ___T: ::fidl_next::Transport {}
10368 }
10369}
10370
10371#[diagnostic::on_unimplemented(
10372 note = "If {Self} implements the non-local CapabilityStoreClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10373)]
10374
10375pub trait CapabilityStoreLocalClientHandler<
10379 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10380 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10381>
10382{
10383 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10384 ::core::future::ready(())
10385 }
10386}
10387
10388impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for CapabilityStore
10389where
10390 ___H: CapabilityStoreLocalClientHandler<___T>,
10391 ___T: ::fidl_next::Transport,
10392{
10393 async fn on_event(
10394 handler: &mut ___H,
10395 ordinal: u64,
10396 flexibility: ::fidl_next::protocol::Flexibility,
10397 body: ::fidl_next::Body<___T>,
10398 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10399 match ordinal {
10400 ordinal => {
10401 handler.on_unknown_interaction(ordinal).await;
10402 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10403 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10404 } else {
10405 Ok(())
10406 }
10407 }
10408 }
10409 }
10410}
10411
10412#[diagnostic::on_unimplemented(
10413 note = "If {Self} implements the non-local CapabilityStoreServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10414)]
10415
10416pub trait CapabilityStoreLocalServerHandler<
10420 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10421 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10422>
10423{
10424 #[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"]
10425 fn duplicate(
10426 &mut self,
10427
10428 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
10429
10430 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
10431 ) -> impl ::core::future::Future<Output = ()>;
10432
10433 #[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"]
10434 fn drop(
10435 &mut self,
10436
10437 request: ::fidl_next::Request<capability_store::Drop, ___T>,
10438
10439 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
10440 ) -> impl ::core::future::Future<Output = ()>;
10441
10442 #[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"]
10443 fn export(
10444 &mut self,
10445
10446 request: ::fidl_next::Request<capability_store::Export, ___T>,
10447
10448 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
10449 ) -> impl ::core::future::Future<Output = ()>;
10450
10451 #[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"]
10452 fn import(
10453 &mut self,
10454
10455 request: ::fidl_next::Request<capability_store::Import, ___T>,
10456
10457 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
10458 ) -> impl ::core::future::Future<Output = ()>;
10459
10460 #[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"]
10461 fn connector_create(
10462 &mut self,
10463
10464 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
10465
10466 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
10467 ) -> impl ::core::future::Future<Output = ()>;
10468
10469 #[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"]
10470 fn connector_open(
10471 &mut self,
10472
10473 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
10474
10475 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
10476 ) -> impl ::core::future::Future<Output = ()>;
10477
10478 #[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"]
10479 fn dir_connector_create(
10480 &mut self,
10481
10482 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
10483
10484 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
10485 ) -> impl ::core::future::Future<Output = ()>;
10486
10487 #[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"]
10488 fn dir_connector_open(
10489 &mut self,
10490
10491 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
10492
10493 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
10494 ) -> impl ::core::future::Future<Output = ()>;
10495
10496 #[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"]
10497 fn dictionary_create(
10498 &mut self,
10499
10500 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
10501
10502 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
10503 ) -> impl ::core::future::Future<Output = ()>;
10504
10505 #[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"]
10506 fn dictionary_legacy_import(
10507 &mut self,
10508
10509 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
10510
10511 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
10512 ) -> impl ::core::future::Future<Output = ()>;
10513
10514 #[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"]
10515 fn dictionary_legacy_export(
10516 &mut self,
10517
10518 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
10519
10520 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
10521 ) -> impl ::core::future::Future<Output = ()>;
10522
10523 #[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"]
10524 fn dictionary_insert(
10525 &mut self,
10526
10527 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
10528
10529 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
10530 ) -> impl ::core::future::Future<Output = ()>;
10531
10532 #[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"]
10533 fn dictionary_get(
10534 &mut self,
10535
10536 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
10537
10538 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
10539 ) -> impl ::core::future::Future<Output = ()>;
10540
10541 #[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"]
10542 fn dictionary_remove(
10543 &mut self,
10544
10545 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
10546
10547 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
10548 ) -> impl ::core::future::Future<Output = ()>;
10549
10550 #[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"]
10551 fn dictionary_copy(
10552 &mut self,
10553
10554 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
10555
10556 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
10557 ) -> impl ::core::future::Future<Output = ()>;
10558
10559 #[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"]
10560 fn dictionary_keys(
10561 &mut self,
10562
10563 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
10564
10565 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
10566 ) -> impl ::core::future::Future<Output = ()>;
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 fn dictionary_enumerate(
10570 &mut self,
10571
10572 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
10573
10574 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
10575 ) -> impl ::core::future::Future<Output = ()>;
10576
10577 #[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"]
10578 fn dictionary_drain(
10579 &mut self,
10580
10581 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
10582
10583 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
10584 ) -> impl ::core::future::Future<Output = ()>;
10585
10586 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10587 fn create_service_aggregate(
10588 &mut self,
10589
10590 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
10591
10592 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
10593 ) -> impl ::core::future::Future<Output = ()>;
10594
10595 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10596 ::core::future::ready(())
10597 }
10598}
10599
10600impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for CapabilityStore
10601where
10602 ___H: CapabilityStoreLocalServerHandler<___T>,
10603 ___T: ::fidl_next::Transport,
10604 for<'de> crate::wire::CapabilityStoreDuplicateRequest: ::fidl_next::Decode<
10605 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10606 Constraint = (),
10607 >,
10608 for<'de> crate::wire::CapabilityStoreDropRequest: ::fidl_next::Decode<
10609 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10610 Constraint = (),
10611 >,
10612 for<'de> crate::wire::CapabilityStoreExportRequest: ::fidl_next::Decode<
10613 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10614 Constraint = (),
10615 >,
10616 for<'de> crate::wire::CapabilityStoreImportRequest<'de>: ::fidl_next::Decode<
10617 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10618 Constraint = (),
10619 >,
10620 for<'de> crate::wire::CapabilityStoreConnectorCreateRequest: ::fidl_next::Decode<
10621 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10622 Constraint = (),
10623 >,
10624 for<'de> crate::wire::CapabilityStoreConnectorOpenRequest: ::fidl_next::Decode<
10625 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10626 Constraint = (),
10627 >,
10628 for<'de> crate::wire::CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Decode<
10629 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10630 Constraint = (),
10631 >,
10632 for<'de> crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>: ::fidl_next::Decode<
10633 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10634 Constraint = (),
10635 >,
10636 for<'de> crate::wire::CapabilityStoreDictionaryCreateRequest: ::fidl_next::Decode<
10637 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10638 Constraint = (),
10639 >,
10640 for<'de> crate::wire::CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Decode<
10641 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10642 Constraint = (),
10643 >,
10644 for<'de> crate::wire::CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Decode<
10645 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10646 Constraint = (),
10647 >,
10648 for<'de> crate::wire::CapabilityStoreDictionaryInsertRequest<'de>: ::fidl_next::Decode<
10649 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10650 Constraint = (),
10651 >,
10652 for<'de> crate::wire::CapabilityStoreDictionaryGetRequest<'de>: ::fidl_next::Decode<
10653 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10654 Constraint = (),
10655 >,
10656 for<'de> crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>: ::fidl_next::Decode<
10657 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10658 Constraint = (),
10659 >,
10660 for<'de> crate::wire::CapabilityStoreDictionaryCopyRequest: ::fidl_next::Decode<
10661 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10662 Constraint = (),
10663 >,
10664 for<'de> crate::wire::CapabilityStoreDictionaryKeysRequest: ::fidl_next::Decode<
10665 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10666 Constraint = (),
10667 >,
10668 for<'de> crate::wire::CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Decode<
10669 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10670 Constraint = (),
10671 >,
10672 for<'de> crate::wire::CapabilityStoreDictionaryDrainRequest: ::fidl_next::Decode<
10673 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10674 Constraint = (),
10675 >,
10676 for<'de> crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>: ::fidl_next::Decode<
10677 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10678 Constraint = (),
10679 >,
10680{
10681 async fn on_one_way(
10682 handler: &mut ___H,
10683 ordinal: u64,
10684 flexibility: ::fidl_next::protocol::Flexibility,
10685 body: ::fidl_next::Body<___T>,
10686 ) -> ::core::result::Result<
10687 (),
10688 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10689 > {
10690 match ordinal {
10691 ordinal => {
10692 handler.on_unknown_interaction(ordinal).await;
10693 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10694 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10695 } else {
10696 Ok(())
10697 }
10698 }
10699 }
10700 }
10701
10702 async fn on_two_way(
10703 handler: &mut ___H,
10704 ordinal: u64,
10705 flexibility: ::fidl_next::protocol::Flexibility,
10706 body: ::fidl_next::Body<___T>,
10707 responder: ::fidl_next::protocol::Responder<___T>,
10708 ) -> ::core::result::Result<
10709 (),
10710 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10711 > {
10712 match ordinal {
10713 6727592627741008260 => {
10714 let responder = ::fidl_next::Responder::from_untyped(responder);
10715
10716 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10717 Ok(decoded) => {
10718 handler
10719 .duplicate(::fidl_next::Request::from_decoded(decoded), responder)
10720 .await;
10721 Ok(())
10722 }
10723 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10724 ordinal: 6727592627741008260,
10725 error,
10726 }),
10727 }
10728 }
10729
10730 753328233834620249 => {
10731 let responder = ::fidl_next::Responder::from_untyped(responder);
10732
10733 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10734 Ok(decoded) => {
10735 handler.drop(::fidl_next::Request::from_decoded(decoded), responder).await;
10736 Ok(())
10737 }
10738 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10739 ordinal: 753328233834620249,
10740 error,
10741 }),
10742 }
10743 }
10744
10745 226159162093533951 => {
10746 let responder = ::fidl_next::Responder::from_untyped(responder);
10747
10748 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10749 Ok(decoded) => {
10750 handler
10751 .export(::fidl_next::Request::from_decoded(decoded), responder)
10752 .await;
10753 Ok(())
10754 }
10755 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10756 ordinal: 226159162093533951,
10757 error,
10758 }),
10759 }
10760 }
10761
10762 2276030276116435867 => {
10763 let responder = ::fidl_next::Responder::from_untyped(responder);
10764
10765 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10766 Ok(decoded) => {
10767 handler
10768 .import(::fidl_next::Request::from_decoded(decoded), responder)
10769 .await;
10770 Ok(())
10771 }
10772 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10773 ordinal: 2276030276116435867,
10774 error,
10775 }),
10776 }
10777 }
10778
10779 2979461408102095909 => {
10780 let responder = ::fidl_next::Responder::from_untyped(responder);
10781
10782 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10783 Ok(decoded) => {
10784 handler
10785 .connector_create(
10786 ::fidl_next::Request::from_decoded(decoded),
10787 responder,
10788 )
10789 .await;
10790 Ok(())
10791 }
10792 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10793 ordinal: 2979461408102095909,
10794 error,
10795 }),
10796 }
10797 }
10798
10799 6016362336453278623 => {
10800 let responder = ::fidl_next::Responder::from_untyped(responder);
10801
10802 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10803 Ok(decoded) => {
10804 handler
10805 .connector_open(::fidl_next::Request::from_decoded(decoded), responder)
10806 .await;
10807 Ok(())
10808 }
10809 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10810 ordinal: 6016362336453278623,
10811 error,
10812 }),
10813 }
10814 }
10815
10816 1756747594275428795 => {
10817 let responder = ::fidl_next::Responder::from_untyped(responder);
10818
10819 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10820 Ok(decoded) => {
10821 handler
10822 .dir_connector_create(
10823 ::fidl_next::Request::from_decoded(decoded),
10824 responder,
10825 )
10826 .await;
10827 Ok(())
10828 }
10829 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10830 ordinal: 1756747594275428795,
10831 error,
10832 }),
10833 }
10834 }
10835
10836 6219704004220369153 => {
10837 let responder = ::fidl_next::Responder::from_untyped(responder);
10838
10839 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10840 Ok(decoded) => {
10841 handler
10842 .dir_connector_open(
10843 ::fidl_next::Request::from_decoded(decoded),
10844 responder,
10845 )
10846 .await;
10847 Ok(())
10848 }
10849 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10850 ordinal: 6219704004220369153,
10851 error,
10852 }),
10853 }
10854 }
10855
10856 7608770958894948499 => {
10857 let responder = ::fidl_next::Responder::from_untyped(responder);
10858
10859 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10860 Ok(decoded) => {
10861 handler
10862 .dictionary_create(
10863 ::fidl_next::Request::from_decoded(decoded),
10864 responder,
10865 )
10866 .await;
10867 Ok(())
10868 }
10869 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10870 ordinal: 7608770958894948499,
10871 error,
10872 }),
10873 }
10874 }
10875
10876 8285893703432012383 => {
10877 let responder = ::fidl_next::Responder::from_untyped(responder);
10878
10879 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10880 Ok(decoded) => {
10881 handler
10882 .dictionary_legacy_import(
10883 ::fidl_next::Request::from_decoded(decoded),
10884 responder,
10885 )
10886 .await;
10887 Ok(())
10888 }
10889 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10890 ordinal: 8285893703432012383,
10891 error,
10892 }),
10893 }
10894 }
10895
10896 4647175832683306445 => {
10897 let responder = ::fidl_next::Responder::from_untyped(responder);
10898
10899 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10900 Ok(decoded) => {
10901 handler
10902 .dictionary_legacy_export(
10903 ::fidl_next::Request::from_decoded(decoded),
10904 responder,
10905 )
10906 .await;
10907 Ok(())
10908 }
10909 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10910 ordinal: 4647175832683306445,
10911 error,
10912 }),
10913 }
10914 }
10915
10916 8575443262986538023 => {
10917 let responder = ::fidl_next::Responder::from_untyped(responder);
10918
10919 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10920 Ok(decoded) => {
10921 handler
10922 .dictionary_insert(
10923 ::fidl_next::Request::from_decoded(decoded),
10924 responder,
10925 )
10926 .await;
10927 Ok(())
10928 }
10929 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10930 ordinal: 8575443262986538023,
10931 error,
10932 }),
10933 }
10934 }
10935
10936 5592951026866236882 => {
10937 let responder = ::fidl_next::Responder::from_untyped(responder);
10938
10939 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10940 Ok(decoded) => {
10941 handler
10942 .dictionary_get(::fidl_next::Request::from_decoded(decoded), responder)
10943 .await;
10944 Ok(())
10945 }
10946 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10947 ordinal: 5592951026866236882,
10948 error,
10949 }),
10950 }
10951 }
10952
10953 343892214579320051 => {
10954 let responder = ::fidl_next::Responder::from_untyped(responder);
10955
10956 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10957 Ok(decoded) => {
10958 handler
10959 .dictionary_remove(
10960 ::fidl_next::Request::from_decoded(decoded),
10961 responder,
10962 )
10963 .await;
10964 Ok(())
10965 }
10966 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10967 ordinal: 343892214579320051,
10968 error,
10969 }),
10970 }
10971 }
10972
10973 3977783339739362383 => {
10974 let responder = ::fidl_next::Responder::from_untyped(responder);
10975
10976 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10977 Ok(decoded) => {
10978 handler
10979 .dictionary_copy(::fidl_next::Request::from_decoded(decoded), responder)
10980 .await;
10981 Ok(())
10982 }
10983 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10984 ordinal: 3977783339739362383,
10985 error,
10986 }),
10987 }
10988 }
10989
10990 597577248872787102 => {
10991 let responder = ::fidl_next::Responder::from_untyped(responder);
10992
10993 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10994 Ok(decoded) => {
10995 handler
10996 .dictionary_keys(::fidl_next::Request::from_decoded(decoded), responder)
10997 .await;
10998 Ok(())
10999 }
11000 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11001 ordinal: 597577248872787102,
11002 error,
11003 }),
11004 }
11005 }
11006
11007 964467096271472193 => {
11008 let responder = ::fidl_next::Responder::from_untyped(responder);
11009
11010 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11011 Ok(decoded) => {
11012 handler
11013 .dictionary_enumerate(
11014 ::fidl_next::Request::from_decoded(decoded),
11015 responder,
11016 )
11017 .await;
11018 Ok(())
11019 }
11020 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11021 ordinal: 964467096271472193,
11022 error,
11023 }),
11024 }
11025 }
11026
11027 2928364469569621208 => {
11028 let responder = ::fidl_next::Responder::from_untyped(responder);
11029
11030 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11031 Ok(decoded) => {
11032 handler
11033 .dictionary_drain(
11034 ::fidl_next::Request::from_decoded(decoded),
11035 responder,
11036 )
11037 .await;
11038 Ok(())
11039 }
11040 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11041 ordinal: 2928364469569621208,
11042 error,
11043 }),
11044 }
11045 }
11046
11047 5009147843253209178 => {
11048 let responder = ::fidl_next::Responder::from_untyped(responder);
11049
11050 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11051 Ok(decoded) => {
11052 handler
11053 .create_service_aggregate(
11054 ::fidl_next::Request::from_decoded(decoded),
11055 responder,
11056 )
11057 .await;
11058 Ok(())
11059 }
11060 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11061 ordinal: 5009147843253209178,
11062 error,
11063 }),
11064 }
11065 }
11066
11067 ordinal => {
11068 handler.on_unknown_interaction(ordinal).await;
11069 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11070 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11071 } else {
11072 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11073 ordinal,
11074 flexibility,
11075 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11076 )
11077 .expect("encoding a framework error should never fail")
11078 .await?;
11079 Ok(())
11080 }
11081 }
11082 }
11083 }
11084}
11085
11086pub trait CapabilityStoreClientHandler<
11090 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11091 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11092>
11093{
11094 fn on_unknown_interaction(
11095 &mut self,
11096 ordinal: u64,
11097 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11098 ::core::future::ready(())
11099 }
11100}
11101
11102impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for CapabilityStore
11103where
11104 ___H: CapabilityStoreClientHandler<___T> + ::core::marker::Send,
11105 ___T: ::fidl_next::Transport,
11106{
11107 async fn on_event(
11108 handler: &mut ___H,
11109 ordinal: u64,
11110 flexibility: ::fidl_next::protocol::Flexibility,
11111 body: ::fidl_next::Body<___T>,
11112 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11113 match ordinal {
11114 ordinal => {
11115 handler.on_unknown_interaction(ordinal).await;
11116 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11117 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11118 } else {
11119 Ok(())
11120 }
11121 }
11122 }
11123 }
11124}
11125
11126pub trait CapabilityStoreServerHandler<
11130 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11131 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11132>
11133{
11134 #[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"]
11135 fn duplicate(
11136 &mut self,
11137
11138 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
11139
11140 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
11141 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11142
11143 #[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"]
11144 fn drop(
11145 &mut self,
11146
11147 request: ::fidl_next::Request<capability_store::Drop, ___T>,
11148
11149 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
11150 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11151
11152 #[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"]
11153 fn export(
11154 &mut self,
11155
11156 request: ::fidl_next::Request<capability_store::Export, ___T>,
11157
11158 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
11159 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11160
11161 #[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"]
11162 fn import(
11163 &mut self,
11164
11165 request: ::fidl_next::Request<capability_store::Import, ___T>,
11166
11167 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
11168 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11169
11170 #[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"]
11171 fn connector_create(
11172 &mut self,
11173
11174 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
11175
11176 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
11177 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11178
11179 #[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"]
11180 fn connector_open(
11181 &mut self,
11182
11183 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
11184
11185 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
11186 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11187
11188 #[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"]
11189 fn dir_connector_create(
11190 &mut self,
11191
11192 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
11193
11194 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
11195 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11196
11197 #[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"]
11198 fn dir_connector_open(
11199 &mut self,
11200
11201 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
11202
11203 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
11204 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11205
11206 #[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"]
11207 fn dictionary_create(
11208 &mut self,
11209
11210 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
11211
11212 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
11213 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11214
11215 #[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"]
11216 fn dictionary_legacy_import(
11217 &mut self,
11218
11219 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
11220
11221 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
11222 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11223
11224 #[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"]
11225 fn dictionary_legacy_export(
11226 &mut self,
11227
11228 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
11229
11230 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
11231 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11232
11233 #[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"]
11234 fn dictionary_insert(
11235 &mut self,
11236
11237 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
11238
11239 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
11240 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11241
11242 #[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"]
11243 fn dictionary_get(
11244 &mut self,
11245
11246 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
11247
11248 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
11249 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11250
11251 #[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"]
11252 fn dictionary_remove(
11253 &mut self,
11254
11255 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
11256
11257 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
11258 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11259
11260 #[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"]
11261 fn dictionary_copy(
11262 &mut self,
11263
11264 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
11265
11266 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
11267 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11268
11269 #[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"]
11270 fn dictionary_keys(
11271 &mut self,
11272
11273 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
11274
11275 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
11276 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11277
11278 #[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"]
11279 fn dictionary_enumerate(
11280 &mut self,
11281
11282 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
11283
11284 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
11285 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11286
11287 #[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"]
11288 fn dictionary_drain(
11289 &mut self,
11290
11291 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
11292
11293 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
11294 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11295
11296 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
11297 fn create_service_aggregate(
11298 &mut self,
11299
11300 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
11301
11302 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
11303 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11304
11305 fn on_unknown_interaction(
11306 &mut self,
11307 ordinal: u64,
11308 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11309 ::core::future::ready(())
11310 }
11311}
11312
11313impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for CapabilityStore
11314where
11315 ___H: CapabilityStoreServerHandler<___T> + ::core::marker::Send,
11316 ___T: ::fidl_next::Transport,
11317 for<'de> crate::wire::CapabilityStoreDuplicateRequest: ::fidl_next::Decode<
11318 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11319 Constraint = (),
11320 >,
11321 for<'de> crate::wire::CapabilityStoreDropRequest: ::fidl_next::Decode<
11322 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11323 Constraint = (),
11324 >,
11325 for<'de> crate::wire::CapabilityStoreExportRequest: ::fidl_next::Decode<
11326 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11327 Constraint = (),
11328 >,
11329 for<'de> crate::wire::CapabilityStoreImportRequest<'de>: ::fidl_next::Decode<
11330 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11331 Constraint = (),
11332 >,
11333 for<'de> crate::wire::CapabilityStoreConnectorCreateRequest: ::fidl_next::Decode<
11334 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11335 Constraint = (),
11336 >,
11337 for<'de> crate::wire::CapabilityStoreConnectorOpenRequest: ::fidl_next::Decode<
11338 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11339 Constraint = (),
11340 >,
11341 for<'de> crate::wire::CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Decode<
11342 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11343 Constraint = (),
11344 >,
11345 for<'de> crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>: ::fidl_next::Decode<
11346 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11347 Constraint = (),
11348 >,
11349 for<'de> crate::wire::CapabilityStoreDictionaryCreateRequest: ::fidl_next::Decode<
11350 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11351 Constraint = (),
11352 >,
11353 for<'de> crate::wire::CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Decode<
11354 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11355 Constraint = (),
11356 >,
11357 for<'de> crate::wire::CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Decode<
11358 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11359 Constraint = (),
11360 >,
11361 for<'de> crate::wire::CapabilityStoreDictionaryInsertRequest<'de>: ::fidl_next::Decode<
11362 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11363 Constraint = (),
11364 >,
11365 for<'de> crate::wire::CapabilityStoreDictionaryGetRequest<'de>: ::fidl_next::Decode<
11366 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11367 Constraint = (),
11368 >,
11369 for<'de> crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>: ::fidl_next::Decode<
11370 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11371 Constraint = (),
11372 >,
11373 for<'de> crate::wire::CapabilityStoreDictionaryCopyRequest: ::fidl_next::Decode<
11374 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11375 Constraint = (),
11376 >,
11377 for<'de> crate::wire::CapabilityStoreDictionaryKeysRequest: ::fidl_next::Decode<
11378 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11379 Constraint = (),
11380 >,
11381 for<'de> crate::wire::CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Decode<
11382 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11383 Constraint = (),
11384 >,
11385 for<'de> crate::wire::CapabilityStoreDictionaryDrainRequest: ::fidl_next::Decode<
11386 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11387 Constraint = (),
11388 >,
11389 for<'de> crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>: ::fidl_next::Decode<
11390 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11391 Constraint = (),
11392 >,
11393{
11394 async fn on_one_way(
11395 handler: &mut ___H,
11396 ordinal: u64,
11397 flexibility: ::fidl_next::protocol::Flexibility,
11398 body: ::fidl_next::Body<___T>,
11399 ) -> ::core::result::Result<
11400 (),
11401 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11402 > {
11403 match ordinal {
11404 ordinal => {
11405 handler.on_unknown_interaction(ordinal).await;
11406 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11407 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11408 } else {
11409 Ok(())
11410 }
11411 }
11412 }
11413 }
11414
11415 async fn on_two_way(
11416 handler: &mut ___H,
11417 ordinal: u64,
11418 flexibility: ::fidl_next::protocol::Flexibility,
11419 body: ::fidl_next::Body<___T>,
11420 responder: ::fidl_next::protocol::Responder<___T>,
11421 ) -> ::core::result::Result<
11422 (),
11423 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11424 > {
11425 match ordinal {
11426 6727592627741008260 => {
11427 let responder = ::fidl_next::Responder::from_untyped(responder);
11428
11429 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11430 Ok(decoded) => {
11431 handler
11432 .duplicate(::fidl_next::Request::from_decoded(decoded), responder)
11433 .await;
11434 Ok(())
11435 }
11436 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11437 ordinal: 6727592627741008260,
11438 error,
11439 }),
11440 }
11441 }
11442
11443 753328233834620249 => {
11444 let responder = ::fidl_next::Responder::from_untyped(responder);
11445
11446 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11447 Ok(decoded) => {
11448 handler.drop(::fidl_next::Request::from_decoded(decoded), responder).await;
11449 Ok(())
11450 }
11451 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11452 ordinal: 753328233834620249,
11453 error,
11454 }),
11455 }
11456 }
11457
11458 226159162093533951 => {
11459 let responder = ::fidl_next::Responder::from_untyped(responder);
11460
11461 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11462 Ok(decoded) => {
11463 handler
11464 .export(::fidl_next::Request::from_decoded(decoded), responder)
11465 .await;
11466 Ok(())
11467 }
11468 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11469 ordinal: 226159162093533951,
11470 error,
11471 }),
11472 }
11473 }
11474
11475 2276030276116435867 => {
11476 let responder = ::fidl_next::Responder::from_untyped(responder);
11477
11478 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11479 Ok(decoded) => {
11480 handler
11481 .import(::fidl_next::Request::from_decoded(decoded), responder)
11482 .await;
11483 Ok(())
11484 }
11485 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11486 ordinal: 2276030276116435867,
11487 error,
11488 }),
11489 }
11490 }
11491
11492 2979461408102095909 => {
11493 let responder = ::fidl_next::Responder::from_untyped(responder);
11494
11495 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11496 Ok(decoded) => {
11497 handler
11498 .connector_create(
11499 ::fidl_next::Request::from_decoded(decoded),
11500 responder,
11501 )
11502 .await;
11503 Ok(())
11504 }
11505 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11506 ordinal: 2979461408102095909,
11507 error,
11508 }),
11509 }
11510 }
11511
11512 6016362336453278623 => {
11513 let responder = ::fidl_next::Responder::from_untyped(responder);
11514
11515 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11516 Ok(decoded) => {
11517 handler
11518 .connector_open(::fidl_next::Request::from_decoded(decoded), responder)
11519 .await;
11520 Ok(())
11521 }
11522 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11523 ordinal: 6016362336453278623,
11524 error,
11525 }),
11526 }
11527 }
11528
11529 1756747594275428795 => {
11530 let responder = ::fidl_next::Responder::from_untyped(responder);
11531
11532 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11533 Ok(decoded) => {
11534 handler
11535 .dir_connector_create(
11536 ::fidl_next::Request::from_decoded(decoded),
11537 responder,
11538 )
11539 .await;
11540 Ok(())
11541 }
11542 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11543 ordinal: 1756747594275428795,
11544 error,
11545 }),
11546 }
11547 }
11548
11549 6219704004220369153 => {
11550 let responder = ::fidl_next::Responder::from_untyped(responder);
11551
11552 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11553 Ok(decoded) => {
11554 handler
11555 .dir_connector_open(
11556 ::fidl_next::Request::from_decoded(decoded),
11557 responder,
11558 )
11559 .await;
11560 Ok(())
11561 }
11562 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11563 ordinal: 6219704004220369153,
11564 error,
11565 }),
11566 }
11567 }
11568
11569 7608770958894948499 => {
11570 let responder = ::fidl_next::Responder::from_untyped(responder);
11571
11572 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11573 Ok(decoded) => {
11574 handler
11575 .dictionary_create(
11576 ::fidl_next::Request::from_decoded(decoded),
11577 responder,
11578 )
11579 .await;
11580 Ok(())
11581 }
11582 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11583 ordinal: 7608770958894948499,
11584 error,
11585 }),
11586 }
11587 }
11588
11589 8285893703432012383 => {
11590 let responder = ::fidl_next::Responder::from_untyped(responder);
11591
11592 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11593 Ok(decoded) => {
11594 handler
11595 .dictionary_legacy_import(
11596 ::fidl_next::Request::from_decoded(decoded),
11597 responder,
11598 )
11599 .await;
11600 Ok(())
11601 }
11602 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11603 ordinal: 8285893703432012383,
11604 error,
11605 }),
11606 }
11607 }
11608
11609 4647175832683306445 => {
11610 let responder = ::fidl_next::Responder::from_untyped(responder);
11611
11612 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11613 Ok(decoded) => {
11614 handler
11615 .dictionary_legacy_export(
11616 ::fidl_next::Request::from_decoded(decoded),
11617 responder,
11618 )
11619 .await;
11620 Ok(())
11621 }
11622 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11623 ordinal: 4647175832683306445,
11624 error,
11625 }),
11626 }
11627 }
11628
11629 8575443262986538023 => {
11630 let responder = ::fidl_next::Responder::from_untyped(responder);
11631
11632 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11633 Ok(decoded) => {
11634 handler
11635 .dictionary_insert(
11636 ::fidl_next::Request::from_decoded(decoded),
11637 responder,
11638 )
11639 .await;
11640 Ok(())
11641 }
11642 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11643 ordinal: 8575443262986538023,
11644 error,
11645 }),
11646 }
11647 }
11648
11649 5592951026866236882 => {
11650 let responder = ::fidl_next::Responder::from_untyped(responder);
11651
11652 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11653 Ok(decoded) => {
11654 handler
11655 .dictionary_get(::fidl_next::Request::from_decoded(decoded), responder)
11656 .await;
11657 Ok(())
11658 }
11659 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11660 ordinal: 5592951026866236882,
11661 error,
11662 }),
11663 }
11664 }
11665
11666 343892214579320051 => {
11667 let responder = ::fidl_next::Responder::from_untyped(responder);
11668
11669 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11670 Ok(decoded) => {
11671 handler
11672 .dictionary_remove(
11673 ::fidl_next::Request::from_decoded(decoded),
11674 responder,
11675 )
11676 .await;
11677 Ok(())
11678 }
11679 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11680 ordinal: 343892214579320051,
11681 error,
11682 }),
11683 }
11684 }
11685
11686 3977783339739362383 => {
11687 let responder = ::fidl_next::Responder::from_untyped(responder);
11688
11689 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11690 Ok(decoded) => {
11691 handler
11692 .dictionary_copy(::fidl_next::Request::from_decoded(decoded), responder)
11693 .await;
11694 Ok(())
11695 }
11696 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11697 ordinal: 3977783339739362383,
11698 error,
11699 }),
11700 }
11701 }
11702
11703 597577248872787102 => {
11704 let responder = ::fidl_next::Responder::from_untyped(responder);
11705
11706 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11707 Ok(decoded) => {
11708 handler
11709 .dictionary_keys(::fidl_next::Request::from_decoded(decoded), responder)
11710 .await;
11711 Ok(())
11712 }
11713 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11714 ordinal: 597577248872787102,
11715 error,
11716 }),
11717 }
11718 }
11719
11720 964467096271472193 => {
11721 let responder = ::fidl_next::Responder::from_untyped(responder);
11722
11723 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11724 Ok(decoded) => {
11725 handler
11726 .dictionary_enumerate(
11727 ::fidl_next::Request::from_decoded(decoded),
11728 responder,
11729 )
11730 .await;
11731 Ok(())
11732 }
11733 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11734 ordinal: 964467096271472193,
11735 error,
11736 }),
11737 }
11738 }
11739
11740 2928364469569621208 => {
11741 let responder = ::fidl_next::Responder::from_untyped(responder);
11742
11743 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11744 Ok(decoded) => {
11745 handler
11746 .dictionary_drain(
11747 ::fidl_next::Request::from_decoded(decoded),
11748 responder,
11749 )
11750 .await;
11751 Ok(())
11752 }
11753 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11754 ordinal: 2928364469569621208,
11755 error,
11756 }),
11757 }
11758 }
11759
11760 5009147843253209178 => {
11761 let responder = ::fidl_next::Responder::from_untyped(responder);
11762
11763 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11764 Ok(decoded) => {
11765 handler
11766 .create_service_aggregate(
11767 ::fidl_next::Request::from_decoded(decoded),
11768 responder,
11769 )
11770 .await;
11771 Ok(())
11772 }
11773 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11774 ordinal: 5009147843253209178,
11775 error,
11776 }),
11777 }
11778 }
11779
11780 ordinal => {
11781 handler.on_unknown_interaction(ordinal).await;
11782 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11783 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11784 } else {
11785 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11786 ordinal,
11787 flexibility,
11788 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11789 )
11790 .expect("encoding a framework error should never fail")
11791 .await?;
11792 Ok(())
11793 }
11794 }
11795 }
11796 }
11797}
11798
11799impl<___T> CapabilityStoreClientHandler<___T> for ::fidl_next::IgnoreEvents
11800where
11801 ___T: ::fidl_next::Transport,
11802{
11803 async fn on_unknown_interaction(&mut self, _: u64) {}
11804}
11805
11806impl<___H, ___T> CapabilityStoreLocalClientHandler<___T> for ::fidl_next::Local<___H>
11807where
11808 ___H: CapabilityStoreClientHandler<___T>,
11809 ___T: ::fidl_next::Transport,
11810{
11811 async fn on_unknown_interaction(&mut self, ordinal: u64) {
11812 ___H::on_unknown_interaction(&mut self.0, ordinal).await
11813 }
11814}
11815
11816impl<___H, ___T> CapabilityStoreLocalServerHandler<___T> for ::fidl_next::Local<___H>
11817where
11818 ___H: CapabilityStoreServerHandler<___T>,
11819 ___T: ::fidl_next::Transport,
11820{
11821 async fn duplicate(
11822 &mut self,
11823
11824 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
11825
11826 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
11827 ) {
11828 ___H::duplicate(&mut self.0, request, responder).await
11829 }
11830
11831 async fn drop(
11832 &mut self,
11833
11834 request: ::fidl_next::Request<capability_store::Drop, ___T>,
11835
11836 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
11837 ) {
11838 ___H::drop(&mut self.0, request, responder).await
11839 }
11840
11841 async fn export(
11842 &mut self,
11843
11844 request: ::fidl_next::Request<capability_store::Export, ___T>,
11845
11846 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
11847 ) {
11848 ___H::export(&mut self.0, request, responder).await
11849 }
11850
11851 async fn import(
11852 &mut self,
11853
11854 request: ::fidl_next::Request<capability_store::Import, ___T>,
11855
11856 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
11857 ) {
11858 ___H::import(&mut self.0, request, responder).await
11859 }
11860
11861 async fn connector_create(
11862 &mut self,
11863
11864 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
11865
11866 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
11867 ) {
11868 ___H::connector_create(&mut self.0, request, responder).await
11869 }
11870
11871 async fn connector_open(
11872 &mut self,
11873
11874 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
11875
11876 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
11877 ) {
11878 ___H::connector_open(&mut self.0, request, responder).await
11879 }
11880
11881 async fn dir_connector_create(
11882 &mut self,
11883
11884 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
11885
11886 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
11887 ) {
11888 ___H::dir_connector_create(&mut self.0, request, responder).await
11889 }
11890
11891 async fn dir_connector_open(
11892 &mut self,
11893
11894 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
11895
11896 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
11897 ) {
11898 ___H::dir_connector_open(&mut self.0, request, responder).await
11899 }
11900
11901 async fn dictionary_create(
11902 &mut self,
11903
11904 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
11905
11906 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
11907 ) {
11908 ___H::dictionary_create(&mut self.0, request, responder).await
11909 }
11910
11911 async fn dictionary_legacy_import(
11912 &mut self,
11913
11914 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
11915
11916 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
11917 ) {
11918 ___H::dictionary_legacy_import(&mut self.0, request, responder).await
11919 }
11920
11921 async fn dictionary_legacy_export(
11922 &mut self,
11923
11924 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
11925
11926 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
11927 ) {
11928 ___H::dictionary_legacy_export(&mut self.0, request, responder).await
11929 }
11930
11931 async fn dictionary_insert(
11932 &mut self,
11933
11934 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
11935
11936 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
11937 ) {
11938 ___H::dictionary_insert(&mut self.0, request, responder).await
11939 }
11940
11941 async fn dictionary_get(
11942 &mut self,
11943
11944 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
11945
11946 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
11947 ) {
11948 ___H::dictionary_get(&mut self.0, request, responder).await
11949 }
11950
11951 async fn dictionary_remove(
11952 &mut self,
11953
11954 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
11955
11956 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
11957 ) {
11958 ___H::dictionary_remove(&mut self.0, request, responder).await
11959 }
11960
11961 async fn dictionary_copy(
11962 &mut self,
11963
11964 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
11965
11966 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
11967 ) {
11968 ___H::dictionary_copy(&mut self.0, request, responder).await
11969 }
11970
11971 async fn dictionary_keys(
11972 &mut self,
11973
11974 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
11975
11976 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
11977 ) {
11978 ___H::dictionary_keys(&mut self.0, request, responder).await
11979 }
11980
11981 async fn dictionary_enumerate(
11982 &mut self,
11983
11984 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
11985
11986 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
11987 ) {
11988 ___H::dictionary_enumerate(&mut self.0, request, responder).await
11989 }
11990
11991 async fn dictionary_drain(
11992 &mut self,
11993
11994 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
11995
11996 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
11997 ) {
11998 ___H::dictionary_drain(&mut self.0, request, responder).await
11999 }
12000
12001 async fn create_service_aggregate(
12002 &mut self,
12003
12004 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
12005
12006 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
12007 ) {
12008 ___H::create_service_aggregate(&mut self.0, request, responder).await
12009 }
12010
12011 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12012 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12013 }
12014}
12015
12016#[derive(PartialEq, Debug)]
12018pub struct ConnectorRouter;
12019
12020impl ::fidl_next::Discoverable for ConnectorRouter {
12021 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
12022}
12023
12024#[cfg(target_os = "fuchsia")]
12025impl ::fidl_next::HasTransport for ConnectorRouter {
12026 type Transport = ::fidl_next::fuchsia::zx::Channel;
12027}
12028
12029pub mod connector_router {
12030 pub mod prelude {
12031 pub use crate::{
12032 ConnectorRouter, ConnectorRouterClientHandler, ConnectorRouterLocalClientHandler,
12033 ConnectorRouterLocalServerHandler, ConnectorRouterServerHandler, connector_router,
12034 };
12035
12036 pub use crate::natural::ConnectorRouterRouteResponse;
12037
12038 pub use crate::natural::RouteRequest;
12039
12040 pub use crate::natural::RouterError;
12041 }
12042
12043 pub struct Route;
12044
12045 impl ::fidl_next::Method for Route {
12046 const ORDINAL: u64 = 8420527046218942310;
12047 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12048 ::fidl_next::protocol::Flexibility::Flexible;
12049
12050 type Protocol = crate::ConnectorRouter;
12051
12052 type Request = crate::wire::RouteRequest<'static>;
12053 }
12054
12055 impl ::fidl_next::TwoWayMethod for Route {
12056 type Response = ::fidl_next::wire::FlexibleResult<
12057 'static,
12058 crate::wire::ConnectorRouterRouteResponse,
12059 crate::wire::RouterError,
12060 >;
12061 }
12062
12063 impl<___R> ::fidl_next::Respond<___R> for Route {
12064 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12065
12066 fn respond(response: ___R) -> Self::Output {
12067 ::fidl_next::FlexibleResult::Ok(response)
12068 }
12069 }
12070
12071 impl<___R> ::fidl_next::RespondErr<___R> for Route {
12072 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12073
12074 fn respond_err(response: ___R) -> Self::Output {
12075 ::fidl_next::FlexibleResult::Err(response)
12076 }
12077 }
12078
12079 mod ___detail {
12080 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ConnectorRouter
12081 where
12082 ___T: ::fidl_next::Transport,
12083 {
12084 type Client = ConnectorRouterClient<___T>;
12085 type Server = ConnectorRouterServer<___T>;
12086 }
12087
12088 #[repr(transparent)]
12090 pub struct ConnectorRouterClient<___T: ::fidl_next::Transport> {
12091 #[allow(dead_code)]
12092 client: ::fidl_next::protocol::Client<___T>,
12093 }
12094
12095 impl<___T> ConnectorRouterClient<___T>
12096 where
12097 ___T: ::fidl_next::Transport,
12098 {
12099 pub fn route_with<___R>(
12100 &self,
12101 request: ___R,
12102 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12103 where
12104 ___R: ::fidl_next::Encode<
12105 crate::wire::RouteRequest<'static>,
12106 <___T as ::fidl_next::Transport>::SendBuffer,
12107 >,
12108 {
12109 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12110 8420527046218942310,
12111 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
12112 request,
12113 ))
12114 }
12115 }
12116
12117 #[repr(transparent)]
12119 pub struct ConnectorRouterServer<___T: ::fidl_next::Transport> {
12120 server: ::fidl_next::protocol::Server<___T>,
12121 }
12122
12123 impl<___T> ConnectorRouterServer<___T> where ___T: ::fidl_next::Transport {}
12124 }
12125}
12126
12127#[diagnostic::on_unimplemented(
12128 note = "If {Self} implements the non-local ConnectorRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12129)]
12130
12131pub trait ConnectorRouterLocalClientHandler<
12135 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12136 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12137>
12138{
12139 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12140 ::core::future::ready(())
12141 }
12142}
12143
12144impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ConnectorRouter
12145where
12146 ___H: ConnectorRouterLocalClientHandler<___T>,
12147 ___T: ::fidl_next::Transport,
12148{
12149 async fn on_event(
12150 handler: &mut ___H,
12151 ordinal: u64,
12152 flexibility: ::fidl_next::protocol::Flexibility,
12153 body: ::fidl_next::Body<___T>,
12154 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12155 match ordinal {
12156 ordinal => {
12157 handler.on_unknown_interaction(ordinal).await;
12158 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12159 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12160 } else {
12161 Ok(())
12162 }
12163 }
12164 }
12165 }
12166}
12167
12168#[diagnostic::on_unimplemented(
12169 note = "If {Self} implements the non-local ConnectorRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12170)]
12171
12172pub trait ConnectorRouterLocalServerHandler<
12176 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12177 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12178>
12179{
12180 fn route(
12181 &mut self,
12182
12183 request: ::fidl_next::Request<connector_router::Route, ___T>,
12184
12185 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
12186 ) -> impl ::core::future::Future<Output = ()>;
12187
12188 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12189 ::core::future::ready(())
12190 }
12191}
12192
12193impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ConnectorRouter
12194where
12195 ___H: ConnectorRouterLocalServerHandler<___T>,
12196 ___T: ::fidl_next::Transport,
12197 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12198 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12199 Constraint = (),
12200 >,
12201{
12202 async fn on_one_way(
12203 handler: &mut ___H,
12204 ordinal: u64,
12205 flexibility: ::fidl_next::protocol::Flexibility,
12206 body: ::fidl_next::Body<___T>,
12207 ) -> ::core::result::Result<
12208 (),
12209 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12210 > {
12211 match ordinal {
12212 ordinal => {
12213 handler.on_unknown_interaction(ordinal).await;
12214 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12215 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12216 } else {
12217 Ok(())
12218 }
12219 }
12220 }
12221 }
12222
12223 async fn on_two_way(
12224 handler: &mut ___H,
12225 ordinal: u64,
12226 flexibility: ::fidl_next::protocol::Flexibility,
12227 body: ::fidl_next::Body<___T>,
12228 responder: ::fidl_next::protocol::Responder<___T>,
12229 ) -> ::core::result::Result<
12230 (),
12231 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12232 > {
12233 match ordinal {
12234 8420527046218942310 => {
12235 let responder = ::fidl_next::Responder::from_untyped(responder);
12236
12237 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12238 Ok(decoded) => {
12239 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12240 Ok(())
12241 }
12242 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12243 ordinal: 8420527046218942310,
12244 error,
12245 }),
12246 }
12247 }
12248
12249 ordinal => {
12250 handler.on_unknown_interaction(ordinal).await;
12251 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12252 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12253 } else {
12254 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12255 ordinal,
12256 flexibility,
12257 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12258 )
12259 .expect("encoding a framework error should never fail")
12260 .await?;
12261 Ok(())
12262 }
12263 }
12264 }
12265 }
12266}
12267
12268pub trait ConnectorRouterClientHandler<
12272 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12273 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12274>
12275{
12276 fn on_unknown_interaction(
12277 &mut self,
12278 ordinal: u64,
12279 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12280 ::core::future::ready(())
12281 }
12282}
12283
12284impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ConnectorRouter
12285where
12286 ___H: ConnectorRouterClientHandler<___T> + ::core::marker::Send,
12287 ___T: ::fidl_next::Transport,
12288{
12289 async fn on_event(
12290 handler: &mut ___H,
12291 ordinal: u64,
12292 flexibility: ::fidl_next::protocol::Flexibility,
12293 body: ::fidl_next::Body<___T>,
12294 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12295 match ordinal {
12296 ordinal => {
12297 handler.on_unknown_interaction(ordinal).await;
12298 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12299 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12300 } else {
12301 Ok(())
12302 }
12303 }
12304 }
12305 }
12306}
12307
12308pub trait ConnectorRouterServerHandler<
12312 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12313 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12314>
12315{
12316 fn route(
12317 &mut self,
12318
12319 request: ::fidl_next::Request<connector_router::Route, ___T>,
12320
12321 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
12322 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12323
12324 fn on_unknown_interaction(
12325 &mut self,
12326 ordinal: u64,
12327 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12328 ::core::future::ready(())
12329 }
12330}
12331
12332impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ConnectorRouter
12333where
12334 ___H: ConnectorRouterServerHandler<___T> + ::core::marker::Send,
12335 ___T: ::fidl_next::Transport,
12336 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12337 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12338 Constraint = (),
12339 >,
12340{
12341 async fn on_one_way(
12342 handler: &mut ___H,
12343 ordinal: u64,
12344 flexibility: ::fidl_next::protocol::Flexibility,
12345 body: ::fidl_next::Body<___T>,
12346 ) -> ::core::result::Result<
12347 (),
12348 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12349 > {
12350 match ordinal {
12351 ordinal => {
12352 handler.on_unknown_interaction(ordinal).await;
12353 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12354 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12355 } else {
12356 Ok(())
12357 }
12358 }
12359 }
12360 }
12361
12362 async fn on_two_way(
12363 handler: &mut ___H,
12364 ordinal: u64,
12365 flexibility: ::fidl_next::protocol::Flexibility,
12366 body: ::fidl_next::Body<___T>,
12367 responder: ::fidl_next::protocol::Responder<___T>,
12368 ) -> ::core::result::Result<
12369 (),
12370 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12371 > {
12372 match ordinal {
12373 8420527046218942310 => {
12374 let responder = ::fidl_next::Responder::from_untyped(responder);
12375
12376 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12377 Ok(decoded) => {
12378 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12379 Ok(())
12380 }
12381 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12382 ordinal: 8420527046218942310,
12383 error,
12384 }),
12385 }
12386 }
12387
12388 ordinal => {
12389 handler.on_unknown_interaction(ordinal).await;
12390 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12391 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12392 } else {
12393 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12394 ordinal,
12395 flexibility,
12396 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12397 )
12398 .expect("encoding a framework error should never fail")
12399 .await?;
12400 Ok(())
12401 }
12402 }
12403 }
12404 }
12405}
12406
12407impl<___T> ConnectorRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
12408where
12409 ___T: ::fidl_next::Transport,
12410{
12411 async fn on_unknown_interaction(&mut self, _: u64) {}
12412}
12413
12414impl<___H, ___T> ConnectorRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
12415where
12416 ___H: ConnectorRouterClientHandler<___T>,
12417 ___T: ::fidl_next::Transport,
12418{
12419 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12420 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12421 }
12422}
12423
12424impl<___H, ___T> ConnectorRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
12425where
12426 ___H: ConnectorRouterServerHandler<___T>,
12427 ___T: ::fidl_next::Transport,
12428{
12429 async fn route(
12430 &mut self,
12431
12432 request: ::fidl_next::Request<connector_router::Route, ___T>,
12433
12434 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
12435 ) {
12436 ___H::route(&mut self.0, request, responder).await
12437 }
12438
12439 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12440 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12441 }
12442}
12443
12444#[derive(PartialEq, Debug)]
12446pub struct DataRouter;
12447
12448impl ::fidl_next::Discoverable for DataRouter {
12449 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
12450}
12451
12452#[cfg(target_os = "fuchsia")]
12453impl ::fidl_next::HasTransport for DataRouter {
12454 type Transport = ::fidl_next::fuchsia::zx::Channel;
12455}
12456
12457pub mod data_router {
12458 pub mod prelude {
12459 pub use crate::{
12460 DataRouter, DataRouterClientHandler, DataRouterLocalClientHandler,
12461 DataRouterLocalServerHandler, DataRouterServerHandler, data_router,
12462 };
12463
12464 pub use crate::natural::DataRouterRouteResponse;
12465
12466 pub use crate::natural::RouteRequest;
12467
12468 pub use crate::natural::RouterError;
12469 }
12470
12471 pub struct Route;
12472
12473 impl ::fidl_next::Method for Route {
12474 const ORDINAL: u64 = 3352890635970754564;
12475 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12476 ::fidl_next::protocol::Flexibility::Flexible;
12477
12478 type Protocol = crate::DataRouter;
12479
12480 type Request = crate::wire::RouteRequest<'static>;
12481 }
12482
12483 impl ::fidl_next::TwoWayMethod for Route {
12484 type Response = ::fidl_next::wire::FlexibleResult<
12485 'static,
12486 crate::wire::DataRouterRouteResponse<'static>,
12487 crate::wire::RouterError,
12488 >;
12489 }
12490
12491 impl<___R> ::fidl_next::Respond<___R> for Route {
12492 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12493
12494 fn respond(response: ___R) -> Self::Output {
12495 ::fidl_next::FlexibleResult::Ok(response)
12496 }
12497 }
12498
12499 impl<___R> ::fidl_next::RespondErr<___R> for Route {
12500 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12501
12502 fn respond_err(response: ___R) -> Self::Output {
12503 ::fidl_next::FlexibleResult::Err(response)
12504 }
12505 }
12506
12507 mod ___detail {
12508 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DataRouter
12509 where
12510 ___T: ::fidl_next::Transport,
12511 {
12512 type Client = DataRouterClient<___T>;
12513 type Server = DataRouterServer<___T>;
12514 }
12515
12516 #[repr(transparent)]
12518 pub struct DataRouterClient<___T: ::fidl_next::Transport> {
12519 #[allow(dead_code)]
12520 client: ::fidl_next::protocol::Client<___T>,
12521 }
12522
12523 impl<___T> DataRouterClient<___T>
12524 where
12525 ___T: ::fidl_next::Transport,
12526 {
12527 pub fn route_with<___R>(
12528 &self,
12529 request: ___R,
12530 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12531 where
12532 ___R: ::fidl_next::Encode<
12533 crate::wire::RouteRequest<'static>,
12534 <___T as ::fidl_next::Transport>::SendBuffer,
12535 >,
12536 {
12537 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12538 3352890635970754564,
12539 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
12540 request,
12541 ))
12542 }
12543 }
12544
12545 #[repr(transparent)]
12547 pub struct DataRouterServer<___T: ::fidl_next::Transport> {
12548 server: ::fidl_next::protocol::Server<___T>,
12549 }
12550
12551 impl<___T> DataRouterServer<___T> where ___T: ::fidl_next::Transport {}
12552 }
12553}
12554
12555#[diagnostic::on_unimplemented(
12556 note = "If {Self} implements the non-local DataRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12557)]
12558
12559pub trait DataRouterLocalClientHandler<
12563 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12564 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12565>
12566{
12567 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12568 ::core::future::ready(())
12569 }
12570}
12571
12572impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DataRouter
12573where
12574 ___H: DataRouterLocalClientHandler<___T>,
12575 ___T: ::fidl_next::Transport,
12576{
12577 async fn on_event(
12578 handler: &mut ___H,
12579 ordinal: u64,
12580 flexibility: ::fidl_next::protocol::Flexibility,
12581 body: ::fidl_next::Body<___T>,
12582 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12583 match ordinal {
12584 ordinal => {
12585 handler.on_unknown_interaction(ordinal).await;
12586 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12587 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12588 } else {
12589 Ok(())
12590 }
12591 }
12592 }
12593 }
12594}
12595
12596#[diagnostic::on_unimplemented(
12597 note = "If {Self} implements the non-local DataRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12598)]
12599
12600pub trait DataRouterLocalServerHandler<
12604 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12605 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12606>
12607{
12608 fn route(
12609 &mut self,
12610
12611 request: ::fidl_next::Request<data_router::Route, ___T>,
12612
12613 responder: ::fidl_next::Responder<data_router::Route, ___T>,
12614 ) -> impl ::core::future::Future<Output = ()>;
12615
12616 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
12617 ::core::future::ready(())
12618 }
12619}
12620
12621impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DataRouter
12622where
12623 ___H: DataRouterLocalServerHandler<___T>,
12624 ___T: ::fidl_next::Transport,
12625 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12626 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12627 Constraint = (),
12628 >,
12629{
12630 async fn on_one_way(
12631 handler: &mut ___H,
12632 ordinal: u64,
12633 flexibility: ::fidl_next::protocol::Flexibility,
12634 body: ::fidl_next::Body<___T>,
12635 ) -> ::core::result::Result<
12636 (),
12637 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12638 > {
12639 match ordinal {
12640 ordinal => {
12641 handler.on_unknown_interaction(ordinal).await;
12642 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12643 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12644 } else {
12645 Ok(())
12646 }
12647 }
12648 }
12649 }
12650
12651 async fn on_two_way(
12652 handler: &mut ___H,
12653 ordinal: u64,
12654 flexibility: ::fidl_next::protocol::Flexibility,
12655 body: ::fidl_next::Body<___T>,
12656 responder: ::fidl_next::protocol::Responder<___T>,
12657 ) -> ::core::result::Result<
12658 (),
12659 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12660 > {
12661 match ordinal {
12662 3352890635970754564 => {
12663 let responder = ::fidl_next::Responder::from_untyped(responder);
12664
12665 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12666 Ok(decoded) => {
12667 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12668 Ok(())
12669 }
12670 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12671 ordinal: 3352890635970754564,
12672 error,
12673 }),
12674 }
12675 }
12676
12677 ordinal => {
12678 handler.on_unknown_interaction(ordinal).await;
12679 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12680 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12681 } else {
12682 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12683 ordinal,
12684 flexibility,
12685 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12686 )
12687 .expect("encoding a framework error should never fail")
12688 .await?;
12689 Ok(())
12690 }
12691 }
12692 }
12693 }
12694}
12695
12696pub trait DataRouterClientHandler<
12700 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12701 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12702>
12703{
12704 fn on_unknown_interaction(
12705 &mut self,
12706 ordinal: u64,
12707 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12708 ::core::future::ready(())
12709 }
12710}
12711
12712impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DataRouter
12713where
12714 ___H: DataRouterClientHandler<___T> + ::core::marker::Send,
12715 ___T: ::fidl_next::Transport,
12716{
12717 async fn on_event(
12718 handler: &mut ___H,
12719 ordinal: u64,
12720 flexibility: ::fidl_next::protocol::Flexibility,
12721 body: ::fidl_next::Body<___T>,
12722 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12723 match ordinal {
12724 ordinal => {
12725 handler.on_unknown_interaction(ordinal).await;
12726 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12727 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12728 } else {
12729 Ok(())
12730 }
12731 }
12732 }
12733 }
12734}
12735
12736pub trait DataRouterServerHandler<
12740 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12741 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12742>
12743{
12744 fn route(
12745 &mut self,
12746
12747 request: ::fidl_next::Request<data_router::Route, ___T>,
12748
12749 responder: ::fidl_next::Responder<data_router::Route, ___T>,
12750 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12751
12752 fn on_unknown_interaction(
12753 &mut self,
12754 ordinal: u64,
12755 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12756 ::core::future::ready(())
12757 }
12758}
12759
12760impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DataRouter
12761where
12762 ___H: DataRouterServerHandler<___T> + ::core::marker::Send,
12763 ___T: ::fidl_next::Transport,
12764 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12765 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12766 Constraint = (),
12767 >,
12768{
12769 async fn on_one_way(
12770 handler: &mut ___H,
12771 ordinal: u64,
12772 flexibility: ::fidl_next::protocol::Flexibility,
12773 body: ::fidl_next::Body<___T>,
12774 ) -> ::core::result::Result<
12775 (),
12776 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12777 > {
12778 match ordinal {
12779 ordinal => {
12780 handler.on_unknown_interaction(ordinal).await;
12781 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12782 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12783 } else {
12784 Ok(())
12785 }
12786 }
12787 }
12788 }
12789
12790 async fn on_two_way(
12791 handler: &mut ___H,
12792 ordinal: u64,
12793 flexibility: ::fidl_next::protocol::Flexibility,
12794 body: ::fidl_next::Body<___T>,
12795 responder: ::fidl_next::protocol::Responder<___T>,
12796 ) -> ::core::result::Result<
12797 (),
12798 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12799 > {
12800 match ordinal {
12801 3352890635970754564 => {
12802 let responder = ::fidl_next::Responder::from_untyped(responder);
12803
12804 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12805 Ok(decoded) => {
12806 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12807 Ok(())
12808 }
12809 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12810 ordinal: 3352890635970754564,
12811 error,
12812 }),
12813 }
12814 }
12815
12816 ordinal => {
12817 handler.on_unknown_interaction(ordinal).await;
12818 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12819 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12820 } else {
12821 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12822 ordinal,
12823 flexibility,
12824 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12825 )
12826 .expect("encoding a framework error should never fail")
12827 .await?;
12828 Ok(())
12829 }
12830 }
12831 }
12832 }
12833}
12834
12835impl<___T> DataRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
12836where
12837 ___T: ::fidl_next::Transport,
12838{
12839 async fn on_unknown_interaction(&mut self, _: u64) {}
12840}
12841
12842impl<___H, ___T> DataRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
12843where
12844 ___H: DataRouterClientHandler<___T>,
12845 ___T: ::fidl_next::Transport,
12846{
12847 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12848 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12849 }
12850}
12851
12852impl<___H, ___T> DataRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
12853where
12854 ___H: DataRouterServerHandler<___T>,
12855 ___T: ::fidl_next::Transport,
12856{
12857 async fn route(
12858 &mut self,
12859
12860 request: ::fidl_next::Request<data_router::Route, ___T>,
12861
12862 responder: ::fidl_next::Responder<data_router::Route, ___T>,
12863 ) {
12864 ___H::route(&mut self.0, request, responder).await
12865 }
12866
12867 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12868 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12869 }
12870}
12871
12872#[derive(PartialEq, Debug)]
12874pub struct DictionaryDrainIterator;
12875
12876#[cfg(target_os = "fuchsia")]
12877impl ::fidl_next::HasTransport for DictionaryDrainIterator {
12878 type Transport = ::fidl_next::fuchsia::zx::Channel;
12879}
12880
12881pub mod dictionary_drain_iterator {
12882 pub mod prelude {
12883 pub use crate::{
12884 DictionaryDrainIterator, DictionaryDrainIteratorClientHandler,
12885 DictionaryDrainIteratorLocalClientHandler, DictionaryDrainIteratorLocalServerHandler,
12886 DictionaryDrainIteratorServerHandler, dictionary_drain_iterator,
12887 };
12888
12889 pub use crate::natural::CapabilityStoreError;
12890
12891 pub use crate::natural::DictionaryDrainIteratorGetNextRequest;
12892
12893 pub use crate::natural::DictionaryDrainIteratorGetNextResponse;
12894 }
12895
12896 pub struct GetNext;
12897
12898 impl ::fidl_next::Method for GetNext {
12899 const ORDINAL: u64 = 5728722530628427873;
12900 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12901 ::fidl_next::protocol::Flexibility::Flexible;
12902
12903 type Protocol = crate::DictionaryDrainIterator;
12904
12905 type Request = crate::wire::DictionaryDrainIteratorGetNextRequest;
12906 }
12907
12908 impl ::fidl_next::TwoWayMethod for GetNext {
12909 type Response = ::fidl_next::wire::FlexibleResult<
12910 'static,
12911 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
12912 crate::wire::CapabilityStoreError,
12913 >;
12914 }
12915
12916 impl<___R> ::fidl_next::Respond<___R> for GetNext {
12917 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12918
12919 fn respond(response: ___R) -> Self::Output {
12920 ::fidl_next::FlexibleResult::Ok(response)
12921 }
12922 }
12923
12924 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
12925 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12926
12927 fn respond_err(response: ___R) -> Self::Output {
12928 ::fidl_next::FlexibleResult::Err(response)
12929 }
12930 }
12931
12932 mod ___detail {
12933 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryDrainIterator
12934 where
12935 ___T: ::fidl_next::Transport,
12936 {
12937 type Client = DictionaryDrainIteratorClient<___T>;
12938 type Server = DictionaryDrainIteratorServer<___T>;
12939 }
12940
12941 #[repr(transparent)]
12943 pub struct DictionaryDrainIteratorClient<___T: ::fidl_next::Transport> {
12944 #[allow(dead_code)]
12945 client: ::fidl_next::protocol::Client<___T>,
12946 }
12947
12948 impl<___T> DictionaryDrainIteratorClient<___T>
12949 where
12950 ___T: ::fidl_next::Transport,
12951 {
12952 #[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"]
12953 pub fn get_next(
12954 &self,
12955
12956 start_id: impl ::fidl_next::Encode<
12957 ::fidl_next::wire::Uint64,
12958 <___T as ::fidl_next::Transport>::SendBuffer,
12959 >,
12960
12961 limit: impl ::fidl_next::Encode<
12962 ::fidl_next::wire::Uint32,
12963 <___T as ::fidl_next::Transport>::SendBuffer,
12964 >,
12965 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
12966 where
12967 <___T as ::fidl_next::Transport>::SendBuffer:
12968 ::fidl_next::encoder::InternalHandleEncoder,
12969 {
12970 self.get_next_with(crate::generic::DictionaryDrainIteratorGetNextRequest {
12971 start_id,
12972
12973 limit,
12974 })
12975 }
12976
12977 #[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"]
12978 pub fn get_next_with<___R>(
12979 &self,
12980 request: ___R,
12981 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
12982 where
12983 ___R: ::fidl_next::Encode<
12984 crate::wire::DictionaryDrainIteratorGetNextRequest,
12985 <___T as ::fidl_next::Transport>::SendBuffer,
12986 >,
12987 {
12988 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12989 5728722530628427873,
12990 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
12991 request,
12992 ))
12993 }
12994 }
12995
12996 #[repr(transparent)]
12998 pub struct DictionaryDrainIteratorServer<___T: ::fidl_next::Transport> {
12999 server: ::fidl_next::protocol::Server<___T>,
13000 }
13001
13002 impl<___T> DictionaryDrainIteratorServer<___T> where ___T: ::fidl_next::Transport {}
13003 }
13004}
13005
13006#[diagnostic::on_unimplemented(
13007 note = "If {Self} implements the non-local DictionaryDrainIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
13008)]
13009
13010pub trait DictionaryDrainIteratorLocalClientHandler<
13014 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13015 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13016>
13017{
13018 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13019 ::core::future::ready(())
13020 }
13021}
13022
13023impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryDrainIterator
13024where
13025 ___H: DictionaryDrainIteratorLocalClientHandler<___T>,
13026 ___T: ::fidl_next::Transport,
13027{
13028 async fn on_event(
13029 handler: &mut ___H,
13030 ordinal: u64,
13031 flexibility: ::fidl_next::protocol::Flexibility,
13032 body: ::fidl_next::Body<___T>,
13033 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13034 match ordinal {
13035 ordinal => {
13036 handler.on_unknown_interaction(ordinal).await;
13037 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13038 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13039 } else {
13040 Ok(())
13041 }
13042 }
13043 }
13044 }
13045}
13046
13047#[diagnostic::on_unimplemented(
13048 note = "If {Self} implements the non-local DictionaryDrainIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
13049)]
13050
13051pub trait DictionaryDrainIteratorLocalServerHandler<
13055 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13056 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13057>
13058{
13059 #[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"]
13060 fn get_next(
13061 &mut self,
13062
13063 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
13064
13065 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
13066 ) -> impl ::core::future::Future<Output = ()>;
13067
13068 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13069 ::core::future::ready(())
13070 }
13071}
13072
13073impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryDrainIterator
13074where
13075 ___H: DictionaryDrainIteratorLocalServerHandler<___T>,
13076 ___T: ::fidl_next::Transport,
13077 for<'de> crate::wire::DictionaryDrainIteratorGetNextRequest: ::fidl_next::Decode<
13078 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13079 Constraint = (),
13080 >,
13081{
13082 async fn on_one_way(
13083 handler: &mut ___H,
13084 ordinal: u64,
13085 flexibility: ::fidl_next::protocol::Flexibility,
13086 body: ::fidl_next::Body<___T>,
13087 ) -> ::core::result::Result<
13088 (),
13089 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13090 > {
13091 match ordinal {
13092 ordinal => {
13093 handler.on_unknown_interaction(ordinal).await;
13094 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13095 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13096 } else {
13097 Ok(())
13098 }
13099 }
13100 }
13101 }
13102
13103 async fn on_two_way(
13104 handler: &mut ___H,
13105 ordinal: u64,
13106 flexibility: ::fidl_next::protocol::Flexibility,
13107 body: ::fidl_next::Body<___T>,
13108 responder: ::fidl_next::protocol::Responder<___T>,
13109 ) -> ::core::result::Result<
13110 (),
13111 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13112 > {
13113 match ordinal {
13114 5728722530628427873 => {
13115 let responder = ::fidl_next::Responder::from_untyped(responder);
13116
13117 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13118 Ok(decoded) => {
13119 handler
13120 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13121 .await;
13122 Ok(())
13123 }
13124 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13125 ordinal: 5728722530628427873,
13126 error,
13127 }),
13128 }
13129 }
13130
13131 ordinal => {
13132 handler.on_unknown_interaction(ordinal).await;
13133 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13134 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13135 } else {
13136 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13137 ordinal,
13138 flexibility,
13139 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13140 )
13141 .expect("encoding a framework error should never fail")
13142 .await?;
13143 Ok(())
13144 }
13145 }
13146 }
13147 }
13148}
13149
13150pub trait DictionaryDrainIteratorClientHandler<
13154 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13155 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13156>
13157{
13158 fn on_unknown_interaction(
13159 &mut self,
13160 ordinal: u64,
13161 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13162 ::core::future::ready(())
13163 }
13164}
13165
13166impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryDrainIterator
13167where
13168 ___H: DictionaryDrainIteratorClientHandler<___T> + ::core::marker::Send,
13169 ___T: ::fidl_next::Transport,
13170{
13171 async fn on_event(
13172 handler: &mut ___H,
13173 ordinal: u64,
13174 flexibility: ::fidl_next::protocol::Flexibility,
13175 body: ::fidl_next::Body<___T>,
13176 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13177 match ordinal {
13178 ordinal => {
13179 handler.on_unknown_interaction(ordinal).await;
13180 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13181 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13182 } else {
13183 Ok(())
13184 }
13185 }
13186 }
13187 }
13188}
13189
13190pub trait DictionaryDrainIteratorServerHandler<
13194 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13195 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13196>
13197{
13198 #[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"]
13199 fn get_next(
13200 &mut self,
13201
13202 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
13203
13204 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
13205 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13206
13207 fn on_unknown_interaction(
13208 &mut self,
13209 ordinal: u64,
13210 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13211 ::core::future::ready(())
13212 }
13213}
13214
13215impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryDrainIterator
13216where
13217 ___H: DictionaryDrainIteratorServerHandler<___T> + ::core::marker::Send,
13218 ___T: ::fidl_next::Transport,
13219 for<'de> crate::wire::DictionaryDrainIteratorGetNextRequest: ::fidl_next::Decode<
13220 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13221 Constraint = (),
13222 >,
13223{
13224 async fn on_one_way(
13225 handler: &mut ___H,
13226 ordinal: u64,
13227 flexibility: ::fidl_next::protocol::Flexibility,
13228 body: ::fidl_next::Body<___T>,
13229 ) -> ::core::result::Result<
13230 (),
13231 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13232 > {
13233 match ordinal {
13234 ordinal => {
13235 handler.on_unknown_interaction(ordinal).await;
13236 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13237 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13238 } else {
13239 Ok(())
13240 }
13241 }
13242 }
13243 }
13244
13245 async fn on_two_way(
13246 handler: &mut ___H,
13247 ordinal: u64,
13248 flexibility: ::fidl_next::protocol::Flexibility,
13249 body: ::fidl_next::Body<___T>,
13250 responder: ::fidl_next::protocol::Responder<___T>,
13251 ) -> ::core::result::Result<
13252 (),
13253 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13254 > {
13255 match ordinal {
13256 5728722530628427873 => {
13257 let responder = ::fidl_next::Responder::from_untyped(responder);
13258
13259 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13260 Ok(decoded) => {
13261 handler
13262 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13263 .await;
13264 Ok(())
13265 }
13266 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13267 ordinal: 5728722530628427873,
13268 error,
13269 }),
13270 }
13271 }
13272
13273 ordinal => {
13274 handler.on_unknown_interaction(ordinal).await;
13275 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13276 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13277 } else {
13278 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13279 ordinal,
13280 flexibility,
13281 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13282 )
13283 .expect("encoding a framework error should never fail")
13284 .await?;
13285 Ok(())
13286 }
13287 }
13288 }
13289 }
13290}
13291
13292impl<___T> DictionaryDrainIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
13293where
13294 ___T: ::fidl_next::Transport,
13295{
13296 async fn on_unknown_interaction(&mut self, _: u64) {}
13297}
13298
13299impl<___H, ___T> DictionaryDrainIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
13300where
13301 ___H: DictionaryDrainIteratorClientHandler<___T>,
13302 ___T: ::fidl_next::Transport,
13303{
13304 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13305 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13306 }
13307}
13308
13309impl<___H, ___T> DictionaryDrainIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
13310where
13311 ___H: DictionaryDrainIteratorServerHandler<___T>,
13312 ___T: ::fidl_next::Transport,
13313{
13314 async fn get_next(
13315 &mut self,
13316
13317 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
13318
13319 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
13320 ) {
13321 ___H::get_next(&mut self.0, request, responder).await
13322 }
13323
13324 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13325 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13326 }
13327}
13328
13329#[derive(PartialEq, Debug)]
13331pub struct DictionaryEnumerateIterator;
13332
13333#[cfg(target_os = "fuchsia")]
13334impl ::fidl_next::HasTransport for DictionaryEnumerateIterator {
13335 type Transport = ::fidl_next::fuchsia::zx::Channel;
13336}
13337
13338pub mod dictionary_enumerate_iterator {
13339 pub mod prelude {
13340 pub use crate::{
13341 DictionaryEnumerateIterator, DictionaryEnumerateIteratorClientHandler,
13342 DictionaryEnumerateIteratorLocalClientHandler,
13343 DictionaryEnumerateIteratorLocalServerHandler,
13344 DictionaryEnumerateIteratorServerHandler, dictionary_enumerate_iterator,
13345 };
13346
13347 pub use crate::natural::CapabilityStoreError;
13348
13349 pub use crate::natural::DictionaryEnumerateIteratorGetNextRequest;
13350
13351 pub use crate::natural::DictionaryEnumerateIteratorGetNextResponse;
13352 }
13353
13354 pub struct GetNext;
13355
13356 impl ::fidl_next::Method for GetNext {
13357 const ORDINAL: u64 = 1511164556663256527;
13358 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13359 ::fidl_next::protocol::Flexibility::Flexible;
13360
13361 type Protocol = crate::DictionaryEnumerateIterator;
13362
13363 type Request = crate::wire::DictionaryEnumerateIteratorGetNextRequest;
13364 }
13365
13366 impl ::fidl_next::TwoWayMethod for GetNext {
13367 type Response = ::fidl_next::wire::FlexibleResult<
13368 'static,
13369 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
13370 crate::wire::CapabilityStoreError,
13371 >;
13372 }
13373
13374 impl<___R> ::fidl_next::Respond<___R> for GetNext {
13375 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13376
13377 fn respond(response: ___R) -> Self::Output {
13378 ::fidl_next::FlexibleResult::Ok(response)
13379 }
13380 }
13381
13382 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
13383 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13384
13385 fn respond_err(response: ___R) -> Self::Output {
13386 ::fidl_next::FlexibleResult::Err(response)
13387 }
13388 }
13389
13390 mod ___detail {
13391 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryEnumerateIterator
13392 where
13393 ___T: ::fidl_next::Transport,
13394 {
13395 type Client = DictionaryEnumerateIteratorClient<___T>;
13396 type Server = DictionaryEnumerateIteratorServer<___T>;
13397 }
13398
13399 #[repr(transparent)]
13401 pub struct DictionaryEnumerateIteratorClient<___T: ::fidl_next::Transport> {
13402 #[allow(dead_code)]
13403 client: ::fidl_next::protocol::Client<___T>,
13404 }
13405
13406 impl<___T> DictionaryEnumerateIteratorClient<___T>
13407 where
13408 ___T: ::fidl_next::Transport,
13409 {
13410 #[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"]
13411 pub fn get_next(
13412 &self,
13413
13414 start_id: impl ::fidl_next::Encode<
13415 ::fidl_next::wire::Uint64,
13416 <___T as ::fidl_next::Transport>::SendBuffer,
13417 >,
13418
13419 limit: impl ::fidl_next::Encode<
13420 ::fidl_next::wire::Uint32,
13421 <___T as ::fidl_next::Transport>::SendBuffer,
13422 >,
13423 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
13424 where
13425 <___T as ::fidl_next::Transport>::SendBuffer:
13426 ::fidl_next::encoder::InternalHandleEncoder,
13427 {
13428 self.get_next_with(crate::generic::DictionaryEnumerateIteratorGetNextRequest {
13429 start_id,
13430
13431 limit,
13432 })
13433 }
13434
13435 #[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"]
13436 pub fn get_next_with<___R>(
13437 &self,
13438 request: ___R,
13439 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
13440 where
13441 ___R: ::fidl_next::Encode<
13442 crate::wire::DictionaryEnumerateIteratorGetNextRequest,
13443 <___T as ::fidl_next::Transport>::SendBuffer,
13444 >,
13445 {
13446 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13447 1511164556663256527,
13448 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
13449 request,
13450 ))
13451 }
13452 }
13453
13454 #[repr(transparent)]
13456 pub struct DictionaryEnumerateIteratorServer<___T: ::fidl_next::Transport> {
13457 server: ::fidl_next::protocol::Server<___T>,
13458 }
13459
13460 impl<___T> DictionaryEnumerateIteratorServer<___T> where ___T: ::fidl_next::Transport {}
13461 }
13462}
13463
13464#[diagnostic::on_unimplemented(
13465 note = "If {Self} implements the non-local DictionaryEnumerateIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
13466)]
13467
13468pub trait DictionaryEnumerateIteratorLocalClientHandler<
13472 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13473 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13474>
13475{
13476 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13477 ::core::future::ready(())
13478 }
13479}
13480
13481impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryEnumerateIterator
13482where
13483 ___H: DictionaryEnumerateIteratorLocalClientHandler<___T>,
13484 ___T: ::fidl_next::Transport,
13485{
13486 async fn on_event(
13487 handler: &mut ___H,
13488 ordinal: u64,
13489 flexibility: ::fidl_next::protocol::Flexibility,
13490 body: ::fidl_next::Body<___T>,
13491 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13492 match ordinal {
13493 ordinal => {
13494 handler.on_unknown_interaction(ordinal).await;
13495 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13496 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13497 } else {
13498 Ok(())
13499 }
13500 }
13501 }
13502 }
13503}
13504
13505#[diagnostic::on_unimplemented(
13506 note = "If {Self} implements the non-local DictionaryEnumerateIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
13507)]
13508
13509pub trait DictionaryEnumerateIteratorLocalServerHandler<
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 #[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"]
13518 fn get_next(
13519 &mut self,
13520
13521 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
13522
13523 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
13524 ) -> impl ::core::future::Future<Output = ()>;
13525
13526 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13527 ::core::future::ready(())
13528 }
13529}
13530
13531impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryEnumerateIterator
13532where
13533 ___H: DictionaryEnumerateIteratorLocalServerHandler<___T>,
13534 ___T: ::fidl_next::Transport,
13535 for<'de> crate::wire::DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Decode<
13536 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13537 Constraint = (),
13538 >,
13539{
13540 async fn on_one_way(
13541 handler: &mut ___H,
13542 ordinal: u64,
13543 flexibility: ::fidl_next::protocol::Flexibility,
13544 body: ::fidl_next::Body<___T>,
13545 ) -> ::core::result::Result<
13546 (),
13547 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13548 > {
13549 match ordinal {
13550 ordinal => {
13551 handler.on_unknown_interaction(ordinal).await;
13552 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13553 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13554 } else {
13555 Ok(())
13556 }
13557 }
13558 }
13559 }
13560
13561 async fn on_two_way(
13562 handler: &mut ___H,
13563 ordinal: u64,
13564 flexibility: ::fidl_next::protocol::Flexibility,
13565 body: ::fidl_next::Body<___T>,
13566 responder: ::fidl_next::protocol::Responder<___T>,
13567 ) -> ::core::result::Result<
13568 (),
13569 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13570 > {
13571 match ordinal {
13572 1511164556663256527 => {
13573 let responder = ::fidl_next::Responder::from_untyped(responder);
13574
13575 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13576 Ok(decoded) => {
13577 handler
13578 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13579 .await;
13580 Ok(())
13581 }
13582 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13583 ordinal: 1511164556663256527,
13584 error,
13585 }),
13586 }
13587 }
13588
13589 ordinal => {
13590 handler.on_unknown_interaction(ordinal).await;
13591 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13592 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13593 } else {
13594 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13595 ordinal,
13596 flexibility,
13597 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13598 )
13599 .expect("encoding a framework error should never fail")
13600 .await?;
13601 Ok(())
13602 }
13603 }
13604 }
13605 }
13606}
13607
13608pub trait DictionaryEnumerateIteratorClientHandler<
13612 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13613 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13614>
13615{
13616 fn on_unknown_interaction(
13617 &mut self,
13618 ordinal: u64,
13619 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13620 ::core::future::ready(())
13621 }
13622}
13623
13624impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryEnumerateIterator
13625where
13626 ___H: DictionaryEnumerateIteratorClientHandler<___T> + ::core::marker::Send,
13627 ___T: ::fidl_next::Transport,
13628{
13629 async fn on_event(
13630 handler: &mut ___H,
13631 ordinal: u64,
13632 flexibility: ::fidl_next::protocol::Flexibility,
13633 body: ::fidl_next::Body<___T>,
13634 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13635 match ordinal {
13636 ordinal => {
13637 handler.on_unknown_interaction(ordinal).await;
13638 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13639 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13640 } else {
13641 Ok(())
13642 }
13643 }
13644 }
13645 }
13646}
13647
13648pub trait DictionaryEnumerateIteratorServerHandler<
13652 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13653 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13654>
13655{
13656 #[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"]
13657 fn get_next(
13658 &mut self,
13659
13660 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
13661
13662 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
13663 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13664
13665 fn on_unknown_interaction(
13666 &mut self,
13667 ordinal: u64,
13668 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13669 ::core::future::ready(())
13670 }
13671}
13672
13673impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryEnumerateIterator
13674where
13675 ___H: DictionaryEnumerateIteratorServerHandler<___T> + ::core::marker::Send,
13676 ___T: ::fidl_next::Transport,
13677 for<'de> crate::wire::DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Decode<
13678 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13679 Constraint = (),
13680 >,
13681{
13682 async fn on_one_way(
13683 handler: &mut ___H,
13684 ordinal: u64,
13685 flexibility: ::fidl_next::protocol::Flexibility,
13686 body: ::fidl_next::Body<___T>,
13687 ) -> ::core::result::Result<
13688 (),
13689 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13690 > {
13691 match ordinal {
13692 ordinal => {
13693 handler.on_unknown_interaction(ordinal).await;
13694 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13695 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13696 } else {
13697 Ok(())
13698 }
13699 }
13700 }
13701 }
13702
13703 async fn on_two_way(
13704 handler: &mut ___H,
13705 ordinal: u64,
13706 flexibility: ::fidl_next::protocol::Flexibility,
13707 body: ::fidl_next::Body<___T>,
13708 responder: ::fidl_next::protocol::Responder<___T>,
13709 ) -> ::core::result::Result<
13710 (),
13711 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13712 > {
13713 match ordinal {
13714 1511164556663256527 => {
13715 let responder = ::fidl_next::Responder::from_untyped(responder);
13716
13717 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13718 Ok(decoded) => {
13719 handler
13720 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
13721 .await;
13722 Ok(())
13723 }
13724 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13725 ordinal: 1511164556663256527,
13726 error,
13727 }),
13728 }
13729 }
13730
13731 ordinal => {
13732 handler.on_unknown_interaction(ordinal).await;
13733 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13734 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13735 } else {
13736 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13737 ordinal,
13738 flexibility,
13739 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13740 )
13741 .expect("encoding a framework error should never fail")
13742 .await?;
13743 Ok(())
13744 }
13745 }
13746 }
13747 }
13748}
13749
13750impl<___T> DictionaryEnumerateIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
13751where
13752 ___T: ::fidl_next::Transport,
13753{
13754 async fn on_unknown_interaction(&mut self, _: u64) {}
13755}
13756
13757impl<___H, ___T> DictionaryEnumerateIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
13758where
13759 ___H: DictionaryEnumerateIteratorClientHandler<___T>,
13760 ___T: ::fidl_next::Transport,
13761{
13762 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13763 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13764 }
13765}
13766
13767impl<___H, ___T> DictionaryEnumerateIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
13768where
13769 ___H: DictionaryEnumerateIteratorServerHandler<___T>,
13770 ___T: ::fidl_next::Transport,
13771{
13772 async fn get_next(
13773 &mut self,
13774
13775 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
13776
13777 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
13778 ) {
13779 ___H::get_next(&mut self.0, request, responder).await
13780 }
13781
13782 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13783 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13784 }
13785}
13786
13787#[derive(PartialEq, Debug)]
13789pub struct DictionaryKeysIterator;
13790
13791#[cfg(target_os = "fuchsia")]
13792impl ::fidl_next::HasTransport for DictionaryKeysIterator {
13793 type Transport = ::fidl_next::fuchsia::zx::Channel;
13794}
13795
13796pub mod dictionary_keys_iterator {
13797 pub mod prelude {
13798 pub use crate::{
13799 DictionaryKeysIterator, DictionaryKeysIteratorClientHandler,
13800 DictionaryKeysIteratorLocalClientHandler, DictionaryKeysIteratorLocalServerHandler,
13801 DictionaryKeysIteratorServerHandler, dictionary_keys_iterator,
13802 };
13803
13804 pub use crate::natural::DictionaryKeysIteratorGetNextResponse;
13805 }
13806
13807 pub struct GetNext;
13808
13809 impl ::fidl_next::Method for GetNext {
13810 const ORDINAL: u64 = 4987781442555247955;
13811 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13812 ::fidl_next::protocol::Flexibility::Flexible;
13813
13814 type Protocol = crate::DictionaryKeysIterator;
13815
13816 type Request = ::fidl_next::wire::EmptyMessageBody;
13817 }
13818
13819 impl ::fidl_next::TwoWayMethod for GetNext {
13820 type Response = ::fidl_next::wire::Flexible<
13821 'static,
13822 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
13823 >;
13824 }
13825
13826 impl<___R> ::fidl_next::Respond<___R> for GetNext {
13827 type Output =
13828 ::fidl_next::Flexible<crate::generic::DictionaryKeysIteratorGetNextResponse<___R>>;
13829
13830 fn respond(response: ___R) -> Self::Output {
13831 ::fidl_next::Flexible::Ok(crate::generic::DictionaryKeysIteratorGetNextResponse {
13832 keys: response,
13833 })
13834 }
13835 }
13836
13837 mod ___detail {
13838 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryKeysIterator
13839 where
13840 ___T: ::fidl_next::Transport,
13841 {
13842 type Client = DictionaryKeysIteratorClient<___T>;
13843 type Server = DictionaryKeysIteratorServer<___T>;
13844 }
13845
13846 #[repr(transparent)]
13848 pub struct DictionaryKeysIteratorClient<___T: ::fidl_next::Transport> {
13849 #[allow(dead_code)]
13850 client: ::fidl_next::protocol::Client<___T>,
13851 }
13852
13853 impl<___T> DictionaryKeysIteratorClient<___T>
13854 where
13855 ___T: ::fidl_next::Transport,
13856 {
13857 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
13858 ::fidl_next::TwoWayFuture::from_untyped(
13859 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13860 4987781442555247955,
13861 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
13862 (),
13863 ),
13864 )
13865 }
13866 }
13867
13868 #[repr(transparent)]
13870 pub struct DictionaryKeysIteratorServer<___T: ::fidl_next::Transport> {
13871 server: ::fidl_next::protocol::Server<___T>,
13872 }
13873
13874 impl<___T> DictionaryKeysIteratorServer<___T> where ___T: ::fidl_next::Transport {}
13875 }
13876}
13877
13878#[diagnostic::on_unimplemented(
13879 note = "If {Self} implements the non-local DictionaryKeysIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
13880)]
13881
13882pub trait DictionaryKeysIteratorLocalClientHandler<
13886 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13887 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13888>
13889{
13890 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13891 ::core::future::ready(())
13892 }
13893}
13894
13895impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryKeysIterator
13896where
13897 ___H: DictionaryKeysIteratorLocalClientHandler<___T>,
13898 ___T: ::fidl_next::Transport,
13899{
13900 async fn on_event(
13901 handler: &mut ___H,
13902 ordinal: u64,
13903 flexibility: ::fidl_next::protocol::Flexibility,
13904 body: ::fidl_next::Body<___T>,
13905 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13906 match ordinal {
13907 ordinal => {
13908 handler.on_unknown_interaction(ordinal).await;
13909 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13910 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13911 } else {
13912 Ok(())
13913 }
13914 }
13915 }
13916 }
13917}
13918
13919#[diagnostic::on_unimplemented(
13920 note = "If {Self} implements the non-local DictionaryKeysIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
13921)]
13922
13923pub trait DictionaryKeysIteratorLocalServerHandler<
13927 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13928 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13929>
13930{
13931 fn get_next(
13932 &mut self,
13933
13934 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
13935 ) -> impl ::core::future::Future<Output = ()>;
13936
13937 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
13938 ::core::future::ready(())
13939 }
13940}
13941
13942impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryKeysIterator
13943where
13944 ___H: DictionaryKeysIteratorLocalServerHandler<___T>,
13945 ___T: ::fidl_next::Transport,
13946{
13947 async fn on_one_way(
13948 handler: &mut ___H,
13949 ordinal: u64,
13950 flexibility: ::fidl_next::protocol::Flexibility,
13951 body: ::fidl_next::Body<___T>,
13952 ) -> ::core::result::Result<
13953 (),
13954 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13955 > {
13956 match ordinal {
13957 ordinal => {
13958 handler.on_unknown_interaction(ordinal).await;
13959 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13960 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13961 } else {
13962 Ok(())
13963 }
13964 }
13965 }
13966 }
13967
13968 async fn on_two_way(
13969 handler: &mut ___H,
13970 ordinal: u64,
13971 flexibility: ::fidl_next::protocol::Flexibility,
13972 body: ::fidl_next::Body<___T>,
13973 responder: ::fidl_next::protocol::Responder<___T>,
13974 ) -> ::core::result::Result<
13975 (),
13976 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13977 > {
13978 match ordinal {
13979 4987781442555247955 => {
13980 let responder = ::fidl_next::Responder::from_untyped(responder);
13981
13982 handler.get_next(responder).await;
13983 Ok(())
13984 }
13985
13986 ordinal => {
13987 handler.on_unknown_interaction(ordinal).await;
13988 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13989 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13990 } else {
13991 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13992 ordinal,
13993 flexibility,
13994 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13995 )
13996 .expect("encoding a framework error should never fail")
13997 .await?;
13998 Ok(())
13999 }
14000 }
14001 }
14002 }
14003}
14004
14005pub trait DictionaryKeysIteratorClientHandler<
14009 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14010 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14011>
14012{
14013 fn on_unknown_interaction(
14014 &mut self,
14015 ordinal: u64,
14016 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14017 ::core::future::ready(())
14018 }
14019}
14020
14021impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryKeysIterator
14022where
14023 ___H: DictionaryKeysIteratorClientHandler<___T> + ::core::marker::Send,
14024 ___T: ::fidl_next::Transport,
14025{
14026 async fn on_event(
14027 handler: &mut ___H,
14028 ordinal: u64,
14029 flexibility: ::fidl_next::protocol::Flexibility,
14030 body: ::fidl_next::Body<___T>,
14031 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14032 match ordinal {
14033 ordinal => {
14034 handler.on_unknown_interaction(ordinal).await;
14035 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14036 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14037 } else {
14038 Ok(())
14039 }
14040 }
14041 }
14042 }
14043}
14044
14045pub trait DictionaryKeysIteratorServerHandler<
14049 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14050 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14051>
14052{
14053 fn get_next(
14054 &mut self,
14055
14056 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
14057 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14058
14059 fn on_unknown_interaction(
14060 &mut self,
14061 ordinal: u64,
14062 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14063 ::core::future::ready(())
14064 }
14065}
14066
14067impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryKeysIterator
14068where
14069 ___H: DictionaryKeysIteratorServerHandler<___T> + ::core::marker::Send,
14070 ___T: ::fidl_next::Transport,
14071{
14072 async fn on_one_way(
14073 handler: &mut ___H,
14074 ordinal: u64,
14075 flexibility: ::fidl_next::protocol::Flexibility,
14076 body: ::fidl_next::Body<___T>,
14077 ) -> ::core::result::Result<
14078 (),
14079 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14080 > {
14081 match ordinal {
14082 ordinal => {
14083 handler.on_unknown_interaction(ordinal).await;
14084 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14085 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14086 } else {
14087 Ok(())
14088 }
14089 }
14090 }
14091 }
14092
14093 async fn on_two_way(
14094 handler: &mut ___H,
14095 ordinal: u64,
14096 flexibility: ::fidl_next::protocol::Flexibility,
14097 body: ::fidl_next::Body<___T>,
14098 responder: ::fidl_next::protocol::Responder<___T>,
14099 ) -> ::core::result::Result<
14100 (),
14101 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14102 > {
14103 match ordinal {
14104 4987781442555247955 => {
14105 let responder = ::fidl_next::Responder::from_untyped(responder);
14106
14107 handler.get_next(responder).await;
14108 Ok(())
14109 }
14110
14111 ordinal => {
14112 handler.on_unknown_interaction(ordinal).await;
14113 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14114 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14115 } else {
14116 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
14117 ordinal,
14118 flexibility,
14119 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
14120 )
14121 .expect("encoding a framework error should never fail")
14122 .await?;
14123 Ok(())
14124 }
14125 }
14126 }
14127 }
14128}
14129
14130impl<___T> DictionaryKeysIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
14131where
14132 ___T: ::fidl_next::Transport,
14133{
14134 async fn on_unknown_interaction(&mut self, _: u64) {}
14135}
14136
14137impl<___H, ___T> DictionaryKeysIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
14138where
14139 ___H: DictionaryKeysIteratorClientHandler<___T>,
14140 ___T: ::fidl_next::Transport,
14141{
14142 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14143 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14144 }
14145}
14146
14147impl<___H, ___T> DictionaryKeysIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
14148where
14149 ___H: DictionaryKeysIteratorServerHandler<___T>,
14150 ___T: ::fidl_next::Transport,
14151{
14152 async fn get_next(
14153 &mut self,
14154
14155 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
14156 ) {
14157 ___H::get_next(&mut self.0, responder).await
14158 }
14159
14160 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14161 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14162 }
14163}
14164
14165#[derive(PartialEq, Debug)]
14167pub struct DictionaryRouter;
14168
14169impl ::fidl_next::Discoverable for DictionaryRouter {
14170 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
14171}
14172
14173#[cfg(target_os = "fuchsia")]
14174impl ::fidl_next::HasTransport for DictionaryRouter {
14175 type Transport = ::fidl_next::fuchsia::zx::Channel;
14176}
14177
14178pub mod dictionary_router {
14179 pub mod prelude {
14180 pub use crate::{
14181 DictionaryRouter, DictionaryRouterClientHandler, DictionaryRouterLocalClientHandler,
14182 DictionaryRouterLocalServerHandler, DictionaryRouterServerHandler, dictionary_router,
14183 };
14184
14185 pub use crate::natural::DictionaryRouterRouteResponse;
14186
14187 pub use crate::natural::RouteRequest;
14188
14189 pub use crate::natural::RouterError;
14190 }
14191
14192 pub struct Route;
14193
14194 impl ::fidl_next::Method for Route {
14195 const ORDINAL: u64 = 8164012099375978399;
14196 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14197 ::fidl_next::protocol::Flexibility::Flexible;
14198
14199 type Protocol = crate::DictionaryRouter;
14200
14201 type Request = crate::wire::RouteRequest<'static>;
14202 }
14203
14204 impl ::fidl_next::TwoWayMethod for Route {
14205 type Response = ::fidl_next::wire::FlexibleResult<
14206 'static,
14207 crate::wire::DictionaryRouterRouteResponse,
14208 crate::wire::RouterError,
14209 >;
14210 }
14211
14212 impl<___R> ::fidl_next::Respond<___R> for Route {
14213 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
14214
14215 fn respond(response: ___R) -> Self::Output {
14216 ::fidl_next::FlexibleResult::Ok(response)
14217 }
14218 }
14219
14220 impl<___R> ::fidl_next::RespondErr<___R> for Route {
14221 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
14222
14223 fn respond_err(response: ___R) -> Self::Output {
14224 ::fidl_next::FlexibleResult::Err(response)
14225 }
14226 }
14227
14228 mod ___detail {
14229 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryRouter
14230 where
14231 ___T: ::fidl_next::Transport,
14232 {
14233 type Client = DictionaryRouterClient<___T>;
14234 type Server = DictionaryRouterServer<___T>;
14235 }
14236
14237 #[repr(transparent)]
14239 pub struct DictionaryRouterClient<___T: ::fidl_next::Transport> {
14240 #[allow(dead_code)]
14241 client: ::fidl_next::protocol::Client<___T>,
14242 }
14243
14244 impl<___T> DictionaryRouterClient<___T>
14245 where
14246 ___T: ::fidl_next::Transport,
14247 {
14248 pub fn route_with<___R>(
14249 &self,
14250 request: ___R,
14251 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
14252 where
14253 ___R: ::fidl_next::Encode<
14254 crate::wire::RouteRequest<'static>,
14255 <___T as ::fidl_next::Transport>::SendBuffer,
14256 >,
14257 {
14258 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14259 8164012099375978399,
14260 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
14261 request,
14262 ))
14263 }
14264 }
14265
14266 #[repr(transparent)]
14268 pub struct DictionaryRouterServer<___T: ::fidl_next::Transport> {
14269 server: ::fidl_next::protocol::Server<___T>,
14270 }
14271
14272 impl<___T> DictionaryRouterServer<___T> where ___T: ::fidl_next::Transport {}
14273 }
14274}
14275
14276#[diagnostic::on_unimplemented(
14277 note = "If {Self} implements the non-local DictionaryRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14278)]
14279
14280pub trait DictionaryRouterLocalClientHandler<
14284 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14285 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14286>
14287{
14288 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14289 ::core::future::ready(())
14290 }
14291}
14292
14293impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DictionaryRouter
14294where
14295 ___H: DictionaryRouterLocalClientHandler<___T>,
14296 ___T: ::fidl_next::Transport,
14297{
14298 async fn on_event(
14299 handler: &mut ___H,
14300 ordinal: u64,
14301 flexibility: ::fidl_next::protocol::Flexibility,
14302 body: ::fidl_next::Body<___T>,
14303 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14304 match ordinal {
14305 ordinal => {
14306 handler.on_unknown_interaction(ordinal).await;
14307 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14308 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14309 } else {
14310 Ok(())
14311 }
14312 }
14313 }
14314 }
14315}
14316
14317#[diagnostic::on_unimplemented(
14318 note = "If {Self} implements the non-local DictionaryRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14319)]
14320
14321pub trait DictionaryRouterLocalServerHandler<
14325 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14326 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14327>
14328{
14329 fn route(
14330 &mut self,
14331
14332 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
14333
14334 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
14335 ) -> impl ::core::future::Future<Output = ()>;
14336
14337 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14338 ::core::future::ready(())
14339 }
14340}
14341
14342impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DictionaryRouter
14343where
14344 ___H: DictionaryRouterLocalServerHandler<___T>,
14345 ___T: ::fidl_next::Transport,
14346 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
14347 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14348 Constraint = (),
14349 >,
14350{
14351 async fn on_one_way(
14352 handler: &mut ___H,
14353 ordinal: u64,
14354 flexibility: ::fidl_next::protocol::Flexibility,
14355 body: ::fidl_next::Body<___T>,
14356 ) -> ::core::result::Result<
14357 (),
14358 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14359 > {
14360 match ordinal {
14361 ordinal => {
14362 handler.on_unknown_interaction(ordinal).await;
14363 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14364 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14365 } else {
14366 Ok(())
14367 }
14368 }
14369 }
14370 }
14371
14372 async fn on_two_way(
14373 handler: &mut ___H,
14374 ordinal: u64,
14375 flexibility: ::fidl_next::protocol::Flexibility,
14376 body: ::fidl_next::Body<___T>,
14377 responder: ::fidl_next::protocol::Responder<___T>,
14378 ) -> ::core::result::Result<
14379 (),
14380 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14381 > {
14382 match ordinal {
14383 8164012099375978399 => {
14384 let responder = ::fidl_next::Responder::from_untyped(responder);
14385
14386 match ::fidl_next::AsDecoderExt::into_decoded(body) {
14387 Ok(decoded) => {
14388 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
14389 Ok(())
14390 }
14391 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14392 ordinal: 8164012099375978399,
14393 error,
14394 }),
14395 }
14396 }
14397
14398 ordinal => {
14399 handler.on_unknown_interaction(ordinal).await;
14400 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14401 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14402 } else {
14403 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
14404 ordinal,
14405 flexibility,
14406 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
14407 )
14408 .expect("encoding a framework error should never fail")
14409 .await?;
14410 Ok(())
14411 }
14412 }
14413 }
14414 }
14415}
14416
14417pub trait DictionaryRouterClientHandler<
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 on_unknown_interaction(
14426 &mut self,
14427 ordinal: u64,
14428 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14429 ::core::future::ready(())
14430 }
14431}
14432
14433impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryRouter
14434where
14435 ___H: DictionaryRouterClientHandler<___T> + ::core::marker::Send,
14436 ___T: ::fidl_next::Transport,
14437{
14438 async fn on_event(
14439 handler: &mut ___H,
14440 ordinal: u64,
14441 flexibility: ::fidl_next::protocol::Flexibility,
14442 body: ::fidl_next::Body<___T>,
14443 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14444 match ordinal {
14445 ordinal => {
14446 handler.on_unknown_interaction(ordinal).await;
14447 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14448 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14449 } else {
14450 Ok(())
14451 }
14452 }
14453 }
14454 }
14455}
14456
14457pub trait DictionaryRouterServerHandler<
14461 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14462 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14463>
14464{
14465 fn route(
14466 &mut self,
14467
14468 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
14469
14470 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
14471 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14472
14473 fn on_unknown_interaction(
14474 &mut self,
14475 ordinal: u64,
14476 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14477 ::core::future::ready(())
14478 }
14479}
14480
14481impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryRouter
14482where
14483 ___H: DictionaryRouterServerHandler<___T> + ::core::marker::Send,
14484 ___T: ::fidl_next::Transport,
14485 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
14486 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14487 Constraint = (),
14488 >,
14489{
14490 async fn on_one_way(
14491 handler: &mut ___H,
14492 ordinal: u64,
14493 flexibility: ::fidl_next::protocol::Flexibility,
14494 body: ::fidl_next::Body<___T>,
14495 ) -> ::core::result::Result<
14496 (),
14497 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14498 > {
14499 match ordinal {
14500 ordinal => {
14501 handler.on_unknown_interaction(ordinal).await;
14502 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14503 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14504 } else {
14505 Ok(())
14506 }
14507 }
14508 }
14509 }
14510
14511 async fn on_two_way(
14512 handler: &mut ___H,
14513 ordinal: u64,
14514 flexibility: ::fidl_next::protocol::Flexibility,
14515 body: ::fidl_next::Body<___T>,
14516 responder: ::fidl_next::protocol::Responder<___T>,
14517 ) -> ::core::result::Result<
14518 (),
14519 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14520 > {
14521 match ordinal {
14522 8164012099375978399 => {
14523 let responder = ::fidl_next::Responder::from_untyped(responder);
14524
14525 match ::fidl_next::AsDecoderExt::into_decoded(body) {
14526 Ok(decoded) => {
14527 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
14528 Ok(())
14529 }
14530 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14531 ordinal: 8164012099375978399,
14532 error,
14533 }),
14534 }
14535 }
14536
14537 ordinal => {
14538 handler.on_unknown_interaction(ordinal).await;
14539 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14540 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14541 } else {
14542 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
14543 ordinal,
14544 flexibility,
14545 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
14546 )
14547 .expect("encoding a framework error should never fail")
14548 .await?;
14549 Ok(())
14550 }
14551 }
14552 }
14553 }
14554}
14555
14556impl<___T> DictionaryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
14557where
14558 ___T: ::fidl_next::Transport,
14559{
14560 async fn on_unknown_interaction(&mut self, _: u64) {}
14561}
14562
14563impl<___H, ___T> DictionaryRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
14564where
14565 ___H: DictionaryRouterClientHandler<___T>,
14566 ___T: ::fidl_next::Transport,
14567{
14568 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14569 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14570 }
14571}
14572
14573impl<___H, ___T> DictionaryRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
14574where
14575 ___H: DictionaryRouterServerHandler<___T>,
14576 ___T: ::fidl_next::Transport,
14577{
14578 async fn route(
14579 &mut self,
14580
14581 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
14582
14583 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
14584 ) {
14585 ___H::route(&mut self.0, request, responder).await
14586 }
14587
14588 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14589 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14590 }
14591}
14592
14593#[derive(PartialEq, Debug)]
14595pub struct DirConnectorRouter;
14596
14597impl ::fidl_next::Discoverable for DirConnectorRouter {
14598 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
14599}
14600
14601#[cfg(target_os = "fuchsia")]
14602impl ::fidl_next::HasTransport for DirConnectorRouter {
14603 type Transport = ::fidl_next::fuchsia::zx::Channel;
14604}
14605
14606pub mod dir_connector_router {
14607 pub mod prelude {
14608 pub use crate::{
14609 DirConnectorRouter, DirConnectorRouterClientHandler,
14610 DirConnectorRouterLocalClientHandler, DirConnectorRouterLocalServerHandler,
14611 DirConnectorRouterServerHandler, dir_connector_router,
14612 };
14613
14614 pub use crate::natural::DirConnectorRouterRouteResponse;
14615
14616 pub use crate::natural::RouteRequest;
14617
14618 pub use crate::natural::RouterError;
14619 }
14620
14621 pub struct Route;
14622
14623 impl ::fidl_next::Method for Route {
14624 const ORDINAL: u64 = 972231070188342848;
14625 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14626 ::fidl_next::protocol::Flexibility::Flexible;
14627
14628 type Protocol = crate::DirConnectorRouter;
14629
14630 type Request = crate::wire::RouteRequest<'static>;
14631 }
14632
14633 impl ::fidl_next::TwoWayMethod for Route {
14634 type Response = ::fidl_next::wire::FlexibleResult<
14635 'static,
14636 crate::wire::DirConnectorRouterRouteResponse,
14637 crate::wire::RouterError,
14638 >;
14639 }
14640
14641 impl<___R> ::fidl_next::Respond<___R> for Route {
14642 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
14643
14644 fn respond(response: ___R) -> Self::Output {
14645 ::fidl_next::FlexibleResult::Ok(response)
14646 }
14647 }
14648
14649 impl<___R> ::fidl_next::RespondErr<___R> for Route {
14650 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
14651
14652 fn respond_err(response: ___R) -> Self::Output {
14653 ::fidl_next::FlexibleResult::Err(response)
14654 }
14655 }
14656
14657 mod ___detail {
14658 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirConnectorRouter
14659 where
14660 ___T: ::fidl_next::Transport,
14661 {
14662 type Client = DirConnectorRouterClient<___T>;
14663 type Server = DirConnectorRouterServer<___T>;
14664 }
14665
14666 #[repr(transparent)]
14668 pub struct DirConnectorRouterClient<___T: ::fidl_next::Transport> {
14669 #[allow(dead_code)]
14670 client: ::fidl_next::protocol::Client<___T>,
14671 }
14672
14673 impl<___T> DirConnectorRouterClient<___T>
14674 where
14675 ___T: ::fidl_next::Transport,
14676 {
14677 pub fn route_with<___R>(
14678 &self,
14679 request: ___R,
14680 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
14681 where
14682 ___R: ::fidl_next::Encode<
14683 crate::wire::RouteRequest<'static>,
14684 <___T as ::fidl_next::Transport>::SendBuffer,
14685 >,
14686 {
14687 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14688 972231070188342848,
14689 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
14690 request,
14691 ))
14692 }
14693 }
14694
14695 #[repr(transparent)]
14697 pub struct DirConnectorRouterServer<___T: ::fidl_next::Transport> {
14698 server: ::fidl_next::protocol::Server<___T>,
14699 }
14700
14701 impl<___T> DirConnectorRouterServer<___T> where ___T: ::fidl_next::Transport {}
14702 }
14703}
14704
14705#[diagnostic::on_unimplemented(
14706 note = "If {Self} implements the non-local DirConnectorRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14707)]
14708
14709pub trait DirConnectorRouterLocalClientHandler<
14713 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14714 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14715>
14716{
14717 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14718 ::core::future::ready(())
14719 }
14720}
14721
14722impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirConnectorRouter
14723where
14724 ___H: DirConnectorRouterLocalClientHandler<___T>,
14725 ___T: ::fidl_next::Transport,
14726{
14727 async fn on_event(
14728 handler: &mut ___H,
14729 ordinal: u64,
14730 flexibility: ::fidl_next::protocol::Flexibility,
14731 body: ::fidl_next::Body<___T>,
14732 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14733 match ordinal {
14734 ordinal => {
14735 handler.on_unknown_interaction(ordinal).await;
14736 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14737 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14738 } else {
14739 Ok(())
14740 }
14741 }
14742 }
14743 }
14744}
14745
14746#[diagnostic::on_unimplemented(
14747 note = "If {Self} implements the non-local DirConnectorRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14748)]
14749
14750pub trait DirConnectorRouterLocalServerHandler<
14754 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14755 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14756>
14757{
14758 fn route(
14759 &mut self,
14760
14761 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
14762
14763 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
14764 ) -> impl ::core::future::Future<Output = ()>;
14765
14766 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14767 ::core::future::ready(())
14768 }
14769}
14770
14771impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirConnectorRouter
14772where
14773 ___H: DirConnectorRouterLocalServerHandler<___T>,
14774 ___T: ::fidl_next::Transport,
14775 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
14776 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14777 Constraint = (),
14778 >,
14779{
14780 async fn on_one_way(
14781 handler: &mut ___H,
14782 ordinal: u64,
14783 flexibility: ::fidl_next::protocol::Flexibility,
14784 body: ::fidl_next::Body<___T>,
14785 ) -> ::core::result::Result<
14786 (),
14787 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14788 > {
14789 match ordinal {
14790 ordinal => {
14791 handler.on_unknown_interaction(ordinal).await;
14792 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14793 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14794 } else {
14795 Ok(())
14796 }
14797 }
14798 }
14799 }
14800
14801 async fn on_two_way(
14802 handler: &mut ___H,
14803 ordinal: u64,
14804 flexibility: ::fidl_next::protocol::Flexibility,
14805 body: ::fidl_next::Body<___T>,
14806 responder: ::fidl_next::protocol::Responder<___T>,
14807 ) -> ::core::result::Result<
14808 (),
14809 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14810 > {
14811 match ordinal {
14812 972231070188342848 => {
14813 let responder = ::fidl_next::Responder::from_untyped(responder);
14814
14815 match ::fidl_next::AsDecoderExt::into_decoded(body) {
14816 Ok(decoded) => {
14817 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
14818 Ok(())
14819 }
14820 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14821 ordinal: 972231070188342848,
14822 error,
14823 }),
14824 }
14825 }
14826
14827 ordinal => {
14828 handler.on_unknown_interaction(ordinal).await;
14829 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14830 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14831 } else {
14832 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
14833 ordinal,
14834 flexibility,
14835 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
14836 )
14837 .expect("encoding a framework error should never fail")
14838 .await?;
14839 Ok(())
14840 }
14841 }
14842 }
14843 }
14844}
14845
14846pub trait DirConnectorRouterClientHandler<
14850 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14851 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14852>
14853{
14854 fn on_unknown_interaction(
14855 &mut self,
14856 ordinal: u64,
14857 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14858 ::core::future::ready(())
14859 }
14860}
14861
14862impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirConnectorRouter
14863where
14864 ___H: DirConnectorRouterClientHandler<___T> + ::core::marker::Send,
14865 ___T: ::fidl_next::Transport,
14866{
14867 async fn on_event(
14868 handler: &mut ___H,
14869 ordinal: u64,
14870 flexibility: ::fidl_next::protocol::Flexibility,
14871 body: ::fidl_next::Body<___T>,
14872 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14873 match ordinal {
14874 ordinal => {
14875 handler.on_unknown_interaction(ordinal).await;
14876 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14877 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14878 } else {
14879 Ok(())
14880 }
14881 }
14882 }
14883 }
14884}
14885
14886pub trait DirConnectorRouterServerHandler<
14890 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14891 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14892>
14893{
14894 fn route(
14895 &mut self,
14896
14897 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
14898
14899 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
14900 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14901
14902 fn on_unknown_interaction(
14903 &mut self,
14904 ordinal: u64,
14905 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14906 ::core::future::ready(())
14907 }
14908}
14909
14910impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirConnectorRouter
14911where
14912 ___H: DirConnectorRouterServerHandler<___T> + ::core::marker::Send,
14913 ___T: ::fidl_next::Transport,
14914 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
14915 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14916 Constraint = (),
14917 >,
14918{
14919 async fn on_one_way(
14920 handler: &mut ___H,
14921 ordinal: u64,
14922 flexibility: ::fidl_next::protocol::Flexibility,
14923 body: ::fidl_next::Body<___T>,
14924 ) -> ::core::result::Result<
14925 (),
14926 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14927 > {
14928 match ordinal {
14929 ordinal => {
14930 handler.on_unknown_interaction(ordinal).await;
14931 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14932 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14933 } else {
14934 Ok(())
14935 }
14936 }
14937 }
14938 }
14939
14940 async fn on_two_way(
14941 handler: &mut ___H,
14942 ordinal: u64,
14943 flexibility: ::fidl_next::protocol::Flexibility,
14944 body: ::fidl_next::Body<___T>,
14945 responder: ::fidl_next::protocol::Responder<___T>,
14946 ) -> ::core::result::Result<
14947 (),
14948 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14949 > {
14950 match ordinal {
14951 972231070188342848 => {
14952 let responder = ::fidl_next::Responder::from_untyped(responder);
14953
14954 match ::fidl_next::AsDecoderExt::into_decoded(body) {
14955 Ok(decoded) => {
14956 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
14957 Ok(())
14958 }
14959 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14960 ordinal: 972231070188342848,
14961 error,
14962 }),
14963 }
14964 }
14965
14966 ordinal => {
14967 handler.on_unknown_interaction(ordinal).await;
14968 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14969 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14970 } else {
14971 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
14972 ordinal,
14973 flexibility,
14974 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
14975 )
14976 .expect("encoding a framework error should never fail")
14977 .await?;
14978 Ok(())
14979 }
14980 }
14981 }
14982 }
14983}
14984
14985impl<___T> DirConnectorRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
14986where
14987 ___T: ::fidl_next::Transport,
14988{
14989 async fn on_unknown_interaction(&mut self, _: u64) {}
14990}
14991
14992impl<___H, ___T> DirConnectorRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
14993where
14994 ___H: DirConnectorRouterClientHandler<___T>,
14995 ___T: ::fidl_next::Transport,
14996{
14997 async fn on_unknown_interaction(&mut self, ordinal: u64) {
14998 ___H::on_unknown_interaction(&mut self.0, ordinal).await
14999 }
15000}
15001
15002impl<___H, ___T> DirConnectorRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
15003where
15004 ___H: DirConnectorRouterServerHandler<___T>,
15005 ___T: ::fidl_next::Transport,
15006{
15007 async fn route(
15008 &mut self,
15009
15010 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
15011
15012 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
15013 ) {
15014 ___H::route(&mut self.0, request, responder).await
15015 }
15016
15017 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15018 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15019 }
15020}
15021
15022#[derive(PartialEq, Debug)]
15024pub struct DirEntryRouter;
15025
15026impl ::fidl_next::Discoverable for DirEntryRouter {
15027 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
15028}
15029
15030#[cfg(target_os = "fuchsia")]
15031impl ::fidl_next::HasTransport for DirEntryRouter {
15032 type Transport = ::fidl_next::fuchsia::zx::Channel;
15033}
15034
15035pub mod dir_entry_router {
15036 pub mod prelude {
15037 pub use crate::{
15038 DirEntryRouter, DirEntryRouterClientHandler, DirEntryRouterLocalClientHandler,
15039 DirEntryRouterLocalServerHandler, DirEntryRouterServerHandler, dir_entry_router,
15040 };
15041
15042 pub use crate::natural::DirEntryRouterRouteResponse;
15043
15044 pub use crate::natural::RouteRequest;
15045
15046 pub use crate::natural::RouterError;
15047 }
15048
15049 pub struct Route;
15050
15051 impl ::fidl_next::Method for Route {
15052 const ORDINAL: u64 = 1929392218567642066;
15053 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15054 ::fidl_next::protocol::Flexibility::Flexible;
15055
15056 type Protocol = crate::DirEntryRouter;
15057
15058 type Request = crate::wire::RouteRequest<'static>;
15059 }
15060
15061 impl ::fidl_next::TwoWayMethod for Route {
15062 type Response = ::fidl_next::wire::FlexibleResult<
15063 'static,
15064 crate::wire::DirEntryRouterRouteResponse,
15065 crate::wire::RouterError,
15066 >;
15067 }
15068
15069 impl<___R> ::fidl_next::Respond<___R> for Route {
15070 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
15071
15072 fn respond(response: ___R) -> Self::Output {
15073 ::fidl_next::FlexibleResult::Ok(response)
15074 }
15075 }
15076
15077 impl<___R> ::fidl_next::RespondErr<___R> for Route {
15078 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
15079
15080 fn respond_err(response: ___R) -> Self::Output {
15081 ::fidl_next::FlexibleResult::Err(response)
15082 }
15083 }
15084
15085 mod ___detail {
15086 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirEntryRouter
15087 where
15088 ___T: ::fidl_next::Transport,
15089 {
15090 type Client = DirEntryRouterClient<___T>;
15091 type Server = DirEntryRouterServer<___T>;
15092 }
15093
15094 #[repr(transparent)]
15096 pub struct DirEntryRouterClient<___T: ::fidl_next::Transport> {
15097 #[allow(dead_code)]
15098 client: ::fidl_next::protocol::Client<___T>,
15099 }
15100
15101 impl<___T> DirEntryRouterClient<___T>
15102 where
15103 ___T: ::fidl_next::Transport,
15104 {
15105 pub fn route_with<___R>(
15106 &self,
15107 request: ___R,
15108 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
15109 where
15110 ___R: ::fidl_next::Encode<
15111 crate::wire::RouteRequest<'static>,
15112 <___T as ::fidl_next::Transport>::SendBuffer,
15113 >,
15114 {
15115 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15116 1929392218567642066,
15117 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
15118 request,
15119 ))
15120 }
15121 }
15122
15123 #[repr(transparent)]
15125 pub struct DirEntryRouterServer<___T: ::fidl_next::Transport> {
15126 server: ::fidl_next::protocol::Server<___T>,
15127 }
15128
15129 impl<___T> DirEntryRouterServer<___T> where ___T: ::fidl_next::Transport {}
15130 }
15131}
15132
15133#[diagnostic::on_unimplemented(
15134 note = "If {Self} implements the non-local DirEntryRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15135)]
15136
15137pub trait DirEntryRouterLocalClientHandler<
15141 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15142 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15143>
15144{
15145 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15146 ::core::future::ready(())
15147 }
15148}
15149
15150impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirEntryRouter
15151where
15152 ___H: DirEntryRouterLocalClientHandler<___T>,
15153 ___T: ::fidl_next::Transport,
15154{
15155 async fn on_event(
15156 handler: &mut ___H,
15157 ordinal: u64,
15158 flexibility: ::fidl_next::protocol::Flexibility,
15159 body: ::fidl_next::Body<___T>,
15160 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15161 match ordinal {
15162 ordinal => {
15163 handler.on_unknown_interaction(ordinal).await;
15164 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15165 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15166 } else {
15167 Ok(())
15168 }
15169 }
15170 }
15171 }
15172}
15173
15174#[diagnostic::on_unimplemented(
15175 note = "If {Self} implements the non-local DirEntryRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15176)]
15177
15178pub trait DirEntryRouterLocalServerHandler<
15182 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15183 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15184>
15185{
15186 fn route(
15187 &mut self,
15188
15189 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
15190
15191 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
15192 ) -> impl ::core::future::Future<Output = ()>;
15193
15194 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15195 ::core::future::ready(())
15196 }
15197}
15198
15199impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirEntryRouter
15200where
15201 ___H: DirEntryRouterLocalServerHandler<___T>,
15202 ___T: ::fidl_next::Transport,
15203 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
15204 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15205 Constraint = (),
15206 >,
15207{
15208 async fn on_one_way(
15209 handler: &mut ___H,
15210 ordinal: u64,
15211 flexibility: ::fidl_next::protocol::Flexibility,
15212 body: ::fidl_next::Body<___T>,
15213 ) -> ::core::result::Result<
15214 (),
15215 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15216 > {
15217 match ordinal {
15218 ordinal => {
15219 handler.on_unknown_interaction(ordinal).await;
15220 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15221 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15222 } else {
15223 Ok(())
15224 }
15225 }
15226 }
15227 }
15228
15229 async fn on_two_way(
15230 handler: &mut ___H,
15231 ordinal: u64,
15232 flexibility: ::fidl_next::protocol::Flexibility,
15233 body: ::fidl_next::Body<___T>,
15234 responder: ::fidl_next::protocol::Responder<___T>,
15235 ) -> ::core::result::Result<
15236 (),
15237 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15238 > {
15239 match ordinal {
15240 1929392218567642066 => {
15241 let responder = ::fidl_next::Responder::from_untyped(responder);
15242
15243 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15244 Ok(decoded) => {
15245 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
15246 Ok(())
15247 }
15248 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15249 ordinal: 1929392218567642066,
15250 error,
15251 }),
15252 }
15253 }
15254
15255 ordinal => {
15256 handler.on_unknown_interaction(ordinal).await;
15257 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15258 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15259 } else {
15260 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15261 ordinal,
15262 flexibility,
15263 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15264 )
15265 .expect("encoding a framework error should never fail")
15266 .await?;
15267 Ok(())
15268 }
15269 }
15270 }
15271 }
15272}
15273
15274pub trait DirEntryRouterClientHandler<
15278 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15279 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15280>
15281{
15282 fn on_unknown_interaction(
15283 &mut self,
15284 ordinal: u64,
15285 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15286 ::core::future::ready(())
15287 }
15288}
15289
15290impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirEntryRouter
15291where
15292 ___H: DirEntryRouterClientHandler<___T> + ::core::marker::Send,
15293 ___T: ::fidl_next::Transport,
15294{
15295 async fn on_event(
15296 handler: &mut ___H,
15297 ordinal: u64,
15298 flexibility: ::fidl_next::protocol::Flexibility,
15299 body: ::fidl_next::Body<___T>,
15300 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15301 match ordinal {
15302 ordinal => {
15303 handler.on_unknown_interaction(ordinal).await;
15304 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15305 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15306 } else {
15307 Ok(())
15308 }
15309 }
15310 }
15311 }
15312}
15313
15314pub trait DirEntryRouterServerHandler<
15318 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15319 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15320>
15321{
15322 fn route(
15323 &mut self,
15324
15325 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
15326
15327 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
15328 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15329
15330 fn on_unknown_interaction(
15331 &mut self,
15332 ordinal: u64,
15333 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15334 ::core::future::ready(())
15335 }
15336}
15337
15338impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirEntryRouter
15339where
15340 ___H: DirEntryRouterServerHandler<___T> + ::core::marker::Send,
15341 ___T: ::fidl_next::Transport,
15342 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
15343 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15344 Constraint = (),
15345 >,
15346{
15347 async fn on_one_way(
15348 handler: &mut ___H,
15349 ordinal: u64,
15350 flexibility: ::fidl_next::protocol::Flexibility,
15351 body: ::fidl_next::Body<___T>,
15352 ) -> ::core::result::Result<
15353 (),
15354 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15355 > {
15356 match ordinal {
15357 ordinal => {
15358 handler.on_unknown_interaction(ordinal).await;
15359 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15360 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15361 } else {
15362 Ok(())
15363 }
15364 }
15365 }
15366 }
15367
15368 async fn on_two_way(
15369 handler: &mut ___H,
15370 ordinal: u64,
15371 flexibility: ::fidl_next::protocol::Flexibility,
15372 body: ::fidl_next::Body<___T>,
15373 responder: ::fidl_next::protocol::Responder<___T>,
15374 ) -> ::core::result::Result<
15375 (),
15376 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15377 > {
15378 match ordinal {
15379 1929392218567642066 => {
15380 let responder = ::fidl_next::Responder::from_untyped(responder);
15381
15382 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15383 Ok(decoded) => {
15384 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
15385 Ok(())
15386 }
15387 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15388 ordinal: 1929392218567642066,
15389 error,
15390 }),
15391 }
15392 }
15393
15394 ordinal => {
15395 handler.on_unknown_interaction(ordinal).await;
15396 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15397 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15398 } else {
15399 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15400 ordinal,
15401 flexibility,
15402 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15403 )
15404 .expect("encoding a framework error should never fail")
15405 .await?;
15406 Ok(())
15407 }
15408 }
15409 }
15410 }
15411}
15412
15413impl<___T> DirEntryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
15414where
15415 ___T: ::fidl_next::Transport,
15416{
15417 async fn on_unknown_interaction(&mut self, _: u64) {}
15418}
15419
15420impl<___H, ___T> DirEntryRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
15421where
15422 ___H: DirEntryRouterClientHandler<___T>,
15423 ___T: ::fidl_next::Transport,
15424{
15425 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15426 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15427 }
15428}
15429
15430impl<___H, ___T> DirEntryRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
15431where
15432 ___H: DirEntryRouterServerHandler<___T>,
15433 ___T: ::fidl_next::Transport,
15434{
15435 async fn route(
15436 &mut self,
15437
15438 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
15439
15440 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
15441 ) {
15442 ___H::route(&mut self.0, request, responder).await
15443 }
15444
15445 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15446 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15447 }
15448}
15449
15450#[doc = " A receiver is served by components and allows them to receive directory channels\n framework.\n"]
15452#[derive(PartialEq, Debug)]
15453pub struct DirReceiver;
15454
15455impl ::fidl_next::Discoverable for DirReceiver {
15456 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
15457}
15458
15459#[cfg(target_os = "fuchsia")]
15460impl ::fidl_next::HasTransport for DirReceiver {
15461 type Transport = ::fidl_next::fuchsia::zx::Channel;
15462}
15463
15464pub mod dir_receiver {
15465 pub mod prelude {
15466 pub use crate::{
15467 DirReceiver, DirReceiverClientHandler, DirReceiverLocalClientHandler,
15468 DirReceiverLocalServerHandler, DirReceiverServerHandler, dir_receiver,
15469 };
15470
15471 pub use crate::natural::DirReceiverReceiveRequest;
15472 }
15473
15474 pub struct Receive;
15475
15476 impl ::fidl_next::Method for Receive {
15477 const ORDINAL: u64 = 926684461087488948;
15478 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15479 ::fidl_next::protocol::Flexibility::Flexible;
15480
15481 type Protocol = crate::DirReceiver;
15482
15483 type Request = crate::wire::DirReceiverReceiveRequest<'static>;
15484 }
15485
15486 mod ___detail {
15487 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirReceiver
15488 where
15489 ___T: ::fidl_next::Transport,
15490 {
15491 type Client = DirReceiverClient<___T>;
15492 type Server = DirReceiverServer<___T>;
15493 }
15494
15495 #[repr(transparent)]
15497 pub struct DirReceiverClient<___T: ::fidl_next::Transport> {
15498 #[allow(dead_code)]
15499 client: ::fidl_next::protocol::Client<___T>,
15500 }
15501
15502 impl<___T> DirReceiverClient<___T>
15503 where
15504 ___T: ::fidl_next::Transport,
15505 {
15506 #[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"]
15507 pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
15508 where
15509 ___R: ::fidl_next::Encode<
15510 crate::wire::DirReceiverReceiveRequest<'static>,
15511 <___T as ::fidl_next::Transport>::SendBuffer,
15512 >,
15513 {
15514 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
15515 926684461087488948,
15516 <super::Receive as ::fidl_next::Method>::FLEXIBILITY,
15517 request,
15518 ))
15519 }
15520 }
15521
15522 #[repr(transparent)]
15524 pub struct DirReceiverServer<___T: ::fidl_next::Transport> {
15525 server: ::fidl_next::protocol::Server<___T>,
15526 }
15527
15528 impl<___T> DirReceiverServer<___T> where ___T: ::fidl_next::Transport {}
15529 }
15530}
15531
15532#[diagnostic::on_unimplemented(
15533 note = "If {Self} implements the non-local DirReceiverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15534)]
15535
15536pub trait DirReceiverLocalClientHandler<
15540 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15541 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15542>
15543{
15544 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15545 ::core::future::ready(())
15546 }
15547}
15548
15549impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirReceiver
15550where
15551 ___H: DirReceiverLocalClientHandler<___T>,
15552 ___T: ::fidl_next::Transport,
15553{
15554 async fn on_event(
15555 handler: &mut ___H,
15556 ordinal: u64,
15557 flexibility: ::fidl_next::protocol::Flexibility,
15558 body: ::fidl_next::Body<___T>,
15559 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15560 match ordinal {
15561 ordinal => {
15562 handler.on_unknown_interaction(ordinal).await;
15563 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15564 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15565 } else {
15566 Ok(())
15567 }
15568 }
15569 }
15570 }
15571}
15572
15573#[diagnostic::on_unimplemented(
15574 note = "If {Self} implements the non-local DirReceiverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15575)]
15576
15577pub trait DirReceiverLocalServerHandler<
15581 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15582 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15583>
15584{
15585 #[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"]
15586 fn receive(
15587 &mut self,
15588
15589 request: ::fidl_next::Request<dir_receiver::Receive, ___T>,
15590 ) -> impl ::core::future::Future<Output = ()>;
15591
15592 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15593 ::core::future::ready(())
15594 }
15595}
15596
15597impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirReceiver
15598where
15599 ___H: DirReceiverLocalServerHandler<___T>,
15600 ___T: ::fidl_next::Transport,
15601 for<'de> crate::wire::DirReceiverReceiveRequest<'de>: ::fidl_next::Decode<
15602 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15603 Constraint = (),
15604 >,
15605{
15606 async fn on_one_way(
15607 handler: &mut ___H,
15608 ordinal: u64,
15609 flexibility: ::fidl_next::protocol::Flexibility,
15610 body: ::fidl_next::Body<___T>,
15611 ) -> ::core::result::Result<
15612 (),
15613 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15614 > {
15615 match ordinal {
15616 926684461087488948 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15617 Ok(decoded) => {
15618 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
15619 Ok(())
15620 }
15621 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15622 ordinal: 926684461087488948,
15623 error,
15624 }),
15625 },
15626
15627 ordinal => {
15628 handler.on_unknown_interaction(ordinal).await;
15629 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15630 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15631 } else {
15632 Ok(())
15633 }
15634 }
15635 }
15636 }
15637
15638 async fn on_two_way(
15639 handler: &mut ___H,
15640 ordinal: u64,
15641 flexibility: ::fidl_next::protocol::Flexibility,
15642 body: ::fidl_next::Body<___T>,
15643 responder: ::fidl_next::protocol::Responder<___T>,
15644 ) -> ::core::result::Result<
15645 (),
15646 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15647 > {
15648 match ordinal {
15649 ordinal => {
15650 handler.on_unknown_interaction(ordinal).await;
15651 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15652 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15653 } else {
15654 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15655 ordinal,
15656 flexibility,
15657 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15658 )
15659 .expect("encoding a framework error should never fail")
15660 .await?;
15661 Ok(())
15662 }
15663 }
15664 }
15665 }
15666}
15667
15668pub trait DirReceiverClientHandler<
15672 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15673 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15674>
15675{
15676 fn on_unknown_interaction(
15677 &mut self,
15678 ordinal: u64,
15679 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15680 ::core::future::ready(())
15681 }
15682}
15683
15684impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirReceiver
15685where
15686 ___H: DirReceiverClientHandler<___T> + ::core::marker::Send,
15687 ___T: ::fidl_next::Transport,
15688{
15689 async fn on_event(
15690 handler: &mut ___H,
15691 ordinal: u64,
15692 flexibility: ::fidl_next::protocol::Flexibility,
15693 body: ::fidl_next::Body<___T>,
15694 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15695 match ordinal {
15696 ordinal => {
15697 handler.on_unknown_interaction(ordinal).await;
15698 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15699 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15700 } else {
15701 Ok(())
15702 }
15703 }
15704 }
15705 }
15706}
15707
15708pub trait DirReceiverServerHandler<
15712 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15713 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15714>
15715{
15716 #[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"]
15717 fn receive(
15718 &mut self,
15719
15720 request: ::fidl_next::Request<dir_receiver::Receive, ___T>,
15721 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15722
15723 fn on_unknown_interaction(
15724 &mut self,
15725 ordinal: u64,
15726 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15727 ::core::future::ready(())
15728 }
15729}
15730
15731impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirReceiver
15732where
15733 ___H: DirReceiverServerHandler<___T> + ::core::marker::Send,
15734 ___T: ::fidl_next::Transport,
15735 for<'de> crate::wire::DirReceiverReceiveRequest<'de>: ::fidl_next::Decode<
15736 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15737 Constraint = (),
15738 >,
15739{
15740 async fn on_one_way(
15741 handler: &mut ___H,
15742 ordinal: u64,
15743 flexibility: ::fidl_next::protocol::Flexibility,
15744 body: ::fidl_next::Body<___T>,
15745 ) -> ::core::result::Result<
15746 (),
15747 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15748 > {
15749 match ordinal {
15750 926684461087488948 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15751 Ok(decoded) => {
15752 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
15753 Ok(())
15754 }
15755 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15756 ordinal: 926684461087488948,
15757 error,
15758 }),
15759 },
15760
15761 ordinal => {
15762 handler.on_unknown_interaction(ordinal).await;
15763 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15764 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15765 } else {
15766 Ok(())
15767 }
15768 }
15769 }
15770 }
15771
15772 async fn on_two_way(
15773 handler: &mut ___H,
15774 ordinal: u64,
15775 flexibility: ::fidl_next::protocol::Flexibility,
15776 body: ::fidl_next::Body<___T>,
15777 responder: ::fidl_next::protocol::Responder<___T>,
15778 ) -> ::core::result::Result<
15779 (),
15780 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15781 > {
15782 match ordinal {
15783 ordinal => {
15784 handler.on_unknown_interaction(ordinal).await;
15785 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15786 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15787 } else {
15788 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15789 ordinal,
15790 flexibility,
15791 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15792 )
15793 .expect("encoding a framework error should never fail")
15794 .await?;
15795 Ok(())
15796 }
15797 }
15798 }
15799 }
15800}
15801
15802impl<___T> DirReceiverClientHandler<___T> for ::fidl_next::IgnoreEvents
15803where
15804 ___T: ::fidl_next::Transport,
15805{
15806 async fn on_unknown_interaction(&mut self, _: u64) {}
15807}
15808
15809impl<___H, ___T> DirReceiverLocalClientHandler<___T> for ::fidl_next::Local<___H>
15810where
15811 ___H: DirReceiverClientHandler<___T>,
15812 ___T: ::fidl_next::Transport,
15813{
15814 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15815 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15816 }
15817}
15818
15819impl<___H, ___T> DirReceiverLocalServerHandler<___T> for ::fidl_next::Local<___H>
15820where
15821 ___H: DirReceiverServerHandler<___T>,
15822 ___T: ::fidl_next::Transport,
15823{
15824 async fn receive(&mut self, request: ::fidl_next::Request<dir_receiver::Receive, ___T>) {
15825 ___H::receive(&mut self.0, request).await
15826 }
15827
15828 async fn on_unknown_interaction(&mut self, ordinal: u64) {
15829 ___H::on_unknown_interaction(&mut self.0, ordinal).await
15830 }
15831}
15832
15833#[derive(PartialEq, Debug)]
15835pub struct DirectoryRouter;
15836
15837impl ::fidl_next::Discoverable for DirectoryRouter {
15838 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
15839}
15840
15841#[cfg(target_os = "fuchsia")]
15842impl ::fidl_next::HasTransport for DirectoryRouter {
15843 type Transport = ::fidl_next::fuchsia::zx::Channel;
15844}
15845
15846pub mod directory_router {
15847 pub mod prelude {
15848 pub use crate::{
15849 DirectoryRouter, DirectoryRouterClientHandler, DirectoryRouterLocalClientHandler,
15850 DirectoryRouterLocalServerHandler, DirectoryRouterServerHandler, directory_router,
15851 };
15852
15853 pub use crate::natural::DirectoryRouterRouteResponse;
15854
15855 pub use crate::natural::RouteRequest;
15856
15857 pub use crate::natural::RouterError;
15858 }
15859
15860 pub struct Route;
15861
15862 impl ::fidl_next::Method for Route {
15863 const ORDINAL: u64 = 7510716014181158689;
15864 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15865 ::fidl_next::protocol::Flexibility::Flexible;
15866
15867 type Protocol = crate::DirectoryRouter;
15868
15869 type Request = crate::wire::RouteRequest<'static>;
15870 }
15871
15872 impl ::fidl_next::TwoWayMethod for Route {
15873 type Response = ::fidl_next::wire::FlexibleResult<
15874 'static,
15875 crate::wire::DirectoryRouterRouteResponse,
15876 crate::wire::RouterError,
15877 >;
15878 }
15879
15880 impl<___R> ::fidl_next::Respond<___R> for Route {
15881 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
15882
15883 fn respond(response: ___R) -> Self::Output {
15884 ::fidl_next::FlexibleResult::Ok(response)
15885 }
15886 }
15887
15888 impl<___R> ::fidl_next::RespondErr<___R> for Route {
15889 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
15890
15891 fn respond_err(response: ___R) -> Self::Output {
15892 ::fidl_next::FlexibleResult::Err(response)
15893 }
15894 }
15895
15896 mod ___detail {
15897 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryRouter
15898 where
15899 ___T: ::fidl_next::Transport,
15900 {
15901 type Client = DirectoryRouterClient<___T>;
15902 type Server = DirectoryRouterServer<___T>;
15903 }
15904
15905 #[repr(transparent)]
15907 pub struct DirectoryRouterClient<___T: ::fidl_next::Transport> {
15908 #[allow(dead_code)]
15909 client: ::fidl_next::protocol::Client<___T>,
15910 }
15911
15912 impl<___T> DirectoryRouterClient<___T>
15913 where
15914 ___T: ::fidl_next::Transport,
15915 {
15916 pub fn route_with<___R>(
15917 &self,
15918 request: ___R,
15919 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
15920 where
15921 ___R: ::fidl_next::Encode<
15922 crate::wire::RouteRequest<'static>,
15923 <___T as ::fidl_next::Transport>::SendBuffer,
15924 >,
15925 {
15926 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15927 7510716014181158689,
15928 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
15929 request,
15930 ))
15931 }
15932 }
15933
15934 #[repr(transparent)]
15936 pub struct DirectoryRouterServer<___T: ::fidl_next::Transport> {
15937 server: ::fidl_next::protocol::Server<___T>,
15938 }
15939
15940 impl<___T> DirectoryRouterServer<___T> where ___T: ::fidl_next::Transport {}
15941 }
15942}
15943
15944#[diagnostic::on_unimplemented(
15945 note = "If {Self} implements the non-local DirectoryRouterClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15946)]
15947
15948pub trait DirectoryRouterLocalClientHandler<
15952 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15953 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15954>
15955{
15956 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15957 ::core::future::ready(())
15958 }
15959}
15960
15961impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirectoryRouter
15962where
15963 ___H: DirectoryRouterLocalClientHandler<___T>,
15964 ___T: ::fidl_next::Transport,
15965{
15966 async fn on_event(
15967 handler: &mut ___H,
15968 ordinal: u64,
15969 flexibility: ::fidl_next::protocol::Flexibility,
15970 body: ::fidl_next::Body<___T>,
15971 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15972 match ordinal {
15973 ordinal => {
15974 handler.on_unknown_interaction(ordinal).await;
15975 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15976 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15977 } else {
15978 Ok(())
15979 }
15980 }
15981 }
15982 }
15983}
15984
15985#[diagnostic::on_unimplemented(
15986 note = "If {Self} implements the non-local DirectoryRouterServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15987)]
15988
15989pub trait DirectoryRouterLocalServerHandler<
15993 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15994 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15995>
15996{
15997 fn route(
15998 &mut self,
15999
16000 request: ::fidl_next::Request<directory_router::Route, ___T>,
16001
16002 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
16003 ) -> impl ::core::future::Future<Output = ()>;
16004
16005 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16006 ::core::future::ready(())
16007 }
16008}
16009
16010impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirectoryRouter
16011where
16012 ___H: DirectoryRouterLocalServerHandler<___T>,
16013 ___T: ::fidl_next::Transport,
16014 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
16015 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16016 Constraint = (),
16017 >,
16018{
16019 async fn on_one_way(
16020 handler: &mut ___H,
16021 ordinal: u64,
16022 flexibility: ::fidl_next::protocol::Flexibility,
16023 body: ::fidl_next::Body<___T>,
16024 ) -> ::core::result::Result<
16025 (),
16026 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16027 > {
16028 match ordinal {
16029 ordinal => {
16030 handler.on_unknown_interaction(ordinal).await;
16031 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16032 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16033 } else {
16034 Ok(())
16035 }
16036 }
16037 }
16038 }
16039
16040 async fn on_two_way(
16041 handler: &mut ___H,
16042 ordinal: u64,
16043 flexibility: ::fidl_next::protocol::Flexibility,
16044 body: ::fidl_next::Body<___T>,
16045 responder: ::fidl_next::protocol::Responder<___T>,
16046 ) -> ::core::result::Result<
16047 (),
16048 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16049 > {
16050 match ordinal {
16051 7510716014181158689 => {
16052 let responder = ::fidl_next::Responder::from_untyped(responder);
16053
16054 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16055 Ok(decoded) => {
16056 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
16057 Ok(())
16058 }
16059 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16060 ordinal: 7510716014181158689,
16061 error,
16062 }),
16063 }
16064 }
16065
16066 ordinal => {
16067 handler.on_unknown_interaction(ordinal).await;
16068 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16069 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16070 } else {
16071 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16072 ordinal,
16073 flexibility,
16074 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16075 )
16076 .expect("encoding a framework error should never fail")
16077 .await?;
16078 Ok(())
16079 }
16080 }
16081 }
16082 }
16083}
16084
16085pub trait DirectoryRouterClientHandler<
16089 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16090 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16091>
16092{
16093 fn on_unknown_interaction(
16094 &mut self,
16095 ordinal: u64,
16096 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16097 ::core::future::ready(())
16098 }
16099}
16100
16101impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryRouter
16102where
16103 ___H: DirectoryRouterClientHandler<___T> + ::core::marker::Send,
16104 ___T: ::fidl_next::Transport,
16105{
16106 async fn on_event(
16107 handler: &mut ___H,
16108 ordinal: u64,
16109 flexibility: ::fidl_next::protocol::Flexibility,
16110 body: ::fidl_next::Body<___T>,
16111 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16112 match ordinal {
16113 ordinal => {
16114 handler.on_unknown_interaction(ordinal).await;
16115 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16116 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16117 } else {
16118 Ok(())
16119 }
16120 }
16121 }
16122 }
16123}
16124
16125pub trait DirectoryRouterServerHandler<
16129 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16130 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16131>
16132{
16133 fn route(
16134 &mut self,
16135
16136 request: ::fidl_next::Request<directory_router::Route, ___T>,
16137
16138 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
16139 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16140
16141 fn on_unknown_interaction(
16142 &mut self,
16143 ordinal: u64,
16144 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16145 ::core::future::ready(())
16146 }
16147}
16148
16149impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryRouter
16150where
16151 ___H: DirectoryRouterServerHandler<___T> + ::core::marker::Send,
16152 ___T: ::fidl_next::Transport,
16153 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
16154 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16155 Constraint = (),
16156 >,
16157{
16158 async fn on_one_way(
16159 handler: &mut ___H,
16160 ordinal: u64,
16161 flexibility: ::fidl_next::protocol::Flexibility,
16162 body: ::fidl_next::Body<___T>,
16163 ) -> ::core::result::Result<
16164 (),
16165 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16166 > {
16167 match ordinal {
16168 ordinal => {
16169 handler.on_unknown_interaction(ordinal).await;
16170 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16171 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16172 } else {
16173 Ok(())
16174 }
16175 }
16176 }
16177 }
16178
16179 async fn on_two_way(
16180 handler: &mut ___H,
16181 ordinal: u64,
16182 flexibility: ::fidl_next::protocol::Flexibility,
16183 body: ::fidl_next::Body<___T>,
16184 responder: ::fidl_next::protocol::Responder<___T>,
16185 ) -> ::core::result::Result<
16186 (),
16187 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16188 > {
16189 match ordinal {
16190 7510716014181158689 => {
16191 let responder = ::fidl_next::Responder::from_untyped(responder);
16192
16193 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16194 Ok(decoded) => {
16195 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
16196 Ok(())
16197 }
16198 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16199 ordinal: 7510716014181158689,
16200 error,
16201 }),
16202 }
16203 }
16204
16205 ordinal => {
16206 handler.on_unknown_interaction(ordinal).await;
16207 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16208 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16209 } else {
16210 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16211 ordinal,
16212 flexibility,
16213 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16214 )
16215 .expect("encoding a framework error should never fail")
16216 .await?;
16217 Ok(())
16218 }
16219 }
16220 }
16221 }
16222}
16223
16224impl<___T> DirectoryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
16225where
16226 ___T: ::fidl_next::Transport,
16227{
16228 async fn on_unknown_interaction(&mut self, _: u64) {}
16229}
16230
16231impl<___H, ___T> DirectoryRouterLocalClientHandler<___T> for ::fidl_next::Local<___H>
16232where
16233 ___H: DirectoryRouterClientHandler<___T>,
16234 ___T: ::fidl_next::Transport,
16235{
16236 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16237 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16238 }
16239}
16240
16241impl<___H, ___T> DirectoryRouterLocalServerHandler<___T> for ::fidl_next::Local<___H>
16242where
16243 ___H: DirectoryRouterServerHandler<___T>,
16244 ___T: ::fidl_next::Transport,
16245{
16246 async fn route(
16247 &mut self,
16248
16249 request: ::fidl_next::Request<directory_router::Route, ___T>,
16250
16251 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
16252 ) {
16253 ___H::route(&mut self.0, request, responder).await
16254 }
16255
16256 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16257 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16258 }
16259}
16260
16261#[doc = " A receiver is served by components and allows them to receive channels\n from the framework.\n"]
16263#[derive(PartialEq, Debug)]
16264pub struct Receiver;
16265
16266impl ::fidl_next::Discoverable for Receiver {
16267 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
16268}
16269
16270#[cfg(target_os = "fuchsia")]
16271impl ::fidl_next::HasTransport for Receiver {
16272 type Transport = ::fidl_next::fuchsia::zx::Channel;
16273}
16274
16275pub mod receiver {
16276 pub mod prelude {
16277 pub use crate::{
16278 Receiver, ReceiverClientHandler, ReceiverLocalClientHandler,
16279 ReceiverLocalServerHandler, ReceiverServerHandler, receiver,
16280 };
16281
16282 pub use crate::natural::ProtocolPayload;
16283 }
16284
16285 pub struct Receive;
16286
16287 impl ::fidl_next::Method for Receive {
16288 const ORDINAL: u64 = 340832707723008660;
16289 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16290 ::fidl_next::protocol::Flexibility::Flexible;
16291
16292 type Protocol = crate::Receiver;
16293
16294 type Request = crate::wire::ProtocolPayload;
16295 }
16296
16297 mod ___detail {
16298 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Receiver
16299 where
16300 ___T: ::fidl_next::Transport,
16301 {
16302 type Client = ReceiverClient<___T>;
16303 type Server = ReceiverServer<___T>;
16304 }
16305
16306 #[repr(transparent)]
16308 pub struct ReceiverClient<___T: ::fidl_next::Transport> {
16309 #[allow(dead_code)]
16310 client: ::fidl_next::protocol::Client<___T>,
16311 }
16312
16313 impl<___T> ReceiverClient<___T>
16314 where
16315 ___T: ::fidl_next::Transport,
16316 {
16317 #[doc = " Sends a channel to this receiver.\n"]
16318 pub fn receive(
16319 &self,
16320
16321 channel: impl ::fidl_next::Encode<
16322 ::fidl_next::wire::fuchsia::Channel,
16323 <___T as ::fidl_next::Transport>::SendBuffer,
16324 >,
16325 ) -> ::fidl_next::SendFuture<'_, ___T>
16326 where
16327 <___T as ::fidl_next::Transport>::SendBuffer:
16328 ::fidl_next::encoder::InternalHandleEncoder,
16329 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
16330 {
16331 self.receive_with(crate::generic::ProtocolPayload { channel })
16332 }
16333
16334 #[doc = " Sends a channel to this receiver.\n"]
16335 pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
16336 where
16337 ___R: ::fidl_next::Encode<
16338 crate::wire::ProtocolPayload,
16339 <___T as ::fidl_next::Transport>::SendBuffer,
16340 >,
16341 {
16342 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
16343 340832707723008660,
16344 <super::Receive as ::fidl_next::Method>::FLEXIBILITY,
16345 request,
16346 ))
16347 }
16348 }
16349
16350 #[repr(transparent)]
16352 pub struct ReceiverServer<___T: ::fidl_next::Transport> {
16353 server: ::fidl_next::protocol::Server<___T>,
16354 }
16355
16356 impl<___T> ReceiverServer<___T> where ___T: ::fidl_next::Transport {}
16357 }
16358}
16359
16360#[diagnostic::on_unimplemented(
16361 note = "If {Self} implements the non-local ReceiverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
16362)]
16363
16364pub trait ReceiverLocalClientHandler<
16368 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16369 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16370>
16371{
16372 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16373 ::core::future::ready(())
16374 }
16375}
16376
16377impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Receiver
16378where
16379 ___H: ReceiverLocalClientHandler<___T>,
16380 ___T: ::fidl_next::Transport,
16381{
16382 async fn on_event(
16383 handler: &mut ___H,
16384 ordinal: u64,
16385 flexibility: ::fidl_next::protocol::Flexibility,
16386 body: ::fidl_next::Body<___T>,
16387 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16388 match ordinal {
16389 ordinal => {
16390 handler.on_unknown_interaction(ordinal).await;
16391 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16392 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16393 } else {
16394 Ok(())
16395 }
16396 }
16397 }
16398 }
16399}
16400
16401#[diagnostic::on_unimplemented(
16402 note = "If {Self} implements the non-local ReceiverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
16403)]
16404
16405pub trait ReceiverLocalServerHandler<
16409 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16410 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16411>
16412{
16413 #[doc = " Sends a channel to this receiver.\n"]
16414 fn receive(
16415 &mut self,
16416
16417 request: ::fidl_next::Request<receiver::Receive, ___T>,
16418 ) -> impl ::core::future::Future<Output = ()>;
16419
16420 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16421 ::core::future::ready(())
16422 }
16423}
16424
16425impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Receiver
16426where
16427 ___H: ReceiverLocalServerHandler<___T>,
16428 ___T: ::fidl_next::Transport,
16429 for<'de> crate::wire::ProtocolPayload: ::fidl_next::Decode<
16430 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16431 Constraint = (),
16432 >,
16433{
16434 async fn on_one_way(
16435 handler: &mut ___H,
16436 ordinal: u64,
16437 flexibility: ::fidl_next::protocol::Flexibility,
16438 body: ::fidl_next::Body<___T>,
16439 ) -> ::core::result::Result<
16440 (),
16441 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16442 > {
16443 match ordinal {
16444 340832707723008660 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16445 Ok(decoded) => {
16446 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
16447 Ok(())
16448 }
16449 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16450 ordinal: 340832707723008660,
16451 error,
16452 }),
16453 },
16454
16455 ordinal => {
16456 handler.on_unknown_interaction(ordinal).await;
16457 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16458 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16459 } else {
16460 Ok(())
16461 }
16462 }
16463 }
16464 }
16465
16466 async fn on_two_way(
16467 handler: &mut ___H,
16468 ordinal: u64,
16469 flexibility: ::fidl_next::protocol::Flexibility,
16470 body: ::fidl_next::Body<___T>,
16471 responder: ::fidl_next::protocol::Responder<___T>,
16472 ) -> ::core::result::Result<
16473 (),
16474 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16475 > {
16476 match ordinal {
16477 ordinal => {
16478 handler.on_unknown_interaction(ordinal).await;
16479 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16480 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16481 } else {
16482 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16483 ordinal,
16484 flexibility,
16485 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16486 )
16487 .expect("encoding a framework error should never fail")
16488 .await?;
16489 Ok(())
16490 }
16491 }
16492 }
16493 }
16494}
16495
16496pub trait ReceiverClientHandler<
16500 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16501 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16502>
16503{
16504 fn on_unknown_interaction(
16505 &mut self,
16506 ordinal: u64,
16507 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16508 ::core::future::ready(())
16509 }
16510}
16511
16512impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Receiver
16513where
16514 ___H: ReceiverClientHandler<___T> + ::core::marker::Send,
16515 ___T: ::fidl_next::Transport,
16516{
16517 async fn on_event(
16518 handler: &mut ___H,
16519 ordinal: u64,
16520 flexibility: ::fidl_next::protocol::Flexibility,
16521 body: ::fidl_next::Body<___T>,
16522 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16523 match ordinal {
16524 ordinal => {
16525 handler.on_unknown_interaction(ordinal).await;
16526 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16527 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16528 } else {
16529 Ok(())
16530 }
16531 }
16532 }
16533 }
16534}
16535
16536pub trait ReceiverServerHandler<
16540 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16541 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16542>
16543{
16544 #[doc = " Sends a channel to this receiver.\n"]
16545 fn receive(
16546 &mut self,
16547
16548 request: ::fidl_next::Request<receiver::Receive, ___T>,
16549 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16550
16551 fn on_unknown_interaction(
16552 &mut self,
16553 ordinal: u64,
16554 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16555 ::core::future::ready(())
16556 }
16557}
16558
16559impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Receiver
16560where
16561 ___H: ReceiverServerHandler<___T> + ::core::marker::Send,
16562 ___T: ::fidl_next::Transport,
16563 for<'de> crate::wire::ProtocolPayload: ::fidl_next::Decode<
16564 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16565 Constraint = (),
16566 >,
16567{
16568 async fn on_one_way(
16569 handler: &mut ___H,
16570 ordinal: u64,
16571 flexibility: ::fidl_next::protocol::Flexibility,
16572 body: ::fidl_next::Body<___T>,
16573 ) -> ::core::result::Result<
16574 (),
16575 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16576 > {
16577 match ordinal {
16578 340832707723008660 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16579 Ok(decoded) => {
16580 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
16581 Ok(())
16582 }
16583 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16584 ordinal: 340832707723008660,
16585 error,
16586 }),
16587 },
16588
16589 ordinal => {
16590 handler.on_unknown_interaction(ordinal).await;
16591 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16592 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16593 } else {
16594 Ok(())
16595 }
16596 }
16597 }
16598 }
16599
16600 async fn on_two_way(
16601 handler: &mut ___H,
16602 ordinal: u64,
16603 flexibility: ::fidl_next::protocol::Flexibility,
16604 body: ::fidl_next::Body<___T>,
16605 responder: ::fidl_next::protocol::Responder<___T>,
16606 ) -> ::core::result::Result<
16607 (),
16608 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16609 > {
16610 match ordinal {
16611 ordinal => {
16612 handler.on_unknown_interaction(ordinal).await;
16613 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16614 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16615 } else {
16616 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16617 ordinal,
16618 flexibility,
16619 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16620 )
16621 .expect("encoding a framework error should never fail")
16622 .await?;
16623 Ok(())
16624 }
16625 }
16626 }
16627 }
16628}
16629
16630impl<___T> ReceiverClientHandler<___T> for ::fidl_next::IgnoreEvents
16631where
16632 ___T: ::fidl_next::Transport,
16633{
16634 async fn on_unknown_interaction(&mut self, _: u64) {}
16635}
16636
16637impl<___H, ___T> ReceiverLocalClientHandler<___T> for ::fidl_next::Local<___H>
16638where
16639 ___H: ReceiverClientHandler<___T>,
16640 ___T: ::fidl_next::Transport,
16641{
16642 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16643 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16644 }
16645}
16646
16647impl<___H, ___T> ReceiverLocalServerHandler<___T> for ::fidl_next::Local<___H>
16648where
16649 ___H: ReceiverServerHandler<___T>,
16650 ___T: ::fidl_next::Transport,
16651{
16652 async fn receive(&mut self, request: ::fidl_next::Request<receiver::Receive, ___T>) {
16653 ___H::receive(&mut self.0, request).await
16654 }
16655
16656 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16657 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16658 }
16659}
16660
16661pub use fidl_next_common_fuchsia_component_sandbox::*;