fidl_fuchsia_bluetooth_fastpair__common/
fidl_fuchsia_bluetooth_fastpair__common.rs1#![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, Debug, PartialEq)]
12pub struct ProviderWatcherOnPairingCompleteRequest {
13 pub id: fidl_fuchsia_bluetooth__common::PeerId,
14}
15
16impl fidl::Persistable for ProviderWatcherOnPairingCompleteRequest {}
17
18pub mod provider_ordinals {
19 pub const ENABLE: u64 = 0x141c1c4f3b6645ad;
20}
21
22pub mod provider_watcher_ordinals {
23 pub const ON_PAIRING_COMPLETE: u64 = 0x7a918bb5f1ca3581;
24}
25
26mod internal {
27 use super::*;
28
29 impl fidl::encoding::ValueTypeMarker for ProviderWatcherOnPairingCompleteRequest {
30 type Borrowed<'a> = &'a Self;
31 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32 value
33 }
34 }
35
36 unsafe impl fidl::encoding::TypeMarker for ProviderWatcherOnPairingCompleteRequest {
37 type Owned = Self;
38
39 #[inline(always)]
40 fn inline_align(_context: fidl::encoding::Context) -> usize {
41 8
42 }
43
44 #[inline(always)]
45 fn inline_size(_context: fidl::encoding::Context) -> usize {
46 8
47 }
48 }
49
50 unsafe impl<D: fidl::encoding::ResourceDialect>
51 fidl::encoding::Encode<ProviderWatcherOnPairingCompleteRequest, D>
52 for &ProviderWatcherOnPairingCompleteRequest
53 {
54 #[inline]
55 unsafe fn encode(
56 self,
57 encoder: &mut fidl::encoding::Encoder<'_, D>,
58 offset: usize,
59 _depth: fidl::encoding::Depth,
60 ) -> fidl::Result<()> {
61 encoder.debug_check_bounds::<ProviderWatcherOnPairingCompleteRequest>(offset);
62 fidl::encoding::Encode::<ProviderWatcherOnPairingCompleteRequest, D>::encode(
64 (
65 <fidl_fuchsia_bluetooth__common::PeerId as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
66 ),
67 encoder, offset, _depth
68 )
69 }
70 }
71 unsafe impl<
72 D: fidl::encoding::ResourceDialect,
73 T0: fidl::encoding::Encode<fidl_fuchsia_bluetooth__common::PeerId, D>,
74 > fidl::encoding::Encode<ProviderWatcherOnPairingCompleteRequest, D> for (T0,)
75 {
76 #[inline]
77 unsafe fn encode(
78 self,
79 encoder: &mut fidl::encoding::Encoder<'_, D>,
80 offset: usize,
81 depth: fidl::encoding::Depth,
82 ) -> fidl::Result<()> {
83 encoder.debug_check_bounds::<ProviderWatcherOnPairingCompleteRequest>(offset);
84 self.0.encode(encoder, offset + 0, depth)?;
88 Ok(())
89 }
90 }
91
92 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
93 for ProviderWatcherOnPairingCompleteRequest
94 {
95 #[inline(always)]
96 fn new_empty() -> Self {
97 Self { id: fidl::new_empty!(fidl_fuchsia_bluetooth__common::PeerId, D) }
98 }
99
100 #[inline]
101 unsafe fn decode(
102 &mut self,
103 decoder: &mut fidl::encoding::Decoder<'_, D>,
104 offset: usize,
105 _depth: fidl::encoding::Depth,
106 ) -> fidl::Result<()> {
107 decoder.debug_check_bounds::<Self>(offset);
108 fidl::decode!(
110 fidl_fuchsia_bluetooth__common::PeerId,
111 D,
112 &mut self.id,
113 decoder,
114 offset + 0,
115 _depth
116 )?;
117 Ok(())
118 }
119 }
120}