1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_process__common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
21pub struct HandleInfo {
22 pub handle: fdomain_client::Handle,
24 pub id: u32,
29}
30
31impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for HandleInfo {}
32
33#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35pub struct LaunchInfo {
36 pub executable: fdomain_client::Vmo,
38 pub job: fdomain_client::Job,
40 pub name: String,
42}
43
44impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LaunchInfo {}
45
46#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
47pub struct LauncherAddHandlesRequest {
48 pub handles: Vec<HandleInfo>,
49}
50
51impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LauncherAddHandlesRequest {}
52
53#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
54pub struct LauncherAddNamesRequest {
55 pub names: Vec<NameInfo>,
56}
57
58impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LauncherAddNamesRequest {}
59
60#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
61pub struct LauncherCreateWithoutStartingRequest {
62 pub info: LaunchInfo,
63}
64
65impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
66 for LauncherCreateWithoutStartingRequest
67{
68}
69
70#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct LauncherCreateWithoutStartingResponse {
72 pub status: i32,
73 pub data: Option<Box<ProcessStartData>>,
74}
75
76impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
77 for LauncherCreateWithoutStartingResponse
78{
79}
80
81#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
82pub struct LauncherLaunchRequest {
83 pub info: LaunchInfo,
84}
85
86impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LauncherLaunchRequest {}
87
88#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct LauncherLaunchResponse {
90 pub status: i32,
91 pub process: Option<fdomain_client::Process>,
92}
93
94impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LauncherLaunchResponse {}
95
96#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
104pub struct NameInfo {
105 pub path: String,
109 pub directory: fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
111}
112
113impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NameInfo {}
114
115#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
119pub struct ProcessStartData {
120 pub process: fdomain_client::Process,
122 pub root_vmar: fdomain_client::Vmar,
126 pub thread: fdomain_client::Thread,
130 pub entry: u64,
134 pub stack: u64,
138 pub bootstrap: fdomain_client::Channel,
142 pub vdso_base: u64,
146 pub base: u64,
150}
151
152impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ProcessStartData {}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct ResolverResolveResponse {
156 pub status: i32,
157 pub executable: Option<fdomain_client::Vmo>,
158 pub ldsvc: Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
159}
160
161impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ResolverResolveResponse {}
162
163#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
164pub struct LauncherMarker;
165
166impl fdomain_client::fidl::ProtocolMarker for LauncherMarker {
167 type Proxy = LauncherProxy;
168 type RequestStream = LauncherRequestStream;
169
170 const DEBUG_NAME: &'static str = "fuchsia.process.Launcher";
171}
172impl fdomain_client::fidl::DiscoverableProtocolMarker for LauncherMarker {}
173
174pub trait LauncherProxyInterface: Send + Sync {
175 type LaunchResponseFut: std::future::Future<Output = Result<(i32, Option<fdomain_client::Process>), fidl::Error>>
176 + Send;
177 fn r#launch(&self, info: LaunchInfo) -> Self::LaunchResponseFut;
178 type CreateWithoutStartingResponseFut: std::future::Future<Output = Result<(i32, Option<Box<ProcessStartData>>), fidl::Error>>
179 + Send;
180 fn r#create_without_starting(&self, info: LaunchInfo)
181 -> Self::CreateWithoutStartingResponseFut;
182 fn r#add_args(&self, args: &[Vec<u8>]) -> Result<(), fidl::Error>;
183 fn r#add_environs(&self, environ: &[Vec<u8>]) -> Result<(), fidl::Error>;
184 fn r#add_names(&self, names: Vec<NameInfo>) -> Result<(), fidl::Error>;
185 fn r#add_handles(&self, handles: Vec<HandleInfo>) -> Result<(), fidl::Error>;
186 fn r#set_options(&self, options: u32) -> Result<(), fidl::Error>;
187}
188
189#[derive(Debug, Clone)]
190pub struct LauncherProxy {
191 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
192}
193
194impl fdomain_client::fidl::Proxy for LauncherProxy {
195 type Protocol = LauncherMarker;
196
197 fn from_channel(inner: fdomain_client::Channel) -> Self {
198 Self::new(inner)
199 }
200
201 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
202 self.client.into_channel().map_err(|client| Self { client })
203 }
204
205 fn as_channel(&self) -> &fdomain_client::Channel {
206 self.client.as_channel()
207 }
208}
209
210impl LauncherProxy {
211 pub fn new(channel: fdomain_client::Channel) -> Self {
213 let protocol_name = <LauncherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
214 Self { client: fidl::client::Client::new(channel, protocol_name) }
215 }
216
217 pub fn take_event_stream(&self) -> LauncherEventStream {
223 LauncherEventStream { event_receiver: self.client.take_event_receiver() }
224 }
225
226 pub fn r#launch(
233 &self,
234 mut info: LaunchInfo,
235 ) -> fidl::client::QueryResponseFut<
236 (i32, Option<fdomain_client::Process>),
237 fdomain_client::fidl::FDomainResourceDialect,
238 > {
239 LauncherProxyInterface::r#launch(self, info)
240 }
241
242 pub fn r#create_without_starting(
252 &self,
253 mut info: LaunchInfo,
254 ) -> fidl::client::QueryResponseFut<
255 (i32, Option<Box<ProcessStartData>>),
256 fdomain_client::fidl::FDomainResourceDialect,
257 > {
258 LauncherProxyInterface::r#create_without_starting(self, info)
259 }
260
261 pub fn r#add_args(&self, mut args: &[Vec<u8>]) -> Result<(), fidl::Error> {
265 LauncherProxyInterface::r#add_args(self, args)
266 }
267
268 pub fn r#add_environs(&self, mut environ: &[Vec<u8>]) -> Result<(), fidl::Error> {
272 LauncherProxyInterface::r#add_environs(self, environ)
273 }
274
275 pub fn r#add_names(&self, mut names: Vec<NameInfo>) -> Result<(), fidl::Error> {
282 LauncherProxyInterface::r#add_names(self, names)
283 }
284
285 pub fn r#add_handles(&self, mut handles: Vec<HandleInfo>) -> Result<(), fidl::Error> {
289 LauncherProxyInterface::r#add_handles(self, handles)
290 }
291
292 pub fn r#set_options(&self, mut options: u32) -> Result<(), fidl::Error> {
296 LauncherProxyInterface::r#set_options(self, options)
297 }
298}
299
300impl LauncherProxyInterface for LauncherProxy {
301 type LaunchResponseFut = fidl::client::QueryResponseFut<
302 (i32, Option<fdomain_client::Process>),
303 fdomain_client::fidl::FDomainResourceDialect,
304 >;
305 fn r#launch(&self, mut info: LaunchInfo) -> Self::LaunchResponseFut {
306 fn _decode(
307 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
308 ) -> Result<(i32, Option<fdomain_client::Process>), fidl::Error> {
309 let _response = fidl::client::decode_transaction_body::<
310 LauncherLaunchResponse,
311 fdomain_client::fidl::FDomainResourceDialect,
312 0x11335a9928afbfa4,
313 >(_buf?)?;
314 Ok((_response.status, _response.process))
315 }
316 self.client
317 .send_query_and_decode::<LauncherLaunchRequest, (i32, Option<fdomain_client::Process>)>(
318 (&mut info,),
319 0x11335a9928afbfa4,
320 fidl::encoding::DynamicFlags::empty(),
321 _decode,
322 )
323 }
324
325 type CreateWithoutStartingResponseFut = fidl::client::QueryResponseFut<
326 (i32, Option<Box<ProcessStartData>>),
327 fdomain_client::fidl::FDomainResourceDialect,
328 >;
329 fn r#create_without_starting(
330 &self,
331 mut info: LaunchInfo,
332 ) -> Self::CreateWithoutStartingResponseFut {
333 fn _decode(
334 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
335 ) -> Result<(i32, Option<Box<ProcessStartData>>), fidl::Error> {
336 let _response = fidl::client::decode_transaction_body::<
337 LauncherCreateWithoutStartingResponse,
338 fdomain_client::fidl::FDomainResourceDialect,
339 0x755f8263fe51cb61,
340 >(_buf?)?;
341 Ok((_response.status, _response.data))
342 }
343 self.client.send_query_and_decode::<
344 LauncherCreateWithoutStartingRequest,
345 (i32, Option<Box<ProcessStartData>>),
346 >(
347 (&mut info,),
348 0x755f8263fe51cb61,
349 fidl::encoding::DynamicFlags::empty(),
350 _decode,
351 )
352 }
353
354 fn r#add_args(&self, mut args: &[Vec<u8>]) -> Result<(), fidl::Error> {
355 self.client.send::<LauncherAddArgsRequest>(
356 (args,),
357 0x3be445d3e4fd6512,
358 fidl::encoding::DynamicFlags::empty(),
359 )
360 }
361
362 fn r#add_environs(&self, mut environ: &[Vec<u8>]) -> Result<(), fidl::Error> {
363 self.client.send::<LauncherAddEnvironsRequest>(
364 (environ,),
365 0x73a3c97fa7fe1779,
366 fidl::encoding::DynamicFlags::empty(),
367 )
368 }
369
370 fn r#add_names(&self, mut names: Vec<NameInfo>) -> Result<(), fidl::Error> {
371 self.client.send::<LauncherAddNamesRequest>(
372 (names.as_mut(),),
373 0x2579ee2c7be28662,
374 fidl::encoding::DynamicFlags::empty(),
375 )
376 }
377
378 fn r#add_handles(&self, mut handles: Vec<HandleInfo>) -> Result<(), fidl::Error> {
379 self.client.send::<LauncherAddHandlesRequest>(
380 (handles.as_mut(),),
381 0x51025267a537a615,
382 fidl::encoding::DynamicFlags::empty(),
383 )
384 }
385
386 fn r#set_options(&self, mut options: u32) -> Result<(), fidl::Error> {
387 self.client.send::<LauncherSetOptionsRequest>(
388 (options,),
389 0x5b92576147ebfd87,
390 fidl::encoding::DynamicFlags::empty(),
391 )
392 }
393}
394
395pub struct LauncherEventStream {
396 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
397}
398
399impl std::marker::Unpin for LauncherEventStream {}
400
401impl futures::stream::FusedStream for LauncherEventStream {
402 fn is_terminated(&self) -> bool {
403 self.event_receiver.is_terminated()
404 }
405}
406
407impl futures::Stream for LauncherEventStream {
408 type Item = Result<LauncherEvent, fidl::Error>;
409
410 fn poll_next(
411 mut self: std::pin::Pin<&mut Self>,
412 cx: &mut std::task::Context<'_>,
413 ) -> std::task::Poll<Option<Self::Item>> {
414 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
415 &mut self.event_receiver,
416 cx
417 )?) {
418 Some(buf) => std::task::Poll::Ready(Some(LauncherEvent::decode(buf))),
419 None => std::task::Poll::Ready(None),
420 }
421 }
422}
423
424#[derive(Debug)]
425pub enum LauncherEvent {}
426
427impl LauncherEvent {
428 fn decode(
430 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
431 ) -> Result<LauncherEvent, fidl::Error> {
432 let (bytes, _handles) = buf.split_mut();
433 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
434 debug_assert_eq!(tx_header.tx_id, 0);
435 match tx_header.ordinal {
436 _ => Err(fidl::Error::UnknownOrdinal {
437 ordinal: tx_header.ordinal,
438 protocol_name: <LauncherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
439 }),
440 }
441 }
442}
443
444pub struct LauncherRequestStream {
446 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
447 is_terminated: bool,
448}
449
450impl std::marker::Unpin for LauncherRequestStream {}
451
452impl futures::stream::FusedStream for LauncherRequestStream {
453 fn is_terminated(&self) -> bool {
454 self.is_terminated
455 }
456}
457
458impl fdomain_client::fidl::RequestStream for LauncherRequestStream {
459 type Protocol = LauncherMarker;
460 type ControlHandle = LauncherControlHandle;
461
462 fn from_channel(channel: fdomain_client::Channel) -> Self {
463 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
464 }
465
466 fn control_handle(&self) -> Self::ControlHandle {
467 LauncherControlHandle { inner: self.inner.clone() }
468 }
469
470 fn into_inner(
471 self,
472 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
473 {
474 (self.inner, self.is_terminated)
475 }
476
477 fn from_inner(
478 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
479 is_terminated: bool,
480 ) -> Self {
481 Self { inner, is_terminated }
482 }
483}
484
485impl futures::Stream for LauncherRequestStream {
486 type Item = Result<LauncherRequest, fidl::Error>;
487
488 fn poll_next(
489 mut self: std::pin::Pin<&mut Self>,
490 cx: &mut std::task::Context<'_>,
491 ) -> std::task::Poll<Option<Self::Item>> {
492 let this = &mut *self;
493 if this.inner.check_shutdown(cx) {
494 this.is_terminated = true;
495 return std::task::Poll::Ready(None);
496 }
497 if this.is_terminated {
498 panic!("polled LauncherRequestStream after completion");
499 }
500 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
501 |bytes, handles| {
502 match this.inner.channel().read_etc(cx, bytes, handles) {
503 std::task::Poll::Ready(Ok(())) => {}
504 std::task::Poll::Pending => return std::task::Poll::Pending,
505 std::task::Poll::Ready(Err(None)) => {
506 this.is_terminated = true;
507 return std::task::Poll::Ready(None);
508 }
509 std::task::Poll::Ready(Err(Some(e))) => {
510 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
511 e.into(),
512 ))));
513 }
514 }
515
516 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
518
519 std::task::Poll::Ready(Some(match header.ordinal {
520 0x11335a9928afbfa4 => {
521 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
522 let mut req = fidl::new_empty!(
523 LauncherLaunchRequest,
524 fdomain_client::fidl::FDomainResourceDialect
525 );
526 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherLaunchRequest>(&header, _body_bytes, handles, &mut req)?;
527 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
528 Ok(LauncherRequest::Launch {
529 info: req.info,
530
531 responder: LauncherLaunchResponder {
532 control_handle: std::mem::ManuallyDrop::new(control_handle),
533 tx_id: header.tx_id,
534 },
535 })
536 }
537 0x755f8263fe51cb61 => {
538 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
539 let mut req = fidl::new_empty!(
540 LauncherCreateWithoutStartingRequest,
541 fdomain_client::fidl::FDomainResourceDialect
542 );
543 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherCreateWithoutStartingRequest>(&header, _body_bytes, handles, &mut req)?;
544 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
545 Ok(LauncherRequest::CreateWithoutStarting {
546 info: req.info,
547
548 responder: LauncherCreateWithoutStartingResponder {
549 control_handle: std::mem::ManuallyDrop::new(control_handle),
550 tx_id: header.tx_id,
551 },
552 })
553 }
554 0x3be445d3e4fd6512 => {
555 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
556 let mut req = fidl::new_empty!(
557 LauncherAddArgsRequest,
558 fdomain_client::fidl::FDomainResourceDialect
559 );
560 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherAddArgsRequest>(&header, _body_bytes, handles, &mut req)?;
561 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
562 Ok(LauncherRequest::AddArgs { args: req.args, control_handle })
563 }
564 0x73a3c97fa7fe1779 => {
565 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
566 let mut req = fidl::new_empty!(
567 LauncherAddEnvironsRequest,
568 fdomain_client::fidl::FDomainResourceDialect
569 );
570 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherAddEnvironsRequest>(&header, _body_bytes, handles, &mut req)?;
571 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
572 Ok(LauncherRequest::AddEnvirons { environ: req.environ, control_handle })
573 }
574 0x2579ee2c7be28662 => {
575 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
576 let mut req = fidl::new_empty!(
577 LauncherAddNamesRequest,
578 fdomain_client::fidl::FDomainResourceDialect
579 );
580 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherAddNamesRequest>(&header, _body_bytes, handles, &mut req)?;
581 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
582 Ok(LauncherRequest::AddNames { names: req.names, control_handle })
583 }
584 0x51025267a537a615 => {
585 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
586 let mut req = fidl::new_empty!(
587 LauncherAddHandlesRequest,
588 fdomain_client::fidl::FDomainResourceDialect
589 );
590 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherAddHandlesRequest>(&header, _body_bytes, handles, &mut req)?;
591 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
592 Ok(LauncherRequest::AddHandles { handles: req.handles, control_handle })
593 }
594 0x5b92576147ebfd87 => {
595 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
596 let mut req = fidl::new_empty!(
597 LauncherSetOptionsRequest,
598 fdomain_client::fidl::FDomainResourceDialect
599 );
600 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LauncherSetOptionsRequest>(&header, _body_bytes, handles, &mut req)?;
601 let control_handle = LauncherControlHandle { inner: this.inner.clone() };
602 Ok(LauncherRequest::SetOptions { options: req.options, control_handle })
603 }
604 _ => Err(fidl::Error::UnknownOrdinal {
605 ordinal: header.ordinal,
606 protocol_name:
607 <LauncherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
608 }),
609 }))
610 },
611 )
612 }
613}
614
615#[derive(Debug)]
629pub enum LauncherRequest {
630 Launch { info: LaunchInfo, responder: LauncherLaunchResponder },
637 CreateWithoutStarting { info: LaunchInfo, responder: LauncherCreateWithoutStartingResponder },
647 AddArgs { args: Vec<Vec<u8>>, control_handle: LauncherControlHandle },
651 AddEnvirons { environ: Vec<Vec<u8>>, control_handle: LauncherControlHandle },
655 AddNames { names: Vec<NameInfo>, control_handle: LauncherControlHandle },
662 AddHandles { handles: Vec<HandleInfo>, control_handle: LauncherControlHandle },
666 SetOptions { options: u32, control_handle: LauncherControlHandle },
670}
671
672impl LauncherRequest {
673 #[allow(irrefutable_let_patterns)]
674 pub fn into_launch(self) -> Option<(LaunchInfo, LauncherLaunchResponder)> {
675 if let LauncherRequest::Launch { info, responder } = self {
676 Some((info, responder))
677 } else {
678 None
679 }
680 }
681
682 #[allow(irrefutable_let_patterns)]
683 pub fn into_create_without_starting(
684 self,
685 ) -> Option<(LaunchInfo, LauncherCreateWithoutStartingResponder)> {
686 if let LauncherRequest::CreateWithoutStarting { info, responder } = self {
687 Some((info, responder))
688 } else {
689 None
690 }
691 }
692
693 #[allow(irrefutable_let_patterns)]
694 pub fn into_add_args(self) -> Option<(Vec<Vec<u8>>, LauncherControlHandle)> {
695 if let LauncherRequest::AddArgs { args, control_handle } = self {
696 Some((args, control_handle))
697 } else {
698 None
699 }
700 }
701
702 #[allow(irrefutable_let_patterns)]
703 pub fn into_add_environs(self) -> Option<(Vec<Vec<u8>>, LauncherControlHandle)> {
704 if let LauncherRequest::AddEnvirons { environ, control_handle } = self {
705 Some((environ, control_handle))
706 } else {
707 None
708 }
709 }
710
711 #[allow(irrefutable_let_patterns)]
712 pub fn into_add_names(self) -> Option<(Vec<NameInfo>, LauncherControlHandle)> {
713 if let LauncherRequest::AddNames { names, control_handle } = self {
714 Some((names, control_handle))
715 } else {
716 None
717 }
718 }
719
720 #[allow(irrefutable_let_patterns)]
721 pub fn into_add_handles(self) -> Option<(Vec<HandleInfo>, LauncherControlHandle)> {
722 if let LauncherRequest::AddHandles { handles, control_handle } = self {
723 Some((handles, control_handle))
724 } else {
725 None
726 }
727 }
728
729 #[allow(irrefutable_let_patterns)]
730 pub fn into_set_options(self) -> Option<(u32, LauncherControlHandle)> {
731 if let LauncherRequest::SetOptions { options, control_handle } = self {
732 Some((options, control_handle))
733 } else {
734 None
735 }
736 }
737
738 pub fn method_name(&self) -> &'static str {
740 match *self {
741 LauncherRequest::Launch { .. } => "launch",
742 LauncherRequest::CreateWithoutStarting { .. } => "create_without_starting",
743 LauncherRequest::AddArgs { .. } => "add_args",
744 LauncherRequest::AddEnvirons { .. } => "add_environs",
745 LauncherRequest::AddNames { .. } => "add_names",
746 LauncherRequest::AddHandles { .. } => "add_handles",
747 LauncherRequest::SetOptions { .. } => "set_options",
748 }
749 }
750}
751
752#[derive(Debug, Clone)]
753pub struct LauncherControlHandle {
754 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
755}
756
757impl fdomain_client::fidl::ControlHandle for LauncherControlHandle {
758 fn shutdown(&self) {
759 self.inner.shutdown()
760 }
761
762 fn is_closed(&self) -> bool {
763 self.inner.channel().is_closed()
764 }
765 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
766 self.inner.channel().on_closed()
767 }
768}
769
770impl LauncherControlHandle {}
771
772#[must_use = "FIDL methods require a response to be sent"]
773#[derive(Debug)]
774pub struct LauncherLaunchResponder {
775 control_handle: std::mem::ManuallyDrop<LauncherControlHandle>,
776 tx_id: u32,
777}
778
779impl std::ops::Drop for LauncherLaunchResponder {
783 fn drop(&mut self) {
784 self.control_handle.shutdown();
785 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
787 }
788}
789
790impl fdomain_client::fidl::Responder for LauncherLaunchResponder {
791 type ControlHandle = LauncherControlHandle;
792
793 fn control_handle(&self) -> &LauncherControlHandle {
794 &self.control_handle
795 }
796
797 fn drop_without_shutdown(mut self) {
798 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
800 std::mem::forget(self);
802 }
803}
804
805impl LauncherLaunchResponder {
806 pub fn send(
810 self,
811 mut status: i32,
812 mut process: Option<fdomain_client::Process>,
813 ) -> Result<(), fidl::Error> {
814 let _result = self.send_raw(status, process);
815 if _result.is_err() {
816 self.control_handle.shutdown();
817 }
818 self.drop_without_shutdown();
819 _result
820 }
821
822 pub fn send_no_shutdown_on_err(
824 self,
825 mut status: i32,
826 mut process: Option<fdomain_client::Process>,
827 ) -> Result<(), fidl::Error> {
828 let _result = self.send_raw(status, process);
829 self.drop_without_shutdown();
830 _result
831 }
832
833 fn send_raw(
834 &self,
835 mut status: i32,
836 mut process: Option<fdomain_client::Process>,
837 ) -> Result<(), fidl::Error> {
838 self.control_handle.inner.send::<LauncherLaunchResponse>(
839 (status, process),
840 self.tx_id,
841 0x11335a9928afbfa4,
842 fidl::encoding::DynamicFlags::empty(),
843 )
844 }
845}
846
847#[must_use = "FIDL methods require a response to be sent"]
848#[derive(Debug)]
849pub struct LauncherCreateWithoutStartingResponder {
850 control_handle: std::mem::ManuallyDrop<LauncherControlHandle>,
851 tx_id: u32,
852}
853
854impl std::ops::Drop for LauncherCreateWithoutStartingResponder {
858 fn drop(&mut self) {
859 self.control_handle.shutdown();
860 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
862 }
863}
864
865impl fdomain_client::fidl::Responder for LauncherCreateWithoutStartingResponder {
866 type ControlHandle = LauncherControlHandle;
867
868 fn control_handle(&self) -> &LauncherControlHandle {
869 &self.control_handle
870 }
871
872 fn drop_without_shutdown(mut self) {
873 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
875 std::mem::forget(self);
877 }
878}
879
880impl LauncherCreateWithoutStartingResponder {
881 pub fn send(
885 self,
886 mut status: i32,
887 mut data: Option<ProcessStartData>,
888 ) -> Result<(), fidl::Error> {
889 let _result = self.send_raw(status, data);
890 if _result.is_err() {
891 self.control_handle.shutdown();
892 }
893 self.drop_without_shutdown();
894 _result
895 }
896
897 pub fn send_no_shutdown_on_err(
899 self,
900 mut status: i32,
901 mut data: Option<ProcessStartData>,
902 ) -> Result<(), fidl::Error> {
903 let _result = self.send_raw(status, data);
904 self.drop_without_shutdown();
905 _result
906 }
907
908 fn send_raw(
909 &self,
910 mut status: i32,
911 mut data: Option<ProcessStartData>,
912 ) -> Result<(), fidl::Error> {
913 self.control_handle.inner.send::<LauncherCreateWithoutStartingResponse>(
914 (status, data.as_mut()),
915 self.tx_id,
916 0x755f8263fe51cb61,
917 fidl::encoding::DynamicFlags::empty(),
918 )
919 }
920}
921
922#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
923pub struct ResolverMarker;
924
925impl fdomain_client::fidl::ProtocolMarker for ResolverMarker {
926 type Proxy = ResolverProxy;
927 type RequestStream = ResolverRequestStream;
928
929 const DEBUG_NAME: &'static str = "fuchsia.process.Resolver";
930}
931impl fdomain_client::fidl::DiscoverableProtocolMarker for ResolverMarker {}
932
933pub trait ResolverProxyInterface: Send + Sync {
934 type ResolveResponseFut: std::future::Future<
935 Output = Result<
936 (
937 i32,
938 Option<fdomain_client::Vmo>,
939 Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
940 ),
941 fidl::Error,
942 >,
943 > + Send;
944 fn r#resolve(&self, name: &str) -> Self::ResolveResponseFut;
945}
946
947#[derive(Debug, Clone)]
948pub struct ResolverProxy {
949 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
950}
951
952impl fdomain_client::fidl::Proxy for ResolverProxy {
953 type Protocol = ResolverMarker;
954
955 fn from_channel(inner: fdomain_client::Channel) -> Self {
956 Self::new(inner)
957 }
958
959 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
960 self.client.into_channel().map_err(|client| Self { client })
961 }
962
963 fn as_channel(&self) -> &fdomain_client::Channel {
964 self.client.as_channel()
965 }
966}
967
968impl ResolverProxy {
969 pub fn new(channel: fdomain_client::Channel) -> Self {
971 let protocol_name = <ResolverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
972 Self { client: fidl::client::Client::new(channel, protocol_name) }
973 }
974
975 pub fn take_event_stream(&self) -> ResolverEventStream {
981 ResolverEventStream { event_receiver: self.client.take_event_receiver() }
982 }
983
984 pub fn r#resolve(
996 &self,
997 mut name: &str,
998 ) -> fidl::client::QueryResponseFut<
999 (
1000 i32,
1001 Option<fdomain_client::Vmo>,
1002 Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1003 ),
1004 fdomain_client::fidl::FDomainResourceDialect,
1005 > {
1006 ResolverProxyInterface::r#resolve(self, name)
1007 }
1008}
1009
1010impl ResolverProxyInterface for ResolverProxy {
1011 type ResolveResponseFut = fidl::client::QueryResponseFut<
1012 (
1013 i32,
1014 Option<fdomain_client::Vmo>,
1015 Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1016 ),
1017 fdomain_client::fidl::FDomainResourceDialect,
1018 >;
1019 fn r#resolve(&self, mut name: &str) -> Self::ResolveResponseFut {
1020 fn _decode(
1021 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1022 ) -> Result<
1023 (
1024 i32,
1025 Option<fdomain_client::Vmo>,
1026 Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1027 ),
1028 fidl::Error,
1029 > {
1030 let _response = fidl::client::decode_transaction_body::<
1031 ResolverResolveResponse,
1032 fdomain_client::fidl::FDomainResourceDialect,
1033 0x3c15951efde89c90,
1034 >(_buf?)?;
1035 Ok((_response.status, _response.executable, _response.ldsvc))
1036 }
1037 self.client.send_query_and_decode::<ResolverResolveRequest, (
1038 i32,
1039 Option<fdomain_client::Vmo>,
1040 Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1041 )>(
1042 (name,), 0x3c15951efde89c90, fidl::encoding::DynamicFlags::empty(), _decode
1043 )
1044 }
1045}
1046
1047pub struct ResolverEventStream {
1048 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1049}
1050
1051impl std::marker::Unpin for ResolverEventStream {}
1052
1053impl futures::stream::FusedStream for ResolverEventStream {
1054 fn is_terminated(&self) -> bool {
1055 self.event_receiver.is_terminated()
1056 }
1057}
1058
1059impl futures::Stream for ResolverEventStream {
1060 type Item = Result<ResolverEvent, fidl::Error>;
1061
1062 fn poll_next(
1063 mut self: std::pin::Pin<&mut Self>,
1064 cx: &mut std::task::Context<'_>,
1065 ) -> std::task::Poll<Option<Self::Item>> {
1066 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1067 &mut self.event_receiver,
1068 cx
1069 )?) {
1070 Some(buf) => std::task::Poll::Ready(Some(ResolverEvent::decode(buf))),
1071 None => std::task::Poll::Ready(None),
1072 }
1073 }
1074}
1075
1076#[derive(Debug)]
1077pub enum ResolverEvent {}
1078
1079impl ResolverEvent {
1080 fn decode(
1082 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1083 ) -> Result<ResolverEvent, fidl::Error> {
1084 let (bytes, _handles) = buf.split_mut();
1085 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1086 debug_assert_eq!(tx_header.tx_id, 0);
1087 match tx_header.ordinal {
1088 _ => Err(fidl::Error::UnknownOrdinal {
1089 ordinal: tx_header.ordinal,
1090 protocol_name: <ResolverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1091 }),
1092 }
1093 }
1094}
1095
1096pub struct ResolverRequestStream {
1098 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1099 is_terminated: bool,
1100}
1101
1102impl std::marker::Unpin for ResolverRequestStream {}
1103
1104impl futures::stream::FusedStream for ResolverRequestStream {
1105 fn is_terminated(&self) -> bool {
1106 self.is_terminated
1107 }
1108}
1109
1110impl fdomain_client::fidl::RequestStream for ResolverRequestStream {
1111 type Protocol = ResolverMarker;
1112 type ControlHandle = ResolverControlHandle;
1113
1114 fn from_channel(channel: fdomain_client::Channel) -> Self {
1115 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1116 }
1117
1118 fn control_handle(&self) -> Self::ControlHandle {
1119 ResolverControlHandle { inner: self.inner.clone() }
1120 }
1121
1122 fn into_inner(
1123 self,
1124 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1125 {
1126 (self.inner, self.is_terminated)
1127 }
1128
1129 fn from_inner(
1130 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1131 is_terminated: bool,
1132 ) -> Self {
1133 Self { inner, is_terminated }
1134 }
1135}
1136
1137impl futures::Stream for ResolverRequestStream {
1138 type Item = Result<ResolverRequest, fidl::Error>;
1139
1140 fn poll_next(
1141 mut self: std::pin::Pin<&mut Self>,
1142 cx: &mut std::task::Context<'_>,
1143 ) -> std::task::Poll<Option<Self::Item>> {
1144 let this = &mut *self;
1145 if this.inner.check_shutdown(cx) {
1146 this.is_terminated = true;
1147 return std::task::Poll::Ready(None);
1148 }
1149 if this.is_terminated {
1150 panic!("polled ResolverRequestStream after completion");
1151 }
1152 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1153 |bytes, handles| {
1154 match this.inner.channel().read_etc(cx, bytes, handles) {
1155 std::task::Poll::Ready(Ok(())) => {}
1156 std::task::Poll::Pending => return std::task::Poll::Pending,
1157 std::task::Poll::Ready(Err(None)) => {
1158 this.is_terminated = true;
1159 return std::task::Poll::Ready(None);
1160 }
1161 std::task::Poll::Ready(Err(Some(e))) => {
1162 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1163 e.into(),
1164 ))));
1165 }
1166 }
1167
1168 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1170
1171 std::task::Poll::Ready(Some(match header.ordinal {
1172 0x3c15951efde89c90 => {
1173 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1174 let mut req = fidl::new_empty!(
1175 ResolverResolveRequest,
1176 fdomain_client::fidl::FDomainResourceDialect
1177 );
1178 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ResolverResolveRequest>(&header, _body_bytes, handles, &mut req)?;
1179 let control_handle = ResolverControlHandle { inner: this.inner.clone() };
1180 Ok(ResolverRequest::Resolve {
1181 name: req.name,
1182
1183 responder: ResolverResolveResponder {
1184 control_handle: std::mem::ManuallyDrop::new(control_handle),
1185 tx_id: header.tx_id,
1186 },
1187 })
1188 }
1189 _ => Err(fidl::Error::UnknownOrdinal {
1190 ordinal: header.ordinal,
1191 protocol_name:
1192 <ResolverMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1193 }),
1194 }))
1195 },
1196 )
1197 }
1198}
1199
1200#[derive(Debug)]
1216pub enum ResolverRequest {
1217 Resolve { name: String, responder: ResolverResolveResponder },
1229}
1230
1231impl ResolverRequest {
1232 #[allow(irrefutable_let_patterns)]
1233 pub fn into_resolve(self) -> Option<(String, ResolverResolveResponder)> {
1234 if let ResolverRequest::Resolve { name, responder } = self {
1235 Some((name, responder))
1236 } else {
1237 None
1238 }
1239 }
1240
1241 pub fn method_name(&self) -> &'static str {
1243 match *self {
1244 ResolverRequest::Resolve { .. } => "resolve",
1245 }
1246 }
1247}
1248
1249#[derive(Debug, Clone)]
1250pub struct ResolverControlHandle {
1251 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1252}
1253
1254impl fdomain_client::fidl::ControlHandle for ResolverControlHandle {
1255 fn shutdown(&self) {
1256 self.inner.shutdown()
1257 }
1258
1259 fn is_closed(&self) -> bool {
1260 self.inner.channel().is_closed()
1261 }
1262 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
1263 self.inner.channel().on_closed()
1264 }
1265}
1266
1267impl ResolverControlHandle {}
1268
1269#[must_use = "FIDL methods require a response to be sent"]
1270#[derive(Debug)]
1271pub struct ResolverResolveResponder {
1272 control_handle: std::mem::ManuallyDrop<ResolverControlHandle>,
1273 tx_id: u32,
1274}
1275
1276impl std::ops::Drop for ResolverResolveResponder {
1280 fn drop(&mut self) {
1281 self.control_handle.shutdown();
1282 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1284 }
1285}
1286
1287impl fdomain_client::fidl::Responder for ResolverResolveResponder {
1288 type ControlHandle = ResolverControlHandle;
1289
1290 fn control_handle(&self) -> &ResolverControlHandle {
1291 &self.control_handle
1292 }
1293
1294 fn drop_without_shutdown(mut self) {
1295 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1297 std::mem::forget(self);
1299 }
1300}
1301
1302impl ResolverResolveResponder {
1303 pub fn send(
1307 self,
1308 mut status: i32,
1309 mut executable: Option<fdomain_client::Vmo>,
1310 mut ldsvc: Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1311 ) -> Result<(), fidl::Error> {
1312 let _result = self.send_raw(status, executable, ldsvc);
1313 if _result.is_err() {
1314 self.control_handle.shutdown();
1315 }
1316 self.drop_without_shutdown();
1317 _result
1318 }
1319
1320 pub fn send_no_shutdown_on_err(
1322 self,
1323 mut status: i32,
1324 mut executable: Option<fdomain_client::Vmo>,
1325 mut ldsvc: Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1326 ) -> Result<(), fidl::Error> {
1327 let _result = self.send_raw(status, executable, ldsvc);
1328 self.drop_without_shutdown();
1329 _result
1330 }
1331
1332 fn send_raw(
1333 &self,
1334 mut status: i32,
1335 mut executable: Option<fdomain_client::Vmo>,
1336 mut ldsvc: Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>>,
1337 ) -> Result<(), fidl::Error> {
1338 self.control_handle.inner.send::<ResolverResolveResponse>(
1339 (status, executable, ldsvc),
1340 self.tx_id,
1341 0x3c15951efde89c90,
1342 fidl::encoding::DynamicFlags::empty(),
1343 )
1344 }
1345}
1346
1347mod internal {
1348 use super::*;
1349
1350 impl fidl::encoding::ResourceTypeMarker for HandleInfo {
1351 type Borrowed<'a> = &'a mut Self;
1352 fn take_or_borrow<'a>(
1353 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1354 ) -> Self::Borrowed<'a> {
1355 value
1356 }
1357 }
1358
1359 unsafe impl fidl::encoding::TypeMarker for HandleInfo {
1360 type Owned = Self;
1361
1362 #[inline(always)]
1363 fn inline_align(_context: fidl::encoding::Context) -> usize {
1364 4
1365 }
1366
1367 #[inline(always)]
1368 fn inline_size(_context: fidl::encoding::Context) -> usize {
1369 8
1370 }
1371 }
1372
1373 unsafe impl fidl::encoding::Encode<HandleInfo, fdomain_client::fidl::FDomainResourceDialect>
1374 for &mut HandleInfo
1375 {
1376 #[inline]
1377 unsafe fn encode(
1378 self,
1379 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1380 offset: usize,
1381 _depth: fidl::encoding::Depth,
1382 ) -> fidl::Result<()> {
1383 encoder.debug_check_bounds::<HandleInfo>(offset);
1384 fidl::encoding::Encode::<HandleInfo, fdomain_client::fidl::FDomainResourceDialect>::encode(
1386 (
1387 <fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handle),
1388 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1389 ),
1390 encoder, offset, _depth
1391 )
1392 }
1393 }
1394 unsafe impl<
1395 T0: fidl::encoding::Encode<
1396 fidl::encoding::HandleType<
1397 fdomain_client::Handle,
1398 { fidl::ObjectType::NONE.into_raw() },
1399 2147483648,
1400 >,
1401 fdomain_client::fidl::FDomainResourceDialect,
1402 >,
1403 T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
1404 > fidl::encoding::Encode<HandleInfo, fdomain_client::fidl::FDomainResourceDialect>
1405 for (T0, T1)
1406 {
1407 #[inline]
1408 unsafe fn encode(
1409 self,
1410 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1411 offset: usize,
1412 depth: fidl::encoding::Depth,
1413 ) -> fidl::Result<()> {
1414 encoder.debug_check_bounds::<HandleInfo>(offset);
1415 self.0.encode(encoder, offset + 0, depth)?;
1419 self.1.encode(encoder, offset + 4, depth)?;
1420 Ok(())
1421 }
1422 }
1423
1424 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for HandleInfo {
1425 #[inline(always)]
1426 fn new_empty() -> Self {
1427 Self {
1428 handle: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
1429 id: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
1430 }
1431 }
1432
1433 #[inline]
1434 unsafe fn decode(
1435 &mut self,
1436 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1437 offset: usize,
1438 _depth: fidl::encoding::Depth,
1439 ) -> fidl::Result<()> {
1440 decoder.debug_check_bounds::<Self>(offset);
1441 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
1443 fidl::decode!(
1444 u32,
1445 fdomain_client::fidl::FDomainResourceDialect,
1446 &mut self.id,
1447 decoder,
1448 offset + 4,
1449 _depth
1450 )?;
1451 Ok(())
1452 }
1453 }
1454
1455 impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
1456 type Borrowed<'a> = &'a mut Self;
1457 fn take_or_borrow<'a>(
1458 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1459 ) -> Self::Borrowed<'a> {
1460 value
1461 }
1462 }
1463
1464 unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
1465 type Owned = Self;
1466
1467 #[inline(always)]
1468 fn inline_align(_context: fidl::encoding::Context) -> usize {
1469 8
1470 }
1471
1472 #[inline(always)]
1473 fn inline_size(_context: fidl::encoding::Context) -> usize {
1474 24
1475 }
1476 }
1477
1478 unsafe impl fidl::encoding::Encode<LaunchInfo, fdomain_client::fidl::FDomainResourceDialect>
1479 for &mut LaunchInfo
1480 {
1481 #[inline]
1482 unsafe fn encode(
1483 self,
1484 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1485 offset: usize,
1486 _depth: fidl::encoding::Depth,
1487 ) -> fidl::Result<()> {
1488 encoder.debug_check_bounds::<LaunchInfo>(offset);
1489 fidl::encoding::Encode::<LaunchInfo, fdomain_client::fidl::FDomainResourceDialect>::encode(
1491 (
1492 <fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.executable),
1493 <fidl::encoding::HandleType<fdomain_client::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.job),
1494 <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
1495 ),
1496 encoder, offset, _depth
1497 )
1498 }
1499 }
1500 unsafe impl<
1501 T0: fidl::encoding::Encode<
1502 fidl::encoding::HandleType<
1503 fdomain_client::Vmo,
1504 { fidl::ObjectType::VMO.into_raw() },
1505 2147483648,
1506 >,
1507 fdomain_client::fidl::FDomainResourceDialect,
1508 >,
1509 T1: fidl::encoding::Encode<
1510 fidl::encoding::HandleType<
1511 fdomain_client::Job,
1512 { fidl::ObjectType::JOB.into_raw() },
1513 2147483648,
1514 >,
1515 fdomain_client::fidl::FDomainResourceDialect,
1516 >,
1517 T2: fidl::encoding::Encode<
1518 fidl::encoding::BoundedString<32>,
1519 fdomain_client::fidl::FDomainResourceDialect,
1520 >,
1521 > fidl::encoding::Encode<LaunchInfo, fdomain_client::fidl::FDomainResourceDialect>
1522 for (T0, T1, T2)
1523 {
1524 #[inline]
1525 unsafe fn encode(
1526 self,
1527 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1528 offset: usize,
1529 depth: fidl::encoding::Depth,
1530 ) -> fidl::Result<()> {
1531 encoder.debug_check_bounds::<LaunchInfo>(offset);
1532 self.0.encode(encoder, offset + 0, depth)?;
1536 self.1.encode(encoder, offset + 4, depth)?;
1537 self.2.encode(encoder, offset + 8, depth)?;
1538 Ok(())
1539 }
1540 }
1541
1542 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for LaunchInfo {
1543 #[inline(always)]
1544 fn new_empty() -> Self {
1545 Self {
1546 executable: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
1547 job: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
1548 name: fidl::new_empty!(
1549 fidl::encoding::BoundedString<32>,
1550 fdomain_client::fidl::FDomainResourceDialect
1551 ),
1552 }
1553 }
1554
1555 #[inline]
1556 unsafe fn decode(
1557 &mut self,
1558 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1559 offset: usize,
1560 _depth: fidl::encoding::Depth,
1561 ) -> fidl::Result<()> {
1562 decoder.debug_check_bounds::<Self>(offset);
1563 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.executable, decoder, offset + 0, _depth)?;
1565 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Job, { fidl::ObjectType::JOB.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.job, decoder, offset + 4, _depth)?;
1566 fidl::decode!(
1567 fidl::encoding::BoundedString<32>,
1568 fdomain_client::fidl::FDomainResourceDialect,
1569 &mut self.name,
1570 decoder,
1571 offset + 8,
1572 _depth
1573 )?;
1574 Ok(())
1575 }
1576 }
1577
1578 impl fidl::encoding::ResourceTypeMarker for LauncherAddHandlesRequest {
1579 type Borrowed<'a> = &'a mut Self;
1580 fn take_or_borrow<'a>(
1581 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1582 ) -> Self::Borrowed<'a> {
1583 value
1584 }
1585 }
1586
1587 unsafe impl fidl::encoding::TypeMarker for LauncherAddHandlesRequest {
1588 type Owned = Self;
1589
1590 #[inline(always)]
1591 fn inline_align(_context: fidl::encoding::Context) -> usize {
1592 8
1593 }
1594
1595 #[inline(always)]
1596 fn inline_size(_context: fidl::encoding::Context) -> usize {
1597 16
1598 }
1599 }
1600
1601 unsafe impl
1602 fidl::encoding::Encode<
1603 LauncherAddHandlesRequest,
1604 fdomain_client::fidl::FDomainResourceDialect,
1605 > for &mut LauncherAddHandlesRequest
1606 {
1607 #[inline]
1608 unsafe fn encode(
1609 self,
1610 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1611 offset: usize,
1612 _depth: fidl::encoding::Depth,
1613 ) -> fidl::Result<()> {
1614 encoder.debug_check_bounds::<LauncherAddHandlesRequest>(offset);
1615 fidl::encoding::Encode::<LauncherAddHandlesRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
1617 (
1618 <fidl::encoding::UnboundedVector<HandleInfo> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
1619 ),
1620 encoder, offset, _depth
1621 )
1622 }
1623 }
1624 unsafe impl<
1625 T0: fidl::encoding::Encode<
1626 fidl::encoding::UnboundedVector<HandleInfo>,
1627 fdomain_client::fidl::FDomainResourceDialect,
1628 >,
1629 >
1630 fidl::encoding::Encode<
1631 LauncherAddHandlesRequest,
1632 fdomain_client::fidl::FDomainResourceDialect,
1633 > for (T0,)
1634 {
1635 #[inline]
1636 unsafe fn encode(
1637 self,
1638 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1639 offset: usize,
1640 depth: fidl::encoding::Depth,
1641 ) -> fidl::Result<()> {
1642 encoder.debug_check_bounds::<LauncherAddHandlesRequest>(offset);
1643 self.0.encode(encoder, offset + 0, depth)?;
1647 Ok(())
1648 }
1649 }
1650
1651 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
1652 for LauncherAddHandlesRequest
1653 {
1654 #[inline(always)]
1655 fn new_empty() -> Self {
1656 Self {
1657 handles: fidl::new_empty!(
1658 fidl::encoding::UnboundedVector<HandleInfo>,
1659 fdomain_client::fidl::FDomainResourceDialect
1660 ),
1661 }
1662 }
1663
1664 #[inline]
1665 unsafe fn decode(
1666 &mut self,
1667 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1668 offset: usize,
1669 _depth: fidl::encoding::Depth,
1670 ) -> fidl::Result<()> {
1671 decoder.debug_check_bounds::<Self>(offset);
1672 fidl::decode!(
1674 fidl::encoding::UnboundedVector<HandleInfo>,
1675 fdomain_client::fidl::FDomainResourceDialect,
1676 &mut self.handles,
1677 decoder,
1678 offset + 0,
1679 _depth
1680 )?;
1681 Ok(())
1682 }
1683 }
1684
1685 impl fidl::encoding::ResourceTypeMarker for LauncherAddNamesRequest {
1686 type Borrowed<'a> = &'a mut Self;
1687 fn take_or_borrow<'a>(
1688 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1689 ) -> Self::Borrowed<'a> {
1690 value
1691 }
1692 }
1693
1694 unsafe impl fidl::encoding::TypeMarker for LauncherAddNamesRequest {
1695 type Owned = Self;
1696
1697 #[inline(always)]
1698 fn inline_align(_context: fidl::encoding::Context) -> usize {
1699 8
1700 }
1701
1702 #[inline(always)]
1703 fn inline_size(_context: fidl::encoding::Context) -> usize {
1704 16
1705 }
1706 }
1707
1708 unsafe impl
1709 fidl::encoding::Encode<
1710 LauncherAddNamesRequest,
1711 fdomain_client::fidl::FDomainResourceDialect,
1712 > for &mut LauncherAddNamesRequest
1713 {
1714 #[inline]
1715 unsafe fn encode(
1716 self,
1717 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1718 offset: usize,
1719 _depth: fidl::encoding::Depth,
1720 ) -> fidl::Result<()> {
1721 encoder.debug_check_bounds::<LauncherAddNamesRequest>(offset);
1722 fidl::encoding::Encode::<LauncherAddNamesRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
1724 (
1725 <fidl::encoding::UnboundedVector<NameInfo> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.names),
1726 ),
1727 encoder, offset, _depth
1728 )
1729 }
1730 }
1731 unsafe impl<
1732 T0: fidl::encoding::Encode<
1733 fidl::encoding::UnboundedVector<NameInfo>,
1734 fdomain_client::fidl::FDomainResourceDialect,
1735 >,
1736 >
1737 fidl::encoding::Encode<
1738 LauncherAddNamesRequest,
1739 fdomain_client::fidl::FDomainResourceDialect,
1740 > for (T0,)
1741 {
1742 #[inline]
1743 unsafe fn encode(
1744 self,
1745 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1746 offset: usize,
1747 depth: fidl::encoding::Depth,
1748 ) -> fidl::Result<()> {
1749 encoder.debug_check_bounds::<LauncherAddNamesRequest>(offset);
1750 self.0.encode(encoder, offset + 0, depth)?;
1754 Ok(())
1755 }
1756 }
1757
1758 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
1759 for LauncherAddNamesRequest
1760 {
1761 #[inline(always)]
1762 fn new_empty() -> Self {
1763 Self {
1764 names: fidl::new_empty!(
1765 fidl::encoding::UnboundedVector<NameInfo>,
1766 fdomain_client::fidl::FDomainResourceDialect
1767 ),
1768 }
1769 }
1770
1771 #[inline]
1772 unsafe fn decode(
1773 &mut self,
1774 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1775 offset: usize,
1776 _depth: fidl::encoding::Depth,
1777 ) -> fidl::Result<()> {
1778 decoder.debug_check_bounds::<Self>(offset);
1779 fidl::decode!(
1781 fidl::encoding::UnboundedVector<NameInfo>,
1782 fdomain_client::fidl::FDomainResourceDialect,
1783 &mut self.names,
1784 decoder,
1785 offset + 0,
1786 _depth
1787 )?;
1788 Ok(())
1789 }
1790 }
1791
1792 impl fidl::encoding::ResourceTypeMarker for LauncherCreateWithoutStartingRequest {
1793 type Borrowed<'a> = &'a mut Self;
1794 fn take_or_borrow<'a>(
1795 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1796 ) -> Self::Borrowed<'a> {
1797 value
1798 }
1799 }
1800
1801 unsafe impl fidl::encoding::TypeMarker for LauncherCreateWithoutStartingRequest {
1802 type Owned = Self;
1803
1804 #[inline(always)]
1805 fn inline_align(_context: fidl::encoding::Context) -> usize {
1806 8
1807 }
1808
1809 #[inline(always)]
1810 fn inline_size(_context: fidl::encoding::Context) -> usize {
1811 24
1812 }
1813 }
1814
1815 unsafe impl
1816 fidl::encoding::Encode<
1817 LauncherCreateWithoutStartingRequest,
1818 fdomain_client::fidl::FDomainResourceDialect,
1819 > for &mut LauncherCreateWithoutStartingRequest
1820 {
1821 #[inline]
1822 unsafe fn encode(
1823 self,
1824 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1825 offset: usize,
1826 _depth: fidl::encoding::Depth,
1827 ) -> fidl::Result<()> {
1828 encoder.debug_check_bounds::<LauncherCreateWithoutStartingRequest>(offset);
1829 fidl::encoding::Encode::<
1831 LauncherCreateWithoutStartingRequest,
1832 fdomain_client::fidl::FDomainResourceDialect,
1833 >::encode(
1834 (<LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1835 &mut self.info,
1836 ),),
1837 encoder,
1838 offset,
1839 _depth,
1840 )
1841 }
1842 }
1843 unsafe impl<
1844 T0: fidl::encoding::Encode<LaunchInfo, fdomain_client::fidl::FDomainResourceDialect>,
1845 >
1846 fidl::encoding::Encode<
1847 LauncherCreateWithoutStartingRequest,
1848 fdomain_client::fidl::FDomainResourceDialect,
1849 > for (T0,)
1850 {
1851 #[inline]
1852 unsafe fn encode(
1853 self,
1854 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1855 offset: usize,
1856 depth: fidl::encoding::Depth,
1857 ) -> fidl::Result<()> {
1858 encoder.debug_check_bounds::<LauncherCreateWithoutStartingRequest>(offset);
1859 self.0.encode(encoder, offset + 0, depth)?;
1863 Ok(())
1864 }
1865 }
1866
1867 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
1868 for LauncherCreateWithoutStartingRequest
1869 {
1870 #[inline(always)]
1871 fn new_empty() -> Self {
1872 Self {
1873 info: fidl::new_empty!(LaunchInfo, fdomain_client::fidl::FDomainResourceDialect),
1874 }
1875 }
1876
1877 #[inline]
1878 unsafe fn decode(
1879 &mut self,
1880 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1881 offset: usize,
1882 _depth: fidl::encoding::Depth,
1883 ) -> fidl::Result<()> {
1884 decoder.debug_check_bounds::<Self>(offset);
1885 fidl::decode!(
1887 LaunchInfo,
1888 fdomain_client::fidl::FDomainResourceDialect,
1889 &mut self.info,
1890 decoder,
1891 offset + 0,
1892 _depth
1893 )?;
1894 Ok(())
1895 }
1896 }
1897
1898 impl fidl::encoding::ResourceTypeMarker for LauncherCreateWithoutStartingResponse {
1899 type Borrowed<'a> = &'a mut Self;
1900 fn take_or_borrow<'a>(
1901 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1902 ) -> Self::Borrowed<'a> {
1903 value
1904 }
1905 }
1906
1907 unsafe impl fidl::encoding::TypeMarker for LauncherCreateWithoutStartingResponse {
1908 type Owned = Self;
1909
1910 #[inline(always)]
1911 fn inline_align(_context: fidl::encoding::Context) -> usize {
1912 8
1913 }
1914
1915 #[inline(always)]
1916 fn inline_size(_context: fidl::encoding::Context) -> usize {
1917 16
1918 }
1919 }
1920
1921 unsafe impl
1922 fidl::encoding::Encode<
1923 LauncherCreateWithoutStartingResponse,
1924 fdomain_client::fidl::FDomainResourceDialect,
1925 > for &mut LauncherCreateWithoutStartingResponse
1926 {
1927 #[inline]
1928 unsafe fn encode(
1929 self,
1930 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1931 offset: usize,
1932 _depth: fidl::encoding::Depth,
1933 ) -> fidl::Result<()> {
1934 encoder.debug_check_bounds::<LauncherCreateWithoutStartingResponse>(offset);
1935 fidl::encoding::Encode::<LauncherCreateWithoutStartingResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
1937 (
1938 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
1939 <fidl::encoding::Boxed<ProcessStartData> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
1940 ),
1941 encoder, offset, _depth
1942 )
1943 }
1944 }
1945 unsafe impl<
1946 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
1947 T1: fidl::encoding::Encode<
1948 fidl::encoding::Boxed<ProcessStartData>,
1949 fdomain_client::fidl::FDomainResourceDialect,
1950 >,
1951 >
1952 fidl::encoding::Encode<
1953 LauncherCreateWithoutStartingResponse,
1954 fdomain_client::fidl::FDomainResourceDialect,
1955 > for (T0, T1)
1956 {
1957 #[inline]
1958 unsafe fn encode(
1959 self,
1960 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1961 offset: usize,
1962 depth: fidl::encoding::Depth,
1963 ) -> fidl::Result<()> {
1964 encoder.debug_check_bounds::<LauncherCreateWithoutStartingResponse>(offset);
1965 unsafe {
1968 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1969 (ptr as *mut u64).write_unaligned(0);
1970 }
1971 self.0.encode(encoder, offset + 0, depth)?;
1973 self.1.encode(encoder, offset + 8, depth)?;
1974 Ok(())
1975 }
1976 }
1977
1978 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
1979 for LauncherCreateWithoutStartingResponse
1980 {
1981 #[inline(always)]
1982 fn new_empty() -> Self {
1983 Self {
1984 status: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
1985 data: fidl::new_empty!(
1986 fidl::encoding::Boxed<ProcessStartData>,
1987 fdomain_client::fidl::FDomainResourceDialect
1988 ),
1989 }
1990 }
1991
1992 #[inline]
1993 unsafe fn decode(
1994 &mut self,
1995 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
1996 offset: usize,
1997 _depth: fidl::encoding::Depth,
1998 ) -> fidl::Result<()> {
1999 decoder.debug_check_bounds::<Self>(offset);
2000 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2002 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2003 let mask = 0xffffffff00000000u64;
2004 let maskedval = padval & mask;
2005 if maskedval != 0 {
2006 return Err(fidl::Error::NonZeroPadding {
2007 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2008 });
2009 }
2010 fidl::decode!(
2011 i32,
2012 fdomain_client::fidl::FDomainResourceDialect,
2013 &mut self.status,
2014 decoder,
2015 offset + 0,
2016 _depth
2017 )?;
2018 fidl::decode!(
2019 fidl::encoding::Boxed<ProcessStartData>,
2020 fdomain_client::fidl::FDomainResourceDialect,
2021 &mut self.data,
2022 decoder,
2023 offset + 8,
2024 _depth
2025 )?;
2026 Ok(())
2027 }
2028 }
2029
2030 impl fidl::encoding::ResourceTypeMarker for LauncherLaunchRequest {
2031 type Borrowed<'a> = &'a mut Self;
2032 fn take_or_borrow<'a>(
2033 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2034 ) -> Self::Borrowed<'a> {
2035 value
2036 }
2037 }
2038
2039 unsafe impl fidl::encoding::TypeMarker for LauncherLaunchRequest {
2040 type Owned = Self;
2041
2042 #[inline(always)]
2043 fn inline_align(_context: fidl::encoding::Context) -> usize {
2044 8
2045 }
2046
2047 #[inline(always)]
2048 fn inline_size(_context: fidl::encoding::Context) -> usize {
2049 24
2050 }
2051 }
2052
2053 unsafe impl
2054 fidl::encoding::Encode<LauncherLaunchRequest, fdomain_client::fidl::FDomainResourceDialect>
2055 for &mut LauncherLaunchRequest
2056 {
2057 #[inline]
2058 unsafe fn encode(
2059 self,
2060 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2061 offset: usize,
2062 _depth: fidl::encoding::Depth,
2063 ) -> fidl::Result<()> {
2064 encoder.debug_check_bounds::<LauncherLaunchRequest>(offset);
2065 fidl::encoding::Encode::<
2067 LauncherLaunchRequest,
2068 fdomain_client::fidl::FDomainResourceDialect,
2069 >::encode(
2070 (<LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2071 &mut self.info,
2072 ),),
2073 encoder,
2074 offset,
2075 _depth,
2076 )
2077 }
2078 }
2079 unsafe impl<
2080 T0: fidl::encoding::Encode<LaunchInfo, fdomain_client::fidl::FDomainResourceDialect>,
2081 >
2082 fidl::encoding::Encode<LauncherLaunchRequest, fdomain_client::fidl::FDomainResourceDialect>
2083 for (T0,)
2084 {
2085 #[inline]
2086 unsafe fn encode(
2087 self,
2088 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2089 offset: usize,
2090 depth: fidl::encoding::Depth,
2091 ) -> fidl::Result<()> {
2092 encoder.debug_check_bounds::<LauncherLaunchRequest>(offset);
2093 self.0.encode(encoder, offset + 0, depth)?;
2097 Ok(())
2098 }
2099 }
2100
2101 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
2102 for LauncherLaunchRequest
2103 {
2104 #[inline(always)]
2105 fn new_empty() -> Self {
2106 Self {
2107 info: fidl::new_empty!(LaunchInfo, fdomain_client::fidl::FDomainResourceDialect),
2108 }
2109 }
2110
2111 #[inline]
2112 unsafe fn decode(
2113 &mut self,
2114 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2115 offset: usize,
2116 _depth: fidl::encoding::Depth,
2117 ) -> fidl::Result<()> {
2118 decoder.debug_check_bounds::<Self>(offset);
2119 fidl::decode!(
2121 LaunchInfo,
2122 fdomain_client::fidl::FDomainResourceDialect,
2123 &mut self.info,
2124 decoder,
2125 offset + 0,
2126 _depth
2127 )?;
2128 Ok(())
2129 }
2130 }
2131
2132 impl fidl::encoding::ResourceTypeMarker for LauncherLaunchResponse {
2133 type Borrowed<'a> = &'a mut Self;
2134 fn take_or_borrow<'a>(
2135 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2136 ) -> Self::Borrowed<'a> {
2137 value
2138 }
2139 }
2140
2141 unsafe impl fidl::encoding::TypeMarker for LauncherLaunchResponse {
2142 type Owned = Self;
2143
2144 #[inline(always)]
2145 fn inline_align(_context: fidl::encoding::Context) -> usize {
2146 4
2147 }
2148
2149 #[inline(always)]
2150 fn inline_size(_context: fidl::encoding::Context) -> usize {
2151 8
2152 }
2153 }
2154
2155 unsafe impl
2156 fidl::encoding::Encode<LauncherLaunchResponse, fdomain_client::fidl::FDomainResourceDialect>
2157 for &mut LauncherLaunchResponse
2158 {
2159 #[inline]
2160 unsafe fn encode(
2161 self,
2162 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2163 offset: usize,
2164 _depth: fidl::encoding::Depth,
2165 ) -> fidl::Result<()> {
2166 encoder.debug_check_bounds::<LauncherLaunchResponse>(offset);
2167 fidl::encoding::Encode::<
2169 LauncherLaunchResponse,
2170 fdomain_client::fidl::FDomainResourceDialect,
2171 >::encode(
2172 (
2173 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
2174 <fidl::encoding::Optional<
2175 fidl::encoding::HandleType<
2176 fdomain_client::Process,
2177 { fidl::ObjectType::PROCESS.into_raw() },
2178 2147483648,
2179 >,
2180 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2181 &mut self.process
2182 ),
2183 ),
2184 encoder,
2185 offset,
2186 _depth,
2187 )
2188 }
2189 }
2190 unsafe impl<
2191 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
2192 T1: fidl::encoding::Encode<
2193 fidl::encoding::Optional<
2194 fidl::encoding::HandleType<
2195 fdomain_client::Process,
2196 { fidl::ObjectType::PROCESS.into_raw() },
2197 2147483648,
2198 >,
2199 >,
2200 fdomain_client::fidl::FDomainResourceDialect,
2201 >,
2202 >
2203 fidl::encoding::Encode<LauncherLaunchResponse, fdomain_client::fidl::FDomainResourceDialect>
2204 for (T0, T1)
2205 {
2206 #[inline]
2207 unsafe fn encode(
2208 self,
2209 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2210 offset: usize,
2211 depth: fidl::encoding::Depth,
2212 ) -> fidl::Result<()> {
2213 encoder.debug_check_bounds::<LauncherLaunchResponse>(offset);
2214 self.0.encode(encoder, offset + 0, depth)?;
2218 self.1.encode(encoder, offset + 4, depth)?;
2219 Ok(())
2220 }
2221 }
2222
2223 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
2224 for LauncherLaunchResponse
2225 {
2226 #[inline(always)]
2227 fn new_empty() -> Self {
2228 Self {
2229 status: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
2230 process: fidl::new_empty!(
2231 fidl::encoding::Optional<
2232 fidl::encoding::HandleType<
2233 fdomain_client::Process,
2234 { fidl::ObjectType::PROCESS.into_raw() },
2235 2147483648,
2236 >,
2237 >,
2238 fdomain_client::fidl::FDomainResourceDialect
2239 ),
2240 }
2241 }
2242
2243 #[inline]
2244 unsafe fn decode(
2245 &mut self,
2246 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2247 offset: usize,
2248 _depth: fidl::encoding::Depth,
2249 ) -> fidl::Result<()> {
2250 decoder.debug_check_bounds::<Self>(offset);
2251 fidl::decode!(
2253 i32,
2254 fdomain_client::fidl::FDomainResourceDialect,
2255 &mut self.status,
2256 decoder,
2257 offset + 0,
2258 _depth
2259 )?;
2260 fidl::decode!(
2261 fidl::encoding::Optional<
2262 fidl::encoding::HandleType<
2263 fdomain_client::Process,
2264 { fidl::ObjectType::PROCESS.into_raw() },
2265 2147483648,
2266 >,
2267 >,
2268 fdomain_client::fidl::FDomainResourceDialect,
2269 &mut self.process,
2270 decoder,
2271 offset + 4,
2272 _depth
2273 )?;
2274 Ok(())
2275 }
2276 }
2277
2278 impl fidl::encoding::ResourceTypeMarker for NameInfo {
2279 type Borrowed<'a> = &'a mut Self;
2280 fn take_or_borrow<'a>(
2281 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2282 ) -> Self::Borrowed<'a> {
2283 value
2284 }
2285 }
2286
2287 unsafe impl fidl::encoding::TypeMarker for NameInfo {
2288 type Owned = Self;
2289
2290 #[inline(always)]
2291 fn inline_align(_context: fidl::encoding::Context) -> usize {
2292 8
2293 }
2294
2295 #[inline(always)]
2296 fn inline_size(_context: fidl::encoding::Context) -> usize {
2297 24
2298 }
2299 }
2300
2301 unsafe impl fidl::encoding::Encode<NameInfo, fdomain_client::fidl::FDomainResourceDialect>
2302 for &mut NameInfo
2303 {
2304 #[inline]
2305 unsafe fn encode(
2306 self,
2307 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2308 offset: usize,
2309 _depth: fidl::encoding::Depth,
2310 ) -> fidl::Result<()> {
2311 encoder.debug_check_bounds::<NameInfo>(offset);
2312 fidl::encoding::Encode::<NameInfo, fdomain_client::fidl::FDomainResourceDialect>::encode(
2314 (
2315 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
2316 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.directory),
2317 ),
2318 encoder, offset, _depth
2319 )
2320 }
2321 }
2322 unsafe impl<
2323 T0: fidl::encoding::Encode<
2324 fidl::encoding::BoundedString<4095>,
2325 fdomain_client::fidl::FDomainResourceDialect,
2326 >,
2327 T1: fidl::encoding::Encode<
2328 fidl::encoding::Endpoint<
2329 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
2330 >,
2331 fdomain_client::fidl::FDomainResourceDialect,
2332 >,
2333 > fidl::encoding::Encode<NameInfo, fdomain_client::fidl::FDomainResourceDialect> for (T0, T1)
2334 {
2335 #[inline]
2336 unsafe fn encode(
2337 self,
2338 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2339 offset: usize,
2340 depth: fidl::encoding::Depth,
2341 ) -> fidl::Result<()> {
2342 encoder.debug_check_bounds::<NameInfo>(offset);
2343 unsafe {
2346 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
2347 (ptr as *mut u64).write_unaligned(0);
2348 }
2349 self.0.encode(encoder, offset + 0, depth)?;
2351 self.1.encode(encoder, offset + 16, depth)?;
2352 Ok(())
2353 }
2354 }
2355
2356 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for NameInfo {
2357 #[inline(always)]
2358 fn new_empty() -> Self {
2359 Self {
2360 path: fidl::new_empty!(
2361 fidl::encoding::BoundedString<4095>,
2362 fdomain_client::fidl::FDomainResourceDialect
2363 ),
2364 directory: fidl::new_empty!(
2365 fidl::encoding::Endpoint<
2366 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
2367 >,
2368 fdomain_client::fidl::FDomainResourceDialect
2369 ),
2370 }
2371 }
2372
2373 #[inline]
2374 unsafe fn decode(
2375 &mut self,
2376 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2377 offset: usize,
2378 _depth: fidl::encoding::Depth,
2379 ) -> fidl::Result<()> {
2380 decoder.debug_check_bounds::<Self>(offset);
2381 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
2383 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2384 let mask = 0xffffffff00000000u64;
2385 let maskedval = padval & mask;
2386 if maskedval != 0 {
2387 return Err(fidl::Error::NonZeroPadding {
2388 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
2389 });
2390 }
2391 fidl::decode!(
2392 fidl::encoding::BoundedString<4095>,
2393 fdomain_client::fidl::FDomainResourceDialect,
2394 &mut self.path,
2395 decoder,
2396 offset + 0,
2397 _depth
2398 )?;
2399 fidl::decode!(
2400 fidl::encoding::Endpoint<
2401 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
2402 >,
2403 fdomain_client::fidl::FDomainResourceDialect,
2404 &mut self.directory,
2405 decoder,
2406 offset + 16,
2407 _depth
2408 )?;
2409 Ok(())
2410 }
2411 }
2412
2413 impl fidl::encoding::ResourceTypeMarker for ProcessStartData {
2414 type Borrowed<'a> = &'a mut Self;
2415 fn take_or_borrow<'a>(
2416 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2417 ) -> Self::Borrowed<'a> {
2418 value
2419 }
2420 }
2421
2422 unsafe impl fidl::encoding::TypeMarker for ProcessStartData {
2423 type Owned = Self;
2424
2425 #[inline(always)]
2426 fn inline_align(_context: fidl::encoding::Context) -> usize {
2427 8
2428 }
2429
2430 #[inline(always)]
2431 fn inline_size(_context: fidl::encoding::Context) -> usize {
2432 56
2433 }
2434 }
2435
2436 unsafe impl
2437 fidl::encoding::Encode<ProcessStartData, fdomain_client::fidl::FDomainResourceDialect>
2438 for &mut ProcessStartData
2439 {
2440 #[inline]
2441 unsafe fn encode(
2442 self,
2443 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2444 offset: usize,
2445 _depth: fidl::encoding::Depth,
2446 ) -> fidl::Result<()> {
2447 encoder.debug_check_bounds::<ProcessStartData>(offset);
2448 fidl::encoding::Encode::<ProcessStartData, fdomain_client::fidl::FDomainResourceDialect>::encode(
2450 (
2451 <fidl::encoding::HandleType<fdomain_client::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.process),
2452 <fidl::encoding::HandleType<fdomain_client::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.root_vmar),
2453 <fidl::encoding::HandleType<fdomain_client::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.thread),
2454 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.entry),
2455 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.stack),
2456 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.bootstrap),
2457 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.vdso_base),
2458 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.base),
2459 ),
2460 encoder, offset, _depth
2461 )
2462 }
2463 }
2464 unsafe impl<
2465 T0: fidl::encoding::Encode<
2466 fidl::encoding::HandleType<
2467 fdomain_client::Process,
2468 { fidl::ObjectType::PROCESS.into_raw() },
2469 2147483648,
2470 >,
2471 fdomain_client::fidl::FDomainResourceDialect,
2472 >,
2473 T1: fidl::encoding::Encode<
2474 fidl::encoding::HandleType<
2475 fdomain_client::Vmar,
2476 { fidl::ObjectType::VMAR.into_raw() },
2477 2147483648,
2478 >,
2479 fdomain_client::fidl::FDomainResourceDialect,
2480 >,
2481 T2: fidl::encoding::Encode<
2482 fidl::encoding::HandleType<
2483 fdomain_client::Thread,
2484 { fidl::ObjectType::THREAD.into_raw() },
2485 2147483648,
2486 >,
2487 fdomain_client::fidl::FDomainResourceDialect,
2488 >,
2489 T3: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
2490 T4: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
2491 T5: fidl::encoding::Encode<
2492 fidl::encoding::HandleType<
2493 fdomain_client::Channel,
2494 { fidl::ObjectType::CHANNEL.into_raw() },
2495 2147483648,
2496 >,
2497 fdomain_client::fidl::FDomainResourceDialect,
2498 >,
2499 T6: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
2500 T7: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
2501 > fidl::encoding::Encode<ProcessStartData, fdomain_client::fidl::FDomainResourceDialect>
2502 for (T0, T1, T2, T3, T4, T5, T6, T7)
2503 {
2504 #[inline]
2505 unsafe fn encode(
2506 self,
2507 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2508 offset: usize,
2509 depth: fidl::encoding::Depth,
2510 ) -> fidl::Result<()> {
2511 encoder.debug_check_bounds::<ProcessStartData>(offset);
2512 unsafe {
2515 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2516 (ptr as *mut u64).write_unaligned(0);
2517 }
2518 unsafe {
2519 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
2520 (ptr as *mut u64).write_unaligned(0);
2521 }
2522 self.0.encode(encoder, offset + 0, depth)?;
2524 self.1.encode(encoder, offset + 4, depth)?;
2525 self.2.encode(encoder, offset + 8, depth)?;
2526 self.3.encode(encoder, offset + 16, depth)?;
2527 self.4.encode(encoder, offset + 24, depth)?;
2528 self.5.encode(encoder, offset + 32, depth)?;
2529 self.6.encode(encoder, offset + 40, depth)?;
2530 self.7.encode(encoder, offset + 48, depth)?;
2531 Ok(())
2532 }
2533 }
2534
2535 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
2536 for ProcessStartData
2537 {
2538 #[inline(always)]
2539 fn new_empty() -> Self {
2540 Self {
2541 process: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
2542 root_vmar: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
2543 thread: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
2544 entry: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
2545 stack: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
2546 bootstrap: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
2547 vdso_base: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
2548 base: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
2549 }
2550 }
2551
2552 #[inline]
2553 unsafe fn decode(
2554 &mut self,
2555 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2556 offset: usize,
2557 _depth: fidl::encoding::Depth,
2558 ) -> fidl::Result<()> {
2559 decoder.debug_check_bounds::<Self>(offset);
2560 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2562 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2563 let mask = 0xffffffff00000000u64;
2564 let maskedval = padval & mask;
2565 if maskedval != 0 {
2566 return Err(fidl::Error::NonZeroPadding {
2567 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2568 });
2569 }
2570 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
2571 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2572 let mask = 0xffffffff00000000u64;
2573 let maskedval = padval & mask;
2574 if maskedval != 0 {
2575 return Err(fidl::Error::NonZeroPadding {
2576 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
2577 });
2578 }
2579 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.process, decoder, offset + 0, _depth)?;
2580 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmar, { fidl::ObjectType::VMAR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.root_vmar, decoder, offset + 4, _depth)?;
2581 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Thread, { fidl::ObjectType::THREAD.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.thread, decoder, offset + 8, _depth)?;
2582 fidl::decode!(
2583 u64,
2584 fdomain_client::fidl::FDomainResourceDialect,
2585 &mut self.entry,
2586 decoder,
2587 offset + 16,
2588 _depth
2589 )?;
2590 fidl::decode!(
2591 u64,
2592 fdomain_client::fidl::FDomainResourceDialect,
2593 &mut self.stack,
2594 decoder,
2595 offset + 24,
2596 _depth
2597 )?;
2598 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.bootstrap, decoder, offset + 32, _depth)?;
2599 fidl::decode!(
2600 u64,
2601 fdomain_client::fidl::FDomainResourceDialect,
2602 &mut self.vdso_base,
2603 decoder,
2604 offset + 40,
2605 _depth
2606 )?;
2607 fidl::decode!(
2608 u64,
2609 fdomain_client::fidl::FDomainResourceDialect,
2610 &mut self.base,
2611 decoder,
2612 offset + 48,
2613 _depth
2614 )?;
2615 Ok(())
2616 }
2617 }
2618
2619 impl fidl::encoding::ResourceTypeMarker for ResolverResolveResponse {
2620 type Borrowed<'a> = &'a mut Self;
2621 fn take_or_borrow<'a>(
2622 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2623 ) -> Self::Borrowed<'a> {
2624 value
2625 }
2626 }
2627
2628 unsafe impl fidl::encoding::TypeMarker for ResolverResolveResponse {
2629 type Owned = Self;
2630
2631 #[inline(always)]
2632 fn inline_align(_context: fidl::encoding::Context) -> usize {
2633 4
2634 }
2635
2636 #[inline(always)]
2637 fn inline_size(_context: fidl::encoding::Context) -> usize {
2638 12
2639 }
2640 }
2641
2642 unsafe impl
2643 fidl::encoding::Encode<
2644 ResolverResolveResponse,
2645 fdomain_client::fidl::FDomainResourceDialect,
2646 > for &mut ResolverResolveResponse
2647 {
2648 #[inline]
2649 unsafe fn encode(
2650 self,
2651 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2652 offset: usize,
2653 _depth: fidl::encoding::Depth,
2654 ) -> fidl::Result<()> {
2655 encoder.debug_check_bounds::<ResolverResolveResponse>(offset);
2656 fidl::encoding::Encode::<
2658 ResolverResolveResponse,
2659 fdomain_client::fidl::FDomainResourceDialect,
2660 >::encode(
2661 (
2662 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
2663 <fidl::encoding::Optional<
2664 fidl::encoding::HandleType<
2665 fdomain_client::Vmo,
2666 { fidl::ObjectType::VMO.into_raw() },
2667 2147483648,
2668 >,
2669 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2670 &mut self.executable
2671 ),
2672 <fidl::encoding::Optional<
2673 fidl::encoding::Endpoint<
2674 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>,
2675 >,
2676 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2677 &mut self.ldsvc
2678 ),
2679 ),
2680 encoder,
2681 offset,
2682 _depth,
2683 )
2684 }
2685 }
2686 unsafe impl<
2687 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
2688 T1: fidl::encoding::Encode<
2689 fidl::encoding::Optional<
2690 fidl::encoding::HandleType<
2691 fdomain_client::Vmo,
2692 { fidl::ObjectType::VMO.into_raw() },
2693 2147483648,
2694 >,
2695 >,
2696 fdomain_client::fidl::FDomainResourceDialect,
2697 >,
2698 T2: fidl::encoding::Encode<
2699 fidl::encoding::Optional<
2700 fidl::encoding::Endpoint<
2701 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>,
2702 >,
2703 >,
2704 fdomain_client::fidl::FDomainResourceDialect,
2705 >,
2706 >
2707 fidl::encoding::Encode<
2708 ResolverResolveResponse,
2709 fdomain_client::fidl::FDomainResourceDialect,
2710 > for (T0, T1, T2)
2711 {
2712 #[inline]
2713 unsafe fn encode(
2714 self,
2715 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2716 offset: usize,
2717 depth: fidl::encoding::Depth,
2718 ) -> fidl::Result<()> {
2719 encoder.debug_check_bounds::<ResolverResolveResponse>(offset);
2720 self.0.encode(encoder, offset + 0, depth)?;
2724 self.1.encode(encoder, offset + 4, depth)?;
2725 self.2.encode(encoder, offset + 8, depth)?;
2726 Ok(())
2727 }
2728 }
2729
2730 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
2731 for ResolverResolveResponse
2732 {
2733 #[inline(always)]
2734 fn new_empty() -> Self {
2735 Self {
2736 status: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
2737 executable: fidl::new_empty!(
2738 fidl::encoding::Optional<
2739 fidl::encoding::HandleType<
2740 fdomain_client::Vmo,
2741 { fidl::ObjectType::VMO.into_raw() },
2742 2147483648,
2743 >,
2744 >,
2745 fdomain_client::fidl::FDomainResourceDialect
2746 ),
2747 ldsvc: fidl::new_empty!(
2748 fidl::encoding::Optional<
2749 fidl::encoding::Endpoint<
2750 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>,
2751 >,
2752 >,
2753 fdomain_client::fidl::FDomainResourceDialect
2754 ),
2755 }
2756 }
2757
2758 #[inline]
2759 unsafe fn decode(
2760 &mut self,
2761 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2762 offset: usize,
2763 _depth: fidl::encoding::Depth,
2764 ) -> fidl::Result<()> {
2765 decoder.debug_check_bounds::<Self>(offset);
2766 fidl::decode!(
2768 i32,
2769 fdomain_client::fidl::FDomainResourceDialect,
2770 &mut self.status,
2771 decoder,
2772 offset + 0,
2773 _depth
2774 )?;
2775 fidl::decode!(
2776 fidl::encoding::Optional<
2777 fidl::encoding::HandleType<
2778 fdomain_client::Vmo,
2779 { fidl::ObjectType::VMO.into_raw() },
2780 2147483648,
2781 >,
2782 >,
2783 fdomain_client::fidl::FDomainResourceDialect,
2784 &mut self.executable,
2785 decoder,
2786 offset + 4,
2787 _depth
2788 )?;
2789 fidl::decode!(
2790 fidl::encoding::Optional<
2791 fidl::encoding::Endpoint<
2792 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_ldsvc::LoaderMarker>,
2793 >,
2794 >,
2795 fdomain_client::fidl::FDomainResourceDialect,
2796 &mut self.ldsvc,
2797 decoder,
2798 offset + 8,
2799 _depth
2800 )?;
2801 Ok(())
2802 }
2803 }
2804}