fidl_fuchsia_bluetooth_avrcp_test__common/
fidl_fuchsia_bluetooth_avrcp_test__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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
11#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12pub struct BrowseControllerExtIsConnectedResponse {
13    pub connected: bool,
14}
15
16impl fidl::Persistable for BrowseControllerExtIsConnectedResponse {}
17
18#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct BrowseControllerExtSendRawBrowseCommandRequest {
20    pub pdu_id: u8,
21    pub command: Vec<u8>,
22}
23
24impl fidl::Persistable for BrowseControllerExtSendRawBrowseCommandRequest {}
25
26#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27pub struct BrowseControllerExtSendRawBrowseCommandResponse {
28    pub response: Vec<u8>,
29}
30
31impl fidl::Persistable for BrowseControllerExtSendRawBrowseCommandResponse {}
32
33#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34pub struct ControllerExtIsConnectedResponse {
35    pub connected: bool,
36}
37
38impl fidl::Persistable for ControllerExtIsConnectedResponse {}
39
40#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41pub struct ControllerExtSendRawVendorDependentCommandRequest {
42    pub pdu_id: u8,
43    pub command: Vec<u8>,
44}
45
46impl fidl::Persistable for ControllerExtSendRawVendorDependentCommandRequest {}
47
48#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
49pub struct ControllerExtGetEventsSupportedResponse {
50    pub events_supported: Vec<fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent>,
51}
52
53impl fidl::Persistable for ControllerExtGetEventsSupportedResponse {}
54
55#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
56pub struct ControllerExtSendRawVendorDependentCommandResponse {
57    pub response: Vec<u8>,
58}
59
60impl fidl::Persistable for ControllerExtSendRawVendorDependentCommandResponse {}
61
62pub mod browse_controller_ext_ordinals {
63    pub const IS_CONNECTED: u64 = 0x276450990f1915b6;
64    pub const SEND_RAW_BROWSE_COMMAND: u64 = 0x7346e59b68ac4a71;
65}
66
67pub mod controller_ext_ordinals {
68    pub const IS_CONNECTED: u64 = 0x403f7bc6dbbcfc4f;
69    pub const GET_EVENTS_SUPPORTED: u64 = 0x13465d8abf04dd26;
70    pub const SEND_RAW_VENDOR_DEPENDENT_COMMAND: u64 = 0x48004b651df5f606;
71}
72
73pub mod peer_manager_ext_ordinals {
74    pub const GET_BROWSE_CONTROLLER_FOR_TARGET: u64 = 0x3b838b67d5a5aeac;
75    pub const GET_CONTROLLER_FOR_TARGET: u64 = 0x39448b0c65966553;
76}
77
78mod internal {
79    use super::*;
80
81    impl fidl::encoding::ValueTypeMarker for BrowseControllerExtIsConnectedResponse {
82        type Borrowed<'a> = &'a Self;
83        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
84            value
85        }
86    }
87
88    unsafe impl fidl::encoding::TypeMarker for BrowseControllerExtIsConnectedResponse {
89        type Owned = Self;
90
91        #[inline(always)]
92        fn inline_align(_context: fidl::encoding::Context) -> usize {
93            1
94        }
95
96        #[inline(always)]
97        fn inline_size(_context: fidl::encoding::Context) -> usize {
98            1
99        }
100    }
101
102    unsafe impl<D: fidl::encoding::ResourceDialect>
103        fidl::encoding::Encode<BrowseControllerExtIsConnectedResponse, D>
104        for &BrowseControllerExtIsConnectedResponse
105    {
106        #[inline]
107        unsafe fn encode(
108            self,
109            encoder: &mut fidl::encoding::Encoder<'_, D>,
110            offset: usize,
111            _depth: fidl::encoding::Depth,
112        ) -> fidl::Result<()> {
113            encoder.debug_check_bounds::<BrowseControllerExtIsConnectedResponse>(offset);
114            // Delegate to tuple encoding.
115            fidl::encoding::Encode::<BrowseControllerExtIsConnectedResponse, D>::encode(
116                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.connected),),
117                encoder,
118                offset,
119                _depth,
120            )
121        }
122    }
123    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
124        fidl::encoding::Encode<BrowseControllerExtIsConnectedResponse, D> for (T0,)
125    {
126        #[inline]
127        unsafe fn encode(
128            self,
129            encoder: &mut fidl::encoding::Encoder<'_, D>,
130            offset: usize,
131            depth: fidl::encoding::Depth,
132        ) -> fidl::Result<()> {
133            encoder.debug_check_bounds::<BrowseControllerExtIsConnectedResponse>(offset);
134            // Zero out padding regions. There's no need to apply masks
135            // because the unmasked parts will be overwritten by fields.
136            // Write the fields.
137            self.0.encode(encoder, offset + 0, depth)?;
138            Ok(())
139        }
140    }
141
142    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
143        for BrowseControllerExtIsConnectedResponse
144    {
145        #[inline(always)]
146        fn new_empty() -> Self {
147            Self { connected: fidl::new_empty!(bool, D) }
148        }
149
150        #[inline]
151        unsafe fn decode(
152            &mut self,
153            decoder: &mut fidl::encoding::Decoder<'_, D>,
154            offset: usize,
155            _depth: fidl::encoding::Depth,
156        ) -> fidl::Result<()> {
157            decoder.debug_check_bounds::<Self>(offset);
158            // Verify that padding bytes are zero.
159            fidl::decode!(bool, D, &mut self.connected, decoder, offset + 0, _depth)?;
160            Ok(())
161        }
162    }
163
164    impl fidl::encoding::ValueTypeMarker for BrowseControllerExtSendRawBrowseCommandRequest {
165        type Borrowed<'a> = &'a Self;
166        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
167            value
168        }
169    }
170
171    unsafe impl fidl::encoding::TypeMarker for BrowseControllerExtSendRawBrowseCommandRequest {
172        type Owned = Self;
173
174        #[inline(always)]
175        fn inline_align(_context: fidl::encoding::Context) -> usize {
176            8
177        }
178
179        #[inline(always)]
180        fn inline_size(_context: fidl::encoding::Context) -> usize {
181            24
182        }
183    }
184
185    unsafe impl<D: fidl::encoding::ResourceDialect>
186        fidl::encoding::Encode<BrowseControllerExtSendRawBrowseCommandRequest, D>
187        for &BrowseControllerExtSendRawBrowseCommandRequest
188    {
189        #[inline]
190        unsafe fn encode(
191            self,
192            encoder: &mut fidl::encoding::Encoder<'_, D>,
193            offset: usize,
194            _depth: fidl::encoding::Depth,
195        ) -> fidl::Result<()> {
196            encoder.debug_check_bounds::<BrowseControllerExtSendRawBrowseCommandRequest>(offset);
197            // Delegate to tuple encoding.
198            fidl::encoding::Encode::<BrowseControllerExtSendRawBrowseCommandRequest, D>::encode(
199                (
200                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.pdu_id),
201                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.command),
202                ),
203                encoder, offset, _depth
204            )
205        }
206    }
207    unsafe impl<
208            D: fidl::encoding::ResourceDialect,
209            T0: fidl::encoding::Encode<u8, D>,
210            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
211        > fidl::encoding::Encode<BrowseControllerExtSendRawBrowseCommandRequest, D> for (T0, T1)
212    {
213        #[inline]
214        unsafe fn encode(
215            self,
216            encoder: &mut fidl::encoding::Encoder<'_, D>,
217            offset: usize,
218            depth: fidl::encoding::Depth,
219        ) -> fidl::Result<()> {
220            encoder.debug_check_bounds::<BrowseControllerExtSendRawBrowseCommandRequest>(offset);
221            // Zero out padding regions. There's no need to apply masks
222            // because the unmasked parts will be overwritten by fields.
223            unsafe {
224                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
225                (ptr as *mut u64).write_unaligned(0);
226            }
227            // Write the fields.
228            self.0.encode(encoder, offset + 0, depth)?;
229            self.1.encode(encoder, offset + 8, depth)?;
230            Ok(())
231        }
232    }
233
234    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
235        for BrowseControllerExtSendRawBrowseCommandRequest
236    {
237        #[inline(always)]
238        fn new_empty() -> Self {
239            Self {
240                pdu_id: fidl::new_empty!(u8, D),
241                command: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
242            }
243        }
244
245        #[inline]
246        unsafe fn decode(
247            &mut self,
248            decoder: &mut fidl::encoding::Decoder<'_, D>,
249            offset: usize,
250            _depth: fidl::encoding::Depth,
251        ) -> fidl::Result<()> {
252            decoder.debug_check_bounds::<Self>(offset);
253            // Verify that padding bytes are zero.
254            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
255            let padval = unsafe { (ptr as *const u64).read_unaligned() };
256            let mask = 0xffffffffffffff00u64;
257            let maskedval = padval & mask;
258            if maskedval != 0 {
259                return Err(fidl::Error::NonZeroPadding {
260                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
261                });
262            }
263            fidl::decode!(u8, D, &mut self.pdu_id, decoder, offset + 0, _depth)?;
264            fidl::decode!(
265                fidl::encoding::UnboundedVector<u8>,
266                D,
267                &mut self.command,
268                decoder,
269                offset + 8,
270                _depth
271            )?;
272            Ok(())
273        }
274    }
275
276    impl fidl::encoding::ValueTypeMarker for BrowseControllerExtSendRawBrowseCommandResponse {
277        type Borrowed<'a> = &'a Self;
278        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
279            value
280        }
281    }
282
283    unsafe impl fidl::encoding::TypeMarker for BrowseControllerExtSendRawBrowseCommandResponse {
284        type Owned = Self;
285
286        #[inline(always)]
287        fn inline_align(_context: fidl::encoding::Context) -> usize {
288            8
289        }
290
291        #[inline(always)]
292        fn inline_size(_context: fidl::encoding::Context) -> usize {
293            16
294        }
295    }
296
297    unsafe impl<D: fidl::encoding::ResourceDialect>
298        fidl::encoding::Encode<BrowseControllerExtSendRawBrowseCommandResponse, D>
299        for &BrowseControllerExtSendRawBrowseCommandResponse
300    {
301        #[inline]
302        unsafe fn encode(
303            self,
304            encoder: &mut fidl::encoding::Encoder<'_, D>,
305            offset: usize,
306            _depth: fidl::encoding::Depth,
307        ) -> fidl::Result<()> {
308            encoder.debug_check_bounds::<BrowseControllerExtSendRawBrowseCommandResponse>(offset);
309            // Delegate to tuple encoding.
310            fidl::encoding::Encode::<BrowseControllerExtSendRawBrowseCommandResponse, D>::encode(
311                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
312                    &self.response,
313                ),),
314                encoder,
315                offset,
316                _depth,
317            )
318        }
319    }
320    unsafe impl<
321            D: fidl::encoding::ResourceDialect,
322            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
323        > fidl::encoding::Encode<BrowseControllerExtSendRawBrowseCommandResponse, D> for (T0,)
324    {
325        #[inline]
326        unsafe fn encode(
327            self,
328            encoder: &mut fidl::encoding::Encoder<'_, D>,
329            offset: usize,
330            depth: fidl::encoding::Depth,
331        ) -> fidl::Result<()> {
332            encoder.debug_check_bounds::<BrowseControllerExtSendRawBrowseCommandResponse>(offset);
333            // Zero out padding regions. There's no need to apply masks
334            // because the unmasked parts will be overwritten by fields.
335            // Write the fields.
336            self.0.encode(encoder, offset + 0, depth)?;
337            Ok(())
338        }
339    }
340
341    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
342        for BrowseControllerExtSendRawBrowseCommandResponse
343    {
344        #[inline(always)]
345        fn new_empty() -> Self {
346            Self { response: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
347        }
348
349        #[inline]
350        unsafe fn decode(
351            &mut self,
352            decoder: &mut fidl::encoding::Decoder<'_, D>,
353            offset: usize,
354            _depth: fidl::encoding::Depth,
355        ) -> fidl::Result<()> {
356            decoder.debug_check_bounds::<Self>(offset);
357            // Verify that padding bytes are zero.
358            fidl::decode!(
359                fidl::encoding::UnboundedVector<u8>,
360                D,
361                &mut self.response,
362                decoder,
363                offset + 0,
364                _depth
365            )?;
366            Ok(())
367        }
368    }
369
370    impl fidl::encoding::ValueTypeMarker for ControllerExtIsConnectedResponse {
371        type Borrowed<'a> = &'a Self;
372        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
373            value
374        }
375    }
376
377    unsafe impl fidl::encoding::TypeMarker for ControllerExtIsConnectedResponse {
378        type Owned = Self;
379
380        #[inline(always)]
381        fn inline_align(_context: fidl::encoding::Context) -> usize {
382            1
383        }
384
385        #[inline(always)]
386        fn inline_size(_context: fidl::encoding::Context) -> usize {
387            1
388        }
389    }
390
391    unsafe impl<D: fidl::encoding::ResourceDialect>
392        fidl::encoding::Encode<ControllerExtIsConnectedResponse, D>
393        for &ControllerExtIsConnectedResponse
394    {
395        #[inline]
396        unsafe fn encode(
397            self,
398            encoder: &mut fidl::encoding::Encoder<'_, D>,
399            offset: usize,
400            _depth: fidl::encoding::Depth,
401        ) -> fidl::Result<()> {
402            encoder.debug_check_bounds::<ControllerExtIsConnectedResponse>(offset);
403            // Delegate to tuple encoding.
404            fidl::encoding::Encode::<ControllerExtIsConnectedResponse, D>::encode(
405                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.connected),),
406                encoder,
407                offset,
408                _depth,
409            )
410        }
411    }
412    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
413        fidl::encoding::Encode<ControllerExtIsConnectedResponse, D> for (T0,)
414    {
415        #[inline]
416        unsafe fn encode(
417            self,
418            encoder: &mut fidl::encoding::Encoder<'_, D>,
419            offset: usize,
420            depth: fidl::encoding::Depth,
421        ) -> fidl::Result<()> {
422            encoder.debug_check_bounds::<ControllerExtIsConnectedResponse>(offset);
423            // Zero out padding regions. There's no need to apply masks
424            // because the unmasked parts will be overwritten by fields.
425            // Write the fields.
426            self.0.encode(encoder, offset + 0, depth)?;
427            Ok(())
428        }
429    }
430
431    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
432        for ControllerExtIsConnectedResponse
433    {
434        #[inline(always)]
435        fn new_empty() -> Self {
436            Self { connected: fidl::new_empty!(bool, D) }
437        }
438
439        #[inline]
440        unsafe fn decode(
441            &mut self,
442            decoder: &mut fidl::encoding::Decoder<'_, D>,
443            offset: usize,
444            _depth: fidl::encoding::Depth,
445        ) -> fidl::Result<()> {
446            decoder.debug_check_bounds::<Self>(offset);
447            // Verify that padding bytes are zero.
448            fidl::decode!(bool, D, &mut self.connected, decoder, offset + 0, _depth)?;
449            Ok(())
450        }
451    }
452
453    impl fidl::encoding::ValueTypeMarker for ControllerExtSendRawVendorDependentCommandRequest {
454        type Borrowed<'a> = &'a Self;
455        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
456            value
457        }
458    }
459
460    unsafe impl fidl::encoding::TypeMarker for ControllerExtSendRawVendorDependentCommandRequest {
461        type Owned = Self;
462
463        #[inline(always)]
464        fn inline_align(_context: fidl::encoding::Context) -> usize {
465            8
466        }
467
468        #[inline(always)]
469        fn inline_size(_context: fidl::encoding::Context) -> usize {
470            24
471        }
472    }
473
474    unsafe impl<D: fidl::encoding::ResourceDialect>
475        fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandRequest, D>
476        for &ControllerExtSendRawVendorDependentCommandRequest
477    {
478        #[inline]
479        unsafe fn encode(
480            self,
481            encoder: &mut fidl::encoding::Encoder<'_, D>,
482            offset: usize,
483            _depth: fidl::encoding::Depth,
484        ) -> fidl::Result<()> {
485            encoder.debug_check_bounds::<ControllerExtSendRawVendorDependentCommandRequest>(offset);
486            // Delegate to tuple encoding.
487            fidl::encoding::Encode::<ControllerExtSendRawVendorDependentCommandRequest, D>::encode(
488                (
489                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.pdu_id),
490                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.command),
491                ),
492                encoder, offset, _depth
493            )
494        }
495    }
496    unsafe impl<
497            D: fidl::encoding::ResourceDialect,
498            T0: fidl::encoding::Encode<u8, D>,
499            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
500        > fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandRequest, D>
501        for (T0, T1)
502    {
503        #[inline]
504        unsafe fn encode(
505            self,
506            encoder: &mut fidl::encoding::Encoder<'_, D>,
507            offset: usize,
508            depth: fidl::encoding::Depth,
509        ) -> fidl::Result<()> {
510            encoder.debug_check_bounds::<ControllerExtSendRawVendorDependentCommandRequest>(offset);
511            // Zero out padding regions. There's no need to apply masks
512            // because the unmasked parts will be overwritten by fields.
513            unsafe {
514                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
515                (ptr as *mut u64).write_unaligned(0);
516            }
517            // Write the fields.
518            self.0.encode(encoder, offset + 0, depth)?;
519            self.1.encode(encoder, offset + 8, depth)?;
520            Ok(())
521        }
522    }
523
524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
525        for ControllerExtSendRawVendorDependentCommandRequest
526    {
527        #[inline(always)]
528        fn new_empty() -> Self {
529            Self {
530                pdu_id: fidl::new_empty!(u8, D),
531                command: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
532            }
533        }
534
535        #[inline]
536        unsafe fn decode(
537            &mut self,
538            decoder: &mut fidl::encoding::Decoder<'_, D>,
539            offset: usize,
540            _depth: fidl::encoding::Depth,
541        ) -> fidl::Result<()> {
542            decoder.debug_check_bounds::<Self>(offset);
543            // Verify that padding bytes are zero.
544            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
545            let padval = unsafe { (ptr as *const u64).read_unaligned() };
546            let mask = 0xffffffffffffff00u64;
547            let maskedval = padval & mask;
548            if maskedval != 0 {
549                return Err(fidl::Error::NonZeroPadding {
550                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
551                });
552            }
553            fidl::decode!(u8, D, &mut self.pdu_id, decoder, offset + 0, _depth)?;
554            fidl::decode!(
555                fidl::encoding::UnboundedVector<u8>,
556                D,
557                &mut self.command,
558                decoder,
559                offset + 8,
560                _depth
561            )?;
562            Ok(())
563        }
564    }
565
566    impl fidl::encoding::ValueTypeMarker for ControllerExtGetEventsSupportedResponse {
567        type Borrowed<'a> = &'a Self;
568        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
569            value
570        }
571    }
572
573    unsafe impl fidl::encoding::TypeMarker for ControllerExtGetEventsSupportedResponse {
574        type Owned = Self;
575
576        #[inline(always)]
577        fn inline_align(_context: fidl::encoding::Context) -> usize {
578            8
579        }
580
581        #[inline(always)]
582        fn inline_size(_context: fidl::encoding::Context) -> usize {
583            16
584        }
585    }
586
587    unsafe impl<D: fidl::encoding::ResourceDialect>
588        fidl::encoding::Encode<ControllerExtGetEventsSupportedResponse, D>
589        for &ControllerExtGetEventsSupportedResponse
590    {
591        #[inline]
592        unsafe fn encode(
593            self,
594            encoder: &mut fidl::encoding::Encoder<'_, D>,
595            offset: usize,
596            _depth: fidl::encoding::Depth,
597        ) -> fidl::Result<()> {
598            encoder.debug_check_bounds::<ControllerExtGetEventsSupportedResponse>(offset);
599            // Delegate to tuple encoding.
600            fidl::encoding::Encode::<ControllerExtGetEventsSupportedResponse, D>::encode(
601                (<fidl::encoding::Vector<
602                    fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent,
603                    255,
604                > as fidl::encoding::ValueTypeMarker>::borrow(
605                    &self.events_supported
606                ),),
607                encoder,
608                offset,
609                _depth,
610            )
611        }
612    }
613    unsafe impl<
614            D: fidl::encoding::ResourceDialect,
615            T0: fidl::encoding::Encode<
616                fidl::encoding::Vector<
617                    fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent,
618                    255,
619                >,
620                D,
621            >,
622        > fidl::encoding::Encode<ControllerExtGetEventsSupportedResponse, D> for (T0,)
623    {
624        #[inline]
625        unsafe fn encode(
626            self,
627            encoder: &mut fidl::encoding::Encoder<'_, D>,
628            offset: usize,
629            depth: fidl::encoding::Depth,
630        ) -> fidl::Result<()> {
631            encoder.debug_check_bounds::<ControllerExtGetEventsSupportedResponse>(offset);
632            // Zero out padding regions. There's no need to apply masks
633            // because the unmasked parts will be overwritten by fields.
634            // Write the fields.
635            self.0.encode(encoder, offset + 0, depth)?;
636            Ok(())
637        }
638    }
639
640    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
641        for ControllerExtGetEventsSupportedResponse
642    {
643        #[inline(always)]
644        fn new_empty() -> Self {
645            Self {
646                events_supported: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent, 255>, D),
647            }
648        }
649
650        #[inline]
651        unsafe fn decode(
652            &mut self,
653            decoder: &mut fidl::encoding::Decoder<'_, D>,
654            offset: usize,
655            _depth: fidl::encoding::Depth,
656        ) -> fidl::Result<()> {
657            decoder.debug_check_bounds::<Self>(offset);
658            // Verify that padding bytes are zero.
659            fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent, 255>, D, &mut self.events_supported, decoder, offset + 0, _depth)?;
660            Ok(())
661        }
662    }
663
664    impl fidl::encoding::ValueTypeMarker for ControllerExtSendRawVendorDependentCommandResponse {
665        type Borrowed<'a> = &'a Self;
666        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
667            value
668        }
669    }
670
671    unsafe impl fidl::encoding::TypeMarker for ControllerExtSendRawVendorDependentCommandResponse {
672        type Owned = Self;
673
674        #[inline(always)]
675        fn inline_align(_context: fidl::encoding::Context) -> usize {
676            8
677        }
678
679        #[inline(always)]
680        fn inline_size(_context: fidl::encoding::Context) -> usize {
681            16
682        }
683    }
684
685    unsafe impl<D: fidl::encoding::ResourceDialect>
686        fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandResponse, D>
687        for &ControllerExtSendRawVendorDependentCommandResponse
688    {
689        #[inline]
690        unsafe fn encode(
691            self,
692            encoder: &mut fidl::encoding::Encoder<'_, D>,
693            offset: usize,
694            _depth: fidl::encoding::Depth,
695        ) -> fidl::Result<()> {
696            encoder
697                .debug_check_bounds::<ControllerExtSendRawVendorDependentCommandResponse>(offset);
698            // Delegate to tuple encoding.
699            fidl::encoding::Encode::<ControllerExtSendRawVendorDependentCommandResponse, D>::encode(
700                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
701                    &self.response,
702                ),),
703                encoder,
704                offset,
705                _depth,
706            )
707        }
708    }
709    unsafe impl<
710            D: fidl::encoding::ResourceDialect,
711            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
712        > fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandResponse, D> for (T0,)
713    {
714        #[inline]
715        unsafe fn encode(
716            self,
717            encoder: &mut fidl::encoding::Encoder<'_, D>,
718            offset: usize,
719            depth: fidl::encoding::Depth,
720        ) -> fidl::Result<()> {
721            encoder
722                .debug_check_bounds::<ControllerExtSendRawVendorDependentCommandResponse>(offset);
723            // Zero out padding regions. There's no need to apply masks
724            // because the unmasked parts will be overwritten by fields.
725            // Write the fields.
726            self.0.encode(encoder, offset + 0, depth)?;
727            Ok(())
728        }
729    }
730
731    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
732        for ControllerExtSendRawVendorDependentCommandResponse
733    {
734        #[inline(always)]
735        fn new_empty() -> Self {
736            Self { response: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
737        }
738
739        #[inline]
740        unsafe fn decode(
741            &mut self,
742            decoder: &mut fidl::encoding::Decoder<'_, D>,
743            offset: usize,
744            _depth: fidl::encoding::Depth,
745        ) -> fidl::Result<()> {
746            decoder.debug_check_bounds::<Self>(offset);
747            // Verify that padding bytes are zero.
748            fidl::decode!(
749                fidl::encoding::UnboundedVector<u8>,
750                D,
751                &mut self.response,
752                decoder,
753                offset + 0,
754                _depth
755            )?;
756            Ok(())
757        }
758    }
759}