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