Skip to main content

fidl_next_fuchsia_hardware_inlineencryption/
fidl_next_fuchsia_hardware_inlineencryption.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    pub use fidl_next_common_fuchsia_hardware_inlineencryption::natural::*;
8
9    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10    pub struct DeviceProgramKeyRequest {
11        pub wrapped_key: ::std::vec::Vec<u8>,
12
13        pub data_unit_size: u32,
14    }
15
16    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceProgramKeyRequest<'static>, ___E>
17        for DeviceProgramKeyRequest
18    where
19        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20        ___E: ::fidl_next::Encoder,
21        ___E: ::fidl_next::fuchsia::HandleEncoder,
22    {
23        #[inline]
24        fn encode(
25            self,
26            encoder_: &mut ___E,
27            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceProgramKeyRequest<'static>>,
28            _: (),
29        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
30            ::fidl_next::munge! {
31                let crate::wire::DeviceProgramKeyRequest {
32                    wrapped_key,
33                    data_unit_size,
34
35                } = out_;
36            }
37
38            ::fidl_next::Encode::encode(self.wrapped_key, encoder_, wrapped_key, (4294967295, ()))?;
39
40            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(wrapped_key.as_mut_ptr()) };
41            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
42
43            ::fidl_next::Encode::encode(self.data_unit_size, encoder_, data_unit_size, ())?;
44
45            let mut _field =
46                unsafe { ::fidl_next::Slot::new_unchecked(data_unit_size.as_mut_ptr()) };
47
48            Ok(())
49        }
50    }
51
52    unsafe impl<___E>
53        ::fidl_next::EncodeOption<
54            ::fidl_next::wire::Box<'static, crate::wire::DeviceProgramKeyRequest<'static>>,
55            ___E,
56        > for DeviceProgramKeyRequest
57    where
58        ___E: ::fidl_next::Encoder + ?Sized,
59        DeviceProgramKeyRequest:
60            ::fidl_next::Encode<crate::wire::DeviceProgramKeyRequest<'static>, ___E>,
61    {
62        #[inline]
63        fn encode_option(
64            this: ::core::option::Option<Self>,
65            encoder: &mut ___E,
66            out: &mut ::core::mem::MaybeUninit<
67                ::fidl_next::wire::Box<'static, crate::wire::DeviceProgramKeyRequest<'static>>,
68            >,
69            _: (),
70        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
71            if let Some(inner) = this {
72                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
73                ::fidl_next::wire::Box::encode_present(out);
74            } else {
75                ::fidl_next::wire::Box::encode_absent(out);
76            }
77
78            Ok(())
79        }
80    }
81
82    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceProgramKeyRequest<'de>>
83        for DeviceProgramKeyRequest
84    {
85        #[inline]
86        fn from_wire(wire: crate::wire::DeviceProgramKeyRequest<'de>) -> Self {
87            Self {
88                wrapped_key: ::fidl_next::FromWire::from_wire(wire.wrapped_key),
89
90                data_unit_size: ::fidl_next::FromWire::from_wire(wire.data_unit_size),
91            }
92        }
93    }
94
95    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
96    pub struct DeviceDeriveRawSecretRequest {
97        pub wrapped_key: ::std::vec::Vec<u8>,
98    }
99
100    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceDeriveRawSecretRequest<'static>, ___E>
101        for DeviceDeriveRawSecretRequest
102    where
103        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
104        ___E: ::fidl_next::Encoder,
105        ___E: ::fidl_next::fuchsia::HandleEncoder,
106    {
107        #[inline]
108        fn encode(
109            self,
110            encoder_: &mut ___E,
111            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDeriveRawSecretRequest<'static>>,
112            _: (),
113        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
114            ::fidl_next::munge! {
115                let crate::wire::DeviceDeriveRawSecretRequest {
116                    wrapped_key,
117
118                } = out_;
119            }
120
121            ::fidl_next::Encode::encode(self.wrapped_key, encoder_, wrapped_key, (4294967295, ()))?;
122
123            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(wrapped_key.as_mut_ptr()) };
124            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
125
126            Ok(())
127        }
128    }
129
130    unsafe impl<___E>
131        ::fidl_next::EncodeOption<
132            ::fidl_next::wire::Box<'static, crate::wire::DeviceDeriveRawSecretRequest<'static>>,
133            ___E,
134        > for DeviceDeriveRawSecretRequest
135    where
136        ___E: ::fidl_next::Encoder + ?Sized,
137        DeviceDeriveRawSecretRequest:
138            ::fidl_next::Encode<crate::wire::DeviceDeriveRawSecretRequest<'static>, ___E>,
139    {
140        #[inline]
141        fn encode_option(
142            this: ::core::option::Option<Self>,
143            encoder: &mut ___E,
144            out: &mut ::core::mem::MaybeUninit<
145                ::fidl_next::wire::Box<'static, crate::wire::DeviceDeriveRawSecretRequest<'static>>,
146            >,
147            _: (),
148        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
149            if let Some(inner) = this {
150                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
151                ::fidl_next::wire::Box::encode_present(out);
152            } else {
153                ::fidl_next::wire::Box::encode_absent(out);
154            }
155
156            Ok(())
157        }
158    }
159
160    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceDeriveRawSecretRequest<'de>>
161        for DeviceDeriveRawSecretRequest
162    {
163        #[inline]
164        fn from_wire(wire: crate::wire::DeviceDeriveRawSecretRequest<'de>) -> Self {
165            Self { wrapped_key: ::fidl_next::FromWire::from_wire(wire.wrapped_key) }
166        }
167    }
168
169    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
170    pub struct DeviceDeriveRawSecretResponse {
171        pub secret: ::std::vec::Vec<u8>,
172    }
173
174    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceDeriveRawSecretResponse<'static>, ___E>
175        for DeviceDeriveRawSecretResponse
176    where
177        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
178        ___E: ::fidl_next::Encoder,
179        ___E: ::fidl_next::fuchsia::HandleEncoder,
180    {
181        #[inline]
182        fn encode(
183            self,
184            encoder_: &mut ___E,
185            out_: &mut ::core::mem::MaybeUninit<
186                crate::wire::DeviceDeriveRawSecretResponse<'static>,
187            >,
188            _: (),
189        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
190            ::fidl_next::munge! {
191                let crate::wire::DeviceDeriveRawSecretResponse {
192                    secret,
193
194                } = out_;
195            }
196
197            ::fidl_next::Encode::encode(self.secret, encoder_, secret, (4294967295, ()))?;
198
199            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(secret.as_mut_ptr()) };
200            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
201
202            Ok(())
203        }
204    }
205
206    unsafe impl<___E>
207        ::fidl_next::EncodeOption<
208            ::fidl_next::wire::Box<'static, crate::wire::DeviceDeriveRawSecretResponse<'static>>,
209            ___E,
210        > for DeviceDeriveRawSecretResponse
211    where
212        ___E: ::fidl_next::Encoder + ?Sized,
213        DeviceDeriveRawSecretResponse:
214            ::fidl_next::Encode<crate::wire::DeviceDeriveRawSecretResponse<'static>, ___E>,
215    {
216        #[inline]
217        fn encode_option(
218            this: ::core::option::Option<Self>,
219            encoder: &mut ___E,
220            out: &mut ::core::mem::MaybeUninit<
221                ::fidl_next::wire::Box<
222                    'static,
223                    crate::wire::DeviceDeriveRawSecretResponse<'static>,
224                >,
225            >,
226            _: (),
227        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
228            if let Some(inner) = this {
229                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
230                ::fidl_next::wire::Box::encode_present(out);
231            } else {
232                ::fidl_next::wire::Box::encode_absent(out);
233            }
234
235            Ok(())
236        }
237    }
238
239    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceDeriveRawSecretResponse<'de>>
240        for DeviceDeriveRawSecretResponse
241    {
242        #[inline]
243        fn from_wire(wire: crate::wire::DeviceDeriveRawSecretResponse<'de>) -> Self {
244            Self { secret: ::fidl_next::FromWire::from_wire(wire.secret) }
245        }
246    }
247}
248
249pub mod wire {
250
251    pub use fidl_next_common_fuchsia_hardware_inlineencryption::wire::*;
252
253    /// The wire type corresponding to [`DeviceProgramKeyRequest`].
254    #[derive(Debug)]
255    #[repr(C)]
256    pub struct DeviceProgramKeyRequest<'de> {
257        pub wrapped_key: ::fidl_next::wire::Vector<'de, u8>,
258
259        pub data_unit_size: ::fidl_next::wire::Uint32,
260    }
261
262    static_assertions::const_assert_eq!(std::mem::size_of::<DeviceProgramKeyRequest<'_>>(), 24);
263    static_assertions::const_assert_eq!(std::mem::align_of::<DeviceProgramKeyRequest<'_>>(), 8);
264
265    static_assertions::const_assert_eq!(
266        std::mem::offset_of!(DeviceProgramKeyRequest<'_>, wrapped_key),
267        0
268    );
269
270    static_assertions::const_assert_eq!(
271        std::mem::offset_of!(DeviceProgramKeyRequest<'_>, data_unit_size),
272        16
273    );
274
275    impl ::fidl_next::Constrained for DeviceProgramKeyRequest<'_> {
276        type Constraint = ();
277
278        fn validate(
279            _: ::fidl_next::Slot<'_, Self>,
280            _: Self::Constraint,
281        ) -> Result<(), ::fidl_next::ValidationError> {
282            Ok(())
283        }
284    }
285
286    unsafe impl ::fidl_next::Wire for DeviceProgramKeyRequest<'static> {
287        type Narrowed<'de> = DeviceProgramKeyRequest<'de>;
288
289        #[inline]
290        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
291            ::fidl_next::munge! {
292                let Self {
293                    wrapped_key,
294                    data_unit_size,
295
296                } = &mut *out_;
297            }
298
299            ::fidl_next::Wire::zero_padding(wrapped_key);
300
301            ::fidl_next::Wire::zero_padding(data_unit_size);
302
303            unsafe {
304                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
305            }
306        }
307    }
308
309    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceProgramKeyRequest<'de>
310    where
311        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
312        ___D: ::fidl_next::Decoder<'de>,
313        ___D: ::fidl_next::fuchsia::HandleDecoder,
314    {
315        fn decode(
316            slot_: ::fidl_next::Slot<'_, Self>,
317            decoder_: &mut ___D,
318            _: (),
319        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
320            if slot_.as_bytes()[20..24] != [0u8; 4] {
321                return Err(::fidl_next::DecodeError::InvalidPadding);
322            }
323
324            ::fidl_next::munge! {
325                let Self {
326                    mut wrapped_key,
327                    mut data_unit_size,
328
329                } = slot_;
330            }
331
332            let _field = wrapped_key.as_mut();
333            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
334            ::fidl_next::Decode::decode(wrapped_key.as_mut(), decoder_, (4294967295, ()))?;
335
336            let _field = data_unit_size.as_mut();
337
338            ::fidl_next::Decode::decode(data_unit_size.as_mut(), decoder_, ())?;
339
340            Ok(())
341        }
342    }
343
344    impl<'de> ::fidl_next::IntoNatural for DeviceProgramKeyRequest<'de> {
345        type Natural = crate::natural::DeviceProgramKeyRequest;
346    }
347
348    /// The wire type corresponding to [`DeviceDeriveRawSecretRequest`].
349    #[derive(Debug)]
350    #[repr(C)]
351    pub struct DeviceDeriveRawSecretRequest<'de> {
352        pub wrapped_key: ::fidl_next::wire::Vector<'de, u8>,
353    }
354
355    static_assertions::const_assert_eq!(
356        std::mem::size_of::<DeviceDeriveRawSecretRequest<'_>>(),
357        16
358    );
359    static_assertions::const_assert_eq!(
360        std::mem::align_of::<DeviceDeriveRawSecretRequest<'_>>(),
361        8
362    );
363
364    static_assertions::const_assert_eq!(
365        std::mem::offset_of!(DeviceDeriveRawSecretRequest<'_>, wrapped_key),
366        0
367    );
368
369    impl ::fidl_next::Constrained for DeviceDeriveRawSecretRequest<'_> {
370        type Constraint = ();
371
372        fn validate(
373            _: ::fidl_next::Slot<'_, Self>,
374            _: Self::Constraint,
375        ) -> Result<(), ::fidl_next::ValidationError> {
376            Ok(())
377        }
378    }
379
380    unsafe impl ::fidl_next::Wire for DeviceDeriveRawSecretRequest<'static> {
381        type Narrowed<'de> = DeviceDeriveRawSecretRequest<'de>;
382
383        #[inline]
384        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
385            ::fidl_next::munge! {
386                let Self {
387                    wrapped_key,
388
389                } = &mut *out_;
390            }
391
392            ::fidl_next::Wire::zero_padding(wrapped_key);
393        }
394    }
395
396    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceDeriveRawSecretRequest<'de>
397    where
398        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
399        ___D: ::fidl_next::Decoder<'de>,
400        ___D: ::fidl_next::fuchsia::HandleDecoder,
401    {
402        fn decode(
403            slot_: ::fidl_next::Slot<'_, Self>,
404            decoder_: &mut ___D,
405            _: (),
406        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
407            ::fidl_next::munge! {
408                let Self {
409                    mut wrapped_key,
410
411                } = slot_;
412            }
413
414            let _field = wrapped_key.as_mut();
415            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
416            ::fidl_next::Decode::decode(wrapped_key.as_mut(), decoder_, (4294967295, ()))?;
417
418            Ok(())
419        }
420    }
421
422    impl<'de> ::fidl_next::IntoNatural for DeviceDeriveRawSecretRequest<'de> {
423        type Natural = crate::natural::DeviceDeriveRawSecretRequest;
424    }
425
426    /// The wire type corresponding to [`DeviceDeriveRawSecretResponse`].
427    #[derive(Debug)]
428    #[repr(C)]
429    pub struct DeviceDeriveRawSecretResponse<'de> {
430        pub secret: ::fidl_next::wire::Vector<'de, u8>,
431    }
432
433    static_assertions::const_assert_eq!(
434        std::mem::size_of::<DeviceDeriveRawSecretResponse<'_>>(),
435        16
436    );
437    static_assertions::const_assert_eq!(
438        std::mem::align_of::<DeviceDeriveRawSecretResponse<'_>>(),
439        8
440    );
441
442    static_assertions::const_assert_eq!(
443        std::mem::offset_of!(DeviceDeriveRawSecretResponse<'_>, secret),
444        0
445    );
446
447    impl ::fidl_next::Constrained for DeviceDeriveRawSecretResponse<'_> {
448        type Constraint = ();
449
450        fn validate(
451            _: ::fidl_next::Slot<'_, Self>,
452            _: Self::Constraint,
453        ) -> Result<(), ::fidl_next::ValidationError> {
454            Ok(())
455        }
456    }
457
458    unsafe impl ::fidl_next::Wire for DeviceDeriveRawSecretResponse<'static> {
459        type Narrowed<'de> = DeviceDeriveRawSecretResponse<'de>;
460
461        #[inline]
462        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
463            ::fidl_next::munge! {
464                let Self {
465                    secret,
466
467                } = &mut *out_;
468            }
469
470            ::fidl_next::Wire::zero_padding(secret);
471        }
472    }
473
474    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceDeriveRawSecretResponse<'de>
475    where
476        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
477        ___D: ::fidl_next::Decoder<'de>,
478        ___D: ::fidl_next::fuchsia::HandleDecoder,
479    {
480        fn decode(
481            slot_: ::fidl_next::Slot<'_, Self>,
482            decoder_: &mut ___D,
483            _: (),
484        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
485            ::fidl_next::munge! {
486                let Self {
487                    mut secret,
488
489                } = slot_;
490            }
491
492            let _field = secret.as_mut();
493            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
494            ::fidl_next::Decode::decode(secret.as_mut(), decoder_, (4294967295, ()))?;
495
496            Ok(())
497        }
498    }
499
500    impl<'de> ::fidl_next::IntoNatural for DeviceDeriveRawSecretResponse<'de> {
501        type Natural = crate::natural::DeviceDeriveRawSecretResponse;
502    }
503}
504
505pub mod wire_optional {
506
507    pub use fidl_next_common_fuchsia_hardware_inlineencryption::wire_optional::*;
508}
509
510pub mod generic {
511
512    pub use fidl_next_common_fuchsia_hardware_inlineencryption::generic::*;
513
514    /// The generic type corresponding to [`DeviceProgramKeyRequest`].
515    pub struct DeviceProgramKeyRequest<T0, T1> {
516        pub wrapped_key: T0,
517
518        pub data_unit_size: T1,
519    }
520
521    unsafe impl<___E, T0, T1>
522        ::fidl_next::Encode<crate::wire::DeviceProgramKeyRequest<'static>, ___E>
523        for DeviceProgramKeyRequest<T0, T1>
524    where
525        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
526        ___E: ::fidl_next::Encoder,
527        ___E: ::fidl_next::fuchsia::HandleEncoder,
528        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
529        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
530    {
531        #[inline]
532        fn encode(
533            self,
534            encoder_: &mut ___E,
535            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceProgramKeyRequest<'static>>,
536            _: (),
537        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
538            ::fidl_next::munge! {
539                let crate::wire::DeviceProgramKeyRequest {
540                    wrapped_key,
541                    data_unit_size,
542
543                } = out_;
544            }
545
546            ::fidl_next::Encode::encode(self.wrapped_key, encoder_, wrapped_key, (4294967295, ()))?;
547
548            ::fidl_next::Encode::encode(self.data_unit_size, encoder_, data_unit_size, ())?;
549
550            Ok(())
551        }
552    }
553
554    /// The generic type corresponding to [`DeviceDeriveRawSecretRequest`].
555    pub struct DeviceDeriveRawSecretRequest<T0> {
556        pub wrapped_key: T0,
557    }
558
559    unsafe impl<___E, T0>
560        ::fidl_next::Encode<crate::wire::DeviceDeriveRawSecretRequest<'static>, ___E>
561        for DeviceDeriveRawSecretRequest<T0>
562    where
563        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
564        ___E: ::fidl_next::Encoder,
565        ___E: ::fidl_next::fuchsia::HandleEncoder,
566        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
567    {
568        #[inline]
569        fn encode(
570            self,
571            encoder_: &mut ___E,
572            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDeriveRawSecretRequest<'static>>,
573            _: (),
574        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
575            ::fidl_next::munge! {
576                let crate::wire::DeviceDeriveRawSecretRequest {
577                    wrapped_key,
578
579                } = out_;
580            }
581
582            ::fidl_next::Encode::encode(self.wrapped_key, encoder_, wrapped_key, (4294967295, ()))?;
583
584            Ok(())
585        }
586    }
587
588    /// The generic type corresponding to [`DeviceDeriveRawSecretResponse`].
589    pub struct DeviceDeriveRawSecretResponse<T0> {
590        pub secret: T0,
591    }
592
593    unsafe impl<___E, T0>
594        ::fidl_next::Encode<crate::wire::DeviceDeriveRawSecretResponse<'static>, ___E>
595        for DeviceDeriveRawSecretResponse<T0>
596    where
597        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
598        ___E: ::fidl_next::Encoder,
599        ___E: ::fidl_next::fuchsia::HandleEncoder,
600        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
601    {
602        #[inline]
603        fn encode(
604            self,
605            encoder_: &mut ___E,
606            out_: &mut ::core::mem::MaybeUninit<
607                crate::wire::DeviceDeriveRawSecretResponse<'static>,
608            >,
609            _: (),
610        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
611            ::fidl_next::munge! {
612                let crate::wire::DeviceDeriveRawSecretResponse {
613                    secret,
614
615                } = out_;
616            }
617
618            ::fidl_next::Encode::encode(self.secret, encoder_, secret, (4294967295, ()))?;
619
620            Ok(())
621        }
622    }
623}
624
625pub use self::natural::*;
626
627/// The type corresponding to the Device protocol.
628#[derive(PartialEq, Debug)]
629pub struct Device;
630
631impl ::fidl_next::Discoverable for Device {
632    const PROTOCOL_NAME: &'static str = "fuchsia.hardware.inlineencryption.Device";
633}
634
635#[cfg(target_os = "fuchsia")]
636impl ::fidl_next::HasTransport for Device {
637    type Transport = ::fidl_next::fuchsia::zx::Channel;
638}
639
640pub mod device {
641    pub mod prelude {
642        pub use crate::{
643            Device, DeviceClientHandler, DeviceLocalClientHandler, DeviceLocalServerHandler,
644            DeviceServerHandler, device,
645        };
646
647        pub use crate::natural::DeviceDeriveRawSecretRequest;
648
649        pub use crate::natural::DeviceProgramKeyRequest;
650
651        pub use crate::natural::DeviceDeriveRawSecretResponse;
652
653        pub use crate::natural::DeviceProgramKeyResponse;
654    }
655
656    pub struct ProgramKey;
657
658    impl ::fidl_next::Method for ProgramKey {
659        const ORDINAL: u64 = 3476811648835288272;
660        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
661            ::fidl_next::protocol::Flexibility::Strict;
662
663        type Protocol = crate::Device;
664
665        type Request = crate::wire::DeviceProgramKeyRequest<'static>;
666    }
667
668    impl ::fidl_next::TwoWayMethod for ProgramKey {
669        type Response = ::fidl_next::wire::Result<
670            'static,
671            crate::wire::DeviceProgramKeyResponse,
672            ::fidl_next::wire::fuchsia::Status,
673        >;
674    }
675
676    impl<___R> ::fidl_next::Respond<___R> for ProgramKey {
677        type Output = ::core::result::Result<
678            crate::generic::DeviceProgramKeyResponse<___R>,
679            ::fidl_next::never::Never,
680        >;
681
682        fn respond(response: ___R) -> Self::Output {
683            ::core::result::Result::Ok(crate::generic::DeviceProgramKeyResponse { slot: response })
684        }
685    }
686
687    impl<___R> ::fidl_next::RespondErr<___R> for ProgramKey {
688        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
689
690        fn respond_err(response: ___R) -> Self::Output {
691            ::core::result::Result::Err(response)
692        }
693    }
694
695    pub struct DeriveRawSecret;
696
697    impl ::fidl_next::Method for DeriveRawSecret {
698        const ORDINAL: u64 = 6941052927753550292;
699        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
700            ::fidl_next::protocol::Flexibility::Strict;
701
702        type Protocol = crate::Device;
703
704        type Request = crate::wire::DeviceDeriveRawSecretRequest<'static>;
705    }
706
707    impl ::fidl_next::TwoWayMethod for DeriveRawSecret {
708        type Response = ::fidl_next::wire::Result<
709            'static,
710            crate::wire::DeviceDeriveRawSecretResponse<'static>,
711            ::fidl_next::wire::fuchsia::Status,
712        >;
713    }
714
715    impl<___R> ::fidl_next::Respond<___R> for DeriveRawSecret {
716        type Output = ::core::result::Result<
717            crate::generic::DeviceDeriveRawSecretResponse<___R>,
718            ::fidl_next::never::Never,
719        >;
720
721        fn respond(response: ___R) -> Self::Output {
722            ::core::result::Result::Ok(crate::generic::DeviceDeriveRawSecretResponse {
723                secret: response,
724            })
725        }
726    }
727
728    impl<___R> ::fidl_next::RespondErr<___R> for DeriveRawSecret {
729        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
730
731        fn respond_err(response: ___R) -> Self::Output {
732            ::core::result::Result::Err(response)
733        }
734    }
735
736    mod ___detail {
737        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Device
738        where
739            ___T: ::fidl_next::Transport,
740        {
741            type Client = DeviceClient<___T>;
742            type Server = DeviceServer<___T>;
743        }
744
745        /// The client for the `Device` protocol.
746        #[repr(transparent)]
747        pub struct DeviceClient<___T: ::fidl_next::Transport> {
748            #[allow(dead_code)]
749            client: ::fidl_next::protocol::Client<___T>,
750        }
751
752        impl<___T> DeviceClient<___T>
753        where
754            ___T: ::fidl_next::Transport,
755        {
756            #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
757            pub fn program_key(
758                &self,
759
760                wrapped_key: impl ::fidl_next::Encode<
761                    ::fidl_next::wire::Vector<'static, u8>,
762                    <___T as ::fidl_next::Transport>::SendBuffer,
763                >,
764
765                data_unit_size: impl ::fidl_next::Encode<
766                    ::fidl_next::wire::Uint32,
767                    <___T as ::fidl_next::Transport>::SendBuffer,
768                >,
769            ) -> ::fidl_next::TwoWayFuture<'_, super::ProgramKey, ___T>
770            where
771                <___T as ::fidl_next::Transport>::SendBuffer:
772                    ::fidl_next::encoder::InternalHandleEncoder,
773                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
774                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
775            {
776                self.program_key_with(crate::generic::DeviceProgramKeyRequest {
777                    wrapped_key,
778
779                    data_unit_size,
780                })
781            }
782
783            #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
784            pub fn program_key_with<___R>(
785                &self,
786                request: ___R,
787            ) -> ::fidl_next::TwoWayFuture<'_, super::ProgramKey, ___T>
788            where
789                ___R: ::fidl_next::Encode<
790                        crate::wire::DeviceProgramKeyRequest<'static>,
791                        <___T as ::fidl_next::Transport>::SendBuffer,
792                    >,
793            {
794                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
795                    3476811648835288272,
796                    <super::ProgramKey as ::fidl_next::Method>::FLEXIBILITY,
797                    request,
798                ))
799            }
800
801            #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
802            pub fn derive_raw_secret(
803                &self,
804
805                wrapped_key: impl ::fidl_next::Encode<
806                    ::fidl_next::wire::Vector<'static, u8>,
807                    <___T as ::fidl_next::Transport>::SendBuffer,
808                >,
809            ) -> ::fidl_next::TwoWayFuture<'_, super::DeriveRawSecret, ___T>
810            where
811                <___T as ::fidl_next::Transport>::SendBuffer:
812                    ::fidl_next::encoder::InternalHandleEncoder,
813                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
814                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
815            {
816                self.derive_raw_secret_with(crate::generic::DeviceDeriveRawSecretRequest {
817                    wrapped_key,
818                })
819            }
820
821            #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
822            pub fn derive_raw_secret_with<___R>(
823                &self,
824                request: ___R,
825            ) -> ::fidl_next::TwoWayFuture<'_, super::DeriveRawSecret, ___T>
826            where
827                ___R: ::fidl_next::Encode<
828                        crate::wire::DeviceDeriveRawSecretRequest<'static>,
829                        <___T as ::fidl_next::Transport>::SendBuffer,
830                    >,
831            {
832                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
833                    6941052927753550292,
834                    <super::DeriveRawSecret as ::fidl_next::Method>::FLEXIBILITY,
835                    request,
836                ))
837            }
838        }
839
840        /// The server for the `Device` protocol.
841        #[repr(transparent)]
842        pub struct DeviceServer<___T: ::fidl_next::Transport> {
843            server: ::fidl_next::protocol::Server<___T>,
844        }
845
846        impl<___T> DeviceServer<___T> where ___T: ::fidl_next::Transport {}
847    }
848}
849
850#[diagnostic::on_unimplemented(
851    note = "If {Self} implements the non-local DeviceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
852)]
853
854/// A client handler for the Device protocol.
855///
856/// See [`Device`] for more details.
857pub trait DeviceLocalClientHandler<
858    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
859    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
860>
861{
862}
863
864impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Device
865where
866    ___H: DeviceLocalClientHandler<___T>,
867    ___T: ::fidl_next::Transport,
868{
869    async fn on_event(
870        handler: &mut ___H,
871        mut message: ::fidl_next::Message<___T>,
872    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
873        match *message.header().ordinal {
874            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
875        }
876    }
877}
878
879#[diagnostic::on_unimplemented(
880    note = "If {Self} implements the non-local DeviceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
881)]
882
883/// A server handler for the Device protocol.
884///
885/// See [`Device`] for more details.
886pub trait DeviceLocalServerHandler<
887    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
888    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
889>
890{
891    #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
892    fn program_key(
893        &mut self,
894
895        request: ::fidl_next::Request<device::ProgramKey, ___T>,
896
897        responder: ::fidl_next::Responder<device::ProgramKey, ___T>,
898    ) -> impl ::core::future::Future<Output = ()>;
899
900    #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
901    fn derive_raw_secret(
902        &mut self,
903
904        request: ::fidl_next::Request<device::DeriveRawSecret, ___T>,
905
906        responder: ::fidl_next::Responder<device::DeriveRawSecret, ___T>,
907    ) -> impl ::core::future::Future<Output = ()>;
908}
909
910impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Device
911where
912    ___H: DeviceLocalServerHandler<___T>,
913    ___T: ::fidl_next::Transport,
914    for<'de> crate::wire::DeviceProgramKeyRequest<'de>: ::fidl_next::Decode<
915            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
916            Constraint = (),
917        >,
918    for<'de> crate::wire::DeviceDeriveRawSecretRequest<'de>: ::fidl_next::Decode<
919            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
920            Constraint = (),
921        >,
922{
923    async fn on_one_way(
924        handler: &mut ___H,
925        mut message: ::fidl_next::Message<___T>,
926    ) -> ::core::result::Result<
927        (),
928        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
929    > {
930        match *message.header().ordinal {
931            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
932        }
933    }
934
935    async fn on_two_way(
936        handler: &mut ___H,
937        mut message: ::fidl_next::Message<___T>,
938        responder: ::fidl_next::protocol::Responder<___T>,
939    ) -> ::core::result::Result<
940        (),
941        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
942    > {
943        match *message.header().ordinal {
944            3476811648835288272 => {
945                let responder = ::fidl_next::Responder::from_untyped(responder);
946
947                match ::fidl_next::AsDecoderExt::into_decoded(message) {
948                    Ok(decoded) => {
949                        handler
950                            .program_key(::fidl_next::Request::from_decoded(decoded), responder)
951                            .await;
952                        Ok(())
953                    }
954                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
955                        ordinal: 3476811648835288272,
956                        error,
957                    }),
958                }
959            }
960
961            6941052927753550292 => {
962                let responder = ::fidl_next::Responder::from_untyped(responder);
963
964                match ::fidl_next::AsDecoderExt::into_decoded(message) {
965                    Ok(decoded) => {
966                        handler
967                            .derive_raw_secret(
968                                ::fidl_next::Request::from_decoded(decoded),
969                                responder,
970                            )
971                            .await;
972                        Ok(())
973                    }
974                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
975                        ordinal: 6941052927753550292,
976                        error,
977                    }),
978                }
979            }
980
981            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
982        }
983    }
984}
985
986/// A client handler for the Device protocol.
987///
988/// See [`Device`] for more details.
989pub trait DeviceClientHandler<
990    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
991    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
992>
993{
994}
995
996impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Device
997where
998    ___H: DeviceClientHandler<___T> + ::core::marker::Send,
999    ___T: ::fidl_next::Transport,
1000{
1001    async fn on_event(
1002        handler: &mut ___H,
1003        mut message: ::fidl_next::Message<___T>,
1004    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1005        match *message.header().ordinal {
1006            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1007        }
1008    }
1009}
1010
1011/// A server handler for the Device protocol.
1012///
1013/// See [`Device`] for more details.
1014pub trait DeviceServerHandler<
1015    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1016    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1017>
1018{
1019    #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1020    fn program_key(
1021        &mut self,
1022
1023        request: ::fidl_next::Request<device::ProgramKey, ___T>,
1024
1025        responder: ::fidl_next::Responder<device::ProgramKey, ___T>,
1026    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1027
1028    #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1029    fn derive_raw_secret(
1030        &mut self,
1031
1032        request: ::fidl_next::Request<device::DeriveRawSecret, ___T>,
1033
1034        responder: ::fidl_next::Responder<device::DeriveRawSecret, ___T>,
1035    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1036}
1037
1038impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Device
1039where
1040    ___H: DeviceServerHandler<___T> + ::core::marker::Send,
1041    ___T: ::fidl_next::Transport,
1042    for<'de> crate::wire::DeviceProgramKeyRequest<'de>: ::fidl_next::Decode<
1043            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1044            Constraint = (),
1045        >,
1046    for<'de> crate::wire::DeviceDeriveRawSecretRequest<'de>: ::fidl_next::Decode<
1047            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1048            Constraint = (),
1049        >,
1050{
1051    async fn on_one_way(
1052        handler: &mut ___H,
1053        mut message: ::fidl_next::Message<___T>,
1054    ) -> ::core::result::Result<
1055        (),
1056        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1057    > {
1058        match *message.header().ordinal {
1059            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1060        }
1061    }
1062
1063    async fn on_two_way(
1064        handler: &mut ___H,
1065        mut message: ::fidl_next::Message<___T>,
1066        responder: ::fidl_next::protocol::Responder<___T>,
1067    ) -> ::core::result::Result<
1068        (),
1069        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1070    > {
1071        match *message.header().ordinal {
1072            3476811648835288272 => {
1073                let responder = ::fidl_next::Responder::from_untyped(responder);
1074
1075                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1076                    Ok(decoded) => {
1077                        handler
1078                            .program_key(::fidl_next::Request::from_decoded(decoded), responder)
1079                            .await;
1080                        Ok(())
1081                    }
1082                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1083                        ordinal: 3476811648835288272,
1084                        error,
1085                    }),
1086                }
1087            }
1088
1089            6941052927753550292 => {
1090                let responder = ::fidl_next::Responder::from_untyped(responder);
1091
1092                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1093                    Ok(decoded) => {
1094                        handler
1095                            .derive_raw_secret(
1096                                ::fidl_next::Request::from_decoded(decoded),
1097                                responder,
1098                            )
1099                            .await;
1100                        Ok(())
1101                    }
1102                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1103                        ordinal: 6941052927753550292,
1104                        error,
1105                    }),
1106                }
1107            }
1108
1109            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1110        }
1111    }
1112}
1113
1114impl<___T> DeviceClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport
1115{}
1116
1117impl<___H, ___T> DeviceLocalClientHandler<___T> for ::fidl_next::Local<___H>
1118where
1119    ___H: DeviceClientHandler<___T>,
1120    ___T: ::fidl_next::Transport,
1121{
1122}
1123
1124impl<___H, ___T> DeviceLocalServerHandler<___T> for ::fidl_next::Local<___H>
1125where
1126    ___H: DeviceServerHandler<___T>,
1127    ___T: ::fidl_next::Transport,
1128{
1129    async fn program_key(
1130        &mut self,
1131
1132        request: ::fidl_next::Request<device::ProgramKey, ___T>,
1133
1134        responder: ::fidl_next::Responder<device::ProgramKey, ___T>,
1135    ) {
1136        ___H::program_key(&mut self.0, request, responder).await
1137    }
1138
1139    async fn derive_raw_secret(
1140        &mut self,
1141
1142        request: ::fidl_next::Request<device::DeriveRawSecret, ___T>,
1143
1144        responder: ::fidl_next::Responder<device::DeriveRawSecret, ___T>,
1145    ) {
1146        ___H::derive_raw_secret(&mut self.0, request, responder).await
1147    }
1148}
1149
1150/// The type corresponding to the DriverDevice protocol.
1151#[doc = " A driver transport variant of the `Device` protocol.\n"]
1152#[derive(PartialEq, Debug)]
1153pub struct DriverDevice;
1154
1155impl ::fidl_next::Discoverable for DriverDevice {
1156    const PROTOCOL_NAME: &'static str = "fuchsia.hardware.inlineencryption.DriverDevice";
1157}
1158
1159#[cfg(feature = "driver")]
1160impl ::fidl_next::HasTransport for DriverDevice {
1161    type Transport = ::fdf_fidl::DriverChannel;
1162}
1163
1164pub mod driver_device {
1165    pub mod prelude {
1166        pub use crate::{
1167            DriverDevice, DriverDeviceClientHandler, DriverDeviceLocalClientHandler,
1168            DriverDeviceLocalServerHandler, DriverDeviceServerHandler, driver_device,
1169        };
1170
1171        pub use crate::natural::DeviceDeriveRawSecretRequest;
1172
1173        pub use crate::natural::DeviceProgramKeyRequest;
1174
1175        pub use crate::natural::DeviceDeriveRawSecretResponse;
1176
1177        pub use crate::natural::DeviceProgramKeyResponse;
1178    }
1179
1180    pub struct ProgramKey;
1181
1182    impl ::fidl_next::Method for ProgramKey {
1183        const ORDINAL: u64 = 3476811648835288272;
1184        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1185            ::fidl_next::protocol::Flexibility::Strict;
1186
1187        type Protocol = crate::DriverDevice;
1188
1189        type Request = crate::wire::DeviceProgramKeyRequest<'static>;
1190    }
1191
1192    impl ::fidl_next::TwoWayMethod for ProgramKey {
1193        type Response = ::fidl_next::wire::Result<
1194            'static,
1195            crate::wire::DeviceProgramKeyResponse,
1196            ::fidl_next::wire::fuchsia::Status,
1197        >;
1198    }
1199
1200    impl<___R> ::fidl_next::Respond<___R> for ProgramKey {
1201        type Output = ::core::result::Result<
1202            crate::generic::DeviceProgramKeyResponse<___R>,
1203            ::fidl_next::never::Never,
1204        >;
1205
1206        fn respond(response: ___R) -> Self::Output {
1207            ::core::result::Result::Ok(crate::generic::DeviceProgramKeyResponse { slot: response })
1208        }
1209    }
1210
1211    impl<___R> ::fidl_next::RespondErr<___R> for ProgramKey {
1212        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1213
1214        fn respond_err(response: ___R) -> Self::Output {
1215            ::core::result::Result::Err(response)
1216        }
1217    }
1218
1219    pub struct DeriveRawSecret;
1220
1221    impl ::fidl_next::Method for DeriveRawSecret {
1222        const ORDINAL: u64 = 6941052927753550292;
1223        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1224            ::fidl_next::protocol::Flexibility::Strict;
1225
1226        type Protocol = crate::DriverDevice;
1227
1228        type Request = crate::wire::DeviceDeriveRawSecretRequest<'static>;
1229    }
1230
1231    impl ::fidl_next::TwoWayMethod for DeriveRawSecret {
1232        type Response = ::fidl_next::wire::Result<
1233            'static,
1234            crate::wire::DeviceDeriveRawSecretResponse<'static>,
1235            ::fidl_next::wire::fuchsia::Status,
1236        >;
1237    }
1238
1239    impl<___R> ::fidl_next::Respond<___R> for DeriveRawSecret {
1240        type Output = ::core::result::Result<
1241            crate::generic::DeviceDeriveRawSecretResponse<___R>,
1242            ::fidl_next::never::Never,
1243        >;
1244
1245        fn respond(response: ___R) -> Self::Output {
1246            ::core::result::Result::Ok(crate::generic::DeviceDeriveRawSecretResponse {
1247                secret: response,
1248            })
1249        }
1250    }
1251
1252    impl<___R> ::fidl_next::RespondErr<___R> for DeriveRawSecret {
1253        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1254
1255        fn respond_err(response: ___R) -> Self::Output {
1256            ::core::result::Result::Err(response)
1257        }
1258    }
1259
1260    mod ___detail {
1261        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DriverDevice
1262        where
1263            ___T: ::fidl_next::Transport,
1264        {
1265            type Client = DriverDeviceClient<___T>;
1266            type Server = DriverDeviceServer<___T>;
1267        }
1268
1269        /// The client for the `DriverDevice` protocol.
1270        #[repr(transparent)]
1271        pub struct DriverDeviceClient<___T: ::fidl_next::Transport> {
1272            #[allow(dead_code)]
1273            client: ::fidl_next::protocol::Client<___T>,
1274        }
1275
1276        impl<___T> DriverDeviceClient<___T>
1277        where
1278            ___T: ::fidl_next::Transport,
1279        {
1280            #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1281            pub fn program_key(
1282                &self,
1283
1284                wrapped_key: impl ::fidl_next::Encode<
1285                    ::fidl_next::wire::Vector<'static, u8>,
1286                    <___T as ::fidl_next::Transport>::SendBuffer,
1287                >,
1288
1289                data_unit_size: impl ::fidl_next::Encode<
1290                    ::fidl_next::wire::Uint32,
1291                    <___T as ::fidl_next::Transport>::SendBuffer,
1292                >,
1293            ) -> ::fidl_next::TwoWayFuture<'_, super::ProgramKey, ___T>
1294            where
1295                <___T as ::fidl_next::Transport>::SendBuffer:
1296                    ::fidl_next::encoder::InternalHandleEncoder,
1297                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1298                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1299            {
1300                self.program_key_with(crate::generic::DeviceProgramKeyRequest {
1301                    wrapped_key,
1302
1303                    data_unit_size,
1304                })
1305            }
1306
1307            #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1308            pub fn program_key_with<___R>(
1309                &self,
1310                request: ___R,
1311            ) -> ::fidl_next::TwoWayFuture<'_, super::ProgramKey, ___T>
1312            where
1313                ___R: ::fidl_next::Encode<
1314                        crate::wire::DeviceProgramKeyRequest<'static>,
1315                        <___T as ::fidl_next::Transport>::SendBuffer,
1316                    >,
1317            {
1318                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1319                    3476811648835288272,
1320                    <super::ProgramKey as ::fidl_next::Method>::FLEXIBILITY,
1321                    request,
1322                ))
1323            }
1324
1325            #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1326            pub fn derive_raw_secret(
1327                &self,
1328
1329                wrapped_key: impl ::fidl_next::Encode<
1330                    ::fidl_next::wire::Vector<'static, u8>,
1331                    <___T as ::fidl_next::Transport>::SendBuffer,
1332                >,
1333            ) -> ::fidl_next::TwoWayFuture<'_, super::DeriveRawSecret, ___T>
1334            where
1335                <___T as ::fidl_next::Transport>::SendBuffer:
1336                    ::fidl_next::encoder::InternalHandleEncoder,
1337                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1338                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1339            {
1340                self.derive_raw_secret_with(crate::generic::DeviceDeriveRawSecretRequest {
1341                    wrapped_key,
1342                })
1343            }
1344
1345            #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1346            pub fn derive_raw_secret_with<___R>(
1347                &self,
1348                request: ___R,
1349            ) -> ::fidl_next::TwoWayFuture<'_, super::DeriveRawSecret, ___T>
1350            where
1351                ___R: ::fidl_next::Encode<
1352                        crate::wire::DeviceDeriveRawSecretRequest<'static>,
1353                        <___T as ::fidl_next::Transport>::SendBuffer,
1354                    >,
1355            {
1356                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1357                    6941052927753550292,
1358                    <super::DeriveRawSecret as ::fidl_next::Method>::FLEXIBILITY,
1359                    request,
1360                ))
1361            }
1362        }
1363
1364        /// The server for the `DriverDevice` protocol.
1365        #[repr(transparent)]
1366        pub struct DriverDeviceServer<___T: ::fidl_next::Transport> {
1367            server: ::fidl_next::protocol::Server<___T>,
1368        }
1369
1370        impl<___T> DriverDeviceServer<___T> where ___T: ::fidl_next::Transport {}
1371    }
1372}
1373
1374#[diagnostic::on_unimplemented(
1375    note = "If {Self} implements the non-local DriverDeviceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1376)]
1377
1378/// A client handler for the DriverDevice protocol.
1379///
1380/// See [`DriverDevice`] for more details.
1381pub trait DriverDeviceLocalClientHandler<
1382    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
1383    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
1384>
1385{
1386}
1387
1388impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DriverDevice
1389where
1390    ___H: DriverDeviceLocalClientHandler<___T>,
1391    ___T: ::fidl_next::Transport,
1392{
1393    async fn on_event(
1394        handler: &mut ___H,
1395        mut message: ::fidl_next::Message<___T>,
1396    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1397        match *message.header().ordinal {
1398            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1399        }
1400    }
1401}
1402
1403#[diagnostic::on_unimplemented(
1404    note = "If {Self} implements the non-local DriverDeviceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1405)]
1406
1407/// A server handler for the DriverDevice protocol.
1408///
1409/// See [`DriverDevice`] for more details.
1410pub trait DriverDeviceLocalServerHandler<
1411    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
1412    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
1413>
1414{
1415    #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1416    fn program_key(
1417        &mut self,
1418
1419        request: ::fidl_next::Request<driver_device::ProgramKey, ___T>,
1420
1421        responder: ::fidl_next::Responder<driver_device::ProgramKey, ___T>,
1422    ) -> impl ::core::future::Future<Output = ()>;
1423
1424    #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1425    fn derive_raw_secret(
1426        &mut self,
1427
1428        request: ::fidl_next::Request<driver_device::DeriveRawSecret, ___T>,
1429
1430        responder: ::fidl_next::Responder<driver_device::DeriveRawSecret, ___T>,
1431    ) -> impl ::core::future::Future<Output = ()>;
1432}
1433
1434impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DriverDevice
1435where
1436    ___H: DriverDeviceLocalServerHandler<___T>,
1437    ___T: ::fidl_next::Transport,
1438    for<'de> crate::wire::DeviceProgramKeyRequest<'de>: ::fidl_next::Decode<
1439            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1440            Constraint = (),
1441        >,
1442    for<'de> crate::wire::DeviceDeriveRawSecretRequest<'de>: ::fidl_next::Decode<
1443            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1444            Constraint = (),
1445        >,
1446{
1447    async fn on_one_way(
1448        handler: &mut ___H,
1449        mut message: ::fidl_next::Message<___T>,
1450    ) -> ::core::result::Result<
1451        (),
1452        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1453    > {
1454        match *message.header().ordinal {
1455            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1456        }
1457    }
1458
1459    async fn on_two_way(
1460        handler: &mut ___H,
1461        mut message: ::fidl_next::Message<___T>,
1462        responder: ::fidl_next::protocol::Responder<___T>,
1463    ) -> ::core::result::Result<
1464        (),
1465        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1466    > {
1467        match *message.header().ordinal {
1468            3476811648835288272 => {
1469                let responder = ::fidl_next::Responder::from_untyped(responder);
1470
1471                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1472                    Ok(decoded) => {
1473                        handler
1474                            .program_key(::fidl_next::Request::from_decoded(decoded), responder)
1475                            .await;
1476                        Ok(())
1477                    }
1478                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1479                        ordinal: 3476811648835288272,
1480                        error,
1481                    }),
1482                }
1483            }
1484
1485            6941052927753550292 => {
1486                let responder = ::fidl_next::Responder::from_untyped(responder);
1487
1488                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1489                    Ok(decoded) => {
1490                        handler
1491                            .derive_raw_secret(
1492                                ::fidl_next::Request::from_decoded(decoded),
1493                                responder,
1494                            )
1495                            .await;
1496                        Ok(())
1497                    }
1498                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1499                        ordinal: 6941052927753550292,
1500                        error,
1501                    }),
1502                }
1503            }
1504
1505            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1506        }
1507    }
1508}
1509
1510/// A client handler for the DriverDevice protocol.
1511///
1512/// See [`DriverDevice`] for more details.
1513pub trait DriverDeviceClientHandler<
1514    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
1515    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
1516>
1517{
1518}
1519
1520impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DriverDevice
1521where
1522    ___H: DriverDeviceClientHandler<___T> + ::core::marker::Send,
1523    ___T: ::fidl_next::Transport,
1524{
1525    async fn on_event(
1526        handler: &mut ___H,
1527        mut message: ::fidl_next::Message<___T>,
1528    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1529        match *message.header().ordinal {
1530            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1531        }
1532    }
1533}
1534
1535/// A server handler for the DriverDevice protocol.
1536///
1537/// See [`DriverDevice`] for more details.
1538pub trait DriverDeviceServerHandler<
1539    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
1540    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
1541>
1542{
1543    #[doc = " Programs the ephemerally wrapped `wrapped_key` into the inline encryption hardware in the\n next available `slot`. All slots programmed via the connection this method is called on\n will be evicted once the connection is dropped. It is not possible to evict individual keys\n (not for any technical reasons; a need for this has not yet arisen). `wrapped_key` must be\n a key wrapped by the inline encryption hardware (in the same session/boot) via a separate\n mechanism to this protocol.\n\n Returns\n - ZX_ERR_NO_RESOURCES if there are no available key slots.\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1544    fn program_key(
1545        &mut self,
1546
1547        request: ::fidl_next::Request<driver_device::ProgramKey, ___T>,
1548
1549        responder: ::fidl_next::Responder<driver_device::ProgramKey, ___T>,
1550    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1551
1552    #[doc = " Derives a raw software secret from the ephemerally wrapped `wrapped_key`. `wrapped_key`\n must be a key wrapped by the inline encryption hardware (in the same session/boot) via a\n separate mechanism to this protocol. The returned secret can be used for non-inline\n cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered\n by inline encryption.\n Returns\n - ZX_ERR_INVALID_ARGS if `wrapped_key` is not the expected size or if the `wrapped_key`\n   fails authentication (e.g. wrapped_key is from a previous boot).\n - ZX_ERR_TIMED_OUT if the operation times out.\n - ZX_ERR_INTERNAL if the operation failed for any other reason.\n"]
1553    fn derive_raw_secret(
1554        &mut self,
1555
1556        request: ::fidl_next::Request<driver_device::DeriveRawSecret, ___T>,
1557
1558        responder: ::fidl_next::Responder<driver_device::DeriveRawSecret, ___T>,
1559    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1560}
1561
1562impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DriverDevice
1563where
1564    ___H: DriverDeviceServerHandler<___T> + ::core::marker::Send,
1565    ___T: ::fidl_next::Transport,
1566    for<'de> crate::wire::DeviceProgramKeyRequest<'de>: ::fidl_next::Decode<
1567            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1568            Constraint = (),
1569        >,
1570    for<'de> crate::wire::DeviceDeriveRawSecretRequest<'de>: ::fidl_next::Decode<
1571            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1572            Constraint = (),
1573        >,
1574{
1575    async fn on_one_way(
1576        handler: &mut ___H,
1577        mut message: ::fidl_next::Message<___T>,
1578    ) -> ::core::result::Result<
1579        (),
1580        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1581    > {
1582        match *message.header().ordinal {
1583            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1584        }
1585    }
1586
1587    async fn on_two_way(
1588        handler: &mut ___H,
1589        mut message: ::fidl_next::Message<___T>,
1590        responder: ::fidl_next::protocol::Responder<___T>,
1591    ) -> ::core::result::Result<
1592        (),
1593        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1594    > {
1595        match *message.header().ordinal {
1596            3476811648835288272 => {
1597                let responder = ::fidl_next::Responder::from_untyped(responder);
1598
1599                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1600                    Ok(decoded) => {
1601                        handler
1602                            .program_key(::fidl_next::Request::from_decoded(decoded), responder)
1603                            .await;
1604                        Ok(())
1605                    }
1606                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1607                        ordinal: 3476811648835288272,
1608                        error,
1609                    }),
1610                }
1611            }
1612
1613            6941052927753550292 => {
1614                let responder = ::fidl_next::Responder::from_untyped(responder);
1615
1616                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1617                    Ok(decoded) => {
1618                        handler
1619                            .derive_raw_secret(
1620                                ::fidl_next::Request::from_decoded(decoded),
1621                                responder,
1622                            )
1623                            .await;
1624                        Ok(())
1625                    }
1626                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1627                        ordinal: 6941052927753550292,
1628                        error,
1629                    }),
1630                }
1631            }
1632
1633            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
1634        }
1635    }
1636}
1637
1638impl<___T> DriverDeviceClientHandler<___T> for ::fidl_next::IgnoreEvents where
1639    ___T: ::fidl_next::Transport
1640{
1641}
1642
1643impl<___H, ___T> DriverDeviceLocalClientHandler<___T> for ::fidl_next::Local<___H>
1644where
1645    ___H: DriverDeviceClientHandler<___T>,
1646    ___T: ::fidl_next::Transport,
1647{
1648}
1649
1650impl<___H, ___T> DriverDeviceLocalServerHandler<___T> for ::fidl_next::Local<___H>
1651where
1652    ___H: DriverDeviceServerHandler<___T>,
1653    ___T: ::fidl_next::Transport,
1654{
1655    async fn program_key(
1656        &mut self,
1657
1658        request: ::fidl_next::Request<driver_device::ProgramKey, ___T>,
1659
1660        responder: ::fidl_next::Responder<driver_device::ProgramKey, ___T>,
1661    ) {
1662        ___H::program_key(&mut self.0, request, responder).await
1663    }
1664
1665    async fn derive_raw_secret(
1666        &mut self,
1667
1668        request: ::fidl_next::Request<driver_device::DeriveRawSecret, ___T>,
1669
1670        responder: ::fidl_next::Responder<driver_device::DeriveRawSecret, ___T>,
1671    ) {
1672        ___H::derive_raw_secret(&mut self.0, request, responder).await
1673    }
1674}
1675
1676pub use fidl_next_common_fuchsia_hardware_inlineencryption::*;