1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_component_test_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct BuilderBuildRequest {
16 pub runner: fidl::endpoints::ClientEnd<fidl_fuchsia_component_runner::ComponentRunnerMarker>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BuilderBuildRequest {}
20
21#[derive(Debug, PartialEq)]
24pub struct DirectoryContents {
25 pub entries: Vec<DirectoryEntry>,
26}
27
28impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryContents {}
29
30#[derive(Debug, PartialEq)]
32pub struct DirectoryEntry {
33 pub file_path: String,
36 pub file_contents: fidl_fuchsia_mem::Buffer,
38}
39
40impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryEntry {}
41
42#[derive(Debug, PartialEq)]
43pub struct RealmAddChildRealmFromDeclRequest {
44 pub name: String,
46 pub decl: fidl_fuchsia_component_decl::Component,
48 pub options: ChildOptions,
50 pub child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
53}
54
55impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
56 for RealmAddChildRealmFromDeclRequest
57{
58}
59
60#[derive(Debug, PartialEq)]
61pub struct RealmAddChildRealmFromRelativeUrlRequest {
62 pub name: String,
64 pub relative_url: String,
66 pub options: ChildOptions,
68 pub child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
71}
72
73impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
74 for RealmAddChildRealmFromRelativeUrlRequest
75{
76}
77
78#[derive(Debug, PartialEq)]
79pub struct RealmAddChildRealmRequest {
80 pub name: String,
82 pub options: ChildOptions,
84 pub child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
87}
88
89impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RealmAddChildRealmRequest {}
90
91#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
92pub struct RealmBuilderFactoryCreateFromRelativeUrlRequest {
93 pub pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
94 pub relative_url: String,
95 pub realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
96 pub builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
100 for RealmBuilderFactoryCreateFromRelativeUrlRequest
101{
102}
103
104#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
105pub struct RealmBuilderFactoryCreateRequest {
106 pub pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
107 pub realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
108 pub builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
112 for RealmBuilderFactoryCreateRequest
113{
114}
115
116#[derive(Debug, PartialEq)]
117pub struct RealmReadOnlyDirectoryRequest {
118 pub name: String,
120 pub to: Vec<fidl_fuchsia_component_decl::Ref>,
122 pub directory_contents: DirectoryContents,
124}
125
126impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
127 for RealmReadOnlyDirectoryRequest
128{
129}
130
131#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
132pub struct BuilderMarker;
133
134impl fidl::endpoints::ProtocolMarker for BuilderMarker {
135 type Proxy = BuilderProxy;
136 type RequestStream = BuilderRequestStream;
137 #[cfg(target_os = "fuchsia")]
138 type SynchronousProxy = BuilderSynchronousProxy;
139
140 const DEBUG_NAME: &'static str = "fuchsia.component.test.Builder";
141}
142impl fidl::endpoints::DiscoverableProtocolMarker for BuilderMarker {}
143pub type BuilderBuildResult = Result<String, RealmBuilderError>;
144
145pub trait BuilderProxyInterface: Send + Sync {
146 type BuildResponseFut: std::future::Future<Output = Result<BuilderBuildResult, fidl::Error>>
147 + Send;
148 fn r#build(
149 &self,
150 runner: fidl::endpoints::ClientEnd<fidl_fuchsia_component_runner::ComponentRunnerMarker>,
151 ) -> Self::BuildResponseFut;
152}
153#[derive(Debug)]
154#[cfg(target_os = "fuchsia")]
155pub struct BuilderSynchronousProxy {
156 client: fidl::client::sync::Client,
157}
158
159#[cfg(target_os = "fuchsia")]
160impl fidl::endpoints::SynchronousProxy for BuilderSynchronousProxy {
161 type Proxy = BuilderProxy;
162 type Protocol = BuilderMarker;
163
164 fn from_channel(inner: fidl::Channel) -> Self {
165 Self::new(inner)
166 }
167
168 fn into_channel(self) -> fidl::Channel {
169 self.client.into_channel()
170 }
171
172 fn as_channel(&self) -> &fidl::Channel {
173 self.client.as_channel()
174 }
175}
176
177#[cfg(target_os = "fuchsia")]
178impl BuilderSynchronousProxy {
179 pub fn new(channel: fidl::Channel) -> Self {
180 let protocol_name = <BuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
181 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
182 }
183
184 pub fn into_channel(self) -> fidl::Channel {
185 self.client.into_channel()
186 }
187
188 pub fn wait_for_event(
191 &self,
192 deadline: zx::MonotonicInstant,
193 ) -> Result<BuilderEvent, fidl::Error> {
194 BuilderEvent::decode(self.client.wait_for_event(deadline)?)
195 }
196
197 pub fn r#build(
211 &self,
212 mut runner: fidl::endpoints::ClientEnd<
213 fidl_fuchsia_component_runner::ComponentRunnerMarker,
214 >,
215 ___deadline: zx::MonotonicInstant,
216 ) -> Result<BuilderBuildResult, fidl::Error> {
217 let _response = self.client.send_query::<BuilderBuildRequest, fidl::encoding::ResultType<
218 BuilderBuildResponse,
219 RealmBuilderError,
220 >>(
221 (runner,),
222 0x172ba0923ec91575,
223 fidl::encoding::DynamicFlags::empty(),
224 ___deadline,
225 )?;
226 Ok(_response.map(|x| x.root_component_url))
227 }
228}
229
230#[cfg(target_os = "fuchsia")]
231impl From<BuilderSynchronousProxy> for zx::Handle {
232 fn from(value: BuilderSynchronousProxy) -> Self {
233 value.into_channel().into()
234 }
235}
236
237#[cfg(target_os = "fuchsia")]
238impl From<fidl::Channel> for BuilderSynchronousProxy {
239 fn from(value: fidl::Channel) -> Self {
240 Self::new(value)
241 }
242}
243
244#[derive(Debug, Clone)]
245pub struct BuilderProxy {
246 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
247}
248
249impl fidl::endpoints::Proxy for BuilderProxy {
250 type Protocol = BuilderMarker;
251
252 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
253 Self::new(inner)
254 }
255
256 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
257 self.client.into_channel().map_err(|client| Self { client })
258 }
259
260 fn as_channel(&self) -> &::fidl::AsyncChannel {
261 self.client.as_channel()
262 }
263}
264
265impl BuilderProxy {
266 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
268 let protocol_name = <BuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
269 Self { client: fidl::client::Client::new(channel, protocol_name) }
270 }
271
272 pub fn take_event_stream(&self) -> BuilderEventStream {
278 BuilderEventStream { event_receiver: self.client.take_event_receiver() }
279 }
280
281 pub fn r#build(
295 &self,
296 mut runner: fidl::endpoints::ClientEnd<
297 fidl_fuchsia_component_runner::ComponentRunnerMarker,
298 >,
299 ) -> fidl::client::QueryResponseFut<
300 BuilderBuildResult,
301 fidl::encoding::DefaultFuchsiaResourceDialect,
302 > {
303 BuilderProxyInterface::r#build(self, runner)
304 }
305}
306
307impl BuilderProxyInterface for BuilderProxy {
308 type BuildResponseFut = fidl::client::QueryResponseFut<
309 BuilderBuildResult,
310 fidl::encoding::DefaultFuchsiaResourceDialect,
311 >;
312 fn r#build(
313 &self,
314 mut runner: fidl::endpoints::ClientEnd<
315 fidl_fuchsia_component_runner::ComponentRunnerMarker,
316 >,
317 ) -> Self::BuildResponseFut {
318 fn _decode(
319 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
320 ) -> Result<BuilderBuildResult, fidl::Error> {
321 let _response = fidl::client::decode_transaction_body::<
322 fidl::encoding::ResultType<BuilderBuildResponse, RealmBuilderError>,
323 fidl::encoding::DefaultFuchsiaResourceDialect,
324 0x172ba0923ec91575,
325 >(_buf?)?;
326 Ok(_response.map(|x| x.root_component_url))
327 }
328 self.client.send_query_and_decode::<BuilderBuildRequest, BuilderBuildResult>(
329 (runner,),
330 0x172ba0923ec91575,
331 fidl::encoding::DynamicFlags::empty(),
332 _decode,
333 )
334 }
335}
336
337pub struct BuilderEventStream {
338 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
339}
340
341impl std::marker::Unpin for BuilderEventStream {}
342
343impl futures::stream::FusedStream for BuilderEventStream {
344 fn is_terminated(&self) -> bool {
345 self.event_receiver.is_terminated()
346 }
347}
348
349impl futures::Stream for BuilderEventStream {
350 type Item = Result<BuilderEvent, fidl::Error>;
351
352 fn poll_next(
353 mut self: std::pin::Pin<&mut Self>,
354 cx: &mut std::task::Context<'_>,
355 ) -> std::task::Poll<Option<Self::Item>> {
356 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
357 &mut self.event_receiver,
358 cx
359 )?) {
360 Some(buf) => std::task::Poll::Ready(Some(BuilderEvent::decode(buf))),
361 None => std::task::Poll::Ready(None),
362 }
363 }
364}
365
366#[derive(Debug)]
367pub enum BuilderEvent {}
368
369impl BuilderEvent {
370 fn decode(
372 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
373 ) -> Result<BuilderEvent, fidl::Error> {
374 let (bytes, _handles) = buf.split_mut();
375 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
376 debug_assert_eq!(tx_header.tx_id, 0);
377 match tx_header.ordinal {
378 _ => Err(fidl::Error::UnknownOrdinal {
379 ordinal: tx_header.ordinal,
380 protocol_name: <BuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
381 }),
382 }
383 }
384}
385
386pub struct BuilderRequestStream {
388 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
389 is_terminated: bool,
390}
391
392impl std::marker::Unpin for BuilderRequestStream {}
393
394impl futures::stream::FusedStream for BuilderRequestStream {
395 fn is_terminated(&self) -> bool {
396 self.is_terminated
397 }
398}
399
400impl fidl::endpoints::RequestStream for BuilderRequestStream {
401 type Protocol = BuilderMarker;
402 type ControlHandle = BuilderControlHandle;
403
404 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
405 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
406 }
407
408 fn control_handle(&self) -> Self::ControlHandle {
409 BuilderControlHandle { inner: self.inner.clone() }
410 }
411
412 fn into_inner(
413 self,
414 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
415 {
416 (self.inner, self.is_terminated)
417 }
418
419 fn from_inner(
420 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
421 is_terminated: bool,
422 ) -> Self {
423 Self { inner, is_terminated }
424 }
425}
426
427impl futures::Stream for BuilderRequestStream {
428 type Item = Result<BuilderRequest, fidl::Error>;
429
430 fn poll_next(
431 mut self: std::pin::Pin<&mut Self>,
432 cx: &mut std::task::Context<'_>,
433 ) -> std::task::Poll<Option<Self::Item>> {
434 let this = &mut *self;
435 if this.inner.check_shutdown(cx) {
436 this.is_terminated = true;
437 return std::task::Poll::Ready(None);
438 }
439 if this.is_terminated {
440 panic!("polled BuilderRequestStream after completion");
441 }
442 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
443 |bytes, handles| {
444 match this.inner.channel().read_etc(cx, bytes, handles) {
445 std::task::Poll::Ready(Ok(())) => {}
446 std::task::Poll::Pending => return std::task::Poll::Pending,
447 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
448 this.is_terminated = true;
449 return std::task::Poll::Ready(None);
450 }
451 std::task::Poll::Ready(Err(e)) => {
452 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
453 e.into(),
454 ))))
455 }
456 }
457
458 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
460
461 std::task::Poll::Ready(Some(match header.ordinal {
462 0x172ba0923ec91575 => {
463 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
464 let mut req = fidl::new_empty!(
465 BuilderBuildRequest,
466 fidl::encoding::DefaultFuchsiaResourceDialect
467 );
468 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BuilderBuildRequest>(&header, _body_bytes, handles, &mut req)?;
469 let control_handle = BuilderControlHandle { inner: this.inner.clone() };
470 Ok(BuilderRequest::Build {
471 runner: req.runner,
472
473 responder: BuilderBuildResponder {
474 control_handle: std::mem::ManuallyDrop::new(control_handle),
475 tx_id: header.tx_id,
476 },
477 })
478 }
479 _ => Err(fidl::Error::UnknownOrdinal {
480 ordinal: header.ordinal,
481 protocol_name:
482 <BuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
483 }),
484 }))
485 },
486 )
487 }
488}
489
490#[derive(Debug)]
491pub enum BuilderRequest {
492 Build {
506 runner: fidl::endpoints::ClientEnd<fidl_fuchsia_component_runner::ComponentRunnerMarker>,
507 responder: BuilderBuildResponder,
508 },
509}
510
511impl BuilderRequest {
512 #[allow(irrefutable_let_patterns)]
513 pub fn into_build(
514 self,
515 ) -> Option<(
516 fidl::endpoints::ClientEnd<fidl_fuchsia_component_runner::ComponentRunnerMarker>,
517 BuilderBuildResponder,
518 )> {
519 if let BuilderRequest::Build { runner, responder } = self {
520 Some((runner, responder))
521 } else {
522 None
523 }
524 }
525
526 pub fn method_name(&self) -> &'static str {
528 match *self {
529 BuilderRequest::Build { .. } => "build",
530 }
531 }
532}
533
534#[derive(Debug, Clone)]
535pub struct BuilderControlHandle {
536 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
537}
538
539impl fidl::endpoints::ControlHandle for BuilderControlHandle {
540 fn shutdown(&self) {
541 self.inner.shutdown()
542 }
543 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
544 self.inner.shutdown_with_epitaph(status)
545 }
546
547 fn is_closed(&self) -> bool {
548 self.inner.channel().is_closed()
549 }
550 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
551 self.inner.channel().on_closed()
552 }
553
554 #[cfg(target_os = "fuchsia")]
555 fn signal_peer(
556 &self,
557 clear_mask: zx::Signals,
558 set_mask: zx::Signals,
559 ) -> Result<(), zx_status::Status> {
560 use fidl::Peered;
561 self.inner.channel().signal_peer(clear_mask, set_mask)
562 }
563}
564
565impl BuilderControlHandle {}
566
567#[must_use = "FIDL methods require a response to be sent"]
568#[derive(Debug)]
569pub struct BuilderBuildResponder {
570 control_handle: std::mem::ManuallyDrop<BuilderControlHandle>,
571 tx_id: u32,
572}
573
574impl std::ops::Drop for BuilderBuildResponder {
578 fn drop(&mut self) {
579 self.control_handle.shutdown();
580 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
582 }
583}
584
585impl fidl::endpoints::Responder for BuilderBuildResponder {
586 type ControlHandle = BuilderControlHandle;
587
588 fn control_handle(&self) -> &BuilderControlHandle {
589 &self.control_handle
590 }
591
592 fn drop_without_shutdown(mut self) {
593 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
595 std::mem::forget(self);
597 }
598}
599
600impl BuilderBuildResponder {
601 pub fn send(self, mut result: Result<&str, RealmBuilderError>) -> Result<(), fidl::Error> {
605 let _result = self.send_raw(result);
606 if _result.is_err() {
607 self.control_handle.shutdown();
608 }
609 self.drop_without_shutdown();
610 _result
611 }
612
613 pub fn send_no_shutdown_on_err(
615 self,
616 mut result: Result<&str, RealmBuilderError>,
617 ) -> Result<(), fidl::Error> {
618 let _result = self.send_raw(result);
619 self.drop_without_shutdown();
620 _result
621 }
622
623 fn send_raw(&self, mut result: Result<&str, RealmBuilderError>) -> Result<(), fidl::Error> {
624 self.control_handle
625 .inner
626 .send::<fidl::encoding::ResultType<BuilderBuildResponse, RealmBuilderError>>(
627 result.map(|root_component_url| (root_component_url,)),
628 self.tx_id,
629 0x172ba0923ec91575,
630 fidl::encoding::DynamicFlags::empty(),
631 )
632 }
633}
634
635#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
636pub struct RealmMarker;
637
638impl fidl::endpoints::ProtocolMarker for RealmMarker {
639 type Proxy = RealmProxy;
640 type RequestStream = RealmRequestStream;
641 #[cfg(target_os = "fuchsia")]
642 type SynchronousProxy = RealmSynchronousProxy;
643
644 const DEBUG_NAME: &'static str = "fuchsia.component.test.Realm";
645}
646impl fidl::endpoints::DiscoverableProtocolMarker for RealmMarker {}
647pub type RealmAddChildResult = Result<(), RealmBuilderError>;
648pub type RealmAddChildFromDeclResult = Result<(), RealmBuilderError>;
649pub type RealmAddLocalChildResult = Result<(), RealmBuilderError>;
650pub type RealmAddChildRealmResult = Result<(), RealmBuilderError>;
651pub type RealmAddChildRealmFromRelativeUrlResult = Result<(), RealmBuilderError>;
652pub type RealmAddChildRealmFromDeclResult = Result<(), RealmBuilderError>;
653pub type RealmGetComponentDeclResult =
654 Result<fidl_fuchsia_component_decl::Component, RealmBuilderError>;
655pub type RealmReplaceComponentDeclResult = Result<(), RealmBuilderError>;
656pub type RealmGetRealmDeclResult =
657 Result<fidl_fuchsia_component_decl::Component, RealmBuilderError>;
658pub type RealmReplaceRealmDeclResult = Result<(), RealmBuilderError>;
659pub type RealmUseNestedComponentManagerResult = Result<(), RealmBuilderError>;
660pub type RealmAddRouteResult = Result<(), RealmBuilderError>;
661pub type RealmReadOnlyDirectoryResult = Result<(), RealmBuilderError>;
662pub type RealmInitMutableConfigFromPackageResult = Result<(), RealmBuilderError>;
663pub type RealmInitMutableConfigToEmptyResult = Result<(), RealmBuilderError>;
664pub type RealmAddCapabilityResult = Result<(), RealmBuilderError>;
665pub type RealmAddCollectionResult = Result<(), RealmBuilderError>;
666pub type RealmAddEnvironmentResult = Result<(), RealmBuilderError>;
667pub type RealmSetConfigValueResult = Result<(), RealmBuilderError>;
668
669pub trait RealmProxyInterface: Send + Sync {
670 type AddChildResponseFut: std::future::Future<Output = Result<RealmAddChildResult, fidl::Error>>
671 + Send;
672 fn r#add_child(
673 &self,
674 name: &str,
675 url: &str,
676 options: &ChildOptions,
677 ) -> Self::AddChildResponseFut;
678 type AddChildFromDeclResponseFut: std::future::Future<Output = Result<RealmAddChildFromDeclResult, fidl::Error>>
679 + Send;
680 fn r#add_child_from_decl(
681 &self,
682 name: &str,
683 decl: &fidl_fuchsia_component_decl::Component,
684 options: &ChildOptions,
685 ) -> Self::AddChildFromDeclResponseFut;
686 type AddLocalChildResponseFut: std::future::Future<Output = Result<RealmAddLocalChildResult, fidl::Error>>
687 + Send;
688 fn r#add_local_child(
689 &self,
690 name: &str,
691 options: &ChildOptions,
692 ) -> Self::AddLocalChildResponseFut;
693 type AddChildRealmResponseFut: std::future::Future<Output = Result<RealmAddChildRealmResult, fidl::Error>>
694 + Send;
695 fn r#add_child_realm(
696 &self,
697 name: &str,
698 options: &ChildOptions,
699 child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
700 ) -> Self::AddChildRealmResponseFut;
701 type AddChildRealmFromRelativeUrlResponseFut: std::future::Future<Output = Result<RealmAddChildRealmFromRelativeUrlResult, fidl::Error>>
702 + Send;
703 fn r#add_child_realm_from_relative_url(
704 &self,
705 name: &str,
706 relative_url: &str,
707 options: &ChildOptions,
708 child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
709 ) -> Self::AddChildRealmFromRelativeUrlResponseFut;
710 type AddChildRealmFromDeclResponseFut: std::future::Future<Output = Result<RealmAddChildRealmFromDeclResult, fidl::Error>>
711 + Send;
712 fn r#add_child_realm_from_decl(
713 &self,
714 name: &str,
715 decl: &fidl_fuchsia_component_decl::Component,
716 options: &ChildOptions,
717 child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
718 ) -> Self::AddChildRealmFromDeclResponseFut;
719 type GetComponentDeclResponseFut: std::future::Future<Output = Result<RealmGetComponentDeclResult, fidl::Error>>
720 + Send;
721 fn r#get_component_decl(&self, name: &str) -> Self::GetComponentDeclResponseFut;
722 type ReplaceComponentDeclResponseFut: std::future::Future<Output = Result<RealmReplaceComponentDeclResult, fidl::Error>>
723 + Send;
724 fn r#replace_component_decl(
725 &self,
726 name: &str,
727 component_decl: &fidl_fuchsia_component_decl::Component,
728 ) -> Self::ReplaceComponentDeclResponseFut;
729 type GetRealmDeclResponseFut: std::future::Future<Output = Result<RealmGetRealmDeclResult, fidl::Error>>
730 + Send;
731 fn r#get_realm_decl(&self) -> Self::GetRealmDeclResponseFut;
732 type ReplaceRealmDeclResponseFut: std::future::Future<Output = Result<RealmReplaceRealmDeclResult, fidl::Error>>
733 + Send;
734 fn r#replace_realm_decl(
735 &self,
736 component_decl: &fidl_fuchsia_component_decl::Component,
737 ) -> Self::ReplaceRealmDeclResponseFut;
738 type UseNestedComponentManagerResponseFut: std::future::Future<Output = Result<RealmUseNestedComponentManagerResult, fidl::Error>>
739 + Send;
740 fn r#use_nested_component_manager(
741 &self,
742 component_manager_relative_url: &str,
743 ) -> Self::UseNestedComponentManagerResponseFut;
744 type AddRouteResponseFut: std::future::Future<Output = Result<RealmAddRouteResult, fidl::Error>>
745 + Send;
746 fn r#add_route(
747 &self,
748 capabilities: &[Capability],
749 from: &fidl_fuchsia_component_decl::Ref,
750 to: &[fidl_fuchsia_component_decl::Ref],
751 ) -> Self::AddRouteResponseFut;
752 type ReadOnlyDirectoryResponseFut: std::future::Future<Output = Result<RealmReadOnlyDirectoryResult, fidl::Error>>
753 + Send;
754 fn r#read_only_directory(
755 &self,
756 name: &str,
757 to: &[fidl_fuchsia_component_decl::Ref],
758 directory_contents: DirectoryContents,
759 ) -> Self::ReadOnlyDirectoryResponseFut;
760 type InitMutableConfigFromPackageResponseFut: std::future::Future<Output = Result<RealmInitMutableConfigFromPackageResult, fidl::Error>>
761 + Send;
762 fn r#init_mutable_config_from_package(
763 &self,
764 name: &str,
765 ) -> Self::InitMutableConfigFromPackageResponseFut;
766 type InitMutableConfigToEmptyResponseFut: std::future::Future<Output = Result<RealmInitMutableConfigToEmptyResult, fidl::Error>>
767 + Send;
768 fn r#init_mutable_config_to_empty(
769 &self,
770 name: &str,
771 ) -> Self::InitMutableConfigToEmptyResponseFut;
772 type AddCapabilityResponseFut: std::future::Future<Output = Result<RealmAddCapabilityResult, fidl::Error>>
773 + Send;
774 fn r#add_capability(
775 &self,
776 capability: &fidl_fuchsia_component_decl::Capability,
777 ) -> Self::AddCapabilityResponseFut;
778 type AddCollectionResponseFut: std::future::Future<Output = Result<RealmAddCollectionResult, fidl::Error>>
779 + Send;
780 fn r#add_collection(
781 &self,
782 collection: &fidl_fuchsia_component_decl::Collection,
783 ) -> Self::AddCollectionResponseFut;
784 type AddEnvironmentResponseFut: std::future::Future<Output = Result<RealmAddEnvironmentResult, fidl::Error>>
785 + Send;
786 fn r#add_environment(
787 &self,
788 environment: &fidl_fuchsia_component_decl::Environment,
789 ) -> Self::AddEnvironmentResponseFut;
790 type SetConfigValueResponseFut: std::future::Future<Output = Result<RealmSetConfigValueResult, fidl::Error>>
791 + Send;
792 fn r#set_config_value(
793 &self,
794 name: &str,
795 key: &str,
796 value: &fidl_fuchsia_component_decl::ConfigValueSpec,
797 ) -> Self::SetConfigValueResponseFut;
798}
799#[derive(Debug)]
800#[cfg(target_os = "fuchsia")]
801pub struct RealmSynchronousProxy {
802 client: fidl::client::sync::Client,
803}
804
805#[cfg(target_os = "fuchsia")]
806impl fidl::endpoints::SynchronousProxy for RealmSynchronousProxy {
807 type Proxy = RealmProxy;
808 type Protocol = RealmMarker;
809
810 fn from_channel(inner: fidl::Channel) -> Self {
811 Self::new(inner)
812 }
813
814 fn into_channel(self) -> fidl::Channel {
815 self.client.into_channel()
816 }
817
818 fn as_channel(&self) -> &fidl::Channel {
819 self.client.as_channel()
820 }
821}
822
823#[cfg(target_os = "fuchsia")]
824impl RealmSynchronousProxy {
825 pub fn new(channel: fidl::Channel) -> Self {
826 let protocol_name = <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
827 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
828 }
829
830 pub fn into_channel(self) -> fidl::Channel {
831 self.client.into_channel()
832 }
833
834 pub fn wait_for_event(
837 &self,
838 deadline: zx::MonotonicInstant,
839 ) -> Result<RealmEvent, fidl::Error> {
840 RealmEvent::decode(self.client.wait_for_event(deadline)?)
841 }
842
843 pub fn r#add_child(
879 &self,
880 mut name: &str,
881 mut url: &str,
882 mut options: &ChildOptions,
883 ___deadline: zx::MonotonicInstant,
884 ) -> Result<RealmAddChildResult, fidl::Error> {
885 let _response = self.client.send_query::<RealmAddChildRequest, fidl::encoding::ResultType<
886 fidl::encoding::EmptyStruct,
887 RealmBuilderError,
888 >>(
889 (name, url, options),
890 0x3f6c07627303d801,
891 fidl::encoding::DynamicFlags::empty(),
892 ___deadline,
893 )?;
894 Ok(_response.map(|x| x))
895 }
896
897 pub fn r#add_child_from_decl(
908 &self,
909 mut name: &str,
910 mut decl: &fidl_fuchsia_component_decl::Component,
911 mut options: &ChildOptions,
912 ___deadline: zx::MonotonicInstant,
913 ) -> Result<RealmAddChildFromDeclResult, fidl::Error> {
914 let _response =
915 self.client.send_query::<RealmAddChildFromDeclRequest, fidl::encoding::ResultType<
916 fidl::encoding::EmptyStruct,
917 RealmBuilderError,
918 >>(
919 (name, decl, options),
920 0x3950ad500258156d,
921 fidl::encoding::DynamicFlags::empty(),
922 ___deadline,
923 )?;
924 Ok(_response.map(|x| x))
925 }
926
927 pub fn r#add_local_child(
940 &self,
941 mut name: &str,
942 mut options: &ChildOptions,
943 ___deadline: zx::MonotonicInstant,
944 ) -> Result<RealmAddLocalChildResult, fidl::Error> {
945 let _response =
946 self.client.send_query::<RealmAddLocalChildRequest, fidl::encoding::ResultType<
947 fidl::encoding::EmptyStruct,
948 RealmBuilderError,
949 >>(
950 (name, options),
951 0x3249817bae10abbb,
952 fidl::encoding::DynamicFlags::empty(),
953 ___deadline,
954 )?;
955 Ok(_response.map(|x| x))
956 }
957
958 pub fn r#add_child_realm(
967 &self,
968 mut name: &str,
969 mut options: &ChildOptions,
970 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
971 ___deadline: zx::MonotonicInstant,
972 ) -> Result<RealmAddChildRealmResult, fidl::Error> {
973 let _response =
974 self.client.send_query::<RealmAddChildRealmRequest, fidl::encoding::ResultType<
975 fidl::encoding::EmptyStruct,
976 RealmBuilderError,
977 >>(
978 (name, options, child_realm),
979 0x3fdf98db373b9458,
980 fidl::encoding::DynamicFlags::empty(),
981 ___deadline,
982 )?;
983 Ok(_response.map(|x| x))
984 }
985
986 pub fn r#add_child_realm_from_relative_url(
990 &self,
991 mut name: &str,
992 mut relative_url: &str,
993 mut options: &ChildOptions,
994 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
995 ___deadline: zx::MonotonicInstant,
996 ) -> Result<RealmAddChildRealmFromRelativeUrlResult, fidl::Error> {
997 let _response = self.client.send_query::<
998 RealmAddChildRealmFromRelativeUrlRequest,
999 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1000 >(
1001 (name, relative_url, options, child_realm,),
1002 0x44c34c8dcbe06abb,
1003 fidl::encoding::DynamicFlags::empty(),
1004 ___deadline,
1005 )?;
1006 Ok(_response.map(|x| x))
1007 }
1008
1009 pub fn r#add_child_realm_from_decl(
1012 &self,
1013 mut name: &str,
1014 mut decl: &fidl_fuchsia_component_decl::Component,
1015 mut options: &ChildOptions,
1016 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1017 ___deadline: zx::MonotonicInstant,
1018 ) -> Result<RealmAddChildRealmFromDeclResult, fidl::Error> {
1019 let _response = self.client.send_query::<
1020 RealmAddChildRealmFromDeclRequest,
1021 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1022 >(
1023 (name, decl, options, child_realm,),
1024 0x142e5c326732862e,
1025 fidl::encoding::DynamicFlags::empty(),
1026 ___deadline,
1027 )?;
1028 Ok(_response.map(|x| x))
1029 }
1030
1031 pub fn r#get_component_decl(
1052 &self,
1053 mut name: &str,
1054 ___deadline: zx::MonotonicInstant,
1055 ) -> Result<RealmGetComponentDeclResult, fidl::Error> {
1056 let _response =
1057 self.client.send_query::<RealmGetComponentDeclRequest, fidl::encoding::ResultType<
1058 RealmGetComponentDeclResponse,
1059 RealmBuilderError,
1060 >>(
1061 (name,),
1062 0x320832af6a4cbac6,
1063 fidl::encoding::DynamicFlags::empty(),
1064 ___deadline,
1065 )?;
1066 Ok(_response.map(|x| x.component_decl))
1067 }
1068
1069 pub fn r#replace_component_decl(
1093 &self,
1094 mut name: &str,
1095 mut component_decl: &fidl_fuchsia_component_decl::Component,
1096 ___deadline: zx::MonotonicInstant,
1097 ) -> Result<RealmReplaceComponentDeclResult, fidl::Error> {
1098 let _response =
1099 self.client.send_query::<RealmReplaceComponentDeclRequest, fidl::encoding::ResultType<
1100 fidl::encoding::EmptyStruct,
1101 RealmBuilderError,
1102 >>(
1103 (name, component_decl),
1104 0x59cecf31b314cd5f,
1105 fidl::encoding::DynamicFlags::empty(),
1106 ___deadline,
1107 )?;
1108 Ok(_response.map(|x| x))
1109 }
1110
1111 pub fn r#get_realm_decl(
1117 &self,
1118 ___deadline: zx::MonotonicInstant,
1119 ) -> Result<RealmGetRealmDeclResult, fidl::Error> {
1120 let _response = self.client.send_query::<
1121 fidl::encoding::EmptyPayload,
1122 fidl::encoding::ResultType<RealmGetRealmDeclResponse, RealmBuilderError>,
1123 >(
1124 (),
1125 0x46fa05b17bd64269,
1126 fidl::encoding::DynamicFlags::empty(),
1127 ___deadline,
1128 )?;
1129 Ok(_response.map(|x| x.component_decl))
1130 }
1131
1132 pub fn r#replace_realm_decl(
1139 &self,
1140 mut component_decl: &fidl_fuchsia_component_decl::Component,
1141 ___deadline: zx::MonotonicInstant,
1142 ) -> Result<RealmReplaceRealmDeclResult, fidl::Error> {
1143 let _response =
1144 self.client.send_query::<RealmReplaceRealmDeclRequest, fidl::encoding::ResultType<
1145 fidl::encoding::EmptyStruct,
1146 RealmBuilderError,
1147 >>(
1148 (component_decl,),
1149 0x48fcba4ac1338da9,
1150 fidl::encoding::DynamicFlags::empty(),
1151 ___deadline,
1152 )?;
1153 Ok(_response.map(|x| x))
1154 }
1155
1156 pub fn r#use_nested_component_manager(
1162 &self,
1163 mut component_manager_relative_url: &str,
1164 ___deadline: zx::MonotonicInstant,
1165 ) -> Result<RealmUseNestedComponentManagerResult, fidl::Error> {
1166 let _response = self.client.send_query::<
1167 RealmUseNestedComponentManagerRequest,
1168 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1169 >(
1170 (component_manager_relative_url,),
1171 0x64bd27482f3dcc,
1172 fidl::encoding::DynamicFlags::empty(),
1173 ___deadline,
1174 )?;
1175 Ok(_response.map(|x| x))
1176 }
1177
1178 pub fn r#add_route(
1194 &self,
1195 mut capabilities: &[Capability],
1196 mut from: &fidl_fuchsia_component_decl::Ref,
1197 mut to: &[fidl_fuchsia_component_decl::Ref],
1198 ___deadline: zx::MonotonicInstant,
1199 ) -> Result<RealmAddRouteResult, fidl::Error> {
1200 let _response = self.client.send_query::<RealmAddRouteRequest, fidl::encoding::ResultType<
1201 fidl::encoding::EmptyStruct,
1202 RealmBuilderError,
1203 >>(
1204 (capabilities, from, to),
1205 0x9d523295be53a0a,
1206 fidl::encoding::DynamicFlags::empty(),
1207 ___deadline,
1208 )?;
1209 Ok(_response.map(|x| x))
1210 }
1211
1212 pub fn r#read_only_directory(
1221 &self,
1222 mut name: &str,
1223 mut to: &[fidl_fuchsia_component_decl::Ref],
1224 mut directory_contents: DirectoryContents,
1225 ___deadline: zx::MonotonicInstant,
1226 ) -> Result<RealmReadOnlyDirectoryResult, fidl::Error> {
1227 let _response =
1228 self.client.send_query::<RealmReadOnlyDirectoryRequest, fidl::encoding::ResultType<
1229 fidl::encoding::EmptyStruct,
1230 RealmBuilderError,
1231 >>(
1232 (name, to, &mut directory_contents),
1233 0x78a6d150a66e00dc,
1234 fidl::encoding::DynamicFlags::empty(),
1235 ___deadline,
1236 )?;
1237 Ok(_response.map(|x| x))
1238 }
1239
1240 pub fn r#init_mutable_config_from_package(
1245 &self,
1246 mut name: &str,
1247 ___deadline: zx::MonotonicInstant,
1248 ) -> Result<RealmInitMutableConfigFromPackageResult, fidl::Error> {
1249 let _response = self.client.send_query::<
1250 RealmInitMutableConfigFromPackageRequest,
1251 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1252 >(
1253 (name,),
1254 0x36a30c9837c64216,
1255 fidl::encoding::DynamicFlags::empty(),
1256 ___deadline,
1257 )?;
1258 Ok(_response.map(|x| x))
1259 }
1260
1261 pub fn r#init_mutable_config_to_empty(
1265 &self,
1266 mut name: &str,
1267 ___deadline: zx::MonotonicInstant,
1268 ) -> Result<RealmInitMutableConfigToEmptyResult, fidl::Error> {
1269 let _response = self.client.send_query::<
1270 RealmInitMutableConfigToEmptyRequest,
1271 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1272 >(
1273 (name,),
1274 0x772cb99e2e0dccc5,
1275 fidl::encoding::DynamicFlags::empty(),
1276 ___deadline,
1277 )?;
1278 Ok(_response.map(|x| x))
1279 }
1280
1281 pub fn r#add_capability(
1283 &self,
1284 mut capability: &fidl_fuchsia_component_decl::Capability,
1285 ___deadline: zx::MonotonicInstant,
1286 ) -> Result<RealmAddCapabilityResult, fidl::Error> {
1287 let _response =
1288 self.client.send_query::<RealmAddCapabilityRequest, fidl::encoding::ResultType<
1289 fidl::encoding::EmptyStruct,
1290 RealmBuilderError,
1291 >>(
1292 (capability,),
1293 0x23a6499eb6080249,
1294 fidl::encoding::DynamicFlags::empty(),
1295 ___deadline,
1296 )?;
1297 Ok(_response.map(|x| x))
1298 }
1299
1300 pub fn r#add_collection(
1302 &self,
1303 mut collection: &fidl_fuchsia_component_decl::Collection,
1304 ___deadline: zx::MonotonicInstant,
1305 ) -> Result<RealmAddCollectionResult, fidl::Error> {
1306 let _response =
1307 self.client.send_query::<RealmAddCollectionRequest, fidl::encoding::ResultType<
1308 fidl::encoding::EmptyStruct,
1309 RealmBuilderError,
1310 >>(
1311 (collection,),
1312 0x56b75210a03a99b5,
1313 fidl::encoding::DynamicFlags::empty(),
1314 ___deadline,
1315 )?;
1316 Ok(_response.map(|x| x))
1317 }
1318
1319 pub fn r#add_environment(
1321 &self,
1322 mut environment: &fidl_fuchsia_component_decl::Environment,
1323 ___deadline: zx::MonotonicInstant,
1324 ) -> Result<RealmAddEnvironmentResult, fidl::Error> {
1325 let _response =
1326 self.client.send_query::<RealmAddEnvironmentRequest, fidl::encoding::ResultType<
1327 fidl::encoding::EmptyStruct,
1328 RealmBuilderError,
1329 >>(
1330 (environment,),
1331 0x1cd7caefa2cce0e9,
1332 fidl::encoding::DynamicFlags::empty(),
1333 ___deadline,
1334 )?;
1335 Ok(_response.map(|x| x))
1336 }
1337
1338 pub fn r#set_config_value(
1350 &self,
1351 mut name: &str,
1352 mut key: &str,
1353 mut value: &fidl_fuchsia_component_decl::ConfigValueSpec,
1354 ___deadline: zx::MonotonicInstant,
1355 ) -> Result<RealmSetConfigValueResult, fidl::Error> {
1356 let _response =
1357 self.client.send_query::<RealmSetConfigValueRequest, fidl::encoding::ResultType<
1358 fidl::encoding::EmptyStruct,
1359 RealmBuilderError,
1360 >>(
1361 (name, key, value),
1362 0x886450d291217f2,
1363 fidl::encoding::DynamicFlags::empty(),
1364 ___deadline,
1365 )?;
1366 Ok(_response.map(|x| x))
1367 }
1368}
1369
1370#[cfg(target_os = "fuchsia")]
1371impl From<RealmSynchronousProxy> for zx::Handle {
1372 fn from(value: RealmSynchronousProxy) -> Self {
1373 value.into_channel().into()
1374 }
1375}
1376
1377#[cfg(target_os = "fuchsia")]
1378impl From<fidl::Channel> for RealmSynchronousProxy {
1379 fn from(value: fidl::Channel) -> Self {
1380 Self::new(value)
1381 }
1382}
1383
1384#[derive(Debug, Clone)]
1385pub struct RealmProxy {
1386 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1387}
1388
1389impl fidl::endpoints::Proxy for RealmProxy {
1390 type Protocol = RealmMarker;
1391
1392 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1393 Self::new(inner)
1394 }
1395
1396 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1397 self.client.into_channel().map_err(|client| Self { client })
1398 }
1399
1400 fn as_channel(&self) -> &::fidl::AsyncChannel {
1401 self.client.as_channel()
1402 }
1403}
1404
1405impl RealmProxy {
1406 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1408 let protocol_name = <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1409 Self { client: fidl::client::Client::new(channel, protocol_name) }
1410 }
1411
1412 pub fn take_event_stream(&self) -> RealmEventStream {
1418 RealmEventStream { event_receiver: self.client.take_event_receiver() }
1419 }
1420
1421 pub fn r#add_child(
1457 &self,
1458 mut name: &str,
1459 mut url: &str,
1460 mut options: &ChildOptions,
1461 ) -> fidl::client::QueryResponseFut<
1462 RealmAddChildResult,
1463 fidl::encoding::DefaultFuchsiaResourceDialect,
1464 > {
1465 RealmProxyInterface::r#add_child(self, name, url, options)
1466 }
1467
1468 pub fn r#add_child_from_decl(
1479 &self,
1480 mut name: &str,
1481 mut decl: &fidl_fuchsia_component_decl::Component,
1482 mut options: &ChildOptions,
1483 ) -> fidl::client::QueryResponseFut<
1484 RealmAddChildFromDeclResult,
1485 fidl::encoding::DefaultFuchsiaResourceDialect,
1486 > {
1487 RealmProxyInterface::r#add_child_from_decl(self, name, decl, options)
1488 }
1489
1490 pub fn r#add_local_child(
1503 &self,
1504 mut name: &str,
1505 mut options: &ChildOptions,
1506 ) -> fidl::client::QueryResponseFut<
1507 RealmAddLocalChildResult,
1508 fidl::encoding::DefaultFuchsiaResourceDialect,
1509 > {
1510 RealmProxyInterface::r#add_local_child(self, name, options)
1511 }
1512
1513 pub fn r#add_child_realm(
1522 &self,
1523 mut name: &str,
1524 mut options: &ChildOptions,
1525 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1526 ) -> fidl::client::QueryResponseFut<
1527 RealmAddChildRealmResult,
1528 fidl::encoding::DefaultFuchsiaResourceDialect,
1529 > {
1530 RealmProxyInterface::r#add_child_realm(self, name, options, child_realm)
1531 }
1532
1533 pub fn r#add_child_realm_from_relative_url(
1537 &self,
1538 mut name: &str,
1539 mut relative_url: &str,
1540 mut options: &ChildOptions,
1541 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1542 ) -> fidl::client::QueryResponseFut<
1543 RealmAddChildRealmFromRelativeUrlResult,
1544 fidl::encoding::DefaultFuchsiaResourceDialect,
1545 > {
1546 RealmProxyInterface::r#add_child_realm_from_relative_url(
1547 self,
1548 name,
1549 relative_url,
1550 options,
1551 child_realm,
1552 )
1553 }
1554
1555 pub fn r#add_child_realm_from_decl(
1558 &self,
1559 mut name: &str,
1560 mut decl: &fidl_fuchsia_component_decl::Component,
1561 mut options: &ChildOptions,
1562 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1563 ) -> fidl::client::QueryResponseFut<
1564 RealmAddChildRealmFromDeclResult,
1565 fidl::encoding::DefaultFuchsiaResourceDialect,
1566 > {
1567 RealmProxyInterface::r#add_child_realm_from_decl(self, name, decl, options, child_realm)
1568 }
1569
1570 pub fn r#get_component_decl(
1591 &self,
1592 mut name: &str,
1593 ) -> fidl::client::QueryResponseFut<
1594 RealmGetComponentDeclResult,
1595 fidl::encoding::DefaultFuchsiaResourceDialect,
1596 > {
1597 RealmProxyInterface::r#get_component_decl(self, name)
1598 }
1599
1600 pub fn r#replace_component_decl(
1624 &self,
1625 mut name: &str,
1626 mut component_decl: &fidl_fuchsia_component_decl::Component,
1627 ) -> fidl::client::QueryResponseFut<
1628 RealmReplaceComponentDeclResult,
1629 fidl::encoding::DefaultFuchsiaResourceDialect,
1630 > {
1631 RealmProxyInterface::r#replace_component_decl(self, name, component_decl)
1632 }
1633
1634 pub fn r#get_realm_decl(
1640 &self,
1641 ) -> fidl::client::QueryResponseFut<
1642 RealmGetRealmDeclResult,
1643 fidl::encoding::DefaultFuchsiaResourceDialect,
1644 > {
1645 RealmProxyInterface::r#get_realm_decl(self)
1646 }
1647
1648 pub fn r#replace_realm_decl(
1655 &self,
1656 mut component_decl: &fidl_fuchsia_component_decl::Component,
1657 ) -> fidl::client::QueryResponseFut<
1658 RealmReplaceRealmDeclResult,
1659 fidl::encoding::DefaultFuchsiaResourceDialect,
1660 > {
1661 RealmProxyInterface::r#replace_realm_decl(self, component_decl)
1662 }
1663
1664 pub fn r#use_nested_component_manager(
1670 &self,
1671 mut component_manager_relative_url: &str,
1672 ) -> fidl::client::QueryResponseFut<
1673 RealmUseNestedComponentManagerResult,
1674 fidl::encoding::DefaultFuchsiaResourceDialect,
1675 > {
1676 RealmProxyInterface::r#use_nested_component_manager(self, component_manager_relative_url)
1677 }
1678
1679 pub fn r#add_route(
1695 &self,
1696 mut capabilities: &[Capability],
1697 mut from: &fidl_fuchsia_component_decl::Ref,
1698 mut to: &[fidl_fuchsia_component_decl::Ref],
1699 ) -> fidl::client::QueryResponseFut<
1700 RealmAddRouteResult,
1701 fidl::encoding::DefaultFuchsiaResourceDialect,
1702 > {
1703 RealmProxyInterface::r#add_route(self, capabilities, from, to)
1704 }
1705
1706 pub fn r#read_only_directory(
1715 &self,
1716 mut name: &str,
1717 mut to: &[fidl_fuchsia_component_decl::Ref],
1718 mut directory_contents: DirectoryContents,
1719 ) -> fidl::client::QueryResponseFut<
1720 RealmReadOnlyDirectoryResult,
1721 fidl::encoding::DefaultFuchsiaResourceDialect,
1722 > {
1723 RealmProxyInterface::r#read_only_directory(self, name, to, directory_contents)
1724 }
1725
1726 pub fn r#init_mutable_config_from_package(
1731 &self,
1732 mut name: &str,
1733 ) -> fidl::client::QueryResponseFut<
1734 RealmInitMutableConfigFromPackageResult,
1735 fidl::encoding::DefaultFuchsiaResourceDialect,
1736 > {
1737 RealmProxyInterface::r#init_mutable_config_from_package(self, name)
1738 }
1739
1740 pub fn r#init_mutable_config_to_empty(
1744 &self,
1745 mut name: &str,
1746 ) -> fidl::client::QueryResponseFut<
1747 RealmInitMutableConfigToEmptyResult,
1748 fidl::encoding::DefaultFuchsiaResourceDialect,
1749 > {
1750 RealmProxyInterface::r#init_mutable_config_to_empty(self, name)
1751 }
1752
1753 pub fn r#add_capability(
1755 &self,
1756 mut capability: &fidl_fuchsia_component_decl::Capability,
1757 ) -> fidl::client::QueryResponseFut<
1758 RealmAddCapabilityResult,
1759 fidl::encoding::DefaultFuchsiaResourceDialect,
1760 > {
1761 RealmProxyInterface::r#add_capability(self, capability)
1762 }
1763
1764 pub fn r#add_collection(
1766 &self,
1767 mut collection: &fidl_fuchsia_component_decl::Collection,
1768 ) -> fidl::client::QueryResponseFut<
1769 RealmAddCollectionResult,
1770 fidl::encoding::DefaultFuchsiaResourceDialect,
1771 > {
1772 RealmProxyInterface::r#add_collection(self, collection)
1773 }
1774
1775 pub fn r#add_environment(
1777 &self,
1778 mut environment: &fidl_fuchsia_component_decl::Environment,
1779 ) -> fidl::client::QueryResponseFut<
1780 RealmAddEnvironmentResult,
1781 fidl::encoding::DefaultFuchsiaResourceDialect,
1782 > {
1783 RealmProxyInterface::r#add_environment(self, environment)
1784 }
1785
1786 pub fn r#set_config_value(
1798 &self,
1799 mut name: &str,
1800 mut key: &str,
1801 mut value: &fidl_fuchsia_component_decl::ConfigValueSpec,
1802 ) -> fidl::client::QueryResponseFut<
1803 RealmSetConfigValueResult,
1804 fidl::encoding::DefaultFuchsiaResourceDialect,
1805 > {
1806 RealmProxyInterface::r#set_config_value(self, name, key, value)
1807 }
1808}
1809
1810impl RealmProxyInterface for RealmProxy {
1811 type AddChildResponseFut = fidl::client::QueryResponseFut<
1812 RealmAddChildResult,
1813 fidl::encoding::DefaultFuchsiaResourceDialect,
1814 >;
1815 fn r#add_child(
1816 &self,
1817 mut name: &str,
1818 mut url: &str,
1819 mut options: &ChildOptions,
1820 ) -> Self::AddChildResponseFut {
1821 fn _decode(
1822 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1823 ) -> Result<RealmAddChildResult, fidl::Error> {
1824 let _response = fidl::client::decode_transaction_body::<
1825 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1826 fidl::encoding::DefaultFuchsiaResourceDialect,
1827 0x3f6c07627303d801,
1828 >(_buf?)?;
1829 Ok(_response.map(|x| x))
1830 }
1831 self.client.send_query_and_decode::<RealmAddChildRequest, RealmAddChildResult>(
1832 (name, url, options),
1833 0x3f6c07627303d801,
1834 fidl::encoding::DynamicFlags::empty(),
1835 _decode,
1836 )
1837 }
1838
1839 type AddChildFromDeclResponseFut = fidl::client::QueryResponseFut<
1840 RealmAddChildFromDeclResult,
1841 fidl::encoding::DefaultFuchsiaResourceDialect,
1842 >;
1843 fn r#add_child_from_decl(
1844 &self,
1845 mut name: &str,
1846 mut decl: &fidl_fuchsia_component_decl::Component,
1847 mut options: &ChildOptions,
1848 ) -> Self::AddChildFromDeclResponseFut {
1849 fn _decode(
1850 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1851 ) -> Result<RealmAddChildFromDeclResult, fidl::Error> {
1852 let _response = fidl::client::decode_transaction_body::<
1853 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1854 fidl::encoding::DefaultFuchsiaResourceDialect,
1855 0x3950ad500258156d,
1856 >(_buf?)?;
1857 Ok(_response.map(|x| x))
1858 }
1859 self.client
1860 .send_query_and_decode::<RealmAddChildFromDeclRequest, RealmAddChildFromDeclResult>(
1861 (name, decl, options),
1862 0x3950ad500258156d,
1863 fidl::encoding::DynamicFlags::empty(),
1864 _decode,
1865 )
1866 }
1867
1868 type AddLocalChildResponseFut = fidl::client::QueryResponseFut<
1869 RealmAddLocalChildResult,
1870 fidl::encoding::DefaultFuchsiaResourceDialect,
1871 >;
1872 fn r#add_local_child(
1873 &self,
1874 mut name: &str,
1875 mut options: &ChildOptions,
1876 ) -> Self::AddLocalChildResponseFut {
1877 fn _decode(
1878 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1879 ) -> Result<RealmAddLocalChildResult, fidl::Error> {
1880 let _response = fidl::client::decode_transaction_body::<
1881 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1882 fidl::encoding::DefaultFuchsiaResourceDialect,
1883 0x3249817bae10abbb,
1884 >(_buf?)?;
1885 Ok(_response.map(|x| x))
1886 }
1887 self.client.send_query_and_decode::<RealmAddLocalChildRequest, RealmAddLocalChildResult>(
1888 (name, options),
1889 0x3249817bae10abbb,
1890 fidl::encoding::DynamicFlags::empty(),
1891 _decode,
1892 )
1893 }
1894
1895 type AddChildRealmResponseFut = fidl::client::QueryResponseFut<
1896 RealmAddChildRealmResult,
1897 fidl::encoding::DefaultFuchsiaResourceDialect,
1898 >;
1899 fn r#add_child_realm(
1900 &self,
1901 mut name: &str,
1902 mut options: &ChildOptions,
1903 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1904 ) -> Self::AddChildRealmResponseFut {
1905 fn _decode(
1906 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1907 ) -> Result<RealmAddChildRealmResult, fidl::Error> {
1908 let _response = fidl::client::decode_transaction_body::<
1909 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1910 fidl::encoding::DefaultFuchsiaResourceDialect,
1911 0x3fdf98db373b9458,
1912 >(_buf?)?;
1913 Ok(_response.map(|x| x))
1914 }
1915 self.client.send_query_and_decode::<RealmAddChildRealmRequest, RealmAddChildRealmResult>(
1916 (name, options, child_realm),
1917 0x3fdf98db373b9458,
1918 fidl::encoding::DynamicFlags::empty(),
1919 _decode,
1920 )
1921 }
1922
1923 type AddChildRealmFromRelativeUrlResponseFut = fidl::client::QueryResponseFut<
1924 RealmAddChildRealmFromRelativeUrlResult,
1925 fidl::encoding::DefaultFuchsiaResourceDialect,
1926 >;
1927 fn r#add_child_realm_from_relative_url(
1928 &self,
1929 mut name: &str,
1930 mut relative_url: &str,
1931 mut options: &ChildOptions,
1932 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1933 ) -> Self::AddChildRealmFromRelativeUrlResponseFut {
1934 fn _decode(
1935 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1936 ) -> Result<RealmAddChildRealmFromRelativeUrlResult, fidl::Error> {
1937 let _response = fidl::client::decode_transaction_body::<
1938 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1939 fidl::encoding::DefaultFuchsiaResourceDialect,
1940 0x44c34c8dcbe06abb,
1941 >(_buf?)?;
1942 Ok(_response.map(|x| x))
1943 }
1944 self.client.send_query_and_decode::<
1945 RealmAddChildRealmFromRelativeUrlRequest,
1946 RealmAddChildRealmFromRelativeUrlResult,
1947 >(
1948 (name, relative_url, options, child_realm,),
1949 0x44c34c8dcbe06abb,
1950 fidl::encoding::DynamicFlags::empty(),
1951 _decode,
1952 )
1953 }
1954
1955 type AddChildRealmFromDeclResponseFut = fidl::client::QueryResponseFut<
1956 RealmAddChildRealmFromDeclResult,
1957 fidl::encoding::DefaultFuchsiaResourceDialect,
1958 >;
1959 fn r#add_child_realm_from_decl(
1960 &self,
1961 mut name: &str,
1962 mut decl: &fidl_fuchsia_component_decl::Component,
1963 mut options: &ChildOptions,
1964 mut child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
1965 ) -> Self::AddChildRealmFromDeclResponseFut {
1966 fn _decode(
1967 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1968 ) -> Result<RealmAddChildRealmFromDeclResult, fidl::Error> {
1969 let _response = fidl::client::decode_transaction_body::<
1970 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
1971 fidl::encoding::DefaultFuchsiaResourceDialect,
1972 0x142e5c326732862e,
1973 >(_buf?)?;
1974 Ok(_response.map(|x| x))
1975 }
1976 self.client.send_query_and_decode::<
1977 RealmAddChildRealmFromDeclRequest,
1978 RealmAddChildRealmFromDeclResult,
1979 >(
1980 (name, decl, options, child_realm,),
1981 0x142e5c326732862e,
1982 fidl::encoding::DynamicFlags::empty(),
1983 _decode,
1984 )
1985 }
1986
1987 type GetComponentDeclResponseFut = fidl::client::QueryResponseFut<
1988 RealmGetComponentDeclResult,
1989 fidl::encoding::DefaultFuchsiaResourceDialect,
1990 >;
1991 fn r#get_component_decl(&self, mut name: &str) -> Self::GetComponentDeclResponseFut {
1992 fn _decode(
1993 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1994 ) -> Result<RealmGetComponentDeclResult, fidl::Error> {
1995 let _response = fidl::client::decode_transaction_body::<
1996 fidl::encoding::ResultType<RealmGetComponentDeclResponse, RealmBuilderError>,
1997 fidl::encoding::DefaultFuchsiaResourceDialect,
1998 0x320832af6a4cbac6,
1999 >(_buf?)?;
2000 Ok(_response.map(|x| x.component_decl))
2001 }
2002 self.client
2003 .send_query_and_decode::<RealmGetComponentDeclRequest, RealmGetComponentDeclResult>(
2004 (name,),
2005 0x320832af6a4cbac6,
2006 fidl::encoding::DynamicFlags::empty(),
2007 _decode,
2008 )
2009 }
2010
2011 type ReplaceComponentDeclResponseFut = fidl::client::QueryResponseFut<
2012 RealmReplaceComponentDeclResult,
2013 fidl::encoding::DefaultFuchsiaResourceDialect,
2014 >;
2015 fn r#replace_component_decl(
2016 &self,
2017 mut name: &str,
2018 mut component_decl: &fidl_fuchsia_component_decl::Component,
2019 ) -> Self::ReplaceComponentDeclResponseFut {
2020 fn _decode(
2021 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2022 ) -> Result<RealmReplaceComponentDeclResult, fidl::Error> {
2023 let _response = fidl::client::decode_transaction_body::<
2024 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2025 fidl::encoding::DefaultFuchsiaResourceDialect,
2026 0x59cecf31b314cd5f,
2027 >(_buf?)?;
2028 Ok(_response.map(|x| x))
2029 }
2030 self.client.send_query_and_decode::<
2031 RealmReplaceComponentDeclRequest,
2032 RealmReplaceComponentDeclResult,
2033 >(
2034 (name, component_decl,),
2035 0x59cecf31b314cd5f,
2036 fidl::encoding::DynamicFlags::empty(),
2037 _decode,
2038 )
2039 }
2040
2041 type GetRealmDeclResponseFut = fidl::client::QueryResponseFut<
2042 RealmGetRealmDeclResult,
2043 fidl::encoding::DefaultFuchsiaResourceDialect,
2044 >;
2045 fn r#get_realm_decl(&self) -> Self::GetRealmDeclResponseFut {
2046 fn _decode(
2047 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2048 ) -> Result<RealmGetRealmDeclResult, fidl::Error> {
2049 let _response = fidl::client::decode_transaction_body::<
2050 fidl::encoding::ResultType<RealmGetRealmDeclResponse, RealmBuilderError>,
2051 fidl::encoding::DefaultFuchsiaResourceDialect,
2052 0x46fa05b17bd64269,
2053 >(_buf?)?;
2054 Ok(_response.map(|x| x.component_decl))
2055 }
2056 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, RealmGetRealmDeclResult>(
2057 (),
2058 0x46fa05b17bd64269,
2059 fidl::encoding::DynamicFlags::empty(),
2060 _decode,
2061 )
2062 }
2063
2064 type ReplaceRealmDeclResponseFut = fidl::client::QueryResponseFut<
2065 RealmReplaceRealmDeclResult,
2066 fidl::encoding::DefaultFuchsiaResourceDialect,
2067 >;
2068 fn r#replace_realm_decl(
2069 &self,
2070 mut component_decl: &fidl_fuchsia_component_decl::Component,
2071 ) -> Self::ReplaceRealmDeclResponseFut {
2072 fn _decode(
2073 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2074 ) -> Result<RealmReplaceRealmDeclResult, fidl::Error> {
2075 let _response = fidl::client::decode_transaction_body::<
2076 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2077 fidl::encoding::DefaultFuchsiaResourceDialect,
2078 0x48fcba4ac1338da9,
2079 >(_buf?)?;
2080 Ok(_response.map(|x| x))
2081 }
2082 self.client
2083 .send_query_and_decode::<RealmReplaceRealmDeclRequest, RealmReplaceRealmDeclResult>(
2084 (component_decl,),
2085 0x48fcba4ac1338da9,
2086 fidl::encoding::DynamicFlags::empty(),
2087 _decode,
2088 )
2089 }
2090
2091 type UseNestedComponentManagerResponseFut = fidl::client::QueryResponseFut<
2092 RealmUseNestedComponentManagerResult,
2093 fidl::encoding::DefaultFuchsiaResourceDialect,
2094 >;
2095 fn r#use_nested_component_manager(
2096 &self,
2097 mut component_manager_relative_url: &str,
2098 ) -> Self::UseNestedComponentManagerResponseFut {
2099 fn _decode(
2100 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2101 ) -> Result<RealmUseNestedComponentManagerResult, fidl::Error> {
2102 let _response = fidl::client::decode_transaction_body::<
2103 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2104 fidl::encoding::DefaultFuchsiaResourceDialect,
2105 0x64bd27482f3dcc,
2106 >(_buf?)?;
2107 Ok(_response.map(|x| x))
2108 }
2109 self.client.send_query_and_decode::<
2110 RealmUseNestedComponentManagerRequest,
2111 RealmUseNestedComponentManagerResult,
2112 >(
2113 (component_manager_relative_url,),
2114 0x64bd27482f3dcc,
2115 fidl::encoding::DynamicFlags::empty(),
2116 _decode,
2117 )
2118 }
2119
2120 type AddRouteResponseFut = fidl::client::QueryResponseFut<
2121 RealmAddRouteResult,
2122 fidl::encoding::DefaultFuchsiaResourceDialect,
2123 >;
2124 fn r#add_route(
2125 &self,
2126 mut capabilities: &[Capability],
2127 mut from: &fidl_fuchsia_component_decl::Ref,
2128 mut to: &[fidl_fuchsia_component_decl::Ref],
2129 ) -> Self::AddRouteResponseFut {
2130 fn _decode(
2131 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2132 ) -> Result<RealmAddRouteResult, fidl::Error> {
2133 let _response = fidl::client::decode_transaction_body::<
2134 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2135 fidl::encoding::DefaultFuchsiaResourceDialect,
2136 0x9d523295be53a0a,
2137 >(_buf?)?;
2138 Ok(_response.map(|x| x))
2139 }
2140 self.client.send_query_and_decode::<RealmAddRouteRequest, RealmAddRouteResult>(
2141 (capabilities, from, to),
2142 0x9d523295be53a0a,
2143 fidl::encoding::DynamicFlags::empty(),
2144 _decode,
2145 )
2146 }
2147
2148 type ReadOnlyDirectoryResponseFut = fidl::client::QueryResponseFut<
2149 RealmReadOnlyDirectoryResult,
2150 fidl::encoding::DefaultFuchsiaResourceDialect,
2151 >;
2152 fn r#read_only_directory(
2153 &self,
2154 mut name: &str,
2155 mut to: &[fidl_fuchsia_component_decl::Ref],
2156 mut directory_contents: DirectoryContents,
2157 ) -> Self::ReadOnlyDirectoryResponseFut {
2158 fn _decode(
2159 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2160 ) -> Result<RealmReadOnlyDirectoryResult, fidl::Error> {
2161 let _response = fidl::client::decode_transaction_body::<
2162 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2163 fidl::encoding::DefaultFuchsiaResourceDialect,
2164 0x78a6d150a66e00dc,
2165 >(_buf?)?;
2166 Ok(_response.map(|x| x))
2167 }
2168 self.client
2169 .send_query_and_decode::<RealmReadOnlyDirectoryRequest, RealmReadOnlyDirectoryResult>(
2170 (name, to, &mut directory_contents),
2171 0x78a6d150a66e00dc,
2172 fidl::encoding::DynamicFlags::empty(),
2173 _decode,
2174 )
2175 }
2176
2177 type InitMutableConfigFromPackageResponseFut = fidl::client::QueryResponseFut<
2178 RealmInitMutableConfigFromPackageResult,
2179 fidl::encoding::DefaultFuchsiaResourceDialect,
2180 >;
2181 fn r#init_mutable_config_from_package(
2182 &self,
2183 mut name: &str,
2184 ) -> Self::InitMutableConfigFromPackageResponseFut {
2185 fn _decode(
2186 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2187 ) -> Result<RealmInitMutableConfigFromPackageResult, fidl::Error> {
2188 let _response = fidl::client::decode_transaction_body::<
2189 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2190 fidl::encoding::DefaultFuchsiaResourceDialect,
2191 0x36a30c9837c64216,
2192 >(_buf?)?;
2193 Ok(_response.map(|x| x))
2194 }
2195 self.client.send_query_and_decode::<
2196 RealmInitMutableConfigFromPackageRequest,
2197 RealmInitMutableConfigFromPackageResult,
2198 >(
2199 (name,),
2200 0x36a30c9837c64216,
2201 fidl::encoding::DynamicFlags::empty(),
2202 _decode,
2203 )
2204 }
2205
2206 type InitMutableConfigToEmptyResponseFut = fidl::client::QueryResponseFut<
2207 RealmInitMutableConfigToEmptyResult,
2208 fidl::encoding::DefaultFuchsiaResourceDialect,
2209 >;
2210 fn r#init_mutable_config_to_empty(
2211 &self,
2212 mut name: &str,
2213 ) -> Self::InitMutableConfigToEmptyResponseFut {
2214 fn _decode(
2215 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2216 ) -> Result<RealmInitMutableConfigToEmptyResult, fidl::Error> {
2217 let _response = fidl::client::decode_transaction_body::<
2218 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2219 fidl::encoding::DefaultFuchsiaResourceDialect,
2220 0x772cb99e2e0dccc5,
2221 >(_buf?)?;
2222 Ok(_response.map(|x| x))
2223 }
2224 self.client.send_query_and_decode::<
2225 RealmInitMutableConfigToEmptyRequest,
2226 RealmInitMutableConfigToEmptyResult,
2227 >(
2228 (name,),
2229 0x772cb99e2e0dccc5,
2230 fidl::encoding::DynamicFlags::empty(),
2231 _decode,
2232 )
2233 }
2234
2235 type AddCapabilityResponseFut = fidl::client::QueryResponseFut<
2236 RealmAddCapabilityResult,
2237 fidl::encoding::DefaultFuchsiaResourceDialect,
2238 >;
2239 fn r#add_capability(
2240 &self,
2241 mut capability: &fidl_fuchsia_component_decl::Capability,
2242 ) -> Self::AddCapabilityResponseFut {
2243 fn _decode(
2244 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2245 ) -> Result<RealmAddCapabilityResult, fidl::Error> {
2246 let _response = fidl::client::decode_transaction_body::<
2247 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2248 fidl::encoding::DefaultFuchsiaResourceDialect,
2249 0x23a6499eb6080249,
2250 >(_buf?)?;
2251 Ok(_response.map(|x| x))
2252 }
2253 self.client.send_query_and_decode::<RealmAddCapabilityRequest, RealmAddCapabilityResult>(
2254 (capability,),
2255 0x23a6499eb6080249,
2256 fidl::encoding::DynamicFlags::empty(),
2257 _decode,
2258 )
2259 }
2260
2261 type AddCollectionResponseFut = fidl::client::QueryResponseFut<
2262 RealmAddCollectionResult,
2263 fidl::encoding::DefaultFuchsiaResourceDialect,
2264 >;
2265 fn r#add_collection(
2266 &self,
2267 mut collection: &fidl_fuchsia_component_decl::Collection,
2268 ) -> Self::AddCollectionResponseFut {
2269 fn _decode(
2270 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2271 ) -> Result<RealmAddCollectionResult, fidl::Error> {
2272 let _response = fidl::client::decode_transaction_body::<
2273 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2274 fidl::encoding::DefaultFuchsiaResourceDialect,
2275 0x56b75210a03a99b5,
2276 >(_buf?)?;
2277 Ok(_response.map(|x| x))
2278 }
2279 self.client.send_query_and_decode::<RealmAddCollectionRequest, RealmAddCollectionResult>(
2280 (collection,),
2281 0x56b75210a03a99b5,
2282 fidl::encoding::DynamicFlags::empty(),
2283 _decode,
2284 )
2285 }
2286
2287 type AddEnvironmentResponseFut = fidl::client::QueryResponseFut<
2288 RealmAddEnvironmentResult,
2289 fidl::encoding::DefaultFuchsiaResourceDialect,
2290 >;
2291 fn r#add_environment(
2292 &self,
2293 mut environment: &fidl_fuchsia_component_decl::Environment,
2294 ) -> Self::AddEnvironmentResponseFut {
2295 fn _decode(
2296 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2297 ) -> Result<RealmAddEnvironmentResult, fidl::Error> {
2298 let _response = fidl::client::decode_transaction_body::<
2299 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2300 fidl::encoding::DefaultFuchsiaResourceDialect,
2301 0x1cd7caefa2cce0e9,
2302 >(_buf?)?;
2303 Ok(_response.map(|x| x))
2304 }
2305 self.client.send_query_and_decode::<RealmAddEnvironmentRequest, RealmAddEnvironmentResult>(
2306 (environment,),
2307 0x1cd7caefa2cce0e9,
2308 fidl::encoding::DynamicFlags::empty(),
2309 _decode,
2310 )
2311 }
2312
2313 type SetConfigValueResponseFut = fidl::client::QueryResponseFut<
2314 RealmSetConfigValueResult,
2315 fidl::encoding::DefaultFuchsiaResourceDialect,
2316 >;
2317 fn r#set_config_value(
2318 &self,
2319 mut name: &str,
2320 mut key: &str,
2321 mut value: &fidl_fuchsia_component_decl::ConfigValueSpec,
2322 ) -> Self::SetConfigValueResponseFut {
2323 fn _decode(
2324 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2325 ) -> Result<RealmSetConfigValueResult, fidl::Error> {
2326 let _response = fidl::client::decode_transaction_body::<
2327 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
2328 fidl::encoding::DefaultFuchsiaResourceDialect,
2329 0x886450d291217f2,
2330 >(_buf?)?;
2331 Ok(_response.map(|x| x))
2332 }
2333 self.client.send_query_and_decode::<RealmSetConfigValueRequest, RealmSetConfigValueResult>(
2334 (name, key, value),
2335 0x886450d291217f2,
2336 fidl::encoding::DynamicFlags::empty(),
2337 _decode,
2338 )
2339 }
2340}
2341
2342pub struct RealmEventStream {
2343 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2344}
2345
2346impl std::marker::Unpin for RealmEventStream {}
2347
2348impl futures::stream::FusedStream for RealmEventStream {
2349 fn is_terminated(&self) -> bool {
2350 self.event_receiver.is_terminated()
2351 }
2352}
2353
2354impl futures::Stream for RealmEventStream {
2355 type Item = Result<RealmEvent, fidl::Error>;
2356
2357 fn poll_next(
2358 mut self: std::pin::Pin<&mut Self>,
2359 cx: &mut std::task::Context<'_>,
2360 ) -> std::task::Poll<Option<Self::Item>> {
2361 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2362 &mut self.event_receiver,
2363 cx
2364 )?) {
2365 Some(buf) => std::task::Poll::Ready(Some(RealmEvent::decode(buf))),
2366 None => std::task::Poll::Ready(None),
2367 }
2368 }
2369}
2370
2371#[derive(Debug)]
2372pub enum RealmEvent {}
2373
2374impl RealmEvent {
2375 fn decode(
2377 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2378 ) -> Result<RealmEvent, fidl::Error> {
2379 let (bytes, _handles) = buf.split_mut();
2380 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2381 debug_assert_eq!(tx_header.tx_id, 0);
2382 match tx_header.ordinal {
2383 _ => Err(fidl::Error::UnknownOrdinal {
2384 ordinal: tx_header.ordinal,
2385 protocol_name: <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2386 }),
2387 }
2388 }
2389}
2390
2391pub struct RealmRequestStream {
2393 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2394 is_terminated: bool,
2395}
2396
2397impl std::marker::Unpin for RealmRequestStream {}
2398
2399impl futures::stream::FusedStream for RealmRequestStream {
2400 fn is_terminated(&self) -> bool {
2401 self.is_terminated
2402 }
2403}
2404
2405impl fidl::endpoints::RequestStream for RealmRequestStream {
2406 type Protocol = RealmMarker;
2407 type ControlHandle = RealmControlHandle;
2408
2409 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2410 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2411 }
2412
2413 fn control_handle(&self) -> Self::ControlHandle {
2414 RealmControlHandle { inner: self.inner.clone() }
2415 }
2416
2417 fn into_inner(
2418 self,
2419 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2420 {
2421 (self.inner, self.is_terminated)
2422 }
2423
2424 fn from_inner(
2425 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2426 is_terminated: bool,
2427 ) -> Self {
2428 Self { inner, is_terminated }
2429 }
2430}
2431
2432impl futures::Stream for RealmRequestStream {
2433 type Item = Result<RealmRequest, fidl::Error>;
2434
2435 fn poll_next(
2436 mut self: std::pin::Pin<&mut Self>,
2437 cx: &mut std::task::Context<'_>,
2438 ) -> std::task::Poll<Option<Self::Item>> {
2439 let this = &mut *self;
2440 if this.inner.check_shutdown(cx) {
2441 this.is_terminated = true;
2442 return std::task::Poll::Ready(None);
2443 }
2444 if this.is_terminated {
2445 panic!("polled RealmRequestStream after completion");
2446 }
2447 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2448 |bytes, handles| {
2449 match this.inner.channel().read_etc(cx, bytes, handles) {
2450 std::task::Poll::Ready(Ok(())) => {}
2451 std::task::Poll::Pending => return std::task::Poll::Pending,
2452 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2453 this.is_terminated = true;
2454 return std::task::Poll::Ready(None);
2455 }
2456 std::task::Poll::Ready(Err(e)) => {
2457 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2458 e.into(),
2459 ))))
2460 }
2461 }
2462
2463 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2465
2466 std::task::Poll::Ready(Some(match header.ordinal {
2467 0x3f6c07627303d801 => {
2468 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2469 let mut req = fidl::new_empty!(
2470 RealmAddChildRequest,
2471 fidl::encoding::DefaultFuchsiaResourceDialect
2472 );
2473 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddChildRequest>(&header, _body_bytes, handles, &mut req)?;
2474 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2475 Ok(RealmRequest::AddChild {
2476 name: req.name,
2477 url: req.url,
2478 options: req.options,
2479
2480 responder: RealmAddChildResponder {
2481 control_handle: std::mem::ManuallyDrop::new(control_handle),
2482 tx_id: header.tx_id,
2483 },
2484 })
2485 }
2486 0x3950ad500258156d => {
2487 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2488 let mut req = fidl::new_empty!(
2489 RealmAddChildFromDeclRequest,
2490 fidl::encoding::DefaultFuchsiaResourceDialect
2491 );
2492 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddChildFromDeclRequest>(&header, _body_bytes, handles, &mut req)?;
2493 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2494 Ok(RealmRequest::AddChildFromDecl {
2495 name: req.name,
2496 decl: req.decl,
2497 options: req.options,
2498
2499 responder: RealmAddChildFromDeclResponder {
2500 control_handle: std::mem::ManuallyDrop::new(control_handle),
2501 tx_id: header.tx_id,
2502 },
2503 })
2504 }
2505 0x3249817bae10abbb => {
2506 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2507 let mut req = fidl::new_empty!(
2508 RealmAddLocalChildRequest,
2509 fidl::encoding::DefaultFuchsiaResourceDialect
2510 );
2511 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddLocalChildRequest>(&header, _body_bytes, handles, &mut req)?;
2512 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2513 Ok(RealmRequest::AddLocalChild {
2514 name: req.name,
2515 options: req.options,
2516
2517 responder: RealmAddLocalChildResponder {
2518 control_handle: std::mem::ManuallyDrop::new(control_handle),
2519 tx_id: header.tx_id,
2520 },
2521 })
2522 }
2523 0x3fdf98db373b9458 => {
2524 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2525 let mut req = fidl::new_empty!(
2526 RealmAddChildRealmRequest,
2527 fidl::encoding::DefaultFuchsiaResourceDialect
2528 );
2529 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddChildRealmRequest>(&header, _body_bytes, handles, &mut req)?;
2530 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2531 Ok(RealmRequest::AddChildRealm {
2532 name: req.name,
2533 options: req.options,
2534 child_realm: req.child_realm,
2535
2536 responder: RealmAddChildRealmResponder {
2537 control_handle: std::mem::ManuallyDrop::new(control_handle),
2538 tx_id: header.tx_id,
2539 },
2540 })
2541 }
2542 0x44c34c8dcbe06abb => {
2543 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2544 let mut req = fidl::new_empty!(
2545 RealmAddChildRealmFromRelativeUrlRequest,
2546 fidl::encoding::DefaultFuchsiaResourceDialect
2547 );
2548 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddChildRealmFromRelativeUrlRequest>(&header, _body_bytes, handles, &mut req)?;
2549 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2550 Ok(RealmRequest::AddChildRealmFromRelativeUrl {
2551 name: req.name,
2552 relative_url: req.relative_url,
2553 options: req.options,
2554 child_realm: req.child_realm,
2555
2556 responder: RealmAddChildRealmFromRelativeUrlResponder {
2557 control_handle: std::mem::ManuallyDrop::new(control_handle),
2558 tx_id: header.tx_id,
2559 },
2560 })
2561 }
2562 0x142e5c326732862e => {
2563 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2564 let mut req = fidl::new_empty!(
2565 RealmAddChildRealmFromDeclRequest,
2566 fidl::encoding::DefaultFuchsiaResourceDialect
2567 );
2568 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddChildRealmFromDeclRequest>(&header, _body_bytes, handles, &mut req)?;
2569 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2570 Ok(RealmRequest::AddChildRealmFromDecl {
2571 name: req.name,
2572 decl: req.decl,
2573 options: req.options,
2574 child_realm: req.child_realm,
2575
2576 responder: RealmAddChildRealmFromDeclResponder {
2577 control_handle: std::mem::ManuallyDrop::new(control_handle),
2578 tx_id: header.tx_id,
2579 },
2580 })
2581 }
2582 0x320832af6a4cbac6 => {
2583 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2584 let mut req = fidl::new_empty!(
2585 RealmGetComponentDeclRequest,
2586 fidl::encoding::DefaultFuchsiaResourceDialect
2587 );
2588 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmGetComponentDeclRequest>(&header, _body_bytes, handles, &mut req)?;
2589 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2590 Ok(RealmRequest::GetComponentDecl {
2591 name: req.name,
2592
2593 responder: RealmGetComponentDeclResponder {
2594 control_handle: std::mem::ManuallyDrop::new(control_handle),
2595 tx_id: header.tx_id,
2596 },
2597 })
2598 }
2599 0x59cecf31b314cd5f => {
2600 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2601 let mut req = fidl::new_empty!(
2602 RealmReplaceComponentDeclRequest,
2603 fidl::encoding::DefaultFuchsiaResourceDialect
2604 );
2605 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmReplaceComponentDeclRequest>(&header, _body_bytes, handles, &mut req)?;
2606 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2607 Ok(RealmRequest::ReplaceComponentDecl {
2608 name: req.name,
2609 component_decl: req.component_decl,
2610
2611 responder: RealmReplaceComponentDeclResponder {
2612 control_handle: std::mem::ManuallyDrop::new(control_handle),
2613 tx_id: header.tx_id,
2614 },
2615 })
2616 }
2617 0x46fa05b17bd64269 => {
2618 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2619 let mut req = fidl::new_empty!(
2620 fidl::encoding::EmptyPayload,
2621 fidl::encoding::DefaultFuchsiaResourceDialect
2622 );
2623 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2624 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2625 Ok(RealmRequest::GetRealmDecl {
2626 responder: RealmGetRealmDeclResponder {
2627 control_handle: std::mem::ManuallyDrop::new(control_handle),
2628 tx_id: header.tx_id,
2629 },
2630 })
2631 }
2632 0x48fcba4ac1338da9 => {
2633 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2634 let mut req = fidl::new_empty!(
2635 RealmReplaceRealmDeclRequest,
2636 fidl::encoding::DefaultFuchsiaResourceDialect
2637 );
2638 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmReplaceRealmDeclRequest>(&header, _body_bytes, handles, &mut req)?;
2639 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2640 Ok(RealmRequest::ReplaceRealmDecl {
2641 component_decl: req.component_decl,
2642
2643 responder: RealmReplaceRealmDeclResponder {
2644 control_handle: std::mem::ManuallyDrop::new(control_handle),
2645 tx_id: header.tx_id,
2646 },
2647 })
2648 }
2649 0x64bd27482f3dcc => {
2650 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2651 let mut req = fidl::new_empty!(
2652 RealmUseNestedComponentManagerRequest,
2653 fidl::encoding::DefaultFuchsiaResourceDialect
2654 );
2655 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmUseNestedComponentManagerRequest>(&header, _body_bytes, handles, &mut req)?;
2656 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2657 Ok(RealmRequest::UseNestedComponentManager {
2658 component_manager_relative_url: req.component_manager_relative_url,
2659
2660 responder: RealmUseNestedComponentManagerResponder {
2661 control_handle: std::mem::ManuallyDrop::new(control_handle),
2662 tx_id: header.tx_id,
2663 },
2664 })
2665 }
2666 0x9d523295be53a0a => {
2667 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2668 let mut req = fidl::new_empty!(
2669 RealmAddRouteRequest,
2670 fidl::encoding::DefaultFuchsiaResourceDialect
2671 );
2672 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddRouteRequest>(&header, _body_bytes, handles, &mut req)?;
2673 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2674 Ok(RealmRequest::AddRoute {
2675 capabilities: req.capabilities,
2676 from: req.from,
2677 to: req.to,
2678
2679 responder: RealmAddRouteResponder {
2680 control_handle: std::mem::ManuallyDrop::new(control_handle),
2681 tx_id: header.tx_id,
2682 },
2683 })
2684 }
2685 0x78a6d150a66e00dc => {
2686 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2687 let mut req = fidl::new_empty!(
2688 RealmReadOnlyDirectoryRequest,
2689 fidl::encoding::DefaultFuchsiaResourceDialect
2690 );
2691 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmReadOnlyDirectoryRequest>(&header, _body_bytes, handles, &mut req)?;
2692 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2693 Ok(RealmRequest::ReadOnlyDirectory {
2694 name: req.name,
2695 to: req.to,
2696 directory_contents: req.directory_contents,
2697
2698 responder: RealmReadOnlyDirectoryResponder {
2699 control_handle: std::mem::ManuallyDrop::new(control_handle),
2700 tx_id: header.tx_id,
2701 },
2702 })
2703 }
2704 0x36a30c9837c64216 => {
2705 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2706 let mut req = fidl::new_empty!(
2707 RealmInitMutableConfigFromPackageRequest,
2708 fidl::encoding::DefaultFuchsiaResourceDialect
2709 );
2710 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmInitMutableConfigFromPackageRequest>(&header, _body_bytes, handles, &mut req)?;
2711 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2712 Ok(RealmRequest::InitMutableConfigFromPackage {
2713 name: req.name,
2714
2715 responder: RealmInitMutableConfigFromPackageResponder {
2716 control_handle: std::mem::ManuallyDrop::new(control_handle),
2717 tx_id: header.tx_id,
2718 },
2719 })
2720 }
2721 0x772cb99e2e0dccc5 => {
2722 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2723 let mut req = fidl::new_empty!(
2724 RealmInitMutableConfigToEmptyRequest,
2725 fidl::encoding::DefaultFuchsiaResourceDialect
2726 );
2727 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmInitMutableConfigToEmptyRequest>(&header, _body_bytes, handles, &mut req)?;
2728 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2729 Ok(RealmRequest::InitMutableConfigToEmpty {
2730 name: req.name,
2731
2732 responder: RealmInitMutableConfigToEmptyResponder {
2733 control_handle: std::mem::ManuallyDrop::new(control_handle),
2734 tx_id: header.tx_id,
2735 },
2736 })
2737 }
2738 0x23a6499eb6080249 => {
2739 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2740 let mut req = fidl::new_empty!(
2741 RealmAddCapabilityRequest,
2742 fidl::encoding::DefaultFuchsiaResourceDialect
2743 );
2744 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddCapabilityRequest>(&header, _body_bytes, handles, &mut req)?;
2745 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2746 Ok(RealmRequest::AddCapability {
2747 capability: req.capability,
2748
2749 responder: RealmAddCapabilityResponder {
2750 control_handle: std::mem::ManuallyDrop::new(control_handle),
2751 tx_id: header.tx_id,
2752 },
2753 })
2754 }
2755 0x56b75210a03a99b5 => {
2756 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2757 let mut req = fidl::new_empty!(
2758 RealmAddCollectionRequest,
2759 fidl::encoding::DefaultFuchsiaResourceDialect
2760 );
2761 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddCollectionRequest>(&header, _body_bytes, handles, &mut req)?;
2762 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2763 Ok(RealmRequest::AddCollection {
2764 collection: req.collection,
2765
2766 responder: RealmAddCollectionResponder {
2767 control_handle: std::mem::ManuallyDrop::new(control_handle),
2768 tx_id: header.tx_id,
2769 },
2770 })
2771 }
2772 0x1cd7caefa2cce0e9 => {
2773 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2774 let mut req = fidl::new_empty!(
2775 RealmAddEnvironmentRequest,
2776 fidl::encoding::DefaultFuchsiaResourceDialect
2777 );
2778 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmAddEnvironmentRequest>(&header, _body_bytes, handles, &mut req)?;
2779 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2780 Ok(RealmRequest::AddEnvironment {
2781 environment: req.environment,
2782
2783 responder: RealmAddEnvironmentResponder {
2784 control_handle: std::mem::ManuallyDrop::new(control_handle),
2785 tx_id: header.tx_id,
2786 },
2787 })
2788 }
2789 0x886450d291217f2 => {
2790 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2791 let mut req = fidl::new_empty!(
2792 RealmSetConfigValueRequest,
2793 fidl::encoding::DefaultFuchsiaResourceDialect
2794 );
2795 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmSetConfigValueRequest>(&header, _body_bytes, handles, &mut req)?;
2796 let control_handle = RealmControlHandle { inner: this.inner.clone() };
2797 Ok(RealmRequest::SetConfigValue {
2798 name: req.name,
2799 key: req.key,
2800 value: req.value,
2801
2802 responder: RealmSetConfigValueResponder {
2803 control_handle: std::mem::ManuallyDrop::new(control_handle),
2804 tx_id: header.tx_id,
2805 },
2806 })
2807 }
2808 _ => Err(fidl::Error::UnknownOrdinal {
2809 ordinal: header.ordinal,
2810 protocol_name: <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2811 }),
2812 }))
2813 },
2814 )
2815 }
2816}
2817
2818#[derive(Debug)]
2819pub enum RealmRequest {
2820 AddChild { name: String, url: String, options: ChildOptions, responder: RealmAddChildResponder },
2856 AddChildFromDecl {
2867 name: String,
2868 decl: fidl_fuchsia_component_decl::Component,
2869 options: ChildOptions,
2870 responder: RealmAddChildFromDeclResponder,
2871 },
2872 AddLocalChild { name: String, options: ChildOptions, responder: RealmAddLocalChildResponder },
2885 AddChildRealm {
2894 name: String,
2895 options: ChildOptions,
2896 child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
2897 responder: RealmAddChildRealmResponder,
2898 },
2899 AddChildRealmFromRelativeUrl {
2903 name: String,
2904 relative_url: String,
2905 options: ChildOptions,
2906 child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
2907 responder: RealmAddChildRealmFromRelativeUrlResponder,
2908 },
2909 AddChildRealmFromDecl {
2912 name: String,
2913 decl: fidl_fuchsia_component_decl::Component,
2914 options: ChildOptions,
2915 child_realm: fidl::endpoints::ServerEnd<RealmMarker>,
2916 responder: RealmAddChildRealmFromDeclResponder,
2917 },
2918 GetComponentDecl { name: String, responder: RealmGetComponentDeclResponder },
2939 ReplaceComponentDecl {
2963 name: String,
2964 component_decl: fidl_fuchsia_component_decl::Component,
2965 responder: RealmReplaceComponentDeclResponder,
2966 },
2967 GetRealmDecl { responder: RealmGetRealmDeclResponder },
2973 ReplaceRealmDecl {
2980 component_decl: fidl_fuchsia_component_decl::Component,
2981 responder: RealmReplaceRealmDeclResponder,
2982 },
2983 UseNestedComponentManager {
2989 component_manager_relative_url: String,
2990 responder: RealmUseNestedComponentManagerResponder,
2991 },
2992 AddRoute {
3008 capabilities: Vec<Capability>,
3009 from: fidl_fuchsia_component_decl::Ref,
3010 to: Vec<fidl_fuchsia_component_decl::Ref>,
3011 responder: RealmAddRouteResponder,
3012 },
3013 ReadOnlyDirectory {
3022 name: String,
3023 to: Vec<fidl_fuchsia_component_decl::Ref>,
3024 directory_contents: DirectoryContents,
3025 responder: RealmReadOnlyDirectoryResponder,
3026 },
3027 InitMutableConfigFromPackage {
3032 name: String,
3033 responder: RealmInitMutableConfigFromPackageResponder,
3034 },
3035 InitMutableConfigToEmpty { name: String, responder: RealmInitMutableConfigToEmptyResponder },
3039 AddCapability {
3041 capability: fidl_fuchsia_component_decl::Capability,
3042 responder: RealmAddCapabilityResponder,
3043 },
3044 AddCollection {
3046 collection: fidl_fuchsia_component_decl::Collection,
3047 responder: RealmAddCollectionResponder,
3048 },
3049 AddEnvironment {
3051 environment: fidl_fuchsia_component_decl::Environment,
3052 responder: RealmAddEnvironmentResponder,
3053 },
3054 SetConfigValue {
3066 name: String,
3067 key: String,
3068 value: fidl_fuchsia_component_decl::ConfigValueSpec,
3069 responder: RealmSetConfigValueResponder,
3070 },
3071}
3072
3073impl RealmRequest {
3074 #[allow(irrefutable_let_patterns)]
3075 pub fn into_add_child(self) -> Option<(String, String, ChildOptions, RealmAddChildResponder)> {
3076 if let RealmRequest::AddChild { name, url, options, responder } = self {
3077 Some((name, url, options, responder))
3078 } else {
3079 None
3080 }
3081 }
3082
3083 #[allow(irrefutable_let_patterns)]
3084 pub fn into_add_child_from_decl(
3085 self,
3086 ) -> Option<(
3087 String,
3088 fidl_fuchsia_component_decl::Component,
3089 ChildOptions,
3090 RealmAddChildFromDeclResponder,
3091 )> {
3092 if let RealmRequest::AddChildFromDecl { name, decl, options, responder } = self {
3093 Some((name, decl, options, responder))
3094 } else {
3095 None
3096 }
3097 }
3098
3099 #[allow(irrefutable_let_patterns)]
3100 pub fn into_add_local_child(
3101 self,
3102 ) -> Option<(String, ChildOptions, RealmAddLocalChildResponder)> {
3103 if let RealmRequest::AddLocalChild { name, options, responder } = self {
3104 Some((name, options, responder))
3105 } else {
3106 None
3107 }
3108 }
3109
3110 #[allow(irrefutable_let_patterns)]
3111 pub fn into_add_child_realm(
3112 self,
3113 ) -> Option<(
3114 String,
3115 ChildOptions,
3116 fidl::endpoints::ServerEnd<RealmMarker>,
3117 RealmAddChildRealmResponder,
3118 )> {
3119 if let RealmRequest::AddChildRealm { name, options, child_realm, responder } = self {
3120 Some((name, options, child_realm, responder))
3121 } else {
3122 None
3123 }
3124 }
3125
3126 #[allow(irrefutable_let_patterns)]
3127 pub fn into_add_child_realm_from_relative_url(
3128 self,
3129 ) -> Option<(
3130 String,
3131 String,
3132 ChildOptions,
3133 fidl::endpoints::ServerEnd<RealmMarker>,
3134 RealmAddChildRealmFromRelativeUrlResponder,
3135 )> {
3136 if let RealmRequest::AddChildRealmFromRelativeUrl {
3137 name,
3138 relative_url,
3139 options,
3140 child_realm,
3141 responder,
3142 } = self
3143 {
3144 Some((name, relative_url, options, child_realm, responder))
3145 } else {
3146 None
3147 }
3148 }
3149
3150 #[allow(irrefutable_let_patterns)]
3151 pub fn into_add_child_realm_from_decl(
3152 self,
3153 ) -> Option<(
3154 String,
3155 fidl_fuchsia_component_decl::Component,
3156 ChildOptions,
3157 fidl::endpoints::ServerEnd<RealmMarker>,
3158 RealmAddChildRealmFromDeclResponder,
3159 )> {
3160 if let RealmRequest::AddChildRealmFromDecl { name, decl, options, child_realm, responder } =
3161 self
3162 {
3163 Some((name, decl, options, child_realm, responder))
3164 } else {
3165 None
3166 }
3167 }
3168
3169 #[allow(irrefutable_let_patterns)]
3170 pub fn into_get_component_decl(self) -> Option<(String, RealmGetComponentDeclResponder)> {
3171 if let RealmRequest::GetComponentDecl { name, responder } = self {
3172 Some((name, responder))
3173 } else {
3174 None
3175 }
3176 }
3177
3178 #[allow(irrefutable_let_patterns)]
3179 pub fn into_replace_component_decl(
3180 self,
3181 ) -> Option<(String, fidl_fuchsia_component_decl::Component, RealmReplaceComponentDeclResponder)>
3182 {
3183 if let RealmRequest::ReplaceComponentDecl { name, component_decl, responder } = self {
3184 Some((name, component_decl, responder))
3185 } else {
3186 None
3187 }
3188 }
3189
3190 #[allow(irrefutable_let_patterns)]
3191 pub fn into_get_realm_decl(self) -> Option<(RealmGetRealmDeclResponder)> {
3192 if let RealmRequest::GetRealmDecl { responder } = self {
3193 Some((responder))
3194 } else {
3195 None
3196 }
3197 }
3198
3199 #[allow(irrefutable_let_patterns)]
3200 pub fn into_replace_realm_decl(
3201 self,
3202 ) -> Option<(fidl_fuchsia_component_decl::Component, RealmReplaceRealmDeclResponder)> {
3203 if let RealmRequest::ReplaceRealmDecl { component_decl, responder } = self {
3204 Some((component_decl, responder))
3205 } else {
3206 None
3207 }
3208 }
3209
3210 #[allow(irrefutable_let_patterns)]
3211 pub fn into_use_nested_component_manager(
3212 self,
3213 ) -> Option<(String, RealmUseNestedComponentManagerResponder)> {
3214 if let RealmRequest::UseNestedComponentManager {
3215 component_manager_relative_url,
3216 responder,
3217 } = self
3218 {
3219 Some((component_manager_relative_url, responder))
3220 } else {
3221 None
3222 }
3223 }
3224
3225 #[allow(irrefutable_let_patterns)]
3226 pub fn into_add_route(
3227 self,
3228 ) -> Option<(
3229 Vec<Capability>,
3230 fidl_fuchsia_component_decl::Ref,
3231 Vec<fidl_fuchsia_component_decl::Ref>,
3232 RealmAddRouteResponder,
3233 )> {
3234 if let RealmRequest::AddRoute { capabilities, from, to, responder } = self {
3235 Some((capabilities, from, to, responder))
3236 } else {
3237 None
3238 }
3239 }
3240
3241 #[allow(irrefutable_let_patterns)]
3242 pub fn into_read_only_directory(
3243 self,
3244 ) -> Option<(
3245 String,
3246 Vec<fidl_fuchsia_component_decl::Ref>,
3247 DirectoryContents,
3248 RealmReadOnlyDirectoryResponder,
3249 )> {
3250 if let RealmRequest::ReadOnlyDirectory { name, to, directory_contents, responder } = self {
3251 Some((name, to, directory_contents, responder))
3252 } else {
3253 None
3254 }
3255 }
3256
3257 #[allow(irrefutable_let_patterns)]
3258 pub fn into_init_mutable_config_from_package(
3259 self,
3260 ) -> Option<(String, RealmInitMutableConfigFromPackageResponder)> {
3261 if let RealmRequest::InitMutableConfigFromPackage { name, responder } = self {
3262 Some((name, responder))
3263 } else {
3264 None
3265 }
3266 }
3267
3268 #[allow(irrefutable_let_patterns)]
3269 pub fn into_init_mutable_config_to_empty(
3270 self,
3271 ) -> Option<(String, RealmInitMutableConfigToEmptyResponder)> {
3272 if let RealmRequest::InitMutableConfigToEmpty { name, responder } = self {
3273 Some((name, responder))
3274 } else {
3275 None
3276 }
3277 }
3278
3279 #[allow(irrefutable_let_patterns)]
3280 pub fn into_add_capability(
3281 self,
3282 ) -> Option<(fidl_fuchsia_component_decl::Capability, RealmAddCapabilityResponder)> {
3283 if let RealmRequest::AddCapability { capability, responder } = self {
3284 Some((capability, responder))
3285 } else {
3286 None
3287 }
3288 }
3289
3290 #[allow(irrefutable_let_patterns)]
3291 pub fn into_add_collection(
3292 self,
3293 ) -> Option<(fidl_fuchsia_component_decl::Collection, RealmAddCollectionResponder)> {
3294 if let RealmRequest::AddCollection { collection, responder } = self {
3295 Some((collection, responder))
3296 } else {
3297 None
3298 }
3299 }
3300
3301 #[allow(irrefutable_let_patterns)]
3302 pub fn into_add_environment(
3303 self,
3304 ) -> Option<(fidl_fuchsia_component_decl::Environment, RealmAddEnvironmentResponder)> {
3305 if let RealmRequest::AddEnvironment { environment, responder } = self {
3306 Some((environment, responder))
3307 } else {
3308 None
3309 }
3310 }
3311
3312 #[allow(irrefutable_let_patterns)]
3313 pub fn into_set_config_value(
3314 self,
3315 ) -> Option<(
3316 String,
3317 String,
3318 fidl_fuchsia_component_decl::ConfigValueSpec,
3319 RealmSetConfigValueResponder,
3320 )> {
3321 if let RealmRequest::SetConfigValue { name, key, value, responder } = self {
3322 Some((name, key, value, responder))
3323 } else {
3324 None
3325 }
3326 }
3327
3328 pub fn method_name(&self) -> &'static str {
3330 match *self {
3331 RealmRequest::AddChild { .. } => "add_child",
3332 RealmRequest::AddChildFromDecl { .. } => "add_child_from_decl",
3333 RealmRequest::AddLocalChild { .. } => "add_local_child",
3334 RealmRequest::AddChildRealm { .. } => "add_child_realm",
3335 RealmRequest::AddChildRealmFromRelativeUrl { .. } => {
3336 "add_child_realm_from_relative_url"
3337 }
3338 RealmRequest::AddChildRealmFromDecl { .. } => "add_child_realm_from_decl",
3339 RealmRequest::GetComponentDecl { .. } => "get_component_decl",
3340 RealmRequest::ReplaceComponentDecl { .. } => "replace_component_decl",
3341 RealmRequest::GetRealmDecl { .. } => "get_realm_decl",
3342 RealmRequest::ReplaceRealmDecl { .. } => "replace_realm_decl",
3343 RealmRequest::UseNestedComponentManager { .. } => "use_nested_component_manager",
3344 RealmRequest::AddRoute { .. } => "add_route",
3345 RealmRequest::ReadOnlyDirectory { .. } => "read_only_directory",
3346 RealmRequest::InitMutableConfigFromPackage { .. } => "init_mutable_config_from_package",
3347 RealmRequest::InitMutableConfigToEmpty { .. } => "init_mutable_config_to_empty",
3348 RealmRequest::AddCapability { .. } => "add_capability",
3349 RealmRequest::AddCollection { .. } => "add_collection",
3350 RealmRequest::AddEnvironment { .. } => "add_environment",
3351 RealmRequest::SetConfigValue { .. } => "set_config_value",
3352 }
3353 }
3354}
3355
3356#[derive(Debug, Clone)]
3357pub struct RealmControlHandle {
3358 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3359}
3360
3361impl fidl::endpoints::ControlHandle for RealmControlHandle {
3362 fn shutdown(&self) {
3363 self.inner.shutdown()
3364 }
3365 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3366 self.inner.shutdown_with_epitaph(status)
3367 }
3368
3369 fn is_closed(&self) -> bool {
3370 self.inner.channel().is_closed()
3371 }
3372 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3373 self.inner.channel().on_closed()
3374 }
3375
3376 #[cfg(target_os = "fuchsia")]
3377 fn signal_peer(
3378 &self,
3379 clear_mask: zx::Signals,
3380 set_mask: zx::Signals,
3381 ) -> Result<(), zx_status::Status> {
3382 use fidl::Peered;
3383 self.inner.channel().signal_peer(clear_mask, set_mask)
3384 }
3385}
3386
3387impl RealmControlHandle {}
3388
3389#[must_use = "FIDL methods require a response to be sent"]
3390#[derive(Debug)]
3391pub struct RealmAddChildResponder {
3392 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3393 tx_id: u32,
3394}
3395
3396impl std::ops::Drop for RealmAddChildResponder {
3400 fn drop(&mut self) {
3401 self.control_handle.shutdown();
3402 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3404 }
3405}
3406
3407impl fidl::endpoints::Responder for RealmAddChildResponder {
3408 type ControlHandle = RealmControlHandle;
3409
3410 fn control_handle(&self) -> &RealmControlHandle {
3411 &self.control_handle
3412 }
3413
3414 fn drop_without_shutdown(mut self) {
3415 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3417 std::mem::forget(self);
3419 }
3420}
3421
3422impl RealmAddChildResponder {
3423 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3427 let _result = self.send_raw(result);
3428 if _result.is_err() {
3429 self.control_handle.shutdown();
3430 }
3431 self.drop_without_shutdown();
3432 _result
3433 }
3434
3435 pub fn send_no_shutdown_on_err(
3437 self,
3438 mut result: Result<(), RealmBuilderError>,
3439 ) -> Result<(), fidl::Error> {
3440 let _result = self.send_raw(result);
3441 self.drop_without_shutdown();
3442 _result
3443 }
3444
3445 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3446 self.control_handle.inner.send::<fidl::encoding::ResultType<
3447 fidl::encoding::EmptyStruct,
3448 RealmBuilderError,
3449 >>(
3450 result,
3451 self.tx_id,
3452 0x3f6c07627303d801,
3453 fidl::encoding::DynamicFlags::empty(),
3454 )
3455 }
3456}
3457
3458#[must_use = "FIDL methods require a response to be sent"]
3459#[derive(Debug)]
3460pub struct RealmAddChildFromDeclResponder {
3461 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3462 tx_id: u32,
3463}
3464
3465impl std::ops::Drop for RealmAddChildFromDeclResponder {
3469 fn drop(&mut self) {
3470 self.control_handle.shutdown();
3471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3473 }
3474}
3475
3476impl fidl::endpoints::Responder for RealmAddChildFromDeclResponder {
3477 type ControlHandle = RealmControlHandle;
3478
3479 fn control_handle(&self) -> &RealmControlHandle {
3480 &self.control_handle
3481 }
3482
3483 fn drop_without_shutdown(mut self) {
3484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3486 std::mem::forget(self);
3488 }
3489}
3490
3491impl RealmAddChildFromDeclResponder {
3492 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3496 let _result = self.send_raw(result);
3497 if _result.is_err() {
3498 self.control_handle.shutdown();
3499 }
3500 self.drop_without_shutdown();
3501 _result
3502 }
3503
3504 pub fn send_no_shutdown_on_err(
3506 self,
3507 mut result: Result<(), RealmBuilderError>,
3508 ) -> Result<(), fidl::Error> {
3509 let _result = self.send_raw(result);
3510 self.drop_without_shutdown();
3511 _result
3512 }
3513
3514 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3515 self.control_handle.inner.send::<fidl::encoding::ResultType<
3516 fidl::encoding::EmptyStruct,
3517 RealmBuilderError,
3518 >>(
3519 result,
3520 self.tx_id,
3521 0x3950ad500258156d,
3522 fidl::encoding::DynamicFlags::empty(),
3523 )
3524 }
3525}
3526
3527#[must_use = "FIDL methods require a response to be sent"]
3528#[derive(Debug)]
3529pub struct RealmAddLocalChildResponder {
3530 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3531 tx_id: u32,
3532}
3533
3534impl std::ops::Drop for RealmAddLocalChildResponder {
3538 fn drop(&mut self) {
3539 self.control_handle.shutdown();
3540 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3542 }
3543}
3544
3545impl fidl::endpoints::Responder for RealmAddLocalChildResponder {
3546 type ControlHandle = RealmControlHandle;
3547
3548 fn control_handle(&self) -> &RealmControlHandle {
3549 &self.control_handle
3550 }
3551
3552 fn drop_without_shutdown(mut self) {
3553 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3555 std::mem::forget(self);
3557 }
3558}
3559
3560impl RealmAddLocalChildResponder {
3561 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3565 let _result = self.send_raw(result);
3566 if _result.is_err() {
3567 self.control_handle.shutdown();
3568 }
3569 self.drop_without_shutdown();
3570 _result
3571 }
3572
3573 pub fn send_no_shutdown_on_err(
3575 self,
3576 mut result: Result<(), RealmBuilderError>,
3577 ) -> Result<(), fidl::Error> {
3578 let _result = self.send_raw(result);
3579 self.drop_without_shutdown();
3580 _result
3581 }
3582
3583 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3584 self.control_handle.inner.send::<fidl::encoding::ResultType<
3585 fidl::encoding::EmptyStruct,
3586 RealmBuilderError,
3587 >>(
3588 result,
3589 self.tx_id,
3590 0x3249817bae10abbb,
3591 fidl::encoding::DynamicFlags::empty(),
3592 )
3593 }
3594}
3595
3596#[must_use = "FIDL methods require a response to be sent"]
3597#[derive(Debug)]
3598pub struct RealmAddChildRealmResponder {
3599 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3600 tx_id: u32,
3601}
3602
3603impl std::ops::Drop for RealmAddChildRealmResponder {
3607 fn drop(&mut self) {
3608 self.control_handle.shutdown();
3609 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3611 }
3612}
3613
3614impl fidl::endpoints::Responder for RealmAddChildRealmResponder {
3615 type ControlHandle = RealmControlHandle;
3616
3617 fn control_handle(&self) -> &RealmControlHandle {
3618 &self.control_handle
3619 }
3620
3621 fn drop_without_shutdown(mut self) {
3622 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3624 std::mem::forget(self);
3626 }
3627}
3628
3629impl RealmAddChildRealmResponder {
3630 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3634 let _result = self.send_raw(result);
3635 if _result.is_err() {
3636 self.control_handle.shutdown();
3637 }
3638 self.drop_without_shutdown();
3639 _result
3640 }
3641
3642 pub fn send_no_shutdown_on_err(
3644 self,
3645 mut result: Result<(), RealmBuilderError>,
3646 ) -> Result<(), fidl::Error> {
3647 let _result = self.send_raw(result);
3648 self.drop_without_shutdown();
3649 _result
3650 }
3651
3652 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3653 self.control_handle.inner.send::<fidl::encoding::ResultType<
3654 fidl::encoding::EmptyStruct,
3655 RealmBuilderError,
3656 >>(
3657 result,
3658 self.tx_id,
3659 0x3fdf98db373b9458,
3660 fidl::encoding::DynamicFlags::empty(),
3661 )
3662 }
3663}
3664
3665#[must_use = "FIDL methods require a response to be sent"]
3666#[derive(Debug)]
3667pub struct RealmAddChildRealmFromRelativeUrlResponder {
3668 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3669 tx_id: u32,
3670}
3671
3672impl std::ops::Drop for RealmAddChildRealmFromRelativeUrlResponder {
3676 fn drop(&mut self) {
3677 self.control_handle.shutdown();
3678 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3680 }
3681}
3682
3683impl fidl::endpoints::Responder for RealmAddChildRealmFromRelativeUrlResponder {
3684 type ControlHandle = RealmControlHandle;
3685
3686 fn control_handle(&self) -> &RealmControlHandle {
3687 &self.control_handle
3688 }
3689
3690 fn drop_without_shutdown(mut self) {
3691 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3693 std::mem::forget(self);
3695 }
3696}
3697
3698impl RealmAddChildRealmFromRelativeUrlResponder {
3699 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3703 let _result = self.send_raw(result);
3704 if _result.is_err() {
3705 self.control_handle.shutdown();
3706 }
3707 self.drop_without_shutdown();
3708 _result
3709 }
3710
3711 pub fn send_no_shutdown_on_err(
3713 self,
3714 mut result: Result<(), RealmBuilderError>,
3715 ) -> Result<(), fidl::Error> {
3716 let _result = self.send_raw(result);
3717 self.drop_without_shutdown();
3718 _result
3719 }
3720
3721 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3722 self.control_handle.inner.send::<fidl::encoding::ResultType<
3723 fidl::encoding::EmptyStruct,
3724 RealmBuilderError,
3725 >>(
3726 result,
3727 self.tx_id,
3728 0x44c34c8dcbe06abb,
3729 fidl::encoding::DynamicFlags::empty(),
3730 )
3731 }
3732}
3733
3734#[must_use = "FIDL methods require a response to be sent"]
3735#[derive(Debug)]
3736pub struct RealmAddChildRealmFromDeclResponder {
3737 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3738 tx_id: u32,
3739}
3740
3741impl std::ops::Drop for RealmAddChildRealmFromDeclResponder {
3745 fn drop(&mut self) {
3746 self.control_handle.shutdown();
3747 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3749 }
3750}
3751
3752impl fidl::endpoints::Responder for RealmAddChildRealmFromDeclResponder {
3753 type ControlHandle = RealmControlHandle;
3754
3755 fn control_handle(&self) -> &RealmControlHandle {
3756 &self.control_handle
3757 }
3758
3759 fn drop_without_shutdown(mut self) {
3760 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3762 std::mem::forget(self);
3764 }
3765}
3766
3767impl RealmAddChildRealmFromDeclResponder {
3768 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3772 let _result = self.send_raw(result);
3773 if _result.is_err() {
3774 self.control_handle.shutdown();
3775 }
3776 self.drop_without_shutdown();
3777 _result
3778 }
3779
3780 pub fn send_no_shutdown_on_err(
3782 self,
3783 mut result: Result<(), RealmBuilderError>,
3784 ) -> Result<(), fidl::Error> {
3785 let _result = self.send_raw(result);
3786 self.drop_without_shutdown();
3787 _result
3788 }
3789
3790 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3791 self.control_handle.inner.send::<fidl::encoding::ResultType<
3792 fidl::encoding::EmptyStruct,
3793 RealmBuilderError,
3794 >>(
3795 result,
3796 self.tx_id,
3797 0x142e5c326732862e,
3798 fidl::encoding::DynamicFlags::empty(),
3799 )
3800 }
3801}
3802
3803#[must_use = "FIDL methods require a response to be sent"]
3804#[derive(Debug)]
3805pub struct RealmGetComponentDeclResponder {
3806 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3807 tx_id: u32,
3808}
3809
3810impl std::ops::Drop for RealmGetComponentDeclResponder {
3814 fn drop(&mut self) {
3815 self.control_handle.shutdown();
3816 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3818 }
3819}
3820
3821impl fidl::endpoints::Responder for RealmGetComponentDeclResponder {
3822 type ControlHandle = RealmControlHandle;
3823
3824 fn control_handle(&self) -> &RealmControlHandle {
3825 &self.control_handle
3826 }
3827
3828 fn drop_without_shutdown(mut self) {
3829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3831 std::mem::forget(self);
3833 }
3834}
3835
3836impl RealmGetComponentDeclResponder {
3837 pub fn send(
3841 self,
3842 mut result: Result<&fidl_fuchsia_component_decl::Component, RealmBuilderError>,
3843 ) -> Result<(), fidl::Error> {
3844 let _result = self.send_raw(result);
3845 if _result.is_err() {
3846 self.control_handle.shutdown();
3847 }
3848 self.drop_without_shutdown();
3849 _result
3850 }
3851
3852 pub fn send_no_shutdown_on_err(
3854 self,
3855 mut result: Result<&fidl_fuchsia_component_decl::Component, RealmBuilderError>,
3856 ) -> Result<(), fidl::Error> {
3857 let _result = self.send_raw(result);
3858 self.drop_without_shutdown();
3859 _result
3860 }
3861
3862 fn send_raw(
3863 &self,
3864 mut result: Result<&fidl_fuchsia_component_decl::Component, RealmBuilderError>,
3865 ) -> Result<(), fidl::Error> {
3866 self.control_handle.inner.send::<fidl::encoding::ResultType<
3867 RealmGetComponentDeclResponse,
3868 RealmBuilderError,
3869 >>(
3870 result.map(|component_decl| (component_decl,)),
3871 self.tx_id,
3872 0x320832af6a4cbac6,
3873 fidl::encoding::DynamicFlags::empty(),
3874 )
3875 }
3876}
3877
3878#[must_use = "FIDL methods require a response to be sent"]
3879#[derive(Debug)]
3880pub struct RealmReplaceComponentDeclResponder {
3881 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3882 tx_id: u32,
3883}
3884
3885impl std::ops::Drop for RealmReplaceComponentDeclResponder {
3889 fn drop(&mut self) {
3890 self.control_handle.shutdown();
3891 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3893 }
3894}
3895
3896impl fidl::endpoints::Responder for RealmReplaceComponentDeclResponder {
3897 type ControlHandle = RealmControlHandle;
3898
3899 fn control_handle(&self) -> &RealmControlHandle {
3900 &self.control_handle
3901 }
3902
3903 fn drop_without_shutdown(mut self) {
3904 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3906 std::mem::forget(self);
3908 }
3909}
3910
3911impl RealmReplaceComponentDeclResponder {
3912 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3916 let _result = self.send_raw(result);
3917 if _result.is_err() {
3918 self.control_handle.shutdown();
3919 }
3920 self.drop_without_shutdown();
3921 _result
3922 }
3923
3924 pub fn send_no_shutdown_on_err(
3926 self,
3927 mut result: Result<(), RealmBuilderError>,
3928 ) -> Result<(), fidl::Error> {
3929 let _result = self.send_raw(result);
3930 self.drop_without_shutdown();
3931 _result
3932 }
3933
3934 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
3935 self.control_handle.inner.send::<fidl::encoding::ResultType<
3936 fidl::encoding::EmptyStruct,
3937 RealmBuilderError,
3938 >>(
3939 result,
3940 self.tx_id,
3941 0x59cecf31b314cd5f,
3942 fidl::encoding::DynamicFlags::empty(),
3943 )
3944 }
3945}
3946
3947#[must_use = "FIDL methods require a response to be sent"]
3948#[derive(Debug)]
3949pub struct RealmGetRealmDeclResponder {
3950 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
3951 tx_id: u32,
3952}
3953
3954impl std::ops::Drop for RealmGetRealmDeclResponder {
3958 fn drop(&mut self) {
3959 self.control_handle.shutdown();
3960 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3962 }
3963}
3964
3965impl fidl::endpoints::Responder for RealmGetRealmDeclResponder {
3966 type ControlHandle = RealmControlHandle;
3967
3968 fn control_handle(&self) -> &RealmControlHandle {
3969 &self.control_handle
3970 }
3971
3972 fn drop_without_shutdown(mut self) {
3973 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3975 std::mem::forget(self);
3977 }
3978}
3979
3980impl RealmGetRealmDeclResponder {
3981 pub fn send(
3985 self,
3986 mut result: Result<&fidl_fuchsia_component_decl::Component, RealmBuilderError>,
3987 ) -> Result<(), fidl::Error> {
3988 let _result = self.send_raw(result);
3989 if _result.is_err() {
3990 self.control_handle.shutdown();
3991 }
3992 self.drop_without_shutdown();
3993 _result
3994 }
3995
3996 pub fn send_no_shutdown_on_err(
3998 self,
3999 mut result: Result<&fidl_fuchsia_component_decl::Component, RealmBuilderError>,
4000 ) -> Result<(), fidl::Error> {
4001 let _result = self.send_raw(result);
4002 self.drop_without_shutdown();
4003 _result
4004 }
4005
4006 fn send_raw(
4007 &self,
4008 mut result: Result<&fidl_fuchsia_component_decl::Component, RealmBuilderError>,
4009 ) -> Result<(), fidl::Error> {
4010 self.control_handle.inner.send::<fidl::encoding::ResultType<
4011 RealmGetRealmDeclResponse,
4012 RealmBuilderError,
4013 >>(
4014 result.map(|component_decl| (component_decl,)),
4015 self.tx_id,
4016 0x46fa05b17bd64269,
4017 fidl::encoding::DynamicFlags::empty(),
4018 )
4019 }
4020}
4021
4022#[must_use = "FIDL methods require a response to be sent"]
4023#[derive(Debug)]
4024pub struct RealmReplaceRealmDeclResponder {
4025 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4026 tx_id: u32,
4027}
4028
4029impl std::ops::Drop for RealmReplaceRealmDeclResponder {
4033 fn drop(&mut self) {
4034 self.control_handle.shutdown();
4035 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4037 }
4038}
4039
4040impl fidl::endpoints::Responder for RealmReplaceRealmDeclResponder {
4041 type ControlHandle = RealmControlHandle;
4042
4043 fn control_handle(&self) -> &RealmControlHandle {
4044 &self.control_handle
4045 }
4046
4047 fn drop_without_shutdown(mut self) {
4048 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4050 std::mem::forget(self);
4052 }
4053}
4054
4055impl RealmReplaceRealmDeclResponder {
4056 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4060 let _result = self.send_raw(result);
4061 if _result.is_err() {
4062 self.control_handle.shutdown();
4063 }
4064 self.drop_without_shutdown();
4065 _result
4066 }
4067
4068 pub fn send_no_shutdown_on_err(
4070 self,
4071 mut result: Result<(), RealmBuilderError>,
4072 ) -> Result<(), fidl::Error> {
4073 let _result = self.send_raw(result);
4074 self.drop_without_shutdown();
4075 _result
4076 }
4077
4078 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4079 self.control_handle.inner.send::<fidl::encoding::ResultType<
4080 fidl::encoding::EmptyStruct,
4081 RealmBuilderError,
4082 >>(
4083 result,
4084 self.tx_id,
4085 0x48fcba4ac1338da9,
4086 fidl::encoding::DynamicFlags::empty(),
4087 )
4088 }
4089}
4090
4091#[must_use = "FIDL methods require a response to be sent"]
4092#[derive(Debug)]
4093pub struct RealmUseNestedComponentManagerResponder {
4094 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4095 tx_id: u32,
4096}
4097
4098impl std::ops::Drop for RealmUseNestedComponentManagerResponder {
4102 fn drop(&mut self) {
4103 self.control_handle.shutdown();
4104 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4106 }
4107}
4108
4109impl fidl::endpoints::Responder for RealmUseNestedComponentManagerResponder {
4110 type ControlHandle = RealmControlHandle;
4111
4112 fn control_handle(&self) -> &RealmControlHandle {
4113 &self.control_handle
4114 }
4115
4116 fn drop_without_shutdown(mut self) {
4117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4119 std::mem::forget(self);
4121 }
4122}
4123
4124impl RealmUseNestedComponentManagerResponder {
4125 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4129 let _result = self.send_raw(result);
4130 if _result.is_err() {
4131 self.control_handle.shutdown();
4132 }
4133 self.drop_without_shutdown();
4134 _result
4135 }
4136
4137 pub fn send_no_shutdown_on_err(
4139 self,
4140 mut result: Result<(), RealmBuilderError>,
4141 ) -> Result<(), fidl::Error> {
4142 let _result = self.send_raw(result);
4143 self.drop_without_shutdown();
4144 _result
4145 }
4146
4147 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4148 self.control_handle.inner.send::<fidl::encoding::ResultType<
4149 fidl::encoding::EmptyStruct,
4150 RealmBuilderError,
4151 >>(
4152 result,
4153 self.tx_id,
4154 0x64bd27482f3dcc,
4155 fidl::encoding::DynamicFlags::empty(),
4156 )
4157 }
4158}
4159
4160#[must_use = "FIDL methods require a response to be sent"]
4161#[derive(Debug)]
4162pub struct RealmAddRouteResponder {
4163 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4164 tx_id: u32,
4165}
4166
4167impl std::ops::Drop for RealmAddRouteResponder {
4171 fn drop(&mut self) {
4172 self.control_handle.shutdown();
4173 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4175 }
4176}
4177
4178impl fidl::endpoints::Responder for RealmAddRouteResponder {
4179 type ControlHandle = RealmControlHandle;
4180
4181 fn control_handle(&self) -> &RealmControlHandle {
4182 &self.control_handle
4183 }
4184
4185 fn drop_without_shutdown(mut self) {
4186 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4188 std::mem::forget(self);
4190 }
4191}
4192
4193impl RealmAddRouteResponder {
4194 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4198 let _result = self.send_raw(result);
4199 if _result.is_err() {
4200 self.control_handle.shutdown();
4201 }
4202 self.drop_without_shutdown();
4203 _result
4204 }
4205
4206 pub fn send_no_shutdown_on_err(
4208 self,
4209 mut result: Result<(), RealmBuilderError>,
4210 ) -> Result<(), fidl::Error> {
4211 let _result = self.send_raw(result);
4212 self.drop_without_shutdown();
4213 _result
4214 }
4215
4216 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4217 self.control_handle.inner.send::<fidl::encoding::ResultType<
4218 fidl::encoding::EmptyStruct,
4219 RealmBuilderError,
4220 >>(
4221 result,
4222 self.tx_id,
4223 0x9d523295be53a0a,
4224 fidl::encoding::DynamicFlags::empty(),
4225 )
4226 }
4227}
4228
4229#[must_use = "FIDL methods require a response to be sent"]
4230#[derive(Debug)]
4231pub struct RealmReadOnlyDirectoryResponder {
4232 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4233 tx_id: u32,
4234}
4235
4236impl std::ops::Drop for RealmReadOnlyDirectoryResponder {
4240 fn drop(&mut self) {
4241 self.control_handle.shutdown();
4242 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4244 }
4245}
4246
4247impl fidl::endpoints::Responder for RealmReadOnlyDirectoryResponder {
4248 type ControlHandle = RealmControlHandle;
4249
4250 fn control_handle(&self) -> &RealmControlHandle {
4251 &self.control_handle
4252 }
4253
4254 fn drop_without_shutdown(mut self) {
4255 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4257 std::mem::forget(self);
4259 }
4260}
4261
4262impl RealmReadOnlyDirectoryResponder {
4263 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4267 let _result = self.send_raw(result);
4268 if _result.is_err() {
4269 self.control_handle.shutdown();
4270 }
4271 self.drop_without_shutdown();
4272 _result
4273 }
4274
4275 pub fn send_no_shutdown_on_err(
4277 self,
4278 mut result: Result<(), RealmBuilderError>,
4279 ) -> Result<(), fidl::Error> {
4280 let _result = self.send_raw(result);
4281 self.drop_without_shutdown();
4282 _result
4283 }
4284
4285 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4286 self.control_handle.inner.send::<fidl::encoding::ResultType<
4287 fidl::encoding::EmptyStruct,
4288 RealmBuilderError,
4289 >>(
4290 result,
4291 self.tx_id,
4292 0x78a6d150a66e00dc,
4293 fidl::encoding::DynamicFlags::empty(),
4294 )
4295 }
4296}
4297
4298#[must_use = "FIDL methods require a response to be sent"]
4299#[derive(Debug)]
4300pub struct RealmInitMutableConfigFromPackageResponder {
4301 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4302 tx_id: u32,
4303}
4304
4305impl std::ops::Drop for RealmInitMutableConfigFromPackageResponder {
4309 fn drop(&mut self) {
4310 self.control_handle.shutdown();
4311 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4313 }
4314}
4315
4316impl fidl::endpoints::Responder for RealmInitMutableConfigFromPackageResponder {
4317 type ControlHandle = RealmControlHandle;
4318
4319 fn control_handle(&self) -> &RealmControlHandle {
4320 &self.control_handle
4321 }
4322
4323 fn drop_without_shutdown(mut self) {
4324 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4326 std::mem::forget(self);
4328 }
4329}
4330
4331impl RealmInitMutableConfigFromPackageResponder {
4332 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4336 let _result = self.send_raw(result);
4337 if _result.is_err() {
4338 self.control_handle.shutdown();
4339 }
4340 self.drop_without_shutdown();
4341 _result
4342 }
4343
4344 pub fn send_no_shutdown_on_err(
4346 self,
4347 mut result: Result<(), RealmBuilderError>,
4348 ) -> Result<(), fidl::Error> {
4349 let _result = self.send_raw(result);
4350 self.drop_without_shutdown();
4351 _result
4352 }
4353
4354 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4355 self.control_handle.inner.send::<fidl::encoding::ResultType<
4356 fidl::encoding::EmptyStruct,
4357 RealmBuilderError,
4358 >>(
4359 result,
4360 self.tx_id,
4361 0x36a30c9837c64216,
4362 fidl::encoding::DynamicFlags::empty(),
4363 )
4364 }
4365}
4366
4367#[must_use = "FIDL methods require a response to be sent"]
4368#[derive(Debug)]
4369pub struct RealmInitMutableConfigToEmptyResponder {
4370 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4371 tx_id: u32,
4372}
4373
4374impl std::ops::Drop for RealmInitMutableConfigToEmptyResponder {
4378 fn drop(&mut self) {
4379 self.control_handle.shutdown();
4380 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4382 }
4383}
4384
4385impl fidl::endpoints::Responder for RealmInitMutableConfigToEmptyResponder {
4386 type ControlHandle = RealmControlHandle;
4387
4388 fn control_handle(&self) -> &RealmControlHandle {
4389 &self.control_handle
4390 }
4391
4392 fn drop_without_shutdown(mut self) {
4393 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4395 std::mem::forget(self);
4397 }
4398}
4399
4400impl RealmInitMutableConfigToEmptyResponder {
4401 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4405 let _result = self.send_raw(result);
4406 if _result.is_err() {
4407 self.control_handle.shutdown();
4408 }
4409 self.drop_without_shutdown();
4410 _result
4411 }
4412
4413 pub fn send_no_shutdown_on_err(
4415 self,
4416 mut result: Result<(), RealmBuilderError>,
4417 ) -> Result<(), fidl::Error> {
4418 let _result = self.send_raw(result);
4419 self.drop_without_shutdown();
4420 _result
4421 }
4422
4423 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4424 self.control_handle.inner.send::<fidl::encoding::ResultType<
4425 fidl::encoding::EmptyStruct,
4426 RealmBuilderError,
4427 >>(
4428 result,
4429 self.tx_id,
4430 0x772cb99e2e0dccc5,
4431 fidl::encoding::DynamicFlags::empty(),
4432 )
4433 }
4434}
4435
4436#[must_use = "FIDL methods require a response to be sent"]
4437#[derive(Debug)]
4438pub struct RealmAddCapabilityResponder {
4439 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4440 tx_id: u32,
4441}
4442
4443impl std::ops::Drop for RealmAddCapabilityResponder {
4447 fn drop(&mut self) {
4448 self.control_handle.shutdown();
4449 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4451 }
4452}
4453
4454impl fidl::endpoints::Responder for RealmAddCapabilityResponder {
4455 type ControlHandle = RealmControlHandle;
4456
4457 fn control_handle(&self) -> &RealmControlHandle {
4458 &self.control_handle
4459 }
4460
4461 fn drop_without_shutdown(mut self) {
4462 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4464 std::mem::forget(self);
4466 }
4467}
4468
4469impl RealmAddCapabilityResponder {
4470 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4474 let _result = self.send_raw(result);
4475 if _result.is_err() {
4476 self.control_handle.shutdown();
4477 }
4478 self.drop_without_shutdown();
4479 _result
4480 }
4481
4482 pub fn send_no_shutdown_on_err(
4484 self,
4485 mut result: Result<(), RealmBuilderError>,
4486 ) -> Result<(), fidl::Error> {
4487 let _result = self.send_raw(result);
4488 self.drop_without_shutdown();
4489 _result
4490 }
4491
4492 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4493 self.control_handle.inner.send::<fidl::encoding::ResultType<
4494 fidl::encoding::EmptyStruct,
4495 RealmBuilderError,
4496 >>(
4497 result,
4498 self.tx_id,
4499 0x23a6499eb6080249,
4500 fidl::encoding::DynamicFlags::empty(),
4501 )
4502 }
4503}
4504
4505#[must_use = "FIDL methods require a response to be sent"]
4506#[derive(Debug)]
4507pub struct RealmAddCollectionResponder {
4508 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4509 tx_id: u32,
4510}
4511
4512impl std::ops::Drop for RealmAddCollectionResponder {
4516 fn drop(&mut self) {
4517 self.control_handle.shutdown();
4518 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4520 }
4521}
4522
4523impl fidl::endpoints::Responder for RealmAddCollectionResponder {
4524 type ControlHandle = RealmControlHandle;
4525
4526 fn control_handle(&self) -> &RealmControlHandle {
4527 &self.control_handle
4528 }
4529
4530 fn drop_without_shutdown(mut self) {
4531 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4533 std::mem::forget(self);
4535 }
4536}
4537
4538impl RealmAddCollectionResponder {
4539 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4543 let _result = self.send_raw(result);
4544 if _result.is_err() {
4545 self.control_handle.shutdown();
4546 }
4547 self.drop_without_shutdown();
4548 _result
4549 }
4550
4551 pub fn send_no_shutdown_on_err(
4553 self,
4554 mut result: Result<(), RealmBuilderError>,
4555 ) -> Result<(), fidl::Error> {
4556 let _result = self.send_raw(result);
4557 self.drop_without_shutdown();
4558 _result
4559 }
4560
4561 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4562 self.control_handle.inner.send::<fidl::encoding::ResultType<
4563 fidl::encoding::EmptyStruct,
4564 RealmBuilderError,
4565 >>(
4566 result,
4567 self.tx_id,
4568 0x56b75210a03a99b5,
4569 fidl::encoding::DynamicFlags::empty(),
4570 )
4571 }
4572}
4573
4574#[must_use = "FIDL methods require a response to be sent"]
4575#[derive(Debug)]
4576pub struct RealmAddEnvironmentResponder {
4577 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4578 tx_id: u32,
4579}
4580
4581impl std::ops::Drop for RealmAddEnvironmentResponder {
4585 fn drop(&mut self) {
4586 self.control_handle.shutdown();
4587 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4589 }
4590}
4591
4592impl fidl::endpoints::Responder for RealmAddEnvironmentResponder {
4593 type ControlHandle = RealmControlHandle;
4594
4595 fn control_handle(&self) -> &RealmControlHandle {
4596 &self.control_handle
4597 }
4598
4599 fn drop_without_shutdown(mut self) {
4600 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4602 std::mem::forget(self);
4604 }
4605}
4606
4607impl RealmAddEnvironmentResponder {
4608 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4612 let _result = self.send_raw(result);
4613 if _result.is_err() {
4614 self.control_handle.shutdown();
4615 }
4616 self.drop_without_shutdown();
4617 _result
4618 }
4619
4620 pub fn send_no_shutdown_on_err(
4622 self,
4623 mut result: Result<(), RealmBuilderError>,
4624 ) -> Result<(), fidl::Error> {
4625 let _result = self.send_raw(result);
4626 self.drop_without_shutdown();
4627 _result
4628 }
4629
4630 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4631 self.control_handle.inner.send::<fidl::encoding::ResultType<
4632 fidl::encoding::EmptyStruct,
4633 RealmBuilderError,
4634 >>(
4635 result,
4636 self.tx_id,
4637 0x1cd7caefa2cce0e9,
4638 fidl::encoding::DynamicFlags::empty(),
4639 )
4640 }
4641}
4642
4643#[must_use = "FIDL methods require a response to be sent"]
4644#[derive(Debug)]
4645pub struct RealmSetConfigValueResponder {
4646 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
4647 tx_id: u32,
4648}
4649
4650impl std::ops::Drop for RealmSetConfigValueResponder {
4654 fn drop(&mut self) {
4655 self.control_handle.shutdown();
4656 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4658 }
4659}
4660
4661impl fidl::endpoints::Responder for RealmSetConfigValueResponder {
4662 type ControlHandle = RealmControlHandle;
4663
4664 fn control_handle(&self) -> &RealmControlHandle {
4665 &self.control_handle
4666 }
4667
4668 fn drop_without_shutdown(mut self) {
4669 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4671 std::mem::forget(self);
4673 }
4674}
4675
4676impl RealmSetConfigValueResponder {
4677 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4681 let _result = self.send_raw(result);
4682 if _result.is_err() {
4683 self.control_handle.shutdown();
4684 }
4685 self.drop_without_shutdown();
4686 _result
4687 }
4688
4689 pub fn send_no_shutdown_on_err(
4691 self,
4692 mut result: Result<(), RealmBuilderError>,
4693 ) -> Result<(), fidl::Error> {
4694 let _result = self.send_raw(result);
4695 self.drop_without_shutdown();
4696 _result
4697 }
4698
4699 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
4700 self.control_handle.inner.send::<fidl::encoding::ResultType<
4701 fidl::encoding::EmptyStruct,
4702 RealmBuilderError,
4703 >>(
4704 result,
4705 self.tx_id,
4706 0x886450d291217f2,
4707 fidl::encoding::DynamicFlags::empty(),
4708 )
4709 }
4710}
4711
4712#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4713pub struct RealmBuilderFactoryMarker;
4714
4715impl fidl::endpoints::ProtocolMarker for RealmBuilderFactoryMarker {
4716 type Proxy = RealmBuilderFactoryProxy;
4717 type RequestStream = RealmBuilderFactoryRequestStream;
4718 #[cfg(target_os = "fuchsia")]
4719 type SynchronousProxy = RealmBuilderFactorySynchronousProxy;
4720
4721 const DEBUG_NAME: &'static str = "fuchsia.component.test.RealmBuilderFactory";
4722}
4723impl fidl::endpoints::DiscoverableProtocolMarker for RealmBuilderFactoryMarker {}
4724pub type RealmBuilderFactoryCreateResult = Result<(), RealmBuilderError>;
4725pub type RealmBuilderFactoryCreateFromRelativeUrlResult = Result<(), RealmBuilderError>;
4726
4727pub trait RealmBuilderFactoryProxyInterface: Send + Sync {
4728 type CreateResponseFut: std::future::Future<Output = Result<RealmBuilderFactoryCreateResult, fidl::Error>>
4729 + Send;
4730 fn r#create(
4731 &self,
4732 pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4733 realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4734 builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4735 ) -> Self::CreateResponseFut;
4736 type CreateFromRelativeUrlResponseFut: std::future::Future<
4737 Output = Result<RealmBuilderFactoryCreateFromRelativeUrlResult, fidl::Error>,
4738 > + Send;
4739 fn r#create_from_relative_url(
4740 &self,
4741 pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4742 relative_url: &str,
4743 realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4744 builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4745 ) -> Self::CreateFromRelativeUrlResponseFut;
4746}
4747#[derive(Debug)]
4748#[cfg(target_os = "fuchsia")]
4749pub struct RealmBuilderFactorySynchronousProxy {
4750 client: fidl::client::sync::Client,
4751}
4752
4753#[cfg(target_os = "fuchsia")]
4754impl fidl::endpoints::SynchronousProxy for RealmBuilderFactorySynchronousProxy {
4755 type Proxy = RealmBuilderFactoryProxy;
4756 type Protocol = RealmBuilderFactoryMarker;
4757
4758 fn from_channel(inner: fidl::Channel) -> Self {
4759 Self::new(inner)
4760 }
4761
4762 fn into_channel(self) -> fidl::Channel {
4763 self.client.into_channel()
4764 }
4765
4766 fn as_channel(&self) -> &fidl::Channel {
4767 self.client.as_channel()
4768 }
4769}
4770
4771#[cfg(target_os = "fuchsia")]
4772impl RealmBuilderFactorySynchronousProxy {
4773 pub fn new(channel: fidl::Channel) -> Self {
4774 let protocol_name =
4775 <RealmBuilderFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4776 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4777 }
4778
4779 pub fn into_channel(self) -> fidl::Channel {
4780 self.client.into_channel()
4781 }
4782
4783 pub fn wait_for_event(
4786 &self,
4787 deadline: zx::MonotonicInstant,
4788 ) -> Result<RealmBuilderFactoryEvent, fidl::Error> {
4789 RealmBuilderFactoryEvent::decode(self.client.wait_for_event(deadline)?)
4790 }
4791
4792 pub fn r#create(
4802 &self,
4803 mut pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4804 mut realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4805 mut builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4806 ___deadline: zx::MonotonicInstant,
4807 ) -> Result<RealmBuilderFactoryCreateResult, fidl::Error> {
4808 let _response =
4809 self.client.send_query::<RealmBuilderFactoryCreateRequest, fidl::encoding::ResultType<
4810 fidl::encoding::EmptyStruct,
4811 RealmBuilderError,
4812 >>(
4813 (pkg_dir_handle, realm_server_end, builder_server_end),
4814 0x73528b1135cb01be,
4815 fidl::encoding::DynamicFlags::empty(),
4816 ___deadline,
4817 )?;
4818 Ok(_response.map(|x| x))
4819 }
4820
4821 pub fn r#create_from_relative_url(
4827 &self,
4828 mut pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4829 mut relative_url: &str,
4830 mut realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4831 mut builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4832 ___deadline: zx::MonotonicInstant,
4833 ) -> Result<RealmBuilderFactoryCreateFromRelativeUrlResult, fidl::Error> {
4834 let _response = self.client.send_query::<
4835 RealmBuilderFactoryCreateFromRelativeUrlRequest,
4836 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
4837 >(
4838 (pkg_dir_handle, relative_url, realm_server_end, builder_server_end,),
4839 0x1cafd9042c54a86b,
4840 fidl::encoding::DynamicFlags::empty(),
4841 ___deadline,
4842 )?;
4843 Ok(_response.map(|x| x))
4844 }
4845}
4846
4847#[cfg(target_os = "fuchsia")]
4848impl From<RealmBuilderFactorySynchronousProxy> for zx::Handle {
4849 fn from(value: RealmBuilderFactorySynchronousProxy) -> Self {
4850 value.into_channel().into()
4851 }
4852}
4853
4854#[cfg(target_os = "fuchsia")]
4855impl From<fidl::Channel> for RealmBuilderFactorySynchronousProxy {
4856 fn from(value: fidl::Channel) -> Self {
4857 Self::new(value)
4858 }
4859}
4860
4861#[derive(Debug, Clone)]
4862pub struct RealmBuilderFactoryProxy {
4863 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4864}
4865
4866impl fidl::endpoints::Proxy for RealmBuilderFactoryProxy {
4867 type Protocol = RealmBuilderFactoryMarker;
4868
4869 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4870 Self::new(inner)
4871 }
4872
4873 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4874 self.client.into_channel().map_err(|client| Self { client })
4875 }
4876
4877 fn as_channel(&self) -> &::fidl::AsyncChannel {
4878 self.client.as_channel()
4879 }
4880}
4881
4882impl RealmBuilderFactoryProxy {
4883 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4885 let protocol_name =
4886 <RealmBuilderFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4887 Self { client: fidl::client::Client::new(channel, protocol_name) }
4888 }
4889
4890 pub fn take_event_stream(&self) -> RealmBuilderFactoryEventStream {
4896 RealmBuilderFactoryEventStream { event_receiver: self.client.take_event_receiver() }
4897 }
4898
4899 pub fn r#create(
4909 &self,
4910 mut pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4911 mut realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4912 mut builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4913 ) -> fidl::client::QueryResponseFut<
4914 RealmBuilderFactoryCreateResult,
4915 fidl::encoding::DefaultFuchsiaResourceDialect,
4916 > {
4917 RealmBuilderFactoryProxyInterface::r#create(
4918 self,
4919 pkg_dir_handle,
4920 realm_server_end,
4921 builder_server_end,
4922 )
4923 }
4924
4925 pub fn r#create_from_relative_url(
4931 &self,
4932 mut pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4933 mut relative_url: &str,
4934 mut realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4935 mut builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4936 ) -> fidl::client::QueryResponseFut<
4937 RealmBuilderFactoryCreateFromRelativeUrlResult,
4938 fidl::encoding::DefaultFuchsiaResourceDialect,
4939 > {
4940 RealmBuilderFactoryProxyInterface::r#create_from_relative_url(
4941 self,
4942 pkg_dir_handle,
4943 relative_url,
4944 realm_server_end,
4945 builder_server_end,
4946 )
4947 }
4948}
4949
4950impl RealmBuilderFactoryProxyInterface for RealmBuilderFactoryProxy {
4951 type CreateResponseFut = fidl::client::QueryResponseFut<
4952 RealmBuilderFactoryCreateResult,
4953 fidl::encoding::DefaultFuchsiaResourceDialect,
4954 >;
4955 fn r#create(
4956 &self,
4957 mut pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4958 mut realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4959 mut builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4960 ) -> Self::CreateResponseFut {
4961 fn _decode(
4962 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4963 ) -> Result<RealmBuilderFactoryCreateResult, fidl::Error> {
4964 let _response = fidl::client::decode_transaction_body::<
4965 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
4966 fidl::encoding::DefaultFuchsiaResourceDialect,
4967 0x73528b1135cb01be,
4968 >(_buf?)?;
4969 Ok(_response.map(|x| x))
4970 }
4971 self.client.send_query_and_decode::<
4972 RealmBuilderFactoryCreateRequest,
4973 RealmBuilderFactoryCreateResult,
4974 >(
4975 (pkg_dir_handle, realm_server_end, builder_server_end,),
4976 0x73528b1135cb01be,
4977 fidl::encoding::DynamicFlags::empty(),
4978 _decode,
4979 )
4980 }
4981
4982 type CreateFromRelativeUrlResponseFut = fidl::client::QueryResponseFut<
4983 RealmBuilderFactoryCreateFromRelativeUrlResult,
4984 fidl::encoding::DefaultFuchsiaResourceDialect,
4985 >;
4986 fn r#create_from_relative_url(
4987 &self,
4988 mut pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
4989 mut relative_url: &str,
4990 mut realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
4991 mut builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
4992 ) -> Self::CreateFromRelativeUrlResponseFut {
4993 fn _decode(
4994 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4995 ) -> Result<RealmBuilderFactoryCreateFromRelativeUrlResult, fidl::Error> {
4996 let _response = fidl::client::decode_transaction_body::<
4997 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RealmBuilderError>,
4998 fidl::encoding::DefaultFuchsiaResourceDialect,
4999 0x1cafd9042c54a86b,
5000 >(_buf?)?;
5001 Ok(_response.map(|x| x))
5002 }
5003 self.client.send_query_and_decode::<
5004 RealmBuilderFactoryCreateFromRelativeUrlRequest,
5005 RealmBuilderFactoryCreateFromRelativeUrlResult,
5006 >(
5007 (pkg_dir_handle, relative_url, realm_server_end, builder_server_end,),
5008 0x1cafd9042c54a86b,
5009 fidl::encoding::DynamicFlags::empty(),
5010 _decode,
5011 )
5012 }
5013}
5014
5015pub struct RealmBuilderFactoryEventStream {
5016 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5017}
5018
5019impl std::marker::Unpin for RealmBuilderFactoryEventStream {}
5020
5021impl futures::stream::FusedStream for RealmBuilderFactoryEventStream {
5022 fn is_terminated(&self) -> bool {
5023 self.event_receiver.is_terminated()
5024 }
5025}
5026
5027impl futures::Stream for RealmBuilderFactoryEventStream {
5028 type Item = Result<RealmBuilderFactoryEvent, fidl::Error>;
5029
5030 fn poll_next(
5031 mut self: std::pin::Pin<&mut Self>,
5032 cx: &mut std::task::Context<'_>,
5033 ) -> std::task::Poll<Option<Self::Item>> {
5034 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5035 &mut self.event_receiver,
5036 cx
5037 )?) {
5038 Some(buf) => std::task::Poll::Ready(Some(RealmBuilderFactoryEvent::decode(buf))),
5039 None => std::task::Poll::Ready(None),
5040 }
5041 }
5042}
5043
5044#[derive(Debug)]
5045pub enum RealmBuilderFactoryEvent {}
5046
5047impl RealmBuilderFactoryEvent {
5048 fn decode(
5050 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5051 ) -> Result<RealmBuilderFactoryEvent, fidl::Error> {
5052 let (bytes, _handles) = buf.split_mut();
5053 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5054 debug_assert_eq!(tx_header.tx_id, 0);
5055 match tx_header.ordinal {
5056 _ => Err(fidl::Error::UnknownOrdinal {
5057 ordinal: tx_header.ordinal,
5058 protocol_name:
5059 <RealmBuilderFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5060 }),
5061 }
5062 }
5063}
5064
5065pub struct RealmBuilderFactoryRequestStream {
5067 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5068 is_terminated: bool,
5069}
5070
5071impl std::marker::Unpin for RealmBuilderFactoryRequestStream {}
5072
5073impl futures::stream::FusedStream for RealmBuilderFactoryRequestStream {
5074 fn is_terminated(&self) -> bool {
5075 self.is_terminated
5076 }
5077}
5078
5079impl fidl::endpoints::RequestStream for RealmBuilderFactoryRequestStream {
5080 type Protocol = RealmBuilderFactoryMarker;
5081 type ControlHandle = RealmBuilderFactoryControlHandle;
5082
5083 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5084 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5085 }
5086
5087 fn control_handle(&self) -> Self::ControlHandle {
5088 RealmBuilderFactoryControlHandle { inner: self.inner.clone() }
5089 }
5090
5091 fn into_inner(
5092 self,
5093 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5094 {
5095 (self.inner, self.is_terminated)
5096 }
5097
5098 fn from_inner(
5099 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5100 is_terminated: bool,
5101 ) -> Self {
5102 Self { inner, is_terminated }
5103 }
5104}
5105
5106impl futures::Stream for RealmBuilderFactoryRequestStream {
5107 type Item = Result<RealmBuilderFactoryRequest, fidl::Error>;
5108
5109 fn poll_next(
5110 mut self: std::pin::Pin<&mut Self>,
5111 cx: &mut std::task::Context<'_>,
5112 ) -> std::task::Poll<Option<Self::Item>> {
5113 let this = &mut *self;
5114 if this.inner.check_shutdown(cx) {
5115 this.is_terminated = true;
5116 return std::task::Poll::Ready(None);
5117 }
5118 if this.is_terminated {
5119 panic!("polled RealmBuilderFactoryRequestStream after completion");
5120 }
5121 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5122 |bytes, handles| {
5123 match this.inner.channel().read_etc(cx, bytes, handles) {
5124 std::task::Poll::Ready(Ok(())) => {}
5125 std::task::Poll::Pending => return std::task::Poll::Pending,
5126 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5127 this.is_terminated = true;
5128 return std::task::Poll::Ready(None);
5129 }
5130 std::task::Poll::Ready(Err(e)) => {
5131 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5132 e.into(),
5133 ))))
5134 }
5135 }
5136
5137 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5139
5140 std::task::Poll::Ready(Some(match header.ordinal {
5141 0x73528b1135cb01be => {
5142 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5143 let mut req = fidl::new_empty!(RealmBuilderFactoryCreateRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
5144 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmBuilderFactoryCreateRequest>(&header, _body_bytes, handles, &mut req)?;
5145 let control_handle = RealmBuilderFactoryControlHandle {
5146 inner: this.inner.clone(),
5147 };
5148 Ok(RealmBuilderFactoryRequest::Create {pkg_dir_handle: req.pkg_dir_handle,
5149realm_server_end: req.realm_server_end,
5150builder_server_end: req.builder_server_end,
5151
5152 responder: RealmBuilderFactoryCreateResponder {
5153 control_handle: std::mem::ManuallyDrop::new(control_handle),
5154 tx_id: header.tx_id,
5155 },
5156 })
5157 }
5158 0x1cafd9042c54a86b => {
5159 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5160 let mut req = fidl::new_empty!(RealmBuilderFactoryCreateFromRelativeUrlRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
5161 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmBuilderFactoryCreateFromRelativeUrlRequest>(&header, _body_bytes, handles, &mut req)?;
5162 let control_handle = RealmBuilderFactoryControlHandle {
5163 inner: this.inner.clone(),
5164 };
5165 Ok(RealmBuilderFactoryRequest::CreateFromRelativeUrl {pkg_dir_handle: req.pkg_dir_handle,
5166relative_url: req.relative_url,
5167realm_server_end: req.realm_server_end,
5168builder_server_end: req.builder_server_end,
5169
5170 responder: RealmBuilderFactoryCreateFromRelativeUrlResponder {
5171 control_handle: std::mem::ManuallyDrop::new(control_handle),
5172 tx_id: header.tx_id,
5173 },
5174 })
5175 }
5176 _ => Err(fidl::Error::UnknownOrdinal {
5177 ordinal: header.ordinal,
5178 protocol_name: <RealmBuilderFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5179 }),
5180 }))
5181 },
5182 )
5183 }
5184}
5185
5186#[derive(Debug)]
5189pub enum RealmBuilderFactoryRequest {
5190 Create {
5200 pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
5201 realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
5202 builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
5203 responder: RealmBuilderFactoryCreateResponder,
5204 },
5205 CreateFromRelativeUrl {
5211 pkg_dir_handle: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
5212 relative_url: String,
5213 realm_server_end: fidl::endpoints::ServerEnd<RealmMarker>,
5214 builder_server_end: fidl::endpoints::ServerEnd<BuilderMarker>,
5215 responder: RealmBuilderFactoryCreateFromRelativeUrlResponder,
5216 },
5217}
5218
5219impl RealmBuilderFactoryRequest {
5220 #[allow(irrefutable_let_patterns)]
5221 pub fn into_create(
5222 self,
5223 ) -> Option<(
5224 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
5225 fidl::endpoints::ServerEnd<RealmMarker>,
5226 fidl::endpoints::ServerEnd<BuilderMarker>,
5227 RealmBuilderFactoryCreateResponder,
5228 )> {
5229 if let RealmBuilderFactoryRequest::Create {
5230 pkg_dir_handle,
5231 realm_server_end,
5232 builder_server_end,
5233 responder,
5234 } = self
5235 {
5236 Some((pkg_dir_handle, realm_server_end, builder_server_end, responder))
5237 } else {
5238 None
5239 }
5240 }
5241
5242 #[allow(irrefutable_let_patterns)]
5243 pub fn into_create_from_relative_url(
5244 self,
5245 ) -> Option<(
5246 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
5247 String,
5248 fidl::endpoints::ServerEnd<RealmMarker>,
5249 fidl::endpoints::ServerEnd<BuilderMarker>,
5250 RealmBuilderFactoryCreateFromRelativeUrlResponder,
5251 )> {
5252 if let RealmBuilderFactoryRequest::CreateFromRelativeUrl {
5253 pkg_dir_handle,
5254 relative_url,
5255 realm_server_end,
5256 builder_server_end,
5257 responder,
5258 } = self
5259 {
5260 Some((pkg_dir_handle, relative_url, realm_server_end, builder_server_end, responder))
5261 } else {
5262 None
5263 }
5264 }
5265
5266 pub fn method_name(&self) -> &'static str {
5268 match *self {
5269 RealmBuilderFactoryRequest::Create { .. } => "create",
5270 RealmBuilderFactoryRequest::CreateFromRelativeUrl { .. } => "create_from_relative_url",
5271 }
5272 }
5273}
5274
5275#[derive(Debug, Clone)]
5276pub struct RealmBuilderFactoryControlHandle {
5277 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5278}
5279
5280impl fidl::endpoints::ControlHandle for RealmBuilderFactoryControlHandle {
5281 fn shutdown(&self) {
5282 self.inner.shutdown()
5283 }
5284 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5285 self.inner.shutdown_with_epitaph(status)
5286 }
5287
5288 fn is_closed(&self) -> bool {
5289 self.inner.channel().is_closed()
5290 }
5291 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5292 self.inner.channel().on_closed()
5293 }
5294
5295 #[cfg(target_os = "fuchsia")]
5296 fn signal_peer(
5297 &self,
5298 clear_mask: zx::Signals,
5299 set_mask: zx::Signals,
5300 ) -> Result<(), zx_status::Status> {
5301 use fidl::Peered;
5302 self.inner.channel().signal_peer(clear_mask, set_mask)
5303 }
5304}
5305
5306impl RealmBuilderFactoryControlHandle {}
5307
5308#[must_use = "FIDL methods require a response to be sent"]
5309#[derive(Debug)]
5310pub struct RealmBuilderFactoryCreateResponder {
5311 control_handle: std::mem::ManuallyDrop<RealmBuilderFactoryControlHandle>,
5312 tx_id: u32,
5313}
5314
5315impl std::ops::Drop for RealmBuilderFactoryCreateResponder {
5319 fn drop(&mut self) {
5320 self.control_handle.shutdown();
5321 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5323 }
5324}
5325
5326impl fidl::endpoints::Responder for RealmBuilderFactoryCreateResponder {
5327 type ControlHandle = RealmBuilderFactoryControlHandle;
5328
5329 fn control_handle(&self) -> &RealmBuilderFactoryControlHandle {
5330 &self.control_handle
5331 }
5332
5333 fn drop_without_shutdown(mut self) {
5334 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5336 std::mem::forget(self);
5338 }
5339}
5340
5341impl RealmBuilderFactoryCreateResponder {
5342 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
5346 let _result = self.send_raw(result);
5347 if _result.is_err() {
5348 self.control_handle.shutdown();
5349 }
5350 self.drop_without_shutdown();
5351 _result
5352 }
5353
5354 pub fn send_no_shutdown_on_err(
5356 self,
5357 mut result: Result<(), RealmBuilderError>,
5358 ) -> Result<(), fidl::Error> {
5359 let _result = self.send_raw(result);
5360 self.drop_without_shutdown();
5361 _result
5362 }
5363
5364 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
5365 self.control_handle.inner.send::<fidl::encoding::ResultType<
5366 fidl::encoding::EmptyStruct,
5367 RealmBuilderError,
5368 >>(
5369 result,
5370 self.tx_id,
5371 0x73528b1135cb01be,
5372 fidl::encoding::DynamicFlags::empty(),
5373 )
5374 }
5375}
5376
5377#[must_use = "FIDL methods require a response to be sent"]
5378#[derive(Debug)]
5379pub struct RealmBuilderFactoryCreateFromRelativeUrlResponder {
5380 control_handle: std::mem::ManuallyDrop<RealmBuilderFactoryControlHandle>,
5381 tx_id: u32,
5382}
5383
5384impl std::ops::Drop for RealmBuilderFactoryCreateFromRelativeUrlResponder {
5388 fn drop(&mut self) {
5389 self.control_handle.shutdown();
5390 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5392 }
5393}
5394
5395impl fidl::endpoints::Responder for RealmBuilderFactoryCreateFromRelativeUrlResponder {
5396 type ControlHandle = RealmBuilderFactoryControlHandle;
5397
5398 fn control_handle(&self) -> &RealmBuilderFactoryControlHandle {
5399 &self.control_handle
5400 }
5401
5402 fn drop_without_shutdown(mut self) {
5403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5405 std::mem::forget(self);
5407 }
5408}
5409
5410impl RealmBuilderFactoryCreateFromRelativeUrlResponder {
5411 pub fn send(self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
5415 let _result = self.send_raw(result);
5416 if _result.is_err() {
5417 self.control_handle.shutdown();
5418 }
5419 self.drop_without_shutdown();
5420 _result
5421 }
5422
5423 pub fn send_no_shutdown_on_err(
5425 self,
5426 mut result: Result<(), RealmBuilderError>,
5427 ) -> Result<(), fidl::Error> {
5428 let _result = self.send_raw(result);
5429 self.drop_without_shutdown();
5430 _result
5431 }
5432
5433 fn send_raw(&self, mut result: Result<(), RealmBuilderError>) -> Result<(), fidl::Error> {
5434 self.control_handle.inner.send::<fidl::encoding::ResultType<
5435 fidl::encoding::EmptyStruct,
5436 RealmBuilderError,
5437 >>(
5438 result,
5439 self.tx_id,
5440 0x1cafd9042c54a86b,
5441 fidl::encoding::DynamicFlags::empty(),
5442 )
5443 }
5444}
5445
5446mod internal {
5447 use super::*;
5448
5449 impl fidl::encoding::ResourceTypeMarker for BuilderBuildRequest {
5450 type Borrowed<'a> = &'a mut Self;
5451 fn take_or_borrow<'a>(
5452 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5453 ) -> Self::Borrowed<'a> {
5454 value
5455 }
5456 }
5457
5458 unsafe impl fidl::encoding::TypeMarker for BuilderBuildRequest {
5459 type Owned = Self;
5460
5461 #[inline(always)]
5462 fn inline_align(_context: fidl::encoding::Context) -> usize {
5463 4
5464 }
5465
5466 #[inline(always)]
5467 fn inline_size(_context: fidl::encoding::Context) -> usize {
5468 4
5469 }
5470 }
5471
5472 unsafe impl
5473 fidl::encoding::Encode<BuilderBuildRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5474 for &mut BuilderBuildRequest
5475 {
5476 #[inline]
5477 unsafe fn encode(
5478 self,
5479 encoder: &mut fidl::encoding::Encoder<
5480 '_,
5481 fidl::encoding::DefaultFuchsiaResourceDialect,
5482 >,
5483 offset: usize,
5484 _depth: fidl::encoding::Depth,
5485 ) -> fidl::Result<()> {
5486 encoder.debug_check_bounds::<BuilderBuildRequest>(offset);
5487 fidl::encoding::Encode::<
5489 BuilderBuildRequest,
5490 fidl::encoding::DefaultFuchsiaResourceDialect,
5491 >::encode(
5492 (<fidl::encoding::Endpoint<
5493 fidl::endpoints::ClientEnd<
5494 fidl_fuchsia_component_runner::ComponentRunnerMarker,
5495 >,
5496 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5497 &mut self.runner
5498 ),),
5499 encoder,
5500 offset,
5501 _depth,
5502 )
5503 }
5504 }
5505 unsafe impl<
5506 T0: fidl::encoding::Encode<
5507 fidl::encoding::Endpoint<
5508 fidl::endpoints::ClientEnd<
5509 fidl_fuchsia_component_runner::ComponentRunnerMarker,
5510 >,
5511 >,
5512 fidl::encoding::DefaultFuchsiaResourceDialect,
5513 >,
5514 >
5515 fidl::encoding::Encode<BuilderBuildRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5516 for (T0,)
5517 {
5518 #[inline]
5519 unsafe fn encode(
5520 self,
5521 encoder: &mut fidl::encoding::Encoder<
5522 '_,
5523 fidl::encoding::DefaultFuchsiaResourceDialect,
5524 >,
5525 offset: usize,
5526 depth: fidl::encoding::Depth,
5527 ) -> fidl::Result<()> {
5528 encoder.debug_check_bounds::<BuilderBuildRequest>(offset);
5529 self.0.encode(encoder, offset + 0, depth)?;
5533 Ok(())
5534 }
5535 }
5536
5537 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5538 for BuilderBuildRequest
5539 {
5540 #[inline(always)]
5541 fn new_empty() -> Self {
5542 Self {
5543 runner: fidl::new_empty!(
5544 fidl::encoding::Endpoint<
5545 fidl::endpoints::ClientEnd<
5546 fidl_fuchsia_component_runner::ComponentRunnerMarker,
5547 >,
5548 >,
5549 fidl::encoding::DefaultFuchsiaResourceDialect
5550 ),
5551 }
5552 }
5553
5554 #[inline]
5555 unsafe fn decode(
5556 &mut self,
5557 decoder: &mut fidl::encoding::Decoder<
5558 '_,
5559 fidl::encoding::DefaultFuchsiaResourceDialect,
5560 >,
5561 offset: usize,
5562 _depth: fidl::encoding::Depth,
5563 ) -> fidl::Result<()> {
5564 decoder.debug_check_bounds::<Self>(offset);
5565 fidl::decode!(
5567 fidl::encoding::Endpoint<
5568 fidl::endpoints::ClientEnd<
5569 fidl_fuchsia_component_runner::ComponentRunnerMarker,
5570 >,
5571 >,
5572 fidl::encoding::DefaultFuchsiaResourceDialect,
5573 &mut self.runner,
5574 decoder,
5575 offset + 0,
5576 _depth
5577 )?;
5578 Ok(())
5579 }
5580 }
5581
5582 impl fidl::encoding::ResourceTypeMarker for DirectoryContents {
5583 type Borrowed<'a> = &'a mut Self;
5584 fn take_or_borrow<'a>(
5585 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5586 ) -> Self::Borrowed<'a> {
5587 value
5588 }
5589 }
5590
5591 unsafe impl fidl::encoding::TypeMarker for DirectoryContents {
5592 type Owned = Self;
5593
5594 #[inline(always)]
5595 fn inline_align(_context: fidl::encoding::Context) -> usize {
5596 8
5597 }
5598
5599 #[inline(always)]
5600 fn inline_size(_context: fidl::encoding::Context) -> usize {
5601 16
5602 }
5603 }
5604
5605 unsafe impl
5606 fidl::encoding::Encode<DirectoryContents, fidl::encoding::DefaultFuchsiaResourceDialect>
5607 for &mut DirectoryContents
5608 {
5609 #[inline]
5610 unsafe fn encode(
5611 self,
5612 encoder: &mut fidl::encoding::Encoder<
5613 '_,
5614 fidl::encoding::DefaultFuchsiaResourceDialect,
5615 >,
5616 offset: usize,
5617 _depth: fidl::encoding::Depth,
5618 ) -> fidl::Result<()> {
5619 encoder.debug_check_bounds::<DirectoryContents>(offset);
5620 fidl::encoding::Encode::<DirectoryContents, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5622 (
5623 <fidl::encoding::Vector<DirectoryEntry, 1024> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.entries),
5624 ),
5625 encoder, offset, _depth
5626 )
5627 }
5628 }
5629 unsafe impl<
5630 T0: fidl::encoding::Encode<
5631 fidl::encoding::Vector<DirectoryEntry, 1024>,
5632 fidl::encoding::DefaultFuchsiaResourceDialect,
5633 >,
5634 >
5635 fidl::encoding::Encode<DirectoryContents, fidl::encoding::DefaultFuchsiaResourceDialect>
5636 for (T0,)
5637 {
5638 #[inline]
5639 unsafe fn encode(
5640 self,
5641 encoder: &mut fidl::encoding::Encoder<
5642 '_,
5643 fidl::encoding::DefaultFuchsiaResourceDialect,
5644 >,
5645 offset: usize,
5646 depth: fidl::encoding::Depth,
5647 ) -> fidl::Result<()> {
5648 encoder.debug_check_bounds::<DirectoryContents>(offset);
5649 self.0.encode(encoder, offset + 0, depth)?;
5653 Ok(())
5654 }
5655 }
5656
5657 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5658 for DirectoryContents
5659 {
5660 #[inline(always)]
5661 fn new_empty() -> Self {
5662 Self {
5663 entries: fidl::new_empty!(fidl::encoding::Vector<DirectoryEntry, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect),
5664 }
5665 }
5666
5667 #[inline]
5668 unsafe fn decode(
5669 &mut self,
5670 decoder: &mut fidl::encoding::Decoder<
5671 '_,
5672 fidl::encoding::DefaultFuchsiaResourceDialect,
5673 >,
5674 offset: usize,
5675 _depth: fidl::encoding::Depth,
5676 ) -> fidl::Result<()> {
5677 decoder.debug_check_bounds::<Self>(offset);
5678 fidl::decode!(fidl::encoding::Vector<DirectoryEntry, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.entries, decoder, offset + 0, _depth)?;
5680 Ok(())
5681 }
5682 }
5683
5684 impl fidl::encoding::ResourceTypeMarker for DirectoryEntry {
5685 type Borrowed<'a> = &'a mut Self;
5686 fn take_or_borrow<'a>(
5687 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5688 ) -> Self::Borrowed<'a> {
5689 value
5690 }
5691 }
5692
5693 unsafe impl fidl::encoding::TypeMarker for DirectoryEntry {
5694 type Owned = Self;
5695
5696 #[inline(always)]
5697 fn inline_align(_context: fidl::encoding::Context) -> usize {
5698 8
5699 }
5700
5701 #[inline(always)]
5702 fn inline_size(_context: fidl::encoding::Context) -> usize {
5703 32
5704 }
5705 }
5706
5707 unsafe impl
5708 fidl::encoding::Encode<DirectoryEntry, fidl::encoding::DefaultFuchsiaResourceDialect>
5709 for &mut DirectoryEntry
5710 {
5711 #[inline]
5712 unsafe fn encode(
5713 self,
5714 encoder: &mut fidl::encoding::Encoder<
5715 '_,
5716 fidl::encoding::DefaultFuchsiaResourceDialect,
5717 >,
5718 offset: usize,
5719 _depth: fidl::encoding::Depth,
5720 ) -> fidl::Result<()> {
5721 encoder.debug_check_bounds::<DirectoryEntry>(offset);
5722 fidl::encoding::Encode::<DirectoryEntry, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5724 (
5725 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.file_path),
5726 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.file_contents),
5727 ),
5728 encoder, offset, _depth
5729 )
5730 }
5731 }
5732 unsafe impl<
5733 T0: fidl::encoding::Encode<
5734 fidl::encoding::BoundedString<255>,
5735 fidl::encoding::DefaultFuchsiaResourceDialect,
5736 >,
5737 T1: fidl::encoding::Encode<
5738 fidl_fuchsia_mem::Buffer,
5739 fidl::encoding::DefaultFuchsiaResourceDialect,
5740 >,
5741 > fidl::encoding::Encode<DirectoryEntry, fidl::encoding::DefaultFuchsiaResourceDialect>
5742 for (T0, T1)
5743 {
5744 #[inline]
5745 unsafe fn encode(
5746 self,
5747 encoder: &mut fidl::encoding::Encoder<
5748 '_,
5749 fidl::encoding::DefaultFuchsiaResourceDialect,
5750 >,
5751 offset: usize,
5752 depth: fidl::encoding::Depth,
5753 ) -> fidl::Result<()> {
5754 encoder.debug_check_bounds::<DirectoryEntry>(offset);
5755 self.0.encode(encoder, offset + 0, depth)?;
5759 self.1.encode(encoder, offset + 16, depth)?;
5760 Ok(())
5761 }
5762 }
5763
5764 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5765 for DirectoryEntry
5766 {
5767 #[inline(always)]
5768 fn new_empty() -> Self {
5769 Self {
5770 file_path: fidl::new_empty!(
5771 fidl::encoding::BoundedString<255>,
5772 fidl::encoding::DefaultFuchsiaResourceDialect
5773 ),
5774 file_contents: fidl::new_empty!(
5775 fidl_fuchsia_mem::Buffer,
5776 fidl::encoding::DefaultFuchsiaResourceDialect
5777 ),
5778 }
5779 }
5780
5781 #[inline]
5782 unsafe fn decode(
5783 &mut self,
5784 decoder: &mut fidl::encoding::Decoder<
5785 '_,
5786 fidl::encoding::DefaultFuchsiaResourceDialect,
5787 >,
5788 offset: usize,
5789 _depth: fidl::encoding::Depth,
5790 ) -> fidl::Result<()> {
5791 decoder.debug_check_bounds::<Self>(offset);
5792 fidl::decode!(
5794 fidl::encoding::BoundedString<255>,
5795 fidl::encoding::DefaultFuchsiaResourceDialect,
5796 &mut self.file_path,
5797 decoder,
5798 offset + 0,
5799 _depth
5800 )?;
5801 fidl::decode!(
5802 fidl_fuchsia_mem::Buffer,
5803 fidl::encoding::DefaultFuchsiaResourceDialect,
5804 &mut self.file_contents,
5805 decoder,
5806 offset + 16,
5807 _depth
5808 )?;
5809 Ok(())
5810 }
5811 }
5812
5813 impl fidl::encoding::ResourceTypeMarker for RealmAddChildRealmFromDeclRequest {
5814 type Borrowed<'a> = &'a mut Self;
5815 fn take_or_borrow<'a>(
5816 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5817 ) -> Self::Borrowed<'a> {
5818 value
5819 }
5820 }
5821
5822 unsafe impl fidl::encoding::TypeMarker for RealmAddChildRealmFromDeclRequest {
5823 type Owned = Self;
5824
5825 #[inline(always)]
5826 fn inline_align(_context: fidl::encoding::Context) -> usize {
5827 8
5828 }
5829
5830 #[inline(always)]
5831 fn inline_size(_context: fidl::encoding::Context) -> usize {
5832 56
5833 }
5834 }
5835
5836 unsafe impl
5837 fidl::encoding::Encode<
5838 RealmAddChildRealmFromDeclRequest,
5839 fidl::encoding::DefaultFuchsiaResourceDialect,
5840 > for &mut RealmAddChildRealmFromDeclRequest
5841 {
5842 #[inline]
5843 unsafe fn encode(
5844 self,
5845 encoder: &mut fidl::encoding::Encoder<
5846 '_,
5847 fidl::encoding::DefaultFuchsiaResourceDialect,
5848 >,
5849 offset: usize,
5850 _depth: fidl::encoding::Depth,
5851 ) -> fidl::Result<()> {
5852 encoder.debug_check_bounds::<RealmAddChildRealmFromDeclRequest>(offset);
5853 fidl::encoding::Encode::<RealmAddChildRealmFromDeclRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5855 (
5856 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
5857 <fidl_fuchsia_component_decl::Component as fidl::encoding::ValueTypeMarker>::borrow(&self.decl),
5858 <ChildOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
5859 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.child_realm),
5860 ),
5861 encoder, offset, _depth
5862 )
5863 }
5864 }
5865 unsafe impl<
5866 T0: fidl::encoding::Encode<
5867 fidl::encoding::BoundedString<255>,
5868 fidl::encoding::DefaultFuchsiaResourceDialect,
5869 >,
5870 T1: fidl::encoding::Encode<
5871 fidl_fuchsia_component_decl::Component,
5872 fidl::encoding::DefaultFuchsiaResourceDialect,
5873 >,
5874 T2: fidl::encoding::Encode<ChildOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
5875 T3: fidl::encoding::Encode<
5876 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
5877 fidl::encoding::DefaultFuchsiaResourceDialect,
5878 >,
5879 >
5880 fidl::encoding::Encode<
5881 RealmAddChildRealmFromDeclRequest,
5882 fidl::encoding::DefaultFuchsiaResourceDialect,
5883 > for (T0, T1, T2, T3)
5884 {
5885 #[inline]
5886 unsafe fn encode(
5887 self,
5888 encoder: &mut fidl::encoding::Encoder<
5889 '_,
5890 fidl::encoding::DefaultFuchsiaResourceDialect,
5891 >,
5892 offset: usize,
5893 depth: fidl::encoding::Depth,
5894 ) -> fidl::Result<()> {
5895 encoder.debug_check_bounds::<RealmAddChildRealmFromDeclRequest>(offset);
5896 unsafe {
5899 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5900 (ptr as *mut u64).write_unaligned(0);
5901 }
5902 self.0.encode(encoder, offset + 0, depth)?;
5904 self.1.encode(encoder, offset + 16, depth)?;
5905 self.2.encode(encoder, offset + 32, depth)?;
5906 self.3.encode(encoder, offset + 48, depth)?;
5907 Ok(())
5908 }
5909 }
5910
5911 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5912 for RealmAddChildRealmFromDeclRequest
5913 {
5914 #[inline(always)]
5915 fn new_empty() -> Self {
5916 Self {
5917 name: fidl::new_empty!(
5918 fidl::encoding::BoundedString<255>,
5919 fidl::encoding::DefaultFuchsiaResourceDialect
5920 ),
5921 decl: fidl::new_empty!(
5922 fidl_fuchsia_component_decl::Component,
5923 fidl::encoding::DefaultFuchsiaResourceDialect
5924 ),
5925 options: fidl::new_empty!(
5926 ChildOptions,
5927 fidl::encoding::DefaultFuchsiaResourceDialect
5928 ),
5929 child_realm: fidl::new_empty!(
5930 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
5931 fidl::encoding::DefaultFuchsiaResourceDialect
5932 ),
5933 }
5934 }
5935
5936 #[inline]
5937 unsafe fn decode(
5938 &mut self,
5939 decoder: &mut fidl::encoding::Decoder<
5940 '_,
5941 fidl::encoding::DefaultFuchsiaResourceDialect,
5942 >,
5943 offset: usize,
5944 _depth: fidl::encoding::Depth,
5945 ) -> fidl::Result<()> {
5946 decoder.debug_check_bounds::<Self>(offset);
5947 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5949 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5950 let mask = 0xffffffff00000000u64;
5951 let maskedval = padval & mask;
5952 if maskedval != 0 {
5953 return Err(fidl::Error::NonZeroPadding {
5954 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5955 });
5956 }
5957 fidl::decode!(
5958 fidl::encoding::BoundedString<255>,
5959 fidl::encoding::DefaultFuchsiaResourceDialect,
5960 &mut self.name,
5961 decoder,
5962 offset + 0,
5963 _depth
5964 )?;
5965 fidl::decode!(
5966 fidl_fuchsia_component_decl::Component,
5967 fidl::encoding::DefaultFuchsiaResourceDialect,
5968 &mut self.decl,
5969 decoder,
5970 offset + 16,
5971 _depth
5972 )?;
5973 fidl::decode!(
5974 ChildOptions,
5975 fidl::encoding::DefaultFuchsiaResourceDialect,
5976 &mut self.options,
5977 decoder,
5978 offset + 32,
5979 _depth
5980 )?;
5981 fidl::decode!(
5982 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
5983 fidl::encoding::DefaultFuchsiaResourceDialect,
5984 &mut self.child_realm,
5985 decoder,
5986 offset + 48,
5987 _depth
5988 )?;
5989 Ok(())
5990 }
5991 }
5992
5993 impl fidl::encoding::ResourceTypeMarker for RealmAddChildRealmFromRelativeUrlRequest {
5994 type Borrowed<'a> = &'a mut Self;
5995 fn take_or_borrow<'a>(
5996 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5997 ) -> Self::Borrowed<'a> {
5998 value
5999 }
6000 }
6001
6002 unsafe impl fidl::encoding::TypeMarker for RealmAddChildRealmFromRelativeUrlRequest {
6003 type Owned = Self;
6004
6005 #[inline(always)]
6006 fn inline_align(_context: fidl::encoding::Context) -> usize {
6007 8
6008 }
6009
6010 #[inline(always)]
6011 fn inline_size(_context: fidl::encoding::Context) -> usize {
6012 56
6013 }
6014 }
6015
6016 unsafe impl
6017 fidl::encoding::Encode<
6018 RealmAddChildRealmFromRelativeUrlRequest,
6019 fidl::encoding::DefaultFuchsiaResourceDialect,
6020 > for &mut RealmAddChildRealmFromRelativeUrlRequest
6021 {
6022 #[inline]
6023 unsafe fn encode(
6024 self,
6025 encoder: &mut fidl::encoding::Encoder<
6026 '_,
6027 fidl::encoding::DefaultFuchsiaResourceDialect,
6028 >,
6029 offset: usize,
6030 _depth: fidl::encoding::Depth,
6031 ) -> fidl::Result<()> {
6032 encoder.debug_check_bounds::<RealmAddChildRealmFromRelativeUrlRequest>(offset);
6033 fidl::encoding::Encode::<RealmAddChildRealmFromRelativeUrlRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6035 (
6036 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
6037 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_url),
6038 <ChildOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
6039 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.child_realm),
6040 ),
6041 encoder, offset, _depth
6042 )
6043 }
6044 }
6045 unsafe impl<
6046 T0: fidl::encoding::Encode<
6047 fidl::encoding::BoundedString<255>,
6048 fidl::encoding::DefaultFuchsiaResourceDialect,
6049 >,
6050 T1: fidl::encoding::Encode<
6051 fidl::encoding::BoundedString<4096>,
6052 fidl::encoding::DefaultFuchsiaResourceDialect,
6053 >,
6054 T2: fidl::encoding::Encode<ChildOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
6055 T3: fidl::encoding::Encode<
6056 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6057 fidl::encoding::DefaultFuchsiaResourceDialect,
6058 >,
6059 >
6060 fidl::encoding::Encode<
6061 RealmAddChildRealmFromRelativeUrlRequest,
6062 fidl::encoding::DefaultFuchsiaResourceDialect,
6063 > for (T0, T1, T2, T3)
6064 {
6065 #[inline]
6066 unsafe fn encode(
6067 self,
6068 encoder: &mut fidl::encoding::Encoder<
6069 '_,
6070 fidl::encoding::DefaultFuchsiaResourceDialect,
6071 >,
6072 offset: usize,
6073 depth: fidl::encoding::Depth,
6074 ) -> fidl::Result<()> {
6075 encoder.debug_check_bounds::<RealmAddChildRealmFromRelativeUrlRequest>(offset);
6076 unsafe {
6079 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
6080 (ptr as *mut u64).write_unaligned(0);
6081 }
6082 self.0.encode(encoder, offset + 0, depth)?;
6084 self.1.encode(encoder, offset + 16, depth)?;
6085 self.2.encode(encoder, offset + 32, depth)?;
6086 self.3.encode(encoder, offset + 48, depth)?;
6087 Ok(())
6088 }
6089 }
6090
6091 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6092 for RealmAddChildRealmFromRelativeUrlRequest
6093 {
6094 #[inline(always)]
6095 fn new_empty() -> Self {
6096 Self {
6097 name: fidl::new_empty!(
6098 fidl::encoding::BoundedString<255>,
6099 fidl::encoding::DefaultFuchsiaResourceDialect
6100 ),
6101 relative_url: fidl::new_empty!(
6102 fidl::encoding::BoundedString<4096>,
6103 fidl::encoding::DefaultFuchsiaResourceDialect
6104 ),
6105 options: fidl::new_empty!(
6106 ChildOptions,
6107 fidl::encoding::DefaultFuchsiaResourceDialect
6108 ),
6109 child_realm: fidl::new_empty!(
6110 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6111 fidl::encoding::DefaultFuchsiaResourceDialect
6112 ),
6113 }
6114 }
6115
6116 #[inline]
6117 unsafe fn decode(
6118 &mut self,
6119 decoder: &mut fidl::encoding::Decoder<
6120 '_,
6121 fidl::encoding::DefaultFuchsiaResourceDialect,
6122 >,
6123 offset: usize,
6124 _depth: fidl::encoding::Depth,
6125 ) -> fidl::Result<()> {
6126 decoder.debug_check_bounds::<Self>(offset);
6127 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
6129 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6130 let mask = 0xffffffff00000000u64;
6131 let maskedval = padval & mask;
6132 if maskedval != 0 {
6133 return Err(fidl::Error::NonZeroPadding {
6134 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
6135 });
6136 }
6137 fidl::decode!(
6138 fidl::encoding::BoundedString<255>,
6139 fidl::encoding::DefaultFuchsiaResourceDialect,
6140 &mut self.name,
6141 decoder,
6142 offset + 0,
6143 _depth
6144 )?;
6145 fidl::decode!(
6146 fidl::encoding::BoundedString<4096>,
6147 fidl::encoding::DefaultFuchsiaResourceDialect,
6148 &mut self.relative_url,
6149 decoder,
6150 offset + 16,
6151 _depth
6152 )?;
6153 fidl::decode!(
6154 ChildOptions,
6155 fidl::encoding::DefaultFuchsiaResourceDialect,
6156 &mut self.options,
6157 decoder,
6158 offset + 32,
6159 _depth
6160 )?;
6161 fidl::decode!(
6162 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6163 fidl::encoding::DefaultFuchsiaResourceDialect,
6164 &mut self.child_realm,
6165 decoder,
6166 offset + 48,
6167 _depth
6168 )?;
6169 Ok(())
6170 }
6171 }
6172
6173 impl fidl::encoding::ResourceTypeMarker for RealmAddChildRealmRequest {
6174 type Borrowed<'a> = &'a mut Self;
6175 fn take_or_borrow<'a>(
6176 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6177 ) -> Self::Borrowed<'a> {
6178 value
6179 }
6180 }
6181
6182 unsafe impl fidl::encoding::TypeMarker for RealmAddChildRealmRequest {
6183 type Owned = Self;
6184
6185 #[inline(always)]
6186 fn inline_align(_context: fidl::encoding::Context) -> usize {
6187 8
6188 }
6189
6190 #[inline(always)]
6191 fn inline_size(_context: fidl::encoding::Context) -> usize {
6192 40
6193 }
6194 }
6195
6196 unsafe impl
6197 fidl::encoding::Encode<
6198 RealmAddChildRealmRequest,
6199 fidl::encoding::DefaultFuchsiaResourceDialect,
6200 > for &mut RealmAddChildRealmRequest
6201 {
6202 #[inline]
6203 unsafe fn encode(
6204 self,
6205 encoder: &mut fidl::encoding::Encoder<
6206 '_,
6207 fidl::encoding::DefaultFuchsiaResourceDialect,
6208 >,
6209 offset: usize,
6210 _depth: fidl::encoding::Depth,
6211 ) -> fidl::Result<()> {
6212 encoder.debug_check_bounds::<RealmAddChildRealmRequest>(offset);
6213 fidl::encoding::Encode::<RealmAddChildRealmRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6215 (
6216 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
6217 <ChildOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
6218 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.child_realm),
6219 ),
6220 encoder, offset, _depth
6221 )
6222 }
6223 }
6224 unsafe impl<
6225 T0: fidl::encoding::Encode<
6226 fidl::encoding::BoundedString<255>,
6227 fidl::encoding::DefaultFuchsiaResourceDialect,
6228 >,
6229 T1: fidl::encoding::Encode<ChildOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
6230 T2: fidl::encoding::Encode<
6231 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6232 fidl::encoding::DefaultFuchsiaResourceDialect,
6233 >,
6234 >
6235 fidl::encoding::Encode<
6236 RealmAddChildRealmRequest,
6237 fidl::encoding::DefaultFuchsiaResourceDialect,
6238 > for (T0, T1, T2)
6239 {
6240 #[inline]
6241 unsafe fn encode(
6242 self,
6243 encoder: &mut fidl::encoding::Encoder<
6244 '_,
6245 fidl::encoding::DefaultFuchsiaResourceDialect,
6246 >,
6247 offset: usize,
6248 depth: fidl::encoding::Depth,
6249 ) -> fidl::Result<()> {
6250 encoder.debug_check_bounds::<RealmAddChildRealmRequest>(offset);
6251 unsafe {
6254 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
6255 (ptr as *mut u64).write_unaligned(0);
6256 }
6257 self.0.encode(encoder, offset + 0, depth)?;
6259 self.1.encode(encoder, offset + 16, depth)?;
6260 self.2.encode(encoder, offset + 32, depth)?;
6261 Ok(())
6262 }
6263 }
6264
6265 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6266 for RealmAddChildRealmRequest
6267 {
6268 #[inline(always)]
6269 fn new_empty() -> Self {
6270 Self {
6271 name: fidl::new_empty!(
6272 fidl::encoding::BoundedString<255>,
6273 fidl::encoding::DefaultFuchsiaResourceDialect
6274 ),
6275 options: fidl::new_empty!(
6276 ChildOptions,
6277 fidl::encoding::DefaultFuchsiaResourceDialect
6278 ),
6279 child_realm: fidl::new_empty!(
6280 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6281 fidl::encoding::DefaultFuchsiaResourceDialect
6282 ),
6283 }
6284 }
6285
6286 #[inline]
6287 unsafe fn decode(
6288 &mut self,
6289 decoder: &mut fidl::encoding::Decoder<
6290 '_,
6291 fidl::encoding::DefaultFuchsiaResourceDialect,
6292 >,
6293 offset: usize,
6294 _depth: fidl::encoding::Depth,
6295 ) -> fidl::Result<()> {
6296 decoder.debug_check_bounds::<Self>(offset);
6297 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
6299 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6300 let mask = 0xffffffff00000000u64;
6301 let maskedval = padval & mask;
6302 if maskedval != 0 {
6303 return Err(fidl::Error::NonZeroPadding {
6304 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
6305 });
6306 }
6307 fidl::decode!(
6308 fidl::encoding::BoundedString<255>,
6309 fidl::encoding::DefaultFuchsiaResourceDialect,
6310 &mut self.name,
6311 decoder,
6312 offset + 0,
6313 _depth
6314 )?;
6315 fidl::decode!(
6316 ChildOptions,
6317 fidl::encoding::DefaultFuchsiaResourceDialect,
6318 &mut self.options,
6319 decoder,
6320 offset + 16,
6321 _depth
6322 )?;
6323 fidl::decode!(
6324 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6325 fidl::encoding::DefaultFuchsiaResourceDialect,
6326 &mut self.child_realm,
6327 decoder,
6328 offset + 32,
6329 _depth
6330 )?;
6331 Ok(())
6332 }
6333 }
6334
6335 impl fidl::encoding::ResourceTypeMarker for RealmBuilderFactoryCreateFromRelativeUrlRequest {
6336 type Borrowed<'a> = &'a mut Self;
6337 fn take_or_borrow<'a>(
6338 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6339 ) -> Self::Borrowed<'a> {
6340 value
6341 }
6342 }
6343
6344 unsafe impl fidl::encoding::TypeMarker for RealmBuilderFactoryCreateFromRelativeUrlRequest {
6345 type Owned = Self;
6346
6347 #[inline(always)]
6348 fn inline_align(_context: fidl::encoding::Context) -> usize {
6349 8
6350 }
6351
6352 #[inline(always)]
6353 fn inline_size(_context: fidl::encoding::Context) -> usize {
6354 32
6355 }
6356 }
6357
6358 unsafe impl
6359 fidl::encoding::Encode<
6360 RealmBuilderFactoryCreateFromRelativeUrlRequest,
6361 fidl::encoding::DefaultFuchsiaResourceDialect,
6362 > for &mut RealmBuilderFactoryCreateFromRelativeUrlRequest
6363 {
6364 #[inline]
6365 unsafe fn encode(
6366 self,
6367 encoder: &mut fidl::encoding::Encoder<
6368 '_,
6369 fidl::encoding::DefaultFuchsiaResourceDialect,
6370 >,
6371 offset: usize,
6372 _depth: fidl::encoding::Depth,
6373 ) -> fidl::Result<()> {
6374 encoder.debug_check_bounds::<RealmBuilderFactoryCreateFromRelativeUrlRequest>(offset);
6375 fidl::encoding::Encode::<RealmBuilderFactoryCreateFromRelativeUrlRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6377 (
6378 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.pkg_dir_handle),
6379 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_url),
6380 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.realm_server_end),
6381 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.builder_server_end),
6382 ),
6383 encoder, offset, _depth
6384 )
6385 }
6386 }
6387 unsafe impl<
6388 T0: fidl::encoding::Encode<
6389 fidl::encoding::Endpoint<
6390 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
6391 >,
6392 fidl::encoding::DefaultFuchsiaResourceDialect,
6393 >,
6394 T1: fidl::encoding::Encode<
6395 fidl::encoding::BoundedString<4096>,
6396 fidl::encoding::DefaultFuchsiaResourceDialect,
6397 >,
6398 T2: fidl::encoding::Encode<
6399 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6400 fidl::encoding::DefaultFuchsiaResourceDialect,
6401 >,
6402 T3: fidl::encoding::Encode<
6403 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>>,
6404 fidl::encoding::DefaultFuchsiaResourceDialect,
6405 >,
6406 >
6407 fidl::encoding::Encode<
6408 RealmBuilderFactoryCreateFromRelativeUrlRequest,
6409 fidl::encoding::DefaultFuchsiaResourceDialect,
6410 > for (T0, T1, T2, T3)
6411 {
6412 #[inline]
6413 unsafe fn encode(
6414 self,
6415 encoder: &mut fidl::encoding::Encoder<
6416 '_,
6417 fidl::encoding::DefaultFuchsiaResourceDialect,
6418 >,
6419 offset: usize,
6420 depth: fidl::encoding::Depth,
6421 ) -> fidl::Result<()> {
6422 encoder.debug_check_bounds::<RealmBuilderFactoryCreateFromRelativeUrlRequest>(offset);
6423 unsafe {
6426 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
6427 (ptr as *mut u64).write_unaligned(0);
6428 }
6429 self.0.encode(encoder, offset + 0, depth)?;
6431 self.1.encode(encoder, offset + 8, depth)?;
6432 self.2.encode(encoder, offset + 24, depth)?;
6433 self.3.encode(encoder, offset + 28, depth)?;
6434 Ok(())
6435 }
6436 }
6437
6438 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6439 for RealmBuilderFactoryCreateFromRelativeUrlRequest
6440 {
6441 #[inline(always)]
6442 fn new_empty() -> Self {
6443 Self {
6444 pkg_dir_handle: fidl::new_empty!(
6445 fidl::encoding::Endpoint<
6446 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
6447 >,
6448 fidl::encoding::DefaultFuchsiaResourceDialect
6449 ),
6450 relative_url: fidl::new_empty!(
6451 fidl::encoding::BoundedString<4096>,
6452 fidl::encoding::DefaultFuchsiaResourceDialect
6453 ),
6454 realm_server_end: fidl::new_empty!(
6455 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6456 fidl::encoding::DefaultFuchsiaResourceDialect
6457 ),
6458 builder_server_end: fidl::new_empty!(
6459 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>>,
6460 fidl::encoding::DefaultFuchsiaResourceDialect
6461 ),
6462 }
6463 }
6464
6465 #[inline]
6466 unsafe fn decode(
6467 &mut self,
6468 decoder: &mut fidl::encoding::Decoder<
6469 '_,
6470 fidl::encoding::DefaultFuchsiaResourceDialect,
6471 >,
6472 offset: usize,
6473 _depth: fidl::encoding::Depth,
6474 ) -> fidl::Result<()> {
6475 decoder.debug_check_bounds::<Self>(offset);
6476 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
6478 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6479 let mask = 0xffffffff00000000u64;
6480 let maskedval = padval & mask;
6481 if maskedval != 0 {
6482 return Err(fidl::Error::NonZeroPadding {
6483 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
6484 });
6485 }
6486 fidl::decode!(
6487 fidl::encoding::Endpoint<
6488 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
6489 >,
6490 fidl::encoding::DefaultFuchsiaResourceDialect,
6491 &mut self.pkg_dir_handle,
6492 decoder,
6493 offset + 0,
6494 _depth
6495 )?;
6496 fidl::decode!(
6497 fidl::encoding::BoundedString<4096>,
6498 fidl::encoding::DefaultFuchsiaResourceDialect,
6499 &mut self.relative_url,
6500 decoder,
6501 offset + 8,
6502 _depth
6503 )?;
6504 fidl::decode!(
6505 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6506 fidl::encoding::DefaultFuchsiaResourceDialect,
6507 &mut self.realm_server_end,
6508 decoder,
6509 offset + 24,
6510 _depth
6511 )?;
6512 fidl::decode!(
6513 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>>,
6514 fidl::encoding::DefaultFuchsiaResourceDialect,
6515 &mut self.builder_server_end,
6516 decoder,
6517 offset + 28,
6518 _depth
6519 )?;
6520 Ok(())
6521 }
6522 }
6523
6524 impl fidl::encoding::ResourceTypeMarker for RealmBuilderFactoryCreateRequest {
6525 type Borrowed<'a> = &'a mut Self;
6526 fn take_or_borrow<'a>(
6527 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6528 ) -> Self::Borrowed<'a> {
6529 value
6530 }
6531 }
6532
6533 unsafe impl fidl::encoding::TypeMarker for RealmBuilderFactoryCreateRequest {
6534 type Owned = Self;
6535
6536 #[inline(always)]
6537 fn inline_align(_context: fidl::encoding::Context) -> usize {
6538 4
6539 }
6540
6541 #[inline(always)]
6542 fn inline_size(_context: fidl::encoding::Context) -> usize {
6543 12
6544 }
6545 }
6546
6547 unsafe impl
6548 fidl::encoding::Encode<
6549 RealmBuilderFactoryCreateRequest,
6550 fidl::encoding::DefaultFuchsiaResourceDialect,
6551 > for &mut RealmBuilderFactoryCreateRequest
6552 {
6553 #[inline]
6554 unsafe fn encode(
6555 self,
6556 encoder: &mut fidl::encoding::Encoder<
6557 '_,
6558 fidl::encoding::DefaultFuchsiaResourceDialect,
6559 >,
6560 offset: usize,
6561 _depth: fidl::encoding::Depth,
6562 ) -> fidl::Result<()> {
6563 encoder.debug_check_bounds::<RealmBuilderFactoryCreateRequest>(offset);
6564 fidl::encoding::Encode::<RealmBuilderFactoryCreateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6566 (
6567 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.pkg_dir_handle),
6568 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.realm_server_end),
6569 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.builder_server_end),
6570 ),
6571 encoder, offset, _depth
6572 )
6573 }
6574 }
6575 unsafe impl<
6576 T0: fidl::encoding::Encode<
6577 fidl::encoding::Endpoint<
6578 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
6579 >,
6580 fidl::encoding::DefaultFuchsiaResourceDialect,
6581 >,
6582 T1: fidl::encoding::Encode<
6583 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6584 fidl::encoding::DefaultFuchsiaResourceDialect,
6585 >,
6586 T2: fidl::encoding::Encode<
6587 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>>,
6588 fidl::encoding::DefaultFuchsiaResourceDialect,
6589 >,
6590 >
6591 fidl::encoding::Encode<
6592 RealmBuilderFactoryCreateRequest,
6593 fidl::encoding::DefaultFuchsiaResourceDialect,
6594 > for (T0, T1, T2)
6595 {
6596 #[inline]
6597 unsafe fn encode(
6598 self,
6599 encoder: &mut fidl::encoding::Encoder<
6600 '_,
6601 fidl::encoding::DefaultFuchsiaResourceDialect,
6602 >,
6603 offset: usize,
6604 depth: fidl::encoding::Depth,
6605 ) -> fidl::Result<()> {
6606 encoder.debug_check_bounds::<RealmBuilderFactoryCreateRequest>(offset);
6607 self.0.encode(encoder, offset + 0, depth)?;
6611 self.1.encode(encoder, offset + 4, depth)?;
6612 self.2.encode(encoder, offset + 8, depth)?;
6613 Ok(())
6614 }
6615 }
6616
6617 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6618 for RealmBuilderFactoryCreateRequest
6619 {
6620 #[inline(always)]
6621 fn new_empty() -> Self {
6622 Self {
6623 pkg_dir_handle: fidl::new_empty!(
6624 fidl::encoding::Endpoint<
6625 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
6626 >,
6627 fidl::encoding::DefaultFuchsiaResourceDialect
6628 ),
6629 realm_server_end: fidl::new_empty!(
6630 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6631 fidl::encoding::DefaultFuchsiaResourceDialect
6632 ),
6633 builder_server_end: fidl::new_empty!(
6634 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>>,
6635 fidl::encoding::DefaultFuchsiaResourceDialect
6636 ),
6637 }
6638 }
6639
6640 #[inline]
6641 unsafe fn decode(
6642 &mut self,
6643 decoder: &mut fidl::encoding::Decoder<
6644 '_,
6645 fidl::encoding::DefaultFuchsiaResourceDialect,
6646 >,
6647 offset: usize,
6648 _depth: fidl::encoding::Depth,
6649 ) -> fidl::Result<()> {
6650 decoder.debug_check_bounds::<Self>(offset);
6651 fidl::decode!(
6653 fidl::encoding::Endpoint<
6654 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
6655 >,
6656 fidl::encoding::DefaultFuchsiaResourceDialect,
6657 &mut self.pkg_dir_handle,
6658 decoder,
6659 offset + 0,
6660 _depth
6661 )?;
6662 fidl::decode!(
6663 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RealmMarker>>,
6664 fidl::encoding::DefaultFuchsiaResourceDialect,
6665 &mut self.realm_server_end,
6666 decoder,
6667 offset + 4,
6668 _depth
6669 )?;
6670 fidl::decode!(
6671 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BuilderMarker>>,
6672 fidl::encoding::DefaultFuchsiaResourceDialect,
6673 &mut self.builder_server_end,
6674 decoder,
6675 offset + 8,
6676 _depth
6677 )?;
6678 Ok(())
6679 }
6680 }
6681
6682 impl fidl::encoding::ResourceTypeMarker for RealmReadOnlyDirectoryRequest {
6683 type Borrowed<'a> = &'a mut Self;
6684 fn take_or_borrow<'a>(
6685 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6686 ) -> Self::Borrowed<'a> {
6687 value
6688 }
6689 }
6690
6691 unsafe impl fidl::encoding::TypeMarker for RealmReadOnlyDirectoryRequest {
6692 type Owned = Self;
6693
6694 #[inline(always)]
6695 fn inline_align(_context: fidl::encoding::Context) -> usize {
6696 8
6697 }
6698
6699 #[inline(always)]
6700 fn inline_size(_context: fidl::encoding::Context) -> usize {
6701 48
6702 }
6703 }
6704
6705 unsafe impl
6706 fidl::encoding::Encode<
6707 RealmReadOnlyDirectoryRequest,
6708 fidl::encoding::DefaultFuchsiaResourceDialect,
6709 > for &mut RealmReadOnlyDirectoryRequest
6710 {
6711 #[inline]
6712 unsafe fn encode(
6713 self,
6714 encoder: &mut fidl::encoding::Encoder<
6715 '_,
6716 fidl::encoding::DefaultFuchsiaResourceDialect,
6717 >,
6718 offset: usize,
6719 _depth: fidl::encoding::Depth,
6720 ) -> fidl::Result<()> {
6721 encoder.debug_check_bounds::<RealmReadOnlyDirectoryRequest>(offset);
6722 fidl::encoding::Encode::<RealmReadOnlyDirectoryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6724 (
6725 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
6726 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Ref> as fidl::encoding::ValueTypeMarker>::borrow(&self.to),
6727 <DirectoryContents as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.directory_contents),
6728 ),
6729 encoder, offset, _depth
6730 )
6731 }
6732 }
6733 unsafe impl<
6734 T0: fidl::encoding::Encode<
6735 fidl::encoding::BoundedString<255>,
6736 fidl::encoding::DefaultFuchsiaResourceDialect,
6737 >,
6738 T1: fidl::encoding::Encode<
6739 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Ref>,
6740 fidl::encoding::DefaultFuchsiaResourceDialect,
6741 >,
6742 T2: fidl::encoding::Encode<
6743 DirectoryContents,
6744 fidl::encoding::DefaultFuchsiaResourceDialect,
6745 >,
6746 >
6747 fidl::encoding::Encode<
6748 RealmReadOnlyDirectoryRequest,
6749 fidl::encoding::DefaultFuchsiaResourceDialect,
6750 > for (T0, T1, T2)
6751 {
6752 #[inline]
6753 unsafe fn encode(
6754 self,
6755 encoder: &mut fidl::encoding::Encoder<
6756 '_,
6757 fidl::encoding::DefaultFuchsiaResourceDialect,
6758 >,
6759 offset: usize,
6760 depth: fidl::encoding::Depth,
6761 ) -> fidl::Result<()> {
6762 encoder.debug_check_bounds::<RealmReadOnlyDirectoryRequest>(offset);
6763 self.0.encode(encoder, offset + 0, depth)?;
6767 self.1.encode(encoder, offset + 16, depth)?;
6768 self.2.encode(encoder, offset + 32, depth)?;
6769 Ok(())
6770 }
6771 }
6772
6773 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6774 for RealmReadOnlyDirectoryRequest
6775 {
6776 #[inline(always)]
6777 fn new_empty() -> Self {
6778 Self {
6779 name: fidl::new_empty!(
6780 fidl::encoding::BoundedString<255>,
6781 fidl::encoding::DefaultFuchsiaResourceDialect
6782 ),
6783 to: fidl::new_empty!(
6784 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Ref>,
6785 fidl::encoding::DefaultFuchsiaResourceDialect
6786 ),
6787 directory_contents: fidl::new_empty!(
6788 DirectoryContents,
6789 fidl::encoding::DefaultFuchsiaResourceDialect
6790 ),
6791 }
6792 }
6793
6794 #[inline]
6795 unsafe fn decode(
6796 &mut self,
6797 decoder: &mut fidl::encoding::Decoder<
6798 '_,
6799 fidl::encoding::DefaultFuchsiaResourceDialect,
6800 >,
6801 offset: usize,
6802 _depth: fidl::encoding::Depth,
6803 ) -> fidl::Result<()> {
6804 decoder.debug_check_bounds::<Self>(offset);
6805 fidl::decode!(
6807 fidl::encoding::BoundedString<255>,
6808 fidl::encoding::DefaultFuchsiaResourceDialect,
6809 &mut self.name,
6810 decoder,
6811 offset + 0,
6812 _depth
6813 )?;
6814 fidl::decode!(
6815 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Ref>,
6816 fidl::encoding::DefaultFuchsiaResourceDialect,
6817 &mut self.to,
6818 decoder,
6819 offset + 16,
6820 _depth
6821 )?;
6822 fidl::decode!(
6823 DirectoryContents,
6824 fidl::encoding::DefaultFuchsiaResourceDialect,
6825 &mut self.directory_contents,
6826 decoder,
6827 offset + 32,
6828 _depth
6829 )?;
6830 Ok(())
6831 }
6832 }
6833}