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