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
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 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 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 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 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 unsafe {
224 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
225 (ptr as *mut u64).write_unaligned(0);
226 }
227 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 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 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 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 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 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 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 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 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 unsafe {
513 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
514 (ptr as *mut u64).write_unaligned(0);
515 }
516 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 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 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<fidl_fuchsia_bluetooth_avrcp_common::NotificationEvent, 255>,
616 D,
617 >,
618 > fidl::encoding::Encode<ControllerExtGetEventsSupportedResponse, D> for (T0,)
619 {
620 #[inline]
621 unsafe fn encode(
622 self,
623 encoder: &mut fidl::encoding::Encoder<'_, D>,
624 offset: usize,
625 depth: fidl::encoding::Depth,
626 ) -> fidl::Result<()> {
627 encoder.debug_check_bounds::<ControllerExtGetEventsSupportedResponse>(offset);
628 self.0.encode(encoder, offset + 0, depth)?;
632 Ok(())
633 }
634 }
635
636 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
637 for ControllerExtGetEventsSupportedResponse
638 {
639 #[inline(always)]
640 fn new_empty() -> Self {
641 Self {
642 events_supported: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_bluetooth_avrcp_common::NotificationEvent, 255>, D),
643 }
644 }
645
646 #[inline]
647 unsafe fn decode(
648 &mut self,
649 decoder: &mut fidl::encoding::Decoder<'_, D>,
650 offset: usize,
651 _depth: fidl::encoding::Depth,
652 ) -> fidl::Result<()> {
653 decoder.debug_check_bounds::<Self>(offset);
654 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_bluetooth_avrcp_common::NotificationEvent, 255>, D, &mut self.events_supported, decoder, offset + 0, _depth)?;
656 Ok(())
657 }
658 }
659
660 impl fidl::encoding::ValueTypeMarker for ControllerExtSendRawVendorDependentCommandResponse {
661 type Borrowed<'a> = &'a Self;
662 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
663 value
664 }
665 }
666
667 unsafe impl fidl::encoding::TypeMarker for ControllerExtSendRawVendorDependentCommandResponse {
668 type Owned = Self;
669
670 #[inline(always)]
671 fn inline_align(_context: fidl::encoding::Context) -> usize {
672 8
673 }
674
675 #[inline(always)]
676 fn inline_size(_context: fidl::encoding::Context) -> usize {
677 16
678 }
679 }
680
681 unsafe impl<D: fidl::encoding::ResourceDialect>
682 fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandResponse, D>
683 for &ControllerExtSendRawVendorDependentCommandResponse
684 {
685 #[inline]
686 unsafe fn encode(
687 self,
688 encoder: &mut fidl::encoding::Encoder<'_, D>,
689 offset: usize,
690 _depth: fidl::encoding::Depth,
691 ) -> fidl::Result<()> {
692 encoder
693 .debug_check_bounds::<ControllerExtSendRawVendorDependentCommandResponse>(offset);
694 fidl::encoding::Encode::<ControllerExtSendRawVendorDependentCommandResponse, D>::encode(
696 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
697 &self.response,
698 ),),
699 encoder,
700 offset,
701 _depth,
702 )
703 }
704 }
705 unsafe impl<
706 D: fidl::encoding::ResourceDialect,
707 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
708 > fidl::encoding::Encode<ControllerExtSendRawVendorDependentCommandResponse, D> for (T0,)
709 {
710 #[inline]
711 unsafe fn encode(
712 self,
713 encoder: &mut fidl::encoding::Encoder<'_, D>,
714 offset: usize,
715 depth: fidl::encoding::Depth,
716 ) -> fidl::Result<()> {
717 encoder
718 .debug_check_bounds::<ControllerExtSendRawVendorDependentCommandResponse>(offset);
719 self.0.encode(encoder, offset + 0, depth)?;
723 Ok(())
724 }
725 }
726
727 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
728 for ControllerExtSendRawVendorDependentCommandResponse
729 {
730 #[inline(always)]
731 fn new_empty() -> Self {
732 Self { response: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
733 }
734
735 #[inline]
736 unsafe fn decode(
737 &mut self,
738 decoder: &mut fidl::encoding::Decoder<'_, D>,
739 offset: usize,
740 _depth: fidl::encoding::Depth,
741 ) -> fidl::Result<()> {
742 decoder.debug_check_bounds::<Self>(offset);
743 fidl::decode!(
745 fidl::encoding::UnboundedVector<u8>,
746 D,
747 &mut self.response,
748 decoder,
749 offset + 0,
750 _depth
751 )?;
752 Ok(())
753 }
754 }
755}