1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_hardware_block_encrypted_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub struct DeviceManagerMarker;
16
17impl fidl::endpoints::ProtocolMarker for DeviceManagerMarker {
18 type Proxy = DeviceManagerProxy;
19 type RequestStream = DeviceManagerRequestStream;
20 #[cfg(target_os = "fuchsia")]
21 type SynchronousProxy = DeviceManagerSynchronousProxy;
22
23 const DEBUG_NAME: &'static str = "(anonymous) DeviceManager";
24}
25
26pub trait DeviceManagerProxyInterface: Send + Sync {
27 type FormatResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
28 fn r#format(&self, key: &[u8], slot: u8) -> Self::FormatResponseFut;
29 type UnsealResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
30 fn r#unseal(&self, key: &[u8], slot: u8) -> Self::UnsealResponseFut;
31 type SealResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
32 fn r#seal(&self) -> Self::SealResponseFut;
33 type ShredResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
34 fn r#shred(&self) -> Self::ShredResponseFut;
35}
36#[derive(Debug)]
37#[cfg(target_os = "fuchsia")]
38pub struct DeviceManagerSynchronousProxy {
39 client: fidl::client::sync::Client,
40}
41
42#[cfg(target_os = "fuchsia")]
43impl fidl::endpoints::SynchronousProxy for DeviceManagerSynchronousProxy {
44 type Proxy = DeviceManagerProxy;
45 type Protocol = DeviceManagerMarker;
46
47 fn from_channel(inner: fidl::Channel) -> Self {
48 Self::new(inner)
49 }
50
51 fn into_channel(self) -> fidl::Channel {
52 self.client.into_channel()
53 }
54
55 fn as_channel(&self) -> &fidl::Channel {
56 self.client.as_channel()
57 }
58}
59
60#[cfg(target_os = "fuchsia")]
61impl DeviceManagerSynchronousProxy {
62 pub fn new(channel: fidl::Channel) -> Self {
63 let protocol_name = <DeviceManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
64 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
65 }
66
67 pub fn into_channel(self) -> fidl::Channel {
68 self.client.into_channel()
69 }
70
71 pub fn wait_for_event(
74 &self,
75 deadline: zx::MonotonicInstant,
76 ) -> Result<DeviceManagerEvent, fidl::Error> {
77 DeviceManagerEvent::decode(self.client.wait_for_event(deadline)?)
78 }
79
80 pub fn r#format(
85 &self,
86 mut key: &[u8],
87 mut slot: u8,
88 ___deadline: zx::MonotonicInstant,
89 ) -> Result<i32, fidl::Error> {
90 let _response =
91 self.client.send_query::<DeviceManagerFormatRequest, DeviceManagerFormatResponse>(
92 (key, slot),
93 0x5d10415465425f82,
94 fidl::encoding::DynamicFlags::empty(),
95 ___deadline,
96 )?;
97 Ok(_response.status)
98 }
99
100 pub fn r#unseal(
110 &self,
111 mut key: &[u8],
112 mut slot: u8,
113 ___deadline: zx::MonotonicInstant,
114 ) -> Result<i32, fidl::Error> {
115 let _response =
116 self.client.send_query::<DeviceManagerUnsealRequest, DeviceManagerUnsealResponse>(
117 (key, slot),
118 0x170f834d39ed94fb,
119 fidl::encoding::DynamicFlags::empty(),
120 ___deadline,
121 )?;
122 Ok(_response.status)
123 }
124
125 pub fn r#seal(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
131 let _response =
132 self.client.send_query::<fidl::encoding::EmptyPayload, DeviceManagerSealResponse>(
133 (),
134 0xe63c7aa7840fbf4,
135 fidl::encoding::DynamicFlags::empty(),
136 ___deadline,
137 )?;
138 Ok(_response.status)
139 }
140
141 pub fn r#shred(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
149 let _response =
150 self.client.send_query::<fidl::encoding::EmptyPayload, DeviceManagerShredResponse>(
151 (),
152 0x1fbff042770086c,
153 fidl::encoding::DynamicFlags::empty(),
154 ___deadline,
155 )?;
156 Ok(_response.status)
157 }
158}
159
160#[cfg(target_os = "fuchsia")]
161impl From<DeviceManagerSynchronousProxy> for zx::Handle {
162 fn from(value: DeviceManagerSynchronousProxy) -> Self {
163 value.into_channel().into()
164 }
165}
166
167#[cfg(target_os = "fuchsia")]
168impl From<fidl::Channel> for DeviceManagerSynchronousProxy {
169 fn from(value: fidl::Channel) -> Self {
170 Self::new(value)
171 }
172}
173
174#[derive(Debug, Clone)]
175pub struct DeviceManagerProxy {
176 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
177}
178
179impl fidl::endpoints::Proxy for DeviceManagerProxy {
180 type Protocol = DeviceManagerMarker;
181
182 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
183 Self::new(inner)
184 }
185
186 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
187 self.client.into_channel().map_err(|client| Self { client })
188 }
189
190 fn as_channel(&self) -> &::fidl::AsyncChannel {
191 self.client.as_channel()
192 }
193}
194
195impl DeviceManagerProxy {
196 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
198 let protocol_name = <DeviceManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
199 Self { client: fidl::client::Client::new(channel, protocol_name) }
200 }
201
202 pub fn take_event_stream(&self) -> DeviceManagerEventStream {
208 DeviceManagerEventStream { event_receiver: self.client.take_event_receiver() }
209 }
210
211 pub fn r#format(
216 &self,
217 mut key: &[u8],
218 mut slot: u8,
219 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
220 DeviceManagerProxyInterface::r#format(self, key, slot)
221 }
222
223 pub fn r#unseal(
233 &self,
234 mut key: &[u8],
235 mut slot: u8,
236 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
237 DeviceManagerProxyInterface::r#unseal(self, key, slot)
238 }
239
240 pub fn r#seal(
246 &self,
247 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
248 DeviceManagerProxyInterface::r#seal(self)
249 }
250
251 pub fn r#shred(
259 &self,
260 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
261 DeviceManagerProxyInterface::r#shred(self)
262 }
263}
264
265impl DeviceManagerProxyInterface for DeviceManagerProxy {
266 type FormatResponseFut =
267 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
268 fn r#format(&self, mut key: &[u8], mut slot: u8) -> Self::FormatResponseFut {
269 fn _decode(
270 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
271 ) -> Result<i32, fidl::Error> {
272 let _response = fidl::client::decode_transaction_body::<
273 DeviceManagerFormatResponse,
274 fidl::encoding::DefaultFuchsiaResourceDialect,
275 0x5d10415465425f82,
276 >(_buf?)?;
277 Ok(_response.status)
278 }
279 self.client.send_query_and_decode::<DeviceManagerFormatRequest, i32>(
280 (key, slot),
281 0x5d10415465425f82,
282 fidl::encoding::DynamicFlags::empty(),
283 _decode,
284 )
285 }
286
287 type UnsealResponseFut =
288 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
289 fn r#unseal(&self, mut key: &[u8], mut slot: u8) -> Self::UnsealResponseFut {
290 fn _decode(
291 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
292 ) -> Result<i32, fidl::Error> {
293 let _response = fidl::client::decode_transaction_body::<
294 DeviceManagerUnsealResponse,
295 fidl::encoding::DefaultFuchsiaResourceDialect,
296 0x170f834d39ed94fb,
297 >(_buf?)?;
298 Ok(_response.status)
299 }
300 self.client.send_query_and_decode::<DeviceManagerUnsealRequest, i32>(
301 (key, slot),
302 0x170f834d39ed94fb,
303 fidl::encoding::DynamicFlags::empty(),
304 _decode,
305 )
306 }
307
308 type SealResponseFut =
309 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
310 fn r#seal(&self) -> Self::SealResponseFut {
311 fn _decode(
312 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
313 ) -> Result<i32, fidl::Error> {
314 let _response = fidl::client::decode_transaction_body::<
315 DeviceManagerSealResponse,
316 fidl::encoding::DefaultFuchsiaResourceDialect,
317 0xe63c7aa7840fbf4,
318 >(_buf?)?;
319 Ok(_response.status)
320 }
321 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
322 (),
323 0xe63c7aa7840fbf4,
324 fidl::encoding::DynamicFlags::empty(),
325 _decode,
326 )
327 }
328
329 type ShredResponseFut =
330 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
331 fn r#shred(&self) -> Self::ShredResponseFut {
332 fn _decode(
333 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
334 ) -> Result<i32, fidl::Error> {
335 let _response = fidl::client::decode_transaction_body::<
336 DeviceManagerShredResponse,
337 fidl::encoding::DefaultFuchsiaResourceDialect,
338 0x1fbff042770086c,
339 >(_buf?)?;
340 Ok(_response.status)
341 }
342 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
343 (),
344 0x1fbff042770086c,
345 fidl::encoding::DynamicFlags::empty(),
346 _decode,
347 )
348 }
349}
350
351pub struct DeviceManagerEventStream {
352 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
353}
354
355impl std::marker::Unpin for DeviceManagerEventStream {}
356
357impl futures::stream::FusedStream for DeviceManagerEventStream {
358 fn is_terminated(&self) -> bool {
359 self.event_receiver.is_terminated()
360 }
361}
362
363impl futures::Stream for DeviceManagerEventStream {
364 type Item = Result<DeviceManagerEvent, fidl::Error>;
365
366 fn poll_next(
367 mut self: std::pin::Pin<&mut Self>,
368 cx: &mut std::task::Context<'_>,
369 ) -> std::task::Poll<Option<Self::Item>> {
370 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
371 &mut self.event_receiver,
372 cx
373 )?) {
374 Some(buf) => std::task::Poll::Ready(Some(DeviceManagerEvent::decode(buf))),
375 None => std::task::Poll::Ready(None),
376 }
377 }
378}
379
380#[derive(Debug)]
381pub enum DeviceManagerEvent {}
382
383impl DeviceManagerEvent {
384 fn decode(
386 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
387 ) -> Result<DeviceManagerEvent, fidl::Error> {
388 let (bytes, _handles) = buf.split_mut();
389 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
390 debug_assert_eq!(tx_header.tx_id, 0);
391 match tx_header.ordinal {
392 _ => Err(fidl::Error::UnknownOrdinal {
393 ordinal: tx_header.ordinal,
394 protocol_name: <DeviceManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
395 }),
396 }
397 }
398}
399
400pub struct DeviceManagerRequestStream {
402 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
403 is_terminated: bool,
404}
405
406impl std::marker::Unpin for DeviceManagerRequestStream {}
407
408impl futures::stream::FusedStream for DeviceManagerRequestStream {
409 fn is_terminated(&self) -> bool {
410 self.is_terminated
411 }
412}
413
414impl fidl::endpoints::RequestStream for DeviceManagerRequestStream {
415 type Protocol = DeviceManagerMarker;
416 type ControlHandle = DeviceManagerControlHandle;
417
418 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
419 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
420 }
421
422 fn control_handle(&self) -> Self::ControlHandle {
423 DeviceManagerControlHandle { inner: self.inner.clone() }
424 }
425
426 fn into_inner(
427 self,
428 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
429 {
430 (self.inner, self.is_terminated)
431 }
432
433 fn from_inner(
434 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
435 is_terminated: bool,
436 ) -> Self {
437 Self { inner, is_terminated }
438 }
439}
440
441impl futures::Stream for DeviceManagerRequestStream {
442 type Item = Result<DeviceManagerRequest, fidl::Error>;
443
444 fn poll_next(
445 mut self: std::pin::Pin<&mut Self>,
446 cx: &mut std::task::Context<'_>,
447 ) -> std::task::Poll<Option<Self::Item>> {
448 let this = &mut *self;
449 if this.inner.check_shutdown(cx) {
450 this.is_terminated = true;
451 return std::task::Poll::Ready(None);
452 }
453 if this.is_terminated {
454 panic!("polled DeviceManagerRequestStream after completion");
455 }
456 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
457 |bytes, handles| {
458 match this.inner.channel().read_etc(cx, bytes, handles) {
459 std::task::Poll::Ready(Ok(())) => {}
460 std::task::Poll::Pending => return std::task::Poll::Pending,
461 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
462 this.is_terminated = true;
463 return std::task::Poll::Ready(None);
464 }
465 std::task::Poll::Ready(Err(e)) => {
466 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
467 e.into(),
468 ))))
469 }
470 }
471
472 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
474
475 std::task::Poll::Ready(Some(match header.ordinal {
476 0x5d10415465425f82 => {
477 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
478 let mut req = fidl::new_empty!(
479 DeviceManagerFormatRequest,
480 fidl::encoding::DefaultFuchsiaResourceDialect
481 );
482 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceManagerFormatRequest>(&header, _body_bytes, handles, &mut req)?;
483 let control_handle =
484 DeviceManagerControlHandle { inner: this.inner.clone() };
485 Ok(DeviceManagerRequest::Format {
486 key: req.key,
487 slot: req.slot,
488
489 responder: DeviceManagerFormatResponder {
490 control_handle: std::mem::ManuallyDrop::new(control_handle),
491 tx_id: header.tx_id,
492 },
493 })
494 }
495 0x170f834d39ed94fb => {
496 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
497 let mut req = fidl::new_empty!(
498 DeviceManagerUnsealRequest,
499 fidl::encoding::DefaultFuchsiaResourceDialect
500 );
501 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceManagerUnsealRequest>(&header, _body_bytes, handles, &mut req)?;
502 let control_handle =
503 DeviceManagerControlHandle { inner: this.inner.clone() };
504 Ok(DeviceManagerRequest::Unseal {
505 key: req.key,
506 slot: req.slot,
507
508 responder: DeviceManagerUnsealResponder {
509 control_handle: std::mem::ManuallyDrop::new(control_handle),
510 tx_id: header.tx_id,
511 },
512 })
513 }
514 0xe63c7aa7840fbf4 => {
515 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
516 let mut req = fidl::new_empty!(
517 fidl::encoding::EmptyPayload,
518 fidl::encoding::DefaultFuchsiaResourceDialect
519 );
520 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
521 let control_handle =
522 DeviceManagerControlHandle { inner: this.inner.clone() };
523 Ok(DeviceManagerRequest::Seal {
524 responder: DeviceManagerSealResponder {
525 control_handle: std::mem::ManuallyDrop::new(control_handle),
526 tx_id: header.tx_id,
527 },
528 })
529 }
530 0x1fbff042770086c => {
531 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
532 let mut req = fidl::new_empty!(
533 fidl::encoding::EmptyPayload,
534 fidl::encoding::DefaultFuchsiaResourceDialect
535 );
536 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
537 let control_handle =
538 DeviceManagerControlHandle { inner: this.inner.clone() };
539 Ok(DeviceManagerRequest::Shred {
540 responder: DeviceManagerShredResponder {
541 control_handle: std::mem::ManuallyDrop::new(control_handle),
542 tx_id: header.tx_id,
543 },
544 })
545 }
546 _ => Err(fidl::Error::UnknownOrdinal {
547 ordinal: header.ordinal,
548 protocol_name:
549 <DeviceManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
550 }),
551 }))
552 },
553 )
554 }
555}
556
557#[derive(Debug)]
564pub enum DeviceManagerRequest {
565 Format { key: Vec<u8>, slot: u8, responder: DeviceManagerFormatResponder },
570 Unseal { key: Vec<u8>, slot: u8, responder: DeviceManagerUnsealResponder },
580 Seal { responder: DeviceManagerSealResponder },
586 Shred { responder: DeviceManagerShredResponder },
594}
595
596impl DeviceManagerRequest {
597 #[allow(irrefutable_let_patterns)]
598 pub fn into_format(self) -> Option<(Vec<u8>, u8, DeviceManagerFormatResponder)> {
599 if let DeviceManagerRequest::Format { key, slot, responder } = self {
600 Some((key, slot, responder))
601 } else {
602 None
603 }
604 }
605
606 #[allow(irrefutable_let_patterns)]
607 pub fn into_unseal(self) -> Option<(Vec<u8>, u8, DeviceManagerUnsealResponder)> {
608 if let DeviceManagerRequest::Unseal { key, slot, responder } = self {
609 Some((key, slot, responder))
610 } else {
611 None
612 }
613 }
614
615 #[allow(irrefutable_let_patterns)]
616 pub fn into_seal(self) -> Option<(DeviceManagerSealResponder)> {
617 if let DeviceManagerRequest::Seal { responder } = self {
618 Some((responder))
619 } else {
620 None
621 }
622 }
623
624 #[allow(irrefutable_let_patterns)]
625 pub fn into_shred(self) -> Option<(DeviceManagerShredResponder)> {
626 if let DeviceManagerRequest::Shred { responder } = self {
627 Some((responder))
628 } else {
629 None
630 }
631 }
632
633 pub fn method_name(&self) -> &'static str {
635 match *self {
636 DeviceManagerRequest::Format { .. } => "format",
637 DeviceManagerRequest::Unseal { .. } => "unseal",
638 DeviceManagerRequest::Seal { .. } => "seal",
639 DeviceManagerRequest::Shred { .. } => "shred",
640 }
641 }
642}
643
644#[derive(Debug, Clone)]
645pub struct DeviceManagerControlHandle {
646 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
647}
648
649impl fidl::endpoints::ControlHandle for DeviceManagerControlHandle {
650 fn shutdown(&self) {
651 self.inner.shutdown()
652 }
653 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
654 self.inner.shutdown_with_epitaph(status)
655 }
656
657 fn is_closed(&self) -> bool {
658 self.inner.channel().is_closed()
659 }
660 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
661 self.inner.channel().on_closed()
662 }
663
664 #[cfg(target_os = "fuchsia")]
665 fn signal_peer(
666 &self,
667 clear_mask: zx::Signals,
668 set_mask: zx::Signals,
669 ) -> Result<(), zx_status::Status> {
670 use fidl::Peered;
671 self.inner.channel().signal_peer(clear_mask, set_mask)
672 }
673}
674
675impl DeviceManagerControlHandle {}
676
677#[must_use = "FIDL methods require a response to be sent"]
678#[derive(Debug)]
679pub struct DeviceManagerFormatResponder {
680 control_handle: std::mem::ManuallyDrop<DeviceManagerControlHandle>,
681 tx_id: u32,
682}
683
684impl std::ops::Drop for DeviceManagerFormatResponder {
688 fn drop(&mut self) {
689 self.control_handle.shutdown();
690 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
692 }
693}
694
695impl fidl::endpoints::Responder for DeviceManagerFormatResponder {
696 type ControlHandle = DeviceManagerControlHandle;
697
698 fn control_handle(&self) -> &DeviceManagerControlHandle {
699 &self.control_handle
700 }
701
702 fn drop_without_shutdown(mut self) {
703 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
705 std::mem::forget(self);
707 }
708}
709
710impl DeviceManagerFormatResponder {
711 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
715 let _result = self.send_raw(status);
716 if _result.is_err() {
717 self.control_handle.shutdown();
718 }
719 self.drop_without_shutdown();
720 _result
721 }
722
723 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
725 let _result = self.send_raw(status);
726 self.drop_without_shutdown();
727 _result
728 }
729
730 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
731 self.control_handle.inner.send::<DeviceManagerFormatResponse>(
732 (status,),
733 self.tx_id,
734 0x5d10415465425f82,
735 fidl::encoding::DynamicFlags::empty(),
736 )
737 }
738}
739
740#[must_use = "FIDL methods require a response to be sent"]
741#[derive(Debug)]
742pub struct DeviceManagerUnsealResponder {
743 control_handle: std::mem::ManuallyDrop<DeviceManagerControlHandle>,
744 tx_id: u32,
745}
746
747impl std::ops::Drop for DeviceManagerUnsealResponder {
751 fn drop(&mut self) {
752 self.control_handle.shutdown();
753 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
755 }
756}
757
758impl fidl::endpoints::Responder for DeviceManagerUnsealResponder {
759 type ControlHandle = DeviceManagerControlHandle;
760
761 fn control_handle(&self) -> &DeviceManagerControlHandle {
762 &self.control_handle
763 }
764
765 fn drop_without_shutdown(mut self) {
766 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
768 std::mem::forget(self);
770 }
771}
772
773impl DeviceManagerUnsealResponder {
774 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
778 let _result = self.send_raw(status);
779 if _result.is_err() {
780 self.control_handle.shutdown();
781 }
782 self.drop_without_shutdown();
783 _result
784 }
785
786 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
788 let _result = self.send_raw(status);
789 self.drop_without_shutdown();
790 _result
791 }
792
793 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
794 self.control_handle.inner.send::<DeviceManagerUnsealResponse>(
795 (status,),
796 self.tx_id,
797 0x170f834d39ed94fb,
798 fidl::encoding::DynamicFlags::empty(),
799 )
800 }
801}
802
803#[must_use = "FIDL methods require a response to be sent"]
804#[derive(Debug)]
805pub struct DeviceManagerSealResponder {
806 control_handle: std::mem::ManuallyDrop<DeviceManagerControlHandle>,
807 tx_id: u32,
808}
809
810impl std::ops::Drop for DeviceManagerSealResponder {
814 fn drop(&mut self) {
815 self.control_handle.shutdown();
816 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
818 }
819}
820
821impl fidl::endpoints::Responder for DeviceManagerSealResponder {
822 type ControlHandle = DeviceManagerControlHandle;
823
824 fn control_handle(&self) -> &DeviceManagerControlHandle {
825 &self.control_handle
826 }
827
828 fn drop_without_shutdown(mut self) {
829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
831 std::mem::forget(self);
833 }
834}
835
836impl DeviceManagerSealResponder {
837 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
841 let _result = self.send_raw(status);
842 if _result.is_err() {
843 self.control_handle.shutdown();
844 }
845 self.drop_without_shutdown();
846 _result
847 }
848
849 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
851 let _result = self.send_raw(status);
852 self.drop_without_shutdown();
853 _result
854 }
855
856 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
857 self.control_handle.inner.send::<DeviceManagerSealResponse>(
858 (status,),
859 self.tx_id,
860 0xe63c7aa7840fbf4,
861 fidl::encoding::DynamicFlags::empty(),
862 )
863 }
864}
865
866#[must_use = "FIDL methods require a response to be sent"]
867#[derive(Debug)]
868pub struct DeviceManagerShredResponder {
869 control_handle: std::mem::ManuallyDrop<DeviceManagerControlHandle>,
870 tx_id: u32,
871}
872
873impl std::ops::Drop for DeviceManagerShredResponder {
877 fn drop(&mut self) {
878 self.control_handle.shutdown();
879 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
881 }
882}
883
884impl fidl::endpoints::Responder for DeviceManagerShredResponder {
885 type ControlHandle = DeviceManagerControlHandle;
886
887 fn control_handle(&self) -> &DeviceManagerControlHandle {
888 &self.control_handle
889 }
890
891 fn drop_without_shutdown(mut self) {
892 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
894 std::mem::forget(self);
896 }
897}
898
899impl DeviceManagerShredResponder {
900 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
904 let _result = self.send_raw(status);
905 if _result.is_err() {
906 self.control_handle.shutdown();
907 }
908 self.drop_without_shutdown();
909 _result
910 }
911
912 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
914 let _result = self.send_raw(status);
915 self.drop_without_shutdown();
916 _result
917 }
918
919 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
920 self.control_handle.inner.send::<DeviceManagerShredResponse>(
921 (status,),
922 self.tx_id,
923 0x1fbff042770086c,
924 fidl::encoding::DynamicFlags::empty(),
925 )
926 }
927}
928
929mod internal {
930 use super::*;
931}