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> for (T0, T1)
501    {
502        #[inline]
503        unsafe fn encode(
504            self,
505            encoder: &mut fidl::encoding::Encoder<'_, D>,
506            offset: usize,
507            depth: fidl::encoding::Depth,
508        ) -> fidl::Result<()> {
509            encoder.debug_check_bounds::<ControllerExtSendRawVendorDependentCommandRequest>(offset);
510            // Zero out padding regions. There's no need to apply masks
511            // because the unmasked parts will be overwritten by fields.
512            unsafe {
513                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
514                (ptr as *mut u64).write_unaligned(0);
515            }
516            // Write the fields.
517            self.0.encode(encoder, offset + 0, depth)?;
518            self.1.encode(encoder, offset + 8, depth)?;
519            Ok(())
520        }
521    }
522
523    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
524        for ControllerExtSendRawVendorDependentCommandRequest
525    {
526        #[inline(always)]
527        fn new_empty() -> Self {
528            Self {
529                pdu_id: fidl::new_empty!(u8, D),
530                command: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
531            }
532        }
533
534        #[inline]
535        unsafe fn decode(
536            &mut self,
537            decoder: &mut fidl::encoding::Decoder<'_, D>,
538            offset: usize,
539            _depth: fidl::encoding::Depth,
540        ) -> fidl::Result<()> {
541            decoder.debug_check_bounds::<Self>(offset);
542            // Verify that padding bytes are zero.
543            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
544            let padval = unsafe { (ptr as *const u64).read_unaligned() };
545            let mask = 0xffffffffffffff00u64;
546            let maskedval = padval & mask;
547            if maskedval != 0 {
548                return Err(fidl::Error::NonZeroPadding {
549                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
550                });
551            }
552            fidl::decode!(u8, D, &mut self.pdu_id, decoder, offset + 0, _depth)?;
553            fidl::decode!(
554                fidl::encoding::UnboundedVector<u8>,
555                D,
556                &mut self.command,
557                decoder,
558                offset + 8,
559                _depth
560            )?;
561            Ok(())
562        }
563    }
564
565    impl fidl::encoding::ValueTypeMarker for ControllerExtGetEventsSupportedResponse {
566        type Borrowed<'a> = &'a Self;
567        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
568            value
569        }
570    }
571
572    unsafe impl fidl::encoding::TypeMarker for ControllerExtGetEventsSupportedResponse {
573        type Owned = Self;
574
575        #[inline(always)]
576        fn inline_align(_context: fidl::encoding::Context) -> usize {
577            8
578        }
579
580        #[inline(always)]
581        fn inline_size(_context: fidl::encoding::Context) -> usize {
582            16
583        }
584    }
585
586    unsafe impl<D: fidl::encoding::ResourceDialect>
587        fidl::encoding::Encode<ControllerExtGetEventsSupportedResponse, D>
588        for &ControllerExtGetEventsSupportedResponse
589    {
590        #[inline]
591        unsafe fn encode(
592            self,
593            encoder: &mut fidl::encoding::Encoder<'_, D>,
594            offset: usize,
595            _depth: fidl::encoding::Depth,
596        ) -> fidl::Result<()> {
597            encoder.debug_check_bounds::<ControllerExtGetEventsSupportedResponse>(offset);
598            // Delegate to tuple encoding.
599            fidl::encoding::Encode::<ControllerExtGetEventsSupportedResponse, D>::encode(
600                (<fidl::encoding::Vector<
601                    fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent,
602                    255,
603                > as fidl::encoding::ValueTypeMarker>::borrow(
604                    &self.events_supported
605                ),),
606                encoder,
607                offset,
608                _depth,
609            )
610        }
611    }
612    unsafe impl<
613        D: fidl::encoding::ResourceDialect,
614        T0: fidl::encoding::Encode<
615                fidl::encoding::Vector<
616                    fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent,
617                    255,
618                >,
619                D,
620            >,
621    > fidl::encoding::Encode<ControllerExtGetEventsSupportedResponse, D> for (T0,)
622    {
623        #[inline]
624        unsafe fn encode(
625            self,
626            encoder: &mut fidl::encoding::Encoder<'_, D>,
627            offset: usize,
628            depth: fidl::encoding::Depth,
629        ) -> fidl::Result<()> {
630            encoder.debug_check_bounds::<ControllerExtGetEventsSupportedResponse>(offset);
631            // Zero out padding regions. There's no need to apply masks
632            // because the unmasked parts will be overwritten by fields.
633            // Write the fields.
634            self.0.encode(encoder, offset + 0, depth)?;
635            Ok(())
636        }
637    }
638
639    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
640        for ControllerExtGetEventsSupportedResponse
641    {
642        #[inline(always)]
643        fn new_empty() -> Self {
644            Self {
645                events_supported: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent, 255>, D),
646            }
647        }
648
649        #[inline]
650        unsafe fn decode(
651            &mut self,
652            decoder: &mut fidl::encoding::Decoder<'_, D>,
653            offset: usize,
654            _depth: fidl::encoding::Depth,
655        ) -> fidl::Result<()> {
656            decoder.debug_check_bounds::<Self>(offset);
657            // Verify that padding bytes are zero.
658            fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_bluetooth_avrcp__common::NotificationEvent, 255>, D, &mut self.events_supported, decoder, offset + 0, _depth)?;
659            Ok(())
660        }
661    }
662
663    impl fidl::encoding::ValueTypeMarker for ControllerExtSendRawVendorDependentCommandResponse {
664        type Borrowed<'a> = &'a Self;
665        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
666            value
667        }
668    }
669
670    unsafe impl fidl::encoding::TypeMarker for ControllerExtSendRawVendorDependentCommandResponse {
671        type Owned = Self;
672
673        #[inline(always)]
674        fn inline_align(_context: fidl::encoding::Context) -> usize {
675            8
676        }
677
678        #[inline(always)]
679        fn inline_size(_context: fidl::encoding::Context) -> usize {
680            16
681        }
682    }
683
684    unsafe impl<D: fidl::encoding::ResourceDialect>
685        fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandResponse, D>
686        for &ControllerExtSendRawVendorDependentCommandResponse
687    {
688        #[inline]
689        unsafe fn encode(
690            self,
691            encoder: &mut fidl::encoding::Encoder<'_, D>,
692            offset: usize,
693            _depth: fidl::encoding::Depth,
694        ) -> fidl::Result<()> {
695            encoder
696                .debug_check_bounds::<ControllerExtSendRawVendorDependentCommandResponse>(offset);
697            // Delegate to tuple encoding.
698            fidl::encoding::Encode::<ControllerExtSendRawVendorDependentCommandResponse, D>::encode(
699                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
700                    &self.response,
701                ),),
702                encoder,
703                offset,
704                _depth,
705            )
706        }
707    }
708    unsafe impl<
709        D: fidl::encoding::ResourceDialect,
710        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
711    > fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandResponse, D> for (T0,)
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
721                .debug_check_bounds::<ControllerExtSendRawVendorDependentCommandResponse>(offset);
722            // Zero out padding regions. There's no need to apply masks
723            // because the unmasked parts will be overwritten by fields.
724            // Write the fields.
725            self.0.encode(encoder, offset + 0, depth)?;
726            Ok(())
727        }
728    }
729
730    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
731        for ControllerExtSendRawVendorDependentCommandResponse
732    {
733        #[inline(always)]
734        fn new_empty() -> Self {
735            Self { response: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
736        }
737
738        #[inline]
739        unsafe fn decode(
740            &mut self,
741            decoder: &mut fidl::encoding::Decoder<'_, D>,
742            offset: usize,
743            _depth: fidl::encoding::Depth,
744        ) -> fidl::Result<()> {
745            decoder.debug_check_bounds::<Self>(offset);
746            // Verify that padding bytes are zero.
747            fidl::decode!(
748                fidl::encoding::UnboundedVector<u8>,
749                D,
750                &mut self.response,
751                decoder,
752                offset + 0,
753                _depth
754            )?;
755            Ok(())
756        }
757    }
758}