1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_sys2__common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14#[repr(C)]
15pub struct CrashIntrospectFindComponentByThreadKoidRequest {
16 pub thread_koid: u64,
17}
18
19impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
20 for CrashIntrospectFindComponentByThreadKoidRequest
21{
22}
23
24#[derive(Debug, PartialEq)]
25pub struct LifecycleControllerCreateInstanceRequest {
26 pub parent_moniker: String,
27 pub collection: fdomain_fuchsia_component_decl::CollectionRef,
28 pub decl: fdomain_fuchsia_component_decl::Child,
29 pub args: fdomain_fuchsia_component::CreateChildArgs,
30}
31
32impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
33 for LifecycleControllerCreateInstanceRequest
34{
35}
36
37#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38pub struct LifecycleControllerStartInstanceRequest {
39 pub moniker: String,
40 pub binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
41}
42
43impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
44 for LifecycleControllerStartInstanceRequest
45{
46}
47
48#[derive(Debug, PartialEq)]
49pub struct LifecycleControllerStartInstanceWithArgsRequest {
50 pub moniker: String,
51 pub binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
52 pub args: fdomain_fuchsia_component::StartChildArgs,
53}
54
55impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
56 for LifecycleControllerStartInstanceWithArgsRequest
57{
58}
59
60#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
61pub struct RealmQueryConnectToStorageAdminRequest {
62 pub moniker: String,
63 pub storage_name: String,
64 pub server_end: fdomain_client::fidl::ServerEnd<StorageAdminMarker>,
65}
66
67impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
68 for RealmQueryConnectToStorageAdminRequest
69{
70}
71
72#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
73pub struct RealmQueryOpenDirectoryRequest {
74 pub moniker: String,
75 pub dir_type: OpenDirType,
76 pub object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
77}
78
79impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
80 for RealmQueryOpenDirectoryRequest
81{
82}
83
84#[derive(Debug, PartialEq)]
85pub struct RealmQueryConstructNamespaceResponse {
86 pub namespace: Vec<fdomain_fuchsia_component_runner::ComponentNamespaceEntry>,
88}
89
90impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
91 for RealmQueryConstructNamespaceResponse
92{
93}
94
95#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
96pub struct RealmQueryGetAllInstancesResponse {
97 pub iterator: fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>,
98}
99
100impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
101 for RealmQueryGetAllInstancesResponse
102{
103}
104
105#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
106pub struct RealmQueryGetResolvedDeclarationResponse {
107 pub iterator: fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
108}
109
110impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
111 for RealmQueryGetResolvedDeclarationResponse
112{
113}
114
115#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
116pub struct RealmQueryResolveDeclarationResponse {
117 pub iterator: fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
118}
119
120impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
121 for RealmQueryResolveDeclarationResponse
122{
123}
124
125#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
126pub struct StorageAdminListStorageInRealmRequest {
127 pub relative_moniker: String,
128 pub iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
129}
130
131impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
132 for StorageAdminListStorageInRealmRequest
133{
134}
135
136#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137pub struct StorageAdminOpenComponentStorageByIdRequest {
138 pub id: String,
139 pub object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
140}
141
142impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
143 for StorageAdminOpenComponentStorageByIdRequest
144{
145}
146
147#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
148pub struct StorageAdminOpenStorageRequest {
149 pub relative_moniker: String,
150 pub object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
151}
152
153impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
154 for StorageAdminOpenStorageRequest
155{
156}
157
158#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
159pub struct BootControllerMarker;
160
161impl fdomain_client::fidl::ProtocolMarker for BootControllerMarker {
162 type Proxy = BootControllerProxy;
163 type RequestStream = BootControllerRequestStream;
164
165 const DEBUG_NAME: &'static str = "fuchsia.sys2.BootController";
166}
167impl fdomain_client::fidl::DiscoverableProtocolMarker for BootControllerMarker {}
168
169pub trait BootControllerProxyInterface: Send + Sync {
170 type NotifyResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
171 fn r#notify(&self) -> Self::NotifyResponseFut;
172}
173
174#[derive(Debug, Clone)]
175pub struct BootControllerProxy {
176 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
177}
178
179impl fdomain_client::fidl::Proxy for BootControllerProxy {
180 type Protocol = BootControllerMarker;
181
182 fn from_channel(inner: fdomain_client::Channel) -> Self {
183 Self::new(inner)
184 }
185
186 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
187 self.client.into_channel().map_err(|client| Self { client })
188 }
189
190 fn as_channel(&self) -> &fdomain_client::Channel {
191 self.client.as_channel()
192 }
193}
194
195impl BootControllerProxy {
196 pub fn new(channel: fdomain_client::Channel) -> Self {
198 let protocol_name =
199 <BootControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
200 Self { client: fidl::client::Client::new(channel, protocol_name) }
201 }
202
203 pub fn take_event_stream(&self) -> BootControllerEventStream {
209 BootControllerEventStream { event_receiver: self.client.take_event_receiver() }
210 }
211
212 pub fn r#notify(
213 &self,
214 ) -> fidl::client::QueryResponseFut<(), fdomain_client::fidl::FDomainResourceDialect> {
215 BootControllerProxyInterface::r#notify(self)
216 }
217}
218
219impl BootControllerProxyInterface for BootControllerProxy {
220 type NotifyResponseFut =
221 fidl::client::QueryResponseFut<(), fdomain_client::fidl::FDomainResourceDialect>;
222 fn r#notify(&self) -> Self::NotifyResponseFut {
223 fn _decode(
224 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
225 ) -> Result<(), fidl::Error> {
226 let _response = fidl::client::decode_transaction_body::<
227 fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
228 fdomain_client::fidl::FDomainResourceDialect,
229 0x55173ddd1d9ed8de,
230 >(_buf?)?
231 .into_result_fdomain::<BootControllerMarker>("notify")?;
232 Ok(_response)
233 }
234 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
235 (),
236 0x55173ddd1d9ed8de,
237 fidl::encoding::DynamicFlags::FLEXIBLE,
238 _decode,
239 )
240 }
241}
242
243pub struct BootControllerEventStream {
244 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
245}
246
247impl std::marker::Unpin for BootControllerEventStream {}
248
249impl futures::stream::FusedStream for BootControllerEventStream {
250 fn is_terminated(&self) -> bool {
251 self.event_receiver.is_terminated()
252 }
253}
254
255impl futures::Stream for BootControllerEventStream {
256 type Item = Result<BootControllerEvent, fidl::Error>;
257
258 fn poll_next(
259 mut self: std::pin::Pin<&mut Self>,
260 cx: &mut std::task::Context<'_>,
261 ) -> std::task::Poll<Option<Self::Item>> {
262 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
263 &mut self.event_receiver,
264 cx
265 )?) {
266 Some(buf) => std::task::Poll::Ready(Some(BootControllerEvent::decode(buf))),
267 None => std::task::Poll::Ready(None),
268 }
269 }
270}
271
272#[derive(Debug)]
273pub enum BootControllerEvent {
274 #[non_exhaustive]
275 _UnknownEvent {
276 ordinal: u64,
278 },
279}
280
281impl BootControllerEvent {
282 fn decode(
284 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
285 ) -> Result<BootControllerEvent, fidl::Error> {
286 let (bytes, _handles) = buf.split_mut();
287 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
288 debug_assert_eq!(tx_header.tx_id, 0);
289 match tx_header.ordinal {
290 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
291 Ok(BootControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
292 }
293 _ => Err(fidl::Error::UnknownOrdinal {
294 ordinal: tx_header.ordinal,
295 protocol_name:
296 <BootControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
297 }),
298 }
299 }
300}
301
302pub struct BootControllerRequestStream {
304 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
305 is_terminated: bool,
306}
307
308impl std::marker::Unpin for BootControllerRequestStream {}
309
310impl futures::stream::FusedStream for BootControllerRequestStream {
311 fn is_terminated(&self) -> bool {
312 self.is_terminated
313 }
314}
315
316impl fdomain_client::fidl::RequestStream for BootControllerRequestStream {
317 type Protocol = BootControllerMarker;
318 type ControlHandle = BootControllerControlHandle;
319
320 fn from_channel(channel: fdomain_client::Channel) -> Self {
321 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
322 }
323
324 fn control_handle(&self) -> Self::ControlHandle {
325 BootControllerControlHandle { inner: self.inner.clone() }
326 }
327
328 fn into_inner(
329 self,
330 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
331 {
332 (self.inner, self.is_terminated)
333 }
334
335 fn from_inner(
336 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
337 is_terminated: bool,
338 ) -> Self {
339 Self { inner, is_terminated }
340 }
341}
342
343impl futures::Stream for BootControllerRequestStream {
344 type Item = Result<BootControllerRequest, fidl::Error>;
345
346 fn poll_next(
347 mut self: std::pin::Pin<&mut Self>,
348 cx: &mut std::task::Context<'_>,
349 ) -> std::task::Poll<Option<Self::Item>> {
350 let this = &mut *self;
351 if this.inner.check_shutdown(cx) {
352 this.is_terminated = true;
353 return std::task::Poll::Ready(None);
354 }
355 if this.is_terminated {
356 panic!("polled BootControllerRequestStream after completion");
357 }
358 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
359 |bytes, handles| {
360 match this.inner.channel().read_etc(cx, bytes, handles) {
361 std::task::Poll::Ready(Ok(())) => {}
362 std::task::Poll::Pending => return std::task::Poll::Pending,
363 std::task::Poll::Ready(Err(None)) => {
364 this.is_terminated = true;
365 return std::task::Poll::Ready(None);
366 }
367 std::task::Poll::Ready(Err(Some(e))) => {
368 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
369 e.into(),
370 ))));
371 }
372 }
373
374 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
376
377 std::task::Poll::Ready(Some(match header.ordinal {
378 0x55173ddd1d9ed8de => {
379 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
380 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
381 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
382 let control_handle = BootControllerControlHandle {
383 inner: this.inner.clone(),
384 };
385 Ok(BootControllerRequest::Notify {
386 responder: BootControllerNotifyResponder {
387 control_handle: std::mem::ManuallyDrop::new(control_handle),
388 tx_id: header.tx_id,
389 },
390 })
391 }
392 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
393 Ok(BootControllerRequest::_UnknownMethod {
394 ordinal: header.ordinal,
395 control_handle: BootControllerControlHandle { inner: this.inner.clone() },
396 method_type: fidl::MethodType::OneWay,
397 })
398 }
399 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
400 this.inner.send_framework_err(
401 fidl::encoding::FrameworkErr::UnknownMethod,
402 header.tx_id,
403 header.ordinal,
404 header.dynamic_flags(),
405 (bytes, handles),
406 )?;
407 Ok(BootControllerRequest::_UnknownMethod {
408 ordinal: header.ordinal,
409 control_handle: BootControllerControlHandle { inner: this.inner.clone() },
410 method_type: fidl::MethodType::TwoWay,
411 })
412 }
413 _ => Err(fidl::Error::UnknownOrdinal {
414 ordinal: header.ordinal,
415 protocol_name: <BootControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
416 }),
417 }))
418 },
419 )
420 }
421}
422
423#[derive(Debug)]
424pub enum BootControllerRequest {
425 Notify {
426 responder: BootControllerNotifyResponder,
427 },
428 #[non_exhaustive]
430 _UnknownMethod {
431 ordinal: u64,
433 control_handle: BootControllerControlHandle,
434 method_type: fidl::MethodType,
435 },
436}
437
438impl BootControllerRequest {
439 #[allow(irrefutable_let_patterns)]
440 pub fn into_notify(self) -> Option<(BootControllerNotifyResponder)> {
441 if let BootControllerRequest::Notify { responder } = self {
442 Some((responder))
443 } else {
444 None
445 }
446 }
447
448 pub fn method_name(&self) -> &'static str {
450 match *self {
451 BootControllerRequest::Notify { .. } => "notify",
452 BootControllerRequest::_UnknownMethod {
453 method_type: fidl::MethodType::OneWay, ..
454 } => "unknown one-way method",
455 BootControllerRequest::_UnknownMethod {
456 method_type: fidl::MethodType::TwoWay, ..
457 } => "unknown two-way method",
458 }
459 }
460}
461
462#[derive(Debug, Clone)]
463pub struct BootControllerControlHandle {
464 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
465}
466
467impl fdomain_client::fidl::ControlHandle for BootControllerControlHandle {
468 fn shutdown(&self) {
469 self.inner.shutdown()
470 }
471
472 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
473 self.inner.shutdown_with_epitaph(status)
474 }
475
476 fn is_closed(&self) -> bool {
477 self.inner.channel().is_closed()
478 }
479 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
480 self.inner.channel().on_closed()
481 }
482}
483
484impl BootControllerControlHandle {}
485
486#[must_use = "FIDL methods require a response to be sent"]
487#[derive(Debug)]
488pub struct BootControllerNotifyResponder {
489 control_handle: std::mem::ManuallyDrop<BootControllerControlHandle>,
490 tx_id: u32,
491}
492
493impl std::ops::Drop for BootControllerNotifyResponder {
497 fn drop(&mut self) {
498 self.control_handle.shutdown();
499 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
501 }
502}
503
504impl fdomain_client::fidl::Responder for BootControllerNotifyResponder {
505 type ControlHandle = BootControllerControlHandle;
506
507 fn control_handle(&self) -> &BootControllerControlHandle {
508 &self.control_handle
509 }
510
511 fn drop_without_shutdown(mut self) {
512 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
514 std::mem::forget(self);
516 }
517}
518
519impl BootControllerNotifyResponder {
520 pub fn send(self) -> Result<(), fidl::Error> {
524 let _result = self.send_raw();
525 if _result.is_err() {
526 self.control_handle.shutdown();
527 }
528 self.drop_without_shutdown();
529 _result
530 }
531
532 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
534 let _result = self.send_raw();
535 self.drop_without_shutdown();
536 _result
537 }
538
539 fn send_raw(&self) -> Result<(), fidl::Error> {
540 self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
541 fidl::encoding::Flexible::new(()),
542 self.tx_id,
543 0x55173ddd1d9ed8de,
544 fidl::encoding::DynamicFlags::FLEXIBLE,
545 )
546 }
547}
548
549#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
550pub struct ConfigOverrideMarker;
551
552impl fdomain_client::fidl::ProtocolMarker for ConfigOverrideMarker {
553 type Proxy = ConfigOverrideProxy;
554 type RequestStream = ConfigOverrideRequestStream;
555
556 const DEBUG_NAME: &'static str = "fuchsia.sys2.ConfigOverride";
557}
558impl fdomain_client::fidl::DiscoverableProtocolMarker for ConfigOverrideMarker {}
559pub type ConfigOverrideSetStructuredConfigResult = Result<(), ConfigOverrideError>;
560pub type ConfigOverrideUnsetStructuredConfigResult = Result<(), ConfigOverrideError>;
561
562pub trait ConfigOverrideProxyInterface: Send + Sync {
563 type SetStructuredConfigResponseFut: std::future::Future<Output = Result<ConfigOverrideSetStructuredConfigResult, fidl::Error>>
564 + Send;
565 fn r#set_structured_config(
566 &self,
567 moniker: &str,
568 fields: &[fdomain_fuchsia_component_decl::ConfigOverride],
569 ) -> Self::SetStructuredConfigResponseFut;
570 type UnsetStructuredConfigResponseFut: std::future::Future<Output = Result<ConfigOverrideUnsetStructuredConfigResult, fidl::Error>>
571 + Send;
572 fn r#unset_structured_config(&self, moniker: &str) -> Self::UnsetStructuredConfigResponseFut;
573}
574
575#[derive(Debug, Clone)]
576pub struct ConfigOverrideProxy {
577 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
578}
579
580impl fdomain_client::fidl::Proxy for ConfigOverrideProxy {
581 type Protocol = ConfigOverrideMarker;
582
583 fn from_channel(inner: fdomain_client::Channel) -> Self {
584 Self::new(inner)
585 }
586
587 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
588 self.client.into_channel().map_err(|client| Self { client })
589 }
590
591 fn as_channel(&self) -> &fdomain_client::Channel {
592 self.client.as_channel()
593 }
594}
595
596impl ConfigOverrideProxy {
597 pub fn new(channel: fdomain_client::Channel) -> Self {
599 let protocol_name =
600 <ConfigOverrideMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
601 Self { client: fidl::client::Client::new(channel, protocol_name) }
602 }
603
604 pub fn take_event_stream(&self) -> ConfigOverrideEventStream {
610 ConfigOverrideEventStream { event_receiver: self.client.take_event_receiver() }
611 }
612
613 pub fn r#set_structured_config(
616 &self,
617 mut moniker: &str,
618 mut fields: &[fdomain_fuchsia_component_decl::ConfigOverride],
619 ) -> fidl::client::QueryResponseFut<
620 ConfigOverrideSetStructuredConfigResult,
621 fdomain_client::fidl::FDomainResourceDialect,
622 > {
623 ConfigOverrideProxyInterface::r#set_structured_config(self, moniker, fields)
624 }
625
626 pub fn r#unset_structured_config(
630 &self,
631 mut moniker: &str,
632 ) -> fidl::client::QueryResponseFut<
633 ConfigOverrideUnsetStructuredConfigResult,
634 fdomain_client::fidl::FDomainResourceDialect,
635 > {
636 ConfigOverrideProxyInterface::r#unset_structured_config(self, moniker)
637 }
638}
639
640impl ConfigOverrideProxyInterface for ConfigOverrideProxy {
641 type SetStructuredConfigResponseFut = fidl::client::QueryResponseFut<
642 ConfigOverrideSetStructuredConfigResult,
643 fdomain_client::fidl::FDomainResourceDialect,
644 >;
645 fn r#set_structured_config(
646 &self,
647 mut moniker: &str,
648 mut fields: &[fdomain_fuchsia_component_decl::ConfigOverride],
649 ) -> Self::SetStructuredConfigResponseFut {
650 fn _decode(
651 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
652 ) -> Result<ConfigOverrideSetStructuredConfigResult, fidl::Error> {
653 let _response = fidl::client::decode_transaction_body::<
654 fidl::encoding::FlexibleResultType<
655 fidl::encoding::EmptyStruct,
656 ConfigOverrideError,
657 >,
658 fdomain_client::fidl::FDomainResourceDialect,
659 0x2c6a138832d2e0ee,
660 >(_buf?)?
661 .into_result_fdomain::<ConfigOverrideMarker>("set_structured_config")?;
662 Ok(_response.map(|x| x))
663 }
664 self.client.send_query_and_decode::<
665 ConfigOverrideSetStructuredConfigRequest,
666 ConfigOverrideSetStructuredConfigResult,
667 >(
668 (moniker, fields,),
669 0x2c6a138832d2e0ee,
670 fidl::encoding::DynamicFlags::FLEXIBLE,
671 _decode,
672 )
673 }
674
675 type UnsetStructuredConfigResponseFut = fidl::client::QueryResponseFut<
676 ConfigOverrideUnsetStructuredConfigResult,
677 fdomain_client::fidl::FDomainResourceDialect,
678 >;
679 fn r#unset_structured_config(
680 &self,
681 mut moniker: &str,
682 ) -> Self::UnsetStructuredConfigResponseFut {
683 fn _decode(
684 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
685 ) -> Result<ConfigOverrideUnsetStructuredConfigResult, fidl::Error> {
686 let _response = fidl::client::decode_transaction_body::<
687 fidl::encoding::FlexibleResultType<
688 fidl::encoding::EmptyStruct,
689 ConfigOverrideError,
690 >,
691 fdomain_client::fidl::FDomainResourceDialect,
692 0x342ec7d2bef05552,
693 >(_buf?)?
694 .into_result_fdomain::<ConfigOverrideMarker>("unset_structured_config")?;
695 Ok(_response.map(|x| x))
696 }
697 self.client.send_query_and_decode::<
698 ConfigOverrideUnsetStructuredConfigRequest,
699 ConfigOverrideUnsetStructuredConfigResult,
700 >(
701 (moniker,),
702 0x342ec7d2bef05552,
703 fidl::encoding::DynamicFlags::FLEXIBLE,
704 _decode,
705 )
706 }
707}
708
709pub struct ConfigOverrideEventStream {
710 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
711}
712
713impl std::marker::Unpin for ConfigOverrideEventStream {}
714
715impl futures::stream::FusedStream for ConfigOverrideEventStream {
716 fn is_terminated(&self) -> bool {
717 self.event_receiver.is_terminated()
718 }
719}
720
721impl futures::Stream for ConfigOverrideEventStream {
722 type Item = Result<ConfigOverrideEvent, fidl::Error>;
723
724 fn poll_next(
725 mut self: std::pin::Pin<&mut Self>,
726 cx: &mut std::task::Context<'_>,
727 ) -> std::task::Poll<Option<Self::Item>> {
728 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
729 &mut self.event_receiver,
730 cx
731 )?) {
732 Some(buf) => std::task::Poll::Ready(Some(ConfigOverrideEvent::decode(buf))),
733 None => std::task::Poll::Ready(None),
734 }
735 }
736}
737
738#[derive(Debug)]
739pub enum ConfigOverrideEvent {
740 #[non_exhaustive]
741 _UnknownEvent {
742 ordinal: u64,
744 },
745}
746
747impl ConfigOverrideEvent {
748 fn decode(
750 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
751 ) -> Result<ConfigOverrideEvent, fidl::Error> {
752 let (bytes, _handles) = buf.split_mut();
753 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
754 debug_assert_eq!(tx_header.tx_id, 0);
755 match tx_header.ordinal {
756 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
757 Ok(ConfigOverrideEvent::_UnknownEvent { ordinal: tx_header.ordinal })
758 }
759 _ => Err(fidl::Error::UnknownOrdinal {
760 ordinal: tx_header.ordinal,
761 protocol_name:
762 <ConfigOverrideMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
763 }),
764 }
765 }
766}
767
768pub struct ConfigOverrideRequestStream {
770 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
771 is_terminated: bool,
772}
773
774impl std::marker::Unpin for ConfigOverrideRequestStream {}
775
776impl futures::stream::FusedStream for ConfigOverrideRequestStream {
777 fn is_terminated(&self) -> bool {
778 self.is_terminated
779 }
780}
781
782impl fdomain_client::fidl::RequestStream for ConfigOverrideRequestStream {
783 type Protocol = ConfigOverrideMarker;
784 type ControlHandle = ConfigOverrideControlHandle;
785
786 fn from_channel(channel: fdomain_client::Channel) -> Self {
787 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
788 }
789
790 fn control_handle(&self) -> Self::ControlHandle {
791 ConfigOverrideControlHandle { inner: self.inner.clone() }
792 }
793
794 fn into_inner(
795 self,
796 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
797 {
798 (self.inner, self.is_terminated)
799 }
800
801 fn from_inner(
802 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
803 is_terminated: bool,
804 ) -> Self {
805 Self { inner, is_terminated }
806 }
807}
808
809impl futures::Stream for ConfigOverrideRequestStream {
810 type Item = Result<ConfigOverrideRequest, fidl::Error>;
811
812 fn poll_next(
813 mut self: std::pin::Pin<&mut Self>,
814 cx: &mut std::task::Context<'_>,
815 ) -> std::task::Poll<Option<Self::Item>> {
816 let this = &mut *self;
817 if this.inner.check_shutdown(cx) {
818 this.is_terminated = true;
819 return std::task::Poll::Ready(None);
820 }
821 if this.is_terminated {
822 panic!("polled ConfigOverrideRequestStream after completion");
823 }
824 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
825 |bytes, handles| {
826 match this.inner.channel().read_etc(cx, bytes, handles) {
827 std::task::Poll::Ready(Ok(())) => {}
828 std::task::Poll::Pending => return std::task::Poll::Pending,
829 std::task::Poll::Ready(Err(None)) => {
830 this.is_terminated = true;
831 return std::task::Poll::Ready(None);
832 }
833 std::task::Poll::Ready(Err(Some(e))) => {
834 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
835 e.into(),
836 ))));
837 }
838 }
839
840 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
842
843 std::task::Poll::Ready(Some(match header.ordinal {
844 0x2c6a138832d2e0ee => {
845 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
846 let mut req = fidl::new_empty!(ConfigOverrideSetStructuredConfigRequest, fdomain_client::fidl::FDomainResourceDialect);
847 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ConfigOverrideSetStructuredConfigRequest>(&header, _body_bytes, handles, &mut req)?;
848 let control_handle = ConfigOverrideControlHandle {
849 inner: this.inner.clone(),
850 };
851 Ok(ConfigOverrideRequest::SetStructuredConfig {moniker: req.moniker,
852fields: req.fields,
853
854 responder: ConfigOverrideSetStructuredConfigResponder {
855 control_handle: std::mem::ManuallyDrop::new(control_handle),
856 tx_id: header.tx_id,
857 },
858 })
859 }
860 0x342ec7d2bef05552 => {
861 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
862 let mut req = fidl::new_empty!(ConfigOverrideUnsetStructuredConfigRequest, fdomain_client::fidl::FDomainResourceDialect);
863 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ConfigOverrideUnsetStructuredConfigRequest>(&header, _body_bytes, handles, &mut req)?;
864 let control_handle = ConfigOverrideControlHandle {
865 inner: this.inner.clone(),
866 };
867 Ok(ConfigOverrideRequest::UnsetStructuredConfig {moniker: req.moniker,
868
869 responder: ConfigOverrideUnsetStructuredConfigResponder {
870 control_handle: std::mem::ManuallyDrop::new(control_handle),
871 tx_id: header.tx_id,
872 },
873 })
874 }
875 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
876 Ok(ConfigOverrideRequest::_UnknownMethod {
877 ordinal: header.ordinal,
878 control_handle: ConfigOverrideControlHandle { inner: this.inner.clone() },
879 method_type: fidl::MethodType::OneWay,
880 })
881 }
882 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
883 this.inner.send_framework_err(
884 fidl::encoding::FrameworkErr::UnknownMethod,
885 header.tx_id,
886 header.ordinal,
887 header.dynamic_flags(),
888 (bytes, handles),
889 )?;
890 Ok(ConfigOverrideRequest::_UnknownMethod {
891 ordinal: header.ordinal,
892 control_handle: ConfigOverrideControlHandle { inner: this.inner.clone() },
893 method_type: fidl::MethodType::TwoWay,
894 })
895 }
896 _ => Err(fidl::Error::UnknownOrdinal {
897 ordinal: header.ordinal,
898 protocol_name: <ConfigOverrideMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
899 }),
900 }))
901 },
902 )
903 }
904}
905
906#[derive(Debug)]
908pub enum ConfigOverrideRequest {
909 SetStructuredConfig {
912 moniker: String,
913 fields: Vec<fdomain_fuchsia_component_decl::ConfigOverride>,
914 responder: ConfigOverrideSetStructuredConfigResponder,
915 },
916 UnsetStructuredConfig {
920 moniker: String,
921 responder: ConfigOverrideUnsetStructuredConfigResponder,
922 },
923 #[non_exhaustive]
925 _UnknownMethod {
926 ordinal: u64,
928 control_handle: ConfigOverrideControlHandle,
929 method_type: fidl::MethodType,
930 },
931}
932
933impl ConfigOverrideRequest {
934 #[allow(irrefutable_let_patterns)]
935 pub fn into_set_structured_config(
936 self,
937 ) -> Option<(
938 String,
939 Vec<fdomain_fuchsia_component_decl::ConfigOverride>,
940 ConfigOverrideSetStructuredConfigResponder,
941 )> {
942 if let ConfigOverrideRequest::SetStructuredConfig { moniker, fields, responder } = self {
943 Some((moniker, fields, responder))
944 } else {
945 None
946 }
947 }
948
949 #[allow(irrefutable_let_patterns)]
950 pub fn into_unset_structured_config(
951 self,
952 ) -> Option<(String, ConfigOverrideUnsetStructuredConfigResponder)> {
953 if let ConfigOverrideRequest::UnsetStructuredConfig { moniker, responder } = self {
954 Some((moniker, responder))
955 } else {
956 None
957 }
958 }
959
960 pub fn method_name(&self) -> &'static str {
962 match *self {
963 ConfigOverrideRequest::SetStructuredConfig { .. } => "set_structured_config",
964 ConfigOverrideRequest::UnsetStructuredConfig { .. } => "unset_structured_config",
965 ConfigOverrideRequest::_UnknownMethod {
966 method_type: fidl::MethodType::OneWay, ..
967 } => "unknown one-way method",
968 ConfigOverrideRequest::_UnknownMethod {
969 method_type: fidl::MethodType::TwoWay, ..
970 } => "unknown two-way method",
971 }
972 }
973}
974
975#[derive(Debug, Clone)]
976pub struct ConfigOverrideControlHandle {
977 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
978}
979
980impl fdomain_client::fidl::ControlHandle for ConfigOverrideControlHandle {
981 fn shutdown(&self) {
982 self.inner.shutdown()
983 }
984
985 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
986 self.inner.shutdown_with_epitaph(status)
987 }
988
989 fn is_closed(&self) -> bool {
990 self.inner.channel().is_closed()
991 }
992 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
993 self.inner.channel().on_closed()
994 }
995}
996
997impl ConfigOverrideControlHandle {}
998
999#[must_use = "FIDL methods require a response to be sent"]
1000#[derive(Debug)]
1001pub struct ConfigOverrideSetStructuredConfigResponder {
1002 control_handle: std::mem::ManuallyDrop<ConfigOverrideControlHandle>,
1003 tx_id: u32,
1004}
1005
1006impl std::ops::Drop for ConfigOverrideSetStructuredConfigResponder {
1010 fn drop(&mut self) {
1011 self.control_handle.shutdown();
1012 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1014 }
1015}
1016
1017impl fdomain_client::fidl::Responder for ConfigOverrideSetStructuredConfigResponder {
1018 type ControlHandle = ConfigOverrideControlHandle;
1019
1020 fn control_handle(&self) -> &ConfigOverrideControlHandle {
1021 &self.control_handle
1022 }
1023
1024 fn drop_without_shutdown(mut self) {
1025 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1027 std::mem::forget(self);
1029 }
1030}
1031
1032impl ConfigOverrideSetStructuredConfigResponder {
1033 pub fn send(self, mut result: Result<(), ConfigOverrideError>) -> Result<(), fidl::Error> {
1037 let _result = self.send_raw(result);
1038 if _result.is_err() {
1039 self.control_handle.shutdown();
1040 }
1041 self.drop_without_shutdown();
1042 _result
1043 }
1044
1045 pub fn send_no_shutdown_on_err(
1047 self,
1048 mut result: Result<(), ConfigOverrideError>,
1049 ) -> Result<(), fidl::Error> {
1050 let _result = self.send_raw(result);
1051 self.drop_without_shutdown();
1052 _result
1053 }
1054
1055 fn send_raw(&self, mut result: Result<(), ConfigOverrideError>) -> Result<(), fidl::Error> {
1056 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1057 fidl::encoding::EmptyStruct,
1058 ConfigOverrideError,
1059 >>(
1060 fidl::encoding::FlexibleResult::new(result),
1061 self.tx_id,
1062 0x2c6a138832d2e0ee,
1063 fidl::encoding::DynamicFlags::FLEXIBLE,
1064 )
1065 }
1066}
1067
1068#[must_use = "FIDL methods require a response to be sent"]
1069#[derive(Debug)]
1070pub struct ConfigOverrideUnsetStructuredConfigResponder {
1071 control_handle: std::mem::ManuallyDrop<ConfigOverrideControlHandle>,
1072 tx_id: u32,
1073}
1074
1075impl std::ops::Drop for ConfigOverrideUnsetStructuredConfigResponder {
1079 fn drop(&mut self) {
1080 self.control_handle.shutdown();
1081 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1083 }
1084}
1085
1086impl fdomain_client::fidl::Responder for ConfigOverrideUnsetStructuredConfigResponder {
1087 type ControlHandle = ConfigOverrideControlHandle;
1088
1089 fn control_handle(&self) -> &ConfigOverrideControlHandle {
1090 &self.control_handle
1091 }
1092
1093 fn drop_without_shutdown(mut self) {
1094 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1096 std::mem::forget(self);
1098 }
1099}
1100
1101impl ConfigOverrideUnsetStructuredConfigResponder {
1102 pub fn send(self, mut result: Result<(), ConfigOverrideError>) -> Result<(), fidl::Error> {
1106 let _result = self.send_raw(result);
1107 if _result.is_err() {
1108 self.control_handle.shutdown();
1109 }
1110 self.drop_without_shutdown();
1111 _result
1112 }
1113
1114 pub fn send_no_shutdown_on_err(
1116 self,
1117 mut result: Result<(), ConfigOverrideError>,
1118 ) -> Result<(), fidl::Error> {
1119 let _result = self.send_raw(result);
1120 self.drop_without_shutdown();
1121 _result
1122 }
1123
1124 fn send_raw(&self, mut result: Result<(), ConfigOverrideError>) -> Result<(), fidl::Error> {
1125 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1126 fidl::encoding::EmptyStruct,
1127 ConfigOverrideError,
1128 >>(
1129 fidl::encoding::FlexibleResult::new(result),
1130 self.tx_id,
1131 0x342ec7d2bef05552,
1132 fidl::encoding::DynamicFlags::FLEXIBLE,
1133 )
1134 }
1135}
1136
1137#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1138pub struct CrashIntrospectMarker;
1139
1140impl fdomain_client::fidl::ProtocolMarker for CrashIntrospectMarker {
1141 type Proxy = CrashIntrospectProxy;
1142 type RequestStream = CrashIntrospectRequestStream;
1143
1144 const DEBUG_NAME: &'static str = "fuchsia.sys2.CrashIntrospect";
1145}
1146impl fdomain_client::fidl::DiscoverableProtocolMarker for CrashIntrospectMarker {}
1147pub type CrashIntrospectFindComponentByThreadKoidResult =
1148 Result<ComponentCrashInfo, fdomain_fuchsia_component::Error>;
1149
1150pub trait CrashIntrospectProxyInterface: Send + Sync {
1151 type FindComponentByThreadKoidResponseFut: std::future::Future<
1152 Output = Result<CrashIntrospectFindComponentByThreadKoidResult, fidl::Error>,
1153 > + Send;
1154 fn r#find_component_by_thread_koid(
1155 &self,
1156 thread_koid: u64,
1157 ) -> Self::FindComponentByThreadKoidResponseFut;
1158}
1159
1160#[derive(Debug, Clone)]
1161pub struct CrashIntrospectProxy {
1162 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
1163}
1164
1165impl fdomain_client::fidl::Proxy for CrashIntrospectProxy {
1166 type Protocol = CrashIntrospectMarker;
1167
1168 fn from_channel(inner: fdomain_client::Channel) -> Self {
1169 Self::new(inner)
1170 }
1171
1172 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
1173 self.client.into_channel().map_err(|client| Self { client })
1174 }
1175
1176 fn as_channel(&self) -> &fdomain_client::Channel {
1177 self.client.as_channel()
1178 }
1179}
1180
1181impl CrashIntrospectProxy {
1182 pub fn new(channel: fdomain_client::Channel) -> Self {
1184 let protocol_name =
1185 <CrashIntrospectMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
1186 Self { client: fidl::client::Client::new(channel, protocol_name) }
1187 }
1188
1189 pub fn take_event_stream(&self) -> CrashIntrospectEventStream {
1195 CrashIntrospectEventStream { event_receiver: self.client.take_event_receiver() }
1196 }
1197
1198 pub fn r#find_component_by_thread_koid(
1207 &self,
1208 mut thread_koid: u64,
1209 ) -> fidl::client::QueryResponseFut<
1210 CrashIntrospectFindComponentByThreadKoidResult,
1211 fdomain_client::fidl::FDomainResourceDialect,
1212 > {
1213 CrashIntrospectProxyInterface::r#find_component_by_thread_koid(self, thread_koid)
1214 }
1215}
1216
1217impl CrashIntrospectProxyInterface for CrashIntrospectProxy {
1218 type FindComponentByThreadKoidResponseFut = fidl::client::QueryResponseFut<
1219 CrashIntrospectFindComponentByThreadKoidResult,
1220 fdomain_client::fidl::FDomainResourceDialect,
1221 >;
1222 fn r#find_component_by_thread_koid(
1223 &self,
1224 mut thread_koid: u64,
1225 ) -> Self::FindComponentByThreadKoidResponseFut {
1226 fn _decode(
1227 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1228 ) -> Result<CrashIntrospectFindComponentByThreadKoidResult, fidl::Error> {
1229 let _response = fidl::client::decode_transaction_body::<
1230 fidl::encoding::ResultType<
1231 CrashIntrospectFindComponentByThreadKoidResponse,
1232 fdomain_fuchsia_component::Error,
1233 >,
1234 fdomain_client::fidl::FDomainResourceDialect,
1235 0x75d3ff081eca468d,
1236 >(_buf?)?;
1237 Ok(_response.map(|x| x.info))
1238 }
1239 self.client.send_query_and_decode::<
1240 CrashIntrospectFindComponentByThreadKoidRequest,
1241 CrashIntrospectFindComponentByThreadKoidResult,
1242 >(
1243 (thread_koid,),
1244 0x75d3ff081eca468d,
1245 fidl::encoding::DynamicFlags::empty(),
1246 _decode,
1247 )
1248 }
1249}
1250
1251pub struct CrashIntrospectEventStream {
1252 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1253}
1254
1255impl std::marker::Unpin for CrashIntrospectEventStream {}
1256
1257impl futures::stream::FusedStream for CrashIntrospectEventStream {
1258 fn is_terminated(&self) -> bool {
1259 self.event_receiver.is_terminated()
1260 }
1261}
1262
1263impl futures::Stream for CrashIntrospectEventStream {
1264 type Item = Result<CrashIntrospectEvent, fidl::Error>;
1265
1266 fn poll_next(
1267 mut self: std::pin::Pin<&mut Self>,
1268 cx: &mut std::task::Context<'_>,
1269 ) -> std::task::Poll<Option<Self::Item>> {
1270 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1271 &mut self.event_receiver,
1272 cx
1273 )?) {
1274 Some(buf) => std::task::Poll::Ready(Some(CrashIntrospectEvent::decode(buf))),
1275 None => std::task::Poll::Ready(None),
1276 }
1277 }
1278}
1279
1280#[derive(Debug)]
1281pub enum CrashIntrospectEvent {}
1282
1283impl CrashIntrospectEvent {
1284 fn decode(
1286 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1287 ) -> Result<CrashIntrospectEvent, fidl::Error> {
1288 let (bytes, _handles) = buf.split_mut();
1289 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1290 debug_assert_eq!(tx_header.tx_id, 0);
1291 match tx_header.ordinal {
1292 _ => Err(fidl::Error::UnknownOrdinal {
1293 ordinal: tx_header.ordinal,
1294 protocol_name:
1295 <CrashIntrospectMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1296 }),
1297 }
1298 }
1299}
1300
1301pub struct CrashIntrospectRequestStream {
1303 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1304 is_terminated: bool,
1305}
1306
1307impl std::marker::Unpin for CrashIntrospectRequestStream {}
1308
1309impl futures::stream::FusedStream for CrashIntrospectRequestStream {
1310 fn is_terminated(&self) -> bool {
1311 self.is_terminated
1312 }
1313}
1314
1315impl fdomain_client::fidl::RequestStream for CrashIntrospectRequestStream {
1316 type Protocol = CrashIntrospectMarker;
1317 type ControlHandle = CrashIntrospectControlHandle;
1318
1319 fn from_channel(channel: fdomain_client::Channel) -> Self {
1320 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1321 }
1322
1323 fn control_handle(&self) -> Self::ControlHandle {
1324 CrashIntrospectControlHandle { inner: self.inner.clone() }
1325 }
1326
1327 fn into_inner(
1328 self,
1329 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1330 {
1331 (self.inner, self.is_terminated)
1332 }
1333
1334 fn from_inner(
1335 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1336 is_terminated: bool,
1337 ) -> Self {
1338 Self { inner, is_terminated }
1339 }
1340}
1341
1342impl futures::Stream for CrashIntrospectRequestStream {
1343 type Item = Result<CrashIntrospectRequest, fidl::Error>;
1344
1345 fn poll_next(
1346 mut self: std::pin::Pin<&mut Self>,
1347 cx: &mut std::task::Context<'_>,
1348 ) -> std::task::Poll<Option<Self::Item>> {
1349 let this = &mut *self;
1350 if this.inner.check_shutdown(cx) {
1351 this.is_terminated = true;
1352 return std::task::Poll::Ready(None);
1353 }
1354 if this.is_terminated {
1355 panic!("polled CrashIntrospectRequestStream after completion");
1356 }
1357 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1358 |bytes, handles| {
1359 match this.inner.channel().read_etc(cx, bytes, handles) {
1360 std::task::Poll::Ready(Ok(())) => {}
1361 std::task::Poll::Pending => return std::task::Poll::Pending,
1362 std::task::Poll::Ready(Err(None)) => {
1363 this.is_terminated = true;
1364 return std::task::Poll::Ready(None);
1365 }
1366 std::task::Poll::Ready(Err(Some(e))) => {
1367 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1368 e.into(),
1369 ))));
1370 }
1371 }
1372
1373 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1375
1376 std::task::Poll::Ready(Some(match header.ordinal {
1377 0x75d3ff081eca468d => {
1378 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1379 let mut req = fidl::new_empty!(CrashIntrospectFindComponentByThreadKoidRequest, fdomain_client::fidl::FDomainResourceDialect);
1380 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<CrashIntrospectFindComponentByThreadKoidRequest>(&header, _body_bytes, handles, &mut req)?;
1381 let control_handle = CrashIntrospectControlHandle {
1382 inner: this.inner.clone(),
1383 };
1384 Ok(CrashIntrospectRequest::FindComponentByThreadKoid {thread_koid: req.thread_koid,
1385
1386 responder: CrashIntrospectFindComponentByThreadKoidResponder {
1387 control_handle: std::mem::ManuallyDrop::new(control_handle),
1388 tx_id: header.tx_id,
1389 },
1390 })
1391 }
1392 _ => Err(fidl::Error::UnknownOrdinal {
1393 ordinal: header.ordinal,
1394 protocol_name: <CrashIntrospectMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1395 }),
1396 }))
1397 },
1398 )
1399 }
1400}
1401
1402#[derive(Debug)]
1406pub enum CrashIntrospectRequest {
1407 FindComponentByThreadKoid {
1416 thread_koid: u64,
1417 responder: CrashIntrospectFindComponentByThreadKoidResponder,
1418 },
1419}
1420
1421impl CrashIntrospectRequest {
1422 #[allow(irrefutable_let_patterns)]
1423 pub fn into_find_component_by_thread_koid(
1424 self,
1425 ) -> Option<(u64, CrashIntrospectFindComponentByThreadKoidResponder)> {
1426 if let CrashIntrospectRequest::FindComponentByThreadKoid { thread_koid, responder } = self {
1427 Some((thread_koid, responder))
1428 } else {
1429 None
1430 }
1431 }
1432
1433 pub fn method_name(&self) -> &'static str {
1435 match *self {
1436 CrashIntrospectRequest::FindComponentByThreadKoid { .. } => {
1437 "find_component_by_thread_koid"
1438 }
1439 }
1440 }
1441}
1442
1443#[derive(Debug, Clone)]
1444pub struct CrashIntrospectControlHandle {
1445 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1446}
1447
1448impl fdomain_client::fidl::ControlHandle for CrashIntrospectControlHandle {
1449 fn shutdown(&self) {
1450 self.inner.shutdown()
1451 }
1452
1453 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1454 self.inner.shutdown_with_epitaph(status)
1455 }
1456
1457 fn is_closed(&self) -> bool {
1458 self.inner.channel().is_closed()
1459 }
1460 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
1461 self.inner.channel().on_closed()
1462 }
1463}
1464
1465impl CrashIntrospectControlHandle {}
1466
1467#[must_use = "FIDL methods require a response to be sent"]
1468#[derive(Debug)]
1469pub struct CrashIntrospectFindComponentByThreadKoidResponder {
1470 control_handle: std::mem::ManuallyDrop<CrashIntrospectControlHandle>,
1471 tx_id: u32,
1472}
1473
1474impl std::ops::Drop for CrashIntrospectFindComponentByThreadKoidResponder {
1478 fn drop(&mut self) {
1479 self.control_handle.shutdown();
1480 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1482 }
1483}
1484
1485impl fdomain_client::fidl::Responder for CrashIntrospectFindComponentByThreadKoidResponder {
1486 type ControlHandle = CrashIntrospectControlHandle;
1487
1488 fn control_handle(&self) -> &CrashIntrospectControlHandle {
1489 &self.control_handle
1490 }
1491
1492 fn drop_without_shutdown(mut self) {
1493 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1495 std::mem::forget(self);
1497 }
1498}
1499
1500impl CrashIntrospectFindComponentByThreadKoidResponder {
1501 pub fn send(
1505 self,
1506 mut result: Result<&ComponentCrashInfo, fdomain_fuchsia_component::Error>,
1507 ) -> Result<(), fidl::Error> {
1508 let _result = self.send_raw(result);
1509 if _result.is_err() {
1510 self.control_handle.shutdown();
1511 }
1512 self.drop_without_shutdown();
1513 _result
1514 }
1515
1516 pub fn send_no_shutdown_on_err(
1518 self,
1519 mut result: Result<&ComponentCrashInfo, fdomain_fuchsia_component::Error>,
1520 ) -> Result<(), fidl::Error> {
1521 let _result = self.send_raw(result);
1522 self.drop_without_shutdown();
1523 _result
1524 }
1525
1526 fn send_raw(
1527 &self,
1528 mut result: Result<&ComponentCrashInfo, fdomain_fuchsia_component::Error>,
1529 ) -> Result<(), fidl::Error> {
1530 self.control_handle.inner.send::<fidl::encoding::ResultType<
1531 CrashIntrospectFindComponentByThreadKoidResponse,
1532 fdomain_fuchsia_component::Error,
1533 >>(
1534 result.map(|info| (info,)),
1535 self.tx_id,
1536 0x75d3ff081eca468d,
1537 fidl::encoding::DynamicFlags::empty(),
1538 )
1539 }
1540}
1541
1542#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1543pub struct InstanceIteratorMarker;
1544
1545impl fdomain_client::fidl::ProtocolMarker for InstanceIteratorMarker {
1546 type Proxy = InstanceIteratorProxy;
1547 type RequestStream = InstanceIteratorRequestStream;
1548
1549 const DEBUG_NAME: &'static str = "(anonymous) InstanceIterator";
1550}
1551
1552pub trait InstanceIteratorProxyInterface: Send + Sync {
1553 type NextResponseFut: std::future::Future<Output = Result<Vec<Instance>, fidl::Error>> + Send;
1554 fn r#next(&self) -> Self::NextResponseFut;
1555}
1556
1557#[derive(Debug, Clone)]
1558pub struct InstanceIteratorProxy {
1559 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
1560}
1561
1562impl fdomain_client::fidl::Proxy for InstanceIteratorProxy {
1563 type Protocol = InstanceIteratorMarker;
1564
1565 fn from_channel(inner: fdomain_client::Channel) -> Self {
1566 Self::new(inner)
1567 }
1568
1569 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
1570 self.client.into_channel().map_err(|client| Self { client })
1571 }
1572
1573 fn as_channel(&self) -> &fdomain_client::Channel {
1574 self.client.as_channel()
1575 }
1576}
1577
1578impl InstanceIteratorProxy {
1579 pub fn new(channel: fdomain_client::Channel) -> Self {
1581 let protocol_name =
1582 <InstanceIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
1583 Self { client: fidl::client::Client::new(channel, protocol_name) }
1584 }
1585
1586 pub fn take_event_stream(&self) -> InstanceIteratorEventStream {
1592 InstanceIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1593 }
1594
1595 pub fn r#next(
1596 &self,
1597 ) -> fidl::client::QueryResponseFut<Vec<Instance>, fdomain_client::fidl::FDomainResourceDialect>
1598 {
1599 InstanceIteratorProxyInterface::r#next(self)
1600 }
1601}
1602
1603impl InstanceIteratorProxyInterface for InstanceIteratorProxy {
1604 type NextResponseFut =
1605 fidl::client::QueryResponseFut<Vec<Instance>, fdomain_client::fidl::FDomainResourceDialect>;
1606 fn r#next(&self) -> Self::NextResponseFut {
1607 fn _decode(
1608 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1609 ) -> Result<Vec<Instance>, fidl::Error> {
1610 let _response = fidl::client::decode_transaction_body::<
1611 InstanceIteratorNextResponse,
1612 fdomain_client::fidl::FDomainResourceDialect,
1613 0x3a4e3d52432a52ee,
1614 >(_buf?)?;
1615 Ok(_response.infos)
1616 }
1617 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<Instance>>(
1618 (),
1619 0x3a4e3d52432a52ee,
1620 fidl::encoding::DynamicFlags::empty(),
1621 _decode,
1622 )
1623 }
1624}
1625
1626pub struct InstanceIteratorEventStream {
1627 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1628}
1629
1630impl std::marker::Unpin for InstanceIteratorEventStream {}
1631
1632impl futures::stream::FusedStream for InstanceIteratorEventStream {
1633 fn is_terminated(&self) -> bool {
1634 self.event_receiver.is_terminated()
1635 }
1636}
1637
1638impl futures::Stream for InstanceIteratorEventStream {
1639 type Item = Result<InstanceIteratorEvent, fidl::Error>;
1640
1641 fn poll_next(
1642 mut self: std::pin::Pin<&mut Self>,
1643 cx: &mut std::task::Context<'_>,
1644 ) -> std::task::Poll<Option<Self::Item>> {
1645 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1646 &mut self.event_receiver,
1647 cx
1648 )?) {
1649 Some(buf) => std::task::Poll::Ready(Some(InstanceIteratorEvent::decode(buf))),
1650 None => std::task::Poll::Ready(None),
1651 }
1652 }
1653}
1654
1655#[derive(Debug)]
1656pub enum InstanceIteratorEvent {}
1657
1658impl InstanceIteratorEvent {
1659 fn decode(
1661 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1662 ) -> Result<InstanceIteratorEvent, fidl::Error> {
1663 let (bytes, _handles) = buf.split_mut();
1664 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1665 debug_assert_eq!(tx_header.tx_id, 0);
1666 match tx_header.ordinal {
1667 _ => Err(fidl::Error::UnknownOrdinal {
1668 ordinal: tx_header.ordinal,
1669 protocol_name:
1670 <InstanceIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1671 }),
1672 }
1673 }
1674}
1675
1676pub struct InstanceIteratorRequestStream {
1678 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1679 is_terminated: bool,
1680}
1681
1682impl std::marker::Unpin for InstanceIteratorRequestStream {}
1683
1684impl futures::stream::FusedStream for InstanceIteratorRequestStream {
1685 fn is_terminated(&self) -> bool {
1686 self.is_terminated
1687 }
1688}
1689
1690impl fdomain_client::fidl::RequestStream for InstanceIteratorRequestStream {
1691 type Protocol = InstanceIteratorMarker;
1692 type ControlHandle = InstanceIteratorControlHandle;
1693
1694 fn from_channel(channel: fdomain_client::Channel) -> Self {
1695 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1696 }
1697
1698 fn control_handle(&self) -> Self::ControlHandle {
1699 InstanceIteratorControlHandle { inner: self.inner.clone() }
1700 }
1701
1702 fn into_inner(
1703 self,
1704 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1705 {
1706 (self.inner, self.is_terminated)
1707 }
1708
1709 fn from_inner(
1710 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1711 is_terminated: bool,
1712 ) -> Self {
1713 Self { inner, is_terminated }
1714 }
1715}
1716
1717impl futures::Stream for InstanceIteratorRequestStream {
1718 type Item = Result<InstanceIteratorRequest, fidl::Error>;
1719
1720 fn poll_next(
1721 mut self: std::pin::Pin<&mut Self>,
1722 cx: &mut std::task::Context<'_>,
1723 ) -> std::task::Poll<Option<Self::Item>> {
1724 let this = &mut *self;
1725 if this.inner.check_shutdown(cx) {
1726 this.is_terminated = true;
1727 return std::task::Poll::Ready(None);
1728 }
1729 if this.is_terminated {
1730 panic!("polled InstanceIteratorRequestStream after completion");
1731 }
1732 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1733 |bytes, handles| {
1734 match this.inner.channel().read_etc(cx, bytes, handles) {
1735 std::task::Poll::Ready(Ok(())) => {}
1736 std::task::Poll::Pending => return std::task::Poll::Pending,
1737 std::task::Poll::Ready(Err(None)) => {
1738 this.is_terminated = true;
1739 return std::task::Poll::Ready(None);
1740 }
1741 std::task::Poll::Ready(Err(Some(e))) => {
1742 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1743 e.into(),
1744 ))));
1745 }
1746 }
1747
1748 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1750
1751 std::task::Poll::Ready(Some(match header.ordinal {
1752 0x3a4e3d52432a52ee => {
1753 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1754 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
1755 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1756 let control_handle = InstanceIteratorControlHandle {
1757 inner: this.inner.clone(),
1758 };
1759 Ok(InstanceIteratorRequest::Next {
1760 responder: InstanceIteratorNextResponder {
1761 control_handle: std::mem::ManuallyDrop::new(control_handle),
1762 tx_id: header.tx_id,
1763 },
1764 })
1765 }
1766 _ => Err(fidl::Error::UnknownOrdinal {
1767 ordinal: header.ordinal,
1768 protocol_name: <InstanceIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1769 }),
1770 }))
1771 },
1772 )
1773 }
1774}
1775
1776#[derive(Debug)]
1778pub enum InstanceIteratorRequest {
1779 Next { responder: InstanceIteratorNextResponder },
1780}
1781
1782impl InstanceIteratorRequest {
1783 #[allow(irrefutable_let_patterns)]
1784 pub fn into_next(self) -> Option<(InstanceIteratorNextResponder)> {
1785 if let InstanceIteratorRequest::Next { responder } = self {
1786 Some((responder))
1787 } else {
1788 None
1789 }
1790 }
1791
1792 pub fn method_name(&self) -> &'static str {
1794 match *self {
1795 InstanceIteratorRequest::Next { .. } => "next",
1796 }
1797 }
1798}
1799
1800#[derive(Debug, Clone)]
1801pub struct InstanceIteratorControlHandle {
1802 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1803}
1804
1805impl fdomain_client::fidl::ControlHandle for InstanceIteratorControlHandle {
1806 fn shutdown(&self) {
1807 self.inner.shutdown()
1808 }
1809
1810 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1811 self.inner.shutdown_with_epitaph(status)
1812 }
1813
1814 fn is_closed(&self) -> bool {
1815 self.inner.channel().is_closed()
1816 }
1817 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
1818 self.inner.channel().on_closed()
1819 }
1820}
1821
1822impl InstanceIteratorControlHandle {}
1823
1824#[must_use = "FIDL methods require a response to be sent"]
1825#[derive(Debug)]
1826pub struct InstanceIteratorNextResponder {
1827 control_handle: std::mem::ManuallyDrop<InstanceIteratorControlHandle>,
1828 tx_id: u32,
1829}
1830
1831impl std::ops::Drop for InstanceIteratorNextResponder {
1835 fn drop(&mut self) {
1836 self.control_handle.shutdown();
1837 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1839 }
1840}
1841
1842impl fdomain_client::fidl::Responder for InstanceIteratorNextResponder {
1843 type ControlHandle = InstanceIteratorControlHandle;
1844
1845 fn control_handle(&self) -> &InstanceIteratorControlHandle {
1846 &self.control_handle
1847 }
1848
1849 fn drop_without_shutdown(mut self) {
1850 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1852 std::mem::forget(self);
1854 }
1855}
1856
1857impl InstanceIteratorNextResponder {
1858 pub fn send(self, mut infos: &[Instance]) -> Result<(), fidl::Error> {
1862 let _result = self.send_raw(infos);
1863 if _result.is_err() {
1864 self.control_handle.shutdown();
1865 }
1866 self.drop_without_shutdown();
1867 _result
1868 }
1869
1870 pub fn send_no_shutdown_on_err(self, mut infos: &[Instance]) -> Result<(), fidl::Error> {
1872 let _result = self.send_raw(infos);
1873 self.drop_without_shutdown();
1874 _result
1875 }
1876
1877 fn send_raw(&self, mut infos: &[Instance]) -> Result<(), fidl::Error> {
1878 self.control_handle.inner.send::<InstanceIteratorNextResponse>(
1879 (infos,),
1880 self.tx_id,
1881 0x3a4e3d52432a52ee,
1882 fidl::encoding::DynamicFlags::empty(),
1883 )
1884 }
1885}
1886
1887#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1888pub struct LifecycleControllerMarker;
1889
1890impl fdomain_client::fidl::ProtocolMarker for LifecycleControllerMarker {
1891 type Proxy = LifecycleControllerProxy;
1892 type RequestStream = LifecycleControllerRequestStream;
1893
1894 const DEBUG_NAME: &'static str = "fuchsia.sys2.LifecycleController";
1895}
1896impl fdomain_client::fidl::DiscoverableProtocolMarker for LifecycleControllerMarker {}
1897pub type LifecycleControllerStartInstanceResult = Result<(), StartError>;
1898pub type LifecycleControllerStartInstanceWithArgsResult = Result<(), StartError>;
1899pub type LifecycleControllerStopInstanceResult = Result<(), StopError>;
1900pub type LifecycleControllerResolveInstanceResult = Result<(), ResolveError>;
1901pub type LifecycleControllerUnresolveInstanceResult = Result<(), UnresolveError>;
1902pub type LifecycleControllerCreateInstanceResult = Result<(), CreateError>;
1903pub type LifecycleControllerDestroyInstanceResult = Result<(), DestroyError>;
1904
1905pub trait LifecycleControllerProxyInterface: Send + Sync {
1906 type StartInstanceResponseFut: std::future::Future<Output = Result<LifecycleControllerStartInstanceResult, fidl::Error>>
1907 + Send;
1908 fn r#start_instance(
1909 &self,
1910 moniker: &str,
1911 binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
1912 ) -> Self::StartInstanceResponseFut;
1913 type StartInstanceWithArgsResponseFut: std::future::Future<
1914 Output = Result<LifecycleControllerStartInstanceWithArgsResult, fidl::Error>,
1915 > + Send;
1916 fn r#start_instance_with_args(
1917 &self,
1918 moniker: &str,
1919 binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
1920 args: fdomain_fuchsia_component::StartChildArgs,
1921 ) -> Self::StartInstanceWithArgsResponseFut;
1922 type StopInstanceResponseFut: std::future::Future<Output = Result<LifecycleControllerStopInstanceResult, fidl::Error>>
1923 + Send;
1924 fn r#stop_instance(&self, moniker: &str) -> Self::StopInstanceResponseFut;
1925 type ResolveInstanceResponseFut: std::future::Future<Output = Result<LifecycleControllerResolveInstanceResult, fidl::Error>>
1926 + Send;
1927 fn r#resolve_instance(&self, moniker: &str) -> Self::ResolveInstanceResponseFut;
1928 type UnresolveInstanceResponseFut: std::future::Future<
1929 Output = Result<LifecycleControllerUnresolveInstanceResult, fidl::Error>,
1930 > + Send;
1931 fn r#unresolve_instance(&self, moniker: &str) -> Self::UnresolveInstanceResponseFut;
1932 type CreateInstanceResponseFut: std::future::Future<Output = Result<LifecycleControllerCreateInstanceResult, fidl::Error>>
1933 + Send;
1934 fn r#create_instance(
1935 &self,
1936 parent_moniker: &str,
1937 collection: &fdomain_fuchsia_component_decl::CollectionRef,
1938 decl: &fdomain_fuchsia_component_decl::Child,
1939 args: fdomain_fuchsia_component::CreateChildArgs,
1940 ) -> Self::CreateInstanceResponseFut;
1941 type DestroyInstanceResponseFut: std::future::Future<Output = Result<LifecycleControllerDestroyInstanceResult, fidl::Error>>
1942 + Send;
1943 fn r#destroy_instance(
1944 &self,
1945 parent_moniker: &str,
1946 child: &fdomain_fuchsia_component_decl::ChildRef,
1947 ) -> Self::DestroyInstanceResponseFut;
1948}
1949
1950#[derive(Debug, Clone)]
1951pub struct LifecycleControllerProxy {
1952 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
1953}
1954
1955impl fdomain_client::fidl::Proxy for LifecycleControllerProxy {
1956 type Protocol = LifecycleControllerMarker;
1957
1958 fn from_channel(inner: fdomain_client::Channel) -> Self {
1959 Self::new(inner)
1960 }
1961
1962 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
1963 self.client.into_channel().map_err(|client| Self { client })
1964 }
1965
1966 fn as_channel(&self) -> &fdomain_client::Channel {
1967 self.client.as_channel()
1968 }
1969}
1970
1971impl LifecycleControllerProxy {
1972 pub fn new(channel: fdomain_client::Channel) -> Self {
1974 let protocol_name =
1975 <LifecycleControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
1976 Self { client: fidl::client::Client::new(channel, protocol_name) }
1977 }
1978
1979 pub fn take_event_stream(&self) -> LifecycleControllerEventStream {
1985 LifecycleControllerEventStream { event_receiver: self.client.take_event_receiver() }
1986 }
1987
1988 pub fn r#start_instance(
1999 &self,
2000 mut moniker: &str,
2001 mut binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2002 ) -> fidl::client::QueryResponseFut<
2003 LifecycleControllerStartInstanceResult,
2004 fdomain_client::fidl::FDomainResourceDialect,
2005 > {
2006 LifecycleControllerProxyInterface::r#start_instance(self, moniker, binder)
2007 }
2008
2009 pub fn r#start_instance_with_args(
2010 &self,
2011 mut moniker: &str,
2012 mut binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2013 mut args: fdomain_fuchsia_component::StartChildArgs,
2014 ) -> fidl::client::QueryResponseFut<
2015 LifecycleControllerStartInstanceWithArgsResult,
2016 fdomain_client::fidl::FDomainResourceDialect,
2017 > {
2018 LifecycleControllerProxyInterface::r#start_instance_with_args(self, moniker, binder, args)
2019 }
2020
2021 pub fn r#stop_instance(
2026 &self,
2027 mut moniker: &str,
2028 ) -> fidl::client::QueryResponseFut<
2029 LifecycleControllerStopInstanceResult,
2030 fdomain_client::fidl::FDomainResourceDialect,
2031 > {
2032 LifecycleControllerProxyInterface::r#stop_instance(self, moniker)
2033 }
2034
2035 pub fn r#resolve_instance(
2040 &self,
2041 mut moniker: &str,
2042 ) -> fidl::client::QueryResponseFut<
2043 LifecycleControllerResolveInstanceResult,
2044 fdomain_client::fidl::FDomainResourceDialect,
2045 > {
2046 LifecycleControllerProxyInterface::r#resolve_instance(self, moniker)
2047 }
2048
2049 pub fn r#unresolve_instance(
2054 &self,
2055 mut moniker: &str,
2056 ) -> fidl::client::QueryResponseFut<
2057 LifecycleControllerUnresolveInstanceResult,
2058 fdomain_client::fidl::FDomainResourceDialect,
2059 > {
2060 LifecycleControllerProxyInterface::r#unresolve_instance(self, moniker)
2061 }
2062
2063 pub fn r#create_instance(
2068 &self,
2069 mut parent_moniker: &str,
2070 mut collection: &fdomain_fuchsia_component_decl::CollectionRef,
2071 mut decl: &fdomain_fuchsia_component_decl::Child,
2072 mut args: fdomain_fuchsia_component::CreateChildArgs,
2073 ) -> fidl::client::QueryResponseFut<
2074 LifecycleControllerCreateInstanceResult,
2075 fdomain_client::fidl::FDomainResourceDialect,
2076 > {
2077 LifecycleControllerProxyInterface::r#create_instance(
2078 self,
2079 parent_moniker,
2080 collection,
2081 decl,
2082 args,
2083 )
2084 }
2085
2086 pub fn r#destroy_instance(
2091 &self,
2092 mut parent_moniker: &str,
2093 mut child: &fdomain_fuchsia_component_decl::ChildRef,
2094 ) -> fidl::client::QueryResponseFut<
2095 LifecycleControllerDestroyInstanceResult,
2096 fdomain_client::fidl::FDomainResourceDialect,
2097 > {
2098 LifecycleControllerProxyInterface::r#destroy_instance(self, parent_moniker, child)
2099 }
2100}
2101
2102impl LifecycleControllerProxyInterface for LifecycleControllerProxy {
2103 type StartInstanceResponseFut = fidl::client::QueryResponseFut<
2104 LifecycleControllerStartInstanceResult,
2105 fdomain_client::fidl::FDomainResourceDialect,
2106 >;
2107 fn r#start_instance(
2108 &self,
2109 mut moniker: &str,
2110 mut binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2111 ) -> Self::StartInstanceResponseFut {
2112 fn _decode(
2113 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2114 ) -> Result<LifecycleControllerStartInstanceResult, fidl::Error> {
2115 let _response = fidl::client::decode_transaction_body::<
2116 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>,
2117 fdomain_client::fidl::FDomainResourceDialect,
2118 0x13fcb422876384bf,
2119 >(_buf?)?;
2120 Ok(_response.map(|x| x))
2121 }
2122 self.client.send_query_and_decode::<
2123 LifecycleControllerStartInstanceRequest,
2124 LifecycleControllerStartInstanceResult,
2125 >(
2126 (moniker, binder,),
2127 0x13fcb422876384bf,
2128 fidl::encoding::DynamicFlags::empty(),
2129 _decode,
2130 )
2131 }
2132
2133 type StartInstanceWithArgsResponseFut = fidl::client::QueryResponseFut<
2134 LifecycleControllerStartInstanceWithArgsResult,
2135 fdomain_client::fidl::FDomainResourceDialect,
2136 >;
2137 fn r#start_instance_with_args(
2138 &self,
2139 mut moniker: &str,
2140 mut binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2141 mut args: fdomain_fuchsia_component::StartChildArgs,
2142 ) -> Self::StartInstanceWithArgsResponseFut {
2143 fn _decode(
2144 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2145 ) -> Result<LifecycleControllerStartInstanceWithArgsResult, fidl::Error> {
2146 let _response = fidl::client::decode_transaction_body::<
2147 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>,
2148 fdomain_client::fidl::FDomainResourceDialect,
2149 0xd3b467436223e9,
2150 >(_buf?)?;
2151 Ok(_response.map(|x| x))
2152 }
2153 self.client.send_query_and_decode::<
2154 LifecycleControllerStartInstanceWithArgsRequest,
2155 LifecycleControllerStartInstanceWithArgsResult,
2156 >(
2157 (moniker, binder, &mut args,),
2158 0xd3b467436223e9,
2159 fidl::encoding::DynamicFlags::empty(),
2160 _decode,
2161 )
2162 }
2163
2164 type StopInstanceResponseFut = fidl::client::QueryResponseFut<
2165 LifecycleControllerStopInstanceResult,
2166 fdomain_client::fidl::FDomainResourceDialect,
2167 >;
2168 fn r#stop_instance(&self, mut moniker: &str) -> Self::StopInstanceResponseFut {
2169 fn _decode(
2170 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2171 ) -> Result<LifecycleControllerStopInstanceResult, fidl::Error> {
2172 let _response = fidl::client::decode_transaction_body::<
2173 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StopError>,
2174 fdomain_client::fidl::FDomainResourceDialect,
2175 0x1362ba9d0e3caf36,
2176 >(_buf?)?;
2177 Ok(_response.map(|x| x))
2178 }
2179 self.client.send_query_and_decode::<
2180 LifecycleControllerStopInstanceRequest,
2181 LifecycleControllerStopInstanceResult,
2182 >(
2183 (moniker,),
2184 0x1362ba9d0e3caf36,
2185 fidl::encoding::DynamicFlags::empty(),
2186 _decode,
2187 )
2188 }
2189
2190 type ResolveInstanceResponseFut = fidl::client::QueryResponseFut<
2191 LifecycleControllerResolveInstanceResult,
2192 fdomain_client::fidl::FDomainResourceDialect,
2193 >;
2194 fn r#resolve_instance(&self, mut moniker: &str) -> Self::ResolveInstanceResponseFut {
2195 fn _decode(
2196 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2197 ) -> Result<LifecycleControllerResolveInstanceResult, fidl::Error> {
2198 let _response = fidl::client::decode_transaction_body::<
2199 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, ResolveError>,
2200 fdomain_client::fidl::FDomainResourceDialect,
2201 0x426ab8dd53d8e737,
2202 >(_buf?)?;
2203 Ok(_response.map(|x| x))
2204 }
2205 self.client.send_query_and_decode::<
2206 LifecycleControllerResolveInstanceRequest,
2207 LifecycleControllerResolveInstanceResult,
2208 >(
2209 (moniker,),
2210 0x426ab8dd53d8e737,
2211 fidl::encoding::DynamicFlags::empty(),
2212 _decode,
2213 )
2214 }
2215
2216 type UnresolveInstanceResponseFut = fidl::client::QueryResponseFut<
2217 LifecycleControllerUnresolveInstanceResult,
2218 fdomain_client::fidl::FDomainResourceDialect,
2219 >;
2220 fn r#unresolve_instance(&self, mut moniker: &str) -> Self::UnresolveInstanceResponseFut {
2221 fn _decode(
2222 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2223 ) -> Result<LifecycleControllerUnresolveInstanceResult, fidl::Error> {
2224 let _response = fidl::client::decode_transaction_body::<
2225 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, UnresolveError>,
2226 fdomain_client::fidl::FDomainResourceDialect,
2227 0x18166a2aa798cb99,
2228 >(_buf?)?;
2229 Ok(_response.map(|x| x))
2230 }
2231 self.client.send_query_and_decode::<
2232 LifecycleControllerUnresolveInstanceRequest,
2233 LifecycleControllerUnresolveInstanceResult,
2234 >(
2235 (moniker,),
2236 0x18166a2aa798cb99,
2237 fidl::encoding::DynamicFlags::empty(),
2238 _decode,
2239 )
2240 }
2241
2242 type CreateInstanceResponseFut = fidl::client::QueryResponseFut<
2243 LifecycleControllerCreateInstanceResult,
2244 fdomain_client::fidl::FDomainResourceDialect,
2245 >;
2246 fn r#create_instance(
2247 &self,
2248 mut parent_moniker: &str,
2249 mut collection: &fdomain_fuchsia_component_decl::CollectionRef,
2250 mut decl: &fdomain_fuchsia_component_decl::Child,
2251 mut args: fdomain_fuchsia_component::CreateChildArgs,
2252 ) -> Self::CreateInstanceResponseFut {
2253 fn _decode(
2254 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2255 ) -> Result<LifecycleControllerCreateInstanceResult, fidl::Error> {
2256 let _response = fidl::client::decode_transaction_body::<
2257 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, CreateError>,
2258 fdomain_client::fidl::FDomainResourceDialect,
2259 0x48d17ae777e4f9,
2260 >(_buf?)?;
2261 Ok(_response.map(|x| x))
2262 }
2263 self.client.send_query_and_decode::<
2264 LifecycleControllerCreateInstanceRequest,
2265 LifecycleControllerCreateInstanceResult,
2266 >(
2267 (parent_moniker, collection, decl, &mut args,),
2268 0x48d17ae777e4f9,
2269 fidl::encoding::DynamicFlags::empty(),
2270 _decode,
2271 )
2272 }
2273
2274 type DestroyInstanceResponseFut = fidl::client::QueryResponseFut<
2275 LifecycleControllerDestroyInstanceResult,
2276 fdomain_client::fidl::FDomainResourceDialect,
2277 >;
2278 fn r#destroy_instance(
2279 &self,
2280 mut parent_moniker: &str,
2281 mut child: &fdomain_fuchsia_component_decl::ChildRef,
2282 ) -> Self::DestroyInstanceResponseFut {
2283 fn _decode(
2284 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2285 ) -> Result<LifecycleControllerDestroyInstanceResult, fidl::Error> {
2286 let _response = fidl::client::decode_transaction_body::<
2287 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, DestroyError>,
2288 fdomain_client::fidl::FDomainResourceDialect,
2289 0x27640ae5889d7443,
2290 >(_buf?)?;
2291 Ok(_response.map(|x| x))
2292 }
2293 self.client.send_query_and_decode::<
2294 LifecycleControllerDestroyInstanceRequest,
2295 LifecycleControllerDestroyInstanceResult,
2296 >(
2297 (parent_moniker, child,),
2298 0x27640ae5889d7443,
2299 fidl::encoding::DynamicFlags::empty(),
2300 _decode,
2301 )
2302 }
2303}
2304
2305pub struct LifecycleControllerEventStream {
2306 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2307}
2308
2309impl std::marker::Unpin for LifecycleControllerEventStream {}
2310
2311impl futures::stream::FusedStream for LifecycleControllerEventStream {
2312 fn is_terminated(&self) -> bool {
2313 self.event_receiver.is_terminated()
2314 }
2315}
2316
2317impl futures::Stream for LifecycleControllerEventStream {
2318 type Item = Result<LifecycleControllerEvent, fidl::Error>;
2319
2320 fn poll_next(
2321 mut self: std::pin::Pin<&mut Self>,
2322 cx: &mut std::task::Context<'_>,
2323 ) -> std::task::Poll<Option<Self::Item>> {
2324 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2325 &mut self.event_receiver,
2326 cx
2327 )?) {
2328 Some(buf) => std::task::Poll::Ready(Some(LifecycleControllerEvent::decode(buf))),
2329 None => std::task::Poll::Ready(None),
2330 }
2331 }
2332}
2333
2334#[derive(Debug)]
2335pub enum LifecycleControllerEvent {}
2336
2337impl LifecycleControllerEvent {
2338 fn decode(
2340 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2341 ) -> Result<LifecycleControllerEvent, fidl::Error> {
2342 let (bytes, _handles) = buf.split_mut();
2343 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2344 debug_assert_eq!(tx_header.tx_id, 0);
2345 match tx_header.ordinal {
2346 _ => Err(fidl::Error::UnknownOrdinal {
2347 ordinal: tx_header.ordinal,
2348 protocol_name:
2349 <LifecycleControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2350 }),
2351 }
2352 }
2353}
2354
2355pub struct LifecycleControllerRequestStream {
2357 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2358 is_terminated: bool,
2359}
2360
2361impl std::marker::Unpin for LifecycleControllerRequestStream {}
2362
2363impl futures::stream::FusedStream for LifecycleControllerRequestStream {
2364 fn is_terminated(&self) -> bool {
2365 self.is_terminated
2366 }
2367}
2368
2369impl fdomain_client::fidl::RequestStream for LifecycleControllerRequestStream {
2370 type Protocol = LifecycleControllerMarker;
2371 type ControlHandle = LifecycleControllerControlHandle;
2372
2373 fn from_channel(channel: fdomain_client::Channel) -> Self {
2374 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2375 }
2376
2377 fn control_handle(&self) -> Self::ControlHandle {
2378 LifecycleControllerControlHandle { inner: self.inner.clone() }
2379 }
2380
2381 fn into_inner(
2382 self,
2383 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2384 {
2385 (self.inner, self.is_terminated)
2386 }
2387
2388 fn from_inner(
2389 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2390 is_terminated: bool,
2391 ) -> Self {
2392 Self { inner, is_terminated }
2393 }
2394}
2395
2396impl futures::Stream for LifecycleControllerRequestStream {
2397 type Item = Result<LifecycleControllerRequest, fidl::Error>;
2398
2399 fn poll_next(
2400 mut self: std::pin::Pin<&mut Self>,
2401 cx: &mut std::task::Context<'_>,
2402 ) -> std::task::Poll<Option<Self::Item>> {
2403 let this = &mut *self;
2404 if this.inner.check_shutdown(cx) {
2405 this.is_terminated = true;
2406 return std::task::Poll::Ready(None);
2407 }
2408 if this.is_terminated {
2409 panic!("polled LifecycleControllerRequestStream after completion");
2410 }
2411 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2412 |bytes, handles| {
2413 match this.inner.channel().read_etc(cx, bytes, handles) {
2414 std::task::Poll::Ready(Ok(())) => {}
2415 std::task::Poll::Pending => return std::task::Poll::Pending,
2416 std::task::Poll::Ready(Err(None)) => {
2417 this.is_terminated = true;
2418 return std::task::Poll::Ready(None);
2419 }
2420 std::task::Poll::Ready(Err(Some(e))) => {
2421 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2422 e.into(),
2423 ))));
2424 }
2425 }
2426
2427 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2429
2430 std::task::Poll::Ready(Some(match header.ordinal {
2431 0x13fcb422876384bf => {
2432 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2433 let mut req = fidl::new_empty!(LifecycleControllerStartInstanceRequest, fdomain_client::fidl::FDomainResourceDialect);
2434 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerStartInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
2435 let control_handle = LifecycleControllerControlHandle {
2436 inner: this.inner.clone(),
2437 };
2438 Ok(LifecycleControllerRequest::StartInstance {moniker: req.moniker,
2439binder: req.binder,
2440
2441 responder: LifecycleControllerStartInstanceResponder {
2442 control_handle: std::mem::ManuallyDrop::new(control_handle),
2443 tx_id: header.tx_id,
2444 },
2445 })
2446 }
2447 0xd3b467436223e9 => {
2448 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2449 let mut req = fidl::new_empty!(LifecycleControllerStartInstanceWithArgsRequest, fdomain_client::fidl::FDomainResourceDialect);
2450 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerStartInstanceWithArgsRequest>(&header, _body_bytes, handles, &mut req)?;
2451 let control_handle = LifecycleControllerControlHandle {
2452 inner: this.inner.clone(),
2453 };
2454 Ok(LifecycleControllerRequest::StartInstanceWithArgs {moniker: req.moniker,
2455binder: req.binder,
2456args: req.args,
2457
2458 responder: LifecycleControllerStartInstanceWithArgsResponder {
2459 control_handle: std::mem::ManuallyDrop::new(control_handle),
2460 tx_id: header.tx_id,
2461 },
2462 })
2463 }
2464 0x1362ba9d0e3caf36 => {
2465 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2466 let mut req = fidl::new_empty!(LifecycleControllerStopInstanceRequest, fdomain_client::fidl::FDomainResourceDialect);
2467 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerStopInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
2468 let control_handle = LifecycleControllerControlHandle {
2469 inner: this.inner.clone(),
2470 };
2471 Ok(LifecycleControllerRequest::StopInstance {moniker: req.moniker,
2472
2473 responder: LifecycleControllerStopInstanceResponder {
2474 control_handle: std::mem::ManuallyDrop::new(control_handle),
2475 tx_id: header.tx_id,
2476 },
2477 })
2478 }
2479 0x426ab8dd53d8e737 => {
2480 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2481 let mut req = fidl::new_empty!(LifecycleControllerResolveInstanceRequest, fdomain_client::fidl::FDomainResourceDialect);
2482 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerResolveInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
2483 let control_handle = LifecycleControllerControlHandle {
2484 inner: this.inner.clone(),
2485 };
2486 Ok(LifecycleControllerRequest::ResolveInstance {moniker: req.moniker,
2487
2488 responder: LifecycleControllerResolveInstanceResponder {
2489 control_handle: std::mem::ManuallyDrop::new(control_handle),
2490 tx_id: header.tx_id,
2491 },
2492 })
2493 }
2494 0x18166a2aa798cb99 => {
2495 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2496 let mut req = fidl::new_empty!(LifecycleControllerUnresolveInstanceRequest, fdomain_client::fidl::FDomainResourceDialect);
2497 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerUnresolveInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
2498 let control_handle = LifecycleControllerControlHandle {
2499 inner: this.inner.clone(),
2500 };
2501 Ok(LifecycleControllerRequest::UnresolveInstance {moniker: req.moniker,
2502
2503 responder: LifecycleControllerUnresolveInstanceResponder {
2504 control_handle: std::mem::ManuallyDrop::new(control_handle),
2505 tx_id: header.tx_id,
2506 },
2507 })
2508 }
2509 0x48d17ae777e4f9 => {
2510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2511 let mut req = fidl::new_empty!(LifecycleControllerCreateInstanceRequest, fdomain_client::fidl::FDomainResourceDialect);
2512 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerCreateInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
2513 let control_handle = LifecycleControllerControlHandle {
2514 inner: this.inner.clone(),
2515 };
2516 Ok(LifecycleControllerRequest::CreateInstance {parent_moniker: req.parent_moniker,
2517collection: req.collection,
2518decl: req.decl,
2519args: req.args,
2520
2521 responder: LifecycleControllerCreateInstanceResponder {
2522 control_handle: std::mem::ManuallyDrop::new(control_handle),
2523 tx_id: header.tx_id,
2524 },
2525 })
2526 }
2527 0x27640ae5889d7443 => {
2528 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2529 let mut req = fidl::new_empty!(LifecycleControllerDestroyInstanceRequest, fdomain_client::fidl::FDomainResourceDialect);
2530 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LifecycleControllerDestroyInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
2531 let control_handle = LifecycleControllerControlHandle {
2532 inner: this.inner.clone(),
2533 };
2534 Ok(LifecycleControllerRequest::DestroyInstance {parent_moniker: req.parent_moniker,
2535child: req.child,
2536
2537 responder: LifecycleControllerDestroyInstanceResponder {
2538 control_handle: std::mem::ManuallyDrop::new(control_handle),
2539 tx_id: header.tx_id,
2540 },
2541 })
2542 }
2543 _ => Err(fidl::Error::UnknownOrdinal {
2544 ordinal: header.ordinal,
2545 protocol_name: <LifecycleControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2546 }),
2547 }))
2548 },
2549 )
2550 }
2551}
2552
2553#[derive(Debug)]
2555pub enum LifecycleControllerRequest {
2556 StartInstance {
2567 moniker: String,
2568 binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2569 responder: LifecycleControllerStartInstanceResponder,
2570 },
2571 StartInstanceWithArgs {
2572 moniker: String,
2573 binder: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2574 args: fdomain_fuchsia_component::StartChildArgs,
2575 responder: LifecycleControllerStartInstanceWithArgsResponder,
2576 },
2577 StopInstance { moniker: String, responder: LifecycleControllerStopInstanceResponder },
2582 ResolveInstance { moniker: String, responder: LifecycleControllerResolveInstanceResponder },
2587 UnresolveInstance { moniker: String, responder: LifecycleControllerUnresolveInstanceResponder },
2592 CreateInstance {
2597 parent_moniker: String,
2598 collection: fdomain_fuchsia_component_decl::CollectionRef,
2599 decl: fdomain_fuchsia_component_decl::Child,
2600 args: fdomain_fuchsia_component::CreateChildArgs,
2601 responder: LifecycleControllerCreateInstanceResponder,
2602 },
2603 DestroyInstance {
2608 parent_moniker: String,
2609 child: fdomain_fuchsia_component_decl::ChildRef,
2610 responder: LifecycleControllerDestroyInstanceResponder,
2611 },
2612}
2613
2614impl LifecycleControllerRequest {
2615 #[allow(irrefutable_let_patterns)]
2616 pub fn into_start_instance(
2617 self,
2618 ) -> Option<(
2619 String,
2620 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2621 LifecycleControllerStartInstanceResponder,
2622 )> {
2623 if let LifecycleControllerRequest::StartInstance { moniker, binder, responder } = self {
2624 Some((moniker, binder, responder))
2625 } else {
2626 None
2627 }
2628 }
2629
2630 #[allow(irrefutable_let_patterns)]
2631 pub fn into_start_instance_with_args(
2632 self,
2633 ) -> Option<(
2634 String,
2635 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
2636 fdomain_fuchsia_component::StartChildArgs,
2637 LifecycleControllerStartInstanceWithArgsResponder,
2638 )> {
2639 if let LifecycleControllerRequest::StartInstanceWithArgs {
2640 moniker,
2641 binder,
2642 args,
2643 responder,
2644 } = self
2645 {
2646 Some((moniker, binder, args, responder))
2647 } else {
2648 None
2649 }
2650 }
2651
2652 #[allow(irrefutable_let_patterns)]
2653 pub fn into_stop_instance(self) -> Option<(String, LifecycleControllerStopInstanceResponder)> {
2654 if let LifecycleControllerRequest::StopInstance { moniker, responder } = self {
2655 Some((moniker, responder))
2656 } else {
2657 None
2658 }
2659 }
2660
2661 #[allow(irrefutable_let_patterns)]
2662 pub fn into_resolve_instance(
2663 self,
2664 ) -> Option<(String, LifecycleControllerResolveInstanceResponder)> {
2665 if let LifecycleControllerRequest::ResolveInstance { moniker, responder } = self {
2666 Some((moniker, responder))
2667 } else {
2668 None
2669 }
2670 }
2671
2672 #[allow(irrefutable_let_patterns)]
2673 pub fn into_unresolve_instance(
2674 self,
2675 ) -> Option<(String, LifecycleControllerUnresolveInstanceResponder)> {
2676 if let LifecycleControllerRequest::UnresolveInstance { moniker, responder } = self {
2677 Some((moniker, responder))
2678 } else {
2679 None
2680 }
2681 }
2682
2683 #[allow(irrefutable_let_patterns)]
2684 pub fn into_create_instance(
2685 self,
2686 ) -> Option<(
2687 String,
2688 fdomain_fuchsia_component_decl::CollectionRef,
2689 fdomain_fuchsia_component_decl::Child,
2690 fdomain_fuchsia_component::CreateChildArgs,
2691 LifecycleControllerCreateInstanceResponder,
2692 )> {
2693 if let LifecycleControllerRequest::CreateInstance {
2694 parent_moniker,
2695 collection,
2696 decl,
2697 args,
2698 responder,
2699 } = self
2700 {
2701 Some((parent_moniker, collection, decl, args, responder))
2702 } else {
2703 None
2704 }
2705 }
2706
2707 #[allow(irrefutable_let_patterns)]
2708 pub fn into_destroy_instance(
2709 self,
2710 ) -> Option<(
2711 String,
2712 fdomain_fuchsia_component_decl::ChildRef,
2713 LifecycleControllerDestroyInstanceResponder,
2714 )> {
2715 if let LifecycleControllerRequest::DestroyInstance { parent_moniker, child, responder } =
2716 self
2717 {
2718 Some((parent_moniker, child, responder))
2719 } else {
2720 None
2721 }
2722 }
2723
2724 pub fn method_name(&self) -> &'static str {
2726 match *self {
2727 LifecycleControllerRequest::StartInstance { .. } => "start_instance",
2728 LifecycleControllerRequest::StartInstanceWithArgs { .. } => "start_instance_with_args",
2729 LifecycleControllerRequest::StopInstance { .. } => "stop_instance",
2730 LifecycleControllerRequest::ResolveInstance { .. } => "resolve_instance",
2731 LifecycleControllerRequest::UnresolveInstance { .. } => "unresolve_instance",
2732 LifecycleControllerRequest::CreateInstance { .. } => "create_instance",
2733 LifecycleControllerRequest::DestroyInstance { .. } => "destroy_instance",
2734 }
2735 }
2736}
2737
2738#[derive(Debug, Clone)]
2739pub struct LifecycleControllerControlHandle {
2740 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2741}
2742
2743impl fdomain_client::fidl::ControlHandle for LifecycleControllerControlHandle {
2744 fn shutdown(&self) {
2745 self.inner.shutdown()
2746 }
2747
2748 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2749 self.inner.shutdown_with_epitaph(status)
2750 }
2751
2752 fn is_closed(&self) -> bool {
2753 self.inner.channel().is_closed()
2754 }
2755 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
2756 self.inner.channel().on_closed()
2757 }
2758}
2759
2760impl LifecycleControllerControlHandle {}
2761
2762#[must_use = "FIDL methods require a response to be sent"]
2763#[derive(Debug)]
2764pub struct LifecycleControllerStartInstanceResponder {
2765 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
2766 tx_id: u32,
2767}
2768
2769impl std::ops::Drop for LifecycleControllerStartInstanceResponder {
2773 fn drop(&mut self) {
2774 self.control_handle.shutdown();
2775 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2777 }
2778}
2779
2780impl fdomain_client::fidl::Responder for LifecycleControllerStartInstanceResponder {
2781 type ControlHandle = LifecycleControllerControlHandle;
2782
2783 fn control_handle(&self) -> &LifecycleControllerControlHandle {
2784 &self.control_handle
2785 }
2786
2787 fn drop_without_shutdown(mut self) {
2788 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2790 std::mem::forget(self);
2792 }
2793}
2794
2795impl LifecycleControllerStartInstanceResponder {
2796 pub fn send(self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
2800 let _result = self.send_raw(result);
2801 if _result.is_err() {
2802 self.control_handle.shutdown();
2803 }
2804 self.drop_without_shutdown();
2805 _result
2806 }
2807
2808 pub fn send_no_shutdown_on_err(
2810 self,
2811 mut result: Result<(), StartError>,
2812 ) -> Result<(), fidl::Error> {
2813 let _result = self.send_raw(result);
2814 self.drop_without_shutdown();
2815 _result
2816 }
2817
2818 fn send_raw(&self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
2819 self.control_handle
2820 .inner
2821 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>>(
2822 result,
2823 self.tx_id,
2824 0x13fcb422876384bf,
2825 fidl::encoding::DynamicFlags::empty(),
2826 )
2827 }
2828}
2829
2830#[must_use = "FIDL methods require a response to be sent"]
2831#[derive(Debug)]
2832pub struct LifecycleControllerStartInstanceWithArgsResponder {
2833 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
2834 tx_id: u32,
2835}
2836
2837impl std::ops::Drop for LifecycleControllerStartInstanceWithArgsResponder {
2841 fn drop(&mut self) {
2842 self.control_handle.shutdown();
2843 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2845 }
2846}
2847
2848impl fdomain_client::fidl::Responder for LifecycleControllerStartInstanceWithArgsResponder {
2849 type ControlHandle = LifecycleControllerControlHandle;
2850
2851 fn control_handle(&self) -> &LifecycleControllerControlHandle {
2852 &self.control_handle
2853 }
2854
2855 fn drop_without_shutdown(mut self) {
2856 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2858 std::mem::forget(self);
2860 }
2861}
2862
2863impl LifecycleControllerStartInstanceWithArgsResponder {
2864 pub fn send(self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
2868 let _result = self.send_raw(result);
2869 if _result.is_err() {
2870 self.control_handle.shutdown();
2871 }
2872 self.drop_without_shutdown();
2873 _result
2874 }
2875
2876 pub fn send_no_shutdown_on_err(
2878 self,
2879 mut result: Result<(), StartError>,
2880 ) -> Result<(), fidl::Error> {
2881 let _result = self.send_raw(result);
2882 self.drop_without_shutdown();
2883 _result
2884 }
2885
2886 fn send_raw(&self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
2887 self.control_handle
2888 .inner
2889 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>>(
2890 result,
2891 self.tx_id,
2892 0xd3b467436223e9,
2893 fidl::encoding::DynamicFlags::empty(),
2894 )
2895 }
2896}
2897
2898#[must_use = "FIDL methods require a response to be sent"]
2899#[derive(Debug)]
2900pub struct LifecycleControllerStopInstanceResponder {
2901 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
2902 tx_id: u32,
2903}
2904
2905impl std::ops::Drop for LifecycleControllerStopInstanceResponder {
2909 fn drop(&mut self) {
2910 self.control_handle.shutdown();
2911 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2913 }
2914}
2915
2916impl fdomain_client::fidl::Responder for LifecycleControllerStopInstanceResponder {
2917 type ControlHandle = LifecycleControllerControlHandle;
2918
2919 fn control_handle(&self) -> &LifecycleControllerControlHandle {
2920 &self.control_handle
2921 }
2922
2923 fn drop_without_shutdown(mut self) {
2924 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2926 std::mem::forget(self);
2928 }
2929}
2930
2931impl LifecycleControllerStopInstanceResponder {
2932 pub fn send(self, mut result: Result<(), StopError>) -> Result<(), fidl::Error> {
2936 let _result = self.send_raw(result);
2937 if _result.is_err() {
2938 self.control_handle.shutdown();
2939 }
2940 self.drop_without_shutdown();
2941 _result
2942 }
2943
2944 pub fn send_no_shutdown_on_err(
2946 self,
2947 mut result: Result<(), StopError>,
2948 ) -> Result<(), fidl::Error> {
2949 let _result = self.send_raw(result);
2950 self.drop_without_shutdown();
2951 _result
2952 }
2953
2954 fn send_raw(&self, mut result: Result<(), StopError>) -> Result<(), fidl::Error> {
2955 self.control_handle
2956 .inner
2957 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StopError>>(
2958 result,
2959 self.tx_id,
2960 0x1362ba9d0e3caf36,
2961 fidl::encoding::DynamicFlags::empty(),
2962 )
2963 }
2964}
2965
2966#[must_use = "FIDL methods require a response to be sent"]
2967#[derive(Debug)]
2968pub struct LifecycleControllerResolveInstanceResponder {
2969 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
2970 tx_id: u32,
2971}
2972
2973impl std::ops::Drop for LifecycleControllerResolveInstanceResponder {
2977 fn drop(&mut self) {
2978 self.control_handle.shutdown();
2979 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2981 }
2982}
2983
2984impl fdomain_client::fidl::Responder for LifecycleControllerResolveInstanceResponder {
2985 type ControlHandle = LifecycleControllerControlHandle;
2986
2987 fn control_handle(&self) -> &LifecycleControllerControlHandle {
2988 &self.control_handle
2989 }
2990
2991 fn drop_without_shutdown(mut self) {
2992 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2994 std::mem::forget(self);
2996 }
2997}
2998
2999impl LifecycleControllerResolveInstanceResponder {
3000 pub fn send(self, mut result: Result<(), ResolveError>) -> Result<(), fidl::Error> {
3004 let _result = self.send_raw(result);
3005 if _result.is_err() {
3006 self.control_handle.shutdown();
3007 }
3008 self.drop_without_shutdown();
3009 _result
3010 }
3011
3012 pub fn send_no_shutdown_on_err(
3014 self,
3015 mut result: Result<(), ResolveError>,
3016 ) -> Result<(), fidl::Error> {
3017 let _result = self.send_raw(result);
3018 self.drop_without_shutdown();
3019 _result
3020 }
3021
3022 fn send_raw(&self, mut result: Result<(), ResolveError>) -> Result<(), fidl::Error> {
3023 self.control_handle.inner.send::<fidl::encoding::ResultType<
3024 fidl::encoding::EmptyStruct,
3025 ResolveError,
3026 >>(
3027 result,
3028 self.tx_id,
3029 0x426ab8dd53d8e737,
3030 fidl::encoding::DynamicFlags::empty(),
3031 )
3032 }
3033}
3034
3035#[must_use = "FIDL methods require a response to be sent"]
3036#[derive(Debug)]
3037pub struct LifecycleControllerUnresolveInstanceResponder {
3038 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
3039 tx_id: u32,
3040}
3041
3042impl std::ops::Drop for LifecycleControllerUnresolveInstanceResponder {
3046 fn drop(&mut self) {
3047 self.control_handle.shutdown();
3048 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3050 }
3051}
3052
3053impl fdomain_client::fidl::Responder for LifecycleControllerUnresolveInstanceResponder {
3054 type ControlHandle = LifecycleControllerControlHandle;
3055
3056 fn control_handle(&self) -> &LifecycleControllerControlHandle {
3057 &self.control_handle
3058 }
3059
3060 fn drop_without_shutdown(mut self) {
3061 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3063 std::mem::forget(self);
3065 }
3066}
3067
3068impl LifecycleControllerUnresolveInstanceResponder {
3069 pub fn send(self, mut result: Result<(), UnresolveError>) -> Result<(), fidl::Error> {
3073 let _result = self.send_raw(result);
3074 if _result.is_err() {
3075 self.control_handle.shutdown();
3076 }
3077 self.drop_without_shutdown();
3078 _result
3079 }
3080
3081 pub fn send_no_shutdown_on_err(
3083 self,
3084 mut result: Result<(), UnresolveError>,
3085 ) -> Result<(), fidl::Error> {
3086 let _result = self.send_raw(result);
3087 self.drop_without_shutdown();
3088 _result
3089 }
3090
3091 fn send_raw(&self, mut result: Result<(), UnresolveError>) -> Result<(), fidl::Error> {
3092 self.control_handle.inner.send::<fidl::encoding::ResultType<
3093 fidl::encoding::EmptyStruct,
3094 UnresolveError,
3095 >>(
3096 result,
3097 self.tx_id,
3098 0x18166a2aa798cb99,
3099 fidl::encoding::DynamicFlags::empty(),
3100 )
3101 }
3102}
3103
3104#[must_use = "FIDL methods require a response to be sent"]
3105#[derive(Debug)]
3106pub struct LifecycleControllerCreateInstanceResponder {
3107 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
3108 tx_id: u32,
3109}
3110
3111impl std::ops::Drop for LifecycleControllerCreateInstanceResponder {
3115 fn drop(&mut self) {
3116 self.control_handle.shutdown();
3117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3119 }
3120}
3121
3122impl fdomain_client::fidl::Responder for LifecycleControllerCreateInstanceResponder {
3123 type ControlHandle = LifecycleControllerControlHandle;
3124
3125 fn control_handle(&self) -> &LifecycleControllerControlHandle {
3126 &self.control_handle
3127 }
3128
3129 fn drop_without_shutdown(mut self) {
3130 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3132 std::mem::forget(self);
3134 }
3135}
3136
3137impl LifecycleControllerCreateInstanceResponder {
3138 pub fn send(self, mut result: Result<(), CreateError>) -> Result<(), fidl::Error> {
3142 let _result = self.send_raw(result);
3143 if _result.is_err() {
3144 self.control_handle.shutdown();
3145 }
3146 self.drop_without_shutdown();
3147 _result
3148 }
3149
3150 pub fn send_no_shutdown_on_err(
3152 self,
3153 mut result: Result<(), CreateError>,
3154 ) -> Result<(), fidl::Error> {
3155 let _result = self.send_raw(result);
3156 self.drop_without_shutdown();
3157 _result
3158 }
3159
3160 fn send_raw(&self, mut result: Result<(), CreateError>) -> Result<(), fidl::Error> {
3161 self.control_handle.inner.send::<fidl::encoding::ResultType<
3162 fidl::encoding::EmptyStruct,
3163 CreateError,
3164 >>(
3165 result,
3166 self.tx_id,
3167 0x48d17ae777e4f9,
3168 fidl::encoding::DynamicFlags::empty(),
3169 )
3170 }
3171}
3172
3173#[must_use = "FIDL methods require a response to be sent"]
3174#[derive(Debug)]
3175pub struct LifecycleControllerDestroyInstanceResponder {
3176 control_handle: std::mem::ManuallyDrop<LifecycleControllerControlHandle>,
3177 tx_id: u32,
3178}
3179
3180impl std::ops::Drop for LifecycleControllerDestroyInstanceResponder {
3184 fn drop(&mut self) {
3185 self.control_handle.shutdown();
3186 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3188 }
3189}
3190
3191impl fdomain_client::fidl::Responder for LifecycleControllerDestroyInstanceResponder {
3192 type ControlHandle = LifecycleControllerControlHandle;
3193
3194 fn control_handle(&self) -> &LifecycleControllerControlHandle {
3195 &self.control_handle
3196 }
3197
3198 fn drop_without_shutdown(mut self) {
3199 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3201 std::mem::forget(self);
3203 }
3204}
3205
3206impl LifecycleControllerDestroyInstanceResponder {
3207 pub fn send(self, mut result: Result<(), DestroyError>) -> Result<(), fidl::Error> {
3211 let _result = self.send_raw(result);
3212 if _result.is_err() {
3213 self.control_handle.shutdown();
3214 }
3215 self.drop_without_shutdown();
3216 _result
3217 }
3218
3219 pub fn send_no_shutdown_on_err(
3221 self,
3222 mut result: Result<(), DestroyError>,
3223 ) -> Result<(), fidl::Error> {
3224 let _result = self.send_raw(result);
3225 self.drop_without_shutdown();
3226 _result
3227 }
3228
3229 fn send_raw(&self, mut result: Result<(), DestroyError>) -> Result<(), fidl::Error> {
3230 self.control_handle.inner.send::<fidl::encoding::ResultType<
3231 fidl::encoding::EmptyStruct,
3232 DestroyError,
3233 >>(
3234 result,
3235 self.tx_id,
3236 0x27640ae5889d7443,
3237 fidl::encoding::DynamicFlags::empty(),
3238 )
3239 }
3240}
3241
3242#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3243pub struct ManifestBytesIteratorMarker;
3244
3245impl fdomain_client::fidl::ProtocolMarker for ManifestBytesIteratorMarker {
3246 type Proxy = ManifestBytesIteratorProxy;
3247 type RequestStream = ManifestBytesIteratorRequestStream;
3248
3249 const DEBUG_NAME: &'static str = "(anonymous) ManifestBytesIterator";
3250}
3251
3252pub trait ManifestBytesIteratorProxyInterface: Send + Sync {
3253 type NextResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
3254 fn r#next(&self) -> Self::NextResponseFut;
3255}
3256
3257#[derive(Debug, Clone)]
3258pub struct ManifestBytesIteratorProxy {
3259 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
3260}
3261
3262impl fdomain_client::fidl::Proxy for ManifestBytesIteratorProxy {
3263 type Protocol = ManifestBytesIteratorMarker;
3264
3265 fn from_channel(inner: fdomain_client::Channel) -> Self {
3266 Self::new(inner)
3267 }
3268
3269 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
3270 self.client.into_channel().map_err(|client| Self { client })
3271 }
3272
3273 fn as_channel(&self) -> &fdomain_client::Channel {
3274 self.client.as_channel()
3275 }
3276}
3277
3278impl ManifestBytesIteratorProxy {
3279 pub fn new(channel: fdomain_client::Channel) -> Self {
3281 let protocol_name =
3282 <ManifestBytesIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
3283 Self { client: fidl::client::Client::new(channel, protocol_name) }
3284 }
3285
3286 pub fn take_event_stream(&self) -> ManifestBytesIteratorEventStream {
3292 ManifestBytesIteratorEventStream { event_receiver: self.client.take_event_receiver() }
3293 }
3294
3295 pub fn r#next(
3296 &self,
3297 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
3298 ManifestBytesIteratorProxyInterface::r#next(self)
3299 }
3300}
3301
3302impl ManifestBytesIteratorProxyInterface for ManifestBytesIteratorProxy {
3303 type NextResponseFut =
3304 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
3305 fn r#next(&self) -> Self::NextResponseFut {
3306 fn _decode(
3307 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3308 ) -> Result<Vec<u8>, fidl::Error> {
3309 let _response = fidl::client::decode_transaction_body::<
3310 ManifestBytesIteratorNextResponse,
3311 fdomain_client::fidl::FDomainResourceDialect,
3312 0x4be4659549b15500,
3313 >(_buf?)?;
3314 Ok(_response.infos)
3315 }
3316 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
3317 (),
3318 0x4be4659549b15500,
3319 fidl::encoding::DynamicFlags::empty(),
3320 _decode,
3321 )
3322 }
3323}
3324
3325pub struct ManifestBytesIteratorEventStream {
3326 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
3327}
3328
3329impl std::marker::Unpin for ManifestBytesIteratorEventStream {}
3330
3331impl futures::stream::FusedStream for ManifestBytesIteratorEventStream {
3332 fn is_terminated(&self) -> bool {
3333 self.event_receiver.is_terminated()
3334 }
3335}
3336
3337impl futures::Stream for ManifestBytesIteratorEventStream {
3338 type Item = Result<ManifestBytesIteratorEvent, fidl::Error>;
3339
3340 fn poll_next(
3341 mut self: std::pin::Pin<&mut Self>,
3342 cx: &mut std::task::Context<'_>,
3343 ) -> std::task::Poll<Option<Self::Item>> {
3344 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3345 &mut self.event_receiver,
3346 cx
3347 )?) {
3348 Some(buf) => std::task::Poll::Ready(Some(ManifestBytesIteratorEvent::decode(buf))),
3349 None => std::task::Poll::Ready(None),
3350 }
3351 }
3352}
3353
3354#[derive(Debug)]
3355pub enum ManifestBytesIteratorEvent {}
3356
3357impl ManifestBytesIteratorEvent {
3358 fn decode(
3360 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3361 ) -> Result<ManifestBytesIteratorEvent, fidl::Error> {
3362 let (bytes, _handles) = buf.split_mut();
3363 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3364 debug_assert_eq!(tx_header.tx_id, 0);
3365 match tx_header.ordinal {
3366 _ => Err(fidl::Error::UnknownOrdinal {
3367 ordinal: tx_header.ordinal,
3368 protocol_name: <ManifestBytesIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3369 })
3370 }
3371 }
3372}
3373
3374pub struct ManifestBytesIteratorRequestStream {
3376 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3377 is_terminated: bool,
3378}
3379
3380impl std::marker::Unpin for ManifestBytesIteratorRequestStream {}
3381
3382impl futures::stream::FusedStream for ManifestBytesIteratorRequestStream {
3383 fn is_terminated(&self) -> bool {
3384 self.is_terminated
3385 }
3386}
3387
3388impl fdomain_client::fidl::RequestStream for ManifestBytesIteratorRequestStream {
3389 type Protocol = ManifestBytesIteratorMarker;
3390 type ControlHandle = ManifestBytesIteratorControlHandle;
3391
3392 fn from_channel(channel: fdomain_client::Channel) -> Self {
3393 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3394 }
3395
3396 fn control_handle(&self) -> Self::ControlHandle {
3397 ManifestBytesIteratorControlHandle { inner: self.inner.clone() }
3398 }
3399
3400 fn into_inner(
3401 self,
3402 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
3403 {
3404 (self.inner, self.is_terminated)
3405 }
3406
3407 fn from_inner(
3408 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3409 is_terminated: bool,
3410 ) -> Self {
3411 Self { inner, is_terminated }
3412 }
3413}
3414
3415impl futures::Stream for ManifestBytesIteratorRequestStream {
3416 type Item = Result<ManifestBytesIteratorRequest, fidl::Error>;
3417
3418 fn poll_next(
3419 mut self: std::pin::Pin<&mut Self>,
3420 cx: &mut std::task::Context<'_>,
3421 ) -> std::task::Poll<Option<Self::Item>> {
3422 let this = &mut *self;
3423 if this.inner.check_shutdown(cx) {
3424 this.is_terminated = true;
3425 return std::task::Poll::Ready(None);
3426 }
3427 if this.is_terminated {
3428 panic!("polled ManifestBytesIteratorRequestStream after completion");
3429 }
3430 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
3431 |bytes, handles| {
3432 match this.inner.channel().read_etc(cx, bytes, handles) {
3433 std::task::Poll::Ready(Ok(())) => {}
3434 std::task::Poll::Pending => return std::task::Poll::Pending,
3435 std::task::Poll::Ready(Err(None)) => {
3436 this.is_terminated = true;
3437 return std::task::Poll::Ready(None);
3438 }
3439 std::task::Poll::Ready(Err(Some(e))) => {
3440 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3441 e.into(),
3442 ))));
3443 }
3444 }
3445
3446 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3448
3449 std::task::Poll::Ready(Some(match header.ordinal {
3450 0x4be4659549b15500 => {
3451 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3452 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
3453 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3454 let control_handle = ManifestBytesIteratorControlHandle {
3455 inner: this.inner.clone(),
3456 };
3457 Ok(ManifestBytesIteratorRequest::Next {
3458 responder: ManifestBytesIteratorNextResponder {
3459 control_handle: std::mem::ManuallyDrop::new(control_handle),
3460 tx_id: header.tx_id,
3461 },
3462 })
3463 }
3464 _ => Err(fidl::Error::UnknownOrdinal {
3465 ordinal: header.ordinal,
3466 protocol_name: <ManifestBytesIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3467 }),
3468 }))
3469 },
3470 )
3471 }
3472}
3473
3474#[derive(Debug)]
3476pub enum ManifestBytesIteratorRequest {
3477 Next { responder: ManifestBytesIteratorNextResponder },
3478}
3479
3480impl ManifestBytesIteratorRequest {
3481 #[allow(irrefutable_let_patterns)]
3482 pub fn into_next(self) -> Option<(ManifestBytesIteratorNextResponder)> {
3483 if let ManifestBytesIteratorRequest::Next { responder } = self {
3484 Some((responder))
3485 } else {
3486 None
3487 }
3488 }
3489
3490 pub fn method_name(&self) -> &'static str {
3492 match *self {
3493 ManifestBytesIteratorRequest::Next { .. } => "next",
3494 }
3495 }
3496}
3497
3498#[derive(Debug, Clone)]
3499pub struct ManifestBytesIteratorControlHandle {
3500 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3501}
3502
3503impl fdomain_client::fidl::ControlHandle for ManifestBytesIteratorControlHandle {
3504 fn shutdown(&self) {
3505 self.inner.shutdown()
3506 }
3507
3508 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3509 self.inner.shutdown_with_epitaph(status)
3510 }
3511
3512 fn is_closed(&self) -> bool {
3513 self.inner.channel().is_closed()
3514 }
3515 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3516 self.inner.channel().on_closed()
3517 }
3518}
3519
3520impl ManifestBytesIteratorControlHandle {}
3521
3522#[must_use = "FIDL methods require a response to be sent"]
3523#[derive(Debug)]
3524pub struct ManifestBytesIteratorNextResponder {
3525 control_handle: std::mem::ManuallyDrop<ManifestBytesIteratorControlHandle>,
3526 tx_id: u32,
3527}
3528
3529impl std::ops::Drop for ManifestBytesIteratorNextResponder {
3533 fn drop(&mut self) {
3534 self.control_handle.shutdown();
3535 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3537 }
3538}
3539
3540impl fdomain_client::fidl::Responder for ManifestBytesIteratorNextResponder {
3541 type ControlHandle = ManifestBytesIteratorControlHandle;
3542
3543 fn control_handle(&self) -> &ManifestBytesIteratorControlHandle {
3544 &self.control_handle
3545 }
3546
3547 fn drop_without_shutdown(mut self) {
3548 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3550 std::mem::forget(self);
3552 }
3553}
3554
3555impl ManifestBytesIteratorNextResponder {
3556 pub fn send(self, mut infos: &[u8]) -> Result<(), fidl::Error> {
3560 let _result = self.send_raw(infos);
3561 if _result.is_err() {
3562 self.control_handle.shutdown();
3563 }
3564 self.drop_without_shutdown();
3565 _result
3566 }
3567
3568 pub fn send_no_shutdown_on_err(self, mut infos: &[u8]) -> Result<(), fidl::Error> {
3570 let _result = self.send_raw(infos);
3571 self.drop_without_shutdown();
3572 _result
3573 }
3574
3575 fn send_raw(&self, mut infos: &[u8]) -> Result<(), fidl::Error> {
3576 self.control_handle.inner.send::<ManifestBytesIteratorNextResponse>(
3577 (infos,),
3578 self.tx_id,
3579 0x4be4659549b15500,
3580 fidl::encoding::DynamicFlags::empty(),
3581 )
3582 }
3583}
3584
3585#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3586pub struct RealmExplorerMarker;
3587
3588impl fdomain_client::fidl::ProtocolMarker for RealmExplorerMarker {
3589 type Proxy = RealmExplorerProxy;
3590 type RequestStream = RealmExplorerRequestStream;
3591
3592 const DEBUG_NAME: &'static str = "fuchsia.sys2.RealmExplorer";
3593}
3594impl fdomain_client::fidl::DiscoverableProtocolMarker for RealmExplorerMarker {}
3595
3596pub trait RealmExplorerProxyInterface: Send + Sync {}
3597
3598#[derive(Debug, Clone)]
3599pub struct RealmExplorerProxy {
3600 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
3601}
3602
3603impl fdomain_client::fidl::Proxy for RealmExplorerProxy {
3604 type Protocol = RealmExplorerMarker;
3605
3606 fn from_channel(inner: fdomain_client::Channel) -> Self {
3607 Self::new(inner)
3608 }
3609
3610 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
3611 self.client.into_channel().map_err(|client| Self { client })
3612 }
3613
3614 fn as_channel(&self) -> &fdomain_client::Channel {
3615 self.client.as_channel()
3616 }
3617}
3618
3619impl RealmExplorerProxy {
3620 pub fn new(channel: fdomain_client::Channel) -> Self {
3622 let protocol_name =
3623 <RealmExplorerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
3624 Self { client: fidl::client::Client::new(channel, protocol_name) }
3625 }
3626
3627 pub fn take_event_stream(&self) -> RealmExplorerEventStream {
3633 RealmExplorerEventStream { event_receiver: self.client.take_event_receiver() }
3634 }
3635}
3636
3637impl RealmExplorerProxyInterface for RealmExplorerProxy {}
3638
3639pub struct RealmExplorerEventStream {
3640 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
3641}
3642
3643impl std::marker::Unpin for RealmExplorerEventStream {}
3644
3645impl futures::stream::FusedStream for RealmExplorerEventStream {
3646 fn is_terminated(&self) -> bool {
3647 self.event_receiver.is_terminated()
3648 }
3649}
3650
3651impl futures::Stream for RealmExplorerEventStream {
3652 type Item = Result<RealmExplorerEvent, fidl::Error>;
3653
3654 fn poll_next(
3655 mut self: std::pin::Pin<&mut Self>,
3656 cx: &mut std::task::Context<'_>,
3657 ) -> std::task::Poll<Option<Self::Item>> {
3658 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3659 &mut self.event_receiver,
3660 cx
3661 )?) {
3662 Some(buf) => std::task::Poll::Ready(Some(RealmExplorerEvent::decode(buf))),
3663 None => std::task::Poll::Ready(None),
3664 }
3665 }
3666}
3667
3668#[derive(Debug)]
3669pub enum RealmExplorerEvent {}
3670
3671impl RealmExplorerEvent {
3672 fn decode(
3674 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3675 ) -> Result<RealmExplorerEvent, fidl::Error> {
3676 let (bytes, _handles) = buf.split_mut();
3677 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3678 debug_assert_eq!(tx_header.tx_id, 0);
3679 match tx_header.ordinal {
3680 _ => Err(fidl::Error::UnknownOrdinal {
3681 ordinal: tx_header.ordinal,
3682 protocol_name:
3683 <RealmExplorerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3684 }),
3685 }
3686 }
3687}
3688
3689pub struct RealmExplorerRequestStream {
3691 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3692 is_terminated: bool,
3693}
3694
3695impl std::marker::Unpin for RealmExplorerRequestStream {}
3696
3697impl futures::stream::FusedStream for RealmExplorerRequestStream {
3698 fn is_terminated(&self) -> bool {
3699 self.is_terminated
3700 }
3701}
3702
3703impl fdomain_client::fidl::RequestStream for RealmExplorerRequestStream {
3704 type Protocol = RealmExplorerMarker;
3705 type ControlHandle = RealmExplorerControlHandle;
3706
3707 fn from_channel(channel: fdomain_client::Channel) -> Self {
3708 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3709 }
3710
3711 fn control_handle(&self) -> Self::ControlHandle {
3712 RealmExplorerControlHandle { inner: self.inner.clone() }
3713 }
3714
3715 fn into_inner(
3716 self,
3717 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
3718 {
3719 (self.inner, self.is_terminated)
3720 }
3721
3722 fn from_inner(
3723 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3724 is_terminated: bool,
3725 ) -> Self {
3726 Self { inner, is_terminated }
3727 }
3728}
3729
3730impl futures::Stream for RealmExplorerRequestStream {
3731 type Item = Result<RealmExplorerRequest, fidl::Error>;
3732
3733 fn poll_next(
3734 mut self: std::pin::Pin<&mut Self>,
3735 cx: &mut std::task::Context<'_>,
3736 ) -> std::task::Poll<Option<Self::Item>> {
3737 let this = &mut *self;
3738 if this.inner.check_shutdown(cx) {
3739 this.is_terminated = true;
3740 return std::task::Poll::Ready(None);
3741 }
3742 if this.is_terminated {
3743 panic!("polled RealmExplorerRequestStream after completion");
3744 }
3745 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
3746 |bytes, handles| {
3747 match this.inner.channel().read_etc(cx, bytes, handles) {
3748 std::task::Poll::Ready(Ok(())) => {}
3749 std::task::Poll::Pending => return std::task::Poll::Pending,
3750 std::task::Poll::Ready(Err(None)) => {
3751 this.is_terminated = true;
3752 return std::task::Poll::Ready(None);
3753 }
3754 std::task::Poll::Ready(Err(Some(e))) => {
3755 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3756 e.into(),
3757 ))));
3758 }
3759 }
3760
3761 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3763
3764 std::task::Poll::Ready(Some(match header.ordinal {
3765 _ => Err(fidl::Error::UnknownOrdinal {
3766 ordinal: header.ordinal,
3767 protocol_name: <RealmExplorerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3768 }),
3769 }))
3770 },
3771 )
3772 }
3773}
3774
3775#[derive(Debug)]
3777pub enum RealmExplorerRequest {}
3778
3779impl RealmExplorerRequest {
3780 pub fn method_name(&self) -> &'static str {
3782 match *self {}
3783 }
3784}
3785
3786#[derive(Debug, Clone)]
3787pub struct RealmExplorerControlHandle {
3788 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3789}
3790
3791impl fdomain_client::fidl::ControlHandle for RealmExplorerControlHandle {
3792 fn shutdown(&self) {
3793 self.inner.shutdown()
3794 }
3795
3796 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3797 self.inner.shutdown_with_epitaph(status)
3798 }
3799
3800 fn is_closed(&self) -> bool {
3801 self.inner.channel().is_closed()
3802 }
3803 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3804 self.inner.channel().on_closed()
3805 }
3806}
3807
3808impl RealmExplorerControlHandle {}
3809
3810#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3811pub struct RealmQueryMarker;
3812
3813impl fdomain_client::fidl::ProtocolMarker for RealmQueryMarker {
3814 type Proxy = RealmQueryProxy;
3815 type RequestStream = RealmQueryRequestStream;
3816
3817 const DEBUG_NAME: &'static str = "fuchsia.sys2.RealmQuery";
3818}
3819impl fdomain_client::fidl::DiscoverableProtocolMarker for RealmQueryMarker {}
3820pub type RealmQueryGetInstanceResult = Result<Instance, GetInstanceError>;
3821pub type RealmQueryGetResolvedDeclarationResult =
3822 Result<fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>, GetDeclarationError>;
3823pub type RealmQueryResolveDeclarationResult =
3824 Result<fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>, GetDeclarationError>;
3825pub type RealmQueryGetStructuredConfigResult =
3826 Result<fdomain_fuchsia_component_decl::ResolvedConfig, GetStructuredConfigError>;
3827pub type RealmQueryGetAllInstancesResult =
3828 Result<fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>, GetAllInstancesError>;
3829pub type RealmQueryConstructNamespaceResult =
3830 Result<Vec<fdomain_fuchsia_component_runner::ComponentNamespaceEntry>, ConstructNamespaceError>;
3831pub type RealmQueryOpenDirectoryResult = Result<(), OpenError>;
3832pub type RealmQueryConnectToStorageAdminResult = Result<(), ConnectToStorageAdminError>;
3833
3834pub trait RealmQueryProxyInterface: Send + Sync {
3835 type GetInstanceResponseFut: std::future::Future<Output = Result<RealmQueryGetInstanceResult, fidl::Error>>
3836 + Send;
3837 fn r#get_instance(&self, moniker: &str) -> Self::GetInstanceResponseFut;
3838 type GetResolvedDeclarationResponseFut: std::future::Future<Output = Result<RealmQueryGetResolvedDeclarationResult, fidl::Error>>
3839 + Send;
3840 fn r#get_resolved_declaration(&self, moniker: &str) -> Self::GetResolvedDeclarationResponseFut;
3841 type ResolveDeclarationResponseFut: std::future::Future<Output = Result<RealmQueryResolveDeclarationResult, fidl::Error>>
3842 + Send;
3843 fn r#resolve_declaration(
3844 &self,
3845 parent: &str,
3846 child_location: &ChildLocation,
3847 url: &str,
3848 ) -> Self::ResolveDeclarationResponseFut;
3849 type GetStructuredConfigResponseFut: std::future::Future<Output = Result<RealmQueryGetStructuredConfigResult, fidl::Error>>
3850 + Send;
3851 fn r#get_structured_config(&self, moniker: &str) -> Self::GetStructuredConfigResponseFut;
3852 type GetAllInstancesResponseFut: std::future::Future<Output = Result<RealmQueryGetAllInstancesResult, fidl::Error>>
3853 + Send;
3854 fn r#get_all_instances(&self) -> Self::GetAllInstancesResponseFut;
3855 type ConstructNamespaceResponseFut: std::future::Future<Output = Result<RealmQueryConstructNamespaceResult, fidl::Error>>
3856 + Send;
3857 fn r#construct_namespace(&self, moniker: &str) -> Self::ConstructNamespaceResponseFut;
3858 type OpenDirectoryResponseFut: std::future::Future<Output = Result<RealmQueryOpenDirectoryResult, fidl::Error>>
3859 + Send;
3860 fn r#open_directory(
3861 &self,
3862 moniker: &str,
3863 dir_type: OpenDirType,
3864 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
3865 ) -> Self::OpenDirectoryResponseFut;
3866 type ConnectToStorageAdminResponseFut: std::future::Future<Output = Result<RealmQueryConnectToStorageAdminResult, fidl::Error>>
3867 + Send;
3868 fn r#connect_to_storage_admin(
3869 &self,
3870 moniker: &str,
3871 storage_name: &str,
3872 server_end: fdomain_client::fidl::ServerEnd<StorageAdminMarker>,
3873 ) -> Self::ConnectToStorageAdminResponseFut;
3874}
3875
3876#[derive(Debug, Clone)]
3877pub struct RealmQueryProxy {
3878 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
3879}
3880
3881impl fdomain_client::fidl::Proxy for RealmQueryProxy {
3882 type Protocol = RealmQueryMarker;
3883
3884 fn from_channel(inner: fdomain_client::Channel) -> Self {
3885 Self::new(inner)
3886 }
3887
3888 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
3889 self.client.into_channel().map_err(|client| Self { client })
3890 }
3891
3892 fn as_channel(&self) -> &fdomain_client::Channel {
3893 self.client.as_channel()
3894 }
3895}
3896
3897impl RealmQueryProxy {
3898 pub fn new(channel: fdomain_client::Channel) -> Self {
3900 let protocol_name = <RealmQueryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
3901 Self { client: fidl::client::Client::new(channel, protocol_name) }
3902 }
3903
3904 pub fn take_event_stream(&self) -> RealmQueryEventStream {
3910 RealmQueryEventStream { event_receiver: self.client.take_event_receiver() }
3911 }
3912
3913 pub fn r#get_instance(
3915 &self,
3916 mut moniker: &str,
3917 ) -> fidl::client::QueryResponseFut<
3918 RealmQueryGetInstanceResult,
3919 fdomain_client::fidl::FDomainResourceDialect,
3920 > {
3921 RealmQueryProxyInterface::r#get_instance(self, moniker)
3922 }
3923
3924 pub fn r#get_resolved_declaration(
3931 &self,
3932 mut moniker: &str,
3933 ) -> fidl::client::QueryResponseFut<
3934 RealmQueryGetResolvedDeclarationResult,
3935 fdomain_client::fidl::FDomainResourceDialect,
3936 > {
3937 RealmQueryProxyInterface::r#get_resolved_declaration(self, moniker)
3938 }
3939
3940 pub fn r#resolve_declaration(
3948 &self,
3949 mut parent: &str,
3950 mut child_location: &ChildLocation,
3951 mut url: &str,
3952 ) -> fidl::client::QueryResponseFut<
3953 RealmQueryResolveDeclarationResult,
3954 fdomain_client::fidl::FDomainResourceDialect,
3955 > {
3956 RealmQueryProxyInterface::r#resolve_declaration(self, parent, child_location, url)
3957 }
3958
3959 pub fn r#get_structured_config(
3961 &self,
3962 mut moniker: &str,
3963 ) -> fidl::client::QueryResponseFut<
3964 RealmQueryGetStructuredConfigResult,
3965 fdomain_client::fidl::FDomainResourceDialect,
3966 > {
3967 RealmQueryProxyInterface::r#get_structured_config(self, moniker)
3968 }
3969
3970 pub fn r#get_all_instances(
3974 &self,
3975 ) -> fidl::client::QueryResponseFut<
3976 RealmQueryGetAllInstancesResult,
3977 fdomain_client::fidl::FDomainResourceDialect,
3978 > {
3979 RealmQueryProxyInterface::r#get_all_instances(self)
3980 }
3981
3982 pub fn r#construct_namespace(
3987 &self,
3988 mut moniker: &str,
3989 ) -> fidl::client::QueryResponseFut<
3990 RealmQueryConstructNamespaceResult,
3991 fdomain_client::fidl::FDomainResourceDialect,
3992 > {
3993 RealmQueryProxyInterface::r#construct_namespace(self, moniker)
3994 }
3995
3996 pub fn r#open_directory(
3998 &self,
3999 mut moniker: &str,
4000 mut dir_type: OpenDirType,
4001 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4002 ) -> fidl::client::QueryResponseFut<
4003 RealmQueryOpenDirectoryResult,
4004 fdomain_client::fidl::FDomainResourceDialect,
4005 > {
4006 RealmQueryProxyInterface::r#open_directory(self, moniker, dir_type, object)
4007 }
4008
4009 pub fn r#connect_to_storage_admin(
4011 &self,
4012 mut moniker: &str,
4013 mut storage_name: &str,
4014 mut server_end: fdomain_client::fidl::ServerEnd<StorageAdminMarker>,
4015 ) -> fidl::client::QueryResponseFut<
4016 RealmQueryConnectToStorageAdminResult,
4017 fdomain_client::fidl::FDomainResourceDialect,
4018 > {
4019 RealmQueryProxyInterface::r#connect_to_storage_admin(
4020 self,
4021 moniker,
4022 storage_name,
4023 server_end,
4024 )
4025 }
4026}
4027
4028impl RealmQueryProxyInterface for RealmQueryProxy {
4029 type GetInstanceResponseFut = fidl::client::QueryResponseFut<
4030 RealmQueryGetInstanceResult,
4031 fdomain_client::fidl::FDomainResourceDialect,
4032 >;
4033 fn r#get_instance(&self, mut moniker: &str) -> Self::GetInstanceResponseFut {
4034 fn _decode(
4035 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4036 ) -> Result<RealmQueryGetInstanceResult, fidl::Error> {
4037 let _response = fidl::client::decode_transaction_body::<
4038 fidl::encoding::ResultType<RealmQueryGetInstanceResponse, GetInstanceError>,
4039 fdomain_client::fidl::FDomainResourceDialect,
4040 0x3496ca1e5a0c13a8,
4041 >(_buf?)?;
4042 Ok(_response.map(|x| x.instance))
4043 }
4044 self.client
4045 .send_query_and_decode::<RealmQueryGetInstanceRequest, RealmQueryGetInstanceResult>(
4046 (moniker,),
4047 0x3496ca1e5a0c13a8,
4048 fidl::encoding::DynamicFlags::empty(),
4049 _decode,
4050 )
4051 }
4052
4053 type GetResolvedDeclarationResponseFut = fidl::client::QueryResponseFut<
4054 RealmQueryGetResolvedDeclarationResult,
4055 fdomain_client::fidl::FDomainResourceDialect,
4056 >;
4057 fn r#get_resolved_declaration(
4058 &self,
4059 mut moniker: &str,
4060 ) -> Self::GetResolvedDeclarationResponseFut {
4061 fn _decode(
4062 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4063 ) -> Result<RealmQueryGetResolvedDeclarationResult, fidl::Error> {
4064 let _response = fidl::client::decode_transaction_body::<
4065 fidl::encoding::ResultType<
4066 RealmQueryGetResolvedDeclarationResponse,
4067 GetDeclarationError,
4068 >,
4069 fdomain_client::fidl::FDomainResourceDialect,
4070 0x31a493d284a0bc1f,
4071 >(_buf?)?;
4072 Ok(_response.map(|x| x.iterator))
4073 }
4074 self.client.send_query_and_decode::<
4075 RealmQueryGetResolvedDeclarationRequest,
4076 RealmQueryGetResolvedDeclarationResult,
4077 >(
4078 (moniker,),
4079 0x31a493d284a0bc1f,
4080 fidl::encoding::DynamicFlags::empty(),
4081 _decode,
4082 )
4083 }
4084
4085 type ResolveDeclarationResponseFut = fidl::client::QueryResponseFut<
4086 RealmQueryResolveDeclarationResult,
4087 fdomain_client::fidl::FDomainResourceDialect,
4088 >;
4089 fn r#resolve_declaration(
4090 &self,
4091 mut parent: &str,
4092 mut child_location: &ChildLocation,
4093 mut url: &str,
4094 ) -> Self::ResolveDeclarationResponseFut {
4095 fn _decode(
4096 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4097 ) -> Result<RealmQueryResolveDeclarationResult, fidl::Error> {
4098 let _response = fidl::client::decode_transaction_body::<
4099 fidl::encoding::ResultType<
4100 RealmQueryResolveDeclarationResponse,
4101 GetDeclarationError,
4102 >,
4103 fdomain_client::fidl::FDomainResourceDialect,
4104 0x1ab1adf2a87d962d,
4105 >(_buf?)?;
4106 Ok(_response.map(|x| x.iterator))
4107 }
4108 self.client.send_query_and_decode::<
4109 RealmQueryResolveDeclarationRequest,
4110 RealmQueryResolveDeclarationResult,
4111 >(
4112 (parent, child_location, url,),
4113 0x1ab1adf2a87d962d,
4114 fidl::encoding::DynamicFlags::empty(),
4115 _decode,
4116 )
4117 }
4118
4119 type GetStructuredConfigResponseFut = fidl::client::QueryResponseFut<
4120 RealmQueryGetStructuredConfigResult,
4121 fdomain_client::fidl::FDomainResourceDialect,
4122 >;
4123 fn r#get_structured_config(&self, mut moniker: &str) -> Self::GetStructuredConfigResponseFut {
4124 fn _decode(
4125 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4126 ) -> Result<RealmQueryGetStructuredConfigResult, fidl::Error> {
4127 let _response = fidl::client::decode_transaction_body::<
4128 fidl::encoding::ResultType<
4129 RealmQueryGetStructuredConfigResponse,
4130 GetStructuredConfigError,
4131 >,
4132 fdomain_client::fidl::FDomainResourceDialect,
4133 0x16f88f6735bd204,
4134 >(_buf?)?;
4135 Ok(_response.map(|x| x.config))
4136 }
4137 self.client.send_query_and_decode::<
4138 RealmQueryGetStructuredConfigRequest,
4139 RealmQueryGetStructuredConfigResult,
4140 >(
4141 (moniker,),
4142 0x16f88f6735bd204,
4143 fidl::encoding::DynamicFlags::empty(),
4144 _decode,
4145 )
4146 }
4147
4148 type GetAllInstancesResponseFut = fidl::client::QueryResponseFut<
4149 RealmQueryGetAllInstancesResult,
4150 fdomain_client::fidl::FDomainResourceDialect,
4151 >;
4152 fn r#get_all_instances(&self) -> Self::GetAllInstancesResponseFut {
4153 fn _decode(
4154 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4155 ) -> Result<RealmQueryGetAllInstancesResult, fidl::Error> {
4156 let _response = fidl::client::decode_transaction_body::<
4157 fidl::encoding::ResultType<RealmQueryGetAllInstancesResponse, GetAllInstancesError>,
4158 fdomain_client::fidl::FDomainResourceDialect,
4159 0x7b5a8775d30cad47,
4160 >(_buf?)?;
4161 Ok(_response.map(|x| x.iterator))
4162 }
4163 self.client
4164 .send_query_and_decode::<fidl::encoding::EmptyPayload, RealmQueryGetAllInstancesResult>(
4165 (),
4166 0x7b5a8775d30cad47,
4167 fidl::encoding::DynamicFlags::empty(),
4168 _decode,
4169 )
4170 }
4171
4172 type ConstructNamespaceResponseFut = fidl::client::QueryResponseFut<
4173 RealmQueryConstructNamespaceResult,
4174 fdomain_client::fidl::FDomainResourceDialect,
4175 >;
4176 fn r#construct_namespace(&self, mut moniker: &str) -> Self::ConstructNamespaceResponseFut {
4177 fn _decode(
4178 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4179 ) -> Result<RealmQueryConstructNamespaceResult, fidl::Error> {
4180 let _response = fidl::client::decode_transaction_body::<
4181 fidl::encoding::ResultType<
4182 RealmQueryConstructNamespaceResponse,
4183 ConstructNamespaceError,
4184 >,
4185 fdomain_client::fidl::FDomainResourceDialect,
4186 0x5ecb29c02c488eeb,
4187 >(_buf?)?;
4188 Ok(_response.map(|x| x.namespace))
4189 }
4190 self.client.send_query_and_decode::<
4191 RealmQueryConstructNamespaceRequest,
4192 RealmQueryConstructNamespaceResult,
4193 >(
4194 (moniker,),
4195 0x5ecb29c02c488eeb,
4196 fidl::encoding::DynamicFlags::empty(),
4197 _decode,
4198 )
4199 }
4200
4201 type OpenDirectoryResponseFut = fidl::client::QueryResponseFut<
4202 RealmQueryOpenDirectoryResult,
4203 fdomain_client::fidl::FDomainResourceDialect,
4204 >;
4205 fn r#open_directory(
4206 &self,
4207 mut moniker: &str,
4208 mut dir_type: OpenDirType,
4209 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4210 ) -> Self::OpenDirectoryResponseFut {
4211 fn _decode(
4212 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4213 ) -> Result<RealmQueryOpenDirectoryResult, fidl::Error> {
4214 let _response = fidl::client::decode_transaction_body::<
4215 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, OpenError>,
4216 fdomain_client::fidl::FDomainResourceDialect,
4217 0x333d68f1deecec85,
4218 >(_buf?)?;
4219 Ok(_response.map(|x| x))
4220 }
4221 self.client
4222 .send_query_and_decode::<RealmQueryOpenDirectoryRequest, RealmQueryOpenDirectoryResult>(
4223 (moniker, dir_type, object),
4224 0x333d68f1deecec85,
4225 fidl::encoding::DynamicFlags::empty(),
4226 _decode,
4227 )
4228 }
4229
4230 type ConnectToStorageAdminResponseFut = fidl::client::QueryResponseFut<
4231 RealmQueryConnectToStorageAdminResult,
4232 fdomain_client::fidl::FDomainResourceDialect,
4233 >;
4234 fn r#connect_to_storage_admin(
4235 &self,
4236 mut moniker: &str,
4237 mut storage_name: &str,
4238 mut server_end: fdomain_client::fidl::ServerEnd<StorageAdminMarker>,
4239 ) -> Self::ConnectToStorageAdminResponseFut {
4240 fn _decode(
4241 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4242 ) -> Result<RealmQueryConnectToStorageAdminResult, fidl::Error> {
4243 let _response = fidl::client::decode_transaction_body::<
4244 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, ConnectToStorageAdminError>,
4245 fdomain_client::fidl::FDomainResourceDialect,
4246 0x7807e6b4f623ace,
4247 >(_buf?)?;
4248 Ok(_response.map(|x| x))
4249 }
4250 self.client.send_query_and_decode::<
4251 RealmQueryConnectToStorageAdminRequest,
4252 RealmQueryConnectToStorageAdminResult,
4253 >(
4254 (moniker, storage_name, server_end,),
4255 0x7807e6b4f623ace,
4256 fidl::encoding::DynamicFlags::empty(),
4257 _decode,
4258 )
4259 }
4260}
4261
4262pub struct RealmQueryEventStream {
4263 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4264}
4265
4266impl std::marker::Unpin for RealmQueryEventStream {}
4267
4268impl futures::stream::FusedStream for RealmQueryEventStream {
4269 fn is_terminated(&self) -> bool {
4270 self.event_receiver.is_terminated()
4271 }
4272}
4273
4274impl futures::Stream for RealmQueryEventStream {
4275 type Item = Result<RealmQueryEvent, fidl::Error>;
4276
4277 fn poll_next(
4278 mut self: std::pin::Pin<&mut Self>,
4279 cx: &mut std::task::Context<'_>,
4280 ) -> std::task::Poll<Option<Self::Item>> {
4281 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4282 &mut self.event_receiver,
4283 cx
4284 )?) {
4285 Some(buf) => std::task::Poll::Ready(Some(RealmQueryEvent::decode(buf))),
4286 None => std::task::Poll::Ready(None),
4287 }
4288 }
4289}
4290
4291#[derive(Debug)]
4292pub enum RealmQueryEvent {}
4293
4294impl RealmQueryEvent {
4295 fn decode(
4297 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4298 ) -> Result<RealmQueryEvent, fidl::Error> {
4299 let (bytes, _handles) = buf.split_mut();
4300 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4301 debug_assert_eq!(tx_header.tx_id, 0);
4302 match tx_header.ordinal {
4303 _ => Err(fidl::Error::UnknownOrdinal {
4304 ordinal: tx_header.ordinal,
4305 protocol_name:
4306 <RealmQueryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4307 }),
4308 }
4309 }
4310}
4311
4312pub struct RealmQueryRequestStream {
4314 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4315 is_terminated: bool,
4316}
4317
4318impl std::marker::Unpin for RealmQueryRequestStream {}
4319
4320impl futures::stream::FusedStream for RealmQueryRequestStream {
4321 fn is_terminated(&self) -> bool {
4322 self.is_terminated
4323 }
4324}
4325
4326impl fdomain_client::fidl::RequestStream for RealmQueryRequestStream {
4327 type Protocol = RealmQueryMarker;
4328 type ControlHandle = RealmQueryControlHandle;
4329
4330 fn from_channel(channel: fdomain_client::Channel) -> Self {
4331 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4332 }
4333
4334 fn control_handle(&self) -> Self::ControlHandle {
4335 RealmQueryControlHandle { inner: self.inner.clone() }
4336 }
4337
4338 fn into_inner(
4339 self,
4340 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4341 {
4342 (self.inner, self.is_terminated)
4343 }
4344
4345 fn from_inner(
4346 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4347 is_terminated: bool,
4348 ) -> Self {
4349 Self { inner, is_terminated }
4350 }
4351}
4352
4353impl futures::Stream for RealmQueryRequestStream {
4354 type Item = Result<RealmQueryRequest, fidl::Error>;
4355
4356 fn poll_next(
4357 mut self: std::pin::Pin<&mut Self>,
4358 cx: &mut std::task::Context<'_>,
4359 ) -> std::task::Poll<Option<Self::Item>> {
4360 let this = &mut *self;
4361 if this.inner.check_shutdown(cx) {
4362 this.is_terminated = true;
4363 return std::task::Poll::Ready(None);
4364 }
4365 if this.is_terminated {
4366 panic!("polled RealmQueryRequestStream after completion");
4367 }
4368 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4369 |bytes, handles| {
4370 match this.inner.channel().read_etc(cx, bytes, handles) {
4371 std::task::Poll::Ready(Ok(())) => {}
4372 std::task::Poll::Pending => return std::task::Poll::Pending,
4373 std::task::Poll::Ready(Err(None)) => {
4374 this.is_terminated = true;
4375 return std::task::Poll::Ready(None);
4376 }
4377 std::task::Poll::Ready(Err(Some(e))) => {
4378 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4379 e.into(),
4380 ))));
4381 }
4382 }
4383
4384 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4386
4387 std::task::Poll::Ready(Some(match header.ordinal {
4388 0x3496ca1e5a0c13a8 => {
4389 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4390 let mut req = fidl::new_empty!(
4391 RealmQueryGetInstanceRequest,
4392 fdomain_client::fidl::FDomainResourceDialect
4393 );
4394 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryGetInstanceRequest>(&header, _body_bytes, handles, &mut req)?;
4395 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4396 Ok(RealmQueryRequest::GetInstance {
4397 moniker: req.moniker,
4398
4399 responder: RealmQueryGetInstanceResponder {
4400 control_handle: std::mem::ManuallyDrop::new(control_handle),
4401 tx_id: header.tx_id,
4402 },
4403 })
4404 }
4405 0x31a493d284a0bc1f => {
4406 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4407 let mut req = fidl::new_empty!(
4408 RealmQueryGetResolvedDeclarationRequest,
4409 fdomain_client::fidl::FDomainResourceDialect
4410 );
4411 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryGetResolvedDeclarationRequest>(&header, _body_bytes, handles, &mut req)?;
4412 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4413 Ok(RealmQueryRequest::GetResolvedDeclaration {
4414 moniker: req.moniker,
4415
4416 responder: RealmQueryGetResolvedDeclarationResponder {
4417 control_handle: std::mem::ManuallyDrop::new(control_handle),
4418 tx_id: header.tx_id,
4419 },
4420 })
4421 }
4422 0x1ab1adf2a87d962d => {
4423 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4424 let mut req = fidl::new_empty!(
4425 RealmQueryResolveDeclarationRequest,
4426 fdomain_client::fidl::FDomainResourceDialect
4427 );
4428 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryResolveDeclarationRequest>(&header, _body_bytes, handles, &mut req)?;
4429 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4430 Ok(RealmQueryRequest::ResolveDeclaration {
4431 parent: req.parent,
4432 child_location: req.child_location,
4433 url: req.url,
4434
4435 responder: RealmQueryResolveDeclarationResponder {
4436 control_handle: std::mem::ManuallyDrop::new(control_handle),
4437 tx_id: header.tx_id,
4438 },
4439 })
4440 }
4441 0x16f88f6735bd204 => {
4442 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4443 let mut req = fidl::new_empty!(
4444 RealmQueryGetStructuredConfigRequest,
4445 fdomain_client::fidl::FDomainResourceDialect
4446 );
4447 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryGetStructuredConfigRequest>(&header, _body_bytes, handles, &mut req)?;
4448 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4449 Ok(RealmQueryRequest::GetStructuredConfig {
4450 moniker: req.moniker,
4451
4452 responder: RealmQueryGetStructuredConfigResponder {
4453 control_handle: std::mem::ManuallyDrop::new(control_handle),
4454 tx_id: header.tx_id,
4455 },
4456 })
4457 }
4458 0x7b5a8775d30cad47 => {
4459 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4460 let mut req = fidl::new_empty!(
4461 fidl::encoding::EmptyPayload,
4462 fdomain_client::fidl::FDomainResourceDialect
4463 );
4464 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4465 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4466 Ok(RealmQueryRequest::GetAllInstances {
4467 responder: RealmQueryGetAllInstancesResponder {
4468 control_handle: std::mem::ManuallyDrop::new(control_handle),
4469 tx_id: header.tx_id,
4470 },
4471 })
4472 }
4473 0x5ecb29c02c488eeb => {
4474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4475 let mut req = fidl::new_empty!(
4476 RealmQueryConstructNamespaceRequest,
4477 fdomain_client::fidl::FDomainResourceDialect
4478 );
4479 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryConstructNamespaceRequest>(&header, _body_bytes, handles, &mut req)?;
4480 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4481 Ok(RealmQueryRequest::ConstructNamespace {
4482 moniker: req.moniker,
4483
4484 responder: RealmQueryConstructNamespaceResponder {
4485 control_handle: std::mem::ManuallyDrop::new(control_handle),
4486 tx_id: header.tx_id,
4487 },
4488 })
4489 }
4490 0x333d68f1deecec85 => {
4491 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4492 let mut req = fidl::new_empty!(
4493 RealmQueryOpenDirectoryRequest,
4494 fdomain_client::fidl::FDomainResourceDialect
4495 );
4496 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryOpenDirectoryRequest>(&header, _body_bytes, handles, &mut req)?;
4497 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4498 Ok(RealmQueryRequest::OpenDirectory {
4499 moniker: req.moniker,
4500 dir_type: req.dir_type,
4501 object: req.object,
4502
4503 responder: RealmQueryOpenDirectoryResponder {
4504 control_handle: std::mem::ManuallyDrop::new(control_handle),
4505 tx_id: header.tx_id,
4506 },
4507 })
4508 }
4509 0x7807e6b4f623ace => {
4510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4511 let mut req = fidl::new_empty!(
4512 RealmQueryConnectToStorageAdminRequest,
4513 fdomain_client::fidl::FDomainResourceDialect
4514 );
4515 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmQueryConnectToStorageAdminRequest>(&header, _body_bytes, handles, &mut req)?;
4516 let control_handle = RealmQueryControlHandle { inner: this.inner.clone() };
4517 Ok(RealmQueryRequest::ConnectToStorageAdmin {
4518 moniker: req.moniker,
4519 storage_name: req.storage_name,
4520 server_end: req.server_end,
4521
4522 responder: RealmQueryConnectToStorageAdminResponder {
4523 control_handle: std::mem::ManuallyDrop::new(control_handle),
4524 tx_id: header.tx_id,
4525 },
4526 })
4527 }
4528 _ => Err(fidl::Error::UnknownOrdinal {
4529 ordinal: header.ordinal,
4530 protocol_name:
4531 <RealmQueryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4532 }),
4533 }))
4534 },
4535 )
4536 }
4537}
4538
4539#[derive(Debug)]
4541pub enum RealmQueryRequest {
4542 GetInstance { moniker: String, responder: RealmQueryGetInstanceResponder },
4544 GetResolvedDeclaration { moniker: String, responder: RealmQueryGetResolvedDeclarationResponder },
4551 ResolveDeclaration {
4559 parent: String,
4560 child_location: ChildLocation,
4561 url: String,
4562 responder: RealmQueryResolveDeclarationResponder,
4563 },
4564 GetStructuredConfig { moniker: String, responder: RealmQueryGetStructuredConfigResponder },
4566 GetAllInstances { responder: RealmQueryGetAllInstancesResponder },
4570 ConstructNamespace { moniker: String, responder: RealmQueryConstructNamespaceResponder },
4575 OpenDirectory {
4577 moniker: String,
4578 dir_type: OpenDirType,
4579 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4580 responder: RealmQueryOpenDirectoryResponder,
4581 },
4582 ConnectToStorageAdmin {
4584 moniker: String,
4585 storage_name: String,
4586 server_end: fdomain_client::fidl::ServerEnd<StorageAdminMarker>,
4587 responder: RealmQueryConnectToStorageAdminResponder,
4588 },
4589}
4590
4591impl RealmQueryRequest {
4592 #[allow(irrefutable_let_patterns)]
4593 pub fn into_get_instance(self) -> Option<(String, RealmQueryGetInstanceResponder)> {
4594 if let RealmQueryRequest::GetInstance { moniker, responder } = self {
4595 Some((moniker, responder))
4596 } else {
4597 None
4598 }
4599 }
4600
4601 #[allow(irrefutable_let_patterns)]
4602 pub fn into_get_resolved_declaration(
4603 self,
4604 ) -> Option<(String, RealmQueryGetResolvedDeclarationResponder)> {
4605 if let RealmQueryRequest::GetResolvedDeclaration { moniker, responder } = self {
4606 Some((moniker, responder))
4607 } else {
4608 None
4609 }
4610 }
4611
4612 #[allow(irrefutable_let_patterns)]
4613 pub fn into_resolve_declaration(
4614 self,
4615 ) -> Option<(String, ChildLocation, String, RealmQueryResolveDeclarationResponder)> {
4616 if let RealmQueryRequest::ResolveDeclaration { parent, child_location, url, responder } =
4617 self
4618 {
4619 Some((parent, child_location, url, responder))
4620 } else {
4621 None
4622 }
4623 }
4624
4625 #[allow(irrefutable_let_patterns)]
4626 pub fn into_get_structured_config(
4627 self,
4628 ) -> Option<(String, RealmQueryGetStructuredConfigResponder)> {
4629 if let RealmQueryRequest::GetStructuredConfig { moniker, responder } = self {
4630 Some((moniker, responder))
4631 } else {
4632 None
4633 }
4634 }
4635
4636 #[allow(irrefutable_let_patterns)]
4637 pub fn into_get_all_instances(self) -> Option<(RealmQueryGetAllInstancesResponder)> {
4638 if let RealmQueryRequest::GetAllInstances { responder } = self {
4639 Some((responder))
4640 } else {
4641 None
4642 }
4643 }
4644
4645 #[allow(irrefutable_let_patterns)]
4646 pub fn into_construct_namespace(
4647 self,
4648 ) -> Option<(String, RealmQueryConstructNamespaceResponder)> {
4649 if let RealmQueryRequest::ConstructNamespace { moniker, responder } = self {
4650 Some((moniker, responder))
4651 } else {
4652 None
4653 }
4654 }
4655
4656 #[allow(irrefutable_let_patterns)]
4657 pub fn into_open_directory(
4658 self,
4659 ) -> Option<(
4660 String,
4661 OpenDirType,
4662 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4663 RealmQueryOpenDirectoryResponder,
4664 )> {
4665 if let RealmQueryRequest::OpenDirectory { moniker, dir_type, object, responder } = self {
4666 Some((moniker, dir_type, object, responder))
4667 } else {
4668 None
4669 }
4670 }
4671
4672 #[allow(irrefutable_let_patterns)]
4673 pub fn into_connect_to_storage_admin(
4674 self,
4675 ) -> Option<(
4676 String,
4677 String,
4678 fdomain_client::fidl::ServerEnd<StorageAdminMarker>,
4679 RealmQueryConnectToStorageAdminResponder,
4680 )> {
4681 if let RealmQueryRequest::ConnectToStorageAdmin {
4682 moniker,
4683 storage_name,
4684 server_end,
4685 responder,
4686 } = self
4687 {
4688 Some((moniker, storage_name, server_end, responder))
4689 } else {
4690 None
4691 }
4692 }
4693
4694 pub fn method_name(&self) -> &'static str {
4696 match *self {
4697 RealmQueryRequest::GetInstance { .. } => "get_instance",
4698 RealmQueryRequest::GetResolvedDeclaration { .. } => "get_resolved_declaration",
4699 RealmQueryRequest::ResolveDeclaration { .. } => "resolve_declaration",
4700 RealmQueryRequest::GetStructuredConfig { .. } => "get_structured_config",
4701 RealmQueryRequest::GetAllInstances { .. } => "get_all_instances",
4702 RealmQueryRequest::ConstructNamespace { .. } => "construct_namespace",
4703 RealmQueryRequest::OpenDirectory { .. } => "open_directory",
4704 RealmQueryRequest::ConnectToStorageAdmin { .. } => "connect_to_storage_admin",
4705 }
4706 }
4707}
4708
4709#[derive(Debug, Clone)]
4710pub struct RealmQueryControlHandle {
4711 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4712}
4713
4714impl fdomain_client::fidl::ControlHandle for RealmQueryControlHandle {
4715 fn shutdown(&self) {
4716 self.inner.shutdown()
4717 }
4718
4719 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4720 self.inner.shutdown_with_epitaph(status)
4721 }
4722
4723 fn is_closed(&self) -> bool {
4724 self.inner.channel().is_closed()
4725 }
4726 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
4727 self.inner.channel().on_closed()
4728 }
4729}
4730
4731impl RealmQueryControlHandle {}
4732
4733#[must_use = "FIDL methods require a response to be sent"]
4734#[derive(Debug)]
4735pub struct RealmQueryGetInstanceResponder {
4736 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
4737 tx_id: u32,
4738}
4739
4740impl std::ops::Drop for RealmQueryGetInstanceResponder {
4744 fn drop(&mut self) {
4745 self.control_handle.shutdown();
4746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4748 }
4749}
4750
4751impl fdomain_client::fidl::Responder for RealmQueryGetInstanceResponder {
4752 type ControlHandle = RealmQueryControlHandle;
4753
4754 fn control_handle(&self) -> &RealmQueryControlHandle {
4755 &self.control_handle
4756 }
4757
4758 fn drop_without_shutdown(mut self) {
4759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4761 std::mem::forget(self);
4763 }
4764}
4765
4766impl RealmQueryGetInstanceResponder {
4767 pub fn send(self, mut result: Result<&Instance, GetInstanceError>) -> Result<(), fidl::Error> {
4771 let _result = self.send_raw(result);
4772 if _result.is_err() {
4773 self.control_handle.shutdown();
4774 }
4775 self.drop_without_shutdown();
4776 _result
4777 }
4778
4779 pub fn send_no_shutdown_on_err(
4781 self,
4782 mut result: Result<&Instance, GetInstanceError>,
4783 ) -> Result<(), fidl::Error> {
4784 let _result = self.send_raw(result);
4785 self.drop_without_shutdown();
4786 _result
4787 }
4788
4789 fn send_raw(&self, mut result: Result<&Instance, GetInstanceError>) -> Result<(), fidl::Error> {
4790 self.control_handle.inner.send::<fidl::encoding::ResultType<
4791 RealmQueryGetInstanceResponse,
4792 GetInstanceError,
4793 >>(
4794 result.map(|instance| (instance,)),
4795 self.tx_id,
4796 0x3496ca1e5a0c13a8,
4797 fidl::encoding::DynamicFlags::empty(),
4798 )
4799 }
4800}
4801
4802#[must_use = "FIDL methods require a response to be sent"]
4803#[derive(Debug)]
4804pub struct RealmQueryGetResolvedDeclarationResponder {
4805 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
4806 tx_id: u32,
4807}
4808
4809impl std::ops::Drop for RealmQueryGetResolvedDeclarationResponder {
4813 fn drop(&mut self) {
4814 self.control_handle.shutdown();
4815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4817 }
4818}
4819
4820impl fdomain_client::fidl::Responder for RealmQueryGetResolvedDeclarationResponder {
4821 type ControlHandle = RealmQueryControlHandle;
4822
4823 fn control_handle(&self) -> &RealmQueryControlHandle {
4824 &self.control_handle
4825 }
4826
4827 fn drop_without_shutdown(mut self) {
4828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4830 std::mem::forget(self);
4832 }
4833}
4834
4835impl RealmQueryGetResolvedDeclarationResponder {
4836 pub fn send(
4840 self,
4841 mut result: Result<
4842 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
4843 GetDeclarationError,
4844 >,
4845 ) -> Result<(), fidl::Error> {
4846 let _result = self.send_raw(result);
4847 if _result.is_err() {
4848 self.control_handle.shutdown();
4849 }
4850 self.drop_without_shutdown();
4851 _result
4852 }
4853
4854 pub fn send_no_shutdown_on_err(
4856 self,
4857 mut result: Result<
4858 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
4859 GetDeclarationError,
4860 >,
4861 ) -> Result<(), fidl::Error> {
4862 let _result = self.send_raw(result);
4863 self.drop_without_shutdown();
4864 _result
4865 }
4866
4867 fn send_raw(
4868 &self,
4869 mut result: Result<
4870 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
4871 GetDeclarationError,
4872 >,
4873 ) -> Result<(), fidl::Error> {
4874 self.control_handle.inner.send::<fidl::encoding::ResultType<
4875 RealmQueryGetResolvedDeclarationResponse,
4876 GetDeclarationError,
4877 >>(
4878 result.map(|iterator| (iterator,)),
4879 self.tx_id,
4880 0x31a493d284a0bc1f,
4881 fidl::encoding::DynamicFlags::empty(),
4882 )
4883 }
4884}
4885
4886#[must_use = "FIDL methods require a response to be sent"]
4887#[derive(Debug)]
4888pub struct RealmQueryResolveDeclarationResponder {
4889 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
4890 tx_id: u32,
4891}
4892
4893impl std::ops::Drop for RealmQueryResolveDeclarationResponder {
4897 fn drop(&mut self) {
4898 self.control_handle.shutdown();
4899 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4901 }
4902}
4903
4904impl fdomain_client::fidl::Responder for RealmQueryResolveDeclarationResponder {
4905 type ControlHandle = RealmQueryControlHandle;
4906
4907 fn control_handle(&self) -> &RealmQueryControlHandle {
4908 &self.control_handle
4909 }
4910
4911 fn drop_without_shutdown(mut self) {
4912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4914 std::mem::forget(self);
4916 }
4917}
4918
4919impl RealmQueryResolveDeclarationResponder {
4920 pub fn send(
4924 self,
4925 mut result: Result<
4926 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
4927 GetDeclarationError,
4928 >,
4929 ) -> Result<(), fidl::Error> {
4930 let _result = self.send_raw(result);
4931 if _result.is_err() {
4932 self.control_handle.shutdown();
4933 }
4934 self.drop_without_shutdown();
4935 _result
4936 }
4937
4938 pub fn send_no_shutdown_on_err(
4940 self,
4941 mut result: Result<
4942 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
4943 GetDeclarationError,
4944 >,
4945 ) -> Result<(), fidl::Error> {
4946 let _result = self.send_raw(result);
4947 self.drop_without_shutdown();
4948 _result
4949 }
4950
4951 fn send_raw(
4952 &self,
4953 mut result: Result<
4954 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
4955 GetDeclarationError,
4956 >,
4957 ) -> Result<(), fidl::Error> {
4958 self.control_handle.inner.send::<fidl::encoding::ResultType<
4959 RealmQueryResolveDeclarationResponse,
4960 GetDeclarationError,
4961 >>(
4962 result.map(|iterator| (iterator,)),
4963 self.tx_id,
4964 0x1ab1adf2a87d962d,
4965 fidl::encoding::DynamicFlags::empty(),
4966 )
4967 }
4968}
4969
4970#[must_use = "FIDL methods require a response to be sent"]
4971#[derive(Debug)]
4972pub struct RealmQueryGetStructuredConfigResponder {
4973 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
4974 tx_id: u32,
4975}
4976
4977impl std::ops::Drop for RealmQueryGetStructuredConfigResponder {
4981 fn drop(&mut self) {
4982 self.control_handle.shutdown();
4983 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4985 }
4986}
4987
4988impl fdomain_client::fidl::Responder for RealmQueryGetStructuredConfigResponder {
4989 type ControlHandle = RealmQueryControlHandle;
4990
4991 fn control_handle(&self) -> &RealmQueryControlHandle {
4992 &self.control_handle
4993 }
4994
4995 fn drop_without_shutdown(mut self) {
4996 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4998 std::mem::forget(self);
5000 }
5001}
5002
5003impl RealmQueryGetStructuredConfigResponder {
5004 pub fn send(
5008 self,
5009 mut result: Result<
5010 &fdomain_fuchsia_component_decl::ResolvedConfig,
5011 GetStructuredConfigError,
5012 >,
5013 ) -> Result<(), fidl::Error> {
5014 let _result = self.send_raw(result);
5015 if _result.is_err() {
5016 self.control_handle.shutdown();
5017 }
5018 self.drop_without_shutdown();
5019 _result
5020 }
5021
5022 pub fn send_no_shutdown_on_err(
5024 self,
5025 mut result: Result<
5026 &fdomain_fuchsia_component_decl::ResolvedConfig,
5027 GetStructuredConfigError,
5028 >,
5029 ) -> Result<(), fidl::Error> {
5030 let _result = self.send_raw(result);
5031 self.drop_without_shutdown();
5032 _result
5033 }
5034
5035 fn send_raw(
5036 &self,
5037 mut result: Result<
5038 &fdomain_fuchsia_component_decl::ResolvedConfig,
5039 GetStructuredConfigError,
5040 >,
5041 ) -> Result<(), fidl::Error> {
5042 self.control_handle.inner.send::<fidl::encoding::ResultType<
5043 RealmQueryGetStructuredConfigResponse,
5044 GetStructuredConfigError,
5045 >>(
5046 result.map(|config| (config,)),
5047 self.tx_id,
5048 0x16f88f6735bd204,
5049 fidl::encoding::DynamicFlags::empty(),
5050 )
5051 }
5052}
5053
5054#[must_use = "FIDL methods require a response to be sent"]
5055#[derive(Debug)]
5056pub struct RealmQueryGetAllInstancesResponder {
5057 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
5058 tx_id: u32,
5059}
5060
5061impl std::ops::Drop for RealmQueryGetAllInstancesResponder {
5065 fn drop(&mut self) {
5066 self.control_handle.shutdown();
5067 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5069 }
5070}
5071
5072impl fdomain_client::fidl::Responder for RealmQueryGetAllInstancesResponder {
5073 type ControlHandle = RealmQueryControlHandle;
5074
5075 fn control_handle(&self) -> &RealmQueryControlHandle {
5076 &self.control_handle
5077 }
5078
5079 fn drop_without_shutdown(mut self) {
5080 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5082 std::mem::forget(self);
5084 }
5085}
5086
5087impl RealmQueryGetAllInstancesResponder {
5088 pub fn send(
5092 self,
5093 mut result: Result<
5094 fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>,
5095 GetAllInstancesError,
5096 >,
5097 ) -> Result<(), fidl::Error> {
5098 let _result = self.send_raw(result);
5099 if _result.is_err() {
5100 self.control_handle.shutdown();
5101 }
5102 self.drop_without_shutdown();
5103 _result
5104 }
5105
5106 pub fn send_no_shutdown_on_err(
5108 self,
5109 mut result: Result<
5110 fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>,
5111 GetAllInstancesError,
5112 >,
5113 ) -> Result<(), fidl::Error> {
5114 let _result = self.send_raw(result);
5115 self.drop_without_shutdown();
5116 _result
5117 }
5118
5119 fn send_raw(
5120 &self,
5121 mut result: Result<
5122 fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>,
5123 GetAllInstancesError,
5124 >,
5125 ) -> Result<(), fidl::Error> {
5126 self.control_handle.inner.send::<fidl::encoding::ResultType<
5127 RealmQueryGetAllInstancesResponse,
5128 GetAllInstancesError,
5129 >>(
5130 result.map(|iterator| (iterator,)),
5131 self.tx_id,
5132 0x7b5a8775d30cad47,
5133 fidl::encoding::DynamicFlags::empty(),
5134 )
5135 }
5136}
5137
5138#[must_use = "FIDL methods require a response to be sent"]
5139#[derive(Debug)]
5140pub struct RealmQueryConstructNamespaceResponder {
5141 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
5142 tx_id: u32,
5143}
5144
5145impl std::ops::Drop for RealmQueryConstructNamespaceResponder {
5149 fn drop(&mut self) {
5150 self.control_handle.shutdown();
5151 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5153 }
5154}
5155
5156impl fdomain_client::fidl::Responder for RealmQueryConstructNamespaceResponder {
5157 type ControlHandle = RealmQueryControlHandle;
5158
5159 fn control_handle(&self) -> &RealmQueryControlHandle {
5160 &self.control_handle
5161 }
5162
5163 fn drop_without_shutdown(mut self) {
5164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5166 std::mem::forget(self);
5168 }
5169}
5170
5171impl RealmQueryConstructNamespaceResponder {
5172 pub fn send(
5176 self,
5177 mut result: Result<
5178 Vec<fdomain_fuchsia_component_runner::ComponentNamespaceEntry>,
5179 ConstructNamespaceError,
5180 >,
5181 ) -> Result<(), fidl::Error> {
5182 let _result = self.send_raw(result);
5183 if _result.is_err() {
5184 self.control_handle.shutdown();
5185 }
5186 self.drop_without_shutdown();
5187 _result
5188 }
5189
5190 pub fn send_no_shutdown_on_err(
5192 self,
5193 mut result: Result<
5194 Vec<fdomain_fuchsia_component_runner::ComponentNamespaceEntry>,
5195 ConstructNamespaceError,
5196 >,
5197 ) -> Result<(), fidl::Error> {
5198 let _result = self.send_raw(result);
5199 self.drop_without_shutdown();
5200 _result
5201 }
5202
5203 fn send_raw(
5204 &self,
5205 mut result: Result<
5206 Vec<fdomain_fuchsia_component_runner::ComponentNamespaceEntry>,
5207 ConstructNamespaceError,
5208 >,
5209 ) -> Result<(), fidl::Error> {
5210 self.control_handle.inner.send::<fidl::encoding::ResultType<
5211 RealmQueryConstructNamespaceResponse,
5212 ConstructNamespaceError,
5213 >>(
5214 result.as_mut().map_err(|e| *e).map(|namespace| (namespace.as_mut_slice(),)),
5215 self.tx_id,
5216 0x5ecb29c02c488eeb,
5217 fidl::encoding::DynamicFlags::empty(),
5218 )
5219 }
5220}
5221
5222#[must_use = "FIDL methods require a response to be sent"]
5223#[derive(Debug)]
5224pub struct RealmQueryOpenDirectoryResponder {
5225 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
5226 tx_id: u32,
5227}
5228
5229impl std::ops::Drop for RealmQueryOpenDirectoryResponder {
5233 fn drop(&mut self) {
5234 self.control_handle.shutdown();
5235 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5237 }
5238}
5239
5240impl fdomain_client::fidl::Responder for RealmQueryOpenDirectoryResponder {
5241 type ControlHandle = RealmQueryControlHandle;
5242
5243 fn control_handle(&self) -> &RealmQueryControlHandle {
5244 &self.control_handle
5245 }
5246
5247 fn drop_without_shutdown(mut self) {
5248 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5250 std::mem::forget(self);
5252 }
5253}
5254
5255impl RealmQueryOpenDirectoryResponder {
5256 pub fn send(self, mut result: Result<(), OpenError>) -> Result<(), fidl::Error> {
5260 let _result = self.send_raw(result);
5261 if _result.is_err() {
5262 self.control_handle.shutdown();
5263 }
5264 self.drop_without_shutdown();
5265 _result
5266 }
5267
5268 pub fn send_no_shutdown_on_err(
5270 self,
5271 mut result: Result<(), OpenError>,
5272 ) -> Result<(), fidl::Error> {
5273 let _result = self.send_raw(result);
5274 self.drop_without_shutdown();
5275 _result
5276 }
5277
5278 fn send_raw(&self, mut result: Result<(), OpenError>) -> Result<(), fidl::Error> {
5279 self.control_handle
5280 .inner
5281 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, OpenError>>(
5282 result,
5283 self.tx_id,
5284 0x333d68f1deecec85,
5285 fidl::encoding::DynamicFlags::empty(),
5286 )
5287 }
5288}
5289
5290#[must_use = "FIDL methods require a response to be sent"]
5291#[derive(Debug)]
5292pub struct RealmQueryConnectToStorageAdminResponder {
5293 control_handle: std::mem::ManuallyDrop<RealmQueryControlHandle>,
5294 tx_id: u32,
5295}
5296
5297impl std::ops::Drop for RealmQueryConnectToStorageAdminResponder {
5301 fn drop(&mut self) {
5302 self.control_handle.shutdown();
5303 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5305 }
5306}
5307
5308impl fdomain_client::fidl::Responder for RealmQueryConnectToStorageAdminResponder {
5309 type ControlHandle = RealmQueryControlHandle;
5310
5311 fn control_handle(&self) -> &RealmQueryControlHandle {
5312 &self.control_handle
5313 }
5314
5315 fn drop_without_shutdown(mut self) {
5316 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5318 std::mem::forget(self);
5320 }
5321}
5322
5323impl RealmQueryConnectToStorageAdminResponder {
5324 pub fn send(
5328 self,
5329 mut result: Result<(), ConnectToStorageAdminError>,
5330 ) -> Result<(), fidl::Error> {
5331 let _result = self.send_raw(result);
5332 if _result.is_err() {
5333 self.control_handle.shutdown();
5334 }
5335 self.drop_without_shutdown();
5336 _result
5337 }
5338
5339 pub fn send_no_shutdown_on_err(
5341 self,
5342 mut result: Result<(), ConnectToStorageAdminError>,
5343 ) -> Result<(), fidl::Error> {
5344 let _result = self.send_raw(result);
5345 self.drop_without_shutdown();
5346 _result
5347 }
5348
5349 fn send_raw(
5350 &self,
5351 mut result: Result<(), ConnectToStorageAdminError>,
5352 ) -> Result<(), fidl::Error> {
5353 self.control_handle.inner.send::<fidl::encoding::ResultType<
5354 fidl::encoding::EmptyStruct,
5355 ConnectToStorageAdminError,
5356 >>(
5357 result,
5358 self.tx_id,
5359 0x7807e6b4f623ace,
5360 fidl::encoding::DynamicFlags::empty(),
5361 )
5362 }
5363}
5364
5365#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5366pub struct RouteValidatorMarker;
5367
5368impl fdomain_client::fidl::ProtocolMarker for RouteValidatorMarker {
5369 type Proxy = RouteValidatorProxy;
5370 type RequestStream = RouteValidatorRequestStream;
5371
5372 const DEBUG_NAME: &'static str = "fuchsia.sys2.RouteValidator";
5373}
5374impl fdomain_client::fidl::DiscoverableProtocolMarker for RouteValidatorMarker {}
5375pub type RouteValidatorValidateResult = Result<Vec<RouteReport>, fdomain_fuchsia_component::Error>;
5376pub type RouteValidatorRouteResult = Result<Vec<RouteReport>, RouteValidatorError>;
5377
5378pub trait RouteValidatorProxyInterface: Send + Sync {
5379 type ValidateResponseFut: std::future::Future<Output = Result<RouteValidatorValidateResult, fidl::Error>>
5380 + Send;
5381 fn r#validate(&self, moniker: &str) -> Self::ValidateResponseFut;
5382 type RouteResponseFut: std::future::Future<Output = Result<RouteValidatorRouteResult, fidl::Error>>
5383 + Send;
5384 fn r#route(&self, moniker: &str, targets: &[RouteTarget]) -> Self::RouteResponseFut;
5385}
5386
5387#[derive(Debug, Clone)]
5388pub struct RouteValidatorProxy {
5389 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5390}
5391
5392impl fdomain_client::fidl::Proxy for RouteValidatorProxy {
5393 type Protocol = RouteValidatorMarker;
5394
5395 fn from_channel(inner: fdomain_client::Channel) -> Self {
5396 Self::new(inner)
5397 }
5398
5399 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5400 self.client.into_channel().map_err(|client| Self { client })
5401 }
5402
5403 fn as_channel(&self) -> &fdomain_client::Channel {
5404 self.client.as_channel()
5405 }
5406}
5407
5408impl RouteValidatorProxy {
5409 pub fn new(channel: fdomain_client::Channel) -> Self {
5411 let protocol_name =
5412 <RouteValidatorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5413 Self { client: fidl::client::Client::new(channel, protocol_name) }
5414 }
5415
5416 pub fn take_event_stream(&self) -> RouteValidatorEventStream {
5422 RouteValidatorEventStream { event_receiver: self.client.take_event_receiver() }
5423 }
5424
5425 pub fn r#validate(
5433 &self,
5434 mut moniker: &str,
5435 ) -> fidl::client::QueryResponseFut<
5436 RouteValidatorValidateResult,
5437 fdomain_client::fidl::FDomainResourceDialect,
5438 > {
5439 RouteValidatorProxyInterface::r#validate(self, moniker)
5440 }
5441
5442 pub fn r#route(
5458 &self,
5459 mut moniker: &str,
5460 mut targets: &[RouteTarget],
5461 ) -> fidl::client::QueryResponseFut<
5462 RouteValidatorRouteResult,
5463 fdomain_client::fidl::FDomainResourceDialect,
5464 > {
5465 RouteValidatorProxyInterface::r#route(self, moniker, targets)
5466 }
5467}
5468
5469impl RouteValidatorProxyInterface for RouteValidatorProxy {
5470 type ValidateResponseFut = fidl::client::QueryResponseFut<
5471 RouteValidatorValidateResult,
5472 fdomain_client::fidl::FDomainResourceDialect,
5473 >;
5474 fn r#validate(&self, mut moniker: &str) -> Self::ValidateResponseFut {
5475 fn _decode(
5476 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5477 ) -> Result<RouteValidatorValidateResult, fidl::Error> {
5478 let _response = fidl::client::decode_transaction_body::<
5479 fidl::encoding::ResultType<
5480 RouteValidatorValidateResponse,
5481 fdomain_fuchsia_component::Error,
5482 >,
5483 fdomain_client::fidl::FDomainResourceDialect,
5484 0x3360b96d5f86cdf4,
5485 >(_buf?)?;
5486 Ok(_response.map(|x| x.reports))
5487 }
5488 self.client
5489 .send_query_and_decode::<RouteValidatorValidateRequest, RouteValidatorValidateResult>(
5490 (moniker,),
5491 0x3360b96d5f86cdf4,
5492 fidl::encoding::DynamicFlags::empty(),
5493 _decode,
5494 )
5495 }
5496
5497 type RouteResponseFut = fidl::client::QueryResponseFut<
5498 RouteValidatorRouteResult,
5499 fdomain_client::fidl::FDomainResourceDialect,
5500 >;
5501 fn r#route(&self, mut moniker: &str, mut targets: &[RouteTarget]) -> Self::RouteResponseFut {
5502 fn _decode(
5503 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5504 ) -> Result<RouteValidatorRouteResult, fidl::Error> {
5505 let _response = fidl::client::decode_transaction_body::<
5506 fidl::encoding::ResultType<RouteValidatorRouteResponse, RouteValidatorError>,
5507 fdomain_client::fidl::FDomainResourceDialect,
5508 0x51c9b268216d8239,
5509 >(_buf?)?;
5510 Ok(_response.map(|x| x.reports))
5511 }
5512 self.client.send_query_and_decode::<RouteValidatorRouteRequest, RouteValidatorRouteResult>(
5513 (moniker, targets),
5514 0x51c9b268216d8239,
5515 fidl::encoding::DynamicFlags::empty(),
5516 _decode,
5517 )
5518 }
5519}
5520
5521pub struct RouteValidatorEventStream {
5522 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5523}
5524
5525impl std::marker::Unpin for RouteValidatorEventStream {}
5526
5527impl futures::stream::FusedStream for RouteValidatorEventStream {
5528 fn is_terminated(&self) -> bool {
5529 self.event_receiver.is_terminated()
5530 }
5531}
5532
5533impl futures::Stream for RouteValidatorEventStream {
5534 type Item = Result<RouteValidatorEvent, fidl::Error>;
5535
5536 fn poll_next(
5537 mut self: std::pin::Pin<&mut Self>,
5538 cx: &mut std::task::Context<'_>,
5539 ) -> std::task::Poll<Option<Self::Item>> {
5540 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5541 &mut self.event_receiver,
5542 cx
5543 )?) {
5544 Some(buf) => std::task::Poll::Ready(Some(RouteValidatorEvent::decode(buf))),
5545 None => std::task::Poll::Ready(None),
5546 }
5547 }
5548}
5549
5550#[derive(Debug)]
5551pub enum RouteValidatorEvent {}
5552
5553impl RouteValidatorEvent {
5554 fn decode(
5556 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5557 ) -> Result<RouteValidatorEvent, fidl::Error> {
5558 let (bytes, _handles) = buf.split_mut();
5559 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5560 debug_assert_eq!(tx_header.tx_id, 0);
5561 match tx_header.ordinal {
5562 _ => Err(fidl::Error::UnknownOrdinal {
5563 ordinal: tx_header.ordinal,
5564 protocol_name:
5565 <RouteValidatorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5566 }),
5567 }
5568 }
5569}
5570
5571pub struct RouteValidatorRequestStream {
5573 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5574 is_terminated: bool,
5575}
5576
5577impl std::marker::Unpin for RouteValidatorRequestStream {}
5578
5579impl futures::stream::FusedStream for RouteValidatorRequestStream {
5580 fn is_terminated(&self) -> bool {
5581 self.is_terminated
5582 }
5583}
5584
5585impl fdomain_client::fidl::RequestStream for RouteValidatorRequestStream {
5586 type Protocol = RouteValidatorMarker;
5587 type ControlHandle = RouteValidatorControlHandle;
5588
5589 fn from_channel(channel: fdomain_client::Channel) -> Self {
5590 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5591 }
5592
5593 fn control_handle(&self) -> Self::ControlHandle {
5594 RouteValidatorControlHandle { inner: self.inner.clone() }
5595 }
5596
5597 fn into_inner(
5598 self,
5599 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5600 {
5601 (self.inner, self.is_terminated)
5602 }
5603
5604 fn from_inner(
5605 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5606 is_terminated: bool,
5607 ) -> Self {
5608 Self { inner, is_terminated }
5609 }
5610}
5611
5612impl futures::Stream for RouteValidatorRequestStream {
5613 type Item = Result<RouteValidatorRequest, fidl::Error>;
5614
5615 fn poll_next(
5616 mut self: std::pin::Pin<&mut Self>,
5617 cx: &mut std::task::Context<'_>,
5618 ) -> std::task::Poll<Option<Self::Item>> {
5619 let this = &mut *self;
5620 if this.inner.check_shutdown(cx) {
5621 this.is_terminated = true;
5622 return std::task::Poll::Ready(None);
5623 }
5624 if this.is_terminated {
5625 panic!("polled RouteValidatorRequestStream after completion");
5626 }
5627 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5628 |bytes, handles| {
5629 match this.inner.channel().read_etc(cx, bytes, handles) {
5630 std::task::Poll::Ready(Ok(())) => {}
5631 std::task::Poll::Pending => return std::task::Poll::Pending,
5632 std::task::Poll::Ready(Err(None)) => {
5633 this.is_terminated = true;
5634 return std::task::Poll::Ready(None);
5635 }
5636 std::task::Poll::Ready(Err(Some(e))) => {
5637 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5638 e.into(),
5639 ))));
5640 }
5641 }
5642
5643 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5645
5646 std::task::Poll::Ready(Some(match header.ordinal {
5647 0x3360b96d5f86cdf4 => {
5648 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5649 let mut req = fidl::new_empty!(RouteValidatorValidateRequest, fdomain_client::fidl::FDomainResourceDialect);
5650 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteValidatorValidateRequest>(&header, _body_bytes, handles, &mut req)?;
5651 let control_handle = RouteValidatorControlHandle {
5652 inner: this.inner.clone(),
5653 };
5654 Ok(RouteValidatorRequest::Validate {moniker: req.moniker,
5655
5656 responder: RouteValidatorValidateResponder {
5657 control_handle: std::mem::ManuallyDrop::new(control_handle),
5658 tx_id: header.tx_id,
5659 },
5660 })
5661 }
5662 0x51c9b268216d8239 => {
5663 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5664 let mut req = fidl::new_empty!(RouteValidatorRouteRequest, fdomain_client::fidl::FDomainResourceDialect);
5665 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RouteValidatorRouteRequest>(&header, _body_bytes, handles, &mut req)?;
5666 let control_handle = RouteValidatorControlHandle {
5667 inner: this.inner.clone(),
5668 };
5669 Ok(RouteValidatorRequest::Route {moniker: req.moniker,
5670targets: req.targets,
5671
5672 responder: RouteValidatorRouteResponder {
5673 control_handle: std::mem::ManuallyDrop::new(control_handle),
5674 tx_id: header.tx_id,
5675 },
5676 })
5677 }
5678 _ => Err(fidl::Error::UnknownOrdinal {
5679 ordinal: header.ordinal,
5680 protocol_name: <RouteValidatorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5681 }),
5682 }))
5683 },
5684 )
5685 }
5686}
5687
5688#[derive(Debug)]
5689pub enum RouteValidatorRequest {
5690 Validate { moniker: String, responder: RouteValidatorValidateResponder },
5698 Route { moniker: String, targets: Vec<RouteTarget>, responder: RouteValidatorRouteResponder },
5714}
5715
5716impl RouteValidatorRequest {
5717 #[allow(irrefutable_let_patterns)]
5718 pub fn into_validate(self) -> Option<(String, RouteValidatorValidateResponder)> {
5719 if let RouteValidatorRequest::Validate { moniker, responder } = self {
5720 Some((moniker, responder))
5721 } else {
5722 None
5723 }
5724 }
5725
5726 #[allow(irrefutable_let_patterns)]
5727 pub fn into_route(self) -> Option<(String, Vec<RouteTarget>, RouteValidatorRouteResponder)> {
5728 if let RouteValidatorRequest::Route { moniker, targets, responder } = self {
5729 Some((moniker, targets, responder))
5730 } else {
5731 None
5732 }
5733 }
5734
5735 pub fn method_name(&self) -> &'static str {
5737 match *self {
5738 RouteValidatorRequest::Validate { .. } => "validate",
5739 RouteValidatorRequest::Route { .. } => "route",
5740 }
5741 }
5742}
5743
5744#[derive(Debug, Clone)]
5745pub struct RouteValidatorControlHandle {
5746 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5747}
5748
5749impl fdomain_client::fidl::ControlHandle for RouteValidatorControlHandle {
5750 fn shutdown(&self) {
5751 self.inner.shutdown()
5752 }
5753
5754 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5755 self.inner.shutdown_with_epitaph(status)
5756 }
5757
5758 fn is_closed(&self) -> bool {
5759 self.inner.channel().is_closed()
5760 }
5761 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5762 self.inner.channel().on_closed()
5763 }
5764}
5765
5766impl RouteValidatorControlHandle {}
5767
5768#[must_use = "FIDL methods require a response to be sent"]
5769#[derive(Debug)]
5770pub struct RouteValidatorValidateResponder {
5771 control_handle: std::mem::ManuallyDrop<RouteValidatorControlHandle>,
5772 tx_id: u32,
5773}
5774
5775impl std::ops::Drop for RouteValidatorValidateResponder {
5779 fn drop(&mut self) {
5780 self.control_handle.shutdown();
5781 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5783 }
5784}
5785
5786impl fdomain_client::fidl::Responder for RouteValidatorValidateResponder {
5787 type ControlHandle = RouteValidatorControlHandle;
5788
5789 fn control_handle(&self) -> &RouteValidatorControlHandle {
5790 &self.control_handle
5791 }
5792
5793 fn drop_without_shutdown(mut self) {
5794 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5796 std::mem::forget(self);
5798 }
5799}
5800
5801impl RouteValidatorValidateResponder {
5802 pub fn send(
5806 self,
5807 mut result: Result<&[RouteReport], fdomain_fuchsia_component::Error>,
5808 ) -> Result<(), fidl::Error> {
5809 let _result = self.send_raw(result);
5810 if _result.is_err() {
5811 self.control_handle.shutdown();
5812 }
5813 self.drop_without_shutdown();
5814 _result
5815 }
5816
5817 pub fn send_no_shutdown_on_err(
5819 self,
5820 mut result: Result<&[RouteReport], fdomain_fuchsia_component::Error>,
5821 ) -> Result<(), fidl::Error> {
5822 let _result = self.send_raw(result);
5823 self.drop_without_shutdown();
5824 _result
5825 }
5826
5827 fn send_raw(
5828 &self,
5829 mut result: Result<&[RouteReport], fdomain_fuchsia_component::Error>,
5830 ) -> Result<(), fidl::Error> {
5831 self.control_handle.inner.send::<fidl::encoding::ResultType<
5832 RouteValidatorValidateResponse,
5833 fdomain_fuchsia_component::Error,
5834 >>(
5835 result.map(|reports| (reports,)),
5836 self.tx_id,
5837 0x3360b96d5f86cdf4,
5838 fidl::encoding::DynamicFlags::empty(),
5839 )
5840 }
5841}
5842
5843#[must_use = "FIDL methods require a response to be sent"]
5844#[derive(Debug)]
5845pub struct RouteValidatorRouteResponder {
5846 control_handle: std::mem::ManuallyDrop<RouteValidatorControlHandle>,
5847 tx_id: u32,
5848}
5849
5850impl std::ops::Drop for RouteValidatorRouteResponder {
5854 fn drop(&mut self) {
5855 self.control_handle.shutdown();
5856 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5858 }
5859}
5860
5861impl fdomain_client::fidl::Responder for RouteValidatorRouteResponder {
5862 type ControlHandle = RouteValidatorControlHandle;
5863
5864 fn control_handle(&self) -> &RouteValidatorControlHandle {
5865 &self.control_handle
5866 }
5867
5868 fn drop_without_shutdown(mut self) {
5869 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5871 std::mem::forget(self);
5873 }
5874}
5875
5876impl RouteValidatorRouteResponder {
5877 pub fn send(
5881 self,
5882 mut result: Result<&[RouteReport], RouteValidatorError>,
5883 ) -> Result<(), fidl::Error> {
5884 let _result = self.send_raw(result);
5885 if _result.is_err() {
5886 self.control_handle.shutdown();
5887 }
5888 self.drop_without_shutdown();
5889 _result
5890 }
5891
5892 pub fn send_no_shutdown_on_err(
5894 self,
5895 mut result: Result<&[RouteReport], RouteValidatorError>,
5896 ) -> Result<(), fidl::Error> {
5897 let _result = self.send_raw(result);
5898 self.drop_without_shutdown();
5899 _result
5900 }
5901
5902 fn send_raw(
5903 &self,
5904 mut result: Result<&[RouteReport], RouteValidatorError>,
5905 ) -> Result<(), fidl::Error> {
5906 self.control_handle.inner.send::<fidl::encoding::ResultType<
5907 RouteValidatorRouteResponse,
5908 RouteValidatorError,
5909 >>(
5910 result.map(|reports| (reports,)),
5911 self.tx_id,
5912 0x51c9b268216d8239,
5913 fidl::encoding::DynamicFlags::empty(),
5914 )
5915 }
5916}
5917
5918#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5919pub struct StorageAdminMarker;
5920
5921impl fdomain_client::fidl::ProtocolMarker for StorageAdminMarker {
5922 type Proxy = StorageAdminProxy;
5923 type RequestStream = StorageAdminRequestStream;
5924
5925 const DEBUG_NAME: &'static str = "fuchsia.sys2.StorageAdmin";
5926}
5927impl fdomain_client::fidl::DiscoverableProtocolMarker for StorageAdminMarker {}
5928pub type StorageAdminOpenStorageResult = Result<(), fdomain_fuchsia_component::Error>;
5929pub type StorageAdminListStorageInRealmResult = Result<(), fdomain_fuchsia_component::Error>;
5930pub type StorageAdminOpenComponentStorageByIdResult = Result<(), fdomain_fuchsia_component::Error>;
5931pub type StorageAdminDeleteComponentStorageResult = Result<(), fdomain_fuchsia_component::Error>;
5932pub type StorageAdminGetStatusResult = Result<StorageStatus, StatusError>;
5933pub type StorageAdminDeleteAllStorageContentsResult = Result<(), DeletionError>;
5934
5935pub trait StorageAdminProxyInterface: Send + Sync {
5936 type OpenStorageResponseFut: std::future::Future<Output = Result<StorageAdminOpenStorageResult, fidl::Error>>
5937 + Send;
5938 fn r#open_storage(
5939 &self,
5940 relative_moniker: &str,
5941 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5942 ) -> Self::OpenStorageResponseFut;
5943 type ListStorageInRealmResponseFut: std::future::Future<Output = Result<StorageAdminListStorageInRealmResult, fidl::Error>>
5944 + Send;
5945 fn r#list_storage_in_realm(
5946 &self,
5947 relative_moniker: &str,
5948 iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
5949 ) -> Self::ListStorageInRealmResponseFut;
5950 type OpenComponentStorageByIdResponseFut: std::future::Future<
5951 Output = Result<StorageAdminOpenComponentStorageByIdResult, fidl::Error>,
5952 > + Send;
5953 fn r#open_component_storage_by_id(
5954 &self,
5955 id: &str,
5956 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5957 ) -> Self::OpenComponentStorageByIdResponseFut;
5958 type DeleteComponentStorageResponseFut: std::future::Future<Output = Result<StorageAdminDeleteComponentStorageResult, fidl::Error>>
5959 + Send;
5960 fn r#delete_component_storage(
5961 &self,
5962 relative_moniker: &str,
5963 ) -> Self::DeleteComponentStorageResponseFut;
5964 type GetStatusResponseFut: std::future::Future<Output = Result<StorageAdminGetStatusResult, fidl::Error>>
5965 + Send;
5966 fn r#get_status(&self) -> Self::GetStatusResponseFut;
5967 type DeleteAllStorageContentsResponseFut: std::future::Future<
5968 Output = Result<StorageAdminDeleteAllStorageContentsResult, fidl::Error>,
5969 > + Send;
5970 fn r#delete_all_storage_contents(&self) -> Self::DeleteAllStorageContentsResponseFut;
5971}
5972
5973#[derive(Debug, Clone)]
5974pub struct StorageAdminProxy {
5975 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5976}
5977
5978impl fdomain_client::fidl::Proxy for StorageAdminProxy {
5979 type Protocol = StorageAdminMarker;
5980
5981 fn from_channel(inner: fdomain_client::Channel) -> Self {
5982 Self::new(inner)
5983 }
5984
5985 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5986 self.client.into_channel().map_err(|client| Self { client })
5987 }
5988
5989 fn as_channel(&self) -> &fdomain_client::Channel {
5990 self.client.as_channel()
5991 }
5992}
5993
5994impl StorageAdminProxy {
5995 pub fn new(channel: fdomain_client::Channel) -> Self {
5997 let protocol_name =
5998 <StorageAdminMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5999 Self { client: fidl::client::Client::new(channel, protocol_name) }
6000 }
6001
6002 pub fn take_event_stream(&self) -> StorageAdminEventStream {
6008 StorageAdminEventStream { event_receiver: self.client.take_event_receiver() }
6009 }
6010
6011 pub fn r#open_storage(
6014 &self,
6015 mut relative_moniker: &str,
6016 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6017 ) -> fidl::client::QueryResponseFut<
6018 StorageAdminOpenStorageResult,
6019 fdomain_client::fidl::FDomainResourceDialect,
6020 > {
6021 StorageAdminProxyInterface::r#open_storage(self, relative_moniker, object)
6022 }
6023
6024 pub fn r#list_storage_in_realm(
6029 &self,
6030 mut relative_moniker: &str,
6031 mut iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
6032 ) -> fidl::client::QueryResponseFut<
6033 StorageAdminListStorageInRealmResult,
6034 fdomain_client::fidl::FDomainResourceDialect,
6035 > {
6036 StorageAdminProxyInterface::r#list_storage_in_realm(self, relative_moniker, iterator)
6037 }
6038
6039 pub fn r#open_component_storage_by_id(
6042 &self,
6043 mut id: &str,
6044 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6045 ) -> fidl::client::QueryResponseFut<
6046 StorageAdminOpenComponentStorageByIdResult,
6047 fdomain_client::fidl::FDomainResourceDialect,
6048 > {
6049 StorageAdminProxyInterface::r#open_component_storage_by_id(self, id, object)
6050 }
6051
6052 pub fn r#delete_component_storage(
6056 &self,
6057 mut relative_moniker: &str,
6058 ) -> fidl::client::QueryResponseFut<
6059 StorageAdminDeleteComponentStorageResult,
6060 fdomain_client::fidl::FDomainResourceDialect,
6061 > {
6062 StorageAdminProxyInterface::r#delete_component_storage(self, relative_moniker)
6063 }
6064
6065 pub fn r#get_status(
6067 &self,
6068 ) -> fidl::client::QueryResponseFut<
6069 StorageAdminGetStatusResult,
6070 fdomain_client::fidl::FDomainResourceDialect,
6071 > {
6072 StorageAdminProxyInterface::r#get_status(self)
6073 }
6074
6075 pub fn r#delete_all_storage_contents(
6080 &self,
6081 ) -> fidl::client::QueryResponseFut<
6082 StorageAdminDeleteAllStorageContentsResult,
6083 fdomain_client::fidl::FDomainResourceDialect,
6084 > {
6085 StorageAdminProxyInterface::r#delete_all_storage_contents(self)
6086 }
6087}
6088
6089impl StorageAdminProxyInterface for StorageAdminProxy {
6090 type OpenStorageResponseFut = fidl::client::QueryResponseFut<
6091 StorageAdminOpenStorageResult,
6092 fdomain_client::fidl::FDomainResourceDialect,
6093 >;
6094 fn r#open_storage(
6095 &self,
6096 mut relative_moniker: &str,
6097 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6098 ) -> Self::OpenStorageResponseFut {
6099 fn _decode(
6100 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6101 ) -> Result<StorageAdminOpenStorageResult, fidl::Error> {
6102 let _response = fidl::client::decode_transaction_body::<
6103 fidl::encoding::ResultType<
6104 fidl::encoding::EmptyStruct,
6105 fdomain_fuchsia_component::Error,
6106 >,
6107 fdomain_client::fidl::FDomainResourceDialect,
6108 0x6ceaa5904cfe4377,
6109 >(_buf?)?;
6110 Ok(_response.map(|x| x))
6111 }
6112 self.client
6113 .send_query_and_decode::<StorageAdminOpenStorageRequest, StorageAdminOpenStorageResult>(
6114 (relative_moniker, object),
6115 0x6ceaa5904cfe4377,
6116 fidl::encoding::DynamicFlags::empty(),
6117 _decode,
6118 )
6119 }
6120
6121 type ListStorageInRealmResponseFut = fidl::client::QueryResponseFut<
6122 StorageAdminListStorageInRealmResult,
6123 fdomain_client::fidl::FDomainResourceDialect,
6124 >;
6125 fn r#list_storage_in_realm(
6126 &self,
6127 mut relative_moniker: &str,
6128 mut iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
6129 ) -> Self::ListStorageInRealmResponseFut {
6130 fn _decode(
6131 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6132 ) -> Result<StorageAdminListStorageInRealmResult, fidl::Error> {
6133 let _response = fidl::client::decode_transaction_body::<
6134 fidl::encoding::ResultType<
6135 fidl::encoding::EmptyStruct,
6136 fdomain_fuchsia_component::Error,
6137 >,
6138 fdomain_client::fidl::FDomainResourceDialect,
6139 0x764f6d1f083e8bfb,
6140 >(_buf?)?;
6141 Ok(_response.map(|x| x))
6142 }
6143 self.client.send_query_and_decode::<
6144 StorageAdminListStorageInRealmRequest,
6145 StorageAdminListStorageInRealmResult,
6146 >(
6147 (relative_moniker, iterator,),
6148 0x764f6d1f083e8bfb,
6149 fidl::encoding::DynamicFlags::empty(),
6150 _decode,
6151 )
6152 }
6153
6154 type OpenComponentStorageByIdResponseFut = fidl::client::QueryResponseFut<
6155 StorageAdminOpenComponentStorageByIdResult,
6156 fdomain_client::fidl::FDomainResourceDialect,
6157 >;
6158 fn r#open_component_storage_by_id(
6159 &self,
6160 mut id: &str,
6161 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6162 ) -> Self::OpenComponentStorageByIdResponseFut {
6163 fn _decode(
6164 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6165 ) -> Result<StorageAdminOpenComponentStorageByIdResult, fidl::Error> {
6166 let _response = fidl::client::decode_transaction_body::<
6167 fidl::encoding::ResultType<
6168 fidl::encoding::EmptyStruct,
6169 fdomain_fuchsia_component::Error,
6170 >,
6171 fdomain_client::fidl::FDomainResourceDialect,
6172 0x4802102cc55d5df1,
6173 >(_buf?)?;
6174 Ok(_response.map(|x| x))
6175 }
6176 self.client.send_query_and_decode::<
6177 StorageAdminOpenComponentStorageByIdRequest,
6178 StorageAdminOpenComponentStorageByIdResult,
6179 >(
6180 (id, object,),
6181 0x4802102cc55d5df1,
6182 fidl::encoding::DynamicFlags::empty(),
6183 _decode,
6184 )
6185 }
6186
6187 type DeleteComponentStorageResponseFut = fidl::client::QueryResponseFut<
6188 StorageAdminDeleteComponentStorageResult,
6189 fdomain_client::fidl::FDomainResourceDialect,
6190 >;
6191 fn r#delete_component_storage(
6192 &self,
6193 mut relative_moniker: &str,
6194 ) -> Self::DeleteComponentStorageResponseFut {
6195 fn _decode(
6196 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6197 ) -> Result<StorageAdminDeleteComponentStorageResult, fidl::Error> {
6198 let _response = fidl::client::decode_transaction_body::<
6199 fidl::encoding::ResultType<
6200 fidl::encoding::EmptyStruct,
6201 fdomain_fuchsia_component::Error,
6202 >,
6203 fdomain_client::fidl::FDomainResourceDialect,
6204 0x1677c1cdfcdbf45a,
6205 >(_buf?)?;
6206 Ok(_response.map(|x| x))
6207 }
6208 self.client.send_query_and_decode::<
6209 StorageAdminDeleteComponentStorageRequest,
6210 StorageAdminDeleteComponentStorageResult,
6211 >(
6212 (relative_moniker,),
6213 0x1677c1cdfcdbf45a,
6214 fidl::encoding::DynamicFlags::empty(),
6215 _decode,
6216 )
6217 }
6218
6219 type GetStatusResponseFut = fidl::client::QueryResponseFut<
6220 StorageAdminGetStatusResult,
6221 fdomain_client::fidl::FDomainResourceDialect,
6222 >;
6223 fn r#get_status(&self) -> Self::GetStatusResponseFut {
6224 fn _decode(
6225 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6226 ) -> Result<StorageAdminGetStatusResult, fidl::Error> {
6227 let _response = fidl::client::decode_transaction_body::<
6228 fidl::encoding::ResultType<StorageStatus, StatusError>,
6229 fdomain_client::fidl::FDomainResourceDialect,
6230 0x7729e325a6c526c8,
6231 >(_buf?)?;
6232 Ok(_response.map(|x| x))
6233 }
6234 self.client
6235 .send_query_and_decode::<fidl::encoding::EmptyPayload, StorageAdminGetStatusResult>(
6236 (),
6237 0x7729e325a6c526c8,
6238 fidl::encoding::DynamicFlags::empty(),
6239 _decode,
6240 )
6241 }
6242
6243 type DeleteAllStorageContentsResponseFut = fidl::client::QueryResponseFut<
6244 StorageAdminDeleteAllStorageContentsResult,
6245 fdomain_client::fidl::FDomainResourceDialect,
6246 >;
6247 fn r#delete_all_storage_contents(&self) -> Self::DeleteAllStorageContentsResponseFut {
6248 fn _decode(
6249 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6250 ) -> Result<StorageAdminDeleteAllStorageContentsResult, fidl::Error> {
6251 let _response = fidl::client::decode_transaction_body::<
6252 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, DeletionError>,
6253 fdomain_client::fidl::FDomainResourceDialect,
6254 0x2ee980b4b2d24adb,
6255 >(_buf?)?;
6256 Ok(_response.map(|x| x))
6257 }
6258 self.client.send_query_and_decode::<
6259 fidl::encoding::EmptyPayload,
6260 StorageAdminDeleteAllStorageContentsResult,
6261 >(
6262 (),
6263 0x2ee980b4b2d24adb,
6264 fidl::encoding::DynamicFlags::empty(),
6265 _decode,
6266 )
6267 }
6268}
6269
6270pub struct StorageAdminEventStream {
6271 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6272}
6273
6274impl std::marker::Unpin for StorageAdminEventStream {}
6275
6276impl futures::stream::FusedStream for StorageAdminEventStream {
6277 fn is_terminated(&self) -> bool {
6278 self.event_receiver.is_terminated()
6279 }
6280}
6281
6282impl futures::Stream for StorageAdminEventStream {
6283 type Item = Result<StorageAdminEvent, fidl::Error>;
6284
6285 fn poll_next(
6286 mut self: std::pin::Pin<&mut Self>,
6287 cx: &mut std::task::Context<'_>,
6288 ) -> std::task::Poll<Option<Self::Item>> {
6289 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6290 &mut self.event_receiver,
6291 cx
6292 )?) {
6293 Some(buf) => std::task::Poll::Ready(Some(StorageAdminEvent::decode(buf))),
6294 None => std::task::Poll::Ready(None),
6295 }
6296 }
6297}
6298
6299#[derive(Debug)]
6300pub enum StorageAdminEvent {}
6301
6302impl StorageAdminEvent {
6303 fn decode(
6305 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6306 ) -> Result<StorageAdminEvent, fidl::Error> {
6307 let (bytes, _handles) = buf.split_mut();
6308 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6309 debug_assert_eq!(tx_header.tx_id, 0);
6310 match tx_header.ordinal {
6311 _ => Err(fidl::Error::UnknownOrdinal {
6312 ordinal: tx_header.ordinal,
6313 protocol_name:
6314 <StorageAdminMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6315 }),
6316 }
6317 }
6318}
6319
6320pub struct StorageAdminRequestStream {
6322 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6323 is_terminated: bool,
6324}
6325
6326impl std::marker::Unpin for StorageAdminRequestStream {}
6327
6328impl futures::stream::FusedStream for StorageAdminRequestStream {
6329 fn is_terminated(&self) -> bool {
6330 self.is_terminated
6331 }
6332}
6333
6334impl fdomain_client::fidl::RequestStream for StorageAdminRequestStream {
6335 type Protocol = StorageAdminMarker;
6336 type ControlHandle = StorageAdminControlHandle;
6337
6338 fn from_channel(channel: fdomain_client::Channel) -> Self {
6339 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6340 }
6341
6342 fn control_handle(&self) -> Self::ControlHandle {
6343 StorageAdminControlHandle { inner: self.inner.clone() }
6344 }
6345
6346 fn into_inner(
6347 self,
6348 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6349 {
6350 (self.inner, self.is_terminated)
6351 }
6352
6353 fn from_inner(
6354 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6355 is_terminated: bool,
6356 ) -> Self {
6357 Self { inner, is_terminated }
6358 }
6359}
6360
6361impl futures::Stream for StorageAdminRequestStream {
6362 type Item = Result<StorageAdminRequest, fidl::Error>;
6363
6364 fn poll_next(
6365 mut self: std::pin::Pin<&mut Self>,
6366 cx: &mut std::task::Context<'_>,
6367 ) -> std::task::Poll<Option<Self::Item>> {
6368 let this = &mut *self;
6369 if this.inner.check_shutdown(cx) {
6370 this.is_terminated = true;
6371 return std::task::Poll::Ready(None);
6372 }
6373 if this.is_terminated {
6374 panic!("polled StorageAdminRequestStream after completion");
6375 }
6376 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6377 |bytes, handles| {
6378 match this.inner.channel().read_etc(cx, bytes, handles) {
6379 std::task::Poll::Ready(Ok(())) => {}
6380 std::task::Poll::Pending => return std::task::Poll::Pending,
6381 std::task::Poll::Ready(Err(None)) => {
6382 this.is_terminated = true;
6383 return std::task::Poll::Ready(None);
6384 }
6385 std::task::Poll::Ready(Err(Some(e))) => {
6386 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6387 e.into(),
6388 ))));
6389 }
6390 }
6391
6392 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6394
6395 std::task::Poll::Ready(Some(match header.ordinal {
6396 0x6ceaa5904cfe4377 => {
6397 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6398 let mut req = fidl::new_empty!(
6399 StorageAdminOpenStorageRequest,
6400 fdomain_client::fidl::FDomainResourceDialect
6401 );
6402 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminOpenStorageRequest>(&header, _body_bytes, handles, &mut req)?;
6403 let control_handle =
6404 StorageAdminControlHandle { inner: this.inner.clone() };
6405 Ok(StorageAdminRequest::OpenStorage {
6406 relative_moniker: req.relative_moniker,
6407 object: req.object,
6408
6409 responder: StorageAdminOpenStorageResponder {
6410 control_handle: std::mem::ManuallyDrop::new(control_handle),
6411 tx_id: header.tx_id,
6412 },
6413 })
6414 }
6415 0x764f6d1f083e8bfb => {
6416 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6417 let mut req = fidl::new_empty!(
6418 StorageAdminListStorageInRealmRequest,
6419 fdomain_client::fidl::FDomainResourceDialect
6420 );
6421 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminListStorageInRealmRequest>(&header, _body_bytes, handles, &mut req)?;
6422 let control_handle =
6423 StorageAdminControlHandle { inner: this.inner.clone() };
6424 Ok(StorageAdminRequest::ListStorageInRealm {
6425 relative_moniker: req.relative_moniker,
6426 iterator: req.iterator,
6427
6428 responder: StorageAdminListStorageInRealmResponder {
6429 control_handle: std::mem::ManuallyDrop::new(control_handle),
6430 tx_id: header.tx_id,
6431 },
6432 })
6433 }
6434 0x4802102cc55d5df1 => {
6435 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6436 let mut req = fidl::new_empty!(
6437 StorageAdminOpenComponentStorageByIdRequest,
6438 fdomain_client::fidl::FDomainResourceDialect
6439 );
6440 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminOpenComponentStorageByIdRequest>(&header, _body_bytes, handles, &mut req)?;
6441 let control_handle =
6442 StorageAdminControlHandle { inner: this.inner.clone() };
6443 Ok(StorageAdminRequest::OpenComponentStorageById {
6444 id: req.id,
6445 object: req.object,
6446
6447 responder: StorageAdminOpenComponentStorageByIdResponder {
6448 control_handle: std::mem::ManuallyDrop::new(control_handle),
6449 tx_id: header.tx_id,
6450 },
6451 })
6452 }
6453 0x1677c1cdfcdbf45a => {
6454 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6455 let mut req = fidl::new_empty!(
6456 StorageAdminDeleteComponentStorageRequest,
6457 fdomain_client::fidl::FDomainResourceDialect
6458 );
6459 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminDeleteComponentStorageRequest>(&header, _body_bytes, handles, &mut req)?;
6460 let control_handle =
6461 StorageAdminControlHandle { inner: this.inner.clone() };
6462 Ok(StorageAdminRequest::DeleteComponentStorage {
6463 relative_moniker: req.relative_moniker,
6464
6465 responder: StorageAdminDeleteComponentStorageResponder {
6466 control_handle: std::mem::ManuallyDrop::new(control_handle),
6467 tx_id: header.tx_id,
6468 },
6469 })
6470 }
6471 0x7729e325a6c526c8 => {
6472 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6473 let mut req = fidl::new_empty!(
6474 fidl::encoding::EmptyPayload,
6475 fdomain_client::fidl::FDomainResourceDialect
6476 );
6477 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6478 let control_handle =
6479 StorageAdminControlHandle { inner: this.inner.clone() };
6480 Ok(StorageAdminRequest::GetStatus {
6481 responder: StorageAdminGetStatusResponder {
6482 control_handle: std::mem::ManuallyDrop::new(control_handle),
6483 tx_id: header.tx_id,
6484 },
6485 })
6486 }
6487 0x2ee980b4b2d24adb => {
6488 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6489 let mut req = fidl::new_empty!(
6490 fidl::encoding::EmptyPayload,
6491 fdomain_client::fidl::FDomainResourceDialect
6492 );
6493 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6494 let control_handle =
6495 StorageAdminControlHandle { inner: this.inner.clone() };
6496 Ok(StorageAdminRequest::DeleteAllStorageContents {
6497 responder: StorageAdminDeleteAllStorageContentsResponder {
6498 control_handle: std::mem::ManuallyDrop::new(control_handle),
6499 tx_id: header.tx_id,
6500 },
6501 })
6502 }
6503 _ => Err(fidl::Error::UnknownOrdinal {
6504 ordinal: header.ordinal,
6505 protocol_name:
6506 <StorageAdminMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6507 }),
6508 }))
6509 },
6510 )
6511 }
6512}
6513
6514#[derive(Debug)]
6515pub enum StorageAdminRequest {
6516 OpenStorage {
6519 relative_moniker: String,
6520 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6521 responder: StorageAdminOpenStorageResponder,
6522 },
6523 ListStorageInRealm {
6528 relative_moniker: String,
6529 iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
6530 responder: StorageAdminListStorageInRealmResponder,
6531 },
6532 OpenComponentStorageById {
6535 id: String,
6536 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6537 responder: StorageAdminOpenComponentStorageByIdResponder,
6538 },
6539 DeleteComponentStorage {
6543 relative_moniker: String,
6544 responder: StorageAdminDeleteComponentStorageResponder,
6545 },
6546 GetStatus { responder: StorageAdminGetStatusResponder },
6548 DeleteAllStorageContents { responder: StorageAdminDeleteAllStorageContentsResponder },
6553}
6554
6555impl StorageAdminRequest {
6556 #[allow(irrefutable_let_patterns)]
6557 pub fn into_open_storage(
6558 self,
6559 ) -> Option<(
6560 String,
6561 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6562 StorageAdminOpenStorageResponder,
6563 )> {
6564 if let StorageAdminRequest::OpenStorage { relative_moniker, object, responder } = self {
6565 Some((relative_moniker, object, responder))
6566 } else {
6567 None
6568 }
6569 }
6570
6571 #[allow(irrefutable_let_patterns)]
6572 pub fn into_list_storage_in_realm(
6573 self,
6574 ) -> Option<(
6575 String,
6576 fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
6577 StorageAdminListStorageInRealmResponder,
6578 )> {
6579 if let StorageAdminRequest::ListStorageInRealm { relative_moniker, iterator, responder } =
6580 self
6581 {
6582 Some((relative_moniker, iterator, responder))
6583 } else {
6584 None
6585 }
6586 }
6587
6588 #[allow(irrefutable_let_patterns)]
6589 pub fn into_open_component_storage_by_id(
6590 self,
6591 ) -> Option<(
6592 String,
6593 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6594 StorageAdminOpenComponentStorageByIdResponder,
6595 )> {
6596 if let StorageAdminRequest::OpenComponentStorageById { id, object, responder } = self {
6597 Some((id, object, responder))
6598 } else {
6599 None
6600 }
6601 }
6602
6603 #[allow(irrefutable_let_patterns)]
6604 pub fn into_delete_component_storage(
6605 self,
6606 ) -> Option<(String, StorageAdminDeleteComponentStorageResponder)> {
6607 if let StorageAdminRequest::DeleteComponentStorage { relative_moniker, responder } = self {
6608 Some((relative_moniker, responder))
6609 } else {
6610 None
6611 }
6612 }
6613
6614 #[allow(irrefutable_let_patterns)]
6615 pub fn into_get_status(self) -> Option<(StorageAdminGetStatusResponder)> {
6616 if let StorageAdminRequest::GetStatus { responder } = self {
6617 Some((responder))
6618 } else {
6619 None
6620 }
6621 }
6622
6623 #[allow(irrefutable_let_patterns)]
6624 pub fn into_delete_all_storage_contents(
6625 self,
6626 ) -> Option<(StorageAdminDeleteAllStorageContentsResponder)> {
6627 if let StorageAdminRequest::DeleteAllStorageContents { responder } = self {
6628 Some((responder))
6629 } else {
6630 None
6631 }
6632 }
6633
6634 pub fn method_name(&self) -> &'static str {
6636 match *self {
6637 StorageAdminRequest::OpenStorage { .. } => "open_storage",
6638 StorageAdminRequest::ListStorageInRealm { .. } => "list_storage_in_realm",
6639 StorageAdminRequest::OpenComponentStorageById { .. } => "open_component_storage_by_id",
6640 StorageAdminRequest::DeleteComponentStorage { .. } => "delete_component_storage",
6641 StorageAdminRequest::GetStatus { .. } => "get_status",
6642 StorageAdminRequest::DeleteAllStorageContents { .. } => "delete_all_storage_contents",
6643 }
6644 }
6645}
6646
6647#[derive(Debug, Clone)]
6648pub struct StorageAdminControlHandle {
6649 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6650}
6651
6652impl fdomain_client::fidl::ControlHandle for StorageAdminControlHandle {
6653 fn shutdown(&self) {
6654 self.inner.shutdown()
6655 }
6656
6657 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6658 self.inner.shutdown_with_epitaph(status)
6659 }
6660
6661 fn is_closed(&self) -> bool {
6662 self.inner.channel().is_closed()
6663 }
6664 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6665 self.inner.channel().on_closed()
6666 }
6667}
6668
6669impl StorageAdminControlHandle {}
6670
6671#[must_use = "FIDL methods require a response to be sent"]
6672#[derive(Debug)]
6673pub struct StorageAdminOpenStorageResponder {
6674 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6675 tx_id: u32,
6676}
6677
6678impl std::ops::Drop for StorageAdminOpenStorageResponder {
6682 fn drop(&mut self) {
6683 self.control_handle.shutdown();
6684 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6686 }
6687}
6688
6689impl fdomain_client::fidl::Responder for StorageAdminOpenStorageResponder {
6690 type ControlHandle = StorageAdminControlHandle;
6691
6692 fn control_handle(&self) -> &StorageAdminControlHandle {
6693 &self.control_handle
6694 }
6695
6696 fn drop_without_shutdown(mut self) {
6697 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6699 std::mem::forget(self);
6701 }
6702}
6703
6704impl StorageAdminOpenStorageResponder {
6705 pub fn send(
6709 self,
6710 mut result: Result<(), fdomain_fuchsia_component::Error>,
6711 ) -> Result<(), fidl::Error> {
6712 let _result = self.send_raw(result);
6713 if _result.is_err() {
6714 self.control_handle.shutdown();
6715 }
6716 self.drop_without_shutdown();
6717 _result
6718 }
6719
6720 pub fn send_no_shutdown_on_err(
6722 self,
6723 mut result: Result<(), fdomain_fuchsia_component::Error>,
6724 ) -> Result<(), fidl::Error> {
6725 let _result = self.send_raw(result);
6726 self.drop_without_shutdown();
6727 _result
6728 }
6729
6730 fn send_raw(
6731 &self,
6732 mut result: Result<(), fdomain_fuchsia_component::Error>,
6733 ) -> Result<(), fidl::Error> {
6734 self.control_handle.inner.send::<fidl::encoding::ResultType<
6735 fidl::encoding::EmptyStruct,
6736 fdomain_fuchsia_component::Error,
6737 >>(
6738 result,
6739 self.tx_id,
6740 0x6ceaa5904cfe4377,
6741 fidl::encoding::DynamicFlags::empty(),
6742 )
6743 }
6744}
6745
6746#[must_use = "FIDL methods require a response to be sent"]
6747#[derive(Debug)]
6748pub struct StorageAdminListStorageInRealmResponder {
6749 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6750 tx_id: u32,
6751}
6752
6753impl std::ops::Drop for StorageAdminListStorageInRealmResponder {
6757 fn drop(&mut self) {
6758 self.control_handle.shutdown();
6759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6761 }
6762}
6763
6764impl fdomain_client::fidl::Responder for StorageAdminListStorageInRealmResponder {
6765 type ControlHandle = StorageAdminControlHandle;
6766
6767 fn control_handle(&self) -> &StorageAdminControlHandle {
6768 &self.control_handle
6769 }
6770
6771 fn drop_without_shutdown(mut self) {
6772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6774 std::mem::forget(self);
6776 }
6777}
6778
6779impl StorageAdminListStorageInRealmResponder {
6780 pub fn send(
6784 self,
6785 mut result: Result<(), fdomain_fuchsia_component::Error>,
6786 ) -> Result<(), fidl::Error> {
6787 let _result = self.send_raw(result);
6788 if _result.is_err() {
6789 self.control_handle.shutdown();
6790 }
6791 self.drop_without_shutdown();
6792 _result
6793 }
6794
6795 pub fn send_no_shutdown_on_err(
6797 self,
6798 mut result: Result<(), fdomain_fuchsia_component::Error>,
6799 ) -> Result<(), fidl::Error> {
6800 let _result = self.send_raw(result);
6801 self.drop_without_shutdown();
6802 _result
6803 }
6804
6805 fn send_raw(
6806 &self,
6807 mut result: Result<(), fdomain_fuchsia_component::Error>,
6808 ) -> Result<(), fidl::Error> {
6809 self.control_handle.inner.send::<fidl::encoding::ResultType<
6810 fidl::encoding::EmptyStruct,
6811 fdomain_fuchsia_component::Error,
6812 >>(
6813 result,
6814 self.tx_id,
6815 0x764f6d1f083e8bfb,
6816 fidl::encoding::DynamicFlags::empty(),
6817 )
6818 }
6819}
6820
6821#[must_use = "FIDL methods require a response to be sent"]
6822#[derive(Debug)]
6823pub struct StorageAdminOpenComponentStorageByIdResponder {
6824 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6825 tx_id: u32,
6826}
6827
6828impl std::ops::Drop for StorageAdminOpenComponentStorageByIdResponder {
6832 fn drop(&mut self) {
6833 self.control_handle.shutdown();
6834 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6836 }
6837}
6838
6839impl fdomain_client::fidl::Responder for StorageAdminOpenComponentStorageByIdResponder {
6840 type ControlHandle = StorageAdminControlHandle;
6841
6842 fn control_handle(&self) -> &StorageAdminControlHandle {
6843 &self.control_handle
6844 }
6845
6846 fn drop_without_shutdown(mut self) {
6847 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6849 std::mem::forget(self);
6851 }
6852}
6853
6854impl StorageAdminOpenComponentStorageByIdResponder {
6855 pub fn send(
6859 self,
6860 mut result: Result<(), fdomain_fuchsia_component::Error>,
6861 ) -> Result<(), fidl::Error> {
6862 let _result = self.send_raw(result);
6863 if _result.is_err() {
6864 self.control_handle.shutdown();
6865 }
6866 self.drop_without_shutdown();
6867 _result
6868 }
6869
6870 pub fn send_no_shutdown_on_err(
6872 self,
6873 mut result: Result<(), fdomain_fuchsia_component::Error>,
6874 ) -> Result<(), fidl::Error> {
6875 let _result = self.send_raw(result);
6876 self.drop_without_shutdown();
6877 _result
6878 }
6879
6880 fn send_raw(
6881 &self,
6882 mut result: Result<(), fdomain_fuchsia_component::Error>,
6883 ) -> Result<(), fidl::Error> {
6884 self.control_handle.inner.send::<fidl::encoding::ResultType<
6885 fidl::encoding::EmptyStruct,
6886 fdomain_fuchsia_component::Error,
6887 >>(
6888 result,
6889 self.tx_id,
6890 0x4802102cc55d5df1,
6891 fidl::encoding::DynamicFlags::empty(),
6892 )
6893 }
6894}
6895
6896#[must_use = "FIDL methods require a response to be sent"]
6897#[derive(Debug)]
6898pub struct StorageAdminDeleteComponentStorageResponder {
6899 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6900 tx_id: u32,
6901}
6902
6903impl std::ops::Drop for StorageAdminDeleteComponentStorageResponder {
6907 fn drop(&mut self) {
6908 self.control_handle.shutdown();
6909 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6911 }
6912}
6913
6914impl fdomain_client::fidl::Responder for StorageAdminDeleteComponentStorageResponder {
6915 type ControlHandle = StorageAdminControlHandle;
6916
6917 fn control_handle(&self) -> &StorageAdminControlHandle {
6918 &self.control_handle
6919 }
6920
6921 fn drop_without_shutdown(mut self) {
6922 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6924 std::mem::forget(self);
6926 }
6927}
6928
6929impl StorageAdminDeleteComponentStorageResponder {
6930 pub fn send(
6934 self,
6935 mut result: Result<(), fdomain_fuchsia_component::Error>,
6936 ) -> Result<(), fidl::Error> {
6937 let _result = self.send_raw(result);
6938 if _result.is_err() {
6939 self.control_handle.shutdown();
6940 }
6941 self.drop_without_shutdown();
6942 _result
6943 }
6944
6945 pub fn send_no_shutdown_on_err(
6947 self,
6948 mut result: Result<(), fdomain_fuchsia_component::Error>,
6949 ) -> Result<(), fidl::Error> {
6950 let _result = self.send_raw(result);
6951 self.drop_without_shutdown();
6952 _result
6953 }
6954
6955 fn send_raw(
6956 &self,
6957 mut result: Result<(), fdomain_fuchsia_component::Error>,
6958 ) -> Result<(), fidl::Error> {
6959 self.control_handle.inner.send::<fidl::encoding::ResultType<
6960 fidl::encoding::EmptyStruct,
6961 fdomain_fuchsia_component::Error,
6962 >>(
6963 result,
6964 self.tx_id,
6965 0x1677c1cdfcdbf45a,
6966 fidl::encoding::DynamicFlags::empty(),
6967 )
6968 }
6969}
6970
6971#[must_use = "FIDL methods require a response to be sent"]
6972#[derive(Debug)]
6973pub struct StorageAdminGetStatusResponder {
6974 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6975 tx_id: u32,
6976}
6977
6978impl std::ops::Drop for StorageAdminGetStatusResponder {
6982 fn drop(&mut self) {
6983 self.control_handle.shutdown();
6984 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6986 }
6987}
6988
6989impl fdomain_client::fidl::Responder for StorageAdminGetStatusResponder {
6990 type ControlHandle = StorageAdminControlHandle;
6991
6992 fn control_handle(&self) -> &StorageAdminControlHandle {
6993 &self.control_handle
6994 }
6995
6996 fn drop_without_shutdown(mut self) {
6997 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6999 std::mem::forget(self);
7001 }
7002}
7003
7004impl StorageAdminGetStatusResponder {
7005 pub fn send(self, mut result: Result<&StorageStatus, StatusError>) -> Result<(), fidl::Error> {
7009 let _result = self.send_raw(result);
7010 if _result.is_err() {
7011 self.control_handle.shutdown();
7012 }
7013 self.drop_without_shutdown();
7014 _result
7015 }
7016
7017 pub fn send_no_shutdown_on_err(
7019 self,
7020 mut result: Result<&StorageStatus, StatusError>,
7021 ) -> Result<(), fidl::Error> {
7022 let _result = self.send_raw(result);
7023 self.drop_without_shutdown();
7024 _result
7025 }
7026
7027 fn send_raw(&self, mut result: Result<&StorageStatus, StatusError>) -> Result<(), fidl::Error> {
7028 self.control_handle.inner.send::<fidl::encoding::ResultType<StorageStatus, StatusError>>(
7029 result,
7030 self.tx_id,
7031 0x7729e325a6c526c8,
7032 fidl::encoding::DynamicFlags::empty(),
7033 )
7034 }
7035}
7036
7037#[must_use = "FIDL methods require a response to be sent"]
7038#[derive(Debug)]
7039pub struct StorageAdminDeleteAllStorageContentsResponder {
7040 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
7041 tx_id: u32,
7042}
7043
7044impl std::ops::Drop for StorageAdminDeleteAllStorageContentsResponder {
7048 fn drop(&mut self) {
7049 self.control_handle.shutdown();
7050 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7052 }
7053}
7054
7055impl fdomain_client::fidl::Responder for StorageAdminDeleteAllStorageContentsResponder {
7056 type ControlHandle = StorageAdminControlHandle;
7057
7058 fn control_handle(&self) -> &StorageAdminControlHandle {
7059 &self.control_handle
7060 }
7061
7062 fn drop_without_shutdown(mut self) {
7063 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7065 std::mem::forget(self);
7067 }
7068}
7069
7070impl StorageAdminDeleteAllStorageContentsResponder {
7071 pub fn send(self, mut result: Result<(), DeletionError>) -> Result<(), fidl::Error> {
7075 let _result = self.send_raw(result);
7076 if _result.is_err() {
7077 self.control_handle.shutdown();
7078 }
7079 self.drop_without_shutdown();
7080 _result
7081 }
7082
7083 pub fn send_no_shutdown_on_err(
7085 self,
7086 mut result: Result<(), DeletionError>,
7087 ) -> Result<(), fidl::Error> {
7088 let _result = self.send_raw(result);
7089 self.drop_without_shutdown();
7090 _result
7091 }
7092
7093 fn send_raw(&self, mut result: Result<(), DeletionError>) -> Result<(), fidl::Error> {
7094 self.control_handle.inner.send::<fidl::encoding::ResultType<
7095 fidl::encoding::EmptyStruct,
7096 DeletionError,
7097 >>(
7098 result,
7099 self.tx_id,
7100 0x2ee980b4b2d24adb,
7101 fidl::encoding::DynamicFlags::empty(),
7102 )
7103 }
7104}
7105
7106#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7107pub struct StorageIteratorMarker;
7108
7109impl fdomain_client::fidl::ProtocolMarker for StorageIteratorMarker {
7110 type Proxy = StorageIteratorProxy;
7111 type RequestStream = StorageIteratorRequestStream;
7112
7113 const DEBUG_NAME: &'static str = "(anonymous) StorageIterator";
7114}
7115
7116pub trait StorageIteratorProxyInterface: Send + Sync {
7117 type NextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
7118 fn r#next(&self) -> Self::NextResponseFut;
7119}
7120
7121#[derive(Debug, Clone)]
7122pub struct StorageIteratorProxy {
7123 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7124}
7125
7126impl fdomain_client::fidl::Proxy for StorageIteratorProxy {
7127 type Protocol = StorageIteratorMarker;
7128
7129 fn from_channel(inner: fdomain_client::Channel) -> Self {
7130 Self::new(inner)
7131 }
7132
7133 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7134 self.client.into_channel().map_err(|client| Self { client })
7135 }
7136
7137 fn as_channel(&self) -> &fdomain_client::Channel {
7138 self.client.as_channel()
7139 }
7140}
7141
7142impl StorageIteratorProxy {
7143 pub fn new(channel: fdomain_client::Channel) -> Self {
7145 let protocol_name =
7146 <StorageIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7147 Self { client: fidl::client::Client::new(channel, protocol_name) }
7148 }
7149
7150 pub fn take_event_stream(&self) -> StorageIteratorEventStream {
7156 StorageIteratorEventStream { event_receiver: self.client.take_event_receiver() }
7157 }
7158
7159 pub fn r#next(
7163 &self,
7164 ) -> fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>
7165 {
7166 StorageIteratorProxyInterface::r#next(self)
7167 }
7168}
7169
7170impl StorageIteratorProxyInterface for StorageIteratorProxy {
7171 type NextResponseFut =
7172 fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>;
7173 fn r#next(&self) -> Self::NextResponseFut {
7174 fn _decode(
7175 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7176 ) -> Result<Vec<String>, fidl::Error> {
7177 let _response = fidl::client::decode_transaction_body::<
7178 StorageIteratorNextResponse,
7179 fdomain_client::fidl::FDomainResourceDialect,
7180 0x7a6b21f15fd01b72,
7181 >(_buf?)?;
7182 Ok(_response.relative_monikers)
7183 }
7184 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
7185 (),
7186 0x7a6b21f15fd01b72,
7187 fidl::encoding::DynamicFlags::empty(),
7188 _decode,
7189 )
7190 }
7191}
7192
7193pub struct StorageIteratorEventStream {
7194 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7195}
7196
7197impl std::marker::Unpin for StorageIteratorEventStream {}
7198
7199impl futures::stream::FusedStream for StorageIteratorEventStream {
7200 fn is_terminated(&self) -> bool {
7201 self.event_receiver.is_terminated()
7202 }
7203}
7204
7205impl futures::Stream for StorageIteratorEventStream {
7206 type Item = Result<StorageIteratorEvent, fidl::Error>;
7207
7208 fn poll_next(
7209 mut self: std::pin::Pin<&mut Self>,
7210 cx: &mut std::task::Context<'_>,
7211 ) -> std::task::Poll<Option<Self::Item>> {
7212 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7213 &mut self.event_receiver,
7214 cx
7215 )?) {
7216 Some(buf) => std::task::Poll::Ready(Some(StorageIteratorEvent::decode(buf))),
7217 None => std::task::Poll::Ready(None),
7218 }
7219 }
7220}
7221
7222#[derive(Debug)]
7223pub enum StorageIteratorEvent {}
7224
7225impl StorageIteratorEvent {
7226 fn decode(
7228 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7229 ) -> Result<StorageIteratorEvent, fidl::Error> {
7230 let (bytes, _handles) = buf.split_mut();
7231 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7232 debug_assert_eq!(tx_header.tx_id, 0);
7233 match tx_header.ordinal {
7234 _ => Err(fidl::Error::UnknownOrdinal {
7235 ordinal: tx_header.ordinal,
7236 protocol_name:
7237 <StorageIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7238 }),
7239 }
7240 }
7241}
7242
7243pub struct StorageIteratorRequestStream {
7245 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7246 is_terminated: bool,
7247}
7248
7249impl std::marker::Unpin for StorageIteratorRequestStream {}
7250
7251impl futures::stream::FusedStream for StorageIteratorRequestStream {
7252 fn is_terminated(&self) -> bool {
7253 self.is_terminated
7254 }
7255}
7256
7257impl fdomain_client::fidl::RequestStream for StorageIteratorRequestStream {
7258 type Protocol = StorageIteratorMarker;
7259 type ControlHandle = StorageIteratorControlHandle;
7260
7261 fn from_channel(channel: fdomain_client::Channel) -> Self {
7262 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7263 }
7264
7265 fn control_handle(&self) -> Self::ControlHandle {
7266 StorageIteratorControlHandle { inner: self.inner.clone() }
7267 }
7268
7269 fn into_inner(
7270 self,
7271 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7272 {
7273 (self.inner, self.is_terminated)
7274 }
7275
7276 fn from_inner(
7277 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7278 is_terminated: bool,
7279 ) -> Self {
7280 Self { inner, is_terminated }
7281 }
7282}
7283
7284impl futures::Stream for StorageIteratorRequestStream {
7285 type Item = Result<StorageIteratorRequest, fidl::Error>;
7286
7287 fn poll_next(
7288 mut self: std::pin::Pin<&mut Self>,
7289 cx: &mut std::task::Context<'_>,
7290 ) -> std::task::Poll<Option<Self::Item>> {
7291 let this = &mut *self;
7292 if this.inner.check_shutdown(cx) {
7293 this.is_terminated = true;
7294 return std::task::Poll::Ready(None);
7295 }
7296 if this.is_terminated {
7297 panic!("polled StorageIteratorRequestStream after completion");
7298 }
7299 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7300 |bytes, handles| {
7301 match this.inner.channel().read_etc(cx, bytes, handles) {
7302 std::task::Poll::Ready(Ok(())) => {}
7303 std::task::Poll::Pending => return std::task::Poll::Pending,
7304 std::task::Poll::Ready(Err(None)) => {
7305 this.is_terminated = true;
7306 return std::task::Poll::Ready(None);
7307 }
7308 std::task::Poll::Ready(Err(Some(e))) => {
7309 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7310 e.into(),
7311 ))));
7312 }
7313 }
7314
7315 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7317
7318 std::task::Poll::Ready(Some(match header.ordinal {
7319 0x7a6b21f15fd01b72 => {
7320 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7321 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
7322 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7323 let control_handle = StorageIteratorControlHandle {
7324 inner: this.inner.clone(),
7325 };
7326 Ok(StorageIteratorRequest::Next {
7327 responder: StorageIteratorNextResponder {
7328 control_handle: std::mem::ManuallyDrop::new(control_handle),
7329 tx_id: header.tx_id,
7330 },
7331 })
7332 }
7333 _ => Err(fidl::Error::UnknownOrdinal {
7334 ordinal: header.ordinal,
7335 protocol_name: <StorageIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7336 }),
7337 }))
7338 },
7339 )
7340 }
7341}
7342
7343#[derive(Debug)]
7346pub enum StorageIteratorRequest {
7347 Next { responder: StorageIteratorNextResponder },
7351}
7352
7353impl StorageIteratorRequest {
7354 #[allow(irrefutable_let_patterns)]
7355 pub fn into_next(self) -> Option<(StorageIteratorNextResponder)> {
7356 if let StorageIteratorRequest::Next { responder } = self { Some((responder)) } else { None }
7357 }
7358
7359 pub fn method_name(&self) -> &'static str {
7361 match *self {
7362 StorageIteratorRequest::Next { .. } => "next",
7363 }
7364 }
7365}
7366
7367#[derive(Debug, Clone)]
7368pub struct StorageIteratorControlHandle {
7369 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7370}
7371
7372impl fdomain_client::fidl::ControlHandle for StorageIteratorControlHandle {
7373 fn shutdown(&self) {
7374 self.inner.shutdown()
7375 }
7376
7377 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7378 self.inner.shutdown_with_epitaph(status)
7379 }
7380
7381 fn is_closed(&self) -> bool {
7382 self.inner.channel().is_closed()
7383 }
7384 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7385 self.inner.channel().on_closed()
7386 }
7387}
7388
7389impl StorageIteratorControlHandle {}
7390
7391#[must_use = "FIDL methods require a response to be sent"]
7392#[derive(Debug)]
7393pub struct StorageIteratorNextResponder {
7394 control_handle: std::mem::ManuallyDrop<StorageIteratorControlHandle>,
7395 tx_id: u32,
7396}
7397
7398impl std::ops::Drop for StorageIteratorNextResponder {
7402 fn drop(&mut self) {
7403 self.control_handle.shutdown();
7404 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7406 }
7407}
7408
7409impl fdomain_client::fidl::Responder for StorageIteratorNextResponder {
7410 type ControlHandle = StorageIteratorControlHandle;
7411
7412 fn control_handle(&self) -> &StorageIteratorControlHandle {
7413 &self.control_handle
7414 }
7415
7416 fn drop_without_shutdown(mut self) {
7417 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7419 std::mem::forget(self);
7421 }
7422}
7423
7424impl StorageIteratorNextResponder {
7425 pub fn send(self, mut relative_monikers: &[String]) -> Result<(), fidl::Error> {
7429 let _result = self.send_raw(relative_monikers);
7430 if _result.is_err() {
7431 self.control_handle.shutdown();
7432 }
7433 self.drop_without_shutdown();
7434 _result
7435 }
7436
7437 pub fn send_no_shutdown_on_err(
7439 self,
7440 mut relative_monikers: &[String],
7441 ) -> Result<(), fidl::Error> {
7442 let _result = self.send_raw(relative_monikers);
7443 self.drop_without_shutdown();
7444 _result
7445 }
7446
7447 fn send_raw(&self, mut relative_monikers: &[String]) -> Result<(), fidl::Error> {
7448 self.control_handle.inner.send::<StorageIteratorNextResponse>(
7449 (relative_monikers,),
7450 self.tx_id,
7451 0x7a6b21f15fd01b72,
7452 fidl::encoding::DynamicFlags::empty(),
7453 )
7454 }
7455}
7456
7457#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7458pub struct SystemControllerMarker;
7459
7460impl fdomain_client::fidl::ProtocolMarker for SystemControllerMarker {
7461 type Proxy = SystemControllerProxy;
7462 type RequestStream = SystemControllerRequestStream;
7463
7464 const DEBUG_NAME: &'static str = "fuchsia.sys2.SystemController";
7465}
7466impl fdomain_client::fidl::DiscoverableProtocolMarker for SystemControllerMarker {}
7467
7468pub trait SystemControllerProxyInterface: Send + Sync {
7469 type ShutdownResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
7470 fn r#shutdown(&self) -> Self::ShutdownResponseFut;
7471}
7472
7473#[derive(Debug, Clone)]
7474pub struct SystemControllerProxy {
7475 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
7476}
7477
7478impl fdomain_client::fidl::Proxy for SystemControllerProxy {
7479 type Protocol = SystemControllerMarker;
7480
7481 fn from_channel(inner: fdomain_client::Channel) -> Self {
7482 Self::new(inner)
7483 }
7484
7485 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
7486 self.client.into_channel().map_err(|client| Self { client })
7487 }
7488
7489 fn as_channel(&self) -> &fdomain_client::Channel {
7490 self.client.as_channel()
7491 }
7492}
7493
7494impl SystemControllerProxy {
7495 pub fn new(channel: fdomain_client::Channel) -> Self {
7497 let protocol_name =
7498 <SystemControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
7499 Self { client: fidl::client::Client::new(channel, protocol_name) }
7500 }
7501
7502 pub fn take_event_stream(&self) -> SystemControllerEventStream {
7508 SystemControllerEventStream { event_receiver: self.client.take_event_receiver() }
7509 }
7510
7511 pub fn r#shutdown(
7515 &self,
7516 ) -> fidl::client::QueryResponseFut<(), fdomain_client::fidl::FDomainResourceDialect> {
7517 SystemControllerProxyInterface::r#shutdown(self)
7518 }
7519}
7520
7521impl SystemControllerProxyInterface for SystemControllerProxy {
7522 type ShutdownResponseFut =
7523 fidl::client::QueryResponseFut<(), fdomain_client::fidl::FDomainResourceDialect>;
7524 fn r#shutdown(&self) -> Self::ShutdownResponseFut {
7525 fn _decode(
7526 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7527 ) -> Result<(), fidl::Error> {
7528 let _response = fidl::client::decode_transaction_body::<
7529 fidl::encoding::EmptyPayload,
7530 fdomain_client::fidl::FDomainResourceDialect,
7531 0x25f56c938344e549,
7532 >(_buf?)?;
7533 Ok(_response)
7534 }
7535 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
7536 (),
7537 0x25f56c938344e549,
7538 fidl::encoding::DynamicFlags::empty(),
7539 _decode,
7540 )
7541 }
7542}
7543
7544pub struct SystemControllerEventStream {
7545 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7546}
7547
7548impl std::marker::Unpin for SystemControllerEventStream {}
7549
7550impl futures::stream::FusedStream for SystemControllerEventStream {
7551 fn is_terminated(&self) -> bool {
7552 self.event_receiver.is_terminated()
7553 }
7554}
7555
7556impl futures::Stream for SystemControllerEventStream {
7557 type Item = Result<SystemControllerEvent, fidl::Error>;
7558
7559 fn poll_next(
7560 mut self: std::pin::Pin<&mut Self>,
7561 cx: &mut std::task::Context<'_>,
7562 ) -> std::task::Poll<Option<Self::Item>> {
7563 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7564 &mut self.event_receiver,
7565 cx
7566 )?) {
7567 Some(buf) => std::task::Poll::Ready(Some(SystemControllerEvent::decode(buf))),
7568 None => std::task::Poll::Ready(None),
7569 }
7570 }
7571}
7572
7573#[derive(Debug)]
7574pub enum SystemControllerEvent {}
7575
7576impl SystemControllerEvent {
7577 fn decode(
7579 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7580 ) -> Result<SystemControllerEvent, fidl::Error> {
7581 let (bytes, _handles) = buf.split_mut();
7582 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7583 debug_assert_eq!(tx_header.tx_id, 0);
7584 match tx_header.ordinal {
7585 _ => Err(fidl::Error::UnknownOrdinal {
7586 ordinal: tx_header.ordinal,
7587 protocol_name:
7588 <SystemControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7589 }),
7590 }
7591 }
7592}
7593
7594pub struct SystemControllerRequestStream {
7596 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7597 is_terminated: bool,
7598}
7599
7600impl std::marker::Unpin for SystemControllerRequestStream {}
7601
7602impl futures::stream::FusedStream for SystemControllerRequestStream {
7603 fn is_terminated(&self) -> bool {
7604 self.is_terminated
7605 }
7606}
7607
7608impl fdomain_client::fidl::RequestStream for SystemControllerRequestStream {
7609 type Protocol = SystemControllerMarker;
7610 type ControlHandle = SystemControllerControlHandle;
7611
7612 fn from_channel(channel: fdomain_client::Channel) -> Self {
7613 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7614 }
7615
7616 fn control_handle(&self) -> Self::ControlHandle {
7617 SystemControllerControlHandle { inner: self.inner.clone() }
7618 }
7619
7620 fn into_inner(
7621 self,
7622 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7623 {
7624 (self.inner, self.is_terminated)
7625 }
7626
7627 fn from_inner(
7628 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7629 is_terminated: bool,
7630 ) -> Self {
7631 Self { inner, is_terminated }
7632 }
7633}
7634
7635impl futures::Stream for SystemControllerRequestStream {
7636 type Item = Result<SystemControllerRequest, fidl::Error>;
7637
7638 fn poll_next(
7639 mut self: std::pin::Pin<&mut Self>,
7640 cx: &mut std::task::Context<'_>,
7641 ) -> std::task::Poll<Option<Self::Item>> {
7642 let this = &mut *self;
7643 if this.inner.check_shutdown(cx) {
7644 this.is_terminated = true;
7645 return std::task::Poll::Ready(None);
7646 }
7647 if this.is_terminated {
7648 panic!("polled SystemControllerRequestStream after completion");
7649 }
7650 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7651 |bytes, handles| {
7652 match this.inner.channel().read_etc(cx, bytes, handles) {
7653 std::task::Poll::Ready(Ok(())) => {}
7654 std::task::Poll::Pending => return std::task::Poll::Pending,
7655 std::task::Poll::Ready(Err(None)) => {
7656 this.is_terminated = true;
7657 return std::task::Poll::Ready(None);
7658 }
7659 std::task::Poll::Ready(Err(Some(e))) => {
7660 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7661 e.into(),
7662 ))));
7663 }
7664 }
7665
7666 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7668
7669 std::task::Poll::Ready(Some(match header.ordinal {
7670 0x25f56c938344e549 => {
7671 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7672 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
7673 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7674 let control_handle = SystemControllerControlHandle {
7675 inner: this.inner.clone(),
7676 };
7677 Ok(SystemControllerRequest::Shutdown {
7678 responder: SystemControllerShutdownResponder {
7679 control_handle: std::mem::ManuallyDrop::new(control_handle),
7680 tx_id: header.tx_id,
7681 },
7682 })
7683 }
7684 _ => Err(fidl::Error::UnknownOrdinal {
7685 ordinal: header.ordinal,
7686 protocol_name: <SystemControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7687 }),
7688 }))
7689 },
7690 )
7691 }
7692}
7693
7694#[derive(Debug)]
7697pub enum SystemControllerRequest {
7698 Shutdown { responder: SystemControllerShutdownResponder },
7702}
7703
7704impl SystemControllerRequest {
7705 #[allow(irrefutable_let_patterns)]
7706 pub fn into_shutdown(self) -> Option<(SystemControllerShutdownResponder)> {
7707 if let SystemControllerRequest::Shutdown { responder } = self {
7708 Some((responder))
7709 } else {
7710 None
7711 }
7712 }
7713
7714 pub fn method_name(&self) -> &'static str {
7716 match *self {
7717 SystemControllerRequest::Shutdown { .. } => "shutdown",
7718 }
7719 }
7720}
7721
7722#[derive(Debug, Clone)]
7723pub struct SystemControllerControlHandle {
7724 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7725}
7726
7727impl fdomain_client::fidl::ControlHandle for SystemControllerControlHandle {
7728 fn shutdown(&self) {
7729 self.inner.shutdown()
7730 }
7731
7732 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7733 self.inner.shutdown_with_epitaph(status)
7734 }
7735
7736 fn is_closed(&self) -> bool {
7737 self.inner.channel().is_closed()
7738 }
7739 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7740 self.inner.channel().on_closed()
7741 }
7742}
7743
7744impl SystemControllerControlHandle {}
7745
7746#[must_use = "FIDL methods require a response to be sent"]
7747#[derive(Debug)]
7748pub struct SystemControllerShutdownResponder {
7749 control_handle: std::mem::ManuallyDrop<SystemControllerControlHandle>,
7750 tx_id: u32,
7751}
7752
7753impl std::ops::Drop for SystemControllerShutdownResponder {
7757 fn drop(&mut self) {
7758 self.control_handle.shutdown();
7759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7761 }
7762}
7763
7764impl fdomain_client::fidl::Responder for SystemControllerShutdownResponder {
7765 type ControlHandle = SystemControllerControlHandle;
7766
7767 fn control_handle(&self) -> &SystemControllerControlHandle {
7768 &self.control_handle
7769 }
7770
7771 fn drop_without_shutdown(mut self) {
7772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7774 std::mem::forget(self);
7776 }
7777}
7778
7779impl SystemControllerShutdownResponder {
7780 pub fn send(self) -> Result<(), fidl::Error> {
7784 let _result = self.send_raw();
7785 if _result.is_err() {
7786 self.control_handle.shutdown();
7787 }
7788 self.drop_without_shutdown();
7789 _result
7790 }
7791
7792 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
7794 let _result = self.send_raw();
7795 self.drop_without_shutdown();
7796 _result
7797 }
7798
7799 fn send_raw(&self) -> Result<(), fidl::Error> {
7800 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
7801 (),
7802 self.tx_id,
7803 0x25f56c938344e549,
7804 fidl::encoding::DynamicFlags::empty(),
7805 )
7806 }
7807}
7808
7809mod internal {
7810 use super::*;
7811
7812 impl fidl::encoding::ResourceTypeMarker for CrashIntrospectFindComponentByThreadKoidRequest {
7813 type Borrowed<'a> = &'a mut Self;
7814 fn take_or_borrow<'a>(
7815 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7816 ) -> Self::Borrowed<'a> {
7817 value
7818 }
7819 }
7820
7821 unsafe impl fidl::encoding::TypeMarker for CrashIntrospectFindComponentByThreadKoidRequest {
7822 type Owned = Self;
7823
7824 #[inline(always)]
7825 fn inline_align(_context: fidl::encoding::Context) -> usize {
7826 8
7827 }
7828
7829 #[inline(always)]
7830 fn inline_size(_context: fidl::encoding::Context) -> usize {
7831 8
7832 }
7833 #[inline(always)]
7834 fn encode_is_copy() -> bool {
7835 true
7836 }
7837
7838 #[inline(always)]
7839 fn decode_is_copy() -> bool {
7840 true
7841 }
7842 }
7843
7844 unsafe impl
7845 fidl::encoding::Encode<
7846 CrashIntrospectFindComponentByThreadKoidRequest,
7847 fdomain_client::fidl::FDomainResourceDialect,
7848 > for &mut CrashIntrospectFindComponentByThreadKoidRequest
7849 {
7850 #[inline]
7851 unsafe fn encode(
7852 self,
7853 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7854 offset: usize,
7855 _depth: fidl::encoding::Depth,
7856 ) -> fidl::Result<()> {
7857 encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidRequest>(offset);
7858 unsafe {
7859 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7861 (buf_ptr as *mut CrashIntrospectFindComponentByThreadKoidRequest).write_unaligned(
7862 (self as *const CrashIntrospectFindComponentByThreadKoidRequest).read(),
7863 );
7864 }
7867 Ok(())
7868 }
7869 }
7870 unsafe impl<T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>>
7871 fidl::encoding::Encode<
7872 CrashIntrospectFindComponentByThreadKoidRequest,
7873 fdomain_client::fidl::FDomainResourceDialect,
7874 > for (T0,)
7875 {
7876 #[inline]
7877 unsafe fn encode(
7878 self,
7879 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7880 offset: usize,
7881 depth: fidl::encoding::Depth,
7882 ) -> fidl::Result<()> {
7883 encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidRequest>(offset);
7884 self.0.encode(encoder, offset + 0, depth)?;
7888 Ok(())
7889 }
7890 }
7891
7892 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7893 for CrashIntrospectFindComponentByThreadKoidRequest
7894 {
7895 #[inline(always)]
7896 fn new_empty() -> Self {
7897 Self {
7898 thread_koid: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
7899 }
7900 }
7901
7902 #[inline]
7903 unsafe fn decode(
7904 &mut self,
7905 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7906 offset: usize,
7907 _depth: fidl::encoding::Depth,
7908 ) -> fidl::Result<()> {
7909 decoder.debug_check_bounds::<Self>(offset);
7910 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7911 unsafe {
7914 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7915 }
7916 Ok(())
7917 }
7918 }
7919
7920 impl fidl::encoding::ResourceTypeMarker for LifecycleControllerCreateInstanceRequest {
7921 type Borrowed<'a> = &'a mut Self;
7922 fn take_or_borrow<'a>(
7923 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7924 ) -> Self::Borrowed<'a> {
7925 value
7926 }
7927 }
7928
7929 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerCreateInstanceRequest {
7930 type Owned = Self;
7931
7932 #[inline(always)]
7933 fn inline_align(_context: fidl::encoding::Context) -> usize {
7934 8
7935 }
7936
7937 #[inline(always)]
7938 fn inline_size(_context: fidl::encoding::Context) -> usize {
7939 64
7940 }
7941 }
7942
7943 unsafe impl
7944 fidl::encoding::Encode<
7945 LifecycleControllerCreateInstanceRequest,
7946 fdomain_client::fidl::FDomainResourceDialect,
7947 > for &mut LifecycleControllerCreateInstanceRequest
7948 {
7949 #[inline]
7950 unsafe fn encode(
7951 self,
7952 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7953 offset: usize,
7954 _depth: fidl::encoding::Depth,
7955 ) -> fidl::Result<()> {
7956 encoder.debug_check_bounds::<LifecycleControllerCreateInstanceRequest>(offset);
7957 fidl::encoding::Encode::<LifecycleControllerCreateInstanceRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
7959 (
7960 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent_moniker),
7961 <fdomain_fuchsia_component_decl::CollectionRef as fidl::encoding::ValueTypeMarker>::borrow(&self.collection),
7962 <fdomain_fuchsia_component_decl::Child as fidl::encoding::ValueTypeMarker>::borrow(&self.decl),
7963 <fdomain_fuchsia_component::CreateChildArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.args),
7964 ),
7965 encoder, offset, _depth
7966 )
7967 }
7968 }
7969 unsafe impl<
7970 T0: fidl::encoding::Encode<
7971 fidl::encoding::BoundedString<4096>,
7972 fdomain_client::fidl::FDomainResourceDialect,
7973 >,
7974 T1: fidl::encoding::Encode<
7975 fdomain_fuchsia_component_decl::CollectionRef,
7976 fdomain_client::fidl::FDomainResourceDialect,
7977 >,
7978 T2: fidl::encoding::Encode<
7979 fdomain_fuchsia_component_decl::Child,
7980 fdomain_client::fidl::FDomainResourceDialect,
7981 >,
7982 T3: fidl::encoding::Encode<
7983 fdomain_fuchsia_component::CreateChildArgs,
7984 fdomain_client::fidl::FDomainResourceDialect,
7985 >,
7986 >
7987 fidl::encoding::Encode<
7988 LifecycleControllerCreateInstanceRequest,
7989 fdomain_client::fidl::FDomainResourceDialect,
7990 > for (T0, T1, T2, T3)
7991 {
7992 #[inline]
7993 unsafe fn encode(
7994 self,
7995 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7996 offset: usize,
7997 depth: fidl::encoding::Depth,
7998 ) -> fidl::Result<()> {
7999 encoder.debug_check_bounds::<LifecycleControllerCreateInstanceRequest>(offset);
8000 self.0.encode(encoder, offset + 0, depth)?;
8004 self.1.encode(encoder, offset + 16, depth)?;
8005 self.2.encode(encoder, offset + 32, depth)?;
8006 self.3.encode(encoder, offset + 48, depth)?;
8007 Ok(())
8008 }
8009 }
8010
8011 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8012 for LifecycleControllerCreateInstanceRequest
8013 {
8014 #[inline(always)]
8015 fn new_empty() -> Self {
8016 Self {
8017 parent_moniker: fidl::new_empty!(
8018 fidl::encoding::BoundedString<4096>,
8019 fdomain_client::fidl::FDomainResourceDialect
8020 ),
8021 collection: fidl::new_empty!(
8022 fdomain_fuchsia_component_decl::CollectionRef,
8023 fdomain_client::fidl::FDomainResourceDialect
8024 ),
8025 decl: fidl::new_empty!(
8026 fdomain_fuchsia_component_decl::Child,
8027 fdomain_client::fidl::FDomainResourceDialect
8028 ),
8029 args: fidl::new_empty!(
8030 fdomain_fuchsia_component::CreateChildArgs,
8031 fdomain_client::fidl::FDomainResourceDialect
8032 ),
8033 }
8034 }
8035
8036 #[inline]
8037 unsafe fn decode(
8038 &mut self,
8039 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8040 offset: usize,
8041 _depth: fidl::encoding::Depth,
8042 ) -> fidl::Result<()> {
8043 decoder.debug_check_bounds::<Self>(offset);
8044 fidl::decode!(
8046 fidl::encoding::BoundedString<4096>,
8047 fdomain_client::fidl::FDomainResourceDialect,
8048 &mut self.parent_moniker,
8049 decoder,
8050 offset + 0,
8051 _depth
8052 )?;
8053 fidl::decode!(
8054 fdomain_fuchsia_component_decl::CollectionRef,
8055 fdomain_client::fidl::FDomainResourceDialect,
8056 &mut self.collection,
8057 decoder,
8058 offset + 16,
8059 _depth
8060 )?;
8061 fidl::decode!(
8062 fdomain_fuchsia_component_decl::Child,
8063 fdomain_client::fidl::FDomainResourceDialect,
8064 &mut self.decl,
8065 decoder,
8066 offset + 32,
8067 _depth
8068 )?;
8069 fidl::decode!(
8070 fdomain_fuchsia_component::CreateChildArgs,
8071 fdomain_client::fidl::FDomainResourceDialect,
8072 &mut self.args,
8073 decoder,
8074 offset + 48,
8075 _depth
8076 )?;
8077 Ok(())
8078 }
8079 }
8080
8081 impl fidl::encoding::ResourceTypeMarker for LifecycleControllerStartInstanceRequest {
8082 type Borrowed<'a> = &'a mut Self;
8083 fn take_or_borrow<'a>(
8084 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8085 ) -> Self::Borrowed<'a> {
8086 value
8087 }
8088 }
8089
8090 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerStartInstanceRequest {
8091 type Owned = Self;
8092
8093 #[inline(always)]
8094 fn inline_align(_context: fidl::encoding::Context) -> usize {
8095 8
8096 }
8097
8098 #[inline(always)]
8099 fn inline_size(_context: fidl::encoding::Context) -> usize {
8100 24
8101 }
8102 }
8103
8104 unsafe impl
8105 fidl::encoding::Encode<
8106 LifecycleControllerStartInstanceRequest,
8107 fdomain_client::fidl::FDomainResourceDialect,
8108 > for &mut LifecycleControllerStartInstanceRequest
8109 {
8110 #[inline]
8111 unsafe fn encode(
8112 self,
8113 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8114 offset: usize,
8115 _depth: fidl::encoding::Depth,
8116 ) -> fidl::Result<()> {
8117 encoder.debug_check_bounds::<LifecycleControllerStartInstanceRequest>(offset);
8118 fidl::encoding::Encode::<LifecycleControllerStartInstanceRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8120 (
8121 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
8122 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.binder),
8123 ),
8124 encoder, offset, _depth
8125 )
8126 }
8127 }
8128 unsafe impl<
8129 T0: fidl::encoding::Encode<
8130 fidl::encoding::BoundedString<4096>,
8131 fdomain_client::fidl::FDomainResourceDialect,
8132 >,
8133 T1: fidl::encoding::Encode<
8134 fidl::encoding::Endpoint<
8135 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
8136 >,
8137 fdomain_client::fidl::FDomainResourceDialect,
8138 >,
8139 >
8140 fidl::encoding::Encode<
8141 LifecycleControllerStartInstanceRequest,
8142 fdomain_client::fidl::FDomainResourceDialect,
8143 > for (T0, T1)
8144 {
8145 #[inline]
8146 unsafe fn encode(
8147 self,
8148 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8149 offset: usize,
8150 depth: fidl::encoding::Depth,
8151 ) -> fidl::Result<()> {
8152 encoder.debug_check_bounds::<LifecycleControllerStartInstanceRequest>(offset);
8153 unsafe {
8156 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8157 (ptr as *mut u64).write_unaligned(0);
8158 }
8159 self.0.encode(encoder, offset + 0, depth)?;
8161 self.1.encode(encoder, offset + 16, depth)?;
8162 Ok(())
8163 }
8164 }
8165
8166 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8167 for LifecycleControllerStartInstanceRequest
8168 {
8169 #[inline(always)]
8170 fn new_empty() -> Self {
8171 Self {
8172 moniker: fidl::new_empty!(
8173 fidl::encoding::BoundedString<4096>,
8174 fdomain_client::fidl::FDomainResourceDialect
8175 ),
8176 binder: fidl::new_empty!(
8177 fidl::encoding::Endpoint<
8178 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
8179 >,
8180 fdomain_client::fidl::FDomainResourceDialect
8181 ),
8182 }
8183 }
8184
8185 #[inline]
8186 unsafe fn decode(
8187 &mut self,
8188 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8189 offset: usize,
8190 _depth: fidl::encoding::Depth,
8191 ) -> fidl::Result<()> {
8192 decoder.debug_check_bounds::<Self>(offset);
8193 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8195 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8196 let mask = 0xffffffff00000000u64;
8197 let maskedval = padval & mask;
8198 if maskedval != 0 {
8199 return Err(fidl::Error::NonZeroPadding {
8200 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8201 });
8202 }
8203 fidl::decode!(
8204 fidl::encoding::BoundedString<4096>,
8205 fdomain_client::fidl::FDomainResourceDialect,
8206 &mut self.moniker,
8207 decoder,
8208 offset + 0,
8209 _depth
8210 )?;
8211 fidl::decode!(
8212 fidl::encoding::Endpoint<
8213 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
8214 >,
8215 fdomain_client::fidl::FDomainResourceDialect,
8216 &mut self.binder,
8217 decoder,
8218 offset + 16,
8219 _depth
8220 )?;
8221 Ok(())
8222 }
8223 }
8224
8225 impl fidl::encoding::ResourceTypeMarker for LifecycleControllerStartInstanceWithArgsRequest {
8226 type Borrowed<'a> = &'a mut Self;
8227 fn take_or_borrow<'a>(
8228 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8229 ) -> Self::Borrowed<'a> {
8230 value
8231 }
8232 }
8233
8234 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerStartInstanceWithArgsRequest {
8235 type Owned = Self;
8236
8237 #[inline(always)]
8238 fn inline_align(_context: fidl::encoding::Context) -> usize {
8239 8
8240 }
8241
8242 #[inline(always)]
8243 fn inline_size(_context: fidl::encoding::Context) -> usize {
8244 40
8245 }
8246 }
8247
8248 unsafe impl
8249 fidl::encoding::Encode<
8250 LifecycleControllerStartInstanceWithArgsRequest,
8251 fdomain_client::fidl::FDomainResourceDialect,
8252 > for &mut LifecycleControllerStartInstanceWithArgsRequest
8253 {
8254 #[inline]
8255 unsafe fn encode(
8256 self,
8257 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8258 offset: usize,
8259 _depth: fidl::encoding::Depth,
8260 ) -> fidl::Result<()> {
8261 encoder.debug_check_bounds::<LifecycleControllerStartInstanceWithArgsRequest>(offset);
8262 fidl::encoding::Encode::<LifecycleControllerStartInstanceWithArgsRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8264 (
8265 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
8266 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.binder),
8267 <fdomain_fuchsia_component::StartChildArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.args),
8268 ),
8269 encoder, offset, _depth
8270 )
8271 }
8272 }
8273 unsafe impl<
8274 T0: fidl::encoding::Encode<
8275 fidl::encoding::BoundedString<4096>,
8276 fdomain_client::fidl::FDomainResourceDialect,
8277 >,
8278 T1: fidl::encoding::Encode<
8279 fidl::encoding::Endpoint<
8280 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
8281 >,
8282 fdomain_client::fidl::FDomainResourceDialect,
8283 >,
8284 T2: fidl::encoding::Encode<
8285 fdomain_fuchsia_component::StartChildArgs,
8286 fdomain_client::fidl::FDomainResourceDialect,
8287 >,
8288 >
8289 fidl::encoding::Encode<
8290 LifecycleControllerStartInstanceWithArgsRequest,
8291 fdomain_client::fidl::FDomainResourceDialect,
8292 > for (T0, T1, T2)
8293 {
8294 #[inline]
8295 unsafe fn encode(
8296 self,
8297 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8298 offset: usize,
8299 depth: fidl::encoding::Depth,
8300 ) -> fidl::Result<()> {
8301 encoder.debug_check_bounds::<LifecycleControllerStartInstanceWithArgsRequest>(offset);
8302 unsafe {
8305 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8306 (ptr as *mut u64).write_unaligned(0);
8307 }
8308 self.0.encode(encoder, offset + 0, depth)?;
8310 self.1.encode(encoder, offset + 16, depth)?;
8311 self.2.encode(encoder, offset + 24, depth)?;
8312 Ok(())
8313 }
8314 }
8315
8316 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8317 for LifecycleControllerStartInstanceWithArgsRequest
8318 {
8319 #[inline(always)]
8320 fn new_empty() -> Self {
8321 Self {
8322 moniker: fidl::new_empty!(
8323 fidl::encoding::BoundedString<4096>,
8324 fdomain_client::fidl::FDomainResourceDialect
8325 ),
8326 binder: fidl::new_empty!(
8327 fidl::encoding::Endpoint<
8328 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
8329 >,
8330 fdomain_client::fidl::FDomainResourceDialect
8331 ),
8332 args: fidl::new_empty!(
8333 fdomain_fuchsia_component::StartChildArgs,
8334 fdomain_client::fidl::FDomainResourceDialect
8335 ),
8336 }
8337 }
8338
8339 #[inline]
8340 unsafe fn decode(
8341 &mut self,
8342 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8343 offset: usize,
8344 _depth: fidl::encoding::Depth,
8345 ) -> fidl::Result<()> {
8346 decoder.debug_check_bounds::<Self>(offset);
8347 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8349 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8350 let mask = 0xffffffff00000000u64;
8351 let maskedval = padval & mask;
8352 if maskedval != 0 {
8353 return Err(fidl::Error::NonZeroPadding {
8354 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8355 });
8356 }
8357 fidl::decode!(
8358 fidl::encoding::BoundedString<4096>,
8359 fdomain_client::fidl::FDomainResourceDialect,
8360 &mut self.moniker,
8361 decoder,
8362 offset + 0,
8363 _depth
8364 )?;
8365 fidl::decode!(
8366 fidl::encoding::Endpoint<
8367 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_component::BinderMarker>,
8368 >,
8369 fdomain_client::fidl::FDomainResourceDialect,
8370 &mut self.binder,
8371 decoder,
8372 offset + 16,
8373 _depth
8374 )?;
8375 fidl::decode!(
8376 fdomain_fuchsia_component::StartChildArgs,
8377 fdomain_client::fidl::FDomainResourceDialect,
8378 &mut self.args,
8379 decoder,
8380 offset + 24,
8381 _depth
8382 )?;
8383 Ok(())
8384 }
8385 }
8386
8387 impl fidl::encoding::ResourceTypeMarker for RealmQueryConnectToStorageAdminRequest {
8388 type Borrowed<'a> = &'a mut Self;
8389 fn take_or_borrow<'a>(
8390 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8391 ) -> Self::Borrowed<'a> {
8392 value
8393 }
8394 }
8395
8396 unsafe impl fidl::encoding::TypeMarker for RealmQueryConnectToStorageAdminRequest {
8397 type Owned = Self;
8398
8399 #[inline(always)]
8400 fn inline_align(_context: fidl::encoding::Context) -> usize {
8401 8
8402 }
8403
8404 #[inline(always)]
8405 fn inline_size(_context: fidl::encoding::Context) -> usize {
8406 40
8407 }
8408 }
8409
8410 unsafe impl
8411 fidl::encoding::Encode<
8412 RealmQueryConnectToStorageAdminRequest,
8413 fdomain_client::fidl::FDomainResourceDialect,
8414 > for &mut RealmQueryConnectToStorageAdminRequest
8415 {
8416 #[inline]
8417 unsafe fn encode(
8418 self,
8419 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8420 offset: usize,
8421 _depth: fidl::encoding::Depth,
8422 ) -> fidl::Result<()> {
8423 encoder.debug_check_bounds::<RealmQueryConnectToStorageAdminRequest>(offset);
8424 fidl::encoding::Encode::<RealmQueryConnectToStorageAdminRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8426 (
8427 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
8428 <fidl::encoding::BoundedString<100> as fidl::encoding::ValueTypeMarker>::borrow(&self.storage_name),
8429 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageAdminMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
8430 ),
8431 encoder, offset, _depth
8432 )
8433 }
8434 }
8435 unsafe impl<
8436 T0: fidl::encoding::Encode<
8437 fidl::encoding::BoundedString<4096>,
8438 fdomain_client::fidl::FDomainResourceDialect,
8439 >,
8440 T1: fidl::encoding::Encode<
8441 fidl::encoding::BoundedString<100>,
8442 fdomain_client::fidl::FDomainResourceDialect,
8443 >,
8444 T2: fidl::encoding::Encode<
8445 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageAdminMarker>>,
8446 fdomain_client::fidl::FDomainResourceDialect,
8447 >,
8448 >
8449 fidl::encoding::Encode<
8450 RealmQueryConnectToStorageAdminRequest,
8451 fdomain_client::fidl::FDomainResourceDialect,
8452 > for (T0, T1, T2)
8453 {
8454 #[inline]
8455 unsafe fn encode(
8456 self,
8457 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8458 offset: usize,
8459 depth: fidl::encoding::Depth,
8460 ) -> fidl::Result<()> {
8461 encoder.debug_check_bounds::<RealmQueryConnectToStorageAdminRequest>(offset);
8462 unsafe {
8465 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
8466 (ptr as *mut u64).write_unaligned(0);
8467 }
8468 self.0.encode(encoder, offset + 0, depth)?;
8470 self.1.encode(encoder, offset + 16, depth)?;
8471 self.2.encode(encoder, offset + 32, depth)?;
8472 Ok(())
8473 }
8474 }
8475
8476 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8477 for RealmQueryConnectToStorageAdminRequest
8478 {
8479 #[inline(always)]
8480 fn new_empty() -> Self {
8481 Self {
8482 moniker: fidl::new_empty!(
8483 fidl::encoding::BoundedString<4096>,
8484 fdomain_client::fidl::FDomainResourceDialect
8485 ),
8486 storage_name: fidl::new_empty!(
8487 fidl::encoding::BoundedString<100>,
8488 fdomain_client::fidl::FDomainResourceDialect
8489 ),
8490 server_end: fidl::new_empty!(
8491 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageAdminMarker>>,
8492 fdomain_client::fidl::FDomainResourceDialect
8493 ),
8494 }
8495 }
8496
8497 #[inline]
8498 unsafe fn decode(
8499 &mut self,
8500 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8501 offset: usize,
8502 _depth: fidl::encoding::Depth,
8503 ) -> fidl::Result<()> {
8504 decoder.debug_check_bounds::<Self>(offset);
8505 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
8507 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8508 let mask = 0xffffffff00000000u64;
8509 let maskedval = padval & mask;
8510 if maskedval != 0 {
8511 return Err(fidl::Error::NonZeroPadding {
8512 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
8513 });
8514 }
8515 fidl::decode!(
8516 fidl::encoding::BoundedString<4096>,
8517 fdomain_client::fidl::FDomainResourceDialect,
8518 &mut self.moniker,
8519 decoder,
8520 offset + 0,
8521 _depth
8522 )?;
8523 fidl::decode!(
8524 fidl::encoding::BoundedString<100>,
8525 fdomain_client::fidl::FDomainResourceDialect,
8526 &mut self.storage_name,
8527 decoder,
8528 offset + 16,
8529 _depth
8530 )?;
8531 fidl::decode!(
8532 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageAdminMarker>>,
8533 fdomain_client::fidl::FDomainResourceDialect,
8534 &mut self.server_end,
8535 decoder,
8536 offset + 32,
8537 _depth
8538 )?;
8539 Ok(())
8540 }
8541 }
8542
8543 impl fidl::encoding::ResourceTypeMarker for RealmQueryOpenDirectoryRequest {
8544 type Borrowed<'a> = &'a mut Self;
8545 fn take_or_borrow<'a>(
8546 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8547 ) -> Self::Borrowed<'a> {
8548 value
8549 }
8550 }
8551
8552 unsafe impl fidl::encoding::TypeMarker for RealmQueryOpenDirectoryRequest {
8553 type Owned = Self;
8554
8555 #[inline(always)]
8556 fn inline_align(_context: fidl::encoding::Context) -> usize {
8557 8
8558 }
8559
8560 #[inline(always)]
8561 fn inline_size(_context: fidl::encoding::Context) -> usize {
8562 24
8563 }
8564 }
8565
8566 unsafe impl
8567 fidl::encoding::Encode<
8568 RealmQueryOpenDirectoryRequest,
8569 fdomain_client::fidl::FDomainResourceDialect,
8570 > for &mut RealmQueryOpenDirectoryRequest
8571 {
8572 #[inline]
8573 unsafe fn encode(
8574 self,
8575 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8576 offset: usize,
8577 _depth: fidl::encoding::Depth,
8578 ) -> fidl::Result<()> {
8579 encoder.debug_check_bounds::<RealmQueryOpenDirectoryRequest>(offset);
8580 fidl::encoding::Encode::<RealmQueryOpenDirectoryRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8582 (
8583 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
8584 <OpenDirType as fidl::encoding::ValueTypeMarker>::borrow(&self.dir_type),
8585 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
8586 ),
8587 encoder, offset, _depth
8588 )
8589 }
8590 }
8591 unsafe impl<
8592 T0: fidl::encoding::Encode<
8593 fidl::encoding::BoundedString<4096>,
8594 fdomain_client::fidl::FDomainResourceDialect,
8595 >,
8596 T1: fidl::encoding::Encode<OpenDirType, fdomain_client::fidl::FDomainResourceDialect>,
8597 T2: fidl::encoding::Encode<
8598 fidl::encoding::Endpoint<
8599 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
8600 >,
8601 fdomain_client::fidl::FDomainResourceDialect,
8602 >,
8603 >
8604 fidl::encoding::Encode<
8605 RealmQueryOpenDirectoryRequest,
8606 fdomain_client::fidl::FDomainResourceDialect,
8607 > for (T0, T1, T2)
8608 {
8609 #[inline]
8610 unsafe fn encode(
8611 self,
8612 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8613 offset: usize,
8614 depth: fidl::encoding::Depth,
8615 ) -> fidl::Result<()> {
8616 encoder.debug_check_bounds::<RealmQueryOpenDirectoryRequest>(offset);
8617 self.0.encode(encoder, offset + 0, depth)?;
8621 self.1.encode(encoder, offset + 16, depth)?;
8622 self.2.encode(encoder, offset + 20, depth)?;
8623 Ok(())
8624 }
8625 }
8626
8627 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8628 for RealmQueryOpenDirectoryRequest
8629 {
8630 #[inline(always)]
8631 fn new_empty() -> Self {
8632 Self {
8633 moniker: fidl::new_empty!(
8634 fidl::encoding::BoundedString<4096>,
8635 fdomain_client::fidl::FDomainResourceDialect
8636 ),
8637 dir_type: fidl::new_empty!(
8638 OpenDirType,
8639 fdomain_client::fidl::FDomainResourceDialect
8640 ),
8641 object: fidl::new_empty!(
8642 fidl::encoding::Endpoint<
8643 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
8644 >,
8645 fdomain_client::fidl::FDomainResourceDialect
8646 ),
8647 }
8648 }
8649
8650 #[inline]
8651 unsafe fn decode(
8652 &mut self,
8653 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8654 offset: usize,
8655 _depth: fidl::encoding::Depth,
8656 ) -> fidl::Result<()> {
8657 decoder.debug_check_bounds::<Self>(offset);
8658 fidl::decode!(
8660 fidl::encoding::BoundedString<4096>,
8661 fdomain_client::fidl::FDomainResourceDialect,
8662 &mut self.moniker,
8663 decoder,
8664 offset + 0,
8665 _depth
8666 )?;
8667 fidl::decode!(
8668 OpenDirType,
8669 fdomain_client::fidl::FDomainResourceDialect,
8670 &mut self.dir_type,
8671 decoder,
8672 offset + 16,
8673 _depth
8674 )?;
8675 fidl::decode!(
8676 fidl::encoding::Endpoint<
8677 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
8678 >,
8679 fdomain_client::fidl::FDomainResourceDialect,
8680 &mut self.object,
8681 decoder,
8682 offset + 20,
8683 _depth
8684 )?;
8685 Ok(())
8686 }
8687 }
8688
8689 impl fidl::encoding::ResourceTypeMarker for RealmQueryConstructNamespaceResponse {
8690 type Borrowed<'a> = &'a mut Self;
8691 fn take_or_borrow<'a>(
8692 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8693 ) -> Self::Borrowed<'a> {
8694 value
8695 }
8696 }
8697
8698 unsafe impl fidl::encoding::TypeMarker for RealmQueryConstructNamespaceResponse {
8699 type Owned = Self;
8700
8701 #[inline(always)]
8702 fn inline_align(_context: fidl::encoding::Context) -> usize {
8703 8
8704 }
8705
8706 #[inline(always)]
8707 fn inline_size(_context: fidl::encoding::Context) -> usize {
8708 16
8709 }
8710 }
8711
8712 unsafe impl
8713 fidl::encoding::Encode<
8714 RealmQueryConstructNamespaceResponse,
8715 fdomain_client::fidl::FDomainResourceDialect,
8716 > for &mut RealmQueryConstructNamespaceResponse
8717 {
8718 #[inline]
8719 unsafe fn encode(
8720 self,
8721 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8722 offset: usize,
8723 _depth: fidl::encoding::Depth,
8724 ) -> fidl::Result<()> {
8725 encoder.debug_check_bounds::<RealmQueryConstructNamespaceResponse>(offset);
8726 fidl::encoding::Encode::<
8728 RealmQueryConstructNamespaceResponse,
8729 fdomain_client::fidl::FDomainResourceDialect,
8730 >::encode(
8731 (<fidl::encoding::UnboundedVector<
8732 fdomain_fuchsia_component_runner::ComponentNamespaceEntry,
8733 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8734 &mut self.namespace
8735 ),),
8736 encoder,
8737 offset,
8738 _depth,
8739 )
8740 }
8741 }
8742 unsafe impl<
8743 T0: fidl::encoding::Encode<
8744 fidl::encoding::UnboundedVector<
8745 fdomain_fuchsia_component_runner::ComponentNamespaceEntry,
8746 >,
8747 fdomain_client::fidl::FDomainResourceDialect,
8748 >,
8749 >
8750 fidl::encoding::Encode<
8751 RealmQueryConstructNamespaceResponse,
8752 fdomain_client::fidl::FDomainResourceDialect,
8753 > for (T0,)
8754 {
8755 #[inline]
8756 unsafe fn encode(
8757 self,
8758 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8759 offset: usize,
8760 depth: fidl::encoding::Depth,
8761 ) -> fidl::Result<()> {
8762 encoder.debug_check_bounds::<RealmQueryConstructNamespaceResponse>(offset);
8763 self.0.encode(encoder, offset + 0, depth)?;
8767 Ok(())
8768 }
8769 }
8770
8771 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8772 for RealmQueryConstructNamespaceResponse
8773 {
8774 #[inline(always)]
8775 fn new_empty() -> Self {
8776 Self {
8777 namespace: fidl::new_empty!(
8778 fidl::encoding::UnboundedVector<
8779 fdomain_fuchsia_component_runner::ComponentNamespaceEntry,
8780 >,
8781 fdomain_client::fidl::FDomainResourceDialect
8782 ),
8783 }
8784 }
8785
8786 #[inline]
8787 unsafe fn decode(
8788 &mut self,
8789 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8790 offset: usize,
8791 _depth: fidl::encoding::Depth,
8792 ) -> fidl::Result<()> {
8793 decoder.debug_check_bounds::<Self>(offset);
8794 fidl::decode!(
8796 fidl::encoding::UnboundedVector<
8797 fdomain_fuchsia_component_runner::ComponentNamespaceEntry,
8798 >,
8799 fdomain_client::fidl::FDomainResourceDialect,
8800 &mut self.namespace,
8801 decoder,
8802 offset + 0,
8803 _depth
8804 )?;
8805 Ok(())
8806 }
8807 }
8808
8809 impl fidl::encoding::ResourceTypeMarker for RealmQueryGetAllInstancesResponse {
8810 type Borrowed<'a> = &'a mut Self;
8811 fn take_or_borrow<'a>(
8812 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8813 ) -> Self::Borrowed<'a> {
8814 value
8815 }
8816 }
8817
8818 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetAllInstancesResponse {
8819 type Owned = Self;
8820
8821 #[inline(always)]
8822 fn inline_align(_context: fidl::encoding::Context) -> usize {
8823 4
8824 }
8825
8826 #[inline(always)]
8827 fn inline_size(_context: fidl::encoding::Context) -> usize {
8828 4
8829 }
8830 }
8831
8832 unsafe impl
8833 fidl::encoding::Encode<
8834 RealmQueryGetAllInstancesResponse,
8835 fdomain_client::fidl::FDomainResourceDialect,
8836 > for &mut RealmQueryGetAllInstancesResponse
8837 {
8838 #[inline]
8839 unsafe fn encode(
8840 self,
8841 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8842 offset: usize,
8843 _depth: fidl::encoding::Depth,
8844 ) -> fidl::Result<()> {
8845 encoder.debug_check_bounds::<RealmQueryGetAllInstancesResponse>(offset);
8846 fidl::encoding::Encode::<
8848 RealmQueryGetAllInstancesResponse,
8849 fdomain_client::fidl::FDomainResourceDialect,
8850 >::encode(
8851 (
8852 <fidl::encoding::Endpoint<
8853 fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>,
8854 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8855 &mut self.iterator
8856 ),
8857 ),
8858 encoder,
8859 offset,
8860 _depth,
8861 )
8862 }
8863 }
8864 unsafe impl<
8865 T0: fidl::encoding::Encode<
8866 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>>,
8867 fdomain_client::fidl::FDomainResourceDialect,
8868 >,
8869 >
8870 fidl::encoding::Encode<
8871 RealmQueryGetAllInstancesResponse,
8872 fdomain_client::fidl::FDomainResourceDialect,
8873 > for (T0,)
8874 {
8875 #[inline]
8876 unsafe fn encode(
8877 self,
8878 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8879 offset: usize,
8880 depth: fidl::encoding::Depth,
8881 ) -> fidl::Result<()> {
8882 encoder.debug_check_bounds::<RealmQueryGetAllInstancesResponse>(offset);
8883 self.0.encode(encoder, offset + 0, depth)?;
8887 Ok(())
8888 }
8889 }
8890
8891 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8892 for RealmQueryGetAllInstancesResponse
8893 {
8894 #[inline(always)]
8895 fn new_empty() -> Self {
8896 Self {
8897 iterator: fidl::new_empty!(
8898 fidl::encoding::Endpoint<
8899 fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>,
8900 >,
8901 fdomain_client::fidl::FDomainResourceDialect
8902 ),
8903 }
8904 }
8905
8906 #[inline]
8907 unsafe fn decode(
8908 &mut self,
8909 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8910 offset: usize,
8911 _depth: fidl::encoding::Depth,
8912 ) -> fidl::Result<()> {
8913 decoder.debug_check_bounds::<Self>(offset);
8914 fidl::decode!(
8916 fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<InstanceIteratorMarker>>,
8917 fdomain_client::fidl::FDomainResourceDialect,
8918 &mut self.iterator,
8919 decoder,
8920 offset + 0,
8921 _depth
8922 )?;
8923 Ok(())
8924 }
8925 }
8926
8927 impl fidl::encoding::ResourceTypeMarker for RealmQueryGetResolvedDeclarationResponse {
8928 type Borrowed<'a> = &'a mut Self;
8929 fn take_or_borrow<'a>(
8930 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8931 ) -> Self::Borrowed<'a> {
8932 value
8933 }
8934 }
8935
8936 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetResolvedDeclarationResponse {
8937 type Owned = Self;
8938
8939 #[inline(always)]
8940 fn inline_align(_context: fidl::encoding::Context) -> usize {
8941 4
8942 }
8943
8944 #[inline(always)]
8945 fn inline_size(_context: fidl::encoding::Context) -> usize {
8946 4
8947 }
8948 }
8949
8950 unsafe impl
8951 fidl::encoding::Encode<
8952 RealmQueryGetResolvedDeclarationResponse,
8953 fdomain_client::fidl::FDomainResourceDialect,
8954 > for &mut RealmQueryGetResolvedDeclarationResponse
8955 {
8956 #[inline]
8957 unsafe fn encode(
8958 self,
8959 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8960 offset: usize,
8961 _depth: fidl::encoding::Depth,
8962 ) -> fidl::Result<()> {
8963 encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationResponse>(offset);
8964 fidl::encoding::Encode::<
8966 RealmQueryGetResolvedDeclarationResponse,
8967 fdomain_client::fidl::FDomainResourceDialect,
8968 >::encode(
8969 (<fidl::encoding::Endpoint<
8970 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
8971 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8972 &mut self.iterator
8973 ),),
8974 encoder,
8975 offset,
8976 _depth,
8977 )
8978 }
8979 }
8980 unsafe impl<
8981 T0: fidl::encoding::Encode<
8982 fidl::encoding::Endpoint<
8983 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
8984 >,
8985 fdomain_client::fidl::FDomainResourceDialect,
8986 >,
8987 >
8988 fidl::encoding::Encode<
8989 RealmQueryGetResolvedDeclarationResponse,
8990 fdomain_client::fidl::FDomainResourceDialect,
8991 > for (T0,)
8992 {
8993 #[inline]
8994 unsafe fn encode(
8995 self,
8996 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8997 offset: usize,
8998 depth: fidl::encoding::Depth,
8999 ) -> fidl::Result<()> {
9000 encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationResponse>(offset);
9001 self.0.encode(encoder, offset + 0, depth)?;
9005 Ok(())
9006 }
9007 }
9008
9009 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9010 for RealmQueryGetResolvedDeclarationResponse
9011 {
9012 #[inline(always)]
9013 fn new_empty() -> Self {
9014 Self {
9015 iterator: fidl::new_empty!(
9016 fidl::encoding::Endpoint<
9017 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
9018 >,
9019 fdomain_client::fidl::FDomainResourceDialect
9020 ),
9021 }
9022 }
9023
9024 #[inline]
9025 unsafe fn decode(
9026 &mut self,
9027 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9028 offset: usize,
9029 _depth: fidl::encoding::Depth,
9030 ) -> fidl::Result<()> {
9031 decoder.debug_check_bounds::<Self>(offset);
9032 fidl::decode!(
9034 fidl::encoding::Endpoint<
9035 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
9036 >,
9037 fdomain_client::fidl::FDomainResourceDialect,
9038 &mut self.iterator,
9039 decoder,
9040 offset + 0,
9041 _depth
9042 )?;
9043 Ok(())
9044 }
9045 }
9046
9047 impl fidl::encoding::ResourceTypeMarker for RealmQueryResolveDeclarationResponse {
9048 type Borrowed<'a> = &'a mut Self;
9049 fn take_or_borrow<'a>(
9050 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9051 ) -> Self::Borrowed<'a> {
9052 value
9053 }
9054 }
9055
9056 unsafe impl fidl::encoding::TypeMarker for RealmQueryResolveDeclarationResponse {
9057 type Owned = Self;
9058
9059 #[inline(always)]
9060 fn inline_align(_context: fidl::encoding::Context) -> usize {
9061 4
9062 }
9063
9064 #[inline(always)]
9065 fn inline_size(_context: fidl::encoding::Context) -> usize {
9066 4
9067 }
9068 }
9069
9070 unsafe impl
9071 fidl::encoding::Encode<
9072 RealmQueryResolveDeclarationResponse,
9073 fdomain_client::fidl::FDomainResourceDialect,
9074 > for &mut RealmQueryResolveDeclarationResponse
9075 {
9076 #[inline]
9077 unsafe fn encode(
9078 self,
9079 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9080 offset: usize,
9081 _depth: fidl::encoding::Depth,
9082 ) -> fidl::Result<()> {
9083 encoder.debug_check_bounds::<RealmQueryResolveDeclarationResponse>(offset);
9084 fidl::encoding::Encode::<
9086 RealmQueryResolveDeclarationResponse,
9087 fdomain_client::fidl::FDomainResourceDialect,
9088 >::encode(
9089 (<fidl::encoding::Endpoint<
9090 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
9091 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9092 &mut self.iterator
9093 ),),
9094 encoder,
9095 offset,
9096 _depth,
9097 )
9098 }
9099 }
9100 unsafe impl<
9101 T0: fidl::encoding::Encode<
9102 fidl::encoding::Endpoint<
9103 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
9104 >,
9105 fdomain_client::fidl::FDomainResourceDialect,
9106 >,
9107 >
9108 fidl::encoding::Encode<
9109 RealmQueryResolveDeclarationResponse,
9110 fdomain_client::fidl::FDomainResourceDialect,
9111 > for (T0,)
9112 {
9113 #[inline]
9114 unsafe fn encode(
9115 self,
9116 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9117 offset: usize,
9118 depth: fidl::encoding::Depth,
9119 ) -> fidl::Result<()> {
9120 encoder.debug_check_bounds::<RealmQueryResolveDeclarationResponse>(offset);
9121 self.0.encode(encoder, offset + 0, depth)?;
9125 Ok(())
9126 }
9127 }
9128
9129 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9130 for RealmQueryResolveDeclarationResponse
9131 {
9132 #[inline(always)]
9133 fn new_empty() -> Self {
9134 Self {
9135 iterator: fidl::new_empty!(
9136 fidl::encoding::Endpoint<
9137 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
9138 >,
9139 fdomain_client::fidl::FDomainResourceDialect
9140 ),
9141 }
9142 }
9143
9144 #[inline]
9145 unsafe fn decode(
9146 &mut self,
9147 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9148 offset: usize,
9149 _depth: fidl::encoding::Depth,
9150 ) -> fidl::Result<()> {
9151 decoder.debug_check_bounds::<Self>(offset);
9152 fidl::decode!(
9154 fidl::encoding::Endpoint<
9155 fdomain_client::fidl::ClientEnd<ManifestBytesIteratorMarker>,
9156 >,
9157 fdomain_client::fidl::FDomainResourceDialect,
9158 &mut self.iterator,
9159 decoder,
9160 offset + 0,
9161 _depth
9162 )?;
9163 Ok(())
9164 }
9165 }
9166
9167 impl fidl::encoding::ResourceTypeMarker for StorageAdminListStorageInRealmRequest {
9168 type Borrowed<'a> = &'a mut Self;
9169 fn take_or_borrow<'a>(
9170 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9171 ) -> Self::Borrowed<'a> {
9172 value
9173 }
9174 }
9175
9176 unsafe impl fidl::encoding::TypeMarker for StorageAdminListStorageInRealmRequest {
9177 type Owned = Self;
9178
9179 #[inline(always)]
9180 fn inline_align(_context: fidl::encoding::Context) -> usize {
9181 8
9182 }
9183
9184 #[inline(always)]
9185 fn inline_size(_context: fidl::encoding::Context) -> usize {
9186 24
9187 }
9188 }
9189
9190 unsafe impl
9191 fidl::encoding::Encode<
9192 StorageAdminListStorageInRealmRequest,
9193 fdomain_client::fidl::FDomainResourceDialect,
9194 > for &mut StorageAdminListStorageInRealmRequest
9195 {
9196 #[inline]
9197 unsafe fn encode(
9198 self,
9199 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9200 offset: usize,
9201 _depth: fidl::encoding::Depth,
9202 ) -> fidl::Result<()> {
9203 encoder.debug_check_bounds::<StorageAdminListStorageInRealmRequest>(offset);
9204 fidl::encoding::Encode::<StorageAdminListStorageInRealmRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9206 (
9207 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_moniker),
9208 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
9209 ),
9210 encoder, offset, _depth
9211 )
9212 }
9213 }
9214 unsafe impl<
9215 T0: fidl::encoding::Encode<
9216 fidl::encoding::BoundedString<4096>,
9217 fdomain_client::fidl::FDomainResourceDialect,
9218 >,
9219 T1: fidl::encoding::Encode<
9220 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageIteratorMarker>>,
9221 fdomain_client::fidl::FDomainResourceDialect,
9222 >,
9223 >
9224 fidl::encoding::Encode<
9225 StorageAdminListStorageInRealmRequest,
9226 fdomain_client::fidl::FDomainResourceDialect,
9227 > for (T0, T1)
9228 {
9229 #[inline]
9230 unsafe fn encode(
9231 self,
9232 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9233 offset: usize,
9234 depth: fidl::encoding::Depth,
9235 ) -> fidl::Result<()> {
9236 encoder.debug_check_bounds::<StorageAdminListStorageInRealmRequest>(offset);
9237 unsafe {
9240 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
9241 (ptr as *mut u64).write_unaligned(0);
9242 }
9243 self.0.encode(encoder, offset + 0, depth)?;
9245 self.1.encode(encoder, offset + 16, depth)?;
9246 Ok(())
9247 }
9248 }
9249
9250 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9251 for StorageAdminListStorageInRealmRequest
9252 {
9253 #[inline(always)]
9254 fn new_empty() -> Self {
9255 Self {
9256 relative_moniker: fidl::new_empty!(
9257 fidl::encoding::BoundedString<4096>,
9258 fdomain_client::fidl::FDomainResourceDialect
9259 ),
9260 iterator: fidl::new_empty!(
9261 fidl::encoding::Endpoint<
9262 fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
9263 >,
9264 fdomain_client::fidl::FDomainResourceDialect
9265 ),
9266 }
9267 }
9268
9269 #[inline]
9270 unsafe fn decode(
9271 &mut self,
9272 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9273 offset: usize,
9274 _depth: fidl::encoding::Depth,
9275 ) -> fidl::Result<()> {
9276 decoder.debug_check_bounds::<Self>(offset);
9277 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9279 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9280 let mask = 0xffffffff00000000u64;
9281 let maskedval = padval & mask;
9282 if maskedval != 0 {
9283 return Err(fidl::Error::NonZeroPadding {
9284 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9285 });
9286 }
9287 fidl::decode!(
9288 fidl::encoding::BoundedString<4096>,
9289 fdomain_client::fidl::FDomainResourceDialect,
9290 &mut self.relative_moniker,
9291 decoder,
9292 offset + 0,
9293 _depth
9294 )?;
9295 fidl::decode!(
9296 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageIteratorMarker>>,
9297 fdomain_client::fidl::FDomainResourceDialect,
9298 &mut self.iterator,
9299 decoder,
9300 offset + 16,
9301 _depth
9302 )?;
9303 Ok(())
9304 }
9305 }
9306
9307 impl fidl::encoding::ResourceTypeMarker for StorageAdminOpenComponentStorageByIdRequest {
9308 type Borrowed<'a> = &'a mut Self;
9309 fn take_or_borrow<'a>(
9310 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9311 ) -> Self::Borrowed<'a> {
9312 value
9313 }
9314 }
9315
9316 unsafe impl fidl::encoding::TypeMarker for StorageAdminOpenComponentStorageByIdRequest {
9317 type Owned = Self;
9318
9319 #[inline(always)]
9320 fn inline_align(_context: fidl::encoding::Context) -> usize {
9321 8
9322 }
9323
9324 #[inline(always)]
9325 fn inline_size(_context: fidl::encoding::Context) -> usize {
9326 24
9327 }
9328 }
9329
9330 unsafe impl
9331 fidl::encoding::Encode<
9332 StorageAdminOpenComponentStorageByIdRequest,
9333 fdomain_client::fidl::FDomainResourceDialect,
9334 > for &mut StorageAdminOpenComponentStorageByIdRequest
9335 {
9336 #[inline]
9337 unsafe fn encode(
9338 self,
9339 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9340 offset: usize,
9341 _depth: fidl::encoding::Depth,
9342 ) -> fidl::Result<()> {
9343 encoder.debug_check_bounds::<StorageAdminOpenComponentStorageByIdRequest>(offset);
9344 fidl::encoding::Encode::<
9346 StorageAdminOpenComponentStorageByIdRequest,
9347 fdomain_client::fidl::FDomainResourceDialect,
9348 >::encode(
9349 (
9350 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
9351 &self.id,
9352 ),
9353 <fidl::encoding::Endpoint<
9354 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9355 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9356 &mut self.object
9357 ),
9358 ),
9359 encoder,
9360 offset,
9361 _depth,
9362 )
9363 }
9364 }
9365 unsafe impl<
9366 T0: fidl::encoding::Encode<
9367 fidl::encoding::BoundedString<64>,
9368 fdomain_client::fidl::FDomainResourceDialect,
9369 >,
9370 T1: fidl::encoding::Encode<
9371 fidl::encoding::Endpoint<
9372 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9373 >,
9374 fdomain_client::fidl::FDomainResourceDialect,
9375 >,
9376 >
9377 fidl::encoding::Encode<
9378 StorageAdminOpenComponentStorageByIdRequest,
9379 fdomain_client::fidl::FDomainResourceDialect,
9380 > for (T0, T1)
9381 {
9382 #[inline]
9383 unsafe fn encode(
9384 self,
9385 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9386 offset: usize,
9387 depth: fidl::encoding::Depth,
9388 ) -> fidl::Result<()> {
9389 encoder.debug_check_bounds::<StorageAdminOpenComponentStorageByIdRequest>(offset);
9390 unsafe {
9393 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
9394 (ptr as *mut u64).write_unaligned(0);
9395 }
9396 self.0.encode(encoder, offset + 0, depth)?;
9398 self.1.encode(encoder, offset + 16, depth)?;
9399 Ok(())
9400 }
9401 }
9402
9403 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9404 for StorageAdminOpenComponentStorageByIdRequest
9405 {
9406 #[inline(always)]
9407 fn new_empty() -> Self {
9408 Self {
9409 id: fidl::new_empty!(
9410 fidl::encoding::BoundedString<64>,
9411 fdomain_client::fidl::FDomainResourceDialect
9412 ),
9413 object: fidl::new_empty!(
9414 fidl::encoding::Endpoint<
9415 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9416 >,
9417 fdomain_client::fidl::FDomainResourceDialect
9418 ),
9419 }
9420 }
9421
9422 #[inline]
9423 unsafe fn decode(
9424 &mut self,
9425 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9426 offset: usize,
9427 _depth: fidl::encoding::Depth,
9428 ) -> fidl::Result<()> {
9429 decoder.debug_check_bounds::<Self>(offset);
9430 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9432 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9433 let mask = 0xffffffff00000000u64;
9434 let maskedval = padval & mask;
9435 if maskedval != 0 {
9436 return Err(fidl::Error::NonZeroPadding {
9437 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9438 });
9439 }
9440 fidl::decode!(
9441 fidl::encoding::BoundedString<64>,
9442 fdomain_client::fidl::FDomainResourceDialect,
9443 &mut self.id,
9444 decoder,
9445 offset + 0,
9446 _depth
9447 )?;
9448 fidl::decode!(
9449 fidl::encoding::Endpoint<
9450 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9451 >,
9452 fdomain_client::fidl::FDomainResourceDialect,
9453 &mut self.object,
9454 decoder,
9455 offset + 16,
9456 _depth
9457 )?;
9458 Ok(())
9459 }
9460 }
9461
9462 impl fidl::encoding::ResourceTypeMarker for StorageAdminOpenStorageRequest {
9463 type Borrowed<'a> = &'a mut Self;
9464 fn take_or_borrow<'a>(
9465 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9466 ) -> Self::Borrowed<'a> {
9467 value
9468 }
9469 }
9470
9471 unsafe impl fidl::encoding::TypeMarker for StorageAdminOpenStorageRequest {
9472 type Owned = Self;
9473
9474 #[inline(always)]
9475 fn inline_align(_context: fidl::encoding::Context) -> usize {
9476 8
9477 }
9478
9479 #[inline(always)]
9480 fn inline_size(_context: fidl::encoding::Context) -> usize {
9481 24
9482 }
9483 }
9484
9485 unsafe impl
9486 fidl::encoding::Encode<
9487 StorageAdminOpenStorageRequest,
9488 fdomain_client::fidl::FDomainResourceDialect,
9489 > for &mut StorageAdminOpenStorageRequest
9490 {
9491 #[inline]
9492 unsafe fn encode(
9493 self,
9494 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9495 offset: usize,
9496 _depth: fidl::encoding::Depth,
9497 ) -> fidl::Result<()> {
9498 encoder.debug_check_bounds::<StorageAdminOpenStorageRequest>(offset);
9499 fidl::encoding::Encode::<StorageAdminOpenStorageRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9501 (
9502 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_moniker),
9503 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
9504 ),
9505 encoder, offset, _depth
9506 )
9507 }
9508 }
9509 unsafe impl<
9510 T0: fidl::encoding::Encode<
9511 fidl::encoding::BoundedString<4096>,
9512 fdomain_client::fidl::FDomainResourceDialect,
9513 >,
9514 T1: fidl::encoding::Encode<
9515 fidl::encoding::Endpoint<
9516 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9517 >,
9518 fdomain_client::fidl::FDomainResourceDialect,
9519 >,
9520 >
9521 fidl::encoding::Encode<
9522 StorageAdminOpenStorageRequest,
9523 fdomain_client::fidl::FDomainResourceDialect,
9524 > for (T0, T1)
9525 {
9526 #[inline]
9527 unsafe fn encode(
9528 self,
9529 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9530 offset: usize,
9531 depth: fidl::encoding::Depth,
9532 ) -> fidl::Result<()> {
9533 encoder.debug_check_bounds::<StorageAdminOpenStorageRequest>(offset);
9534 unsafe {
9537 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
9538 (ptr as *mut u64).write_unaligned(0);
9539 }
9540 self.0.encode(encoder, offset + 0, depth)?;
9542 self.1.encode(encoder, offset + 16, depth)?;
9543 Ok(())
9544 }
9545 }
9546
9547 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9548 for StorageAdminOpenStorageRequest
9549 {
9550 #[inline(always)]
9551 fn new_empty() -> Self {
9552 Self {
9553 relative_moniker: fidl::new_empty!(
9554 fidl::encoding::BoundedString<4096>,
9555 fdomain_client::fidl::FDomainResourceDialect
9556 ),
9557 object: fidl::new_empty!(
9558 fidl::encoding::Endpoint<
9559 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9560 >,
9561 fdomain_client::fidl::FDomainResourceDialect
9562 ),
9563 }
9564 }
9565
9566 #[inline]
9567 unsafe fn decode(
9568 &mut self,
9569 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9570 offset: usize,
9571 _depth: fidl::encoding::Depth,
9572 ) -> fidl::Result<()> {
9573 decoder.debug_check_bounds::<Self>(offset);
9574 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9576 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9577 let mask = 0xffffffff00000000u64;
9578 let maskedval = padval & mask;
9579 if maskedval != 0 {
9580 return Err(fidl::Error::NonZeroPadding {
9581 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9582 });
9583 }
9584 fidl::decode!(
9585 fidl::encoding::BoundedString<4096>,
9586 fdomain_client::fidl::FDomainResourceDialect,
9587 &mut self.relative_moniker,
9588 decoder,
9589 offset + 0,
9590 _depth
9591 )?;
9592 fidl::decode!(
9593 fidl::encoding::Endpoint<
9594 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
9595 >,
9596 fdomain_client::fidl::FDomainResourceDialect,
9597 &mut self.object,
9598 decoder,
9599 offset + 16,
9600 _depth
9601 )?;
9602 Ok(())
9603 }
9604 }
9605}