1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub type AnnotationKeys = Vec<AnnotationKey>;
13
14pub const ANNOTATION_KEY_NAME: &str = "name";
17
18pub const ANNOTATION_KEY_PERSIST_ELEMENT: &str = "persist_element";
20
21pub const ANNOTATION_KEY_URL: &str = "url";
23
24pub const MANAGER_NAMESPACE: &str = "element_manager";
25
26pub const MAX_ANNOTATIONS_PER_ELEMENT: u32 = 1024;
28
29pub const MAX_ANNOTATION_KEY_NAMESPACE_SIZE: u32 = 128;
31
32pub const MAX_ANNOTATION_KEY_VALUE_SIZE: u32 = 128;
34
35#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
37#[repr(u32)]
38pub enum GetAnnotationsError {
39 BufferReadFailed = 1,
41}
42
43impl GetAnnotationsError {
44 #[inline]
45 pub fn from_primitive(prim: u32) -> Option<Self> {
46 match prim {
47 1 => Some(Self::BufferReadFailed),
48 _ => None,
49 }
50 }
51
52 #[inline]
53 pub const fn into_primitive(self) -> u32 {
54 self as u32
55 }
56}
57
58#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
59#[repr(u32)]
60pub enum ManagerError {
61 InvalidArgs = 1,
63 NotFound = 2,
65 UnableToPersist = 3,
68}
69
70impl ManagerError {
71 #[inline]
72 pub fn from_primitive(prim: u32) -> Option<Self> {
73 match prim {
74 1 => Some(Self::InvalidArgs),
75 2 => Some(Self::NotFound),
76 3 => Some(Self::UnableToPersist),
77 _ => None,
78 }
79 }
80
81 #[inline]
82 pub const fn into_primitive(self) -> u32 {
83 self as u32
84 }
85}
86
87#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
89#[repr(u32)]
90pub enum PresentViewError {
91 InvalidArgs = 1,
93}
94
95impl PresentViewError {
96 #[inline]
97 pub fn from_primitive(prim: u32) -> Option<Self> {
98 match prim {
99 1 => Some(Self::InvalidArgs),
100 _ => None,
101 }
102 }
103
104 #[inline]
105 pub const fn into_primitive(self) -> u32 {
106 self as u32
107 }
108}
109
110#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
112#[repr(u32)]
113pub enum ProposeElementError {
114 InvalidArgs = 1,
116 NotFound = 2,
118}
119
120impl ProposeElementError {
121 #[inline]
122 pub fn from_primitive(prim: u32) -> Option<Self> {
123 match prim {
124 1 => Some(Self::InvalidArgs),
125 2 => Some(Self::NotFound),
126 _ => None,
127 }
128 }
129
130 #[inline]
131 pub const fn into_primitive(self) -> u32 {
132 self as u32
133 }
134}
135
136#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
138#[repr(u32)]
139pub enum UpdateAnnotationsError {
140 InvalidArgs = 1,
142 TooManyAnnotations = 2,
145}
146
147impl UpdateAnnotationsError {
148 #[inline]
149 pub fn from_primitive(prim: u32) -> Option<Self> {
150 match prim {
151 1 => Some(Self::InvalidArgs),
152 2 => Some(Self::TooManyAnnotations),
153 _ => None,
154 }
155 }
156
157 #[inline]
158 pub const fn into_primitive(self) -> u32 {
159 self as u32
160 }
161}
162
163#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
166pub enum WatchAnnotationsError {
167 BufferReadFailed,
169 #[doc(hidden)]
170 __SourceBreaking { unknown_ordinal: u32 },
171}
172
173#[macro_export]
175macro_rules! WatchAnnotationsErrorUnknown {
176 () => {
177 _
178 };
179}
180
181impl WatchAnnotationsError {
182 #[inline]
183 pub fn from_primitive(prim: u32) -> Option<Self> {
184 match prim {
185 1 => Some(Self::BufferReadFailed),
186 _ => None,
187 }
188 }
189
190 #[inline]
191 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
192 match prim {
193 1 => Self::BufferReadFailed,
194 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
195 }
196 }
197
198 #[inline]
199 pub fn unknown() -> Self {
200 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
201 }
202
203 #[inline]
204 pub const fn into_primitive(self) -> u32 {
205 match self {
206 Self::BufferReadFailed => 1,
207 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
208 }
209 }
210
211 #[inline]
212 pub fn is_unknown(&self) -> bool {
213 match self {
214 Self::__SourceBreaking { unknown_ordinal: _ } => true,
215 _ => false,
216 }
217 }
218}
219
220#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
222pub struct AnnotationKey {
223 pub namespace: String,
238 pub value: String,
241}
242
243impl fidl::Persistable for AnnotationKey {}
244
245#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
246pub struct ManagerRemoveElementRequest {
247 pub name: String,
248}
249
250impl fidl::Persistable for ManagerRemoveElementRequest {}
251
252pub mod annotation_controller_ordinals {
253 pub const UPDATE_ANNOTATIONS: u64 = 0x5718e51a2774c686;
254 pub const GET_ANNOTATIONS: u64 = 0xae78b17381824fa;
255 pub const WATCH_ANNOTATIONS: u64 = 0x253b196cae31356f;
256}
257
258pub mod controller_ordinals {
259 pub const UPDATE_ANNOTATIONS: u64 = 0x5718e51a2774c686;
260 pub const GET_ANNOTATIONS: u64 = 0xae78b17381824fa;
261 pub const WATCH_ANNOTATIONS: u64 = 0x253b196cae31356f;
262}
263
264pub mod graphical_presenter_ordinals {
265 pub const PRESENT_VIEW: u64 = 0x396042dd1422ac7a;
266}
267
268pub mod manager_ordinals {
269 pub const PROPOSE_ELEMENT: u64 = 0x2af76679cd73b902;
270 pub const REMOVE_ELEMENT: u64 = 0x1e65d66515e64b52;
271}
272
273pub mod view_controller_ordinals {
274 pub const DISMISS: u64 = 0x794061fcab05a3dc;
275 pub const ON_PRESENTED: u64 = 0x26977e68369330b5;
276}
277
278mod internal {
279 use super::*;
280 unsafe impl fidl::encoding::TypeMarker for GetAnnotationsError {
281 type Owned = Self;
282
283 #[inline(always)]
284 fn inline_align(_context: fidl::encoding::Context) -> usize {
285 std::mem::align_of::<u32>()
286 }
287
288 #[inline(always)]
289 fn inline_size(_context: fidl::encoding::Context) -> usize {
290 std::mem::size_of::<u32>()
291 }
292
293 #[inline(always)]
294 fn encode_is_copy() -> bool {
295 true
296 }
297
298 #[inline(always)]
299 fn decode_is_copy() -> bool {
300 false
301 }
302 }
303
304 impl fidl::encoding::ValueTypeMarker for GetAnnotationsError {
305 type Borrowed<'a> = Self;
306 #[inline(always)]
307 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
308 *value
309 }
310 }
311
312 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
313 for GetAnnotationsError
314 {
315 #[inline]
316 unsafe fn encode(
317 self,
318 encoder: &mut fidl::encoding::Encoder<'_, D>,
319 offset: usize,
320 _depth: fidl::encoding::Depth,
321 ) -> fidl::Result<()> {
322 encoder.debug_check_bounds::<Self>(offset);
323 encoder.write_num(self.into_primitive(), offset);
324 Ok(())
325 }
326 }
327
328 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetAnnotationsError {
329 #[inline(always)]
330 fn new_empty() -> Self {
331 Self::BufferReadFailed
332 }
333
334 #[inline]
335 unsafe fn decode(
336 &mut self,
337 decoder: &mut fidl::encoding::Decoder<'_, D>,
338 offset: usize,
339 _depth: fidl::encoding::Depth,
340 ) -> fidl::Result<()> {
341 decoder.debug_check_bounds::<Self>(offset);
342 let prim = decoder.read_num::<u32>(offset);
343
344 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
345 Ok(())
346 }
347 }
348 unsafe impl fidl::encoding::TypeMarker for ManagerError {
349 type Owned = Self;
350
351 #[inline(always)]
352 fn inline_align(_context: fidl::encoding::Context) -> usize {
353 std::mem::align_of::<u32>()
354 }
355
356 #[inline(always)]
357 fn inline_size(_context: fidl::encoding::Context) -> usize {
358 std::mem::size_of::<u32>()
359 }
360
361 #[inline(always)]
362 fn encode_is_copy() -> bool {
363 true
364 }
365
366 #[inline(always)]
367 fn decode_is_copy() -> bool {
368 false
369 }
370 }
371
372 impl fidl::encoding::ValueTypeMarker for ManagerError {
373 type Borrowed<'a> = Self;
374 #[inline(always)]
375 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
376 *value
377 }
378 }
379
380 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ManagerError {
381 #[inline]
382 unsafe fn encode(
383 self,
384 encoder: &mut fidl::encoding::Encoder<'_, D>,
385 offset: usize,
386 _depth: fidl::encoding::Depth,
387 ) -> fidl::Result<()> {
388 encoder.debug_check_bounds::<Self>(offset);
389 encoder.write_num(self.into_primitive(), offset);
390 Ok(())
391 }
392 }
393
394 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ManagerError {
395 #[inline(always)]
396 fn new_empty() -> Self {
397 Self::InvalidArgs
398 }
399
400 #[inline]
401 unsafe fn decode(
402 &mut self,
403 decoder: &mut fidl::encoding::Decoder<'_, D>,
404 offset: usize,
405 _depth: fidl::encoding::Depth,
406 ) -> fidl::Result<()> {
407 decoder.debug_check_bounds::<Self>(offset);
408 let prim = decoder.read_num::<u32>(offset);
409
410 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
411 Ok(())
412 }
413 }
414 unsafe impl fidl::encoding::TypeMarker for PresentViewError {
415 type Owned = Self;
416
417 #[inline(always)]
418 fn inline_align(_context: fidl::encoding::Context) -> usize {
419 std::mem::align_of::<u32>()
420 }
421
422 #[inline(always)]
423 fn inline_size(_context: fidl::encoding::Context) -> usize {
424 std::mem::size_of::<u32>()
425 }
426
427 #[inline(always)]
428 fn encode_is_copy() -> bool {
429 true
430 }
431
432 #[inline(always)]
433 fn decode_is_copy() -> bool {
434 false
435 }
436 }
437
438 impl fidl::encoding::ValueTypeMarker for PresentViewError {
439 type Borrowed<'a> = Self;
440 #[inline(always)]
441 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
442 *value
443 }
444 }
445
446 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
447 for PresentViewError
448 {
449 #[inline]
450 unsafe fn encode(
451 self,
452 encoder: &mut fidl::encoding::Encoder<'_, D>,
453 offset: usize,
454 _depth: fidl::encoding::Depth,
455 ) -> fidl::Result<()> {
456 encoder.debug_check_bounds::<Self>(offset);
457 encoder.write_num(self.into_primitive(), offset);
458 Ok(())
459 }
460 }
461
462 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PresentViewError {
463 #[inline(always)]
464 fn new_empty() -> Self {
465 Self::InvalidArgs
466 }
467
468 #[inline]
469 unsafe fn decode(
470 &mut self,
471 decoder: &mut fidl::encoding::Decoder<'_, D>,
472 offset: usize,
473 _depth: fidl::encoding::Depth,
474 ) -> fidl::Result<()> {
475 decoder.debug_check_bounds::<Self>(offset);
476 let prim = decoder.read_num::<u32>(offset);
477
478 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
479 Ok(())
480 }
481 }
482 unsafe impl fidl::encoding::TypeMarker for ProposeElementError {
483 type Owned = Self;
484
485 #[inline(always)]
486 fn inline_align(_context: fidl::encoding::Context) -> usize {
487 std::mem::align_of::<u32>()
488 }
489
490 #[inline(always)]
491 fn inline_size(_context: fidl::encoding::Context) -> usize {
492 std::mem::size_of::<u32>()
493 }
494
495 #[inline(always)]
496 fn encode_is_copy() -> bool {
497 true
498 }
499
500 #[inline(always)]
501 fn decode_is_copy() -> bool {
502 false
503 }
504 }
505
506 impl fidl::encoding::ValueTypeMarker for ProposeElementError {
507 type Borrowed<'a> = Self;
508 #[inline(always)]
509 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
510 *value
511 }
512 }
513
514 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
515 for ProposeElementError
516 {
517 #[inline]
518 unsafe fn encode(
519 self,
520 encoder: &mut fidl::encoding::Encoder<'_, D>,
521 offset: usize,
522 _depth: fidl::encoding::Depth,
523 ) -> fidl::Result<()> {
524 encoder.debug_check_bounds::<Self>(offset);
525 encoder.write_num(self.into_primitive(), offset);
526 Ok(())
527 }
528 }
529
530 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProposeElementError {
531 #[inline(always)]
532 fn new_empty() -> Self {
533 Self::InvalidArgs
534 }
535
536 #[inline]
537 unsafe fn decode(
538 &mut self,
539 decoder: &mut fidl::encoding::Decoder<'_, D>,
540 offset: usize,
541 _depth: fidl::encoding::Depth,
542 ) -> fidl::Result<()> {
543 decoder.debug_check_bounds::<Self>(offset);
544 let prim = decoder.read_num::<u32>(offset);
545
546 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
547 Ok(())
548 }
549 }
550 unsafe impl fidl::encoding::TypeMarker for UpdateAnnotationsError {
551 type Owned = Self;
552
553 #[inline(always)]
554 fn inline_align(_context: fidl::encoding::Context) -> usize {
555 std::mem::align_of::<u32>()
556 }
557
558 #[inline(always)]
559 fn inline_size(_context: fidl::encoding::Context) -> usize {
560 std::mem::size_of::<u32>()
561 }
562
563 #[inline(always)]
564 fn encode_is_copy() -> bool {
565 true
566 }
567
568 #[inline(always)]
569 fn decode_is_copy() -> bool {
570 false
571 }
572 }
573
574 impl fidl::encoding::ValueTypeMarker for UpdateAnnotationsError {
575 type Borrowed<'a> = Self;
576 #[inline(always)]
577 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
578 *value
579 }
580 }
581
582 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
583 for UpdateAnnotationsError
584 {
585 #[inline]
586 unsafe fn encode(
587 self,
588 encoder: &mut fidl::encoding::Encoder<'_, D>,
589 offset: usize,
590 _depth: fidl::encoding::Depth,
591 ) -> fidl::Result<()> {
592 encoder.debug_check_bounds::<Self>(offset);
593 encoder.write_num(self.into_primitive(), offset);
594 Ok(())
595 }
596 }
597
598 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
599 for UpdateAnnotationsError
600 {
601 #[inline(always)]
602 fn new_empty() -> Self {
603 Self::InvalidArgs
604 }
605
606 #[inline]
607 unsafe fn decode(
608 &mut self,
609 decoder: &mut fidl::encoding::Decoder<'_, D>,
610 offset: usize,
611 _depth: fidl::encoding::Depth,
612 ) -> fidl::Result<()> {
613 decoder.debug_check_bounds::<Self>(offset);
614 let prim = decoder.read_num::<u32>(offset);
615
616 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
617 Ok(())
618 }
619 }
620 unsafe impl fidl::encoding::TypeMarker for WatchAnnotationsError {
621 type Owned = Self;
622
623 #[inline(always)]
624 fn inline_align(_context: fidl::encoding::Context) -> usize {
625 std::mem::align_of::<u32>()
626 }
627
628 #[inline(always)]
629 fn inline_size(_context: fidl::encoding::Context) -> usize {
630 std::mem::size_of::<u32>()
631 }
632
633 #[inline(always)]
634 fn encode_is_copy() -> bool {
635 false
636 }
637
638 #[inline(always)]
639 fn decode_is_copy() -> bool {
640 false
641 }
642 }
643
644 impl fidl::encoding::ValueTypeMarker for WatchAnnotationsError {
645 type Borrowed<'a> = Self;
646 #[inline(always)]
647 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
648 *value
649 }
650 }
651
652 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
653 for WatchAnnotationsError
654 {
655 #[inline]
656 unsafe fn encode(
657 self,
658 encoder: &mut fidl::encoding::Encoder<'_, D>,
659 offset: usize,
660 _depth: fidl::encoding::Depth,
661 ) -> fidl::Result<()> {
662 encoder.debug_check_bounds::<Self>(offset);
663 encoder.write_num(self.into_primitive(), offset);
664 Ok(())
665 }
666 }
667
668 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WatchAnnotationsError {
669 #[inline(always)]
670 fn new_empty() -> Self {
671 Self::unknown()
672 }
673
674 #[inline]
675 unsafe fn decode(
676 &mut self,
677 decoder: &mut fidl::encoding::Decoder<'_, D>,
678 offset: usize,
679 _depth: fidl::encoding::Depth,
680 ) -> fidl::Result<()> {
681 decoder.debug_check_bounds::<Self>(offset);
682 let prim = decoder.read_num::<u32>(offset);
683
684 *self = Self::from_primitive_allow_unknown(prim);
685 Ok(())
686 }
687 }
688
689 impl fidl::encoding::ValueTypeMarker for AnnotationKey {
690 type Borrowed<'a> = &'a Self;
691 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
692 value
693 }
694 }
695
696 unsafe impl fidl::encoding::TypeMarker for AnnotationKey {
697 type Owned = Self;
698
699 #[inline(always)]
700 fn inline_align(_context: fidl::encoding::Context) -> usize {
701 8
702 }
703
704 #[inline(always)]
705 fn inline_size(_context: fidl::encoding::Context) -> usize {
706 32
707 }
708 }
709
710 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnnotationKey, D>
711 for &AnnotationKey
712 {
713 #[inline]
714 unsafe fn encode(
715 self,
716 encoder: &mut fidl::encoding::Encoder<'_, D>,
717 offset: usize,
718 _depth: fidl::encoding::Depth,
719 ) -> fidl::Result<()> {
720 encoder.debug_check_bounds::<AnnotationKey>(offset);
721 fidl::encoding::Encode::<AnnotationKey, D>::encode(
723 (
724 <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(
725 &self.namespace,
726 ),
727 <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(
728 &self.value,
729 ),
730 ),
731 encoder,
732 offset,
733 _depth,
734 )
735 }
736 }
737 unsafe impl<
738 D: fidl::encoding::ResourceDialect,
739 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
740 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
741 > fidl::encoding::Encode<AnnotationKey, D> for (T0, T1)
742 {
743 #[inline]
744 unsafe fn encode(
745 self,
746 encoder: &mut fidl::encoding::Encoder<'_, D>,
747 offset: usize,
748 depth: fidl::encoding::Depth,
749 ) -> fidl::Result<()> {
750 encoder.debug_check_bounds::<AnnotationKey>(offset);
751 self.0.encode(encoder, offset + 0, depth)?;
755 self.1.encode(encoder, offset + 16, depth)?;
756 Ok(())
757 }
758 }
759
760 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnnotationKey {
761 #[inline(always)]
762 fn new_empty() -> Self {
763 Self {
764 namespace: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
765 value: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
766 }
767 }
768
769 #[inline]
770 unsafe fn decode(
771 &mut self,
772 decoder: &mut fidl::encoding::Decoder<'_, D>,
773 offset: usize,
774 _depth: fidl::encoding::Depth,
775 ) -> fidl::Result<()> {
776 decoder.debug_check_bounds::<Self>(offset);
777 fidl::decode!(
779 fidl::encoding::BoundedString<128>,
780 D,
781 &mut self.namespace,
782 decoder,
783 offset + 0,
784 _depth
785 )?;
786 fidl::decode!(
787 fidl::encoding::BoundedString<128>,
788 D,
789 &mut self.value,
790 decoder,
791 offset + 16,
792 _depth
793 )?;
794 Ok(())
795 }
796 }
797
798 impl fidl::encoding::ValueTypeMarker for ManagerRemoveElementRequest {
799 type Borrowed<'a> = &'a Self;
800 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
801 value
802 }
803 }
804
805 unsafe impl fidl::encoding::TypeMarker for ManagerRemoveElementRequest {
806 type Owned = Self;
807
808 #[inline(always)]
809 fn inline_align(_context: fidl::encoding::Context) -> usize {
810 8
811 }
812
813 #[inline(always)]
814 fn inline_size(_context: fidl::encoding::Context) -> usize {
815 16
816 }
817 }
818
819 unsafe impl<D: fidl::encoding::ResourceDialect>
820 fidl::encoding::Encode<ManagerRemoveElementRequest, D> for &ManagerRemoveElementRequest
821 {
822 #[inline]
823 unsafe fn encode(
824 self,
825 encoder: &mut fidl::encoding::Encoder<'_, D>,
826 offset: usize,
827 _depth: fidl::encoding::Depth,
828 ) -> fidl::Result<()> {
829 encoder.debug_check_bounds::<ManagerRemoveElementRequest>(offset);
830 fidl::encoding::Encode::<ManagerRemoveElementRequest, D>::encode(
832 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
833 &self.name,
834 ),),
835 encoder,
836 offset,
837 _depth,
838 )
839 }
840 }
841 unsafe impl<
842 D: fidl::encoding::ResourceDialect,
843 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
844 > fidl::encoding::Encode<ManagerRemoveElementRequest, D> for (T0,)
845 {
846 #[inline]
847 unsafe fn encode(
848 self,
849 encoder: &mut fidl::encoding::Encoder<'_, D>,
850 offset: usize,
851 depth: fidl::encoding::Depth,
852 ) -> fidl::Result<()> {
853 encoder.debug_check_bounds::<ManagerRemoveElementRequest>(offset);
854 self.0.encode(encoder, offset + 0, depth)?;
858 Ok(())
859 }
860 }
861
862 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
863 for ManagerRemoveElementRequest
864 {
865 #[inline(always)]
866 fn new_empty() -> Self {
867 Self { name: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
868 }
869
870 #[inline]
871 unsafe fn decode(
872 &mut self,
873 decoder: &mut fidl::encoding::Decoder<'_, D>,
874 offset: usize,
875 _depth: fidl::encoding::Depth,
876 ) -> fidl::Result<()> {
877 decoder.debug_check_bounds::<Self>(offset);
878 fidl::decode!(
880 fidl::encoding::UnboundedString,
881 D,
882 &mut self.name,
883 decoder,
884 offset + 0,
885 _depth
886 )?;
887 Ok(())
888 }
889 }
890}