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 _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14pub struct EnvVar {
15 pub key: String,
16 pub value: String,
17}
18
19impl fidl::Persistable for EnvVar {}
20
21#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22pub struct UtilDumpNamespaceResponse {
23 pub contents: String,
24}
25
26impl fidl::Persistable for UtilDumpNamespaceResponse {}
27
28#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29#[repr(C)]
30pub struct UtilGetArgumentCountResponse {
31 pub count: u64,
32}
33
34impl fidl::Persistable for UtilGetArgumentCountResponse {}
35
36#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37pub struct UtilGetArgumentsResponse {
38 pub args: Vec<String>,
39}
40
41impl fidl::Persistable for UtilGetArgumentsResponse {}
42
43#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44#[repr(C)]
45pub struct UtilGetEnvironmentCountResponse {
46 pub count: u64,
47}
48
49impl fidl::Persistable for UtilGetEnvironmentCountResponse {}
50
51#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct UtilGetEnvironmentResponse {
53 pub vars: Vec<EnvVar>,
54}
55
56impl fidl::Persistable for UtilGetEnvironmentResponse {}
57
58#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
59#[repr(C)]
60pub struct UtilGetLifecycleKoidResponse {
61 pub koid: u64,
62}
63
64impl fidl::Persistable for UtilGetLifecycleKoidResponse {}
65
66#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
67pub struct UtilReadFileRequest {
68 pub path: String,
69}
70
71impl fidl::Persistable for UtilReadFileRequest {}
72
73#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
74pub struct UtilReadFileResponse {
75 pub contents: String,
76}
77
78impl fidl::Persistable for UtilReadFileResponse {}
79
80#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
81pub struct UtilMarker;
82
83impl fidl::endpoints::ProtocolMarker for UtilMarker {
84 type Proxy = UtilProxy;
85 type RequestStream = UtilRequestStream;
86 #[cfg(target_os = "fuchsia")]
87 type SynchronousProxy = UtilSynchronousProxy;
88
89 const DEBUG_NAME: &'static str = "test.processbuilder.Util";
90}
91impl fidl::endpoints::DiscoverableProtocolMarker for UtilMarker {}
92
93pub trait UtilProxyInterface: Send + Sync {
94 type GetArgumentsResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>>
95 + Send;
96 fn r#get_arguments(&self) -> Self::GetArgumentsResponseFut;
97 type GetArgumentCountResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
98 fn r#get_argument_count(&self) -> Self::GetArgumentCountResponseFut;
99 type GetEnvironmentResponseFut: std::future::Future<Output = Result<Vec<EnvVar>, fidl::Error>>
100 + Send;
101 fn r#get_environment(&self) -> Self::GetEnvironmentResponseFut;
102 type GetEnvironmentCountResponseFut: std::future::Future<Output = Result<u64, fidl::Error>>
103 + Send;
104 fn r#get_environment_count(&self) -> Self::GetEnvironmentCountResponseFut;
105 type DumpNamespaceResponseFut: std::future::Future<Output = Result<String, fidl::Error>> + Send;
106 fn r#dump_namespace(&self) -> Self::DumpNamespaceResponseFut;
107 type ReadFileResponseFut: std::future::Future<Output = Result<String, fidl::Error>> + Send;
108 fn r#read_file(&self, path: &str) -> Self::ReadFileResponseFut;
109 type GetLifecycleKoidResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
110 fn r#get_lifecycle_koid(&self) -> Self::GetLifecycleKoidResponseFut;
111}
112#[derive(Debug)]
113#[cfg(target_os = "fuchsia")]
114pub struct UtilSynchronousProxy {
115 client: fidl::client::sync::Client,
116}
117
118#[cfg(target_os = "fuchsia")]
119impl fidl::endpoints::SynchronousProxy for UtilSynchronousProxy {
120 type Proxy = UtilProxy;
121 type Protocol = UtilMarker;
122
123 fn from_channel(inner: fidl::Channel) -> Self {
124 Self::new(inner)
125 }
126
127 fn into_channel(self) -> fidl::Channel {
128 self.client.into_channel()
129 }
130
131 fn as_channel(&self) -> &fidl::Channel {
132 self.client.as_channel()
133 }
134}
135
136#[cfg(target_os = "fuchsia")]
137impl UtilSynchronousProxy {
138 pub fn new(channel: fidl::Channel) -> Self {
139 let protocol_name = <UtilMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
140 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
141 }
142
143 pub fn into_channel(self) -> fidl::Channel {
144 self.client.into_channel()
145 }
146
147 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<UtilEvent, fidl::Error> {
150 UtilEvent::decode(self.client.wait_for_event(deadline)?)
151 }
152
153 pub fn r#get_arguments(
154 &self,
155 ___deadline: zx::MonotonicInstant,
156 ) -> Result<Vec<String>, fidl::Error> {
157 let _response =
158 self.client.send_query::<fidl::encoding::EmptyPayload, UtilGetArgumentsResponse>(
159 (),
160 0x50ff7f790c425519,
161 fidl::encoding::DynamicFlags::empty(),
162 ___deadline,
163 )?;
164 Ok(_response.args)
165 }
166
167 pub fn r#get_argument_count(
168 &self,
169 ___deadline: zx::MonotonicInstant,
170 ) -> Result<u64, fidl::Error> {
171 let _response =
172 self.client.send_query::<fidl::encoding::EmptyPayload, UtilGetArgumentCountResponse>(
173 (),
174 0x41ef27d234ed7098,
175 fidl::encoding::DynamicFlags::empty(),
176 ___deadline,
177 )?;
178 Ok(_response.count)
179 }
180
181 pub fn r#get_environment(
182 &self,
183 ___deadline: zx::MonotonicInstant,
184 ) -> Result<Vec<EnvVar>, fidl::Error> {
185 let _response =
186 self.client.send_query::<fidl::encoding::EmptyPayload, UtilGetEnvironmentResponse>(
187 (),
188 0x451e633adf04ec23,
189 fidl::encoding::DynamicFlags::empty(),
190 ___deadline,
191 )?;
192 Ok(_response.vars)
193 }
194
195 pub fn r#get_environment_count(
196 &self,
197 ___deadline: zx::MonotonicInstant,
198 ) -> Result<u64, fidl::Error> {
199 let _response = self
200 .client
201 .send_query::<fidl::encoding::EmptyPayload, UtilGetEnvironmentCountResponse>(
202 (),
203 0xe01fe768fb1be1a,
204 fidl::encoding::DynamicFlags::empty(),
205 ___deadline,
206 )?;
207 Ok(_response.count)
208 }
209
210 pub fn r#dump_namespace(
211 &self,
212 ___deadline: zx::MonotonicInstant,
213 ) -> Result<String, fidl::Error> {
214 let _response =
215 self.client.send_query::<fidl::encoding::EmptyPayload, UtilDumpNamespaceResponse>(
216 (),
217 0x73826cecc1a7f3a4,
218 fidl::encoding::DynamicFlags::empty(),
219 ___deadline,
220 )?;
221 Ok(_response.contents)
222 }
223
224 pub fn r#read_file(
225 &self,
226 mut path: &str,
227 ___deadline: zx::MonotonicInstant,
228 ) -> Result<String, fidl::Error> {
229 let _response = self.client.send_query::<UtilReadFileRequest, UtilReadFileResponse>(
230 (path,),
231 0x2ea8e2e4b427a391,
232 fidl::encoding::DynamicFlags::empty(),
233 ___deadline,
234 )?;
235 Ok(_response.contents)
236 }
237
238 pub fn r#get_lifecycle_koid(
239 &self,
240 ___deadline: zx::MonotonicInstant,
241 ) -> Result<u64, fidl::Error> {
242 let _response =
243 self.client.send_query::<fidl::encoding::EmptyPayload, UtilGetLifecycleKoidResponse>(
244 (),
245 0xdaecfc0fe4c8f60,
246 fidl::encoding::DynamicFlags::empty(),
247 ___deadline,
248 )?;
249 Ok(_response.koid)
250 }
251}
252
253#[derive(Debug, Clone)]
254pub struct UtilProxy {
255 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
256}
257
258impl fidl::endpoints::Proxy for UtilProxy {
259 type Protocol = UtilMarker;
260
261 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
262 Self::new(inner)
263 }
264
265 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
266 self.client.into_channel().map_err(|client| Self { client })
267 }
268
269 fn as_channel(&self) -> &::fidl::AsyncChannel {
270 self.client.as_channel()
271 }
272}
273
274impl UtilProxy {
275 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
277 let protocol_name = <UtilMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
278 Self { client: fidl::client::Client::new(channel, protocol_name) }
279 }
280
281 pub fn take_event_stream(&self) -> UtilEventStream {
287 UtilEventStream { event_receiver: self.client.take_event_receiver() }
288 }
289
290 pub fn r#get_arguments(
291 &self,
292 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
293 {
294 UtilProxyInterface::r#get_arguments(self)
295 }
296
297 pub fn r#get_argument_count(
298 &self,
299 ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
300 UtilProxyInterface::r#get_argument_count(self)
301 }
302
303 pub fn r#get_environment(
304 &self,
305 ) -> fidl::client::QueryResponseFut<Vec<EnvVar>, fidl::encoding::DefaultFuchsiaResourceDialect>
306 {
307 UtilProxyInterface::r#get_environment(self)
308 }
309
310 pub fn r#get_environment_count(
311 &self,
312 ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
313 UtilProxyInterface::r#get_environment_count(self)
314 }
315
316 pub fn r#dump_namespace(
317 &self,
318 ) -> fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect> {
319 UtilProxyInterface::r#dump_namespace(self)
320 }
321
322 pub fn r#read_file(
323 &self,
324 mut path: &str,
325 ) -> fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect> {
326 UtilProxyInterface::r#read_file(self, path)
327 }
328
329 pub fn r#get_lifecycle_koid(
330 &self,
331 ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
332 UtilProxyInterface::r#get_lifecycle_koid(self)
333 }
334}
335
336impl UtilProxyInterface for UtilProxy {
337 type GetArgumentsResponseFut =
338 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
339 fn r#get_arguments(&self) -> Self::GetArgumentsResponseFut {
340 fn _decode(
341 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
342 ) -> Result<Vec<String>, fidl::Error> {
343 let _response = fidl::client::decode_transaction_body::<
344 UtilGetArgumentsResponse,
345 fidl::encoding::DefaultFuchsiaResourceDialect,
346 0x50ff7f790c425519,
347 >(_buf?)?;
348 Ok(_response.args)
349 }
350 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
351 (),
352 0x50ff7f790c425519,
353 fidl::encoding::DynamicFlags::empty(),
354 _decode,
355 )
356 }
357
358 type GetArgumentCountResponseFut =
359 fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
360 fn r#get_argument_count(&self) -> Self::GetArgumentCountResponseFut {
361 fn _decode(
362 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
363 ) -> Result<u64, fidl::Error> {
364 let _response = fidl::client::decode_transaction_body::<
365 UtilGetArgumentCountResponse,
366 fidl::encoding::DefaultFuchsiaResourceDialect,
367 0x41ef27d234ed7098,
368 >(_buf?)?;
369 Ok(_response.count)
370 }
371 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
372 (),
373 0x41ef27d234ed7098,
374 fidl::encoding::DynamicFlags::empty(),
375 _decode,
376 )
377 }
378
379 type GetEnvironmentResponseFut =
380 fidl::client::QueryResponseFut<Vec<EnvVar>, fidl::encoding::DefaultFuchsiaResourceDialect>;
381 fn r#get_environment(&self) -> Self::GetEnvironmentResponseFut {
382 fn _decode(
383 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
384 ) -> Result<Vec<EnvVar>, fidl::Error> {
385 let _response = fidl::client::decode_transaction_body::<
386 UtilGetEnvironmentResponse,
387 fidl::encoding::DefaultFuchsiaResourceDialect,
388 0x451e633adf04ec23,
389 >(_buf?)?;
390 Ok(_response.vars)
391 }
392 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<EnvVar>>(
393 (),
394 0x451e633adf04ec23,
395 fidl::encoding::DynamicFlags::empty(),
396 _decode,
397 )
398 }
399
400 type GetEnvironmentCountResponseFut =
401 fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
402 fn r#get_environment_count(&self) -> Self::GetEnvironmentCountResponseFut {
403 fn _decode(
404 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
405 ) -> Result<u64, fidl::Error> {
406 let _response = fidl::client::decode_transaction_body::<
407 UtilGetEnvironmentCountResponse,
408 fidl::encoding::DefaultFuchsiaResourceDialect,
409 0xe01fe768fb1be1a,
410 >(_buf?)?;
411 Ok(_response.count)
412 }
413 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
414 (),
415 0xe01fe768fb1be1a,
416 fidl::encoding::DynamicFlags::empty(),
417 _decode,
418 )
419 }
420
421 type DumpNamespaceResponseFut =
422 fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect>;
423 fn r#dump_namespace(&self) -> Self::DumpNamespaceResponseFut {
424 fn _decode(
425 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
426 ) -> Result<String, fidl::Error> {
427 let _response = fidl::client::decode_transaction_body::<
428 UtilDumpNamespaceResponse,
429 fidl::encoding::DefaultFuchsiaResourceDialect,
430 0x73826cecc1a7f3a4,
431 >(_buf?)?;
432 Ok(_response.contents)
433 }
434 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, String>(
435 (),
436 0x73826cecc1a7f3a4,
437 fidl::encoding::DynamicFlags::empty(),
438 _decode,
439 )
440 }
441
442 type ReadFileResponseFut =
443 fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect>;
444 fn r#read_file(&self, mut path: &str) -> Self::ReadFileResponseFut {
445 fn _decode(
446 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
447 ) -> Result<String, fidl::Error> {
448 let _response = fidl::client::decode_transaction_body::<
449 UtilReadFileResponse,
450 fidl::encoding::DefaultFuchsiaResourceDialect,
451 0x2ea8e2e4b427a391,
452 >(_buf?)?;
453 Ok(_response.contents)
454 }
455 self.client.send_query_and_decode::<UtilReadFileRequest, String>(
456 (path,),
457 0x2ea8e2e4b427a391,
458 fidl::encoding::DynamicFlags::empty(),
459 _decode,
460 )
461 }
462
463 type GetLifecycleKoidResponseFut =
464 fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
465 fn r#get_lifecycle_koid(&self) -> Self::GetLifecycleKoidResponseFut {
466 fn _decode(
467 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
468 ) -> Result<u64, fidl::Error> {
469 let _response = fidl::client::decode_transaction_body::<
470 UtilGetLifecycleKoidResponse,
471 fidl::encoding::DefaultFuchsiaResourceDialect,
472 0xdaecfc0fe4c8f60,
473 >(_buf?)?;
474 Ok(_response.koid)
475 }
476 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
477 (),
478 0xdaecfc0fe4c8f60,
479 fidl::encoding::DynamicFlags::empty(),
480 _decode,
481 )
482 }
483}
484
485pub struct UtilEventStream {
486 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
487}
488
489impl std::marker::Unpin for UtilEventStream {}
490
491impl futures::stream::FusedStream for UtilEventStream {
492 fn is_terminated(&self) -> bool {
493 self.event_receiver.is_terminated()
494 }
495}
496
497impl futures::Stream for UtilEventStream {
498 type Item = Result<UtilEvent, fidl::Error>;
499
500 fn poll_next(
501 mut self: std::pin::Pin<&mut Self>,
502 cx: &mut std::task::Context<'_>,
503 ) -> std::task::Poll<Option<Self::Item>> {
504 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
505 &mut self.event_receiver,
506 cx
507 )?) {
508 Some(buf) => std::task::Poll::Ready(Some(UtilEvent::decode(buf))),
509 None => std::task::Poll::Ready(None),
510 }
511 }
512}
513
514#[derive(Debug)]
515pub enum UtilEvent {}
516
517impl UtilEvent {
518 fn decode(
520 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
521 ) -> Result<UtilEvent, fidl::Error> {
522 let (bytes, _handles) = buf.split_mut();
523 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
524 debug_assert_eq!(tx_header.tx_id, 0);
525 match tx_header.ordinal {
526 _ => Err(fidl::Error::UnknownOrdinal {
527 ordinal: tx_header.ordinal,
528 protocol_name: <UtilMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
529 }),
530 }
531 }
532}
533
534pub struct UtilRequestStream {
536 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
537 is_terminated: bool,
538}
539
540impl std::marker::Unpin for UtilRequestStream {}
541
542impl futures::stream::FusedStream for UtilRequestStream {
543 fn is_terminated(&self) -> bool {
544 self.is_terminated
545 }
546}
547
548impl fidl::endpoints::RequestStream for UtilRequestStream {
549 type Protocol = UtilMarker;
550 type ControlHandle = UtilControlHandle;
551
552 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
553 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
554 }
555
556 fn control_handle(&self) -> Self::ControlHandle {
557 UtilControlHandle { inner: self.inner.clone() }
558 }
559
560 fn into_inner(
561 self,
562 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
563 {
564 (self.inner, self.is_terminated)
565 }
566
567 fn from_inner(
568 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
569 is_terminated: bool,
570 ) -> Self {
571 Self { inner, is_terminated }
572 }
573}
574
575impl futures::Stream for UtilRequestStream {
576 type Item = Result<UtilRequest, fidl::Error>;
577
578 fn poll_next(
579 mut self: std::pin::Pin<&mut Self>,
580 cx: &mut std::task::Context<'_>,
581 ) -> std::task::Poll<Option<Self::Item>> {
582 let this = &mut *self;
583 if this.inner.check_shutdown(cx) {
584 this.is_terminated = true;
585 return std::task::Poll::Ready(None);
586 }
587 if this.is_terminated {
588 panic!("polled UtilRequestStream after completion");
589 }
590 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
591 |bytes, handles| {
592 match this.inner.channel().read_etc(cx, bytes, handles) {
593 std::task::Poll::Ready(Ok(())) => {}
594 std::task::Poll::Pending => return std::task::Poll::Pending,
595 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
596 this.is_terminated = true;
597 return std::task::Poll::Ready(None);
598 }
599 std::task::Poll::Ready(Err(e)) => {
600 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
601 e.into(),
602 ))))
603 }
604 }
605
606 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
608
609 std::task::Poll::Ready(Some(match header.ordinal {
610 0x50ff7f790c425519 => {
611 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
612 let mut req = fidl::new_empty!(
613 fidl::encoding::EmptyPayload,
614 fidl::encoding::DefaultFuchsiaResourceDialect
615 );
616 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
617 let control_handle = UtilControlHandle { inner: this.inner.clone() };
618 Ok(UtilRequest::GetArguments {
619 responder: UtilGetArgumentsResponder {
620 control_handle: std::mem::ManuallyDrop::new(control_handle),
621 tx_id: header.tx_id,
622 },
623 })
624 }
625 0x41ef27d234ed7098 => {
626 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
627 let mut req = fidl::new_empty!(
628 fidl::encoding::EmptyPayload,
629 fidl::encoding::DefaultFuchsiaResourceDialect
630 );
631 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
632 let control_handle = UtilControlHandle { inner: this.inner.clone() };
633 Ok(UtilRequest::GetArgumentCount {
634 responder: UtilGetArgumentCountResponder {
635 control_handle: std::mem::ManuallyDrop::new(control_handle),
636 tx_id: header.tx_id,
637 },
638 })
639 }
640 0x451e633adf04ec23 => {
641 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
642 let mut req = fidl::new_empty!(
643 fidl::encoding::EmptyPayload,
644 fidl::encoding::DefaultFuchsiaResourceDialect
645 );
646 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
647 let control_handle = UtilControlHandle { inner: this.inner.clone() };
648 Ok(UtilRequest::GetEnvironment {
649 responder: UtilGetEnvironmentResponder {
650 control_handle: std::mem::ManuallyDrop::new(control_handle),
651 tx_id: header.tx_id,
652 },
653 })
654 }
655 0xe01fe768fb1be1a => {
656 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
657 let mut req = fidl::new_empty!(
658 fidl::encoding::EmptyPayload,
659 fidl::encoding::DefaultFuchsiaResourceDialect
660 );
661 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
662 let control_handle = UtilControlHandle { inner: this.inner.clone() };
663 Ok(UtilRequest::GetEnvironmentCount {
664 responder: UtilGetEnvironmentCountResponder {
665 control_handle: std::mem::ManuallyDrop::new(control_handle),
666 tx_id: header.tx_id,
667 },
668 })
669 }
670 0x73826cecc1a7f3a4 => {
671 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
672 let mut req = fidl::new_empty!(
673 fidl::encoding::EmptyPayload,
674 fidl::encoding::DefaultFuchsiaResourceDialect
675 );
676 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
677 let control_handle = UtilControlHandle { inner: this.inner.clone() };
678 Ok(UtilRequest::DumpNamespace {
679 responder: UtilDumpNamespaceResponder {
680 control_handle: std::mem::ManuallyDrop::new(control_handle),
681 tx_id: header.tx_id,
682 },
683 })
684 }
685 0x2ea8e2e4b427a391 => {
686 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
687 let mut req = fidl::new_empty!(
688 UtilReadFileRequest,
689 fidl::encoding::DefaultFuchsiaResourceDialect
690 );
691 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UtilReadFileRequest>(&header, _body_bytes, handles, &mut req)?;
692 let control_handle = UtilControlHandle { inner: this.inner.clone() };
693 Ok(UtilRequest::ReadFile {
694 path: req.path,
695
696 responder: UtilReadFileResponder {
697 control_handle: std::mem::ManuallyDrop::new(control_handle),
698 tx_id: header.tx_id,
699 },
700 })
701 }
702 0xdaecfc0fe4c8f60 => {
703 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
704 let mut req = fidl::new_empty!(
705 fidl::encoding::EmptyPayload,
706 fidl::encoding::DefaultFuchsiaResourceDialect
707 );
708 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
709 let control_handle = UtilControlHandle { inner: this.inner.clone() };
710 Ok(UtilRequest::GetLifecycleKoid {
711 responder: UtilGetLifecycleKoidResponder {
712 control_handle: std::mem::ManuallyDrop::new(control_handle),
713 tx_id: header.tx_id,
714 },
715 })
716 }
717 _ => Err(fidl::Error::UnknownOrdinal {
718 ordinal: header.ordinal,
719 protocol_name: <UtilMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
720 }),
721 }))
722 },
723 )
724 }
725}
726
727#[derive(Debug)]
728pub enum UtilRequest {
729 GetArguments { responder: UtilGetArgumentsResponder },
730 GetArgumentCount { responder: UtilGetArgumentCountResponder },
731 GetEnvironment { responder: UtilGetEnvironmentResponder },
732 GetEnvironmentCount { responder: UtilGetEnvironmentCountResponder },
733 DumpNamespace { responder: UtilDumpNamespaceResponder },
734 ReadFile { path: String, responder: UtilReadFileResponder },
735 GetLifecycleKoid { responder: UtilGetLifecycleKoidResponder },
736}
737
738impl UtilRequest {
739 #[allow(irrefutable_let_patterns)]
740 pub fn into_get_arguments(self) -> Option<(UtilGetArgumentsResponder)> {
741 if let UtilRequest::GetArguments { responder } = self {
742 Some((responder))
743 } else {
744 None
745 }
746 }
747
748 #[allow(irrefutable_let_patterns)]
749 pub fn into_get_argument_count(self) -> Option<(UtilGetArgumentCountResponder)> {
750 if let UtilRequest::GetArgumentCount { responder } = self {
751 Some((responder))
752 } else {
753 None
754 }
755 }
756
757 #[allow(irrefutable_let_patterns)]
758 pub fn into_get_environment(self) -> Option<(UtilGetEnvironmentResponder)> {
759 if let UtilRequest::GetEnvironment { responder } = self {
760 Some((responder))
761 } else {
762 None
763 }
764 }
765
766 #[allow(irrefutable_let_patterns)]
767 pub fn into_get_environment_count(self) -> Option<(UtilGetEnvironmentCountResponder)> {
768 if let UtilRequest::GetEnvironmentCount { responder } = self {
769 Some((responder))
770 } else {
771 None
772 }
773 }
774
775 #[allow(irrefutable_let_patterns)]
776 pub fn into_dump_namespace(self) -> Option<(UtilDumpNamespaceResponder)> {
777 if let UtilRequest::DumpNamespace { responder } = self {
778 Some((responder))
779 } else {
780 None
781 }
782 }
783
784 #[allow(irrefutable_let_patterns)]
785 pub fn into_read_file(self) -> Option<(String, UtilReadFileResponder)> {
786 if let UtilRequest::ReadFile { path, responder } = self {
787 Some((path, responder))
788 } else {
789 None
790 }
791 }
792
793 #[allow(irrefutable_let_patterns)]
794 pub fn into_get_lifecycle_koid(self) -> Option<(UtilGetLifecycleKoidResponder)> {
795 if let UtilRequest::GetLifecycleKoid { responder } = self {
796 Some((responder))
797 } else {
798 None
799 }
800 }
801
802 pub fn method_name(&self) -> &'static str {
804 match *self {
805 UtilRequest::GetArguments { .. } => "get_arguments",
806 UtilRequest::GetArgumentCount { .. } => "get_argument_count",
807 UtilRequest::GetEnvironment { .. } => "get_environment",
808 UtilRequest::GetEnvironmentCount { .. } => "get_environment_count",
809 UtilRequest::DumpNamespace { .. } => "dump_namespace",
810 UtilRequest::ReadFile { .. } => "read_file",
811 UtilRequest::GetLifecycleKoid { .. } => "get_lifecycle_koid",
812 }
813 }
814}
815
816#[derive(Debug, Clone)]
817pub struct UtilControlHandle {
818 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
819}
820
821impl fidl::endpoints::ControlHandle for UtilControlHandle {
822 fn shutdown(&self) {
823 self.inner.shutdown()
824 }
825 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
826 self.inner.shutdown_with_epitaph(status)
827 }
828
829 fn is_closed(&self) -> bool {
830 self.inner.channel().is_closed()
831 }
832 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
833 self.inner.channel().on_closed()
834 }
835
836 #[cfg(target_os = "fuchsia")]
837 fn signal_peer(
838 &self,
839 clear_mask: zx::Signals,
840 set_mask: zx::Signals,
841 ) -> Result<(), zx_status::Status> {
842 use fidl::Peered;
843 self.inner.channel().signal_peer(clear_mask, set_mask)
844 }
845}
846
847impl UtilControlHandle {}
848
849#[must_use = "FIDL methods require a response to be sent"]
850#[derive(Debug)]
851pub struct UtilGetArgumentsResponder {
852 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
853 tx_id: u32,
854}
855
856impl std::ops::Drop for UtilGetArgumentsResponder {
860 fn drop(&mut self) {
861 self.control_handle.shutdown();
862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
864 }
865}
866
867impl fidl::endpoints::Responder for UtilGetArgumentsResponder {
868 type ControlHandle = UtilControlHandle;
869
870 fn control_handle(&self) -> &UtilControlHandle {
871 &self.control_handle
872 }
873
874 fn drop_without_shutdown(mut self) {
875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
877 std::mem::forget(self);
879 }
880}
881
882impl UtilGetArgumentsResponder {
883 pub fn send(self, mut args: &[String]) -> Result<(), fidl::Error> {
887 let _result = self.send_raw(args);
888 if _result.is_err() {
889 self.control_handle.shutdown();
890 }
891 self.drop_without_shutdown();
892 _result
893 }
894
895 pub fn send_no_shutdown_on_err(self, mut args: &[String]) -> Result<(), fidl::Error> {
897 let _result = self.send_raw(args);
898 self.drop_without_shutdown();
899 _result
900 }
901
902 fn send_raw(&self, mut args: &[String]) -> Result<(), fidl::Error> {
903 self.control_handle.inner.send::<UtilGetArgumentsResponse>(
904 (args,),
905 self.tx_id,
906 0x50ff7f790c425519,
907 fidl::encoding::DynamicFlags::empty(),
908 )
909 }
910}
911
912#[must_use = "FIDL methods require a response to be sent"]
913#[derive(Debug)]
914pub struct UtilGetArgumentCountResponder {
915 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
916 tx_id: u32,
917}
918
919impl std::ops::Drop for UtilGetArgumentCountResponder {
923 fn drop(&mut self) {
924 self.control_handle.shutdown();
925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
927 }
928}
929
930impl fidl::endpoints::Responder for UtilGetArgumentCountResponder {
931 type ControlHandle = UtilControlHandle;
932
933 fn control_handle(&self) -> &UtilControlHandle {
934 &self.control_handle
935 }
936
937 fn drop_without_shutdown(mut self) {
938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
940 std::mem::forget(self);
942 }
943}
944
945impl UtilGetArgumentCountResponder {
946 pub fn send(self, mut count: u64) -> Result<(), fidl::Error> {
950 let _result = self.send_raw(count);
951 if _result.is_err() {
952 self.control_handle.shutdown();
953 }
954 self.drop_without_shutdown();
955 _result
956 }
957
958 pub fn send_no_shutdown_on_err(self, mut count: u64) -> Result<(), fidl::Error> {
960 let _result = self.send_raw(count);
961 self.drop_without_shutdown();
962 _result
963 }
964
965 fn send_raw(&self, mut count: u64) -> Result<(), fidl::Error> {
966 self.control_handle.inner.send::<UtilGetArgumentCountResponse>(
967 (count,),
968 self.tx_id,
969 0x41ef27d234ed7098,
970 fidl::encoding::DynamicFlags::empty(),
971 )
972 }
973}
974
975#[must_use = "FIDL methods require a response to be sent"]
976#[derive(Debug)]
977pub struct UtilGetEnvironmentResponder {
978 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
979 tx_id: u32,
980}
981
982impl std::ops::Drop for UtilGetEnvironmentResponder {
986 fn drop(&mut self) {
987 self.control_handle.shutdown();
988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
990 }
991}
992
993impl fidl::endpoints::Responder for UtilGetEnvironmentResponder {
994 type ControlHandle = UtilControlHandle;
995
996 fn control_handle(&self) -> &UtilControlHandle {
997 &self.control_handle
998 }
999
1000 fn drop_without_shutdown(mut self) {
1001 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1003 std::mem::forget(self);
1005 }
1006}
1007
1008impl UtilGetEnvironmentResponder {
1009 pub fn send(self, mut vars: &[EnvVar]) -> Result<(), fidl::Error> {
1013 let _result = self.send_raw(vars);
1014 if _result.is_err() {
1015 self.control_handle.shutdown();
1016 }
1017 self.drop_without_shutdown();
1018 _result
1019 }
1020
1021 pub fn send_no_shutdown_on_err(self, mut vars: &[EnvVar]) -> Result<(), fidl::Error> {
1023 let _result = self.send_raw(vars);
1024 self.drop_without_shutdown();
1025 _result
1026 }
1027
1028 fn send_raw(&self, mut vars: &[EnvVar]) -> Result<(), fidl::Error> {
1029 self.control_handle.inner.send::<UtilGetEnvironmentResponse>(
1030 (vars,),
1031 self.tx_id,
1032 0x451e633adf04ec23,
1033 fidl::encoding::DynamicFlags::empty(),
1034 )
1035 }
1036}
1037
1038#[must_use = "FIDL methods require a response to be sent"]
1039#[derive(Debug)]
1040pub struct UtilGetEnvironmentCountResponder {
1041 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
1042 tx_id: u32,
1043}
1044
1045impl std::ops::Drop for UtilGetEnvironmentCountResponder {
1049 fn drop(&mut self) {
1050 self.control_handle.shutdown();
1051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1053 }
1054}
1055
1056impl fidl::endpoints::Responder for UtilGetEnvironmentCountResponder {
1057 type ControlHandle = UtilControlHandle;
1058
1059 fn control_handle(&self) -> &UtilControlHandle {
1060 &self.control_handle
1061 }
1062
1063 fn drop_without_shutdown(mut self) {
1064 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1066 std::mem::forget(self);
1068 }
1069}
1070
1071impl UtilGetEnvironmentCountResponder {
1072 pub fn send(self, mut count: u64) -> Result<(), fidl::Error> {
1076 let _result = self.send_raw(count);
1077 if _result.is_err() {
1078 self.control_handle.shutdown();
1079 }
1080 self.drop_without_shutdown();
1081 _result
1082 }
1083
1084 pub fn send_no_shutdown_on_err(self, mut count: u64) -> Result<(), fidl::Error> {
1086 let _result = self.send_raw(count);
1087 self.drop_without_shutdown();
1088 _result
1089 }
1090
1091 fn send_raw(&self, mut count: u64) -> Result<(), fidl::Error> {
1092 self.control_handle.inner.send::<UtilGetEnvironmentCountResponse>(
1093 (count,),
1094 self.tx_id,
1095 0xe01fe768fb1be1a,
1096 fidl::encoding::DynamicFlags::empty(),
1097 )
1098 }
1099}
1100
1101#[must_use = "FIDL methods require a response to be sent"]
1102#[derive(Debug)]
1103pub struct UtilDumpNamespaceResponder {
1104 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
1105 tx_id: u32,
1106}
1107
1108impl std::ops::Drop for UtilDumpNamespaceResponder {
1112 fn drop(&mut self) {
1113 self.control_handle.shutdown();
1114 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1116 }
1117}
1118
1119impl fidl::endpoints::Responder for UtilDumpNamespaceResponder {
1120 type ControlHandle = UtilControlHandle;
1121
1122 fn control_handle(&self) -> &UtilControlHandle {
1123 &self.control_handle
1124 }
1125
1126 fn drop_without_shutdown(mut self) {
1127 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1129 std::mem::forget(self);
1131 }
1132}
1133
1134impl UtilDumpNamespaceResponder {
1135 pub fn send(self, mut contents: &str) -> Result<(), fidl::Error> {
1139 let _result = self.send_raw(contents);
1140 if _result.is_err() {
1141 self.control_handle.shutdown();
1142 }
1143 self.drop_without_shutdown();
1144 _result
1145 }
1146
1147 pub fn send_no_shutdown_on_err(self, mut contents: &str) -> Result<(), fidl::Error> {
1149 let _result = self.send_raw(contents);
1150 self.drop_without_shutdown();
1151 _result
1152 }
1153
1154 fn send_raw(&self, mut contents: &str) -> Result<(), fidl::Error> {
1155 self.control_handle.inner.send::<UtilDumpNamespaceResponse>(
1156 (contents,),
1157 self.tx_id,
1158 0x73826cecc1a7f3a4,
1159 fidl::encoding::DynamicFlags::empty(),
1160 )
1161 }
1162}
1163
1164#[must_use = "FIDL methods require a response to be sent"]
1165#[derive(Debug)]
1166pub struct UtilReadFileResponder {
1167 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
1168 tx_id: u32,
1169}
1170
1171impl std::ops::Drop for UtilReadFileResponder {
1175 fn drop(&mut self) {
1176 self.control_handle.shutdown();
1177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1179 }
1180}
1181
1182impl fidl::endpoints::Responder for UtilReadFileResponder {
1183 type ControlHandle = UtilControlHandle;
1184
1185 fn control_handle(&self) -> &UtilControlHandle {
1186 &self.control_handle
1187 }
1188
1189 fn drop_without_shutdown(mut self) {
1190 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1192 std::mem::forget(self);
1194 }
1195}
1196
1197impl UtilReadFileResponder {
1198 pub fn send(self, mut contents: &str) -> Result<(), fidl::Error> {
1202 let _result = self.send_raw(contents);
1203 if _result.is_err() {
1204 self.control_handle.shutdown();
1205 }
1206 self.drop_without_shutdown();
1207 _result
1208 }
1209
1210 pub fn send_no_shutdown_on_err(self, mut contents: &str) -> Result<(), fidl::Error> {
1212 let _result = self.send_raw(contents);
1213 self.drop_without_shutdown();
1214 _result
1215 }
1216
1217 fn send_raw(&self, mut contents: &str) -> Result<(), fidl::Error> {
1218 self.control_handle.inner.send::<UtilReadFileResponse>(
1219 (contents,),
1220 self.tx_id,
1221 0x2ea8e2e4b427a391,
1222 fidl::encoding::DynamicFlags::empty(),
1223 )
1224 }
1225}
1226
1227#[must_use = "FIDL methods require a response to be sent"]
1228#[derive(Debug)]
1229pub struct UtilGetLifecycleKoidResponder {
1230 control_handle: std::mem::ManuallyDrop<UtilControlHandle>,
1231 tx_id: u32,
1232}
1233
1234impl std::ops::Drop for UtilGetLifecycleKoidResponder {
1238 fn drop(&mut self) {
1239 self.control_handle.shutdown();
1240 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1242 }
1243}
1244
1245impl fidl::endpoints::Responder for UtilGetLifecycleKoidResponder {
1246 type ControlHandle = UtilControlHandle;
1247
1248 fn control_handle(&self) -> &UtilControlHandle {
1249 &self.control_handle
1250 }
1251
1252 fn drop_without_shutdown(mut self) {
1253 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1255 std::mem::forget(self);
1257 }
1258}
1259
1260impl UtilGetLifecycleKoidResponder {
1261 pub fn send(self, mut koid: u64) -> Result<(), fidl::Error> {
1265 let _result = self.send_raw(koid);
1266 if _result.is_err() {
1267 self.control_handle.shutdown();
1268 }
1269 self.drop_without_shutdown();
1270 _result
1271 }
1272
1273 pub fn send_no_shutdown_on_err(self, mut koid: u64) -> Result<(), fidl::Error> {
1275 let _result = self.send_raw(koid);
1276 self.drop_without_shutdown();
1277 _result
1278 }
1279
1280 fn send_raw(&self, mut koid: u64) -> Result<(), fidl::Error> {
1281 self.control_handle.inner.send::<UtilGetLifecycleKoidResponse>(
1282 (koid,),
1283 self.tx_id,
1284 0xdaecfc0fe4c8f60,
1285 fidl::encoding::DynamicFlags::empty(),
1286 )
1287 }
1288}
1289
1290mod internal {
1291 use super::*;
1292
1293 impl fidl::encoding::ValueTypeMarker for EnvVar {
1294 type Borrowed<'a> = &'a Self;
1295 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1296 value
1297 }
1298 }
1299
1300 unsafe impl fidl::encoding::TypeMarker for EnvVar {
1301 type Owned = Self;
1302
1303 #[inline(always)]
1304 fn inline_align(_context: fidl::encoding::Context) -> usize {
1305 8
1306 }
1307
1308 #[inline(always)]
1309 fn inline_size(_context: fidl::encoding::Context) -> usize {
1310 32
1311 }
1312 }
1313
1314 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EnvVar, D> for &EnvVar {
1315 #[inline]
1316 unsafe fn encode(
1317 self,
1318 encoder: &mut fidl::encoding::Encoder<'_, D>,
1319 offset: usize,
1320 _depth: fidl::encoding::Depth,
1321 ) -> fidl::Result<()> {
1322 encoder.debug_check_bounds::<EnvVar>(offset);
1323 fidl::encoding::Encode::<EnvVar, D>::encode(
1325 (
1326 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1327 &self.key,
1328 ),
1329 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1330 &self.value,
1331 ),
1332 ),
1333 encoder,
1334 offset,
1335 _depth,
1336 )
1337 }
1338 }
1339 unsafe impl<
1340 D: fidl::encoding::ResourceDialect,
1341 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1342 T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1343 > fidl::encoding::Encode<EnvVar, D> for (T0, T1)
1344 {
1345 #[inline]
1346 unsafe fn encode(
1347 self,
1348 encoder: &mut fidl::encoding::Encoder<'_, D>,
1349 offset: usize,
1350 depth: fidl::encoding::Depth,
1351 ) -> fidl::Result<()> {
1352 encoder.debug_check_bounds::<EnvVar>(offset);
1353 self.0.encode(encoder, offset + 0, depth)?;
1357 self.1.encode(encoder, offset + 16, depth)?;
1358 Ok(())
1359 }
1360 }
1361
1362 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnvVar {
1363 #[inline(always)]
1364 fn new_empty() -> Self {
1365 Self {
1366 key: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1367 value: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1368 }
1369 }
1370
1371 #[inline]
1372 unsafe fn decode(
1373 &mut self,
1374 decoder: &mut fidl::encoding::Decoder<'_, D>,
1375 offset: usize,
1376 _depth: fidl::encoding::Depth,
1377 ) -> fidl::Result<()> {
1378 decoder.debug_check_bounds::<Self>(offset);
1379 fidl::decode!(
1381 fidl::encoding::UnboundedString,
1382 D,
1383 &mut self.key,
1384 decoder,
1385 offset + 0,
1386 _depth
1387 )?;
1388 fidl::decode!(
1389 fidl::encoding::UnboundedString,
1390 D,
1391 &mut self.value,
1392 decoder,
1393 offset + 16,
1394 _depth
1395 )?;
1396 Ok(())
1397 }
1398 }
1399
1400 impl fidl::encoding::ValueTypeMarker for UtilDumpNamespaceResponse {
1401 type Borrowed<'a> = &'a Self;
1402 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1403 value
1404 }
1405 }
1406
1407 unsafe impl fidl::encoding::TypeMarker for UtilDumpNamespaceResponse {
1408 type Owned = Self;
1409
1410 #[inline(always)]
1411 fn inline_align(_context: fidl::encoding::Context) -> usize {
1412 8
1413 }
1414
1415 #[inline(always)]
1416 fn inline_size(_context: fidl::encoding::Context) -> usize {
1417 16
1418 }
1419 }
1420
1421 unsafe impl<D: fidl::encoding::ResourceDialect>
1422 fidl::encoding::Encode<UtilDumpNamespaceResponse, D> for &UtilDumpNamespaceResponse
1423 {
1424 #[inline]
1425 unsafe fn encode(
1426 self,
1427 encoder: &mut fidl::encoding::Encoder<'_, D>,
1428 offset: usize,
1429 _depth: fidl::encoding::Depth,
1430 ) -> fidl::Result<()> {
1431 encoder.debug_check_bounds::<UtilDumpNamespaceResponse>(offset);
1432 fidl::encoding::Encode::<UtilDumpNamespaceResponse, D>::encode(
1434 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1435 &self.contents,
1436 ),),
1437 encoder,
1438 offset,
1439 _depth,
1440 )
1441 }
1442 }
1443 unsafe impl<
1444 D: fidl::encoding::ResourceDialect,
1445 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1446 > fidl::encoding::Encode<UtilDumpNamespaceResponse, D> for (T0,)
1447 {
1448 #[inline]
1449 unsafe fn encode(
1450 self,
1451 encoder: &mut fidl::encoding::Encoder<'_, D>,
1452 offset: usize,
1453 depth: fidl::encoding::Depth,
1454 ) -> fidl::Result<()> {
1455 encoder.debug_check_bounds::<UtilDumpNamespaceResponse>(offset);
1456 self.0.encode(encoder, offset + 0, depth)?;
1460 Ok(())
1461 }
1462 }
1463
1464 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1465 for UtilDumpNamespaceResponse
1466 {
1467 #[inline(always)]
1468 fn new_empty() -> Self {
1469 Self { contents: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
1470 }
1471
1472 #[inline]
1473 unsafe fn decode(
1474 &mut self,
1475 decoder: &mut fidl::encoding::Decoder<'_, D>,
1476 offset: usize,
1477 _depth: fidl::encoding::Depth,
1478 ) -> fidl::Result<()> {
1479 decoder.debug_check_bounds::<Self>(offset);
1480 fidl::decode!(
1482 fidl::encoding::UnboundedString,
1483 D,
1484 &mut self.contents,
1485 decoder,
1486 offset + 0,
1487 _depth
1488 )?;
1489 Ok(())
1490 }
1491 }
1492
1493 impl fidl::encoding::ValueTypeMarker for UtilGetArgumentCountResponse {
1494 type Borrowed<'a> = &'a Self;
1495 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1496 value
1497 }
1498 }
1499
1500 unsafe impl fidl::encoding::TypeMarker for UtilGetArgumentCountResponse {
1501 type Owned = Self;
1502
1503 #[inline(always)]
1504 fn inline_align(_context: fidl::encoding::Context) -> usize {
1505 8
1506 }
1507
1508 #[inline(always)]
1509 fn inline_size(_context: fidl::encoding::Context) -> usize {
1510 8
1511 }
1512 #[inline(always)]
1513 fn encode_is_copy() -> bool {
1514 true
1515 }
1516
1517 #[inline(always)]
1518 fn decode_is_copy() -> bool {
1519 true
1520 }
1521 }
1522
1523 unsafe impl<D: fidl::encoding::ResourceDialect>
1524 fidl::encoding::Encode<UtilGetArgumentCountResponse, D> for &UtilGetArgumentCountResponse
1525 {
1526 #[inline]
1527 unsafe fn encode(
1528 self,
1529 encoder: &mut fidl::encoding::Encoder<'_, D>,
1530 offset: usize,
1531 _depth: fidl::encoding::Depth,
1532 ) -> fidl::Result<()> {
1533 encoder.debug_check_bounds::<UtilGetArgumentCountResponse>(offset);
1534 unsafe {
1535 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1537 (buf_ptr as *mut UtilGetArgumentCountResponse)
1538 .write_unaligned((self as *const UtilGetArgumentCountResponse).read());
1539 }
1542 Ok(())
1543 }
1544 }
1545 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1546 fidl::encoding::Encode<UtilGetArgumentCountResponse, D> for (T0,)
1547 {
1548 #[inline]
1549 unsafe fn encode(
1550 self,
1551 encoder: &mut fidl::encoding::Encoder<'_, D>,
1552 offset: usize,
1553 depth: fidl::encoding::Depth,
1554 ) -> fidl::Result<()> {
1555 encoder.debug_check_bounds::<UtilGetArgumentCountResponse>(offset);
1556 self.0.encode(encoder, offset + 0, depth)?;
1560 Ok(())
1561 }
1562 }
1563
1564 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1565 for UtilGetArgumentCountResponse
1566 {
1567 #[inline(always)]
1568 fn new_empty() -> Self {
1569 Self { count: fidl::new_empty!(u64, D) }
1570 }
1571
1572 #[inline]
1573 unsafe fn decode(
1574 &mut self,
1575 decoder: &mut fidl::encoding::Decoder<'_, D>,
1576 offset: usize,
1577 _depth: fidl::encoding::Depth,
1578 ) -> fidl::Result<()> {
1579 decoder.debug_check_bounds::<Self>(offset);
1580 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1581 unsafe {
1584 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1585 }
1586 Ok(())
1587 }
1588 }
1589
1590 impl fidl::encoding::ValueTypeMarker for UtilGetArgumentsResponse {
1591 type Borrowed<'a> = &'a Self;
1592 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1593 value
1594 }
1595 }
1596
1597 unsafe impl fidl::encoding::TypeMarker for UtilGetArgumentsResponse {
1598 type Owned = Self;
1599
1600 #[inline(always)]
1601 fn inline_align(_context: fidl::encoding::Context) -> usize {
1602 8
1603 }
1604
1605 #[inline(always)]
1606 fn inline_size(_context: fidl::encoding::Context) -> usize {
1607 16
1608 }
1609 }
1610
1611 unsafe impl<D: fidl::encoding::ResourceDialect>
1612 fidl::encoding::Encode<UtilGetArgumentsResponse, D> for &UtilGetArgumentsResponse
1613 {
1614 #[inline]
1615 unsafe fn encode(
1616 self,
1617 encoder: &mut fidl::encoding::Encoder<'_, D>,
1618 offset: usize,
1619 _depth: fidl::encoding::Depth,
1620 ) -> fidl::Result<()> {
1621 encoder.debug_check_bounds::<UtilGetArgumentsResponse>(offset);
1622 fidl::encoding::Encode::<UtilGetArgumentsResponse, D>::encode(
1624 (
1625 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.args),
1626 ),
1627 encoder, offset, _depth
1628 )
1629 }
1630 }
1631 unsafe impl<
1632 D: fidl::encoding::ResourceDialect,
1633 T0: fidl::encoding::Encode<
1634 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
1635 D,
1636 >,
1637 > fidl::encoding::Encode<UtilGetArgumentsResponse, D> for (T0,)
1638 {
1639 #[inline]
1640 unsafe fn encode(
1641 self,
1642 encoder: &mut fidl::encoding::Encoder<'_, D>,
1643 offset: usize,
1644 depth: fidl::encoding::Depth,
1645 ) -> fidl::Result<()> {
1646 encoder.debug_check_bounds::<UtilGetArgumentsResponse>(offset);
1647 self.0.encode(encoder, offset + 0, depth)?;
1651 Ok(())
1652 }
1653 }
1654
1655 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1656 for UtilGetArgumentsResponse
1657 {
1658 #[inline(always)]
1659 fn new_empty() -> Self {
1660 Self {
1661 args: fidl::new_empty!(
1662 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
1663 D
1664 ),
1665 }
1666 }
1667
1668 #[inline]
1669 unsafe fn decode(
1670 &mut self,
1671 decoder: &mut fidl::encoding::Decoder<'_, D>,
1672 offset: usize,
1673 _depth: fidl::encoding::Depth,
1674 ) -> fidl::Result<()> {
1675 decoder.debug_check_bounds::<Self>(offset);
1676 fidl::decode!(
1678 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
1679 D,
1680 &mut self.args,
1681 decoder,
1682 offset + 0,
1683 _depth
1684 )?;
1685 Ok(())
1686 }
1687 }
1688
1689 impl fidl::encoding::ValueTypeMarker for UtilGetEnvironmentCountResponse {
1690 type Borrowed<'a> = &'a Self;
1691 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1692 value
1693 }
1694 }
1695
1696 unsafe impl fidl::encoding::TypeMarker for UtilGetEnvironmentCountResponse {
1697 type Owned = Self;
1698
1699 #[inline(always)]
1700 fn inline_align(_context: fidl::encoding::Context) -> usize {
1701 8
1702 }
1703
1704 #[inline(always)]
1705 fn inline_size(_context: fidl::encoding::Context) -> usize {
1706 8
1707 }
1708 #[inline(always)]
1709 fn encode_is_copy() -> bool {
1710 true
1711 }
1712
1713 #[inline(always)]
1714 fn decode_is_copy() -> bool {
1715 true
1716 }
1717 }
1718
1719 unsafe impl<D: fidl::encoding::ResourceDialect>
1720 fidl::encoding::Encode<UtilGetEnvironmentCountResponse, D>
1721 for &UtilGetEnvironmentCountResponse
1722 {
1723 #[inline]
1724 unsafe fn encode(
1725 self,
1726 encoder: &mut fidl::encoding::Encoder<'_, D>,
1727 offset: usize,
1728 _depth: fidl::encoding::Depth,
1729 ) -> fidl::Result<()> {
1730 encoder.debug_check_bounds::<UtilGetEnvironmentCountResponse>(offset);
1731 unsafe {
1732 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1734 (buf_ptr as *mut UtilGetEnvironmentCountResponse)
1735 .write_unaligned((self as *const UtilGetEnvironmentCountResponse).read());
1736 }
1739 Ok(())
1740 }
1741 }
1742 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1743 fidl::encoding::Encode<UtilGetEnvironmentCountResponse, D> for (T0,)
1744 {
1745 #[inline]
1746 unsafe fn encode(
1747 self,
1748 encoder: &mut fidl::encoding::Encoder<'_, D>,
1749 offset: usize,
1750 depth: fidl::encoding::Depth,
1751 ) -> fidl::Result<()> {
1752 encoder.debug_check_bounds::<UtilGetEnvironmentCountResponse>(offset);
1753 self.0.encode(encoder, offset + 0, depth)?;
1757 Ok(())
1758 }
1759 }
1760
1761 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1762 for UtilGetEnvironmentCountResponse
1763 {
1764 #[inline(always)]
1765 fn new_empty() -> Self {
1766 Self { count: fidl::new_empty!(u64, D) }
1767 }
1768
1769 #[inline]
1770 unsafe fn decode(
1771 &mut self,
1772 decoder: &mut fidl::encoding::Decoder<'_, D>,
1773 offset: usize,
1774 _depth: fidl::encoding::Depth,
1775 ) -> fidl::Result<()> {
1776 decoder.debug_check_bounds::<Self>(offset);
1777 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1778 unsafe {
1781 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1782 }
1783 Ok(())
1784 }
1785 }
1786
1787 impl fidl::encoding::ValueTypeMarker for UtilGetEnvironmentResponse {
1788 type Borrowed<'a> = &'a Self;
1789 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1790 value
1791 }
1792 }
1793
1794 unsafe impl fidl::encoding::TypeMarker for UtilGetEnvironmentResponse {
1795 type Owned = Self;
1796
1797 #[inline(always)]
1798 fn inline_align(_context: fidl::encoding::Context) -> usize {
1799 8
1800 }
1801
1802 #[inline(always)]
1803 fn inline_size(_context: fidl::encoding::Context) -> usize {
1804 16
1805 }
1806 }
1807
1808 unsafe impl<D: fidl::encoding::ResourceDialect>
1809 fidl::encoding::Encode<UtilGetEnvironmentResponse, D> for &UtilGetEnvironmentResponse
1810 {
1811 #[inline]
1812 unsafe fn encode(
1813 self,
1814 encoder: &mut fidl::encoding::Encoder<'_, D>,
1815 offset: usize,
1816 _depth: fidl::encoding::Depth,
1817 ) -> fidl::Result<()> {
1818 encoder.debug_check_bounds::<UtilGetEnvironmentResponse>(offset);
1819 fidl::encoding::Encode::<UtilGetEnvironmentResponse, D>::encode(
1821 (
1822 <fidl::encoding::UnboundedVector<EnvVar> as fidl::encoding::ValueTypeMarker>::borrow(&self.vars),
1823 ),
1824 encoder, offset, _depth
1825 )
1826 }
1827 }
1828 unsafe impl<
1829 D: fidl::encoding::ResourceDialect,
1830 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<EnvVar>, D>,
1831 > fidl::encoding::Encode<UtilGetEnvironmentResponse, D> for (T0,)
1832 {
1833 #[inline]
1834 unsafe fn encode(
1835 self,
1836 encoder: &mut fidl::encoding::Encoder<'_, D>,
1837 offset: usize,
1838 depth: fidl::encoding::Depth,
1839 ) -> fidl::Result<()> {
1840 encoder.debug_check_bounds::<UtilGetEnvironmentResponse>(offset);
1841 self.0.encode(encoder, offset + 0, depth)?;
1845 Ok(())
1846 }
1847 }
1848
1849 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1850 for UtilGetEnvironmentResponse
1851 {
1852 #[inline(always)]
1853 fn new_empty() -> Self {
1854 Self { vars: fidl::new_empty!(fidl::encoding::UnboundedVector<EnvVar>, D) }
1855 }
1856
1857 #[inline]
1858 unsafe fn decode(
1859 &mut self,
1860 decoder: &mut fidl::encoding::Decoder<'_, D>,
1861 offset: usize,
1862 _depth: fidl::encoding::Depth,
1863 ) -> fidl::Result<()> {
1864 decoder.debug_check_bounds::<Self>(offset);
1865 fidl::decode!(
1867 fidl::encoding::UnboundedVector<EnvVar>,
1868 D,
1869 &mut self.vars,
1870 decoder,
1871 offset + 0,
1872 _depth
1873 )?;
1874 Ok(())
1875 }
1876 }
1877
1878 impl fidl::encoding::ValueTypeMarker for UtilGetLifecycleKoidResponse {
1879 type Borrowed<'a> = &'a Self;
1880 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1881 value
1882 }
1883 }
1884
1885 unsafe impl fidl::encoding::TypeMarker for UtilGetLifecycleKoidResponse {
1886 type Owned = Self;
1887
1888 #[inline(always)]
1889 fn inline_align(_context: fidl::encoding::Context) -> usize {
1890 8
1891 }
1892
1893 #[inline(always)]
1894 fn inline_size(_context: fidl::encoding::Context) -> usize {
1895 8
1896 }
1897 #[inline(always)]
1898 fn encode_is_copy() -> bool {
1899 true
1900 }
1901
1902 #[inline(always)]
1903 fn decode_is_copy() -> bool {
1904 true
1905 }
1906 }
1907
1908 unsafe impl<D: fidl::encoding::ResourceDialect>
1909 fidl::encoding::Encode<UtilGetLifecycleKoidResponse, D> for &UtilGetLifecycleKoidResponse
1910 {
1911 #[inline]
1912 unsafe fn encode(
1913 self,
1914 encoder: &mut fidl::encoding::Encoder<'_, D>,
1915 offset: usize,
1916 _depth: fidl::encoding::Depth,
1917 ) -> fidl::Result<()> {
1918 encoder.debug_check_bounds::<UtilGetLifecycleKoidResponse>(offset);
1919 unsafe {
1920 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1922 (buf_ptr as *mut UtilGetLifecycleKoidResponse)
1923 .write_unaligned((self as *const UtilGetLifecycleKoidResponse).read());
1924 }
1927 Ok(())
1928 }
1929 }
1930 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1931 fidl::encoding::Encode<UtilGetLifecycleKoidResponse, D> for (T0,)
1932 {
1933 #[inline]
1934 unsafe fn encode(
1935 self,
1936 encoder: &mut fidl::encoding::Encoder<'_, D>,
1937 offset: usize,
1938 depth: fidl::encoding::Depth,
1939 ) -> fidl::Result<()> {
1940 encoder.debug_check_bounds::<UtilGetLifecycleKoidResponse>(offset);
1941 self.0.encode(encoder, offset + 0, depth)?;
1945 Ok(())
1946 }
1947 }
1948
1949 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1950 for UtilGetLifecycleKoidResponse
1951 {
1952 #[inline(always)]
1953 fn new_empty() -> Self {
1954 Self { koid: fidl::new_empty!(u64, D) }
1955 }
1956
1957 #[inline]
1958 unsafe fn decode(
1959 &mut self,
1960 decoder: &mut fidl::encoding::Decoder<'_, D>,
1961 offset: usize,
1962 _depth: fidl::encoding::Depth,
1963 ) -> fidl::Result<()> {
1964 decoder.debug_check_bounds::<Self>(offset);
1965 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1966 unsafe {
1969 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1970 }
1971 Ok(())
1972 }
1973 }
1974
1975 impl fidl::encoding::ValueTypeMarker for UtilReadFileRequest {
1976 type Borrowed<'a> = &'a Self;
1977 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1978 value
1979 }
1980 }
1981
1982 unsafe impl fidl::encoding::TypeMarker for UtilReadFileRequest {
1983 type Owned = Self;
1984
1985 #[inline(always)]
1986 fn inline_align(_context: fidl::encoding::Context) -> usize {
1987 8
1988 }
1989
1990 #[inline(always)]
1991 fn inline_size(_context: fidl::encoding::Context) -> usize {
1992 16
1993 }
1994 }
1995
1996 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UtilReadFileRequest, D>
1997 for &UtilReadFileRequest
1998 {
1999 #[inline]
2000 unsafe fn encode(
2001 self,
2002 encoder: &mut fidl::encoding::Encoder<'_, D>,
2003 offset: usize,
2004 _depth: fidl::encoding::Depth,
2005 ) -> fidl::Result<()> {
2006 encoder.debug_check_bounds::<UtilReadFileRequest>(offset);
2007 fidl::encoding::Encode::<UtilReadFileRequest, D>::encode(
2009 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2010 &self.path,
2011 ),),
2012 encoder,
2013 offset,
2014 _depth,
2015 )
2016 }
2017 }
2018 unsafe impl<
2019 D: fidl::encoding::ResourceDialect,
2020 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2021 > fidl::encoding::Encode<UtilReadFileRequest, D> for (T0,)
2022 {
2023 #[inline]
2024 unsafe fn encode(
2025 self,
2026 encoder: &mut fidl::encoding::Encoder<'_, D>,
2027 offset: usize,
2028 depth: fidl::encoding::Depth,
2029 ) -> fidl::Result<()> {
2030 encoder.debug_check_bounds::<UtilReadFileRequest>(offset);
2031 self.0.encode(encoder, offset + 0, depth)?;
2035 Ok(())
2036 }
2037 }
2038
2039 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UtilReadFileRequest {
2040 #[inline(always)]
2041 fn new_empty() -> Self {
2042 Self { path: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
2043 }
2044
2045 #[inline]
2046 unsafe fn decode(
2047 &mut self,
2048 decoder: &mut fidl::encoding::Decoder<'_, D>,
2049 offset: usize,
2050 _depth: fidl::encoding::Depth,
2051 ) -> fidl::Result<()> {
2052 decoder.debug_check_bounds::<Self>(offset);
2053 fidl::decode!(
2055 fidl::encoding::UnboundedString,
2056 D,
2057 &mut self.path,
2058 decoder,
2059 offset + 0,
2060 _depth
2061 )?;
2062 Ok(())
2063 }
2064 }
2065
2066 impl fidl::encoding::ValueTypeMarker for UtilReadFileResponse {
2067 type Borrowed<'a> = &'a Self;
2068 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2069 value
2070 }
2071 }
2072
2073 unsafe impl fidl::encoding::TypeMarker for UtilReadFileResponse {
2074 type Owned = Self;
2075
2076 #[inline(always)]
2077 fn inline_align(_context: fidl::encoding::Context) -> usize {
2078 8
2079 }
2080
2081 #[inline(always)]
2082 fn inline_size(_context: fidl::encoding::Context) -> usize {
2083 16
2084 }
2085 }
2086
2087 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UtilReadFileResponse, D>
2088 for &UtilReadFileResponse
2089 {
2090 #[inline]
2091 unsafe fn encode(
2092 self,
2093 encoder: &mut fidl::encoding::Encoder<'_, D>,
2094 offset: usize,
2095 _depth: fidl::encoding::Depth,
2096 ) -> fidl::Result<()> {
2097 encoder.debug_check_bounds::<UtilReadFileResponse>(offset);
2098 fidl::encoding::Encode::<UtilReadFileResponse, D>::encode(
2100 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2101 &self.contents,
2102 ),),
2103 encoder,
2104 offset,
2105 _depth,
2106 )
2107 }
2108 }
2109 unsafe impl<
2110 D: fidl::encoding::ResourceDialect,
2111 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2112 > fidl::encoding::Encode<UtilReadFileResponse, D> for (T0,)
2113 {
2114 #[inline]
2115 unsafe fn encode(
2116 self,
2117 encoder: &mut fidl::encoding::Encoder<'_, D>,
2118 offset: usize,
2119 depth: fidl::encoding::Depth,
2120 ) -> fidl::Result<()> {
2121 encoder.debug_check_bounds::<UtilReadFileResponse>(offset);
2122 self.0.encode(encoder, offset + 0, depth)?;
2126 Ok(())
2127 }
2128 }
2129
2130 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UtilReadFileResponse {
2131 #[inline(always)]
2132 fn new_empty() -> Self {
2133 Self { contents: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
2134 }
2135
2136 #[inline]
2137 unsafe fn decode(
2138 &mut self,
2139 decoder: &mut fidl::encoding::Decoder<'_, D>,
2140 offset: usize,
2141 _depth: fidl::encoding::Depth,
2142 ) -> fidl::Result<()> {
2143 decoder.debug_check_bounds::<Self>(offset);
2144 fidl::decode!(
2146 fidl::encoding::UnboundedString,
2147 D,
2148 &mut self.contents,
2149 decoder,
2150 offset + 0,
2151 _depth
2152 )?;
2153 Ok(())
2154 }
2155 }
2156}