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_io__common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub type Token = fdomain_client::Event;
16
17#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18pub struct DirectoryCreateSymlinkRequest {
19 pub name: String,
20 pub target: Vec<u8>,
21 pub connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
22}
23
24impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
25 for DirectoryCreateSymlinkRequest
26{
27}
28
29#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30pub struct DirectoryDeprecatedOpenRequest {
31 pub flags: OpenFlags,
32 pub mode: ModeType,
33 pub path: String,
34 pub object: fdomain_client::fidl::ServerEnd<NodeMarker>,
35}
36
37impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
38 for DirectoryDeprecatedOpenRequest
39{
40}
41
42#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43pub struct DirectoryGetTokenResponse {
44 pub s: i32,
45 pub token: Option<fdomain_client::NullableHandle>,
46}
47
48impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryGetTokenResponse {}
49
50#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
51pub struct DirectoryLinkRequest {
52 pub src: String,
53 pub dst_parent_token: fdomain_client::NullableHandle,
54 pub dst: String,
55}
56
57impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryLinkRequest {}
58
59#[derive(Debug, PartialEq)]
60pub struct DirectoryOpenRequest {
61 pub path: String,
62 pub flags: Flags,
63 pub options: Options,
64 pub object: fdomain_client::Channel,
65}
66
67impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryOpenRequest {}
68
69#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
70pub struct DirectoryRenameRequest {
71 pub src: String,
72 pub dst_parent_token: fdomain_client::Event,
73 pub dst: String,
74}
75
76impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryRenameRequest {}
77
78#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct DirectoryWatchRequest {
80 pub mask: WatchMask,
81 pub options: u32,
82 pub watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
83}
84
85impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryWatchRequest {}
86
87#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
88pub struct FileAllocateRequest {
89 pub offset: u64,
90 pub length: u64,
91 pub mode: AllocateMode,
96}
97
98impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileAllocateRequest {}
99
100#[derive(Debug, PartialEq)]
101pub struct FileEnableVerityRequest {
102 pub options: VerificationOptions,
103}
104
105impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileEnableVerityRequest {}
106
107#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
108pub struct FileObject {
109 pub event: Option<fdomain_client::Event>,
116 pub stream: Option<fdomain_client::Stream>,
120}
121
122impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileObject {}
123
124#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
125pub struct FileGetBackingMemoryResponse {
126 pub vmo: fdomain_client::Vmo,
127}
128
129impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
130 for FileGetBackingMemoryResponse
131{
132}
133
134#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
135pub struct LinkableLinkIntoRequest {
136 pub dst_parent_token: fdomain_client::Event,
137 pub dst: String,
138}
139
140impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LinkableLinkIntoRequest {}
141
142#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
143pub struct NodeDeprecatedCloneRequest {
144 pub flags: OpenFlags,
145 pub object: fdomain_client::fidl::ServerEnd<NodeMarker>,
146}
147
148impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeDeprecatedCloneRequest {}
149
150#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
151pub struct NodeListExtendedAttributesRequest {
152 pub iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
153}
154
155impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
156 for NodeListExtendedAttributesRequest
157{
158}
159
160#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161pub struct NodeOnOpenRequest {
162 pub s: i32,
163 pub info: Option<Box<NodeInfoDeprecated>>,
164}
165
166impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeOnOpenRequest {}
167
168#[derive(Debug, PartialEq)]
169pub struct NodeSetExtendedAttributeRequest {
170 pub name: Vec<u8>,
171 pub value: ExtendedAttributeValue,
172 pub mode: SetExtendedAttributeMode,
174}
175
176impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
177 for NodeSetExtendedAttributeRequest
178{
179}
180
181#[derive(Debug, Default, PartialEq)]
182pub struct ConnectionInfo {
183 pub rights: Option<Operations>,
190 #[doc(hidden)]
191 pub __source_breaking: fidl::marker::SourceBreaking,
192}
193
194impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {}
195
196#[derive(Debug, Default, PartialEq)]
198pub struct FileInfo {
199 pub is_append: Option<bool>,
203 pub observer: Option<fdomain_client::Event>,
216 pub stream: Option<fdomain_client::Stream>,
223 pub attributes: Option<NodeAttributes2>,
225 #[doc(hidden)]
226 pub __source_breaking: fidl::marker::SourceBreaking,
227}
228
229impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileInfo {}
230
231#[derive(Debug)]
235pub enum ExtendedAttributeValue {
236 Bytes(Vec<u8>),
237 Buffer(fdomain_client::Vmo),
238 #[doc(hidden)]
239 __SourceBreaking {
240 unknown_ordinal: u64,
241 },
242}
243
244#[macro_export]
246macro_rules! ExtendedAttributeValueUnknown {
247 () => {
248 _
249 };
250}
251
252impl PartialEq for ExtendedAttributeValue {
254 fn eq(&self, other: &Self) -> bool {
255 match (self, other) {
256 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
257 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
258 _ => false,
259 }
260 }
261}
262
263impl ExtendedAttributeValue {
264 #[inline]
265 pub fn ordinal(&self) -> u64 {
266 match *self {
267 Self::Bytes(_) => 1,
268 Self::Buffer(_) => 2,
269 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
270 }
271 }
272
273 #[inline]
274 pub fn unknown_variant_for_testing() -> Self {
275 Self::__SourceBreaking { unknown_ordinal: 0 }
276 }
277
278 #[inline]
279 pub fn is_unknown(&self) -> bool {
280 match self {
281 Self::__SourceBreaking { .. } => true,
282 _ => false,
283 }
284 }
285}
286
287impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ExtendedAttributeValue {}
288
289#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
290pub enum NodeInfoDeprecated {
291 Service(Service),
293 File(FileObject),
295 Directory(DirectoryObject),
297 Symlink(SymlinkObject),
299}
300
301impl NodeInfoDeprecated {
302 #[inline]
303 pub fn ordinal(&self) -> u64 {
304 match *self {
305 Self::Service(_) => 1,
306 Self::File(_) => 2,
307 Self::Directory(_) => 3,
308 Self::Symlink(_) => 4,
309 }
310 }
311}
312
313impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeInfoDeprecated {}
314
315#[derive(Debug)]
316pub enum Representation {
317 Node(NodeInfo),
319 Directory(DirectoryInfo),
321 File(FileInfo),
323 Symlink(SymlinkInfo),
325 #[doc(hidden)]
326 __SourceBreaking { unknown_ordinal: u64 },
327}
328
329#[macro_export]
331macro_rules! RepresentationUnknown {
332 () => {
333 _
334 };
335}
336
337impl PartialEq for Representation {
339 fn eq(&self, other: &Self) -> bool {
340 match (self, other) {
341 (Self::Node(x), Self::Node(y)) => *x == *y,
342 (Self::Directory(x), Self::Directory(y)) => *x == *y,
343 (Self::File(x), Self::File(y)) => *x == *y,
344 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
345 _ => false,
346 }
347 }
348}
349
350impl Representation {
351 #[inline]
352 pub fn ordinal(&self) -> u64 {
353 match *self {
354 Self::Node(_) => 1,
355 Self::Directory(_) => 2,
356 Self::File(_) => 3,
357 Self::Symlink(_) => 4,
358 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
359 }
360 }
361
362 #[inline]
363 pub fn unknown_variant_for_testing() -> Self {
364 Self::__SourceBreaking { unknown_ordinal: 0 }
365 }
366
367 #[inline]
368 pub fn is_unknown(&self) -> bool {
369 match self {
370 Self::__SourceBreaking { .. } => true,
371 _ => false,
372 }
373 }
374}
375
376impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Representation {}
377
378#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
379pub struct AdvisoryLockingMarker;
380
381impl fdomain_client::fidl::ProtocolMarker for AdvisoryLockingMarker {
382 type Proxy = AdvisoryLockingProxy;
383 type RequestStream = AdvisoryLockingRequestStream;
384
385 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
386}
387pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
388
389pub trait AdvisoryLockingProxyInterface: Send + Sync {
390 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
391 + Send;
392 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
393}
394
395#[derive(Debug, Clone)]
396pub struct AdvisoryLockingProxy {
397 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
398}
399
400impl fdomain_client::fidl::Proxy for AdvisoryLockingProxy {
401 type Protocol = AdvisoryLockingMarker;
402
403 fn from_channel(inner: fdomain_client::Channel) -> Self {
404 Self::new(inner)
405 }
406
407 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
408 self.client.into_channel().map_err(|client| Self { client })
409 }
410
411 fn as_channel(&self) -> &fdomain_client::Channel {
412 self.client.as_channel()
413 }
414}
415
416impl AdvisoryLockingProxy {
417 pub fn new(channel: fdomain_client::Channel) -> Self {
419 let protocol_name =
420 <AdvisoryLockingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
421 Self { client: fidl::client::Client::new(channel, protocol_name) }
422 }
423
424 pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
430 AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
431 }
432
433 pub fn r#advisory_lock(
457 &self,
458 mut request: &AdvisoryLockRequest,
459 ) -> fidl::client::QueryResponseFut<
460 AdvisoryLockingAdvisoryLockResult,
461 fdomain_client::fidl::FDomainResourceDialect,
462 > {
463 AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
464 }
465}
466
467impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
468 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
469 AdvisoryLockingAdvisoryLockResult,
470 fdomain_client::fidl::FDomainResourceDialect,
471 >;
472 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
473 fn _decode(
474 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
475 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
476 let _response = fidl::client::decode_transaction_body::<
477 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
478 fdomain_client::fidl::FDomainResourceDialect,
479 0x6ee9c0ad53ec87aa,
480 >(_buf?)?;
481 Ok(_response.map(|x| x))
482 }
483 self.client.send_query_and_decode::<
484 AdvisoryLockingAdvisoryLockRequest,
485 AdvisoryLockingAdvisoryLockResult,
486 >(
487 (request,),
488 0x6ee9c0ad53ec87aa,
489 fidl::encoding::DynamicFlags::empty(),
490 _decode,
491 )
492 }
493}
494
495pub struct AdvisoryLockingEventStream {
496 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
497}
498
499impl std::marker::Unpin for AdvisoryLockingEventStream {}
500
501impl futures::stream::FusedStream for AdvisoryLockingEventStream {
502 fn is_terminated(&self) -> bool {
503 self.event_receiver.is_terminated()
504 }
505}
506
507impl futures::Stream for AdvisoryLockingEventStream {
508 type Item = Result<AdvisoryLockingEvent, fidl::Error>;
509
510 fn poll_next(
511 mut self: std::pin::Pin<&mut Self>,
512 cx: &mut std::task::Context<'_>,
513 ) -> std::task::Poll<Option<Self::Item>> {
514 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
515 &mut self.event_receiver,
516 cx
517 )?) {
518 Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
519 None => std::task::Poll::Ready(None),
520 }
521 }
522}
523
524#[derive(Debug)]
525pub enum AdvisoryLockingEvent {}
526
527impl AdvisoryLockingEvent {
528 fn decode(
530 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
531 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
532 let (bytes, _handles) = buf.split_mut();
533 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
534 debug_assert_eq!(tx_header.tx_id, 0);
535 match tx_header.ordinal {
536 _ => Err(fidl::Error::UnknownOrdinal {
537 ordinal: tx_header.ordinal,
538 protocol_name:
539 <AdvisoryLockingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
540 }),
541 }
542 }
543}
544
545pub struct AdvisoryLockingRequestStream {
547 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
548 is_terminated: bool,
549}
550
551impl std::marker::Unpin for AdvisoryLockingRequestStream {}
552
553impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
554 fn is_terminated(&self) -> bool {
555 self.is_terminated
556 }
557}
558
559impl fdomain_client::fidl::RequestStream for AdvisoryLockingRequestStream {
560 type Protocol = AdvisoryLockingMarker;
561 type ControlHandle = AdvisoryLockingControlHandle;
562
563 fn from_channel(channel: fdomain_client::Channel) -> Self {
564 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
565 }
566
567 fn control_handle(&self) -> Self::ControlHandle {
568 AdvisoryLockingControlHandle { inner: self.inner.clone() }
569 }
570
571 fn into_inner(
572 self,
573 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
574 {
575 (self.inner, self.is_terminated)
576 }
577
578 fn from_inner(
579 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
580 is_terminated: bool,
581 ) -> Self {
582 Self { inner, is_terminated }
583 }
584}
585
586impl futures::Stream for AdvisoryLockingRequestStream {
587 type Item = Result<AdvisoryLockingRequest, fidl::Error>;
588
589 fn poll_next(
590 mut self: std::pin::Pin<&mut Self>,
591 cx: &mut std::task::Context<'_>,
592 ) -> std::task::Poll<Option<Self::Item>> {
593 let this = &mut *self;
594 if this.inner.check_shutdown(cx) {
595 this.is_terminated = true;
596 return std::task::Poll::Ready(None);
597 }
598 if this.is_terminated {
599 panic!("polled AdvisoryLockingRequestStream after completion");
600 }
601 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
602 |bytes, handles| {
603 match this.inner.channel().read_etc(cx, bytes, handles) {
604 std::task::Poll::Ready(Ok(())) => {}
605 std::task::Poll::Pending => return std::task::Poll::Pending,
606 std::task::Poll::Ready(Err(None)) => {
607 this.is_terminated = true;
608 return std::task::Poll::Ready(None);
609 }
610 std::task::Poll::Ready(Err(Some(e))) => {
611 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
612 e.into(),
613 ))));
614 }
615 }
616
617 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
619
620 std::task::Poll::Ready(Some(match header.ordinal {
621 0x6ee9c0ad53ec87aa => {
622 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
623 let mut req = fidl::new_empty!(AdvisoryLockingAdvisoryLockRequest, fdomain_client::fidl::FDomainResourceDialect);
624 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
625 let control_handle = AdvisoryLockingControlHandle {
626 inner: this.inner.clone(),
627 };
628 Ok(AdvisoryLockingRequest::AdvisoryLock {request: req.request,
629
630 responder: AdvisoryLockingAdvisoryLockResponder {
631 control_handle: std::mem::ManuallyDrop::new(control_handle),
632 tx_id: header.tx_id,
633 },
634 })
635 }
636 _ => Err(fidl::Error::UnknownOrdinal {
637 ordinal: header.ordinal,
638 protocol_name: <AdvisoryLockingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
639 }),
640 }))
641 },
642 )
643 }
644}
645
646#[derive(Debug)]
659pub enum AdvisoryLockingRequest {
660 AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
684}
685
686impl AdvisoryLockingRequest {
687 #[allow(irrefutable_let_patterns)]
688 pub fn into_advisory_lock(
689 self,
690 ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
691 if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
692 Some((request, responder))
693 } else {
694 None
695 }
696 }
697
698 pub fn method_name(&self) -> &'static str {
700 match *self {
701 AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
702 }
703 }
704}
705
706#[derive(Debug, Clone)]
707pub struct AdvisoryLockingControlHandle {
708 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
709}
710
711impl fdomain_client::fidl::ControlHandle for AdvisoryLockingControlHandle {
712 fn shutdown(&self) {
713 self.inner.shutdown()
714 }
715
716 fn is_closed(&self) -> bool {
717 self.inner.channel().is_closed()
718 }
719 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
720 self.inner.channel().on_closed()
721 }
722}
723
724impl AdvisoryLockingControlHandle {}
725
726#[must_use = "FIDL methods require a response to be sent"]
727#[derive(Debug)]
728pub struct AdvisoryLockingAdvisoryLockResponder {
729 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
730 tx_id: u32,
731}
732
733impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
737 fn drop(&mut self) {
738 self.control_handle.shutdown();
739 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
741 }
742}
743
744impl fdomain_client::fidl::Responder for AdvisoryLockingAdvisoryLockResponder {
745 type ControlHandle = AdvisoryLockingControlHandle;
746
747 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
748 &self.control_handle
749 }
750
751 fn drop_without_shutdown(mut self) {
752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
754 std::mem::forget(self);
756 }
757}
758
759impl AdvisoryLockingAdvisoryLockResponder {
760 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
764 let _result = self.send_raw(result);
765 if _result.is_err() {
766 self.control_handle.shutdown();
767 }
768 self.drop_without_shutdown();
769 _result
770 }
771
772 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
774 let _result = self.send_raw(result);
775 self.drop_without_shutdown();
776 _result
777 }
778
779 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
780 self.control_handle
781 .inner
782 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
783 result,
784 self.tx_id,
785 0x6ee9c0ad53ec87aa,
786 fidl::encoding::DynamicFlags::empty(),
787 )
788 }
789}
790
791#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
792pub struct DirectoryMarker;
793
794impl fdomain_client::fidl::ProtocolMarker for DirectoryMarker {
795 type Proxy = DirectoryProxy;
796 type RequestStream = DirectoryRequestStream;
797
798 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
799}
800impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryMarker {}
801pub type DirectoryUnlinkResult = Result<(), i32>;
802pub type DirectoryRenameResult = Result<(), i32>;
803pub type DirectoryCreateSymlinkResult = Result<(), i32>;
804
805pub trait DirectoryProxyInterface: Send + Sync {
806 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
807 + Send;
808 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
809 fn r#clone(
810 &self,
811 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
812 ) -> Result<(), fidl::Error>;
813 type CloseResponseFut: std::future::Future<
814 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
815 > + Send;
816 fn r#close(&self) -> Self::CloseResponseFut;
817 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
818 fn r#query(&self) -> Self::QueryResponseFut;
819 fn r#deprecated_clone(
820 &self,
821 flags: OpenFlags,
822 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
823 ) -> Result<(), fidl::Error>;
824 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
825 + Send;
826 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
827 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
828 fn r#deprecated_set_attr(
829 &self,
830 flags: NodeAttributeFlags,
831 attributes: &NodeAttributes,
832 ) -> Self::DeprecatedSetAttrResponseFut;
833 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
834 + Send;
835 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
836 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
837 + Send;
838 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
839 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
840 + Send;
841 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
842 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
843 + Send;
844 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
845 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
846 + Send;
847 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
848 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
849 + Send;
850 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
851 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
852 + Send;
853 fn r#update_attributes(
854 &self,
855 payload: &MutableNodeAttributes,
856 ) -> Self::UpdateAttributesResponseFut;
857 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
858 fn r#sync(&self) -> Self::SyncResponseFut;
859 fn r#list_extended_attributes(
860 &self,
861 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
862 ) -> Result<(), fidl::Error>;
863 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
864 + Send;
865 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
866 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
867 + Send;
868 fn r#set_extended_attribute(
869 &self,
870 name: &[u8],
871 value: ExtendedAttributeValue,
872 mode: SetExtendedAttributeMode,
873 ) -> Self::SetExtendedAttributeResponseFut;
874 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
875 + Send;
876 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
877 fn r#deprecated_open(
878 &self,
879 flags: OpenFlags,
880 mode: ModeType,
881 path: &str,
882 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
883 ) -> Result<(), fidl::Error>;
884 fn r#open(
885 &self,
886 path: &str,
887 flags: Flags,
888 options: &Options,
889 object: fdomain_client::Channel,
890 ) -> Result<(), fidl::Error>;
891 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
892 + Send;
893 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
894 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
895 fn r#rewind(&self) -> Self::RewindResponseFut;
896 type GetTokenResponseFut: std::future::Future<
897 Output = Result<(i32, Option<fdomain_client::NullableHandle>), fidl::Error>,
898 > + Send;
899 fn r#get_token(&self) -> Self::GetTokenResponseFut;
900 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
901 fn r#link(
902 &self,
903 src: &str,
904 dst_parent_token: fdomain_client::NullableHandle,
905 dst: &str,
906 ) -> Self::LinkResponseFut;
907 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
908 + Send;
909 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
910 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
911 + Send;
912 fn r#rename(
913 &self,
914 src: &str,
915 dst_parent_token: fdomain_client::Event,
916 dst: &str,
917 ) -> Self::RenameResponseFut;
918 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
919 + Send;
920 fn r#create_symlink(
921 &self,
922 name: &str,
923 target: &[u8],
924 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
925 ) -> Self::CreateSymlinkResponseFut;
926 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
927 fn r#watch(
928 &self,
929 mask: WatchMask,
930 options: u32,
931 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
932 ) -> Self::WatchResponseFut;
933}
934
935#[derive(Debug, Clone)]
936pub struct DirectoryProxy {
937 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
938}
939
940impl fdomain_client::fidl::Proxy for DirectoryProxy {
941 type Protocol = DirectoryMarker;
942
943 fn from_channel(inner: fdomain_client::Channel) -> Self {
944 Self::new(inner)
945 }
946
947 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
948 self.client.into_channel().map_err(|client| Self { client })
949 }
950
951 fn as_channel(&self) -> &fdomain_client::Channel {
952 self.client.as_channel()
953 }
954}
955
956impl DirectoryProxy {
957 pub fn new(channel: fdomain_client::Channel) -> Self {
959 let protocol_name = <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
960 Self { client: fidl::client::Client::new(channel, protocol_name) }
961 }
962
963 pub fn take_event_stream(&self) -> DirectoryEventStream {
969 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
970 }
971
972 pub fn r#advisory_lock(
996 &self,
997 mut request: &AdvisoryLockRequest,
998 ) -> fidl::client::QueryResponseFut<
999 AdvisoryLockingAdvisoryLockResult,
1000 fdomain_client::fidl::FDomainResourceDialect,
1001 > {
1002 DirectoryProxyInterface::r#advisory_lock(self, request)
1003 }
1004
1005 pub fn r#clone(
1006 &self,
1007 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1008 ) -> Result<(), fidl::Error> {
1009 DirectoryProxyInterface::r#clone(self, request)
1010 }
1011
1012 pub fn r#close(
1023 &self,
1024 ) -> fidl::client::QueryResponseFut<
1025 fdomain_fuchsia_unknown::CloseableCloseResult,
1026 fdomain_client::fidl::FDomainResourceDialect,
1027 > {
1028 DirectoryProxyInterface::r#close(self)
1029 }
1030
1031 pub fn r#query(
1032 &self,
1033 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
1034 DirectoryProxyInterface::r#query(self)
1035 }
1036
1037 pub fn r#deprecated_clone(
1039 &self,
1040 mut flags: OpenFlags,
1041 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1042 ) -> Result<(), fidl::Error> {
1043 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1044 }
1045
1046 pub fn r#deprecated_get_attr(
1048 &self,
1049 ) -> fidl::client::QueryResponseFut<
1050 (i32, NodeAttributes),
1051 fdomain_client::fidl::FDomainResourceDialect,
1052 > {
1053 DirectoryProxyInterface::r#deprecated_get_attr(self)
1054 }
1055
1056 pub fn r#deprecated_set_attr(
1058 &self,
1059 mut flags: NodeAttributeFlags,
1060 mut attributes: &NodeAttributes,
1061 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1062 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1063 }
1064
1065 pub fn r#deprecated_get_flags(
1067 &self,
1068 ) -> fidl::client::QueryResponseFut<
1069 (i32, OpenFlags),
1070 fdomain_client::fidl::FDomainResourceDialect,
1071 > {
1072 DirectoryProxyInterface::r#deprecated_get_flags(self)
1073 }
1074
1075 pub fn r#deprecated_set_flags(
1077 &self,
1078 mut flags: OpenFlags,
1079 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1080 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1081 }
1082
1083 pub fn r#get_flags(
1092 &self,
1093 ) -> fidl::client::QueryResponseFut<
1094 NodeGetFlagsResult,
1095 fdomain_client::fidl::FDomainResourceDialect,
1096 > {
1097 DirectoryProxyInterface::r#get_flags(self)
1098 }
1099
1100 pub fn r#set_flags(
1110 &self,
1111 mut flags: Flags,
1112 ) -> fidl::client::QueryResponseFut<
1113 NodeSetFlagsResult,
1114 fdomain_client::fidl::FDomainResourceDialect,
1115 > {
1116 DirectoryProxyInterface::r#set_flags(self, flags)
1117 }
1118
1119 pub fn r#query_filesystem(
1121 &self,
1122 ) -> fidl::client::QueryResponseFut<
1123 (i32, Option<Box<FilesystemInfo>>),
1124 fdomain_client::fidl::FDomainResourceDialect,
1125 > {
1126 DirectoryProxyInterface::r#query_filesystem(self)
1127 }
1128
1129 pub fn r#get_attributes(
1143 &self,
1144 mut query: NodeAttributesQuery,
1145 ) -> fidl::client::QueryResponseFut<
1146 NodeGetAttributesResult,
1147 fdomain_client::fidl::FDomainResourceDialect,
1148 > {
1149 DirectoryProxyInterface::r#get_attributes(self, query)
1150 }
1151
1152 pub fn r#update_attributes(
1161 &self,
1162 mut payload: &MutableNodeAttributes,
1163 ) -> fidl::client::QueryResponseFut<
1164 NodeUpdateAttributesResult,
1165 fdomain_client::fidl::FDomainResourceDialect,
1166 > {
1167 DirectoryProxyInterface::r#update_attributes(self, payload)
1168 }
1169
1170 pub fn r#sync(
1180 &self,
1181 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
1182 {
1183 DirectoryProxyInterface::r#sync(self)
1184 }
1185
1186 pub fn r#list_extended_attributes(
1195 &self,
1196 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1197 ) -> Result<(), fidl::Error> {
1198 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
1199 }
1200
1201 pub fn r#get_extended_attribute(
1208 &self,
1209 mut name: &[u8],
1210 ) -> fidl::client::QueryResponseFut<
1211 NodeGetExtendedAttributeResult,
1212 fdomain_client::fidl::FDomainResourceDialect,
1213 > {
1214 DirectoryProxyInterface::r#get_extended_attribute(self, name)
1215 }
1216
1217 pub fn r#set_extended_attribute(
1225 &self,
1226 mut name: &[u8],
1227 mut value: ExtendedAttributeValue,
1228 mut mode: SetExtendedAttributeMode,
1229 ) -> fidl::client::QueryResponseFut<
1230 NodeSetExtendedAttributeResult,
1231 fdomain_client::fidl::FDomainResourceDialect,
1232 > {
1233 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
1234 }
1235
1236 pub fn r#remove_extended_attribute(
1242 &self,
1243 mut name: &[u8],
1244 ) -> fidl::client::QueryResponseFut<
1245 NodeRemoveExtendedAttributeResult,
1246 fdomain_client::fidl::FDomainResourceDialect,
1247 > {
1248 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
1249 }
1250
1251 pub fn r#deprecated_open(
1253 &self,
1254 mut flags: OpenFlags,
1255 mut mode: ModeType,
1256 mut path: &str,
1257 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1258 ) -> Result<(), fidl::Error> {
1259 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
1260 }
1261
1262 pub fn r#open(
1269 &self,
1270 mut path: &str,
1271 mut flags: Flags,
1272 mut options: &Options,
1273 mut object: fdomain_client::Channel,
1274 ) -> Result<(), fidl::Error> {
1275 DirectoryProxyInterface::r#open(self, path, flags, options, object)
1276 }
1277
1278 pub fn r#read_dirents(
1304 &self,
1305 mut max_bytes: u64,
1306 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fdomain_client::fidl::FDomainResourceDialect>
1307 {
1308 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
1309 }
1310
1311 pub fn r#rewind(
1315 &self,
1316 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1317 DirectoryProxyInterface::r#rewind(self)
1318 }
1319
1320 pub fn r#get_token(
1327 &self,
1328 ) -> fidl::client::QueryResponseFut<
1329 (i32, Option<fdomain_client::NullableHandle>),
1330 fdomain_client::fidl::FDomainResourceDialect,
1331 > {
1332 DirectoryProxyInterface::r#get_token(self)
1333 }
1334
1335 pub fn r#link(
1352 &self,
1353 mut src: &str,
1354 mut dst_parent_token: fdomain_client::NullableHandle,
1355 mut dst: &str,
1356 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1357 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
1358 }
1359
1360 pub fn r#unlink(
1385 &self,
1386 mut name: &str,
1387 mut options: &UnlinkOptions,
1388 ) -> fidl::client::QueryResponseFut<
1389 DirectoryUnlinkResult,
1390 fdomain_client::fidl::FDomainResourceDialect,
1391 > {
1392 DirectoryProxyInterface::r#unlink(self, name, options)
1393 }
1394
1395 pub fn r#rename(
1421 &self,
1422 mut src: &str,
1423 mut dst_parent_token: fdomain_client::Event,
1424 mut dst: &str,
1425 ) -> fidl::client::QueryResponseFut<
1426 DirectoryRenameResult,
1427 fdomain_client::fidl::FDomainResourceDialect,
1428 > {
1429 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
1430 }
1431
1432 pub fn r#create_symlink(
1447 &self,
1448 mut name: &str,
1449 mut target: &[u8],
1450 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
1451 ) -> fidl::client::QueryResponseFut<
1452 DirectoryCreateSymlinkResult,
1453 fdomain_client::fidl::FDomainResourceDialect,
1454 > {
1455 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
1456 }
1457
1458 pub fn r#watch(
1465 &self,
1466 mut mask: WatchMask,
1467 mut options: u32,
1468 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
1469 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1470 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
1471 }
1472}
1473
1474impl DirectoryProxyInterface for DirectoryProxy {
1475 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
1476 AdvisoryLockingAdvisoryLockResult,
1477 fdomain_client::fidl::FDomainResourceDialect,
1478 >;
1479 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
1480 fn _decode(
1481 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1482 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1483 let _response = fidl::client::decode_transaction_body::<
1484 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1485 fdomain_client::fidl::FDomainResourceDialect,
1486 0x6ee9c0ad53ec87aa,
1487 >(_buf?)?;
1488 Ok(_response.map(|x| x))
1489 }
1490 self.client.send_query_and_decode::<
1491 AdvisoryLockingAdvisoryLockRequest,
1492 AdvisoryLockingAdvisoryLockResult,
1493 >(
1494 (request,),
1495 0x6ee9c0ad53ec87aa,
1496 fidl::encoding::DynamicFlags::empty(),
1497 _decode,
1498 )
1499 }
1500
1501 fn r#clone(
1502 &self,
1503 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1504 ) -> Result<(), fidl::Error> {
1505 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
1506 (request,),
1507 0x20d8a7aba2168a79,
1508 fidl::encoding::DynamicFlags::empty(),
1509 )
1510 }
1511
1512 type CloseResponseFut = fidl::client::QueryResponseFut<
1513 fdomain_fuchsia_unknown::CloseableCloseResult,
1514 fdomain_client::fidl::FDomainResourceDialect,
1515 >;
1516 fn r#close(&self) -> Self::CloseResponseFut {
1517 fn _decode(
1518 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1519 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1520 let _response = fidl::client::decode_transaction_body::<
1521 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1522 fdomain_client::fidl::FDomainResourceDialect,
1523 0x5ac5d459ad7f657e,
1524 >(_buf?)?;
1525 Ok(_response.map(|x| x))
1526 }
1527 self.client.send_query_and_decode::<
1528 fidl::encoding::EmptyPayload,
1529 fdomain_fuchsia_unknown::CloseableCloseResult,
1530 >(
1531 (),
1532 0x5ac5d459ad7f657e,
1533 fidl::encoding::DynamicFlags::empty(),
1534 _decode,
1535 )
1536 }
1537
1538 type QueryResponseFut =
1539 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
1540 fn r#query(&self) -> Self::QueryResponseFut {
1541 fn _decode(
1542 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1543 ) -> Result<Vec<u8>, fidl::Error> {
1544 let _response = fidl::client::decode_transaction_body::<
1545 fdomain_fuchsia_unknown::QueryableQueryResponse,
1546 fdomain_client::fidl::FDomainResourceDialect,
1547 0x2658edee9decfc06,
1548 >(_buf?)?;
1549 Ok(_response.protocol)
1550 }
1551 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1552 (),
1553 0x2658edee9decfc06,
1554 fidl::encoding::DynamicFlags::empty(),
1555 _decode,
1556 )
1557 }
1558
1559 fn r#deprecated_clone(
1560 &self,
1561 mut flags: OpenFlags,
1562 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1563 ) -> Result<(), fidl::Error> {
1564 self.client.send::<NodeDeprecatedCloneRequest>(
1565 (flags, object),
1566 0x5a61678f293ce16f,
1567 fidl::encoding::DynamicFlags::FLEXIBLE,
1568 )
1569 }
1570
1571 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
1572 (i32, NodeAttributes),
1573 fdomain_client::fidl::FDomainResourceDialect,
1574 >;
1575 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
1576 fn _decode(
1577 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1578 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1579 let _response = fidl::client::decode_transaction_body::<
1580 NodeDeprecatedGetAttrResponse,
1581 fdomain_client::fidl::FDomainResourceDialect,
1582 0x78985e216314dafd,
1583 >(_buf?)?;
1584 Ok((_response.s, _response.attributes))
1585 }
1586 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
1587 (),
1588 0x78985e216314dafd,
1589 fidl::encoding::DynamicFlags::empty(),
1590 _decode,
1591 )
1592 }
1593
1594 type DeprecatedSetAttrResponseFut =
1595 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1596 fn r#deprecated_set_attr(
1597 &self,
1598 mut flags: NodeAttributeFlags,
1599 mut attributes: &NodeAttributes,
1600 ) -> Self::DeprecatedSetAttrResponseFut {
1601 fn _decode(
1602 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1603 ) -> Result<i32, fidl::Error> {
1604 let _response = fidl::client::decode_transaction_body::<
1605 NodeDeprecatedSetAttrResponse,
1606 fdomain_client::fidl::FDomainResourceDialect,
1607 0x4186c0f40d938f46,
1608 >(_buf?)?;
1609 Ok(_response.s)
1610 }
1611 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
1612 (flags, attributes),
1613 0x4186c0f40d938f46,
1614 fidl::encoding::DynamicFlags::empty(),
1615 _decode,
1616 )
1617 }
1618
1619 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
1620 (i32, OpenFlags),
1621 fdomain_client::fidl::FDomainResourceDialect,
1622 >;
1623 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
1624 fn _decode(
1625 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1626 ) -> Result<(i32, OpenFlags), fidl::Error> {
1627 let _response = fidl::client::decode_transaction_body::<
1628 NodeDeprecatedGetFlagsResponse,
1629 fdomain_client::fidl::FDomainResourceDialect,
1630 0x5b88fffb8eda3aa1,
1631 >(_buf?)?;
1632 Ok((_response.s, _response.flags))
1633 }
1634 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
1635 (),
1636 0x5b88fffb8eda3aa1,
1637 fidl::encoding::DynamicFlags::empty(),
1638 _decode,
1639 )
1640 }
1641
1642 type DeprecatedSetFlagsResponseFut =
1643 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1644 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
1645 fn _decode(
1646 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1647 ) -> Result<i32, fidl::Error> {
1648 let _response = fidl::client::decode_transaction_body::<
1649 NodeDeprecatedSetFlagsResponse,
1650 fdomain_client::fidl::FDomainResourceDialect,
1651 0x5295b76c71fde733,
1652 >(_buf?)?;
1653 Ok(_response.s)
1654 }
1655 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
1656 (flags,),
1657 0x5295b76c71fde733,
1658 fidl::encoding::DynamicFlags::empty(),
1659 _decode,
1660 )
1661 }
1662
1663 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
1664 NodeGetFlagsResult,
1665 fdomain_client::fidl::FDomainResourceDialect,
1666 >;
1667 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
1668 fn _decode(
1669 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1670 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1671 let _response = fidl::client::decode_transaction_body::<
1672 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1673 fdomain_client::fidl::FDomainResourceDialect,
1674 0x176eb318f64ec23,
1675 >(_buf?)?
1676 .into_result_fdomain::<DirectoryMarker>("get_flags")?;
1677 Ok(_response.map(|x| x.flags))
1678 }
1679 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
1680 (),
1681 0x176eb318f64ec23,
1682 fidl::encoding::DynamicFlags::FLEXIBLE,
1683 _decode,
1684 )
1685 }
1686
1687 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
1688 NodeSetFlagsResult,
1689 fdomain_client::fidl::FDomainResourceDialect,
1690 >;
1691 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
1692 fn _decode(
1693 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1694 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1695 let _response = fidl::client::decode_transaction_body::<
1696 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1697 fdomain_client::fidl::FDomainResourceDialect,
1698 0x55a8028685791ea8,
1699 >(_buf?)?
1700 .into_result_fdomain::<DirectoryMarker>("set_flags")?;
1701 Ok(_response.map(|x| x))
1702 }
1703 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
1704 (flags,),
1705 0x55a8028685791ea8,
1706 fidl::encoding::DynamicFlags::FLEXIBLE,
1707 _decode,
1708 )
1709 }
1710
1711 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
1712 (i32, Option<Box<FilesystemInfo>>),
1713 fdomain_client::fidl::FDomainResourceDialect,
1714 >;
1715 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
1716 fn _decode(
1717 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1718 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1719 let _response = fidl::client::decode_transaction_body::<
1720 NodeQueryFilesystemResponse,
1721 fdomain_client::fidl::FDomainResourceDialect,
1722 0x6f344a1c6b0a0610,
1723 >(_buf?)?;
1724 Ok((_response.s, _response.info))
1725 }
1726 self.client.send_query_and_decode::<
1727 fidl::encoding::EmptyPayload,
1728 (i32, Option<Box<FilesystemInfo>>),
1729 >(
1730 (),
1731 0x6f344a1c6b0a0610,
1732 fidl::encoding::DynamicFlags::empty(),
1733 _decode,
1734 )
1735 }
1736
1737 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
1738 NodeGetAttributesResult,
1739 fdomain_client::fidl::FDomainResourceDialect,
1740 >;
1741 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
1742 fn _decode(
1743 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1744 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1745 let _response = fidl::client::decode_transaction_body::<
1746 fidl::encoding::ResultType<NodeAttributes2, i32>,
1747 fdomain_client::fidl::FDomainResourceDialect,
1748 0x3d4396a638ea053b,
1749 >(_buf?)?;
1750 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1751 }
1752 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
1753 (query,),
1754 0x3d4396a638ea053b,
1755 fidl::encoding::DynamicFlags::empty(),
1756 _decode,
1757 )
1758 }
1759
1760 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
1761 NodeUpdateAttributesResult,
1762 fdomain_client::fidl::FDomainResourceDialect,
1763 >;
1764 fn r#update_attributes(
1765 &self,
1766 mut payload: &MutableNodeAttributes,
1767 ) -> Self::UpdateAttributesResponseFut {
1768 fn _decode(
1769 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1770 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1771 let _response = fidl::client::decode_transaction_body::<
1772 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1773 fdomain_client::fidl::FDomainResourceDialect,
1774 0x3308c1da5a89bf08,
1775 >(_buf?)?;
1776 Ok(_response.map(|x| x))
1777 }
1778 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
1779 payload,
1780 0x3308c1da5a89bf08,
1781 fidl::encoding::DynamicFlags::empty(),
1782 _decode,
1783 )
1784 }
1785
1786 type SyncResponseFut = fidl::client::QueryResponseFut<
1787 NodeSyncResult,
1788 fdomain_client::fidl::FDomainResourceDialect,
1789 >;
1790 fn r#sync(&self) -> Self::SyncResponseFut {
1791 fn _decode(
1792 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1793 ) -> Result<NodeSyncResult, fidl::Error> {
1794 let _response = fidl::client::decode_transaction_body::<
1795 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1796 fdomain_client::fidl::FDomainResourceDialect,
1797 0x2c5c27ca0ab5dc49,
1798 >(_buf?)?;
1799 Ok(_response.map(|x| x))
1800 }
1801 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
1802 (),
1803 0x2c5c27ca0ab5dc49,
1804 fidl::encoding::DynamicFlags::empty(),
1805 _decode,
1806 )
1807 }
1808
1809 fn r#list_extended_attributes(
1810 &self,
1811 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1812 ) -> Result<(), fidl::Error> {
1813 self.client.send::<NodeListExtendedAttributesRequest>(
1814 (iterator,),
1815 0x4b61033de007fcd0,
1816 fidl::encoding::DynamicFlags::empty(),
1817 )
1818 }
1819
1820 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1821 NodeGetExtendedAttributeResult,
1822 fdomain_client::fidl::FDomainResourceDialect,
1823 >;
1824 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
1825 fn _decode(
1826 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1827 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1828 let _response = fidl::client::decode_transaction_body::<
1829 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1830 fdomain_client::fidl::FDomainResourceDialect,
1831 0x45ffa3ccfdeb76db,
1832 >(_buf?)?;
1833 Ok(_response.map(|x| x))
1834 }
1835 self.client.send_query_and_decode::<
1836 NodeGetExtendedAttributeRequest,
1837 NodeGetExtendedAttributeResult,
1838 >(
1839 (name,),
1840 0x45ffa3ccfdeb76db,
1841 fidl::encoding::DynamicFlags::empty(),
1842 _decode,
1843 )
1844 }
1845
1846 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1847 NodeSetExtendedAttributeResult,
1848 fdomain_client::fidl::FDomainResourceDialect,
1849 >;
1850 fn r#set_extended_attribute(
1851 &self,
1852 mut name: &[u8],
1853 mut value: ExtendedAttributeValue,
1854 mut mode: SetExtendedAttributeMode,
1855 ) -> Self::SetExtendedAttributeResponseFut {
1856 fn _decode(
1857 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1858 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1859 let _response = fidl::client::decode_transaction_body::<
1860 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1861 fdomain_client::fidl::FDomainResourceDialect,
1862 0x4a951362f681f23c,
1863 >(_buf?)?;
1864 Ok(_response.map(|x| x))
1865 }
1866 self.client.send_query_and_decode::<
1867 NodeSetExtendedAttributeRequest,
1868 NodeSetExtendedAttributeResult,
1869 >(
1870 (name, &mut value, mode,),
1871 0x4a951362f681f23c,
1872 fidl::encoding::DynamicFlags::empty(),
1873 _decode,
1874 )
1875 }
1876
1877 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1878 NodeRemoveExtendedAttributeResult,
1879 fdomain_client::fidl::FDomainResourceDialect,
1880 >;
1881 fn r#remove_extended_attribute(
1882 &self,
1883 mut name: &[u8],
1884 ) -> Self::RemoveExtendedAttributeResponseFut {
1885 fn _decode(
1886 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1887 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1888 let _response = fidl::client::decode_transaction_body::<
1889 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1890 fdomain_client::fidl::FDomainResourceDialect,
1891 0x7a0b9f3a9bf9032d,
1892 >(_buf?)?;
1893 Ok(_response.map(|x| x))
1894 }
1895 self.client.send_query_and_decode::<
1896 NodeRemoveExtendedAttributeRequest,
1897 NodeRemoveExtendedAttributeResult,
1898 >(
1899 (name,),
1900 0x7a0b9f3a9bf9032d,
1901 fidl::encoding::DynamicFlags::empty(),
1902 _decode,
1903 )
1904 }
1905
1906 fn r#deprecated_open(
1907 &self,
1908 mut flags: OpenFlags,
1909 mut mode: ModeType,
1910 mut path: &str,
1911 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1912 ) -> Result<(), fidl::Error> {
1913 self.client.send::<DirectoryDeprecatedOpenRequest>(
1914 (flags, mode, path, object),
1915 0x2c5044561d685ec0,
1916 fidl::encoding::DynamicFlags::FLEXIBLE,
1917 )
1918 }
1919
1920 fn r#open(
1921 &self,
1922 mut path: &str,
1923 mut flags: Flags,
1924 mut options: &Options,
1925 mut object: fdomain_client::Channel,
1926 ) -> Result<(), fidl::Error> {
1927 self.client.send::<DirectoryOpenRequest>(
1928 (path, flags, options, object),
1929 0x568ddcb9a9cbb6d9,
1930 fidl::encoding::DynamicFlags::empty(),
1931 )
1932 }
1933
1934 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
1935 (i32, Vec<u8>),
1936 fdomain_client::fidl::FDomainResourceDialect,
1937 >;
1938 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
1939 fn _decode(
1940 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1941 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1942 let _response = fidl::client::decode_transaction_body::<
1943 DirectoryReadDirentsResponse,
1944 fdomain_client::fidl::FDomainResourceDialect,
1945 0x3582806bf27faa0a,
1946 >(_buf?)?;
1947 Ok((_response.s, _response.dirents))
1948 }
1949 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
1950 (max_bytes,),
1951 0x3582806bf27faa0a,
1952 fidl::encoding::DynamicFlags::empty(),
1953 _decode,
1954 )
1955 }
1956
1957 type RewindResponseFut =
1958 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1959 fn r#rewind(&self) -> Self::RewindResponseFut {
1960 fn _decode(
1961 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1962 ) -> Result<i32, fidl::Error> {
1963 let _response = fidl::client::decode_transaction_body::<
1964 DirectoryRewindResponse,
1965 fdomain_client::fidl::FDomainResourceDialect,
1966 0x16b1202af0f34c71,
1967 >(_buf?)?;
1968 Ok(_response.s)
1969 }
1970 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1971 (),
1972 0x16b1202af0f34c71,
1973 fidl::encoding::DynamicFlags::empty(),
1974 _decode,
1975 )
1976 }
1977
1978 type GetTokenResponseFut = fidl::client::QueryResponseFut<
1979 (i32, Option<fdomain_client::NullableHandle>),
1980 fdomain_client::fidl::FDomainResourceDialect,
1981 >;
1982 fn r#get_token(&self) -> Self::GetTokenResponseFut {
1983 fn _decode(
1984 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1985 ) -> Result<(i32, Option<fdomain_client::NullableHandle>), fidl::Error> {
1986 let _response = fidl::client::decode_transaction_body::<
1987 DirectoryGetTokenResponse,
1988 fdomain_client::fidl::FDomainResourceDialect,
1989 0x26ae9d18763c8655,
1990 >(_buf?)?;
1991 Ok((_response.s, _response.token))
1992 }
1993 self.client.send_query_and_decode::<
1994 fidl::encoding::EmptyPayload,
1995 (i32, Option<fdomain_client::NullableHandle>),
1996 >(
1997 (),
1998 0x26ae9d18763c8655,
1999 fidl::encoding::DynamicFlags::empty(),
2000 _decode,
2001 )
2002 }
2003
2004 type LinkResponseFut =
2005 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2006 fn r#link(
2007 &self,
2008 mut src: &str,
2009 mut dst_parent_token: fdomain_client::NullableHandle,
2010 mut dst: &str,
2011 ) -> Self::LinkResponseFut {
2012 fn _decode(
2013 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2014 ) -> Result<i32, fidl::Error> {
2015 let _response = fidl::client::decode_transaction_body::<
2016 DirectoryLinkResponse,
2017 fdomain_client::fidl::FDomainResourceDialect,
2018 0x740604c0c7c930e7,
2019 >(_buf?)?;
2020 Ok(_response.s)
2021 }
2022 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2023 (src, dst_parent_token, dst),
2024 0x740604c0c7c930e7,
2025 fidl::encoding::DynamicFlags::empty(),
2026 _decode,
2027 )
2028 }
2029
2030 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2031 DirectoryUnlinkResult,
2032 fdomain_client::fidl::FDomainResourceDialect,
2033 >;
2034 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2035 fn _decode(
2036 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2037 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2038 let _response = fidl::client::decode_transaction_body::<
2039 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2040 fdomain_client::fidl::FDomainResourceDialect,
2041 0x750a0326a78d7bed,
2042 >(_buf?)?;
2043 Ok(_response.map(|x| x))
2044 }
2045 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2046 (name, options),
2047 0x750a0326a78d7bed,
2048 fidl::encoding::DynamicFlags::empty(),
2049 _decode,
2050 )
2051 }
2052
2053 type RenameResponseFut = fidl::client::QueryResponseFut<
2054 DirectoryRenameResult,
2055 fdomain_client::fidl::FDomainResourceDialect,
2056 >;
2057 fn r#rename(
2058 &self,
2059 mut src: &str,
2060 mut dst_parent_token: fdomain_client::Event,
2061 mut dst: &str,
2062 ) -> Self::RenameResponseFut {
2063 fn _decode(
2064 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2065 ) -> Result<DirectoryRenameResult, fidl::Error> {
2066 let _response = fidl::client::decode_transaction_body::<
2067 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2068 fdomain_client::fidl::FDomainResourceDialect,
2069 0x7060e7723b9928de,
2070 >(_buf?)?;
2071 Ok(_response.map(|x| x))
2072 }
2073 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2074 (src, dst_parent_token, dst),
2075 0x7060e7723b9928de,
2076 fidl::encoding::DynamicFlags::empty(),
2077 _decode,
2078 )
2079 }
2080
2081 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2082 DirectoryCreateSymlinkResult,
2083 fdomain_client::fidl::FDomainResourceDialect,
2084 >;
2085 fn r#create_symlink(
2086 &self,
2087 mut name: &str,
2088 mut target: &[u8],
2089 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
2090 ) -> Self::CreateSymlinkResponseFut {
2091 fn _decode(
2092 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2093 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2094 let _response = fidl::client::decode_transaction_body::<
2095 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2096 fdomain_client::fidl::FDomainResourceDialect,
2097 0x21ce0f19ec043889,
2098 >(_buf?)?;
2099 Ok(_response.map(|x| x))
2100 }
2101 self.client
2102 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2103 (name, target, connection),
2104 0x21ce0f19ec043889,
2105 fidl::encoding::DynamicFlags::empty(),
2106 _decode,
2107 )
2108 }
2109
2110 type WatchResponseFut =
2111 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2112 fn r#watch(
2113 &self,
2114 mut mask: WatchMask,
2115 mut options: u32,
2116 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
2117 ) -> Self::WatchResponseFut {
2118 fn _decode(
2119 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2120 ) -> Result<i32, fidl::Error> {
2121 let _response = fidl::client::decode_transaction_body::<
2122 DirectoryWatchResponse,
2123 fdomain_client::fidl::FDomainResourceDialect,
2124 0x5717193a59d66d91,
2125 >(_buf?)?;
2126 Ok(_response.s)
2127 }
2128 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2129 (mask, options, watcher),
2130 0x5717193a59d66d91,
2131 fidl::encoding::DynamicFlags::empty(),
2132 _decode,
2133 )
2134 }
2135}
2136
2137pub struct DirectoryEventStream {
2138 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2139}
2140
2141impl std::marker::Unpin for DirectoryEventStream {}
2142
2143impl futures::stream::FusedStream for DirectoryEventStream {
2144 fn is_terminated(&self) -> bool {
2145 self.event_receiver.is_terminated()
2146 }
2147}
2148
2149impl futures::Stream for DirectoryEventStream {
2150 type Item = Result<DirectoryEvent, fidl::Error>;
2151
2152 fn poll_next(
2153 mut self: std::pin::Pin<&mut Self>,
2154 cx: &mut std::task::Context<'_>,
2155 ) -> std::task::Poll<Option<Self::Item>> {
2156 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2157 &mut self.event_receiver,
2158 cx
2159 )?) {
2160 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
2161 None => std::task::Poll::Ready(None),
2162 }
2163 }
2164}
2165
2166#[derive(Debug)]
2167pub enum DirectoryEvent {
2168 OnOpen_ {
2169 s: i32,
2170 info: Option<Box<NodeInfoDeprecated>>,
2171 },
2172 OnRepresentation {
2173 payload: Representation,
2174 },
2175 #[non_exhaustive]
2176 _UnknownEvent {
2177 ordinal: u64,
2179 },
2180}
2181
2182impl DirectoryEvent {
2183 #[allow(irrefutable_let_patterns)]
2184 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
2185 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
2186 }
2187 #[allow(irrefutable_let_patterns)]
2188 pub fn into_on_representation(self) -> Option<Representation> {
2189 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
2190 }
2191
2192 fn decode(
2194 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2195 ) -> Result<DirectoryEvent, fidl::Error> {
2196 let (bytes, _handles) = buf.split_mut();
2197 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2198 debug_assert_eq!(tx_header.tx_id, 0);
2199 match tx_header.ordinal {
2200 0x7fc7bbb1dbfd1972 => {
2201 let mut out = fidl::new_empty!(
2202 NodeOnOpenRequest,
2203 fdomain_client::fidl::FDomainResourceDialect
2204 );
2205 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2206 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
2207 }
2208 0x5cb40567d80a510c => {
2209 let mut out =
2210 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
2211 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
2212 Ok((DirectoryEvent::OnRepresentation { payload: out }))
2213 }
2214 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2215 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2216 }
2217 _ => Err(fidl::Error::UnknownOrdinal {
2218 ordinal: tx_header.ordinal,
2219 protocol_name:
2220 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2221 }),
2222 }
2223 }
2224}
2225
2226pub struct DirectoryRequestStream {
2228 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2229 is_terminated: bool,
2230}
2231
2232impl std::marker::Unpin for DirectoryRequestStream {}
2233
2234impl futures::stream::FusedStream for DirectoryRequestStream {
2235 fn is_terminated(&self) -> bool {
2236 self.is_terminated
2237 }
2238}
2239
2240impl fdomain_client::fidl::RequestStream for DirectoryRequestStream {
2241 type Protocol = DirectoryMarker;
2242 type ControlHandle = DirectoryControlHandle;
2243
2244 fn from_channel(channel: fdomain_client::Channel) -> Self {
2245 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2246 }
2247
2248 fn control_handle(&self) -> Self::ControlHandle {
2249 DirectoryControlHandle { inner: self.inner.clone() }
2250 }
2251
2252 fn into_inner(
2253 self,
2254 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2255 {
2256 (self.inner, self.is_terminated)
2257 }
2258
2259 fn from_inner(
2260 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2261 is_terminated: bool,
2262 ) -> Self {
2263 Self { inner, is_terminated }
2264 }
2265}
2266
2267impl futures::Stream for DirectoryRequestStream {
2268 type Item = Result<DirectoryRequest, fidl::Error>;
2269
2270 fn poll_next(
2271 mut self: std::pin::Pin<&mut Self>,
2272 cx: &mut std::task::Context<'_>,
2273 ) -> std::task::Poll<Option<Self::Item>> {
2274 let this = &mut *self;
2275 if this.inner.check_shutdown(cx) {
2276 this.is_terminated = true;
2277 return std::task::Poll::Ready(None);
2278 }
2279 if this.is_terminated {
2280 panic!("polled DirectoryRequestStream after completion");
2281 }
2282 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2283 |bytes, handles| {
2284 match this.inner.channel().read_etc(cx, bytes, handles) {
2285 std::task::Poll::Ready(Ok(())) => {}
2286 std::task::Poll::Pending => return std::task::Poll::Pending,
2287 std::task::Poll::Ready(Err(None)) => {
2288 this.is_terminated = true;
2289 return std::task::Poll::Ready(None);
2290 }
2291 std::task::Poll::Ready(Err(Some(e))) => {
2292 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2293 e.into(),
2294 ))));
2295 }
2296 }
2297
2298 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2300
2301 std::task::Poll::Ready(Some(match header.ordinal {
2302 0x6ee9c0ad53ec87aa => {
2303 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2304 let mut req = fidl::new_empty!(
2305 AdvisoryLockingAdvisoryLockRequest,
2306 fdomain_client::fidl::FDomainResourceDialect
2307 );
2308 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
2309 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2310 Ok(DirectoryRequest::AdvisoryLock {
2311 request: req.request,
2312
2313 responder: DirectoryAdvisoryLockResponder {
2314 control_handle: std::mem::ManuallyDrop::new(control_handle),
2315 tx_id: header.tx_id,
2316 },
2317 })
2318 }
2319 0x20d8a7aba2168a79 => {
2320 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2321 let mut req = fidl::new_empty!(
2322 fdomain_fuchsia_unknown::CloneableCloneRequest,
2323 fdomain_client::fidl::FDomainResourceDialect
2324 );
2325 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2326 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2327 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
2328 }
2329 0x5ac5d459ad7f657e => {
2330 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2331 let mut req = fidl::new_empty!(
2332 fidl::encoding::EmptyPayload,
2333 fdomain_client::fidl::FDomainResourceDialect
2334 );
2335 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2336 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2337 Ok(DirectoryRequest::Close {
2338 responder: DirectoryCloseResponder {
2339 control_handle: std::mem::ManuallyDrop::new(control_handle),
2340 tx_id: header.tx_id,
2341 },
2342 })
2343 }
2344 0x2658edee9decfc06 => {
2345 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2346 let mut req = fidl::new_empty!(
2347 fidl::encoding::EmptyPayload,
2348 fdomain_client::fidl::FDomainResourceDialect
2349 );
2350 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2351 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2352 Ok(DirectoryRequest::Query {
2353 responder: DirectoryQueryResponder {
2354 control_handle: std::mem::ManuallyDrop::new(control_handle),
2355 tx_id: header.tx_id,
2356 },
2357 })
2358 }
2359 0x5a61678f293ce16f => {
2360 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2361 let mut req = fidl::new_empty!(
2362 NodeDeprecatedCloneRequest,
2363 fdomain_client::fidl::FDomainResourceDialect
2364 );
2365 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2366 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2367 Ok(DirectoryRequest::DeprecatedClone {
2368 flags: req.flags,
2369 object: req.object,
2370
2371 control_handle,
2372 })
2373 }
2374 0x78985e216314dafd => {
2375 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2376 let mut req = fidl::new_empty!(
2377 fidl::encoding::EmptyPayload,
2378 fdomain_client::fidl::FDomainResourceDialect
2379 );
2380 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2381 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2382 Ok(DirectoryRequest::DeprecatedGetAttr {
2383 responder: DirectoryDeprecatedGetAttrResponder {
2384 control_handle: std::mem::ManuallyDrop::new(control_handle),
2385 tx_id: header.tx_id,
2386 },
2387 })
2388 }
2389 0x4186c0f40d938f46 => {
2390 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2391 let mut req = fidl::new_empty!(
2392 NodeDeprecatedSetAttrRequest,
2393 fdomain_client::fidl::FDomainResourceDialect
2394 );
2395 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
2396 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2397 Ok(DirectoryRequest::DeprecatedSetAttr {
2398 flags: req.flags,
2399 attributes: req.attributes,
2400
2401 responder: DirectoryDeprecatedSetAttrResponder {
2402 control_handle: std::mem::ManuallyDrop::new(control_handle),
2403 tx_id: header.tx_id,
2404 },
2405 })
2406 }
2407 0x5b88fffb8eda3aa1 => {
2408 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2409 let mut req = fidl::new_empty!(
2410 fidl::encoding::EmptyPayload,
2411 fdomain_client::fidl::FDomainResourceDialect
2412 );
2413 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2414 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2415 Ok(DirectoryRequest::DeprecatedGetFlags {
2416 responder: DirectoryDeprecatedGetFlagsResponder {
2417 control_handle: std::mem::ManuallyDrop::new(control_handle),
2418 tx_id: header.tx_id,
2419 },
2420 })
2421 }
2422 0x5295b76c71fde733 => {
2423 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2424 let mut req = fidl::new_empty!(
2425 NodeDeprecatedSetFlagsRequest,
2426 fdomain_client::fidl::FDomainResourceDialect
2427 );
2428 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2429 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2430 Ok(DirectoryRequest::DeprecatedSetFlags {
2431 flags: req.flags,
2432
2433 responder: DirectoryDeprecatedSetFlagsResponder {
2434 control_handle: std::mem::ManuallyDrop::new(control_handle),
2435 tx_id: header.tx_id,
2436 },
2437 })
2438 }
2439 0x176eb318f64ec23 => {
2440 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2441 let mut req = fidl::new_empty!(
2442 fidl::encoding::EmptyPayload,
2443 fdomain_client::fidl::FDomainResourceDialect
2444 );
2445 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2446 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2447 Ok(DirectoryRequest::GetFlags {
2448 responder: DirectoryGetFlagsResponder {
2449 control_handle: std::mem::ManuallyDrop::new(control_handle),
2450 tx_id: header.tx_id,
2451 },
2452 })
2453 }
2454 0x55a8028685791ea8 => {
2455 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2456 let mut req = fidl::new_empty!(
2457 NodeSetFlagsRequest,
2458 fdomain_client::fidl::FDomainResourceDialect
2459 );
2460 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2461 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2462 Ok(DirectoryRequest::SetFlags {
2463 flags: req.flags,
2464
2465 responder: DirectorySetFlagsResponder {
2466 control_handle: std::mem::ManuallyDrop::new(control_handle),
2467 tx_id: header.tx_id,
2468 },
2469 })
2470 }
2471 0x6f344a1c6b0a0610 => {
2472 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2473 let mut req = fidl::new_empty!(
2474 fidl::encoding::EmptyPayload,
2475 fdomain_client::fidl::FDomainResourceDialect
2476 );
2477 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2478 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2479 Ok(DirectoryRequest::QueryFilesystem {
2480 responder: DirectoryQueryFilesystemResponder {
2481 control_handle: std::mem::ManuallyDrop::new(control_handle),
2482 tx_id: header.tx_id,
2483 },
2484 })
2485 }
2486 0x3d4396a638ea053b => {
2487 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2488 let mut req = fidl::new_empty!(
2489 NodeGetAttributesRequest,
2490 fdomain_client::fidl::FDomainResourceDialect
2491 );
2492 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2493 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2494 Ok(DirectoryRequest::GetAttributes {
2495 query: req.query,
2496
2497 responder: DirectoryGetAttributesResponder {
2498 control_handle: std::mem::ManuallyDrop::new(control_handle),
2499 tx_id: header.tx_id,
2500 },
2501 })
2502 }
2503 0x3308c1da5a89bf08 => {
2504 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2505 let mut req = fidl::new_empty!(
2506 MutableNodeAttributes,
2507 fdomain_client::fidl::FDomainResourceDialect
2508 );
2509 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
2510 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2511 Ok(DirectoryRequest::UpdateAttributes {
2512 payload: req,
2513 responder: DirectoryUpdateAttributesResponder {
2514 control_handle: std::mem::ManuallyDrop::new(control_handle),
2515 tx_id: header.tx_id,
2516 },
2517 })
2518 }
2519 0x2c5c27ca0ab5dc49 => {
2520 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2521 let mut req = fidl::new_empty!(
2522 fidl::encoding::EmptyPayload,
2523 fdomain_client::fidl::FDomainResourceDialect
2524 );
2525 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2526 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2527 Ok(DirectoryRequest::Sync {
2528 responder: DirectorySyncResponder {
2529 control_handle: std::mem::ManuallyDrop::new(control_handle),
2530 tx_id: header.tx_id,
2531 },
2532 })
2533 }
2534 0x4b61033de007fcd0 => {
2535 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2536 let mut req = fidl::new_empty!(
2537 NodeListExtendedAttributesRequest,
2538 fdomain_client::fidl::FDomainResourceDialect
2539 );
2540 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2541 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2542 Ok(DirectoryRequest::ListExtendedAttributes {
2543 iterator: req.iterator,
2544
2545 control_handle,
2546 })
2547 }
2548 0x45ffa3ccfdeb76db => {
2549 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2550 let mut req = fidl::new_empty!(
2551 NodeGetExtendedAttributeRequest,
2552 fdomain_client::fidl::FDomainResourceDialect
2553 );
2554 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2555 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2556 Ok(DirectoryRequest::GetExtendedAttribute {
2557 name: req.name,
2558
2559 responder: DirectoryGetExtendedAttributeResponder {
2560 control_handle: std::mem::ManuallyDrop::new(control_handle),
2561 tx_id: header.tx_id,
2562 },
2563 })
2564 }
2565 0x4a951362f681f23c => {
2566 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2567 let mut req = fidl::new_empty!(
2568 NodeSetExtendedAttributeRequest,
2569 fdomain_client::fidl::FDomainResourceDialect
2570 );
2571 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2572 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2573 Ok(DirectoryRequest::SetExtendedAttribute {
2574 name: req.name,
2575 value: req.value,
2576 mode: req.mode,
2577
2578 responder: DirectorySetExtendedAttributeResponder {
2579 control_handle: std::mem::ManuallyDrop::new(control_handle),
2580 tx_id: header.tx_id,
2581 },
2582 })
2583 }
2584 0x7a0b9f3a9bf9032d => {
2585 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2586 let mut req = fidl::new_empty!(
2587 NodeRemoveExtendedAttributeRequest,
2588 fdomain_client::fidl::FDomainResourceDialect
2589 );
2590 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2591 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2592 Ok(DirectoryRequest::RemoveExtendedAttribute {
2593 name: req.name,
2594
2595 responder: DirectoryRemoveExtendedAttributeResponder {
2596 control_handle: std::mem::ManuallyDrop::new(control_handle),
2597 tx_id: header.tx_id,
2598 },
2599 })
2600 }
2601 0x2c5044561d685ec0 => {
2602 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2603 let mut req = fidl::new_empty!(
2604 DirectoryDeprecatedOpenRequest,
2605 fdomain_client::fidl::FDomainResourceDialect
2606 );
2607 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2608 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2609 Ok(DirectoryRequest::DeprecatedOpen {
2610 flags: req.flags,
2611 mode: req.mode,
2612 path: req.path,
2613 object: req.object,
2614
2615 control_handle,
2616 })
2617 }
2618 0x568ddcb9a9cbb6d9 => {
2619 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2620 let mut req = fidl::new_empty!(
2621 DirectoryOpenRequest,
2622 fdomain_client::fidl::FDomainResourceDialect
2623 );
2624 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2625 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2626 Ok(DirectoryRequest::Open {
2627 path: req.path,
2628 flags: req.flags,
2629 options: req.options,
2630 object: req.object,
2631
2632 control_handle,
2633 })
2634 }
2635 0x3582806bf27faa0a => {
2636 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2637 let mut req = fidl::new_empty!(
2638 DirectoryReadDirentsRequest,
2639 fdomain_client::fidl::FDomainResourceDialect
2640 );
2641 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
2642 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2643 Ok(DirectoryRequest::ReadDirents {
2644 max_bytes: req.max_bytes,
2645
2646 responder: DirectoryReadDirentsResponder {
2647 control_handle: std::mem::ManuallyDrop::new(control_handle),
2648 tx_id: header.tx_id,
2649 },
2650 })
2651 }
2652 0x16b1202af0f34c71 => {
2653 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2654 let mut req = fidl::new_empty!(
2655 fidl::encoding::EmptyPayload,
2656 fdomain_client::fidl::FDomainResourceDialect
2657 );
2658 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2659 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2660 Ok(DirectoryRequest::Rewind {
2661 responder: DirectoryRewindResponder {
2662 control_handle: std::mem::ManuallyDrop::new(control_handle),
2663 tx_id: header.tx_id,
2664 },
2665 })
2666 }
2667 0x26ae9d18763c8655 => {
2668 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2669 let mut req = fidl::new_empty!(
2670 fidl::encoding::EmptyPayload,
2671 fdomain_client::fidl::FDomainResourceDialect
2672 );
2673 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2674 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2675 Ok(DirectoryRequest::GetToken {
2676 responder: DirectoryGetTokenResponder {
2677 control_handle: std::mem::ManuallyDrop::new(control_handle),
2678 tx_id: header.tx_id,
2679 },
2680 })
2681 }
2682 0x740604c0c7c930e7 => {
2683 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2684 let mut req = fidl::new_empty!(
2685 DirectoryLinkRequest,
2686 fdomain_client::fidl::FDomainResourceDialect
2687 );
2688 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
2689 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2690 Ok(DirectoryRequest::Link {
2691 src: req.src,
2692 dst_parent_token: req.dst_parent_token,
2693 dst: req.dst,
2694
2695 responder: DirectoryLinkResponder {
2696 control_handle: std::mem::ManuallyDrop::new(control_handle),
2697 tx_id: header.tx_id,
2698 },
2699 })
2700 }
2701 0x750a0326a78d7bed => {
2702 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2703 let mut req = fidl::new_empty!(
2704 DirectoryUnlinkRequest,
2705 fdomain_client::fidl::FDomainResourceDialect
2706 );
2707 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2708 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2709 Ok(DirectoryRequest::Unlink {
2710 name: req.name,
2711 options: req.options,
2712
2713 responder: DirectoryUnlinkResponder {
2714 control_handle: std::mem::ManuallyDrop::new(control_handle),
2715 tx_id: header.tx_id,
2716 },
2717 })
2718 }
2719 0x7060e7723b9928de => {
2720 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2721 let mut req = fidl::new_empty!(
2722 DirectoryRenameRequest,
2723 fdomain_client::fidl::FDomainResourceDialect
2724 );
2725 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
2726 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2727 Ok(DirectoryRequest::Rename {
2728 src: req.src,
2729 dst_parent_token: req.dst_parent_token,
2730 dst: req.dst,
2731
2732 responder: DirectoryRenameResponder {
2733 control_handle: std::mem::ManuallyDrop::new(control_handle),
2734 tx_id: header.tx_id,
2735 },
2736 })
2737 }
2738 0x21ce0f19ec043889 => {
2739 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2740 let mut req = fidl::new_empty!(
2741 DirectoryCreateSymlinkRequest,
2742 fdomain_client::fidl::FDomainResourceDialect
2743 );
2744 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2745 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2746 Ok(DirectoryRequest::CreateSymlink {
2747 name: req.name,
2748 target: req.target,
2749 connection: req.connection,
2750
2751 responder: DirectoryCreateSymlinkResponder {
2752 control_handle: std::mem::ManuallyDrop::new(control_handle),
2753 tx_id: header.tx_id,
2754 },
2755 })
2756 }
2757 0x5717193a59d66d91 => {
2758 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2759 let mut req = fidl::new_empty!(
2760 DirectoryWatchRequest,
2761 fdomain_client::fidl::FDomainResourceDialect
2762 );
2763 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
2764 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2765 Ok(DirectoryRequest::Watch {
2766 mask: req.mask,
2767 options: req.options,
2768 watcher: req.watcher,
2769
2770 responder: DirectoryWatchResponder {
2771 control_handle: std::mem::ManuallyDrop::new(control_handle),
2772 tx_id: header.tx_id,
2773 },
2774 })
2775 }
2776 _ if header.tx_id == 0
2777 && header
2778 .dynamic_flags()
2779 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2780 {
2781 Ok(DirectoryRequest::_UnknownMethod {
2782 ordinal: header.ordinal,
2783 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2784 method_type: fidl::MethodType::OneWay,
2785 })
2786 }
2787 _ if header
2788 .dynamic_flags()
2789 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2790 {
2791 this.inner.send_framework_err(
2792 fidl::encoding::FrameworkErr::UnknownMethod,
2793 header.tx_id,
2794 header.ordinal,
2795 header.dynamic_flags(),
2796 (bytes, handles),
2797 )?;
2798 Ok(DirectoryRequest::_UnknownMethod {
2799 ordinal: header.ordinal,
2800 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2801 method_type: fidl::MethodType::TwoWay,
2802 })
2803 }
2804 _ => Err(fidl::Error::UnknownOrdinal {
2805 ordinal: header.ordinal,
2806 protocol_name:
2807 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2808 }),
2809 }))
2810 },
2811 )
2812 }
2813}
2814
2815#[derive(Debug)]
2817pub enum DirectoryRequest {
2818 AdvisoryLock {
2842 request: AdvisoryLockRequest,
2843 responder: DirectoryAdvisoryLockResponder,
2844 },
2845 Clone {
2846 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
2847 control_handle: DirectoryControlHandle,
2848 },
2849 Close {
2860 responder: DirectoryCloseResponder,
2861 },
2862 Query {
2863 responder: DirectoryQueryResponder,
2864 },
2865 DeprecatedClone {
2867 flags: OpenFlags,
2868 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
2869 control_handle: DirectoryControlHandle,
2870 },
2871 DeprecatedGetAttr {
2873 responder: DirectoryDeprecatedGetAttrResponder,
2874 },
2875 DeprecatedSetAttr {
2877 flags: NodeAttributeFlags,
2878 attributes: NodeAttributes,
2879 responder: DirectoryDeprecatedSetAttrResponder,
2880 },
2881 DeprecatedGetFlags {
2883 responder: DirectoryDeprecatedGetFlagsResponder,
2884 },
2885 DeprecatedSetFlags {
2887 flags: OpenFlags,
2888 responder: DirectoryDeprecatedSetFlagsResponder,
2889 },
2890 GetFlags {
2899 responder: DirectoryGetFlagsResponder,
2900 },
2901 SetFlags {
2911 flags: Flags,
2912 responder: DirectorySetFlagsResponder,
2913 },
2914 QueryFilesystem {
2916 responder: DirectoryQueryFilesystemResponder,
2917 },
2918 GetAttributes {
2932 query: NodeAttributesQuery,
2933 responder: DirectoryGetAttributesResponder,
2934 },
2935 UpdateAttributes {
2944 payload: MutableNodeAttributes,
2945 responder: DirectoryUpdateAttributesResponder,
2946 },
2947 Sync {
2957 responder: DirectorySyncResponder,
2958 },
2959 ListExtendedAttributes {
2968 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
2969 control_handle: DirectoryControlHandle,
2970 },
2971 GetExtendedAttribute {
2978 name: Vec<u8>,
2979 responder: DirectoryGetExtendedAttributeResponder,
2980 },
2981 SetExtendedAttribute {
2989 name: Vec<u8>,
2990 value: ExtendedAttributeValue,
2991 mode: SetExtendedAttributeMode,
2992 responder: DirectorySetExtendedAttributeResponder,
2993 },
2994 RemoveExtendedAttribute {
3000 name: Vec<u8>,
3001 responder: DirectoryRemoveExtendedAttributeResponder,
3002 },
3003 DeprecatedOpen {
3005 flags: OpenFlags,
3006 mode: ModeType,
3007 path: String,
3008 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
3009 control_handle: DirectoryControlHandle,
3010 },
3011 Open {
3018 path: String,
3019 flags: Flags,
3020 options: Options,
3021 object: fdomain_client::Channel,
3022 control_handle: DirectoryControlHandle,
3023 },
3024 ReadDirents {
3050 max_bytes: u64,
3051 responder: DirectoryReadDirentsResponder,
3052 },
3053 Rewind {
3057 responder: DirectoryRewindResponder,
3058 },
3059 GetToken {
3066 responder: DirectoryGetTokenResponder,
3067 },
3068 Link {
3085 src: String,
3086 dst_parent_token: fdomain_client::NullableHandle,
3087 dst: String,
3088 responder: DirectoryLinkResponder,
3089 },
3090 Unlink {
3115 name: String,
3116 options: UnlinkOptions,
3117 responder: DirectoryUnlinkResponder,
3118 },
3119 Rename {
3145 src: String,
3146 dst_parent_token: fdomain_client::Event,
3147 dst: String,
3148 responder: DirectoryRenameResponder,
3149 },
3150 CreateSymlink {
3165 name: String,
3166 target: Vec<u8>,
3167 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3168 responder: DirectoryCreateSymlinkResponder,
3169 },
3170 Watch {
3177 mask: WatchMask,
3178 options: u32,
3179 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3180 responder: DirectoryWatchResponder,
3181 },
3182 #[non_exhaustive]
3184 _UnknownMethod {
3185 ordinal: u64,
3187 control_handle: DirectoryControlHandle,
3188 method_type: fidl::MethodType,
3189 },
3190}
3191
3192impl DirectoryRequest {
3193 #[allow(irrefutable_let_patterns)]
3194 pub fn into_advisory_lock(
3195 self,
3196 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
3197 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
3198 Some((request, responder))
3199 } else {
3200 None
3201 }
3202 }
3203
3204 #[allow(irrefutable_let_patterns)]
3205 pub fn into_clone(
3206 self,
3207 ) -> Option<(
3208 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
3209 DirectoryControlHandle,
3210 )> {
3211 if let DirectoryRequest::Clone { request, control_handle } = self {
3212 Some((request, control_handle))
3213 } else {
3214 None
3215 }
3216 }
3217
3218 #[allow(irrefutable_let_patterns)]
3219 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
3220 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
3221 }
3222
3223 #[allow(irrefutable_let_patterns)]
3224 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
3225 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
3226 }
3227
3228 #[allow(irrefutable_let_patterns)]
3229 pub fn into_deprecated_clone(
3230 self,
3231 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, DirectoryControlHandle)>
3232 {
3233 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
3234 Some((flags, object, control_handle))
3235 } else {
3236 None
3237 }
3238 }
3239
3240 #[allow(irrefutable_let_patterns)]
3241 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
3242 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
3243 Some((responder))
3244 } else {
3245 None
3246 }
3247 }
3248
3249 #[allow(irrefutable_let_patterns)]
3250 pub fn into_deprecated_set_attr(
3251 self,
3252 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
3253 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
3254 Some((flags, attributes, responder))
3255 } else {
3256 None
3257 }
3258 }
3259
3260 #[allow(irrefutable_let_patterns)]
3261 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
3262 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
3263 Some((responder))
3264 } else {
3265 None
3266 }
3267 }
3268
3269 #[allow(irrefutable_let_patterns)]
3270 pub fn into_deprecated_set_flags(
3271 self,
3272 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
3273 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
3274 Some((flags, responder))
3275 } else {
3276 None
3277 }
3278 }
3279
3280 #[allow(irrefutable_let_patterns)]
3281 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
3282 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
3283 }
3284
3285 #[allow(irrefutable_let_patterns)]
3286 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
3287 if let DirectoryRequest::SetFlags { flags, responder } = self {
3288 Some((flags, responder))
3289 } else {
3290 None
3291 }
3292 }
3293
3294 #[allow(irrefutable_let_patterns)]
3295 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
3296 if let DirectoryRequest::QueryFilesystem { responder } = self {
3297 Some((responder))
3298 } else {
3299 None
3300 }
3301 }
3302
3303 #[allow(irrefutable_let_patterns)]
3304 pub fn into_get_attributes(
3305 self,
3306 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
3307 if let DirectoryRequest::GetAttributes { query, responder } = self {
3308 Some((query, responder))
3309 } else {
3310 None
3311 }
3312 }
3313
3314 #[allow(irrefutable_let_patterns)]
3315 pub fn into_update_attributes(
3316 self,
3317 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
3318 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
3319 Some((payload, responder))
3320 } else {
3321 None
3322 }
3323 }
3324
3325 #[allow(irrefutable_let_patterns)]
3326 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
3327 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
3328 }
3329
3330 #[allow(irrefutable_let_patterns)]
3331 pub fn into_list_extended_attributes(
3332 self,
3333 ) -> Option<(
3334 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
3335 DirectoryControlHandle,
3336 )> {
3337 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
3338 Some((iterator, control_handle))
3339 } else {
3340 None
3341 }
3342 }
3343
3344 #[allow(irrefutable_let_patterns)]
3345 pub fn into_get_extended_attribute(
3346 self,
3347 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
3348 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
3349 Some((name, responder))
3350 } else {
3351 None
3352 }
3353 }
3354
3355 #[allow(irrefutable_let_patterns)]
3356 pub fn into_set_extended_attribute(
3357 self,
3358 ) -> Option<(
3359 Vec<u8>,
3360 ExtendedAttributeValue,
3361 SetExtendedAttributeMode,
3362 DirectorySetExtendedAttributeResponder,
3363 )> {
3364 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
3365 Some((name, value, mode, responder))
3366 } else {
3367 None
3368 }
3369 }
3370
3371 #[allow(irrefutable_let_patterns)]
3372 pub fn into_remove_extended_attribute(
3373 self,
3374 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
3375 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
3376 Some((name, responder))
3377 } else {
3378 None
3379 }
3380 }
3381
3382 #[allow(irrefutable_let_patterns)]
3383 pub fn into_deprecated_open(
3384 self,
3385 ) -> Option<(
3386 OpenFlags,
3387 ModeType,
3388 String,
3389 fdomain_client::fidl::ServerEnd<NodeMarker>,
3390 DirectoryControlHandle,
3391 )> {
3392 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
3393 {
3394 Some((flags, mode, path, object, control_handle))
3395 } else {
3396 None
3397 }
3398 }
3399
3400 #[allow(irrefutable_let_patterns)]
3401 pub fn into_open(
3402 self,
3403 ) -> Option<(String, Flags, Options, fdomain_client::Channel, DirectoryControlHandle)> {
3404 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
3405 Some((path, flags, options, object, control_handle))
3406 } else {
3407 None
3408 }
3409 }
3410
3411 #[allow(irrefutable_let_patterns)]
3412 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
3413 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
3414 Some((max_bytes, responder))
3415 } else {
3416 None
3417 }
3418 }
3419
3420 #[allow(irrefutable_let_patterns)]
3421 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
3422 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
3423 }
3424
3425 #[allow(irrefutable_let_patterns)]
3426 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
3427 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
3428 }
3429
3430 #[allow(irrefutable_let_patterns)]
3431 pub fn into_link(
3432 self,
3433 ) -> Option<(String, fdomain_client::NullableHandle, String, DirectoryLinkResponder)> {
3434 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
3435 Some((src, dst_parent_token, dst, responder))
3436 } else {
3437 None
3438 }
3439 }
3440
3441 #[allow(irrefutable_let_patterns)]
3442 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
3443 if let DirectoryRequest::Unlink { name, options, responder } = self {
3444 Some((name, options, responder))
3445 } else {
3446 None
3447 }
3448 }
3449
3450 #[allow(irrefutable_let_patterns)]
3451 pub fn into_rename(
3452 self,
3453 ) -> Option<(String, fdomain_client::Event, String, DirectoryRenameResponder)> {
3454 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
3455 Some((src, dst_parent_token, dst, responder))
3456 } else {
3457 None
3458 }
3459 }
3460
3461 #[allow(irrefutable_let_patterns)]
3462 pub fn into_create_symlink(
3463 self,
3464 ) -> Option<(
3465 String,
3466 Vec<u8>,
3467 Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3468 DirectoryCreateSymlinkResponder,
3469 )> {
3470 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
3471 Some((name, target, connection, responder))
3472 } else {
3473 None
3474 }
3475 }
3476
3477 #[allow(irrefutable_let_patterns)]
3478 pub fn into_watch(
3479 self,
3480 ) -> Option<(
3481 WatchMask,
3482 u32,
3483 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3484 DirectoryWatchResponder,
3485 )> {
3486 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
3487 Some((mask, options, watcher, responder))
3488 } else {
3489 None
3490 }
3491 }
3492
3493 pub fn method_name(&self) -> &'static str {
3495 match *self {
3496 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
3497 DirectoryRequest::Clone { .. } => "clone",
3498 DirectoryRequest::Close { .. } => "close",
3499 DirectoryRequest::Query { .. } => "query",
3500 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
3501 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
3502 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
3503 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
3504 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
3505 DirectoryRequest::GetFlags { .. } => "get_flags",
3506 DirectoryRequest::SetFlags { .. } => "set_flags",
3507 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
3508 DirectoryRequest::GetAttributes { .. } => "get_attributes",
3509 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
3510 DirectoryRequest::Sync { .. } => "sync",
3511 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
3512 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
3513 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
3514 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
3515 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
3516 DirectoryRequest::Open { .. } => "open",
3517 DirectoryRequest::ReadDirents { .. } => "read_dirents",
3518 DirectoryRequest::Rewind { .. } => "rewind",
3519 DirectoryRequest::GetToken { .. } => "get_token",
3520 DirectoryRequest::Link { .. } => "link",
3521 DirectoryRequest::Unlink { .. } => "unlink",
3522 DirectoryRequest::Rename { .. } => "rename",
3523 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
3524 DirectoryRequest::Watch { .. } => "watch",
3525 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3526 "unknown one-way method"
3527 }
3528 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3529 "unknown two-way method"
3530 }
3531 }
3532 }
3533}
3534
3535#[derive(Debug, Clone)]
3536pub struct DirectoryControlHandle {
3537 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3538}
3539
3540impl fdomain_client::fidl::ControlHandle for DirectoryControlHandle {
3541 fn shutdown(&self) {
3542 self.inner.shutdown()
3543 }
3544
3545 fn is_closed(&self) -> bool {
3546 self.inner.channel().is_closed()
3547 }
3548 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3549 self.inner.channel().on_closed()
3550 }
3551}
3552
3553impl DirectoryControlHandle {
3554 pub fn send_on_open_(
3555 &self,
3556 mut s: i32,
3557 mut info: Option<NodeInfoDeprecated>,
3558 ) -> Result<(), fidl::Error> {
3559 self.inner.send::<NodeOnOpenRequest>(
3560 (s, info.as_mut()),
3561 0,
3562 0x7fc7bbb1dbfd1972,
3563 fidl::encoding::DynamicFlags::FLEXIBLE,
3564 )
3565 }
3566
3567 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
3568 self.inner.send::<Representation>(
3569 &mut payload,
3570 0,
3571 0x5cb40567d80a510c,
3572 fidl::encoding::DynamicFlags::empty(),
3573 )
3574 }
3575}
3576
3577#[must_use = "FIDL methods require a response to be sent"]
3578#[derive(Debug)]
3579pub struct DirectoryAdvisoryLockResponder {
3580 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3581 tx_id: u32,
3582}
3583
3584impl std::ops::Drop for DirectoryAdvisoryLockResponder {
3588 fn drop(&mut self) {
3589 self.control_handle.shutdown();
3590 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3592 }
3593}
3594
3595impl fdomain_client::fidl::Responder for DirectoryAdvisoryLockResponder {
3596 type ControlHandle = DirectoryControlHandle;
3597
3598 fn control_handle(&self) -> &DirectoryControlHandle {
3599 &self.control_handle
3600 }
3601
3602 fn drop_without_shutdown(mut self) {
3603 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3605 std::mem::forget(self);
3607 }
3608}
3609
3610impl DirectoryAdvisoryLockResponder {
3611 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3615 let _result = self.send_raw(result);
3616 if _result.is_err() {
3617 self.control_handle.shutdown();
3618 }
3619 self.drop_without_shutdown();
3620 _result
3621 }
3622
3623 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3625 let _result = self.send_raw(result);
3626 self.drop_without_shutdown();
3627 _result
3628 }
3629
3630 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3631 self.control_handle
3632 .inner
3633 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3634 result,
3635 self.tx_id,
3636 0x6ee9c0ad53ec87aa,
3637 fidl::encoding::DynamicFlags::empty(),
3638 )
3639 }
3640}
3641
3642#[must_use = "FIDL methods require a response to be sent"]
3643#[derive(Debug)]
3644pub struct DirectoryCloseResponder {
3645 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3646 tx_id: u32,
3647}
3648
3649impl std::ops::Drop for DirectoryCloseResponder {
3653 fn drop(&mut self) {
3654 self.control_handle.shutdown();
3655 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3657 }
3658}
3659
3660impl fdomain_client::fidl::Responder for DirectoryCloseResponder {
3661 type ControlHandle = DirectoryControlHandle;
3662
3663 fn control_handle(&self) -> &DirectoryControlHandle {
3664 &self.control_handle
3665 }
3666
3667 fn drop_without_shutdown(mut self) {
3668 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3670 std::mem::forget(self);
3672 }
3673}
3674
3675impl DirectoryCloseResponder {
3676 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3680 let _result = self.send_raw(result);
3681 if _result.is_err() {
3682 self.control_handle.shutdown();
3683 }
3684 self.drop_without_shutdown();
3685 _result
3686 }
3687
3688 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3690 let _result = self.send_raw(result);
3691 self.drop_without_shutdown();
3692 _result
3693 }
3694
3695 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3696 self.control_handle
3697 .inner
3698 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3699 result,
3700 self.tx_id,
3701 0x5ac5d459ad7f657e,
3702 fidl::encoding::DynamicFlags::empty(),
3703 )
3704 }
3705}
3706
3707#[must_use = "FIDL methods require a response to be sent"]
3708#[derive(Debug)]
3709pub struct DirectoryQueryResponder {
3710 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3711 tx_id: u32,
3712}
3713
3714impl std::ops::Drop for DirectoryQueryResponder {
3718 fn drop(&mut self) {
3719 self.control_handle.shutdown();
3720 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3722 }
3723}
3724
3725impl fdomain_client::fidl::Responder for DirectoryQueryResponder {
3726 type ControlHandle = DirectoryControlHandle;
3727
3728 fn control_handle(&self) -> &DirectoryControlHandle {
3729 &self.control_handle
3730 }
3731
3732 fn drop_without_shutdown(mut self) {
3733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3735 std::mem::forget(self);
3737 }
3738}
3739
3740impl DirectoryQueryResponder {
3741 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3745 let _result = self.send_raw(protocol);
3746 if _result.is_err() {
3747 self.control_handle.shutdown();
3748 }
3749 self.drop_without_shutdown();
3750 _result
3751 }
3752
3753 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3755 let _result = self.send_raw(protocol);
3756 self.drop_without_shutdown();
3757 _result
3758 }
3759
3760 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3761 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
3762 (protocol,),
3763 self.tx_id,
3764 0x2658edee9decfc06,
3765 fidl::encoding::DynamicFlags::empty(),
3766 )
3767 }
3768}
3769
3770#[must_use = "FIDL methods require a response to be sent"]
3771#[derive(Debug)]
3772pub struct DirectoryDeprecatedGetAttrResponder {
3773 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3774 tx_id: u32,
3775}
3776
3777impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
3781 fn drop(&mut self) {
3782 self.control_handle.shutdown();
3783 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3785 }
3786}
3787
3788impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetAttrResponder {
3789 type ControlHandle = DirectoryControlHandle;
3790
3791 fn control_handle(&self) -> &DirectoryControlHandle {
3792 &self.control_handle
3793 }
3794
3795 fn drop_without_shutdown(mut self) {
3796 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3798 std::mem::forget(self);
3800 }
3801}
3802
3803impl DirectoryDeprecatedGetAttrResponder {
3804 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3808 let _result = self.send_raw(s, attributes);
3809 if _result.is_err() {
3810 self.control_handle.shutdown();
3811 }
3812 self.drop_without_shutdown();
3813 _result
3814 }
3815
3816 pub fn send_no_shutdown_on_err(
3818 self,
3819 mut s: i32,
3820 mut attributes: &NodeAttributes,
3821 ) -> Result<(), fidl::Error> {
3822 let _result = self.send_raw(s, attributes);
3823 self.drop_without_shutdown();
3824 _result
3825 }
3826
3827 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3828 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
3829 (s, attributes),
3830 self.tx_id,
3831 0x78985e216314dafd,
3832 fidl::encoding::DynamicFlags::empty(),
3833 )
3834 }
3835}
3836
3837#[must_use = "FIDL methods require a response to be sent"]
3838#[derive(Debug)]
3839pub struct DirectoryDeprecatedSetAttrResponder {
3840 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3841 tx_id: u32,
3842}
3843
3844impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
3848 fn drop(&mut self) {
3849 self.control_handle.shutdown();
3850 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3852 }
3853}
3854
3855impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetAttrResponder {
3856 type ControlHandle = DirectoryControlHandle;
3857
3858 fn control_handle(&self) -> &DirectoryControlHandle {
3859 &self.control_handle
3860 }
3861
3862 fn drop_without_shutdown(mut self) {
3863 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3865 std::mem::forget(self);
3867 }
3868}
3869
3870impl DirectoryDeprecatedSetAttrResponder {
3871 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
3875 let _result = self.send_raw(s);
3876 if _result.is_err() {
3877 self.control_handle.shutdown();
3878 }
3879 self.drop_without_shutdown();
3880 _result
3881 }
3882
3883 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
3885 let _result = self.send_raw(s);
3886 self.drop_without_shutdown();
3887 _result
3888 }
3889
3890 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
3891 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
3892 (s,),
3893 self.tx_id,
3894 0x4186c0f40d938f46,
3895 fidl::encoding::DynamicFlags::empty(),
3896 )
3897 }
3898}
3899
3900#[must_use = "FIDL methods require a response to be sent"]
3901#[derive(Debug)]
3902pub struct DirectoryDeprecatedGetFlagsResponder {
3903 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3904 tx_id: u32,
3905}
3906
3907impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
3911 fn drop(&mut self) {
3912 self.control_handle.shutdown();
3913 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3915 }
3916}
3917
3918impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetFlagsResponder {
3919 type ControlHandle = DirectoryControlHandle;
3920
3921 fn control_handle(&self) -> &DirectoryControlHandle {
3922 &self.control_handle
3923 }
3924
3925 fn drop_without_shutdown(mut self) {
3926 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3928 std::mem::forget(self);
3930 }
3931}
3932
3933impl DirectoryDeprecatedGetFlagsResponder {
3934 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3938 let _result = self.send_raw(s, flags);
3939 if _result.is_err() {
3940 self.control_handle.shutdown();
3941 }
3942 self.drop_without_shutdown();
3943 _result
3944 }
3945
3946 pub fn send_no_shutdown_on_err(
3948 self,
3949 mut s: i32,
3950 mut flags: OpenFlags,
3951 ) -> Result<(), fidl::Error> {
3952 let _result = self.send_raw(s, flags);
3953 self.drop_without_shutdown();
3954 _result
3955 }
3956
3957 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3958 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
3959 (s, flags),
3960 self.tx_id,
3961 0x5b88fffb8eda3aa1,
3962 fidl::encoding::DynamicFlags::empty(),
3963 )
3964 }
3965}
3966
3967#[must_use = "FIDL methods require a response to be sent"]
3968#[derive(Debug)]
3969pub struct DirectoryDeprecatedSetFlagsResponder {
3970 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3971 tx_id: u32,
3972}
3973
3974impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
3978 fn drop(&mut self) {
3979 self.control_handle.shutdown();
3980 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3982 }
3983}
3984
3985impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetFlagsResponder {
3986 type ControlHandle = DirectoryControlHandle;
3987
3988 fn control_handle(&self) -> &DirectoryControlHandle {
3989 &self.control_handle
3990 }
3991
3992 fn drop_without_shutdown(mut self) {
3993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3995 std::mem::forget(self);
3997 }
3998}
3999
4000impl DirectoryDeprecatedSetFlagsResponder {
4001 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4005 let _result = self.send_raw(s);
4006 if _result.is_err() {
4007 self.control_handle.shutdown();
4008 }
4009 self.drop_without_shutdown();
4010 _result
4011 }
4012
4013 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4015 let _result = self.send_raw(s);
4016 self.drop_without_shutdown();
4017 _result
4018 }
4019
4020 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4021 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4022 (s,),
4023 self.tx_id,
4024 0x5295b76c71fde733,
4025 fidl::encoding::DynamicFlags::empty(),
4026 )
4027 }
4028}
4029
4030#[must_use = "FIDL methods require a response to be sent"]
4031#[derive(Debug)]
4032pub struct DirectoryGetFlagsResponder {
4033 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4034 tx_id: u32,
4035}
4036
4037impl std::ops::Drop for DirectoryGetFlagsResponder {
4041 fn drop(&mut self) {
4042 self.control_handle.shutdown();
4043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4045 }
4046}
4047
4048impl fdomain_client::fidl::Responder for DirectoryGetFlagsResponder {
4049 type ControlHandle = DirectoryControlHandle;
4050
4051 fn control_handle(&self) -> &DirectoryControlHandle {
4052 &self.control_handle
4053 }
4054
4055 fn drop_without_shutdown(mut self) {
4056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4058 std::mem::forget(self);
4060 }
4061}
4062
4063impl DirectoryGetFlagsResponder {
4064 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4068 let _result = self.send_raw(result);
4069 if _result.is_err() {
4070 self.control_handle.shutdown();
4071 }
4072 self.drop_without_shutdown();
4073 _result
4074 }
4075
4076 pub fn send_no_shutdown_on_err(
4078 self,
4079 mut result: Result<Flags, i32>,
4080 ) -> Result<(), fidl::Error> {
4081 let _result = self.send_raw(result);
4082 self.drop_without_shutdown();
4083 _result
4084 }
4085
4086 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4087 self.control_handle
4088 .inner
4089 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4090 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4091 self.tx_id,
4092 0x176eb318f64ec23,
4093 fidl::encoding::DynamicFlags::FLEXIBLE,
4094 )
4095 }
4096}
4097
4098#[must_use = "FIDL methods require a response to be sent"]
4099#[derive(Debug)]
4100pub struct DirectorySetFlagsResponder {
4101 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4102 tx_id: u32,
4103}
4104
4105impl std::ops::Drop for DirectorySetFlagsResponder {
4109 fn drop(&mut self) {
4110 self.control_handle.shutdown();
4111 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4113 }
4114}
4115
4116impl fdomain_client::fidl::Responder for DirectorySetFlagsResponder {
4117 type ControlHandle = DirectoryControlHandle;
4118
4119 fn control_handle(&self) -> &DirectoryControlHandle {
4120 &self.control_handle
4121 }
4122
4123 fn drop_without_shutdown(mut self) {
4124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4126 std::mem::forget(self);
4128 }
4129}
4130
4131impl DirectorySetFlagsResponder {
4132 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4136 let _result = self.send_raw(result);
4137 if _result.is_err() {
4138 self.control_handle.shutdown();
4139 }
4140 self.drop_without_shutdown();
4141 _result
4142 }
4143
4144 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4146 let _result = self.send_raw(result);
4147 self.drop_without_shutdown();
4148 _result
4149 }
4150
4151 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4152 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4153 fidl::encoding::EmptyStruct,
4154 i32,
4155 >>(
4156 fidl::encoding::FlexibleResult::new(result),
4157 self.tx_id,
4158 0x55a8028685791ea8,
4159 fidl::encoding::DynamicFlags::FLEXIBLE,
4160 )
4161 }
4162}
4163
4164#[must_use = "FIDL methods require a response to be sent"]
4165#[derive(Debug)]
4166pub struct DirectoryQueryFilesystemResponder {
4167 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4168 tx_id: u32,
4169}
4170
4171impl std::ops::Drop for DirectoryQueryFilesystemResponder {
4175 fn drop(&mut self) {
4176 self.control_handle.shutdown();
4177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4179 }
4180}
4181
4182impl fdomain_client::fidl::Responder for DirectoryQueryFilesystemResponder {
4183 type ControlHandle = DirectoryControlHandle;
4184
4185 fn control_handle(&self) -> &DirectoryControlHandle {
4186 &self.control_handle
4187 }
4188
4189 fn drop_without_shutdown(mut self) {
4190 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4192 std::mem::forget(self);
4194 }
4195}
4196
4197impl DirectoryQueryFilesystemResponder {
4198 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4202 let _result = self.send_raw(s, info);
4203 if _result.is_err() {
4204 self.control_handle.shutdown();
4205 }
4206 self.drop_without_shutdown();
4207 _result
4208 }
4209
4210 pub fn send_no_shutdown_on_err(
4212 self,
4213 mut s: i32,
4214 mut info: Option<&FilesystemInfo>,
4215 ) -> Result<(), fidl::Error> {
4216 let _result = self.send_raw(s, info);
4217 self.drop_without_shutdown();
4218 _result
4219 }
4220
4221 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4222 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
4223 (s, info),
4224 self.tx_id,
4225 0x6f344a1c6b0a0610,
4226 fidl::encoding::DynamicFlags::empty(),
4227 )
4228 }
4229}
4230
4231#[must_use = "FIDL methods require a response to be sent"]
4232#[derive(Debug)]
4233pub struct DirectoryGetAttributesResponder {
4234 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4235 tx_id: u32,
4236}
4237
4238impl std::ops::Drop for DirectoryGetAttributesResponder {
4242 fn drop(&mut self) {
4243 self.control_handle.shutdown();
4244 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4246 }
4247}
4248
4249impl fdomain_client::fidl::Responder for DirectoryGetAttributesResponder {
4250 type ControlHandle = DirectoryControlHandle;
4251
4252 fn control_handle(&self) -> &DirectoryControlHandle {
4253 &self.control_handle
4254 }
4255
4256 fn drop_without_shutdown(mut self) {
4257 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4259 std::mem::forget(self);
4261 }
4262}
4263
4264impl DirectoryGetAttributesResponder {
4265 pub fn send(
4269 self,
4270 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4271 ) -> Result<(), fidl::Error> {
4272 let _result = self.send_raw(result);
4273 if _result.is_err() {
4274 self.control_handle.shutdown();
4275 }
4276 self.drop_without_shutdown();
4277 _result
4278 }
4279
4280 pub fn send_no_shutdown_on_err(
4282 self,
4283 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4284 ) -> Result<(), fidl::Error> {
4285 let _result = self.send_raw(result);
4286 self.drop_without_shutdown();
4287 _result
4288 }
4289
4290 fn send_raw(
4291 &self,
4292 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4293 ) -> Result<(), fidl::Error> {
4294 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
4295 result,
4296 self.tx_id,
4297 0x3d4396a638ea053b,
4298 fidl::encoding::DynamicFlags::empty(),
4299 )
4300 }
4301}
4302
4303#[must_use = "FIDL methods require a response to be sent"]
4304#[derive(Debug)]
4305pub struct DirectoryUpdateAttributesResponder {
4306 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4307 tx_id: u32,
4308}
4309
4310impl std::ops::Drop for DirectoryUpdateAttributesResponder {
4314 fn drop(&mut self) {
4315 self.control_handle.shutdown();
4316 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4318 }
4319}
4320
4321impl fdomain_client::fidl::Responder for DirectoryUpdateAttributesResponder {
4322 type ControlHandle = DirectoryControlHandle;
4323
4324 fn control_handle(&self) -> &DirectoryControlHandle {
4325 &self.control_handle
4326 }
4327
4328 fn drop_without_shutdown(mut self) {
4329 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4331 std::mem::forget(self);
4333 }
4334}
4335
4336impl DirectoryUpdateAttributesResponder {
4337 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4341 let _result = self.send_raw(result);
4342 if _result.is_err() {
4343 self.control_handle.shutdown();
4344 }
4345 self.drop_without_shutdown();
4346 _result
4347 }
4348
4349 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4351 let _result = self.send_raw(result);
4352 self.drop_without_shutdown();
4353 _result
4354 }
4355
4356 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4357 self.control_handle
4358 .inner
4359 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4360 result,
4361 self.tx_id,
4362 0x3308c1da5a89bf08,
4363 fidl::encoding::DynamicFlags::empty(),
4364 )
4365 }
4366}
4367
4368#[must_use = "FIDL methods require a response to be sent"]
4369#[derive(Debug)]
4370pub struct DirectorySyncResponder {
4371 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4372 tx_id: u32,
4373}
4374
4375impl std::ops::Drop for DirectorySyncResponder {
4379 fn drop(&mut self) {
4380 self.control_handle.shutdown();
4381 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4383 }
4384}
4385
4386impl fdomain_client::fidl::Responder for DirectorySyncResponder {
4387 type ControlHandle = DirectoryControlHandle;
4388
4389 fn control_handle(&self) -> &DirectoryControlHandle {
4390 &self.control_handle
4391 }
4392
4393 fn drop_without_shutdown(mut self) {
4394 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4396 std::mem::forget(self);
4398 }
4399}
4400
4401impl DirectorySyncResponder {
4402 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4406 let _result = self.send_raw(result);
4407 if _result.is_err() {
4408 self.control_handle.shutdown();
4409 }
4410 self.drop_without_shutdown();
4411 _result
4412 }
4413
4414 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4416 let _result = self.send_raw(result);
4417 self.drop_without_shutdown();
4418 _result
4419 }
4420
4421 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4422 self.control_handle
4423 .inner
4424 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4425 result,
4426 self.tx_id,
4427 0x2c5c27ca0ab5dc49,
4428 fidl::encoding::DynamicFlags::empty(),
4429 )
4430 }
4431}
4432
4433#[must_use = "FIDL methods require a response to be sent"]
4434#[derive(Debug)]
4435pub struct DirectoryGetExtendedAttributeResponder {
4436 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4437 tx_id: u32,
4438}
4439
4440impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
4444 fn drop(&mut self) {
4445 self.control_handle.shutdown();
4446 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4448 }
4449}
4450
4451impl fdomain_client::fidl::Responder for DirectoryGetExtendedAttributeResponder {
4452 type ControlHandle = DirectoryControlHandle;
4453
4454 fn control_handle(&self) -> &DirectoryControlHandle {
4455 &self.control_handle
4456 }
4457
4458 fn drop_without_shutdown(mut self) {
4459 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4461 std::mem::forget(self);
4463 }
4464}
4465
4466impl DirectoryGetExtendedAttributeResponder {
4467 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4471 let _result = self.send_raw(result);
4472 if _result.is_err() {
4473 self.control_handle.shutdown();
4474 }
4475 self.drop_without_shutdown();
4476 _result
4477 }
4478
4479 pub fn send_no_shutdown_on_err(
4481 self,
4482 mut result: Result<ExtendedAttributeValue, i32>,
4483 ) -> Result<(), fidl::Error> {
4484 let _result = self.send_raw(result);
4485 self.drop_without_shutdown();
4486 _result
4487 }
4488
4489 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4490 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
4491 result.as_mut().map_err(|e| *e),
4492 self.tx_id,
4493 0x45ffa3ccfdeb76db,
4494 fidl::encoding::DynamicFlags::empty(),
4495 )
4496 }
4497}
4498
4499#[must_use = "FIDL methods require a response to be sent"]
4500#[derive(Debug)]
4501pub struct DirectorySetExtendedAttributeResponder {
4502 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4503 tx_id: u32,
4504}
4505
4506impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
4510 fn drop(&mut self) {
4511 self.control_handle.shutdown();
4512 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4514 }
4515}
4516
4517impl fdomain_client::fidl::Responder for DirectorySetExtendedAttributeResponder {
4518 type ControlHandle = DirectoryControlHandle;
4519
4520 fn control_handle(&self) -> &DirectoryControlHandle {
4521 &self.control_handle
4522 }
4523
4524 fn drop_without_shutdown(mut self) {
4525 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4527 std::mem::forget(self);
4529 }
4530}
4531
4532impl DirectorySetExtendedAttributeResponder {
4533 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4537 let _result = self.send_raw(result);
4538 if _result.is_err() {
4539 self.control_handle.shutdown();
4540 }
4541 self.drop_without_shutdown();
4542 _result
4543 }
4544
4545 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4547 let _result = self.send_raw(result);
4548 self.drop_without_shutdown();
4549 _result
4550 }
4551
4552 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4553 self.control_handle
4554 .inner
4555 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4556 result,
4557 self.tx_id,
4558 0x4a951362f681f23c,
4559 fidl::encoding::DynamicFlags::empty(),
4560 )
4561 }
4562}
4563
4564#[must_use = "FIDL methods require a response to be sent"]
4565#[derive(Debug)]
4566pub struct DirectoryRemoveExtendedAttributeResponder {
4567 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4568 tx_id: u32,
4569}
4570
4571impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
4575 fn drop(&mut self) {
4576 self.control_handle.shutdown();
4577 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4579 }
4580}
4581
4582impl fdomain_client::fidl::Responder for DirectoryRemoveExtendedAttributeResponder {
4583 type ControlHandle = DirectoryControlHandle;
4584
4585 fn control_handle(&self) -> &DirectoryControlHandle {
4586 &self.control_handle
4587 }
4588
4589 fn drop_without_shutdown(mut self) {
4590 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4592 std::mem::forget(self);
4594 }
4595}
4596
4597impl DirectoryRemoveExtendedAttributeResponder {
4598 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4602 let _result = self.send_raw(result);
4603 if _result.is_err() {
4604 self.control_handle.shutdown();
4605 }
4606 self.drop_without_shutdown();
4607 _result
4608 }
4609
4610 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4612 let _result = self.send_raw(result);
4613 self.drop_without_shutdown();
4614 _result
4615 }
4616
4617 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4618 self.control_handle
4619 .inner
4620 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4621 result,
4622 self.tx_id,
4623 0x7a0b9f3a9bf9032d,
4624 fidl::encoding::DynamicFlags::empty(),
4625 )
4626 }
4627}
4628
4629#[must_use = "FIDL methods require a response to be sent"]
4630#[derive(Debug)]
4631pub struct DirectoryReadDirentsResponder {
4632 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4633 tx_id: u32,
4634}
4635
4636impl std::ops::Drop for DirectoryReadDirentsResponder {
4640 fn drop(&mut self) {
4641 self.control_handle.shutdown();
4642 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4644 }
4645}
4646
4647impl fdomain_client::fidl::Responder for DirectoryReadDirentsResponder {
4648 type ControlHandle = DirectoryControlHandle;
4649
4650 fn control_handle(&self) -> &DirectoryControlHandle {
4651 &self.control_handle
4652 }
4653
4654 fn drop_without_shutdown(mut self) {
4655 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4657 std::mem::forget(self);
4659 }
4660}
4661
4662impl DirectoryReadDirentsResponder {
4663 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4667 let _result = self.send_raw(s, dirents);
4668 if _result.is_err() {
4669 self.control_handle.shutdown();
4670 }
4671 self.drop_without_shutdown();
4672 _result
4673 }
4674
4675 pub fn send_no_shutdown_on_err(
4677 self,
4678 mut s: i32,
4679 mut dirents: &[u8],
4680 ) -> Result<(), fidl::Error> {
4681 let _result = self.send_raw(s, dirents);
4682 self.drop_without_shutdown();
4683 _result
4684 }
4685
4686 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4687 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
4688 (s, dirents),
4689 self.tx_id,
4690 0x3582806bf27faa0a,
4691 fidl::encoding::DynamicFlags::empty(),
4692 )
4693 }
4694}
4695
4696#[must_use = "FIDL methods require a response to be sent"]
4697#[derive(Debug)]
4698pub struct DirectoryRewindResponder {
4699 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4700 tx_id: u32,
4701}
4702
4703impl std::ops::Drop for DirectoryRewindResponder {
4707 fn drop(&mut self) {
4708 self.control_handle.shutdown();
4709 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4711 }
4712}
4713
4714impl fdomain_client::fidl::Responder for DirectoryRewindResponder {
4715 type ControlHandle = DirectoryControlHandle;
4716
4717 fn control_handle(&self) -> &DirectoryControlHandle {
4718 &self.control_handle
4719 }
4720
4721 fn drop_without_shutdown(mut self) {
4722 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4724 std::mem::forget(self);
4726 }
4727}
4728
4729impl DirectoryRewindResponder {
4730 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4734 let _result = self.send_raw(s);
4735 if _result.is_err() {
4736 self.control_handle.shutdown();
4737 }
4738 self.drop_without_shutdown();
4739 _result
4740 }
4741
4742 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4744 let _result = self.send_raw(s);
4745 self.drop_without_shutdown();
4746 _result
4747 }
4748
4749 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4750 self.control_handle.inner.send::<DirectoryRewindResponse>(
4751 (s,),
4752 self.tx_id,
4753 0x16b1202af0f34c71,
4754 fidl::encoding::DynamicFlags::empty(),
4755 )
4756 }
4757}
4758
4759#[must_use = "FIDL methods require a response to be sent"]
4760#[derive(Debug)]
4761pub struct DirectoryGetTokenResponder {
4762 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4763 tx_id: u32,
4764}
4765
4766impl std::ops::Drop for DirectoryGetTokenResponder {
4770 fn drop(&mut self) {
4771 self.control_handle.shutdown();
4772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4774 }
4775}
4776
4777impl fdomain_client::fidl::Responder for DirectoryGetTokenResponder {
4778 type ControlHandle = DirectoryControlHandle;
4779
4780 fn control_handle(&self) -> &DirectoryControlHandle {
4781 &self.control_handle
4782 }
4783
4784 fn drop_without_shutdown(mut self) {
4785 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4787 std::mem::forget(self);
4789 }
4790}
4791
4792impl DirectoryGetTokenResponder {
4793 pub fn send(
4797 self,
4798 mut s: i32,
4799 mut token: Option<fdomain_client::NullableHandle>,
4800 ) -> Result<(), fidl::Error> {
4801 let _result = self.send_raw(s, token);
4802 if _result.is_err() {
4803 self.control_handle.shutdown();
4804 }
4805 self.drop_without_shutdown();
4806 _result
4807 }
4808
4809 pub fn send_no_shutdown_on_err(
4811 self,
4812 mut s: i32,
4813 mut token: Option<fdomain_client::NullableHandle>,
4814 ) -> Result<(), fidl::Error> {
4815 let _result = self.send_raw(s, token);
4816 self.drop_without_shutdown();
4817 _result
4818 }
4819
4820 fn send_raw(
4821 &self,
4822 mut s: i32,
4823 mut token: Option<fdomain_client::NullableHandle>,
4824 ) -> Result<(), fidl::Error> {
4825 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
4826 (s, token),
4827 self.tx_id,
4828 0x26ae9d18763c8655,
4829 fidl::encoding::DynamicFlags::empty(),
4830 )
4831 }
4832}
4833
4834#[must_use = "FIDL methods require a response to be sent"]
4835#[derive(Debug)]
4836pub struct DirectoryLinkResponder {
4837 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4838 tx_id: u32,
4839}
4840
4841impl std::ops::Drop for DirectoryLinkResponder {
4845 fn drop(&mut self) {
4846 self.control_handle.shutdown();
4847 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4849 }
4850}
4851
4852impl fdomain_client::fidl::Responder for DirectoryLinkResponder {
4853 type ControlHandle = DirectoryControlHandle;
4854
4855 fn control_handle(&self) -> &DirectoryControlHandle {
4856 &self.control_handle
4857 }
4858
4859 fn drop_without_shutdown(mut self) {
4860 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4862 std::mem::forget(self);
4864 }
4865}
4866
4867impl DirectoryLinkResponder {
4868 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4872 let _result = self.send_raw(s);
4873 if _result.is_err() {
4874 self.control_handle.shutdown();
4875 }
4876 self.drop_without_shutdown();
4877 _result
4878 }
4879
4880 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4882 let _result = self.send_raw(s);
4883 self.drop_without_shutdown();
4884 _result
4885 }
4886
4887 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4888 self.control_handle.inner.send::<DirectoryLinkResponse>(
4889 (s,),
4890 self.tx_id,
4891 0x740604c0c7c930e7,
4892 fidl::encoding::DynamicFlags::empty(),
4893 )
4894 }
4895}
4896
4897#[must_use = "FIDL methods require a response to be sent"]
4898#[derive(Debug)]
4899pub struct DirectoryUnlinkResponder {
4900 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4901 tx_id: u32,
4902}
4903
4904impl std::ops::Drop for DirectoryUnlinkResponder {
4908 fn drop(&mut self) {
4909 self.control_handle.shutdown();
4910 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4912 }
4913}
4914
4915impl fdomain_client::fidl::Responder for DirectoryUnlinkResponder {
4916 type ControlHandle = DirectoryControlHandle;
4917
4918 fn control_handle(&self) -> &DirectoryControlHandle {
4919 &self.control_handle
4920 }
4921
4922 fn drop_without_shutdown(mut self) {
4923 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4925 std::mem::forget(self);
4927 }
4928}
4929
4930impl DirectoryUnlinkResponder {
4931 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4935 let _result = self.send_raw(result);
4936 if _result.is_err() {
4937 self.control_handle.shutdown();
4938 }
4939 self.drop_without_shutdown();
4940 _result
4941 }
4942
4943 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4945 let _result = self.send_raw(result);
4946 self.drop_without_shutdown();
4947 _result
4948 }
4949
4950 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4951 self.control_handle
4952 .inner
4953 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4954 result,
4955 self.tx_id,
4956 0x750a0326a78d7bed,
4957 fidl::encoding::DynamicFlags::empty(),
4958 )
4959 }
4960}
4961
4962#[must_use = "FIDL methods require a response to be sent"]
4963#[derive(Debug)]
4964pub struct DirectoryRenameResponder {
4965 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4966 tx_id: u32,
4967}
4968
4969impl std::ops::Drop for DirectoryRenameResponder {
4973 fn drop(&mut self) {
4974 self.control_handle.shutdown();
4975 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4977 }
4978}
4979
4980impl fdomain_client::fidl::Responder for DirectoryRenameResponder {
4981 type ControlHandle = DirectoryControlHandle;
4982
4983 fn control_handle(&self) -> &DirectoryControlHandle {
4984 &self.control_handle
4985 }
4986
4987 fn drop_without_shutdown(mut self) {
4988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4990 std::mem::forget(self);
4992 }
4993}
4994
4995impl DirectoryRenameResponder {
4996 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5000 let _result = self.send_raw(result);
5001 if _result.is_err() {
5002 self.control_handle.shutdown();
5003 }
5004 self.drop_without_shutdown();
5005 _result
5006 }
5007
5008 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5010 let _result = self.send_raw(result);
5011 self.drop_without_shutdown();
5012 _result
5013 }
5014
5015 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5016 self.control_handle
5017 .inner
5018 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5019 result,
5020 self.tx_id,
5021 0x7060e7723b9928de,
5022 fidl::encoding::DynamicFlags::empty(),
5023 )
5024 }
5025}
5026
5027#[must_use = "FIDL methods require a response to be sent"]
5028#[derive(Debug)]
5029pub struct DirectoryCreateSymlinkResponder {
5030 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5031 tx_id: u32,
5032}
5033
5034impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5038 fn drop(&mut self) {
5039 self.control_handle.shutdown();
5040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5042 }
5043}
5044
5045impl fdomain_client::fidl::Responder for DirectoryCreateSymlinkResponder {
5046 type ControlHandle = DirectoryControlHandle;
5047
5048 fn control_handle(&self) -> &DirectoryControlHandle {
5049 &self.control_handle
5050 }
5051
5052 fn drop_without_shutdown(mut self) {
5053 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5055 std::mem::forget(self);
5057 }
5058}
5059
5060impl DirectoryCreateSymlinkResponder {
5061 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5065 let _result = self.send_raw(result);
5066 if _result.is_err() {
5067 self.control_handle.shutdown();
5068 }
5069 self.drop_without_shutdown();
5070 _result
5071 }
5072
5073 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5075 let _result = self.send_raw(result);
5076 self.drop_without_shutdown();
5077 _result
5078 }
5079
5080 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5081 self.control_handle
5082 .inner
5083 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5084 result,
5085 self.tx_id,
5086 0x21ce0f19ec043889,
5087 fidl::encoding::DynamicFlags::empty(),
5088 )
5089 }
5090}
5091
5092#[must_use = "FIDL methods require a response to be sent"]
5093#[derive(Debug)]
5094pub struct DirectoryWatchResponder {
5095 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5096 tx_id: u32,
5097}
5098
5099impl std::ops::Drop for DirectoryWatchResponder {
5103 fn drop(&mut self) {
5104 self.control_handle.shutdown();
5105 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5107 }
5108}
5109
5110impl fdomain_client::fidl::Responder for DirectoryWatchResponder {
5111 type ControlHandle = DirectoryControlHandle;
5112
5113 fn control_handle(&self) -> &DirectoryControlHandle {
5114 &self.control_handle
5115 }
5116
5117 fn drop_without_shutdown(mut self) {
5118 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5120 std::mem::forget(self);
5122 }
5123}
5124
5125impl DirectoryWatchResponder {
5126 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5130 let _result = self.send_raw(s);
5131 if _result.is_err() {
5132 self.control_handle.shutdown();
5133 }
5134 self.drop_without_shutdown();
5135 _result
5136 }
5137
5138 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5140 let _result = self.send_raw(s);
5141 self.drop_without_shutdown();
5142 _result
5143 }
5144
5145 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5146 self.control_handle.inner.send::<DirectoryWatchResponse>(
5147 (s,),
5148 self.tx_id,
5149 0x5717193a59d66d91,
5150 fidl::encoding::DynamicFlags::empty(),
5151 )
5152 }
5153}
5154
5155#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5156pub struct DirectoryWatcherMarker;
5157
5158impl fdomain_client::fidl::ProtocolMarker for DirectoryWatcherMarker {
5159 type Proxy = DirectoryWatcherProxy;
5160 type RequestStream = DirectoryWatcherRequestStream;
5161
5162 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
5163}
5164
5165pub trait DirectoryWatcherProxyInterface: Send + Sync {}
5166
5167#[derive(Debug, Clone)]
5168pub struct DirectoryWatcherProxy {
5169 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5170}
5171
5172impl fdomain_client::fidl::Proxy for DirectoryWatcherProxy {
5173 type Protocol = DirectoryWatcherMarker;
5174
5175 fn from_channel(inner: fdomain_client::Channel) -> Self {
5176 Self::new(inner)
5177 }
5178
5179 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5180 self.client.into_channel().map_err(|client| Self { client })
5181 }
5182
5183 fn as_channel(&self) -> &fdomain_client::Channel {
5184 self.client.as_channel()
5185 }
5186}
5187
5188impl DirectoryWatcherProxy {
5189 pub fn new(channel: fdomain_client::Channel) -> Self {
5191 let protocol_name =
5192 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5193 Self { client: fidl::client::Client::new(channel, protocol_name) }
5194 }
5195
5196 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
5202 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
5203 }
5204}
5205
5206impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
5207
5208pub struct DirectoryWatcherEventStream {
5209 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5210}
5211
5212impl std::marker::Unpin for DirectoryWatcherEventStream {}
5213
5214impl futures::stream::FusedStream for DirectoryWatcherEventStream {
5215 fn is_terminated(&self) -> bool {
5216 self.event_receiver.is_terminated()
5217 }
5218}
5219
5220impl futures::Stream for DirectoryWatcherEventStream {
5221 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
5222
5223 fn poll_next(
5224 mut self: std::pin::Pin<&mut Self>,
5225 cx: &mut std::task::Context<'_>,
5226 ) -> std::task::Poll<Option<Self::Item>> {
5227 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5228 &mut self.event_receiver,
5229 cx
5230 )?) {
5231 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
5232 None => std::task::Poll::Ready(None),
5233 }
5234 }
5235}
5236
5237#[derive(Debug)]
5238pub enum DirectoryWatcherEvent {}
5239
5240impl DirectoryWatcherEvent {
5241 fn decode(
5243 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5244 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
5245 let (bytes, _handles) = buf.split_mut();
5246 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5247 debug_assert_eq!(tx_header.tx_id, 0);
5248 match tx_header.ordinal {
5249 _ => Err(fidl::Error::UnknownOrdinal {
5250 ordinal: tx_header.ordinal,
5251 protocol_name:
5252 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5253 }),
5254 }
5255 }
5256}
5257
5258pub struct DirectoryWatcherRequestStream {
5260 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5261 is_terminated: bool,
5262}
5263
5264impl std::marker::Unpin for DirectoryWatcherRequestStream {}
5265
5266impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
5267 fn is_terminated(&self) -> bool {
5268 self.is_terminated
5269 }
5270}
5271
5272impl fdomain_client::fidl::RequestStream for DirectoryWatcherRequestStream {
5273 type Protocol = DirectoryWatcherMarker;
5274 type ControlHandle = DirectoryWatcherControlHandle;
5275
5276 fn from_channel(channel: fdomain_client::Channel) -> Self {
5277 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5278 }
5279
5280 fn control_handle(&self) -> Self::ControlHandle {
5281 DirectoryWatcherControlHandle { inner: self.inner.clone() }
5282 }
5283
5284 fn into_inner(
5285 self,
5286 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5287 {
5288 (self.inner, self.is_terminated)
5289 }
5290
5291 fn from_inner(
5292 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5293 is_terminated: bool,
5294 ) -> Self {
5295 Self { inner, is_terminated }
5296 }
5297}
5298
5299impl futures::Stream for DirectoryWatcherRequestStream {
5300 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
5301
5302 fn poll_next(
5303 mut self: std::pin::Pin<&mut Self>,
5304 cx: &mut std::task::Context<'_>,
5305 ) -> std::task::Poll<Option<Self::Item>> {
5306 let this = &mut *self;
5307 if this.inner.check_shutdown(cx) {
5308 this.is_terminated = true;
5309 return std::task::Poll::Ready(None);
5310 }
5311 if this.is_terminated {
5312 panic!("polled DirectoryWatcherRequestStream after completion");
5313 }
5314 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5315 |bytes, handles| {
5316 match this.inner.channel().read_etc(cx, bytes, handles) {
5317 std::task::Poll::Ready(Ok(())) => {}
5318 std::task::Poll::Pending => return std::task::Poll::Pending,
5319 std::task::Poll::Ready(Err(None)) => {
5320 this.is_terminated = true;
5321 return std::task::Poll::Ready(None);
5322 }
5323 std::task::Poll::Ready(Err(Some(e))) => {
5324 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5325 e.into(),
5326 ))));
5327 }
5328 }
5329
5330 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5332
5333 std::task::Poll::Ready(Some(match header.ordinal {
5334 _ => Err(fidl::Error::UnknownOrdinal {
5335 ordinal: header.ordinal,
5336 protocol_name: <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5337 }),
5338 }))
5339 },
5340 )
5341 }
5342}
5343
5344#[derive(Debug)]
5362pub enum DirectoryWatcherRequest {}
5363
5364impl DirectoryWatcherRequest {
5365 pub fn method_name(&self) -> &'static str {
5367 match *self {}
5368 }
5369}
5370
5371#[derive(Debug, Clone)]
5372pub struct DirectoryWatcherControlHandle {
5373 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5374}
5375
5376impl fdomain_client::fidl::ControlHandle for DirectoryWatcherControlHandle {
5377 fn shutdown(&self) {
5378 self.inner.shutdown()
5379 }
5380
5381 fn is_closed(&self) -> bool {
5382 self.inner.channel().is_closed()
5383 }
5384 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5385 self.inner.channel().on_closed()
5386 }
5387}
5388
5389impl DirectoryWatcherControlHandle {}
5390
5391#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5392pub struct ExtendedAttributeIteratorMarker;
5393
5394impl fdomain_client::fidl::ProtocolMarker for ExtendedAttributeIteratorMarker {
5395 type Proxy = ExtendedAttributeIteratorProxy;
5396 type RequestStream = ExtendedAttributeIteratorRequestStream;
5397
5398 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
5399}
5400pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
5401
5402pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
5403 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
5404 + Send;
5405 fn r#get_next(&self) -> Self::GetNextResponseFut;
5406}
5407
5408#[derive(Debug, Clone)]
5409pub struct ExtendedAttributeIteratorProxy {
5410 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5411}
5412
5413impl fdomain_client::fidl::Proxy for ExtendedAttributeIteratorProxy {
5414 type Protocol = ExtendedAttributeIteratorMarker;
5415
5416 fn from_channel(inner: fdomain_client::Channel) -> Self {
5417 Self::new(inner)
5418 }
5419
5420 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5421 self.client.into_channel().map_err(|client| Self { client })
5422 }
5423
5424 fn as_channel(&self) -> &fdomain_client::Channel {
5425 self.client.as_channel()
5426 }
5427}
5428
5429impl ExtendedAttributeIteratorProxy {
5430 pub fn new(channel: fdomain_client::Channel) -> Self {
5432 let protocol_name =
5433 <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5434 Self { client: fidl::client::Client::new(channel, protocol_name) }
5435 }
5436
5437 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
5443 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5444 }
5445
5446 pub fn r#get_next(
5450 &self,
5451 ) -> fidl::client::QueryResponseFut<
5452 ExtendedAttributeIteratorGetNextResult,
5453 fdomain_client::fidl::FDomainResourceDialect,
5454 > {
5455 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
5456 }
5457}
5458
5459impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
5460 type GetNextResponseFut = fidl::client::QueryResponseFut<
5461 ExtendedAttributeIteratorGetNextResult,
5462 fdomain_client::fidl::FDomainResourceDialect,
5463 >;
5464 fn r#get_next(&self) -> Self::GetNextResponseFut {
5465 fn _decode(
5466 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5467 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
5468 let _response = fidl::client::decode_transaction_body::<
5469 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
5470 fdomain_client::fidl::FDomainResourceDialect,
5471 0x3ba664a1c2e45a7,
5472 >(_buf?)?;
5473 Ok(_response.map(|x| (x.attributes, x.last)))
5474 }
5475 self.client.send_query_and_decode::<
5476 fidl::encoding::EmptyPayload,
5477 ExtendedAttributeIteratorGetNextResult,
5478 >(
5479 (),
5480 0x3ba664a1c2e45a7,
5481 fidl::encoding::DynamicFlags::empty(),
5482 _decode,
5483 )
5484 }
5485}
5486
5487pub struct ExtendedAttributeIteratorEventStream {
5488 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5489}
5490
5491impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
5492
5493impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
5494 fn is_terminated(&self) -> bool {
5495 self.event_receiver.is_terminated()
5496 }
5497}
5498
5499impl futures::Stream for ExtendedAttributeIteratorEventStream {
5500 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
5501
5502 fn poll_next(
5503 mut self: std::pin::Pin<&mut Self>,
5504 cx: &mut std::task::Context<'_>,
5505 ) -> std::task::Poll<Option<Self::Item>> {
5506 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5507 &mut self.event_receiver,
5508 cx
5509 )?) {
5510 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
5511 None => std::task::Poll::Ready(None),
5512 }
5513 }
5514}
5515
5516#[derive(Debug)]
5517pub enum ExtendedAttributeIteratorEvent {}
5518
5519impl ExtendedAttributeIteratorEvent {
5520 fn decode(
5522 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5523 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
5524 let (bytes, _handles) = buf.split_mut();
5525 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5526 debug_assert_eq!(tx_header.tx_id, 0);
5527 match tx_header.ordinal {
5528 _ => Err(fidl::Error::UnknownOrdinal {
5529 ordinal: tx_header.ordinal,
5530 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5531 })
5532 }
5533 }
5534}
5535
5536pub struct ExtendedAttributeIteratorRequestStream {
5538 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5539 is_terminated: bool,
5540}
5541
5542impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
5543
5544impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
5545 fn is_terminated(&self) -> bool {
5546 self.is_terminated
5547 }
5548}
5549
5550impl fdomain_client::fidl::RequestStream for ExtendedAttributeIteratorRequestStream {
5551 type Protocol = ExtendedAttributeIteratorMarker;
5552 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5553
5554 fn from_channel(channel: fdomain_client::Channel) -> Self {
5555 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5556 }
5557
5558 fn control_handle(&self) -> Self::ControlHandle {
5559 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
5560 }
5561
5562 fn into_inner(
5563 self,
5564 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5565 {
5566 (self.inner, self.is_terminated)
5567 }
5568
5569 fn from_inner(
5570 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5571 is_terminated: bool,
5572 ) -> Self {
5573 Self { inner, is_terminated }
5574 }
5575}
5576
5577impl futures::Stream for ExtendedAttributeIteratorRequestStream {
5578 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
5579
5580 fn poll_next(
5581 mut self: std::pin::Pin<&mut Self>,
5582 cx: &mut std::task::Context<'_>,
5583 ) -> std::task::Poll<Option<Self::Item>> {
5584 let this = &mut *self;
5585 if this.inner.check_shutdown(cx) {
5586 this.is_terminated = true;
5587 return std::task::Poll::Ready(None);
5588 }
5589 if this.is_terminated {
5590 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
5591 }
5592 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5593 |bytes, handles| {
5594 match this.inner.channel().read_etc(cx, bytes, handles) {
5595 std::task::Poll::Ready(Ok(())) => {}
5596 std::task::Poll::Pending => return std::task::Poll::Pending,
5597 std::task::Poll::Ready(Err(None)) => {
5598 this.is_terminated = true;
5599 return std::task::Poll::Ready(None);
5600 }
5601 std::task::Poll::Ready(Err(Some(e))) => {
5602 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5603 e.into(),
5604 ))));
5605 }
5606 }
5607
5608 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5610
5611 std::task::Poll::Ready(Some(match header.ordinal {
5612 0x3ba664a1c2e45a7 => {
5613 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5614 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
5615 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5616 let control_handle = ExtendedAttributeIteratorControlHandle {
5617 inner: this.inner.clone(),
5618 };
5619 Ok(ExtendedAttributeIteratorRequest::GetNext {
5620 responder: ExtendedAttributeIteratorGetNextResponder {
5621 control_handle: std::mem::ManuallyDrop::new(control_handle),
5622 tx_id: header.tx_id,
5623 },
5624 })
5625 }
5626 _ => Err(fidl::Error::UnknownOrdinal {
5627 ordinal: header.ordinal,
5628 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5629 }),
5630 }))
5631 },
5632 )
5633 }
5634}
5635
5636#[derive(Debug)]
5637pub enum ExtendedAttributeIteratorRequest {
5638 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
5642}
5643
5644impl ExtendedAttributeIteratorRequest {
5645 #[allow(irrefutable_let_patterns)]
5646 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
5647 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
5648 Some((responder))
5649 } else {
5650 None
5651 }
5652 }
5653
5654 pub fn method_name(&self) -> &'static str {
5656 match *self {
5657 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
5658 }
5659 }
5660}
5661
5662#[derive(Debug, Clone)]
5663pub struct ExtendedAttributeIteratorControlHandle {
5664 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5665}
5666
5667impl fdomain_client::fidl::ControlHandle for ExtendedAttributeIteratorControlHandle {
5668 fn shutdown(&self) {
5669 self.inner.shutdown()
5670 }
5671
5672 fn is_closed(&self) -> bool {
5673 self.inner.channel().is_closed()
5674 }
5675 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5676 self.inner.channel().on_closed()
5677 }
5678}
5679
5680impl ExtendedAttributeIteratorControlHandle {}
5681
5682#[must_use = "FIDL methods require a response to be sent"]
5683#[derive(Debug)]
5684pub struct ExtendedAttributeIteratorGetNextResponder {
5685 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
5686 tx_id: u32,
5687}
5688
5689impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
5693 fn drop(&mut self) {
5694 self.control_handle.shutdown();
5695 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5697 }
5698}
5699
5700impl fdomain_client::fidl::Responder for ExtendedAttributeIteratorGetNextResponder {
5701 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5702
5703 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
5704 &self.control_handle
5705 }
5706
5707 fn drop_without_shutdown(mut self) {
5708 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5710 std::mem::forget(self);
5712 }
5713}
5714
5715impl ExtendedAttributeIteratorGetNextResponder {
5716 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5720 let _result = self.send_raw(result);
5721 if _result.is_err() {
5722 self.control_handle.shutdown();
5723 }
5724 self.drop_without_shutdown();
5725 _result
5726 }
5727
5728 pub fn send_no_shutdown_on_err(
5730 self,
5731 mut result: Result<(&[Vec<u8>], bool), i32>,
5732 ) -> Result<(), fidl::Error> {
5733 let _result = self.send_raw(result);
5734 self.drop_without_shutdown();
5735 _result
5736 }
5737
5738 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5739 self.control_handle.inner.send::<fidl::encoding::ResultType<
5740 ExtendedAttributeIteratorGetNextResponse,
5741 i32,
5742 >>(
5743 result,
5744 self.tx_id,
5745 0x3ba664a1c2e45a7,
5746 fidl::encoding::DynamicFlags::empty(),
5747 )
5748 }
5749}
5750
5751#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5752pub struct FileMarker;
5753
5754impl fdomain_client::fidl::ProtocolMarker for FileMarker {
5755 type Proxy = FileProxy;
5756 type RequestStream = FileRequestStream;
5757
5758 const DEBUG_NAME: &'static str = "fuchsia.io.File";
5759}
5760impl fdomain_client::fidl::DiscoverableProtocolMarker for FileMarker {}
5761pub type FileSeekResult = Result<u64, i32>;
5762pub type FileReadAtResult = Result<Vec<u8>, i32>;
5763pub type FileWriteAtResult = Result<u64, i32>;
5764pub type FileResizeResult = Result<(), i32>;
5765pub type FileGetBackingMemoryResult = Result<fdomain_client::Vmo, i32>;
5766pub type FileAllocateResult = Result<(), i32>;
5767pub type FileEnableVerityResult = Result<(), i32>;
5768
5769pub trait FileProxyInterface: Send + Sync {
5770 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
5771 + Send;
5772 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
5773 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
5774 + Send;
5775 fn r#link_into(
5776 &self,
5777 dst_parent_token: fdomain_client::Event,
5778 dst: &str,
5779 ) -> Self::LinkIntoResponseFut;
5780 fn r#clone(
5781 &self,
5782 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5783 ) -> Result<(), fidl::Error>;
5784 type CloseResponseFut: std::future::Future<
5785 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
5786 > + Send;
5787 fn r#close(&self) -> Self::CloseResponseFut;
5788 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
5789 fn r#query(&self) -> Self::QueryResponseFut;
5790 fn r#deprecated_clone(
5791 &self,
5792 flags: OpenFlags,
5793 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
5794 ) -> Result<(), fidl::Error>;
5795 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
5796 + Send;
5797 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
5798 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
5799 fn r#deprecated_set_attr(
5800 &self,
5801 flags: NodeAttributeFlags,
5802 attributes: &NodeAttributes,
5803 ) -> Self::DeprecatedSetAttrResponseFut;
5804 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
5805 + Send;
5806 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
5807 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
5808 + Send;
5809 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
5810 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
5811 + Send;
5812 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
5813 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
5814 + Send;
5815 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
5816 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
5817 + Send;
5818 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
5819 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
5820 + Send;
5821 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
5822 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
5823 + Send;
5824 fn r#update_attributes(
5825 &self,
5826 payload: &MutableNodeAttributes,
5827 ) -> Self::UpdateAttributesResponseFut;
5828 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
5829 fn r#sync(&self) -> Self::SyncResponseFut;
5830 fn r#list_extended_attributes(
5831 &self,
5832 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
5833 ) -> Result<(), fidl::Error>;
5834 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
5835 + Send;
5836 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
5837 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
5838 + Send;
5839 fn r#set_extended_attribute(
5840 &self,
5841 name: &[u8],
5842 value: ExtendedAttributeValue,
5843 mode: SetExtendedAttributeMode,
5844 ) -> Self::SetExtendedAttributeResponseFut;
5845 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
5846 + Send;
5847 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
5848 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
5849 + Send;
5850 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
5851 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
5852 + Send;
5853 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
5854 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
5855 fn r#describe(&self) -> Self::DescribeResponseFut;
5856 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
5857 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
5858 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
5859 + Send;
5860 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
5861 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
5862 + Send;
5863 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
5864 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
5865 + Send;
5866 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
5867 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
5868 + Send;
5869 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
5870 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
5871 + Send;
5872 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
5873 -> Self::AllocateResponseFut;
5874 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
5875 + Send;
5876 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
5877}
5878
5879#[derive(Debug, Clone)]
5880pub struct FileProxy {
5881 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5882}
5883
5884impl fdomain_client::fidl::Proxy for FileProxy {
5885 type Protocol = FileMarker;
5886
5887 fn from_channel(inner: fdomain_client::Channel) -> Self {
5888 Self::new(inner)
5889 }
5890
5891 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5892 self.client.into_channel().map_err(|client| Self { client })
5893 }
5894
5895 fn as_channel(&self) -> &fdomain_client::Channel {
5896 self.client.as_channel()
5897 }
5898}
5899
5900impl FileProxy {
5901 pub fn new(channel: fdomain_client::Channel) -> Self {
5903 let protocol_name = <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5904 Self { client: fidl::client::Client::new(channel, protocol_name) }
5905 }
5906
5907 pub fn take_event_stream(&self) -> FileEventStream {
5913 FileEventStream { event_receiver: self.client.take_event_receiver() }
5914 }
5915
5916 pub fn r#advisory_lock(
5940 &self,
5941 mut request: &AdvisoryLockRequest,
5942 ) -> fidl::client::QueryResponseFut<
5943 AdvisoryLockingAdvisoryLockResult,
5944 fdomain_client::fidl::FDomainResourceDialect,
5945 > {
5946 FileProxyInterface::r#advisory_lock(self, request)
5947 }
5948
5949 pub fn r#link_into(
5972 &self,
5973 mut dst_parent_token: fdomain_client::Event,
5974 mut dst: &str,
5975 ) -> fidl::client::QueryResponseFut<
5976 LinkableLinkIntoResult,
5977 fdomain_client::fidl::FDomainResourceDialect,
5978 > {
5979 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
5980 }
5981
5982 pub fn r#clone(
5983 &self,
5984 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5985 ) -> Result<(), fidl::Error> {
5986 FileProxyInterface::r#clone(self, request)
5987 }
5988
5989 pub fn r#close(
6000 &self,
6001 ) -> fidl::client::QueryResponseFut<
6002 fdomain_fuchsia_unknown::CloseableCloseResult,
6003 fdomain_client::fidl::FDomainResourceDialect,
6004 > {
6005 FileProxyInterface::r#close(self)
6006 }
6007
6008 pub fn r#query(
6009 &self,
6010 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
6011 FileProxyInterface::r#query(self)
6012 }
6013
6014 pub fn r#deprecated_clone(
6016 &self,
6017 mut flags: OpenFlags,
6018 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6019 ) -> Result<(), fidl::Error> {
6020 FileProxyInterface::r#deprecated_clone(self, flags, object)
6021 }
6022
6023 pub fn r#deprecated_get_attr(
6025 &self,
6026 ) -> fidl::client::QueryResponseFut<
6027 (i32, NodeAttributes),
6028 fdomain_client::fidl::FDomainResourceDialect,
6029 > {
6030 FileProxyInterface::r#deprecated_get_attr(self)
6031 }
6032
6033 pub fn r#deprecated_set_attr(
6035 &self,
6036 mut flags: NodeAttributeFlags,
6037 mut attributes: &NodeAttributes,
6038 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6039 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
6040 }
6041
6042 pub fn r#deprecated_get_flags(
6044 &self,
6045 ) -> fidl::client::QueryResponseFut<
6046 (i32, OpenFlags),
6047 fdomain_client::fidl::FDomainResourceDialect,
6048 > {
6049 FileProxyInterface::r#deprecated_get_flags(self)
6050 }
6051
6052 pub fn r#deprecated_set_flags(
6054 &self,
6055 mut flags: OpenFlags,
6056 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6057 FileProxyInterface::r#deprecated_set_flags(self, flags)
6058 }
6059
6060 pub fn r#get_flags(
6069 &self,
6070 ) -> fidl::client::QueryResponseFut<
6071 NodeGetFlagsResult,
6072 fdomain_client::fidl::FDomainResourceDialect,
6073 > {
6074 FileProxyInterface::r#get_flags(self)
6075 }
6076
6077 pub fn r#set_flags(
6087 &self,
6088 mut flags: Flags,
6089 ) -> fidl::client::QueryResponseFut<
6090 NodeSetFlagsResult,
6091 fdomain_client::fidl::FDomainResourceDialect,
6092 > {
6093 FileProxyInterface::r#set_flags(self, flags)
6094 }
6095
6096 pub fn r#query_filesystem(
6098 &self,
6099 ) -> fidl::client::QueryResponseFut<
6100 (i32, Option<Box<FilesystemInfo>>),
6101 fdomain_client::fidl::FDomainResourceDialect,
6102 > {
6103 FileProxyInterface::r#query_filesystem(self)
6104 }
6105
6106 pub fn r#get_attributes(
6120 &self,
6121 mut query: NodeAttributesQuery,
6122 ) -> fidl::client::QueryResponseFut<
6123 NodeGetAttributesResult,
6124 fdomain_client::fidl::FDomainResourceDialect,
6125 > {
6126 FileProxyInterface::r#get_attributes(self, query)
6127 }
6128
6129 pub fn r#update_attributes(
6138 &self,
6139 mut payload: &MutableNodeAttributes,
6140 ) -> fidl::client::QueryResponseFut<
6141 NodeUpdateAttributesResult,
6142 fdomain_client::fidl::FDomainResourceDialect,
6143 > {
6144 FileProxyInterface::r#update_attributes(self, payload)
6145 }
6146
6147 pub fn r#sync(
6157 &self,
6158 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
6159 {
6160 FileProxyInterface::r#sync(self)
6161 }
6162
6163 pub fn r#list_extended_attributes(
6172 &self,
6173 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6174 ) -> Result<(), fidl::Error> {
6175 FileProxyInterface::r#list_extended_attributes(self, iterator)
6176 }
6177
6178 pub fn r#get_extended_attribute(
6185 &self,
6186 mut name: &[u8],
6187 ) -> fidl::client::QueryResponseFut<
6188 NodeGetExtendedAttributeResult,
6189 fdomain_client::fidl::FDomainResourceDialect,
6190 > {
6191 FileProxyInterface::r#get_extended_attribute(self, name)
6192 }
6193
6194 pub fn r#set_extended_attribute(
6202 &self,
6203 mut name: &[u8],
6204 mut value: ExtendedAttributeValue,
6205 mut mode: SetExtendedAttributeMode,
6206 ) -> fidl::client::QueryResponseFut<
6207 NodeSetExtendedAttributeResult,
6208 fdomain_client::fidl::FDomainResourceDialect,
6209 > {
6210 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
6211 }
6212
6213 pub fn r#remove_extended_attribute(
6219 &self,
6220 mut name: &[u8],
6221 ) -> fidl::client::QueryResponseFut<
6222 NodeRemoveExtendedAttributeResult,
6223 fdomain_client::fidl::FDomainResourceDialect,
6224 > {
6225 FileProxyInterface::r#remove_extended_attribute(self, name)
6226 }
6227
6228 pub fn r#read(
6247 &self,
6248 mut count: u64,
6249 ) -> fidl::client::QueryResponseFut<
6250 ReadableReadResult,
6251 fdomain_client::fidl::FDomainResourceDialect,
6252 > {
6253 FileProxyInterface::r#read(self, count)
6254 }
6255
6256 pub fn r#write(
6280 &self,
6281 mut data: &[u8],
6282 ) -> fidl::client::QueryResponseFut<
6283 WritableWriteResult,
6284 fdomain_client::fidl::FDomainResourceDialect,
6285 > {
6286 FileProxyInterface::r#write(self, data)
6287 }
6288
6289 pub fn r#describe(
6290 &self,
6291 ) -> fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
6292 {
6293 FileProxyInterface::r#describe(self)
6294 }
6295
6296 pub fn r#seek(
6306 &self,
6307 mut origin: SeekOrigin,
6308 mut offset: i64,
6309 ) -> fidl::client::QueryResponseFut<FileSeekResult, fdomain_client::fidl::FDomainResourceDialect>
6310 {
6311 FileProxyInterface::r#seek(self, origin, offset)
6312 }
6313
6314 pub fn r#read_at(
6332 &self,
6333 mut count: u64,
6334 mut offset: u64,
6335 ) -> fidl::client::QueryResponseFut<
6336 FileReadAtResult,
6337 fdomain_client::fidl::FDomainResourceDialect,
6338 > {
6339 FileProxyInterface::r#read_at(self, count, offset)
6340 }
6341
6342 pub fn r#write_at(
6364 &self,
6365 mut data: &[u8],
6366 mut offset: u64,
6367 ) -> fidl::client::QueryResponseFut<
6368 FileWriteAtResult,
6369 fdomain_client::fidl::FDomainResourceDialect,
6370 > {
6371 FileProxyInterface::r#write_at(self, data, offset)
6372 }
6373
6374 pub fn r#resize(
6383 &self,
6384 mut length: u64,
6385 ) -> fidl::client::QueryResponseFut<
6386 FileResizeResult,
6387 fdomain_client::fidl::FDomainResourceDialect,
6388 > {
6389 FileProxyInterface::r#resize(self, length)
6390 }
6391
6392 pub fn r#get_backing_memory(
6413 &self,
6414 mut flags: VmoFlags,
6415 ) -> fidl::client::QueryResponseFut<
6416 FileGetBackingMemoryResult,
6417 fdomain_client::fidl::FDomainResourceDialect,
6418 > {
6419 FileProxyInterface::r#get_backing_memory(self, flags)
6420 }
6421
6422 pub fn r#allocate(
6424 &self,
6425 mut offset: u64,
6426 mut length: u64,
6427 mut mode: AllocateMode,
6428 ) -> fidl::client::QueryResponseFut<
6429 FileAllocateResult,
6430 fdomain_client::fidl::FDomainResourceDialect,
6431 > {
6432 FileProxyInterface::r#allocate(self, offset, length, mode)
6433 }
6434
6435 pub fn r#enable_verity(
6447 &self,
6448 mut options: &VerificationOptions,
6449 ) -> fidl::client::QueryResponseFut<
6450 FileEnableVerityResult,
6451 fdomain_client::fidl::FDomainResourceDialect,
6452 > {
6453 FileProxyInterface::r#enable_verity(self, options)
6454 }
6455}
6456
6457impl FileProxyInterface for FileProxy {
6458 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
6459 AdvisoryLockingAdvisoryLockResult,
6460 fdomain_client::fidl::FDomainResourceDialect,
6461 >;
6462 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
6463 fn _decode(
6464 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6465 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6466 let _response = fidl::client::decode_transaction_body::<
6467 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6468 fdomain_client::fidl::FDomainResourceDialect,
6469 0x6ee9c0ad53ec87aa,
6470 >(_buf?)?;
6471 Ok(_response.map(|x| x))
6472 }
6473 self.client.send_query_and_decode::<
6474 AdvisoryLockingAdvisoryLockRequest,
6475 AdvisoryLockingAdvisoryLockResult,
6476 >(
6477 (request,),
6478 0x6ee9c0ad53ec87aa,
6479 fidl::encoding::DynamicFlags::empty(),
6480 _decode,
6481 )
6482 }
6483
6484 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
6485 LinkableLinkIntoResult,
6486 fdomain_client::fidl::FDomainResourceDialect,
6487 >;
6488 fn r#link_into(
6489 &self,
6490 mut dst_parent_token: fdomain_client::Event,
6491 mut dst: &str,
6492 ) -> Self::LinkIntoResponseFut {
6493 fn _decode(
6494 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6495 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
6496 let _response = fidl::client::decode_transaction_body::<
6497 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6498 fdomain_client::fidl::FDomainResourceDialect,
6499 0x54f3949246a03e74,
6500 >(_buf?)?;
6501 Ok(_response.map(|x| x))
6502 }
6503 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
6504 (dst_parent_token, dst),
6505 0x54f3949246a03e74,
6506 fidl::encoding::DynamicFlags::empty(),
6507 _decode,
6508 )
6509 }
6510
6511 fn r#clone(
6512 &self,
6513 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6514 ) -> Result<(), fidl::Error> {
6515 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
6516 (request,),
6517 0x20d8a7aba2168a79,
6518 fidl::encoding::DynamicFlags::empty(),
6519 )
6520 }
6521
6522 type CloseResponseFut = fidl::client::QueryResponseFut<
6523 fdomain_fuchsia_unknown::CloseableCloseResult,
6524 fdomain_client::fidl::FDomainResourceDialect,
6525 >;
6526 fn r#close(&self) -> Self::CloseResponseFut {
6527 fn _decode(
6528 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6529 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
6530 let _response = fidl::client::decode_transaction_body::<
6531 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6532 fdomain_client::fidl::FDomainResourceDialect,
6533 0x5ac5d459ad7f657e,
6534 >(_buf?)?;
6535 Ok(_response.map(|x| x))
6536 }
6537 self.client.send_query_and_decode::<
6538 fidl::encoding::EmptyPayload,
6539 fdomain_fuchsia_unknown::CloseableCloseResult,
6540 >(
6541 (),
6542 0x5ac5d459ad7f657e,
6543 fidl::encoding::DynamicFlags::empty(),
6544 _decode,
6545 )
6546 }
6547
6548 type QueryResponseFut =
6549 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
6550 fn r#query(&self) -> Self::QueryResponseFut {
6551 fn _decode(
6552 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6553 ) -> Result<Vec<u8>, fidl::Error> {
6554 let _response = fidl::client::decode_transaction_body::<
6555 fdomain_fuchsia_unknown::QueryableQueryResponse,
6556 fdomain_client::fidl::FDomainResourceDialect,
6557 0x2658edee9decfc06,
6558 >(_buf?)?;
6559 Ok(_response.protocol)
6560 }
6561 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
6562 (),
6563 0x2658edee9decfc06,
6564 fidl::encoding::DynamicFlags::empty(),
6565 _decode,
6566 )
6567 }
6568
6569 fn r#deprecated_clone(
6570 &self,
6571 mut flags: OpenFlags,
6572 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6573 ) -> Result<(), fidl::Error> {
6574 self.client.send::<NodeDeprecatedCloneRequest>(
6575 (flags, object),
6576 0x5a61678f293ce16f,
6577 fidl::encoding::DynamicFlags::FLEXIBLE,
6578 )
6579 }
6580
6581 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
6582 (i32, NodeAttributes),
6583 fdomain_client::fidl::FDomainResourceDialect,
6584 >;
6585 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
6586 fn _decode(
6587 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6588 ) -> Result<(i32, NodeAttributes), fidl::Error> {
6589 let _response = fidl::client::decode_transaction_body::<
6590 NodeDeprecatedGetAttrResponse,
6591 fdomain_client::fidl::FDomainResourceDialect,
6592 0x78985e216314dafd,
6593 >(_buf?)?;
6594 Ok((_response.s, _response.attributes))
6595 }
6596 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
6597 (),
6598 0x78985e216314dafd,
6599 fidl::encoding::DynamicFlags::empty(),
6600 _decode,
6601 )
6602 }
6603
6604 type DeprecatedSetAttrResponseFut =
6605 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6606 fn r#deprecated_set_attr(
6607 &self,
6608 mut flags: NodeAttributeFlags,
6609 mut attributes: &NodeAttributes,
6610 ) -> Self::DeprecatedSetAttrResponseFut {
6611 fn _decode(
6612 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6613 ) -> Result<i32, fidl::Error> {
6614 let _response = fidl::client::decode_transaction_body::<
6615 NodeDeprecatedSetAttrResponse,
6616 fdomain_client::fidl::FDomainResourceDialect,
6617 0x4186c0f40d938f46,
6618 >(_buf?)?;
6619 Ok(_response.s)
6620 }
6621 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
6622 (flags, attributes),
6623 0x4186c0f40d938f46,
6624 fidl::encoding::DynamicFlags::empty(),
6625 _decode,
6626 )
6627 }
6628
6629 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
6630 (i32, OpenFlags),
6631 fdomain_client::fidl::FDomainResourceDialect,
6632 >;
6633 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
6634 fn _decode(
6635 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6636 ) -> Result<(i32, OpenFlags), fidl::Error> {
6637 let _response = fidl::client::decode_transaction_body::<
6638 NodeDeprecatedGetFlagsResponse,
6639 fdomain_client::fidl::FDomainResourceDialect,
6640 0x5b88fffb8eda3aa1,
6641 >(_buf?)?;
6642 Ok((_response.s, _response.flags))
6643 }
6644 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
6645 (),
6646 0x5b88fffb8eda3aa1,
6647 fidl::encoding::DynamicFlags::empty(),
6648 _decode,
6649 )
6650 }
6651
6652 type DeprecatedSetFlagsResponseFut =
6653 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6654 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
6655 fn _decode(
6656 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6657 ) -> Result<i32, fidl::Error> {
6658 let _response = fidl::client::decode_transaction_body::<
6659 NodeDeprecatedSetFlagsResponse,
6660 fdomain_client::fidl::FDomainResourceDialect,
6661 0x5295b76c71fde733,
6662 >(_buf?)?;
6663 Ok(_response.s)
6664 }
6665 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
6666 (flags,),
6667 0x5295b76c71fde733,
6668 fidl::encoding::DynamicFlags::empty(),
6669 _decode,
6670 )
6671 }
6672
6673 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
6674 NodeGetFlagsResult,
6675 fdomain_client::fidl::FDomainResourceDialect,
6676 >;
6677 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
6678 fn _decode(
6679 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6680 ) -> Result<NodeGetFlagsResult, fidl::Error> {
6681 let _response = fidl::client::decode_transaction_body::<
6682 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
6683 fdomain_client::fidl::FDomainResourceDialect,
6684 0x176eb318f64ec23,
6685 >(_buf?)?
6686 .into_result_fdomain::<FileMarker>("get_flags")?;
6687 Ok(_response.map(|x| x.flags))
6688 }
6689 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
6690 (),
6691 0x176eb318f64ec23,
6692 fidl::encoding::DynamicFlags::FLEXIBLE,
6693 _decode,
6694 )
6695 }
6696
6697 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
6698 NodeSetFlagsResult,
6699 fdomain_client::fidl::FDomainResourceDialect,
6700 >;
6701 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
6702 fn _decode(
6703 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6704 ) -> Result<NodeSetFlagsResult, fidl::Error> {
6705 let _response = fidl::client::decode_transaction_body::<
6706 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
6707 fdomain_client::fidl::FDomainResourceDialect,
6708 0x55a8028685791ea8,
6709 >(_buf?)?
6710 .into_result_fdomain::<FileMarker>("set_flags")?;
6711 Ok(_response.map(|x| x))
6712 }
6713 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
6714 (flags,),
6715 0x55a8028685791ea8,
6716 fidl::encoding::DynamicFlags::FLEXIBLE,
6717 _decode,
6718 )
6719 }
6720
6721 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
6722 (i32, Option<Box<FilesystemInfo>>),
6723 fdomain_client::fidl::FDomainResourceDialect,
6724 >;
6725 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
6726 fn _decode(
6727 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6728 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
6729 let _response = fidl::client::decode_transaction_body::<
6730 NodeQueryFilesystemResponse,
6731 fdomain_client::fidl::FDomainResourceDialect,
6732 0x6f344a1c6b0a0610,
6733 >(_buf?)?;
6734 Ok((_response.s, _response.info))
6735 }
6736 self.client.send_query_and_decode::<
6737 fidl::encoding::EmptyPayload,
6738 (i32, Option<Box<FilesystemInfo>>),
6739 >(
6740 (),
6741 0x6f344a1c6b0a0610,
6742 fidl::encoding::DynamicFlags::empty(),
6743 _decode,
6744 )
6745 }
6746
6747 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
6748 NodeGetAttributesResult,
6749 fdomain_client::fidl::FDomainResourceDialect,
6750 >;
6751 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
6752 fn _decode(
6753 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6754 ) -> Result<NodeGetAttributesResult, fidl::Error> {
6755 let _response = fidl::client::decode_transaction_body::<
6756 fidl::encoding::ResultType<NodeAttributes2, i32>,
6757 fdomain_client::fidl::FDomainResourceDialect,
6758 0x3d4396a638ea053b,
6759 >(_buf?)?;
6760 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
6761 }
6762 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
6763 (query,),
6764 0x3d4396a638ea053b,
6765 fidl::encoding::DynamicFlags::empty(),
6766 _decode,
6767 )
6768 }
6769
6770 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
6771 NodeUpdateAttributesResult,
6772 fdomain_client::fidl::FDomainResourceDialect,
6773 >;
6774 fn r#update_attributes(
6775 &self,
6776 mut payload: &MutableNodeAttributes,
6777 ) -> Self::UpdateAttributesResponseFut {
6778 fn _decode(
6779 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6780 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
6781 let _response = fidl::client::decode_transaction_body::<
6782 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6783 fdomain_client::fidl::FDomainResourceDialect,
6784 0x3308c1da5a89bf08,
6785 >(_buf?)?;
6786 Ok(_response.map(|x| x))
6787 }
6788 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
6789 payload,
6790 0x3308c1da5a89bf08,
6791 fidl::encoding::DynamicFlags::empty(),
6792 _decode,
6793 )
6794 }
6795
6796 type SyncResponseFut = fidl::client::QueryResponseFut<
6797 NodeSyncResult,
6798 fdomain_client::fidl::FDomainResourceDialect,
6799 >;
6800 fn r#sync(&self) -> Self::SyncResponseFut {
6801 fn _decode(
6802 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6803 ) -> Result<NodeSyncResult, fidl::Error> {
6804 let _response = fidl::client::decode_transaction_body::<
6805 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6806 fdomain_client::fidl::FDomainResourceDialect,
6807 0x2c5c27ca0ab5dc49,
6808 >(_buf?)?;
6809 Ok(_response.map(|x| x))
6810 }
6811 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
6812 (),
6813 0x2c5c27ca0ab5dc49,
6814 fidl::encoding::DynamicFlags::empty(),
6815 _decode,
6816 )
6817 }
6818
6819 fn r#list_extended_attributes(
6820 &self,
6821 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6822 ) -> Result<(), fidl::Error> {
6823 self.client.send::<NodeListExtendedAttributesRequest>(
6824 (iterator,),
6825 0x4b61033de007fcd0,
6826 fidl::encoding::DynamicFlags::empty(),
6827 )
6828 }
6829
6830 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6831 NodeGetExtendedAttributeResult,
6832 fdomain_client::fidl::FDomainResourceDialect,
6833 >;
6834 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
6835 fn _decode(
6836 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6837 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
6838 let _response = fidl::client::decode_transaction_body::<
6839 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
6840 fdomain_client::fidl::FDomainResourceDialect,
6841 0x45ffa3ccfdeb76db,
6842 >(_buf?)?;
6843 Ok(_response.map(|x| x))
6844 }
6845 self.client.send_query_and_decode::<
6846 NodeGetExtendedAttributeRequest,
6847 NodeGetExtendedAttributeResult,
6848 >(
6849 (name,),
6850 0x45ffa3ccfdeb76db,
6851 fidl::encoding::DynamicFlags::empty(),
6852 _decode,
6853 )
6854 }
6855
6856 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6857 NodeSetExtendedAttributeResult,
6858 fdomain_client::fidl::FDomainResourceDialect,
6859 >;
6860 fn r#set_extended_attribute(
6861 &self,
6862 mut name: &[u8],
6863 mut value: ExtendedAttributeValue,
6864 mut mode: SetExtendedAttributeMode,
6865 ) -> Self::SetExtendedAttributeResponseFut {
6866 fn _decode(
6867 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6868 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
6869 let _response = fidl::client::decode_transaction_body::<
6870 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6871 fdomain_client::fidl::FDomainResourceDialect,
6872 0x4a951362f681f23c,
6873 >(_buf?)?;
6874 Ok(_response.map(|x| x))
6875 }
6876 self.client.send_query_and_decode::<
6877 NodeSetExtendedAttributeRequest,
6878 NodeSetExtendedAttributeResult,
6879 >(
6880 (name, &mut value, mode,),
6881 0x4a951362f681f23c,
6882 fidl::encoding::DynamicFlags::empty(),
6883 _decode,
6884 )
6885 }
6886
6887 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6888 NodeRemoveExtendedAttributeResult,
6889 fdomain_client::fidl::FDomainResourceDialect,
6890 >;
6891 fn r#remove_extended_attribute(
6892 &self,
6893 mut name: &[u8],
6894 ) -> Self::RemoveExtendedAttributeResponseFut {
6895 fn _decode(
6896 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6897 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
6898 let _response = fidl::client::decode_transaction_body::<
6899 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6900 fdomain_client::fidl::FDomainResourceDialect,
6901 0x7a0b9f3a9bf9032d,
6902 >(_buf?)?;
6903 Ok(_response.map(|x| x))
6904 }
6905 self.client.send_query_and_decode::<
6906 NodeRemoveExtendedAttributeRequest,
6907 NodeRemoveExtendedAttributeResult,
6908 >(
6909 (name,),
6910 0x7a0b9f3a9bf9032d,
6911 fidl::encoding::DynamicFlags::empty(),
6912 _decode,
6913 )
6914 }
6915
6916 type ReadResponseFut = fidl::client::QueryResponseFut<
6917 ReadableReadResult,
6918 fdomain_client::fidl::FDomainResourceDialect,
6919 >;
6920 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
6921 fn _decode(
6922 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6923 ) -> Result<ReadableReadResult, fidl::Error> {
6924 let _response = fidl::client::decode_transaction_body::<
6925 fidl::encoding::ResultType<ReadableReadResponse, i32>,
6926 fdomain_client::fidl::FDomainResourceDialect,
6927 0x57e419a298c8ede,
6928 >(_buf?)?;
6929 Ok(_response.map(|x| x.data))
6930 }
6931 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
6932 (count,),
6933 0x57e419a298c8ede,
6934 fidl::encoding::DynamicFlags::empty(),
6935 _decode,
6936 )
6937 }
6938
6939 type WriteResponseFut = fidl::client::QueryResponseFut<
6940 WritableWriteResult,
6941 fdomain_client::fidl::FDomainResourceDialect,
6942 >;
6943 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
6944 fn _decode(
6945 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6946 ) -> Result<WritableWriteResult, fidl::Error> {
6947 let _response = fidl::client::decode_transaction_body::<
6948 fidl::encoding::ResultType<WritableWriteResponse, i32>,
6949 fdomain_client::fidl::FDomainResourceDialect,
6950 0x6a31437832469f82,
6951 >(_buf?)?;
6952 Ok(_response.map(|x| x.actual_count))
6953 }
6954 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
6955 (data,),
6956 0x6a31437832469f82,
6957 fidl::encoding::DynamicFlags::empty(),
6958 _decode,
6959 )
6960 }
6961
6962 type DescribeResponseFut =
6963 fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>;
6964 fn r#describe(&self) -> Self::DescribeResponseFut {
6965 fn _decode(
6966 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6967 ) -> Result<FileInfo, fidl::Error> {
6968 let _response = fidl::client::decode_transaction_body::<
6969 FileInfo,
6970 fdomain_client::fidl::FDomainResourceDialect,
6971 0x68b5ac00c62906bc,
6972 >(_buf?)?;
6973 Ok(_response)
6974 }
6975 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
6976 (),
6977 0x68b5ac00c62906bc,
6978 fidl::encoding::DynamicFlags::empty(),
6979 _decode,
6980 )
6981 }
6982
6983 type SeekResponseFut = fidl::client::QueryResponseFut<
6984 FileSeekResult,
6985 fdomain_client::fidl::FDomainResourceDialect,
6986 >;
6987 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
6988 fn _decode(
6989 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6990 ) -> Result<FileSeekResult, fidl::Error> {
6991 let _response = fidl::client::decode_transaction_body::<
6992 fidl::encoding::ResultType<FileSeekResponse, i32>,
6993 fdomain_client::fidl::FDomainResourceDialect,
6994 0x78079168162c5207,
6995 >(_buf?)?;
6996 Ok(_response.map(|x| x.offset_from_start))
6997 }
6998 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
6999 (origin, offset),
7000 0x78079168162c5207,
7001 fidl::encoding::DynamicFlags::empty(),
7002 _decode,
7003 )
7004 }
7005
7006 type ReadAtResponseFut = fidl::client::QueryResponseFut<
7007 FileReadAtResult,
7008 fdomain_client::fidl::FDomainResourceDialect,
7009 >;
7010 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
7011 fn _decode(
7012 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7013 ) -> Result<FileReadAtResult, fidl::Error> {
7014 let _response = fidl::client::decode_transaction_body::<
7015 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7016 fdomain_client::fidl::FDomainResourceDialect,
7017 0x1607a293a60d723e,
7018 >(_buf?)?;
7019 Ok(_response.map(|x| x.data))
7020 }
7021 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
7022 (count, offset),
7023 0x1607a293a60d723e,
7024 fidl::encoding::DynamicFlags::empty(),
7025 _decode,
7026 )
7027 }
7028
7029 type WriteAtResponseFut = fidl::client::QueryResponseFut<
7030 FileWriteAtResult,
7031 fdomain_client::fidl::FDomainResourceDialect,
7032 >;
7033 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
7034 fn _decode(
7035 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7036 ) -> Result<FileWriteAtResult, fidl::Error> {
7037 let _response = fidl::client::decode_transaction_body::<
7038 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7039 fdomain_client::fidl::FDomainResourceDialect,
7040 0x793eefc0045e792b,
7041 >(_buf?)?;
7042 Ok(_response.map(|x| x.actual_count))
7043 }
7044 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
7045 (data, offset),
7046 0x793eefc0045e792b,
7047 fidl::encoding::DynamicFlags::empty(),
7048 _decode,
7049 )
7050 }
7051
7052 type ResizeResponseFut = fidl::client::QueryResponseFut<
7053 FileResizeResult,
7054 fdomain_client::fidl::FDomainResourceDialect,
7055 >;
7056 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
7057 fn _decode(
7058 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7059 ) -> Result<FileResizeResult, fidl::Error> {
7060 let _response = fidl::client::decode_transaction_body::<
7061 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7062 fdomain_client::fidl::FDomainResourceDialect,
7063 0x2b80825f0535743a,
7064 >(_buf?)?;
7065 Ok(_response.map(|x| x))
7066 }
7067 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
7068 (length,),
7069 0x2b80825f0535743a,
7070 fidl::encoding::DynamicFlags::empty(),
7071 _decode,
7072 )
7073 }
7074
7075 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
7076 FileGetBackingMemoryResult,
7077 fdomain_client::fidl::FDomainResourceDialect,
7078 >;
7079 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
7080 fn _decode(
7081 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7082 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7083 let _response = fidl::client::decode_transaction_body::<
7084 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7085 fdomain_client::fidl::FDomainResourceDialect,
7086 0xa6a9e654cbf62b,
7087 >(_buf?)?;
7088 Ok(_response.map(|x| x.vmo))
7089 }
7090 self.client
7091 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
7092 (flags,),
7093 0xa6a9e654cbf62b,
7094 fidl::encoding::DynamicFlags::empty(),
7095 _decode,
7096 )
7097 }
7098
7099 type AllocateResponseFut = fidl::client::QueryResponseFut<
7100 FileAllocateResult,
7101 fdomain_client::fidl::FDomainResourceDialect,
7102 >;
7103 fn r#allocate(
7104 &self,
7105 mut offset: u64,
7106 mut length: u64,
7107 mut mode: AllocateMode,
7108 ) -> Self::AllocateResponseFut {
7109 fn _decode(
7110 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7111 ) -> Result<FileAllocateResult, fidl::Error> {
7112 let _response = fidl::client::decode_transaction_body::<
7113 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7114 fdomain_client::fidl::FDomainResourceDialect,
7115 0x77fa0c330b57fd2e,
7116 >(_buf?)?
7117 .into_result_fdomain::<FileMarker>("allocate")?;
7118 Ok(_response.map(|x| x))
7119 }
7120 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
7121 (offset, length, mode),
7122 0x77fa0c330b57fd2e,
7123 fidl::encoding::DynamicFlags::FLEXIBLE,
7124 _decode,
7125 )
7126 }
7127
7128 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
7129 FileEnableVerityResult,
7130 fdomain_client::fidl::FDomainResourceDialect,
7131 >;
7132 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
7133 fn _decode(
7134 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7135 ) -> Result<FileEnableVerityResult, fidl::Error> {
7136 let _response = fidl::client::decode_transaction_body::<
7137 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7138 fdomain_client::fidl::FDomainResourceDialect,
7139 0x2c421ec3faaeb8bb,
7140 >(_buf?)?
7141 .into_result_fdomain::<FileMarker>("enable_verity")?;
7142 Ok(_response.map(|x| x))
7143 }
7144 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
7145 (options,),
7146 0x2c421ec3faaeb8bb,
7147 fidl::encoding::DynamicFlags::FLEXIBLE,
7148 _decode,
7149 )
7150 }
7151}
7152
7153pub struct FileEventStream {
7154 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7155}
7156
7157impl std::marker::Unpin for FileEventStream {}
7158
7159impl futures::stream::FusedStream for FileEventStream {
7160 fn is_terminated(&self) -> bool {
7161 self.event_receiver.is_terminated()
7162 }
7163}
7164
7165impl futures::Stream for FileEventStream {
7166 type Item = Result<FileEvent, fidl::Error>;
7167
7168 fn poll_next(
7169 mut self: std::pin::Pin<&mut Self>,
7170 cx: &mut std::task::Context<'_>,
7171 ) -> std::task::Poll<Option<Self::Item>> {
7172 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7173 &mut self.event_receiver,
7174 cx
7175 )?) {
7176 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
7177 None => std::task::Poll::Ready(None),
7178 }
7179 }
7180}
7181
7182#[derive(Debug)]
7183pub enum FileEvent {
7184 OnOpen_ {
7185 s: i32,
7186 info: Option<Box<NodeInfoDeprecated>>,
7187 },
7188 OnRepresentation {
7189 payload: Representation,
7190 },
7191 #[non_exhaustive]
7192 _UnknownEvent {
7193 ordinal: u64,
7195 },
7196}
7197
7198impl FileEvent {
7199 #[allow(irrefutable_let_patterns)]
7200 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
7201 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
7202 }
7203 #[allow(irrefutable_let_patterns)]
7204 pub fn into_on_representation(self) -> Option<Representation> {
7205 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
7206 }
7207
7208 fn decode(
7210 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7211 ) -> Result<FileEvent, fidl::Error> {
7212 let (bytes, _handles) = buf.split_mut();
7213 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7214 debug_assert_eq!(tx_header.tx_id, 0);
7215 match tx_header.ordinal {
7216 0x7fc7bbb1dbfd1972 => {
7217 let mut out = fidl::new_empty!(
7218 NodeOnOpenRequest,
7219 fdomain_client::fidl::FDomainResourceDialect
7220 );
7221 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
7222 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
7223 }
7224 0x5cb40567d80a510c => {
7225 let mut out =
7226 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
7227 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
7228 Ok((FileEvent::OnRepresentation { payload: out }))
7229 }
7230 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7231 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7232 }
7233 _ => Err(fidl::Error::UnknownOrdinal {
7234 ordinal: tx_header.ordinal,
7235 protocol_name: <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7236 }),
7237 }
7238 }
7239}
7240
7241pub struct FileRequestStream {
7243 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7244 is_terminated: bool,
7245}
7246
7247impl std::marker::Unpin for FileRequestStream {}
7248
7249impl futures::stream::FusedStream for FileRequestStream {
7250 fn is_terminated(&self) -> bool {
7251 self.is_terminated
7252 }
7253}
7254
7255impl fdomain_client::fidl::RequestStream for FileRequestStream {
7256 type Protocol = FileMarker;
7257 type ControlHandle = FileControlHandle;
7258
7259 fn from_channel(channel: fdomain_client::Channel) -> Self {
7260 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7261 }
7262
7263 fn control_handle(&self) -> Self::ControlHandle {
7264 FileControlHandle { inner: self.inner.clone() }
7265 }
7266
7267 fn into_inner(
7268 self,
7269 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7270 {
7271 (self.inner, self.is_terminated)
7272 }
7273
7274 fn from_inner(
7275 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7276 is_terminated: bool,
7277 ) -> Self {
7278 Self { inner, is_terminated }
7279 }
7280}
7281
7282impl futures::Stream for FileRequestStream {
7283 type Item = Result<FileRequest, fidl::Error>;
7284
7285 fn poll_next(
7286 mut self: std::pin::Pin<&mut Self>,
7287 cx: &mut std::task::Context<'_>,
7288 ) -> std::task::Poll<Option<Self::Item>> {
7289 let this = &mut *self;
7290 if this.inner.check_shutdown(cx) {
7291 this.is_terminated = true;
7292 return std::task::Poll::Ready(None);
7293 }
7294 if this.is_terminated {
7295 panic!("polled FileRequestStream after completion");
7296 }
7297 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7298 |bytes, handles| {
7299 match this.inner.channel().read_etc(cx, bytes, handles) {
7300 std::task::Poll::Ready(Ok(())) => {}
7301 std::task::Poll::Pending => return std::task::Poll::Pending,
7302 std::task::Poll::Ready(Err(None)) => {
7303 this.is_terminated = true;
7304 return std::task::Poll::Ready(None);
7305 }
7306 std::task::Poll::Ready(Err(Some(e))) => {
7307 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7308 e.into(),
7309 ))));
7310 }
7311 }
7312
7313 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7315
7316 std::task::Poll::Ready(Some(match header.ordinal {
7317 0x6ee9c0ad53ec87aa => {
7318 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7319 let mut req = fidl::new_empty!(
7320 AdvisoryLockingAdvisoryLockRequest,
7321 fdomain_client::fidl::FDomainResourceDialect
7322 );
7323 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
7324 let control_handle = FileControlHandle { inner: this.inner.clone() };
7325 Ok(FileRequest::AdvisoryLock {
7326 request: req.request,
7327
7328 responder: FileAdvisoryLockResponder {
7329 control_handle: std::mem::ManuallyDrop::new(control_handle),
7330 tx_id: header.tx_id,
7331 },
7332 })
7333 }
7334 0x54f3949246a03e74 => {
7335 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7336 let mut req = fidl::new_empty!(
7337 LinkableLinkIntoRequest,
7338 fdomain_client::fidl::FDomainResourceDialect
7339 );
7340 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
7341 let control_handle = FileControlHandle { inner: this.inner.clone() };
7342 Ok(FileRequest::LinkInto {
7343 dst_parent_token: req.dst_parent_token,
7344 dst: req.dst,
7345
7346 responder: FileLinkIntoResponder {
7347 control_handle: std::mem::ManuallyDrop::new(control_handle),
7348 tx_id: header.tx_id,
7349 },
7350 })
7351 }
7352 0x20d8a7aba2168a79 => {
7353 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7354 let mut req = fidl::new_empty!(
7355 fdomain_fuchsia_unknown::CloneableCloneRequest,
7356 fdomain_client::fidl::FDomainResourceDialect
7357 );
7358 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7359 let control_handle = FileControlHandle { inner: this.inner.clone() };
7360 Ok(FileRequest::Clone { request: req.request, control_handle })
7361 }
7362 0x5ac5d459ad7f657e => {
7363 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7364 let mut req = fidl::new_empty!(
7365 fidl::encoding::EmptyPayload,
7366 fdomain_client::fidl::FDomainResourceDialect
7367 );
7368 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7369 let control_handle = FileControlHandle { inner: this.inner.clone() };
7370 Ok(FileRequest::Close {
7371 responder: FileCloseResponder {
7372 control_handle: std::mem::ManuallyDrop::new(control_handle),
7373 tx_id: header.tx_id,
7374 },
7375 })
7376 }
7377 0x2658edee9decfc06 => {
7378 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7379 let mut req = fidl::new_empty!(
7380 fidl::encoding::EmptyPayload,
7381 fdomain_client::fidl::FDomainResourceDialect
7382 );
7383 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7384 let control_handle = FileControlHandle { inner: this.inner.clone() };
7385 Ok(FileRequest::Query {
7386 responder: FileQueryResponder {
7387 control_handle: std::mem::ManuallyDrop::new(control_handle),
7388 tx_id: header.tx_id,
7389 },
7390 })
7391 }
7392 0x5a61678f293ce16f => {
7393 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7394 let mut req = fidl::new_empty!(
7395 NodeDeprecatedCloneRequest,
7396 fdomain_client::fidl::FDomainResourceDialect
7397 );
7398 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7399 let control_handle = FileControlHandle { inner: this.inner.clone() };
7400 Ok(FileRequest::DeprecatedClone {
7401 flags: req.flags,
7402 object: req.object,
7403
7404 control_handle,
7405 })
7406 }
7407 0x78985e216314dafd => {
7408 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7409 let mut req = fidl::new_empty!(
7410 fidl::encoding::EmptyPayload,
7411 fdomain_client::fidl::FDomainResourceDialect
7412 );
7413 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7414 let control_handle = FileControlHandle { inner: this.inner.clone() };
7415 Ok(FileRequest::DeprecatedGetAttr {
7416 responder: FileDeprecatedGetAttrResponder {
7417 control_handle: std::mem::ManuallyDrop::new(control_handle),
7418 tx_id: header.tx_id,
7419 },
7420 })
7421 }
7422 0x4186c0f40d938f46 => {
7423 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7424 let mut req = fidl::new_empty!(
7425 NodeDeprecatedSetAttrRequest,
7426 fdomain_client::fidl::FDomainResourceDialect
7427 );
7428 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
7429 let control_handle = FileControlHandle { inner: this.inner.clone() };
7430 Ok(FileRequest::DeprecatedSetAttr {
7431 flags: req.flags,
7432 attributes: req.attributes,
7433
7434 responder: FileDeprecatedSetAttrResponder {
7435 control_handle: std::mem::ManuallyDrop::new(control_handle),
7436 tx_id: header.tx_id,
7437 },
7438 })
7439 }
7440 0x5b88fffb8eda3aa1 => {
7441 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7442 let mut req = fidl::new_empty!(
7443 fidl::encoding::EmptyPayload,
7444 fdomain_client::fidl::FDomainResourceDialect
7445 );
7446 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7447 let control_handle = FileControlHandle { inner: this.inner.clone() };
7448 Ok(FileRequest::DeprecatedGetFlags {
7449 responder: FileDeprecatedGetFlagsResponder {
7450 control_handle: std::mem::ManuallyDrop::new(control_handle),
7451 tx_id: header.tx_id,
7452 },
7453 })
7454 }
7455 0x5295b76c71fde733 => {
7456 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7457 let mut req = fidl::new_empty!(
7458 NodeDeprecatedSetFlagsRequest,
7459 fdomain_client::fidl::FDomainResourceDialect
7460 );
7461 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7462 let control_handle = FileControlHandle { inner: this.inner.clone() };
7463 Ok(FileRequest::DeprecatedSetFlags {
7464 flags: req.flags,
7465
7466 responder: FileDeprecatedSetFlagsResponder {
7467 control_handle: std::mem::ManuallyDrop::new(control_handle),
7468 tx_id: header.tx_id,
7469 },
7470 })
7471 }
7472 0x176eb318f64ec23 => {
7473 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7474 let mut req = fidl::new_empty!(
7475 fidl::encoding::EmptyPayload,
7476 fdomain_client::fidl::FDomainResourceDialect
7477 );
7478 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7479 let control_handle = FileControlHandle { inner: this.inner.clone() };
7480 Ok(FileRequest::GetFlags {
7481 responder: FileGetFlagsResponder {
7482 control_handle: std::mem::ManuallyDrop::new(control_handle),
7483 tx_id: header.tx_id,
7484 },
7485 })
7486 }
7487 0x55a8028685791ea8 => {
7488 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7489 let mut req = fidl::new_empty!(
7490 NodeSetFlagsRequest,
7491 fdomain_client::fidl::FDomainResourceDialect
7492 );
7493 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7494 let control_handle = FileControlHandle { inner: this.inner.clone() };
7495 Ok(FileRequest::SetFlags {
7496 flags: req.flags,
7497
7498 responder: FileSetFlagsResponder {
7499 control_handle: std::mem::ManuallyDrop::new(control_handle),
7500 tx_id: header.tx_id,
7501 },
7502 })
7503 }
7504 0x6f344a1c6b0a0610 => {
7505 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7506 let mut req = fidl::new_empty!(
7507 fidl::encoding::EmptyPayload,
7508 fdomain_client::fidl::FDomainResourceDialect
7509 );
7510 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7511 let control_handle = FileControlHandle { inner: this.inner.clone() };
7512 Ok(FileRequest::QueryFilesystem {
7513 responder: FileQueryFilesystemResponder {
7514 control_handle: std::mem::ManuallyDrop::new(control_handle),
7515 tx_id: header.tx_id,
7516 },
7517 })
7518 }
7519 0x3d4396a638ea053b => {
7520 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7521 let mut req = fidl::new_empty!(
7522 NodeGetAttributesRequest,
7523 fdomain_client::fidl::FDomainResourceDialect
7524 );
7525 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7526 let control_handle = FileControlHandle { inner: this.inner.clone() };
7527 Ok(FileRequest::GetAttributes {
7528 query: req.query,
7529
7530 responder: FileGetAttributesResponder {
7531 control_handle: std::mem::ManuallyDrop::new(control_handle),
7532 tx_id: header.tx_id,
7533 },
7534 })
7535 }
7536 0x3308c1da5a89bf08 => {
7537 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7538 let mut req = fidl::new_empty!(
7539 MutableNodeAttributes,
7540 fdomain_client::fidl::FDomainResourceDialect
7541 );
7542 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
7543 let control_handle = FileControlHandle { inner: this.inner.clone() };
7544 Ok(FileRequest::UpdateAttributes {
7545 payload: req,
7546 responder: FileUpdateAttributesResponder {
7547 control_handle: std::mem::ManuallyDrop::new(control_handle),
7548 tx_id: header.tx_id,
7549 },
7550 })
7551 }
7552 0x2c5c27ca0ab5dc49 => {
7553 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7554 let mut req = fidl::new_empty!(
7555 fidl::encoding::EmptyPayload,
7556 fdomain_client::fidl::FDomainResourceDialect
7557 );
7558 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7559 let control_handle = FileControlHandle { inner: this.inner.clone() };
7560 Ok(FileRequest::Sync {
7561 responder: FileSyncResponder {
7562 control_handle: std::mem::ManuallyDrop::new(control_handle),
7563 tx_id: header.tx_id,
7564 },
7565 })
7566 }
7567 0x4b61033de007fcd0 => {
7568 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7569 let mut req = fidl::new_empty!(
7570 NodeListExtendedAttributesRequest,
7571 fdomain_client::fidl::FDomainResourceDialect
7572 );
7573 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7574 let control_handle = FileControlHandle { inner: this.inner.clone() };
7575 Ok(FileRequest::ListExtendedAttributes {
7576 iterator: req.iterator,
7577
7578 control_handle,
7579 })
7580 }
7581 0x45ffa3ccfdeb76db => {
7582 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7583 let mut req = fidl::new_empty!(
7584 NodeGetExtendedAttributeRequest,
7585 fdomain_client::fidl::FDomainResourceDialect
7586 );
7587 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7588 let control_handle = FileControlHandle { inner: this.inner.clone() };
7589 Ok(FileRequest::GetExtendedAttribute {
7590 name: req.name,
7591
7592 responder: FileGetExtendedAttributeResponder {
7593 control_handle: std::mem::ManuallyDrop::new(control_handle),
7594 tx_id: header.tx_id,
7595 },
7596 })
7597 }
7598 0x4a951362f681f23c => {
7599 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7600 let mut req = fidl::new_empty!(
7601 NodeSetExtendedAttributeRequest,
7602 fdomain_client::fidl::FDomainResourceDialect
7603 );
7604 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7605 let control_handle = FileControlHandle { inner: this.inner.clone() };
7606 Ok(FileRequest::SetExtendedAttribute {
7607 name: req.name,
7608 value: req.value,
7609 mode: req.mode,
7610
7611 responder: FileSetExtendedAttributeResponder {
7612 control_handle: std::mem::ManuallyDrop::new(control_handle),
7613 tx_id: header.tx_id,
7614 },
7615 })
7616 }
7617 0x7a0b9f3a9bf9032d => {
7618 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7619 let mut req = fidl::new_empty!(
7620 NodeRemoveExtendedAttributeRequest,
7621 fdomain_client::fidl::FDomainResourceDialect
7622 );
7623 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7624 let control_handle = FileControlHandle { inner: this.inner.clone() };
7625 Ok(FileRequest::RemoveExtendedAttribute {
7626 name: req.name,
7627
7628 responder: FileRemoveExtendedAttributeResponder {
7629 control_handle: std::mem::ManuallyDrop::new(control_handle),
7630 tx_id: header.tx_id,
7631 },
7632 })
7633 }
7634 0x57e419a298c8ede => {
7635 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7636 let mut req = fidl::new_empty!(
7637 ReadableReadRequest,
7638 fdomain_client::fidl::FDomainResourceDialect
7639 );
7640 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
7641 let control_handle = FileControlHandle { inner: this.inner.clone() };
7642 Ok(FileRequest::Read {
7643 count: req.count,
7644
7645 responder: FileReadResponder {
7646 control_handle: std::mem::ManuallyDrop::new(control_handle),
7647 tx_id: header.tx_id,
7648 },
7649 })
7650 }
7651 0x6a31437832469f82 => {
7652 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7653 let mut req = fidl::new_empty!(
7654 WritableWriteRequest,
7655 fdomain_client::fidl::FDomainResourceDialect
7656 );
7657 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7658 let control_handle = FileControlHandle { inner: this.inner.clone() };
7659 Ok(FileRequest::Write {
7660 data: req.data,
7661
7662 responder: FileWriteResponder {
7663 control_handle: std::mem::ManuallyDrop::new(control_handle),
7664 tx_id: header.tx_id,
7665 },
7666 })
7667 }
7668 0x68b5ac00c62906bc => {
7669 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7670 let mut req = fidl::new_empty!(
7671 fidl::encoding::EmptyPayload,
7672 fdomain_client::fidl::FDomainResourceDialect
7673 );
7674 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7675 let control_handle = FileControlHandle { inner: this.inner.clone() };
7676 Ok(FileRequest::Describe {
7677 responder: FileDescribeResponder {
7678 control_handle: std::mem::ManuallyDrop::new(control_handle),
7679 tx_id: header.tx_id,
7680 },
7681 })
7682 }
7683 0x78079168162c5207 => {
7684 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7685 let mut req = fidl::new_empty!(
7686 FileSeekRequest,
7687 fdomain_client::fidl::FDomainResourceDialect
7688 );
7689 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
7690 let control_handle = FileControlHandle { inner: this.inner.clone() };
7691 Ok(FileRequest::Seek {
7692 origin: req.origin,
7693 offset: req.offset,
7694
7695 responder: FileSeekResponder {
7696 control_handle: std::mem::ManuallyDrop::new(control_handle),
7697 tx_id: header.tx_id,
7698 },
7699 })
7700 }
7701 0x1607a293a60d723e => {
7702 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7703 let mut req = fidl::new_empty!(
7704 FileReadAtRequest,
7705 fdomain_client::fidl::FDomainResourceDialect
7706 );
7707 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
7708 let control_handle = FileControlHandle { inner: this.inner.clone() };
7709 Ok(FileRequest::ReadAt {
7710 count: req.count,
7711 offset: req.offset,
7712
7713 responder: FileReadAtResponder {
7714 control_handle: std::mem::ManuallyDrop::new(control_handle),
7715 tx_id: header.tx_id,
7716 },
7717 })
7718 }
7719 0x793eefc0045e792b => {
7720 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7721 let mut req = fidl::new_empty!(
7722 FileWriteAtRequest,
7723 fdomain_client::fidl::FDomainResourceDialect
7724 );
7725 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
7726 let control_handle = FileControlHandle { inner: this.inner.clone() };
7727 Ok(FileRequest::WriteAt {
7728 data: req.data,
7729 offset: req.offset,
7730
7731 responder: FileWriteAtResponder {
7732 control_handle: std::mem::ManuallyDrop::new(control_handle),
7733 tx_id: header.tx_id,
7734 },
7735 })
7736 }
7737 0x2b80825f0535743a => {
7738 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7739 let mut req = fidl::new_empty!(
7740 FileResizeRequest,
7741 fdomain_client::fidl::FDomainResourceDialect
7742 );
7743 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
7744 let control_handle = FileControlHandle { inner: this.inner.clone() };
7745 Ok(FileRequest::Resize {
7746 length: req.length,
7747
7748 responder: FileResizeResponder {
7749 control_handle: std::mem::ManuallyDrop::new(control_handle),
7750 tx_id: header.tx_id,
7751 },
7752 })
7753 }
7754 0xa6a9e654cbf62b => {
7755 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7756 let mut req = fidl::new_empty!(
7757 FileGetBackingMemoryRequest,
7758 fdomain_client::fidl::FDomainResourceDialect
7759 );
7760 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
7761 let control_handle = FileControlHandle { inner: this.inner.clone() };
7762 Ok(FileRequest::GetBackingMemory {
7763 flags: req.flags,
7764
7765 responder: FileGetBackingMemoryResponder {
7766 control_handle: std::mem::ManuallyDrop::new(control_handle),
7767 tx_id: header.tx_id,
7768 },
7769 })
7770 }
7771 0x77fa0c330b57fd2e => {
7772 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7773 let mut req = fidl::new_empty!(
7774 FileAllocateRequest,
7775 fdomain_client::fidl::FDomainResourceDialect
7776 );
7777 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
7778 let control_handle = FileControlHandle { inner: this.inner.clone() };
7779 Ok(FileRequest::Allocate {
7780 offset: req.offset,
7781 length: req.length,
7782 mode: req.mode,
7783
7784 responder: FileAllocateResponder {
7785 control_handle: std::mem::ManuallyDrop::new(control_handle),
7786 tx_id: header.tx_id,
7787 },
7788 })
7789 }
7790 0x2c421ec3faaeb8bb => {
7791 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7792 let mut req = fidl::new_empty!(
7793 FileEnableVerityRequest,
7794 fdomain_client::fidl::FDomainResourceDialect
7795 );
7796 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
7797 let control_handle = FileControlHandle { inner: this.inner.clone() };
7798 Ok(FileRequest::EnableVerity {
7799 options: req.options,
7800
7801 responder: FileEnableVerityResponder {
7802 control_handle: std::mem::ManuallyDrop::new(control_handle),
7803 tx_id: header.tx_id,
7804 },
7805 })
7806 }
7807 _ if header.tx_id == 0
7808 && header
7809 .dynamic_flags()
7810 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7811 {
7812 Ok(FileRequest::_UnknownMethod {
7813 ordinal: header.ordinal,
7814 control_handle: FileControlHandle { inner: this.inner.clone() },
7815 method_type: fidl::MethodType::OneWay,
7816 })
7817 }
7818 _ if header
7819 .dynamic_flags()
7820 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7821 {
7822 this.inner.send_framework_err(
7823 fidl::encoding::FrameworkErr::UnknownMethod,
7824 header.tx_id,
7825 header.ordinal,
7826 header.dynamic_flags(),
7827 (bytes, handles),
7828 )?;
7829 Ok(FileRequest::_UnknownMethod {
7830 ordinal: header.ordinal,
7831 control_handle: FileControlHandle { inner: this.inner.clone() },
7832 method_type: fidl::MethodType::TwoWay,
7833 })
7834 }
7835 _ => Err(fidl::Error::UnknownOrdinal {
7836 ordinal: header.ordinal,
7837 protocol_name:
7838 <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7839 }),
7840 }))
7841 },
7842 )
7843 }
7844}
7845
7846#[derive(Debug)]
7851pub enum FileRequest {
7852 AdvisoryLock {
7876 request: AdvisoryLockRequest,
7877 responder: FileAdvisoryLockResponder,
7878 },
7879 LinkInto {
7902 dst_parent_token: fdomain_client::Event,
7903 dst: String,
7904 responder: FileLinkIntoResponder,
7905 },
7906 Clone {
7907 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
7908 control_handle: FileControlHandle,
7909 },
7910 Close {
7921 responder: FileCloseResponder,
7922 },
7923 Query {
7924 responder: FileQueryResponder,
7925 },
7926 DeprecatedClone {
7928 flags: OpenFlags,
7929 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
7930 control_handle: FileControlHandle,
7931 },
7932 DeprecatedGetAttr {
7934 responder: FileDeprecatedGetAttrResponder,
7935 },
7936 DeprecatedSetAttr {
7938 flags: NodeAttributeFlags,
7939 attributes: NodeAttributes,
7940 responder: FileDeprecatedSetAttrResponder,
7941 },
7942 DeprecatedGetFlags {
7944 responder: FileDeprecatedGetFlagsResponder,
7945 },
7946 DeprecatedSetFlags {
7948 flags: OpenFlags,
7949 responder: FileDeprecatedSetFlagsResponder,
7950 },
7951 GetFlags {
7960 responder: FileGetFlagsResponder,
7961 },
7962 SetFlags {
7972 flags: Flags,
7973 responder: FileSetFlagsResponder,
7974 },
7975 QueryFilesystem {
7977 responder: FileQueryFilesystemResponder,
7978 },
7979 GetAttributes {
7993 query: NodeAttributesQuery,
7994 responder: FileGetAttributesResponder,
7995 },
7996 UpdateAttributes {
8005 payload: MutableNodeAttributes,
8006 responder: FileUpdateAttributesResponder,
8007 },
8008 Sync {
8018 responder: FileSyncResponder,
8019 },
8020 ListExtendedAttributes {
8029 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
8030 control_handle: FileControlHandle,
8031 },
8032 GetExtendedAttribute {
8039 name: Vec<u8>,
8040 responder: FileGetExtendedAttributeResponder,
8041 },
8042 SetExtendedAttribute {
8050 name: Vec<u8>,
8051 value: ExtendedAttributeValue,
8052 mode: SetExtendedAttributeMode,
8053 responder: FileSetExtendedAttributeResponder,
8054 },
8055 RemoveExtendedAttribute {
8061 name: Vec<u8>,
8062 responder: FileRemoveExtendedAttributeResponder,
8063 },
8064 Read {
8083 count: u64,
8084 responder: FileReadResponder,
8085 },
8086 Write {
8110 data: Vec<u8>,
8111 responder: FileWriteResponder,
8112 },
8113 Describe {
8114 responder: FileDescribeResponder,
8115 },
8116 Seek {
8126 origin: SeekOrigin,
8127 offset: i64,
8128 responder: FileSeekResponder,
8129 },
8130 ReadAt {
8148 count: u64,
8149 offset: u64,
8150 responder: FileReadAtResponder,
8151 },
8152 WriteAt {
8174 data: Vec<u8>,
8175 offset: u64,
8176 responder: FileWriteAtResponder,
8177 },
8178 Resize {
8187 length: u64,
8188 responder: FileResizeResponder,
8189 },
8190 GetBackingMemory {
8211 flags: VmoFlags,
8212 responder: FileGetBackingMemoryResponder,
8213 },
8214 Allocate {
8216 offset: u64,
8217 length: u64,
8218 mode: AllocateMode,
8219 responder: FileAllocateResponder,
8220 },
8221 EnableVerity {
8233 options: VerificationOptions,
8234 responder: FileEnableVerityResponder,
8235 },
8236 #[non_exhaustive]
8238 _UnknownMethod {
8239 ordinal: u64,
8241 control_handle: FileControlHandle,
8242 method_type: fidl::MethodType,
8243 },
8244}
8245
8246impl FileRequest {
8247 #[allow(irrefutable_let_patterns)]
8248 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
8249 if let FileRequest::AdvisoryLock { request, responder } = self {
8250 Some((request, responder))
8251 } else {
8252 None
8253 }
8254 }
8255
8256 #[allow(irrefutable_let_patterns)]
8257 pub fn into_link_into(self) -> Option<(fdomain_client::Event, String, FileLinkIntoResponder)> {
8258 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
8259 Some((dst_parent_token, dst, responder))
8260 } else {
8261 None
8262 }
8263 }
8264
8265 #[allow(irrefutable_let_patterns)]
8266 pub fn into_clone(
8267 self,
8268 ) -> Option<(
8269 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
8270 FileControlHandle,
8271 )> {
8272 if let FileRequest::Clone { request, control_handle } = self {
8273 Some((request, control_handle))
8274 } else {
8275 None
8276 }
8277 }
8278
8279 #[allow(irrefutable_let_patterns)]
8280 pub fn into_close(self) -> Option<(FileCloseResponder)> {
8281 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
8282 }
8283
8284 #[allow(irrefutable_let_patterns)]
8285 pub fn into_query(self) -> Option<(FileQueryResponder)> {
8286 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
8287 }
8288
8289 #[allow(irrefutable_let_patterns)]
8290 pub fn into_deprecated_clone(
8291 self,
8292 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, FileControlHandle)> {
8293 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
8294 Some((flags, object, control_handle))
8295 } else {
8296 None
8297 }
8298 }
8299
8300 #[allow(irrefutable_let_patterns)]
8301 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
8302 if let FileRequest::DeprecatedGetAttr { responder } = self {
8303 Some((responder))
8304 } else {
8305 None
8306 }
8307 }
8308
8309 #[allow(irrefutable_let_patterns)]
8310 pub fn into_deprecated_set_attr(
8311 self,
8312 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
8313 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
8314 Some((flags, attributes, responder))
8315 } else {
8316 None
8317 }
8318 }
8319
8320 #[allow(irrefutable_let_patterns)]
8321 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
8322 if let FileRequest::DeprecatedGetFlags { responder } = self {
8323 Some((responder))
8324 } else {
8325 None
8326 }
8327 }
8328
8329 #[allow(irrefutable_let_patterns)]
8330 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
8331 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
8332 Some((flags, responder))
8333 } else {
8334 None
8335 }
8336 }
8337
8338 #[allow(irrefutable_let_patterns)]
8339 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
8340 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
8341 }
8342
8343 #[allow(irrefutable_let_patterns)]
8344 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
8345 if let FileRequest::SetFlags { flags, responder } = self {
8346 Some((flags, responder))
8347 } else {
8348 None
8349 }
8350 }
8351
8352 #[allow(irrefutable_let_patterns)]
8353 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
8354 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
8355 }
8356
8357 #[allow(irrefutable_let_patterns)]
8358 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
8359 if let FileRequest::GetAttributes { query, responder } = self {
8360 Some((query, responder))
8361 } else {
8362 None
8363 }
8364 }
8365
8366 #[allow(irrefutable_let_patterns)]
8367 pub fn into_update_attributes(
8368 self,
8369 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
8370 if let FileRequest::UpdateAttributes { payload, responder } = self {
8371 Some((payload, responder))
8372 } else {
8373 None
8374 }
8375 }
8376
8377 #[allow(irrefutable_let_patterns)]
8378 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
8379 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
8380 }
8381
8382 #[allow(irrefutable_let_patterns)]
8383 pub fn into_list_extended_attributes(
8384 self,
8385 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
8386 {
8387 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
8388 Some((iterator, control_handle))
8389 } else {
8390 None
8391 }
8392 }
8393
8394 #[allow(irrefutable_let_patterns)]
8395 pub fn into_get_extended_attribute(
8396 self,
8397 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
8398 if let FileRequest::GetExtendedAttribute { name, responder } = self {
8399 Some((name, responder))
8400 } else {
8401 None
8402 }
8403 }
8404
8405 #[allow(irrefutable_let_patterns)]
8406 pub fn into_set_extended_attribute(
8407 self,
8408 ) -> Option<(
8409 Vec<u8>,
8410 ExtendedAttributeValue,
8411 SetExtendedAttributeMode,
8412 FileSetExtendedAttributeResponder,
8413 )> {
8414 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
8415 Some((name, value, mode, responder))
8416 } else {
8417 None
8418 }
8419 }
8420
8421 #[allow(irrefutable_let_patterns)]
8422 pub fn into_remove_extended_attribute(
8423 self,
8424 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
8425 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
8426 Some((name, responder))
8427 } else {
8428 None
8429 }
8430 }
8431
8432 #[allow(irrefutable_let_patterns)]
8433 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
8434 if let FileRequest::Read { count, responder } = self {
8435 Some((count, responder))
8436 } else {
8437 None
8438 }
8439 }
8440
8441 #[allow(irrefutable_let_patterns)]
8442 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
8443 if let FileRequest::Write { data, responder } = self {
8444 Some((data, responder))
8445 } else {
8446 None
8447 }
8448 }
8449
8450 #[allow(irrefutable_let_patterns)]
8451 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
8452 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
8453 }
8454
8455 #[allow(irrefutable_let_patterns)]
8456 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
8457 if let FileRequest::Seek { origin, offset, responder } = self {
8458 Some((origin, offset, responder))
8459 } else {
8460 None
8461 }
8462 }
8463
8464 #[allow(irrefutable_let_patterns)]
8465 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
8466 if let FileRequest::ReadAt { count, offset, responder } = self {
8467 Some((count, offset, responder))
8468 } else {
8469 None
8470 }
8471 }
8472
8473 #[allow(irrefutable_let_patterns)]
8474 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
8475 if let FileRequest::WriteAt { data, offset, responder } = self {
8476 Some((data, offset, responder))
8477 } else {
8478 None
8479 }
8480 }
8481
8482 #[allow(irrefutable_let_patterns)]
8483 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
8484 if let FileRequest::Resize { length, responder } = self {
8485 Some((length, responder))
8486 } else {
8487 None
8488 }
8489 }
8490
8491 #[allow(irrefutable_let_patterns)]
8492 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
8493 if let FileRequest::GetBackingMemory { flags, responder } = self {
8494 Some((flags, responder))
8495 } else {
8496 None
8497 }
8498 }
8499
8500 #[allow(irrefutable_let_patterns)]
8501 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
8502 if let FileRequest::Allocate { offset, length, mode, responder } = self {
8503 Some((offset, length, mode, responder))
8504 } else {
8505 None
8506 }
8507 }
8508
8509 #[allow(irrefutable_let_patterns)]
8510 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
8511 if let FileRequest::EnableVerity { options, responder } = self {
8512 Some((options, responder))
8513 } else {
8514 None
8515 }
8516 }
8517
8518 pub fn method_name(&self) -> &'static str {
8520 match *self {
8521 FileRequest::AdvisoryLock { .. } => "advisory_lock",
8522 FileRequest::LinkInto { .. } => "link_into",
8523 FileRequest::Clone { .. } => "clone",
8524 FileRequest::Close { .. } => "close",
8525 FileRequest::Query { .. } => "query",
8526 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
8527 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
8528 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
8529 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
8530 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
8531 FileRequest::GetFlags { .. } => "get_flags",
8532 FileRequest::SetFlags { .. } => "set_flags",
8533 FileRequest::QueryFilesystem { .. } => "query_filesystem",
8534 FileRequest::GetAttributes { .. } => "get_attributes",
8535 FileRequest::UpdateAttributes { .. } => "update_attributes",
8536 FileRequest::Sync { .. } => "sync",
8537 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
8538 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
8539 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
8540 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
8541 FileRequest::Read { .. } => "read",
8542 FileRequest::Write { .. } => "write",
8543 FileRequest::Describe { .. } => "describe",
8544 FileRequest::Seek { .. } => "seek",
8545 FileRequest::ReadAt { .. } => "read_at",
8546 FileRequest::WriteAt { .. } => "write_at",
8547 FileRequest::Resize { .. } => "resize",
8548 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
8549 FileRequest::Allocate { .. } => "allocate",
8550 FileRequest::EnableVerity { .. } => "enable_verity",
8551 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8552 "unknown one-way method"
8553 }
8554 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8555 "unknown two-way method"
8556 }
8557 }
8558 }
8559}
8560
8561#[derive(Debug, Clone)]
8562pub struct FileControlHandle {
8563 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8564}
8565
8566impl fdomain_client::fidl::ControlHandle for FileControlHandle {
8567 fn shutdown(&self) {
8568 self.inner.shutdown()
8569 }
8570
8571 fn is_closed(&self) -> bool {
8572 self.inner.channel().is_closed()
8573 }
8574 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8575 self.inner.channel().on_closed()
8576 }
8577}
8578
8579impl FileControlHandle {
8580 pub fn send_on_open_(
8581 &self,
8582 mut s: i32,
8583 mut info: Option<NodeInfoDeprecated>,
8584 ) -> Result<(), fidl::Error> {
8585 self.inner.send::<NodeOnOpenRequest>(
8586 (s, info.as_mut()),
8587 0,
8588 0x7fc7bbb1dbfd1972,
8589 fidl::encoding::DynamicFlags::FLEXIBLE,
8590 )
8591 }
8592
8593 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
8594 self.inner.send::<Representation>(
8595 &mut payload,
8596 0,
8597 0x5cb40567d80a510c,
8598 fidl::encoding::DynamicFlags::empty(),
8599 )
8600 }
8601}
8602
8603#[must_use = "FIDL methods require a response to be sent"]
8604#[derive(Debug)]
8605pub struct FileAdvisoryLockResponder {
8606 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8607 tx_id: u32,
8608}
8609
8610impl std::ops::Drop for FileAdvisoryLockResponder {
8614 fn drop(&mut self) {
8615 self.control_handle.shutdown();
8616 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8618 }
8619}
8620
8621impl fdomain_client::fidl::Responder for FileAdvisoryLockResponder {
8622 type ControlHandle = FileControlHandle;
8623
8624 fn control_handle(&self) -> &FileControlHandle {
8625 &self.control_handle
8626 }
8627
8628 fn drop_without_shutdown(mut self) {
8629 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8631 std::mem::forget(self);
8633 }
8634}
8635
8636impl FileAdvisoryLockResponder {
8637 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8641 let _result = self.send_raw(result);
8642 if _result.is_err() {
8643 self.control_handle.shutdown();
8644 }
8645 self.drop_without_shutdown();
8646 _result
8647 }
8648
8649 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8651 let _result = self.send_raw(result);
8652 self.drop_without_shutdown();
8653 _result
8654 }
8655
8656 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8657 self.control_handle
8658 .inner
8659 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8660 result,
8661 self.tx_id,
8662 0x6ee9c0ad53ec87aa,
8663 fidl::encoding::DynamicFlags::empty(),
8664 )
8665 }
8666}
8667
8668#[must_use = "FIDL methods require a response to be sent"]
8669#[derive(Debug)]
8670pub struct FileLinkIntoResponder {
8671 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8672 tx_id: u32,
8673}
8674
8675impl std::ops::Drop for FileLinkIntoResponder {
8679 fn drop(&mut self) {
8680 self.control_handle.shutdown();
8681 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8683 }
8684}
8685
8686impl fdomain_client::fidl::Responder for FileLinkIntoResponder {
8687 type ControlHandle = FileControlHandle;
8688
8689 fn control_handle(&self) -> &FileControlHandle {
8690 &self.control_handle
8691 }
8692
8693 fn drop_without_shutdown(mut self) {
8694 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8696 std::mem::forget(self);
8698 }
8699}
8700
8701impl FileLinkIntoResponder {
8702 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8706 let _result = self.send_raw(result);
8707 if _result.is_err() {
8708 self.control_handle.shutdown();
8709 }
8710 self.drop_without_shutdown();
8711 _result
8712 }
8713
8714 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8716 let _result = self.send_raw(result);
8717 self.drop_without_shutdown();
8718 _result
8719 }
8720
8721 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8722 self.control_handle
8723 .inner
8724 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8725 result,
8726 self.tx_id,
8727 0x54f3949246a03e74,
8728 fidl::encoding::DynamicFlags::empty(),
8729 )
8730 }
8731}
8732
8733#[must_use = "FIDL methods require a response to be sent"]
8734#[derive(Debug)]
8735pub struct FileCloseResponder {
8736 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8737 tx_id: u32,
8738}
8739
8740impl std::ops::Drop for FileCloseResponder {
8744 fn drop(&mut self) {
8745 self.control_handle.shutdown();
8746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8748 }
8749}
8750
8751impl fdomain_client::fidl::Responder for FileCloseResponder {
8752 type ControlHandle = FileControlHandle;
8753
8754 fn control_handle(&self) -> &FileControlHandle {
8755 &self.control_handle
8756 }
8757
8758 fn drop_without_shutdown(mut self) {
8759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8761 std::mem::forget(self);
8763 }
8764}
8765
8766impl FileCloseResponder {
8767 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8771 let _result = self.send_raw(result);
8772 if _result.is_err() {
8773 self.control_handle.shutdown();
8774 }
8775 self.drop_without_shutdown();
8776 _result
8777 }
8778
8779 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8781 let _result = self.send_raw(result);
8782 self.drop_without_shutdown();
8783 _result
8784 }
8785
8786 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8787 self.control_handle
8788 .inner
8789 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8790 result,
8791 self.tx_id,
8792 0x5ac5d459ad7f657e,
8793 fidl::encoding::DynamicFlags::empty(),
8794 )
8795 }
8796}
8797
8798#[must_use = "FIDL methods require a response to be sent"]
8799#[derive(Debug)]
8800pub struct FileQueryResponder {
8801 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8802 tx_id: u32,
8803}
8804
8805impl std::ops::Drop for FileQueryResponder {
8809 fn drop(&mut self) {
8810 self.control_handle.shutdown();
8811 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8813 }
8814}
8815
8816impl fdomain_client::fidl::Responder for FileQueryResponder {
8817 type ControlHandle = FileControlHandle;
8818
8819 fn control_handle(&self) -> &FileControlHandle {
8820 &self.control_handle
8821 }
8822
8823 fn drop_without_shutdown(mut self) {
8824 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8826 std::mem::forget(self);
8828 }
8829}
8830
8831impl FileQueryResponder {
8832 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8836 let _result = self.send_raw(protocol);
8837 if _result.is_err() {
8838 self.control_handle.shutdown();
8839 }
8840 self.drop_without_shutdown();
8841 _result
8842 }
8843
8844 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8846 let _result = self.send_raw(protocol);
8847 self.drop_without_shutdown();
8848 _result
8849 }
8850
8851 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8852 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
8853 (protocol,),
8854 self.tx_id,
8855 0x2658edee9decfc06,
8856 fidl::encoding::DynamicFlags::empty(),
8857 )
8858 }
8859}
8860
8861#[must_use = "FIDL methods require a response to be sent"]
8862#[derive(Debug)]
8863pub struct FileDeprecatedGetAttrResponder {
8864 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8865 tx_id: u32,
8866}
8867
8868impl std::ops::Drop for FileDeprecatedGetAttrResponder {
8872 fn drop(&mut self) {
8873 self.control_handle.shutdown();
8874 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8876 }
8877}
8878
8879impl fdomain_client::fidl::Responder for FileDeprecatedGetAttrResponder {
8880 type ControlHandle = FileControlHandle;
8881
8882 fn control_handle(&self) -> &FileControlHandle {
8883 &self.control_handle
8884 }
8885
8886 fn drop_without_shutdown(mut self) {
8887 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8889 std::mem::forget(self);
8891 }
8892}
8893
8894impl FileDeprecatedGetAttrResponder {
8895 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8899 let _result = self.send_raw(s, attributes);
8900 if _result.is_err() {
8901 self.control_handle.shutdown();
8902 }
8903 self.drop_without_shutdown();
8904 _result
8905 }
8906
8907 pub fn send_no_shutdown_on_err(
8909 self,
8910 mut s: i32,
8911 mut attributes: &NodeAttributes,
8912 ) -> Result<(), fidl::Error> {
8913 let _result = self.send_raw(s, attributes);
8914 self.drop_without_shutdown();
8915 _result
8916 }
8917
8918 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8919 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
8920 (s, attributes),
8921 self.tx_id,
8922 0x78985e216314dafd,
8923 fidl::encoding::DynamicFlags::empty(),
8924 )
8925 }
8926}
8927
8928#[must_use = "FIDL methods require a response to be sent"]
8929#[derive(Debug)]
8930pub struct FileDeprecatedSetAttrResponder {
8931 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8932 tx_id: u32,
8933}
8934
8935impl std::ops::Drop for FileDeprecatedSetAttrResponder {
8939 fn drop(&mut self) {
8940 self.control_handle.shutdown();
8941 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8943 }
8944}
8945
8946impl fdomain_client::fidl::Responder for FileDeprecatedSetAttrResponder {
8947 type ControlHandle = FileControlHandle;
8948
8949 fn control_handle(&self) -> &FileControlHandle {
8950 &self.control_handle
8951 }
8952
8953 fn drop_without_shutdown(mut self) {
8954 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8956 std::mem::forget(self);
8958 }
8959}
8960
8961impl FileDeprecatedSetAttrResponder {
8962 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
8966 let _result = self.send_raw(s);
8967 if _result.is_err() {
8968 self.control_handle.shutdown();
8969 }
8970 self.drop_without_shutdown();
8971 _result
8972 }
8973
8974 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
8976 let _result = self.send_raw(s);
8977 self.drop_without_shutdown();
8978 _result
8979 }
8980
8981 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
8982 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
8983 (s,),
8984 self.tx_id,
8985 0x4186c0f40d938f46,
8986 fidl::encoding::DynamicFlags::empty(),
8987 )
8988 }
8989}
8990
8991#[must_use = "FIDL methods require a response to be sent"]
8992#[derive(Debug)]
8993pub struct FileDeprecatedGetFlagsResponder {
8994 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8995 tx_id: u32,
8996}
8997
8998impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
9002 fn drop(&mut self) {
9003 self.control_handle.shutdown();
9004 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9006 }
9007}
9008
9009impl fdomain_client::fidl::Responder for FileDeprecatedGetFlagsResponder {
9010 type ControlHandle = FileControlHandle;
9011
9012 fn control_handle(&self) -> &FileControlHandle {
9013 &self.control_handle
9014 }
9015
9016 fn drop_without_shutdown(mut self) {
9017 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9019 std::mem::forget(self);
9021 }
9022}
9023
9024impl FileDeprecatedGetFlagsResponder {
9025 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9029 let _result = self.send_raw(s, flags);
9030 if _result.is_err() {
9031 self.control_handle.shutdown();
9032 }
9033 self.drop_without_shutdown();
9034 _result
9035 }
9036
9037 pub fn send_no_shutdown_on_err(
9039 self,
9040 mut s: i32,
9041 mut flags: OpenFlags,
9042 ) -> Result<(), fidl::Error> {
9043 let _result = self.send_raw(s, flags);
9044 self.drop_without_shutdown();
9045 _result
9046 }
9047
9048 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9049 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
9050 (s, flags),
9051 self.tx_id,
9052 0x5b88fffb8eda3aa1,
9053 fidl::encoding::DynamicFlags::empty(),
9054 )
9055 }
9056}
9057
9058#[must_use = "FIDL methods require a response to be sent"]
9059#[derive(Debug)]
9060pub struct FileDeprecatedSetFlagsResponder {
9061 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9062 tx_id: u32,
9063}
9064
9065impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
9069 fn drop(&mut self) {
9070 self.control_handle.shutdown();
9071 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9073 }
9074}
9075
9076impl fdomain_client::fidl::Responder for FileDeprecatedSetFlagsResponder {
9077 type ControlHandle = FileControlHandle;
9078
9079 fn control_handle(&self) -> &FileControlHandle {
9080 &self.control_handle
9081 }
9082
9083 fn drop_without_shutdown(mut self) {
9084 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9086 std::mem::forget(self);
9088 }
9089}
9090
9091impl FileDeprecatedSetFlagsResponder {
9092 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9096 let _result = self.send_raw(s);
9097 if _result.is_err() {
9098 self.control_handle.shutdown();
9099 }
9100 self.drop_without_shutdown();
9101 _result
9102 }
9103
9104 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9106 let _result = self.send_raw(s);
9107 self.drop_without_shutdown();
9108 _result
9109 }
9110
9111 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9112 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
9113 (s,),
9114 self.tx_id,
9115 0x5295b76c71fde733,
9116 fidl::encoding::DynamicFlags::empty(),
9117 )
9118 }
9119}
9120
9121#[must_use = "FIDL methods require a response to be sent"]
9122#[derive(Debug)]
9123pub struct FileGetFlagsResponder {
9124 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9125 tx_id: u32,
9126}
9127
9128impl std::ops::Drop for FileGetFlagsResponder {
9132 fn drop(&mut self) {
9133 self.control_handle.shutdown();
9134 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9136 }
9137}
9138
9139impl fdomain_client::fidl::Responder for FileGetFlagsResponder {
9140 type ControlHandle = FileControlHandle;
9141
9142 fn control_handle(&self) -> &FileControlHandle {
9143 &self.control_handle
9144 }
9145
9146 fn drop_without_shutdown(mut self) {
9147 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9149 std::mem::forget(self);
9151 }
9152}
9153
9154impl FileGetFlagsResponder {
9155 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9159 let _result = self.send_raw(result);
9160 if _result.is_err() {
9161 self.control_handle.shutdown();
9162 }
9163 self.drop_without_shutdown();
9164 _result
9165 }
9166
9167 pub fn send_no_shutdown_on_err(
9169 self,
9170 mut result: Result<Flags, i32>,
9171 ) -> Result<(), fidl::Error> {
9172 let _result = self.send_raw(result);
9173 self.drop_without_shutdown();
9174 _result
9175 }
9176
9177 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9178 self.control_handle
9179 .inner
9180 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
9181 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
9182 self.tx_id,
9183 0x176eb318f64ec23,
9184 fidl::encoding::DynamicFlags::FLEXIBLE,
9185 )
9186 }
9187}
9188
9189#[must_use = "FIDL methods require a response to be sent"]
9190#[derive(Debug)]
9191pub struct FileSetFlagsResponder {
9192 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9193 tx_id: u32,
9194}
9195
9196impl std::ops::Drop for FileSetFlagsResponder {
9200 fn drop(&mut self) {
9201 self.control_handle.shutdown();
9202 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9204 }
9205}
9206
9207impl fdomain_client::fidl::Responder for FileSetFlagsResponder {
9208 type ControlHandle = FileControlHandle;
9209
9210 fn control_handle(&self) -> &FileControlHandle {
9211 &self.control_handle
9212 }
9213
9214 fn drop_without_shutdown(mut self) {
9215 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9217 std::mem::forget(self);
9219 }
9220}
9221
9222impl FileSetFlagsResponder {
9223 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9227 let _result = self.send_raw(result);
9228 if _result.is_err() {
9229 self.control_handle.shutdown();
9230 }
9231 self.drop_without_shutdown();
9232 _result
9233 }
9234
9235 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9237 let _result = self.send_raw(result);
9238 self.drop_without_shutdown();
9239 _result
9240 }
9241
9242 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9243 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9244 fidl::encoding::EmptyStruct,
9245 i32,
9246 >>(
9247 fidl::encoding::FlexibleResult::new(result),
9248 self.tx_id,
9249 0x55a8028685791ea8,
9250 fidl::encoding::DynamicFlags::FLEXIBLE,
9251 )
9252 }
9253}
9254
9255#[must_use = "FIDL methods require a response to be sent"]
9256#[derive(Debug)]
9257pub struct FileQueryFilesystemResponder {
9258 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9259 tx_id: u32,
9260}
9261
9262impl std::ops::Drop for FileQueryFilesystemResponder {
9266 fn drop(&mut self) {
9267 self.control_handle.shutdown();
9268 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9270 }
9271}
9272
9273impl fdomain_client::fidl::Responder for FileQueryFilesystemResponder {
9274 type ControlHandle = FileControlHandle;
9275
9276 fn control_handle(&self) -> &FileControlHandle {
9277 &self.control_handle
9278 }
9279
9280 fn drop_without_shutdown(mut self) {
9281 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9283 std::mem::forget(self);
9285 }
9286}
9287
9288impl FileQueryFilesystemResponder {
9289 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9293 let _result = self.send_raw(s, info);
9294 if _result.is_err() {
9295 self.control_handle.shutdown();
9296 }
9297 self.drop_without_shutdown();
9298 _result
9299 }
9300
9301 pub fn send_no_shutdown_on_err(
9303 self,
9304 mut s: i32,
9305 mut info: Option<&FilesystemInfo>,
9306 ) -> Result<(), fidl::Error> {
9307 let _result = self.send_raw(s, info);
9308 self.drop_without_shutdown();
9309 _result
9310 }
9311
9312 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9313 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
9314 (s, info),
9315 self.tx_id,
9316 0x6f344a1c6b0a0610,
9317 fidl::encoding::DynamicFlags::empty(),
9318 )
9319 }
9320}
9321
9322#[must_use = "FIDL methods require a response to be sent"]
9323#[derive(Debug)]
9324pub struct FileGetAttributesResponder {
9325 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9326 tx_id: u32,
9327}
9328
9329impl std::ops::Drop for FileGetAttributesResponder {
9333 fn drop(&mut self) {
9334 self.control_handle.shutdown();
9335 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9337 }
9338}
9339
9340impl fdomain_client::fidl::Responder for FileGetAttributesResponder {
9341 type ControlHandle = FileControlHandle;
9342
9343 fn control_handle(&self) -> &FileControlHandle {
9344 &self.control_handle
9345 }
9346
9347 fn drop_without_shutdown(mut self) {
9348 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9350 std::mem::forget(self);
9352 }
9353}
9354
9355impl FileGetAttributesResponder {
9356 pub fn send(
9360 self,
9361 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9362 ) -> Result<(), fidl::Error> {
9363 let _result = self.send_raw(result);
9364 if _result.is_err() {
9365 self.control_handle.shutdown();
9366 }
9367 self.drop_without_shutdown();
9368 _result
9369 }
9370
9371 pub fn send_no_shutdown_on_err(
9373 self,
9374 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9375 ) -> Result<(), fidl::Error> {
9376 let _result = self.send_raw(result);
9377 self.drop_without_shutdown();
9378 _result
9379 }
9380
9381 fn send_raw(
9382 &self,
9383 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9384 ) -> Result<(), fidl::Error> {
9385 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
9386 result,
9387 self.tx_id,
9388 0x3d4396a638ea053b,
9389 fidl::encoding::DynamicFlags::empty(),
9390 )
9391 }
9392}
9393
9394#[must_use = "FIDL methods require a response to be sent"]
9395#[derive(Debug)]
9396pub struct FileUpdateAttributesResponder {
9397 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9398 tx_id: u32,
9399}
9400
9401impl std::ops::Drop for FileUpdateAttributesResponder {
9405 fn drop(&mut self) {
9406 self.control_handle.shutdown();
9407 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9409 }
9410}
9411
9412impl fdomain_client::fidl::Responder for FileUpdateAttributesResponder {
9413 type ControlHandle = FileControlHandle;
9414
9415 fn control_handle(&self) -> &FileControlHandle {
9416 &self.control_handle
9417 }
9418
9419 fn drop_without_shutdown(mut self) {
9420 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9422 std::mem::forget(self);
9424 }
9425}
9426
9427impl FileUpdateAttributesResponder {
9428 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9432 let _result = self.send_raw(result);
9433 if _result.is_err() {
9434 self.control_handle.shutdown();
9435 }
9436 self.drop_without_shutdown();
9437 _result
9438 }
9439
9440 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9442 let _result = self.send_raw(result);
9443 self.drop_without_shutdown();
9444 _result
9445 }
9446
9447 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9448 self.control_handle
9449 .inner
9450 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9451 result,
9452 self.tx_id,
9453 0x3308c1da5a89bf08,
9454 fidl::encoding::DynamicFlags::empty(),
9455 )
9456 }
9457}
9458
9459#[must_use = "FIDL methods require a response to be sent"]
9460#[derive(Debug)]
9461pub struct FileSyncResponder {
9462 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9463 tx_id: u32,
9464}
9465
9466impl std::ops::Drop for FileSyncResponder {
9470 fn drop(&mut self) {
9471 self.control_handle.shutdown();
9472 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9474 }
9475}
9476
9477impl fdomain_client::fidl::Responder for FileSyncResponder {
9478 type ControlHandle = FileControlHandle;
9479
9480 fn control_handle(&self) -> &FileControlHandle {
9481 &self.control_handle
9482 }
9483
9484 fn drop_without_shutdown(mut self) {
9485 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9487 std::mem::forget(self);
9489 }
9490}
9491
9492impl FileSyncResponder {
9493 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9497 let _result = self.send_raw(result);
9498 if _result.is_err() {
9499 self.control_handle.shutdown();
9500 }
9501 self.drop_without_shutdown();
9502 _result
9503 }
9504
9505 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9507 let _result = self.send_raw(result);
9508 self.drop_without_shutdown();
9509 _result
9510 }
9511
9512 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9513 self.control_handle
9514 .inner
9515 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9516 result,
9517 self.tx_id,
9518 0x2c5c27ca0ab5dc49,
9519 fidl::encoding::DynamicFlags::empty(),
9520 )
9521 }
9522}
9523
9524#[must_use = "FIDL methods require a response to be sent"]
9525#[derive(Debug)]
9526pub struct FileGetExtendedAttributeResponder {
9527 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9528 tx_id: u32,
9529}
9530
9531impl std::ops::Drop for FileGetExtendedAttributeResponder {
9535 fn drop(&mut self) {
9536 self.control_handle.shutdown();
9537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9539 }
9540}
9541
9542impl fdomain_client::fidl::Responder for FileGetExtendedAttributeResponder {
9543 type ControlHandle = FileControlHandle;
9544
9545 fn control_handle(&self) -> &FileControlHandle {
9546 &self.control_handle
9547 }
9548
9549 fn drop_without_shutdown(mut self) {
9550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9552 std::mem::forget(self);
9554 }
9555}
9556
9557impl FileGetExtendedAttributeResponder {
9558 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9562 let _result = self.send_raw(result);
9563 if _result.is_err() {
9564 self.control_handle.shutdown();
9565 }
9566 self.drop_without_shutdown();
9567 _result
9568 }
9569
9570 pub fn send_no_shutdown_on_err(
9572 self,
9573 mut result: Result<ExtendedAttributeValue, i32>,
9574 ) -> Result<(), fidl::Error> {
9575 let _result = self.send_raw(result);
9576 self.drop_without_shutdown();
9577 _result
9578 }
9579
9580 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9581 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
9582 result.as_mut().map_err(|e| *e),
9583 self.tx_id,
9584 0x45ffa3ccfdeb76db,
9585 fidl::encoding::DynamicFlags::empty(),
9586 )
9587 }
9588}
9589
9590#[must_use = "FIDL methods require a response to be sent"]
9591#[derive(Debug)]
9592pub struct FileSetExtendedAttributeResponder {
9593 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9594 tx_id: u32,
9595}
9596
9597impl std::ops::Drop for FileSetExtendedAttributeResponder {
9601 fn drop(&mut self) {
9602 self.control_handle.shutdown();
9603 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9605 }
9606}
9607
9608impl fdomain_client::fidl::Responder for FileSetExtendedAttributeResponder {
9609 type ControlHandle = FileControlHandle;
9610
9611 fn control_handle(&self) -> &FileControlHandle {
9612 &self.control_handle
9613 }
9614
9615 fn drop_without_shutdown(mut self) {
9616 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9618 std::mem::forget(self);
9620 }
9621}
9622
9623impl FileSetExtendedAttributeResponder {
9624 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9628 let _result = self.send_raw(result);
9629 if _result.is_err() {
9630 self.control_handle.shutdown();
9631 }
9632 self.drop_without_shutdown();
9633 _result
9634 }
9635
9636 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9638 let _result = self.send_raw(result);
9639 self.drop_without_shutdown();
9640 _result
9641 }
9642
9643 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9644 self.control_handle
9645 .inner
9646 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9647 result,
9648 self.tx_id,
9649 0x4a951362f681f23c,
9650 fidl::encoding::DynamicFlags::empty(),
9651 )
9652 }
9653}
9654
9655#[must_use = "FIDL methods require a response to be sent"]
9656#[derive(Debug)]
9657pub struct FileRemoveExtendedAttributeResponder {
9658 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9659 tx_id: u32,
9660}
9661
9662impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
9666 fn drop(&mut self) {
9667 self.control_handle.shutdown();
9668 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9670 }
9671}
9672
9673impl fdomain_client::fidl::Responder for FileRemoveExtendedAttributeResponder {
9674 type ControlHandle = FileControlHandle;
9675
9676 fn control_handle(&self) -> &FileControlHandle {
9677 &self.control_handle
9678 }
9679
9680 fn drop_without_shutdown(mut self) {
9681 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9683 std::mem::forget(self);
9685 }
9686}
9687
9688impl FileRemoveExtendedAttributeResponder {
9689 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9693 let _result = self.send_raw(result);
9694 if _result.is_err() {
9695 self.control_handle.shutdown();
9696 }
9697 self.drop_without_shutdown();
9698 _result
9699 }
9700
9701 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9703 let _result = self.send_raw(result);
9704 self.drop_without_shutdown();
9705 _result
9706 }
9707
9708 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9709 self.control_handle
9710 .inner
9711 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9712 result,
9713 self.tx_id,
9714 0x7a0b9f3a9bf9032d,
9715 fidl::encoding::DynamicFlags::empty(),
9716 )
9717 }
9718}
9719
9720#[must_use = "FIDL methods require a response to be sent"]
9721#[derive(Debug)]
9722pub struct FileReadResponder {
9723 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9724 tx_id: u32,
9725}
9726
9727impl std::ops::Drop for FileReadResponder {
9731 fn drop(&mut self) {
9732 self.control_handle.shutdown();
9733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9735 }
9736}
9737
9738impl fdomain_client::fidl::Responder for FileReadResponder {
9739 type ControlHandle = FileControlHandle;
9740
9741 fn control_handle(&self) -> &FileControlHandle {
9742 &self.control_handle
9743 }
9744
9745 fn drop_without_shutdown(mut self) {
9746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9748 std::mem::forget(self);
9750 }
9751}
9752
9753impl FileReadResponder {
9754 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9758 let _result = self.send_raw(result);
9759 if _result.is_err() {
9760 self.control_handle.shutdown();
9761 }
9762 self.drop_without_shutdown();
9763 _result
9764 }
9765
9766 pub fn send_no_shutdown_on_err(
9768 self,
9769 mut result: Result<&[u8], i32>,
9770 ) -> Result<(), fidl::Error> {
9771 let _result = self.send_raw(result);
9772 self.drop_without_shutdown();
9773 _result
9774 }
9775
9776 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9777 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
9778 result.map(|data| (data,)),
9779 self.tx_id,
9780 0x57e419a298c8ede,
9781 fidl::encoding::DynamicFlags::empty(),
9782 )
9783 }
9784}
9785
9786#[must_use = "FIDL methods require a response to be sent"]
9787#[derive(Debug)]
9788pub struct FileWriteResponder {
9789 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9790 tx_id: u32,
9791}
9792
9793impl std::ops::Drop for FileWriteResponder {
9797 fn drop(&mut self) {
9798 self.control_handle.shutdown();
9799 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9801 }
9802}
9803
9804impl fdomain_client::fidl::Responder for FileWriteResponder {
9805 type ControlHandle = FileControlHandle;
9806
9807 fn control_handle(&self) -> &FileControlHandle {
9808 &self.control_handle
9809 }
9810
9811 fn drop_without_shutdown(mut self) {
9812 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9814 std::mem::forget(self);
9816 }
9817}
9818
9819impl FileWriteResponder {
9820 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9824 let _result = self.send_raw(result);
9825 if _result.is_err() {
9826 self.control_handle.shutdown();
9827 }
9828 self.drop_without_shutdown();
9829 _result
9830 }
9831
9832 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9834 let _result = self.send_raw(result);
9835 self.drop_without_shutdown();
9836 _result
9837 }
9838
9839 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9840 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
9841 result.map(|actual_count| (actual_count,)),
9842 self.tx_id,
9843 0x6a31437832469f82,
9844 fidl::encoding::DynamicFlags::empty(),
9845 )
9846 }
9847}
9848
9849#[must_use = "FIDL methods require a response to be sent"]
9850#[derive(Debug)]
9851pub struct FileDescribeResponder {
9852 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9853 tx_id: u32,
9854}
9855
9856impl std::ops::Drop for FileDescribeResponder {
9860 fn drop(&mut self) {
9861 self.control_handle.shutdown();
9862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9864 }
9865}
9866
9867impl fdomain_client::fidl::Responder for FileDescribeResponder {
9868 type ControlHandle = FileControlHandle;
9869
9870 fn control_handle(&self) -> &FileControlHandle {
9871 &self.control_handle
9872 }
9873
9874 fn drop_without_shutdown(mut self) {
9875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9877 std::mem::forget(self);
9879 }
9880}
9881
9882impl FileDescribeResponder {
9883 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9887 let _result = self.send_raw(payload);
9888 if _result.is_err() {
9889 self.control_handle.shutdown();
9890 }
9891 self.drop_without_shutdown();
9892 _result
9893 }
9894
9895 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9897 let _result = self.send_raw(payload);
9898 self.drop_without_shutdown();
9899 _result
9900 }
9901
9902 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9903 self.control_handle.inner.send::<FileInfo>(
9904 &mut payload,
9905 self.tx_id,
9906 0x68b5ac00c62906bc,
9907 fidl::encoding::DynamicFlags::empty(),
9908 )
9909 }
9910}
9911
9912#[must_use = "FIDL methods require a response to be sent"]
9913#[derive(Debug)]
9914pub struct FileSeekResponder {
9915 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9916 tx_id: u32,
9917}
9918
9919impl std::ops::Drop for FileSeekResponder {
9923 fn drop(&mut self) {
9924 self.control_handle.shutdown();
9925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9927 }
9928}
9929
9930impl fdomain_client::fidl::Responder for FileSeekResponder {
9931 type ControlHandle = FileControlHandle;
9932
9933 fn control_handle(&self) -> &FileControlHandle {
9934 &self.control_handle
9935 }
9936
9937 fn drop_without_shutdown(mut self) {
9938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9940 std::mem::forget(self);
9942 }
9943}
9944
9945impl FileSeekResponder {
9946 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9950 let _result = self.send_raw(result);
9951 if _result.is_err() {
9952 self.control_handle.shutdown();
9953 }
9954 self.drop_without_shutdown();
9955 _result
9956 }
9957
9958 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9960 let _result = self.send_raw(result);
9961 self.drop_without_shutdown();
9962 _result
9963 }
9964
9965 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9966 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
9967 result.map(|offset_from_start| (offset_from_start,)),
9968 self.tx_id,
9969 0x78079168162c5207,
9970 fidl::encoding::DynamicFlags::empty(),
9971 )
9972 }
9973}
9974
9975#[must_use = "FIDL methods require a response to be sent"]
9976#[derive(Debug)]
9977pub struct FileReadAtResponder {
9978 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9979 tx_id: u32,
9980}
9981
9982impl std::ops::Drop for FileReadAtResponder {
9986 fn drop(&mut self) {
9987 self.control_handle.shutdown();
9988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9990 }
9991}
9992
9993impl fdomain_client::fidl::Responder for FileReadAtResponder {
9994 type ControlHandle = FileControlHandle;
9995
9996 fn control_handle(&self) -> &FileControlHandle {
9997 &self.control_handle
9998 }
9999
10000 fn drop_without_shutdown(mut self) {
10001 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10003 std::mem::forget(self);
10005 }
10006}
10007
10008impl FileReadAtResponder {
10009 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10013 let _result = self.send_raw(result);
10014 if _result.is_err() {
10015 self.control_handle.shutdown();
10016 }
10017 self.drop_without_shutdown();
10018 _result
10019 }
10020
10021 pub fn send_no_shutdown_on_err(
10023 self,
10024 mut result: Result<&[u8], i32>,
10025 ) -> Result<(), fidl::Error> {
10026 let _result = self.send_raw(result);
10027 self.drop_without_shutdown();
10028 _result
10029 }
10030
10031 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10032 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
10033 result.map(|data| (data,)),
10034 self.tx_id,
10035 0x1607a293a60d723e,
10036 fidl::encoding::DynamicFlags::empty(),
10037 )
10038 }
10039}
10040
10041#[must_use = "FIDL methods require a response to be sent"]
10042#[derive(Debug)]
10043pub struct FileWriteAtResponder {
10044 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10045 tx_id: u32,
10046}
10047
10048impl std::ops::Drop for FileWriteAtResponder {
10052 fn drop(&mut self) {
10053 self.control_handle.shutdown();
10054 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10056 }
10057}
10058
10059impl fdomain_client::fidl::Responder for FileWriteAtResponder {
10060 type ControlHandle = FileControlHandle;
10061
10062 fn control_handle(&self) -> &FileControlHandle {
10063 &self.control_handle
10064 }
10065
10066 fn drop_without_shutdown(mut self) {
10067 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10069 std::mem::forget(self);
10071 }
10072}
10073
10074impl FileWriteAtResponder {
10075 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10079 let _result = self.send_raw(result);
10080 if _result.is_err() {
10081 self.control_handle.shutdown();
10082 }
10083 self.drop_without_shutdown();
10084 _result
10085 }
10086
10087 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10089 let _result = self.send_raw(result);
10090 self.drop_without_shutdown();
10091 _result
10092 }
10093
10094 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10095 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
10096 result.map(|actual_count| (actual_count,)),
10097 self.tx_id,
10098 0x793eefc0045e792b,
10099 fidl::encoding::DynamicFlags::empty(),
10100 )
10101 }
10102}
10103
10104#[must_use = "FIDL methods require a response to be sent"]
10105#[derive(Debug)]
10106pub struct FileResizeResponder {
10107 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10108 tx_id: u32,
10109}
10110
10111impl std::ops::Drop for FileResizeResponder {
10115 fn drop(&mut self) {
10116 self.control_handle.shutdown();
10117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10119 }
10120}
10121
10122impl fdomain_client::fidl::Responder for FileResizeResponder {
10123 type ControlHandle = FileControlHandle;
10124
10125 fn control_handle(&self) -> &FileControlHandle {
10126 &self.control_handle
10127 }
10128
10129 fn drop_without_shutdown(mut self) {
10130 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10132 std::mem::forget(self);
10134 }
10135}
10136
10137impl FileResizeResponder {
10138 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10142 let _result = self.send_raw(result);
10143 if _result.is_err() {
10144 self.control_handle.shutdown();
10145 }
10146 self.drop_without_shutdown();
10147 _result
10148 }
10149
10150 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10152 let _result = self.send_raw(result);
10153 self.drop_without_shutdown();
10154 _result
10155 }
10156
10157 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10158 self.control_handle
10159 .inner
10160 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10161 result,
10162 self.tx_id,
10163 0x2b80825f0535743a,
10164 fidl::encoding::DynamicFlags::empty(),
10165 )
10166 }
10167}
10168
10169#[must_use = "FIDL methods require a response to be sent"]
10170#[derive(Debug)]
10171pub struct FileGetBackingMemoryResponder {
10172 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10173 tx_id: u32,
10174}
10175
10176impl std::ops::Drop for FileGetBackingMemoryResponder {
10180 fn drop(&mut self) {
10181 self.control_handle.shutdown();
10182 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10184 }
10185}
10186
10187impl fdomain_client::fidl::Responder for FileGetBackingMemoryResponder {
10188 type ControlHandle = FileControlHandle;
10189
10190 fn control_handle(&self) -> &FileControlHandle {
10191 &self.control_handle
10192 }
10193
10194 fn drop_without_shutdown(mut self) {
10195 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10197 std::mem::forget(self);
10199 }
10200}
10201
10202impl FileGetBackingMemoryResponder {
10203 pub fn send(self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10207 let _result = self.send_raw(result);
10208 if _result.is_err() {
10209 self.control_handle.shutdown();
10210 }
10211 self.drop_without_shutdown();
10212 _result
10213 }
10214
10215 pub fn send_no_shutdown_on_err(
10217 self,
10218 mut result: Result<fdomain_client::Vmo, i32>,
10219 ) -> Result<(), fidl::Error> {
10220 let _result = self.send_raw(result);
10221 self.drop_without_shutdown();
10222 _result
10223 }
10224
10225 fn send_raw(&self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10226 self.control_handle
10227 .inner
10228 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
10229 result.map(|vmo| (vmo,)),
10230 self.tx_id,
10231 0xa6a9e654cbf62b,
10232 fidl::encoding::DynamicFlags::empty(),
10233 )
10234 }
10235}
10236
10237#[must_use = "FIDL methods require a response to be sent"]
10238#[derive(Debug)]
10239pub struct FileAllocateResponder {
10240 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10241 tx_id: u32,
10242}
10243
10244impl std::ops::Drop for FileAllocateResponder {
10248 fn drop(&mut self) {
10249 self.control_handle.shutdown();
10250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10252 }
10253}
10254
10255impl fdomain_client::fidl::Responder for FileAllocateResponder {
10256 type ControlHandle = FileControlHandle;
10257
10258 fn control_handle(&self) -> &FileControlHandle {
10259 &self.control_handle
10260 }
10261
10262 fn drop_without_shutdown(mut self) {
10263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10265 std::mem::forget(self);
10267 }
10268}
10269
10270impl FileAllocateResponder {
10271 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10275 let _result = self.send_raw(result);
10276 if _result.is_err() {
10277 self.control_handle.shutdown();
10278 }
10279 self.drop_without_shutdown();
10280 _result
10281 }
10282
10283 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10285 let _result = self.send_raw(result);
10286 self.drop_without_shutdown();
10287 _result
10288 }
10289
10290 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10291 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10292 fidl::encoding::EmptyStruct,
10293 i32,
10294 >>(
10295 fidl::encoding::FlexibleResult::new(result),
10296 self.tx_id,
10297 0x77fa0c330b57fd2e,
10298 fidl::encoding::DynamicFlags::FLEXIBLE,
10299 )
10300 }
10301}
10302
10303#[must_use = "FIDL methods require a response to be sent"]
10304#[derive(Debug)]
10305pub struct FileEnableVerityResponder {
10306 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10307 tx_id: u32,
10308}
10309
10310impl std::ops::Drop for FileEnableVerityResponder {
10314 fn drop(&mut self) {
10315 self.control_handle.shutdown();
10316 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10318 }
10319}
10320
10321impl fdomain_client::fidl::Responder for FileEnableVerityResponder {
10322 type ControlHandle = FileControlHandle;
10323
10324 fn control_handle(&self) -> &FileControlHandle {
10325 &self.control_handle
10326 }
10327
10328 fn drop_without_shutdown(mut self) {
10329 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10331 std::mem::forget(self);
10333 }
10334}
10335
10336impl FileEnableVerityResponder {
10337 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10341 let _result = self.send_raw(result);
10342 if _result.is_err() {
10343 self.control_handle.shutdown();
10344 }
10345 self.drop_without_shutdown();
10346 _result
10347 }
10348
10349 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10351 let _result = self.send_raw(result);
10352 self.drop_without_shutdown();
10353 _result
10354 }
10355
10356 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10357 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10358 fidl::encoding::EmptyStruct,
10359 i32,
10360 >>(
10361 fidl::encoding::FlexibleResult::new(result),
10362 self.tx_id,
10363 0x2c421ec3faaeb8bb,
10364 fidl::encoding::DynamicFlags::FLEXIBLE,
10365 )
10366 }
10367}
10368
10369#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10370pub struct LinkableMarker;
10371
10372impl fdomain_client::fidl::ProtocolMarker for LinkableMarker {
10373 type Proxy = LinkableProxy;
10374 type RequestStream = LinkableRequestStream;
10375
10376 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
10377}
10378pub type LinkableLinkIntoResult = Result<(), i32>;
10379
10380pub trait LinkableProxyInterface: Send + Sync {
10381 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
10382 + Send;
10383 fn r#link_into(
10384 &self,
10385 dst_parent_token: fdomain_client::Event,
10386 dst: &str,
10387 ) -> Self::LinkIntoResponseFut;
10388}
10389
10390#[derive(Debug, Clone)]
10391pub struct LinkableProxy {
10392 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10393}
10394
10395impl fdomain_client::fidl::Proxy for LinkableProxy {
10396 type Protocol = LinkableMarker;
10397
10398 fn from_channel(inner: fdomain_client::Channel) -> Self {
10399 Self::new(inner)
10400 }
10401
10402 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10403 self.client.into_channel().map_err(|client| Self { client })
10404 }
10405
10406 fn as_channel(&self) -> &fdomain_client::Channel {
10407 self.client.as_channel()
10408 }
10409}
10410
10411impl LinkableProxy {
10412 pub fn new(channel: fdomain_client::Channel) -> Self {
10414 let protocol_name = <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10415 Self { client: fidl::client::Client::new(channel, protocol_name) }
10416 }
10417
10418 pub fn take_event_stream(&self) -> LinkableEventStream {
10424 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
10425 }
10426
10427 pub fn r#link_into(
10450 &self,
10451 mut dst_parent_token: fdomain_client::Event,
10452 mut dst: &str,
10453 ) -> fidl::client::QueryResponseFut<
10454 LinkableLinkIntoResult,
10455 fdomain_client::fidl::FDomainResourceDialect,
10456 > {
10457 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
10458 }
10459}
10460
10461impl LinkableProxyInterface for LinkableProxy {
10462 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
10463 LinkableLinkIntoResult,
10464 fdomain_client::fidl::FDomainResourceDialect,
10465 >;
10466 fn r#link_into(
10467 &self,
10468 mut dst_parent_token: fdomain_client::Event,
10469 mut dst: &str,
10470 ) -> Self::LinkIntoResponseFut {
10471 fn _decode(
10472 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10473 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
10474 let _response = fidl::client::decode_transaction_body::<
10475 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10476 fdomain_client::fidl::FDomainResourceDialect,
10477 0x54f3949246a03e74,
10478 >(_buf?)?;
10479 Ok(_response.map(|x| x))
10480 }
10481 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
10482 (dst_parent_token, dst),
10483 0x54f3949246a03e74,
10484 fidl::encoding::DynamicFlags::empty(),
10485 _decode,
10486 )
10487 }
10488}
10489
10490pub struct LinkableEventStream {
10491 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
10492}
10493
10494impl std::marker::Unpin for LinkableEventStream {}
10495
10496impl futures::stream::FusedStream for LinkableEventStream {
10497 fn is_terminated(&self) -> bool {
10498 self.event_receiver.is_terminated()
10499 }
10500}
10501
10502impl futures::Stream for LinkableEventStream {
10503 type Item = Result<LinkableEvent, fidl::Error>;
10504
10505 fn poll_next(
10506 mut self: std::pin::Pin<&mut Self>,
10507 cx: &mut std::task::Context<'_>,
10508 ) -> std::task::Poll<Option<Self::Item>> {
10509 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10510 &mut self.event_receiver,
10511 cx
10512 )?) {
10513 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
10514 None => std::task::Poll::Ready(None),
10515 }
10516 }
10517}
10518
10519#[derive(Debug)]
10520pub enum LinkableEvent {}
10521
10522impl LinkableEvent {
10523 fn decode(
10525 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10526 ) -> Result<LinkableEvent, fidl::Error> {
10527 let (bytes, _handles) = buf.split_mut();
10528 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10529 debug_assert_eq!(tx_header.tx_id, 0);
10530 match tx_header.ordinal {
10531 _ => Err(fidl::Error::UnknownOrdinal {
10532 ordinal: tx_header.ordinal,
10533 protocol_name: <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10534 }),
10535 }
10536 }
10537}
10538
10539pub struct LinkableRequestStream {
10541 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10542 is_terminated: bool,
10543}
10544
10545impl std::marker::Unpin for LinkableRequestStream {}
10546
10547impl futures::stream::FusedStream for LinkableRequestStream {
10548 fn is_terminated(&self) -> bool {
10549 self.is_terminated
10550 }
10551}
10552
10553impl fdomain_client::fidl::RequestStream for LinkableRequestStream {
10554 type Protocol = LinkableMarker;
10555 type ControlHandle = LinkableControlHandle;
10556
10557 fn from_channel(channel: fdomain_client::Channel) -> Self {
10558 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10559 }
10560
10561 fn control_handle(&self) -> Self::ControlHandle {
10562 LinkableControlHandle { inner: self.inner.clone() }
10563 }
10564
10565 fn into_inner(
10566 self,
10567 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
10568 {
10569 (self.inner, self.is_terminated)
10570 }
10571
10572 fn from_inner(
10573 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10574 is_terminated: bool,
10575 ) -> Self {
10576 Self { inner, is_terminated }
10577 }
10578}
10579
10580impl futures::Stream for LinkableRequestStream {
10581 type Item = Result<LinkableRequest, fidl::Error>;
10582
10583 fn poll_next(
10584 mut self: std::pin::Pin<&mut Self>,
10585 cx: &mut std::task::Context<'_>,
10586 ) -> std::task::Poll<Option<Self::Item>> {
10587 let this = &mut *self;
10588 if this.inner.check_shutdown(cx) {
10589 this.is_terminated = true;
10590 return std::task::Poll::Ready(None);
10591 }
10592 if this.is_terminated {
10593 panic!("polled LinkableRequestStream after completion");
10594 }
10595 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
10596 |bytes, handles| {
10597 match this.inner.channel().read_etc(cx, bytes, handles) {
10598 std::task::Poll::Ready(Ok(())) => {}
10599 std::task::Poll::Pending => return std::task::Poll::Pending,
10600 std::task::Poll::Ready(Err(None)) => {
10601 this.is_terminated = true;
10602 return std::task::Poll::Ready(None);
10603 }
10604 std::task::Poll::Ready(Err(Some(e))) => {
10605 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10606 e.into(),
10607 ))));
10608 }
10609 }
10610
10611 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10613
10614 std::task::Poll::Ready(Some(match header.ordinal {
10615 0x54f3949246a03e74 => {
10616 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10617 let mut req = fidl::new_empty!(
10618 LinkableLinkIntoRequest,
10619 fdomain_client::fidl::FDomainResourceDialect
10620 );
10621 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
10622 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
10623 Ok(LinkableRequest::LinkInto {
10624 dst_parent_token: req.dst_parent_token,
10625 dst: req.dst,
10626
10627 responder: LinkableLinkIntoResponder {
10628 control_handle: std::mem::ManuallyDrop::new(control_handle),
10629 tx_id: header.tx_id,
10630 },
10631 })
10632 }
10633 _ => Err(fidl::Error::UnknownOrdinal {
10634 ordinal: header.ordinal,
10635 protocol_name:
10636 <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10637 }),
10638 }))
10639 },
10640 )
10641 }
10642}
10643
10644#[derive(Debug)]
10645pub enum LinkableRequest {
10646 LinkInto {
10669 dst_parent_token: fdomain_client::Event,
10670 dst: String,
10671 responder: LinkableLinkIntoResponder,
10672 },
10673}
10674
10675impl LinkableRequest {
10676 #[allow(irrefutable_let_patterns)]
10677 pub fn into_link_into(
10678 self,
10679 ) -> Option<(fdomain_client::Event, String, LinkableLinkIntoResponder)> {
10680 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
10681 Some((dst_parent_token, dst, responder))
10682 } else {
10683 None
10684 }
10685 }
10686
10687 pub fn method_name(&self) -> &'static str {
10689 match *self {
10690 LinkableRequest::LinkInto { .. } => "link_into",
10691 }
10692 }
10693}
10694
10695#[derive(Debug, Clone)]
10696pub struct LinkableControlHandle {
10697 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10698}
10699
10700impl fdomain_client::fidl::ControlHandle for LinkableControlHandle {
10701 fn shutdown(&self) {
10702 self.inner.shutdown()
10703 }
10704
10705 fn is_closed(&self) -> bool {
10706 self.inner.channel().is_closed()
10707 }
10708 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
10709 self.inner.channel().on_closed()
10710 }
10711}
10712
10713impl LinkableControlHandle {}
10714
10715#[must_use = "FIDL methods require a response to be sent"]
10716#[derive(Debug)]
10717pub struct LinkableLinkIntoResponder {
10718 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
10719 tx_id: u32,
10720}
10721
10722impl std::ops::Drop for LinkableLinkIntoResponder {
10726 fn drop(&mut self) {
10727 self.control_handle.shutdown();
10728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10730 }
10731}
10732
10733impl fdomain_client::fidl::Responder for LinkableLinkIntoResponder {
10734 type ControlHandle = LinkableControlHandle;
10735
10736 fn control_handle(&self) -> &LinkableControlHandle {
10737 &self.control_handle
10738 }
10739
10740 fn drop_without_shutdown(mut self) {
10741 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10743 std::mem::forget(self);
10745 }
10746}
10747
10748impl LinkableLinkIntoResponder {
10749 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10753 let _result = self.send_raw(result);
10754 if _result.is_err() {
10755 self.control_handle.shutdown();
10756 }
10757 self.drop_without_shutdown();
10758 _result
10759 }
10760
10761 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10763 let _result = self.send_raw(result);
10764 self.drop_without_shutdown();
10765 _result
10766 }
10767
10768 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10769 self.control_handle
10770 .inner
10771 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10772 result,
10773 self.tx_id,
10774 0x54f3949246a03e74,
10775 fidl::encoding::DynamicFlags::empty(),
10776 )
10777 }
10778}
10779
10780#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10781pub struct NodeMarker;
10782
10783impl fdomain_client::fidl::ProtocolMarker for NodeMarker {
10784 type Proxy = NodeProxy;
10785 type RequestStream = NodeRequestStream;
10786
10787 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
10788}
10789impl fdomain_client::fidl::DiscoverableProtocolMarker for NodeMarker {}
10790pub type NodeGetFlagsResult = Result<Flags, i32>;
10791pub type NodeSetFlagsResult = Result<(), i32>;
10792pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
10793pub type NodeUpdateAttributesResult = Result<(), i32>;
10794pub type NodeSyncResult = Result<(), i32>;
10795pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
10796pub type NodeSetExtendedAttributeResult = Result<(), i32>;
10797pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
10798
10799pub trait NodeProxyInterface: Send + Sync {
10800 fn r#clone(
10801 &self,
10802 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10803 ) -> Result<(), fidl::Error>;
10804 type CloseResponseFut: std::future::Future<
10805 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
10806 > + Send;
10807 fn r#close(&self) -> Self::CloseResponseFut;
10808 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
10809 fn r#query(&self) -> Self::QueryResponseFut;
10810 fn r#deprecated_clone(
10811 &self,
10812 flags: OpenFlags,
10813 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10814 ) -> Result<(), fidl::Error>;
10815 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
10816 + Send;
10817 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
10818 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
10819 fn r#deprecated_set_attr(
10820 &self,
10821 flags: NodeAttributeFlags,
10822 attributes: &NodeAttributes,
10823 ) -> Self::DeprecatedSetAttrResponseFut;
10824 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
10825 + Send;
10826 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
10827 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
10828 + Send;
10829 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
10830 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
10831 + Send;
10832 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
10833 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
10834 + Send;
10835 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
10836 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
10837 + Send;
10838 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
10839 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
10840 + Send;
10841 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
10842 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
10843 + Send;
10844 fn r#update_attributes(
10845 &self,
10846 payload: &MutableNodeAttributes,
10847 ) -> Self::UpdateAttributesResponseFut;
10848 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
10849 fn r#sync(&self) -> Self::SyncResponseFut;
10850 fn r#list_extended_attributes(
10851 &self,
10852 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
10853 ) -> Result<(), fidl::Error>;
10854 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
10855 + Send;
10856 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
10857 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
10858 + Send;
10859 fn r#set_extended_attribute(
10860 &self,
10861 name: &[u8],
10862 value: ExtendedAttributeValue,
10863 mode: SetExtendedAttributeMode,
10864 ) -> Self::SetExtendedAttributeResponseFut;
10865 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
10866 + Send;
10867 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
10868}
10869
10870#[derive(Debug, Clone)]
10871pub struct NodeProxy {
10872 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10873}
10874
10875impl fdomain_client::fidl::Proxy for NodeProxy {
10876 type Protocol = NodeMarker;
10877
10878 fn from_channel(inner: fdomain_client::Channel) -> Self {
10879 Self::new(inner)
10880 }
10881
10882 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10883 self.client.into_channel().map_err(|client| Self { client })
10884 }
10885
10886 fn as_channel(&self) -> &fdomain_client::Channel {
10887 self.client.as_channel()
10888 }
10889}
10890
10891impl NodeProxy {
10892 pub fn new(channel: fdomain_client::Channel) -> Self {
10894 let protocol_name = <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10895 Self { client: fidl::client::Client::new(channel, protocol_name) }
10896 }
10897
10898 pub fn take_event_stream(&self) -> NodeEventStream {
10904 NodeEventStream { event_receiver: self.client.take_event_receiver() }
10905 }
10906
10907 pub fn r#clone(
10908 &self,
10909 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10910 ) -> Result<(), fidl::Error> {
10911 NodeProxyInterface::r#clone(self, request)
10912 }
10913
10914 pub fn r#close(
10925 &self,
10926 ) -> fidl::client::QueryResponseFut<
10927 fdomain_fuchsia_unknown::CloseableCloseResult,
10928 fdomain_client::fidl::FDomainResourceDialect,
10929 > {
10930 NodeProxyInterface::r#close(self)
10931 }
10932
10933 pub fn r#query(
10934 &self,
10935 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
10936 NodeProxyInterface::r#query(self)
10937 }
10938
10939 pub fn r#deprecated_clone(
10941 &self,
10942 mut flags: OpenFlags,
10943 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10944 ) -> Result<(), fidl::Error> {
10945 NodeProxyInterface::r#deprecated_clone(self, flags, object)
10946 }
10947
10948 pub fn r#deprecated_get_attr(
10950 &self,
10951 ) -> fidl::client::QueryResponseFut<
10952 (i32, NodeAttributes),
10953 fdomain_client::fidl::FDomainResourceDialect,
10954 > {
10955 NodeProxyInterface::r#deprecated_get_attr(self)
10956 }
10957
10958 pub fn r#deprecated_set_attr(
10960 &self,
10961 mut flags: NodeAttributeFlags,
10962 mut attributes: &NodeAttributes,
10963 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
10964 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
10965 }
10966
10967 pub fn r#deprecated_get_flags(
10969 &self,
10970 ) -> fidl::client::QueryResponseFut<
10971 (i32, OpenFlags),
10972 fdomain_client::fidl::FDomainResourceDialect,
10973 > {
10974 NodeProxyInterface::r#deprecated_get_flags(self)
10975 }
10976
10977 pub fn r#deprecated_set_flags(
10979 &self,
10980 mut flags: OpenFlags,
10981 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
10982 NodeProxyInterface::r#deprecated_set_flags(self, flags)
10983 }
10984
10985 pub fn r#get_flags(
10994 &self,
10995 ) -> fidl::client::QueryResponseFut<
10996 NodeGetFlagsResult,
10997 fdomain_client::fidl::FDomainResourceDialect,
10998 > {
10999 NodeProxyInterface::r#get_flags(self)
11000 }
11001
11002 pub fn r#set_flags(
11012 &self,
11013 mut flags: Flags,
11014 ) -> fidl::client::QueryResponseFut<
11015 NodeSetFlagsResult,
11016 fdomain_client::fidl::FDomainResourceDialect,
11017 > {
11018 NodeProxyInterface::r#set_flags(self, flags)
11019 }
11020
11021 pub fn r#query_filesystem(
11023 &self,
11024 ) -> fidl::client::QueryResponseFut<
11025 (i32, Option<Box<FilesystemInfo>>),
11026 fdomain_client::fidl::FDomainResourceDialect,
11027 > {
11028 NodeProxyInterface::r#query_filesystem(self)
11029 }
11030
11031 pub fn r#get_attributes(
11045 &self,
11046 mut query: NodeAttributesQuery,
11047 ) -> fidl::client::QueryResponseFut<
11048 NodeGetAttributesResult,
11049 fdomain_client::fidl::FDomainResourceDialect,
11050 > {
11051 NodeProxyInterface::r#get_attributes(self, query)
11052 }
11053
11054 pub fn r#update_attributes(
11063 &self,
11064 mut payload: &MutableNodeAttributes,
11065 ) -> fidl::client::QueryResponseFut<
11066 NodeUpdateAttributesResult,
11067 fdomain_client::fidl::FDomainResourceDialect,
11068 > {
11069 NodeProxyInterface::r#update_attributes(self, payload)
11070 }
11071
11072 pub fn r#sync(
11082 &self,
11083 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
11084 {
11085 NodeProxyInterface::r#sync(self)
11086 }
11087
11088 pub fn r#list_extended_attributes(
11097 &self,
11098 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11099 ) -> Result<(), fidl::Error> {
11100 NodeProxyInterface::r#list_extended_attributes(self, iterator)
11101 }
11102
11103 pub fn r#get_extended_attribute(
11110 &self,
11111 mut name: &[u8],
11112 ) -> fidl::client::QueryResponseFut<
11113 NodeGetExtendedAttributeResult,
11114 fdomain_client::fidl::FDomainResourceDialect,
11115 > {
11116 NodeProxyInterface::r#get_extended_attribute(self, name)
11117 }
11118
11119 pub fn r#set_extended_attribute(
11127 &self,
11128 mut name: &[u8],
11129 mut value: ExtendedAttributeValue,
11130 mut mode: SetExtendedAttributeMode,
11131 ) -> fidl::client::QueryResponseFut<
11132 NodeSetExtendedAttributeResult,
11133 fdomain_client::fidl::FDomainResourceDialect,
11134 > {
11135 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
11136 }
11137
11138 pub fn r#remove_extended_attribute(
11144 &self,
11145 mut name: &[u8],
11146 ) -> fidl::client::QueryResponseFut<
11147 NodeRemoveExtendedAttributeResult,
11148 fdomain_client::fidl::FDomainResourceDialect,
11149 > {
11150 NodeProxyInterface::r#remove_extended_attribute(self, name)
11151 }
11152}
11153
11154impl NodeProxyInterface for NodeProxy {
11155 fn r#clone(
11156 &self,
11157 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
11158 ) -> Result<(), fidl::Error> {
11159 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
11160 (request,),
11161 0x20d8a7aba2168a79,
11162 fidl::encoding::DynamicFlags::empty(),
11163 )
11164 }
11165
11166 type CloseResponseFut = fidl::client::QueryResponseFut<
11167 fdomain_fuchsia_unknown::CloseableCloseResult,
11168 fdomain_client::fidl::FDomainResourceDialect,
11169 >;
11170 fn r#close(&self) -> Self::CloseResponseFut {
11171 fn _decode(
11172 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11173 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
11174 let _response = fidl::client::decode_transaction_body::<
11175 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11176 fdomain_client::fidl::FDomainResourceDialect,
11177 0x5ac5d459ad7f657e,
11178 >(_buf?)?;
11179 Ok(_response.map(|x| x))
11180 }
11181 self.client.send_query_and_decode::<
11182 fidl::encoding::EmptyPayload,
11183 fdomain_fuchsia_unknown::CloseableCloseResult,
11184 >(
11185 (),
11186 0x5ac5d459ad7f657e,
11187 fidl::encoding::DynamicFlags::empty(),
11188 _decode,
11189 )
11190 }
11191
11192 type QueryResponseFut =
11193 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
11194 fn r#query(&self) -> Self::QueryResponseFut {
11195 fn _decode(
11196 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11197 ) -> Result<Vec<u8>, fidl::Error> {
11198 let _response = fidl::client::decode_transaction_body::<
11199 fdomain_fuchsia_unknown::QueryableQueryResponse,
11200 fdomain_client::fidl::FDomainResourceDialect,
11201 0x2658edee9decfc06,
11202 >(_buf?)?;
11203 Ok(_response.protocol)
11204 }
11205 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
11206 (),
11207 0x2658edee9decfc06,
11208 fidl::encoding::DynamicFlags::empty(),
11209 _decode,
11210 )
11211 }
11212
11213 fn r#deprecated_clone(
11214 &self,
11215 mut flags: OpenFlags,
11216 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11217 ) -> Result<(), fidl::Error> {
11218 self.client.send::<NodeDeprecatedCloneRequest>(
11219 (flags, object),
11220 0x5a61678f293ce16f,
11221 fidl::encoding::DynamicFlags::FLEXIBLE,
11222 )
11223 }
11224
11225 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
11226 (i32, NodeAttributes),
11227 fdomain_client::fidl::FDomainResourceDialect,
11228 >;
11229 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
11230 fn _decode(
11231 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11232 ) -> Result<(i32, NodeAttributes), fidl::Error> {
11233 let _response = fidl::client::decode_transaction_body::<
11234 NodeDeprecatedGetAttrResponse,
11235 fdomain_client::fidl::FDomainResourceDialect,
11236 0x78985e216314dafd,
11237 >(_buf?)?;
11238 Ok((_response.s, _response.attributes))
11239 }
11240 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
11241 (),
11242 0x78985e216314dafd,
11243 fidl::encoding::DynamicFlags::empty(),
11244 _decode,
11245 )
11246 }
11247
11248 type DeprecatedSetAttrResponseFut =
11249 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11250 fn r#deprecated_set_attr(
11251 &self,
11252 mut flags: NodeAttributeFlags,
11253 mut attributes: &NodeAttributes,
11254 ) -> Self::DeprecatedSetAttrResponseFut {
11255 fn _decode(
11256 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11257 ) -> Result<i32, fidl::Error> {
11258 let _response = fidl::client::decode_transaction_body::<
11259 NodeDeprecatedSetAttrResponse,
11260 fdomain_client::fidl::FDomainResourceDialect,
11261 0x4186c0f40d938f46,
11262 >(_buf?)?;
11263 Ok(_response.s)
11264 }
11265 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
11266 (flags, attributes),
11267 0x4186c0f40d938f46,
11268 fidl::encoding::DynamicFlags::empty(),
11269 _decode,
11270 )
11271 }
11272
11273 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
11274 (i32, OpenFlags),
11275 fdomain_client::fidl::FDomainResourceDialect,
11276 >;
11277 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
11278 fn _decode(
11279 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11280 ) -> Result<(i32, OpenFlags), fidl::Error> {
11281 let _response = fidl::client::decode_transaction_body::<
11282 NodeDeprecatedGetFlagsResponse,
11283 fdomain_client::fidl::FDomainResourceDialect,
11284 0x5b88fffb8eda3aa1,
11285 >(_buf?)?;
11286 Ok((_response.s, _response.flags))
11287 }
11288 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
11289 (),
11290 0x5b88fffb8eda3aa1,
11291 fidl::encoding::DynamicFlags::empty(),
11292 _decode,
11293 )
11294 }
11295
11296 type DeprecatedSetFlagsResponseFut =
11297 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11298 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
11299 fn _decode(
11300 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11301 ) -> Result<i32, fidl::Error> {
11302 let _response = fidl::client::decode_transaction_body::<
11303 NodeDeprecatedSetFlagsResponse,
11304 fdomain_client::fidl::FDomainResourceDialect,
11305 0x5295b76c71fde733,
11306 >(_buf?)?;
11307 Ok(_response.s)
11308 }
11309 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
11310 (flags,),
11311 0x5295b76c71fde733,
11312 fidl::encoding::DynamicFlags::empty(),
11313 _decode,
11314 )
11315 }
11316
11317 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
11318 NodeGetFlagsResult,
11319 fdomain_client::fidl::FDomainResourceDialect,
11320 >;
11321 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
11322 fn _decode(
11323 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11324 ) -> Result<NodeGetFlagsResult, fidl::Error> {
11325 let _response = fidl::client::decode_transaction_body::<
11326 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
11327 fdomain_client::fidl::FDomainResourceDialect,
11328 0x176eb318f64ec23,
11329 >(_buf?)?
11330 .into_result_fdomain::<NodeMarker>("get_flags")?;
11331 Ok(_response.map(|x| x.flags))
11332 }
11333 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
11334 (),
11335 0x176eb318f64ec23,
11336 fidl::encoding::DynamicFlags::FLEXIBLE,
11337 _decode,
11338 )
11339 }
11340
11341 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
11342 NodeSetFlagsResult,
11343 fdomain_client::fidl::FDomainResourceDialect,
11344 >;
11345 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
11346 fn _decode(
11347 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11348 ) -> Result<NodeSetFlagsResult, fidl::Error> {
11349 let _response = fidl::client::decode_transaction_body::<
11350 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
11351 fdomain_client::fidl::FDomainResourceDialect,
11352 0x55a8028685791ea8,
11353 >(_buf?)?
11354 .into_result_fdomain::<NodeMarker>("set_flags")?;
11355 Ok(_response.map(|x| x))
11356 }
11357 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
11358 (flags,),
11359 0x55a8028685791ea8,
11360 fidl::encoding::DynamicFlags::FLEXIBLE,
11361 _decode,
11362 )
11363 }
11364
11365 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
11366 (i32, Option<Box<FilesystemInfo>>),
11367 fdomain_client::fidl::FDomainResourceDialect,
11368 >;
11369 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
11370 fn _decode(
11371 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11372 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
11373 let _response = fidl::client::decode_transaction_body::<
11374 NodeQueryFilesystemResponse,
11375 fdomain_client::fidl::FDomainResourceDialect,
11376 0x6f344a1c6b0a0610,
11377 >(_buf?)?;
11378 Ok((_response.s, _response.info))
11379 }
11380 self.client.send_query_and_decode::<
11381 fidl::encoding::EmptyPayload,
11382 (i32, Option<Box<FilesystemInfo>>),
11383 >(
11384 (),
11385 0x6f344a1c6b0a0610,
11386 fidl::encoding::DynamicFlags::empty(),
11387 _decode,
11388 )
11389 }
11390
11391 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
11392 NodeGetAttributesResult,
11393 fdomain_client::fidl::FDomainResourceDialect,
11394 >;
11395 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
11396 fn _decode(
11397 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11398 ) -> Result<NodeGetAttributesResult, fidl::Error> {
11399 let _response = fidl::client::decode_transaction_body::<
11400 fidl::encoding::ResultType<NodeAttributes2, i32>,
11401 fdomain_client::fidl::FDomainResourceDialect,
11402 0x3d4396a638ea053b,
11403 >(_buf?)?;
11404 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
11405 }
11406 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
11407 (query,),
11408 0x3d4396a638ea053b,
11409 fidl::encoding::DynamicFlags::empty(),
11410 _decode,
11411 )
11412 }
11413
11414 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
11415 NodeUpdateAttributesResult,
11416 fdomain_client::fidl::FDomainResourceDialect,
11417 >;
11418 fn r#update_attributes(
11419 &self,
11420 mut payload: &MutableNodeAttributes,
11421 ) -> Self::UpdateAttributesResponseFut {
11422 fn _decode(
11423 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11424 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
11425 let _response = fidl::client::decode_transaction_body::<
11426 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11427 fdomain_client::fidl::FDomainResourceDialect,
11428 0x3308c1da5a89bf08,
11429 >(_buf?)?;
11430 Ok(_response.map(|x| x))
11431 }
11432 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
11433 payload,
11434 0x3308c1da5a89bf08,
11435 fidl::encoding::DynamicFlags::empty(),
11436 _decode,
11437 )
11438 }
11439
11440 type SyncResponseFut = fidl::client::QueryResponseFut<
11441 NodeSyncResult,
11442 fdomain_client::fidl::FDomainResourceDialect,
11443 >;
11444 fn r#sync(&self) -> Self::SyncResponseFut {
11445 fn _decode(
11446 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11447 ) -> Result<NodeSyncResult, fidl::Error> {
11448 let _response = fidl::client::decode_transaction_body::<
11449 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11450 fdomain_client::fidl::FDomainResourceDialect,
11451 0x2c5c27ca0ab5dc49,
11452 >(_buf?)?;
11453 Ok(_response.map(|x| x))
11454 }
11455 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
11456 (),
11457 0x2c5c27ca0ab5dc49,
11458 fidl::encoding::DynamicFlags::empty(),
11459 _decode,
11460 )
11461 }
11462
11463 fn r#list_extended_attributes(
11464 &self,
11465 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11466 ) -> Result<(), fidl::Error> {
11467 self.client.send::<NodeListExtendedAttributesRequest>(
11468 (iterator,),
11469 0x4b61033de007fcd0,
11470 fidl::encoding::DynamicFlags::empty(),
11471 )
11472 }
11473
11474 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11475 NodeGetExtendedAttributeResult,
11476 fdomain_client::fidl::FDomainResourceDialect,
11477 >;
11478 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
11479 fn _decode(
11480 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11481 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
11482 let _response = fidl::client::decode_transaction_body::<
11483 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
11484 fdomain_client::fidl::FDomainResourceDialect,
11485 0x45ffa3ccfdeb76db,
11486 >(_buf?)?;
11487 Ok(_response.map(|x| x))
11488 }
11489 self.client.send_query_and_decode::<
11490 NodeGetExtendedAttributeRequest,
11491 NodeGetExtendedAttributeResult,
11492 >(
11493 (name,),
11494 0x45ffa3ccfdeb76db,
11495 fidl::encoding::DynamicFlags::empty(),
11496 _decode,
11497 )
11498 }
11499
11500 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11501 NodeSetExtendedAttributeResult,
11502 fdomain_client::fidl::FDomainResourceDialect,
11503 >;
11504 fn r#set_extended_attribute(
11505 &self,
11506 mut name: &[u8],
11507 mut value: ExtendedAttributeValue,
11508 mut mode: SetExtendedAttributeMode,
11509 ) -> Self::SetExtendedAttributeResponseFut {
11510 fn _decode(
11511 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11512 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
11513 let _response = fidl::client::decode_transaction_body::<
11514 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11515 fdomain_client::fidl::FDomainResourceDialect,
11516 0x4a951362f681f23c,
11517 >(_buf?)?;
11518 Ok(_response.map(|x| x))
11519 }
11520 self.client.send_query_and_decode::<
11521 NodeSetExtendedAttributeRequest,
11522 NodeSetExtendedAttributeResult,
11523 >(
11524 (name, &mut value, mode,),
11525 0x4a951362f681f23c,
11526 fidl::encoding::DynamicFlags::empty(),
11527 _decode,
11528 )
11529 }
11530
11531 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11532 NodeRemoveExtendedAttributeResult,
11533 fdomain_client::fidl::FDomainResourceDialect,
11534 >;
11535 fn r#remove_extended_attribute(
11536 &self,
11537 mut name: &[u8],
11538 ) -> Self::RemoveExtendedAttributeResponseFut {
11539 fn _decode(
11540 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11541 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
11542 let _response = fidl::client::decode_transaction_body::<
11543 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11544 fdomain_client::fidl::FDomainResourceDialect,
11545 0x7a0b9f3a9bf9032d,
11546 >(_buf?)?;
11547 Ok(_response.map(|x| x))
11548 }
11549 self.client.send_query_and_decode::<
11550 NodeRemoveExtendedAttributeRequest,
11551 NodeRemoveExtendedAttributeResult,
11552 >(
11553 (name,),
11554 0x7a0b9f3a9bf9032d,
11555 fidl::encoding::DynamicFlags::empty(),
11556 _decode,
11557 )
11558 }
11559}
11560
11561pub struct NodeEventStream {
11562 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
11563}
11564
11565impl std::marker::Unpin for NodeEventStream {}
11566
11567impl futures::stream::FusedStream for NodeEventStream {
11568 fn is_terminated(&self) -> bool {
11569 self.event_receiver.is_terminated()
11570 }
11571}
11572
11573impl futures::Stream for NodeEventStream {
11574 type Item = Result<NodeEvent, fidl::Error>;
11575
11576 fn poll_next(
11577 mut self: std::pin::Pin<&mut Self>,
11578 cx: &mut std::task::Context<'_>,
11579 ) -> std::task::Poll<Option<Self::Item>> {
11580 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
11581 &mut self.event_receiver,
11582 cx
11583 )?) {
11584 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
11585 None => std::task::Poll::Ready(None),
11586 }
11587 }
11588}
11589
11590#[derive(Debug)]
11591pub enum NodeEvent {
11592 OnOpen_ {
11593 s: i32,
11594 info: Option<Box<NodeInfoDeprecated>>,
11595 },
11596 OnRepresentation {
11597 payload: Representation,
11598 },
11599 #[non_exhaustive]
11600 _UnknownEvent {
11601 ordinal: u64,
11603 },
11604}
11605
11606impl NodeEvent {
11607 #[allow(irrefutable_let_patterns)]
11608 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
11609 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
11610 }
11611 #[allow(irrefutable_let_patterns)]
11612 pub fn into_on_representation(self) -> Option<Representation> {
11613 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
11614 }
11615
11616 fn decode(
11618 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
11619 ) -> Result<NodeEvent, fidl::Error> {
11620 let (bytes, _handles) = buf.split_mut();
11621 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11622 debug_assert_eq!(tx_header.tx_id, 0);
11623 match tx_header.ordinal {
11624 0x7fc7bbb1dbfd1972 => {
11625 let mut out = fidl::new_empty!(
11626 NodeOnOpenRequest,
11627 fdomain_client::fidl::FDomainResourceDialect
11628 );
11629 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
11630 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
11631 }
11632 0x5cb40567d80a510c => {
11633 let mut out =
11634 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
11635 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
11636 Ok((NodeEvent::OnRepresentation { payload: out }))
11637 }
11638 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
11639 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
11640 }
11641 _ => Err(fidl::Error::UnknownOrdinal {
11642 ordinal: tx_header.ordinal,
11643 protocol_name: <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
11644 }),
11645 }
11646 }
11647}
11648
11649pub struct NodeRequestStream {
11651 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11652 is_terminated: bool,
11653}
11654
11655impl std::marker::Unpin for NodeRequestStream {}
11656
11657impl futures::stream::FusedStream for NodeRequestStream {
11658 fn is_terminated(&self) -> bool {
11659 self.is_terminated
11660 }
11661}
11662
11663impl fdomain_client::fidl::RequestStream for NodeRequestStream {
11664 type Protocol = NodeMarker;
11665 type ControlHandle = NodeControlHandle;
11666
11667 fn from_channel(channel: fdomain_client::Channel) -> Self {
11668 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
11669 }
11670
11671 fn control_handle(&self) -> Self::ControlHandle {
11672 NodeControlHandle { inner: self.inner.clone() }
11673 }
11674
11675 fn into_inner(
11676 self,
11677 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
11678 {
11679 (self.inner, self.is_terminated)
11680 }
11681
11682 fn from_inner(
11683 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11684 is_terminated: bool,
11685 ) -> Self {
11686 Self { inner, is_terminated }
11687 }
11688}
11689
11690impl futures::Stream for NodeRequestStream {
11691 type Item = Result<NodeRequest, fidl::Error>;
11692
11693 fn poll_next(
11694 mut self: std::pin::Pin<&mut Self>,
11695 cx: &mut std::task::Context<'_>,
11696 ) -> std::task::Poll<Option<Self::Item>> {
11697 let this = &mut *self;
11698 if this.inner.check_shutdown(cx) {
11699 this.is_terminated = true;
11700 return std::task::Poll::Ready(None);
11701 }
11702 if this.is_terminated {
11703 panic!("polled NodeRequestStream after completion");
11704 }
11705 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
11706 |bytes, handles| {
11707 match this.inner.channel().read_etc(cx, bytes, handles) {
11708 std::task::Poll::Ready(Ok(())) => {}
11709 std::task::Poll::Pending => return std::task::Poll::Pending,
11710 std::task::Poll::Ready(Err(None)) => {
11711 this.is_terminated = true;
11712 return std::task::Poll::Ready(None);
11713 }
11714 std::task::Poll::Ready(Err(Some(e))) => {
11715 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
11716 e.into(),
11717 ))));
11718 }
11719 }
11720
11721 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11723
11724 std::task::Poll::Ready(Some(match header.ordinal {
11725 0x20d8a7aba2168a79 => {
11726 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11727 let mut req = fidl::new_empty!(
11728 fdomain_fuchsia_unknown::CloneableCloneRequest,
11729 fdomain_client::fidl::FDomainResourceDialect
11730 );
11731 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11732 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11733 Ok(NodeRequest::Clone { request: req.request, control_handle })
11734 }
11735 0x5ac5d459ad7f657e => {
11736 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11737 let mut req = fidl::new_empty!(
11738 fidl::encoding::EmptyPayload,
11739 fdomain_client::fidl::FDomainResourceDialect
11740 );
11741 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11742 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11743 Ok(NodeRequest::Close {
11744 responder: NodeCloseResponder {
11745 control_handle: std::mem::ManuallyDrop::new(control_handle),
11746 tx_id: header.tx_id,
11747 },
11748 })
11749 }
11750 0x2658edee9decfc06 => {
11751 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11752 let mut req = fidl::new_empty!(
11753 fidl::encoding::EmptyPayload,
11754 fdomain_client::fidl::FDomainResourceDialect
11755 );
11756 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11757 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11758 Ok(NodeRequest::Query {
11759 responder: NodeQueryResponder {
11760 control_handle: std::mem::ManuallyDrop::new(control_handle),
11761 tx_id: header.tx_id,
11762 },
11763 })
11764 }
11765 0x5a61678f293ce16f => {
11766 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11767 let mut req = fidl::new_empty!(
11768 NodeDeprecatedCloneRequest,
11769 fdomain_client::fidl::FDomainResourceDialect
11770 );
11771 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11772 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11773 Ok(NodeRequest::DeprecatedClone {
11774 flags: req.flags,
11775 object: req.object,
11776
11777 control_handle,
11778 })
11779 }
11780 0x78985e216314dafd => {
11781 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11782 let mut req = fidl::new_empty!(
11783 fidl::encoding::EmptyPayload,
11784 fdomain_client::fidl::FDomainResourceDialect
11785 );
11786 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11787 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11788 Ok(NodeRequest::DeprecatedGetAttr {
11789 responder: NodeDeprecatedGetAttrResponder {
11790 control_handle: std::mem::ManuallyDrop::new(control_handle),
11791 tx_id: header.tx_id,
11792 },
11793 })
11794 }
11795 0x4186c0f40d938f46 => {
11796 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11797 let mut req = fidl::new_empty!(
11798 NodeDeprecatedSetAttrRequest,
11799 fdomain_client::fidl::FDomainResourceDialect
11800 );
11801 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
11802 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11803 Ok(NodeRequest::DeprecatedSetAttr {
11804 flags: req.flags,
11805 attributes: req.attributes,
11806
11807 responder: NodeDeprecatedSetAttrResponder {
11808 control_handle: std::mem::ManuallyDrop::new(control_handle),
11809 tx_id: header.tx_id,
11810 },
11811 })
11812 }
11813 0x5b88fffb8eda3aa1 => {
11814 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11815 let mut req = fidl::new_empty!(
11816 fidl::encoding::EmptyPayload,
11817 fdomain_client::fidl::FDomainResourceDialect
11818 );
11819 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11820 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11821 Ok(NodeRequest::DeprecatedGetFlags {
11822 responder: NodeDeprecatedGetFlagsResponder {
11823 control_handle: std::mem::ManuallyDrop::new(control_handle),
11824 tx_id: header.tx_id,
11825 },
11826 })
11827 }
11828 0x5295b76c71fde733 => {
11829 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11830 let mut req = fidl::new_empty!(
11831 NodeDeprecatedSetFlagsRequest,
11832 fdomain_client::fidl::FDomainResourceDialect
11833 );
11834 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11835 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11836 Ok(NodeRequest::DeprecatedSetFlags {
11837 flags: req.flags,
11838
11839 responder: NodeDeprecatedSetFlagsResponder {
11840 control_handle: std::mem::ManuallyDrop::new(control_handle),
11841 tx_id: header.tx_id,
11842 },
11843 })
11844 }
11845 0x176eb318f64ec23 => {
11846 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11847 let mut req = fidl::new_empty!(
11848 fidl::encoding::EmptyPayload,
11849 fdomain_client::fidl::FDomainResourceDialect
11850 );
11851 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11852 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11853 Ok(NodeRequest::GetFlags {
11854 responder: NodeGetFlagsResponder {
11855 control_handle: std::mem::ManuallyDrop::new(control_handle),
11856 tx_id: header.tx_id,
11857 },
11858 })
11859 }
11860 0x55a8028685791ea8 => {
11861 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11862 let mut req = fidl::new_empty!(
11863 NodeSetFlagsRequest,
11864 fdomain_client::fidl::FDomainResourceDialect
11865 );
11866 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11867 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11868 Ok(NodeRequest::SetFlags {
11869 flags: req.flags,
11870
11871 responder: NodeSetFlagsResponder {
11872 control_handle: std::mem::ManuallyDrop::new(control_handle),
11873 tx_id: header.tx_id,
11874 },
11875 })
11876 }
11877 0x6f344a1c6b0a0610 => {
11878 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11879 let mut req = fidl::new_empty!(
11880 fidl::encoding::EmptyPayload,
11881 fdomain_client::fidl::FDomainResourceDialect
11882 );
11883 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11884 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11885 Ok(NodeRequest::QueryFilesystem {
11886 responder: NodeQueryFilesystemResponder {
11887 control_handle: std::mem::ManuallyDrop::new(control_handle),
11888 tx_id: header.tx_id,
11889 },
11890 })
11891 }
11892 0x3d4396a638ea053b => {
11893 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11894 let mut req = fidl::new_empty!(
11895 NodeGetAttributesRequest,
11896 fdomain_client::fidl::FDomainResourceDialect
11897 );
11898 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11899 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11900 Ok(NodeRequest::GetAttributes {
11901 query: req.query,
11902
11903 responder: NodeGetAttributesResponder {
11904 control_handle: std::mem::ManuallyDrop::new(control_handle),
11905 tx_id: header.tx_id,
11906 },
11907 })
11908 }
11909 0x3308c1da5a89bf08 => {
11910 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11911 let mut req = fidl::new_empty!(
11912 MutableNodeAttributes,
11913 fdomain_client::fidl::FDomainResourceDialect
11914 );
11915 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
11916 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11917 Ok(NodeRequest::UpdateAttributes {
11918 payload: req,
11919 responder: NodeUpdateAttributesResponder {
11920 control_handle: std::mem::ManuallyDrop::new(control_handle),
11921 tx_id: header.tx_id,
11922 },
11923 })
11924 }
11925 0x2c5c27ca0ab5dc49 => {
11926 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11927 let mut req = fidl::new_empty!(
11928 fidl::encoding::EmptyPayload,
11929 fdomain_client::fidl::FDomainResourceDialect
11930 );
11931 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11932 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11933 Ok(NodeRequest::Sync {
11934 responder: NodeSyncResponder {
11935 control_handle: std::mem::ManuallyDrop::new(control_handle),
11936 tx_id: header.tx_id,
11937 },
11938 })
11939 }
11940 0x4b61033de007fcd0 => {
11941 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11942 let mut req = fidl::new_empty!(
11943 NodeListExtendedAttributesRequest,
11944 fdomain_client::fidl::FDomainResourceDialect
11945 );
11946 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11947 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11948 Ok(NodeRequest::ListExtendedAttributes {
11949 iterator: req.iterator,
11950
11951 control_handle,
11952 })
11953 }
11954 0x45ffa3ccfdeb76db => {
11955 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11956 let mut req = fidl::new_empty!(
11957 NodeGetExtendedAttributeRequest,
11958 fdomain_client::fidl::FDomainResourceDialect
11959 );
11960 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11961 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11962 Ok(NodeRequest::GetExtendedAttribute {
11963 name: req.name,
11964
11965 responder: NodeGetExtendedAttributeResponder {
11966 control_handle: std::mem::ManuallyDrop::new(control_handle),
11967 tx_id: header.tx_id,
11968 },
11969 })
11970 }
11971 0x4a951362f681f23c => {
11972 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11973 let mut req = fidl::new_empty!(
11974 NodeSetExtendedAttributeRequest,
11975 fdomain_client::fidl::FDomainResourceDialect
11976 );
11977 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11978 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11979 Ok(NodeRequest::SetExtendedAttribute {
11980 name: req.name,
11981 value: req.value,
11982 mode: req.mode,
11983
11984 responder: NodeSetExtendedAttributeResponder {
11985 control_handle: std::mem::ManuallyDrop::new(control_handle),
11986 tx_id: header.tx_id,
11987 },
11988 })
11989 }
11990 0x7a0b9f3a9bf9032d => {
11991 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11992 let mut req = fidl::new_empty!(
11993 NodeRemoveExtendedAttributeRequest,
11994 fdomain_client::fidl::FDomainResourceDialect
11995 );
11996 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11997 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11998 Ok(NodeRequest::RemoveExtendedAttribute {
11999 name: req.name,
12000
12001 responder: NodeRemoveExtendedAttributeResponder {
12002 control_handle: std::mem::ManuallyDrop::new(control_handle),
12003 tx_id: header.tx_id,
12004 },
12005 })
12006 }
12007 _ if header.tx_id == 0
12008 && header
12009 .dynamic_flags()
12010 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12011 {
12012 Ok(NodeRequest::_UnknownMethod {
12013 ordinal: header.ordinal,
12014 control_handle: NodeControlHandle { inner: this.inner.clone() },
12015 method_type: fidl::MethodType::OneWay,
12016 })
12017 }
12018 _ if header
12019 .dynamic_flags()
12020 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12021 {
12022 this.inner.send_framework_err(
12023 fidl::encoding::FrameworkErr::UnknownMethod,
12024 header.tx_id,
12025 header.ordinal,
12026 header.dynamic_flags(),
12027 (bytes, handles),
12028 )?;
12029 Ok(NodeRequest::_UnknownMethod {
12030 ordinal: header.ordinal,
12031 control_handle: NodeControlHandle { inner: this.inner.clone() },
12032 method_type: fidl::MethodType::TwoWay,
12033 })
12034 }
12035 _ => Err(fidl::Error::UnknownOrdinal {
12036 ordinal: header.ordinal,
12037 protocol_name:
12038 <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
12039 }),
12040 }))
12041 },
12042 )
12043 }
12044}
12045
12046#[derive(Debug)]
12048pub enum NodeRequest {
12049 Clone {
12050 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12051 control_handle: NodeControlHandle,
12052 },
12053 Close {
12064 responder: NodeCloseResponder,
12065 },
12066 Query {
12067 responder: NodeQueryResponder,
12068 },
12069 DeprecatedClone {
12071 flags: OpenFlags,
12072 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
12073 control_handle: NodeControlHandle,
12074 },
12075 DeprecatedGetAttr {
12077 responder: NodeDeprecatedGetAttrResponder,
12078 },
12079 DeprecatedSetAttr {
12081 flags: NodeAttributeFlags,
12082 attributes: NodeAttributes,
12083 responder: NodeDeprecatedSetAttrResponder,
12084 },
12085 DeprecatedGetFlags {
12087 responder: NodeDeprecatedGetFlagsResponder,
12088 },
12089 DeprecatedSetFlags {
12091 flags: OpenFlags,
12092 responder: NodeDeprecatedSetFlagsResponder,
12093 },
12094 GetFlags {
12103 responder: NodeGetFlagsResponder,
12104 },
12105 SetFlags {
12115 flags: Flags,
12116 responder: NodeSetFlagsResponder,
12117 },
12118 QueryFilesystem {
12120 responder: NodeQueryFilesystemResponder,
12121 },
12122 GetAttributes {
12136 query: NodeAttributesQuery,
12137 responder: NodeGetAttributesResponder,
12138 },
12139 UpdateAttributes {
12148 payload: MutableNodeAttributes,
12149 responder: NodeUpdateAttributesResponder,
12150 },
12151 Sync {
12161 responder: NodeSyncResponder,
12162 },
12163 ListExtendedAttributes {
12172 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
12173 control_handle: NodeControlHandle,
12174 },
12175 GetExtendedAttribute {
12182 name: Vec<u8>,
12183 responder: NodeGetExtendedAttributeResponder,
12184 },
12185 SetExtendedAttribute {
12193 name: Vec<u8>,
12194 value: ExtendedAttributeValue,
12195 mode: SetExtendedAttributeMode,
12196 responder: NodeSetExtendedAttributeResponder,
12197 },
12198 RemoveExtendedAttribute {
12204 name: Vec<u8>,
12205 responder: NodeRemoveExtendedAttributeResponder,
12206 },
12207 #[non_exhaustive]
12209 _UnknownMethod {
12210 ordinal: u64,
12212 control_handle: NodeControlHandle,
12213 method_type: fidl::MethodType,
12214 },
12215}
12216
12217impl NodeRequest {
12218 #[allow(irrefutable_let_patterns)]
12219 pub fn into_clone(
12220 self,
12221 ) -> Option<(
12222 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12223 NodeControlHandle,
12224 )> {
12225 if let NodeRequest::Clone { request, control_handle } = self {
12226 Some((request, control_handle))
12227 } else {
12228 None
12229 }
12230 }
12231
12232 #[allow(irrefutable_let_patterns)]
12233 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
12234 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
12235 }
12236
12237 #[allow(irrefutable_let_patterns)]
12238 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
12239 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
12240 }
12241
12242 #[allow(irrefutable_let_patterns)]
12243 pub fn into_deprecated_clone(
12244 self,
12245 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, NodeControlHandle)> {
12246 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
12247 Some((flags, object, control_handle))
12248 } else {
12249 None
12250 }
12251 }
12252
12253 #[allow(irrefutable_let_patterns)]
12254 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
12255 if let NodeRequest::DeprecatedGetAttr { responder } = self {
12256 Some((responder))
12257 } else {
12258 None
12259 }
12260 }
12261
12262 #[allow(irrefutable_let_patterns)]
12263 pub fn into_deprecated_set_attr(
12264 self,
12265 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
12266 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
12267 Some((flags, attributes, responder))
12268 } else {
12269 None
12270 }
12271 }
12272
12273 #[allow(irrefutable_let_patterns)]
12274 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
12275 if let NodeRequest::DeprecatedGetFlags { responder } = self {
12276 Some((responder))
12277 } else {
12278 None
12279 }
12280 }
12281
12282 #[allow(irrefutable_let_patterns)]
12283 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
12284 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
12285 Some((flags, responder))
12286 } else {
12287 None
12288 }
12289 }
12290
12291 #[allow(irrefutable_let_patterns)]
12292 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
12293 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
12294 }
12295
12296 #[allow(irrefutable_let_patterns)]
12297 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
12298 if let NodeRequest::SetFlags { flags, responder } = self {
12299 Some((flags, responder))
12300 } else {
12301 None
12302 }
12303 }
12304
12305 #[allow(irrefutable_let_patterns)]
12306 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
12307 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
12308 }
12309
12310 #[allow(irrefutable_let_patterns)]
12311 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
12312 if let NodeRequest::GetAttributes { query, responder } = self {
12313 Some((query, responder))
12314 } else {
12315 None
12316 }
12317 }
12318
12319 #[allow(irrefutable_let_patterns)]
12320 pub fn into_update_attributes(
12321 self,
12322 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
12323 if let NodeRequest::UpdateAttributes { payload, responder } = self {
12324 Some((payload, responder))
12325 } else {
12326 None
12327 }
12328 }
12329
12330 #[allow(irrefutable_let_patterns)]
12331 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
12332 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
12333 }
12334
12335 #[allow(irrefutable_let_patterns)]
12336 pub fn into_list_extended_attributes(
12337 self,
12338 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
12339 {
12340 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
12341 Some((iterator, control_handle))
12342 } else {
12343 None
12344 }
12345 }
12346
12347 #[allow(irrefutable_let_patterns)]
12348 pub fn into_get_extended_attribute(
12349 self,
12350 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
12351 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
12352 Some((name, responder))
12353 } else {
12354 None
12355 }
12356 }
12357
12358 #[allow(irrefutable_let_patterns)]
12359 pub fn into_set_extended_attribute(
12360 self,
12361 ) -> Option<(
12362 Vec<u8>,
12363 ExtendedAttributeValue,
12364 SetExtendedAttributeMode,
12365 NodeSetExtendedAttributeResponder,
12366 )> {
12367 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
12368 Some((name, value, mode, responder))
12369 } else {
12370 None
12371 }
12372 }
12373
12374 #[allow(irrefutable_let_patterns)]
12375 pub fn into_remove_extended_attribute(
12376 self,
12377 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
12378 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
12379 Some((name, responder))
12380 } else {
12381 None
12382 }
12383 }
12384
12385 pub fn method_name(&self) -> &'static str {
12387 match *self {
12388 NodeRequest::Clone { .. } => "clone",
12389 NodeRequest::Close { .. } => "close",
12390 NodeRequest::Query { .. } => "query",
12391 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
12392 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
12393 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
12394 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
12395 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
12396 NodeRequest::GetFlags { .. } => "get_flags",
12397 NodeRequest::SetFlags { .. } => "set_flags",
12398 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
12399 NodeRequest::GetAttributes { .. } => "get_attributes",
12400 NodeRequest::UpdateAttributes { .. } => "update_attributes",
12401 NodeRequest::Sync { .. } => "sync",
12402 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
12403 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
12404 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
12405 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
12406 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
12407 "unknown one-way method"
12408 }
12409 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
12410 "unknown two-way method"
12411 }
12412 }
12413 }
12414}
12415
12416#[derive(Debug, Clone)]
12417pub struct NodeControlHandle {
12418 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
12419}
12420
12421impl fdomain_client::fidl::ControlHandle for NodeControlHandle {
12422 fn shutdown(&self) {
12423 self.inner.shutdown()
12424 }
12425
12426 fn is_closed(&self) -> bool {
12427 self.inner.channel().is_closed()
12428 }
12429 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
12430 self.inner.channel().on_closed()
12431 }
12432}
12433
12434impl NodeControlHandle {
12435 pub fn send_on_open_(
12436 &self,
12437 mut s: i32,
12438 mut info: Option<NodeInfoDeprecated>,
12439 ) -> Result<(), fidl::Error> {
12440 self.inner.send::<NodeOnOpenRequest>(
12441 (s, info.as_mut()),
12442 0,
12443 0x7fc7bbb1dbfd1972,
12444 fidl::encoding::DynamicFlags::FLEXIBLE,
12445 )
12446 }
12447
12448 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
12449 self.inner.send::<Representation>(
12450 &mut payload,
12451 0,
12452 0x5cb40567d80a510c,
12453 fidl::encoding::DynamicFlags::empty(),
12454 )
12455 }
12456}
12457
12458#[must_use = "FIDL methods require a response to be sent"]
12459#[derive(Debug)]
12460pub struct NodeCloseResponder {
12461 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12462 tx_id: u32,
12463}
12464
12465impl std::ops::Drop for NodeCloseResponder {
12469 fn drop(&mut self) {
12470 self.control_handle.shutdown();
12471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12473 }
12474}
12475
12476impl fdomain_client::fidl::Responder for NodeCloseResponder {
12477 type ControlHandle = NodeControlHandle;
12478
12479 fn control_handle(&self) -> &NodeControlHandle {
12480 &self.control_handle
12481 }
12482
12483 fn drop_without_shutdown(mut self) {
12484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12486 std::mem::forget(self);
12488 }
12489}
12490
12491impl NodeCloseResponder {
12492 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12496 let _result = self.send_raw(result);
12497 if _result.is_err() {
12498 self.control_handle.shutdown();
12499 }
12500 self.drop_without_shutdown();
12501 _result
12502 }
12503
12504 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12506 let _result = self.send_raw(result);
12507 self.drop_without_shutdown();
12508 _result
12509 }
12510
12511 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12512 self.control_handle
12513 .inner
12514 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12515 result,
12516 self.tx_id,
12517 0x5ac5d459ad7f657e,
12518 fidl::encoding::DynamicFlags::empty(),
12519 )
12520 }
12521}
12522
12523#[must_use = "FIDL methods require a response to be sent"]
12524#[derive(Debug)]
12525pub struct NodeQueryResponder {
12526 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12527 tx_id: u32,
12528}
12529
12530impl std::ops::Drop for NodeQueryResponder {
12534 fn drop(&mut self) {
12535 self.control_handle.shutdown();
12536 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12538 }
12539}
12540
12541impl fdomain_client::fidl::Responder for NodeQueryResponder {
12542 type ControlHandle = NodeControlHandle;
12543
12544 fn control_handle(&self) -> &NodeControlHandle {
12545 &self.control_handle
12546 }
12547
12548 fn drop_without_shutdown(mut self) {
12549 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12551 std::mem::forget(self);
12553 }
12554}
12555
12556impl NodeQueryResponder {
12557 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12561 let _result = self.send_raw(protocol);
12562 if _result.is_err() {
12563 self.control_handle.shutdown();
12564 }
12565 self.drop_without_shutdown();
12566 _result
12567 }
12568
12569 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12571 let _result = self.send_raw(protocol);
12572 self.drop_without_shutdown();
12573 _result
12574 }
12575
12576 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12577 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
12578 (protocol,),
12579 self.tx_id,
12580 0x2658edee9decfc06,
12581 fidl::encoding::DynamicFlags::empty(),
12582 )
12583 }
12584}
12585
12586#[must_use = "FIDL methods require a response to be sent"]
12587#[derive(Debug)]
12588pub struct NodeDeprecatedGetAttrResponder {
12589 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12590 tx_id: u32,
12591}
12592
12593impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
12597 fn drop(&mut self) {
12598 self.control_handle.shutdown();
12599 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12601 }
12602}
12603
12604impl fdomain_client::fidl::Responder for NodeDeprecatedGetAttrResponder {
12605 type ControlHandle = NodeControlHandle;
12606
12607 fn control_handle(&self) -> &NodeControlHandle {
12608 &self.control_handle
12609 }
12610
12611 fn drop_without_shutdown(mut self) {
12612 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12614 std::mem::forget(self);
12616 }
12617}
12618
12619impl NodeDeprecatedGetAttrResponder {
12620 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12624 let _result = self.send_raw(s, attributes);
12625 if _result.is_err() {
12626 self.control_handle.shutdown();
12627 }
12628 self.drop_without_shutdown();
12629 _result
12630 }
12631
12632 pub fn send_no_shutdown_on_err(
12634 self,
12635 mut s: i32,
12636 mut attributes: &NodeAttributes,
12637 ) -> Result<(), fidl::Error> {
12638 let _result = self.send_raw(s, attributes);
12639 self.drop_without_shutdown();
12640 _result
12641 }
12642
12643 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12644 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
12645 (s, attributes),
12646 self.tx_id,
12647 0x78985e216314dafd,
12648 fidl::encoding::DynamicFlags::empty(),
12649 )
12650 }
12651}
12652
12653#[must_use = "FIDL methods require a response to be sent"]
12654#[derive(Debug)]
12655pub struct NodeDeprecatedSetAttrResponder {
12656 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12657 tx_id: u32,
12658}
12659
12660impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
12664 fn drop(&mut self) {
12665 self.control_handle.shutdown();
12666 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12668 }
12669}
12670
12671impl fdomain_client::fidl::Responder for NodeDeprecatedSetAttrResponder {
12672 type ControlHandle = NodeControlHandle;
12673
12674 fn control_handle(&self) -> &NodeControlHandle {
12675 &self.control_handle
12676 }
12677
12678 fn drop_without_shutdown(mut self) {
12679 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12681 std::mem::forget(self);
12683 }
12684}
12685
12686impl NodeDeprecatedSetAttrResponder {
12687 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12691 let _result = self.send_raw(s);
12692 if _result.is_err() {
12693 self.control_handle.shutdown();
12694 }
12695 self.drop_without_shutdown();
12696 _result
12697 }
12698
12699 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12701 let _result = self.send_raw(s);
12702 self.drop_without_shutdown();
12703 _result
12704 }
12705
12706 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12707 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
12708 (s,),
12709 self.tx_id,
12710 0x4186c0f40d938f46,
12711 fidl::encoding::DynamicFlags::empty(),
12712 )
12713 }
12714}
12715
12716#[must_use = "FIDL methods require a response to be sent"]
12717#[derive(Debug)]
12718pub struct NodeDeprecatedGetFlagsResponder {
12719 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12720 tx_id: u32,
12721}
12722
12723impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
12727 fn drop(&mut self) {
12728 self.control_handle.shutdown();
12729 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12731 }
12732}
12733
12734impl fdomain_client::fidl::Responder for NodeDeprecatedGetFlagsResponder {
12735 type ControlHandle = NodeControlHandle;
12736
12737 fn control_handle(&self) -> &NodeControlHandle {
12738 &self.control_handle
12739 }
12740
12741 fn drop_without_shutdown(mut self) {
12742 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12744 std::mem::forget(self);
12746 }
12747}
12748
12749impl NodeDeprecatedGetFlagsResponder {
12750 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12754 let _result = self.send_raw(s, flags);
12755 if _result.is_err() {
12756 self.control_handle.shutdown();
12757 }
12758 self.drop_without_shutdown();
12759 _result
12760 }
12761
12762 pub fn send_no_shutdown_on_err(
12764 self,
12765 mut s: i32,
12766 mut flags: OpenFlags,
12767 ) -> Result<(), fidl::Error> {
12768 let _result = self.send_raw(s, flags);
12769 self.drop_without_shutdown();
12770 _result
12771 }
12772
12773 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12774 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
12775 (s, flags),
12776 self.tx_id,
12777 0x5b88fffb8eda3aa1,
12778 fidl::encoding::DynamicFlags::empty(),
12779 )
12780 }
12781}
12782
12783#[must_use = "FIDL methods require a response to be sent"]
12784#[derive(Debug)]
12785pub struct NodeDeprecatedSetFlagsResponder {
12786 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12787 tx_id: u32,
12788}
12789
12790impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
12794 fn drop(&mut self) {
12795 self.control_handle.shutdown();
12796 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12798 }
12799}
12800
12801impl fdomain_client::fidl::Responder for NodeDeprecatedSetFlagsResponder {
12802 type ControlHandle = NodeControlHandle;
12803
12804 fn control_handle(&self) -> &NodeControlHandle {
12805 &self.control_handle
12806 }
12807
12808 fn drop_without_shutdown(mut self) {
12809 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12811 std::mem::forget(self);
12813 }
12814}
12815
12816impl NodeDeprecatedSetFlagsResponder {
12817 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12821 let _result = self.send_raw(s);
12822 if _result.is_err() {
12823 self.control_handle.shutdown();
12824 }
12825 self.drop_without_shutdown();
12826 _result
12827 }
12828
12829 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12831 let _result = self.send_raw(s);
12832 self.drop_without_shutdown();
12833 _result
12834 }
12835
12836 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12837 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
12838 (s,),
12839 self.tx_id,
12840 0x5295b76c71fde733,
12841 fidl::encoding::DynamicFlags::empty(),
12842 )
12843 }
12844}
12845
12846#[must_use = "FIDL methods require a response to be sent"]
12847#[derive(Debug)]
12848pub struct NodeGetFlagsResponder {
12849 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12850 tx_id: u32,
12851}
12852
12853impl std::ops::Drop for NodeGetFlagsResponder {
12857 fn drop(&mut self) {
12858 self.control_handle.shutdown();
12859 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12861 }
12862}
12863
12864impl fdomain_client::fidl::Responder for NodeGetFlagsResponder {
12865 type ControlHandle = NodeControlHandle;
12866
12867 fn control_handle(&self) -> &NodeControlHandle {
12868 &self.control_handle
12869 }
12870
12871 fn drop_without_shutdown(mut self) {
12872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12874 std::mem::forget(self);
12876 }
12877}
12878
12879impl NodeGetFlagsResponder {
12880 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12884 let _result = self.send_raw(result);
12885 if _result.is_err() {
12886 self.control_handle.shutdown();
12887 }
12888 self.drop_without_shutdown();
12889 _result
12890 }
12891
12892 pub fn send_no_shutdown_on_err(
12894 self,
12895 mut result: Result<Flags, i32>,
12896 ) -> Result<(), fidl::Error> {
12897 let _result = self.send_raw(result);
12898 self.drop_without_shutdown();
12899 _result
12900 }
12901
12902 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12903 self.control_handle
12904 .inner
12905 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
12906 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
12907 self.tx_id,
12908 0x176eb318f64ec23,
12909 fidl::encoding::DynamicFlags::FLEXIBLE,
12910 )
12911 }
12912}
12913
12914#[must_use = "FIDL methods require a response to be sent"]
12915#[derive(Debug)]
12916pub struct NodeSetFlagsResponder {
12917 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12918 tx_id: u32,
12919}
12920
12921impl std::ops::Drop for NodeSetFlagsResponder {
12925 fn drop(&mut self) {
12926 self.control_handle.shutdown();
12927 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12929 }
12930}
12931
12932impl fdomain_client::fidl::Responder for NodeSetFlagsResponder {
12933 type ControlHandle = NodeControlHandle;
12934
12935 fn control_handle(&self) -> &NodeControlHandle {
12936 &self.control_handle
12937 }
12938
12939 fn drop_without_shutdown(mut self) {
12940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12942 std::mem::forget(self);
12944 }
12945}
12946
12947impl NodeSetFlagsResponder {
12948 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12952 let _result = self.send_raw(result);
12953 if _result.is_err() {
12954 self.control_handle.shutdown();
12955 }
12956 self.drop_without_shutdown();
12957 _result
12958 }
12959
12960 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12962 let _result = self.send_raw(result);
12963 self.drop_without_shutdown();
12964 _result
12965 }
12966
12967 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12968 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12969 fidl::encoding::EmptyStruct,
12970 i32,
12971 >>(
12972 fidl::encoding::FlexibleResult::new(result),
12973 self.tx_id,
12974 0x55a8028685791ea8,
12975 fidl::encoding::DynamicFlags::FLEXIBLE,
12976 )
12977 }
12978}
12979
12980#[must_use = "FIDL methods require a response to be sent"]
12981#[derive(Debug)]
12982pub struct NodeQueryFilesystemResponder {
12983 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12984 tx_id: u32,
12985}
12986
12987impl std::ops::Drop for NodeQueryFilesystemResponder {
12991 fn drop(&mut self) {
12992 self.control_handle.shutdown();
12993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12995 }
12996}
12997
12998impl fdomain_client::fidl::Responder for NodeQueryFilesystemResponder {
12999 type ControlHandle = NodeControlHandle;
13000
13001 fn control_handle(&self) -> &NodeControlHandle {
13002 &self.control_handle
13003 }
13004
13005 fn drop_without_shutdown(mut self) {
13006 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13008 std::mem::forget(self);
13010 }
13011}
13012
13013impl NodeQueryFilesystemResponder {
13014 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13018 let _result = self.send_raw(s, info);
13019 if _result.is_err() {
13020 self.control_handle.shutdown();
13021 }
13022 self.drop_without_shutdown();
13023 _result
13024 }
13025
13026 pub fn send_no_shutdown_on_err(
13028 self,
13029 mut s: i32,
13030 mut info: Option<&FilesystemInfo>,
13031 ) -> Result<(), fidl::Error> {
13032 let _result = self.send_raw(s, info);
13033 self.drop_without_shutdown();
13034 _result
13035 }
13036
13037 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13038 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
13039 (s, info),
13040 self.tx_id,
13041 0x6f344a1c6b0a0610,
13042 fidl::encoding::DynamicFlags::empty(),
13043 )
13044 }
13045}
13046
13047#[must_use = "FIDL methods require a response to be sent"]
13048#[derive(Debug)]
13049pub struct NodeGetAttributesResponder {
13050 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13051 tx_id: u32,
13052}
13053
13054impl std::ops::Drop for NodeGetAttributesResponder {
13058 fn drop(&mut self) {
13059 self.control_handle.shutdown();
13060 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13062 }
13063}
13064
13065impl fdomain_client::fidl::Responder for NodeGetAttributesResponder {
13066 type ControlHandle = NodeControlHandle;
13067
13068 fn control_handle(&self) -> &NodeControlHandle {
13069 &self.control_handle
13070 }
13071
13072 fn drop_without_shutdown(mut self) {
13073 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13075 std::mem::forget(self);
13077 }
13078}
13079
13080impl NodeGetAttributesResponder {
13081 pub fn send(
13085 self,
13086 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13087 ) -> Result<(), fidl::Error> {
13088 let _result = self.send_raw(result);
13089 if _result.is_err() {
13090 self.control_handle.shutdown();
13091 }
13092 self.drop_without_shutdown();
13093 _result
13094 }
13095
13096 pub fn send_no_shutdown_on_err(
13098 self,
13099 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13100 ) -> Result<(), fidl::Error> {
13101 let _result = self.send_raw(result);
13102 self.drop_without_shutdown();
13103 _result
13104 }
13105
13106 fn send_raw(
13107 &self,
13108 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13109 ) -> Result<(), fidl::Error> {
13110 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
13111 result,
13112 self.tx_id,
13113 0x3d4396a638ea053b,
13114 fidl::encoding::DynamicFlags::empty(),
13115 )
13116 }
13117}
13118
13119#[must_use = "FIDL methods require a response to be sent"]
13120#[derive(Debug)]
13121pub struct NodeUpdateAttributesResponder {
13122 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13123 tx_id: u32,
13124}
13125
13126impl std::ops::Drop for NodeUpdateAttributesResponder {
13130 fn drop(&mut self) {
13131 self.control_handle.shutdown();
13132 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13134 }
13135}
13136
13137impl fdomain_client::fidl::Responder for NodeUpdateAttributesResponder {
13138 type ControlHandle = NodeControlHandle;
13139
13140 fn control_handle(&self) -> &NodeControlHandle {
13141 &self.control_handle
13142 }
13143
13144 fn drop_without_shutdown(mut self) {
13145 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13147 std::mem::forget(self);
13149 }
13150}
13151
13152impl NodeUpdateAttributesResponder {
13153 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13157 let _result = self.send_raw(result);
13158 if _result.is_err() {
13159 self.control_handle.shutdown();
13160 }
13161 self.drop_without_shutdown();
13162 _result
13163 }
13164
13165 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13167 let _result = self.send_raw(result);
13168 self.drop_without_shutdown();
13169 _result
13170 }
13171
13172 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13173 self.control_handle
13174 .inner
13175 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13176 result,
13177 self.tx_id,
13178 0x3308c1da5a89bf08,
13179 fidl::encoding::DynamicFlags::empty(),
13180 )
13181 }
13182}
13183
13184#[must_use = "FIDL methods require a response to be sent"]
13185#[derive(Debug)]
13186pub struct NodeSyncResponder {
13187 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13188 tx_id: u32,
13189}
13190
13191impl std::ops::Drop for NodeSyncResponder {
13195 fn drop(&mut self) {
13196 self.control_handle.shutdown();
13197 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13199 }
13200}
13201
13202impl fdomain_client::fidl::Responder for NodeSyncResponder {
13203 type ControlHandle = NodeControlHandle;
13204
13205 fn control_handle(&self) -> &NodeControlHandle {
13206 &self.control_handle
13207 }
13208
13209 fn drop_without_shutdown(mut self) {
13210 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13212 std::mem::forget(self);
13214 }
13215}
13216
13217impl NodeSyncResponder {
13218 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13222 let _result = self.send_raw(result);
13223 if _result.is_err() {
13224 self.control_handle.shutdown();
13225 }
13226 self.drop_without_shutdown();
13227 _result
13228 }
13229
13230 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13232 let _result = self.send_raw(result);
13233 self.drop_without_shutdown();
13234 _result
13235 }
13236
13237 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13238 self.control_handle
13239 .inner
13240 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13241 result,
13242 self.tx_id,
13243 0x2c5c27ca0ab5dc49,
13244 fidl::encoding::DynamicFlags::empty(),
13245 )
13246 }
13247}
13248
13249#[must_use = "FIDL methods require a response to be sent"]
13250#[derive(Debug)]
13251pub struct NodeGetExtendedAttributeResponder {
13252 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13253 tx_id: u32,
13254}
13255
13256impl std::ops::Drop for NodeGetExtendedAttributeResponder {
13260 fn drop(&mut self) {
13261 self.control_handle.shutdown();
13262 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13264 }
13265}
13266
13267impl fdomain_client::fidl::Responder for NodeGetExtendedAttributeResponder {
13268 type ControlHandle = NodeControlHandle;
13269
13270 fn control_handle(&self) -> &NodeControlHandle {
13271 &self.control_handle
13272 }
13273
13274 fn drop_without_shutdown(mut self) {
13275 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13277 std::mem::forget(self);
13279 }
13280}
13281
13282impl NodeGetExtendedAttributeResponder {
13283 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13287 let _result = self.send_raw(result);
13288 if _result.is_err() {
13289 self.control_handle.shutdown();
13290 }
13291 self.drop_without_shutdown();
13292 _result
13293 }
13294
13295 pub fn send_no_shutdown_on_err(
13297 self,
13298 mut result: Result<ExtendedAttributeValue, i32>,
13299 ) -> Result<(), fidl::Error> {
13300 let _result = self.send_raw(result);
13301 self.drop_without_shutdown();
13302 _result
13303 }
13304
13305 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13306 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
13307 result.as_mut().map_err(|e| *e),
13308 self.tx_id,
13309 0x45ffa3ccfdeb76db,
13310 fidl::encoding::DynamicFlags::empty(),
13311 )
13312 }
13313}
13314
13315#[must_use = "FIDL methods require a response to be sent"]
13316#[derive(Debug)]
13317pub struct NodeSetExtendedAttributeResponder {
13318 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13319 tx_id: u32,
13320}
13321
13322impl std::ops::Drop for NodeSetExtendedAttributeResponder {
13326 fn drop(&mut self) {
13327 self.control_handle.shutdown();
13328 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13330 }
13331}
13332
13333impl fdomain_client::fidl::Responder for NodeSetExtendedAttributeResponder {
13334 type ControlHandle = NodeControlHandle;
13335
13336 fn control_handle(&self) -> &NodeControlHandle {
13337 &self.control_handle
13338 }
13339
13340 fn drop_without_shutdown(mut self) {
13341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13343 std::mem::forget(self);
13345 }
13346}
13347
13348impl NodeSetExtendedAttributeResponder {
13349 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13353 let _result = self.send_raw(result);
13354 if _result.is_err() {
13355 self.control_handle.shutdown();
13356 }
13357 self.drop_without_shutdown();
13358 _result
13359 }
13360
13361 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13363 let _result = self.send_raw(result);
13364 self.drop_without_shutdown();
13365 _result
13366 }
13367
13368 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13369 self.control_handle
13370 .inner
13371 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13372 result,
13373 self.tx_id,
13374 0x4a951362f681f23c,
13375 fidl::encoding::DynamicFlags::empty(),
13376 )
13377 }
13378}
13379
13380#[must_use = "FIDL methods require a response to be sent"]
13381#[derive(Debug)]
13382pub struct NodeRemoveExtendedAttributeResponder {
13383 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13384 tx_id: u32,
13385}
13386
13387impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
13391 fn drop(&mut self) {
13392 self.control_handle.shutdown();
13393 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13395 }
13396}
13397
13398impl fdomain_client::fidl::Responder for NodeRemoveExtendedAttributeResponder {
13399 type ControlHandle = NodeControlHandle;
13400
13401 fn control_handle(&self) -> &NodeControlHandle {
13402 &self.control_handle
13403 }
13404
13405 fn drop_without_shutdown(mut self) {
13406 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13408 std::mem::forget(self);
13410 }
13411}
13412
13413impl NodeRemoveExtendedAttributeResponder {
13414 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13418 let _result = self.send_raw(result);
13419 if _result.is_err() {
13420 self.control_handle.shutdown();
13421 }
13422 self.drop_without_shutdown();
13423 _result
13424 }
13425
13426 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13428 let _result = self.send_raw(result);
13429 self.drop_without_shutdown();
13430 _result
13431 }
13432
13433 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13434 self.control_handle
13435 .inner
13436 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13437 result,
13438 self.tx_id,
13439 0x7a0b9f3a9bf9032d,
13440 fidl::encoding::DynamicFlags::empty(),
13441 )
13442 }
13443}
13444
13445#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13446pub struct ReadableMarker;
13447
13448impl fdomain_client::fidl::ProtocolMarker for ReadableMarker {
13449 type Proxy = ReadableProxy;
13450 type RequestStream = ReadableRequestStream;
13451
13452 const DEBUG_NAME: &'static str = "(anonymous) Readable";
13453}
13454pub type ReadableReadResult = Result<Vec<u8>, i32>;
13455
13456pub trait ReadableProxyInterface: Send + Sync {
13457 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
13458 + Send;
13459 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
13460}
13461
13462#[derive(Debug, Clone)]
13463pub struct ReadableProxy {
13464 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13465}
13466
13467impl fdomain_client::fidl::Proxy for ReadableProxy {
13468 type Protocol = ReadableMarker;
13469
13470 fn from_channel(inner: fdomain_client::Channel) -> Self {
13471 Self::new(inner)
13472 }
13473
13474 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13475 self.client.into_channel().map_err(|client| Self { client })
13476 }
13477
13478 fn as_channel(&self) -> &fdomain_client::Channel {
13479 self.client.as_channel()
13480 }
13481}
13482
13483impl ReadableProxy {
13484 pub fn new(channel: fdomain_client::Channel) -> Self {
13486 let protocol_name = <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13487 Self { client: fidl::client::Client::new(channel, protocol_name) }
13488 }
13489
13490 pub fn take_event_stream(&self) -> ReadableEventStream {
13496 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
13497 }
13498
13499 pub fn r#read(
13518 &self,
13519 mut count: u64,
13520 ) -> fidl::client::QueryResponseFut<
13521 ReadableReadResult,
13522 fdomain_client::fidl::FDomainResourceDialect,
13523 > {
13524 ReadableProxyInterface::r#read(self, count)
13525 }
13526}
13527
13528impl ReadableProxyInterface for ReadableProxy {
13529 type ReadResponseFut = fidl::client::QueryResponseFut<
13530 ReadableReadResult,
13531 fdomain_client::fidl::FDomainResourceDialect,
13532 >;
13533 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
13534 fn _decode(
13535 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13536 ) -> Result<ReadableReadResult, fidl::Error> {
13537 let _response = fidl::client::decode_transaction_body::<
13538 fidl::encoding::ResultType<ReadableReadResponse, i32>,
13539 fdomain_client::fidl::FDomainResourceDialect,
13540 0x57e419a298c8ede,
13541 >(_buf?)?;
13542 Ok(_response.map(|x| x.data))
13543 }
13544 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
13545 (count,),
13546 0x57e419a298c8ede,
13547 fidl::encoding::DynamicFlags::empty(),
13548 _decode,
13549 )
13550 }
13551}
13552
13553pub struct ReadableEventStream {
13554 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13555}
13556
13557impl std::marker::Unpin for ReadableEventStream {}
13558
13559impl futures::stream::FusedStream for ReadableEventStream {
13560 fn is_terminated(&self) -> bool {
13561 self.event_receiver.is_terminated()
13562 }
13563}
13564
13565impl futures::Stream for ReadableEventStream {
13566 type Item = Result<ReadableEvent, fidl::Error>;
13567
13568 fn poll_next(
13569 mut self: std::pin::Pin<&mut Self>,
13570 cx: &mut std::task::Context<'_>,
13571 ) -> std::task::Poll<Option<Self::Item>> {
13572 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13573 &mut self.event_receiver,
13574 cx
13575 )?) {
13576 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
13577 None => std::task::Poll::Ready(None),
13578 }
13579 }
13580}
13581
13582#[derive(Debug)]
13583pub enum ReadableEvent {}
13584
13585impl ReadableEvent {
13586 fn decode(
13588 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13589 ) -> Result<ReadableEvent, fidl::Error> {
13590 let (bytes, _handles) = buf.split_mut();
13591 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13592 debug_assert_eq!(tx_header.tx_id, 0);
13593 match tx_header.ordinal {
13594 _ => Err(fidl::Error::UnknownOrdinal {
13595 ordinal: tx_header.ordinal,
13596 protocol_name: <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13597 }),
13598 }
13599 }
13600}
13601
13602pub struct ReadableRequestStream {
13604 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13605 is_terminated: bool,
13606}
13607
13608impl std::marker::Unpin for ReadableRequestStream {}
13609
13610impl futures::stream::FusedStream for ReadableRequestStream {
13611 fn is_terminated(&self) -> bool {
13612 self.is_terminated
13613 }
13614}
13615
13616impl fdomain_client::fidl::RequestStream for ReadableRequestStream {
13617 type Protocol = ReadableMarker;
13618 type ControlHandle = ReadableControlHandle;
13619
13620 fn from_channel(channel: fdomain_client::Channel) -> Self {
13621 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
13622 }
13623
13624 fn control_handle(&self) -> Self::ControlHandle {
13625 ReadableControlHandle { inner: self.inner.clone() }
13626 }
13627
13628 fn into_inner(
13629 self,
13630 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
13631 {
13632 (self.inner, self.is_terminated)
13633 }
13634
13635 fn from_inner(
13636 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13637 is_terminated: bool,
13638 ) -> Self {
13639 Self { inner, is_terminated }
13640 }
13641}
13642
13643impl futures::Stream for ReadableRequestStream {
13644 type Item = Result<ReadableRequest, fidl::Error>;
13645
13646 fn poll_next(
13647 mut self: std::pin::Pin<&mut Self>,
13648 cx: &mut std::task::Context<'_>,
13649 ) -> std::task::Poll<Option<Self::Item>> {
13650 let this = &mut *self;
13651 if this.inner.check_shutdown(cx) {
13652 this.is_terminated = true;
13653 return std::task::Poll::Ready(None);
13654 }
13655 if this.is_terminated {
13656 panic!("polled ReadableRequestStream after completion");
13657 }
13658 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
13659 |bytes, handles| {
13660 match this.inner.channel().read_etc(cx, bytes, handles) {
13661 std::task::Poll::Ready(Ok(())) => {}
13662 std::task::Poll::Pending => return std::task::Poll::Pending,
13663 std::task::Poll::Ready(Err(None)) => {
13664 this.is_terminated = true;
13665 return std::task::Poll::Ready(None);
13666 }
13667 std::task::Poll::Ready(Err(Some(e))) => {
13668 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
13669 e.into(),
13670 ))));
13671 }
13672 }
13673
13674 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13676
13677 std::task::Poll::Ready(Some(match header.ordinal {
13678 0x57e419a298c8ede => {
13679 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
13680 let mut req = fidl::new_empty!(
13681 ReadableReadRequest,
13682 fdomain_client::fidl::FDomainResourceDialect
13683 );
13684 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
13685 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
13686 Ok(ReadableRequest::Read {
13687 count: req.count,
13688
13689 responder: ReadableReadResponder {
13690 control_handle: std::mem::ManuallyDrop::new(control_handle),
13691 tx_id: header.tx_id,
13692 },
13693 })
13694 }
13695 _ => Err(fidl::Error::UnknownOrdinal {
13696 ordinal: header.ordinal,
13697 protocol_name:
13698 <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13699 }),
13700 }))
13701 },
13702 )
13703 }
13704}
13705
13706#[derive(Debug)]
13707pub enum ReadableRequest {
13708 Read { count: u64, responder: ReadableReadResponder },
13727}
13728
13729impl ReadableRequest {
13730 #[allow(irrefutable_let_patterns)]
13731 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
13732 if let ReadableRequest::Read { count, responder } = self {
13733 Some((count, responder))
13734 } else {
13735 None
13736 }
13737 }
13738
13739 pub fn method_name(&self) -> &'static str {
13741 match *self {
13742 ReadableRequest::Read { .. } => "read",
13743 }
13744 }
13745}
13746
13747#[derive(Debug, Clone)]
13748pub struct ReadableControlHandle {
13749 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13750}
13751
13752impl fdomain_client::fidl::ControlHandle for ReadableControlHandle {
13753 fn shutdown(&self) {
13754 self.inner.shutdown()
13755 }
13756
13757 fn is_closed(&self) -> bool {
13758 self.inner.channel().is_closed()
13759 }
13760 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
13761 self.inner.channel().on_closed()
13762 }
13763}
13764
13765impl ReadableControlHandle {}
13766
13767#[must_use = "FIDL methods require a response to be sent"]
13768#[derive(Debug)]
13769pub struct ReadableReadResponder {
13770 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
13771 tx_id: u32,
13772}
13773
13774impl std::ops::Drop for ReadableReadResponder {
13778 fn drop(&mut self) {
13779 self.control_handle.shutdown();
13780 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13782 }
13783}
13784
13785impl fdomain_client::fidl::Responder for ReadableReadResponder {
13786 type ControlHandle = ReadableControlHandle;
13787
13788 fn control_handle(&self) -> &ReadableControlHandle {
13789 &self.control_handle
13790 }
13791
13792 fn drop_without_shutdown(mut self) {
13793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13795 std::mem::forget(self);
13797 }
13798}
13799
13800impl ReadableReadResponder {
13801 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13805 let _result = self.send_raw(result);
13806 if _result.is_err() {
13807 self.control_handle.shutdown();
13808 }
13809 self.drop_without_shutdown();
13810 _result
13811 }
13812
13813 pub fn send_no_shutdown_on_err(
13815 self,
13816 mut result: Result<&[u8], i32>,
13817 ) -> Result<(), fidl::Error> {
13818 let _result = self.send_raw(result);
13819 self.drop_without_shutdown();
13820 _result
13821 }
13822
13823 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13824 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
13825 result.map(|data| (data,)),
13826 self.tx_id,
13827 0x57e419a298c8ede,
13828 fidl::encoding::DynamicFlags::empty(),
13829 )
13830 }
13831}
13832
13833#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13834pub struct SymlinkMarker;
13835
13836impl fdomain_client::fidl::ProtocolMarker for SymlinkMarker {
13837 type Proxy = SymlinkProxy;
13838 type RequestStream = SymlinkRequestStream;
13839
13840 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
13841}
13842impl fdomain_client::fidl::DiscoverableProtocolMarker for SymlinkMarker {}
13843
13844pub trait SymlinkProxyInterface: Send + Sync {
13845 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
13846 + Send;
13847 fn r#link_into(
13848 &self,
13849 dst_parent_token: fdomain_client::Event,
13850 dst: &str,
13851 ) -> Self::LinkIntoResponseFut;
13852 fn r#clone(
13853 &self,
13854 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13855 ) -> Result<(), fidl::Error>;
13856 type CloseResponseFut: std::future::Future<
13857 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
13858 > + Send;
13859 fn r#close(&self) -> Self::CloseResponseFut;
13860 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
13861 fn r#query(&self) -> Self::QueryResponseFut;
13862 fn r#deprecated_clone(
13863 &self,
13864 flags: OpenFlags,
13865 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
13866 ) -> Result<(), fidl::Error>;
13867 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
13868 + Send;
13869 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
13870 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
13871 fn r#deprecated_set_attr(
13872 &self,
13873 flags: NodeAttributeFlags,
13874 attributes: &NodeAttributes,
13875 ) -> Self::DeprecatedSetAttrResponseFut;
13876 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
13877 + Send;
13878 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
13879 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
13880 + Send;
13881 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
13882 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
13883 + Send;
13884 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
13885 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
13886 + Send;
13887 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
13888 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
13889 + Send;
13890 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
13891 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
13892 + Send;
13893 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
13894 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
13895 + Send;
13896 fn r#update_attributes(
13897 &self,
13898 payload: &MutableNodeAttributes,
13899 ) -> Self::UpdateAttributesResponseFut;
13900 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
13901 fn r#sync(&self) -> Self::SyncResponseFut;
13902 fn r#list_extended_attributes(
13903 &self,
13904 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
13905 ) -> Result<(), fidl::Error>;
13906 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
13907 + Send;
13908 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
13909 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
13910 + Send;
13911 fn r#set_extended_attribute(
13912 &self,
13913 name: &[u8],
13914 value: ExtendedAttributeValue,
13915 mode: SetExtendedAttributeMode,
13916 ) -> Self::SetExtendedAttributeResponseFut;
13917 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
13918 + Send;
13919 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
13920 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
13921 fn r#describe(&self) -> Self::DescribeResponseFut;
13922}
13923
13924#[derive(Debug, Clone)]
13925pub struct SymlinkProxy {
13926 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13927}
13928
13929impl fdomain_client::fidl::Proxy for SymlinkProxy {
13930 type Protocol = SymlinkMarker;
13931
13932 fn from_channel(inner: fdomain_client::Channel) -> Self {
13933 Self::new(inner)
13934 }
13935
13936 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13937 self.client.into_channel().map_err(|client| Self { client })
13938 }
13939
13940 fn as_channel(&self) -> &fdomain_client::Channel {
13941 self.client.as_channel()
13942 }
13943}
13944
13945impl SymlinkProxy {
13946 pub fn new(channel: fdomain_client::Channel) -> Self {
13948 let protocol_name = <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13949 Self { client: fidl::client::Client::new(channel, protocol_name) }
13950 }
13951
13952 pub fn take_event_stream(&self) -> SymlinkEventStream {
13958 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
13959 }
13960
13961 pub fn r#link_into(
13984 &self,
13985 mut dst_parent_token: fdomain_client::Event,
13986 mut dst: &str,
13987 ) -> fidl::client::QueryResponseFut<
13988 LinkableLinkIntoResult,
13989 fdomain_client::fidl::FDomainResourceDialect,
13990 > {
13991 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
13992 }
13993
13994 pub fn r#clone(
13995 &self,
13996 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13997 ) -> Result<(), fidl::Error> {
13998 SymlinkProxyInterface::r#clone(self, request)
13999 }
14000
14001 pub fn r#close(
14012 &self,
14013 ) -> fidl::client::QueryResponseFut<
14014 fdomain_fuchsia_unknown::CloseableCloseResult,
14015 fdomain_client::fidl::FDomainResourceDialect,
14016 > {
14017 SymlinkProxyInterface::r#close(self)
14018 }
14019
14020 pub fn r#query(
14021 &self,
14022 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
14023 SymlinkProxyInterface::r#query(self)
14024 }
14025
14026 pub fn r#deprecated_clone(
14028 &self,
14029 mut flags: OpenFlags,
14030 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14031 ) -> Result<(), fidl::Error> {
14032 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
14033 }
14034
14035 pub fn r#deprecated_get_attr(
14037 &self,
14038 ) -> fidl::client::QueryResponseFut<
14039 (i32, NodeAttributes),
14040 fdomain_client::fidl::FDomainResourceDialect,
14041 > {
14042 SymlinkProxyInterface::r#deprecated_get_attr(self)
14043 }
14044
14045 pub fn r#deprecated_set_attr(
14047 &self,
14048 mut flags: NodeAttributeFlags,
14049 mut attributes: &NodeAttributes,
14050 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14051 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
14052 }
14053
14054 pub fn r#deprecated_get_flags(
14056 &self,
14057 ) -> fidl::client::QueryResponseFut<
14058 (i32, OpenFlags),
14059 fdomain_client::fidl::FDomainResourceDialect,
14060 > {
14061 SymlinkProxyInterface::r#deprecated_get_flags(self)
14062 }
14063
14064 pub fn r#deprecated_set_flags(
14066 &self,
14067 mut flags: OpenFlags,
14068 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14069 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
14070 }
14071
14072 pub fn r#get_flags(
14081 &self,
14082 ) -> fidl::client::QueryResponseFut<
14083 NodeGetFlagsResult,
14084 fdomain_client::fidl::FDomainResourceDialect,
14085 > {
14086 SymlinkProxyInterface::r#get_flags(self)
14087 }
14088
14089 pub fn r#set_flags(
14099 &self,
14100 mut flags: Flags,
14101 ) -> fidl::client::QueryResponseFut<
14102 NodeSetFlagsResult,
14103 fdomain_client::fidl::FDomainResourceDialect,
14104 > {
14105 SymlinkProxyInterface::r#set_flags(self, flags)
14106 }
14107
14108 pub fn r#query_filesystem(
14110 &self,
14111 ) -> fidl::client::QueryResponseFut<
14112 (i32, Option<Box<FilesystemInfo>>),
14113 fdomain_client::fidl::FDomainResourceDialect,
14114 > {
14115 SymlinkProxyInterface::r#query_filesystem(self)
14116 }
14117
14118 pub fn r#get_attributes(
14132 &self,
14133 mut query: NodeAttributesQuery,
14134 ) -> fidl::client::QueryResponseFut<
14135 NodeGetAttributesResult,
14136 fdomain_client::fidl::FDomainResourceDialect,
14137 > {
14138 SymlinkProxyInterface::r#get_attributes(self, query)
14139 }
14140
14141 pub fn r#update_attributes(
14150 &self,
14151 mut payload: &MutableNodeAttributes,
14152 ) -> fidl::client::QueryResponseFut<
14153 NodeUpdateAttributesResult,
14154 fdomain_client::fidl::FDomainResourceDialect,
14155 > {
14156 SymlinkProxyInterface::r#update_attributes(self, payload)
14157 }
14158
14159 pub fn r#sync(
14169 &self,
14170 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
14171 {
14172 SymlinkProxyInterface::r#sync(self)
14173 }
14174
14175 pub fn r#list_extended_attributes(
14184 &self,
14185 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14186 ) -> Result<(), fidl::Error> {
14187 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
14188 }
14189
14190 pub fn r#get_extended_attribute(
14197 &self,
14198 mut name: &[u8],
14199 ) -> fidl::client::QueryResponseFut<
14200 NodeGetExtendedAttributeResult,
14201 fdomain_client::fidl::FDomainResourceDialect,
14202 > {
14203 SymlinkProxyInterface::r#get_extended_attribute(self, name)
14204 }
14205
14206 pub fn r#set_extended_attribute(
14214 &self,
14215 mut name: &[u8],
14216 mut value: ExtendedAttributeValue,
14217 mut mode: SetExtendedAttributeMode,
14218 ) -> fidl::client::QueryResponseFut<
14219 NodeSetExtendedAttributeResult,
14220 fdomain_client::fidl::FDomainResourceDialect,
14221 > {
14222 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
14223 }
14224
14225 pub fn r#remove_extended_attribute(
14231 &self,
14232 mut name: &[u8],
14233 ) -> fidl::client::QueryResponseFut<
14234 NodeRemoveExtendedAttributeResult,
14235 fdomain_client::fidl::FDomainResourceDialect,
14236 > {
14237 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
14238 }
14239
14240 pub fn r#describe(
14241 &self,
14242 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>
14243 {
14244 SymlinkProxyInterface::r#describe(self)
14245 }
14246}
14247
14248impl SymlinkProxyInterface for SymlinkProxy {
14249 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
14250 LinkableLinkIntoResult,
14251 fdomain_client::fidl::FDomainResourceDialect,
14252 >;
14253 fn r#link_into(
14254 &self,
14255 mut dst_parent_token: fdomain_client::Event,
14256 mut dst: &str,
14257 ) -> Self::LinkIntoResponseFut {
14258 fn _decode(
14259 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14260 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
14261 let _response = fidl::client::decode_transaction_body::<
14262 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14263 fdomain_client::fidl::FDomainResourceDialect,
14264 0x54f3949246a03e74,
14265 >(_buf?)?;
14266 Ok(_response.map(|x| x))
14267 }
14268 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
14269 (dst_parent_token, dst),
14270 0x54f3949246a03e74,
14271 fidl::encoding::DynamicFlags::empty(),
14272 _decode,
14273 )
14274 }
14275
14276 fn r#clone(
14277 &self,
14278 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14279 ) -> Result<(), fidl::Error> {
14280 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
14281 (request,),
14282 0x20d8a7aba2168a79,
14283 fidl::encoding::DynamicFlags::empty(),
14284 )
14285 }
14286
14287 type CloseResponseFut = fidl::client::QueryResponseFut<
14288 fdomain_fuchsia_unknown::CloseableCloseResult,
14289 fdomain_client::fidl::FDomainResourceDialect,
14290 >;
14291 fn r#close(&self) -> Self::CloseResponseFut {
14292 fn _decode(
14293 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14294 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
14295 let _response = fidl::client::decode_transaction_body::<
14296 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14297 fdomain_client::fidl::FDomainResourceDialect,
14298 0x5ac5d459ad7f657e,
14299 >(_buf?)?;
14300 Ok(_response.map(|x| x))
14301 }
14302 self.client.send_query_and_decode::<
14303 fidl::encoding::EmptyPayload,
14304 fdomain_fuchsia_unknown::CloseableCloseResult,
14305 >(
14306 (),
14307 0x5ac5d459ad7f657e,
14308 fidl::encoding::DynamicFlags::empty(),
14309 _decode,
14310 )
14311 }
14312
14313 type QueryResponseFut =
14314 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
14315 fn r#query(&self) -> Self::QueryResponseFut {
14316 fn _decode(
14317 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14318 ) -> Result<Vec<u8>, fidl::Error> {
14319 let _response = fidl::client::decode_transaction_body::<
14320 fdomain_fuchsia_unknown::QueryableQueryResponse,
14321 fdomain_client::fidl::FDomainResourceDialect,
14322 0x2658edee9decfc06,
14323 >(_buf?)?;
14324 Ok(_response.protocol)
14325 }
14326 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14327 (),
14328 0x2658edee9decfc06,
14329 fidl::encoding::DynamicFlags::empty(),
14330 _decode,
14331 )
14332 }
14333
14334 fn r#deprecated_clone(
14335 &self,
14336 mut flags: OpenFlags,
14337 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14338 ) -> Result<(), fidl::Error> {
14339 self.client.send::<NodeDeprecatedCloneRequest>(
14340 (flags, object),
14341 0x5a61678f293ce16f,
14342 fidl::encoding::DynamicFlags::FLEXIBLE,
14343 )
14344 }
14345
14346 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
14347 (i32, NodeAttributes),
14348 fdomain_client::fidl::FDomainResourceDialect,
14349 >;
14350 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
14351 fn _decode(
14352 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14353 ) -> Result<(i32, NodeAttributes), fidl::Error> {
14354 let _response = fidl::client::decode_transaction_body::<
14355 NodeDeprecatedGetAttrResponse,
14356 fdomain_client::fidl::FDomainResourceDialect,
14357 0x78985e216314dafd,
14358 >(_buf?)?;
14359 Ok((_response.s, _response.attributes))
14360 }
14361 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14362 (),
14363 0x78985e216314dafd,
14364 fidl::encoding::DynamicFlags::empty(),
14365 _decode,
14366 )
14367 }
14368
14369 type DeprecatedSetAttrResponseFut =
14370 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14371 fn r#deprecated_set_attr(
14372 &self,
14373 mut flags: NodeAttributeFlags,
14374 mut attributes: &NodeAttributes,
14375 ) -> Self::DeprecatedSetAttrResponseFut {
14376 fn _decode(
14377 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14378 ) -> Result<i32, fidl::Error> {
14379 let _response = fidl::client::decode_transaction_body::<
14380 NodeDeprecatedSetAttrResponse,
14381 fdomain_client::fidl::FDomainResourceDialect,
14382 0x4186c0f40d938f46,
14383 >(_buf?)?;
14384 Ok(_response.s)
14385 }
14386 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14387 (flags, attributes),
14388 0x4186c0f40d938f46,
14389 fidl::encoding::DynamicFlags::empty(),
14390 _decode,
14391 )
14392 }
14393
14394 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14395 (i32, OpenFlags),
14396 fdomain_client::fidl::FDomainResourceDialect,
14397 >;
14398 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14399 fn _decode(
14400 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14401 ) -> Result<(i32, OpenFlags), fidl::Error> {
14402 let _response = fidl::client::decode_transaction_body::<
14403 NodeDeprecatedGetFlagsResponse,
14404 fdomain_client::fidl::FDomainResourceDialect,
14405 0x5b88fffb8eda3aa1,
14406 >(_buf?)?;
14407 Ok((_response.s, _response.flags))
14408 }
14409 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14410 (),
14411 0x5b88fffb8eda3aa1,
14412 fidl::encoding::DynamicFlags::empty(),
14413 _decode,
14414 )
14415 }
14416
14417 type DeprecatedSetFlagsResponseFut =
14418 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14419 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14420 fn _decode(
14421 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14422 ) -> Result<i32, fidl::Error> {
14423 let _response = fidl::client::decode_transaction_body::<
14424 NodeDeprecatedSetFlagsResponse,
14425 fdomain_client::fidl::FDomainResourceDialect,
14426 0x5295b76c71fde733,
14427 >(_buf?)?;
14428 Ok(_response.s)
14429 }
14430 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14431 (flags,),
14432 0x5295b76c71fde733,
14433 fidl::encoding::DynamicFlags::empty(),
14434 _decode,
14435 )
14436 }
14437
14438 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14439 NodeGetFlagsResult,
14440 fdomain_client::fidl::FDomainResourceDialect,
14441 >;
14442 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14443 fn _decode(
14444 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14445 ) -> Result<NodeGetFlagsResult, fidl::Error> {
14446 let _response = fidl::client::decode_transaction_body::<
14447 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14448 fdomain_client::fidl::FDomainResourceDialect,
14449 0x176eb318f64ec23,
14450 >(_buf?)?
14451 .into_result_fdomain::<SymlinkMarker>("get_flags")?;
14452 Ok(_response.map(|x| x.flags))
14453 }
14454 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14455 (),
14456 0x176eb318f64ec23,
14457 fidl::encoding::DynamicFlags::FLEXIBLE,
14458 _decode,
14459 )
14460 }
14461
14462 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14463 NodeSetFlagsResult,
14464 fdomain_client::fidl::FDomainResourceDialect,
14465 >;
14466 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14467 fn _decode(
14468 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14469 ) -> Result<NodeSetFlagsResult, fidl::Error> {
14470 let _response = fidl::client::decode_transaction_body::<
14471 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14472 fdomain_client::fidl::FDomainResourceDialect,
14473 0x55a8028685791ea8,
14474 >(_buf?)?
14475 .into_result_fdomain::<SymlinkMarker>("set_flags")?;
14476 Ok(_response.map(|x| x))
14477 }
14478 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14479 (flags,),
14480 0x55a8028685791ea8,
14481 fidl::encoding::DynamicFlags::FLEXIBLE,
14482 _decode,
14483 )
14484 }
14485
14486 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14487 (i32, Option<Box<FilesystemInfo>>),
14488 fdomain_client::fidl::FDomainResourceDialect,
14489 >;
14490 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14491 fn _decode(
14492 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14493 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14494 let _response = fidl::client::decode_transaction_body::<
14495 NodeQueryFilesystemResponse,
14496 fdomain_client::fidl::FDomainResourceDialect,
14497 0x6f344a1c6b0a0610,
14498 >(_buf?)?;
14499 Ok((_response.s, _response.info))
14500 }
14501 self.client.send_query_and_decode::<
14502 fidl::encoding::EmptyPayload,
14503 (i32, Option<Box<FilesystemInfo>>),
14504 >(
14505 (),
14506 0x6f344a1c6b0a0610,
14507 fidl::encoding::DynamicFlags::empty(),
14508 _decode,
14509 )
14510 }
14511
14512 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14513 NodeGetAttributesResult,
14514 fdomain_client::fidl::FDomainResourceDialect,
14515 >;
14516 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14517 fn _decode(
14518 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14519 ) -> Result<NodeGetAttributesResult, fidl::Error> {
14520 let _response = fidl::client::decode_transaction_body::<
14521 fidl::encoding::ResultType<NodeAttributes2, i32>,
14522 fdomain_client::fidl::FDomainResourceDialect,
14523 0x3d4396a638ea053b,
14524 >(_buf?)?;
14525 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14526 }
14527 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14528 (query,),
14529 0x3d4396a638ea053b,
14530 fidl::encoding::DynamicFlags::empty(),
14531 _decode,
14532 )
14533 }
14534
14535 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14536 NodeUpdateAttributesResult,
14537 fdomain_client::fidl::FDomainResourceDialect,
14538 >;
14539 fn r#update_attributes(
14540 &self,
14541 mut payload: &MutableNodeAttributes,
14542 ) -> Self::UpdateAttributesResponseFut {
14543 fn _decode(
14544 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14545 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14546 let _response = fidl::client::decode_transaction_body::<
14547 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14548 fdomain_client::fidl::FDomainResourceDialect,
14549 0x3308c1da5a89bf08,
14550 >(_buf?)?;
14551 Ok(_response.map(|x| x))
14552 }
14553 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14554 payload,
14555 0x3308c1da5a89bf08,
14556 fidl::encoding::DynamicFlags::empty(),
14557 _decode,
14558 )
14559 }
14560
14561 type SyncResponseFut = fidl::client::QueryResponseFut<
14562 NodeSyncResult,
14563 fdomain_client::fidl::FDomainResourceDialect,
14564 >;
14565 fn r#sync(&self) -> Self::SyncResponseFut {
14566 fn _decode(
14567 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14568 ) -> Result<NodeSyncResult, fidl::Error> {
14569 let _response = fidl::client::decode_transaction_body::<
14570 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14571 fdomain_client::fidl::FDomainResourceDialect,
14572 0x2c5c27ca0ab5dc49,
14573 >(_buf?)?;
14574 Ok(_response.map(|x| x))
14575 }
14576 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14577 (),
14578 0x2c5c27ca0ab5dc49,
14579 fidl::encoding::DynamicFlags::empty(),
14580 _decode,
14581 )
14582 }
14583
14584 fn r#list_extended_attributes(
14585 &self,
14586 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14587 ) -> Result<(), fidl::Error> {
14588 self.client.send::<NodeListExtendedAttributesRequest>(
14589 (iterator,),
14590 0x4b61033de007fcd0,
14591 fidl::encoding::DynamicFlags::empty(),
14592 )
14593 }
14594
14595 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14596 NodeGetExtendedAttributeResult,
14597 fdomain_client::fidl::FDomainResourceDialect,
14598 >;
14599 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14600 fn _decode(
14601 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14602 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14603 let _response = fidl::client::decode_transaction_body::<
14604 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14605 fdomain_client::fidl::FDomainResourceDialect,
14606 0x45ffa3ccfdeb76db,
14607 >(_buf?)?;
14608 Ok(_response.map(|x| x))
14609 }
14610 self.client.send_query_and_decode::<
14611 NodeGetExtendedAttributeRequest,
14612 NodeGetExtendedAttributeResult,
14613 >(
14614 (name,),
14615 0x45ffa3ccfdeb76db,
14616 fidl::encoding::DynamicFlags::empty(),
14617 _decode,
14618 )
14619 }
14620
14621 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14622 NodeSetExtendedAttributeResult,
14623 fdomain_client::fidl::FDomainResourceDialect,
14624 >;
14625 fn r#set_extended_attribute(
14626 &self,
14627 mut name: &[u8],
14628 mut value: ExtendedAttributeValue,
14629 mut mode: SetExtendedAttributeMode,
14630 ) -> Self::SetExtendedAttributeResponseFut {
14631 fn _decode(
14632 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14633 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14634 let _response = fidl::client::decode_transaction_body::<
14635 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14636 fdomain_client::fidl::FDomainResourceDialect,
14637 0x4a951362f681f23c,
14638 >(_buf?)?;
14639 Ok(_response.map(|x| x))
14640 }
14641 self.client.send_query_and_decode::<
14642 NodeSetExtendedAttributeRequest,
14643 NodeSetExtendedAttributeResult,
14644 >(
14645 (name, &mut value, mode,),
14646 0x4a951362f681f23c,
14647 fidl::encoding::DynamicFlags::empty(),
14648 _decode,
14649 )
14650 }
14651
14652 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14653 NodeRemoveExtendedAttributeResult,
14654 fdomain_client::fidl::FDomainResourceDialect,
14655 >;
14656 fn r#remove_extended_attribute(
14657 &self,
14658 mut name: &[u8],
14659 ) -> Self::RemoveExtendedAttributeResponseFut {
14660 fn _decode(
14661 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14662 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14663 let _response = fidl::client::decode_transaction_body::<
14664 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14665 fdomain_client::fidl::FDomainResourceDialect,
14666 0x7a0b9f3a9bf9032d,
14667 >(_buf?)?;
14668 Ok(_response.map(|x| x))
14669 }
14670 self.client.send_query_and_decode::<
14671 NodeRemoveExtendedAttributeRequest,
14672 NodeRemoveExtendedAttributeResult,
14673 >(
14674 (name,),
14675 0x7a0b9f3a9bf9032d,
14676 fidl::encoding::DynamicFlags::empty(),
14677 _decode,
14678 )
14679 }
14680
14681 type DescribeResponseFut =
14682 fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>;
14683 fn r#describe(&self) -> Self::DescribeResponseFut {
14684 fn _decode(
14685 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14686 ) -> Result<SymlinkInfo, fidl::Error> {
14687 let _response = fidl::client::decode_transaction_body::<
14688 fidl::encoding::FlexibleType<SymlinkInfo>,
14689 fdomain_client::fidl::FDomainResourceDialect,
14690 0x742c2ea5e89831f3,
14691 >(_buf?)?
14692 .into_result_fdomain::<SymlinkMarker>("describe")?;
14693 Ok(_response)
14694 }
14695 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
14696 (),
14697 0x742c2ea5e89831f3,
14698 fidl::encoding::DynamicFlags::FLEXIBLE,
14699 _decode,
14700 )
14701 }
14702}
14703
14704pub struct SymlinkEventStream {
14705 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
14706}
14707
14708impl std::marker::Unpin for SymlinkEventStream {}
14709
14710impl futures::stream::FusedStream for SymlinkEventStream {
14711 fn is_terminated(&self) -> bool {
14712 self.event_receiver.is_terminated()
14713 }
14714}
14715
14716impl futures::Stream for SymlinkEventStream {
14717 type Item = Result<SymlinkEvent, fidl::Error>;
14718
14719 fn poll_next(
14720 mut self: std::pin::Pin<&mut Self>,
14721 cx: &mut std::task::Context<'_>,
14722 ) -> std::task::Poll<Option<Self::Item>> {
14723 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14724 &mut self.event_receiver,
14725 cx
14726 )?) {
14727 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
14728 None => std::task::Poll::Ready(None),
14729 }
14730 }
14731}
14732
14733#[derive(Debug)]
14734pub enum SymlinkEvent {
14735 OnOpen_ {
14736 s: i32,
14737 info: Option<Box<NodeInfoDeprecated>>,
14738 },
14739 OnRepresentation {
14740 payload: Representation,
14741 },
14742 #[non_exhaustive]
14743 _UnknownEvent {
14744 ordinal: u64,
14746 },
14747}
14748
14749impl SymlinkEvent {
14750 #[allow(irrefutable_let_patterns)]
14751 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14752 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14753 }
14754 #[allow(irrefutable_let_patterns)]
14755 pub fn into_on_representation(self) -> Option<Representation> {
14756 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14757 }
14758
14759 fn decode(
14761 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14762 ) -> Result<SymlinkEvent, fidl::Error> {
14763 let (bytes, _handles) = buf.split_mut();
14764 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14765 debug_assert_eq!(tx_header.tx_id, 0);
14766 match tx_header.ordinal {
14767 0x7fc7bbb1dbfd1972 => {
14768 let mut out = fidl::new_empty!(
14769 NodeOnOpenRequest,
14770 fdomain_client::fidl::FDomainResourceDialect
14771 );
14772 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14773 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
14774 }
14775 0x5cb40567d80a510c => {
14776 let mut out =
14777 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
14778 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14779 Ok((SymlinkEvent::OnRepresentation { payload: out }))
14780 }
14781 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14782 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14783 }
14784 _ => Err(fidl::Error::UnknownOrdinal {
14785 ordinal: tx_header.ordinal,
14786 protocol_name: <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
14787 }),
14788 }
14789 }
14790}
14791
14792pub struct SymlinkRequestStream {
14794 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14795 is_terminated: bool,
14796}
14797
14798impl std::marker::Unpin for SymlinkRequestStream {}
14799
14800impl futures::stream::FusedStream for SymlinkRequestStream {
14801 fn is_terminated(&self) -> bool {
14802 self.is_terminated
14803 }
14804}
14805
14806impl fdomain_client::fidl::RequestStream for SymlinkRequestStream {
14807 type Protocol = SymlinkMarker;
14808 type ControlHandle = SymlinkControlHandle;
14809
14810 fn from_channel(channel: fdomain_client::Channel) -> Self {
14811 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14812 }
14813
14814 fn control_handle(&self) -> Self::ControlHandle {
14815 SymlinkControlHandle { inner: self.inner.clone() }
14816 }
14817
14818 fn into_inner(
14819 self,
14820 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
14821 {
14822 (self.inner, self.is_terminated)
14823 }
14824
14825 fn from_inner(
14826 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14827 is_terminated: bool,
14828 ) -> Self {
14829 Self { inner, is_terminated }
14830 }
14831}
14832
14833impl futures::Stream for SymlinkRequestStream {
14834 type Item = Result<SymlinkRequest, fidl::Error>;
14835
14836 fn poll_next(
14837 mut self: std::pin::Pin<&mut Self>,
14838 cx: &mut std::task::Context<'_>,
14839 ) -> std::task::Poll<Option<Self::Item>> {
14840 let this = &mut *self;
14841 if this.inner.check_shutdown(cx) {
14842 this.is_terminated = true;
14843 return std::task::Poll::Ready(None);
14844 }
14845 if this.is_terminated {
14846 panic!("polled SymlinkRequestStream after completion");
14847 }
14848 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
14849 |bytes, handles| {
14850 match this.inner.channel().read_etc(cx, bytes, handles) {
14851 std::task::Poll::Ready(Ok(())) => {}
14852 std::task::Poll::Pending => return std::task::Poll::Pending,
14853 std::task::Poll::Ready(Err(None)) => {
14854 this.is_terminated = true;
14855 return std::task::Poll::Ready(None);
14856 }
14857 std::task::Poll::Ready(Err(Some(e))) => {
14858 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14859 e.into(),
14860 ))));
14861 }
14862 }
14863
14864 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14866
14867 std::task::Poll::Ready(Some(match header.ordinal {
14868 0x54f3949246a03e74 => {
14869 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14870 let mut req = fidl::new_empty!(
14871 LinkableLinkIntoRequest,
14872 fdomain_client::fidl::FDomainResourceDialect
14873 );
14874 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
14875 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14876 Ok(SymlinkRequest::LinkInto {
14877 dst_parent_token: req.dst_parent_token,
14878 dst: req.dst,
14879
14880 responder: SymlinkLinkIntoResponder {
14881 control_handle: std::mem::ManuallyDrop::new(control_handle),
14882 tx_id: header.tx_id,
14883 },
14884 })
14885 }
14886 0x20d8a7aba2168a79 => {
14887 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14888 let mut req = fidl::new_empty!(
14889 fdomain_fuchsia_unknown::CloneableCloneRequest,
14890 fdomain_client::fidl::FDomainResourceDialect
14891 );
14892 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14893 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14894 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
14895 }
14896 0x5ac5d459ad7f657e => {
14897 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14898 let mut req = fidl::new_empty!(
14899 fidl::encoding::EmptyPayload,
14900 fdomain_client::fidl::FDomainResourceDialect
14901 );
14902 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14903 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14904 Ok(SymlinkRequest::Close {
14905 responder: SymlinkCloseResponder {
14906 control_handle: std::mem::ManuallyDrop::new(control_handle),
14907 tx_id: header.tx_id,
14908 },
14909 })
14910 }
14911 0x2658edee9decfc06 => {
14912 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14913 let mut req = fidl::new_empty!(
14914 fidl::encoding::EmptyPayload,
14915 fdomain_client::fidl::FDomainResourceDialect
14916 );
14917 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14918 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14919 Ok(SymlinkRequest::Query {
14920 responder: SymlinkQueryResponder {
14921 control_handle: std::mem::ManuallyDrop::new(control_handle),
14922 tx_id: header.tx_id,
14923 },
14924 })
14925 }
14926 0x5a61678f293ce16f => {
14927 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14928 let mut req = fidl::new_empty!(
14929 NodeDeprecatedCloneRequest,
14930 fdomain_client::fidl::FDomainResourceDialect
14931 );
14932 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14933 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14934 Ok(SymlinkRequest::DeprecatedClone {
14935 flags: req.flags,
14936 object: req.object,
14937
14938 control_handle,
14939 })
14940 }
14941 0x78985e216314dafd => {
14942 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14943 let mut req = fidl::new_empty!(
14944 fidl::encoding::EmptyPayload,
14945 fdomain_client::fidl::FDomainResourceDialect
14946 );
14947 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14948 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14949 Ok(SymlinkRequest::DeprecatedGetAttr {
14950 responder: SymlinkDeprecatedGetAttrResponder {
14951 control_handle: std::mem::ManuallyDrop::new(control_handle),
14952 tx_id: header.tx_id,
14953 },
14954 })
14955 }
14956 0x4186c0f40d938f46 => {
14957 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14958 let mut req = fidl::new_empty!(
14959 NodeDeprecatedSetAttrRequest,
14960 fdomain_client::fidl::FDomainResourceDialect
14961 );
14962 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14963 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14964 Ok(SymlinkRequest::DeprecatedSetAttr {
14965 flags: req.flags,
14966 attributes: req.attributes,
14967
14968 responder: SymlinkDeprecatedSetAttrResponder {
14969 control_handle: std::mem::ManuallyDrop::new(control_handle),
14970 tx_id: header.tx_id,
14971 },
14972 })
14973 }
14974 0x5b88fffb8eda3aa1 => {
14975 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14976 let mut req = fidl::new_empty!(
14977 fidl::encoding::EmptyPayload,
14978 fdomain_client::fidl::FDomainResourceDialect
14979 );
14980 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14981 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14982 Ok(SymlinkRequest::DeprecatedGetFlags {
14983 responder: SymlinkDeprecatedGetFlagsResponder {
14984 control_handle: std::mem::ManuallyDrop::new(control_handle),
14985 tx_id: header.tx_id,
14986 },
14987 })
14988 }
14989 0x5295b76c71fde733 => {
14990 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14991 let mut req = fidl::new_empty!(
14992 NodeDeprecatedSetFlagsRequest,
14993 fdomain_client::fidl::FDomainResourceDialect
14994 );
14995 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14996 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14997 Ok(SymlinkRequest::DeprecatedSetFlags {
14998 flags: req.flags,
14999
15000 responder: SymlinkDeprecatedSetFlagsResponder {
15001 control_handle: std::mem::ManuallyDrop::new(control_handle),
15002 tx_id: header.tx_id,
15003 },
15004 })
15005 }
15006 0x176eb318f64ec23 => {
15007 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15008 let mut req = fidl::new_empty!(
15009 fidl::encoding::EmptyPayload,
15010 fdomain_client::fidl::FDomainResourceDialect
15011 );
15012 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15013 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15014 Ok(SymlinkRequest::GetFlags {
15015 responder: SymlinkGetFlagsResponder {
15016 control_handle: std::mem::ManuallyDrop::new(control_handle),
15017 tx_id: header.tx_id,
15018 },
15019 })
15020 }
15021 0x55a8028685791ea8 => {
15022 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15023 let mut req = fidl::new_empty!(
15024 NodeSetFlagsRequest,
15025 fdomain_client::fidl::FDomainResourceDialect
15026 );
15027 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15028 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15029 Ok(SymlinkRequest::SetFlags {
15030 flags: req.flags,
15031
15032 responder: SymlinkSetFlagsResponder {
15033 control_handle: std::mem::ManuallyDrop::new(control_handle),
15034 tx_id: header.tx_id,
15035 },
15036 })
15037 }
15038 0x6f344a1c6b0a0610 => {
15039 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15040 let mut req = fidl::new_empty!(
15041 fidl::encoding::EmptyPayload,
15042 fdomain_client::fidl::FDomainResourceDialect
15043 );
15044 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15045 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15046 Ok(SymlinkRequest::QueryFilesystem {
15047 responder: SymlinkQueryFilesystemResponder {
15048 control_handle: std::mem::ManuallyDrop::new(control_handle),
15049 tx_id: header.tx_id,
15050 },
15051 })
15052 }
15053 0x3d4396a638ea053b => {
15054 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15055 let mut req = fidl::new_empty!(
15056 NodeGetAttributesRequest,
15057 fdomain_client::fidl::FDomainResourceDialect
15058 );
15059 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15060 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15061 Ok(SymlinkRequest::GetAttributes {
15062 query: req.query,
15063
15064 responder: SymlinkGetAttributesResponder {
15065 control_handle: std::mem::ManuallyDrop::new(control_handle),
15066 tx_id: header.tx_id,
15067 },
15068 })
15069 }
15070 0x3308c1da5a89bf08 => {
15071 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15072 let mut req = fidl::new_empty!(
15073 MutableNodeAttributes,
15074 fdomain_client::fidl::FDomainResourceDialect
15075 );
15076 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
15077 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15078 Ok(SymlinkRequest::UpdateAttributes {
15079 payload: req,
15080 responder: SymlinkUpdateAttributesResponder {
15081 control_handle: std::mem::ManuallyDrop::new(control_handle),
15082 tx_id: header.tx_id,
15083 },
15084 })
15085 }
15086 0x2c5c27ca0ab5dc49 => {
15087 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15088 let mut req = fidl::new_empty!(
15089 fidl::encoding::EmptyPayload,
15090 fdomain_client::fidl::FDomainResourceDialect
15091 );
15092 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15093 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15094 Ok(SymlinkRequest::Sync {
15095 responder: SymlinkSyncResponder {
15096 control_handle: std::mem::ManuallyDrop::new(control_handle),
15097 tx_id: header.tx_id,
15098 },
15099 })
15100 }
15101 0x4b61033de007fcd0 => {
15102 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15103 let mut req = fidl::new_empty!(
15104 NodeListExtendedAttributesRequest,
15105 fdomain_client::fidl::FDomainResourceDialect
15106 );
15107 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15108 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15109 Ok(SymlinkRequest::ListExtendedAttributes {
15110 iterator: req.iterator,
15111
15112 control_handle,
15113 })
15114 }
15115 0x45ffa3ccfdeb76db => {
15116 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15117 let mut req = fidl::new_empty!(
15118 NodeGetExtendedAttributeRequest,
15119 fdomain_client::fidl::FDomainResourceDialect
15120 );
15121 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15122 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15123 Ok(SymlinkRequest::GetExtendedAttribute {
15124 name: req.name,
15125
15126 responder: SymlinkGetExtendedAttributeResponder {
15127 control_handle: std::mem::ManuallyDrop::new(control_handle),
15128 tx_id: header.tx_id,
15129 },
15130 })
15131 }
15132 0x4a951362f681f23c => {
15133 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15134 let mut req = fidl::new_empty!(
15135 NodeSetExtendedAttributeRequest,
15136 fdomain_client::fidl::FDomainResourceDialect
15137 );
15138 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15139 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15140 Ok(SymlinkRequest::SetExtendedAttribute {
15141 name: req.name,
15142 value: req.value,
15143 mode: req.mode,
15144
15145 responder: SymlinkSetExtendedAttributeResponder {
15146 control_handle: std::mem::ManuallyDrop::new(control_handle),
15147 tx_id: header.tx_id,
15148 },
15149 })
15150 }
15151 0x7a0b9f3a9bf9032d => {
15152 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15153 let mut req = fidl::new_empty!(
15154 NodeRemoveExtendedAttributeRequest,
15155 fdomain_client::fidl::FDomainResourceDialect
15156 );
15157 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15158 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15159 Ok(SymlinkRequest::RemoveExtendedAttribute {
15160 name: req.name,
15161
15162 responder: SymlinkRemoveExtendedAttributeResponder {
15163 control_handle: std::mem::ManuallyDrop::new(control_handle),
15164 tx_id: header.tx_id,
15165 },
15166 })
15167 }
15168 0x742c2ea5e89831f3 => {
15169 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15170 let mut req = fidl::new_empty!(
15171 fidl::encoding::EmptyPayload,
15172 fdomain_client::fidl::FDomainResourceDialect
15173 );
15174 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15175 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15176 Ok(SymlinkRequest::Describe {
15177 responder: SymlinkDescribeResponder {
15178 control_handle: std::mem::ManuallyDrop::new(control_handle),
15179 tx_id: header.tx_id,
15180 },
15181 })
15182 }
15183 _ if header.tx_id == 0
15184 && header
15185 .dynamic_flags()
15186 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15187 {
15188 Ok(SymlinkRequest::_UnknownMethod {
15189 ordinal: header.ordinal,
15190 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15191 method_type: fidl::MethodType::OneWay,
15192 })
15193 }
15194 _ if header
15195 .dynamic_flags()
15196 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15197 {
15198 this.inner.send_framework_err(
15199 fidl::encoding::FrameworkErr::UnknownMethod,
15200 header.tx_id,
15201 header.ordinal,
15202 header.dynamic_flags(),
15203 (bytes, handles),
15204 )?;
15205 Ok(SymlinkRequest::_UnknownMethod {
15206 ordinal: header.ordinal,
15207 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15208 method_type: fidl::MethodType::TwoWay,
15209 })
15210 }
15211 _ => Err(fidl::Error::UnknownOrdinal {
15212 ordinal: header.ordinal,
15213 protocol_name:
15214 <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15215 }),
15216 }))
15217 },
15218 )
15219 }
15220}
15221
15222#[derive(Debug)]
15224pub enum SymlinkRequest {
15225 LinkInto {
15248 dst_parent_token: fdomain_client::Event,
15249 dst: String,
15250 responder: SymlinkLinkIntoResponder,
15251 },
15252 Clone {
15253 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15254 control_handle: SymlinkControlHandle,
15255 },
15256 Close {
15267 responder: SymlinkCloseResponder,
15268 },
15269 Query {
15270 responder: SymlinkQueryResponder,
15271 },
15272 DeprecatedClone {
15274 flags: OpenFlags,
15275 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
15276 control_handle: SymlinkControlHandle,
15277 },
15278 DeprecatedGetAttr {
15280 responder: SymlinkDeprecatedGetAttrResponder,
15281 },
15282 DeprecatedSetAttr {
15284 flags: NodeAttributeFlags,
15285 attributes: NodeAttributes,
15286 responder: SymlinkDeprecatedSetAttrResponder,
15287 },
15288 DeprecatedGetFlags {
15290 responder: SymlinkDeprecatedGetFlagsResponder,
15291 },
15292 DeprecatedSetFlags {
15294 flags: OpenFlags,
15295 responder: SymlinkDeprecatedSetFlagsResponder,
15296 },
15297 GetFlags {
15306 responder: SymlinkGetFlagsResponder,
15307 },
15308 SetFlags {
15318 flags: Flags,
15319 responder: SymlinkSetFlagsResponder,
15320 },
15321 QueryFilesystem {
15323 responder: SymlinkQueryFilesystemResponder,
15324 },
15325 GetAttributes {
15339 query: NodeAttributesQuery,
15340 responder: SymlinkGetAttributesResponder,
15341 },
15342 UpdateAttributes {
15351 payload: MutableNodeAttributes,
15352 responder: SymlinkUpdateAttributesResponder,
15353 },
15354 Sync {
15364 responder: SymlinkSyncResponder,
15365 },
15366 ListExtendedAttributes {
15375 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15376 control_handle: SymlinkControlHandle,
15377 },
15378 GetExtendedAttribute {
15385 name: Vec<u8>,
15386 responder: SymlinkGetExtendedAttributeResponder,
15387 },
15388 SetExtendedAttribute {
15396 name: Vec<u8>,
15397 value: ExtendedAttributeValue,
15398 mode: SetExtendedAttributeMode,
15399 responder: SymlinkSetExtendedAttributeResponder,
15400 },
15401 RemoveExtendedAttribute {
15407 name: Vec<u8>,
15408 responder: SymlinkRemoveExtendedAttributeResponder,
15409 },
15410 Describe {
15411 responder: SymlinkDescribeResponder,
15412 },
15413 #[non_exhaustive]
15415 _UnknownMethod {
15416 ordinal: u64,
15418 control_handle: SymlinkControlHandle,
15419 method_type: fidl::MethodType,
15420 },
15421}
15422
15423impl SymlinkRequest {
15424 #[allow(irrefutable_let_patterns)]
15425 pub fn into_link_into(
15426 self,
15427 ) -> Option<(fdomain_client::Event, String, SymlinkLinkIntoResponder)> {
15428 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
15429 Some((dst_parent_token, dst, responder))
15430 } else {
15431 None
15432 }
15433 }
15434
15435 #[allow(irrefutable_let_patterns)]
15436 pub fn into_clone(
15437 self,
15438 ) -> Option<(
15439 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15440 SymlinkControlHandle,
15441 )> {
15442 if let SymlinkRequest::Clone { request, control_handle } = self {
15443 Some((request, control_handle))
15444 } else {
15445 None
15446 }
15447 }
15448
15449 #[allow(irrefutable_let_patterns)]
15450 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
15451 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
15452 }
15453
15454 #[allow(irrefutable_let_patterns)]
15455 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
15456 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
15457 }
15458
15459 #[allow(irrefutable_let_patterns)]
15460 pub fn into_deprecated_clone(
15461 self,
15462 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, SymlinkControlHandle)>
15463 {
15464 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
15465 Some((flags, object, control_handle))
15466 } else {
15467 None
15468 }
15469 }
15470
15471 #[allow(irrefutable_let_patterns)]
15472 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
15473 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
15474 Some((responder))
15475 } else {
15476 None
15477 }
15478 }
15479
15480 #[allow(irrefutable_let_patterns)]
15481 pub fn into_deprecated_set_attr(
15482 self,
15483 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
15484 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15485 Some((flags, attributes, responder))
15486 } else {
15487 None
15488 }
15489 }
15490
15491 #[allow(irrefutable_let_patterns)]
15492 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
15493 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
15494 Some((responder))
15495 } else {
15496 None
15497 }
15498 }
15499
15500 #[allow(irrefutable_let_patterns)]
15501 pub fn into_deprecated_set_flags(
15502 self,
15503 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
15504 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
15505 Some((flags, responder))
15506 } else {
15507 None
15508 }
15509 }
15510
15511 #[allow(irrefutable_let_patterns)]
15512 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
15513 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
15514 }
15515
15516 #[allow(irrefutable_let_patterns)]
15517 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
15518 if let SymlinkRequest::SetFlags { flags, responder } = self {
15519 Some((flags, responder))
15520 } else {
15521 None
15522 }
15523 }
15524
15525 #[allow(irrefutable_let_patterns)]
15526 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
15527 if let SymlinkRequest::QueryFilesystem { responder } = self {
15528 Some((responder))
15529 } else {
15530 None
15531 }
15532 }
15533
15534 #[allow(irrefutable_let_patterns)]
15535 pub fn into_get_attributes(
15536 self,
15537 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
15538 if let SymlinkRequest::GetAttributes { query, responder } = self {
15539 Some((query, responder))
15540 } else {
15541 None
15542 }
15543 }
15544
15545 #[allow(irrefutable_let_patterns)]
15546 pub fn into_update_attributes(
15547 self,
15548 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
15549 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
15550 Some((payload, responder))
15551 } else {
15552 None
15553 }
15554 }
15555
15556 #[allow(irrefutable_let_patterns)]
15557 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
15558 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
15559 }
15560
15561 #[allow(irrefutable_let_patterns)]
15562 pub fn into_list_extended_attributes(
15563 self,
15564 ) -> Option<(
15565 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15566 SymlinkControlHandle,
15567 )> {
15568 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
15569 Some((iterator, control_handle))
15570 } else {
15571 None
15572 }
15573 }
15574
15575 #[allow(irrefutable_let_patterns)]
15576 pub fn into_get_extended_attribute(
15577 self,
15578 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
15579 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
15580 Some((name, responder))
15581 } else {
15582 None
15583 }
15584 }
15585
15586 #[allow(irrefutable_let_patterns)]
15587 pub fn into_set_extended_attribute(
15588 self,
15589 ) -> Option<(
15590 Vec<u8>,
15591 ExtendedAttributeValue,
15592 SetExtendedAttributeMode,
15593 SymlinkSetExtendedAttributeResponder,
15594 )> {
15595 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
15596 Some((name, value, mode, responder))
15597 } else {
15598 None
15599 }
15600 }
15601
15602 #[allow(irrefutable_let_patterns)]
15603 pub fn into_remove_extended_attribute(
15604 self,
15605 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
15606 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
15607 Some((name, responder))
15608 } else {
15609 None
15610 }
15611 }
15612
15613 #[allow(irrefutable_let_patterns)]
15614 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
15615 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
15616 }
15617
15618 pub fn method_name(&self) -> &'static str {
15620 match *self {
15621 SymlinkRequest::LinkInto { .. } => "link_into",
15622 SymlinkRequest::Clone { .. } => "clone",
15623 SymlinkRequest::Close { .. } => "close",
15624 SymlinkRequest::Query { .. } => "query",
15625 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
15626 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
15627 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
15628 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
15629 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
15630 SymlinkRequest::GetFlags { .. } => "get_flags",
15631 SymlinkRequest::SetFlags { .. } => "set_flags",
15632 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
15633 SymlinkRequest::GetAttributes { .. } => "get_attributes",
15634 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
15635 SymlinkRequest::Sync { .. } => "sync",
15636 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15637 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15638 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15639 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15640 SymlinkRequest::Describe { .. } => "describe",
15641 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15642 "unknown one-way method"
15643 }
15644 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15645 "unknown two-way method"
15646 }
15647 }
15648 }
15649}
15650
15651#[derive(Debug, Clone)]
15652pub struct SymlinkControlHandle {
15653 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15654}
15655
15656impl fdomain_client::fidl::ControlHandle for SymlinkControlHandle {
15657 fn shutdown(&self) {
15658 self.inner.shutdown()
15659 }
15660
15661 fn is_closed(&self) -> bool {
15662 self.inner.channel().is_closed()
15663 }
15664 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
15665 self.inner.channel().on_closed()
15666 }
15667}
15668
15669impl SymlinkControlHandle {
15670 pub fn send_on_open_(
15671 &self,
15672 mut s: i32,
15673 mut info: Option<NodeInfoDeprecated>,
15674 ) -> Result<(), fidl::Error> {
15675 self.inner.send::<NodeOnOpenRequest>(
15676 (s, info.as_mut()),
15677 0,
15678 0x7fc7bbb1dbfd1972,
15679 fidl::encoding::DynamicFlags::FLEXIBLE,
15680 )
15681 }
15682
15683 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15684 self.inner.send::<Representation>(
15685 &mut payload,
15686 0,
15687 0x5cb40567d80a510c,
15688 fidl::encoding::DynamicFlags::empty(),
15689 )
15690 }
15691}
15692
15693#[must_use = "FIDL methods require a response to be sent"]
15694#[derive(Debug)]
15695pub struct SymlinkLinkIntoResponder {
15696 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15697 tx_id: u32,
15698}
15699
15700impl std::ops::Drop for SymlinkLinkIntoResponder {
15704 fn drop(&mut self) {
15705 self.control_handle.shutdown();
15706 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15708 }
15709}
15710
15711impl fdomain_client::fidl::Responder for SymlinkLinkIntoResponder {
15712 type ControlHandle = SymlinkControlHandle;
15713
15714 fn control_handle(&self) -> &SymlinkControlHandle {
15715 &self.control_handle
15716 }
15717
15718 fn drop_without_shutdown(mut self) {
15719 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15721 std::mem::forget(self);
15723 }
15724}
15725
15726impl SymlinkLinkIntoResponder {
15727 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15731 let _result = self.send_raw(result);
15732 if _result.is_err() {
15733 self.control_handle.shutdown();
15734 }
15735 self.drop_without_shutdown();
15736 _result
15737 }
15738
15739 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15741 let _result = self.send_raw(result);
15742 self.drop_without_shutdown();
15743 _result
15744 }
15745
15746 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15747 self.control_handle
15748 .inner
15749 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15750 result,
15751 self.tx_id,
15752 0x54f3949246a03e74,
15753 fidl::encoding::DynamicFlags::empty(),
15754 )
15755 }
15756}
15757
15758#[must_use = "FIDL methods require a response to be sent"]
15759#[derive(Debug)]
15760pub struct SymlinkCloseResponder {
15761 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15762 tx_id: u32,
15763}
15764
15765impl std::ops::Drop for SymlinkCloseResponder {
15769 fn drop(&mut self) {
15770 self.control_handle.shutdown();
15771 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15773 }
15774}
15775
15776impl fdomain_client::fidl::Responder for SymlinkCloseResponder {
15777 type ControlHandle = SymlinkControlHandle;
15778
15779 fn control_handle(&self) -> &SymlinkControlHandle {
15780 &self.control_handle
15781 }
15782
15783 fn drop_without_shutdown(mut self) {
15784 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15786 std::mem::forget(self);
15788 }
15789}
15790
15791impl SymlinkCloseResponder {
15792 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15796 let _result = self.send_raw(result);
15797 if _result.is_err() {
15798 self.control_handle.shutdown();
15799 }
15800 self.drop_without_shutdown();
15801 _result
15802 }
15803
15804 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15806 let _result = self.send_raw(result);
15807 self.drop_without_shutdown();
15808 _result
15809 }
15810
15811 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15812 self.control_handle
15813 .inner
15814 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15815 result,
15816 self.tx_id,
15817 0x5ac5d459ad7f657e,
15818 fidl::encoding::DynamicFlags::empty(),
15819 )
15820 }
15821}
15822
15823#[must_use = "FIDL methods require a response to be sent"]
15824#[derive(Debug)]
15825pub struct SymlinkQueryResponder {
15826 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15827 tx_id: u32,
15828}
15829
15830impl std::ops::Drop for SymlinkQueryResponder {
15834 fn drop(&mut self) {
15835 self.control_handle.shutdown();
15836 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15838 }
15839}
15840
15841impl fdomain_client::fidl::Responder for SymlinkQueryResponder {
15842 type ControlHandle = SymlinkControlHandle;
15843
15844 fn control_handle(&self) -> &SymlinkControlHandle {
15845 &self.control_handle
15846 }
15847
15848 fn drop_without_shutdown(mut self) {
15849 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15851 std::mem::forget(self);
15853 }
15854}
15855
15856impl SymlinkQueryResponder {
15857 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15861 let _result = self.send_raw(protocol);
15862 if _result.is_err() {
15863 self.control_handle.shutdown();
15864 }
15865 self.drop_without_shutdown();
15866 _result
15867 }
15868
15869 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15871 let _result = self.send_raw(protocol);
15872 self.drop_without_shutdown();
15873 _result
15874 }
15875
15876 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15877 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
15878 (protocol,),
15879 self.tx_id,
15880 0x2658edee9decfc06,
15881 fidl::encoding::DynamicFlags::empty(),
15882 )
15883 }
15884}
15885
15886#[must_use = "FIDL methods require a response to be sent"]
15887#[derive(Debug)]
15888pub struct SymlinkDeprecatedGetAttrResponder {
15889 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15890 tx_id: u32,
15891}
15892
15893impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
15897 fn drop(&mut self) {
15898 self.control_handle.shutdown();
15899 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15901 }
15902}
15903
15904impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetAttrResponder {
15905 type ControlHandle = SymlinkControlHandle;
15906
15907 fn control_handle(&self) -> &SymlinkControlHandle {
15908 &self.control_handle
15909 }
15910
15911 fn drop_without_shutdown(mut self) {
15912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15914 std::mem::forget(self);
15916 }
15917}
15918
15919impl SymlinkDeprecatedGetAttrResponder {
15920 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15924 let _result = self.send_raw(s, attributes);
15925 if _result.is_err() {
15926 self.control_handle.shutdown();
15927 }
15928 self.drop_without_shutdown();
15929 _result
15930 }
15931
15932 pub fn send_no_shutdown_on_err(
15934 self,
15935 mut s: i32,
15936 mut attributes: &NodeAttributes,
15937 ) -> Result<(), fidl::Error> {
15938 let _result = self.send_raw(s, attributes);
15939 self.drop_without_shutdown();
15940 _result
15941 }
15942
15943 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15944 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15945 (s, attributes),
15946 self.tx_id,
15947 0x78985e216314dafd,
15948 fidl::encoding::DynamicFlags::empty(),
15949 )
15950 }
15951}
15952
15953#[must_use = "FIDL methods require a response to be sent"]
15954#[derive(Debug)]
15955pub struct SymlinkDeprecatedSetAttrResponder {
15956 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15957 tx_id: u32,
15958}
15959
15960impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
15964 fn drop(&mut self) {
15965 self.control_handle.shutdown();
15966 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15968 }
15969}
15970
15971impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetAttrResponder {
15972 type ControlHandle = SymlinkControlHandle;
15973
15974 fn control_handle(&self) -> &SymlinkControlHandle {
15975 &self.control_handle
15976 }
15977
15978 fn drop_without_shutdown(mut self) {
15979 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15981 std::mem::forget(self);
15983 }
15984}
15985
15986impl SymlinkDeprecatedSetAttrResponder {
15987 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15991 let _result = self.send_raw(s);
15992 if _result.is_err() {
15993 self.control_handle.shutdown();
15994 }
15995 self.drop_without_shutdown();
15996 _result
15997 }
15998
15999 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16001 let _result = self.send_raw(s);
16002 self.drop_without_shutdown();
16003 _result
16004 }
16005
16006 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16007 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
16008 (s,),
16009 self.tx_id,
16010 0x4186c0f40d938f46,
16011 fidl::encoding::DynamicFlags::empty(),
16012 )
16013 }
16014}
16015
16016#[must_use = "FIDL methods require a response to be sent"]
16017#[derive(Debug)]
16018pub struct SymlinkDeprecatedGetFlagsResponder {
16019 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16020 tx_id: u32,
16021}
16022
16023impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
16027 fn drop(&mut self) {
16028 self.control_handle.shutdown();
16029 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16031 }
16032}
16033
16034impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetFlagsResponder {
16035 type ControlHandle = SymlinkControlHandle;
16036
16037 fn control_handle(&self) -> &SymlinkControlHandle {
16038 &self.control_handle
16039 }
16040
16041 fn drop_without_shutdown(mut self) {
16042 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16044 std::mem::forget(self);
16046 }
16047}
16048
16049impl SymlinkDeprecatedGetFlagsResponder {
16050 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16054 let _result = self.send_raw(s, flags);
16055 if _result.is_err() {
16056 self.control_handle.shutdown();
16057 }
16058 self.drop_without_shutdown();
16059 _result
16060 }
16061
16062 pub fn send_no_shutdown_on_err(
16064 self,
16065 mut s: i32,
16066 mut flags: OpenFlags,
16067 ) -> Result<(), fidl::Error> {
16068 let _result = self.send_raw(s, flags);
16069 self.drop_without_shutdown();
16070 _result
16071 }
16072
16073 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16074 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
16075 (s, flags),
16076 self.tx_id,
16077 0x5b88fffb8eda3aa1,
16078 fidl::encoding::DynamicFlags::empty(),
16079 )
16080 }
16081}
16082
16083#[must_use = "FIDL methods require a response to be sent"]
16084#[derive(Debug)]
16085pub struct SymlinkDeprecatedSetFlagsResponder {
16086 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16087 tx_id: u32,
16088}
16089
16090impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
16094 fn drop(&mut self) {
16095 self.control_handle.shutdown();
16096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16098 }
16099}
16100
16101impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetFlagsResponder {
16102 type ControlHandle = SymlinkControlHandle;
16103
16104 fn control_handle(&self) -> &SymlinkControlHandle {
16105 &self.control_handle
16106 }
16107
16108 fn drop_without_shutdown(mut self) {
16109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16111 std::mem::forget(self);
16113 }
16114}
16115
16116impl SymlinkDeprecatedSetFlagsResponder {
16117 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16121 let _result = self.send_raw(s);
16122 if _result.is_err() {
16123 self.control_handle.shutdown();
16124 }
16125 self.drop_without_shutdown();
16126 _result
16127 }
16128
16129 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16131 let _result = self.send_raw(s);
16132 self.drop_without_shutdown();
16133 _result
16134 }
16135
16136 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16137 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
16138 (s,),
16139 self.tx_id,
16140 0x5295b76c71fde733,
16141 fidl::encoding::DynamicFlags::empty(),
16142 )
16143 }
16144}
16145
16146#[must_use = "FIDL methods require a response to be sent"]
16147#[derive(Debug)]
16148pub struct SymlinkGetFlagsResponder {
16149 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16150 tx_id: u32,
16151}
16152
16153impl std::ops::Drop for SymlinkGetFlagsResponder {
16157 fn drop(&mut self) {
16158 self.control_handle.shutdown();
16159 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16161 }
16162}
16163
16164impl fdomain_client::fidl::Responder for SymlinkGetFlagsResponder {
16165 type ControlHandle = SymlinkControlHandle;
16166
16167 fn control_handle(&self) -> &SymlinkControlHandle {
16168 &self.control_handle
16169 }
16170
16171 fn drop_without_shutdown(mut self) {
16172 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16174 std::mem::forget(self);
16176 }
16177}
16178
16179impl SymlinkGetFlagsResponder {
16180 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16184 let _result = self.send_raw(result);
16185 if _result.is_err() {
16186 self.control_handle.shutdown();
16187 }
16188 self.drop_without_shutdown();
16189 _result
16190 }
16191
16192 pub fn send_no_shutdown_on_err(
16194 self,
16195 mut result: Result<Flags, i32>,
16196 ) -> Result<(), fidl::Error> {
16197 let _result = self.send_raw(result);
16198 self.drop_without_shutdown();
16199 _result
16200 }
16201
16202 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16203 self.control_handle
16204 .inner
16205 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
16206 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
16207 self.tx_id,
16208 0x176eb318f64ec23,
16209 fidl::encoding::DynamicFlags::FLEXIBLE,
16210 )
16211 }
16212}
16213
16214#[must_use = "FIDL methods require a response to be sent"]
16215#[derive(Debug)]
16216pub struct SymlinkSetFlagsResponder {
16217 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16218 tx_id: u32,
16219}
16220
16221impl std::ops::Drop for SymlinkSetFlagsResponder {
16225 fn drop(&mut self) {
16226 self.control_handle.shutdown();
16227 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16229 }
16230}
16231
16232impl fdomain_client::fidl::Responder for SymlinkSetFlagsResponder {
16233 type ControlHandle = SymlinkControlHandle;
16234
16235 fn control_handle(&self) -> &SymlinkControlHandle {
16236 &self.control_handle
16237 }
16238
16239 fn drop_without_shutdown(mut self) {
16240 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16242 std::mem::forget(self);
16244 }
16245}
16246
16247impl SymlinkSetFlagsResponder {
16248 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16252 let _result = self.send_raw(result);
16253 if _result.is_err() {
16254 self.control_handle.shutdown();
16255 }
16256 self.drop_without_shutdown();
16257 _result
16258 }
16259
16260 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16262 let _result = self.send_raw(result);
16263 self.drop_without_shutdown();
16264 _result
16265 }
16266
16267 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16268 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
16269 fidl::encoding::EmptyStruct,
16270 i32,
16271 >>(
16272 fidl::encoding::FlexibleResult::new(result),
16273 self.tx_id,
16274 0x55a8028685791ea8,
16275 fidl::encoding::DynamicFlags::FLEXIBLE,
16276 )
16277 }
16278}
16279
16280#[must_use = "FIDL methods require a response to be sent"]
16281#[derive(Debug)]
16282pub struct SymlinkQueryFilesystemResponder {
16283 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16284 tx_id: u32,
16285}
16286
16287impl std::ops::Drop for SymlinkQueryFilesystemResponder {
16291 fn drop(&mut self) {
16292 self.control_handle.shutdown();
16293 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16295 }
16296}
16297
16298impl fdomain_client::fidl::Responder for SymlinkQueryFilesystemResponder {
16299 type ControlHandle = SymlinkControlHandle;
16300
16301 fn control_handle(&self) -> &SymlinkControlHandle {
16302 &self.control_handle
16303 }
16304
16305 fn drop_without_shutdown(mut self) {
16306 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16308 std::mem::forget(self);
16310 }
16311}
16312
16313impl SymlinkQueryFilesystemResponder {
16314 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16318 let _result = self.send_raw(s, info);
16319 if _result.is_err() {
16320 self.control_handle.shutdown();
16321 }
16322 self.drop_without_shutdown();
16323 _result
16324 }
16325
16326 pub fn send_no_shutdown_on_err(
16328 self,
16329 mut s: i32,
16330 mut info: Option<&FilesystemInfo>,
16331 ) -> Result<(), fidl::Error> {
16332 let _result = self.send_raw(s, info);
16333 self.drop_without_shutdown();
16334 _result
16335 }
16336
16337 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16338 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
16339 (s, info),
16340 self.tx_id,
16341 0x6f344a1c6b0a0610,
16342 fidl::encoding::DynamicFlags::empty(),
16343 )
16344 }
16345}
16346
16347#[must_use = "FIDL methods require a response to be sent"]
16348#[derive(Debug)]
16349pub struct SymlinkGetAttributesResponder {
16350 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16351 tx_id: u32,
16352}
16353
16354impl std::ops::Drop for SymlinkGetAttributesResponder {
16358 fn drop(&mut self) {
16359 self.control_handle.shutdown();
16360 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16362 }
16363}
16364
16365impl fdomain_client::fidl::Responder for SymlinkGetAttributesResponder {
16366 type ControlHandle = SymlinkControlHandle;
16367
16368 fn control_handle(&self) -> &SymlinkControlHandle {
16369 &self.control_handle
16370 }
16371
16372 fn drop_without_shutdown(mut self) {
16373 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16375 std::mem::forget(self);
16377 }
16378}
16379
16380impl SymlinkGetAttributesResponder {
16381 pub fn send(
16385 self,
16386 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16387 ) -> Result<(), fidl::Error> {
16388 let _result = self.send_raw(result);
16389 if _result.is_err() {
16390 self.control_handle.shutdown();
16391 }
16392 self.drop_without_shutdown();
16393 _result
16394 }
16395
16396 pub fn send_no_shutdown_on_err(
16398 self,
16399 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16400 ) -> Result<(), fidl::Error> {
16401 let _result = self.send_raw(result);
16402 self.drop_without_shutdown();
16403 _result
16404 }
16405
16406 fn send_raw(
16407 &self,
16408 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16409 ) -> Result<(), fidl::Error> {
16410 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16411 result,
16412 self.tx_id,
16413 0x3d4396a638ea053b,
16414 fidl::encoding::DynamicFlags::empty(),
16415 )
16416 }
16417}
16418
16419#[must_use = "FIDL methods require a response to be sent"]
16420#[derive(Debug)]
16421pub struct SymlinkUpdateAttributesResponder {
16422 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16423 tx_id: u32,
16424}
16425
16426impl std::ops::Drop for SymlinkUpdateAttributesResponder {
16430 fn drop(&mut self) {
16431 self.control_handle.shutdown();
16432 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16434 }
16435}
16436
16437impl fdomain_client::fidl::Responder for SymlinkUpdateAttributesResponder {
16438 type ControlHandle = SymlinkControlHandle;
16439
16440 fn control_handle(&self) -> &SymlinkControlHandle {
16441 &self.control_handle
16442 }
16443
16444 fn drop_without_shutdown(mut self) {
16445 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16447 std::mem::forget(self);
16449 }
16450}
16451
16452impl SymlinkUpdateAttributesResponder {
16453 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16457 let _result = self.send_raw(result);
16458 if _result.is_err() {
16459 self.control_handle.shutdown();
16460 }
16461 self.drop_without_shutdown();
16462 _result
16463 }
16464
16465 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16467 let _result = self.send_raw(result);
16468 self.drop_without_shutdown();
16469 _result
16470 }
16471
16472 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16473 self.control_handle
16474 .inner
16475 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16476 result,
16477 self.tx_id,
16478 0x3308c1da5a89bf08,
16479 fidl::encoding::DynamicFlags::empty(),
16480 )
16481 }
16482}
16483
16484#[must_use = "FIDL methods require a response to be sent"]
16485#[derive(Debug)]
16486pub struct SymlinkSyncResponder {
16487 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16488 tx_id: u32,
16489}
16490
16491impl std::ops::Drop for SymlinkSyncResponder {
16495 fn drop(&mut self) {
16496 self.control_handle.shutdown();
16497 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16499 }
16500}
16501
16502impl fdomain_client::fidl::Responder for SymlinkSyncResponder {
16503 type ControlHandle = SymlinkControlHandle;
16504
16505 fn control_handle(&self) -> &SymlinkControlHandle {
16506 &self.control_handle
16507 }
16508
16509 fn drop_without_shutdown(mut self) {
16510 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16512 std::mem::forget(self);
16514 }
16515}
16516
16517impl SymlinkSyncResponder {
16518 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16522 let _result = self.send_raw(result);
16523 if _result.is_err() {
16524 self.control_handle.shutdown();
16525 }
16526 self.drop_without_shutdown();
16527 _result
16528 }
16529
16530 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16532 let _result = self.send_raw(result);
16533 self.drop_without_shutdown();
16534 _result
16535 }
16536
16537 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16538 self.control_handle
16539 .inner
16540 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16541 result,
16542 self.tx_id,
16543 0x2c5c27ca0ab5dc49,
16544 fidl::encoding::DynamicFlags::empty(),
16545 )
16546 }
16547}
16548
16549#[must_use = "FIDL methods require a response to be sent"]
16550#[derive(Debug)]
16551pub struct SymlinkGetExtendedAttributeResponder {
16552 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16553 tx_id: u32,
16554}
16555
16556impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
16560 fn drop(&mut self) {
16561 self.control_handle.shutdown();
16562 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16564 }
16565}
16566
16567impl fdomain_client::fidl::Responder for SymlinkGetExtendedAttributeResponder {
16568 type ControlHandle = SymlinkControlHandle;
16569
16570 fn control_handle(&self) -> &SymlinkControlHandle {
16571 &self.control_handle
16572 }
16573
16574 fn drop_without_shutdown(mut self) {
16575 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16577 std::mem::forget(self);
16579 }
16580}
16581
16582impl SymlinkGetExtendedAttributeResponder {
16583 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16587 let _result = self.send_raw(result);
16588 if _result.is_err() {
16589 self.control_handle.shutdown();
16590 }
16591 self.drop_without_shutdown();
16592 _result
16593 }
16594
16595 pub fn send_no_shutdown_on_err(
16597 self,
16598 mut result: Result<ExtendedAttributeValue, i32>,
16599 ) -> Result<(), fidl::Error> {
16600 let _result = self.send_raw(result);
16601 self.drop_without_shutdown();
16602 _result
16603 }
16604
16605 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16606 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
16607 result.as_mut().map_err(|e| *e),
16608 self.tx_id,
16609 0x45ffa3ccfdeb76db,
16610 fidl::encoding::DynamicFlags::empty(),
16611 )
16612 }
16613}
16614
16615#[must_use = "FIDL methods require a response to be sent"]
16616#[derive(Debug)]
16617pub struct SymlinkSetExtendedAttributeResponder {
16618 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16619 tx_id: u32,
16620}
16621
16622impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
16626 fn drop(&mut self) {
16627 self.control_handle.shutdown();
16628 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16630 }
16631}
16632
16633impl fdomain_client::fidl::Responder for SymlinkSetExtendedAttributeResponder {
16634 type ControlHandle = SymlinkControlHandle;
16635
16636 fn control_handle(&self) -> &SymlinkControlHandle {
16637 &self.control_handle
16638 }
16639
16640 fn drop_without_shutdown(mut self) {
16641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16643 std::mem::forget(self);
16645 }
16646}
16647
16648impl SymlinkSetExtendedAttributeResponder {
16649 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16653 let _result = self.send_raw(result);
16654 if _result.is_err() {
16655 self.control_handle.shutdown();
16656 }
16657 self.drop_without_shutdown();
16658 _result
16659 }
16660
16661 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16663 let _result = self.send_raw(result);
16664 self.drop_without_shutdown();
16665 _result
16666 }
16667
16668 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16669 self.control_handle
16670 .inner
16671 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16672 result,
16673 self.tx_id,
16674 0x4a951362f681f23c,
16675 fidl::encoding::DynamicFlags::empty(),
16676 )
16677 }
16678}
16679
16680#[must_use = "FIDL methods require a response to be sent"]
16681#[derive(Debug)]
16682pub struct SymlinkRemoveExtendedAttributeResponder {
16683 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16684 tx_id: u32,
16685}
16686
16687impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
16691 fn drop(&mut self) {
16692 self.control_handle.shutdown();
16693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16695 }
16696}
16697
16698impl fdomain_client::fidl::Responder for SymlinkRemoveExtendedAttributeResponder {
16699 type ControlHandle = SymlinkControlHandle;
16700
16701 fn control_handle(&self) -> &SymlinkControlHandle {
16702 &self.control_handle
16703 }
16704
16705 fn drop_without_shutdown(mut self) {
16706 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16708 std::mem::forget(self);
16710 }
16711}
16712
16713impl SymlinkRemoveExtendedAttributeResponder {
16714 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16718 let _result = self.send_raw(result);
16719 if _result.is_err() {
16720 self.control_handle.shutdown();
16721 }
16722 self.drop_without_shutdown();
16723 _result
16724 }
16725
16726 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16728 let _result = self.send_raw(result);
16729 self.drop_without_shutdown();
16730 _result
16731 }
16732
16733 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16734 self.control_handle
16735 .inner
16736 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16737 result,
16738 self.tx_id,
16739 0x7a0b9f3a9bf9032d,
16740 fidl::encoding::DynamicFlags::empty(),
16741 )
16742 }
16743}
16744
16745#[must_use = "FIDL methods require a response to be sent"]
16746#[derive(Debug)]
16747pub struct SymlinkDescribeResponder {
16748 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16749 tx_id: u32,
16750}
16751
16752impl std::ops::Drop for SymlinkDescribeResponder {
16756 fn drop(&mut self) {
16757 self.control_handle.shutdown();
16758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16760 }
16761}
16762
16763impl fdomain_client::fidl::Responder for SymlinkDescribeResponder {
16764 type ControlHandle = SymlinkControlHandle;
16765
16766 fn control_handle(&self) -> &SymlinkControlHandle {
16767 &self.control_handle
16768 }
16769
16770 fn drop_without_shutdown(mut self) {
16771 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16773 std::mem::forget(self);
16775 }
16776}
16777
16778impl SymlinkDescribeResponder {
16779 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16783 let _result = self.send_raw(payload);
16784 if _result.is_err() {
16785 self.control_handle.shutdown();
16786 }
16787 self.drop_without_shutdown();
16788 _result
16789 }
16790
16791 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16793 let _result = self.send_raw(payload);
16794 self.drop_without_shutdown();
16795 _result
16796 }
16797
16798 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16799 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
16800 fidl::encoding::Flexible::new(payload),
16801 self.tx_id,
16802 0x742c2ea5e89831f3,
16803 fidl::encoding::DynamicFlags::FLEXIBLE,
16804 )
16805 }
16806}
16807
16808#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16809pub struct WritableMarker;
16810
16811impl fdomain_client::fidl::ProtocolMarker for WritableMarker {
16812 type Proxy = WritableProxy;
16813 type RequestStream = WritableRequestStream;
16814
16815 const DEBUG_NAME: &'static str = "(anonymous) Writable";
16816}
16817pub type WritableWriteResult = Result<u64, i32>;
16818
16819pub trait WritableProxyInterface: Send + Sync {
16820 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
16821 + Send;
16822 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
16823}
16824
16825#[derive(Debug, Clone)]
16826pub struct WritableProxy {
16827 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
16828}
16829
16830impl fdomain_client::fidl::Proxy for WritableProxy {
16831 type Protocol = WritableMarker;
16832
16833 fn from_channel(inner: fdomain_client::Channel) -> Self {
16834 Self::new(inner)
16835 }
16836
16837 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
16838 self.client.into_channel().map_err(|client| Self { client })
16839 }
16840
16841 fn as_channel(&self) -> &fdomain_client::Channel {
16842 self.client.as_channel()
16843 }
16844}
16845
16846impl WritableProxy {
16847 pub fn new(channel: fdomain_client::Channel) -> Self {
16849 let protocol_name = <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
16850 Self { client: fidl::client::Client::new(channel, protocol_name) }
16851 }
16852
16853 pub fn take_event_stream(&self) -> WritableEventStream {
16859 WritableEventStream { event_receiver: self.client.take_event_receiver() }
16860 }
16861
16862 pub fn r#write(
16886 &self,
16887 mut data: &[u8],
16888 ) -> fidl::client::QueryResponseFut<
16889 WritableWriteResult,
16890 fdomain_client::fidl::FDomainResourceDialect,
16891 > {
16892 WritableProxyInterface::r#write(self, data)
16893 }
16894}
16895
16896impl WritableProxyInterface for WritableProxy {
16897 type WriteResponseFut = fidl::client::QueryResponseFut<
16898 WritableWriteResult,
16899 fdomain_client::fidl::FDomainResourceDialect,
16900 >;
16901 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
16902 fn _decode(
16903 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16904 ) -> Result<WritableWriteResult, fidl::Error> {
16905 let _response = fidl::client::decode_transaction_body::<
16906 fidl::encoding::ResultType<WritableWriteResponse, i32>,
16907 fdomain_client::fidl::FDomainResourceDialect,
16908 0x6a31437832469f82,
16909 >(_buf?)?;
16910 Ok(_response.map(|x| x.actual_count))
16911 }
16912 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
16913 (data,),
16914 0x6a31437832469f82,
16915 fidl::encoding::DynamicFlags::empty(),
16916 _decode,
16917 )
16918 }
16919}
16920
16921pub struct WritableEventStream {
16922 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
16923}
16924
16925impl std::marker::Unpin for WritableEventStream {}
16926
16927impl futures::stream::FusedStream for WritableEventStream {
16928 fn is_terminated(&self) -> bool {
16929 self.event_receiver.is_terminated()
16930 }
16931}
16932
16933impl futures::Stream for WritableEventStream {
16934 type Item = Result<WritableEvent, fidl::Error>;
16935
16936 fn poll_next(
16937 mut self: std::pin::Pin<&mut Self>,
16938 cx: &mut std::task::Context<'_>,
16939 ) -> std::task::Poll<Option<Self::Item>> {
16940 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16941 &mut self.event_receiver,
16942 cx
16943 )?) {
16944 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
16945 None => std::task::Poll::Ready(None),
16946 }
16947 }
16948}
16949
16950#[derive(Debug)]
16951pub enum WritableEvent {}
16952
16953impl WritableEvent {
16954 fn decode(
16956 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16957 ) -> Result<WritableEvent, fidl::Error> {
16958 let (bytes, _handles) = buf.split_mut();
16959 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16960 debug_assert_eq!(tx_header.tx_id, 0);
16961 match tx_header.ordinal {
16962 _ => Err(fidl::Error::UnknownOrdinal {
16963 ordinal: tx_header.ordinal,
16964 protocol_name: <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
16965 }),
16966 }
16967 }
16968}
16969
16970pub struct WritableRequestStream {
16972 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
16973 is_terminated: bool,
16974}
16975
16976impl std::marker::Unpin for WritableRequestStream {}
16977
16978impl futures::stream::FusedStream for WritableRequestStream {
16979 fn is_terminated(&self) -> bool {
16980 self.is_terminated
16981 }
16982}
16983
16984impl fdomain_client::fidl::RequestStream for WritableRequestStream {
16985 type Protocol = WritableMarker;
16986 type ControlHandle = WritableControlHandle;
16987
16988 fn from_channel(channel: fdomain_client::Channel) -> Self {
16989 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16990 }
16991
16992 fn control_handle(&self) -> Self::ControlHandle {
16993 WritableControlHandle { inner: self.inner.clone() }
16994 }
16995
16996 fn into_inner(
16997 self,
16998 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
16999 {
17000 (self.inner, self.is_terminated)
17001 }
17002
17003 fn from_inner(
17004 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17005 is_terminated: bool,
17006 ) -> Self {
17007 Self { inner, is_terminated }
17008 }
17009}
17010
17011impl futures::Stream for WritableRequestStream {
17012 type Item = Result<WritableRequest, fidl::Error>;
17013
17014 fn poll_next(
17015 mut self: std::pin::Pin<&mut Self>,
17016 cx: &mut std::task::Context<'_>,
17017 ) -> std::task::Poll<Option<Self::Item>> {
17018 let this = &mut *self;
17019 if this.inner.check_shutdown(cx) {
17020 this.is_terminated = true;
17021 return std::task::Poll::Ready(None);
17022 }
17023 if this.is_terminated {
17024 panic!("polled WritableRequestStream after completion");
17025 }
17026 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
17027 |bytes, handles| {
17028 match this.inner.channel().read_etc(cx, bytes, handles) {
17029 std::task::Poll::Ready(Ok(())) => {}
17030 std::task::Poll::Pending => return std::task::Poll::Pending,
17031 std::task::Poll::Ready(Err(None)) => {
17032 this.is_terminated = true;
17033 return std::task::Poll::Ready(None);
17034 }
17035 std::task::Poll::Ready(Err(Some(e))) => {
17036 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17037 e.into(),
17038 ))));
17039 }
17040 }
17041
17042 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17044
17045 std::task::Poll::Ready(Some(match header.ordinal {
17046 0x6a31437832469f82 => {
17047 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17048 let mut req = fidl::new_empty!(
17049 WritableWriteRequest,
17050 fdomain_client::fidl::FDomainResourceDialect
17051 );
17052 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
17053 let control_handle = WritableControlHandle { inner: this.inner.clone() };
17054 Ok(WritableRequest::Write {
17055 data: req.data,
17056
17057 responder: WritableWriteResponder {
17058 control_handle: std::mem::ManuallyDrop::new(control_handle),
17059 tx_id: header.tx_id,
17060 },
17061 })
17062 }
17063 _ => Err(fidl::Error::UnknownOrdinal {
17064 ordinal: header.ordinal,
17065 protocol_name:
17066 <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17067 }),
17068 }))
17069 },
17070 )
17071 }
17072}
17073
17074#[derive(Debug)]
17075pub enum WritableRequest {
17076 Write { data: Vec<u8>, responder: WritableWriteResponder },
17100}
17101
17102impl WritableRequest {
17103 #[allow(irrefutable_let_patterns)]
17104 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
17105 if let WritableRequest::Write { data, responder } = self {
17106 Some((data, responder))
17107 } else {
17108 None
17109 }
17110 }
17111
17112 pub fn method_name(&self) -> &'static str {
17114 match *self {
17115 WritableRequest::Write { .. } => "write",
17116 }
17117 }
17118}
17119
17120#[derive(Debug, Clone)]
17121pub struct WritableControlHandle {
17122 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17123}
17124
17125impl fdomain_client::fidl::ControlHandle for WritableControlHandle {
17126 fn shutdown(&self) {
17127 self.inner.shutdown()
17128 }
17129
17130 fn is_closed(&self) -> bool {
17131 self.inner.channel().is_closed()
17132 }
17133 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
17134 self.inner.channel().on_closed()
17135 }
17136}
17137
17138impl WritableControlHandle {}
17139
17140#[must_use = "FIDL methods require a response to be sent"]
17141#[derive(Debug)]
17142pub struct WritableWriteResponder {
17143 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
17144 tx_id: u32,
17145}
17146
17147impl std::ops::Drop for WritableWriteResponder {
17151 fn drop(&mut self) {
17152 self.control_handle.shutdown();
17153 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17155 }
17156}
17157
17158impl fdomain_client::fidl::Responder for WritableWriteResponder {
17159 type ControlHandle = WritableControlHandle;
17160
17161 fn control_handle(&self) -> &WritableControlHandle {
17162 &self.control_handle
17163 }
17164
17165 fn drop_without_shutdown(mut self) {
17166 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17168 std::mem::forget(self);
17170 }
17171}
17172
17173impl WritableWriteResponder {
17174 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17178 let _result = self.send_raw(result);
17179 if _result.is_err() {
17180 self.control_handle.shutdown();
17181 }
17182 self.drop_without_shutdown();
17183 _result
17184 }
17185
17186 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17188 let _result = self.send_raw(result);
17189 self.drop_without_shutdown();
17190 _result
17191 }
17192
17193 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17194 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
17195 result.map(|actual_count| (actual_count,)),
17196 self.tx_id,
17197 0x6a31437832469f82,
17198 fidl::encoding::DynamicFlags::empty(),
17199 )
17200 }
17201}
17202
17203mod internal {
17204 use super::*;
17205
17206 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
17207 type Borrowed<'a> = &'a mut Self;
17208 fn take_or_borrow<'a>(
17209 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17210 ) -> Self::Borrowed<'a> {
17211 value
17212 }
17213 }
17214
17215 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
17216 type Owned = Self;
17217
17218 #[inline(always)]
17219 fn inline_align(_context: fidl::encoding::Context) -> usize {
17220 8
17221 }
17222
17223 #[inline(always)]
17224 fn inline_size(_context: fidl::encoding::Context) -> usize {
17225 40
17226 }
17227 }
17228
17229 unsafe impl
17230 fidl::encoding::Encode<
17231 DirectoryCreateSymlinkRequest,
17232 fdomain_client::fidl::FDomainResourceDialect,
17233 > for &mut DirectoryCreateSymlinkRequest
17234 {
17235 #[inline]
17236 unsafe fn encode(
17237 self,
17238 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17239 offset: usize,
17240 _depth: fidl::encoding::Depth,
17241 ) -> fidl::Result<()> {
17242 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17243 fidl::encoding::Encode::<
17245 DirectoryCreateSymlinkRequest,
17246 fdomain_client::fidl::FDomainResourceDialect,
17247 >::encode(
17248 (
17249 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17250 &self.name,
17251 ),
17252 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
17253 &self.target,
17254 ),
17255 <fidl::encoding::Optional<
17256 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17257 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17258 &mut self.connection
17259 ),
17260 ),
17261 encoder,
17262 offset,
17263 _depth,
17264 )
17265 }
17266 }
17267 unsafe impl<
17268 T0: fidl::encoding::Encode<
17269 fidl::encoding::BoundedString<255>,
17270 fdomain_client::fidl::FDomainResourceDialect,
17271 >,
17272 T1: fidl::encoding::Encode<
17273 fidl::encoding::Vector<u8, 4095>,
17274 fdomain_client::fidl::FDomainResourceDialect,
17275 >,
17276 T2: fidl::encoding::Encode<
17277 fidl::encoding::Optional<
17278 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17279 >,
17280 fdomain_client::fidl::FDomainResourceDialect,
17281 >,
17282 >
17283 fidl::encoding::Encode<
17284 DirectoryCreateSymlinkRequest,
17285 fdomain_client::fidl::FDomainResourceDialect,
17286 > for (T0, T1, T2)
17287 {
17288 #[inline]
17289 unsafe fn encode(
17290 self,
17291 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17292 offset: usize,
17293 depth: fidl::encoding::Depth,
17294 ) -> fidl::Result<()> {
17295 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17296 unsafe {
17299 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
17300 (ptr as *mut u64).write_unaligned(0);
17301 }
17302 self.0.encode(encoder, offset + 0, depth)?;
17304 self.1.encode(encoder, offset + 16, depth)?;
17305 self.2.encode(encoder, offset + 32, depth)?;
17306 Ok(())
17307 }
17308 }
17309
17310 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17311 for DirectoryCreateSymlinkRequest
17312 {
17313 #[inline(always)]
17314 fn new_empty() -> Self {
17315 Self {
17316 name: fidl::new_empty!(
17317 fidl::encoding::BoundedString<255>,
17318 fdomain_client::fidl::FDomainResourceDialect
17319 ),
17320 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect),
17321 connection: fidl::new_empty!(
17322 fidl::encoding::Optional<
17323 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17324 >,
17325 fdomain_client::fidl::FDomainResourceDialect
17326 ),
17327 }
17328 }
17329
17330 #[inline]
17331 unsafe fn decode(
17332 &mut self,
17333 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17334 offset: usize,
17335 _depth: fidl::encoding::Depth,
17336 ) -> fidl::Result<()> {
17337 decoder.debug_check_bounds::<Self>(offset);
17338 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
17340 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17341 let mask = 0xffffffff00000000u64;
17342 let maskedval = padval & mask;
17343 if maskedval != 0 {
17344 return Err(fidl::Error::NonZeroPadding {
17345 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
17346 });
17347 }
17348 fidl::decode!(
17349 fidl::encoding::BoundedString<255>,
17350 fdomain_client::fidl::FDomainResourceDialect,
17351 &mut self.name,
17352 decoder,
17353 offset + 0,
17354 _depth
17355 )?;
17356 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
17357 fidl::decode!(
17358 fidl::encoding::Optional<
17359 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17360 >,
17361 fdomain_client::fidl::FDomainResourceDialect,
17362 &mut self.connection,
17363 decoder,
17364 offset + 32,
17365 _depth
17366 )?;
17367 Ok(())
17368 }
17369 }
17370
17371 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
17372 type Borrowed<'a> = &'a mut Self;
17373 fn take_or_borrow<'a>(
17374 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17375 ) -> Self::Borrowed<'a> {
17376 value
17377 }
17378 }
17379
17380 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
17381 type Owned = Self;
17382
17383 #[inline(always)]
17384 fn inline_align(_context: fidl::encoding::Context) -> usize {
17385 8
17386 }
17387
17388 #[inline(always)]
17389 fn inline_size(_context: fidl::encoding::Context) -> usize {
17390 32
17391 }
17392 }
17393
17394 unsafe impl
17395 fidl::encoding::Encode<
17396 DirectoryDeprecatedOpenRequest,
17397 fdomain_client::fidl::FDomainResourceDialect,
17398 > for &mut DirectoryDeprecatedOpenRequest
17399 {
17400 #[inline]
17401 unsafe fn encode(
17402 self,
17403 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17404 offset: usize,
17405 _depth: fidl::encoding::Depth,
17406 ) -> fidl::Result<()> {
17407 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17408 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17410 (
17411 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17412 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
17413 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17414 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17415 ),
17416 encoder, offset, _depth
17417 )
17418 }
17419 }
17420 unsafe impl<
17421 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
17422 T1: fidl::encoding::Encode<ModeType, fdomain_client::fidl::FDomainResourceDialect>,
17423 T2: fidl::encoding::Encode<
17424 fidl::encoding::BoundedString<4095>,
17425 fdomain_client::fidl::FDomainResourceDialect,
17426 >,
17427 T3: fidl::encoding::Encode<
17428 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17429 fdomain_client::fidl::FDomainResourceDialect,
17430 >,
17431 >
17432 fidl::encoding::Encode<
17433 DirectoryDeprecatedOpenRequest,
17434 fdomain_client::fidl::FDomainResourceDialect,
17435 > for (T0, T1, T2, T3)
17436 {
17437 #[inline]
17438 unsafe fn encode(
17439 self,
17440 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17441 offset: usize,
17442 depth: fidl::encoding::Depth,
17443 ) -> fidl::Result<()> {
17444 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17445 unsafe {
17448 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
17449 (ptr as *mut u64).write_unaligned(0);
17450 }
17451 self.0.encode(encoder, offset + 0, depth)?;
17453 self.1.encode(encoder, offset + 4, depth)?;
17454 self.2.encode(encoder, offset + 8, depth)?;
17455 self.3.encode(encoder, offset + 24, depth)?;
17456 Ok(())
17457 }
17458 }
17459
17460 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17461 for DirectoryDeprecatedOpenRequest
17462 {
17463 #[inline(always)]
17464 fn new_empty() -> Self {
17465 Self {
17466 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
17467 mode: fidl::new_empty!(ModeType, fdomain_client::fidl::FDomainResourceDialect),
17468 path: fidl::new_empty!(
17469 fidl::encoding::BoundedString<4095>,
17470 fdomain_client::fidl::FDomainResourceDialect
17471 ),
17472 object: fidl::new_empty!(
17473 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17474 fdomain_client::fidl::FDomainResourceDialect
17475 ),
17476 }
17477 }
17478
17479 #[inline]
17480 unsafe fn decode(
17481 &mut self,
17482 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17483 offset: usize,
17484 _depth: fidl::encoding::Depth,
17485 ) -> fidl::Result<()> {
17486 decoder.debug_check_bounds::<Self>(offset);
17487 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
17489 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17490 let mask = 0xffffffff00000000u64;
17491 let maskedval = padval & mask;
17492 if maskedval != 0 {
17493 return Err(fidl::Error::NonZeroPadding {
17494 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
17495 });
17496 }
17497 fidl::decode!(
17498 OpenFlags,
17499 fdomain_client::fidl::FDomainResourceDialect,
17500 &mut self.flags,
17501 decoder,
17502 offset + 0,
17503 _depth
17504 )?;
17505 fidl::decode!(
17506 ModeType,
17507 fdomain_client::fidl::FDomainResourceDialect,
17508 &mut self.mode,
17509 decoder,
17510 offset + 4,
17511 _depth
17512 )?;
17513 fidl::decode!(
17514 fidl::encoding::BoundedString<4095>,
17515 fdomain_client::fidl::FDomainResourceDialect,
17516 &mut self.path,
17517 decoder,
17518 offset + 8,
17519 _depth
17520 )?;
17521 fidl::decode!(
17522 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17523 fdomain_client::fidl::FDomainResourceDialect,
17524 &mut self.object,
17525 decoder,
17526 offset + 24,
17527 _depth
17528 )?;
17529 Ok(())
17530 }
17531 }
17532
17533 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
17534 type Borrowed<'a> = &'a mut Self;
17535 fn take_or_borrow<'a>(
17536 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17537 ) -> Self::Borrowed<'a> {
17538 value
17539 }
17540 }
17541
17542 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
17543 type Owned = Self;
17544
17545 #[inline(always)]
17546 fn inline_align(_context: fidl::encoding::Context) -> usize {
17547 4
17548 }
17549
17550 #[inline(always)]
17551 fn inline_size(_context: fidl::encoding::Context) -> usize {
17552 8
17553 }
17554 }
17555
17556 unsafe impl
17557 fidl::encoding::Encode<
17558 DirectoryGetTokenResponse,
17559 fdomain_client::fidl::FDomainResourceDialect,
17560 > for &mut DirectoryGetTokenResponse
17561 {
17562 #[inline]
17563 unsafe fn encode(
17564 self,
17565 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17566 offset: usize,
17567 _depth: fidl::encoding::Depth,
17568 ) -> fidl::Result<()> {
17569 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17570 fidl::encoding::Encode::<
17572 DirectoryGetTokenResponse,
17573 fdomain_client::fidl::FDomainResourceDialect,
17574 >::encode(
17575 (
17576 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
17577 <fidl::encoding::Optional<
17578 fidl::encoding::HandleType<
17579 fdomain_client::NullableHandle,
17580 { fidl::ObjectType::NONE.into_raw() },
17581 2147483648,
17582 >,
17583 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17584 &mut self.token
17585 ),
17586 ),
17587 encoder,
17588 offset,
17589 _depth,
17590 )
17591 }
17592 }
17593 unsafe impl<
17594 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
17595 T1: fidl::encoding::Encode<
17596 fidl::encoding::Optional<
17597 fidl::encoding::HandleType<
17598 fdomain_client::NullableHandle,
17599 { fidl::ObjectType::NONE.into_raw() },
17600 2147483648,
17601 >,
17602 >,
17603 fdomain_client::fidl::FDomainResourceDialect,
17604 >,
17605 >
17606 fidl::encoding::Encode<
17607 DirectoryGetTokenResponse,
17608 fdomain_client::fidl::FDomainResourceDialect,
17609 > for (T0, T1)
17610 {
17611 #[inline]
17612 unsafe fn encode(
17613 self,
17614 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17615 offset: usize,
17616 depth: fidl::encoding::Depth,
17617 ) -> fidl::Result<()> {
17618 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17619 self.0.encode(encoder, offset + 0, depth)?;
17623 self.1.encode(encoder, offset + 4, depth)?;
17624 Ok(())
17625 }
17626 }
17627
17628 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17629 for DirectoryGetTokenResponse
17630 {
17631 #[inline(always)]
17632 fn new_empty() -> Self {
17633 Self {
17634 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
17635 token: fidl::new_empty!(
17636 fidl::encoding::Optional<
17637 fidl::encoding::HandleType<
17638 fdomain_client::NullableHandle,
17639 { fidl::ObjectType::NONE.into_raw() },
17640 2147483648,
17641 >,
17642 >,
17643 fdomain_client::fidl::FDomainResourceDialect
17644 ),
17645 }
17646 }
17647
17648 #[inline]
17649 unsafe fn decode(
17650 &mut self,
17651 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17652 offset: usize,
17653 _depth: fidl::encoding::Depth,
17654 ) -> fidl::Result<()> {
17655 decoder.debug_check_bounds::<Self>(offset);
17656 fidl::decode!(
17658 i32,
17659 fdomain_client::fidl::FDomainResourceDialect,
17660 &mut self.s,
17661 decoder,
17662 offset + 0,
17663 _depth
17664 )?;
17665 fidl::decode!(
17666 fidl::encoding::Optional<
17667 fidl::encoding::HandleType<
17668 fdomain_client::NullableHandle,
17669 { fidl::ObjectType::NONE.into_raw() },
17670 2147483648,
17671 >,
17672 >,
17673 fdomain_client::fidl::FDomainResourceDialect,
17674 &mut self.token,
17675 decoder,
17676 offset + 4,
17677 _depth
17678 )?;
17679 Ok(())
17680 }
17681 }
17682
17683 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
17684 type Borrowed<'a> = &'a mut Self;
17685 fn take_or_borrow<'a>(
17686 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17687 ) -> Self::Borrowed<'a> {
17688 value
17689 }
17690 }
17691
17692 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
17693 type Owned = Self;
17694
17695 #[inline(always)]
17696 fn inline_align(_context: fidl::encoding::Context) -> usize {
17697 8
17698 }
17699
17700 #[inline(always)]
17701 fn inline_size(_context: fidl::encoding::Context) -> usize {
17702 40
17703 }
17704 }
17705
17706 unsafe impl
17707 fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17708 for &mut DirectoryLinkRequest
17709 {
17710 #[inline]
17711 unsafe fn encode(
17712 self,
17713 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17714 offset: usize,
17715 _depth: fidl::encoding::Depth,
17716 ) -> fidl::Result<()> {
17717 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17718 fidl::encoding::Encode::<
17720 DirectoryLinkRequest,
17721 fdomain_client::fidl::FDomainResourceDialect,
17722 >::encode(
17723 (
17724 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17725 &self.src,
17726 ),
17727 <fidl::encoding::HandleType<
17728 fdomain_client::NullableHandle,
17729 { fidl::ObjectType::NONE.into_raw() },
17730 2147483648,
17731 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17732 &mut self.dst_parent_token,
17733 ),
17734 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17735 &self.dst,
17736 ),
17737 ),
17738 encoder,
17739 offset,
17740 _depth,
17741 )
17742 }
17743 }
17744 unsafe impl<
17745 T0: fidl::encoding::Encode<
17746 fidl::encoding::BoundedString<255>,
17747 fdomain_client::fidl::FDomainResourceDialect,
17748 >,
17749 T1: fidl::encoding::Encode<
17750 fidl::encoding::HandleType<
17751 fdomain_client::NullableHandle,
17752 { fidl::ObjectType::NONE.into_raw() },
17753 2147483648,
17754 >,
17755 fdomain_client::fidl::FDomainResourceDialect,
17756 >,
17757 T2: fidl::encoding::Encode<
17758 fidl::encoding::BoundedString<255>,
17759 fdomain_client::fidl::FDomainResourceDialect,
17760 >,
17761 > fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17762 for (T0, T1, T2)
17763 {
17764 #[inline]
17765 unsafe fn encode(
17766 self,
17767 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17768 offset: usize,
17769 depth: fidl::encoding::Depth,
17770 ) -> fidl::Result<()> {
17771 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17772 unsafe {
17775 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
17776 (ptr as *mut u64).write_unaligned(0);
17777 }
17778 self.0.encode(encoder, offset + 0, depth)?;
17780 self.1.encode(encoder, offset + 16, depth)?;
17781 self.2.encode(encoder, offset + 24, depth)?;
17782 Ok(())
17783 }
17784 }
17785
17786 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17787 for DirectoryLinkRequest
17788 {
17789 #[inline(always)]
17790 fn new_empty() -> Self {
17791 Self {
17792 src: fidl::new_empty!(
17793 fidl::encoding::BoundedString<255>,
17794 fdomain_client::fidl::FDomainResourceDialect
17795 ),
17796 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17797 dst: fidl::new_empty!(
17798 fidl::encoding::BoundedString<255>,
17799 fdomain_client::fidl::FDomainResourceDialect
17800 ),
17801 }
17802 }
17803
17804 #[inline]
17805 unsafe fn decode(
17806 &mut self,
17807 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17808 offset: usize,
17809 _depth: fidl::encoding::Depth,
17810 ) -> fidl::Result<()> {
17811 decoder.debug_check_bounds::<Self>(offset);
17812 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
17814 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17815 let mask = 0xffffffff00000000u64;
17816 let maskedval = padval & mask;
17817 if maskedval != 0 {
17818 return Err(fidl::Error::NonZeroPadding {
17819 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
17820 });
17821 }
17822 fidl::decode!(
17823 fidl::encoding::BoundedString<255>,
17824 fdomain_client::fidl::FDomainResourceDialect,
17825 &mut self.src,
17826 decoder,
17827 offset + 0,
17828 _depth
17829 )?;
17830 fidl::decode!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
17831 fidl::decode!(
17832 fidl::encoding::BoundedString<255>,
17833 fdomain_client::fidl::FDomainResourceDialect,
17834 &mut self.dst,
17835 decoder,
17836 offset + 24,
17837 _depth
17838 )?;
17839 Ok(())
17840 }
17841 }
17842
17843 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
17844 type Borrowed<'a> = &'a mut Self;
17845 fn take_or_borrow<'a>(
17846 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17847 ) -> Self::Borrowed<'a> {
17848 value
17849 }
17850 }
17851
17852 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
17853 type Owned = Self;
17854
17855 #[inline(always)]
17856 fn inline_align(_context: fidl::encoding::Context) -> usize {
17857 8
17858 }
17859
17860 #[inline(always)]
17861 fn inline_size(_context: fidl::encoding::Context) -> usize {
17862 48
17863 }
17864 }
17865
17866 unsafe impl
17867 fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17868 for &mut DirectoryOpenRequest
17869 {
17870 #[inline]
17871 unsafe fn encode(
17872 self,
17873 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17874 offset: usize,
17875 _depth: fidl::encoding::Depth,
17876 ) -> fidl::Result<()> {
17877 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17878 fidl::encoding::Encode::<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17880 (
17881 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17882 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17883 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
17884 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17885 ),
17886 encoder, offset, _depth
17887 )
17888 }
17889 }
17890 unsafe impl<
17891 T0: fidl::encoding::Encode<
17892 fidl::encoding::BoundedString<4095>,
17893 fdomain_client::fidl::FDomainResourceDialect,
17894 >,
17895 T1: fidl::encoding::Encode<Flags, fdomain_client::fidl::FDomainResourceDialect>,
17896 T2: fidl::encoding::Encode<Options, fdomain_client::fidl::FDomainResourceDialect>,
17897 T3: fidl::encoding::Encode<
17898 fidl::encoding::HandleType<
17899 fdomain_client::Channel,
17900 { fidl::ObjectType::CHANNEL.into_raw() },
17901 2147483648,
17902 >,
17903 fdomain_client::fidl::FDomainResourceDialect,
17904 >,
17905 > fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17906 for (T0, T1, T2, T3)
17907 {
17908 #[inline]
17909 unsafe fn encode(
17910 self,
17911 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17912 offset: usize,
17913 depth: fidl::encoding::Depth,
17914 ) -> fidl::Result<()> {
17915 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17916 unsafe {
17919 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
17920 (ptr as *mut u64).write_unaligned(0);
17921 }
17922 self.0.encode(encoder, offset + 0, depth)?;
17924 self.1.encode(encoder, offset + 16, depth)?;
17925 self.2.encode(encoder, offset + 24, depth)?;
17926 self.3.encode(encoder, offset + 40, depth)?;
17927 Ok(())
17928 }
17929 }
17930
17931 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17932 for DirectoryOpenRequest
17933 {
17934 #[inline(always)]
17935 fn new_empty() -> Self {
17936 Self {
17937 path: fidl::new_empty!(
17938 fidl::encoding::BoundedString<4095>,
17939 fdomain_client::fidl::FDomainResourceDialect
17940 ),
17941 flags: fidl::new_empty!(Flags, fdomain_client::fidl::FDomainResourceDialect),
17942 options: fidl::new_empty!(Options, fdomain_client::fidl::FDomainResourceDialect),
17943 object: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17944 }
17945 }
17946
17947 #[inline]
17948 unsafe fn decode(
17949 &mut self,
17950 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17951 offset: usize,
17952 _depth: fidl::encoding::Depth,
17953 ) -> fidl::Result<()> {
17954 decoder.debug_check_bounds::<Self>(offset);
17955 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
17957 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17958 let mask = 0xffffffff00000000u64;
17959 let maskedval = padval & mask;
17960 if maskedval != 0 {
17961 return Err(fidl::Error::NonZeroPadding {
17962 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
17963 });
17964 }
17965 fidl::decode!(
17966 fidl::encoding::BoundedString<4095>,
17967 fdomain_client::fidl::FDomainResourceDialect,
17968 &mut self.path,
17969 decoder,
17970 offset + 0,
17971 _depth
17972 )?;
17973 fidl::decode!(
17974 Flags,
17975 fdomain_client::fidl::FDomainResourceDialect,
17976 &mut self.flags,
17977 decoder,
17978 offset + 16,
17979 _depth
17980 )?;
17981 fidl::decode!(
17982 Options,
17983 fdomain_client::fidl::FDomainResourceDialect,
17984 &mut self.options,
17985 decoder,
17986 offset + 24,
17987 _depth
17988 )?;
17989 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
17990 Ok(())
17991 }
17992 }
17993
17994 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
17995 type Borrowed<'a> = &'a mut Self;
17996 fn take_or_borrow<'a>(
17997 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17998 ) -> Self::Borrowed<'a> {
17999 value
18000 }
18001 }
18002
18003 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
18004 type Owned = Self;
18005
18006 #[inline(always)]
18007 fn inline_align(_context: fidl::encoding::Context) -> usize {
18008 8
18009 }
18010
18011 #[inline(always)]
18012 fn inline_size(_context: fidl::encoding::Context) -> usize {
18013 40
18014 }
18015 }
18016
18017 unsafe impl
18018 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18019 for &mut DirectoryRenameRequest
18020 {
18021 #[inline]
18022 unsafe fn encode(
18023 self,
18024 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18025 offset: usize,
18026 _depth: fidl::encoding::Depth,
18027 ) -> fidl::Result<()> {
18028 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18029 fidl::encoding::Encode::<
18031 DirectoryRenameRequest,
18032 fdomain_client::fidl::FDomainResourceDialect,
18033 >::encode(
18034 (
18035 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18036 &self.src,
18037 ),
18038 <fidl::encoding::HandleType<
18039 fdomain_client::Event,
18040 { fidl::ObjectType::EVENT.into_raw() },
18041 2147483648,
18042 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18043 &mut self.dst_parent_token,
18044 ),
18045 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18046 &self.dst,
18047 ),
18048 ),
18049 encoder,
18050 offset,
18051 _depth,
18052 )
18053 }
18054 }
18055 unsafe impl<
18056 T0: fidl::encoding::Encode<
18057 fidl::encoding::BoundedString<255>,
18058 fdomain_client::fidl::FDomainResourceDialect,
18059 >,
18060 T1: fidl::encoding::Encode<
18061 fidl::encoding::HandleType<
18062 fdomain_client::Event,
18063 { fidl::ObjectType::EVENT.into_raw() },
18064 2147483648,
18065 >,
18066 fdomain_client::fidl::FDomainResourceDialect,
18067 >,
18068 T2: fidl::encoding::Encode<
18069 fidl::encoding::BoundedString<255>,
18070 fdomain_client::fidl::FDomainResourceDialect,
18071 >,
18072 >
18073 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18074 for (T0, T1, T2)
18075 {
18076 #[inline]
18077 unsafe fn encode(
18078 self,
18079 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18080 offset: usize,
18081 depth: fidl::encoding::Depth,
18082 ) -> fidl::Result<()> {
18083 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18084 unsafe {
18087 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18088 (ptr as *mut u64).write_unaligned(0);
18089 }
18090 self.0.encode(encoder, offset + 0, depth)?;
18092 self.1.encode(encoder, offset + 16, depth)?;
18093 self.2.encode(encoder, offset + 24, depth)?;
18094 Ok(())
18095 }
18096 }
18097
18098 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18099 for DirectoryRenameRequest
18100 {
18101 #[inline(always)]
18102 fn new_empty() -> Self {
18103 Self {
18104 src: fidl::new_empty!(
18105 fidl::encoding::BoundedString<255>,
18106 fdomain_client::fidl::FDomainResourceDialect
18107 ),
18108 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18109 dst: fidl::new_empty!(
18110 fidl::encoding::BoundedString<255>,
18111 fdomain_client::fidl::FDomainResourceDialect
18112 ),
18113 }
18114 }
18115
18116 #[inline]
18117 unsafe fn decode(
18118 &mut self,
18119 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18120 offset: usize,
18121 _depth: fidl::encoding::Depth,
18122 ) -> fidl::Result<()> {
18123 decoder.debug_check_bounds::<Self>(offset);
18124 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18126 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18127 let mask = 0xffffffff00000000u64;
18128 let maskedval = padval & mask;
18129 if maskedval != 0 {
18130 return Err(fidl::Error::NonZeroPadding {
18131 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18132 });
18133 }
18134 fidl::decode!(
18135 fidl::encoding::BoundedString<255>,
18136 fdomain_client::fidl::FDomainResourceDialect,
18137 &mut self.src,
18138 decoder,
18139 offset + 0,
18140 _depth
18141 )?;
18142 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
18143 fidl::decode!(
18144 fidl::encoding::BoundedString<255>,
18145 fdomain_client::fidl::FDomainResourceDialect,
18146 &mut self.dst,
18147 decoder,
18148 offset + 24,
18149 _depth
18150 )?;
18151 Ok(())
18152 }
18153 }
18154
18155 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
18156 type Borrowed<'a> = &'a mut Self;
18157 fn take_or_borrow<'a>(
18158 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18159 ) -> Self::Borrowed<'a> {
18160 value
18161 }
18162 }
18163
18164 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
18165 type Owned = Self;
18166
18167 #[inline(always)]
18168 fn inline_align(_context: fidl::encoding::Context) -> usize {
18169 4
18170 }
18171
18172 #[inline(always)]
18173 fn inline_size(_context: fidl::encoding::Context) -> usize {
18174 12
18175 }
18176 }
18177
18178 unsafe impl
18179 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18180 for &mut DirectoryWatchRequest
18181 {
18182 #[inline]
18183 unsafe fn encode(
18184 self,
18185 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18186 offset: usize,
18187 _depth: fidl::encoding::Depth,
18188 ) -> fidl::Result<()> {
18189 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18190 fidl::encoding::Encode::<
18192 DirectoryWatchRequest,
18193 fdomain_client::fidl::FDomainResourceDialect,
18194 >::encode(
18195 (
18196 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
18197 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18198 <fidl::encoding::Endpoint<
18199 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18200 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18201 &mut self.watcher
18202 ),
18203 ),
18204 encoder,
18205 offset,
18206 _depth,
18207 )
18208 }
18209 }
18210 unsafe impl<
18211 T0: fidl::encoding::Encode<WatchMask, fdomain_client::fidl::FDomainResourceDialect>,
18212 T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
18213 T2: fidl::encoding::Encode<
18214 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18215 fdomain_client::fidl::FDomainResourceDialect,
18216 >,
18217 >
18218 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18219 for (T0, T1, T2)
18220 {
18221 #[inline]
18222 unsafe fn encode(
18223 self,
18224 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18225 offset: usize,
18226 depth: fidl::encoding::Depth,
18227 ) -> fidl::Result<()> {
18228 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18229 self.0.encode(encoder, offset + 0, depth)?;
18233 self.1.encode(encoder, offset + 4, depth)?;
18234 self.2.encode(encoder, offset + 8, depth)?;
18235 Ok(())
18236 }
18237 }
18238
18239 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18240 for DirectoryWatchRequest
18241 {
18242 #[inline(always)]
18243 fn new_empty() -> Self {
18244 Self {
18245 mask: fidl::new_empty!(WatchMask, fdomain_client::fidl::FDomainResourceDialect),
18246 options: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
18247 watcher: fidl::new_empty!(
18248 fidl::encoding::Endpoint<
18249 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18250 >,
18251 fdomain_client::fidl::FDomainResourceDialect
18252 ),
18253 }
18254 }
18255
18256 #[inline]
18257 unsafe fn decode(
18258 &mut self,
18259 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18260 offset: usize,
18261 _depth: fidl::encoding::Depth,
18262 ) -> fidl::Result<()> {
18263 decoder.debug_check_bounds::<Self>(offset);
18264 fidl::decode!(
18266 WatchMask,
18267 fdomain_client::fidl::FDomainResourceDialect,
18268 &mut self.mask,
18269 decoder,
18270 offset + 0,
18271 _depth
18272 )?;
18273 fidl::decode!(
18274 u32,
18275 fdomain_client::fidl::FDomainResourceDialect,
18276 &mut self.options,
18277 decoder,
18278 offset + 4,
18279 _depth
18280 )?;
18281 fidl::decode!(
18282 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18283 fdomain_client::fidl::FDomainResourceDialect,
18284 &mut self.watcher,
18285 decoder,
18286 offset + 8,
18287 _depth
18288 )?;
18289 Ok(())
18290 }
18291 }
18292
18293 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
18294 type Borrowed<'a> = &'a mut Self;
18295 fn take_or_borrow<'a>(
18296 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18297 ) -> Self::Borrowed<'a> {
18298 value
18299 }
18300 }
18301
18302 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
18303 type Owned = Self;
18304
18305 #[inline(always)]
18306 fn inline_align(_context: fidl::encoding::Context) -> usize {
18307 8
18308 }
18309
18310 #[inline(always)]
18311 fn inline_size(_context: fidl::encoding::Context) -> usize {
18312 24
18313 }
18314 }
18315
18316 unsafe impl
18317 fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18318 for &mut FileAllocateRequest
18319 {
18320 #[inline]
18321 unsafe fn encode(
18322 self,
18323 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18324 offset: usize,
18325 _depth: fidl::encoding::Depth,
18326 ) -> fidl::Result<()> {
18327 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18328 fidl::encoding::Encode::<
18330 FileAllocateRequest,
18331 fdomain_client::fidl::FDomainResourceDialect,
18332 >::encode(
18333 (
18334 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
18335 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
18336 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
18337 ),
18338 encoder,
18339 offset,
18340 _depth,
18341 )
18342 }
18343 }
18344 unsafe impl<
18345 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18346 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18347 T2: fidl::encoding::Encode<AllocateMode, fdomain_client::fidl::FDomainResourceDialect>,
18348 > fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18349 for (T0, T1, T2)
18350 {
18351 #[inline]
18352 unsafe fn encode(
18353 self,
18354 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18355 offset: usize,
18356 depth: fidl::encoding::Depth,
18357 ) -> fidl::Result<()> {
18358 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18359 unsafe {
18362 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18363 (ptr as *mut u64).write_unaligned(0);
18364 }
18365 self.0.encode(encoder, offset + 0, depth)?;
18367 self.1.encode(encoder, offset + 8, depth)?;
18368 self.2.encode(encoder, offset + 16, depth)?;
18369 Ok(())
18370 }
18371 }
18372
18373 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18374 for FileAllocateRequest
18375 {
18376 #[inline(always)]
18377 fn new_empty() -> Self {
18378 Self {
18379 offset: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18380 length: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18381 mode: fidl::new_empty!(AllocateMode, fdomain_client::fidl::FDomainResourceDialect),
18382 }
18383 }
18384
18385 #[inline]
18386 unsafe fn decode(
18387 &mut self,
18388 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18389 offset: usize,
18390 _depth: fidl::encoding::Depth,
18391 ) -> fidl::Result<()> {
18392 decoder.debug_check_bounds::<Self>(offset);
18393 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18395 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18396 let mask = 0xffffffff00000000u64;
18397 let maskedval = padval & mask;
18398 if maskedval != 0 {
18399 return Err(fidl::Error::NonZeroPadding {
18400 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18401 });
18402 }
18403 fidl::decode!(
18404 u64,
18405 fdomain_client::fidl::FDomainResourceDialect,
18406 &mut self.offset,
18407 decoder,
18408 offset + 0,
18409 _depth
18410 )?;
18411 fidl::decode!(
18412 u64,
18413 fdomain_client::fidl::FDomainResourceDialect,
18414 &mut self.length,
18415 decoder,
18416 offset + 8,
18417 _depth
18418 )?;
18419 fidl::decode!(
18420 AllocateMode,
18421 fdomain_client::fidl::FDomainResourceDialect,
18422 &mut self.mode,
18423 decoder,
18424 offset + 16,
18425 _depth
18426 )?;
18427 Ok(())
18428 }
18429 }
18430
18431 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
18432 type Borrowed<'a> = &'a mut Self;
18433 fn take_or_borrow<'a>(
18434 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18435 ) -> Self::Borrowed<'a> {
18436 value
18437 }
18438 }
18439
18440 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
18441 type Owned = Self;
18442
18443 #[inline(always)]
18444 fn inline_align(_context: fidl::encoding::Context) -> usize {
18445 8
18446 }
18447
18448 #[inline(always)]
18449 fn inline_size(_context: fidl::encoding::Context) -> usize {
18450 16
18451 }
18452 }
18453
18454 unsafe impl
18455 fidl::encoding::Encode<
18456 FileEnableVerityRequest,
18457 fdomain_client::fidl::FDomainResourceDialect,
18458 > for &mut FileEnableVerityRequest
18459 {
18460 #[inline]
18461 unsafe fn encode(
18462 self,
18463 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18464 offset: usize,
18465 _depth: fidl::encoding::Depth,
18466 ) -> fidl::Result<()> {
18467 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18468 fidl::encoding::Encode::<
18470 FileEnableVerityRequest,
18471 fdomain_client::fidl::FDomainResourceDialect,
18472 >::encode(
18473 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
18474 encoder,
18475 offset,
18476 _depth,
18477 )
18478 }
18479 }
18480 unsafe impl<
18481 T0: fidl::encoding::Encode<VerificationOptions, fdomain_client::fidl::FDomainResourceDialect>,
18482 >
18483 fidl::encoding::Encode<
18484 FileEnableVerityRequest,
18485 fdomain_client::fidl::FDomainResourceDialect,
18486 > for (T0,)
18487 {
18488 #[inline]
18489 unsafe fn encode(
18490 self,
18491 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18492 offset: usize,
18493 depth: fidl::encoding::Depth,
18494 ) -> fidl::Result<()> {
18495 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18496 self.0.encode(encoder, offset + 0, depth)?;
18500 Ok(())
18501 }
18502 }
18503
18504 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18505 for FileEnableVerityRequest
18506 {
18507 #[inline(always)]
18508 fn new_empty() -> Self {
18509 Self {
18510 options: fidl::new_empty!(
18511 VerificationOptions,
18512 fdomain_client::fidl::FDomainResourceDialect
18513 ),
18514 }
18515 }
18516
18517 #[inline]
18518 unsafe fn decode(
18519 &mut self,
18520 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18521 offset: usize,
18522 _depth: fidl::encoding::Depth,
18523 ) -> fidl::Result<()> {
18524 decoder.debug_check_bounds::<Self>(offset);
18525 fidl::decode!(
18527 VerificationOptions,
18528 fdomain_client::fidl::FDomainResourceDialect,
18529 &mut self.options,
18530 decoder,
18531 offset + 0,
18532 _depth
18533 )?;
18534 Ok(())
18535 }
18536 }
18537
18538 impl fidl::encoding::ResourceTypeMarker for FileObject {
18539 type Borrowed<'a> = &'a mut Self;
18540 fn take_or_borrow<'a>(
18541 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18542 ) -> Self::Borrowed<'a> {
18543 value
18544 }
18545 }
18546
18547 unsafe impl fidl::encoding::TypeMarker for FileObject {
18548 type Owned = Self;
18549
18550 #[inline(always)]
18551 fn inline_align(_context: fidl::encoding::Context) -> usize {
18552 4
18553 }
18554
18555 #[inline(always)]
18556 fn inline_size(_context: fidl::encoding::Context) -> usize {
18557 8
18558 }
18559 }
18560
18561 unsafe impl fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18562 for &mut FileObject
18563 {
18564 #[inline]
18565 unsafe fn encode(
18566 self,
18567 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18568 offset: usize,
18569 _depth: fidl::encoding::Depth,
18570 ) -> fidl::Result<()> {
18571 encoder.debug_check_bounds::<FileObject>(offset);
18572 fidl::encoding::Encode::<FileObject, fdomain_client::fidl::FDomainResourceDialect>::encode(
18574 (
18575 <fidl::encoding::Optional<fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
18576 <fidl::encoding::Optional<fidl::encoding::HandleType<fdomain_client::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
18577 ),
18578 encoder, offset, _depth
18579 )
18580 }
18581 }
18582 unsafe impl<
18583 T0: fidl::encoding::Encode<
18584 fidl::encoding::Optional<
18585 fidl::encoding::HandleType<
18586 fdomain_client::Event,
18587 { fidl::ObjectType::EVENT.into_raw() },
18588 2147483648,
18589 >,
18590 >,
18591 fdomain_client::fidl::FDomainResourceDialect,
18592 >,
18593 T1: fidl::encoding::Encode<
18594 fidl::encoding::Optional<
18595 fidl::encoding::HandleType<
18596 fdomain_client::Stream,
18597 { fidl::ObjectType::STREAM.into_raw() },
18598 2147483648,
18599 >,
18600 >,
18601 fdomain_client::fidl::FDomainResourceDialect,
18602 >,
18603 > fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18604 for (T0, T1)
18605 {
18606 #[inline]
18607 unsafe fn encode(
18608 self,
18609 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18610 offset: usize,
18611 depth: fidl::encoding::Depth,
18612 ) -> fidl::Result<()> {
18613 encoder.debug_check_bounds::<FileObject>(offset);
18614 self.0.encode(encoder, offset + 0, depth)?;
18618 self.1.encode(encoder, offset + 4, depth)?;
18619 Ok(())
18620 }
18621 }
18622
18623 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileObject {
18624 #[inline(always)]
18625 fn new_empty() -> Self {
18626 Self {
18627 event: fidl::new_empty!(
18628 fidl::encoding::Optional<
18629 fidl::encoding::HandleType<
18630 fdomain_client::Event,
18631 { fidl::ObjectType::EVENT.into_raw() },
18632 2147483648,
18633 >,
18634 >,
18635 fdomain_client::fidl::FDomainResourceDialect
18636 ),
18637 stream: fidl::new_empty!(
18638 fidl::encoding::Optional<
18639 fidl::encoding::HandleType<
18640 fdomain_client::Stream,
18641 { fidl::ObjectType::STREAM.into_raw() },
18642 2147483648,
18643 >,
18644 >,
18645 fdomain_client::fidl::FDomainResourceDialect
18646 ),
18647 }
18648 }
18649
18650 #[inline]
18651 unsafe fn decode(
18652 &mut self,
18653 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18654 offset: usize,
18655 _depth: fidl::encoding::Depth,
18656 ) -> fidl::Result<()> {
18657 decoder.debug_check_bounds::<Self>(offset);
18658 fidl::decode!(
18660 fidl::encoding::Optional<
18661 fidl::encoding::HandleType<
18662 fdomain_client::Event,
18663 { fidl::ObjectType::EVENT.into_raw() },
18664 2147483648,
18665 >,
18666 >,
18667 fdomain_client::fidl::FDomainResourceDialect,
18668 &mut self.event,
18669 decoder,
18670 offset + 0,
18671 _depth
18672 )?;
18673 fidl::decode!(
18674 fidl::encoding::Optional<
18675 fidl::encoding::HandleType<
18676 fdomain_client::Stream,
18677 { fidl::ObjectType::STREAM.into_raw() },
18678 2147483648,
18679 >,
18680 >,
18681 fdomain_client::fidl::FDomainResourceDialect,
18682 &mut self.stream,
18683 decoder,
18684 offset + 4,
18685 _depth
18686 )?;
18687 Ok(())
18688 }
18689 }
18690
18691 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
18692 type Borrowed<'a> = &'a mut Self;
18693 fn take_or_borrow<'a>(
18694 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18695 ) -> Self::Borrowed<'a> {
18696 value
18697 }
18698 }
18699
18700 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
18701 type Owned = Self;
18702
18703 #[inline(always)]
18704 fn inline_align(_context: fidl::encoding::Context) -> usize {
18705 4
18706 }
18707
18708 #[inline(always)]
18709 fn inline_size(_context: fidl::encoding::Context) -> usize {
18710 4
18711 }
18712 }
18713
18714 unsafe impl
18715 fidl::encoding::Encode<
18716 FileGetBackingMemoryResponse,
18717 fdomain_client::fidl::FDomainResourceDialect,
18718 > for &mut FileGetBackingMemoryResponse
18719 {
18720 #[inline]
18721 unsafe fn encode(
18722 self,
18723 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18724 offset: usize,
18725 _depth: fidl::encoding::Depth,
18726 ) -> fidl::Result<()> {
18727 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18728 fidl::encoding::Encode::<
18730 FileGetBackingMemoryResponse,
18731 fdomain_client::fidl::FDomainResourceDialect,
18732 >::encode(
18733 (<fidl::encoding::HandleType<
18734 fdomain_client::Vmo,
18735 { fidl::ObjectType::VMO.into_raw() },
18736 2147483648,
18737 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18738 &mut self.vmo
18739 ),),
18740 encoder,
18741 offset,
18742 _depth,
18743 )
18744 }
18745 }
18746 unsafe impl<
18747 T0: fidl::encoding::Encode<
18748 fidl::encoding::HandleType<
18749 fdomain_client::Vmo,
18750 { fidl::ObjectType::VMO.into_raw() },
18751 2147483648,
18752 >,
18753 fdomain_client::fidl::FDomainResourceDialect,
18754 >,
18755 >
18756 fidl::encoding::Encode<
18757 FileGetBackingMemoryResponse,
18758 fdomain_client::fidl::FDomainResourceDialect,
18759 > for (T0,)
18760 {
18761 #[inline]
18762 unsafe fn encode(
18763 self,
18764 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18765 offset: usize,
18766 depth: fidl::encoding::Depth,
18767 ) -> fidl::Result<()> {
18768 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18769 self.0.encode(encoder, offset + 0, depth)?;
18773 Ok(())
18774 }
18775 }
18776
18777 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18778 for FileGetBackingMemoryResponse
18779 {
18780 #[inline(always)]
18781 fn new_empty() -> Self {
18782 Self {
18783 vmo: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18784 }
18785 }
18786
18787 #[inline]
18788 unsafe fn decode(
18789 &mut self,
18790 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18791 offset: usize,
18792 _depth: fidl::encoding::Depth,
18793 ) -> fidl::Result<()> {
18794 decoder.debug_check_bounds::<Self>(offset);
18795 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
18797 Ok(())
18798 }
18799 }
18800
18801 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
18802 type Borrowed<'a> = &'a mut Self;
18803 fn take_or_borrow<'a>(
18804 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18805 ) -> Self::Borrowed<'a> {
18806 value
18807 }
18808 }
18809
18810 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
18811 type Owned = Self;
18812
18813 #[inline(always)]
18814 fn inline_align(_context: fidl::encoding::Context) -> usize {
18815 8
18816 }
18817
18818 #[inline(always)]
18819 fn inline_size(_context: fidl::encoding::Context) -> usize {
18820 24
18821 }
18822 }
18823
18824 unsafe impl
18825 fidl::encoding::Encode<
18826 LinkableLinkIntoRequest,
18827 fdomain_client::fidl::FDomainResourceDialect,
18828 > for &mut LinkableLinkIntoRequest
18829 {
18830 #[inline]
18831 unsafe fn encode(
18832 self,
18833 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18834 offset: usize,
18835 _depth: fidl::encoding::Depth,
18836 ) -> fidl::Result<()> {
18837 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18838 fidl::encoding::Encode::<
18840 LinkableLinkIntoRequest,
18841 fdomain_client::fidl::FDomainResourceDialect,
18842 >::encode(
18843 (
18844 <fidl::encoding::HandleType<
18845 fdomain_client::Event,
18846 { fidl::ObjectType::EVENT.into_raw() },
18847 2147483648,
18848 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18849 &mut self.dst_parent_token,
18850 ),
18851 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18852 &self.dst,
18853 ),
18854 ),
18855 encoder,
18856 offset,
18857 _depth,
18858 )
18859 }
18860 }
18861 unsafe impl<
18862 T0: fidl::encoding::Encode<
18863 fidl::encoding::HandleType<
18864 fdomain_client::Event,
18865 { fidl::ObjectType::EVENT.into_raw() },
18866 2147483648,
18867 >,
18868 fdomain_client::fidl::FDomainResourceDialect,
18869 >,
18870 T1: fidl::encoding::Encode<
18871 fidl::encoding::BoundedString<255>,
18872 fdomain_client::fidl::FDomainResourceDialect,
18873 >,
18874 >
18875 fidl::encoding::Encode<
18876 LinkableLinkIntoRequest,
18877 fdomain_client::fidl::FDomainResourceDialect,
18878 > for (T0, T1)
18879 {
18880 #[inline]
18881 unsafe fn encode(
18882 self,
18883 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18884 offset: usize,
18885 depth: fidl::encoding::Depth,
18886 ) -> fidl::Result<()> {
18887 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18888 unsafe {
18891 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18892 (ptr as *mut u64).write_unaligned(0);
18893 }
18894 self.0.encode(encoder, offset + 0, depth)?;
18896 self.1.encode(encoder, offset + 8, depth)?;
18897 Ok(())
18898 }
18899 }
18900
18901 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18902 for LinkableLinkIntoRequest
18903 {
18904 #[inline(always)]
18905 fn new_empty() -> Self {
18906 Self {
18907 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18908 dst: fidl::new_empty!(
18909 fidl::encoding::BoundedString<255>,
18910 fdomain_client::fidl::FDomainResourceDialect
18911 ),
18912 }
18913 }
18914
18915 #[inline]
18916 unsafe fn decode(
18917 &mut self,
18918 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18919 offset: usize,
18920 _depth: fidl::encoding::Depth,
18921 ) -> fidl::Result<()> {
18922 decoder.debug_check_bounds::<Self>(offset);
18923 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
18925 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18926 let mask = 0xffffffff00000000u64;
18927 let maskedval = padval & mask;
18928 if maskedval != 0 {
18929 return Err(fidl::Error::NonZeroPadding {
18930 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18931 });
18932 }
18933 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 0, _depth)?;
18934 fidl::decode!(
18935 fidl::encoding::BoundedString<255>,
18936 fdomain_client::fidl::FDomainResourceDialect,
18937 &mut self.dst,
18938 decoder,
18939 offset + 8,
18940 _depth
18941 )?;
18942 Ok(())
18943 }
18944 }
18945
18946 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
18947 type Borrowed<'a> = &'a mut Self;
18948 fn take_or_borrow<'a>(
18949 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18950 ) -> Self::Borrowed<'a> {
18951 value
18952 }
18953 }
18954
18955 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
18956 type Owned = Self;
18957
18958 #[inline(always)]
18959 fn inline_align(_context: fidl::encoding::Context) -> usize {
18960 4
18961 }
18962
18963 #[inline(always)]
18964 fn inline_size(_context: fidl::encoding::Context) -> usize {
18965 8
18966 }
18967 }
18968
18969 unsafe impl
18970 fidl::encoding::Encode<
18971 NodeDeprecatedCloneRequest,
18972 fdomain_client::fidl::FDomainResourceDialect,
18973 > for &mut NodeDeprecatedCloneRequest
18974 {
18975 #[inline]
18976 unsafe fn encode(
18977 self,
18978 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18979 offset: usize,
18980 _depth: fidl::encoding::Depth,
18981 ) -> fidl::Result<()> {
18982 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
18983 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
18985 (
18986 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
18987 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
18988 ),
18989 encoder, offset, _depth
18990 )
18991 }
18992 }
18993 unsafe impl<
18994 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
18995 T1: fidl::encoding::Encode<
18996 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
18997 fdomain_client::fidl::FDomainResourceDialect,
18998 >,
18999 >
19000 fidl::encoding::Encode<
19001 NodeDeprecatedCloneRequest,
19002 fdomain_client::fidl::FDomainResourceDialect,
19003 > for (T0, T1)
19004 {
19005 #[inline]
19006 unsafe fn encode(
19007 self,
19008 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19009 offset: usize,
19010 depth: fidl::encoding::Depth,
19011 ) -> fidl::Result<()> {
19012 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19013 self.0.encode(encoder, offset + 0, depth)?;
19017 self.1.encode(encoder, offset + 4, depth)?;
19018 Ok(())
19019 }
19020 }
19021
19022 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19023 for NodeDeprecatedCloneRequest
19024 {
19025 #[inline(always)]
19026 fn new_empty() -> Self {
19027 Self {
19028 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
19029 object: fidl::new_empty!(
19030 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19031 fdomain_client::fidl::FDomainResourceDialect
19032 ),
19033 }
19034 }
19035
19036 #[inline]
19037 unsafe fn decode(
19038 &mut self,
19039 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19040 offset: usize,
19041 _depth: fidl::encoding::Depth,
19042 ) -> fidl::Result<()> {
19043 decoder.debug_check_bounds::<Self>(offset);
19044 fidl::decode!(
19046 OpenFlags,
19047 fdomain_client::fidl::FDomainResourceDialect,
19048 &mut self.flags,
19049 decoder,
19050 offset + 0,
19051 _depth
19052 )?;
19053 fidl::decode!(
19054 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19055 fdomain_client::fidl::FDomainResourceDialect,
19056 &mut self.object,
19057 decoder,
19058 offset + 4,
19059 _depth
19060 )?;
19061 Ok(())
19062 }
19063 }
19064
19065 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
19066 type Borrowed<'a> = &'a mut Self;
19067 fn take_or_borrow<'a>(
19068 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19069 ) -> Self::Borrowed<'a> {
19070 value
19071 }
19072 }
19073
19074 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
19075 type Owned = Self;
19076
19077 #[inline(always)]
19078 fn inline_align(_context: fidl::encoding::Context) -> usize {
19079 4
19080 }
19081
19082 #[inline(always)]
19083 fn inline_size(_context: fidl::encoding::Context) -> usize {
19084 4
19085 }
19086 }
19087
19088 unsafe impl
19089 fidl::encoding::Encode<
19090 NodeListExtendedAttributesRequest,
19091 fdomain_client::fidl::FDomainResourceDialect,
19092 > for &mut NodeListExtendedAttributesRequest
19093 {
19094 #[inline]
19095 unsafe fn encode(
19096 self,
19097 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19098 offset: usize,
19099 _depth: fidl::encoding::Depth,
19100 ) -> fidl::Result<()> {
19101 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19102 fidl::encoding::Encode::<
19104 NodeListExtendedAttributesRequest,
19105 fdomain_client::fidl::FDomainResourceDialect,
19106 >::encode(
19107 (<fidl::encoding::Endpoint<
19108 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19109 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19110 &mut self.iterator
19111 ),),
19112 encoder,
19113 offset,
19114 _depth,
19115 )
19116 }
19117 }
19118 unsafe impl<
19119 T0: fidl::encoding::Encode<
19120 fidl::encoding::Endpoint<
19121 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19122 >,
19123 fdomain_client::fidl::FDomainResourceDialect,
19124 >,
19125 >
19126 fidl::encoding::Encode<
19127 NodeListExtendedAttributesRequest,
19128 fdomain_client::fidl::FDomainResourceDialect,
19129 > for (T0,)
19130 {
19131 #[inline]
19132 unsafe fn encode(
19133 self,
19134 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19135 offset: usize,
19136 depth: fidl::encoding::Depth,
19137 ) -> fidl::Result<()> {
19138 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19139 self.0.encode(encoder, offset + 0, depth)?;
19143 Ok(())
19144 }
19145 }
19146
19147 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19148 for NodeListExtendedAttributesRequest
19149 {
19150 #[inline(always)]
19151 fn new_empty() -> Self {
19152 Self {
19153 iterator: fidl::new_empty!(
19154 fidl::encoding::Endpoint<
19155 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19156 >,
19157 fdomain_client::fidl::FDomainResourceDialect
19158 ),
19159 }
19160 }
19161
19162 #[inline]
19163 unsafe fn decode(
19164 &mut self,
19165 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19166 offset: usize,
19167 _depth: fidl::encoding::Depth,
19168 ) -> fidl::Result<()> {
19169 decoder.debug_check_bounds::<Self>(offset);
19170 fidl::decode!(
19172 fidl::encoding::Endpoint<
19173 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19174 >,
19175 fdomain_client::fidl::FDomainResourceDialect,
19176 &mut self.iterator,
19177 decoder,
19178 offset + 0,
19179 _depth
19180 )?;
19181 Ok(())
19182 }
19183 }
19184
19185 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
19186 type Borrowed<'a> = &'a mut Self;
19187 fn take_or_borrow<'a>(
19188 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19189 ) -> Self::Borrowed<'a> {
19190 value
19191 }
19192 }
19193
19194 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
19195 type Owned = Self;
19196
19197 #[inline(always)]
19198 fn inline_align(_context: fidl::encoding::Context) -> usize {
19199 8
19200 }
19201
19202 #[inline(always)]
19203 fn inline_size(_context: fidl::encoding::Context) -> usize {
19204 24
19205 }
19206 }
19207
19208 unsafe impl
19209 fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19210 for &mut NodeOnOpenRequest
19211 {
19212 #[inline]
19213 unsafe fn encode(
19214 self,
19215 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19216 offset: usize,
19217 _depth: fidl::encoding::Depth,
19218 ) -> fidl::Result<()> {
19219 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19220 fidl::encoding::Encode::<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19222 (
19223 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
19224 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
19225 ),
19226 encoder, offset, _depth
19227 )
19228 }
19229 }
19230 unsafe impl<
19231 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
19232 T1: fidl::encoding::Encode<
19233 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19234 fdomain_client::fidl::FDomainResourceDialect,
19235 >,
19236 > fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19237 for (T0, T1)
19238 {
19239 #[inline]
19240 unsafe fn encode(
19241 self,
19242 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19243 offset: usize,
19244 depth: fidl::encoding::Depth,
19245 ) -> fidl::Result<()> {
19246 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19247 unsafe {
19250 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19251 (ptr as *mut u64).write_unaligned(0);
19252 }
19253 self.0.encode(encoder, offset + 0, depth)?;
19255 self.1.encode(encoder, offset + 8, depth)?;
19256 Ok(())
19257 }
19258 }
19259
19260 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19261 for NodeOnOpenRequest
19262 {
19263 #[inline(always)]
19264 fn new_empty() -> Self {
19265 Self {
19266 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
19267 info: fidl::new_empty!(
19268 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19269 fdomain_client::fidl::FDomainResourceDialect
19270 ),
19271 }
19272 }
19273
19274 #[inline]
19275 unsafe fn decode(
19276 &mut self,
19277 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19278 offset: usize,
19279 _depth: fidl::encoding::Depth,
19280 ) -> fidl::Result<()> {
19281 decoder.debug_check_bounds::<Self>(offset);
19282 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19284 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19285 let mask = 0xffffffff00000000u64;
19286 let maskedval = padval & mask;
19287 if maskedval != 0 {
19288 return Err(fidl::Error::NonZeroPadding {
19289 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19290 });
19291 }
19292 fidl::decode!(
19293 i32,
19294 fdomain_client::fidl::FDomainResourceDialect,
19295 &mut self.s,
19296 decoder,
19297 offset + 0,
19298 _depth
19299 )?;
19300 fidl::decode!(
19301 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19302 fdomain_client::fidl::FDomainResourceDialect,
19303 &mut self.info,
19304 decoder,
19305 offset + 8,
19306 _depth
19307 )?;
19308 Ok(())
19309 }
19310 }
19311
19312 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
19313 type Borrowed<'a> = &'a mut Self;
19314 fn take_or_borrow<'a>(
19315 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19316 ) -> Self::Borrowed<'a> {
19317 value
19318 }
19319 }
19320
19321 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
19322 type Owned = Self;
19323
19324 #[inline(always)]
19325 fn inline_align(_context: fidl::encoding::Context) -> usize {
19326 8
19327 }
19328
19329 #[inline(always)]
19330 fn inline_size(_context: fidl::encoding::Context) -> usize {
19331 40
19332 }
19333 }
19334
19335 unsafe impl
19336 fidl::encoding::Encode<
19337 NodeSetExtendedAttributeRequest,
19338 fdomain_client::fidl::FDomainResourceDialect,
19339 > for &mut NodeSetExtendedAttributeRequest
19340 {
19341 #[inline]
19342 unsafe fn encode(
19343 self,
19344 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19345 offset: usize,
19346 _depth: fidl::encoding::Depth,
19347 ) -> fidl::Result<()> {
19348 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19349 fidl::encoding::Encode::<
19351 NodeSetExtendedAttributeRequest,
19352 fdomain_client::fidl::FDomainResourceDialect,
19353 >::encode(
19354 (
19355 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
19356 &self.name,
19357 ),
19358 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19359 &mut self.value,
19360 ),
19361 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
19362 &self.mode,
19363 ),
19364 ),
19365 encoder,
19366 offset,
19367 _depth,
19368 )
19369 }
19370 }
19371 unsafe impl<
19372 T0: fidl::encoding::Encode<
19373 fidl::encoding::Vector<u8, 255>,
19374 fdomain_client::fidl::FDomainResourceDialect,
19375 >,
19376 T1: fidl::encoding::Encode<
19377 ExtendedAttributeValue,
19378 fdomain_client::fidl::FDomainResourceDialect,
19379 >,
19380 T2: fidl::encoding::Encode<
19381 SetExtendedAttributeMode,
19382 fdomain_client::fidl::FDomainResourceDialect,
19383 >,
19384 >
19385 fidl::encoding::Encode<
19386 NodeSetExtendedAttributeRequest,
19387 fdomain_client::fidl::FDomainResourceDialect,
19388 > for (T0, T1, T2)
19389 {
19390 #[inline]
19391 unsafe fn encode(
19392 self,
19393 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19394 offset: usize,
19395 depth: fidl::encoding::Depth,
19396 ) -> fidl::Result<()> {
19397 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19398 unsafe {
19401 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
19402 (ptr as *mut u64).write_unaligned(0);
19403 }
19404 self.0.encode(encoder, offset + 0, depth)?;
19406 self.1.encode(encoder, offset + 16, depth)?;
19407 self.2.encode(encoder, offset + 32, depth)?;
19408 Ok(())
19409 }
19410 }
19411
19412 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19413 for NodeSetExtendedAttributeRequest
19414 {
19415 #[inline(always)]
19416 fn new_empty() -> Self {
19417 Self {
19418 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect),
19419 value: fidl::new_empty!(
19420 ExtendedAttributeValue,
19421 fdomain_client::fidl::FDomainResourceDialect
19422 ),
19423 mode: fidl::new_empty!(
19424 SetExtendedAttributeMode,
19425 fdomain_client::fidl::FDomainResourceDialect
19426 ),
19427 }
19428 }
19429
19430 #[inline]
19431 unsafe fn decode(
19432 &mut self,
19433 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19434 offset: usize,
19435 _depth: fidl::encoding::Depth,
19436 ) -> fidl::Result<()> {
19437 decoder.debug_check_bounds::<Self>(offset);
19438 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
19440 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19441 let mask = 0xffffffff00000000u64;
19442 let maskedval = padval & mask;
19443 if maskedval != 0 {
19444 return Err(fidl::Error::NonZeroPadding {
19445 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
19446 });
19447 }
19448 fidl::decode!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
19449 fidl::decode!(
19450 ExtendedAttributeValue,
19451 fdomain_client::fidl::FDomainResourceDialect,
19452 &mut self.value,
19453 decoder,
19454 offset + 16,
19455 _depth
19456 )?;
19457 fidl::decode!(
19458 SetExtendedAttributeMode,
19459 fdomain_client::fidl::FDomainResourceDialect,
19460 &mut self.mode,
19461 decoder,
19462 offset + 32,
19463 _depth
19464 )?;
19465 Ok(())
19466 }
19467 }
19468
19469 impl ConnectionInfo {
19470 #[inline(always)]
19471 fn max_ordinal_present(&self) -> u64 {
19472 if let Some(_) = self.rights {
19473 return 1;
19474 }
19475 0
19476 }
19477 }
19478
19479 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
19480 type Borrowed<'a> = &'a mut Self;
19481 fn take_or_borrow<'a>(
19482 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19483 ) -> Self::Borrowed<'a> {
19484 value
19485 }
19486 }
19487
19488 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
19489 type Owned = Self;
19490
19491 #[inline(always)]
19492 fn inline_align(_context: fidl::encoding::Context) -> usize {
19493 8
19494 }
19495
19496 #[inline(always)]
19497 fn inline_size(_context: fidl::encoding::Context) -> usize {
19498 16
19499 }
19500 }
19501
19502 unsafe impl fidl::encoding::Encode<ConnectionInfo, fdomain_client::fidl::FDomainResourceDialect>
19503 for &mut ConnectionInfo
19504 {
19505 unsafe fn encode(
19506 self,
19507 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19508 offset: usize,
19509 mut depth: fidl::encoding::Depth,
19510 ) -> fidl::Result<()> {
19511 encoder.debug_check_bounds::<ConnectionInfo>(offset);
19512 let max_ordinal: u64 = self.max_ordinal_present();
19514 encoder.write_num(max_ordinal, offset);
19515 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19516 if max_ordinal == 0 {
19518 return Ok(());
19519 }
19520 depth.increment()?;
19521 let envelope_size = 8;
19522 let bytes_len = max_ordinal as usize * envelope_size;
19523 #[allow(unused_variables)]
19524 let offset = encoder.out_of_line_offset(bytes_len);
19525 let mut _prev_end_offset: usize = 0;
19526 if 1 > max_ordinal {
19527 return Ok(());
19528 }
19529
19530 let cur_offset: usize = (1 - 1) * envelope_size;
19533
19534 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19536
19537 fidl::encoding::encode_in_envelope_optional::<
19542 Operations,
19543 fdomain_client::fidl::FDomainResourceDialect,
19544 >(
19545 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
19546 encoder,
19547 offset + cur_offset,
19548 depth,
19549 )?;
19550
19551 _prev_end_offset = cur_offset + envelope_size;
19552
19553 Ok(())
19554 }
19555 }
19556
19557 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {
19558 #[inline(always)]
19559 fn new_empty() -> Self {
19560 Self::default()
19561 }
19562
19563 unsafe fn decode(
19564 &mut self,
19565 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19566 offset: usize,
19567 mut depth: fidl::encoding::Depth,
19568 ) -> fidl::Result<()> {
19569 decoder.debug_check_bounds::<Self>(offset);
19570 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19571 None => return Err(fidl::Error::NotNullable),
19572 Some(len) => len,
19573 };
19574 if len == 0 {
19576 return Ok(());
19577 };
19578 depth.increment()?;
19579 let envelope_size = 8;
19580 let bytes_len = len * envelope_size;
19581 let offset = decoder.out_of_line_offset(bytes_len)?;
19582 let mut _next_ordinal_to_read = 0;
19584 let mut next_offset = offset;
19585 let end_offset = offset + bytes_len;
19586 _next_ordinal_to_read += 1;
19587 if next_offset >= end_offset {
19588 return Ok(());
19589 }
19590
19591 while _next_ordinal_to_read < 1 {
19593 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19594 _next_ordinal_to_read += 1;
19595 next_offset += envelope_size;
19596 }
19597
19598 let next_out_of_line = decoder.next_out_of_line();
19599 let handles_before = decoder.remaining_handles();
19600 if let Some((inlined, num_bytes, num_handles)) =
19601 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19602 {
19603 let member_inline_size =
19604 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19605 if inlined != (member_inline_size <= 4) {
19606 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19607 }
19608 let inner_offset;
19609 let mut inner_depth = depth.clone();
19610 if inlined {
19611 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19612 inner_offset = next_offset;
19613 } else {
19614 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19615 inner_depth.increment()?;
19616 }
19617 let val_ref = self.rights.get_or_insert_with(|| {
19618 fidl::new_empty!(Operations, fdomain_client::fidl::FDomainResourceDialect)
19619 });
19620 fidl::decode!(
19621 Operations,
19622 fdomain_client::fidl::FDomainResourceDialect,
19623 val_ref,
19624 decoder,
19625 inner_offset,
19626 inner_depth
19627 )?;
19628 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19629 {
19630 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19631 }
19632 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19633 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19634 }
19635 }
19636
19637 next_offset += envelope_size;
19638
19639 while next_offset < end_offset {
19641 _next_ordinal_to_read += 1;
19642 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19643 next_offset += envelope_size;
19644 }
19645
19646 Ok(())
19647 }
19648 }
19649
19650 impl FileInfo {
19651 #[inline(always)]
19652 fn max_ordinal_present(&self) -> u64 {
19653 if let Some(_) = self.attributes {
19654 return 4;
19655 }
19656 if let Some(_) = self.stream {
19657 return 3;
19658 }
19659 if let Some(_) = self.observer {
19660 return 2;
19661 }
19662 if let Some(_) = self.is_append {
19663 return 1;
19664 }
19665 0
19666 }
19667 }
19668
19669 impl fidl::encoding::ResourceTypeMarker for FileInfo {
19670 type Borrowed<'a> = &'a mut Self;
19671 fn take_or_borrow<'a>(
19672 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19673 ) -> Self::Borrowed<'a> {
19674 value
19675 }
19676 }
19677
19678 unsafe impl fidl::encoding::TypeMarker for FileInfo {
19679 type Owned = Self;
19680
19681 #[inline(always)]
19682 fn inline_align(_context: fidl::encoding::Context) -> usize {
19683 8
19684 }
19685
19686 #[inline(always)]
19687 fn inline_size(_context: fidl::encoding::Context) -> usize {
19688 16
19689 }
19690 }
19691
19692 unsafe impl fidl::encoding::Encode<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
19693 for &mut FileInfo
19694 {
19695 unsafe fn encode(
19696 self,
19697 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19698 offset: usize,
19699 mut depth: fidl::encoding::Depth,
19700 ) -> fidl::Result<()> {
19701 encoder.debug_check_bounds::<FileInfo>(offset);
19702 let max_ordinal: u64 = self.max_ordinal_present();
19704 encoder.write_num(max_ordinal, offset);
19705 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19706 if max_ordinal == 0 {
19708 return Ok(());
19709 }
19710 depth.increment()?;
19711 let envelope_size = 8;
19712 let bytes_len = max_ordinal as usize * envelope_size;
19713 #[allow(unused_variables)]
19714 let offset = encoder.out_of_line_offset(bytes_len);
19715 let mut _prev_end_offset: usize = 0;
19716 if 1 > max_ordinal {
19717 return Ok(());
19718 }
19719
19720 let cur_offset: usize = (1 - 1) * envelope_size;
19723
19724 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19726
19727 fidl::encoding::encode_in_envelope_optional::<
19732 bool,
19733 fdomain_client::fidl::FDomainResourceDialect,
19734 >(
19735 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
19736 encoder,
19737 offset + cur_offset,
19738 depth,
19739 )?;
19740
19741 _prev_end_offset = cur_offset + envelope_size;
19742 if 2 > max_ordinal {
19743 return Ok(());
19744 }
19745
19746 let cur_offset: usize = (2 - 1) * envelope_size;
19749
19750 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19752
19753 fidl::encoding::encode_in_envelope_optional::<
19758 fidl::encoding::HandleType<
19759 fdomain_client::Event,
19760 { fidl::ObjectType::EVENT.into_raw() },
19761 2147483648,
19762 >,
19763 fdomain_client::fidl::FDomainResourceDialect,
19764 >(
19765 self.observer.as_mut().map(
19766 <fidl::encoding::HandleType<
19767 fdomain_client::Event,
19768 { fidl::ObjectType::EVENT.into_raw() },
19769 2147483648,
19770 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19771 ),
19772 encoder,
19773 offset + cur_offset,
19774 depth,
19775 )?;
19776
19777 _prev_end_offset = cur_offset + envelope_size;
19778 if 3 > max_ordinal {
19779 return Ok(());
19780 }
19781
19782 let cur_offset: usize = (3 - 1) * envelope_size;
19785
19786 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19788
19789 fidl::encoding::encode_in_envelope_optional::<
19794 fidl::encoding::HandleType<
19795 fdomain_client::Stream,
19796 { fidl::ObjectType::STREAM.into_raw() },
19797 2147483648,
19798 >,
19799 fdomain_client::fidl::FDomainResourceDialect,
19800 >(
19801 self.stream.as_mut().map(
19802 <fidl::encoding::HandleType<
19803 fdomain_client::Stream,
19804 { fidl::ObjectType::STREAM.into_raw() },
19805 2147483648,
19806 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19807 ),
19808 encoder,
19809 offset + cur_offset,
19810 depth,
19811 )?;
19812
19813 _prev_end_offset = cur_offset + envelope_size;
19814 if 4 > max_ordinal {
19815 return Ok(());
19816 }
19817
19818 let cur_offset: usize = (4 - 1) * envelope_size;
19821
19822 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19824
19825 fidl::encoding::encode_in_envelope_optional::<
19830 NodeAttributes2,
19831 fdomain_client::fidl::FDomainResourceDialect,
19832 >(
19833 self.attributes
19834 .as_ref()
19835 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
19836 encoder,
19837 offset + cur_offset,
19838 depth,
19839 )?;
19840
19841 _prev_end_offset = cur_offset + envelope_size;
19842
19843 Ok(())
19844 }
19845 }
19846
19847 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileInfo {
19848 #[inline(always)]
19849 fn new_empty() -> Self {
19850 Self::default()
19851 }
19852
19853 unsafe fn decode(
19854 &mut self,
19855 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19856 offset: usize,
19857 mut depth: fidl::encoding::Depth,
19858 ) -> fidl::Result<()> {
19859 decoder.debug_check_bounds::<Self>(offset);
19860 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19861 None => return Err(fidl::Error::NotNullable),
19862 Some(len) => len,
19863 };
19864 if len == 0 {
19866 return Ok(());
19867 };
19868 depth.increment()?;
19869 let envelope_size = 8;
19870 let bytes_len = len * envelope_size;
19871 let offset = decoder.out_of_line_offset(bytes_len)?;
19872 let mut _next_ordinal_to_read = 0;
19874 let mut next_offset = offset;
19875 let end_offset = offset + bytes_len;
19876 _next_ordinal_to_read += 1;
19877 if next_offset >= end_offset {
19878 return Ok(());
19879 }
19880
19881 while _next_ordinal_to_read < 1 {
19883 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19884 _next_ordinal_to_read += 1;
19885 next_offset += envelope_size;
19886 }
19887
19888 let next_out_of_line = decoder.next_out_of_line();
19889 let handles_before = decoder.remaining_handles();
19890 if let Some((inlined, num_bytes, num_handles)) =
19891 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19892 {
19893 let member_inline_size =
19894 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19895 if inlined != (member_inline_size <= 4) {
19896 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19897 }
19898 let inner_offset;
19899 let mut inner_depth = depth.clone();
19900 if inlined {
19901 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19902 inner_offset = next_offset;
19903 } else {
19904 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19905 inner_depth.increment()?;
19906 }
19907 let val_ref = self.is_append.get_or_insert_with(|| {
19908 fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect)
19909 });
19910 fidl::decode!(
19911 bool,
19912 fdomain_client::fidl::FDomainResourceDialect,
19913 val_ref,
19914 decoder,
19915 inner_offset,
19916 inner_depth
19917 )?;
19918 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19919 {
19920 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19921 }
19922 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19923 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19924 }
19925 }
19926
19927 next_offset += envelope_size;
19928 _next_ordinal_to_read += 1;
19929 if next_offset >= end_offset {
19930 return Ok(());
19931 }
19932
19933 while _next_ordinal_to_read < 2 {
19935 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19936 _next_ordinal_to_read += 1;
19937 next_offset += envelope_size;
19938 }
19939
19940 let next_out_of_line = decoder.next_out_of_line();
19941 let handles_before = decoder.remaining_handles();
19942 if let Some((inlined, num_bytes, num_handles)) =
19943 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19944 {
19945 let member_inline_size = <fidl::encoding::HandleType<
19946 fdomain_client::Event,
19947 { fidl::ObjectType::EVENT.into_raw() },
19948 2147483648,
19949 > as fidl::encoding::TypeMarker>::inline_size(
19950 decoder.context
19951 );
19952 if inlined != (member_inline_size <= 4) {
19953 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19954 }
19955 let inner_offset;
19956 let mut inner_depth = depth.clone();
19957 if inlined {
19958 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19959 inner_offset = next_offset;
19960 } else {
19961 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19962 inner_depth.increment()?;
19963 }
19964 let val_ref =
19965 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
19966 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
19967 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19968 {
19969 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19970 }
19971 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19972 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19973 }
19974 }
19975
19976 next_offset += envelope_size;
19977 _next_ordinal_to_read += 1;
19978 if next_offset >= end_offset {
19979 return Ok(());
19980 }
19981
19982 while _next_ordinal_to_read < 3 {
19984 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19985 _next_ordinal_to_read += 1;
19986 next_offset += envelope_size;
19987 }
19988
19989 let next_out_of_line = decoder.next_out_of_line();
19990 let handles_before = decoder.remaining_handles();
19991 if let Some((inlined, num_bytes, num_handles)) =
19992 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19993 {
19994 let member_inline_size = <fidl::encoding::HandleType<
19995 fdomain_client::Stream,
19996 { fidl::ObjectType::STREAM.into_raw() },
19997 2147483648,
19998 > as fidl::encoding::TypeMarker>::inline_size(
19999 decoder.context
20000 );
20001 if inlined != (member_inline_size <= 4) {
20002 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20003 }
20004 let inner_offset;
20005 let mut inner_depth = depth.clone();
20006 if inlined {
20007 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20008 inner_offset = next_offset;
20009 } else {
20010 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20011 inner_depth.increment()?;
20012 }
20013 let val_ref =
20014 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
20015 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
20016 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20017 {
20018 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20019 }
20020 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20021 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20022 }
20023 }
20024
20025 next_offset += envelope_size;
20026 _next_ordinal_to_read += 1;
20027 if next_offset >= end_offset {
20028 return Ok(());
20029 }
20030
20031 while _next_ordinal_to_read < 4 {
20033 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20034 _next_ordinal_to_read += 1;
20035 next_offset += envelope_size;
20036 }
20037
20038 let next_out_of_line = decoder.next_out_of_line();
20039 let handles_before = decoder.remaining_handles();
20040 if let Some((inlined, num_bytes, num_handles)) =
20041 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20042 {
20043 let member_inline_size =
20044 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20045 if inlined != (member_inline_size <= 4) {
20046 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20047 }
20048 let inner_offset;
20049 let mut inner_depth = depth.clone();
20050 if inlined {
20051 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20052 inner_offset = next_offset;
20053 } else {
20054 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20055 inner_depth.increment()?;
20056 }
20057 let val_ref = self.attributes.get_or_insert_with(|| {
20058 fidl::new_empty!(NodeAttributes2, fdomain_client::fidl::FDomainResourceDialect)
20059 });
20060 fidl::decode!(
20061 NodeAttributes2,
20062 fdomain_client::fidl::FDomainResourceDialect,
20063 val_ref,
20064 decoder,
20065 inner_offset,
20066 inner_depth
20067 )?;
20068 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20069 {
20070 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20071 }
20072 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20073 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20074 }
20075 }
20076
20077 next_offset += envelope_size;
20078
20079 while next_offset < end_offset {
20081 _next_ordinal_to_read += 1;
20082 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20083 next_offset += envelope_size;
20084 }
20085
20086 Ok(())
20087 }
20088 }
20089
20090 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
20091 type Borrowed<'a> = &'a mut Self;
20092 fn take_or_borrow<'a>(
20093 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20094 ) -> Self::Borrowed<'a> {
20095 value
20096 }
20097 }
20098
20099 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
20100 type Owned = Self;
20101
20102 #[inline(always)]
20103 fn inline_align(_context: fidl::encoding::Context) -> usize {
20104 8
20105 }
20106
20107 #[inline(always)]
20108 fn inline_size(_context: fidl::encoding::Context) -> usize {
20109 16
20110 }
20111 }
20112
20113 unsafe impl
20114 fidl::encoding::Encode<ExtendedAttributeValue, fdomain_client::fidl::FDomainResourceDialect>
20115 for &mut ExtendedAttributeValue
20116 {
20117 #[inline]
20118 unsafe fn encode(
20119 self,
20120 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20121 offset: usize,
20122 _depth: fidl::encoding::Depth,
20123 ) -> fidl::Result<()> {
20124 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
20125 encoder.write_num::<u64>(self.ordinal(), offset);
20126 match self {
20127 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
20128 fidl::encoding::Vector<u8, 32768>,
20129 fdomain_client::fidl::FDomainResourceDialect,
20130 >(
20131 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
20132 val,
20133 ),
20134 encoder,
20135 offset + 8,
20136 _depth,
20137 ),
20138 ExtendedAttributeValue::Buffer(ref mut val) => {
20139 fidl::encoding::encode_in_envelope::<
20140 fidl::encoding::HandleType<
20141 fdomain_client::Vmo,
20142 { fidl::ObjectType::VMO.into_raw() },
20143 2147483648,
20144 >,
20145 fdomain_client::fidl::FDomainResourceDialect,
20146 >(
20147 <fidl::encoding::HandleType<
20148 fdomain_client::Vmo,
20149 { fidl::ObjectType::VMO.into_raw() },
20150 2147483648,
20151 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20152 val
20153 ),
20154 encoder,
20155 offset + 8,
20156 _depth,
20157 )
20158 }
20159 ExtendedAttributeValue::__SourceBreaking { .. } => {
20160 Err(fidl::Error::UnknownUnionTag)
20161 }
20162 }
20163 }
20164 }
20165
20166 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20167 for ExtendedAttributeValue
20168 {
20169 #[inline(always)]
20170 fn new_empty() -> Self {
20171 Self::__SourceBreaking { unknown_ordinal: 0 }
20172 }
20173
20174 #[inline]
20175 unsafe fn decode(
20176 &mut self,
20177 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20178 offset: usize,
20179 mut depth: fidl::encoding::Depth,
20180 ) -> fidl::Result<()> {
20181 decoder.debug_check_bounds::<Self>(offset);
20182 #[allow(unused_variables)]
20183 let next_out_of_line = decoder.next_out_of_line();
20184 let handles_before = decoder.remaining_handles();
20185 let (ordinal, inlined, num_bytes, num_handles) =
20186 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20187
20188 let member_inline_size = match ordinal {
20189 1 => {
20190 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
20191 decoder.context,
20192 )
20193 }
20194 2 => <fidl::encoding::HandleType<
20195 fdomain_client::Vmo,
20196 { fidl::ObjectType::VMO.into_raw() },
20197 2147483648,
20198 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20199 0 => return Err(fidl::Error::UnknownUnionTag),
20200 _ => num_bytes as usize,
20201 };
20202
20203 if inlined != (member_inline_size <= 4) {
20204 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20205 }
20206 let _inner_offset;
20207 if inlined {
20208 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20209 _inner_offset = offset + 8;
20210 } else {
20211 depth.increment()?;
20212 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20213 }
20214 match ordinal {
20215 1 => {
20216 #[allow(irrefutable_let_patterns)]
20217 if let ExtendedAttributeValue::Bytes(_) = self {
20218 } else {
20220 *self = ExtendedAttributeValue::Bytes(
20222 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect),
20223 );
20224 }
20225 #[allow(irrefutable_let_patterns)]
20226 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
20227 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20228 } else {
20229 unreachable!()
20230 }
20231 }
20232 2 => {
20233 #[allow(irrefutable_let_patterns)]
20234 if let ExtendedAttributeValue::Buffer(_) = self {
20235 } else {
20237 *self = ExtendedAttributeValue::Buffer(
20239 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
20240 );
20241 }
20242 #[allow(irrefutable_let_patterns)]
20243 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
20244 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20245 } else {
20246 unreachable!()
20247 }
20248 }
20249 #[allow(deprecated)]
20250 ordinal => {
20251 for _ in 0..num_handles {
20252 decoder.drop_next_handle()?;
20253 }
20254 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
20255 }
20256 }
20257 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20258 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20259 }
20260 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20261 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20262 }
20263 Ok(())
20264 }
20265 }
20266
20267 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
20268 type Borrowed<'a> = &'a mut Self;
20269 fn take_or_borrow<'a>(
20270 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20271 ) -> Self::Borrowed<'a> {
20272 value
20273 }
20274 }
20275
20276 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
20277 type Owned = Self;
20278
20279 #[inline(always)]
20280 fn inline_align(_context: fidl::encoding::Context) -> usize {
20281 8
20282 }
20283
20284 #[inline(always)]
20285 fn inline_size(_context: fidl::encoding::Context) -> usize {
20286 16
20287 }
20288 }
20289
20290 unsafe impl
20291 fidl::encoding::Encode<NodeInfoDeprecated, fdomain_client::fidl::FDomainResourceDialect>
20292 for &mut NodeInfoDeprecated
20293 {
20294 #[inline]
20295 unsafe fn encode(
20296 self,
20297 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20298 offset: usize,
20299 _depth: fidl::encoding::Depth,
20300 ) -> fidl::Result<()> {
20301 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
20302 encoder.write_num::<u64>(self.ordinal(), offset);
20303 match self {
20304 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
20305 Service,
20306 fdomain_client::fidl::FDomainResourceDialect,
20307 >(
20308 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
20309 encoder,
20310 offset + 8,
20311 _depth,
20312 ),
20313 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20314 FileObject,
20315 fdomain_client::fidl::FDomainResourceDialect,
20316 >(
20317 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20318 encoder,
20319 offset + 8,
20320 _depth,
20321 ),
20322 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20323 DirectoryObject,
20324 fdomain_client::fidl::FDomainResourceDialect,
20325 >(
20326 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20327 encoder,
20328 offset + 8,
20329 _depth,
20330 ),
20331 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20332 SymlinkObject,
20333 fdomain_client::fidl::FDomainResourceDialect,
20334 >(
20335 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20336 encoder,
20337 offset + 8,
20338 _depth,
20339 ),
20340 }
20341 }
20342 }
20343
20344 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20345 for NodeInfoDeprecated
20346 {
20347 #[inline(always)]
20348 fn new_empty() -> Self {
20349 Self::Service(fidl::new_empty!(Service, fdomain_client::fidl::FDomainResourceDialect))
20350 }
20351
20352 #[inline]
20353 unsafe fn decode(
20354 &mut self,
20355 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20356 offset: usize,
20357 mut depth: fidl::encoding::Depth,
20358 ) -> fidl::Result<()> {
20359 decoder.debug_check_bounds::<Self>(offset);
20360 #[allow(unused_variables)]
20361 let next_out_of_line = decoder.next_out_of_line();
20362 let handles_before = decoder.remaining_handles();
20363 let (ordinal, inlined, num_bytes, num_handles) =
20364 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20365
20366 let member_inline_size = match ordinal {
20367 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20368 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20369 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20370 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20371 _ => return Err(fidl::Error::UnknownUnionTag),
20372 };
20373
20374 if inlined != (member_inline_size <= 4) {
20375 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20376 }
20377 let _inner_offset;
20378 if inlined {
20379 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20380 _inner_offset = offset + 8;
20381 } else {
20382 depth.increment()?;
20383 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20384 }
20385 match ordinal {
20386 1 => {
20387 #[allow(irrefutable_let_patterns)]
20388 if let NodeInfoDeprecated::Service(_) = self {
20389 } else {
20391 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
20393 Service,
20394 fdomain_client::fidl::FDomainResourceDialect
20395 ));
20396 }
20397 #[allow(irrefutable_let_patterns)]
20398 if let NodeInfoDeprecated::Service(ref mut val) = self {
20399 fidl::decode!(
20400 Service,
20401 fdomain_client::fidl::FDomainResourceDialect,
20402 val,
20403 decoder,
20404 _inner_offset,
20405 depth
20406 )?;
20407 } else {
20408 unreachable!()
20409 }
20410 }
20411 2 => {
20412 #[allow(irrefutable_let_patterns)]
20413 if let NodeInfoDeprecated::File(_) = self {
20414 } else {
20416 *self = NodeInfoDeprecated::File(fidl::new_empty!(
20418 FileObject,
20419 fdomain_client::fidl::FDomainResourceDialect
20420 ));
20421 }
20422 #[allow(irrefutable_let_patterns)]
20423 if let NodeInfoDeprecated::File(ref mut val) = self {
20424 fidl::decode!(
20425 FileObject,
20426 fdomain_client::fidl::FDomainResourceDialect,
20427 val,
20428 decoder,
20429 _inner_offset,
20430 depth
20431 )?;
20432 } else {
20433 unreachable!()
20434 }
20435 }
20436 3 => {
20437 #[allow(irrefutable_let_patterns)]
20438 if let NodeInfoDeprecated::Directory(_) = self {
20439 } else {
20441 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
20443 DirectoryObject,
20444 fdomain_client::fidl::FDomainResourceDialect
20445 ));
20446 }
20447 #[allow(irrefutable_let_patterns)]
20448 if let NodeInfoDeprecated::Directory(ref mut val) = self {
20449 fidl::decode!(
20450 DirectoryObject,
20451 fdomain_client::fidl::FDomainResourceDialect,
20452 val,
20453 decoder,
20454 _inner_offset,
20455 depth
20456 )?;
20457 } else {
20458 unreachable!()
20459 }
20460 }
20461 4 => {
20462 #[allow(irrefutable_let_patterns)]
20463 if let NodeInfoDeprecated::Symlink(_) = self {
20464 } else {
20466 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
20468 SymlinkObject,
20469 fdomain_client::fidl::FDomainResourceDialect
20470 ));
20471 }
20472 #[allow(irrefutable_let_patterns)]
20473 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
20474 fidl::decode!(
20475 SymlinkObject,
20476 fdomain_client::fidl::FDomainResourceDialect,
20477 val,
20478 decoder,
20479 _inner_offset,
20480 depth
20481 )?;
20482 } else {
20483 unreachable!()
20484 }
20485 }
20486 ordinal => panic!("unexpected ordinal {:?}", ordinal),
20487 }
20488 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20489 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20490 }
20491 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20492 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20493 }
20494 Ok(())
20495 }
20496 }
20497
20498 impl fidl::encoding::ResourceTypeMarker for Representation {
20499 type Borrowed<'a> = &'a mut Self;
20500 fn take_or_borrow<'a>(
20501 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20502 ) -> Self::Borrowed<'a> {
20503 value
20504 }
20505 }
20506
20507 unsafe impl fidl::encoding::TypeMarker for Representation {
20508 type Owned = Self;
20509
20510 #[inline(always)]
20511 fn inline_align(_context: fidl::encoding::Context) -> usize {
20512 8
20513 }
20514
20515 #[inline(always)]
20516 fn inline_size(_context: fidl::encoding::Context) -> usize {
20517 16
20518 }
20519 }
20520
20521 unsafe impl fidl::encoding::Encode<Representation, fdomain_client::fidl::FDomainResourceDialect>
20522 for &mut Representation
20523 {
20524 #[inline]
20525 unsafe fn encode(
20526 self,
20527 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20528 offset: usize,
20529 _depth: fidl::encoding::Depth,
20530 ) -> fidl::Result<()> {
20531 encoder.debug_check_bounds::<Representation>(offset);
20532 encoder.write_num::<u64>(self.ordinal(), offset);
20533 match self {
20534 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
20535 NodeInfo,
20536 fdomain_client::fidl::FDomainResourceDialect,
20537 >(
20538 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20539 encoder,
20540 offset + 8,
20541 _depth,
20542 ),
20543 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20544 DirectoryInfo,
20545 fdomain_client::fidl::FDomainResourceDialect,
20546 >(
20547 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20548 encoder,
20549 offset + 8,
20550 _depth,
20551 ),
20552 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20553 FileInfo,
20554 fdomain_client::fidl::FDomainResourceDialect,
20555 >(
20556 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20557 encoder,
20558 offset + 8,
20559 _depth,
20560 ),
20561 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20562 SymlinkInfo,
20563 fdomain_client::fidl::FDomainResourceDialect,
20564 >(
20565 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20566 encoder,
20567 offset + 8,
20568 _depth,
20569 ),
20570 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
20571 }
20572 }
20573 }
20574
20575 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Representation {
20576 #[inline(always)]
20577 fn new_empty() -> Self {
20578 Self::__SourceBreaking { unknown_ordinal: 0 }
20579 }
20580
20581 #[inline]
20582 unsafe fn decode(
20583 &mut self,
20584 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20585 offset: usize,
20586 mut depth: fidl::encoding::Depth,
20587 ) -> fidl::Result<()> {
20588 decoder.debug_check_bounds::<Self>(offset);
20589 #[allow(unused_variables)]
20590 let next_out_of_line = decoder.next_out_of_line();
20591 let handles_before = decoder.remaining_handles();
20592 let (ordinal, inlined, num_bytes, num_handles) =
20593 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20594
20595 let member_inline_size = match ordinal {
20596 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20597 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20598 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20599 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20600 0 => return Err(fidl::Error::UnknownUnionTag),
20601 _ => num_bytes as usize,
20602 };
20603
20604 if inlined != (member_inline_size <= 4) {
20605 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20606 }
20607 let _inner_offset;
20608 if inlined {
20609 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20610 _inner_offset = offset + 8;
20611 } else {
20612 depth.increment()?;
20613 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20614 }
20615 match ordinal {
20616 1 => {
20617 #[allow(irrefutable_let_patterns)]
20618 if let Representation::Node(_) = self {
20619 } else {
20621 *self = Representation::Node(fidl::new_empty!(
20623 NodeInfo,
20624 fdomain_client::fidl::FDomainResourceDialect
20625 ));
20626 }
20627 #[allow(irrefutable_let_patterns)]
20628 if let Representation::Node(ref mut val) = self {
20629 fidl::decode!(
20630 NodeInfo,
20631 fdomain_client::fidl::FDomainResourceDialect,
20632 val,
20633 decoder,
20634 _inner_offset,
20635 depth
20636 )?;
20637 } else {
20638 unreachable!()
20639 }
20640 }
20641 2 => {
20642 #[allow(irrefutable_let_patterns)]
20643 if let Representation::Directory(_) = self {
20644 } else {
20646 *self = Representation::Directory(fidl::new_empty!(
20648 DirectoryInfo,
20649 fdomain_client::fidl::FDomainResourceDialect
20650 ));
20651 }
20652 #[allow(irrefutable_let_patterns)]
20653 if let Representation::Directory(ref mut val) = self {
20654 fidl::decode!(
20655 DirectoryInfo,
20656 fdomain_client::fidl::FDomainResourceDialect,
20657 val,
20658 decoder,
20659 _inner_offset,
20660 depth
20661 )?;
20662 } else {
20663 unreachable!()
20664 }
20665 }
20666 3 => {
20667 #[allow(irrefutable_let_patterns)]
20668 if let Representation::File(_) = self {
20669 } else {
20671 *self = Representation::File(fidl::new_empty!(
20673 FileInfo,
20674 fdomain_client::fidl::FDomainResourceDialect
20675 ));
20676 }
20677 #[allow(irrefutable_let_patterns)]
20678 if let Representation::File(ref mut val) = self {
20679 fidl::decode!(
20680 FileInfo,
20681 fdomain_client::fidl::FDomainResourceDialect,
20682 val,
20683 decoder,
20684 _inner_offset,
20685 depth
20686 )?;
20687 } else {
20688 unreachable!()
20689 }
20690 }
20691 4 => {
20692 #[allow(irrefutable_let_patterns)]
20693 if let Representation::Symlink(_) = self {
20694 } else {
20696 *self = Representation::Symlink(fidl::new_empty!(
20698 SymlinkInfo,
20699 fdomain_client::fidl::FDomainResourceDialect
20700 ));
20701 }
20702 #[allow(irrefutable_let_patterns)]
20703 if let Representation::Symlink(ref mut val) = self {
20704 fidl::decode!(
20705 SymlinkInfo,
20706 fdomain_client::fidl::FDomainResourceDialect,
20707 val,
20708 decoder,
20709 _inner_offset,
20710 depth
20711 )?;
20712 } else {
20713 unreachable!()
20714 }
20715 }
20716 #[allow(deprecated)]
20717 ordinal => {
20718 for _ in 0..num_handles {
20719 decoder.drop_next_handle()?;
20720 }
20721 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
20722 }
20723 }
20724 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20725 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20726 }
20727 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20728 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20729 }
20730 Ok(())
20731 }
20732 }
20733}