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::Handle>,
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::Handle,
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 GetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
825 + Send;
826 fn r#get_attr(&self) -> Self::GetAttrResponseFut;
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<Output = Result<(i32, Option<fdomain_client::Handle>), fidl::Error>>
897 + Send;
898 fn r#get_token(&self) -> Self::GetTokenResponseFut;
899 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
900 fn r#link(
901 &self,
902 src: &str,
903 dst_parent_token: fdomain_client::Handle,
904 dst: &str,
905 ) -> Self::LinkResponseFut;
906 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
907 + Send;
908 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
909 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
910 + Send;
911 fn r#rename(
912 &self,
913 src: &str,
914 dst_parent_token: fdomain_client::Event,
915 dst: &str,
916 ) -> Self::RenameResponseFut;
917 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
918 + Send;
919 fn r#create_symlink(
920 &self,
921 name: &str,
922 target: &[u8],
923 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
924 ) -> Self::CreateSymlinkResponseFut;
925 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
926 fn r#watch(
927 &self,
928 mask: WatchMask,
929 options: u32,
930 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
931 ) -> Self::WatchResponseFut;
932}
933
934#[derive(Debug, Clone)]
935pub struct DirectoryProxy {
936 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
937}
938
939impl fdomain_client::fidl::Proxy for DirectoryProxy {
940 type Protocol = DirectoryMarker;
941
942 fn from_channel(inner: fdomain_client::Channel) -> Self {
943 Self::new(inner)
944 }
945
946 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
947 self.client.into_channel().map_err(|client| Self { client })
948 }
949
950 fn as_channel(&self) -> &fdomain_client::Channel {
951 self.client.as_channel()
952 }
953}
954
955impl DirectoryProxy {
956 pub fn new(channel: fdomain_client::Channel) -> Self {
958 let protocol_name = <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
959 Self { client: fidl::client::Client::new(channel, protocol_name) }
960 }
961
962 pub fn take_event_stream(&self) -> DirectoryEventStream {
968 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
969 }
970
971 pub fn r#advisory_lock(
995 &self,
996 mut request: &AdvisoryLockRequest,
997 ) -> fidl::client::QueryResponseFut<
998 AdvisoryLockingAdvisoryLockResult,
999 fdomain_client::fidl::FDomainResourceDialect,
1000 > {
1001 DirectoryProxyInterface::r#advisory_lock(self, request)
1002 }
1003
1004 pub fn r#clone(
1005 &self,
1006 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1007 ) -> Result<(), fidl::Error> {
1008 DirectoryProxyInterface::r#clone(self, request)
1009 }
1010
1011 pub fn r#close(
1022 &self,
1023 ) -> fidl::client::QueryResponseFut<
1024 fdomain_fuchsia_unknown::CloseableCloseResult,
1025 fdomain_client::fidl::FDomainResourceDialect,
1026 > {
1027 DirectoryProxyInterface::r#close(self)
1028 }
1029
1030 pub fn r#query(
1031 &self,
1032 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
1033 DirectoryProxyInterface::r#query(self)
1034 }
1035
1036 pub fn r#deprecated_clone(
1038 &self,
1039 mut flags: OpenFlags,
1040 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1041 ) -> Result<(), fidl::Error> {
1042 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1043 }
1044
1045 pub fn r#get_attr(
1049 &self,
1050 ) -> fidl::client::QueryResponseFut<
1051 (i32, NodeAttributes),
1052 fdomain_client::fidl::FDomainResourceDialect,
1053 > {
1054 DirectoryProxyInterface::r#get_attr(self)
1055 }
1056
1057 pub fn r#deprecated_set_attr(
1059 &self,
1060 mut flags: NodeAttributeFlags,
1061 mut attributes: &NodeAttributes,
1062 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1063 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1064 }
1065
1066 pub fn r#deprecated_get_flags(
1068 &self,
1069 ) -> fidl::client::QueryResponseFut<
1070 (i32, OpenFlags),
1071 fdomain_client::fidl::FDomainResourceDialect,
1072 > {
1073 DirectoryProxyInterface::r#deprecated_get_flags(self)
1074 }
1075
1076 pub fn r#deprecated_set_flags(
1078 &self,
1079 mut flags: OpenFlags,
1080 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1081 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1082 }
1083
1084 pub fn r#get_flags(
1093 &self,
1094 ) -> fidl::client::QueryResponseFut<
1095 NodeGetFlagsResult,
1096 fdomain_client::fidl::FDomainResourceDialect,
1097 > {
1098 DirectoryProxyInterface::r#get_flags(self)
1099 }
1100
1101 pub fn r#set_flags(
1111 &self,
1112 mut flags: Flags,
1113 ) -> fidl::client::QueryResponseFut<
1114 NodeSetFlagsResult,
1115 fdomain_client::fidl::FDomainResourceDialect,
1116 > {
1117 DirectoryProxyInterface::r#set_flags(self, flags)
1118 }
1119
1120 pub fn r#query_filesystem(
1122 &self,
1123 ) -> fidl::client::QueryResponseFut<
1124 (i32, Option<Box<FilesystemInfo>>),
1125 fdomain_client::fidl::FDomainResourceDialect,
1126 > {
1127 DirectoryProxyInterface::r#query_filesystem(self)
1128 }
1129
1130 pub fn r#get_attributes(
1144 &self,
1145 mut query: NodeAttributesQuery,
1146 ) -> fidl::client::QueryResponseFut<
1147 NodeGetAttributesResult,
1148 fdomain_client::fidl::FDomainResourceDialect,
1149 > {
1150 DirectoryProxyInterface::r#get_attributes(self, query)
1151 }
1152
1153 pub fn r#update_attributes(
1162 &self,
1163 mut payload: &MutableNodeAttributes,
1164 ) -> fidl::client::QueryResponseFut<
1165 NodeUpdateAttributesResult,
1166 fdomain_client::fidl::FDomainResourceDialect,
1167 > {
1168 DirectoryProxyInterface::r#update_attributes(self, payload)
1169 }
1170
1171 pub fn r#sync(
1181 &self,
1182 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
1183 {
1184 DirectoryProxyInterface::r#sync(self)
1185 }
1186
1187 pub fn r#list_extended_attributes(
1196 &self,
1197 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1198 ) -> Result<(), fidl::Error> {
1199 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
1200 }
1201
1202 pub fn r#get_extended_attribute(
1209 &self,
1210 mut name: &[u8],
1211 ) -> fidl::client::QueryResponseFut<
1212 NodeGetExtendedAttributeResult,
1213 fdomain_client::fidl::FDomainResourceDialect,
1214 > {
1215 DirectoryProxyInterface::r#get_extended_attribute(self, name)
1216 }
1217
1218 pub fn r#set_extended_attribute(
1226 &self,
1227 mut name: &[u8],
1228 mut value: ExtendedAttributeValue,
1229 mut mode: SetExtendedAttributeMode,
1230 ) -> fidl::client::QueryResponseFut<
1231 NodeSetExtendedAttributeResult,
1232 fdomain_client::fidl::FDomainResourceDialect,
1233 > {
1234 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
1235 }
1236
1237 pub fn r#remove_extended_attribute(
1243 &self,
1244 mut name: &[u8],
1245 ) -> fidl::client::QueryResponseFut<
1246 NodeRemoveExtendedAttributeResult,
1247 fdomain_client::fidl::FDomainResourceDialect,
1248 > {
1249 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
1250 }
1251
1252 pub fn r#deprecated_open(
1254 &self,
1255 mut flags: OpenFlags,
1256 mut mode: ModeType,
1257 mut path: &str,
1258 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1259 ) -> Result<(), fidl::Error> {
1260 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
1261 }
1262
1263 pub fn r#open(
1270 &self,
1271 mut path: &str,
1272 mut flags: Flags,
1273 mut options: &Options,
1274 mut object: fdomain_client::Channel,
1275 ) -> Result<(), fidl::Error> {
1276 DirectoryProxyInterface::r#open(self, path, flags, options, object)
1277 }
1278
1279 pub fn r#read_dirents(
1305 &self,
1306 mut max_bytes: u64,
1307 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fdomain_client::fidl::FDomainResourceDialect>
1308 {
1309 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
1310 }
1311
1312 pub fn r#rewind(
1316 &self,
1317 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1318 DirectoryProxyInterface::r#rewind(self)
1319 }
1320
1321 pub fn r#get_token(
1328 &self,
1329 ) -> fidl::client::QueryResponseFut<
1330 (i32, Option<fdomain_client::Handle>),
1331 fdomain_client::fidl::FDomainResourceDialect,
1332 > {
1333 DirectoryProxyInterface::r#get_token(self)
1334 }
1335
1336 pub fn r#link(
1353 &self,
1354 mut src: &str,
1355 mut dst_parent_token: fdomain_client::Handle,
1356 mut dst: &str,
1357 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1358 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
1359 }
1360
1361 pub fn r#unlink(
1386 &self,
1387 mut name: &str,
1388 mut options: &UnlinkOptions,
1389 ) -> fidl::client::QueryResponseFut<
1390 DirectoryUnlinkResult,
1391 fdomain_client::fidl::FDomainResourceDialect,
1392 > {
1393 DirectoryProxyInterface::r#unlink(self, name, options)
1394 }
1395
1396 pub fn r#rename(
1422 &self,
1423 mut src: &str,
1424 mut dst_parent_token: fdomain_client::Event,
1425 mut dst: &str,
1426 ) -> fidl::client::QueryResponseFut<
1427 DirectoryRenameResult,
1428 fdomain_client::fidl::FDomainResourceDialect,
1429 > {
1430 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
1431 }
1432
1433 pub fn r#create_symlink(
1448 &self,
1449 mut name: &str,
1450 mut target: &[u8],
1451 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
1452 ) -> fidl::client::QueryResponseFut<
1453 DirectoryCreateSymlinkResult,
1454 fdomain_client::fidl::FDomainResourceDialect,
1455 > {
1456 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
1457 }
1458
1459 pub fn r#watch(
1466 &self,
1467 mut mask: WatchMask,
1468 mut options: u32,
1469 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
1470 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1471 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
1472 }
1473}
1474
1475impl DirectoryProxyInterface for DirectoryProxy {
1476 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
1477 AdvisoryLockingAdvisoryLockResult,
1478 fdomain_client::fidl::FDomainResourceDialect,
1479 >;
1480 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
1481 fn _decode(
1482 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1483 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1484 let _response = fidl::client::decode_transaction_body::<
1485 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1486 fdomain_client::fidl::FDomainResourceDialect,
1487 0x6ee9c0ad53ec87aa,
1488 >(_buf?)?;
1489 Ok(_response.map(|x| x))
1490 }
1491 self.client.send_query_and_decode::<
1492 AdvisoryLockingAdvisoryLockRequest,
1493 AdvisoryLockingAdvisoryLockResult,
1494 >(
1495 (request,),
1496 0x6ee9c0ad53ec87aa,
1497 fidl::encoding::DynamicFlags::empty(),
1498 _decode,
1499 )
1500 }
1501
1502 fn r#clone(
1503 &self,
1504 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1505 ) -> Result<(), fidl::Error> {
1506 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
1507 (request,),
1508 0x20d8a7aba2168a79,
1509 fidl::encoding::DynamicFlags::empty(),
1510 )
1511 }
1512
1513 type CloseResponseFut = fidl::client::QueryResponseFut<
1514 fdomain_fuchsia_unknown::CloseableCloseResult,
1515 fdomain_client::fidl::FDomainResourceDialect,
1516 >;
1517 fn r#close(&self) -> Self::CloseResponseFut {
1518 fn _decode(
1519 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1520 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1521 let _response = fidl::client::decode_transaction_body::<
1522 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1523 fdomain_client::fidl::FDomainResourceDialect,
1524 0x5ac5d459ad7f657e,
1525 >(_buf?)?;
1526 Ok(_response.map(|x| x))
1527 }
1528 self.client.send_query_and_decode::<
1529 fidl::encoding::EmptyPayload,
1530 fdomain_fuchsia_unknown::CloseableCloseResult,
1531 >(
1532 (),
1533 0x5ac5d459ad7f657e,
1534 fidl::encoding::DynamicFlags::empty(),
1535 _decode,
1536 )
1537 }
1538
1539 type QueryResponseFut =
1540 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
1541 fn r#query(&self) -> Self::QueryResponseFut {
1542 fn _decode(
1543 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1544 ) -> Result<Vec<u8>, fidl::Error> {
1545 let _response = fidl::client::decode_transaction_body::<
1546 fdomain_fuchsia_unknown::QueryableQueryResponse,
1547 fdomain_client::fidl::FDomainResourceDialect,
1548 0x2658edee9decfc06,
1549 >(_buf?)?;
1550 Ok(_response.protocol)
1551 }
1552 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1553 (),
1554 0x2658edee9decfc06,
1555 fidl::encoding::DynamicFlags::empty(),
1556 _decode,
1557 )
1558 }
1559
1560 fn r#deprecated_clone(
1561 &self,
1562 mut flags: OpenFlags,
1563 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1564 ) -> Result<(), fidl::Error> {
1565 self.client.send::<NodeDeprecatedCloneRequest>(
1566 (flags, object),
1567 0x5a61678f293ce16f,
1568 fidl::encoding::DynamicFlags::FLEXIBLE,
1569 )
1570 }
1571
1572 type GetAttrResponseFut = fidl::client::QueryResponseFut<
1573 (i32, NodeAttributes),
1574 fdomain_client::fidl::FDomainResourceDialect,
1575 >;
1576 fn r#get_attr(&self) -> Self::GetAttrResponseFut {
1577 fn _decode(
1578 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1579 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1580 let _response = fidl::client::decode_transaction_body::<
1581 NodeGetAttrResponse,
1582 fdomain_client::fidl::FDomainResourceDialect,
1583 0x78985e216314dafd,
1584 >(_buf?)?;
1585 Ok((_response.s, _response.attributes))
1586 }
1587 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
1588 (),
1589 0x78985e216314dafd,
1590 fidl::encoding::DynamicFlags::empty(),
1591 _decode,
1592 )
1593 }
1594
1595 type DeprecatedSetAttrResponseFut =
1596 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1597 fn r#deprecated_set_attr(
1598 &self,
1599 mut flags: NodeAttributeFlags,
1600 mut attributes: &NodeAttributes,
1601 ) -> Self::DeprecatedSetAttrResponseFut {
1602 fn _decode(
1603 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1604 ) -> Result<i32, fidl::Error> {
1605 let _response = fidl::client::decode_transaction_body::<
1606 NodeDeprecatedSetAttrResponse,
1607 fdomain_client::fidl::FDomainResourceDialect,
1608 0x4186c0f40d938f46,
1609 >(_buf?)?;
1610 Ok(_response.s)
1611 }
1612 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
1613 (flags, attributes),
1614 0x4186c0f40d938f46,
1615 fidl::encoding::DynamicFlags::empty(),
1616 _decode,
1617 )
1618 }
1619
1620 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
1621 (i32, OpenFlags),
1622 fdomain_client::fidl::FDomainResourceDialect,
1623 >;
1624 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
1625 fn _decode(
1626 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1627 ) -> Result<(i32, OpenFlags), fidl::Error> {
1628 let _response = fidl::client::decode_transaction_body::<
1629 NodeDeprecatedGetFlagsResponse,
1630 fdomain_client::fidl::FDomainResourceDialect,
1631 0x5b88fffb8eda3aa1,
1632 >(_buf?)?;
1633 Ok((_response.s, _response.flags))
1634 }
1635 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
1636 (),
1637 0x5b88fffb8eda3aa1,
1638 fidl::encoding::DynamicFlags::empty(),
1639 _decode,
1640 )
1641 }
1642
1643 type DeprecatedSetFlagsResponseFut =
1644 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1645 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
1646 fn _decode(
1647 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1648 ) -> Result<i32, fidl::Error> {
1649 let _response = fidl::client::decode_transaction_body::<
1650 NodeDeprecatedSetFlagsResponse,
1651 fdomain_client::fidl::FDomainResourceDialect,
1652 0x5295b76c71fde733,
1653 >(_buf?)?;
1654 Ok(_response.s)
1655 }
1656 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
1657 (flags,),
1658 0x5295b76c71fde733,
1659 fidl::encoding::DynamicFlags::empty(),
1660 _decode,
1661 )
1662 }
1663
1664 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
1665 NodeGetFlagsResult,
1666 fdomain_client::fidl::FDomainResourceDialect,
1667 >;
1668 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
1669 fn _decode(
1670 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1671 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1672 let _response = fidl::client::decode_transaction_body::<
1673 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1674 fdomain_client::fidl::FDomainResourceDialect,
1675 0x176eb318f64ec23,
1676 >(_buf?)?
1677 .into_result_fdomain::<DirectoryMarker>("get_flags")?;
1678 Ok(_response.map(|x| x.flags))
1679 }
1680 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
1681 (),
1682 0x176eb318f64ec23,
1683 fidl::encoding::DynamicFlags::FLEXIBLE,
1684 _decode,
1685 )
1686 }
1687
1688 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
1689 NodeSetFlagsResult,
1690 fdomain_client::fidl::FDomainResourceDialect,
1691 >;
1692 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
1693 fn _decode(
1694 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1695 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1696 let _response = fidl::client::decode_transaction_body::<
1697 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1698 fdomain_client::fidl::FDomainResourceDialect,
1699 0x55a8028685791ea8,
1700 >(_buf?)?
1701 .into_result_fdomain::<DirectoryMarker>("set_flags")?;
1702 Ok(_response.map(|x| x))
1703 }
1704 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
1705 (flags,),
1706 0x55a8028685791ea8,
1707 fidl::encoding::DynamicFlags::FLEXIBLE,
1708 _decode,
1709 )
1710 }
1711
1712 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
1713 (i32, Option<Box<FilesystemInfo>>),
1714 fdomain_client::fidl::FDomainResourceDialect,
1715 >;
1716 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
1717 fn _decode(
1718 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1719 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1720 let _response = fidl::client::decode_transaction_body::<
1721 NodeQueryFilesystemResponse,
1722 fdomain_client::fidl::FDomainResourceDialect,
1723 0x6f344a1c6b0a0610,
1724 >(_buf?)?;
1725 Ok((_response.s, _response.info))
1726 }
1727 self.client.send_query_and_decode::<
1728 fidl::encoding::EmptyPayload,
1729 (i32, Option<Box<FilesystemInfo>>),
1730 >(
1731 (),
1732 0x6f344a1c6b0a0610,
1733 fidl::encoding::DynamicFlags::empty(),
1734 _decode,
1735 )
1736 }
1737
1738 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
1739 NodeGetAttributesResult,
1740 fdomain_client::fidl::FDomainResourceDialect,
1741 >;
1742 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
1743 fn _decode(
1744 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1745 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1746 let _response = fidl::client::decode_transaction_body::<
1747 fidl::encoding::ResultType<NodeAttributes2, i32>,
1748 fdomain_client::fidl::FDomainResourceDialect,
1749 0x3d4396a638ea053b,
1750 >(_buf?)?;
1751 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1752 }
1753 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
1754 (query,),
1755 0x3d4396a638ea053b,
1756 fidl::encoding::DynamicFlags::empty(),
1757 _decode,
1758 )
1759 }
1760
1761 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
1762 NodeUpdateAttributesResult,
1763 fdomain_client::fidl::FDomainResourceDialect,
1764 >;
1765 fn r#update_attributes(
1766 &self,
1767 mut payload: &MutableNodeAttributes,
1768 ) -> Self::UpdateAttributesResponseFut {
1769 fn _decode(
1770 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1771 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1772 let _response = fidl::client::decode_transaction_body::<
1773 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1774 fdomain_client::fidl::FDomainResourceDialect,
1775 0x3308c1da5a89bf08,
1776 >(_buf?)?;
1777 Ok(_response.map(|x| x))
1778 }
1779 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
1780 payload,
1781 0x3308c1da5a89bf08,
1782 fidl::encoding::DynamicFlags::empty(),
1783 _decode,
1784 )
1785 }
1786
1787 type SyncResponseFut = fidl::client::QueryResponseFut<
1788 NodeSyncResult,
1789 fdomain_client::fidl::FDomainResourceDialect,
1790 >;
1791 fn r#sync(&self) -> Self::SyncResponseFut {
1792 fn _decode(
1793 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1794 ) -> Result<NodeSyncResult, fidl::Error> {
1795 let _response = fidl::client::decode_transaction_body::<
1796 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1797 fdomain_client::fidl::FDomainResourceDialect,
1798 0x2c5c27ca0ab5dc49,
1799 >(_buf?)?;
1800 Ok(_response.map(|x| x))
1801 }
1802 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
1803 (),
1804 0x2c5c27ca0ab5dc49,
1805 fidl::encoding::DynamicFlags::empty(),
1806 _decode,
1807 )
1808 }
1809
1810 fn r#list_extended_attributes(
1811 &self,
1812 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1813 ) -> Result<(), fidl::Error> {
1814 self.client.send::<NodeListExtendedAttributesRequest>(
1815 (iterator,),
1816 0x4b61033de007fcd0,
1817 fidl::encoding::DynamicFlags::empty(),
1818 )
1819 }
1820
1821 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1822 NodeGetExtendedAttributeResult,
1823 fdomain_client::fidl::FDomainResourceDialect,
1824 >;
1825 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
1826 fn _decode(
1827 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1828 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1829 let _response = fidl::client::decode_transaction_body::<
1830 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1831 fdomain_client::fidl::FDomainResourceDialect,
1832 0x45ffa3ccfdeb76db,
1833 >(_buf?)?;
1834 Ok(_response.map(|x| x))
1835 }
1836 self.client.send_query_and_decode::<
1837 NodeGetExtendedAttributeRequest,
1838 NodeGetExtendedAttributeResult,
1839 >(
1840 (name,),
1841 0x45ffa3ccfdeb76db,
1842 fidl::encoding::DynamicFlags::empty(),
1843 _decode,
1844 )
1845 }
1846
1847 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1848 NodeSetExtendedAttributeResult,
1849 fdomain_client::fidl::FDomainResourceDialect,
1850 >;
1851 fn r#set_extended_attribute(
1852 &self,
1853 mut name: &[u8],
1854 mut value: ExtendedAttributeValue,
1855 mut mode: SetExtendedAttributeMode,
1856 ) -> Self::SetExtendedAttributeResponseFut {
1857 fn _decode(
1858 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1859 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1860 let _response = fidl::client::decode_transaction_body::<
1861 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1862 fdomain_client::fidl::FDomainResourceDialect,
1863 0x4a951362f681f23c,
1864 >(_buf?)?;
1865 Ok(_response.map(|x| x))
1866 }
1867 self.client.send_query_and_decode::<
1868 NodeSetExtendedAttributeRequest,
1869 NodeSetExtendedAttributeResult,
1870 >(
1871 (name, &mut value, mode,),
1872 0x4a951362f681f23c,
1873 fidl::encoding::DynamicFlags::empty(),
1874 _decode,
1875 )
1876 }
1877
1878 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1879 NodeRemoveExtendedAttributeResult,
1880 fdomain_client::fidl::FDomainResourceDialect,
1881 >;
1882 fn r#remove_extended_attribute(
1883 &self,
1884 mut name: &[u8],
1885 ) -> Self::RemoveExtendedAttributeResponseFut {
1886 fn _decode(
1887 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1888 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1889 let _response = fidl::client::decode_transaction_body::<
1890 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1891 fdomain_client::fidl::FDomainResourceDialect,
1892 0x7a0b9f3a9bf9032d,
1893 >(_buf?)?;
1894 Ok(_response.map(|x| x))
1895 }
1896 self.client.send_query_and_decode::<
1897 NodeRemoveExtendedAttributeRequest,
1898 NodeRemoveExtendedAttributeResult,
1899 >(
1900 (name,),
1901 0x7a0b9f3a9bf9032d,
1902 fidl::encoding::DynamicFlags::empty(),
1903 _decode,
1904 )
1905 }
1906
1907 fn r#deprecated_open(
1908 &self,
1909 mut flags: OpenFlags,
1910 mut mode: ModeType,
1911 mut path: &str,
1912 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1913 ) -> Result<(), fidl::Error> {
1914 self.client.send::<DirectoryDeprecatedOpenRequest>(
1915 (flags, mode, path, object),
1916 0x2c5044561d685ec0,
1917 fidl::encoding::DynamicFlags::FLEXIBLE,
1918 )
1919 }
1920
1921 fn r#open(
1922 &self,
1923 mut path: &str,
1924 mut flags: Flags,
1925 mut options: &Options,
1926 mut object: fdomain_client::Channel,
1927 ) -> Result<(), fidl::Error> {
1928 self.client.send::<DirectoryOpenRequest>(
1929 (path, flags, options, object),
1930 0x568ddcb9a9cbb6d9,
1931 fidl::encoding::DynamicFlags::empty(),
1932 )
1933 }
1934
1935 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
1936 (i32, Vec<u8>),
1937 fdomain_client::fidl::FDomainResourceDialect,
1938 >;
1939 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
1940 fn _decode(
1941 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1942 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1943 let _response = fidl::client::decode_transaction_body::<
1944 DirectoryReadDirentsResponse,
1945 fdomain_client::fidl::FDomainResourceDialect,
1946 0x3582806bf27faa0a,
1947 >(_buf?)?;
1948 Ok((_response.s, _response.dirents))
1949 }
1950 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
1951 (max_bytes,),
1952 0x3582806bf27faa0a,
1953 fidl::encoding::DynamicFlags::empty(),
1954 _decode,
1955 )
1956 }
1957
1958 type RewindResponseFut =
1959 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1960 fn r#rewind(&self) -> Self::RewindResponseFut {
1961 fn _decode(
1962 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1963 ) -> Result<i32, fidl::Error> {
1964 let _response = fidl::client::decode_transaction_body::<
1965 DirectoryRewindResponse,
1966 fdomain_client::fidl::FDomainResourceDialect,
1967 0x16b1202af0f34c71,
1968 >(_buf?)?;
1969 Ok(_response.s)
1970 }
1971 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1972 (),
1973 0x16b1202af0f34c71,
1974 fidl::encoding::DynamicFlags::empty(),
1975 _decode,
1976 )
1977 }
1978
1979 type GetTokenResponseFut = fidl::client::QueryResponseFut<
1980 (i32, Option<fdomain_client::Handle>),
1981 fdomain_client::fidl::FDomainResourceDialect,
1982 >;
1983 fn r#get_token(&self) -> Self::GetTokenResponseFut {
1984 fn _decode(
1985 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1986 ) -> Result<(i32, Option<fdomain_client::Handle>), fidl::Error> {
1987 let _response = fidl::client::decode_transaction_body::<
1988 DirectoryGetTokenResponse,
1989 fdomain_client::fidl::FDomainResourceDialect,
1990 0x26ae9d18763c8655,
1991 >(_buf?)?;
1992 Ok((_response.s, _response.token))
1993 }
1994 self.client.send_query_and_decode::<
1995 fidl::encoding::EmptyPayload,
1996 (i32, Option<fdomain_client::Handle>),
1997 >(
1998 (),
1999 0x26ae9d18763c8655,
2000 fidl::encoding::DynamicFlags::empty(),
2001 _decode,
2002 )
2003 }
2004
2005 type LinkResponseFut =
2006 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2007 fn r#link(
2008 &self,
2009 mut src: &str,
2010 mut dst_parent_token: fdomain_client::Handle,
2011 mut dst: &str,
2012 ) -> Self::LinkResponseFut {
2013 fn _decode(
2014 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2015 ) -> Result<i32, fidl::Error> {
2016 let _response = fidl::client::decode_transaction_body::<
2017 DirectoryLinkResponse,
2018 fdomain_client::fidl::FDomainResourceDialect,
2019 0x740604c0c7c930e7,
2020 >(_buf?)?;
2021 Ok(_response.s)
2022 }
2023 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2024 (src, dst_parent_token, dst),
2025 0x740604c0c7c930e7,
2026 fidl::encoding::DynamicFlags::empty(),
2027 _decode,
2028 )
2029 }
2030
2031 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2032 DirectoryUnlinkResult,
2033 fdomain_client::fidl::FDomainResourceDialect,
2034 >;
2035 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2036 fn _decode(
2037 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2038 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2039 let _response = fidl::client::decode_transaction_body::<
2040 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2041 fdomain_client::fidl::FDomainResourceDialect,
2042 0x750a0326a78d7bed,
2043 >(_buf?)?;
2044 Ok(_response.map(|x| x))
2045 }
2046 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2047 (name, options),
2048 0x750a0326a78d7bed,
2049 fidl::encoding::DynamicFlags::empty(),
2050 _decode,
2051 )
2052 }
2053
2054 type RenameResponseFut = fidl::client::QueryResponseFut<
2055 DirectoryRenameResult,
2056 fdomain_client::fidl::FDomainResourceDialect,
2057 >;
2058 fn r#rename(
2059 &self,
2060 mut src: &str,
2061 mut dst_parent_token: fdomain_client::Event,
2062 mut dst: &str,
2063 ) -> Self::RenameResponseFut {
2064 fn _decode(
2065 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2066 ) -> Result<DirectoryRenameResult, fidl::Error> {
2067 let _response = fidl::client::decode_transaction_body::<
2068 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2069 fdomain_client::fidl::FDomainResourceDialect,
2070 0x7060e7723b9928de,
2071 >(_buf?)?;
2072 Ok(_response.map(|x| x))
2073 }
2074 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2075 (src, dst_parent_token, dst),
2076 0x7060e7723b9928de,
2077 fidl::encoding::DynamicFlags::empty(),
2078 _decode,
2079 )
2080 }
2081
2082 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2083 DirectoryCreateSymlinkResult,
2084 fdomain_client::fidl::FDomainResourceDialect,
2085 >;
2086 fn r#create_symlink(
2087 &self,
2088 mut name: &str,
2089 mut target: &[u8],
2090 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
2091 ) -> Self::CreateSymlinkResponseFut {
2092 fn _decode(
2093 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2094 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2095 let _response = fidl::client::decode_transaction_body::<
2096 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2097 fdomain_client::fidl::FDomainResourceDialect,
2098 0x21ce0f19ec043889,
2099 >(_buf?)?;
2100 Ok(_response.map(|x| x))
2101 }
2102 self.client
2103 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2104 (name, target, connection),
2105 0x21ce0f19ec043889,
2106 fidl::encoding::DynamicFlags::empty(),
2107 _decode,
2108 )
2109 }
2110
2111 type WatchResponseFut =
2112 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2113 fn r#watch(
2114 &self,
2115 mut mask: WatchMask,
2116 mut options: u32,
2117 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
2118 ) -> Self::WatchResponseFut {
2119 fn _decode(
2120 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2121 ) -> Result<i32, fidl::Error> {
2122 let _response = fidl::client::decode_transaction_body::<
2123 DirectoryWatchResponse,
2124 fdomain_client::fidl::FDomainResourceDialect,
2125 0x5717193a59d66d91,
2126 >(_buf?)?;
2127 Ok(_response.s)
2128 }
2129 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2130 (mask, options, watcher),
2131 0x5717193a59d66d91,
2132 fidl::encoding::DynamicFlags::empty(),
2133 _decode,
2134 )
2135 }
2136}
2137
2138pub struct DirectoryEventStream {
2139 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2140}
2141
2142impl std::marker::Unpin for DirectoryEventStream {}
2143
2144impl futures::stream::FusedStream for DirectoryEventStream {
2145 fn is_terminated(&self) -> bool {
2146 self.event_receiver.is_terminated()
2147 }
2148}
2149
2150impl futures::Stream for DirectoryEventStream {
2151 type Item = Result<DirectoryEvent, fidl::Error>;
2152
2153 fn poll_next(
2154 mut self: std::pin::Pin<&mut Self>,
2155 cx: &mut std::task::Context<'_>,
2156 ) -> std::task::Poll<Option<Self::Item>> {
2157 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2158 &mut self.event_receiver,
2159 cx
2160 )?) {
2161 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
2162 None => std::task::Poll::Ready(None),
2163 }
2164 }
2165}
2166
2167#[derive(Debug)]
2168pub enum DirectoryEvent {
2169 OnOpen_ {
2170 s: i32,
2171 info: Option<Box<NodeInfoDeprecated>>,
2172 },
2173 OnRepresentation {
2174 payload: Representation,
2175 },
2176 #[non_exhaustive]
2177 _UnknownEvent {
2178 ordinal: u64,
2180 },
2181}
2182
2183impl DirectoryEvent {
2184 #[allow(irrefutable_let_patterns)]
2185 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
2186 if let DirectoryEvent::OnOpen_ { s, info } = self {
2187 Some((s, info))
2188 } else {
2189 None
2190 }
2191 }
2192 #[allow(irrefutable_let_patterns)]
2193 pub fn into_on_representation(self) -> Option<Representation> {
2194 if let DirectoryEvent::OnRepresentation { payload } = self {
2195 Some((payload))
2196 } else {
2197 None
2198 }
2199 }
2200
2201 fn decode(
2203 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2204 ) -> Result<DirectoryEvent, fidl::Error> {
2205 let (bytes, _handles) = buf.split_mut();
2206 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2207 debug_assert_eq!(tx_header.tx_id, 0);
2208 match tx_header.ordinal {
2209 0x7fc7bbb1dbfd1972 => {
2210 let mut out = fidl::new_empty!(
2211 NodeOnOpenRequest,
2212 fdomain_client::fidl::FDomainResourceDialect
2213 );
2214 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2215 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
2216 }
2217 0x5cb40567d80a510c => {
2218 let mut out =
2219 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
2220 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
2221 Ok((DirectoryEvent::OnRepresentation { payload: out }))
2222 }
2223 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2224 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2225 }
2226 _ => Err(fidl::Error::UnknownOrdinal {
2227 ordinal: tx_header.ordinal,
2228 protocol_name:
2229 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2230 }),
2231 }
2232 }
2233}
2234
2235pub struct DirectoryRequestStream {
2237 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2238 is_terminated: bool,
2239}
2240
2241impl std::marker::Unpin for DirectoryRequestStream {}
2242
2243impl futures::stream::FusedStream for DirectoryRequestStream {
2244 fn is_terminated(&self) -> bool {
2245 self.is_terminated
2246 }
2247}
2248
2249impl fdomain_client::fidl::RequestStream for DirectoryRequestStream {
2250 type Protocol = DirectoryMarker;
2251 type ControlHandle = DirectoryControlHandle;
2252
2253 fn from_channel(channel: fdomain_client::Channel) -> Self {
2254 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2255 }
2256
2257 fn control_handle(&self) -> Self::ControlHandle {
2258 DirectoryControlHandle { inner: self.inner.clone() }
2259 }
2260
2261 fn into_inner(
2262 self,
2263 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2264 {
2265 (self.inner, self.is_terminated)
2266 }
2267
2268 fn from_inner(
2269 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2270 is_terminated: bool,
2271 ) -> Self {
2272 Self { inner, is_terminated }
2273 }
2274}
2275
2276impl futures::Stream for DirectoryRequestStream {
2277 type Item = Result<DirectoryRequest, fidl::Error>;
2278
2279 fn poll_next(
2280 mut self: std::pin::Pin<&mut Self>,
2281 cx: &mut std::task::Context<'_>,
2282 ) -> std::task::Poll<Option<Self::Item>> {
2283 let this = &mut *self;
2284 if this.inner.check_shutdown(cx) {
2285 this.is_terminated = true;
2286 return std::task::Poll::Ready(None);
2287 }
2288 if this.is_terminated {
2289 panic!("polled DirectoryRequestStream after completion");
2290 }
2291 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2292 |bytes, handles| {
2293 match this.inner.channel().read_etc(cx, bytes, handles) {
2294 std::task::Poll::Ready(Ok(())) => {}
2295 std::task::Poll::Pending => return std::task::Poll::Pending,
2296 std::task::Poll::Ready(Err(None)) => {
2297 this.is_terminated = true;
2298 return std::task::Poll::Ready(None);
2299 }
2300 std::task::Poll::Ready(Err(Some(e))) => {
2301 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2302 e.into(),
2303 ))))
2304 }
2305 }
2306
2307 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2309
2310 std::task::Poll::Ready(Some(match header.ordinal {
2311 0x6ee9c0ad53ec87aa => {
2312 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2313 let mut req = fidl::new_empty!(
2314 AdvisoryLockingAdvisoryLockRequest,
2315 fdomain_client::fidl::FDomainResourceDialect
2316 );
2317 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
2318 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2319 Ok(DirectoryRequest::AdvisoryLock {
2320 request: req.request,
2321
2322 responder: DirectoryAdvisoryLockResponder {
2323 control_handle: std::mem::ManuallyDrop::new(control_handle),
2324 tx_id: header.tx_id,
2325 },
2326 })
2327 }
2328 0x20d8a7aba2168a79 => {
2329 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2330 let mut req = fidl::new_empty!(
2331 fdomain_fuchsia_unknown::CloneableCloneRequest,
2332 fdomain_client::fidl::FDomainResourceDialect
2333 );
2334 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2335 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2336 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
2337 }
2338 0x5ac5d459ad7f657e => {
2339 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2340 let mut req = fidl::new_empty!(
2341 fidl::encoding::EmptyPayload,
2342 fdomain_client::fidl::FDomainResourceDialect
2343 );
2344 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2345 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2346 Ok(DirectoryRequest::Close {
2347 responder: DirectoryCloseResponder {
2348 control_handle: std::mem::ManuallyDrop::new(control_handle),
2349 tx_id: header.tx_id,
2350 },
2351 })
2352 }
2353 0x2658edee9decfc06 => {
2354 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2355 let mut req = fidl::new_empty!(
2356 fidl::encoding::EmptyPayload,
2357 fdomain_client::fidl::FDomainResourceDialect
2358 );
2359 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2360 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2361 Ok(DirectoryRequest::Query {
2362 responder: DirectoryQueryResponder {
2363 control_handle: std::mem::ManuallyDrop::new(control_handle),
2364 tx_id: header.tx_id,
2365 },
2366 })
2367 }
2368 0x5a61678f293ce16f => {
2369 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2370 let mut req = fidl::new_empty!(
2371 NodeDeprecatedCloneRequest,
2372 fdomain_client::fidl::FDomainResourceDialect
2373 );
2374 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2375 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2376 Ok(DirectoryRequest::DeprecatedClone {
2377 flags: req.flags,
2378 object: req.object,
2379
2380 control_handle,
2381 })
2382 }
2383 0x78985e216314dafd => {
2384 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2385 let mut req = fidl::new_empty!(
2386 fidl::encoding::EmptyPayload,
2387 fdomain_client::fidl::FDomainResourceDialect
2388 );
2389 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2390 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2391 Ok(DirectoryRequest::GetAttr {
2392 responder: DirectoryGetAttrResponder {
2393 control_handle: std::mem::ManuallyDrop::new(control_handle),
2394 tx_id: header.tx_id,
2395 },
2396 })
2397 }
2398 0x4186c0f40d938f46 => {
2399 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2400 let mut req = fidl::new_empty!(
2401 NodeDeprecatedSetAttrRequest,
2402 fdomain_client::fidl::FDomainResourceDialect
2403 );
2404 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
2405 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2406 Ok(DirectoryRequest::DeprecatedSetAttr {
2407 flags: req.flags,
2408 attributes: req.attributes,
2409
2410 responder: DirectoryDeprecatedSetAttrResponder {
2411 control_handle: std::mem::ManuallyDrop::new(control_handle),
2412 tx_id: header.tx_id,
2413 },
2414 })
2415 }
2416 0x5b88fffb8eda3aa1 => {
2417 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2418 let mut req = fidl::new_empty!(
2419 fidl::encoding::EmptyPayload,
2420 fdomain_client::fidl::FDomainResourceDialect
2421 );
2422 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2423 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2424 Ok(DirectoryRequest::DeprecatedGetFlags {
2425 responder: DirectoryDeprecatedGetFlagsResponder {
2426 control_handle: std::mem::ManuallyDrop::new(control_handle),
2427 tx_id: header.tx_id,
2428 },
2429 })
2430 }
2431 0x5295b76c71fde733 => {
2432 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2433 let mut req = fidl::new_empty!(
2434 NodeDeprecatedSetFlagsRequest,
2435 fdomain_client::fidl::FDomainResourceDialect
2436 );
2437 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2438 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2439 Ok(DirectoryRequest::DeprecatedSetFlags {
2440 flags: req.flags,
2441
2442 responder: DirectoryDeprecatedSetFlagsResponder {
2443 control_handle: std::mem::ManuallyDrop::new(control_handle),
2444 tx_id: header.tx_id,
2445 },
2446 })
2447 }
2448 0x176eb318f64ec23 => {
2449 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2450 let mut req = fidl::new_empty!(
2451 fidl::encoding::EmptyPayload,
2452 fdomain_client::fidl::FDomainResourceDialect
2453 );
2454 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2455 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2456 Ok(DirectoryRequest::GetFlags {
2457 responder: DirectoryGetFlagsResponder {
2458 control_handle: std::mem::ManuallyDrop::new(control_handle),
2459 tx_id: header.tx_id,
2460 },
2461 })
2462 }
2463 0x55a8028685791ea8 => {
2464 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2465 let mut req = fidl::new_empty!(
2466 NodeSetFlagsRequest,
2467 fdomain_client::fidl::FDomainResourceDialect
2468 );
2469 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2470 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2471 Ok(DirectoryRequest::SetFlags {
2472 flags: req.flags,
2473
2474 responder: DirectorySetFlagsResponder {
2475 control_handle: std::mem::ManuallyDrop::new(control_handle),
2476 tx_id: header.tx_id,
2477 },
2478 })
2479 }
2480 0x6f344a1c6b0a0610 => {
2481 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2482 let mut req = fidl::new_empty!(
2483 fidl::encoding::EmptyPayload,
2484 fdomain_client::fidl::FDomainResourceDialect
2485 );
2486 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2487 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2488 Ok(DirectoryRequest::QueryFilesystem {
2489 responder: DirectoryQueryFilesystemResponder {
2490 control_handle: std::mem::ManuallyDrop::new(control_handle),
2491 tx_id: header.tx_id,
2492 },
2493 })
2494 }
2495 0x3d4396a638ea053b => {
2496 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2497 let mut req = fidl::new_empty!(
2498 NodeGetAttributesRequest,
2499 fdomain_client::fidl::FDomainResourceDialect
2500 );
2501 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2502 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2503 Ok(DirectoryRequest::GetAttributes {
2504 query: req.query,
2505
2506 responder: DirectoryGetAttributesResponder {
2507 control_handle: std::mem::ManuallyDrop::new(control_handle),
2508 tx_id: header.tx_id,
2509 },
2510 })
2511 }
2512 0x3308c1da5a89bf08 => {
2513 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2514 let mut req = fidl::new_empty!(
2515 MutableNodeAttributes,
2516 fdomain_client::fidl::FDomainResourceDialect
2517 );
2518 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
2519 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2520 Ok(DirectoryRequest::UpdateAttributes {
2521 payload: req,
2522 responder: DirectoryUpdateAttributesResponder {
2523 control_handle: std::mem::ManuallyDrop::new(control_handle),
2524 tx_id: header.tx_id,
2525 },
2526 })
2527 }
2528 0x2c5c27ca0ab5dc49 => {
2529 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2530 let mut req = fidl::new_empty!(
2531 fidl::encoding::EmptyPayload,
2532 fdomain_client::fidl::FDomainResourceDialect
2533 );
2534 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2535 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2536 Ok(DirectoryRequest::Sync {
2537 responder: DirectorySyncResponder {
2538 control_handle: std::mem::ManuallyDrop::new(control_handle),
2539 tx_id: header.tx_id,
2540 },
2541 })
2542 }
2543 0x4b61033de007fcd0 => {
2544 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2545 let mut req = fidl::new_empty!(
2546 NodeListExtendedAttributesRequest,
2547 fdomain_client::fidl::FDomainResourceDialect
2548 );
2549 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2550 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2551 Ok(DirectoryRequest::ListExtendedAttributes {
2552 iterator: req.iterator,
2553
2554 control_handle,
2555 })
2556 }
2557 0x45ffa3ccfdeb76db => {
2558 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2559 let mut req = fidl::new_empty!(
2560 NodeGetExtendedAttributeRequest,
2561 fdomain_client::fidl::FDomainResourceDialect
2562 );
2563 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2564 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2565 Ok(DirectoryRequest::GetExtendedAttribute {
2566 name: req.name,
2567
2568 responder: DirectoryGetExtendedAttributeResponder {
2569 control_handle: std::mem::ManuallyDrop::new(control_handle),
2570 tx_id: header.tx_id,
2571 },
2572 })
2573 }
2574 0x4a951362f681f23c => {
2575 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2576 let mut req = fidl::new_empty!(
2577 NodeSetExtendedAttributeRequest,
2578 fdomain_client::fidl::FDomainResourceDialect
2579 );
2580 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2581 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2582 Ok(DirectoryRequest::SetExtendedAttribute {
2583 name: req.name,
2584 value: req.value,
2585 mode: req.mode,
2586
2587 responder: DirectorySetExtendedAttributeResponder {
2588 control_handle: std::mem::ManuallyDrop::new(control_handle),
2589 tx_id: header.tx_id,
2590 },
2591 })
2592 }
2593 0x7a0b9f3a9bf9032d => {
2594 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2595 let mut req = fidl::new_empty!(
2596 NodeRemoveExtendedAttributeRequest,
2597 fdomain_client::fidl::FDomainResourceDialect
2598 );
2599 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2600 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2601 Ok(DirectoryRequest::RemoveExtendedAttribute {
2602 name: req.name,
2603
2604 responder: DirectoryRemoveExtendedAttributeResponder {
2605 control_handle: std::mem::ManuallyDrop::new(control_handle),
2606 tx_id: header.tx_id,
2607 },
2608 })
2609 }
2610 0x2c5044561d685ec0 => {
2611 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2612 let mut req = fidl::new_empty!(
2613 DirectoryDeprecatedOpenRequest,
2614 fdomain_client::fidl::FDomainResourceDialect
2615 );
2616 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2617 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2618 Ok(DirectoryRequest::DeprecatedOpen {
2619 flags: req.flags,
2620 mode: req.mode,
2621 path: req.path,
2622 object: req.object,
2623
2624 control_handle,
2625 })
2626 }
2627 0x568ddcb9a9cbb6d9 => {
2628 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2629 let mut req = fidl::new_empty!(
2630 DirectoryOpenRequest,
2631 fdomain_client::fidl::FDomainResourceDialect
2632 );
2633 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2634 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2635 Ok(DirectoryRequest::Open {
2636 path: req.path,
2637 flags: req.flags,
2638 options: req.options,
2639 object: req.object,
2640
2641 control_handle,
2642 })
2643 }
2644 0x3582806bf27faa0a => {
2645 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2646 let mut req = fidl::new_empty!(
2647 DirectoryReadDirentsRequest,
2648 fdomain_client::fidl::FDomainResourceDialect
2649 );
2650 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
2651 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2652 Ok(DirectoryRequest::ReadDirents {
2653 max_bytes: req.max_bytes,
2654
2655 responder: DirectoryReadDirentsResponder {
2656 control_handle: std::mem::ManuallyDrop::new(control_handle),
2657 tx_id: header.tx_id,
2658 },
2659 })
2660 }
2661 0x16b1202af0f34c71 => {
2662 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2663 let mut req = fidl::new_empty!(
2664 fidl::encoding::EmptyPayload,
2665 fdomain_client::fidl::FDomainResourceDialect
2666 );
2667 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2668 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2669 Ok(DirectoryRequest::Rewind {
2670 responder: DirectoryRewindResponder {
2671 control_handle: std::mem::ManuallyDrop::new(control_handle),
2672 tx_id: header.tx_id,
2673 },
2674 })
2675 }
2676 0x26ae9d18763c8655 => {
2677 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2678 let mut req = fidl::new_empty!(
2679 fidl::encoding::EmptyPayload,
2680 fdomain_client::fidl::FDomainResourceDialect
2681 );
2682 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2683 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2684 Ok(DirectoryRequest::GetToken {
2685 responder: DirectoryGetTokenResponder {
2686 control_handle: std::mem::ManuallyDrop::new(control_handle),
2687 tx_id: header.tx_id,
2688 },
2689 })
2690 }
2691 0x740604c0c7c930e7 => {
2692 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2693 let mut req = fidl::new_empty!(
2694 DirectoryLinkRequest,
2695 fdomain_client::fidl::FDomainResourceDialect
2696 );
2697 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
2698 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2699 Ok(DirectoryRequest::Link {
2700 src: req.src,
2701 dst_parent_token: req.dst_parent_token,
2702 dst: req.dst,
2703
2704 responder: DirectoryLinkResponder {
2705 control_handle: std::mem::ManuallyDrop::new(control_handle),
2706 tx_id: header.tx_id,
2707 },
2708 })
2709 }
2710 0x750a0326a78d7bed => {
2711 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2712 let mut req = fidl::new_empty!(
2713 DirectoryUnlinkRequest,
2714 fdomain_client::fidl::FDomainResourceDialect
2715 );
2716 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2717 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2718 Ok(DirectoryRequest::Unlink {
2719 name: req.name,
2720 options: req.options,
2721
2722 responder: DirectoryUnlinkResponder {
2723 control_handle: std::mem::ManuallyDrop::new(control_handle),
2724 tx_id: header.tx_id,
2725 },
2726 })
2727 }
2728 0x7060e7723b9928de => {
2729 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2730 let mut req = fidl::new_empty!(
2731 DirectoryRenameRequest,
2732 fdomain_client::fidl::FDomainResourceDialect
2733 );
2734 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
2735 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2736 Ok(DirectoryRequest::Rename {
2737 src: req.src,
2738 dst_parent_token: req.dst_parent_token,
2739 dst: req.dst,
2740
2741 responder: DirectoryRenameResponder {
2742 control_handle: std::mem::ManuallyDrop::new(control_handle),
2743 tx_id: header.tx_id,
2744 },
2745 })
2746 }
2747 0x21ce0f19ec043889 => {
2748 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2749 let mut req = fidl::new_empty!(
2750 DirectoryCreateSymlinkRequest,
2751 fdomain_client::fidl::FDomainResourceDialect
2752 );
2753 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2754 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2755 Ok(DirectoryRequest::CreateSymlink {
2756 name: req.name,
2757 target: req.target,
2758 connection: req.connection,
2759
2760 responder: DirectoryCreateSymlinkResponder {
2761 control_handle: std::mem::ManuallyDrop::new(control_handle),
2762 tx_id: header.tx_id,
2763 },
2764 })
2765 }
2766 0x5717193a59d66d91 => {
2767 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2768 let mut req = fidl::new_empty!(
2769 DirectoryWatchRequest,
2770 fdomain_client::fidl::FDomainResourceDialect
2771 );
2772 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
2773 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2774 Ok(DirectoryRequest::Watch {
2775 mask: req.mask,
2776 options: req.options,
2777 watcher: req.watcher,
2778
2779 responder: DirectoryWatchResponder {
2780 control_handle: std::mem::ManuallyDrop::new(control_handle),
2781 tx_id: header.tx_id,
2782 },
2783 })
2784 }
2785 _ if header.tx_id == 0
2786 && header
2787 .dynamic_flags()
2788 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2789 {
2790 Ok(DirectoryRequest::_UnknownMethod {
2791 ordinal: header.ordinal,
2792 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2793 method_type: fidl::MethodType::OneWay,
2794 })
2795 }
2796 _ if header
2797 .dynamic_flags()
2798 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2799 {
2800 this.inner.send_framework_err(
2801 fidl::encoding::FrameworkErr::UnknownMethod,
2802 header.tx_id,
2803 header.ordinal,
2804 header.dynamic_flags(),
2805 (bytes, handles),
2806 )?;
2807 Ok(DirectoryRequest::_UnknownMethod {
2808 ordinal: header.ordinal,
2809 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2810 method_type: fidl::MethodType::TwoWay,
2811 })
2812 }
2813 _ => Err(fidl::Error::UnknownOrdinal {
2814 ordinal: header.ordinal,
2815 protocol_name:
2816 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2817 }),
2818 }))
2819 },
2820 )
2821 }
2822}
2823
2824#[derive(Debug)]
2826pub enum DirectoryRequest {
2827 AdvisoryLock {
2851 request: AdvisoryLockRequest,
2852 responder: DirectoryAdvisoryLockResponder,
2853 },
2854 Clone {
2855 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
2856 control_handle: DirectoryControlHandle,
2857 },
2858 Close {
2869 responder: DirectoryCloseResponder,
2870 },
2871 Query {
2872 responder: DirectoryQueryResponder,
2873 },
2874 DeprecatedClone {
2876 flags: OpenFlags,
2877 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
2878 control_handle: DirectoryControlHandle,
2879 },
2880 GetAttr {
2884 responder: DirectoryGetAttrResponder,
2885 },
2886 DeprecatedSetAttr {
2888 flags: NodeAttributeFlags,
2889 attributes: NodeAttributes,
2890 responder: DirectoryDeprecatedSetAttrResponder,
2891 },
2892 DeprecatedGetFlags {
2894 responder: DirectoryDeprecatedGetFlagsResponder,
2895 },
2896 DeprecatedSetFlags {
2898 flags: OpenFlags,
2899 responder: DirectoryDeprecatedSetFlagsResponder,
2900 },
2901 GetFlags {
2910 responder: DirectoryGetFlagsResponder,
2911 },
2912 SetFlags {
2922 flags: Flags,
2923 responder: DirectorySetFlagsResponder,
2924 },
2925 QueryFilesystem {
2927 responder: DirectoryQueryFilesystemResponder,
2928 },
2929 GetAttributes {
2943 query: NodeAttributesQuery,
2944 responder: DirectoryGetAttributesResponder,
2945 },
2946 UpdateAttributes {
2955 payload: MutableNodeAttributes,
2956 responder: DirectoryUpdateAttributesResponder,
2957 },
2958 Sync {
2968 responder: DirectorySyncResponder,
2969 },
2970 ListExtendedAttributes {
2979 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
2980 control_handle: DirectoryControlHandle,
2981 },
2982 GetExtendedAttribute {
2989 name: Vec<u8>,
2990 responder: DirectoryGetExtendedAttributeResponder,
2991 },
2992 SetExtendedAttribute {
3000 name: Vec<u8>,
3001 value: ExtendedAttributeValue,
3002 mode: SetExtendedAttributeMode,
3003 responder: DirectorySetExtendedAttributeResponder,
3004 },
3005 RemoveExtendedAttribute {
3011 name: Vec<u8>,
3012 responder: DirectoryRemoveExtendedAttributeResponder,
3013 },
3014 DeprecatedOpen {
3016 flags: OpenFlags,
3017 mode: ModeType,
3018 path: String,
3019 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
3020 control_handle: DirectoryControlHandle,
3021 },
3022 Open {
3029 path: String,
3030 flags: Flags,
3031 options: Options,
3032 object: fdomain_client::Channel,
3033 control_handle: DirectoryControlHandle,
3034 },
3035 ReadDirents {
3061 max_bytes: u64,
3062 responder: DirectoryReadDirentsResponder,
3063 },
3064 Rewind {
3068 responder: DirectoryRewindResponder,
3069 },
3070 GetToken {
3077 responder: DirectoryGetTokenResponder,
3078 },
3079 Link {
3096 src: String,
3097 dst_parent_token: fdomain_client::Handle,
3098 dst: String,
3099 responder: DirectoryLinkResponder,
3100 },
3101 Unlink {
3126 name: String,
3127 options: UnlinkOptions,
3128 responder: DirectoryUnlinkResponder,
3129 },
3130 Rename {
3156 src: String,
3157 dst_parent_token: fdomain_client::Event,
3158 dst: String,
3159 responder: DirectoryRenameResponder,
3160 },
3161 CreateSymlink {
3176 name: String,
3177 target: Vec<u8>,
3178 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3179 responder: DirectoryCreateSymlinkResponder,
3180 },
3181 Watch {
3188 mask: WatchMask,
3189 options: u32,
3190 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3191 responder: DirectoryWatchResponder,
3192 },
3193 #[non_exhaustive]
3195 _UnknownMethod {
3196 ordinal: u64,
3198 control_handle: DirectoryControlHandle,
3199 method_type: fidl::MethodType,
3200 },
3201}
3202
3203impl DirectoryRequest {
3204 #[allow(irrefutable_let_patterns)]
3205 pub fn into_advisory_lock(
3206 self,
3207 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
3208 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
3209 Some((request, responder))
3210 } else {
3211 None
3212 }
3213 }
3214
3215 #[allow(irrefutable_let_patterns)]
3216 pub fn into_clone(
3217 self,
3218 ) -> Option<(
3219 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
3220 DirectoryControlHandle,
3221 )> {
3222 if let DirectoryRequest::Clone { request, control_handle } = self {
3223 Some((request, control_handle))
3224 } else {
3225 None
3226 }
3227 }
3228
3229 #[allow(irrefutable_let_patterns)]
3230 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
3231 if let DirectoryRequest::Close { responder } = self {
3232 Some((responder))
3233 } else {
3234 None
3235 }
3236 }
3237
3238 #[allow(irrefutable_let_patterns)]
3239 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
3240 if let DirectoryRequest::Query { responder } = self {
3241 Some((responder))
3242 } else {
3243 None
3244 }
3245 }
3246
3247 #[allow(irrefutable_let_patterns)]
3248 pub fn into_deprecated_clone(
3249 self,
3250 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, DirectoryControlHandle)>
3251 {
3252 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
3253 Some((flags, object, control_handle))
3254 } else {
3255 None
3256 }
3257 }
3258
3259 #[allow(irrefutable_let_patterns)]
3260 pub fn into_get_attr(self) -> Option<(DirectoryGetAttrResponder)> {
3261 if let DirectoryRequest::GetAttr { responder } = self {
3262 Some((responder))
3263 } else {
3264 None
3265 }
3266 }
3267
3268 #[allow(irrefutable_let_patterns)]
3269 pub fn into_deprecated_set_attr(
3270 self,
3271 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
3272 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
3273 Some((flags, attributes, responder))
3274 } else {
3275 None
3276 }
3277 }
3278
3279 #[allow(irrefutable_let_patterns)]
3280 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
3281 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
3282 Some((responder))
3283 } else {
3284 None
3285 }
3286 }
3287
3288 #[allow(irrefutable_let_patterns)]
3289 pub fn into_deprecated_set_flags(
3290 self,
3291 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
3292 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
3293 Some((flags, responder))
3294 } else {
3295 None
3296 }
3297 }
3298
3299 #[allow(irrefutable_let_patterns)]
3300 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
3301 if let DirectoryRequest::GetFlags { responder } = self {
3302 Some((responder))
3303 } else {
3304 None
3305 }
3306 }
3307
3308 #[allow(irrefutable_let_patterns)]
3309 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
3310 if let DirectoryRequest::SetFlags { flags, responder } = self {
3311 Some((flags, responder))
3312 } else {
3313 None
3314 }
3315 }
3316
3317 #[allow(irrefutable_let_patterns)]
3318 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
3319 if let DirectoryRequest::QueryFilesystem { responder } = self {
3320 Some((responder))
3321 } else {
3322 None
3323 }
3324 }
3325
3326 #[allow(irrefutable_let_patterns)]
3327 pub fn into_get_attributes(
3328 self,
3329 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
3330 if let DirectoryRequest::GetAttributes { query, responder } = self {
3331 Some((query, responder))
3332 } else {
3333 None
3334 }
3335 }
3336
3337 #[allow(irrefutable_let_patterns)]
3338 pub fn into_update_attributes(
3339 self,
3340 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
3341 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
3342 Some((payload, responder))
3343 } else {
3344 None
3345 }
3346 }
3347
3348 #[allow(irrefutable_let_patterns)]
3349 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
3350 if let DirectoryRequest::Sync { responder } = self {
3351 Some((responder))
3352 } else {
3353 None
3354 }
3355 }
3356
3357 #[allow(irrefutable_let_patterns)]
3358 pub fn into_list_extended_attributes(
3359 self,
3360 ) -> Option<(
3361 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
3362 DirectoryControlHandle,
3363 )> {
3364 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
3365 Some((iterator, control_handle))
3366 } else {
3367 None
3368 }
3369 }
3370
3371 #[allow(irrefutable_let_patterns)]
3372 pub fn into_get_extended_attribute(
3373 self,
3374 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
3375 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
3376 Some((name, responder))
3377 } else {
3378 None
3379 }
3380 }
3381
3382 #[allow(irrefutable_let_patterns)]
3383 pub fn into_set_extended_attribute(
3384 self,
3385 ) -> Option<(
3386 Vec<u8>,
3387 ExtendedAttributeValue,
3388 SetExtendedAttributeMode,
3389 DirectorySetExtendedAttributeResponder,
3390 )> {
3391 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
3392 Some((name, value, mode, responder))
3393 } else {
3394 None
3395 }
3396 }
3397
3398 #[allow(irrefutable_let_patterns)]
3399 pub fn into_remove_extended_attribute(
3400 self,
3401 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
3402 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
3403 Some((name, responder))
3404 } else {
3405 None
3406 }
3407 }
3408
3409 #[allow(irrefutable_let_patterns)]
3410 pub fn into_deprecated_open(
3411 self,
3412 ) -> Option<(
3413 OpenFlags,
3414 ModeType,
3415 String,
3416 fdomain_client::fidl::ServerEnd<NodeMarker>,
3417 DirectoryControlHandle,
3418 )> {
3419 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
3420 {
3421 Some((flags, mode, path, object, control_handle))
3422 } else {
3423 None
3424 }
3425 }
3426
3427 #[allow(irrefutable_let_patterns)]
3428 pub fn into_open(
3429 self,
3430 ) -> Option<(String, Flags, Options, fdomain_client::Channel, DirectoryControlHandle)> {
3431 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
3432 Some((path, flags, options, object, control_handle))
3433 } else {
3434 None
3435 }
3436 }
3437
3438 #[allow(irrefutable_let_patterns)]
3439 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
3440 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
3441 Some((max_bytes, responder))
3442 } else {
3443 None
3444 }
3445 }
3446
3447 #[allow(irrefutable_let_patterns)]
3448 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
3449 if let DirectoryRequest::Rewind { responder } = self {
3450 Some((responder))
3451 } else {
3452 None
3453 }
3454 }
3455
3456 #[allow(irrefutable_let_patterns)]
3457 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
3458 if let DirectoryRequest::GetToken { responder } = self {
3459 Some((responder))
3460 } else {
3461 None
3462 }
3463 }
3464
3465 #[allow(irrefutable_let_patterns)]
3466 pub fn into_link(
3467 self,
3468 ) -> Option<(String, fdomain_client::Handle, String, DirectoryLinkResponder)> {
3469 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
3470 Some((src, dst_parent_token, dst, responder))
3471 } else {
3472 None
3473 }
3474 }
3475
3476 #[allow(irrefutable_let_patterns)]
3477 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
3478 if let DirectoryRequest::Unlink { name, options, responder } = self {
3479 Some((name, options, responder))
3480 } else {
3481 None
3482 }
3483 }
3484
3485 #[allow(irrefutable_let_patterns)]
3486 pub fn into_rename(
3487 self,
3488 ) -> Option<(String, fdomain_client::Event, String, DirectoryRenameResponder)> {
3489 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
3490 Some((src, dst_parent_token, dst, responder))
3491 } else {
3492 None
3493 }
3494 }
3495
3496 #[allow(irrefutable_let_patterns)]
3497 pub fn into_create_symlink(
3498 self,
3499 ) -> Option<(
3500 String,
3501 Vec<u8>,
3502 Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3503 DirectoryCreateSymlinkResponder,
3504 )> {
3505 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
3506 Some((name, target, connection, responder))
3507 } else {
3508 None
3509 }
3510 }
3511
3512 #[allow(irrefutable_let_patterns)]
3513 pub fn into_watch(
3514 self,
3515 ) -> Option<(
3516 WatchMask,
3517 u32,
3518 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3519 DirectoryWatchResponder,
3520 )> {
3521 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
3522 Some((mask, options, watcher, responder))
3523 } else {
3524 None
3525 }
3526 }
3527
3528 pub fn method_name(&self) -> &'static str {
3530 match *self {
3531 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
3532 DirectoryRequest::Clone { .. } => "clone",
3533 DirectoryRequest::Close { .. } => "close",
3534 DirectoryRequest::Query { .. } => "query",
3535 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
3536 DirectoryRequest::GetAttr { .. } => "get_attr",
3537 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
3538 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
3539 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
3540 DirectoryRequest::GetFlags { .. } => "get_flags",
3541 DirectoryRequest::SetFlags { .. } => "set_flags",
3542 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
3543 DirectoryRequest::GetAttributes { .. } => "get_attributes",
3544 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
3545 DirectoryRequest::Sync { .. } => "sync",
3546 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
3547 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
3548 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
3549 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
3550 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
3551 DirectoryRequest::Open { .. } => "open",
3552 DirectoryRequest::ReadDirents { .. } => "read_dirents",
3553 DirectoryRequest::Rewind { .. } => "rewind",
3554 DirectoryRequest::GetToken { .. } => "get_token",
3555 DirectoryRequest::Link { .. } => "link",
3556 DirectoryRequest::Unlink { .. } => "unlink",
3557 DirectoryRequest::Rename { .. } => "rename",
3558 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
3559 DirectoryRequest::Watch { .. } => "watch",
3560 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3561 "unknown one-way method"
3562 }
3563 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3564 "unknown two-way method"
3565 }
3566 }
3567 }
3568}
3569
3570#[derive(Debug, Clone)]
3571pub struct DirectoryControlHandle {
3572 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3573}
3574
3575impl fdomain_client::fidl::ControlHandle for DirectoryControlHandle {
3576 fn shutdown(&self) {
3577 self.inner.shutdown()
3578 }
3579
3580 fn is_closed(&self) -> bool {
3581 self.inner.channel().is_closed()
3582 }
3583 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3584 self.inner.channel().on_closed()
3585 }
3586}
3587
3588impl DirectoryControlHandle {
3589 pub fn send_on_open_(
3590 &self,
3591 mut s: i32,
3592 mut info: Option<NodeInfoDeprecated>,
3593 ) -> Result<(), fidl::Error> {
3594 self.inner.send::<NodeOnOpenRequest>(
3595 (s, info.as_mut()),
3596 0,
3597 0x7fc7bbb1dbfd1972,
3598 fidl::encoding::DynamicFlags::empty(),
3599 )
3600 }
3601
3602 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
3603 self.inner.send::<Representation>(
3604 &mut payload,
3605 0,
3606 0x5cb40567d80a510c,
3607 fidl::encoding::DynamicFlags::empty(),
3608 )
3609 }
3610}
3611
3612#[must_use = "FIDL methods require a response to be sent"]
3613#[derive(Debug)]
3614pub struct DirectoryAdvisoryLockResponder {
3615 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3616 tx_id: u32,
3617}
3618
3619impl std::ops::Drop for DirectoryAdvisoryLockResponder {
3623 fn drop(&mut self) {
3624 self.control_handle.shutdown();
3625 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3627 }
3628}
3629
3630impl fdomain_client::fidl::Responder for DirectoryAdvisoryLockResponder {
3631 type ControlHandle = DirectoryControlHandle;
3632
3633 fn control_handle(&self) -> &DirectoryControlHandle {
3634 &self.control_handle
3635 }
3636
3637 fn drop_without_shutdown(mut self) {
3638 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3640 std::mem::forget(self);
3642 }
3643}
3644
3645impl DirectoryAdvisoryLockResponder {
3646 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3650 let _result = self.send_raw(result);
3651 if _result.is_err() {
3652 self.control_handle.shutdown();
3653 }
3654 self.drop_without_shutdown();
3655 _result
3656 }
3657
3658 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3660 let _result = self.send_raw(result);
3661 self.drop_without_shutdown();
3662 _result
3663 }
3664
3665 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3666 self.control_handle
3667 .inner
3668 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3669 result,
3670 self.tx_id,
3671 0x6ee9c0ad53ec87aa,
3672 fidl::encoding::DynamicFlags::empty(),
3673 )
3674 }
3675}
3676
3677#[must_use = "FIDL methods require a response to be sent"]
3678#[derive(Debug)]
3679pub struct DirectoryCloseResponder {
3680 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3681 tx_id: u32,
3682}
3683
3684impl std::ops::Drop for DirectoryCloseResponder {
3688 fn drop(&mut self) {
3689 self.control_handle.shutdown();
3690 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3692 }
3693}
3694
3695impl fdomain_client::fidl::Responder for DirectoryCloseResponder {
3696 type ControlHandle = DirectoryControlHandle;
3697
3698 fn control_handle(&self) -> &DirectoryControlHandle {
3699 &self.control_handle
3700 }
3701
3702 fn drop_without_shutdown(mut self) {
3703 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3705 std::mem::forget(self);
3707 }
3708}
3709
3710impl DirectoryCloseResponder {
3711 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3715 let _result = self.send_raw(result);
3716 if _result.is_err() {
3717 self.control_handle.shutdown();
3718 }
3719 self.drop_without_shutdown();
3720 _result
3721 }
3722
3723 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3725 let _result = self.send_raw(result);
3726 self.drop_without_shutdown();
3727 _result
3728 }
3729
3730 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3731 self.control_handle
3732 .inner
3733 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3734 result,
3735 self.tx_id,
3736 0x5ac5d459ad7f657e,
3737 fidl::encoding::DynamicFlags::empty(),
3738 )
3739 }
3740}
3741
3742#[must_use = "FIDL methods require a response to be sent"]
3743#[derive(Debug)]
3744pub struct DirectoryQueryResponder {
3745 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3746 tx_id: u32,
3747}
3748
3749impl std::ops::Drop for DirectoryQueryResponder {
3753 fn drop(&mut self) {
3754 self.control_handle.shutdown();
3755 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3757 }
3758}
3759
3760impl fdomain_client::fidl::Responder for DirectoryQueryResponder {
3761 type ControlHandle = DirectoryControlHandle;
3762
3763 fn control_handle(&self) -> &DirectoryControlHandle {
3764 &self.control_handle
3765 }
3766
3767 fn drop_without_shutdown(mut self) {
3768 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3770 std::mem::forget(self);
3772 }
3773}
3774
3775impl DirectoryQueryResponder {
3776 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3780 let _result = self.send_raw(protocol);
3781 if _result.is_err() {
3782 self.control_handle.shutdown();
3783 }
3784 self.drop_without_shutdown();
3785 _result
3786 }
3787
3788 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3790 let _result = self.send_raw(protocol);
3791 self.drop_without_shutdown();
3792 _result
3793 }
3794
3795 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3796 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
3797 (protocol,),
3798 self.tx_id,
3799 0x2658edee9decfc06,
3800 fidl::encoding::DynamicFlags::empty(),
3801 )
3802 }
3803}
3804
3805#[must_use = "FIDL methods require a response to be sent"]
3806#[derive(Debug)]
3807pub struct DirectoryGetAttrResponder {
3808 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3809 tx_id: u32,
3810}
3811
3812impl std::ops::Drop for DirectoryGetAttrResponder {
3816 fn drop(&mut self) {
3817 self.control_handle.shutdown();
3818 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3820 }
3821}
3822
3823impl fdomain_client::fidl::Responder for DirectoryGetAttrResponder {
3824 type ControlHandle = DirectoryControlHandle;
3825
3826 fn control_handle(&self) -> &DirectoryControlHandle {
3827 &self.control_handle
3828 }
3829
3830 fn drop_without_shutdown(mut self) {
3831 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3833 std::mem::forget(self);
3835 }
3836}
3837
3838impl DirectoryGetAttrResponder {
3839 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3843 let _result = self.send_raw(s, attributes);
3844 if _result.is_err() {
3845 self.control_handle.shutdown();
3846 }
3847 self.drop_without_shutdown();
3848 _result
3849 }
3850
3851 pub fn send_no_shutdown_on_err(
3853 self,
3854 mut s: i32,
3855 mut attributes: &NodeAttributes,
3856 ) -> Result<(), fidl::Error> {
3857 let _result = self.send_raw(s, attributes);
3858 self.drop_without_shutdown();
3859 _result
3860 }
3861
3862 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3863 self.control_handle.inner.send::<NodeGetAttrResponse>(
3864 (s, attributes),
3865 self.tx_id,
3866 0x78985e216314dafd,
3867 fidl::encoding::DynamicFlags::empty(),
3868 )
3869 }
3870}
3871
3872#[must_use = "FIDL methods require a response to be sent"]
3873#[derive(Debug)]
3874pub struct DirectoryDeprecatedSetAttrResponder {
3875 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3876 tx_id: u32,
3877}
3878
3879impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
3883 fn drop(&mut self) {
3884 self.control_handle.shutdown();
3885 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3887 }
3888}
3889
3890impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetAttrResponder {
3891 type ControlHandle = DirectoryControlHandle;
3892
3893 fn control_handle(&self) -> &DirectoryControlHandle {
3894 &self.control_handle
3895 }
3896
3897 fn drop_without_shutdown(mut self) {
3898 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3900 std::mem::forget(self);
3902 }
3903}
3904
3905impl DirectoryDeprecatedSetAttrResponder {
3906 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
3910 let _result = self.send_raw(s);
3911 if _result.is_err() {
3912 self.control_handle.shutdown();
3913 }
3914 self.drop_without_shutdown();
3915 _result
3916 }
3917
3918 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
3920 let _result = self.send_raw(s);
3921 self.drop_without_shutdown();
3922 _result
3923 }
3924
3925 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
3926 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
3927 (s,),
3928 self.tx_id,
3929 0x4186c0f40d938f46,
3930 fidl::encoding::DynamicFlags::empty(),
3931 )
3932 }
3933}
3934
3935#[must_use = "FIDL methods require a response to be sent"]
3936#[derive(Debug)]
3937pub struct DirectoryDeprecatedGetFlagsResponder {
3938 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3939 tx_id: u32,
3940}
3941
3942impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
3946 fn drop(&mut self) {
3947 self.control_handle.shutdown();
3948 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3950 }
3951}
3952
3953impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetFlagsResponder {
3954 type ControlHandle = DirectoryControlHandle;
3955
3956 fn control_handle(&self) -> &DirectoryControlHandle {
3957 &self.control_handle
3958 }
3959
3960 fn drop_without_shutdown(mut self) {
3961 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3963 std::mem::forget(self);
3965 }
3966}
3967
3968impl DirectoryDeprecatedGetFlagsResponder {
3969 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3973 let _result = self.send_raw(s, flags);
3974 if _result.is_err() {
3975 self.control_handle.shutdown();
3976 }
3977 self.drop_without_shutdown();
3978 _result
3979 }
3980
3981 pub fn send_no_shutdown_on_err(
3983 self,
3984 mut s: i32,
3985 mut flags: OpenFlags,
3986 ) -> Result<(), fidl::Error> {
3987 let _result = self.send_raw(s, flags);
3988 self.drop_without_shutdown();
3989 _result
3990 }
3991
3992 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3993 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
3994 (s, flags),
3995 self.tx_id,
3996 0x5b88fffb8eda3aa1,
3997 fidl::encoding::DynamicFlags::empty(),
3998 )
3999 }
4000}
4001
4002#[must_use = "FIDL methods require a response to be sent"]
4003#[derive(Debug)]
4004pub struct DirectoryDeprecatedSetFlagsResponder {
4005 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4006 tx_id: u32,
4007}
4008
4009impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4013 fn drop(&mut self) {
4014 self.control_handle.shutdown();
4015 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4017 }
4018}
4019
4020impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetFlagsResponder {
4021 type ControlHandle = DirectoryControlHandle;
4022
4023 fn control_handle(&self) -> &DirectoryControlHandle {
4024 &self.control_handle
4025 }
4026
4027 fn drop_without_shutdown(mut self) {
4028 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4030 std::mem::forget(self);
4032 }
4033}
4034
4035impl DirectoryDeprecatedSetFlagsResponder {
4036 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4040 let _result = self.send_raw(s);
4041 if _result.is_err() {
4042 self.control_handle.shutdown();
4043 }
4044 self.drop_without_shutdown();
4045 _result
4046 }
4047
4048 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4050 let _result = self.send_raw(s);
4051 self.drop_without_shutdown();
4052 _result
4053 }
4054
4055 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4056 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4057 (s,),
4058 self.tx_id,
4059 0x5295b76c71fde733,
4060 fidl::encoding::DynamicFlags::empty(),
4061 )
4062 }
4063}
4064
4065#[must_use = "FIDL methods require a response to be sent"]
4066#[derive(Debug)]
4067pub struct DirectoryGetFlagsResponder {
4068 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4069 tx_id: u32,
4070}
4071
4072impl std::ops::Drop for DirectoryGetFlagsResponder {
4076 fn drop(&mut self) {
4077 self.control_handle.shutdown();
4078 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4080 }
4081}
4082
4083impl fdomain_client::fidl::Responder for DirectoryGetFlagsResponder {
4084 type ControlHandle = DirectoryControlHandle;
4085
4086 fn control_handle(&self) -> &DirectoryControlHandle {
4087 &self.control_handle
4088 }
4089
4090 fn drop_without_shutdown(mut self) {
4091 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4093 std::mem::forget(self);
4095 }
4096}
4097
4098impl DirectoryGetFlagsResponder {
4099 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4103 let _result = self.send_raw(result);
4104 if _result.is_err() {
4105 self.control_handle.shutdown();
4106 }
4107 self.drop_without_shutdown();
4108 _result
4109 }
4110
4111 pub fn send_no_shutdown_on_err(
4113 self,
4114 mut result: Result<Flags, i32>,
4115 ) -> Result<(), fidl::Error> {
4116 let _result = self.send_raw(result);
4117 self.drop_without_shutdown();
4118 _result
4119 }
4120
4121 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4122 self.control_handle
4123 .inner
4124 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4125 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4126 self.tx_id,
4127 0x176eb318f64ec23,
4128 fidl::encoding::DynamicFlags::FLEXIBLE,
4129 )
4130 }
4131}
4132
4133#[must_use = "FIDL methods require a response to be sent"]
4134#[derive(Debug)]
4135pub struct DirectorySetFlagsResponder {
4136 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4137 tx_id: u32,
4138}
4139
4140impl std::ops::Drop for DirectorySetFlagsResponder {
4144 fn drop(&mut self) {
4145 self.control_handle.shutdown();
4146 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4148 }
4149}
4150
4151impl fdomain_client::fidl::Responder for DirectorySetFlagsResponder {
4152 type ControlHandle = DirectoryControlHandle;
4153
4154 fn control_handle(&self) -> &DirectoryControlHandle {
4155 &self.control_handle
4156 }
4157
4158 fn drop_without_shutdown(mut self) {
4159 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4161 std::mem::forget(self);
4163 }
4164}
4165
4166impl DirectorySetFlagsResponder {
4167 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4171 let _result = self.send_raw(result);
4172 if _result.is_err() {
4173 self.control_handle.shutdown();
4174 }
4175 self.drop_without_shutdown();
4176 _result
4177 }
4178
4179 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4181 let _result = self.send_raw(result);
4182 self.drop_without_shutdown();
4183 _result
4184 }
4185
4186 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4187 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4188 fidl::encoding::EmptyStruct,
4189 i32,
4190 >>(
4191 fidl::encoding::FlexibleResult::new(result),
4192 self.tx_id,
4193 0x55a8028685791ea8,
4194 fidl::encoding::DynamicFlags::FLEXIBLE,
4195 )
4196 }
4197}
4198
4199#[must_use = "FIDL methods require a response to be sent"]
4200#[derive(Debug)]
4201pub struct DirectoryQueryFilesystemResponder {
4202 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4203 tx_id: u32,
4204}
4205
4206impl std::ops::Drop for DirectoryQueryFilesystemResponder {
4210 fn drop(&mut self) {
4211 self.control_handle.shutdown();
4212 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4214 }
4215}
4216
4217impl fdomain_client::fidl::Responder for DirectoryQueryFilesystemResponder {
4218 type ControlHandle = DirectoryControlHandle;
4219
4220 fn control_handle(&self) -> &DirectoryControlHandle {
4221 &self.control_handle
4222 }
4223
4224 fn drop_without_shutdown(mut self) {
4225 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4227 std::mem::forget(self);
4229 }
4230}
4231
4232impl DirectoryQueryFilesystemResponder {
4233 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4237 let _result = self.send_raw(s, info);
4238 if _result.is_err() {
4239 self.control_handle.shutdown();
4240 }
4241 self.drop_without_shutdown();
4242 _result
4243 }
4244
4245 pub fn send_no_shutdown_on_err(
4247 self,
4248 mut s: i32,
4249 mut info: Option<&FilesystemInfo>,
4250 ) -> Result<(), fidl::Error> {
4251 let _result = self.send_raw(s, info);
4252 self.drop_without_shutdown();
4253 _result
4254 }
4255
4256 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4257 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
4258 (s, info),
4259 self.tx_id,
4260 0x6f344a1c6b0a0610,
4261 fidl::encoding::DynamicFlags::empty(),
4262 )
4263 }
4264}
4265
4266#[must_use = "FIDL methods require a response to be sent"]
4267#[derive(Debug)]
4268pub struct DirectoryGetAttributesResponder {
4269 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4270 tx_id: u32,
4271}
4272
4273impl std::ops::Drop for DirectoryGetAttributesResponder {
4277 fn drop(&mut self) {
4278 self.control_handle.shutdown();
4279 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4281 }
4282}
4283
4284impl fdomain_client::fidl::Responder for DirectoryGetAttributesResponder {
4285 type ControlHandle = DirectoryControlHandle;
4286
4287 fn control_handle(&self) -> &DirectoryControlHandle {
4288 &self.control_handle
4289 }
4290
4291 fn drop_without_shutdown(mut self) {
4292 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4294 std::mem::forget(self);
4296 }
4297}
4298
4299impl DirectoryGetAttributesResponder {
4300 pub fn send(
4304 self,
4305 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4306 ) -> Result<(), fidl::Error> {
4307 let _result = self.send_raw(result);
4308 if _result.is_err() {
4309 self.control_handle.shutdown();
4310 }
4311 self.drop_without_shutdown();
4312 _result
4313 }
4314
4315 pub fn send_no_shutdown_on_err(
4317 self,
4318 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4319 ) -> Result<(), fidl::Error> {
4320 let _result = self.send_raw(result);
4321 self.drop_without_shutdown();
4322 _result
4323 }
4324
4325 fn send_raw(
4326 &self,
4327 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4328 ) -> Result<(), fidl::Error> {
4329 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
4330 result,
4331 self.tx_id,
4332 0x3d4396a638ea053b,
4333 fidl::encoding::DynamicFlags::empty(),
4334 )
4335 }
4336}
4337
4338#[must_use = "FIDL methods require a response to be sent"]
4339#[derive(Debug)]
4340pub struct DirectoryUpdateAttributesResponder {
4341 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4342 tx_id: u32,
4343}
4344
4345impl std::ops::Drop for DirectoryUpdateAttributesResponder {
4349 fn drop(&mut self) {
4350 self.control_handle.shutdown();
4351 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4353 }
4354}
4355
4356impl fdomain_client::fidl::Responder for DirectoryUpdateAttributesResponder {
4357 type ControlHandle = DirectoryControlHandle;
4358
4359 fn control_handle(&self) -> &DirectoryControlHandle {
4360 &self.control_handle
4361 }
4362
4363 fn drop_without_shutdown(mut self) {
4364 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4366 std::mem::forget(self);
4368 }
4369}
4370
4371impl DirectoryUpdateAttributesResponder {
4372 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4376 let _result = self.send_raw(result);
4377 if _result.is_err() {
4378 self.control_handle.shutdown();
4379 }
4380 self.drop_without_shutdown();
4381 _result
4382 }
4383
4384 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4386 let _result = self.send_raw(result);
4387 self.drop_without_shutdown();
4388 _result
4389 }
4390
4391 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4392 self.control_handle
4393 .inner
4394 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4395 result,
4396 self.tx_id,
4397 0x3308c1da5a89bf08,
4398 fidl::encoding::DynamicFlags::empty(),
4399 )
4400 }
4401}
4402
4403#[must_use = "FIDL methods require a response to be sent"]
4404#[derive(Debug)]
4405pub struct DirectorySyncResponder {
4406 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4407 tx_id: u32,
4408}
4409
4410impl std::ops::Drop for DirectorySyncResponder {
4414 fn drop(&mut self) {
4415 self.control_handle.shutdown();
4416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4418 }
4419}
4420
4421impl fdomain_client::fidl::Responder for DirectorySyncResponder {
4422 type ControlHandle = DirectoryControlHandle;
4423
4424 fn control_handle(&self) -> &DirectoryControlHandle {
4425 &self.control_handle
4426 }
4427
4428 fn drop_without_shutdown(mut self) {
4429 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4431 std::mem::forget(self);
4433 }
4434}
4435
4436impl DirectorySyncResponder {
4437 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4441 let _result = self.send_raw(result);
4442 if _result.is_err() {
4443 self.control_handle.shutdown();
4444 }
4445 self.drop_without_shutdown();
4446 _result
4447 }
4448
4449 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4451 let _result = self.send_raw(result);
4452 self.drop_without_shutdown();
4453 _result
4454 }
4455
4456 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4457 self.control_handle
4458 .inner
4459 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4460 result,
4461 self.tx_id,
4462 0x2c5c27ca0ab5dc49,
4463 fidl::encoding::DynamicFlags::empty(),
4464 )
4465 }
4466}
4467
4468#[must_use = "FIDL methods require a response to be sent"]
4469#[derive(Debug)]
4470pub struct DirectoryGetExtendedAttributeResponder {
4471 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4472 tx_id: u32,
4473}
4474
4475impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
4479 fn drop(&mut self) {
4480 self.control_handle.shutdown();
4481 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4483 }
4484}
4485
4486impl fdomain_client::fidl::Responder for DirectoryGetExtendedAttributeResponder {
4487 type ControlHandle = DirectoryControlHandle;
4488
4489 fn control_handle(&self) -> &DirectoryControlHandle {
4490 &self.control_handle
4491 }
4492
4493 fn drop_without_shutdown(mut self) {
4494 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4496 std::mem::forget(self);
4498 }
4499}
4500
4501impl DirectoryGetExtendedAttributeResponder {
4502 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4506 let _result = self.send_raw(result);
4507 if _result.is_err() {
4508 self.control_handle.shutdown();
4509 }
4510 self.drop_without_shutdown();
4511 _result
4512 }
4513
4514 pub fn send_no_shutdown_on_err(
4516 self,
4517 mut result: Result<ExtendedAttributeValue, i32>,
4518 ) -> Result<(), fidl::Error> {
4519 let _result = self.send_raw(result);
4520 self.drop_without_shutdown();
4521 _result
4522 }
4523
4524 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4525 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
4526 result.as_mut().map_err(|e| *e),
4527 self.tx_id,
4528 0x45ffa3ccfdeb76db,
4529 fidl::encoding::DynamicFlags::empty(),
4530 )
4531 }
4532}
4533
4534#[must_use = "FIDL methods require a response to be sent"]
4535#[derive(Debug)]
4536pub struct DirectorySetExtendedAttributeResponder {
4537 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4538 tx_id: u32,
4539}
4540
4541impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
4545 fn drop(&mut self) {
4546 self.control_handle.shutdown();
4547 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4549 }
4550}
4551
4552impl fdomain_client::fidl::Responder for DirectorySetExtendedAttributeResponder {
4553 type ControlHandle = DirectoryControlHandle;
4554
4555 fn control_handle(&self) -> &DirectoryControlHandle {
4556 &self.control_handle
4557 }
4558
4559 fn drop_without_shutdown(mut self) {
4560 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4562 std::mem::forget(self);
4564 }
4565}
4566
4567impl DirectorySetExtendedAttributeResponder {
4568 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4572 let _result = self.send_raw(result);
4573 if _result.is_err() {
4574 self.control_handle.shutdown();
4575 }
4576 self.drop_without_shutdown();
4577 _result
4578 }
4579
4580 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4582 let _result = self.send_raw(result);
4583 self.drop_without_shutdown();
4584 _result
4585 }
4586
4587 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4588 self.control_handle
4589 .inner
4590 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4591 result,
4592 self.tx_id,
4593 0x4a951362f681f23c,
4594 fidl::encoding::DynamicFlags::empty(),
4595 )
4596 }
4597}
4598
4599#[must_use = "FIDL methods require a response to be sent"]
4600#[derive(Debug)]
4601pub struct DirectoryRemoveExtendedAttributeResponder {
4602 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4603 tx_id: u32,
4604}
4605
4606impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
4610 fn drop(&mut self) {
4611 self.control_handle.shutdown();
4612 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4614 }
4615}
4616
4617impl fdomain_client::fidl::Responder for DirectoryRemoveExtendedAttributeResponder {
4618 type ControlHandle = DirectoryControlHandle;
4619
4620 fn control_handle(&self) -> &DirectoryControlHandle {
4621 &self.control_handle
4622 }
4623
4624 fn drop_without_shutdown(mut self) {
4625 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4627 std::mem::forget(self);
4629 }
4630}
4631
4632impl DirectoryRemoveExtendedAttributeResponder {
4633 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4637 let _result = self.send_raw(result);
4638 if _result.is_err() {
4639 self.control_handle.shutdown();
4640 }
4641 self.drop_without_shutdown();
4642 _result
4643 }
4644
4645 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4647 let _result = self.send_raw(result);
4648 self.drop_without_shutdown();
4649 _result
4650 }
4651
4652 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4653 self.control_handle
4654 .inner
4655 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4656 result,
4657 self.tx_id,
4658 0x7a0b9f3a9bf9032d,
4659 fidl::encoding::DynamicFlags::empty(),
4660 )
4661 }
4662}
4663
4664#[must_use = "FIDL methods require a response to be sent"]
4665#[derive(Debug)]
4666pub struct DirectoryReadDirentsResponder {
4667 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4668 tx_id: u32,
4669}
4670
4671impl std::ops::Drop for DirectoryReadDirentsResponder {
4675 fn drop(&mut self) {
4676 self.control_handle.shutdown();
4677 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4679 }
4680}
4681
4682impl fdomain_client::fidl::Responder for DirectoryReadDirentsResponder {
4683 type ControlHandle = DirectoryControlHandle;
4684
4685 fn control_handle(&self) -> &DirectoryControlHandle {
4686 &self.control_handle
4687 }
4688
4689 fn drop_without_shutdown(mut self) {
4690 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4692 std::mem::forget(self);
4694 }
4695}
4696
4697impl DirectoryReadDirentsResponder {
4698 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4702 let _result = self.send_raw(s, dirents);
4703 if _result.is_err() {
4704 self.control_handle.shutdown();
4705 }
4706 self.drop_without_shutdown();
4707 _result
4708 }
4709
4710 pub fn send_no_shutdown_on_err(
4712 self,
4713 mut s: i32,
4714 mut dirents: &[u8],
4715 ) -> Result<(), fidl::Error> {
4716 let _result = self.send_raw(s, dirents);
4717 self.drop_without_shutdown();
4718 _result
4719 }
4720
4721 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4722 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
4723 (s, dirents),
4724 self.tx_id,
4725 0x3582806bf27faa0a,
4726 fidl::encoding::DynamicFlags::empty(),
4727 )
4728 }
4729}
4730
4731#[must_use = "FIDL methods require a response to be sent"]
4732#[derive(Debug)]
4733pub struct DirectoryRewindResponder {
4734 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4735 tx_id: u32,
4736}
4737
4738impl std::ops::Drop for DirectoryRewindResponder {
4742 fn drop(&mut self) {
4743 self.control_handle.shutdown();
4744 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4746 }
4747}
4748
4749impl fdomain_client::fidl::Responder for DirectoryRewindResponder {
4750 type ControlHandle = DirectoryControlHandle;
4751
4752 fn control_handle(&self) -> &DirectoryControlHandle {
4753 &self.control_handle
4754 }
4755
4756 fn drop_without_shutdown(mut self) {
4757 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4759 std::mem::forget(self);
4761 }
4762}
4763
4764impl DirectoryRewindResponder {
4765 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4769 let _result = self.send_raw(s);
4770 if _result.is_err() {
4771 self.control_handle.shutdown();
4772 }
4773 self.drop_without_shutdown();
4774 _result
4775 }
4776
4777 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4779 let _result = self.send_raw(s);
4780 self.drop_without_shutdown();
4781 _result
4782 }
4783
4784 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4785 self.control_handle.inner.send::<DirectoryRewindResponse>(
4786 (s,),
4787 self.tx_id,
4788 0x16b1202af0f34c71,
4789 fidl::encoding::DynamicFlags::empty(),
4790 )
4791 }
4792}
4793
4794#[must_use = "FIDL methods require a response to be sent"]
4795#[derive(Debug)]
4796pub struct DirectoryGetTokenResponder {
4797 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4798 tx_id: u32,
4799}
4800
4801impl std::ops::Drop for DirectoryGetTokenResponder {
4805 fn drop(&mut self) {
4806 self.control_handle.shutdown();
4807 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4809 }
4810}
4811
4812impl fdomain_client::fidl::Responder for DirectoryGetTokenResponder {
4813 type ControlHandle = DirectoryControlHandle;
4814
4815 fn control_handle(&self) -> &DirectoryControlHandle {
4816 &self.control_handle
4817 }
4818
4819 fn drop_without_shutdown(mut self) {
4820 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4822 std::mem::forget(self);
4824 }
4825}
4826
4827impl DirectoryGetTokenResponder {
4828 pub fn send(
4832 self,
4833 mut s: i32,
4834 mut token: Option<fdomain_client::Handle>,
4835 ) -> Result<(), fidl::Error> {
4836 let _result = self.send_raw(s, token);
4837 if _result.is_err() {
4838 self.control_handle.shutdown();
4839 }
4840 self.drop_without_shutdown();
4841 _result
4842 }
4843
4844 pub fn send_no_shutdown_on_err(
4846 self,
4847 mut s: i32,
4848 mut token: Option<fdomain_client::Handle>,
4849 ) -> Result<(), fidl::Error> {
4850 let _result = self.send_raw(s, token);
4851 self.drop_without_shutdown();
4852 _result
4853 }
4854
4855 fn send_raw(
4856 &self,
4857 mut s: i32,
4858 mut token: Option<fdomain_client::Handle>,
4859 ) -> Result<(), fidl::Error> {
4860 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
4861 (s, token),
4862 self.tx_id,
4863 0x26ae9d18763c8655,
4864 fidl::encoding::DynamicFlags::empty(),
4865 )
4866 }
4867}
4868
4869#[must_use = "FIDL methods require a response to be sent"]
4870#[derive(Debug)]
4871pub struct DirectoryLinkResponder {
4872 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4873 tx_id: u32,
4874}
4875
4876impl std::ops::Drop for DirectoryLinkResponder {
4880 fn drop(&mut self) {
4881 self.control_handle.shutdown();
4882 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4884 }
4885}
4886
4887impl fdomain_client::fidl::Responder for DirectoryLinkResponder {
4888 type ControlHandle = DirectoryControlHandle;
4889
4890 fn control_handle(&self) -> &DirectoryControlHandle {
4891 &self.control_handle
4892 }
4893
4894 fn drop_without_shutdown(mut self) {
4895 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4897 std::mem::forget(self);
4899 }
4900}
4901
4902impl DirectoryLinkResponder {
4903 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4907 let _result = self.send_raw(s);
4908 if _result.is_err() {
4909 self.control_handle.shutdown();
4910 }
4911 self.drop_without_shutdown();
4912 _result
4913 }
4914
4915 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4917 let _result = self.send_raw(s);
4918 self.drop_without_shutdown();
4919 _result
4920 }
4921
4922 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4923 self.control_handle.inner.send::<DirectoryLinkResponse>(
4924 (s,),
4925 self.tx_id,
4926 0x740604c0c7c930e7,
4927 fidl::encoding::DynamicFlags::empty(),
4928 )
4929 }
4930}
4931
4932#[must_use = "FIDL methods require a response to be sent"]
4933#[derive(Debug)]
4934pub struct DirectoryUnlinkResponder {
4935 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4936 tx_id: u32,
4937}
4938
4939impl std::ops::Drop for DirectoryUnlinkResponder {
4943 fn drop(&mut self) {
4944 self.control_handle.shutdown();
4945 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4947 }
4948}
4949
4950impl fdomain_client::fidl::Responder for DirectoryUnlinkResponder {
4951 type ControlHandle = DirectoryControlHandle;
4952
4953 fn control_handle(&self) -> &DirectoryControlHandle {
4954 &self.control_handle
4955 }
4956
4957 fn drop_without_shutdown(mut self) {
4958 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4960 std::mem::forget(self);
4962 }
4963}
4964
4965impl DirectoryUnlinkResponder {
4966 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4970 let _result = self.send_raw(result);
4971 if _result.is_err() {
4972 self.control_handle.shutdown();
4973 }
4974 self.drop_without_shutdown();
4975 _result
4976 }
4977
4978 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4980 let _result = self.send_raw(result);
4981 self.drop_without_shutdown();
4982 _result
4983 }
4984
4985 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4986 self.control_handle
4987 .inner
4988 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4989 result,
4990 self.tx_id,
4991 0x750a0326a78d7bed,
4992 fidl::encoding::DynamicFlags::empty(),
4993 )
4994 }
4995}
4996
4997#[must_use = "FIDL methods require a response to be sent"]
4998#[derive(Debug)]
4999pub struct DirectoryRenameResponder {
5000 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5001 tx_id: u32,
5002}
5003
5004impl std::ops::Drop for DirectoryRenameResponder {
5008 fn drop(&mut self) {
5009 self.control_handle.shutdown();
5010 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5012 }
5013}
5014
5015impl fdomain_client::fidl::Responder for DirectoryRenameResponder {
5016 type ControlHandle = DirectoryControlHandle;
5017
5018 fn control_handle(&self) -> &DirectoryControlHandle {
5019 &self.control_handle
5020 }
5021
5022 fn drop_without_shutdown(mut self) {
5023 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5025 std::mem::forget(self);
5027 }
5028}
5029
5030impl DirectoryRenameResponder {
5031 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5035 let _result = self.send_raw(result);
5036 if _result.is_err() {
5037 self.control_handle.shutdown();
5038 }
5039 self.drop_without_shutdown();
5040 _result
5041 }
5042
5043 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5045 let _result = self.send_raw(result);
5046 self.drop_without_shutdown();
5047 _result
5048 }
5049
5050 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5051 self.control_handle
5052 .inner
5053 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5054 result,
5055 self.tx_id,
5056 0x7060e7723b9928de,
5057 fidl::encoding::DynamicFlags::empty(),
5058 )
5059 }
5060}
5061
5062#[must_use = "FIDL methods require a response to be sent"]
5063#[derive(Debug)]
5064pub struct DirectoryCreateSymlinkResponder {
5065 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5066 tx_id: u32,
5067}
5068
5069impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5073 fn drop(&mut self) {
5074 self.control_handle.shutdown();
5075 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5077 }
5078}
5079
5080impl fdomain_client::fidl::Responder for DirectoryCreateSymlinkResponder {
5081 type ControlHandle = DirectoryControlHandle;
5082
5083 fn control_handle(&self) -> &DirectoryControlHandle {
5084 &self.control_handle
5085 }
5086
5087 fn drop_without_shutdown(mut self) {
5088 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5090 std::mem::forget(self);
5092 }
5093}
5094
5095impl DirectoryCreateSymlinkResponder {
5096 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5100 let _result = self.send_raw(result);
5101 if _result.is_err() {
5102 self.control_handle.shutdown();
5103 }
5104 self.drop_without_shutdown();
5105 _result
5106 }
5107
5108 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5110 let _result = self.send_raw(result);
5111 self.drop_without_shutdown();
5112 _result
5113 }
5114
5115 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5116 self.control_handle
5117 .inner
5118 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5119 result,
5120 self.tx_id,
5121 0x21ce0f19ec043889,
5122 fidl::encoding::DynamicFlags::empty(),
5123 )
5124 }
5125}
5126
5127#[must_use = "FIDL methods require a response to be sent"]
5128#[derive(Debug)]
5129pub struct DirectoryWatchResponder {
5130 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5131 tx_id: u32,
5132}
5133
5134impl std::ops::Drop for DirectoryWatchResponder {
5138 fn drop(&mut self) {
5139 self.control_handle.shutdown();
5140 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5142 }
5143}
5144
5145impl fdomain_client::fidl::Responder for DirectoryWatchResponder {
5146 type ControlHandle = DirectoryControlHandle;
5147
5148 fn control_handle(&self) -> &DirectoryControlHandle {
5149 &self.control_handle
5150 }
5151
5152 fn drop_without_shutdown(mut self) {
5153 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5155 std::mem::forget(self);
5157 }
5158}
5159
5160impl DirectoryWatchResponder {
5161 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5165 let _result = self.send_raw(s);
5166 if _result.is_err() {
5167 self.control_handle.shutdown();
5168 }
5169 self.drop_without_shutdown();
5170 _result
5171 }
5172
5173 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5175 let _result = self.send_raw(s);
5176 self.drop_without_shutdown();
5177 _result
5178 }
5179
5180 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5181 self.control_handle.inner.send::<DirectoryWatchResponse>(
5182 (s,),
5183 self.tx_id,
5184 0x5717193a59d66d91,
5185 fidl::encoding::DynamicFlags::empty(),
5186 )
5187 }
5188}
5189
5190#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5191pub struct DirectoryWatcherMarker;
5192
5193impl fdomain_client::fidl::ProtocolMarker for DirectoryWatcherMarker {
5194 type Proxy = DirectoryWatcherProxy;
5195 type RequestStream = DirectoryWatcherRequestStream;
5196
5197 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
5198}
5199
5200pub trait DirectoryWatcherProxyInterface: Send + Sync {}
5201
5202#[derive(Debug, Clone)]
5203pub struct DirectoryWatcherProxy {
5204 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5205}
5206
5207impl fdomain_client::fidl::Proxy for DirectoryWatcherProxy {
5208 type Protocol = DirectoryWatcherMarker;
5209
5210 fn from_channel(inner: fdomain_client::Channel) -> Self {
5211 Self::new(inner)
5212 }
5213
5214 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5215 self.client.into_channel().map_err(|client| Self { client })
5216 }
5217
5218 fn as_channel(&self) -> &fdomain_client::Channel {
5219 self.client.as_channel()
5220 }
5221}
5222
5223impl DirectoryWatcherProxy {
5224 pub fn new(channel: fdomain_client::Channel) -> Self {
5226 let protocol_name =
5227 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5228 Self { client: fidl::client::Client::new(channel, protocol_name) }
5229 }
5230
5231 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
5237 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
5238 }
5239}
5240
5241impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
5242
5243pub struct DirectoryWatcherEventStream {
5244 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5245}
5246
5247impl std::marker::Unpin for DirectoryWatcherEventStream {}
5248
5249impl futures::stream::FusedStream for DirectoryWatcherEventStream {
5250 fn is_terminated(&self) -> bool {
5251 self.event_receiver.is_terminated()
5252 }
5253}
5254
5255impl futures::Stream for DirectoryWatcherEventStream {
5256 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
5257
5258 fn poll_next(
5259 mut self: std::pin::Pin<&mut Self>,
5260 cx: &mut std::task::Context<'_>,
5261 ) -> std::task::Poll<Option<Self::Item>> {
5262 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5263 &mut self.event_receiver,
5264 cx
5265 )?) {
5266 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
5267 None => std::task::Poll::Ready(None),
5268 }
5269 }
5270}
5271
5272#[derive(Debug)]
5273pub enum DirectoryWatcherEvent {}
5274
5275impl DirectoryWatcherEvent {
5276 fn decode(
5278 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5279 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
5280 let (bytes, _handles) = buf.split_mut();
5281 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5282 debug_assert_eq!(tx_header.tx_id, 0);
5283 match tx_header.ordinal {
5284 _ => Err(fidl::Error::UnknownOrdinal {
5285 ordinal: tx_header.ordinal,
5286 protocol_name:
5287 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5288 }),
5289 }
5290 }
5291}
5292
5293pub struct DirectoryWatcherRequestStream {
5295 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5296 is_terminated: bool,
5297}
5298
5299impl std::marker::Unpin for DirectoryWatcherRequestStream {}
5300
5301impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
5302 fn is_terminated(&self) -> bool {
5303 self.is_terminated
5304 }
5305}
5306
5307impl fdomain_client::fidl::RequestStream for DirectoryWatcherRequestStream {
5308 type Protocol = DirectoryWatcherMarker;
5309 type ControlHandle = DirectoryWatcherControlHandle;
5310
5311 fn from_channel(channel: fdomain_client::Channel) -> Self {
5312 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5313 }
5314
5315 fn control_handle(&self) -> Self::ControlHandle {
5316 DirectoryWatcherControlHandle { inner: self.inner.clone() }
5317 }
5318
5319 fn into_inner(
5320 self,
5321 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5322 {
5323 (self.inner, self.is_terminated)
5324 }
5325
5326 fn from_inner(
5327 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5328 is_terminated: bool,
5329 ) -> Self {
5330 Self { inner, is_terminated }
5331 }
5332}
5333
5334impl futures::Stream for DirectoryWatcherRequestStream {
5335 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
5336
5337 fn poll_next(
5338 mut self: std::pin::Pin<&mut Self>,
5339 cx: &mut std::task::Context<'_>,
5340 ) -> std::task::Poll<Option<Self::Item>> {
5341 let this = &mut *self;
5342 if this.inner.check_shutdown(cx) {
5343 this.is_terminated = true;
5344 return std::task::Poll::Ready(None);
5345 }
5346 if this.is_terminated {
5347 panic!("polled DirectoryWatcherRequestStream after completion");
5348 }
5349 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5350 |bytes, handles| {
5351 match this.inner.channel().read_etc(cx, bytes, handles) {
5352 std::task::Poll::Ready(Ok(())) => {}
5353 std::task::Poll::Pending => return std::task::Poll::Pending,
5354 std::task::Poll::Ready(Err(None)) => {
5355 this.is_terminated = true;
5356 return std::task::Poll::Ready(None);
5357 }
5358 std::task::Poll::Ready(Err(Some(e))) => {
5359 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5360 e.into(),
5361 ))))
5362 }
5363 }
5364
5365 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5367
5368 std::task::Poll::Ready(Some(match header.ordinal {
5369 _ => Err(fidl::Error::UnknownOrdinal {
5370 ordinal: header.ordinal,
5371 protocol_name: <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5372 }),
5373 }))
5374 },
5375 )
5376 }
5377}
5378
5379#[derive(Debug)]
5397pub enum DirectoryWatcherRequest {}
5398
5399impl DirectoryWatcherRequest {
5400 pub fn method_name(&self) -> &'static str {
5402 match *self {}
5403 }
5404}
5405
5406#[derive(Debug, Clone)]
5407pub struct DirectoryWatcherControlHandle {
5408 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5409}
5410
5411impl fdomain_client::fidl::ControlHandle for DirectoryWatcherControlHandle {
5412 fn shutdown(&self) {
5413 self.inner.shutdown()
5414 }
5415
5416 fn is_closed(&self) -> bool {
5417 self.inner.channel().is_closed()
5418 }
5419 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5420 self.inner.channel().on_closed()
5421 }
5422}
5423
5424impl DirectoryWatcherControlHandle {}
5425
5426#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5427pub struct ExtendedAttributeIteratorMarker;
5428
5429impl fdomain_client::fidl::ProtocolMarker for ExtendedAttributeIteratorMarker {
5430 type Proxy = ExtendedAttributeIteratorProxy;
5431 type RequestStream = ExtendedAttributeIteratorRequestStream;
5432
5433 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
5434}
5435pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
5436
5437pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
5438 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
5439 + Send;
5440 fn r#get_next(&self) -> Self::GetNextResponseFut;
5441}
5442
5443#[derive(Debug, Clone)]
5444pub struct ExtendedAttributeIteratorProxy {
5445 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5446}
5447
5448impl fdomain_client::fidl::Proxy for ExtendedAttributeIteratorProxy {
5449 type Protocol = ExtendedAttributeIteratorMarker;
5450
5451 fn from_channel(inner: fdomain_client::Channel) -> Self {
5452 Self::new(inner)
5453 }
5454
5455 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5456 self.client.into_channel().map_err(|client| Self { client })
5457 }
5458
5459 fn as_channel(&self) -> &fdomain_client::Channel {
5460 self.client.as_channel()
5461 }
5462}
5463
5464impl ExtendedAttributeIteratorProxy {
5465 pub fn new(channel: fdomain_client::Channel) -> Self {
5467 let protocol_name =
5468 <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5469 Self { client: fidl::client::Client::new(channel, protocol_name) }
5470 }
5471
5472 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
5478 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5479 }
5480
5481 pub fn r#get_next(
5485 &self,
5486 ) -> fidl::client::QueryResponseFut<
5487 ExtendedAttributeIteratorGetNextResult,
5488 fdomain_client::fidl::FDomainResourceDialect,
5489 > {
5490 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
5491 }
5492}
5493
5494impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
5495 type GetNextResponseFut = fidl::client::QueryResponseFut<
5496 ExtendedAttributeIteratorGetNextResult,
5497 fdomain_client::fidl::FDomainResourceDialect,
5498 >;
5499 fn r#get_next(&self) -> Self::GetNextResponseFut {
5500 fn _decode(
5501 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5502 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
5503 let _response = fidl::client::decode_transaction_body::<
5504 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
5505 fdomain_client::fidl::FDomainResourceDialect,
5506 0x3ba664a1c2e45a7,
5507 >(_buf?)?;
5508 Ok(_response.map(|x| (x.attributes, x.last)))
5509 }
5510 self.client.send_query_and_decode::<
5511 fidl::encoding::EmptyPayload,
5512 ExtendedAttributeIteratorGetNextResult,
5513 >(
5514 (),
5515 0x3ba664a1c2e45a7,
5516 fidl::encoding::DynamicFlags::empty(),
5517 _decode,
5518 )
5519 }
5520}
5521
5522pub struct ExtendedAttributeIteratorEventStream {
5523 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5524}
5525
5526impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
5527
5528impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
5529 fn is_terminated(&self) -> bool {
5530 self.event_receiver.is_terminated()
5531 }
5532}
5533
5534impl futures::Stream for ExtendedAttributeIteratorEventStream {
5535 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
5536
5537 fn poll_next(
5538 mut self: std::pin::Pin<&mut Self>,
5539 cx: &mut std::task::Context<'_>,
5540 ) -> std::task::Poll<Option<Self::Item>> {
5541 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5542 &mut self.event_receiver,
5543 cx
5544 )?) {
5545 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
5546 None => std::task::Poll::Ready(None),
5547 }
5548 }
5549}
5550
5551#[derive(Debug)]
5552pub enum ExtendedAttributeIteratorEvent {}
5553
5554impl ExtendedAttributeIteratorEvent {
5555 fn decode(
5557 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5558 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
5559 let (bytes, _handles) = buf.split_mut();
5560 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5561 debug_assert_eq!(tx_header.tx_id, 0);
5562 match tx_header.ordinal {
5563 _ => Err(fidl::Error::UnknownOrdinal {
5564 ordinal: tx_header.ordinal,
5565 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5566 })
5567 }
5568 }
5569}
5570
5571pub struct ExtendedAttributeIteratorRequestStream {
5573 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5574 is_terminated: bool,
5575}
5576
5577impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
5578
5579impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
5580 fn is_terminated(&self) -> bool {
5581 self.is_terminated
5582 }
5583}
5584
5585impl fdomain_client::fidl::RequestStream for ExtendedAttributeIteratorRequestStream {
5586 type Protocol = ExtendedAttributeIteratorMarker;
5587 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5588
5589 fn from_channel(channel: fdomain_client::Channel) -> Self {
5590 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5591 }
5592
5593 fn control_handle(&self) -> Self::ControlHandle {
5594 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
5595 }
5596
5597 fn into_inner(
5598 self,
5599 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5600 {
5601 (self.inner, self.is_terminated)
5602 }
5603
5604 fn from_inner(
5605 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5606 is_terminated: bool,
5607 ) -> Self {
5608 Self { inner, is_terminated }
5609 }
5610}
5611
5612impl futures::Stream for ExtendedAttributeIteratorRequestStream {
5613 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
5614
5615 fn poll_next(
5616 mut self: std::pin::Pin<&mut Self>,
5617 cx: &mut std::task::Context<'_>,
5618 ) -> std::task::Poll<Option<Self::Item>> {
5619 let this = &mut *self;
5620 if this.inner.check_shutdown(cx) {
5621 this.is_terminated = true;
5622 return std::task::Poll::Ready(None);
5623 }
5624 if this.is_terminated {
5625 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
5626 }
5627 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5628 |bytes, handles| {
5629 match this.inner.channel().read_etc(cx, bytes, handles) {
5630 std::task::Poll::Ready(Ok(())) => {}
5631 std::task::Poll::Pending => return std::task::Poll::Pending,
5632 std::task::Poll::Ready(Err(None)) => {
5633 this.is_terminated = true;
5634 return std::task::Poll::Ready(None);
5635 }
5636 std::task::Poll::Ready(Err(Some(e))) => {
5637 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5638 e.into(),
5639 ))))
5640 }
5641 }
5642
5643 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5645
5646 std::task::Poll::Ready(Some(match header.ordinal {
5647 0x3ba664a1c2e45a7 => {
5648 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5649 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
5650 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5651 let control_handle = ExtendedAttributeIteratorControlHandle {
5652 inner: this.inner.clone(),
5653 };
5654 Ok(ExtendedAttributeIteratorRequest::GetNext {
5655 responder: ExtendedAttributeIteratorGetNextResponder {
5656 control_handle: std::mem::ManuallyDrop::new(control_handle),
5657 tx_id: header.tx_id,
5658 },
5659 })
5660 }
5661 _ => Err(fidl::Error::UnknownOrdinal {
5662 ordinal: header.ordinal,
5663 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5664 }),
5665 }))
5666 },
5667 )
5668 }
5669}
5670
5671#[derive(Debug)]
5672pub enum ExtendedAttributeIteratorRequest {
5673 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
5677}
5678
5679impl ExtendedAttributeIteratorRequest {
5680 #[allow(irrefutable_let_patterns)]
5681 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
5682 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
5683 Some((responder))
5684 } else {
5685 None
5686 }
5687 }
5688
5689 pub fn method_name(&self) -> &'static str {
5691 match *self {
5692 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
5693 }
5694 }
5695}
5696
5697#[derive(Debug, Clone)]
5698pub struct ExtendedAttributeIteratorControlHandle {
5699 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5700}
5701
5702impl fdomain_client::fidl::ControlHandle for ExtendedAttributeIteratorControlHandle {
5703 fn shutdown(&self) {
5704 self.inner.shutdown()
5705 }
5706
5707 fn is_closed(&self) -> bool {
5708 self.inner.channel().is_closed()
5709 }
5710 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5711 self.inner.channel().on_closed()
5712 }
5713}
5714
5715impl ExtendedAttributeIteratorControlHandle {}
5716
5717#[must_use = "FIDL methods require a response to be sent"]
5718#[derive(Debug)]
5719pub struct ExtendedAttributeIteratorGetNextResponder {
5720 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
5721 tx_id: u32,
5722}
5723
5724impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
5728 fn drop(&mut self) {
5729 self.control_handle.shutdown();
5730 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5732 }
5733}
5734
5735impl fdomain_client::fidl::Responder for ExtendedAttributeIteratorGetNextResponder {
5736 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5737
5738 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
5739 &self.control_handle
5740 }
5741
5742 fn drop_without_shutdown(mut self) {
5743 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5745 std::mem::forget(self);
5747 }
5748}
5749
5750impl ExtendedAttributeIteratorGetNextResponder {
5751 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5755 let _result = self.send_raw(result);
5756 if _result.is_err() {
5757 self.control_handle.shutdown();
5758 }
5759 self.drop_without_shutdown();
5760 _result
5761 }
5762
5763 pub fn send_no_shutdown_on_err(
5765 self,
5766 mut result: Result<(&[Vec<u8>], bool), i32>,
5767 ) -> Result<(), fidl::Error> {
5768 let _result = self.send_raw(result);
5769 self.drop_without_shutdown();
5770 _result
5771 }
5772
5773 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5774 self.control_handle.inner.send::<fidl::encoding::ResultType<
5775 ExtendedAttributeIteratorGetNextResponse,
5776 i32,
5777 >>(
5778 result,
5779 self.tx_id,
5780 0x3ba664a1c2e45a7,
5781 fidl::encoding::DynamicFlags::empty(),
5782 )
5783 }
5784}
5785
5786#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5787pub struct FileMarker;
5788
5789impl fdomain_client::fidl::ProtocolMarker for FileMarker {
5790 type Proxy = FileProxy;
5791 type RequestStream = FileRequestStream;
5792
5793 const DEBUG_NAME: &'static str = "fuchsia.io.File";
5794}
5795impl fdomain_client::fidl::DiscoverableProtocolMarker for FileMarker {}
5796pub type FileSeekResult = Result<u64, i32>;
5797pub type FileReadAtResult = Result<Vec<u8>, i32>;
5798pub type FileWriteAtResult = Result<u64, i32>;
5799pub type FileResizeResult = Result<(), i32>;
5800pub type FileGetBackingMemoryResult = Result<fdomain_client::Vmo, i32>;
5801pub type FileAllocateResult = Result<(), i32>;
5802pub type FileEnableVerityResult = Result<(), i32>;
5803
5804pub trait FileProxyInterface: Send + Sync {
5805 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
5806 + Send;
5807 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
5808 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
5809 + Send;
5810 fn r#link_into(
5811 &self,
5812 dst_parent_token: fdomain_client::Event,
5813 dst: &str,
5814 ) -> Self::LinkIntoResponseFut;
5815 fn r#clone(
5816 &self,
5817 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5818 ) -> Result<(), fidl::Error>;
5819 type CloseResponseFut: std::future::Future<
5820 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
5821 > + Send;
5822 fn r#close(&self) -> Self::CloseResponseFut;
5823 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
5824 fn r#query(&self) -> Self::QueryResponseFut;
5825 fn r#deprecated_clone(
5826 &self,
5827 flags: OpenFlags,
5828 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
5829 ) -> Result<(), fidl::Error>;
5830 type GetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
5831 + Send;
5832 fn r#get_attr(&self) -> Self::GetAttrResponseFut;
5833 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
5834 fn r#deprecated_set_attr(
5835 &self,
5836 flags: NodeAttributeFlags,
5837 attributes: &NodeAttributes,
5838 ) -> Self::DeprecatedSetAttrResponseFut;
5839 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
5840 + Send;
5841 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
5842 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
5843 + Send;
5844 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
5845 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
5846 + Send;
5847 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
5848 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
5849 + Send;
5850 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
5851 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
5852 + Send;
5853 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
5854 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
5855 + Send;
5856 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
5857 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
5858 + Send;
5859 fn r#update_attributes(
5860 &self,
5861 payload: &MutableNodeAttributes,
5862 ) -> Self::UpdateAttributesResponseFut;
5863 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
5864 fn r#sync(&self) -> Self::SyncResponseFut;
5865 fn r#list_extended_attributes(
5866 &self,
5867 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
5868 ) -> Result<(), fidl::Error>;
5869 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
5870 + Send;
5871 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
5872 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
5873 + Send;
5874 fn r#set_extended_attribute(
5875 &self,
5876 name: &[u8],
5877 value: ExtendedAttributeValue,
5878 mode: SetExtendedAttributeMode,
5879 ) -> Self::SetExtendedAttributeResponseFut;
5880 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
5881 + Send;
5882 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
5883 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
5884 + Send;
5885 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
5886 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
5887 + Send;
5888 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
5889 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
5890 fn r#describe(&self) -> Self::DescribeResponseFut;
5891 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
5892 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
5893 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
5894 + Send;
5895 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
5896 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
5897 + Send;
5898 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
5899 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
5900 + Send;
5901 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
5902 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
5903 + Send;
5904 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
5905 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
5906 + Send;
5907 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
5908 -> Self::AllocateResponseFut;
5909 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
5910 + Send;
5911 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
5912}
5913
5914#[derive(Debug, Clone)]
5915pub struct FileProxy {
5916 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5917}
5918
5919impl fdomain_client::fidl::Proxy for FileProxy {
5920 type Protocol = FileMarker;
5921
5922 fn from_channel(inner: fdomain_client::Channel) -> Self {
5923 Self::new(inner)
5924 }
5925
5926 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5927 self.client.into_channel().map_err(|client| Self { client })
5928 }
5929
5930 fn as_channel(&self) -> &fdomain_client::Channel {
5931 self.client.as_channel()
5932 }
5933}
5934
5935impl FileProxy {
5936 pub fn new(channel: fdomain_client::Channel) -> Self {
5938 let protocol_name = <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5939 Self { client: fidl::client::Client::new(channel, protocol_name) }
5940 }
5941
5942 pub fn take_event_stream(&self) -> FileEventStream {
5948 FileEventStream { event_receiver: self.client.take_event_receiver() }
5949 }
5950
5951 pub fn r#advisory_lock(
5975 &self,
5976 mut request: &AdvisoryLockRequest,
5977 ) -> fidl::client::QueryResponseFut<
5978 AdvisoryLockingAdvisoryLockResult,
5979 fdomain_client::fidl::FDomainResourceDialect,
5980 > {
5981 FileProxyInterface::r#advisory_lock(self, request)
5982 }
5983
5984 pub fn r#link_into(
6007 &self,
6008 mut dst_parent_token: fdomain_client::Event,
6009 mut dst: &str,
6010 ) -> fidl::client::QueryResponseFut<
6011 LinkableLinkIntoResult,
6012 fdomain_client::fidl::FDomainResourceDialect,
6013 > {
6014 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
6015 }
6016
6017 pub fn r#clone(
6018 &self,
6019 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6020 ) -> Result<(), fidl::Error> {
6021 FileProxyInterface::r#clone(self, request)
6022 }
6023
6024 pub fn r#close(
6035 &self,
6036 ) -> fidl::client::QueryResponseFut<
6037 fdomain_fuchsia_unknown::CloseableCloseResult,
6038 fdomain_client::fidl::FDomainResourceDialect,
6039 > {
6040 FileProxyInterface::r#close(self)
6041 }
6042
6043 pub fn r#query(
6044 &self,
6045 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
6046 FileProxyInterface::r#query(self)
6047 }
6048
6049 pub fn r#deprecated_clone(
6051 &self,
6052 mut flags: OpenFlags,
6053 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6054 ) -> Result<(), fidl::Error> {
6055 FileProxyInterface::r#deprecated_clone(self, flags, object)
6056 }
6057
6058 pub fn r#get_attr(
6062 &self,
6063 ) -> fidl::client::QueryResponseFut<
6064 (i32, NodeAttributes),
6065 fdomain_client::fidl::FDomainResourceDialect,
6066 > {
6067 FileProxyInterface::r#get_attr(self)
6068 }
6069
6070 pub fn r#deprecated_set_attr(
6072 &self,
6073 mut flags: NodeAttributeFlags,
6074 mut attributes: &NodeAttributes,
6075 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6076 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
6077 }
6078
6079 pub fn r#deprecated_get_flags(
6081 &self,
6082 ) -> fidl::client::QueryResponseFut<
6083 (i32, OpenFlags),
6084 fdomain_client::fidl::FDomainResourceDialect,
6085 > {
6086 FileProxyInterface::r#deprecated_get_flags(self)
6087 }
6088
6089 pub fn r#deprecated_set_flags(
6091 &self,
6092 mut flags: OpenFlags,
6093 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6094 FileProxyInterface::r#deprecated_set_flags(self, flags)
6095 }
6096
6097 pub fn r#get_flags(
6106 &self,
6107 ) -> fidl::client::QueryResponseFut<
6108 NodeGetFlagsResult,
6109 fdomain_client::fidl::FDomainResourceDialect,
6110 > {
6111 FileProxyInterface::r#get_flags(self)
6112 }
6113
6114 pub fn r#set_flags(
6124 &self,
6125 mut flags: Flags,
6126 ) -> fidl::client::QueryResponseFut<
6127 NodeSetFlagsResult,
6128 fdomain_client::fidl::FDomainResourceDialect,
6129 > {
6130 FileProxyInterface::r#set_flags(self, flags)
6131 }
6132
6133 pub fn r#query_filesystem(
6135 &self,
6136 ) -> fidl::client::QueryResponseFut<
6137 (i32, Option<Box<FilesystemInfo>>),
6138 fdomain_client::fidl::FDomainResourceDialect,
6139 > {
6140 FileProxyInterface::r#query_filesystem(self)
6141 }
6142
6143 pub fn r#get_attributes(
6157 &self,
6158 mut query: NodeAttributesQuery,
6159 ) -> fidl::client::QueryResponseFut<
6160 NodeGetAttributesResult,
6161 fdomain_client::fidl::FDomainResourceDialect,
6162 > {
6163 FileProxyInterface::r#get_attributes(self, query)
6164 }
6165
6166 pub fn r#update_attributes(
6175 &self,
6176 mut payload: &MutableNodeAttributes,
6177 ) -> fidl::client::QueryResponseFut<
6178 NodeUpdateAttributesResult,
6179 fdomain_client::fidl::FDomainResourceDialect,
6180 > {
6181 FileProxyInterface::r#update_attributes(self, payload)
6182 }
6183
6184 pub fn r#sync(
6194 &self,
6195 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
6196 {
6197 FileProxyInterface::r#sync(self)
6198 }
6199
6200 pub fn r#list_extended_attributes(
6209 &self,
6210 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6211 ) -> Result<(), fidl::Error> {
6212 FileProxyInterface::r#list_extended_attributes(self, iterator)
6213 }
6214
6215 pub fn r#get_extended_attribute(
6222 &self,
6223 mut name: &[u8],
6224 ) -> fidl::client::QueryResponseFut<
6225 NodeGetExtendedAttributeResult,
6226 fdomain_client::fidl::FDomainResourceDialect,
6227 > {
6228 FileProxyInterface::r#get_extended_attribute(self, name)
6229 }
6230
6231 pub fn r#set_extended_attribute(
6239 &self,
6240 mut name: &[u8],
6241 mut value: ExtendedAttributeValue,
6242 mut mode: SetExtendedAttributeMode,
6243 ) -> fidl::client::QueryResponseFut<
6244 NodeSetExtendedAttributeResult,
6245 fdomain_client::fidl::FDomainResourceDialect,
6246 > {
6247 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
6248 }
6249
6250 pub fn r#remove_extended_attribute(
6256 &self,
6257 mut name: &[u8],
6258 ) -> fidl::client::QueryResponseFut<
6259 NodeRemoveExtendedAttributeResult,
6260 fdomain_client::fidl::FDomainResourceDialect,
6261 > {
6262 FileProxyInterface::r#remove_extended_attribute(self, name)
6263 }
6264
6265 pub fn r#read(
6284 &self,
6285 mut count: u64,
6286 ) -> fidl::client::QueryResponseFut<
6287 ReadableReadResult,
6288 fdomain_client::fidl::FDomainResourceDialect,
6289 > {
6290 FileProxyInterface::r#read(self, count)
6291 }
6292
6293 pub fn r#write(
6317 &self,
6318 mut data: &[u8],
6319 ) -> fidl::client::QueryResponseFut<
6320 WritableWriteResult,
6321 fdomain_client::fidl::FDomainResourceDialect,
6322 > {
6323 FileProxyInterface::r#write(self, data)
6324 }
6325
6326 pub fn r#describe(
6327 &self,
6328 ) -> fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
6329 {
6330 FileProxyInterface::r#describe(self)
6331 }
6332
6333 pub fn r#seek(
6343 &self,
6344 mut origin: SeekOrigin,
6345 mut offset: i64,
6346 ) -> fidl::client::QueryResponseFut<FileSeekResult, fdomain_client::fidl::FDomainResourceDialect>
6347 {
6348 FileProxyInterface::r#seek(self, origin, offset)
6349 }
6350
6351 pub fn r#read_at(
6369 &self,
6370 mut count: u64,
6371 mut offset: u64,
6372 ) -> fidl::client::QueryResponseFut<
6373 FileReadAtResult,
6374 fdomain_client::fidl::FDomainResourceDialect,
6375 > {
6376 FileProxyInterface::r#read_at(self, count, offset)
6377 }
6378
6379 pub fn r#write_at(
6401 &self,
6402 mut data: &[u8],
6403 mut offset: u64,
6404 ) -> fidl::client::QueryResponseFut<
6405 FileWriteAtResult,
6406 fdomain_client::fidl::FDomainResourceDialect,
6407 > {
6408 FileProxyInterface::r#write_at(self, data, offset)
6409 }
6410
6411 pub fn r#resize(
6420 &self,
6421 mut length: u64,
6422 ) -> fidl::client::QueryResponseFut<
6423 FileResizeResult,
6424 fdomain_client::fidl::FDomainResourceDialect,
6425 > {
6426 FileProxyInterface::r#resize(self, length)
6427 }
6428
6429 pub fn r#get_backing_memory(
6450 &self,
6451 mut flags: VmoFlags,
6452 ) -> fidl::client::QueryResponseFut<
6453 FileGetBackingMemoryResult,
6454 fdomain_client::fidl::FDomainResourceDialect,
6455 > {
6456 FileProxyInterface::r#get_backing_memory(self, flags)
6457 }
6458
6459 pub fn r#allocate(
6461 &self,
6462 mut offset: u64,
6463 mut length: u64,
6464 mut mode: AllocateMode,
6465 ) -> fidl::client::QueryResponseFut<
6466 FileAllocateResult,
6467 fdomain_client::fidl::FDomainResourceDialect,
6468 > {
6469 FileProxyInterface::r#allocate(self, offset, length, mode)
6470 }
6471
6472 pub fn r#enable_verity(
6484 &self,
6485 mut options: &VerificationOptions,
6486 ) -> fidl::client::QueryResponseFut<
6487 FileEnableVerityResult,
6488 fdomain_client::fidl::FDomainResourceDialect,
6489 > {
6490 FileProxyInterface::r#enable_verity(self, options)
6491 }
6492}
6493
6494impl FileProxyInterface for FileProxy {
6495 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
6496 AdvisoryLockingAdvisoryLockResult,
6497 fdomain_client::fidl::FDomainResourceDialect,
6498 >;
6499 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
6500 fn _decode(
6501 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6502 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6503 let _response = fidl::client::decode_transaction_body::<
6504 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6505 fdomain_client::fidl::FDomainResourceDialect,
6506 0x6ee9c0ad53ec87aa,
6507 >(_buf?)?;
6508 Ok(_response.map(|x| x))
6509 }
6510 self.client.send_query_and_decode::<
6511 AdvisoryLockingAdvisoryLockRequest,
6512 AdvisoryLockingAdvisoryLockResult,
6513 >(
6514 (request,),
6515 0x6ee9c0ad53ec87aa,
6516 fidl::encoding::DynamicFlags::empty(),
6517 _decode,
6518 )
6519 }
6520
6521 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
6522 LinkableLinkIntoResult,
6523 fdomain_client::fidl::FDomainResourceDialect,
6524 >;
6525 fn r#link_into(
6526 &self,
6527 mut dst_parent_token: fdomain_client::Event,
6528 mut dst: &str,
6529 ) -> Self::LinkIntoResponseFut {
6530 fn _decode(
6531 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6532 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
6533 let _response = fidl::client::decode_transaction_body::<
6534 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6535 fdomain_client::fidl::FDomainResourceDialect,
6536 0x54f3949246a03e74,
6537 >(_buf?)?;
6538 Ok(_response.map(|x| x))
6539 }
6540 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
6541 (dst_parent_token, dst),
6542 0x54f3949246a03e74,
6543 fidl::encoding::DynamicFlags::empty(),
6544 _decode,
6545 )
6546 }
6547
6548 fn r#clone(
6549 &self,
6550 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6551 ) -> Result<(), fidl::Error> {
6552 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
6553 (request,),
6554 0x20d8a7aba2168a79,
6555 fidl::encoding::DynamicFlags::empty(),
6556 )
6557 }
6558
6559 type CloseResponseFut = fidl::client::QueryResponseFut<
6560 fdomain_fuchsia_unknown::CloseableCloseResult,
6561 fdomain_client::fidl::FDomainResourceDialect,
6562 >;
6563 fn r#close(&self) -> Self::CloseResponseFut {
6564 fn _decode(
6565 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6566 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
6567 let _response = fidl::client::decode_transaction_body::<
6568 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6569 fdomain_client::fidl::FDomainResourceDialect,
6570 0x5ac5d459ad7f657e,
6571 >(_buf?)?;
6572 Ok(_response.map(|x| x))
6573 }
6574 self.client.send_query_and_decode::<
6575 fidl::encoding::EmptyPayload,
6576 fdomain_fuchsia_unknown::CloseableCloseResult,
6577 >(
6578 (),
6579 0x5ac5d459ad7f657e,
6580 fidl::encoding::DynamicFlags::empty(),
6581 _decode,
6582 )
6583 }
6584
6585 type QueryResponseFut =
6586 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
6587 fn r#query(&self) -> Self::QueryResponseFut {
6588 fn _decode(
6589 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6590 ) -> Result<Vec<u8>, fidl::Error> {
6591 let _response = fidl::client::decode_transaction_body::<
6592 fdomain_fuchsia_unknown::QueryableQueryResponse,
6593 fdomain_client::fidl::FDomainResourceDialect,
6594 0x2658edee9decfc06,
6595 >(_buf?)?;
6596 Ok(_response.protocol)
6597 }
6598 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
6599 (),
6600 0x2658edee9decfc06,
6601 fidl::encoding::DynamicFlags::empty(),
6602 _decode,
6603 )
6604 }
6605
6606 fn r#deprecated_clone(
6607 &self,
6608 mut flags: OpenFlags,
6609 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6610 ) -> Result<(), fidl::Error> {
6611 self.client.send::<NodeDeprecatedCloneRequest>(
6612 (flags, object),
6613 0x5a61678f293ce16f,
6614 fidl::encoding::DynamicFlags::FLEXIBLE,
6615 )
6616 }
6617
6618 type GetAttrResponseFut = fidl::client::QueryResponseFut<
6619 (i32, NodeAttributes),
6620 fdomain_client::fidl::FDomainResourceDialect,
6621 >;
6622 fn r#get_attr(&self) -> Self::GetAttrResponseFut {
6623 fn _decode(
6624 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6625 ) -> Result<(i32, NodeAttributes), fidl::Error> {
6626 let _response = fidl::client::decode_transaction_body::<
6627 NodeGetAttrResponse,
6628 fdomain_client::fidl::FDomainResourceDialect,
6629 0x78985e216314dafd,
6630 >(_buf?)?;
6631 Ok((_response.s, _response.attributes))
6632 }
6633 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
6634 (),
6635 0x78985e216314dafd,
6636 fidl::encoding::DynamicFlags::empty(),
6637 _decode,
6638 )
6639 }
6640
6641 type DeprecatedSetAttrResponseFut =
6642 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6643 fn r#deprecated_set_attr(
6644 &self,
6645 mut flags: NodeAttributeFlags,
6646 mut attributes: &NodeAttributes,
6647 ) -> Self::DeprecatedSetAttrResponseFut {
6648 fn _decode(
6649 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6650 ) -> Result<i32, fidl::Error> {
6651 let _response = fidl::client::decode_transaction_body::<
6652 NodeDeprecatedSetAttrResponse,
6653 fdomain_client::fidl::FDomainResourceDialect,
6654 0x4186c0f40d938f46,
6655 >(_buf?)?;
6656 Ok(_response.s)
6657 }
6658 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
6659 (flags, attributes),
6660 0x4186c0f40d938f46,
6661 fidl::encoding::DynamicFlags::empty(),
6662 _decode,
6663 )
6664 }
6665
6666 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
6667 (i32, OpenFlags),
6668 fdomain_client::fidl::FDomainResourceDialect,
6669 >;
6670 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
6671 fn _decode(
6672 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6673 ) -> Result<(i32, OpenFlags), fidl::Error> {
6674 let _response = fidl::client::decode_transaction_body::<
6675 NodeDeprecatedGetFlagsResponse,
6676 fdomain_client::fidl::FDomainResourceDialect,
6677 0x5b88fffb8eda3aa1,
6678 >(_buf?)?;
6679 Ok((_response.s, _response.flags))
6680 }
6681 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
6682 (),
6683 0x5b88fffb8eda3aa1,
6684 fidl::encoding::DynamicFlags::empty(),
6685 _decode,
6686 )
6687 }
6688
6689 type DeprecatedSetFlagsResponseFut =
6690 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6691 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
6692 fn _decode(
6693 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6694 ) -> Result<i32, fidl::Error> {
6695 let _response = fidl::client::decode_transaction_body::<
6696 NodeDeprecatedSetFlagsResponse,
6697 fdomain_client::fidl::FDomainResourceDialect,
6698 0x5295b76c71fde733,
6699 >(_buf?)?;
6700 Ok(_response.s)
6701 }
6702 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
6703 (flags,),
6704 0x5295b76c71fde733,
6705 fidl::encoding::DynamicFlags::empty(),
6706 _decode,
6707 )
6708 }
6709
6710 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
6711 NodeGetFlagsResult,
6712 fdomain_client::fidl::FDomainResourceDialect,
6713 >;
6714 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
6715 fn _decode(
6716 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6717 ) -> Result<NodeGetFlagsResult, fidl::Error> {
6718 let _response = fidl::client::decode_transaction_body::<
6719 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
6720 fdomain_client::fidl::FDomainResourceDialect,
6721 0x176eb318f64ec23,
6722 >(_buf?)?
6723 .into_result_fdomain::<FileMarker>("get_flags")?;
6724 Ok(_response.map(|x| x.flags))
6725 }
6726 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
6727 (),
6728 0x176eb318f64ec23,
6729 fidl::encoding::DynamicFlags::FLEXIBLE,
6730 _decode,
6731 )
6732 }
6733
6734 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
6735 NodeSetFlagsResult,
6736 fdomain_client::fidl::FDomainResourceDialect,
6737 >;
6738 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
6739 fn _decode(
6740 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6741 ) -> Result<NodeSetFlagsResult, fidl::Error> {
6742 let _response = fidl::client::decode_transaction_body::<
6743 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
6744 fdomain_client::fidl::FDomainResourceDialect,
6745 0x55a8028685791ea8,
6746 >(_buf?)?
6747 .into_result_fdomain::<FileMarker>("set_flags")?;
6748 Ok(_response.map(|x| x))
6749 }
6750 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
6751 (flags,),
6752 0x55a8028685791ea8,
6753 fidl::encoding::DynamicFlags::FLEXIBLE,
6754 _decode,
6755 )
6756 }
6757
6758 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
6759 (i32, Option<Box<FilesystemInfo>>),
6760 fdomain_client::fidl::FDomainResourceDialect,
6761 >;
6762 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
6763 fn _decode(
6764 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6765 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
6766 let _response = fidl::client::decode_transaction_body::<
6767 NodeQueryFilesystemResponse,
6768 fdomain_client::fidl::FDomainResourceDialect,
6769 0x6f344a1c6b0a0610,
6770 >(_buf?)?;
6771 Ok((_response.s, _response.info))
6772 }
6773 self.client.send_query_and_decode::<
6774 fidl::encoding::EmptyPayload,
6775 (i32, Option<Box<FilesystemInfo>>),
6776 >(
6777 (),
6778 0x6f344a1c6b0a0610,
6779 fidl::encoding::DynamicFlags::empty(),
6780 _decode,
6781 )
6782 }
6783
6784 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
6785 NodeGetAttributesResult,
6786 fdomain_client::fidl::FDomainResourceDialect,
6787 >;
6788 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
6789 fn _decode(
6790 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6791 ) -> Result<NodeGetAttributesResult, fidl::Error> {
6792 let _response = fidl::client::decode_transaction_body::<
6793 fidl::encoding::ResultType<NodeAttributes2, i32>,
6794 fdomain_client::fidl::FDomainResourceDialect,
6795 0x3d4396a638ea053b,
6796 >(_buf?)?;
6797 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
6798 }
6799 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
6800 (query,),
6801 0x3d4396a638ea053b,
6802 fidl::encoding::DynamicFlags::empty(),
6803 _decode,
6804 )
6805 }
6806
6807 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
6808 NodeUpdateAttributesResult,
6809 fdomain_client::fidl::FDomainResourceDialect,
6810 >;
6811 fn r#update_attributes(
6812 &self,
6813 mut payload: &MutableNodeAttributes,
6814 ) -> Self::UpdateAttributesResponseFut {
6815 fn _decode(
6816 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6817 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
6818 let _response = fidl::client::decode_transaction_body::<
6819 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6820 fdomain_client::fidl::FDomainResourceDialect,
6821 0x3308c1da5a89bf08,
6822 >(_buf?)?;
6823 Ok(_response.map(|x| x))
6824 }
6825 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
6826 payload,
6827 0x3308c1da5a89bf08,
6828 fidl::encoding::DynamicFlags::empty(),
6829 _decode,
6830 )
6831 }
6832
6833 type SyncResponseFut = fidl::client::QueryResponseFut<
6834 NodeSyncResult,
6835 fdomain_client::fidl::FDomainResourceDialect,
6836 >;
6837 fn r#sync(&self) -> Self::SyncResponseFut {
6838 fn _decode(
6839 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6840 ) -> Result<NodeSyncResult, fidl::Error> {
6841 let _response = fidl::client::decode_transaction_body::<
6842 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6843 fdomain_client::fidl::FDomainResourceDialect,
6844 0x2c5c27ca0ab5dc49,
6845 >(_buf?)?;
6846 Ok(_response.map(|x| x))
6847 }
6848 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
6849 (),
6850 0x2c5c27ca0ab5dc49,
6851 fidl::encoding::DynamicFlags::empty(),
6852 _decode,
6853 )
6854 }
6855
6856 fn r#list_extended_attributes(
6857 &self,
6858 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6859 ) -> Result<(), fidl::Error> {
6860 self.client.send::<NodeListExtendedAttributesRequest>(
6861 (iterator,),
6862 0x4b61033de007fcd0,
6863 fidl::encoding::DynamicFlags::empty(),
6864 )
6865 }
6866
6867 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6868 NodeGetExtendedAttributeResult,
6869 fdomain_client::fidl::FDomainResourceDialect,
6870 >;
6871 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
6872 fn _decode(
6873 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6874 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
6875 let _response = fidl::client::decode_transaction_body::<
6876 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
6877 fdomain_client::fidl::FDomainResourceDialect,
6878 0x45ffa3ccfdeb76db,
6879 >(_buf?)?;
6880 Ok(_response.map(|x| x))
6881 }
6882 self.client.send_query_and_decode::<
6883 NodeGetExtendedAttributeRequest,
6884 NodeGetExtendedAttributeResult,
6885 >(
6886 (name,),
6887 0x45ffa3ccfdeb76db,
6888 fidl::encoding::DynamicFlags::empty(),
6889 _decode,
6890 )
6891 }
6892
6893 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6894 NodeSetExtendedAttributeResult,
6895 fdomain_client::fidl::FDomainResourceDialect,
6896 >;
6897 fn r#set_extended_attribute(
6898 &self,
6899 mut name: &[u8],
6900 mut value: ExtendedAttributeValue,
6901 mut mode: SetExtendedAttributeMode,
6902 ) -> Self::SetExtendedAttributeResponseFut {
6903 fn _decode(
6904 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6905 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
6906 let _response = fidl::client::decode_transaction_body::<
6907 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6908 fdomain_client::fidl::FDomainResourceDialect,
6909 0x4a951362f681f23c,
6910 >(_buf?)?;
6911 Ok(_response.map(|x| x))
6912 }
6913 self.client.send_query_and_decode::<
6914 NodeSetExtendedAttributeRequest,
6915 NodeSetExtendedAttributeResult,
6916 >(
6917 (name, &mut value, mode,),
6918 0x4a951362f681f23c,
6919 fidl::encoding::DynamicFlags::empty(),
6920 _decode,
6921 )
6922 }
6923
6924 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6925 NodeRemoveExtendedAttributeResult,
6926 fdomain_client::fidl::FDomainResourceDialect,
6927 >;
6928 fn r#remove_extended_attribute(
6929 &self,
6930 mut name: &[u8],
6931 ) -> Self::RemoveExtendedAttributeResponseFut {
6932 fn _decode(
6933 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6934 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
6935 let _response = fidl::client::decode_transaction_body::<
6936 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6937 fdomain_client::fidl::FDomainResourceDialect,
6938 0x7a0b9f3a9bf9032d,
6939 >(_buf?)?;
6940 Ok(_response.map(|x| x))
6941 }
6942 self.client.send_query_and_decode::<
6943 NodeRemoveExtendedAttributeRequest,
6944 NodeRemoveExtendedAttributeResult,
6945 >(
6946 (name,),
6947 0x7a0b9f3a9bf9032d,
6948 fidl::encoding::DynamicFlags::empty(),
6949 _decode,
6950 )
6951 }
6952
6953 type ReadResponseFut = fidl::client::QueryResponseFut<
6954 ReadableReadResult,
6955 fdomain_client::fidl::FDomainResourceDialect,
6956 >;
6957 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
6958 fn _decode(
6959 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6960 ) -> Result<ReadableReadResult, fidl::Error> {
6961 let _response = fidl::client::decode_transaction_body::<
6962 fidl::encoding::ResultType<ReadableReadResponse, i32>,
6963 fdomain_client::fidl::FDomainResourceDialect,
6964 0x57e419a298c8ede,
6965 >(_buf?)?;
6966 Ok(_response.map(|x| x.data))
6967 }
6968 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
6969 (count,),
6970 0x57e419a298c8ede,
6971 fidl::encoding::DynamicFlags::empty(),
6972 _decode,
6973 )
6974 }
6975
6976 type WriteResponseFut = fidl::client::QueryResponseFut<
6977 WritableWriteResult,
6978 fdomain_client::fidl::FDomainResourceDialect,
6979 >;
6980 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
6981 fn _decode(
6982 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6983 ) -> Result<WritableWriteResult, fidl::Error> {
6984 let _response = fidl::client::decode_transaction_body::<
6985 fidl::encoding::ResultType<WritableWriteResponse, i32>,
6986 fdomain_client::fidl::FDomainResourceDialect,
6987 0x6a31437832469f82,
6988 >(_buf?)?;
6989 Ok(_response.map(|x| x.actual_count))
6990 }
6991 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
6992 (data,),
6993 0x6a31437832469f82,
6994 fidl::encoding::DynamicFlags::empty(),
6995 _decode,
6996 )
6997 }
6998
6999 type DescribeResponseFut =
7000 fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>;
7001 fn r#describe(&self) -> Self::DescribeResponseFut {
7002 fn _decode(
7003 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7004 ) -> Result<FileInfo, fidl::Error> {
7005 let _response = fidl::client::decode_transaction_body::<
7006 FileInfo,
7007 fdomain_client::fidl::FDomainResourceDialect,
7008 0x68b5ac00c62906bc,
7009 >(_buf?)?;
7010 Ok(_response)
7011 }
7012 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
7013 (),
7014 0x68b5ac00c62906bc,
7015 fidl::encoding::DynamicFlags::empty(),
7016 _decode,
7017 )
7018 }
7019
7020 type SeekResponseFut = fidl::client::QueryResponseFut<
7021 FileSeekResult,
7022 fdomain_client::fidl::FDomainResourceDialect,
7023 >;
7024 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
7025 fn _decode(
7026 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7027 ) -> Result<FileSeekResult, fidl::Error> {
7028 let _response = fidl::client::decode_transaction_body::<
7029 fidl::encoding::ResultType<FileSeekResponse, i32>,
7030 fdomain_client::fidl::FDomainResourceDialect,
7031 0x78079168162c5207,
7032 >(_buf?)?;
7033 Ok(_response.map(|x| x.offset_from_start))
7034 }
7035 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
7036 (origin, offset),
7037 0x78079168162c5207,
7038 fidl::encoding::DynamicFlags::empty(),
7039 _decode,
7040 )
7041 }
7042
7043 type ReadAtResponseFut = fidl::client::QueryResponseFut<
7044 FileReadAtResult,
7045 fdomain_client::fidl::FDomainResourceDialect,
7046 >;
7047 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
7048 fn _decode(
7049 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7050 ) -> Result<FileReadAtResult, fidl::Error> {
7051 let _response = fidl::client::decode_transaction_body::<
7052 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7053 fdomain_client::fidl::FDomainResourceDialect,
7054 0x1607a293a60d723e,
7055 >(_buf?)?;
7056 Ok(_response.map(|x| x.data))
7057 }
7058 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
7059 (count, offset),
7060 0x1607a293a60d723e,
7061 fidl::encoding::DynamicFlags::empty(),
7062 _decode,
7063 )
7064 }
7065
7066 type WriteAtResponseFut = fidl::client::QueryResponseFut<
7067 FileWriteAtResult,
7068 fdomain_client::fidl::FDomainResourceDialect,
7069 >;
7070 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
7071 fn _decode(
7072 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7073 ) -> Result<FileWriteAtResult, fidl::Error> {
7074 let _response = fidl::client::decode_transaction_body::<
7075 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7076 fdomain_client::fidl::FDomainResourceDialect,
7077 0x793eefc0045e792b,
7078 >(_buf?)?;
7079 Ok(_response.map(|x| x.actual_count))
7080 }
7081 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
7082 (data, offset),
7083 0x793eefc0045e792b,
7084 fidl::encoding::DynamicFlags::empty(),
7085 _decode,
7086 )
7087 }
7088
7089 type ResizeResponseFut = fidl::client::QueryResponseFut<
7090 FileResizeResult,
7091 fdomain_client::fidl::FDomainResourceDialect,
7092 >;
7093 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
7094 fn _decode(
7095 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7096 ) -> Result<FileResizeResult, fidl::Error> {
7097 let _response = fidl::client::decode_transaction_body::<
7098 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7099 fdomain_client::fidl::FDomainResourceDialect,
7100 0x2b80825f0535743a,
7101 >(_buf?)?;
7102 Ok(_response.map(|x| x))
7103 }
7104 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
7105 (length,),
7106 0x2b80825f0535743a,
7107 fidl::encoding::DynamicFlags::empty(),
7108 _decode,
7109 )
7110 }
7111
7112 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
7113 FileGetBackingMemoryResult,
7114 fdomain_client::fidl::FDomainResourceDialect,
7115 >;
7116 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
7117 fn _decode(
7118 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7119 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7120 let _response = fidl::client::decode_transaction_body::<
7121 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7122 fdomain_client::fidl::FDomainResourceDialect,
7123 0xa6a9e654cbf62b,
7124 >(_buf?)?;
7125 Ok(_response.map(|x| x.vmo))
7126 }
7127 self.client
7128 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
7129 (flags,),
7130 0xa6a9e654cbf62b,
7131 fidl::encoding::DynamicFlags::empty(),
7132 _decode,
7133 )
7134 }
7135
7136 type AllocateResponseFut = fidl::client::QueryResponseFut<
7137 FileAllocateResult,
7138 fdomain_client::fidl::FDomainResourceDialect,
7139 >;
7140 fn r#allocate(
7141 &self,
7142 mut offset: u64,
7143 mut length: u64,
7144 mut mode: AllocateMode,
7145 ) -> Self::AllocateResponseFut {
7146 fn _decode(
7147 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7148 ) -> Result<FileAllocateResult, fidl::Error> {
7149 let _response = fidl::client::decode_transaction_body::<
7150 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7151 fdomain_client::fidl::FDomainResourceDialect,
7152 0x77fa0c330b57fd2e,
7153 >(_buf?)?
7154 .into_result_fdomain::<FileMarker>("allocate")?;
7155 Ok(_response.map(|x| x))
7156 }
7157 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
7158 (offset, length, mode),
7159 0x77fa0c330b57fd2e,
7160 fidl::encoding::DynamicFlags::FLEXIBLE,
7161 _decode,
7162 )
7163 }
7164
7165 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
7166 FileEnableVerityResult,
7167 fdomain_client::fidl::FDomainResourceDialect,
7168 >;
7169 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
7170 fn _decode(
7171 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7172 ) -> Result<FileEnableVerityResult, fidl::Error> {
7173 let _response = fidl::client::decode_transaction_body::<
7174 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7175 fdomain_client::fidl::FDomainResourceDialect,
7176 0x2c421ec3faaeb8bb,
7177 >(_buf?)?
7178 .into_result_fdomain::<FileMarker>("enable_verity")?;
7179 Ok(_response.map(|x| x))
7180 }
7181 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
7182 (options,),
7183 0x2c421ec3faaeb8bb,
7184 fidl::encoding::DynamicFlags::FLEXIBLE,
7185 _decode,
7186 )
7187 }
7188}
7189
7190pub struct FileEventStream {
7191 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7192}
7193
7194impl std::marker::Unpin for FileEventStream {}
7195
7196impl futures::stream::FusedStream for FileEventStream {
7197 fn is_terminated(&self) -> bool {
7198 self.event_receiver.is_terminated()
7199 }
7200}
7201
7202impl futures::Stream for FileEventStream {
7203 type Item = Result<FileEvent, fidl::Error>;
7204
7205 fn poll_next(
7206 mut self: std::pin::Pin<&mut Self>,
7207 cx: &mut std::task::Context<'_>,
7208 ) -> std::task::Poll<Option<Self::Item>> {
7209 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7210 &mut self.event_receiver,
7211 cx
7212 )?) {
7213 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
7214 None => std::task::Poll::Ready(None),
7215 }
7216 }
7217}
7218
7219#[derive(Debug)]
7220pub enum FileEvent {
7221 OnOpen_ {
7222 s: i32,
7223 info: Option<Box<NodeInfoDeprecated>>,
7224 },
7225 OnRepresentation {
7226 payload: Representation,
7227 },
7228 #[non_exhaustive]
7229 _UnknownEvent {
7230 ordinal: u64,
7232 },
7233}
7234
7235impl FileEvent {
7236 #[allow(irrefutable_let_patterns)]
7237 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
7238 if let FileEvent::OnOpen_ { s, info } = self {
7239 Some((s, info))
7240 } else {
7241 None
7242 }
7243 }
7244 #[allow(irrefutable_let_patterns)]
7245 pub fn into_on_representation(self) -> Option<Representation> {
7246 if let FileEvent::OnRepresentation { payload } = self {
7247 Some((payload))
7248 } else {
7249 None
7250 }
7251 }
7252
7253 fn decode(
7255 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7256 ) -> Result<FileEvent, fidl::Error> {
7257 let (bytes, _handles) = buf.split_mut();
7258 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7259 debug_assert_eq!(tx_header.tx_id, 0);
7260 match tx_header.ordinal {
7261 0x7fc7bbb1dbfd1972 => {
7262 let mut out = fidl::new_empty!(
7263 NodeOnOpenRequest,
7264 fdomain_client::fidl::FDomainResourceDialect
7265 );
7266 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
7267 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
7268 }
7269 0x5cb40567d80a510c => {
7270 let mut out =
7271 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
7272 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
7273 Ok((FileEvent::OnRepresentation { payload: out }))
7274 }
7275 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7276 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7277 }
7278 _ => Err(fidl::Error::UnknownOrdinal {
7279 ordinal: tx_header.ordinal,
7280 protocol_name: <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7281 }),
7282 }
7283 }
7284}
7285
7286pub struct FileRequestStream {
7288 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7289 is_terminated: bool,
7290}
7291
7292impl std::marker::Unpin for FileRequestStream {}
7293
7294impl futures::stream::FusedStream for FileRequestStream {
7295 fn is_terminated(&self) -> bool {
7296 self.is_terminated
7297 }
7298}
7299
7300impl fdomain_client::fidl::RequestStream for FileRequestStream {
7301 type Protocol = FileMarker;
7302 type ControlHandle = FileControlHandle;
7303
7304 fn from_channel(channel: fdomain_client::Channel) -> Self {
7305 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7306 }
7307
7308 fn control_handle(&self) -> Self::ControlHandle {
7309 FileControlHandle { inner: self.inner.clone() }
7310 }
7311
7312 fn into_inner(
7313 self,
7314 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7315 {
7316 (self.inner, self.is_terminated)
7317 }
7318
7319 fn from_inner(
7320 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7321 is_terminated: bool,
7322 ) -> Self {
7323 Self { inner, is_terminated }
7324 }
7325}
7326
7327impl futures::Stream for FileRequestStream {
7328 type Item = Result<FileRequest, fidl::Error>;
7329
7330 fn poll_next(
7331 mut self: std::pin::Pin<&mut Self>,
7332 cx: &mut std::task::Context<'_>,
7333 ) -> std::task::Poll<Option<Self::Item>> {
7334 let this = &mut *self;
7335 if this.inner.check_shutdown(cx) {
7336 this.is_terminated = true;
7337 return std::task::Poll::Ready(None);
7338 }
7339 if this.is_terminated {
7340 panic!("polled FileRequestStream after completion");
7341 }
7342 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7343 |bytes, handles| {
7344 match this.inner.channel().read_etc(cx, bytes, handles) {
7345 std::task::Poll::Ready(Ok(())) => {}
7346 std::task::Poll::Pending => return std::task::Poll::Pending,
7347 std::task::Poll::Ready(Err(None)) => {
7348 this.is_terminated = true;
7349 return std::task::Poll::Ready(None);
7350 }
7351 std::task::Poll::Ready(Err(Some(e))) => {
7352 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7353 e.into(),
7354 ))))
7355 }
7356 }
7357
7358 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7360
7361 std::task::Poll::Ready(Some(match header.ordinal {
7362 0x6ee9c0ad53ec87aa => {
7363 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7364 let mut req = fidl::new_empty!(
7365 AdvisoryLockingAdvisoryLockRequest,
7366 fdomain_client::fidl::FDomainResourceDialect
7367 );
7368 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
7369 let control_handle = FileControlHandle { inner: this.inner.clone() };
7370 Ok(FileRequest::AdvisoryLock {
7371 request: req.request,
7372
7373 responder: FileAdvisoryLockResponder {
7374 control_handle: std::mem::ManuallyDrop::new(control_handle),
7375 tx_id: header.tx_id,
7376 },
7377 })
7378 }
7379 0x54f3949246a03e74 => {
7380 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7381 let mut req = fidl::new_empty!(
7382 LinkableLinkIntoRequest,
7383 fdomain_client::fidl::FDomainResourceDialect
7384 );
7385 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
7386 let control_handle = FileControlHandle { inner: this.inner.clone() };
7387 Ok(FileRequest::LinkInto {
7388 dst_parent_token: req.dst_parent_token,
7389 dst: req.dst,
7390
7391 responder: FileLinkIntoResponder {
7392 control_handle: std::mem::ManuallyDrop::new(control_handle),
7393 tx_id: header.tx_id,
7394 },
7395 })
7396 }
7397 0x20d8a7aba2168a79 => {
7398 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7399 let mut req = fidl::new_empty!(
7400 fdomain_fuchsia_unknown::CloneableCloneRequest,
7401 fdomain_client::fidl::FDomainResourceDialect
7402 );
7403 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7404 let control_handle = FileControlHandle { inner: this.inner.clone() };
7405 Ok(FileRequest::Clone { request: req.request, control_handle })
7406 }
7407 0x5ac5d459ad7f657e => {
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::Close {
7416 responder: FileCloseResponder {
7417 control_handle: std::mem::ManuallyDrop::new(control_handle),
7418 tx_id: header.tx_id,
7419 },
7420 })
7421 }
7422 0x2658edee9decfc06 => {
7423 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7424 let mut req = fidl::new_empty!(
7425 fidl::encoding::EmptyPayload,
7426 fdomain_client::fidl::FDomainResourceDialect
7427 );
7428 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7429 let control_handle = FileControlHandle { inner: this.inner.clone() };
7430 Ok(FileRequest::Query {
7431 responder: FileQueryResponder {
7432 control_handle: std::mem::ManuallyDrop::new(control_handle),
7433 tx_id: header.tx_id,
7434 },
7435 })
7436 }
7437 0x5a61678f293ce16f => {
7438 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7439 let mut req = fidl::new_empty!(
7440 NodeDeprecatedCloneRequest,
7441 fdomain_client::fidl::FDomainResourceDialect
7442 );
7443 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7444 let control_handle = FileControlHandle { inner: this.inner.clone() };
7445 Ok(FileRequest::DeprecatedClone {
7446 flags: req.flags,
7447 object: req.object,
7448
7449 control_handle,
7450 })
7451 }
7452 0x78985e216314dafd => {
7453 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7454 let mut req = fidl::new_empty!(
7455 fidl::encoding::EmptyPayload,
7456 fdomain_client::fidl::FDomainResourceDialect
7457 );
7458 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7459 let control_handle = FileControlHandle { inner: this.inner.clone() };
7460 Ok(FileRequest::GetAttr {
7461 responder: FileGetAttrResponder {
7462 control_handle: std::mem::ManuallyDrop::new(control_handle),
7463 tx_id: header.tx_id,
7464 },
7465 })
7466 }
7467 0x4186c0f40d938f46 => {
7468 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7469 let mut req = fidl::new_empty!(
7470 NodeDeprecatedSetAttrRequest,
7471 fdomain_client::fidl::FDomainResourceDialect
7472 );
7473 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
7474 let control_handle = FileControlHandle { inner: this.inner.clone() };
7475 Ok(FileRequest::DeprecatedSetAttr {
7476 flags: req.flags,
7477 attributes: req.attributes,
7478
7479 responder: FileDeprecatedSetAttrResponder {
7480 control_handle: std::mem::ManuallyDrop::new(control_handle),
7481 tx_id: header.tx_id,
7482 },
7483 })
7484 }
7485 0x5b88fffb8eda3aa1 => {
7486 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7487 let mut req = fidl::new_empty!(
7488 fidl::encoding::EmptyPayload,
7489 fdomain_client::fidl::FDomainResourceDialect
7490 );
7491 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7492 let control_handle = FileControlHandle { inner: this.inner.clone() };
7493 Ok(FileRequest::DeprecatedGetFlags {
7494 responder: FileDeprecatedGetFlagsResponder {
7495 control_handle: std::mem::ManuallyDrop::new(control_handle),
7496 tx_id: header.tx_id,
7497 },
7498 })
7499 }
7500 0x5295b76c71fde733 => {
7501 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7502 let mut req = fidl::new_empty!(
7503 NodeDeprecatedSetFlagsRequest,
7504 fdomain_client::fidl::FDomainResourceDialect
7505 );
7506 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7507 let control_handle = FileControlHandle { inner: this.inner.clone() };
7508 Ok(FileRequest::DeprecatedSetFlags {
7509 flags: req.flags,
7510
7511 responder: FileDeprecatedSetFlagsResponder {
7512 control_handle: std::mem::ManuallyDrop::new(control_handle),
7513 tx_id: header.tx_id,
7514 },
7515 })
7516 }
7517 0x176eb318f64ec23 => {
7518 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7519 let mut req = fidl::new_empty!(
7520 fidl::encoding::EmptyPayload,
7521 fdomain_client::fidl::FDomainResourceDialect
7522 );
7523 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7524 let control_handle = FileControlHandle { inner: this.inner.clone() };
7525 Ok(FileRequest::GetFlags {
7526 responder: FileGetFlagsResponder {
7527 control_handle: std::mem::ManuallyDrop::new(control_handle),
7528 tx_id: header.tx_id,
7529 },
7530 })
7531 }
7532 0x55a8028685791ea8 => {
7533 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7534 let mut req = fidl::new_empty!(
7535 NodeSetFlagsRequest,
7536 fdomain_client::fidl::FDomainResourceDialect
7537 );
7538 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7539 let control_handle = FileControlHandle { inner: this.inner.clone() };
7540 Ok(FileRequest::SetFlags {
7541 flags: req.flags,
7542
7543 responder: FileSetFlagsResponder {
7544 control_handle: std::mem::ManuallyDrop::new(control_handle),
7545 tx_id: header.tx_id,
7546 },
7547 })
7548 }
7549 0x6f344a1c6b0a0610 => {
7550 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7551 let mut req = fidl::new_empty!(
7552 fidl::encoding::EmptyPayload,
7553 fdomain_client::fidl::FDomainResourceDialect
7554 );
7555 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7556 let control_handle = FileControlHandle { inner: this.inner.clone() };
7557 Ok(FileRequest::QueryFilesystem {
7558 responder: FileQueryFilesystemResponder {
7559 control_handle: std::mem::ManuallyDrop::new(control_handle),
7560 tx_id: header.tx_id,
7561 },
7562 })
7563 }
7564 0x3d4396a638ea053b => {
7565 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7566 let mut req = fidl::new_empty!(
7567 NodeGetAttributesRequest,
7568 fdomain_client::fidl::FDomainResourceDialect
7569 );
7570 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7571 let control_handle = FileControlHandle { inner: this.inner.clone() };
7572 Ok(FileRequest::GetAttributes {
7573 query: req.query,
7574
7575 responder: FileGetAttributesResponder {
7576 control_handle: std::mem::ManuallyDrop::new(control_handle),
7577 tx_id: header.tx_id,
7578 },
7579 })
7580 }
7581 0x3308c1da5a89bf08 => {
7582 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7583 let mut req = fidl::new_empty!(
7584 MutableNodeAttributes,
7585 fdomain_client::fidl::FDomainResourceDialect
7586 );
7587 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
7588 let control_handle = FileControlHandle { inner: this.inner.clone() };
7589 Ok(FileRequest::UpdateAttributes {
7590 payload: req,
7591 responder: FileUpdateAttributesResponder {
7592 control_handle: std::mem::ManuallyDrop::new(control_handle),
7593 tx_id: header.tx_id,
7594 },
7595 })
7596 }
7597 0x2c5c27ca0ab5dc49 => {
7598 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7599 let mut req = fidl::new_empty!(
7600 fidl::encoding::EmptyPayload,
7601 fdomain_client::fidl::FDomainResourceDialect
7602 );
7603 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7604 let control_handle = FileControlHandle { inner: this.inner.clone() };
7605 Ok(FileRequest::Sync {
7606 responder: FileSyncResponder {
7607 control_handle: std::mem::ManuallyDrop::new(control_handle),
7608 tx_id: header.tx_id,
7609 },
7610 })
7611 }
7612 0x4b61033de007fcd0 => {
7613 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7614 let mut req = fidl::new_empty!(
7615 NodeListExtendedAttributesRequest,
7616 fdomain_client::fidl::FDomainResourceDialect
7617 );
7618 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7619 let control_handle = FileControlHandle { inner: this.inner.clone() };
7620 Ok(FileRequest::ListExtendedAttributes {
7621 iterator: req.iterator,
7622
7623 control_handle,
7624 })
7625 }
7626 0x45ffa3ccfdeb76db => {
7627 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7628 let mut req = fidl::new_empty!(
7629 NodeGetExtendedAttributeRequest,
7630 fdomain_client::fidl::FDomainResourceDialect
7631 );
7632 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7633 let control_handle = FileControlHandle { inner: this.inner.clone() };
7634 Ok(FileRequest::GetExtendedAttribute {
7635 name: req.name,
7636
7637 responder: FileGetExtendedAttributeResponder {
7638 control_handle: std::mem::ManuallyDrop::new(control_handle),
7639 tx_id: header.tx_id,
7640 },
7641 })
7642 }
7643 0x4a951362f681f23c => {
7644 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7645 let mut req = fidl::new_empty!(
7646 NodeSetExtendedAttributeRequest,
7647 fdomain_client::fidl::FDomainResourceDialect
7648 );
7649 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7650 let control_handle = FileControlHandle { inner: this.inner.clone() };
7651 Ok(FileRequest::SetExtendedAttribute {
7652 name: req.name,
7653 value: req.value,
7654 mode: req.mode,
7655
7656 responder: FileSetExtendedAttributeResponder {
7657 control_handle: std::mem::ManuallyDrop::new(control_handle),
7658 tx_id: header.tx_id,
7659 },
7660 })
7661 }
7662 0x7a0b9f3a9bf9032d => {
7663 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7664 let mut req = fidl::new_empty!(
7665 NodeRemoveExtendedAttributeRequest,
7666 fdomain_client::fidl::FDomainResourceDialect
7667 );
7668 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7669 let control_handle = FileControlHandle { inner: this.inner.clone() };
7670 Ok(FileRequest::RemoveExtendedAttribute {
7671 name: req.name,
7672
7673 responder: FileRemoveExtendedAttributeResponder {
7674 control_handle: std::mem::ManuallyDrop::new(control_handle),
7675 tx_id: header.tx_id,
7676 },
7677 })
7678 }
7679 0x57e419a298c8ede => {
7680 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7681 let mut req = fidl::new_empty!(
7682 ReadableReadRequest,
7683 fdomain_client::fidl::FDomainResourceDialect
7684 );
7685 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
7686 let control_handle = FileControlHandle { inner: this.inner.clone() };
7687 Ok(FileRequest::Read {
7688 count: req.count,
7689
7690 responder: FileReadResponder {
7691 control_handle: std::mem::ManuallyDrop::new(control_handle),
7692 tx_id: header.tx_id,
7693 },
7694 })
7695 }
7696 0x6a31437832469f82 => {
7697 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7698 let mut req = fidl::new_empty!(
7699 WritableWriteRequest,
7700 fdomain_client::fidl::FDomainResourceDialect
7701 );
7702 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7703 let control_handle = FileControlHandle { inner: this.inner.clone() };
7704 Ok(FileRequest::Write {
7705 data: req.data,
7706
7707 responder: FileWriteResponder {
7708 control_handle: std::mem::ManuallyDrop::new(control_handle),
7709 tx_id: header.tx_id,
7710 },
7711 })
7712 }
7713 0x68b5ac00c62906bc => {
7714 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7715 let mut req = fidl::new_empty!(
7716 fidl::encoding::EmptyPayload,
7717 fdomain_client::fidl::FDomainResourceDialect
7718 );
7719 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7720 let control_handle = FileControlHandle { inner: this.inner.clone() };
7721 Ok(FileRequest::Describe {
7722 responder: FileDescribeResponder {
7723 control_handle: std::mem::ManuallyDrop::new(control_handle),
7724 tx_id: header.tx_id,
7725 },
7726 })
7727 }
7728 0x78079168162c5207 => {
7729 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7730 let mut req = fidl::new_empty!(
7731 FileSeekRequest,
7732 fdomain_client::fidl::FDomainResourceDialect
7733 );
7734 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
7735 let control_handle = FileControlHandle { inner: this.inner.clone() };
7736 Ok(FileRequest::Seek {
7737 origin: req.origin,
7738 offset: req.offset,
7739
7740 responder: FileSeekResponder {
7741 control_handle: std::mem::ManuallyDrop::new(control_handle),
7742 tx_id: header.tx_id,
7743 },
7744 })
7745 }
7746 0x1607a293a60d723e => {
7747 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7748 let mut req = fidl::new_empty!(
7749 FileReadAtRequest,
7750 fdomain_client::fidl::FDomainResourceDialect
7751 );
7752 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
7753 let control_handle = FileControlHandle { inner: this.inner.clone() };
7754 Ok(FileRequest::ReadAt {
7755 count: req.count,
7756 offset: req.offset,
7757
7758 responder: FileReadAtResponder {
7759 control_handle: std::mem::ManuallyDrop::new(control_handle),
7760 tx_id: header.tx_id,
7761 },
7762 })
7763 }
7764 0x793eefc0045e792b => {
7765 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7766 let mut req = fidl::new_empty!(
7767 FileWriteAtRequest,
7768 fdomain_client::fidl::FDomainResourceDialect
7769 );
7770 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
7771 let control_handle = FileControlHandle { inner: this.inner.clone() };
7772 Ok(FileRequest::WriteAt {
7773 data: req.data,
7774 offset: req.offset,
7775
7776 responder: FileWriteAtResponder {
7777 control_handle: std::mem::ManuallyDrop::new(control_handle),
7778 tx_id: header.tx_id,
7779 },
7780 })
7781 }
7782 0x2b80825f0535743a => {
7783 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7784 let mut req = fidl::new_empty!(
7785 FileResizeRequest,
7786 fdomain_client::fidl::FDomainResourceDialect
7787 );
7788 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
7789 let control_handle = FileControlHandle { inner: this.inner.clone() };
7790 Ok(FileRequest::Resize {
7791 length: req.length,
7792
7793 responder: FileResizeResponder {
7794 control_handle: std::mem::ManuallyDrop::new(control_handle),
7795 tx_id: header.tx_id,
7796 },
7797 })
7798 }
7799 0xa6a9e654cbf62b => {
7800 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7801 let mut req = fidl::new_empty!(
7802 FileGetBackingMemoryRequest,
7803 fdomain_client::fidl::FDomainResourceDialect
7804 );
7805 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
7806 let control_handle = FileControlHandle { inner: this.inner.clone() };
7807 Ok(FileRequest::GetBackingMemory {
7808 flags: req.flags,
7809
7810 responder: FileGetBackingMemoryResponder {
7811 control_handle: std::mem::ManuallyDrop::new(control_handle),
7812 tx_id: header.tx_id,
7813 },
7814 })
7815 }
7816 0x77fa0c330b57fd2e => {
7817 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7818 let mut req = fidl::new_empty!(
7819 FileAllocateRequest,
7820 fdomain_client::fidl::FDomainResourceDialect
7821 );
7822 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
7823 let control_handle = FileControlHandle { inner: this.inner.clone() };
7824 Ok(FileRequest::Allocate {
7825 offset: req.offset,
7826 length: req.length,
7827 mode: req.mode,
7828
7829 responder: FileAllocateResponder {
7830 control_handle: std::mem::ManuallyDrop::new(control_handle),
7831 tx_id: header.tx_id,
7832 },
7833 })
7834 }
7835 0x2c421ec3faaeb8bb => {
7836 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7837 let mut req = fidl::new_empty!(
7838 FileEnableVerityRequest,
7839 fdomain_client::fidl::FDomainResourceDialect
7840 );
7841 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
7842 let control_handle = FileControlHandle { inner: this.inner.clone() };
7843 Ok(FileRequest::EnableVerity {
7844 options: req.options,
7845
7846 responder: FileEnableVerityResponder {
7847 control_handle: std::mem::ManuallyDrop::new(control_handle),
7848 tx_id: header.tx_id,
7849 },
7850 })
7851 }
7852 _ if header.tx_id == 0
7853 && header
7854 .dynamic_flags()
7855 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7856 {
7857 Ok(FileRequest::_UnknownMethod {
7858 ordinal: header.ordinal,
7859 control_handle: FileControlHandle { inner: this.inner.clone() },
7860 method_type: fidl::MethodType::OneWay,
7861 })
7862 }
7863 _ if header
7864 .dynamic_flags()
7865 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7866 {
7867 this.inner.send_framework_err(
7868 fidl::encoding::FrameworkErr::UnknownMethod,
7869 header.tx_id,
7870 header.ordinal,
7871 header.dynamic_flags(),
7872 (bytes, handles),
7873 )?;
7874 Ok(FileRequest::_UnknownMethod {
7875 ordinal: header.ordinal,
7876 control_handle: FileControlHandle { inner: this.inner.clone() },
7877 method_type: fidl::MethodType::TwoWay,
7878 })
7879 }
7880 _ => Err(fidl::Error::UnknownOrdinal {
7881 ordinal: header.ordinal,
7882 protocol_name:
7883 <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7884 }),
7885 }))
7886 },
7887 )
7888 }
7889}
7890
7891#[derive(Debug)]
7896pub enum FileRequest {
7897 AdvisoryLock {
7921 request: AdvisoryLockRequest,
7922 responder: FileAdvisoryLockResponder,
7923 },
7924 LinkInto {
7947 dst_parent_token: fdomain_client::Event,
7948 dst: String,
7949 responder: FileLinkIntoResponder,
7950 },
7951 Clone {
7952 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
7953 control_handle: FileControlHandle,
7954 },
7955 Close {
7966 responder: FileCloseResponder,
7967 },
7968 Query {
7969 responder: FileQueryResponder,
7970 },
7971 DeprecatedClone {
7973 flags: OpenFlags,
7974 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
7975 control_handle: FileControlHandle,
7976 },
7977 GetAttr {
7981 responder: FileGetAttrResponder,
7982 },
7983 DeprecatedSetAttr {
7985 flags: NodeAttributeFlags,
7986 attributes: NodeAttributes,
7987 responder: FileDeprecatedSetAttrResponder,
7988 },
7989 DeprecatedGetFlags {
7991 responder: FileDeprecatedGetFlagsResponder,
7992 },
7993 DeprecatedSetFlags {
7995 flags: OpenFlags,
7996 responder: FileDeprecatedSetFlagsResponder,
7997 },
7998 GetFlags {
8007 responder: FileGetFlagsResponder,
8008 },
8009 SetFlags {
8019 flags: Flags,
8020 responder: FileSetFlagsResponder,
8021 },
8022 QueryFilesystem {
8024 responder: FileQueryFilesystemResponder,
8025 },
8026 GetAttributes {
8040 query: NodeAttributesQuery,
8041 responder: FileGetAttributesResponder,
8042 },
8043 UpdateAttributes {
8052 payload: MutableNodeAttributes,
8053 responder: FileUpdateAttributesResponder,
8054 },
8055 Sync {
8065 responder: FileSyncResponder,
8066 },
8067 ListExtendedAttributes {
8076 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
8077 control_handle: FileControlHandle,
8078 },
8079 GetExtendedAttribute {
8086 name: Vec<u8>,
8087 responder: FileGetExtendedAttributeResponder,
8088 },
8089 SetExtendedAttribute {
8097 name: Vec<u8>,
8098 value: ExtendedAttributeValue,
8099 mode: SetExtendedAttributeMode,
8100 responder: FileSetExtendedAttributeResponder,
8101 },
8102 RemoveExtendedAttribute {
8108 name: Vec<u8>,
8109 responder: FileRemoveExtendedAttributeResponder,
8110 },
8111 Read {
8130 count: u64,
8131 responder: FileReadResponder,
8132 },
8133 Write {
8157 data: Vec<u8>,
8158 responder: FileWriteResponder,
8159 },
8160 Describe {
8161 responder: FileDescribeResponder,
8162 },
8163 Seek {
8173 origin: SeekOrigin,
8174 offset: i64,
8175 responder: FileSeekResponder,
8176 },
8177 ReadAt {
8195 count: u64,
8196 offset: u64,
8197 responder: FileReadAtResponder,
8198 },
8199 WriteAt {
8221 data: Vec<u8>,
8222 offset: u64,
8223 responder: FileWriteAtResponder,
8224 },
8225 Resize {
8234 length: u64,
8235 responder: FileResizeResponder,
8236 },
8237 GetBackingMemory {
8258 flags: VmoFlags,
8259 responder: FileGetBackingMemoryResponder,
8260 },
8261 Allocate {
8263 offset: u64,
8264 length: u64,
8265 mode: AllocateMode,
8266 responder: FileAllocateResponder,
8267 },
8268 EnableVerity {
8280 options: VerificationOptions,
8281 responder: FileEnableVerityResponder,
8282 },
8283 #[non_exhaustive]
8285 _UnknownMethod {
8286 ordinal: u64,
8288 control_handle: FileControlHandle,
8289 method_type: fidl::MethodType,
8290 },
8291}
8292
8293impl FileRequest {
8294 #[allow(irrefutable_let_patterns)]
8295 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
8296 if let FileRequest::AdvisoryLock { request, responder } = self {
8297 Some((request, responder))
8298 } else {
8299 None
8300 }
8301 }
8302
8303 #[allow(irrefutable_let_patterns)]
8304 pub fn into_link_into(self) -> Option<(fdomain_client::Event, String, FileLinkIntoResponder)> {
8305 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
8306 Some((dst_parent_token, dst, responder))
8307 } else {
8308 None
8309 }
8310 }
8311
8312 #[allow(irrefutable_let_patterns)]
8313 pub fn into_clone(
8314 self,
8315 ) -> Option<(
8316 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
8317 FileControlHandle,
8318 )> {
8319 if let FileRequest::Clone { request, control_handle } = self {
8320 Some((request, control_handle))
8321 } else {
8322 None
8323 }
8324 }
8325
8326 #[allow(irrefutable_let_patterns)]
8327 pub fn into_close(self) -> Option<(FileCloseResponder)> {
8328 if let FileRequest::Close { responder } = self {
8329 Some((responder))
8330 } else {
8331 None
8332 }
8333 }
8334
8335 #[allow(irrefutable_let_patterns)]
8336 pub fn into_query(self) -> Option<(FileQueryResponder)> {
8337 if let FileRequest::Query { responder } = self {
8338 Some((responder))
8339 } else {
8340 None
8341 }
8342 }
8343
8344 #[allow(irrefutable_let_patterns)]
8345 pub fn into_deprecated_clone(
8346 self,
8347 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, FileControlHandle)> {
8348 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
8349 Some((flags, object, control_handle))
8350 } else {
8351 None
8352 }
8353 }
8354
8355 #[allow(irrefutable_let_patterns)]
8356 pub fn into_get_attr(self) -> Option<(FileGetAttrResponder)> {
8357 if let FileRequest::GetAttr { responder } = self {
8358 Some((responder))
8359 } else {
8360 None
8361 }
8362 }
8363
8364 #[allow(irrefutable_let_patterns)]
8365 pub fn into_deprecated_set_attr(
8366 self,
8367 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
8368 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
8369 Some((flags, attributes, responder))
8370 } else {
8371 None
8372 }
8373 }
8374
8375 #[allow(irrefutable_let_patterns)]
8376 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
8377 if let FileRequest::DeprecatedGetFlags { responder } = self {
8378 Some((responder))
8379 } else {
8380 None
8381 }
8382 }
8383
8384 #[allow(irrefutable_let_patterns)]
8385 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
8386 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
8387 Some((flags, responder))
8388 } else {
8389 None
8390 }
8391 }
8392
8393 #[allow(irrefutable_let_patterns)]
8394 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
8395 if let FileRequest::GetFlags { responder } = self {
8396 Some((responder))
8397 } else {
8398 None
8399 }
8400 }
8401
8402 #[allow(irrefutable_let_patterns)]
8403 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
8404 if let FileRequest::SetFlags { flags, responder } = self {
8405 Some((flags, responder))
8406 } else {
8407 None
8408 }
8409 }
8410
8411 #[allow(irrefutable_let_patterns)]
8412 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
8413 if let FileRequest::QueryFilesystem { responder } = self {
8414 Some((responder))
8415 } else {
8416 None
8417 }
8418 }
8419
8420 #[allow(irrefutable_let_patterns)]
8421 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
8422 if let FileRequest::GetAttributes { query, responder } = self {
8423 Some((query, responder))
8424 } else {
8425 None
8426 }
8427 }
8428
8429 #[allow(irrefutable_let_patterns)]
8430 pub fn into_update_attributes(
8431 self,
8432 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
8433 if let FileRequest::UpdateAttributes { payload, responder } = self {
8434 Some((payload, responder))
8435 } else {
8436 None
8437 }
8438 }
8439
8440 #[allow(irrefutable_let_patterns)]
8441 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
8442 if let FileRequest::Sync { responder } = self {
8443 Some((responder))
8444 } else {
8445 None
8446 }
8447 }
8448
8449 #[allow(irrefutable_let_patterns)]
8450 pub fn into_list_extended_attributes(
8451 self,
8452 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
8453 {
8454 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
8455 Some((iterator, control_handle))
8456 } else {
8457 None
8458 }
8459 }
8460
8461 #[allow(irrefutable_let_patterns)]
8462 pub fn into_get_extended_attribute(
8463 self,
8464 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
8465 if let FileRequest::GetExtendedAttribute { name, responder } = self {
8466 Some((name, responder))
8467 } else {
8468 None
8469 }
8470 }
8471
8472 #[allow(irrefutable_let_patterns)]
8473 pub fn into_set_extended_attribute(
8474 self,
8475 ) -> Option<(
8476 Vec<u8>,
8477 ExtendedAttributeValue,
8478 SetExtendedAttributeMode,
8479 FileSetExtendedAttributeResponder,
8480 )> {
8481 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
8482 Some((name, value, mode, responder))
8483 } else {
8484 None
8485 }
8486 }
8487
8488 #[allow(irrefutable_let_patterns)]
8489 pub fn into_remove_extended_attribute(
8490 self,
8491 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
8492 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
8493 Some((name, responder))
8494 } else {
8495 None
8496 }
8497 }
8498
8499 #[allow(irrefutable_let_patterns)]
8500 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
8501 if let FileRequest::Read { count, responder } = self {
8502 Some((count, responder))
8503 } else {
8504 None
8505 }
8506 }
8507
8508 #[allow(irrefutable_let_patterns)]
8509 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
8510 if let FileRequest::Write { data, responder } = self {
8511 Some((data, responder))
8512 } else {
8513 None
8514 }
8515 }
8516
8517 #[allow(irrefutable_let_patterns)]
8518 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
8519 if let FileRequest::Describe { responder } = self {
8520 Some((responder))
8521 } else {
8522 None
8523 }
8524 }
8525
8526 #[allow(irrefutable_let_patterns)]
8527 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
8528 if let FileRequest::Seek { origin, offset, responder } = self {
8529 Some((origin, offset, responder))
8530 } else {
8531 None
8532 }
8533 }
8534
8535 #[allow(irrefutable_let_patterns)]
8536 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
8537 if let FileRequest::ReadAt { count, offset, responder } = self {
8538 Some((count, offset, responder))
8539 } else {
8540 None
8541 }
8542 }
8543
8544 #[allow(irrefutable_let_patterns)]
8545 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
8546 if let FileRequest::WriteAt { data, offset, responder } = self {
8547 Some((data, offset, responder))
8548 } else {
8549 None
8550 }
8551 }
8552
8553 #[allow(irrefutable_let_patterns)]
8554 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
8555 if let FileRequest::Resize { length, responder } = self {
8556 Some((length, responder))
8557 } else {
8558 None
8559 }
8560 }
8561
8562 #[allow(irrefutable_let_patterns)]
8563 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
8564 if let FileRequest::GetBackingMemory { flags, responder } = self {
8565 Some((flags, responder))
8566 } else {
8567 None
8568 }
8569 }
8570
8571 #[allow(irrefutable_let_patterns)]
8572 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
8573 if let FileRequest::Allocate { offset, length, mode, responder } = self {
8574 Some((offset, length, mode, responder))
8575 } else {
8576 None
8577 }
8578 }
8579
8580 #[allow(irrefutable_let_patterns)]
8581 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
8582 if let FileRequest::EnableVerity { options, responder } = self {
8583 Some((options, responder))
8584 } else {
8585 None
8586 }
8587 }
8588
8589 pub fn method_name(&self) -> &'static str {
8591 match *self {
8592 FileRequest::AdvisoryLock { .. } => "advisory_lock",
8593 FileRequest::LinkInto { .. } => "link_into",
8594 FileRequest::Clone { .. } => "clone",
8595 FileRequest::Close { .. } => "close",
8596 FileRequest::Query { .. } => "query",
8597 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
8598 FileRequest::GetAttr { .. } => "get_attr",
8599 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
8600 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
8601 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
8602 FileRequest::GetFlags { .. } => "get_flags",
8603 FileRequest::SetFlags { .. } => "set_flags",
8604 FileRequest::QueryFilesystem { .. } => "query_filesystem",
8605 FileRequest::GetAttributes { .. } => "get_attributes",
8606 FileRequest::UpdateAttributes { .. } => "update_attributes",
8607 FileRequest::Sync { .. } => "sync",
8608 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
8609 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
8610 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
8611 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
8612 FileRequest::Read { .. } => "read",
8613 FileRequest::Write { .. } => "write",
8614 FileRequest::Describe { .. } => "describe",
8615 FileRequest::Seek { .. } => "seek",
8616 FileRequest::ReadAt { .. } => "read_at",
8617 FileRequest::WriteAt { .. } => "write_at",
8618 FileRequest::Resize { .. } => "resize",
8619 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
8620 FileRequest::Allocate { .. } => "allocate",
8621 FileRequest::EnableVerity { .. } => "enable_verity",
8622 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8623 "unknown one-way method"
8624 }
8625 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8626 "unknown two-way method"
8627 }
8628 }
8629 }
8630}
8631
8632#[derive(Debug, Clone)]
8633pub struct FileControlHandle {
8634 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8635}
8636
8637impl fdomain_client::fidl::ControlHandle for FileControlHandle {
8638 fn shutdown(&self) {
8639 self.inner.shutdown()
8640 }
8641
8642 fn is_closed(&self) -> bool {
8643 self.inner.channel().is_closed()
8644 }
8645 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8646 self.inner.channel().on_closed()
8647 }
8648}
8649
8650impl FileControlHandle {
8651 pub fn send_on_open_(
8652 &self,
8653 mut s: i32,
8654 mut info: Option<NodeInfoDeprecated>,
8655 ) -> Result<(), fidl::Error> {
8656 self.inner.send::<NodeOnOpenRequest>(
8657 (s, info.as_mut()),
8658 0,
8659 0x7fc7bbb1dbfd1972,
8660 fidl::encoding::DynamicFlags::empty(),
8661 )
8662 }
8663
8664 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
8665 self.inner.send::<Representation>(
8666 &mut payload,
8667 0,
8668 0x5cb40567d80a510c,
8669 fidl::encoding::DynamicFlags::empty(),
8670 )
8671 }
8672}
8673
8674#[must_use = "FIDL methods require a response to be sent"]
8675#[derive(Debug)]
8676pub struct FileAdvisoryLockResponder {
8677 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8678 tx_id: u32,
8679}
8680
8681impl std::ops::Drop for FileAdvisoryLockResponder {
8685 fn drop(&mut self) {
8686 self.control_handle.shutdown();
8687 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8689 }
8690}
8691
8692impl fdomain_client::fidl::Responder for FileAdvisoryLockResponder {
8693 type ControlHandle = FileControlHandle;
8694
8695 fn control_handle(&self) -> &FileControlHandle {
8696 &self.control_handle
8697 }
8698
8699 fn drop_without_shutdown(mut self) {
8700 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8702 std::mem::forget(self);
8704 }
8705}
8706
8707impl FileAdvisoryLockResponder {
8708 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8712 let _result = self.send_raw(result);
8713 if _result.is_err() {
8714 self.control_handle.shutdown();
8715 }
8716 self.drop_without_shutdown();
8717 _result
8718 }
8719
8720 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8722 let _result = self.send_raw(result);
8723 self.drop_without_shutdown();
8724 _result
8725 }
8726
8727 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8728 self.control_handle
8729 .inner
8730 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8731 result,
8732 self.tx_id,
8733 0x6ee9c0ad53ec87aa,
8734 fidl::encoding::DynamicFlags::empty(),
8735 )
8736 }
8737}
8738
8739#[must_use = "FIDL methods require a response to be sent"]
8740#[derive(Debug)]
8741pub struct FileLinkIntoResponder {
8742 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8743 tx_id: u32,
8744}
8745
8746impl std::ops::Drop for FileLinkIntoResponder {
8750 fn drop(&mut self) {
8751 self.control_handle.shutdown();
8752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8754 }
8755}
8756
8757impl fdomain_client::fidl::Responder for FileLinkIntoResponder {
8758 type ControlHandle = FileControlHandle;
8759
8760 fn control_handle(&self) -> &FileControlHandle {
8761 &self.control_handle
8762 }
8763
8764 fn drop_without_shutdown(mut self) {
8765 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8767 std::mem::forget(self);
8769 }
8770}
8771
8772impl FileLinkIntoResponder {
8773 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8777 let _result = self.send_raw(result);
8778 if _result.is_err() {
8779 self.control_handle.shutdown();
8780 }
8781 self.drop_without_shutdown();
8782 _result
8783 }
8784
8785 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8787 let _result = self.send_raw(result);
8788 self.drop_without_shutdown();
8789 _result
8790 }
8791
8792 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8793 self.control_handle
8794 .inner
8795 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8796 result,
8797 self.tx_id,
8798 0x54f3949246a03e74,
8799 fidl::encoding::DynamicFlags::empty(),
8800 )
8801 }
8802}
8803
8804#[must_use = "FIDL methods require a response to be sent"]
8805#[derive(Debug)]
8806pub struct FileCloseResponder {
8807 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8808 tx_id: u32,
8809}
8810
8811impl std::ops::Drop for FileCloseResponder {
8815 fn drop(&mut self) {
8816 self.control_handle.shutdown();
8817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8819 }
8820}
8821
8822impl fdomain_client::fidl::Responder for FileCloseResponder {
8823 type ControlHandle = FileControlHandle;
8824
8825 fn control_handle(&self) -> &FileControlHandle {
8826 &self.control_handle
8827 }
8828
8829 fn drop_without_shutdown(mut self) {
8830 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8832 std::mem::forget(self);
8834 }
8835}
8836
8837impl FileCloseResponder {
8838 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8842 let _result = self.send_raw(result);
8843 if _result.is_err() {
8844 self.control_handle.shutdown();
8845 }
8846 self.drop_without_shutdown();
8847 _result
8848 }
8849
8850 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8852 let _result = self.send_raw(result);
8853 self.drop_without_shutdown();
8854 _result
8855 }
8856
8857 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8858 self.control_handle
8859 .inner
8860 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8861 result,
8862 self.tx_id,
8863 0x5ac5d459ad7f657e,
8864 fidl::encoding::DynamicFlags::empty(),
8865 )
8866 }
8867}
8868
8869#[must_use = "FIDL methods require a response to be sent"]
8870#[derive(Debug)]
8871pub struct FileQueryResponder {
8872 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8873 tx_id: u32,
8874}
8875
8876impl std::ops::Drop for FileQueryResponder {
8880 fn drop(&mut self) {
8881 self.control_handle.shutdown();
8882 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8884 }
8885}
8886
8887impl fdomain_client::fidl::Responder for FileQueryResponder {
8888 type ControlHandle = FileControlHandle;
8889
8890 fn control_handle(&self) -> &FileControlHandle {
8891 &self.control_handle
8892 }
8893
8894 fn drop_without_shutdown(mut self) {
8895 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8897 std::mem::forget(self);
8899 }
8900}
8901
8902impl FileQueryResponder {
8903 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8907 let _result = self.send_raw(protocol);
8908 if _result.is_err() {
8909 self.control_handle.shutdown();
8910 }
8911 self.drop_without_shutdown();
8912 _result
8913 }
8914
8915 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8917 let _result = self.send_raw(protocol);
8918 self.drop_without_shutdown();
8919 _result
8920 }
8921
8922 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8923 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
8924 (protocol,),
8925 self.tx_id,
8926 0x2658edee9decfc06,
8927 fidl::encoding::DynamicFlags::empty(),
8928 )
8929 }
8930}
8931
8932#[must_use = "FIDL methods require a response to be sent"]
8933#[derive(Debug)]
8934pub struct FileGetAttrResponder {
8935 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8936 tx_id: u32,
8937}
8938
8939impl std::ops::Drop for FileGetAttrResponder {
8943 fn drop(&mut self) {
8944 self.control_handle.shutdown();
8945 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8947 }
8948}
8949
8950impl fdomain_client::fidl::Responder for FileGetAttrResponder {
8951 type ControlHandle = FileControlHandle;
8952
8953 fn control_handle(&self) -> &FileControlHandle {
8954 &self.control_handle
8955 }
8956
8957 fn drop_without_shutdown(mut self) {
8958 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8960 std::mem::forget(self);
8962 }
8963}
8964
8965impl FileGetAttrResponder {
8966 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8970 let _result = self.send_raw(s, attributes);
8971 if _result.is_err() {
8972 self.control_handle.shutdown();
8973 }
8974 self.drop_without_shutdown();
8975 _result
8976 }
8977
8978 pub fn send_no_shutdown_on_err(
8980 self,
8981 mut s: i32,
8982 mut attributes: &NodeAttributes,
8983 ) -> Result<(), fidl::Error> {
8984 let _result = self.send_raw(s, attributes);
8985 self.drop_without_shutdown();
8986 _result
8987 }
8988
8989 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8990 self.control_handle.inner.send::<NodeGetAttrResponse>(
8991 (s, attributes),
8992 self.tx_id,
8993 0x78985e216314dafd,
8994 fidl::encoding::DynamicFlags::empty(),
8995 )
8996 }
8997}
8998
8999#[must_use = "FIDL methods require a response to be sent"]
9000#[derive(Debug)]
9001pub struct FileDeprecatedSetAttrResponder {
9002 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9003 tx_id: u32,
9004}
9005
9006impl std::ops::Drop for FileDeprecatedSetAttrResponder {
9010 fn drop(&mut self) {
9011 self.control_handle.shutdown();
9012 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9014 }
9015}
9016
9017impl fdomain_client::fidl::Responder for FileDeprecatedSetAttrResponder {
9018 type ControlHandle = FileControlHandle;
9019
9020 fn control_handle(&self) -> &FileControlHandle {
9021 &self.control_handle
9022 }
9023
9024 fn drop_without_shutdown(mut self) {
9025 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9027 std::mem::forget(self);
9029 }
9030}
9031
9032impl FileDeprecatedSetAttrResponder {
9033 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9037 let _result = self.send_raw(s);
9038 if _result.is_err() {
9039 self.control_handle.shutdown();
9040 }
9041 self.drop_without_shutdown();
9042 _result
9043 }
9044
9045 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9047 let _result = self.send_raw(s);
9048 self.drop_without_shutdown();
9049 _result
9050 }
9051
9052 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9053 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
9054 (s,),
9055 self.tx_id,
9056 0x4186c0f40d938f46,
9057 fidl::encoding::DynamicFlags::empty(),
9058 )
9059 }
9060}
9061
9062#[must_use = "FIDL methods require a response to be sent"]
9063#[derive(Debug)]
9064pub struct FileDeprecatedGetFlagsResponder {
9065 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9066 tx_id: u32,
9067}
9068
9069impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
9073 fn drop(&mut self) {
9074 self.control_handle.shutdown();
9075 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9077 }
9078}
9079
9080impl fdomain_client::fidl::Responder for FileDeprecatedGetFlagsResponder {
9081 type ControlHandle = FileControlHandle;
9082
9083 fn control_handle(&self) -> &FileControlHandle {
9084 &self.control_handle
9085 }
9086
9087 fn drop_without_shutdown(mut self) {
9088 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9090 std::mem::forget(self);
9092 }
9093}
9094
9095impl FileDeprecatedGetFlagsResponder {
9096 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9100 let _result = self.send_raw(s, flags);
9101 if _result.is_err() {
9102 self.control_handle.shutdown();
9103 }
9104 self.drop_without_shutdown();
9105 _result
9106 }
9107
9108 pub fn send_no_shutdown_on_err(
9110 self,
9111 mut s: i32,
9112 mut flags: OpenFlags,
9113 ) -> Result<(), fidl::Error> {
9114 let _result = self.send_raw(s, flags);
9115 self.drop_without_shutdown();
9116 _result
9117 }
9118
9119 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9120 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
9121 (s, flags),
9122 self.tx_id,
9123 0x5b88fffb8eda3aa1,
9124 fidl::encoding::DynamicFlags::empty(),
9125 )
9126 }
9127}
9128
9129#[must_use = "FIDL methods require a response to be sent"]
9130#[derive(Debug)]
9131pub struct FileDeprecatedSetFlagsResponder {
9132 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9133 tx_id: u32,
9134}
9135
9136impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
9140 fn drop(&mut self) {
9141 self.control_handle.shutdown();
9142 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9144 }
9145}
9146
9147impl fdomain_client::fidl::Responder for FileDeprecatedSetFlagsResponder {
9148 type ControlHandle = FileControlHandle;
9149
9150 fn control_handle(&self) -> &FileControlHandle {
9151 &self.control_handle
9152 }
9153
9154 fn drop_without_shutdown(mut self) {
9155 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9157 std::mem::forget(self);
9159 }
9160}
9161
9162impl FileDeprecatedSetFlagsResponder {
9163 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9167 let _result = self.send_raw(s);
9168 if _result.is_err() {
9169 self.control_handle.shutdown();
9170 }
9171 self.drop_without_shutdown();
9172 _result
9173 }
9174
9175 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9177 let _result = self.send_raw(s);
9178 self.drop_without_shutdown();
9179 _result
9180 }
9181
9182 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9183 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
9184 (s,),
9185 self.tx_id,
9186 0x5295b76c71fde733,
9187 fidl::encoding::DynamicFlags::empty(),
9188 )
9189 }
9190}
9191
9192#[must_use = "FIDL methods require a response to be sent"]
9193#[derive(Debug)]
9194pub struct FileGetFlagsResponder {
9195 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9196 tx_id: u32,
9197}
9198
9199impl std::ops::Drop for FileGetFlagsResponder {
9203 fn drop(&mut self) {
9204 self.control_handle.shutdown();
9205 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9207 }
9208}
9209
9210impl fdomain_client::fidl::Responder for FileGetFlagsResponder {
9211 type ControlHandle = FileControlHandle;
9212
9213 fn control_handle(&self) -> &FileControlHandle {
9214 &self.control_handle
9215 }
9216
9217 fn drop_without_shutdown(mut self) {
9218 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9220 std::mem::forget(self);
9222 }
9223}
9224
9225impl FileGetFlagsResponder {
9226 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9230 let _result = self.send_raw(result);
9231 if _result.is_err() {
9232 self.control_handle.shutdown();
9233 }
9234 self.drop_without_shutdown();
9235 _result
9236 }
9237
9238 pub fn send_no_shutdown_on_err(
9240 self,
9241 mut result: Result<Flags, i32>,
9242 ) -> Result<(), fidl::Error> {
9243 let _result = self.send_raw(result);
9244 self.drop_without_shutdown();
9245 _result
9246 }
9247
9248 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9249 self.control_handle
9250 .inner
9251 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
9252 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
9253 self.tx_id,
9254 0x176eb318f64ec23,
9255 fidl::encoding::DynamicFlags::FLEXIBLE,
9256 )
9257 }
9258}
9259
9260#[must_use = "FIDL methods require a response to be sent"]
9261#[derive(Debug)]
9262pub struct FileSetFlagsResponder {
9263 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9264 tx_id: u32,
9265}
9266
9267impl std::ops::Drop for FileSetFlagsResponder {
9271 fn drop(&mut self) {
9272 self.control_handle.shutdown();
9273 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9275 }
9276}
9277
9278impl fdomain_client::fidl::Responder for FileSetFlagsResponder {
9279 type ControlHandle = FileControlHandle;
9280
9281 fn control_handle(&self) -> &FileControlHandle {
9282 &self.control_handle
9283 }
9284
9285 fn drop_without_shutdown(mut self) {
9286 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9288 std::mem::forget(self);
9290 }
9291}
9292
9293impl FileSetFlagsResponder {
9294 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9298 let _result = self.send_raw(result);
9299 if _result.is_err() {
9300 self.control_handle.shutdown();
9301 }
9302 self.drop_without_shutdown();
9303 _result
9304 }
9305
9306 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9308 let _result = self.send_raw(result);
9309 self.drop_without_shutdown();
9310 _result
9311 }
9312
9313 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9314 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9315 fidl::encoding::EmptyStruct,
9316 i32,
9317 >>(
9318 fidl::encoding::FlexibleResult::new(result),
9319 self.tx_id,
9320 0x55a8028685791ea8,
9321 fidl::encoding::DynamicFlags::FLEXIBLE,
9322 )
9323 }
9324}
9325
9326#[must_use = "FIDL methods require a response to be sent"]
9327#[derive(Debug)]
9328pub struct FileQueryFilesystemResponder {
9329 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9330 tx_id: u32,
9331}
9332
9333impl std::ops::Drop for FileQueryFilesystemResponder {
9337 fn drop(&mut self) {
9338 self.control_handle.shutdown();
9339 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9341 }
9342}
9343
9344impl fdomain_client::fidl::Responder for FileQueryFilesystemResponder {
9345 type ControlHandle = FileControlHandle;
9346
9347 fn control_handle(&self) -> &FileControlHandle {
9348 &self.control_handle
9349 }
9350
9351 fn drop_without_shutdown(mut self) {
9352 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9354 std::mem::forget(self);
9356 }
9357}
9358
9359impl FileQueryFilesystemResponder {
9360 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9364 let _result = self.send_raw(s, info);
9365 if _result.is_err() {
9366 self.control_handle.shutdown();
9367 }
9368 self.drop_without_shutdown();
9369 _result
9370 }
9371
9372 pub fn send_no_shutdown_on_err(
9374 self,
9375 mut s: i32,
9376 mut info: Option<&FilesystemInfo>,
9377 ) -> Result<(), fidl::Error> {
9378 let _result = self.send_raw(s, info);
9379 self.drop_without_shutdown();
9380 _result
9381 }
9382
9383 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9384 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
9385 (s, info),
9386 self.tx_id,
9387 0x6f344a1c6b0a0610,
9388 fidl::encoding::DynamicFlags::empty(),
9389 )
9390 }
9391}
9392
9393#[must_use = "FIDL methods require a response to be sent"]
9394#[derive(Debug)]
9395pub struct FileGetAttributesResponder {
9396 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9397 tx_id: u32,
9398}
9399
9400impl std::ops::Drop for FileGetAttributesResponder {
9404 fn drop(&mut self) {
9405 self.control_handle.shutdown();
9406 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9408 }
9409}
9410
9411impl fdomain_client::fidl::Responder for FileGetAttributesResponder {
9412 type ControlHandle = FileControlHandle;
9413
9414 fn control_handle(&self) -> &FileControlHandle {
9415 &self.control_handle
9416 }
9417
9418 fn drop_without_shutdown(mut self) {
9419 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9421 std::mem::forget(self);
9423 }
9424}
9425
9426impl FileGetAttributesResponder {
9427 pub fn send(
9431 self,
9432 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9433 ) -> Result<(), fidl::Error> {
9434 let _result = self.send_raw(result);
9435 if _result.is_err() {
9436 self.control_handle.shutdown();
9437 }
9438 self.drop_without_shutdown();
9439 _result
9440 }
9441
9442 pub fn send_no_shutdown_on_err(
9444 self,
9445 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9446 ) -> Result<(), fidl::Error> {
9447 let _result = self.send_raw(result);
9448 self.drop_without_shutdown();
9449 _result
9450 }
9451
9452 fn send_raw(
9453 &self,
9454 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9455 ) -> Result<(), fidl::Error> {
9456 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
9457 result,
9458 self.tx_id,
9459 0x3d4396a638ea053b,
9460 fidl::encoding::DynamicFlags::empty(),
9461 )
9462 }
9463}
9464
9465#[must_use = "FIDL methods require a response to be sent"]
9466#[derive(Debug)]
9467pub struct FileUpdateAttributesResponder {
9468 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9469 tx_id: u32,
9470}
9471
9472impl std::ops::Drop for FileUpdateAttributesResponder {
9476 fn drop(&mut self) {
9477 self.control_handle.shutdown();
9478 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9480 }
9481}
9482
9483impl fdomain_client::fidl::Responder for FileUpdateAttributesResponder {
9484 type ControlHandle = FileControlHandle;
9485
9486 fn control_handle(&self) -> &FileControlHandle {
9487 &self.control_handle
9488 }
9489
9490 fn drop_without_shutdown(mut self) {
9491 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9493 std::mem::forget(self);
9495 }
9496}
9497
9498impl FileUpdateAttributesResponder {
9499 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9503 let _result = self.send_raw(result);
9504 if _result.is_err() {
9505 self.control_handle.shutdown();
9506 }
9507 self.drop_without_shutdown();
9508 _result
9509 }
9510
9511 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9513 let _result = self.send_raw(result);
9514 self.drop_without_shutdown();
9515 _result
9516 }
9517
9518 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9519 self.control_handle
9520 .inner
9521 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9522 result,
9523 self.tx_id,
9524 0x3308c1da5a89bf08,
9525 fidl::encoding::DynamicFlags::empty(),
9526 )
9527 }
9528}
9529
9530#[must_use = "FIDL methods require a response to be sent"]
9531#[derive(Debug)]
9532pub struct FileSyncResponder {
9533 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9534 tx_id: u32,
9535}
9536
9537impl std::ops::Drop for FileSyncResponder {
9541 fn drop(&mut self) {
9542 self.control_handle.shutdown();
9543 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9545 }
9546}
9547
9548impl fdomain_client::fidl::Responder for FileSyncResponder {
9549 type ControlHandle = FileControlHandle;
9550
9551 fn control_handle(&self) -> &FileControlHandle {
9552 &self.control_handle
9553 }
9554
9555 fn drop_without_shutdown(mut self) {
9556 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9558 std::mem::forget(self);
9560 }
9561}
9562
9563impl FileSyncResponder {
9564 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9568 let _result = self.send_raw(result);
9569 if _result.is_err() {
9570 self.control_handle.shutdown();
9571 }
9572 self.drop_without_shutdown();
9573 _result
9574 }
9575
9576 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9578 let _result = self.send_raw(result);
9579 self.drop_without_shutdown();
9580 _result
9581 }
9582
9583 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9584 self.control_handle
9585 .inner
9586 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9587 result,
9588 self.tx_id,
9589 0x2c5c27ca0ab5dc49,
9590 fidl::encoding::DynamicFlags::empty(),
9591 )
9592 }
9593}
9594
9595#[must_use = "FIDL methods require a response to be sent"]
9596#[derive(Debug)]
9597pub struct FileGetExtendedAttributeResponder {
9598 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9599 tx_id: u32,
9600}
9601
9602impl std::ops::Drop for FileGetExtendedAttributeResponder {
9606 fn drop(&mut self) {
9607 self.control_handle.shutdown();
9608 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9610 }
9611}
9612
9613impl fdomain_client::fidl::Responder for FileGetExtendedAttributeResponder {
9614 type ControlHandle = FileControlHandle;
9615
9616 fn control_handle(&self) -> &FileControlHandle {
9617 &self.control_handle
9618 }
9619
9620 fn drop_without_shutdown(mut self) {
9621 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9623 std::mem::forget(self);
9625 }
9626}
9627
9628impl FileGetExtendedAttributeResponder {
9629 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9633 let _result = self.send_raw(result);
9634 if _result.is_err() {
9635 self.control_handle.shutdown();
9636 }
9637 self.drop_without_shutdown();
9638 _result
9639 }
9640
9641 pub fn send_no_shutdown_on_err(
9643 self,
9644 mut result: Result<ExtendedAttributeValue, i32>,
9645 ) -> Result<(), fidl::Error> {
9646 let _result = self.send_raw(result);
9647 self.drop_without_shutdown();
9648 _result
9649 }
9650
9651 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9652 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
9653 result.as_mut().map_err(|e| *e),
9654 self.tx_id,
9655 0x45ffa3ccfdeb76db,
9656 fidl::encoding::DynamicFlags::empty(),
9657 )
9658 }
9659}
9660
9661#[must_use = "FIDL methods require a response to be sent"]
9662#[derive(Debug)]
9663pub struct FileSetExtendedAttributeResponder {
9664 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9665 tx_id: u32,
9666}
9667
9668impl std::ops::Drop for FileSetExtendedAttributeResponder {
9672 fn drop(&mut self) {
9673 self.control_handle.shutdown();
9674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9676 }
9677}
9678
9679impl fdomain_client::fidl::Responder for FileSetExtendedAttributeResponder {
9680 type ControlHandle = FileControlHandle;
9681
9682 fn control_handle(&self) -> &FileControlHandle {
9683 &self.control_handle
9684 }
9685
9686 fn drop_without_shutdown(mut self) {
9687 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9689 std::mem::forget(self);
9691 }
9692}
9693
9694impl FileSetExtendedAttributeResponder {
9695 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9699 let _result = self.send_raw(result);
9700 if _result.is_err() {
9701 self.control_handle.shutdown();
9702 }
9703 self.drop_without_shutdown();
9704 _result
9705 }
9706
9707 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9709 let _result = self.send_raw(result);
9710 self.drop_without_shutdown();
9711 _result
9712 }
9713
9714 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9715 self.control_handle
9716 .inner
9717 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9718 result,
9719 self.tx_id,
9720 0x4a951362f681f23c,
9721 fidl::encoding::DynamicFlags::empty(),
9722 )
9723 }
9724}
9725
9726#[must_use = "FIDL methods require a response to be sent"]
9727#[derive(Debug)]
9728pub struct FileRemoveExtendedAttributeResponder {
9729 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9730 tx_id: u32,
9731}
9732
9733impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
9737 fn drop(&mut self) {
9738 self.control_handle.shutdown();
9739 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9741 }
9742}
9743
9744impl fdomain_client::fidl::Responder for FileRemoveExtendedAttributeResponder {
9745 type ControlHandle = FileControlHandle;
9746
9747 fn control_handle(&self) -> &FileControlHandle {
9748 &self.control_handle
9749 }
9750
9751 fn drop_without_shutdown(mut self) {
9752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9754 std::mem::forget(self);
9756 }
9757}
9758
9759impl FileRemoveExtendedAttributeResponder {
9760 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9764 let _result = self.send_raw(result);
9765 if _result.is_err() {
9766 self.control_handle.shutdown();
9767 }
9768 self.drop_without_shutdown();
9769 _result
9770 }
9771
9772 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9774 let _result = self.send_raw(result);
9775 self.drop_without_shutdown();
9776 _result
9777 }
9778
9779 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9780 self.control_handle
9781 .inner
9782 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9783 result,
9784 self.tx_id,
9785 0x7a0b9f3a9bf9032d,
9786 fidl::encoding::DynamicFlags::empty(),
9787 )
9788 }
9789}
9790
9791#[must_use = "FIDL methods require a response to be sent"]
9792#[derive(Debug)]
9793pub struct FileReadResponder {
9794 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9795 tx_id: u32,
9796}
9797
9798impl std::ops::Drop for FileReadResponder {
9802 fn drop(&mut self) {
9803 self.control_handle.shutdown();
9804 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9806 }
9807}
9808
9809impl fdomain_client::fidl::Responder for FileReadResponder {
9810 type ControlHandle = FileControlHandle;
9811
9812 fn control_handle(&self) -> &FileControlHandle {
9813 &self.control_handle
9814 }
9815
9816 fn drop_without_shutdown(mut self) {
9817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9819 std::mem::forget(self);
9821 }
9822}
9823
9824impl FileReadResponder {
9825 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9829 let _result = self.send_raw(result);
9830 if _result.is_err() {
9831 self.control_handle.shutdown();
9832 }
9833 self.drop_without_shutdown();
9834 _result
9835 }
9836
9837 pub fn send_no_shutdown_on_err(
9839 self,
9840 mut result: Result<&[u8], i32>,
9841 ) -> Result<(), fidl::Error> {
9842 let _result = self.send_raw(result);
9843 self.drop_without_shutdown();
9844 _result
9845 }
9846
9847 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9848 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
9849 result.map(|data| (data,)),
9850 self.tx_id,
9851 0x57e419a298c8ede,
9852 fidl::encoding::DynamicFlags::empty(),
9853 )
9854 }
9855}
9856
9857#[must_use = "FIDL methods require a response to be sent"]
9858#[derive(Debug)]
9859pub struct FileWriteResponder {
9860 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9861 tx_id: u32,
9862}
9863
9864impl std::ops::Drop for FileWriteResponder {
9868 fn drop(&mut self) {
9869 self.control_handle.shutdown();
9870 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9872 }
9873}
9874
9875impl fdomain_client::fidl::Responder for FileWriteResponder {
9876 type ControlHandle = FileControlHandle;
9877
9878 fn control_handle(&self) -> &FileControlHandle {
9879 &self.control_handle
9880 }
9881
9882 fn drop_without_shutdown(mut self) {
9883 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9885 std::mem::forget(self);
9887 }
9888}
9889
9890impl FileWriteResponder {
9891 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9895 let _result = self.send_raw(result);
9896 if _result.is_err() {
9897 self.control_handle.shutdown();
9898 }
9899 self.drop_without_shutdown();
9900 _result
9901 }
9902
9903 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9905 let _result = self.send_raw(result);
9906 self.drop_without_shutdown();
9907 _result
9908 }
9909
9910 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9911 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
9912 result.map(|actual_count| (actual_count,)),
9913 self.tx_id,
9914 0x6a31437832469f82,
9915 fidl::encoding::DynamicFlags::empty(),
9916 )
9917 }
9918}
9919
9920#[must_use = "FIDL methods require a response to be sent"]
9921#[derive(Debug)]
9922pub struct FileDescribeResponder {
9923 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9924 tx_id: u32,
9925}
9926
9927impl std::ops::Drop for FileDescribeResponder {
9931 fn drop(&mut self) {
9932 self.control_handle.shutdown();
9933 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9935 }
9936}
9937
9938impl fdomain_client::fidl::Responder for FileDescribeResponder {
9939 type ControlHandle = FileControlHandle;
9940
9941 fn control_handle(&self) -> &FileControlHandle {
9942 &self.control_handle
9943 }
9944
9945 fn drop_without_shutdown(mut self) {
9946 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9948 std::mem::forget(self);
9950 }
9951}
9952
9953impl FileDescribeResponder {
9954 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9958 let _result = self.send_raw(payload);
9959 if _result.is_err() {
9960 self.control_handle.shutdown();
9961 }
9962 self.drop_without_shutdown();
9963 _result
9964 }
9965
9966 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9968 let _result = self.send_raw(payload);
9969 self.drop_without_shutdown();
9970 _result
9971 }
9972
9973 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9974 self.control_handle.inner.send::<FileInfo>(
9975 &mut payload,
9976 self.tx_id,
9977 0x68b5ac00c62906bc,
9978 fidl::encoding::DynamicFlags::empty(),
9979 )
9980 }
9981}
9982
9983#[must_use = "FIDL methods require a response to be sent"]
9984#[derive(Debug)]
9985pub struct FileSeekResponder {
9986 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9987 tx_id: u32,
9988}
9989
9990impl std::ops::Drop for FileSeekResponder {
9994 fn drop(&mut self) {
9995 self.control_handle.shutdown();
9996 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9998 }
9999}
10000
10001impl fdomain_client::fidl::Responder for FileSeekResponder {
10002 type ControlHandle = FileControlHandle;
10003
10004 fn control_handle(&self) -> &FileControlHandle {
10005 &self.control_handle
10006 }
10007
10008 fn drop_without_shutdown(mut self) {
10009 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10011 std::mem::forget(self);
10013 }
10014}
10015
10016impl FileSeekResponder {
10017 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10021 let _result = self.send_raw(result);
10022 if _result.is_err() {
10023 self.control_handle.shutdown();
10024 }
10025 self.drop_without_shutdown();
10026 _result
10027 }
10028
10029 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10031 let _result = self.send_raw(result);
10032 self.drop_without_shutdown();
10033 _result
10034 }
10035
10036 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10037 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
10038 result.map(|offset_from_start| (offset_from_start,)),
10039 self.tx_id,
10040 0x78079168162c5207,
10041 fidl::encoding::DynamicFlags::empty(),
10042 )
10043 }
10044}
10045
10046#[must_use = "FIDL methods require a response to be sent"]
10047#[derive(Debug)]
10048pub struct FileReadAtResponder {
10049 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10050 tx_id: u32,
10051}
10052
10053impl std::ops::Drop for FileReadAtResponder {
10057 fn drop(&mut self) {
10058 self.control_handle.shutdown();
10059 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10061 }
10062}
10063
10064impl fdomain_client::fidl::Responder for FileReadAtResponder {
10065 type ControlHandle = FileControlHandle;
10066
10067 fn control_handle(&self) -> &FileControlHandle {
10068 &self.control_handle
10069 }
10070
10071 fn drop_without_shutdown(mut self) {
10072 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10074 std::mem::forget(self);
10076 }
10077}
10078
10079impl FileReadAtResponder {
10080 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10084 let _result = self.send_raw(result);
10085 if _result.is_err() {
10086 self.control_handle.shutdown();
10087 }
10088 self.drop_without_shutdown();
10089 _result
10090 }
10091
10092 pub fn send_no_shutdown_on_err(
10094 self,
10095 mut result: Result<&[u8], i32>,
10096 ) -> Result<(), fidl::Error> {
10097 let _result = self.send_raw(result);
10098 self.drop_without_shutdown();
10099 _result
10100 }
10101
10102 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10103 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
10104 result.map(|data| (data,)),
10105 self.tx_id,
10106 0x1607a293a60d723e,
10107 fidl::encoding::DynamicFlags::empty(),
10108 )
10109 }
10110}
10111
10112#[must_use = "FIDL methods require a response to be sent"]
10113#[derive(Debug)]
10114pub struct FileWriteAtResponder {
10115 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10116 tx_id: u32,
10117}
10118
10119impl std::ops::Drop for FileWriteAtResponder {
10123 fn drop(&mut self) {
10124 self.control_handle.shutdown();
10125 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10127 }
10128}
10129
10130impl fdomain_client::fidl::Responder for FileWriteAtResponder {
10131 type ControlHandle = FileControlHandle;
10132
10133 fn control_handle(&self) -> &FileControlHandle {
10134 &self.control_handle
10135 }
10136
10137 fn drop_without_shutdown(mut self) {
10138 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10140 std::mem::forget(self);
10142 }
10143}
10144
10145impl FileWriteAtResponder {
10146 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10150 let _result = self.send_raw(result);
10151 if _result.is_err() {
10152 self.control_handle.shutdown();
10153 }
10154 self.drop_without_shutdown();
10155 _result
10156 }
10157
10158 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10160 let _result = self.send_raw(result);
10161 self.drop_without_shutdown();
10162 _result
10163 }
10164
10165 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10166 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
10167 result.map(|actual_count| (actual_count,)),
10168 self.tx_id,
10169 0x793eefc0045e792b,
10170 fidl::encoding::DynamicFlags::empty(),
10171 )
10172 }
10173}
10174
10175#[must_use = "FIDL methods require a response to be sent"]
10176#[derive(Debug)]
10177pub struct FileResizeResponder {
10178 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10179 tx_id: u32,
10180}
10181
10182impl std::ops::Drop for FileResizeResponder {
10186 fn drop(&mut self) {
10187 self.control_handle.shutdown();
10188 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10190 }
10191}
10192
10193impl fdomain_client::fidl::Responder for FileResizeResponder {
10194 type ControlHandle = FileControlHandle;
10195
10196 fn control_handle(&self) -> &FileControlHandle {
10197 &self.control_handle
10198 }
10199
10200 fn drop_without_shutdown(mut self) {
10201 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10203 std::mem::forget(self);
10205 }
10206}
10207
10208impl FileResizeResponder {
10209 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10213 let _result = self.send_raw(result);
10214 if _result.is_err() {
10215 self.control_handle.shutdown();
10216 }
10217 self.drop_without_shutdown();
10218 _result
10219 }
10220
10221 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10223 let _result = self.send_raw(result);
10224 self.drop_without_shutdown();
10225 _result
10226 }
10227
10228 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10229 self.control_handle
10230 .inner
10231 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10232 result,
10233 self.tx_id,
10234 0x2b80825f0535743a,
10235 fidl::encoding::DynamicFlags::empty(),
10236 )
10237 }
10238}
10239
10240#[must_use = "FIDL methods require a response to be sent"]
10241#[derive(Debug)]
10242pub struct FileGetBackingMemoryResponder {
10243 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10244 tx_id: u32,
10245}
10246
10247impl std::ops::Drop for FileGetBackingMemoryResponder {
10251 fn drop(&mut self) {
10252 self.control_handle.shutdown();
10253 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10255 }
10256}
10257
10258impl fdomain_client::fidl::Responder for FileGetBackingMemoryResponder {
10259 type ControlHandle = FileControlHandle;
10260
10261 fn control_handle(&self) -> &FileControlHandle {
10262 &self.control_handle
10263 }
10264
10265 fn drop_without_shutdown(mut self) {
10266 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10268 std::mem::forget(self);
10270 }
10271}
10272
10273impl FileGetBackingMemoryResponder {
10274 pub fn send(self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10278 let _result = self.send_raw(result);
10279 if _result.is_err() {
10280 self.control_handle.shutdown();
10281 }
10282 self.drop_without_shutdown();
10283 _result
10284 }
10285
10286 pub fn send_no_shutdown_on_err(
10288 self,
10289 mut result: Result<fdomain_client::Vmo, i32>,
10290 ) -> Result<(), fidl::Error> {
10291 let _result = self.send_raw(result);
10292 self.drop_without_shutdown();
10293 _result
10294 }
10295
10296 fn send_raw(&self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10297 self.control_handle
10298 .inner
10299 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
10300 result.map(|vmo| (vmo,)),
10301 self.tx_id,
10302 0xa6a9e654cbf62b,
10303 fidl::encoding::DynamicFlags::empty(),
10304 )
10305 }
10306}
10307
10308#[must_use = "FIDL methods require a response to be sent"]
10309#[derive(Debug)]
10310pub struct FileAllocateResponder {
10311 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10312 tx_id: u32,
10313}
10314
10315impl std::ops::Drop for FileAllocateResponder {
10319 fn drop(&mut self) {
10320 self.control_handle.shutdown();
10321 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10323 }
10324}
10325
10326impl fdomain_client::fidl::Responder for FileAllocateResponder {
10327 type ControlHandle = FileControlHandle;
10328
10329 fn control_handle(&self) -> &FileControlHandle {
10330 &self.control_handle
10331 }
10332
10333 fn drop_without_shutdown(mut self) {
10334 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10336 std::mem::forget(self);
10338 }
10339}
10340
10341impl FileAllocateResponder {
10342 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10346 let _result = self.send_raw(result);
10347 if _result.is_err() {
10348 self.control_handle.shutdown();
10349 }
10350 self.drop_without_shutdown();
10351 _result
10352 }
10353
10354 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10356 let _result = self.send_raw(result);
10357 self.drop_without_shutdown();
10358 _result
10359 }
10360
10361 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10362 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10363 fidl::encoding::EmptyStruct,
10364 i32,
10365 >>(
10366 fidl::encoding::FlexibleResult::new(result),
10367 self.tx_id,
10368 0x77fa0c330b57fd2e,
10369 fidl::encoding::DynamicFlags::FLEXIBLE,
10370 )
10371 }
10372}
10373
10374#[must_use = "FIDL methods require a response to be sent"]
10375#[derive(Debug)]
10376pub struct FileEnableVerityResponder {
10377 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10378 tx_id: u32,
10379}
10380
10381impl std::ops::Drop for FileEnableVerityResponder {
10385 fn drop(&mut self) {
10386 self.control_handle.shutdown();
10387 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10389 }
10390}
10391
10392impl fdomain_client::fidl::Responder for FileEnableVerityResponder {
10393 type ControlHandle = FileControlHandle;
10394
10395 fn control_handle(&self) -> &FileControlHandle {
10396 &self.control_handle
10397 }
10398
10399 fn drop_without_shutdown(mut self) {
10400 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10402 std::mem::forget(self);
10404 }
10405}
10406
10407impl FileEnableVerityResponder {
10408 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10412 let _result = self.send_raw(result);
10413 if _result.is_err() {
10414 self.control_handle.shutdown();
10415 }
10416 self.drop_without_shutdown();
10417 _result
10418 }
10419
10420 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10422 let _result = self.send_raw(result);
10423 self.drop_without_shutdown();
10424 _result
10425 }
10426
10427 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10428 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10429 fidl::encoding::EmptyStruct,
10430 i32,
10431 >>(
10432 fidl::encoding::FlexibleResult::new(result),
10433 self.tx_id,
10434 0x2c421ec3faaeb8bb,
10435 fidl::encoding::DynamicFlags::FLEXIBLE,
10436 )
10437 }
10438}
10439
10440#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10441pub struct LinkableMarker;
10442
10443impl fdomain_client::fidl::ProtocolMarker for LinkableMarker {
10444 type Proxy = LinkableProxy;
10445 type RequestStream = LinkableRequestStream;
10446
10447 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
10448}
10449pub type LinkableLinkIntoResult = Result<(), i32>;
10450
10451pub trait LinkableProxyInterface: Send + Sync {
10452 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
10453 + Send;
10454 fn r#link_into(
10455 &self,
10456 dst_parent_token: fdomain_client::Event,
10457 dst: &str,
10458 ) -> Self::LinkIntoResponseFut;
10459}
10460
10461#[derive(Debug, Clone)]
10462pub struct LinkableProxy {
10463 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10464}
10465
10466impl fdomain_client::fidl::Proxy for LinkableProxy {
10467 type Protocol = LinkableMarker;
10468
10469 fn from_channel(inner: fdomain_client::Channel) -> Self {
10470 Self::new(inner)
10471 }
10472
10473 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10474 self.client.into_channel().map_err(|client| Self { client })
10475 }
10476
10477 fn as_channel(&self) -> &fdomain_client::Channel {
10478 self.client.as_channel()
10479 }
10480}
10481
10482impl LinkableProxy {
10483 pub fn new(channel: fdomain_client::Channel) -> Self {
10485 let protocol_name = <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10486 Self { client: fidl::client::Client::new(channel, protocol_name) }
10487 }
10488
10489 pub fn take_event_stream(&self) -> LinkableEventStream {
10495 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
10496 }
10497
10498 pub fn r#link_into(
10521 &self,
10522 mut dst_parent_token: fdomain_client::Event,
10523 mut dst: &str,
10524 ) -> fidl::client::QueryResponseFut<
10525 LinkableLinkIntoResult,
10526 fdomain_client::fidl::FDomainResourceDialect,
10527 > {
10528 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
10529 }
10530}
10531
10532impl LinkableProxyInterface for LinkableProxy {
10533 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
10534 LinkableLinkIntoResult,
10535 fdomain_client::fidl::FDomainResourceDialect,
10536 >;
10537 fn r#link_into(
10538 &self,
10539 mut dst_parent_token: fdomain_client::Event,
10540 mut dst: &str,
10541 ) -> Self::LinkIntoResponseFut {
10542 fn _decode(
10543 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10544 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
10545 let _response = fidl::client::decode_transaction_body::<
10546 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10547 fdomain_client::fidl::FDomainResourceDialect,
10548 0x54f3949246a03e74,
10549 >(_buf?)?;
10550 Ok(_response.map(|x| x))
10551 }
10552 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
10553 (dst_parent_token, dst),
10554 0x54f3949246a03e74,
10555 fidl::encoding::DynamicFlags::empty(),
10556 _decode,
10557 )
10558 }
10559}
10560
10561pub struct LinkableEventStream {
10562 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
10563}
10564
10565impl std::marker::Unpin for LinkableEventStream {}
10566
10567impl futures::stream::FusedStream for LinkableEventStream {
10568 fn is_terminated(&self) -> bool {
10569 self.event_receiver.is_terminated()
10570 }
10571}
10572
10573impl futures::Stream for LinkableEventStream {
10574 type Item = Result<LinkableEvent, fidl::Error>;
10575
10576 fn poll_next(
10577 mut self: std::pin::Pin<&mut Self>,
10578 cx: &mut std::task::Context<'_>,
10579 ) -> std::task::Poll<Option<Self::Item>> {
10580 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10581 &mut self.event_receiver,
10582 cx
10583 )?) {
10584 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
10585 None => std::task::Poll::Ready(None),
10586 }
10587 }
10588}
10589
10590#[derive(Debug)]
10591pub enum LinkableEvent {}
10592
10593impl LinkableEvent {
10594 fn decode(
10596 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10597 ) -> Result<LinkableEvent, fidl::Error> {
10598 let (bytes, _handles) = buf.split_mut();
10599 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10600 debug_assert_eq!(tx_header.tx_id, 0);
10601 match tx_header.ordinal {
10602 _ => Err(fidl::Error::UnknownOrdinal {
10603 ordinal: tx_header.ordinal,
10604 protocol_name: <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10605 }),
10606 }
10607 }
10608}
10609
10610pub struct LinkableRequestStream {
10612 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10613 is_terminated: bool,
10614}
10615
10616impl std::marker::Unpin for LinkableRequestStream {}
10617
10618impl futures::stream::FusedStream for LinkableRequestStream {
10619 fn is_terminated(&self) -> bool {
10620 self.is_terminated
10621 }
10622}
10623
10624impl fdomain_client::fidl::RequestStream for LinkableRequestStream {
10625 type Protocol = LinkableMarker;
10626 type ControlHandle = LinkableControlHandle;
10627
10628 fn from_channel(channel: fdomain_client::Channel) -> Self {
10629 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10630 }
10631
10632 fn control_handle(&self) -> Self::ControlHandle {
10633 LinkableControlHandle { inner: self.inner.clone() }
10634 }
10635
10636 fn into_inner(
10637 self,
10638 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
10639 {
10640 (self.inner, self.is_terminated)
10641 }
10642
10643 fn from_inner(
10644 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10645 is_terminated: bool,
10646 ) -> Self {
10647 Self { inner, is_terminated }
10648 }
10649}
10650
10651impl futures::Stream for LinkableRequestStream {
10652 type Item = Result<LinkableRequest, fidl::Error>;
10653
10654 fn poll_next(
10655 mut self: std::pin::Pin<&mut Self>,
10656 cx: &mut std::task::Context<'_>,
10657 ) -> std::task::Poll<Option<Self::Item>> {
10658 let this = &mut *self;
10659 if this.inner.check_shutdown(cx) {
10660 this.is_terminated = true;
10661 return std::task::Poll::Ready(None);
10662 }
10663 if this.is_terminated {
10664 panic!("polled LinkableRequestStream after completion");
10665 }
10666 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
10667 |bytes, handles| {
10668 match this.inner.channel().read_etc(cx, bytes, handles) {
10669 std::task::Poll::Ready(Ok(())) => {}
10670 std::task::Poll::Pending => return std::task::Poll::Pending,
10671 std::task::Poll::Ready(Err(None)) => {
10672 this.is_terminated = true;
10673 return std::task::Poll::Ready(None);
10674 }
10675 std::task::Poll::Ready(Err(Some(e))) => {
10676 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10677 e.into(),
10678 ))))
10679 }
10680 }
10681
10682 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10684
10685 std::task::Poll::Ready(Some(match header.ordinal {
10686 0x54f3949246a03e74 => {
10687 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10688 let mut req = fidl::new_empty!(
10689 LinkableLinkIntoRequest,
10690 fdomain_client::fidl::FDomainResourceDialect
10691 );
10692 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
10693 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
10694 Ok(LinkableRequest::LinkInto {
10695 dst_parent_token: req.dst_parent_token,
10696 dst: req.dst,
10697
10698 responder: LinkableLinkIntoResponder {
10699 control_handle: std::mem::ManuallyDrop::new(control_handle),
10700 tx_id: header.tx_id,
10701 },
10702 })
10703 }
10704 _ => Err(fidl::Error::UnknownOrdinal {
10705 ordinal: header.ordinal,
10706 protocol_name:
10707 <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10708 }),
10709 }))
10710 },
10711 )
10712 }
10713}
10714
10715#[derive(Debug)]
10716pub enum LinkableRequest {
10717 LinkInto {
10740 dst_parent_token: fdomain_client::Event,
10741 dst: String,
10742 responder: LinkableLinkIntoResponder,
10743 },
10744}
10745
10746impl LinkableRequest {
10747 #[allow(irrefutable_let_patterns)]
10748 pub fn into_link_into(
10749 self,
10750 ) -> Option<(fdomain_client::Event, String, LinkableLinkIntoResponder)> {
10751 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
10752 Some((dst_parent_token, dst, responder))
10753 } else {
10754 None
10755 }
10756 }
10757
10758 pub fn method_name(&self) -> &'static str {
10760 match *self {
10761 LinkableRequest::LinkInto { .. } => "link_into",
10762 }
10763 }
10764}
10765
10766#[derive(Debug, Clone)]
10767pub struct LinkableControlHandle {
10768 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10769}
10770
10771impl fdomain_client::fidl::ControlHandle for LinkableControlHandle {
10772 fn shutdown(&self) {
10773 self.inner.shutdown()
10774 }
10775
10776 fn is_closed(&self) -> bool {
10777 self.inner.channel().is_closed()
10778 }
10779 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
10780 self.inner.channel().on_closed()
10781 }
10782}
10783
10784impl LinkableControlHandle {}
10785
10786#[must_use = "FIDL methods require a response to be sent"]
10787#[derive(Debug)]
10788pub struct LinkableLinkIntoResponder {
10789 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
10790 tx_id: u32,
10791}
10792
10793impl std::ops::Drop for LinkableLinkIntoResponder {
10797 fn drop(&mut self) {
10798 self.control_handle.shutdown();
10799 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10801 }
10802}
10803
10804impl fdomain_client::fidl::Responder for LinkableLinkIntoResponder {
10805 type ControlHandle = LinkableControlHandle;
10806
10807 fn control_handle(&self) -> &LinkableControlHandle {
10808 &self.control_handle
10809 }
10810
10811 fn drop_without_shutdown(mut self) {
10812 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10814 std::mem::forget(self);
10816 }
10817}
10818
10819impl LinkableLinkIntoResponder {
10820 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10824 let _result = self.send_raw(result);
10825 if _result.is_err() {
10826 self.control_handle.shutdown();
10827 }
10828 self.drop_without_shutdown();
10829 _result
10830 }
10831
10832 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10834 let _result = self.send_raw(result);
10835 self.drop_without_shutdown();
10836 _result
10837 }
10838
10839 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10840 self.control_handle
10841 .inner
10842 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10843 result,
10844 self.tx_id,
10845 0x54f3949246a03e74,
10846 fidl::encoding::DynamicFlags::empty(),
10847 )
10848 }
10849}
10850
10851#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10852pub struct NodeMarker;
10853
10854impl fdomain_client::fidl::ProtocolMarker for NodeMarker {
10855 type Proxy = NodeProxy;
10856 type RequestStream = NodeRequestStream;
10857
10858 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
10859}
10860impl fdomain_client::fidl::DiscoverableProtocolMarker for NodeMarker {}
10861pub type NodeGetFlagsResult = Result<Flags, i32>;
10862pub type NodeSetFlagsResult = Result<(), i32>;
10863pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
10864pub type NodeUpdateAttributesResult = Result<(), i32>;
10865pub type NodeSyncResult = Result<(), i32>;
10866pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
10867pub type NodeSetExtendedAttributeResult = Result<(), i32>;
10868pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
10869
10870pub trait NodeProxyInterface: Send + Sync {
10871 fn r#clone(
10872 &self,
10873 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10874 ) -> Result<(), fidl::Error>;
10875 type CloseResponseFut: std::future::Future<
10876 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
10877 > + Send;
10878 fn r#close(&self) -> Self::CloseResponseFut;
10879 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
10880 fn r#query(&self) -> Self::QueryResponseFut;
10881 fn r#deprecated_clone(
10882 &self,
10883 flags: OpenFlags,
10884 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10885 ) -> Result<(), fidl::Error>;
10886 type GetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
10887 + Send;
10888 fn r#get_attr(&self) -> Self::GetAttrResponseFut;
10889 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
10890 fn r#deprecated_set_attr(
10891 &self,
10892 flags: NodeAttributeFlags,
10893 attributes: &NodeAttributes,
10894 ) -> Self::DeprecatedSetAttrResponseFut;
10895 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
10896 + Send;
10897 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
10898 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
10899 + Send;
10900 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
10901 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
10902 + Send;
10903 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
10904 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
10905 + Send;
10906 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
10907 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
10908 + Send;
10909 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
10910 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
10911 + Send;
10912 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
10913 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
10914 + Send;
10915 fn r#update_attributes(
10916 &self,
10917 payload: &MutableNodeAttributes,
10918 ) -> Self::UpdateAttributesResponseFut;
10919 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
10920 fn r#sync(&self) -> Self::SyncResponseFut;
10921 fn r#list_extended_attributes(
10922 &self,
10923 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
10924 ) -> Result<(), fidl::Error>;
10925 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
10926 + Send;
10927 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
10928 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
10929 + Send;
10930 fn r#set_extended_attribute(
10931 &self,
10932 name: &[u8],
10933 value: ExtendedAttributeValue,
10934 mode: SetExtendedAttributeMode,
10935 ) -> Self::SetExtendedAttributeResponseFut;
10936 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
10937 + Send;
10938 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
10939}
10940
10941#[derive(Debug, Clone)]
10942pub struct NodeProxy {
10943 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10944}
10945
10946impl fdomain_client::fidl::Proxy for NodeProxy {
10947 type Protocol = NodeMarker;
10948
10949 fn from_channel(inner: fdomain_client::Channel) -> Self {
10950 Self::new(inner)
10951 }
10952
10953 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10954 self.client.into_channel().map_err(|client| Self { client })
10955 }
10956
10957 fn as_channel(&self) -> &fdomain_client::Channel {
10958 self.client.as_channel()
10959 }
10960}
10961
10962impl NodeProxy {
10963 pub fn new(channel: fdomain_client::Channel) -> Self {
10965 let protocol_name = <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10966 Self { client: fidl::client::Client::new(channel, protocol_name) }
10967 }
10968
10969 pub fn take_event_stream(&self) -> NodeEventStream {
10975 NodeEventStream { event_receiver: self.client.take_event_receiver() }
10976 }
10977
10978 pub fn r#clone(
10979 &self,
10980 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10981 ) -> Result<(), fidl::Error> {
10982 NodeProxyInterface::r#clone(self, request)
10983 }
10984
10985 pub fn r#close(
10996 &self,
10997 ) -> fidl::client::QueryResponseFut<
10998 fdomain_fuchsia_unknown::CloseableCloseResult,
10999 fdomain_client::fidl::FDomainResourceDialect,
11000 > {
11001 NodeProxyInterface::r#close(self)
11002 }
11003
11004 pub fn r#query(
11005 &self,
11006 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
11007 NodeProxyInterface::r#query(self)
11008 }
11009
11010 pub fn r#deprecated_clone(
11012 &self,
11013 mut flags: OpenFlags,
11014 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11015 ) -> Result<(), fidl::Error> {
11016 NodeProxyInterface::r#deprecated_clone(self, flags, object)
11017 }
11018
11019 pub fn r#get_attr(
11023 &self,
11024 ) -> fidl::client::QueryResponseFut<
11025 (i32, NodeAttributes),
11026 fdomain_client::fidl::FDomainResourceDialect,
11027 > {
11028 NodeProxyInterface::r#get_attr(self)
11029 }
11030
11031 pub fn r#deprecated_set_attr(
11033 &self,
11034 mut flags: NodeAttributeFlags,
11035 mut attributes: &NodeAttributes,
11036 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
11037 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
11038 }
11039
11040 pub fn r#deprecated_get_flags(
11042 &self,
11043 ) -> fidl::client::QueryResponseFut<
11044 (i32, OpenFlags),
11045 fdomain_client::fidl::FDomainResourceDialect,
11046 > {
11047 NodeProxyInterface::r#deprecated_get_flags(self)
11048 }
11049
11050 pub fn r#deprecated_set_flags(
11052 &self,
11053 mut flags: OpenFlags,
11054 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
11055 NodeProxyInterface::r#deprecated_set_flags(self, flags)
11056 }
11057
11058 pub fn r#get_flags(
11067 &self,
11068 ) -> fidl::client::QueryResponseFut<
11069 NodeGetFlagsResult,
11070 fdomain_client::fidl::FDomainResourceDialect,
11071 > {
11072 NodeProxyInterface::r#get_flags(self)
11073 }
11074
11075 pub fn r#set_flags(
11085 &self,
11086 mut flags: Flags,
11087 ) -> fidl::client::QueryResponseFut<
11088 NodeSetFlagsResult,
11089 fdomain_client::fidl::FDomainResourceDialect,
11090 > {
11091 NodeProxyInterface::r#set_flags(self, flags)
11092 }
11093
11094 pub fn r#query_filesystem(
11096 &self,
11097 ) -> fidl::client::QueryResponseFut<
11098 (i32, Option<Box<FilesystemInfo>>),
11099 fdomain_client::fidl::FDomainResourceDialect,
11100 > {
11101 NodeProxyInterface::r#query_filesystem(self)
11102 }
11103
11104 pub fn r#get_attributes(
11118 &self,
11119 mut query: NodeAttributesQuery,
11120 ) -> fidl::client::QueryResponseFut<
11121 NodeGetAttributesResult,
11122 fdomain_client::fidl::FDomainResourceDialect,
11123 > {
11124 NodeProxyInterface::r#get_attributes(self, query)
11125 }
11126
11127 pub fn r#update_attributes(
11136 &self,
11137 mut payload: &MutableNodeAttributes,
11138 ) -> fidl::client::QueryResponseFut<
11139 NodeUpdateAttributesResult,
11140 fdomain_client::fidl::FDomainResourceDialect,
11141 > {
11142 NodeProxyInterface::r#update_attributes(self, payload)
11143 }
11144
11145 pub fn r#sync(
11155 &self,
11156 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
11157 {
11158 NodeProxyInterface::r#sync(self)
11159 }
11160
11161 pub fn r#list_extended_attributes(
11170 &self,
11171 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11172 ) -> Result<(), fidl::Error> {
11173 NodeProxyInterface::r#list_extended_attributes(self, iterator)
11174 }
11175
11176 pub fn r#get_extended_attribute(
11183 &self,
11184 mut name: &[u8],
11185 ) -> fidl::client::QueryResponseFut<
11186 NodeGetExtendedAttributeResult,
11187 fdomain_client::fidl::FDomainResourceDialect,
11188 > {
11189 NodeProxyInterface::r#get_extended_attribute(self, name)
11190 }
11191
11192 pub fn r#set_extended_attribute(
11200 &self,
11201 mut name: &[u8],
11202 mut value: ExtendedAttributeValue,
11203 mut mode: SetExtendedAttributeMode,
11204 ) -> fidl::client::QueryResponseFut<
11205 NodeSetExtendedAttributeResult,
11206 fdomain_client::fidl::FDomainResourceDialect,
11207 > {
11208 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
11209 }
11210
11211 pub fn r#remove_extended_attribute(
11217 &self,
11218 mut name: &[u8],
11219 ) -> fidl::client::QueryResponseFut<
11220 NodeRemoveExtendedAttributeResult,
11221 fdomain_client::fidl::FDomainResourceDialect,
11222 > {
11223 NodeProxyInterface::r#remove_extended_attribute(self, name)
11224 }
11225}
11226
11227impl NodeProxyInterface for NodeProxy {
11228 fn r#clone(
11229 &self,
11230 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
11231 ) -> Result<(), fidl::Error> {
11232 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
11233 (request,),
11234 0x20d8a7aba2168a79,
11235 fidl::encoding::DynamicFlags::empty(),
11236 )
11237 }
11238
11239 type CloseResponseFut = fidl::client::QueryResponseFut<
11240 fdomain_fuchsia_unknown::CloseableCloseResult,
11241 fdomain_client::fidl::FDomainResourceDialect,
11242 >;
11243 fn r#close(&self) -> Self::CloseResponseFut {
11244 fn _decode(
11245 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11246 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
11247 let _response = fidl::client::decode_transaction_body::<
11248 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11249 fdomain_client::fidl::FDomainResourceDialect,
11250 0x5ac5d459ad7f657e,
11251 >(_buf?)?;
11252 Ok(_response.map(|x| x))
11253 }
11254 self.client.send_query_and_decode::<
11255 fidl::encoding::EmptyPayload,
11256 fdomain_fuchsia_unknown::CloseableCloseResult,
11257 >(
11258 (),
11259 0x5ac5d459ad7f657e,
11260 fidl::encoding::DynamicFlags::empty(),
11261 _decode,
11262 )
11263 }
11264
11265 type QueryResponseFut =
11266 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
11267 fn r#query(&self) -> Self::QueryResponseFut {
11268 fn _decode(
11269 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11270 ) -> Result<Vec<u8>, fidl::Error> {
11271 let _response = fidl::client::decode_transaction_body::<
11272 fdomain_fuchsia_unknown::QueryableQueryResponse,
11273 fdomain_client::fidl::FDomainResourceDialect,
11274 0x2658edee9decfc06,
11275 >(_buf?)?;
11276 Ok(_response.protocol)
11277 }
11278 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
11279 (),
11280 0x2658edee9decfc06,
11281 fidl::encoding::DynamicFlags::empty(),
11282 _decode,
11283 )
11284 }
11285
11286 fn r#deprecated_clone(
11287 &self,
11288 mut flags: OpenFlags,
11289 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11290 ) -> Result<(), fidl::Error> {
11291 self.client.send::<NodeDeprecatedCloneRequest>(
11292 (flags, object),
11293 0x5a61678f293ce16f,
11294 fidl::encoding::DynamicFlags::FLEXIBLE,
11295 )
11296 }
11297
11298 type GetAttrResponseFut = fidl::client::QueryResponseFut<
11299 (i32, NodeAttributes),
11300 fdomain_client::fidl::FDomainResourceDialect,
11301 >;
11302 fn r#get_attr(&self) -> Self::GetAttrResponseFut {
11303 fn _decode(
11304 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11305 ) -> Result<(i32, NodeAttributes), fidl::Error> {
11306 let _response = fidl::client::decode_transaction_body::<
11307 NodeGetAttrResponse,
11308 fdomain_client::fidl::FDomainResourceDialect,
11309 0x78985e216314dafd,
11310 >(_buf?)?;
11311 Ok((_response.s, _response.attributes))
11312 }
11313 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
11314 (),
11315 0x78985e216314dafd,
11316 fidl::encoding::DynamicFlags::empty(),
11317 _decode,
11318 )
11319 }
11320
11321 type DeprecatedSetAttrResponseFut =
11322 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11323 fn r#deprecated_set_attr(
11324 &self,
11325 mut flags: NodeAttributeFlags,
11326 mut attributes: &NodeAttributes,
11327 ) -> Self::DeprecatedSetAttrResponseFut {
11328 fn _decode(
11329 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11330 ) -> Result<i32, fidl::Error> {
11331 let _response = fidl::client::decode_transaction_body::<
11332 NodeDeprecatedSetAttrResponse,
11333 fdomain_client::fidl::FDomainResourceDialect,
11334 0x4186c0f40d938f46,
11335 >(_buf?)?;
11336 Ok(_response.s)
11337 }
11338 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
11339 (flags, attributes),
11340 0x4186c0f40d938f46,
11341 fidl::encoding::DynamicFlags::empty(),
11342 _decode,
11343 )
11344 }
11345
11346 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
11347 (i32, OpenFlags),
11348 fdomain_client::fidl::FDomainResourceDialect,
11349 >;
11350 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
11351 fn _decode(
11352 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11353 ) -> Result<(i32, OpenFlags), fidl::Error> {
11354 let _response = fidl::client::decode_transaction_body::<
11355 NodeDeprecatedGetFlagsResponse,
11356 fdomain_client::fidl::FDomainResourceDialect,
11357 0x5b88fffb8eda3aa1,
11358 >(_buf?)?;
11359 Ok((_response.s, _response.flags))
11360 }
11361 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
11362 (),
11363 0x5b88fffb8eda3aa1,
11364 fidl::encoding::DynamicFlags::empty(),
11365 _decode,
11366 )
11367 }
11368
11369 type DeprecatedSetFlagsResponseFut =
11370 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11371 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
11372 fn _decode(
11373 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11374 ) -> Result<i32, fidl::Error> {
11375 let _response = fidl::client::decode_transaction_body::<
11376 NodeDeprecatedSetFlagsResponse,
11377 fdomain_client::fidl::FDomainResourceDialect,
11378 0x5295b76c71fde733,
11379 >(_buf?)?;
11380 Ok(_response.s)
11381 }
11382 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
11383 (flags,),
11384 0x5295b76c71fde733,
11385 fidl::encoding::DynamicFlags::empty(),
11386 _decode,
11387 )
11388 }
11389
11390 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
11391 NodeGetFlagsResult,
11392 fdomain_client::fidl::FDomainResourceDialect,
11393 >;
11394 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
11395 fn _decode(
11396 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11397 ) -> Result<NodeGetFlagsResult, fidl::Error> {
11398 let _response = fidl::client::decode_transaction_body::<
11399 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
11400 fdomain_client::fidl::FDomainResourceDialect,
11401 0x176eb318f64ec23,
11402 >(_buf?)?
11403 .into_result_fdomain::<NodeMarker>("get_flags")?;
11404 Ok(_response.map(|x| x.flags))
11405 }
11406 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
11407 (),
11408 0x176eb318f64ec23,
11409 fidl::encoding::DynamicFlags::FLEXIBLE,
11410 _decode,
11411 )
11412 }
11413
11414 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
11415 NodeSetFlagsResult,
11416 fdomain_client::fidl::FDomainResourceDialect,
11417 >;
11418 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
11419 fn _decode(
11420 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11421 ) -> Result<NodeSetFlagsResult, fidl::Error> {
11422 let _response = fidl::client::decode_transaction_body::<
11423 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
11424 fdomain_client::fidl::FDomainResourceDialect,
11425 0x55a8028685791ea8,
11426 >(_buf?)?
11427 .into_result_fdomain::<NodeMarker>("set_flags")?;
11428 Ok(_response.map(|x| x))
11429 }
11430 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
11431 (flags,),
11432 0x55a8028685791ea8,
11433 fidl::encoding::DynamicFlags::FLEXIBLE,
11434 _decode,
11435 )
11436 }
11437
11438 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
11439 (i32, Option<Box<FilesystemInfo>>),
11440 fdomain_client::fidl::FDomainResourceDialect,
11441 >;
11442 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
11443 fn _decode(
11444 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11445 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
11446 let _response = fidl::client::decode_transaction_body::<
11447 NodeQueryFilesystemResponse,
11448 fdomain_client::fidl::FDomainResourceDialect,
11449 0x6f344a1c6b0a0610,
11450 >(_buf?)?;
11451 Ok((_response.s, _response.info))
11452 }
11453 self.client.send_query_and_decode::<
11454 fidl::encoding::EmptyPayload,
11455 (i32, Option<Box<FilesystemInfo>>),
11456 >(
11457 (),
11458 0x6f344a1c6b0a0610,
11459 fidl::encoding::DynamicFlags::empty(),
11460 _decode,
11461 )
11462 }
11463
11464 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
11465 NodeGetAttributesResult,
11466 fdomain_client::fidl::FDomainResourceDialect,
11467 >;
11468 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
11469 fn _decode(
11470 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11471 ) -> Result<NodeGetAttributesResult, fidl::Error> {
11472 let _response = fidl::client::decode_transaction_body::<
11473 fidl::encoding::ResultType<NodeAttributes2, i32>,
11474 fdomain_client::fidl::FDomainResourceDialect,
11475 0x3d4396a638ea053b,
11476 >(_buf?)?;
11477 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
11478 }
11479 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
11480 (query,),
11481 0x3d4396a638ea053b,
11482 fidl::encoding::DynamicFlags::empty(),
11483 _decode,
11484 )
11485 }
11486
11487 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
11488 NodeUpdateAttributesResult,
11489 fdomain_client::fidl::FDomainResourceDialect,
11490 >;
11491 fn r#update_attributes(
11492 &self,
11493 mut payload: &MutableNodeAttributes,
11494 ) -> Self::UpdateAttributesResponseFut {
11495 fn _decode(
11496 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11497 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
11498 let _response = fidl::client::decode_transaction_body::<
11499 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11500 fdomain_client::fidl::FDomainResourceDialect,
11501 0x3308c1da5a89bf08,
11502 >(_buf?)?;
11503 Ok(_response.map(|x| x))
11504 }
11505 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
11506 payload,
11507 0x3308c1da5a89bf08,
11508 fidl::encoding::DynamicFlags::empty(),
11509 _decode,
11510 )
11511 }
11512
11513 type SyncResponseFut = fidl::client::QueryResponseFut<
11514 NodeSyncResult,
11515 fdomain_client::fidl::FDomainResourceDialect,
11516 >;
11517 fn r#sync(&self) -> Self::SyncResponseFut {
11518 fn _decode(
11519 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11520 ) -> Result<NodeSyncResult, fidl::Error> {
11521 let _response = fidl::client::decode_transaction_body::<
11522 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11523 fdomain_client::fidl::FDomainResourceDialect,
11524 0x2c5c27ca0ab5dc49,
11525 >(_buf?)?;
11526 Ok(_response.map(|x| x))
11527 }
11528 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
11529 (),
11530 0x2c5c27ca0ab5dc49,
11531 fidl::encoding::DynamicFlags::empty(),
11532 _decode,
11533 )
11534 }
11535
11536 fn r#list_extended_attributes(
11537 &self,
11538 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11539 ) -> Result<(), fidl::Error> {
11540 self.client.send::<NodeListExtendedAttributesRequest>(
11541 (iterator,),
11542 0x4b61033de007fcd0,
11543 fidl::encoding::DynamicFlags::empty(),
11544 )
11545 }
11546
11547 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11548 NodeGetExtendedAttributeResult,
11549 fdomain_client::fidl::FDomainResourceDialect,
11550 >;
11551 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
11552 fn _decode(
11553 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11554 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
11555 let _response = fidl::client::decode_transaction_body::<
11556 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
11557 fdomain_client::fidl::FDomainResourceDialect,
11558 0x45ffa3ccfdeb76db,
11559 >(_buf?)?;
11560 Ok(_response.map(|x| x))
11561 }
11562 self.client.send_query_and_decode::<
11563 NodeGetExtendedAttributeRequest,
11564 NodeGetExtendedAttributeResult,
11565 >(
11566 (name,),
11567 0x45ffa3ccfdeb76db,
11568 fidl::encoding::DynamicFlags::empty(),
11569 _decode,
11570 )
11571 }
11572
11573 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11574 NodeSetExtendedAttributeResult,
11575 fdomain_client::fidl::FDomainResourceDialect,
11576 >;
11577 fn r#set_extended_attribute(
11578 &self,
11579 mut name: &[u8],
11580 mut value: ExtendedAttributeValue,
11581 mut mode: SetExtendedAttributeMode,
11582 ) -> Self::SetExtendedAttributeResponseFut {
11583 fn _decode(
11584 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11585 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
11586 let _response = fidl::client::decode_transaction_body::<
11587 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11588 fdomain_client::fidl::FDomainResourceDialect,
11589 0x4a951362f681f23c,
11590 >(_buf?)?;
11591 Ok(_response.map(|x| x))
11592 }
11593 self.client.send_query_and_decode::<
11594 NodeSetExtendedAttributeRequest,
11595 NodeSetExtendedAttributeResult,
11596 >(
11597 (name, &mut value, mode,),
11598 0x4a951362f681f23c,
11599 fidl::encoding::DynamicFlags::empty(),
11600 _decode,
11601 )
11602 }
11603
11604 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11605 NodeRemoveExtendedAttributeResult,
11606 fdomain_client::fidl::FDomainResourceDialect,
11607 >;
11608 fn r#remove_extended_attribute(
11609 &self,
11610 mut name: &[u8],
11611 ) -> Self::RemoveExtendedAttributeResponseFut {
11612 fn _decode(
11613 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11614 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
11615 let _response = fidl::client::decode_transaction_body::<
11616 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11617 fdomain_client::fidl::FDomainResourceDialect,
11618 0x7a0b9f3a9bf9032d,
11619 >(_buf?)?;
11620 Ok(_response.map(|x| x))
11621 }
11622 self.client.send_query_and_decode::<
11623 NodeRemoveExtendedAttributeRequest,
11624 NodeRemoveExtendedAttributeResult,
11625 >(
11626 (name,),
11627 0x7a0b9f3a9bf9032d,
11628 fidl::encoding::DynamicFlags::empty(),
11629 _decode,
11630 )
11631 }
11632}
11633
11634pub struct NodeEventStream {
11635 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
11636}
11637
11638impl std::marker::Unpin for NodeEventStream {}
11639
11640impl futures::stream::FusedStream for NodeEventStream {
11641 fn is_terminated(&self) -> bool {
11642 self.event_receiver.is_terminated()
11643 }
11644}
11645
11646impl futures::Stream for NodeEventStream {
11647 type Item = Result<NodeEvent, fidl::Error>;
11648
11649 fn poll_next(
11650 mut self: std::pin::Pin<&mut Self>,
11651 cx: &mut std::task::Context<'_>,
11652 ) -> std::task::Poll<Option<Self::Item>> {
11653 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
11654 &mut self.event_receiver,
11655 cx
11656 )?) {
11657 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
11658 None => std::task::Poll::Ready(None),
11659 }
11660 }
11661}
11662
11663#[derive(Debug)]
11664pub enum NodeEvent {
11665 OnOpen_ {
11666 s: i32,
11667 info: Option<Box<NodeInfoDeprecated>>,
11668 },
11669 OnRepresentation {
11670 payload: Representation,
11671 },
11672 #[non_exhaustive]
11673 _UnknownEvent {
11674 ordinal: u64,
11676 },
11677}
11678
11679impl NodeEvent {
11680 #[allow(irrefutable_let_patterns)]
11681 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
11682 if let NodeEvent::OnOpen_ { s, info } = self {
11683 Some((s, info))
11684 } else {
11685 None
11686 }
11687 }
11688 #[allow(irrefutable_let_patterns)]
11689 pub fn into_on_representation(self) -> Option<Representation> {
11690 if let NodeEvent::OnRepresentation { payload } = self {
11691 Some((payload))
11692 } else {
11693 None
11694 }
11695 }
11696
11697 fn decode(
11699 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
11700 ) -> Result<NodeEvent, fidl::Error> {
11701 let (bytes, _handles) = buf.split_mut();
11702 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11703 debug_assert_eq!(tx_header.tx_id, 0);
11704 match tx_header.ordinal {
11705 0x7fc7bbb1dbfd1972 => {
11706 let mut out = fidl::new_empty!(
11707 NodeOnOpenRequest,
11708 fdomain_client::fidl::FDomainResourceDialect
11709 );
11710 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
11711 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
11712 }
11713 0x5cb40567d80a510c => {
11714 let mut out =
11715 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
11716 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
11717 Ok((NodeEvent::OnRepresentation { payload: out }))
11718 }
11719 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
11720 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
11721 }
11722 _ => Err(fidl::Error::UnknownOrdinal {
11723 ordinal: tx_header.ordinal,
11724 protocol_name: <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
11725 }),
11726 }
11727 }
11728}
11729
11730pub struct NodeRequestStream {
11732 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11733 is_terminated: bool,
11734}
11735
11736impl std::marker::Unpin for NodeRequestStream {}
11737
11738impl futures::stream::FusedStream for NodeRequestStream {
11739 fn is_terminated(&self) -> bool {
11740 self.is_terminated
11741 }
11742}
11743
11744impl fdomain_client::fidl::RequestStream for NodeRequestStream {
11745 type Protocol = NodeMarker;
11746 type ControlHandle = NodeControlHandle;
11747
11748 fn from_channel(channel: fdomain_client::Channel) -> Self {
11749 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
11750 }
11751
11752 fn control_handle(&self) -> Self::ControlHandle {
11753 NodeControlHandle { inner: self.inner.clone() }
11754 }
11755
11756 fn into_inner(
11757 self,
11758 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
11759 {
11760 (self.inner, self.is_terminated)
11761 }
11762
11763 fn from_inner(
11764 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11765 is_terminated: bool,
11766 ) -> Self {
11767 Self { inner, is_terminated }
11768 }
11769}
11770
11771impl futures::Stream for NodeRequestStream {
11772 type Item = Result<NodeRequest, fidl::Error>;
11773
11774 fn poll_next(
11775 mut self: std::pin::Pin<&mut Self>,
11776 cx: &mut std::task::Context<'_>,
11777 ) -> std::task::Poll<Option<Self::Item>> {
11778 let this = &mut *self;
11779 if this.inner.check_shutdown(cx) {
11780 this.is_terminated = true;
11781 return std::task::Poll::Ready(None);
11782 }
11783 if this.is_terminated {
11784 panic!("polled NodeRequestStream after completion");
11785 }
11786 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
11787 |bytes, handles| {
11788 match this.inner.channel().read_etc(cx, bytes, handles) {
11789 std::task::Poll::Ready(Ok(())) => {}
11790 std::task::Poll::Pending => return std::task::Poll::Pending,
11791 std::task::Poll::Ready(Err(None)) => {
11792 this.is_terminated = true;
11793 return std::task::Poll::Ready(None);
11794 }
11795 std::task::Poll::Ready(Err(Some(e))) => {
11796 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
11797 e.into(),
11798 ))))
11799 }
11800 }
11801
11802 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11804
11805 std::task::Poll::Ready(Some(match header.ordinal {
11806 0x20d8a7aba2168a79 => {
11807 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11808 let mut req = fidl::new_empty!(
11809 fdomain_fuchsia_unknown::CloneableCloneRequest,
11810 fdomain_client::fidl::FDomainResourceDialect
11811 );
11812 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11813 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11814 Ok(NodeRequest::Clone { request: req.request, control_handle })
11815 }
11816 0x5ac5d459ad7f657e => {
11817 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11818 let mut req = fidl::new_empty!(
11819 fidl::encoding::EmptyPayload,
11820 fdomain_client::fidl::FDomainResourceDialect
11821 );
11822 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11823 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11824 Ok(NodeRequest::Close {
11825 responder: NodeCloseResponder {
11826 control_handle: std::mem::ManuallyDrop::new(control_handle),
11827 tx_id: header.tx_id,
11828 },
11829 })
11830 }
11831 0x2658edee9decfc06 => {
11832 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11833 let mut req = fidl::new_empty!(
11834 fidl::encoding::EmptyPayload,
11835 fdomain_client::fidl::FDomainResourceDialect
11836 );
11837 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11838 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11839 Ok(NodeRequest::Query {
11840 responder: NodeQueryResponder {
11841 control_handle: std::mem::ManuallyDrop::new(control_handle),
11842 tx_id: header.tx_id,
11843 },
11844 })
11845 }
11846 0x5a61678f293ce16f => {
11847 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11848 let mut req = fidl::new_empty!(
11849 NodeDeprecatedCloneRequest,
11850 fdomain_client::fidl::FDomainResourceDialect
11851 );
11852 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11853 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11854 Ok(NodeRequest::DeprecatedClone {
11855 flags: req.flags,
11856 object: req.object,
11857
11858 control_handle,
11859 })
11860 }
11861 0x78985e216314dafd => {
11862 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11863 let mut req = fidl::new_empty!(
11864 fidl::encoding::EmptyPayload,
11865 fdomain_client::fidl::FDomainResourceDialect
11866 );
11867 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11868 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11869 Ok(NodeRequest::GetAttr {
11870 responder: NodeGetAttrResponder {
11871 control_handle: std::mem::ManuallyDrop::new(control_handle),
11872 tx_id: header.tx_id,
11873 },
11874 })
11875 }
11876 0x4186c0f40d938f46 => {
11877 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11878 let mut req = fidl::new_empty!(
11879 NodeDeprecatedSetAttrRequest,
11880 fdomain_client::fidl::FDomainResourceDialect
11881 );
11882 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
11883 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11884 Ok(NodeRequest::DeprecatedSetAttr {
11885 flags: req.flags,
11886 attributes: req.attributes,
11887
11888 responder: NodeDeprecatedSetAttrResponder {
11889 control_handle: std::mem::ManuallyDrop::new(control_handle),
11890 tx_id: header.tx_id,
11891 },
11892 })
11893 }
11894 0x5b88fffb8eda3aa1 => {
11895 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11896 let mut req = fidl::new_empty!(
11897 fidl::encoding::EmptyPayload,
11898 fdomain_client::fidl::FDomainResourceDialect
11899 );
11900 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11901 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11902 Ok(NodeRequest::DeprecatedGetFlags {
11903 responder: NodeDeprecatedGetFlagsResponder {
11904 control_handle: std::mem::ManuallyDrop::new(control_handle),
11905 tx_id: header.tx_id,
11906 },
11907 })
11908 }
11909 0x5295b76c71fde733 => {
11910 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11911 let mut req = fidl::new_empty!(
11912 NodeDeprecatedSetFlagsRequest,
11913 fdomain_client::fidl::FDomainResourceDialect
11914 );
11915 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11916 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11917 Ok(NodeRequest::DeprecatedSetFlags {
11918 flags: req.flags,
11919
11920 responder: NodeDeprecatedSetFlagsResponder {
11921 control_handle: std::mem::ManuallyDrop::new(control_handle),
11922 tx_id: header.tx_id,
11923 },
11924 })
11925 }
11926 0x176eb318f64ec23 => {
11927 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11928 let mut req = fidl::new_empty!(
11929 fidl::encoding::EmptyPayload,
11930 fdomain_client::fidl::FDomainResourceDialect
11931 );
11932 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11933 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11934 Ok(NodeRequest::GetFlags {
11935 responder: NodeGetFlagsResponder {
11936 control_handle: std::mem::ManuallyDrop::new(control_handle),
11937 tx_id: header.tx_id,
11938 },
11939 })
11940 }
11941 0x55a8028685791ea8 => {
11942 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11943 let mut req = fidl::new_empty!(
11944 NodeSetFlagsRequest,
11945 fdomain_client::fidl::FDomainResourceDialect
11946 );
11947 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11948 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11949 Ok(NodeRequest::SetFlags {
11950 flags: req.flags,
11951
11952 responder: NodeSetFlagsResponder {
11953 control_handle: std::mem::ManuallyDrop::new(control_handle),
11954 tx_id: header.tx_id,
11955 },
11956 })
11957 }
11958 0x6f344a1c6b0a0610 => {
11959 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11960 let mut req = fidl::new_empty!(
11961 fidl::encoding::EmptyPayload,
11962 fdomain_client::fidl::FDomainResourceDialect
11963 );
11964 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11965 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11966 Ok(NodeRequest::QueryFilesystem {
11967 responder: NodeQueryFilesystemResponder {
11968 control_handle: std::mem::ManuallyDrop::new(control_handle),
11969 tx_id: header.tx_id,
11970 },
11971 })
11972 }
11973 0x3d4396a638ea053b => {
11974 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11975 let mut req = fidl::new_empty!(
11976 NodeGetAttributesRequest,
11977 fdomain_client::fidl::FDomainResourceDialect
11978 );
11979 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11980 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11981 Ok(NodeRequest::GetAttributes {
11982 query: req.query,
11983
11984 responder: NodeGetAttributesResponder {
11985 control_handle: std::mem::ManuallyDrop::new(control_handle),
11986 tx_id: header.tx_id,
11987 },
11988 })
11989 }
11990 0x3308c1da5a89bf08 => {
11991 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11992 let mut req = fidl::new_empty!(
11993 MutableNodeAttributes,
11994 fdomain_client::fidl::FDomainResourceDialect
11995 );
11996 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
11997 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11998 Ok(NodeRequest::UpdateAttributes {
11999 payload: req,
12000 responder: NodeUpdateAttributesResponder {
12001 control_handle: std::mem::ManuallyDrop::new(control_handle),
12002 tx_id: header.tx_id,
12003 },
12004 })
12005 }
12006 0x2c5c27ca0ab5dc49 => {
12007 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12008 let mut req = fidl::new_empty!(
12009 fidl::encoding::EmptyPayload,
12010 fdomain_client::fidl::FDomainResourceDialect
12011 );
12012 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
12013 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12014 Ok(NodeRequest::Sync {
12015 responder: NodeSyncResponder {
12016 control_handle: std::mem::ManuallyDrop::new(control_handle),
12017 tx_id: header.tx_id,
12018 },
12019 })
12020 }
12021 0x4b61033de007fcd0 => {
12022 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
12023 let mut req = fidl::new_empty!(
12024 NodeListExtendedAttributesRequest,
12025 fdomain_client::fidl::FDomainResourceDialect
12026 );
12027 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
12028 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12029 Ok(NodeRequest::ListExtendedAttributes {
12030 iterator: req.iterator,
12031
12032 control_handle,
12033 })
12034 }
12035 0x45ffa3ccfdeb76db => {
12036 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12037 let mut req = fidl::new_empty!(
12038 NodeGetExtendedAttributeRequest,
12039 fdomain_client::fidl::FDomainResourceDialect
12040 );
12041 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12042 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12043 Ok(NodeRequest::GetExtendedAttribute {
12044 name: req.name,
12045
12046 responder: NodeGetExtendedAttributeResponder {
12047 control_handle: std::mem::ManuallyDrop::new(control_handle),
12048 tx_id: header.tx_id,
12049 },
12050 })
12051 }
12052 0x4a951362f681f23c => {
12053 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12054 let mut req = fidl::new_empty!(
12055 NodeSetExtendedAttributeRequest,
12056 fdomain_client::fidl::FDomainResourceDialect
12057 );
12058 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12059 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12060 Ok(NodeRequest::SetExtendedAttribute {
12061 name: req.name,
12062 value: req.value,
12063 mode: req.mode,
12064
12065 responder: NodeSetExtendedAttributeResponder {
12066 control_handle: std::mem::ManuallyDrop::new(control_handle),
12067 tx_id: header.tx_id,
12068 },
12069 })
12070 }
12071 0x7a0b9f3a9bf9032d => {
12072 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12073 let mut req = fidl::new_empty!(
12074 NodeRemoveExtendedAttributeRequest,
12075 fdomain_client::fidl::FDomainResourceDialect
12076 );
12077 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12078 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12079 Ok(NodeRequest::RemoveExtendedAttribute {
12080 name: req.name,
12081
12082 responder: NodeRemoveExtendedAttributeResponder {
12083 control_handle: std::mem::ManuallyDrop::new(control_handle),
12084 tx_id: header.tx_id,
12085 },
12086 })
12087 }
12088 _ if header.tx_id == 0
12089 && header
12090 .dynamic_flags()
12091 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12092 {
12093 Ok(NodeRequest::_UnknownMethod {
12094 ordinal: header.ordinal,
12095 control_handle: NodeControlHandle { inner: this.inner.clone() },
12096 method_type: fidl::MethodType::OneWay,
12097 })
12098 }
12099 _ if header
12100 .dynamic_flags()
12101 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12102 {
12103 this.inner.send_framework_err(
12104 fidl::encoding::FrameworkErr::UnknownMethod,
12105 header.tx_id,
12106 header.ordinal,
12107 header.dynamic_flags(),
12108 (bytes, handles),
12109 )?;
12110 Ok(NodeRequest::_UnknownMethod {
12111 ordinal: header.ordinal,
12112 control_handle: NodeControlHandle { inner: this.inner.clone() },
12113 method_type: fidl::MethodType::TwoWay,
12114 })
12115 }
12116 _ => Err(fidl::Error::UnknownOrdinal {
12117 ordinal: header.ordinal,
12118 protocol_name:
12119 <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
12120 }),
12121 }))
12122 },
12123 )
12124 }
12125}
12126
12127#[derive(Debug)]
12129pub enum NodeRequest {
12130 Clone {
12131 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12132 control_handle: NodeControlHandle,
12133 },
12134 Close {
12145 responder: NodeCloseResponder,
12146 },
12147 Query {
12148 responder: NodeQueryResponder,
12149 },
12150 DeprecatedClone {
12152 flags: OpenFlags,
12153 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
12154 control_handle: NodeControlHandle,
12155 },
12156 GetAttr {
12160 responder: NodeGetAttrResponder,
12161 },
12162 DeprecatedSetAttr {
12164 flags: NodeAttributeFlags,
12165 attributes: NodeAttributes,
12166 responder: NodeDeprecatedSetAttrResponder,
12167 },
12168 DeprecatedGetFlags {
12170 responder: NodeDeprecatedGetFlagsResponder,
12171 },
12172 DeprecatedSetFlags {
12174 flags: OpenFlags,
12175 responder: NodeDeprecatedSetFlagsResponder,
12176 },
12177 GetFlags {
12186 responder: NodeGetFlagsResponder,
12187 },
12188 SetFlags {
12198 flags: Flags,
12199 responder: NodeSetFlagsResponder,
12200 },
12201 QueryFilesystem {
12203 responder: NodeQueryFilesystemResponder,
12204 },
12205 GetAttributes {
12219 query: NodeAttributesQuery,
12220 responder: NodeGetAttributesResponder,
12221 },
12222 UpdateAttributes {
12231 payload: MutableNodeAttributes,
12232 responder: NodeUpdateAttributesResponder,
12233 },
12234 Sync {
12244 responder: NodeSyncResponder,
12245 },
12246 ListExtendedAttributes {
12255 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
12256 control_handle: NodeControlHandle,
12257 },
12258 GetExtendedAttribute {
12265 name: Vec<u8>,
12266 responder: NodeGetExtendedAttributeResponder,
12267 },
12268 SetExtendedAttribute {
12276 name: Vec<u8>,
12277 value: ExtendedAttributeValue,
12278 mode: SetExtendedAttributeMode,
12279 responder: NodeSetExtendedAttributeResponder,
12280 },
12281 RemoveExtendedAttribute {
12287 name: Vec<u8>,
12288 responder: NodeRemoveExtendedAttributeResponder,
12289 },
12290 #[non_exhaustive]
12292 _UnknownMethod {
12293 ordinal: u64,
12295 control_handle: NodeControlHandle,
12296 method_type: fidl::MethodType,
12297 },
12298}
12299
12300impl NodeRequest {
12301 #[allow(irrefutable_let_patterns)]
12302 pub fn into_clone(
12303 self,
12304 ) -> Option<(
12305 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12306 NodeControlHandle,
12307 )> {
12308 if let NodeRequest::Clone { request, control_handle } = self {
12309 Some((request, control_handle))
12310 } else {
12311 None
12312 }
12313 }
12314
12315 #[allow(irrefutable_let_patterns)]
12316 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
12317 if let NodeRequest::Close { responder } = self {
12318 Some((responder))
12319 } else {
12320 None
12321 }
12322 }
12323
12324 #[allow(irrefutable_let_patterns)]
12325 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
12326 if let NodeRequest::Query { responder } = self {
12327 Some((responder))
12328 } else {
12329 None
12330 }
12331 }
12332
12333 #[allow(irrefutable_let_patterns)]
12334 pub fn into_deprecated_clone(
12335 self,
12336 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, NodeControlHandle)> {
12337 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
12338 Some((flags, object, control_handle))
12339 } else {
12340 None
12341 }
12342 }
12343
12344 #[allow(irrefutable_let_patterns)]
12345 pub fn into_get_attr(self) -> Option<(NodeGetAttrResponder)> {
12346 if let NodeRequest::GetAttr { responder } = self {
12347 Some((responder))
12348 } else {
12349 None
12350 }
12351 }
12352
12353 #[allow(irrefutable_let_patterns)]
12354 pub fn into_deprecated_set_attr(
12355 self,
12356 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
12357 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
12358 Some((flags, attributes, responder))
12359 } else {
12360 None
12361 }
12362 }
12363
12364 #[allow(irrefutable_let_patterns)]
12365 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
12366 if let NodeRequest::DeprecatedGetFlags { responder } = self {
12367 Some((responder))
12368 } else {
12369 None
12370 }
12371 }
12372
12373 #[allow(irrefutable_let_patterns)]
12374 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
12375 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
12376 Some((flags, responder))
12377 } else {
12378 None
12379 }
12380 }
12381
12382 #[allow(irrefutable_let_patterns)]
12383 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
12384 if let NodeRequest::GetFlags { responder } = self {
12385 Some((responder))
12386 } else {
12387 None
12388 }
12389 }
12390
12391 #[allow(irrefutable_let_patterns)]
12392 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
12393 if let NodeRequest::SetFlags { flags, responder } = self {
12394 Some((flags, responder))
12395 } else {
12396 None
12397 }
12398 }
12399
12400 #[allow(irrefutable_let_patterns)]
12401 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
12402 if let NodeRequest::QueryFilesystem { responder } = self {
12403 Some((responder))
12404 } else {
12405 None
12406 }
12407 }
12408
12409 #[allow(irrefutable_let_patterns)]
12410 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
12411 if let NodeRequest::GetAttributes { query, responder } = self {
12412 Some((query, responder))
12413 } else {
12414 None
12415 }
12416 }
12417
12418 #[allow(irrefutable_let_patterns)]
12419 pub fn into_update_attributes(
12420 self,
12421 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
12422 if let NodeRequest::UpdateAttributes { payload, responder } = self {
12423 Some((payload, responder))
12424 } else {
12425 None
12426 }
12427 }
12428
12429 #[allow(irrefutable_let_patterns)]
12430 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
12431 if let NodeRequest::Sync { responder } = self {
12432 Some((responder))
12433 } else {
12434 None
12435 }
12436 }
12437
12438 #[allow(irrefutable_let_patterns)]
12439 pub fn into_list_extended_attributes(
12440 self,
12441 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
12442 {
12443 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
12444 Some((iterator, control_handle))
12445 } else {
12446 None
12447 }
12448 }
12449
12450 #[allow(irrefutable_let_patterns)]
12451 pub fn into_get_extended_attribute(
12452 self,
12453 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
12454 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
12455 Some((name, responder))
12456 } else {
12457 None
12458 }
12459 }
12460
12461 #[allow(irrefutable_let_patterns)]
12462 pub fn into_set_extended_attribute(
12463 self,
12464 ) -> Option<(
12465 Vec<u8>,
12466 ExtendedAttributeValue,
12467 SetExtendedAttributeMode,
12468 NodeSetExtendedAttributeResponder,
12469 )> {
12470 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
12471 Some((name, value, mode, responder))
12472 } else {
12473 None
12474 }
12475 }
12476
12477 #[allow(irrefutable_let_patterns)]
12478 pub fn into_remove_extended_attribute(
12479 self,
12480 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
12481 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
12482 Some((name, responder))
12483 } else {
12484 None
12485 }
12486 }
12487
12488 pub fn method_name(&self) -> &'static str {
12490 match *self {
12491 NodeRequest::Clone { .. } => "clone",
12492 NodeRequest::Close { .. } => "close",
12493 NodeRequest::Query { .. } => "query",
12494 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
12495 NodeRequest::GetAttr { .. } => "get_attr",
12496 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
12497 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
12498 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
12499 NodeRequest::GetFlags { .. } => "get_flags",
12500 NodeRequest::SetFlags { .. } => "set_flags",
12501 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
12502 NodeRequest::GetAttributes { .. } => "get_attributes",
12503 NodeRequest::UpdateAttributes { .. } => "update_attributes",
12504 NodeRequest::Sync { .. } => "sync",
12505 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
12506 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
12507 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
12508 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
12509 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
12510 "unknown one-way method"
12511 }
12512 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
12513 "unknown two-way method"
12514 }
12515 }
12516 }
12517}
12518
12519#[derive(Debug, Clone)]
12520pub struct NodeControlHandle {
12521 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
12522}
12523
12524impl fdomain_client::fidl::ControlHandle for NodeControlHandle {
12525 fn shutdown(&self) {
12526 self.inner.shutdown()
12527 }
12528
12529 fn is_closed(&self) -> bool {
12530 self.inner.channel().is_closed()
12531 }
12532 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
12533 self.inner.channel().on_closed()
12534 }
12535}
12536
12537impl NodeControlHandle {
12538 pub fn send_on_open_(
12539 &self,
12540 mut s: i32,
12541 mut info: Option<NodeInfoDeprecated>,
12542 ) -> Result<(), fidl::Error> {
12543 self.inner.send::<NodeOnOpenRequest>(
12544 (s, info.as_mut()),
12545 0,
12546 0x7fc7bbb1dbfd1972,
12547 fidl::encoding::DynamicFlags::empty(),
12548 )
12549 }
12550
12551 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
12552 self.inner.send::<Representation>(
12553 &mut payload,
12554 0,
12555 0x5cb40567d80a510c,
12556 fidl::encoding::DynamicFlags::empty(),
12557 )
12558 }
12559}
12560
12561#[must_use = "FIDL methods require a response to be sent"]
12562#[derive(Debug)]
12563pub struct NodeCloseResponder {
12564 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12565 tx_id: u32,
12566}
12567
12568impl std::ops::Drop for NodeCloseResponder {
12572 fn drop(&mut self) {
12573 self.control_handle.shutdown();
12574 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12576 }
12577}
12578
12579impl fdomain_client::fidl::Responder for NodeCloseResponder {
12580 type ControlHandle = NodeControlHandle;
12581
12582 fn control_handle(&self) -> &NodeControlHandle {
12583 &self.control_handle
12584 }
12585
12586 fn drop_without_shutdown(mut self) {
12587 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12589 std::mem::forget(self);
12591 }
12592}
12593
12594impl NodeCloseResponder {
12595 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12599 let _result = self.send_raw(result);
12600 if _result.is_err() {
12601 self.control_handle.shutdown();
12602 }
12603 self.drop_without_shutdown();
12604 _result
12605 }
12606
12607 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12609 let _result = self.send_raw(result);
12610 self.drop_without_shutdown();
12611 _result
12612 }
12613
12614 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12615 self.control_handle
12616 .inner
12617 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12618 result,
12619 self.tx_id,
12620 0x5ac5d459ad7f657e,
12621 fidl::encoding::DynamicFlags::empty(),
12622 )
12623 }
12624}
12625
12626#[must_use = "FIDL methods require a response to be sent"]
12627#[derive(Debug)]
12628pub struct NodeQueryResponder {
12629 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12630 tx_id: u32,
12631}
12632
12633impl std::ops::Drop for NodeQueryResponder {
12637 fn drop(&mut self) {
12638 self.control_handle.shutdown();
12639 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12641 }
12642}
12643
12644impl fdomain_client::fidl::Responder for NodeQueryResponder {
12645 type ControlHandle = NodeControlHandle;
12646
12647 fn control_handle(&self) -> &NodeControlHandle {
12648 &self.control_handle
12649 }
12650
12651 fn drop_without_shutdown(mut self) {
12652 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12654 std::mem::forget(self);
12656 }
12657}
12658
12659impl NodeQueryResponder {
12660 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12664 let _result = self.send_raw(protocol);
12665 if _result.is_err() {
12666 self.control_handle.shutdown();
12667 }
12668 self.drop_without_shutdown();
12669 _result
12670 }
12671
12672 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12674 let _result = self.send_raw(protocol);
12675 self.drop_without_shutdown();
12676 _result
12677 }
12678
12679 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12680 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
12681 (protocol,),
12682 self.tx_id,
12683 0x2658edee9decfc06,
12684 fidl::encoding::DynamicFlags::empty(),
12685 )
12686 }
12687}
12688
12689#[must_use = "FIDL methods require a response to be sent"]
12690#[derive(Debug)]
12691pub struct NodeGetAttrResponder {
12692 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12693 tx_id: u32,
12694}
12695
12696impl std::ops::Drop for NodeGetAttrResponder {
12700 fn drop(&mut self) {
12701 self.control_handle.shutdown();
12702 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12704 }
12705}
12706
12707impl fdomain_client::fidl::Responder for NodeGetAttrResponder {
12708 type ControlHandle = NodeControlHandle;
12709
12710 fn control_handle(&self) -> &NodeControlHandle {
12711 &self.control_handle
12712 }
12713
12714 fn drop_without_shutdown(mut self) {
12715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12717 std::mem::forget(self);
12719 }
12720}
12721
12722impl NodeGetAttrResponder {
12723 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12727 let _result = self.send_raw(s, attributes);
12728 if _result.is_err() {
12729 self.control_handle.shutdown();
12730 }
12731 self.drop_without_shutdown();
12732 _result
12733 }
12734
12735 pub fn send_no_shutdown_on_err(
12737 self,
12738 mut s: i32,
12739 mut attributes: &NodeAttributes,
12740 ) -> Result<(), fidl::Error> {
12741 let _result = self.send_raw(s, attributes);
12742 self.drop_without_shutdown();
12743 _result
12744 }
12745
12746 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12747 self.control_handle.inner.send::<NodeGetAttrResponse>(
12748 (s, attributes),
12749 self.tx_id,
12750 0x78985e216314dafd,
12751 fidl::encoding::DynamicFlags::empty(),
12752 )
12753 }
12754}
12755
12756#[must_use = "FIDL methods require a response to be sent"]
12757#[derive(Debug)]
12758pub struct NodeDeprecatedSetAttrResponder {
12759 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12760 tx_id: u32,
12761}
12762
12763impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
12767 fn drop(&mut self) {
12768 self.control_handle.shutdown();
12769 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12771 }
12772}
12773
12774impl fdomain_client::fidl::Responder for NodeDeprecatedSetAttrResponder {
12775 type ControlHandle = NodeControlHandle;
12776
12777 fn control_handle(&self) -> &NodeControlHandle {
12778 &self.control_handle
12779 }
12780
12781 fn drop_without_shutdown(mut self) {
12782 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12784 std::mem::forget(self);
12786 }
12787}
12788
12789impl NodeDeprecatedSetAttrResponder {
12790 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12794 let _result = self.send_raw(s);
12795 if _result.is_err() {
12796 self.control_handle.shutdown();
12797 }
12798 self.drop_without_shutdown();
12799 _result
12800 }
12801
12802 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12804 let _result = self.send_raw(s);
12805 self.drop_without_shutdown();
12806 _result
12807 }
12808
12809 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12810 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
12811 (s,),
12812 self.tx_id,
12813 0x4186c0f40d938f46,
12814 fidl::encoding::DynamicFlags::empty(),
12815 )
12816 }
12817}
12818
12819#[must_use = "FIDL methods require a response to be sent"]
12820#[derive(Debug)]
12821pub struct NodeDeprecatedGetFlagsResponder {
12822 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12823 tx_id: u32,
12824}
12825
12826impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
12830 fn drop(&mut self) {
12831 self.control_handle.shutdown();
12832 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12834 }
12835}
12836
12837impl fdomain_client::fidl::Responder for NodeDeprecatedGetFlagsResponder {
12838 type ControlHandle = NodeControlHandle;
12839
12840 fn control_handle(&self) -> &NodeControlHandle {
12841 &self.control_handle
12842 }
12843
12844 fn drop_without_shutdown(mut self) {
12845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12847 std::mem::forget(self);
12849 }
12850}
12851
12852impl NodeDeprecatedGetFlagsResponder {
12853 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12857 let _result = self.send_raw(s, flags);
12858 if _result.is_err() {
12859 self.control_handle.shutdown();
12860 }
12861 self.drop_without_shutdown();
12862 _result
12863 }
12864
12865 pub fn send_no_shutdown_on_err(
12867 self,
12868 mut s: i32,
12869 mut flags: OpenFlags,
12870 ) -> Result<(), fidl::Error> {
12871 let _result = self.send_raw(s, flags);
12872 self.drop_without_shutdown();
12873 _result
12874 }
12875
12876 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12877 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
12878 (s, flags),
12879 self.tx_id,
12880 0x5b88fffb8eda3aa1,
12881 fidl::encoding::DynamicFlags::empty(),
12882 )
12883 }
12884}
12885
12886#[must_use = "FIDL methods require a response to be sent"]
12887#[derive(Debug)]
12888pub struct NodeDeprecatedSetFlagsResponder {
12889 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12890 tx_id: u32,
12891}
12892
12893impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
12897 fn drop(&mut self) {
12898 self.control_handle.shutdown();
12899 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12901 }
12902}
12903
12904impl fdomain_client::fidl::Responder for NodeDeprecatedSetFlagsResponder {
12905 type ControlHandle = NodeControlHandle;
12906
12907 fn control_handle(&self) -> &NodeControlHandle {
12908 &self.control_handle
12909 }
12910
12911 fn drop_without_shutdown(mut self) {
12912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12914 std::mem::forget(self);
12916 }
12917}
12918
12919impl NodeDeprecatedSetFlagsResponder {
12920 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12924 let _result = self.send_raw(s);
12925 if _result.is_err() {
12926 self.control_handle.shutdown();
12927 }
12928 self.drop_without_shutdown();
12929 _result
12930 }
12931
12932 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12934 let _result = self.send_raw(s);
12935 self.drop_without_shutdown();
12936 _result
12937 }
12938
12939 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12940 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
12941 (s,),
12942 self.tx_id,
12943 0x5295b76c71fde733,
12944 fidl::encoding::DynamicFlags::empty(),
12945 )
12946 }
12947}
12948
12949#[must_use = "FIDL methods require a response to be sent"]
12950#[derive(Debug)]
12951pub struct NodeGetFlagsResponder {
12952 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12953 tx_id: u32,
12954}
12955
12956impl std::ops::Drop for NodeGetFlagsResponder {
12960 fn drop(&mut self) {
12961 self.control_handle.shutdown();
12962 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12964 }
12965}
12966
12967impl fdomain_client::fidl::Responder for NodeGetFlagsResponder {
12968 type ControlHandle = NodeControlHandle;
12969
12970 fn control_handle(&self) -> &NodeControlHandle {
12971 &self.control_handle
12972 }
12973
12974 fn drop_without_shutdown(mut self) {
12975 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12977 std::mem::forget(self);
12979 }
12980}
12981
12982impl NodeGetFlagsResponder {
12983 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12987 let _result = self.send_raw(result);
12988 if _result.is_err() {
12989 self.control_handle.shutdown();
12990 }
12991 self.drop_without_shutdown();
12992 _result
12993 }
12994
12995 pub fn send_no_shutdown_on_err(
12997 self,
12998 mut result: Result<Flags, i32>,
12999 ) -> Result<(), fidl::Error> {
13000 let _result = self.send_raw(result);
13001 self.drop_without_shutdown();
13002 _result
13003 }
13004
13005 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
13006 self.control_handle
13007 .inner
13008 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
13009 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
13010 self.tx_id,
13011 0x176eb318f64ec23,
13012 fidl::encoding::DynamicFlags::FLEXIBLE,
13013 )
13014 }
13015}
13016
13017#[must_use = "FIDL methods require a response to be sent"]
13018#[derive(Debug)]
13019pub struct NodeSetFlagsResponder {
13020 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13021 tx_id: u32,
13022}
13023
13024impl std::ops::Drop for NodeSetFlagsResponder {
13028 fn drop(&mut self) {
13029 self.control_handle.shutdown();
13030 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13032 }
13033}
13034
13035impl fdomain_client::fidl::Responder for NodeSetFlagsResponder {
13036 type ControlHandle = NodeControlHandle;
13037
13038 fn control_handle(&self) -> &NodeControlHandle {
13039 &self.control_handle
13040 }
13041
13042 fn drop_without_shutdown(mut self) {
13043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13045 std::mem::forget(self);
13047 }
13048}
13049
13050impl NodeSetFlagsResponder {
13051 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13055 let _result = self.send_raw(result);
13056 if _result.is_err() {
13057 self.control_handle.shutdown();
13058 }
13059 self.drop_without_shutdown();
13060 _result
13061 }
13062
13063 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13065 let _result = self.send_raw(result);
13066 self.drop_without_shutdown();
13067 _result
13068 }
13069
13070 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13071 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
13072 fidl::encoding::EmptyStruct,
13073 i32,
13074 >>(
13075 fidl::encoding::FlexibleResult::new(result),
13076 self.tx_id,
13077 0x55a8028685791ea8,
13078 fidl::encoding::DynamicFlags::FLEXIBLE,
13079 )
13080 }
13081}
13082
13083#[must_use = "FIDL methods require a response to be sent"]
13084#[derive(Debug)]
13085pub struct NodeQueryFilesystemResponder {
13086 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13087 tx_id: u32,
13088}
13089
13090impl std::ops::Drop for NodeQueryFilesystemResponder {
13094 fn drop(&mut self) {
13095 self.control_handle.shutdown();
13096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13098 }
13099}
13100
13101impl fdomain_client::fidl::Responder for NodeQueryFilesystemResponder {
13102 type ControlHandle = NodeControlHandle;
13103
13104 fn control_handle(&self) -> &NodeControlHandle {
13105 &self.control_handle
13106 }
13107
13108 fn drop_without_shutdown(mut self) {
13109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13111 std::mem::forget(self);
13113 }
13114}
13115
13116impl NodeQueryFilesystemResponder {
13117 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13121 let _result = self.send_raw(s, info);
13122 if _result.is_err() {
13123 self.control_handle.shutdown();
13124 }
13125 self.drop_without_shutdown();
13126 _result
13127 }
13128
13129 pub fn send_no_shutdown_on_err(
13131 self,
13132 mut s: i32,
13133 mut info: Option<&FilesystemInfo>,
13134 ) -> Result<(), fidl::Error> {
13135 let _result = self.send_raw(s, info);
13136 self.drop_without_shutdown();
13137 _result
13138 }
13139
13140 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13141 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
13142 (s, info),
13143 self.tx_id,
13144 0x6f344a1c6b0a0610,
13145 fidl::encoding::DynamicFlags::empty(),
13146 )
13147 }
13148}
13149
13150#[must_use = "FIDL methods require a response to be sent"]
13151#[derive(Debug)]
13152pub struct NodeGetAttributesResponder {
13153 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13154 tx_id: u32,
13155}
13156
13157impl std::ops::Drop for NodeGetAttributesResponder {
13161 fn drop(&mut self) {
13162 self.control_handle.shutdown();
13163 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13165 }
13166}
13167
13168impl fdomain_client::fidl::Responder for NodeGetAttributesResponder {
13169 type ControlHandle = NodeControlHandle;
13170
13171 fn control_handle(&self) -> &NodeControlHandle {
13172 &self.control_handle
13173 }
13174
13175 fn drop_without_shutdown(mut self) {
13176 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13178 std::mem::forget(self);
13180 }
13181}
13182
13183impl NodeGetAttributesResponder {
13184 pub fn send(
13188 self,
13189 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13190 ) -> Result<(), fidl::Error> {
13191 let _result = self.send_raw(result);
13192 if _result.is_err() {
13193 self.control_handle.shutdown();
13194 }
13195 self.drop_without_shutdown();
13196 _result
13197 }
13198
13199 pub fn send_no_shutdown_on_err(
13201 self,
13202 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13203 ) -> Result<(), fidl::Error> {
13204 let _result = self.send_raw(result);
13205 self.drop_without_shutdown();
13206 _result
13207 }
13208
13209 fn send_raw(
13210 &self,
13211 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13212 ) -> Result<(), fidl::Error> {
13213 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
13214 result,
13215 self.tx_id,
13216 0x3d4396a638ea053b,
13217 fidl::encoding::DynamicFlags::empty(),
13218 )
13219 }
13220}
13221
13222#[must_use = "FIDL methods require a response to be sent"]
13223#[derive(Debug)]
13224pub struct NodeUpdateAttributesResponder {
13225 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13226 tx_id: u32,
13227}
13228
13229impl std::ops::Drop for NodeUpdateAttributesResponder {
13233 fn drop(&mut self) {
13234 self.control_handle.shutdown();
13235 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13237 }
13238}
13239
13240impl fdomain_client::fidl::Responder for NodeUpdateAttributesResponder {
13241 type ControlHandle = NodeControlHandle;
13242
13243 fn control_handle(&self) -> &NodeControlHandle {
13244 &self.control_handle
13245 }
13246
13247 fn drop_without_shutdown(mut self) {
13248 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13250 std::mem::forget(self);
13252 }
13253}
13254
13255impl NodeUpdateAttributesResponder {
13256 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13260 let _result = self.send_raw(result);
13261 if _result.is_err() {
13262 self.control_handle.shutdown();
13263 }
13264 self.drop_without_shutdown();
13265 _result
13266 }
13267
13268 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13270 let _result = self.send_raw(result);
13271 self.drop_without_shutdown();
13272 _result
13273 }
13274
13275 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13276 self.control_handle
13277 .inner
13278 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13279 result,
13280 self.tx_id,
13281 0x3308c1da5a89bf08,
13282 fidl::encoding::DynamicFlags::empty(),
13283 )
13284 }
13285}
13286
13287#[must_use = "FIDL methods require a response to be sent"]
13288#[derive(Debug)]
13289pub struct NodeSyncResponder {
13290 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13291 tx_id: u32,
13292}
13293
13294impl std::ops::Drop for NodeSyncResponder {
13298 fn drop(&mut self) {
13299 self.control_handle.shutdown();
13300 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13302 }
13303}
13304
13305impl fdomain_client::fidl::Responder for NodeSyncResponder {
13306 type ControlHandle = NodeControlHandle;
13307
13308 fn control_handle(&self) -> &NodeControlHandle {
13309 &self.control_handle
13310 }
13311
13312 fn drop_without_shutdown(mut self) {
13313 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13315 std::mem::forget(self);
13317 }
13318}
13319
13320impl NodeSyncResponder {
13321 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13325 let _result = self.send_raw(result);
13326 if _result.is_err() {
13327 self.control_handle.shutdown();
13328 }
13329 self.drop_without_shutdown();
13330 _result
13331 }
13332
13333 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13335 let _result = self.send_raw(result);
13336 self.drop_without_shutdown();
13337 _result
13338 }
13339
13340 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13341 self.control_handle
13342 .inner
13343 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13344 result,
13345 self.tx_id,
13346 0x2c5c27ca0ab5dc49,
13347 fidl::encoding::DynamicFlags::empty(),
13348 )
13349 }
13350}
13351
13352#[must_use = "FIDL methods require a response to be sent"]
13353#[derive(Debug)]
13354pub struct NodeGetExtendedAttributeResponder {
13355 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13356 tx_id: u32,
13357}
13358
13359impl std::ops::Drop for NodeGetExtendedAttributeResponder {
13363 fn drop(&mut self) {
13364 self.control_handle.shutdown();
13365 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13367 }
13368}
13369
13370impl fdomain_client::fidl::Responder for NodeGetExtendedAttributeResponder {
13371 type ControlHandle = NodeControlHandle;
13372
13373 fn control_handle(&self) -> &NodeControlHandle {
13374 &self.control_handle
13375 }
13376
13377 fn drop_without_shutdown(mut self) {
13378 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13380 std::mem::forget(self);
13382 }
13383}
13384
13385impl NodeGetExtendedAttributeResponder {
13386 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13390 let _result = self.send_raw(result);
13391 if _result.is_err() {
13392 self.control_handle.shutdown();
13393 }
13394 self.drop_without_shutdown();
13395 _result
13396 }
13397
13398 pub fn send_no_shutdown_on_err(
13400 self,
13401 mut result: Result<ExtendedAttributeValue, i32>,
13402 ) -> Result<(), fidl::Error> {
13403 let _result = self.send_raw(result);
13404 self.drop_without_shutdown();
13405 _result
13406 }
13407
13408 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13409 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
13410 result.as_mut().map_err(|e| *e),
13411 self.tx_id,
13412 0x45ffa3ccfdeb76db,
13413 fidl::encoding::DynamicFlags::empty(),
13414 )
13415 }
13416}
13417
13418#[must_use = "FIDL methods require a response to be sent"]
13419#[derive(Debug)]
13420pub struct NodeSetExtendedAttributeResponder {
13421 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13422 tx_id: u32,
13423}
13424
13425impl std::ops::Drop for NodeSetExtendedAttributeResponder {
13429 fn drop(&mut self) {
13430 self.control_handle.shutdown();
13431 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13433 }
13434}
13435
13436impl fdomain_client::fidl::Responder for NodeSetExtendedAttributeResponder {
13437 type ControlHandle = NodeControlHandle;
13438
13439 fn control_handle(&self) -> &NodeControlHandle {
13440 &self.control_handle
13441 }
13442
13443 fn drop_without_shutdown(mut self) {
13444 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13446 std::mem::forget(self);
13448 }
13449}
13450
13451impl NodeSetExtendedAttributeResponder {
13452 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13456 let _result = self.send_raw(result);
13457 if _result.is_err() {
13458 self.control_handle.shutdown();
13459 }
13460 self.drop_without_shutdown();
13461 _result
13462 }
13463
13464 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13466 let _result = self.send_raw(result);
13467 self.drop_without_shutdown();
13468 _result
13469 }
13470
13471 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13472 self.control_handle
13473 .inner
13474 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13475 result,
13476 self.tx_id,
13477 0x4a951362f681f23c,
13478 fidl::encoding::DynamicFlags::empty(),
13479 )
13480 }
13481}
13482
13483#[must_use = "FIDL methods require a response to be sent"]
13484#[derive(Debug)]
13485pub struct NodeRemoveExtendedAttributeResponder {
13486 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13487 tx_id: u32,
13488}
13489
13490impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
13494 fn drop(&mut self) {
13495 self.control_handle.shutdown();
13496 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13498 }
13499}
13500
13501impl fdomain_client::fidl::Responder for NodeRemoveExtendedAttributeResponder {
13502 type ControlHandle = NodeControlHandle;
13503
13504 fn control_handle(&self) -> &NodeControlHandle {
13505 &self.control_handle
13506 }
13507
13508 fn drop_without_shutdown(mut self) {
13509 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13511 std::mem::forget(self);
13513 }
13514}
13515
13516impl NodeRemoveExtendedAttributeResponder {
13517 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13521 let _result = self.send_raw(result);
13522 if _result.is_err() {
13523 self.control_handle.shutdown();
13524 }
13525 self.drop_without_shutdown();
13526 _result
13527 }
13528
13529 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13531 let _result = self.send_raw(result);
13532 self.drop_without_shutdown();
13533 _result
13534 }
13535
13536 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13537 self.control_handle
13538 .inner
13539 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13540 result,
13541 self.tx_id,
13542 0x7a0b9f3a9bf9032d,
13543 fidl::encoding::DynamicFlags::empty(),
13544 )
13545 }
13546}
13547
13548#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13549pub struct ReadableMarker;
13550
13551impl fdomain_client::fidl::ProtocolMarker for ReadableMarker {
13552 type Proxy = ReadableProxy;
13553 type RequestStream = ReadableRequestStream;
13554
13555 const DEBUG_NAME: &'static str = "(anonymous) Readable";
13556}
13557pub type ReadableReadResult = Result<Vec<u8>, i32>;
13558
13559pub trait ReadableProxyInterface: Send + Sync {
13560 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
13561 + Send;
13562 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
13563}
13564
13565#[derive(Debug, Clone)]
13566pub struct ReadableProxy {
13567 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13568}
13569
13570impl fdomain_client::fidl::Proxy for ReadableProxy {
13571 type Protocol = ReadableMarker;
13572
13573 fn from_channel(inner: fdomain_client::Channel) -> Self {
13574 Self::new(inner)
13575 }
13576
13577 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13578 self.client.into_channel().map_err(|client| Self { client })
13579 }
13580
13581 fn as_channel(&self) -> &fdomain_client::Channel {
13582 self.client.as_channel()
13583 }
13584}
13585
13586impl ReadableProxy {
13587 pub fn new(channel: fdomain_client::Channel) -> Self {
13589 let protocol_name = <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13590 Self { client: fidl::client::Client::new(channel, protocol_name) }
13591 }
13592
13593 pub fn take_event_stream(&self) -> ReadableEventStream {
13599 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
13600 }
13601
13602 pub fn r#read(
13621 &self,
13622 mut count: u64,
13623 ) -> fidl::client::QueryResponseFut<
13624 ReadableReadResult,
13625 fdomain_client::fidl::FDomainResourceDialect,
13626 > {
13627 ReadableProxyInterface::r#read(self, count)
13628 }
13629}
13630
13631impl ReadableProxyInterface for ReadableProxy {
13632 type ReadResponseFut = fidl::client::QueryResponseFut<
13633 ReadableReadResult,
13634 fdomain_client::fidl::FDomainResourceDialect,
13635 >;
13636 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
13637 fn _decode(
13638 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13639 ) -> Result<ReadableReadResult, fidl::Error> {
13640 let _response = fidl::client::decode_transaction_body::<
13641 fidl::encoding::ResultType<ReadableReadResponse, i32>,
13642 fdomain_client::fidl::FDomainResourceDialect,
13643 0x57e419a298c8ede,
13644 >(_buf?)?;
13645 Ok(_response.map(|x| x.data))
13646 }
13647 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
13648 (count,),
13649 0x57e419a298c8ede,
13650 fidl::encoding::DynamicFlags::empty(),
13651 _decode,
13652 )
13653 }
13654}
13655
13656pub struct ReadableEventStream {
13657 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13658}
13659
13660impl std::marker::Unpin for ReadableEventStream {}
13661
13662impl futures::stream::FusedStream for ReadableEventStream {
13663 fn is_terminated(&self) -> bool {
13664 self.event_receiver.is_terminated()
13665 }
13666}
13667
13668impl futures::Stream for ReadableEventStream {
13669 type Item = Result<ReadableEvent, fidl::Error>;
13670
13671 fn poll_next(
13672 mut self: std::pin::Pin<&mut Self>,
13673 cx: &mut std::task::Context<'_>,
13674 ) -> std::task::Poll<Option<Self::Item>> {
13675 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13676 &mut self.event_receiver,
13677 cx
13678 )?) {
13679 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
13680 None => std::task::Poll::Ready(None),
13681 }
13682 }
13683}
13684
13685#[derive(Debug)]
13686pub enum ReadableEvent {}
13687
13688impl ReadableEvent {
13689 fn decode(
13691 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13692 ) -> Result<ReadableEvent, fidl::Error> {
13693 let (bytes, _handles) = buf.split_mut();
13694 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13695 debug_assert_eq!(tx_header.tx_id, 0);
13696 match tx_header.ordinal {
13697 _ => Err(fidl::Error::UnknownOrdinal {
13698 ordinal: tx_header.ordinal,
13699 protocol_name: <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13700 }),
13701 }
13702 }
13703}
13704
13705pub struct ReadableRequestStream {
13707 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13708 is_terminated: bool,
13709}
13710
13711impl std::marker::Unpin for ReadableRequestStream {}
13712
13713impl futures::stream::FusedStream for ReadableRequestStream {
13714 fn is_terminated(&self) -> bool {
13715 self.is_terminated
13716 }
13717}
13718
13719impl fdomain_client::fidl::RequestStream for ReadableRequestStream {
13720 type Protocol = ReadableMarker;
13721 type ControlHandle = ReadableControlHandle;
13722
13723 fn from_channel(channel: fdomain_client::Channel) -> Self {
13724 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
13725 }
13726
13727 fn control_handle(&self) -> Self::ControlHandle {
13728 ReadableControlHandle { inner: self.inner.clone() }
13729 }
13730
13731 fn into_inner(
13732 self,
13733 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
13734 {
13735 (self.inner, self.is_terminated)
13736 }
13737
13738 fn from_inner(
13739 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13740 is_terminated: bool,
13741 ) -> Self {
13742 Self { inner, is_terminated }
13743 }
13744}
13745
13746impl futures::Stream for ReadableRequestStream {
13747 type Item = Result<ReadableRequest, fidl::Error>;
13748
13749 fn poll_next(
13750 mut self: std::pin::Pin<&mut Self>,
13751 cx: &mut std::task::Context<'_>,
13752 ) -> std::task::Poll<Option<Self::Item>> {
13753 let this = &mut *self;
13754 if this.inner.check_shutdown(cx) {
13755 this.is_terminated = true;
13756 return std::task::Poll::Ready(None);
13757 }
13758 if this.is_terminated {
13759 panic!("polled ReadableRequestStream after completion");
13760 }
13761 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
13762 |bytes, handles| {
13763 match this.inner.channel().read_etc(cx, bytes, handles) {
13764 std::task::Poll::Ready(Ok(())) => {}
13765 std::task::Poll::Pending => return std::task::Poll::Pending,
13766 std::task::Poll::Ready(Err(None)) => {
13767 this.is_terminated = true;
13768 return std::task::Poll::Ready(None);
13769 }
13770 std::task::Poll::Ready(Err(Some(e))) => {
13771 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
13772 e.into(),
13773 ))))
13774 }
13775 }
13776
13777 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13779
13780 std::task::Poll::Ready(Some(match header.ordinal {
13781 0x57e419a298c8ede => {
13782 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
13783 let mut req = fidl::new_empty!(
13784 ReadableReadRequest,
13785 fdomain_client::fidl::FDomainResourceDialect
13786 );
13787 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
13788 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
13789 Ok(ReadableRequest::Read {
13790 count: req.count,
13791
13792 responder: ReadableReadResponder {
13793 control_handle: std::mem::ManuallyDrop::new(control_handle),
13794 tx_id: header.tx_id,
13795 },
13796 })
13797 }
13798 _ => Err(fidl::Error::UnknownOrdinal {
13799 ordinal: header.ordinal,
13800 protocol_name:
13801 <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13802 }),
13803 }))
13804 },
13805 )
13806 }
13807}
13808
13809#[derive(Debug)]
13810pub enum ReadableRequest {
13811 Read { count: u64, responder: ReadableReadResponder },
13830}
13831
13832impl ReadableRequest {
13833 #[allow(irrefutable_let_patterns)]
13834 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
13835 if let ReadableRequest::Read { count, responder } = self {
13836 Some((count, responder))
13837 } else {
13838 None
13839 }
13840 }
13841
13842 pub fn method_name(&self) -> &'static str {
13844 match *self {
13845 ReadableRequest::Read { .. } => "read",
13846 }
13847 }
13848}
13849
13850#[derive(Debug, Clone)]
13851pub struct ReadableControlHandle {
13852 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13853}
13854
13855impl fdomain_client::fidl::ControlHandle for ReadableControlHandle {
13856 fn shutdown(&self) {
13857 self.inner.shutdown()
13858 }
13859
13860 fn is_closed(&self) -> bool {
13861 self.inner.channel().is_closed()
13862 }
13863 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
13864 self.inner.channel().on_closed()
13865 }
13866}
13867
13868impl ReadableControlHandle {}
13869
13870#[must_use = "FIDL methods require a response to be sent"]
13871#[derive(Debug)]
13872pub struct ReadableReadResponder {
13873 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
13874 tx_id: u32,
13875}
13876
13877impl std::ops::Drop for ReadableReadResponder {
13881 fn drop(&mut self) {
13882 self.control_handle.shutdown();
13883 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13885 }
13886}
13887
13888impl fdomain_client::fidl::Responder for ReadableReadResponder {
13889 type ControlHandle = ReadableControlHandle;
13890
13891 fn control_handle(&self) -> &ReadableControlHandle {
13892 &self.control_handle
13893 }
13894
13895 fn drop_without_shutdown(mut self) {
13896 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13898 std::mem::forget(self);
13900 }
13901}
13902
13903impl ReadableReadResponder {
13904 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13908 let _result = self.send_raw(result);
13909 if _result.is_err() {
13910 self.control_handle.shutdown();
13911 }
13912 self.drop_without_shutdown();
13913 _result
13914 }
13915
13916 pub fn send_no_shutdown_on_err(
13918 self,
13919 mut result: Result<&[u8], i32>,
13920 ) -> Result<(), fidl::Error> {
13921 let _result = self.send_raw(result);
13922 self.drop_without_shutdown();
13923 _result
13924 }
13925
13926 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13927 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
13928 result.map(|data| (data,)),
13929 self.tx_id,
13930 0x57e419a298c8ede,
13931 fidl::encoding::DynamicFlags::empty(),
13932 )
13933 }
13934}
13935
13936#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13937pub struct SymlinkMarker;
13938
13939impl fdomain_client::fidl::ProtocolMarker for SymlinkMarker {
13940 type Proxy = SymlinkProxy;
13941 type RequestStream = SymlinkRequestStream;
13942
13943 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
13944}
13945impl fdomain_client::fidl::DiscoverableProtocolMarker for SymlinkMarker {}
13946
13947pub trait SymlinkProxyInterface: Send + Sync {
13948 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
13949 + Send;
13950 fn r#link_into(
13951 &self,
13952 dst_parent_token: fdomain_client::Event,
13953 dst: &str,
13954 ) -> Self::LinkIntoResponseFut;
13955 fn r#clone(
13956 &self,
13957 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13958 ) -> Result<(), fidl::Error>;
13959 type CloseResponseFut: std::future::Future<
13960 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
13961 > + Send;
13962 fn r#close(&self) -> Self::CloseResponseFut;
13963 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
13964 fn r#query(&self) -> Self::QueryResponseFut;
13965 fn r#deprecated_clone(
13966 &self,
13967 flags: OpenFlags,
13968 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
13969 ) -> Result<(), fidl::Error>;
13970 type GetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
13971 + Send;
13972 fn r#get_attr(&self) -> Self::GetAttrResponseFut;
13973 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
13974 fn r#deprecated_set_attr(
13975 &self,
13976 flags: NodeAttributeFlags,
13977 attributes: &NodeAttributes,
13978 ) -> Self::DeprecatedSetAttrResponseFut;
13979 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
13980 + Send;
13981 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
13982 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
13983 + Send;
13984 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
13985 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
13986 + Send;
13987 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
13988 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
13989 + Send;
13990 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
13991 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
13992 + Send;
13993 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
13994 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
13995 + Send;
13996 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
13997 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
13998 + Send;
13999 fn r#update_attributes(
14000 &self,
14001 payload: &MutableNodeAttributes,
14002 ) -> Self::UpdateAttributesResponseFut;
14003 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
14004 fn r#sync(&self) -> Self::SyncResponseFut;
14005 fn r#list_extended_attributes(
14006 &self,
14007 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14008 ) -> Result<(), fidl::Error>;
14009 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
14010 + Send;
14011 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
14012 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
14013 + Send;
14014 fn r#set_extended_attribute(
14015 &self,
14016 name: &[u8],
14017 value: ExtendedAttributeValue,
14018 mode: SetExtendedAttributeMode,
14019 ) -> Self::SetExtendedAttributeResponseFut;
14020 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
14021 + Send;
14022 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
14023 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
14024 fn r#describe(&self) -> Self::DescribeResponseFut;
14025}
14026
14027#[derive(Debug, Clone)]
14028pub struct SymlinkProxy {
14029 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
14030}
14031
14032impl fdomain_client::fidl::Proxy for SymlinkProxy {
14033 type Protocol = SymlinkMarker;
14034
14035 fn from_channel(inner: fdomain_client::Channel) -> Self {
14036 Self::new(inner)
14037 }
14038
14039 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
14040 self.client.into_channel().map_err(|client| Self { client })
14041 }
14042
14043 fn as_channel(&self) -> &fdomain_client::Channel {
14044 self.client.as_channel()
14045 }
14046}
14047
14048impl SymlinkProxy {
14049 pub fn new(channel: fdomain_client::Channel) -> Self {
14051 let protocol_name = <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
14052 Self { client: fidl::client::Client::new(channel, protocol_name) }
14053 }
14054
14055 pub fn take_event_stream(&self) -> SymlinkEventStream {
14061 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
14062 }
14063
14064 pub fn r#link_into(
14087 &self,
14088 mut dst_parent_token: fdomain_client::Event,
14089 mut dst: &str,
14090 ) -> fidl::client::QueryResponseFut<
14091 LinkableLinkIntoResult,
14092 fdomain_client::fidl::FDomainResourceDialect,
14093 > {
14094 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
14095 }
14096
14097 pub fn r#clone(
14098 &self,
14099 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14100 ) -> Result<(), fidl::Error> {
14101 SymlinkProxyInterface::r#clone(self, request)
14102 }
14103
14104 pub fn r#close(
14115 &self,
14116 ) -> fidl::client::QueryResponseFut<
14117 fdomain_fuchsia_unknown::CloseableCloseResult,
14118 fdomain_client::fidl::FDomainResourceDialect,
14119 > {
14120 SymlinkProxyInterface::r#close(self)
14121 }
14122
14123 pub fn r#query(
14124 &self,
14125 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
14126 SymlinkProxyInterface::r#query(self)
14127 }
14128
14129 pub fn r#deprecated_clone(
14131 &self,
14132 mut flags: OpenFlags,
14133 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14134 ) -> Result<(), fidl::Error> {
14135 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
14136 }
14137
14138 pub fn r#get_attr(
14142 &self,
14143 ) -> fidl::client::QueryResponseFut<
14144 (i32, NodeAttributes),
14145 fdomain_client::fidl::FDomainResourceDialect,
14146 > {
14147 SymlinkProxyInterface::r#get_attr(self)
14148 }
14149
14150 pub fn r#deprecated_set_attr(
14152 &self,
14153 mut flags: NodeAttributeFlags,
14154 mut attributes: &NodeAttributes,
14155 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14156 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
14157 }
14158
14159 pub fn r#deprecated_get_flags(
14161 &self,
14162 ) -> fidl::client::QueryResponseFut<
14163 (i32, OpenFlags),
14164 fdomain_client::fidl::FDomainResourceDialect,
14165 > {
14166 SymlinkProxyInterface::r#deprecated_get_flags(self)
14167 }
14168
14169 pub fn r#deprecated_set_flags(
14171 &self,
14172 mut flags: OpenFlags,
14173 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14174 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
14175 }
14176
14177 pub fn r#get_flags(
14186 &self,
14187 ) -> fidl::client::QueryResponseFut<
14188 NodeGetFlagsResult,
14189 fdomain_client::fidl::FDomainResourceDialect,
14190 > {
14191 SymlinkProxyInterface::r#get_flags(self)
14192 }
14193
14194 pub fn r#set_flags(
14204 &self,
14205 mut flags: Flags,
14206 ) -> fidl::client::QueryResponseFut<
14207 NodeSetFlagsResult,
14208 fdomain_client::fidl::FDomainResourceDialect,
14209 > {
14210 SymlinkProxyInterface::r#set_flags(self, flags)
14211 }
14212
14213 pub fn r#query_filesystem(
14215 &self,
14216 ) -> fidl::client::QueryResponseFut<
14217 (i32, Option<Box<FilesystemInfo>>),
14218 fdomain_client::fidl::FDomainResourceDialect,
14219 > {
14220 SymlinkProxyInterface::r#query_filesystem(self)
14221 }
14222
14223 pub fn r#get_attributes(
14237 &self,
14238 mut query: NodeAttributesQuery,
14239 ) -> fidl::client::QueryResponseFut<
14240 NodeGetAttributesResult,
14241 fdomain_client::fidl::FDomainResourceDialect,
14242 > {
14243 SymlinkProxyInterface::r#get_attributes(self, query)
14244 }
14245
14246 pub fn r#update_attributes(
14255 &self,
14256 mut payload: &MutableNodeAttributes,
14257 ) -> fidl::client::QueryResponseFut<
14258 NodeUpdateAttributesResult,
14259 fdomain_client::fidl::FDomainResourceDialect,
14260 > {
14261 SymlinkProxyInterface::r#update_attributes(self, payload)
14262 }
14263
14264 pub fn r#sync(
14274 &self,
14275 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
14276 {
14277 SymlinkProxyInterface::r#sync(self)
14278 }
14279
14280 pub fn r#list_extended_attributes(
14289 &self,
14290 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14291 ) -> Result<(), fidl::Error> {
14292 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
14293 }
14294
14295 pub fn r#get_extended_attribute(
14302 &self,
14303 mut name: &[u8],
14304 ) -> fidl::client::QueryResponseFut<
14305 NodeGetExtendedAttributeResult,
14306 fdomain_client::fidl::FDomainResourceDialect,
14307 > {
14308 SymlinkProxyInterface::r#get_extended_attribute(self, name)
14309 }
14310
14311 pub fn r#set_extended_attribute(
14319 &self,
14320 mut name: &[u8],
14321 mut value: ExtendedAttributeValue,
14322 mut mode: SetExtendedAttributeMode,
14323 ) -> fidl::client::QueryResponseFut<
14324 NodeSetExtendedAttributeResult,
14325 fdomain_client::fidl::FDomainResourceDialect,
14326 > {
14327 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
14328 }
14329
14330 pub fn r#remove_extended_attribute(
14336 &self,
14337 mut name: &[u8],
14338 ) -> fidl::client::QueryResponseFut<
14339 NodeRemoveExtendedAttributeResult,
14340 fdomain_client::fidl::FDomainResourceDialect,
14341 > {
14342 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
14343 }
14344
14345 pub fn r#describe(
14346 &self,
14347 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>
14348 {
14349 SymlinkProxyInterface::r#describe(self)
14350 }
14351}
14352
14353impl SymlinkProxyInterface for SymlinkProxy {
14354 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
14355 LinkableLinkIntoResult,
14356 fdomain_client::fidl::FDomainResourceDialect,
14357 >;
14358 fn r#link_into(
14359 &self,
14360 mut dst_parent_token: fdomain_client::Event,
14361 mut dst: &str,
14362 ) -> Self::LinkIntoResponseFut {
14363 fn _decode(
14364 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14365 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
14366 let _response = fidl::client::decode_transaction_body::<
14367 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14368 fdomain_client::fidl::FDomainResourceDialect,
14369 0x54f3949246a03e74,
14370 >(_buf?)?;
14371 Ok(_response.map(|x| x))
14372 }
14373 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
14374 (dst_parent_token, dst),
14375 0x54f3949246a03e74,
14376 fidl::encoding::DynamicFlags::empty(),
14377 _decode,
14378 )
14379 }
14380
14381 fn r#clone(
14382 &self,
14383 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14384 ) -> Result<(), fidl::Error> {
14385 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
14386 (request,),
14387 0x20d8a7aba2168a79,
14388 fidl::encoding::DynamicFlags::empty(),
14389 )
14390 }
14391
14392 type CloseResponseFut = fidl::client::QueryResponseFut<
14393 fdomain_fuchsia_unknown::CloseableCloseResult,
14394 fdomain_client::fidl::FDomainResourceDialect,
14395 >;
14396 fn r#close(&self) -> Self::CloseResponseFut {
14397 fn _decode(
14398 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14399 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
14400 let _response = fidl::client::decode_transaction_body::<
14401 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14402 fdomain_client::fidl::FDomainResourceDialect,
14403 0x5ac5d459ad7f657e,
14404 >(_buf?)?;
14405 Ok(_response.map(|x| x))
14406 }
14407 self.client.send_query_and_decode::<
14408 fidl::encoding::EmptyPayload,
14409 fdomain_fuchsia_unknown::CloseableCloseResult,
14410 >(
14411 (),
14412 0x5ac5d459ad7f657e,
14413 fidl::encoding::DynamicFlags::empty(),
14414 _decode,
14415 )
14416 }
14417
14418 type QueryResponseFut =
14419 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
14420 fn r#query(&self) -> Self::QueryResponseFut {
14421 fn _decode(
14422 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14423 ) -> Result<Vec<u8>, fidl::Error> {
14424 let _response = fidl::client::decode_transaction_body::<
14425 fdomain_fuchsia_unknown::QueryableQueryResponse,
14426 fdomain_client::fidl::FDomainResourceDialect,
14427 0x2658edee9decfc06,
14428 >(_buf?)?;
14429 Ok(_response.protocol)
14430 }
14431 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14432 (),
14433 0x2658edee9decfc06,
14434 fidl::encoding::DynamicFlags::empty(),
14435 _decode,
14436 )
14437 }
14438
14439 fn r#deprecated_clone(
14440 &self,
14441 mut flags: OpenFlags,
14442 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14443 ) -> Result<(), fidl::Error> {
14444 self.client.send::<NodeDeprecatedCloneRequest>(
14445 (flags, object),
14446 0x5a61678f293ce16f,
14447 fidl::encoding::DynamicFlags::FLEXIBLE,
14448 )
14449 }
14450
14451 type GetAttrResponseFut = fidl::client::QueryResponseFut<
14452 (i32, NodeAttributes),
14453 fdomain_client::fidl::FDomainResourceDialect,
14454 >;
14455 fn r#get_attr(&self) -> Self::GetAttrResponseFut {
14456 fn _decode(
14457 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14458 ) -> Result<(i32, NodeAttributes), fidl::Error> {
14459 let _response = fidl::client::decode_transaction_body::<
14460 NodeGetAttrResponse,
14461 fdomain_client::fidl::FDomainResourceDialect,
14462 0x78985e216314dafd,
14463 >(_buf?)?;
14464 Ok((_response.s, _response.attributes))
14465 }
14466 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14467 (),
14468 0x78985e216314dafd,
14469 fidl::encoding::DynamicFlags::empty(),
14470 _decode,
14471 )
14472 }
14473
14474 type DeprecatedSetAttrResponseFut =
14475 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14476 fn r#deprecated_set_attr(
14477 &self,
14478 mut flags: NodeAttributeFlags,
14479 mut attributes: &NodeAttributes,
14480 ) -> Self::DeprecatedSetAttrResponseFut {
14481 fn _decode(
14482 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14483 ) -> Result<i32, fidl::Error> {
14484 let _response = fidl::client::decode_transaction_body::<
14485 NodeDeprecatedSetAttrResponse,
14486 fdomain_client::fidl::FDomainResourceDialect,
14487 0x4186c0f40d938f46,
14488 >(_buf?)?;
14489 Ok(_response.s)
14490 }
14491 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14492 (flags, attributes),
14493 0x4186c0f40d938f46,
14494 fidl::encoding::DynamicFlags::empty(),
14495 _decode,
14496 )
14497 }
14498
14499 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14500 (i32, OpenFlags),
14501 fdomain_client::fidl::FDomainResourceDialect,
14502 >;
14503 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14504 fn _decode(
14505 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14506 ) -> Result<(i32, OpenFlags), fidl::Error> {
14507 let _response = fidl::client::decode_transaction_body::<
14508 NodeDeprecatedGetFlagsResponse,
14509 fdomain_client::fidl::FDomainResourceDialect,
14510 0x5b88fffb8eda3aa1,
14511 >(_buf?)?;
14512 Ok((_response.s, _response.flags))
14513 }
14514 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14515 (),
14516 0x5b88fffb8eda3aa1,
14517 fidl::encoding::DynamicFlags::empty(),
14518 _decode,
14519 )
14520 }
14521
14522 type DeprecatedSetFlagsResponseFut =
14523 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14524 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14525 fn _decode(
14526 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14527 ) -> Result<i32, fidl::Error> {
14528 let _response = fidl::client::decode_transaction_body::<
14529 NodeDeprecatedSetFlagsResponse,
14530 fdomain_client::fidl::FDomainResourceDialect,
14531 0x5295b76c71fde733,
14532 >(_buf?)?;
14533 Ok(_response.s)
14534 }
14535 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14536 (flags,),
14537 0x5295b76c71fde733,
14538 fidl::encoding::DynamicFlags::empty(),
14539 _decode,
14540 )
14541 }
14542
14543 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14544 NodeGetFlagsResult,
14545 fdomain_client::fidl::FDomainResourceDialect,
14546 >;
14547 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14548 fn _decode(
14549 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14550 ) -> Result<NodeGetFlagsResult, fidl::Error> {
14551 let _response = fidl::client::decode_transaction_body::<
14552 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14553 fdomain_client::fidl::FDomainResourceDialect,
14554 0x176eb318f64ec23,
14555 >(_buf?)?
14556 .into_result_fdomain::<SymlinkMarker>("get_flags")?;
14557 Ok(_response.map(|x| x.flags))
14558 }
14559 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14560 (),
14561 0x176eb318f64ec23,
14562 fidl::encoding::DynamicFlags::FLEXIBLE,
14563 _decode,
14564 )
14565 }
14566
14567 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14568 NodeSetFlagsResult,
14569 fdomain_client::fidl::FDomainResourceDialect,
14570 >;
14571 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14572 fn _decode(
14573 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14574 ) -> Result<NodeSetFlagsResult, fidl::Error> {
14575 let _response = fidl::client::decode_transaction_body::<
14576 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14577 fdomain_client::fidl::FDomainResourceDialect,
14578 0x55a8028685791ea8,
14579 >(_buf?)?
14580 .into_result_fdomain::<SymlinkMarker>("set_flags")?;
14581 Ok(_response.map(|x| x))
14582 }
14583 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14584 (flags,),
14585 0x55a8028685791ea8,
14586 fidl::encoding::DynamicFlags::FLEXIBLE,
14587 _decode,
14588 )
14589 }
14590
14591 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14592 (i32, Option<Box<FilesystemInfo>>),
14593 fdomain_client::fidl::FDomainResourceDialect,
14594 >;
14595 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14596 fn _decode(
14597 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14598 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14599 let _response = fidl::client::decode_transaction_body::<
14600 NodeQueryFilesystemResponse,
14601 fdomain_client::fidl::FDomainResourceDialect,
14602 0x6f344a1c6b0a0610,
14603 >(_buf?)?;
14604 Ok((_response.s, _response.info))
14605 }
14606 self.client.send_query_and_decode::<
14607 fidl::encoding::EmptyPayload,
14608 (i32, Option<Box<FilesystemInfo>>),
14609 >(
14610 (),
14611 0x6f344a1c6b0a0610,
14612 fidl::encoding::DynamicFlags::empty(),
14613 _decode,
14614 )
14615 }
14616
14617 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14618 NodeGetAttributesResult,
14619 fdomain_client::fidl::FDomainResourceDialect,
14620 >;
14621 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14622 fn _decode(
14623 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14624 ) -> Result<NodeGetAttributesResult, fidl::Error> {
14625 let _response = fidl::client::decode_transaction_body::<
14626 fidl::encoding::ResultType<NodeAttributes2, i32>,
14627 fdomain_client::fidl::FDomainResourceDialect,
14628 0x3d4396a638ea053b,
14629 >(_buf?)?;
14630 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14631 }
14632 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14633 (query,),
14634 0x3d4396a638ea053b,
14635 fidl::encoding::DynamicFlags::empty(),
14636 _decode,
14637 )
14638 }
14639
14640 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14641 NodeUpdateAttributesResult,
14642 fdomain_client::fidl::FDomainResourceDialect,
14643 >;
14644 fn r#update_attributes(
14645 &self,
14646 mut payload: &MutableNodeAttributes,
14647 ) -> Self::UpdateAttributesResponseFut {
14648 fn _decode(
14649 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14650 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14651 let _response = fidl::client::decode_transaction_body::<
14652 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14653 fdomain_client::fidl::FDomainResourceDialect,
14654 0x3308c1da5a89bf08,
14655 >(_buf?)?;
14656 Ok(_response.map(|x| x))
14657 }
14658 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14659 payload,
14660 0x3308c1da5a89bf08,
14661 fidl::encoding::DynamicFlags::empty(),
14662 _decode,
14663 )
14664 }
14665
14666 type SyncResponseFut = fidl::client::QueryResponseFut<
14667 NodeSyncResult,
14668 fdomain_client::fidl::FDomainResourceDialect,
14669 >;
14670 fn r#sync(&self) -> Self::SyncResponseFut {
14671 fn _decode(
14672 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14673 ) -> Result<NodeSyncResult, fidl::Error> {
14674 let _response = fidl::client::decode_transaction_body::<
14675 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14676 fdomain_client::fidl::FDomainResourceDialect,
14677 0x2c5c27ca0ab5dc49,
14678 >(_buf?)?;
14679 Ok(_response.map(|x| x))
14680 }
14681 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14682 (),
14683 0x2c5c27ca0ab5dc49,
14684 fidl::encoding::DynamicFlags::empty(),
14685 _decode,
14686 )
14687 }
14688
14689 fn r#list_extended_attributes(
14690 &self,
14691 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14692 ) -> Result<(), fidl::Error> {
14693 self.client.send::<NodeListExtendedAttributesRequest>(
14694 (iterator,),
14695 0x4b61033de007fcd0,
14696 fidl::encoding::DynamicFlags::empty(),
14697 )
14698 }
14699
14700 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14701 NodeGetExtendedAttributeResult,
14702 fdomain_client::fidl::FDomainResourceDialect,
14703 >;
14704 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14705 fn _decode(
14706 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14707 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14708 let _response = fidl::client::decode_transaction_body::<
14709 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14710 fdomain_client::fidl::FDomainResourceDialect,
14711 0x45ffa3ccfdeb76db,
14712 >(_buf?)?;
14713 Ok(_response.map(|x| x))
14714 }
14715 self.client.send_query_and_decode::<
14716 NodeGetExtendedAttributeRequest,
14717 NodeGetExtendedAttributeResult,
14718 >(
14719 (name,),
14720 0x45ffa3ccfdeb76db,
14721 fidl::encoding::DynamicFlags::empty(),
14722 _decode,
14723 )
14724 }
14725
14726 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14727 NodeSetExtendedAttributeResult,
14728 fdomain_client::fidl::FDomainResourceDialect,
14729 >;
14730 fn r#set_extended_attribute(
14731 &self,
14732 mut name: &[u8],
14733 mut value: ExtendedAttributeValue,
14734 mut mode: SetExtendedAttributeMode,
14735 ) -> Self::SetExtendedAttributeResponseFut {
14736 fn _decode(
14737 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14738 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14739 let _response = fidl::client::decode_transaction_body::<
14740 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14741 fdomain_client::fidl::FDomainResourceDialect,
14742 0x4a951362f681f23c,
14743 >(_buf?)?;
14744 Ok(_response.map(|x| x))
14745 }
14746 self.client.send_query_and_decode::<
14747 NodeSetExtendedAttributeRequest,
14748 NodeSetExtendedAttributeResult,
14749 >(
14750 (name, &mut value, mode,),
14751 0x4a951362f681f23c,
14752 fidl::encoding::DynamicFlags::empty(),
14753 _decode,
14754 )
14755 }
14756
14757 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14758 NodeRemoveExtendedAttributeResult,
14759 fdomain_client::fidl::FDomainResourceDialect,
14760 >;
14761 fn r#remove_extended_attribute(
14762 &self,
14763 mut name: &[u8],
14764 ) -> Self::RemoveExtendedAttributeResponseFut {
14765 fn _decode(
14766 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14767 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14768 let _response = fidl::client::decode_transaction_body::<
14769 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14770 fdomain_client::fidl::FDomainResourceDialect,
14771 0x7a0b9f3a9bf9032d,
14772 >(_buf?)?;
14773 Ok(_response.map(|x| x))
14774 }
14775 self.client.send_query_and_decode::<
14776 NodeRemoveExtendedAttributeRequest,
14777 NodeRemoveExtendedAttributeResult,
14778 >(
14779 (name,),
14780 0x7a0b9f3a9bf9032d,
14781 fidl::encoding::DynamicFlags::empty(),
14782 _decode,
14783 )
14784 }
14785
14786 type DescribeResponseFut =
14787 fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>;
14788 fn r#describe(&self) -> Self::DescribeResponseFut {
14789 fn _decode(
14790 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14791 ) -> Result<SymlinkInfo, fidl::Error> {
14792 let _response = fidl::client::decode_transaction_body::<
14793 fidl::encoding::FlexibleType<SymlinkInfo>,
14794 fdomain_client::fidl::FDomainResourceDialect,
14795 0x742c2ea5e89831f3,
14796 >(_buf?)?
14797 .into_result_fdomain::<SymlinkMarker>("describe")?;
14798 Ok(_response)
14799 }
14800 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
14801 (),
14802 0x742c2ea5e89831f3,
14803 fidl::encoding::DynamicFlags::FLEXIBLE,
14804 _decode,
14805 )
14806 }
14807}
14808
14809pub struct SymlinkEventStream {
14810 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
14811}
14812
14813impl std::marker::Unpin for SymlinkEventStream {}
14814
14815impl futures::stream::FusedStream for SymlinkEventStream {
14816 fn is_terminated(&self) -> bool {
14817 self.event_receiver.is_terminated()
14818 }
14819}
14820
14821impl futures::Stream for SymlinkEventStream {
14822 type Item = Result<SymlinkEvent, fidl::Error>;
14823
14824 fn poll_next(
14825 mut self: std::pin::Pin<&mut Self>,
14826 cx: &mut std::task::Context<'_>,
14827 ) -> std::task::Poll<Option<Self::Item>> {
14828 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14829 &mut self.event_receiver,
14830 cx
14831 )?) {
14832 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
14833 None => std::task::Poll::Ready(None),
14834 }
14835 }
14836}
14837
14838#[derive(Debug)]
14839pub enum SymlinkEvent {
14840 OnOpen_ {
14841 s: i32,
14842 info: Option<Box<NodeInfoDeprecated>>,
14843 },
14844 OnRepresentation {
14845 payload: Representation,
14846 },
14847 #[non_exhaustive]
14848 _UnknownEvent {
14849 ordinal: u64,
14851 },
14852}
14853
14854impl SymlinkEvent {
14855 #[allow(irrefutable_let_patterns)]
14856 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14857 if let SymlinkEvent::OnOpen_ { s, info } = self {
14858 Some((s, info))
14859 } else {
14860 None
14861 }
14862 }
14863 #[allow(irrefutable_let_patterns)]
14864 pub fn into_on_representation(self) -> Option<Representation> {
14865 if let SymlinkEvent::OnRepresentation { payload } = self {
14866 Some((payload))
14867 } else {
14868 None
14869 }
14870 }
14871
14872 fn decode(
14874 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14875 ) -> Result<SymlinkEvent, fidl::Error> {
14876 let (bytes, _handles) = buf.split_mut();
14877 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14878 debug_assert_eq!(tx_header.tx_id, 0);
14879 match tx_header.ordinal {
14880 0x7fc7bbb1dbfd1972 => {
14881 let mut out = fidl::new_empty!(
14882 NodeOnOpenRequest,
14883 fdomain_client::fidl::FDomainResourceDialect
14884 );
14885 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14886 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
14887 }
14888 0x5cb40567d80a510c => {
14889 let mut out =
14890 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
14891 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14892 Ok((SymlinkEvent::OnRepresentation { payload: out }))
14893 }
14894 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14895 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14896 }
14897 _ => Err(fidl::Error::UnknownOrdinal {
14898 ordinal: tx_header.ordinal,
14899 protocol_name: <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
14900 }),
14901 }
14902 }
14903}
14904
14905pub struct SymlinkRequestStream {
14907 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14908 is_terminated: bool,
14909}
14910
14911impl std::marker::Unpin for SymlinkRequestStream {}
14912
14913impl futures::stream::FusedStream for SymlinkRequestStream {
14914 fn is_terminated(&self) -> bool {
14915 self.is_terminated
14916 }
14917}
14918
14919impl fdomain_client::fidl::RequestStream for SymlinkRequestStream {
14920 type Protocol = SymlinkMarker;
14921 type ControlHandle = SymlinkControlHandle;
14922
14923 fn from_channel(channel: fdomain_client::Channel) -> Self {
14924 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14925 }
14926
14927 fn control_handle(&self) -> Self::ControlHandle {
14928 SymlinkControlHandle { inner: self.inner.clone() }
14929 }
14930
14931 fn into_inner(
14932 self,
14933 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
14934 {
14935 (self.inner, self.is_terminated)
14936 }
14937
14938 fn from_inner(
14939 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14940 is_terminated: bool,
14941 ) -> Self {
14942 Self { inner, is_terminated }
14943 }
14944}
14945
14946impl futures::Stream for SymlinkRequestStream {
14947 type Item = Result<SymlinkRequest, fidl::Error>;
14948
14949 fn poll_next(
14950 mut self: std::pin::Pin<&mut Self>,
14951 cx: &mut std::task::Context<'_>,
14952 ) -> std::task::Poll<Option<Self::Item>> {
14953 let this = &mut *self;
14954 if this.inner.check_shutdown(cx) {
14955 this.is_terminated = true;
14956 return std::task::Poll::Ready(None);
14957 }
14958 if this.is_terminated {
14959 panic!("polled SymlinkRequestStream after completion");
14960 }
14961 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
14962 |bytes, handles| {
14963 match this.inner.channel().read_etc(cx, bytes, handles) {
14964 std::task::Poll::Ready(Ok(())) => {}
14965 std::task::Poll::Pending => return std::task::Poll::Pending,
14966 std::task::Poll::Ready(Err(None)) => {
14967 this.is_terminated = true;
14968 return std::task::Poll::Ready(None);
14969 }
14970 std::task::Poll::Ready(Err(Some(e))) => {
14971 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14972 e.into(),
14973 ))))
14974 }
14975 }
14976
14977 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14979
14980 std::task::Poll::Ready(Some(match header.ordinal {
14981 0x54f3949246a03e74 => {
14982 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14983 let mut req = fidl::new_empty!(
14984 LinkableLinkIntoRequest,
14985 fdomain_client::fidl::FDomainResourceDialect
14986 );
14987 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
14988 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14989 Ok(SymlinkRequest::LinkInto {
14990 dst_parent_token: req.dst_parent_token,
14991 dst: req.dst,
14992
14993 responder: SymlinkLinkIntoResponder {
14994 control_handle: std::mem::ManuallyDrop::new(control_handle),
14995 tx_id: header.tx_id,
14996 },
14997 })
14998 }
14999 0x20d8a7aba2168a79 => {
15000 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15001 let mut req = fidl::new_empty!(
15002 fdomain_fuchsia_unknown::CloneableCloneRequest,
15003 fdomain_client::fidl::FDomainResourceDialect
15004 );
15005 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
15006 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15007 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
15008 }
15009 0x5ac5d459ad7f657e => {
15010 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15011 let mut req = fidl::new_empty!(
15012 fidl::encoding::EmptyPayload,
15013 fdomain_client::fidl::FDomainResourceDialect
15014 );
15015 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15016 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15017 Ok(SymlinkRequest::Close {
15018 responder: SymlinkCloseResponder {
15019 control_handle: std::mem::ManuallyDrop::new(control_handle),
15020 tx_id: header.tx_id,
15021 },
15022 })
15023 }
15024 0x2658edee9decfc06 => {
15025 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15026 let mut req = fidl::new_empty!(
15027 fidl::encoding::EmptyPayload,
15028 fdomain_client::fidl::FDomainResourceDialect
15029 );
15030 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15031 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15032 Ok(SymlinkRequest::Query {
15033 responder: SymlinkQueryResponder {
15034 control_handle: std::mem::ManuallyDrop::new(control_handle),
15035 tx_id: header.tx_id,
15036 },
15037 })
15038 }
15039 0x5a61678f293ce16f => {
15040 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15041 let mut req = fidl::new_empty!(
15042 NodeDeprecatedCloneRequest,
15043 fdomain_client::fidl::FDomainResourceDialect
15044 );
15045 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
15046 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15047 Ok(SymlinkRequest::DeprecatedClone {
15048 flags: req.flags,
15049 object: req.object,
15050
15051 control_handle,
15052 })
15053 }
15054 0x78985e216314dafd => {
15055 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15056 let mut req = fidl::new_empty!(
15057 fidl::encoding::EmptyPayload,
15058 fdomain_client::fidl::FDomainResourceDialect
15059 );
15060 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15061 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15062 Ok(SymlinkRequest::GetAttr {
15063 responder: SymlinkGetAttrResponder {
15064 control_handle: std::mem::ManuallyDrop::new(control_handle),
15065 tx_id: header.tx_id,
15066 },
15067 })
15068 }
15069 0x4186c0f40d938f46 => {
15070 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15071 let mut req = fidl::new_empty!(
15072 NodeDeprecatedSetAttrRequest,
15073 fdomain_client::fidl::FDomainResourceDialect
15074 );
15075 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
15076 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15077 Ok(SymlinkRequest::DeprecatedSetAttr {
15078 flags: req.flags,
15079 attributes: req.attributes,
15080
15081 responder: SymlinkDeprecatedSetAttrResponder {
15082 control_handle: std::mem::ManuallyDrop::new(control_handle),
15083 tx_id: header.tx_id,
15084 },
15085 })
15086 }
15087 0x5b88fffb8eda3aa1 => {
15088 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15089 let mut req = fidl::new_empty!(
15090 fidl::encoding::EmptyPayload,
15091 fdomain_client::fidl::FDomainResourceDialect
15092 );
15093 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15094 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15095 Ok(SymlinkRequest::DeprecatedGetFlags {
15096 responder: SymlinkDeprecatedGetFlagsResponder {
15097 control_handle: std::mem::ManuallyDrop::new(control_handle),
15098 tx_id: header.tx_id,
15099 },
15100 })
15101 }
15102 0x5295b76c71fde733 => {
15103 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15104 let mut req = fidl::new_empty!(
15105 NodeDeprecatedSetFlagsRequest,
15106 fdomain_client::fidl::FDomainResourceDialect
15107 );
15108 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15109 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15110 Ok(SymlinkRequest::DeprecatedSetFlags {
15111 flags: req.flags,
15112
15113 responder: SymlinkDeprecatedSetFlagsResponder {
15114 control_handle: std::mem::ManuallyDrop::new(control_handle),
15115 tx_id: header.tx_id,
15116 },
15117 })
15118 }
15119 0x176eb318f64ec23 => {
15120 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15121 let mut req = fidl::new_empty!(
15122 fidl::encoding::EmptyPayload,
15123 fdomain_client::fidl::FDomainResourceDialect
15124 );
15125 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15126 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15127 Ok(SymlinkRequest::GetFlags {
15128 responder: SymlinkGetFlagsResponder {
15129 control_handle: std::mem::ManuallyDrop::new(control_handle),
15130 tx_id: header.tx_id,
15131 },
15132 })
15133 }
15134 0x55a8028685791ea8 => {
15135 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15136 let mut req = fidl::new_empty!(
15137 NodeSetFlagsRequest,
15138 fdomain_client::fidl::FDomainResourceDialect
15139 );
15140 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15141 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15142 Ok(SymlinkRequest::SetFlags {
15143 flags: req.flags,
15144
15145 responder: SymlinkSetFlagsResponder {
15146 control_handle: std::mem::ManuallyDrop::new(control_handle),
15147 tx_id: header.tx_id,
15148 },
15149 })
15150 }
15151 0x6f344a1c6b0a0610 => {
15152 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15153 let mut req = fidl::new_empty!(
15154 fidl::encoding::EmptyPayload,
15155 fdomain_client::fidl::FDomainResourceDialect
15156 );
15157 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15158 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15159 Ok(SymlinkRequest::QueryFilesystem {
15160 responder: SymlinkQueryFilesystemResponder {
15161 control_handle: std::mem::ManuallyDrop::new(control_handle),
15162 tx_id: header.tx_id,
15163 },
15164 })
15165 }
15166 0x3d4396a638ea053b => {
15167 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15168 let mut req = fidl::new_empty!(
15169 NodeGetAttributesRequest,
15170 fdomain_client::fidl::FDomainResourceDialect
15171 );
15172 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15173 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15174 Ok(SymlinkRequest::GetAttributes {
15175 query: req.query,
15176
15177 responder: SymlinkGetAttributesResponder {
15178 control_handle: std::mem::ManuallyDrop::new(control_handle),
15179 tx_id: header.tx_id,
15180 },
15181 })
15182 }
15183 0x3308c1da5a89bf08 => {
15184 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15185 let mut req = fidl::new_empty!(
15186 MutableNodeAttributes,
15187 fdomain_client::fidl::FDomainResourceDialect
15188 );
15189 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
15190 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15191 Ok(SymlinkRequest::UpdateAttributes {
15192 payload: req,
15193 responder: SymlinkUpdateAttributesResponder {
15194 control_handle: std::mem::ManuallyDrop::new(control_handle),
15195 tx_id: header.tx_id,
15196 },
15197 })
15198 }
15199 0x2c5c27ca0ab5dc49 => {
15200 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15201 let mut req = fidl::new_empty!(
15202 fidl::encoding::EmptyPayload,
15203 fdomain_client::fidl::FDomainResourceDialect
15204 );
15205 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15206 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15207 Ok(SymlinkRequest::Sync {
15208 responder: SymlinkSyncResponder {
15209 control_handle: std::mem::ManuallyDrop::new(control_handle),
15210 tx_id: header.tx_id,
15211 },
15212 })
15213 }
15214 0x4b61033de007fcd0 => {
15215 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15216 let mut req = fidl::new_empty!(
15217 NodeListExtendedAttributesRequest,
15218 fdomain_client::fidl::FDomainResourceDialect
15219 );
15220 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15221 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15222 Ok(SymlinkRequest::ListExtendedAttributes {
15223 iterator: req.iterator,
15224
15225 control_handle,
15226 })
15227 }
15228 0x45ffa3ccfdeb76db => {
15229 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15230 let mut req = fidl::new_empty!(
15231 NodeGetExtendedAttributeRequest,
15232 fdomain_client::fidl::FDomainResourceDialect
15233 );
15234 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15235 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15236 Ok(SymlinkRequest::GetExtendedAttribute {
15237 name: req.name,
15238
15239 responder: SymlinkGetExtendedAttributeResponder {
15240 control_handle: std::mem::ManuallyDrop::new(control_handle),
15241 tx_id: header.tx_id,
15242 },
15243 })
15244 }
15245 0x4a951362f681f23c => {
15246 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15247 let mut req = fidl::new_empty!(
15248 NodeSetExtendedAttributeRequest,
15249 fdomain_client::fidl::FDomainResourceDialect
15250 );
15251 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15252 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15253 Ok(SymlinkRequest::SetExtendedAttribute {
15254 name: req.name,
15255 value: req.value,
15256 mode: req.mode,
15257
15258 responder: SymlinkSetExtendedAttributeResponder {
15259 control_handle: std::mem::ManuallyDrop::new(control_handle),
15260 tx_id: header.tx_id,
15261 },
15262 })
15263 }
15264 0x7a0b9f3a9bf9032d => {
15265 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15266 let mut req = fidl::new_empty!(
15267 NodeRemoveExtendedAttributeRequest,
15268 fdomain_client::fidl::FDomainResourceDialect
15269 );
15270 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15271 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15272 Ok(SymlinkRequest::RemoveExtendedAttribute {
15273 name: req.name,
15274
15275 responder: SymlinkRemoveExtendedAttributeResponder {
15276 control_handle: std::mem::ManuallyDrop::new(control_handle),
15277 tx_id: header.tx_id,
15278 },
15279 })
15280 }
15281 0x742c2ea5e89831f3 => {
15282 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15283 let mut req = fidl::new_empty!(
15284 fidl::encoding::EmptyPayload,
15285 fdomain_client::fidl::FDomainResourceDialect
15286 );
15287 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15288 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15289 Ok(SymlinkRequest::Describe {
15290 responder: SymlinkDescribeResponder {
15291 control_handle: std::mem::ManuallyDrop::new(control_handle),
15292 tx_id: header.tx_id,
15293 },
15294 })
15295 }
15296 _ if header.tx_id == 0
15297 && header
15298 .dynamic_flags()
15299 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15300 {
15301 Ok(SymlinkRequest::_UnknownMethod {
15302 ordinal: header.ordinal,
15303 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15304 method_type: fidl::MethodType::OneWay,
15305 })
15306 }
15307 _ if header
15308 .dynamic_flags()
15309 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15310 {
15311 this.inner.send_framework_err(
15312 fidl::encoding::FrameworkErr::UnknownMethod,
15313 header.tx_id,
15314 header.ordinal,
15315 header.dynamic_flags(),
15316 (bytes, handles),
15317 )?;
15318 Ok(SymlinkRequest::_UnknownMethod {
15319 ordinal: header.ordinal,
15320 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15321 method_type: fidl::MethodType::TwoWay,
15322 })
15323 }
15324 _ => Err(fidl::Error::UnknownOrdinal {
15325 ordinal: header.ordinal,
15326 protocol_name:
15327 <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15328 }),
15329 }))
15330 },
15331 )
15332 }
15333}
15334
15335#[derive(Debug)]
15337pub enum SymlinkRequest {
15338 LinkInto {
15361 dst_parent_token: fdomain_client::Event,
15362 dst: String,
15363 responder: SymlinkLinkIntoResponder,
15364 },
15365 Clone {
15366 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15367 control_handle: SymlinkControlHandle,
15368 },
15369 Close {
15380 responder: SymlinkCloseResponder,
15381 },
15382 Query {
15383 responder: SymlinkQueryResponder,
15384 },
15385 DeprecatedClone {
15387 flags: OpenFlags,
15388 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
15389 control_handle: SymlinkControlHandle,
15390 },
15391 GetAttr {
15395 responder: SymlinkGetAttrResponder,
15396 },
15397 DeprecatedSetAttr {
15399 flags: NodeAttributeFlags,
15400 attributes: NodeAttributes,
15401 responder: SymlinkDeprecatedSetAttrResponder,
15402 },
15403 DeprecatedGetFlags {
15405 responder: SymlinkDeprecatedGetFlagsResponder,
15406 },
15407 DeprecatedSetFlags {
15409 flags: OpenFlags,
15410 responder: SymlinkDeprecatedSetFlagsResponder,
15411 },
15412 GetFlags {
15421 responder: SymlinkGetFlagsResponder,
15422 },
15423 SetFlags {
15433 flags: Flags,
15434 responder: SymlinkSetFlagsResponder,
15435 },
15436 QueryFilesystem {
15438 responder: SymlinkQueryFilesystemResponder,
15439 },
15440 GetAttributes {
15454 query: NodeAttributesQuery,
15455 responder: SymlinkGetAttributesResponder,
15456 },
15457 UpdateAttributes {
15466 payload: MutableNodeAttributes,
15467 responder: SymlinkUpdateAttributesResponder,
15468 },
15469 Sync {
15479 responder: SymlinkSyncResponder,
15480 },
15481 ListExtendedAttributes {
15490 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15491 control_handle: SymlinkControlHandle,
15492 },
15493 GetExtendedAttribute {
15500 name: Vec<u8>,
15501 responder: SymlinkGetExtendedAttributeResponder,
15502 },
15503 SetExtendedAttribute {
15511 name: Vec<u8>,
15512 value: ExtendedAttributeValue,
15513 mode: SetExtendedAttributeMode,
15514 responder: SymlinkSetExtendedAttributeResponder,
15515 },
15516 RemoveExtendedAttribute {
15522 name: Vec<u8>,
15523 responder: SymlinkRemoveExtendedAttributeResponder,
15524 },
15525 Describe {
15526 responder: SymlinkDescribeResponder,
15527 },
15528 #[non_exhaustive]
15530 _UnknownMethod {
15531 ordinal: u64,
15533 control_handle: SymlinkControlHandle,
15534 method_type: fidl::MethodType,
15535 },
15536}
15537
15538impl SymlinkRequest {
15539 #[allow(irrefutable_let_patterns)]
15540 pub fn into_link_into(
15541 self,
15542 ) -> Option<(fdomain_client::Event, String, SymlinkLinkIntoResponder)> {
15543 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
15544 Some((dst_parent_token, dst, responder))
15545 } else {
15546 None
15547 }
15548 }
15549
15550 #[allow(irrefutable_let_patterns)]
15551 pub fn into_clone(
15552 self,
15553 ) -> Option<(
15554 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15555 SymlinkControlHandle,
15556 )> {
15557 if let SymlinkRequest::Clone { request, control_handle } = self {
15558 Some((request, control_handle))
15559 } else {
15560 None
15561 }
15562 }
15563
15564 #[allow(irrefutable_let_patterns)]
15565 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
15566 if let SymlinkRequest::Close { responder } = self {
15567 Some((responder))
15568 } else {
15569 None
15570 }
15571 }
15572
15573 #[allow(irrefutable_let_patterns)]
15574 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
15575 if let SymlinkRequest::Query { responder } = self {
15576 Some((responder))
15577 } else {
15578 None
15579 }
15580 }
15581
15582 #[allow(irrefutable_let_patterns)]
15583 pub fn into_deprecated_clone(
15584 self,
15585 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, SymlinkControlHandle)>
15586 {
15587 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
15588 Some((flags, object, control_handle))
15589 } else {
15590 None
15591 }
15592 }
15593
15594 #[allow(irrefutable_let_patterns)]
15595 pub fn into_get_attr(self) -> Option<(SymlinkGetAttrResponder)> {
15596 if let SymlinkRequest::GetAttr { responder } = self {
15597 Some((responder))
15598 } else {
15599 None
15600 }
15601 }
15602
15603 #[allow(irrefutable_let_patterns)]
15604 pub fn into_deprecated_set_attr(
15605 self,
15606 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
15607 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15608 Some((flags, attributes, responder))
15609 } else {
15610 None
15611 }
15612 }
15613
15614 #[allow(irrefutable_let_patterns)]
15615 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
15616 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
15617 Some((responder))
15618 } else {
15619 None
15620 }
15621 }
15622
15623 #[allow(irrefutable_let_patterns)]
15624 pub fn into_deprecated_set_flags(
15625 self,
15626 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
15627 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
15628 Some((flags, responder))
15629 } else {
15630 None
15631 }
15632 }
15633
15634 #[allow(irrefutable_let_patterns)]
15635 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
15636 if let SymlinkRequest::GetFlags { responder } = self {
15637 Some((responder))
15638 } else {
15639 None
15640 }
15641 }
15642
15643 #[allow(irrefutable_let_patterns)]
15644 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
15645 if let SymlinkRequest::SetFlags { flags, responder } = self {
15646 Some((flags, responder))
15647 } else {
15648 None
15649 }
15650 }
15651
15652 #[allow(irrefutable_let_patterns)]
15653 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
15654 if let SymlinkRequest::QueryFilesystem { responder } = self {
15655 Some((responder))
15656 } else {
15657 None
15658 }
15659 }
15660
15661 #[allow(irrefutable_let_patterns)]
15662 pub fn into_get_attributes(
15663 self,
15664 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
15665 if let SymlinkRequest::GetAttributes { query, responder } = self {
15666 Some((query, responder))
15667 } else {
15668 None
15669 }
15670 }
15671
15672 #[allow(irrefutable_let_patterns)]
15673 pub fn into_update_attributes(
15674 self,
15675 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
15676 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
15677 Some((payload, responder))
15678 } else {
15679 None
15680 }
15681 }
15682
15683 #[allow(irrefutable_let_patterns)]
15684 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
15685 if let SymlinkRequest::Sync { responder } = self {
15686 Some((responder))
15687 } else {
15688 None
15689 }
15690 }
15691
15692 #[allow(irrefutable_let_patterns)]
15693 pub fn into_list_extended_attributes(
15694 self,
15695 ) -> Option<(
15696 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15697 SymlinkControlHandle,
15698 )> {
15699 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
15700 Some((iterator, control_handle))
15701 } else {
15702 None
15703 }
15704 }
15705
15706 #[allow(irrefutable_let_patterns)]
15707 pub fn into_get_extended_attribute(
15708 self,
15709 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
15710 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
15711 Some((name, responder))
15712 } else {
15713 None
15714 }
15715 }
15716
15717 #[allow(irrefutable_let_patterns)]
15718 pub fn into_set_extended_attribute(
15719 self,
15720 ) -> Option<(
15721 Vec<u8>,
15722 ExtendedAttributeValue,
15723 SetExtendedAttributeMode,
15724 SymlinkSetExtendedAttributeResponder,
15725 )> {
15726 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
15727 Some((name, value, mode, responder))
15728 } else {
15729 None
15730 }
15731 }
15732
15733 #[allow(irrefutable_let_patterns)]
15734 pub fn into_remove_extended_attribute(
15735 self,
15736 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
15737 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
15738 Some((name, responder))
15739 } else {
15740 None
15741 }
15742 }
15743
15744 #[allow(irrefutable_let_patterns)]
15745 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
15746 if let SymlinkRequest::Describe { responder } = self {
15747 Some((responder))
15748 } else {
15749 None
15750 }
15751 }
15752
15753 pub fn method_name(&self) -> &'static str {
15755 match *self {
15756 SymlinkRequest::LinkInto { .. } => "link_into",
15757 SymlinkRequest::Clone { .. } => "clone",
15758 SymlinkRequest::Close { .. } => "close",
15759 SymlinkRequest::Query { .. } => "query",
15760 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
15761 SymlinkRequest::GetAttr { .. } => "get_attr",
15762 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
15763 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
15764 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
15765 SymlinkRequest::GetFlags { .. } => "get_flags",
15766 SymlinkRequest::SetFlags { .. } => "set_flags",
15767 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
15768 SymlinkRequest::GetAttributes { .. } => "get_attributes",
15769 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
15770 SymlinkRequest::Sync { .. } => "sync",
15771 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15772 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15773 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15774 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15775 SymlinkRequest::Describe { .. } => "describe",
15776 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15777 "unknown one-way method"
15778 }
15779 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15780 "unknown two-way method"
15781 }
15782 }
15783 }
15784}
15785
15786#[derive(Debug, Clone)]
15787pub struct SymlinkControlHandle {
15788 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15789}
15790
15791impl fdomain_client::fidl::ControlHandle for SymlinkControlHandle {
15792 fn shutdown(&self) {
15793 self.inner.shutdown()
15794 }
15795
15796 fn is_closed(&self) -> bool {
15797 self.inner.channel().is_closed()
15798 }
15799 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
15800 self.inner.channel().on_closed()
15801 }
15802}
15803
15804impl SymlinkControlHandle {
15805 pub fn send_on_open_(
15806 &self,
15807 mut s: i32,
15808 mut info: Option<NodeInfoDeprecated>,
15809 ) -> Result<(), fidl::Error> {
15810 self.inner.send::<NodeOnOpenRequest>(
15811 (s, info.as_mut()),
15812 0,
15813 0x7fc7bbb1dbfd1972,
15814 fidl::encoding::DynamicFlags::empty(),
15815 )
15816 }
15817
15818 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15819 self.inner.send::<Representation>(
15820 &mut payload,
15821 0,
15822 0x5cb40567d80a510c,
15823 fidl::encoding::DynamicFlags::empty(),
15824 )
15825 }
15826}
15827
15828#[must_use = "FIDL methods require a response to be sent"]
15829#[derive(Debug)]
15830pub struct SymlinkLinkIntoResponder {
15831 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15832 tx_id: u32,
15833}
15834
15835impl std::ops::Drop for SymlinkLinkIntoResponder {
15839 fn drop(&mut self) {
15840 self.control_handle.shutdown();
15841 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15843 }
15844}
15845
15846impl fdomain_client::fidl::Responder for SymlinkLinkIntoResponder {
15847 type ControlHandle = SymlinkControlHandle;
15848
15849 fn control_handle(&self) -> &SymlinkControlHandle {
15850 &self.control_handle
15851 }
15852
15853 fn drop_without_shutdown(mut self) {
15854 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15856 std::mem::forget(self);
15858 }
15859}
15860
15861impl SymlinkLinkIntoResponder {
15862 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15866 let _result = self.send_raw(result);
15867 if _result.is_err() {
15868 self.control_handle.shutdown();
15869 }
15870 self.drop_without_shutdown();
15871 _result
15872 }
15873
15874 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15876 let _result = self.send_raw(result);
15877 self.drop_without_shutdown();
15878 _result
15879 }
15880
15881 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15882 self.control_handle
15883 .inner
15884 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15885 result,
15886 self.tx_id,
15887 0x54f3949246a03e74,
15888 fidl::encoding::DynamicFlags::empty(),
15889 )
15890 }
15891}
15892
15893#[must_use = "FIDL methods require a response to be sent"]
15894#[derive(Debug)]
15895pub struct SymlinkCloseResponder {
15896 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15897 tx_id: u32,
15898}
15899
15900impl std::ops::Drop for SymlinkCloseResponder {
15904 fn drop(&mut self) {
15905 self.control_handle.shutdown();
15906 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15908 }
15909}
15910
15911impl fdomain_client::fidl::Responder for SymlinkCloseResponder {
15912 type ControlHandle = SymlinkControlHandle;
15913
15914 fn control_handle(&self) -> &SymlinkControlHandle {
15915 &self.control_handle
15916 }
15917
15918 fn drop_without_shutdown(mut self) {
15919 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15921 std::mem::forget(self);
15923 }
15924}
15925
15926impl SymlinkCloseResponder {
15927 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15931 let _result = self.send_raw(result);
15932 if _result.is_err() {
15933 self.control_handle.shutdown();
15934 }
15935 self.drop_without_shutdown();
15936 _result
15937 }
15938
15939 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15941 let _result = self.send_raw(result);
15942 self.drop_without_shutdown();
15943 _result
15944 }
15945
15946 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15947 self.control_handle
15948 .inner
15949 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15950 result,
15951 self.tx_id,
15952 0x5ac5d459ad7f657e,
15953 fidl::encoding::DynamicFlags::empty(),
15954 )
15955 }
15956}
15957
15958#[must_use = "FIDL methods require a response to be sent"]
15959#[derive(Debug)]
15960pub struct SymlinkQueryResponder {
15961 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15962 tx_id: u32,
15963}
15964
15965impl std::ops::Drop for SymlinkQueryResponder {
15969 fn drop(&mut self) {
15970 self.control_handle.shutdown();
15971 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15973 }
15974}
15975
15976impl fdomain_client::fidl::Responder for SymlinkQueryResponder {
15977 type ControlHandle = SymlinkControlHandle;
15978
15979 fn control_handle(&self) -> &SymlinkControlHandle {
15980 &self.control_handle
15981 }
15982
15983 fn drop_without_shutdown(mut self) {
15984 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15986 std::mem::forget(self);
15988 }
15989}
15990
15991impl SymlinkQueryResponder {
15992 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15996 let _result = self.send_raw(protocol);
15997 if _result.is_err() {
15998 self.control_handle.shutdown();
15999 }
16000 self.drop_without_shutdown();
16001 _result
16002 }
16003
16004 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
16006 let _result = self.send_raw(protocol);
16007 self.drop_without_shutdown();
16008 _result
16009 }
16010
16011 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
16012 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
16013 (protocol,),
16014 self.tx_id,
16015 0x2658edee9decfc06,
16016 fidl::encoding::DynamicFlags::empty(),
16017 )
16018 }
16019}
16020
16021#[must_use = "FIDL methods require a response to be sent"]
16022#[derive(Debug)]
16023pub struct SymlinkGetAttrResponder {
16024 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16025 tx_id: u32,
16026}
16027
16028impl std::ops::Drop for SymlinkGetAttrResponder {
16032 fn drop(&mut self) {
16033 self.control_handle.shutdown();
16034 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16036 }
16037}
16038
16039impl fdomain_client::fidl::Responder for SymlinkGetAttrResponder {
16040 type ControlHandle = SymlinkControlHandle;
16041
16042 fn control_handle(&self) -> &SymlinkControlHandle {
16043 &self.control_handle
16044 }
16045
16046 fn drop_without_shutdown(mut self) {
16047 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16049 std::mem::forget(self);
16051 }
16052}
16053
16054impl SymlinkGetAttrResponder {
16055 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
16059 let _result = self.send_raw(s, attributes);
16060 if _result.is_err() {
16061 self.control_handle.shutdown();
16062 }
16063 self.drop_without_shutdown();
16064 _result
16065 }
16066
16067 pub fn send_no_shutdown_on_err(
16069 self,
16070 mut s: i32,
16071 mut attributes: &NodeAttributes,
16072 ) -> Result<(), fidl::Error> {
16073 let _result = self.send_raw(s, attributes);
16074 self.drop_without_shutdown();
16075 _result
16076 }
16077
16078 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
16079 self.control_handle.inner.send::<NodeGetAttrResponse>(
16080 (s, attributes),
16081 self.tx_id,
16082 0x78985e216314dafd,
16083 fidl::encoding::DynamicFlags::empty(),
16084 )
16085 }
16086}
16087
16088#[must_use = "FIDL methods require a response to be sent"]
16089#[derive(Debug)]
16090pub struct SymlinkDeprecatedSetAttrResponder {
16091 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16092 tx_id: u32,
16093}
16094
16095impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
16099 fn drop(&mut self) {
16100 self.control_handle.shutdown();
16101 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16103 }
16104}
16105
16106impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetAttrResponder {
16107 type ControlHandle = SymlinkControlHandle;
16108
16109 fn control_handle(&self) -> &SymlinkControlHandle {
16110 &self.control_handle
16111 }
16112
16113 fn drop_without_shutdown(mut self) {
16114 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16116 std::mem::forget(self);
16118 }
16119}
16120
16121impl SymlinkDeprecatedSetAttrResponder {
16122 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16126 let _result = self.send_raw(s);
16127 if _result.is_err() {
16128 self.control_handle.shutdown();
16129 }
16130 self.drop_without_shutdown();
16131 _result
16132 }
16133
16134 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16136 let _result = self.send_raw(s);
16137 self.drop_without_shutdown();
16138 _result
16139 }
16140
16141 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16142 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
16143 (s,),
16144 self.tx_id,
16145 0x4186c0f40d938f46,
16146 fidl::encoding::DynamicFlags::empty(),
16147 )
16148 }
16149}
16150
16151#[must_use = "FIDL methods require a response to be sent"]
16152#[derive(Debug)]
16153pub struct SymlinkDeprecatedGetFlagsResponder {
16154 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16155 tx_id: u32,
16156}
16157
16158impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
16162 fn drop(&mut self) {
16163 self.control_handle.shutdown();
16164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16166 }
16167}
16168
16169impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetFlagsResponder {
16170 type ControlHandle = SymlinkControlHandle;
16171
16172 fn control_handle(&self) -> &SymlinkControlHandle {
16173 &self.control_handle
16174 }
16175
16176 fn drop_without_shutdown(mut self) {
16177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16179 std::mem::forget(self);
16181 }
16182}
16183
16184impl SymlinkDeprecatedGetFlagsResponder {
16185 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16189 let _result = self.send_raw(s, flags);
16190 if _result.is_err() {
16191 self.control_handle.shutdown();
16192 }
16193 self.drop_without_shutdown();
16194 _result
16195 }
16196
16197 pub fn send_no_shutdown_on_err(
16199 self,
16200 mut s: i32,
16201 mut flags: OpenFlags,
16202 ) -> Result<(), fidl::Error> {
16203 let _result = self.send_raw(s, flags);
16204 self.drop_without_shutdown();
16205 _result
16206 }
16207
16208 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16209 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
16210 (s, flags),
16211 self.tx_id,
16212 0x5b88fffb8eda3aa1,
16213 fidl::encoding::DynamicFlags::empty(),
16214 )
16215 }
16216}
16217
16218#[must_use = "FIDL methods require a response to be sent"]
16219#[derive(Debug)]
16220pub struct SymlinkDeprecatedSetFlagsResponder {
16221 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16222 tx_id: u32,
16223}
16224
16225impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
16229 fn drop(&mut self) {
16230 self.control_handle.shutdown();
16231 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16233 }
16234}
16235
16236impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetFlagsResponder {
16237 type ControlHandle = SymlinkControlHandle;
16238
16239 fn control_handle(&self) -> &SymlinkControlHandle {
16240 &self.control_handle
16241 }
16242
16243 fn drop_without_shutdown(mut self) {
16244 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16246 std::mem::forget(self);
16248 }
16249}
16250
16251impl SymlinkDeprecatedSetFlagsResponder {
16252 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16256 let _result = self.send_raw(s);
16257 if _result.is_err() {
16258 self.control_handle.shutdown();
16259 }
16260 self.drop_without_shutdown();
16261 _result
16262 }
16263
16264 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16266 let _result = self.send_raw(s);
16267 self.drop_without_shutdown();
16268 _result
16269 }
16270
16271 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16272 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
16273 (s,),
16274 self.tx_id,
16275 0x5295b76c71fde733,
16276 fidl::encoding::DynamicFlags::empty(),
16277 )
16278 }
16279}
16280
16281#[must_use = "FIDL methods require a response to be sent"]
16282#[derive(Debug)]
16283pub struct SymlinkGetFlagsResponder {
16284 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16285 tx_id: u32,
16286}
16287
16288impl std::ops::Drop for SymlinkGetFlagsResponder {
16292 fn drop(&mut self) {
16293 self.control_handle.shutdown();
16294 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16296 }
16297}
16298
16299impl fdomain_client::fidl::Responder for SymlinkGetFlagsResponder {
16300 type ControlHandle = SymlinkControlHandle;
16301
16302 fn control_handle(&self) -> &SymlinkControlHandle {
16303 &self.control_handle
16304 }
16305
16306 fn drop_without_shutdown(mut self) {
16307 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16309 std::mem::forget(self);
16311 }
16312}
16313
16314impl SymlinkGetFlagsResponder {
16315 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16319 let _result = self.send_raw(result);
16320 if _result.is_err() {
16321 self.control_handle.shutdown();
16322 }
16323 self.drop_without_shutdown();
16324 _result
16325 }
16326
16327 pub fn send_no_shutdown_on_err(
16329 self,
16330 mut result: Result<Flags, i32>,
16331 ) -> Result<(), fidl::Error> {
16332 let _result = self.send_raw(result);
16333 self.drop_without_shutdown();
16334 _result
16335 }
16336
16337 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16338 self.control_handle
16339 .inner
16340 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
16341 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
16342 self.tx_id,
16343 0x176eb318f64ec23,
16344 fidl::encoding::DynamicFlags::FLEXIBLE,
16345 )
16346 }
16347}
16348
16349#[must_use = "FIDL methods require a response to be sent"]
16350#[derive(Debug)]
16351pub struct SymlinkSetFlagsResponder {
16352 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16353 tx_id: u32,
16354}
16355
16356impl std::ops::Drop for SymlinkSetFlagsResponder {
16360 fn drop(&mut self) {
16361 self.control_handle.shutdown();
16362 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16364 }
16365}
16366
16367impl fdomain_client::fidl::Responder for SymlinkSetFlagsResponder {
16368 type ControlHandle = SymlinkControlHandle;
16369
16370 fn control_handle(&self) -> &SymlinkControlHandle {
16371 &self.control_handle
16372 }
16373
16374 fn drop_without_shutdown(mut self) {
16375 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16377 std::mem::forget(self);
16379 }
16380}
16381
16382impl SymlinkSetFlagsResponder {
16383 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16387 let _result = self.send_raw(result);
16388 if _result.is_err() {
16389 self.control_handle.shutdown();
16390 }
16391 self.drop_without_shutdown();
16392 _result
16393 }
16394
16395 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16397 let _result = self.send_raw(result);
16398 self.drop_without_shutdown();
16399 _result
16400 }
16401
16402 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16403 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
16404 fidl::encoding::EmptyStruct,
16405 i32,
16406 >>(
16407 fidl::encoding::FlexibleResult::new(result),
16408 self.tx_id,
16409 0x55a8028685791ea8,
16410 fidl::encoding::DynamicFlags::FLEXIBLE,
16411 )
16412 }
16413}
16414
16415#[must_use = "FIDL methods require a response to be sent"]
16416#[derive(Debug)]
16417pub struct SymlinkQueryFilesystemResponder {
16418 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16419 tx_id: u32,
16420}
16421
16422impl std::ops::Drop for SymlinkQueryFilesystemResponder {
16426 fn drop(&mut self) {
16427 self.control_handle.shutdown();
16428 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16430 }
16431}
16432
16433impl fdomain_client::fidl::Responder for SymlinkQueryFilesystemResponder {
16434 type ControlHandle = SymlinkControlHandle;
16435
16436 fn control_handle(&self) -> &SymlinkControlHandle {
16437 &self.control_handle
16438 }
16439
16440 fn drop_without_shutdown(mut self) {
16441 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16443 std::mem::forget(self);
16445 }
16446}
16447
16448impl SymlinkQueryFilesystemResponder {
16449 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16453 let _result = self.send_raw(s, info);
16454 if _result.is_err() {
16455 self.control_handle.shutdown();
16456 }
16457 self.drop_without_shutdown();
16458 _result
16459 }
16460
16461 pub fn send_no_shutdown_on_err(
16463 self,
16464 mut s: i32,
16465 mut info: Option<&FilesystemInfo>,
16466 ) -> Result<(), fidl::Error> {
16467 let _result = self.send_raw(s, info);
16468 self.drop_without_shutdown();
16469 _result
16470 }
16471
16472 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16473 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
16474 (s, info),
16475 self.tx_id,
16476 0x6f344a1c6b0a0610,
16477 fidl::encoding::DynamicFlags::empty(),
16478 )
16479 }
16480}
16481
16482#[must_use = "FIDL methods require a response to be sent"]
16483#[derive(Debug)]
16484pub struct SymlinkGetAttributesResponder {
16485 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16486 tx_id: u32,
16487}
16488
16489impl std::ops::Drop for SymlinkGetAttributesResponder {
16493 fn drop(&mut self) {
16494 self.control_handle.shutdown();
16495 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16497 }
16498}
16499
16500impl fdomain_client::fidl::Responder for SymlinkGetAttributesResponder {
16501 type ControlHandle = SymlinkControlHandle;
16502
16503 fn control_handle(&self) -> &SymlinkControlHandle {
16504 &self.control_handle
16505 }
16506
16507 fn drop_without_shutdown(mut self) {
16508 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16510 std::mem::forget(self);
16512 }
16513}
16514
16515impl SymlinkGetAttributesResponder {
16516 pub fn send(
16520 self,
16521 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16522 ) -> Result<(), fidl::Error> {
16523 let _result = self.send_raw(result);
16524 if _result.is_err() {
16525 self.control_handle.shutdown();
16526 }
16527 self.drop_without_shutdown();
16528 _result
16529 }
16530
16531 pub fn send_no_shutdown_on_err(
16533 self,
16534 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16535 ) -> Result<(), fidl::Error> {
16536 let _result = self.send_raw(result);
16537 self.drop_without_shutdown();
16538 _result
16539 }
16540
16541 fn send_raw(
16542 &self,
16543 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16544 ) -> Result<(), fidl::Error> {
16545 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16546 result,
16547 self.tx_id,
16548 0x3d4396a638ea053b,
16549 fidl::encoding::DynamicFlags::empty(),
16550 )
16551 }
16552}
16553
16554#[must_use = "FIDL methods require a response to be sent"]
16555#[derive(Debug)]
16556pub struct SymlinkUpdateAttributesResponder {
16557 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16558 tx_id: u32,
16559}
16560
16561impl std::ops::Drop for SymlinkUpdateAttributesResponder {
16565 fn drop(&mut self) {
16566 self.control_handle.shutdown();
16567 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16569 }
16570}
16571
16572impl fdomain_client::fidl::Responder for SymlinkUpdateAttributesResponder {
16573 type ControlHandle = SymlinkControlHandle;
16574
16575 fn control_handle(&self) -> &SymlinkControlHandle {
16576 &self.control_handle
16577 }
16578
16579 fn drop_without_shutdown(mut self) {
16580 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16582 std::mem::forget(self);
16584 }
16585}
16586
16587impl SymlinkUpdateAttributesResponder {
16588 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16592 let _result = self.send_raw(result);
16593 if _result.is_err() {
16594 self.control_handle.shutdown();
16595 }
16596 self.drop_without_shutdown();
16597 _result
16598 }
16599
16600 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16602 let _result = self.send_raw(result);
16603 self.drop_without_shutdown();
16604 _result
16605 }
16606
16607 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16608 self.control_handle
16609 .inner
16610 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16611 result,
16612 self.tx_id,
16613 0x3308c1da5a89bf08,
16614 fidl::encoding::DynamicFlags::empty(),
16615 )
16616 }
16617}
16618
16619#[must_use = "FIDL methods require a response to be sent"]
16620#[derive(Debug)]
16621pub struct SymlinkSyncResponder {
16622 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16623 tx_id: u32,
16624}
16625
16626impl std::ops::Drop for SymlinkSyncResponder {
16630 fn drop(&mut self) {
16631 self.control_handle.shutdown();
16632 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16634 }
16635}
16636
16637impl fdomain_client::fidl::Responder for SymlinkSyncResponder {
16638 type ControlHandle = SymlinkControlHandle;
16639
16640 fn control_handle(&self) -> &SymlinkControlHandle {
16641 &self.control_handle
16642 }
16643
16644 fn drop_without_shutdown(mut self) {
16645 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16647 std::mem::forget(self);
16649 }
16650}
16651
16652impl SymlinkSyncResponder {
16653 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16657 let _result = self.send_raw(result);
16658 if _result.is_err() {
16659 self.control_handle.shutdown();
16660 }
16661 self.drop_without_shutdown();
16662 _result
16663 }
16664
16665 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16667 let _result = self.send_raw(result);
16668 self.drop_without_shutdown();
16669 _result
16670 }
16671
16672 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16673 self.control_handle
16674 .inner
16675 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16676 result,
16677 self.tx_id,
16678 0x2c5c27ca0ab5dc49,
16679 fidl::encoding::DynamicFlags::empty(),
16680 )
16681 }
16682}
16683
16684#[must_use = "FIDL methods require a response to be sent"]
16685#[derive(Debug)]
16686pub struct SymlinkGetExtendedAttributeResponder {
16687 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16688 tx_id: u32,
16689}
16690
16691impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
16695 fn drop(&mut self) {
16696 self.control_handle.shutdown();
16697 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16699 }
16700}
16701
16702impl fdomain_client::fidl::Responder for SymlinkGetExtendedAttributeResponder {
16703 type ControlHandle = SymlinkControlHandle;
16704
16705 fn control_handle(&self) -> &SymlinkControlHandle {
16706 &self.control_handle
16707 }
16708
16709 fn drop_without_shutdown(mut self) {
16710 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16712 std::mem::forget(self);
16714 }
16715}
16716
16717impl SymlinkGetExtendedAttributeResponder {
16718 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16722 let _result = self.send_raw(result);
16723 if _result.is_err() {
16724 self.control_handle.shutdown();
16725 }
16726 self.drop_without_shutdown();
16727 _result
16728 }
16729
16730 pub fn send_no_shutdown_on_err(
16732 self,
16733 mut result: Result<ExtendedAttributeValue, i32>,
16734 ) -> Result<(), fidl::Error> {
16735 let _result = self.send_raw(result);
16736 self.drop_without_shutdown();
16737 _result
16738 }
16739
16740 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16741 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
16742 result.as_mut().map_err(|e| *e),
16743 self.tx_id,
16744 0x45ffa3ccfdeb76db,
16745 fidl::encoding::DynamicFlags::empty(),
16746 )
16747 }
16748}
16749
16750#[must_use = "FIDL methods require a response to be sent"]
16751#[derive(Debug)]
16752pub struct SymlinkSetExtendedAttributeResponder {
16753 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16754 tx_id: u32,
16755}
16756
16757impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
16761 fn drop(&mut self) {
16762 self.control_handle.shutdown();
16763 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16765 }
16766}
16767
16768impl fdomain_client::fidl::Responder for SymlinkSetExtendedAttributeResponder {
16769 type ControlHandle = SymlinkControlHandle;
16770
16771 fn control_handle(&self) -> &SymlinkControlHandle {
16772 &self.control_handle
16773 }
16774
16775 fn drop_without_shutdown(mut self) {
16776 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16778 std::mem::forget(self);
16780 }
16781}
16782
16783impl SymlinkSetExtendedAttributeResponder {
16784 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16788 let _result = self.send_raw(result);
16789 if _result.is_err() {
16790 self.control_handle.shutdown();
16791 }
16792 self.drop_without_shutdown();
16793 _result
16794 }
16795
16796 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16798 let _result = self.send_raw(result);
16799 self.drop_without_shutdown();
16800 _result
16801 }
16802
16803 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16804 self.control_handle
16805 .inner
16806 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16807 result,
16808 self.tx_id,
16809 0x4a951362f681f23c,
16810 fidl::encoding::DynamicFlags::empty(),
16811 )
16812 }
16813}
16814
16815#[must_use = "FIDL methods require a response to be sent"]
16816#[derive(Debug)]
16817pub struct SymlinkRemoveExtendedAttributeResponder {
16818 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16819 tx_id: u32,
16820}
16821
16822impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
16826 fn drop(&mut self) {
16827 self.control_handle.shutdown();
16828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16830 }
16831}
16832
16833impl fdomain_client::fidl::Responder for SymlinkRemoveExtendedAttributeResponder {
16834 type ControlHandle = SymlinkControlHandle;
16835
16836 fn control_handle(&self) -> &SymlinkControlHandle {
16837 &self.control_handle
16838 }
16839
16840 fn drop_without_shutdown(mut self) {
16841 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16843 std::mem::forget(self);
16845 }
16846}
16847
16848impl SymlinkRemoveExtendedAttributeResponder {
16849 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16853 let _result = self.send_raw(result);
16854 if _result.is_err() {
16855 self.control_handle.shutdown();
16856 }
16857 self.drop_without_shutdown();
16858 _result
16859 }
16860
16861 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16863 let _result = self.send_raw(result);
16864 self.drop_without_shutdown();
16865 _result
16866 }
16867
16868 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16869 self.control_handle
16870 .inner
16871 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16872 result,
16873 self.tx_id,
16874 0x7a0b9f3a9bf9032d,
16875 fidl::encoding::DynamicFlags::empty(),
16876 )
16877 }
16878}
16879
16880#[must_use = "FIDL methods require a response to be sent"]
16881#[derive(Debug)]
16882pub struct SymlinkDescribeResponder {
16883 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16884 tx_id: u32,
16885}
16886
16887impl std::ops::Drop for SymlinkDescribeResponder {
16891 fn drop(&mut self) {
16892 self.control_handle.shutdown();
16893 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16895 }
16896}
16897
16898impl fdomain_client::fidl::Responder for SymlinkDescribeResponder {
16899 type ControlHandle = SymlinkControlHandle;
16900
16901 fn control_handle(&self) -> &SymlinkControlHandle {
16902 &self.control_handle
16903 }
16904
16905 fn drop_without_shutdown(mut self) {
16906 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16908 std::mem::forget(self);
16910 }
16911}
16912
16913impl SymlinkDescribeResponder {
16914 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16918 let _result = self.send_raw(payload);
16919 if _result.is_err() {
16920 self.control_handle.shutdown();
16921 }
16922 self.drop_without_shutdown();
16923 _result
16924 }
16925
16926 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16928 let _result = self.send_raw(payload);
16929 self.drop_without_shutdown();
16930 _result
16931 }
16932
16933 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16934 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
16935 fidl::encoding::Flexible::new(payload),
16936 self.tx_id,
16937 0x742c2ea5e89831f3,
16938 fidl::encoding::DynamicFlags::FLEXIBLE,
16939 )
16940 }
16941}
16942
16943#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16944pub struct WritableMarker;
16945
16946impl fdomain_client::fidl::ProtocolMarker for WritableMarker {
16947 type Proxy = WritableProxy;
16948 type RequestStream = WritableRequestStream;
16949
16950 const DEBUG_NAME: &'static str = "(anonymous) Writable";
16951}
16952pub type WritableWriteResult = Result<u64, i32>;
16953
16954pub trait WritableProxyInterface: Send + Sync {
16955 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
16956 + Send;
16957 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
16958}
16959
16960#[derive(Debug, Clone)]
16961pub struct WritableProxy {
16962 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
16963}
16964
16965impl fdomain_client::fidl::Proxy for WritableProxy {
16966 type Protocol = WritableMarker;
16967
16968 fn from_channel(inner: fdomain_client::Channel) -> Self {
16969 Self::new(inner)
16970 }
16971
16972 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
16973 self.client.into_channel().map_err(|client| Self { client })
16974 }
16975
16976 fn as_channel(&self) -> &fdomain_client::Channel {
16977 self.client.as_channel()
16978 }
16979}
16980
16981impl WritableProxy {
16982 pub fn new(channel: fdomain_client::Channel) -> Self {
16984 let protocol_name = <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
16985 Self { client: fidl::client::Client::new(channel, protocol_name) }
16986 }
16987
16988 pub fn take_event_stream(&self) -> WritableEventStream {
16994 WritableEventStream { event_receiver: self.client.take_event_receiver() }
16995 }
16996
16997 pub fn r#write(
17021 &self,
17022 mut data: &[u8],
17023 ) -> fidl::client::QueryResponseFut<
17024 WritableWriteResult,
17025 fdomain_client::fidl::FDomainResourceDialect,
17026 > {
17027 WritableProxyInterface::r#write(self, data)
17028 }
17029}
17030
17031impl WritableProxyInterface for WritableProxy {
17032 type WriteResponseFut = fidl::client::QueryResponseFut<
17033 WritableWriteResult,
17034 fdomain_client::fidl::FDomainResourceDialect,
17035 >;
17036 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
17037 fn _decode(
17038 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17039 ) -> Result<WritableWriteResult, fidl::Error> {
17040 let _response = fidl::client::decode_transaction_body::<
17041 fidl::encoding::ResultType<WritableWriteResponse, i32>,
17042 fdomain_client::fidl::FDomainResourceDialect,
17043 0x6a31437832469f82,
17044 >(_buf?)?;
17045 Ok(_response.map(|x| x.actual_count))
17046 }
17047 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
17048 (data,),
17049 0x6a31437832469f82,
17050 fidl::encoding::DynamicFlags::empty(),
17051 _decode,
17052 )
17053 }
17054}
17055
17056pub struct WritableEventStream {
17057 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
17058}
17059
17060impl std::marker::Unpin for WritableEventStream {}
17061
17062impl futures::stream::FusedStream for WritableEventStream {
17063 fn is_terminated(&self) -> bool {
17064 self.event_receiver.is_terminated()
17065 }
17066}
17067
17068impl futures::Stream for WritableEventStream {
17069 type Item = Result<WritableEvent, fidl::Error>;
17070
17071 fn poll_next(
17072 mut self: std::pin::Pin<&mut Self>,
17073 cx: &mut std::task::Context<'_>,
17074 ) -> std::task::Poll<Option<Self::Item>> {
17075 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17076 &mut self.event_receiver,
17077 cx
17078 )?) {
17079 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
17080 None => std::task::Poll::Ready(None),
17081 }
17082 }
17083}
17084
17085#[derive(Debug)]
17086pub enum WritableEvent {}
17087
17088impl WritableEvent {
17089 fn decode(
17091 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17092 ) -> Result<WritableEvent, fidl::Error> {
17093 let (bytes, _handles) = buf.split_mut();
17094 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17095 debug_assert_eq!(tx_header.tx_id, 0);
17096 match tx_header.ordinal {
17097 _ => Err(fidl::Error::UnknownOrdinal {
17098 ordinal: tx_header.ordinal,
17099 protocol_name: <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17100 }),
17101 }
17102 }
17103}
17104
17105pub struct WritableRequestStream {
17107 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17108 is_terminated: bool,
17109}
17110
17111impl std::marker::Unpin for WritableRequestStream {}
17112
17113impl futures::stream::FusedStream for WritableRequestStream {
17114 fn is_terminated(&self) -> bool {
17115 self.is_terminated
17116 }
17117}
17118
17119impl fdomain_client::fidl::RequestStream for WritableRequestStream {
17120 type Protocol = WritableMarker;
17121 type ControlHandle = WritableControlHandle;
17122
17123 fn from_channel(channel: fdomain_client::Channel) -> Self {
17124 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17125 }
17126
17127 fn control_handle(&self) -> Self::ControlHandle {
17128 WritableControlHandle { inner: self.inner.clone() }
17129 }
17130
17131 fn into_inner(
17132 self,
17133 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
17134 {
17135 (self.inner, self.is_terminated)
17136 }
17137
17138 fn from_inner(
17139 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17140 is_terminated: bool,
17141 ) -> Self {
17142 Self { inner, is_terminated }
17143 }
17144}
17145
17146impl futures::Stream for WritableRequestStream {
17147 type Item = Result<WritableRequest, fidl::Error>;
17148
17149 fn poll_next(
17150 mut self: std::pin::Pin<&mut Self>,
17151 cx: &mut std::task::Context<'_>,
17152 ) -> std::task::Poll<Option<Self::Item>> {
17153 let this = &mut *self;
17154 if this.inner.check_shutdown(cx) {
17155 this.is_terminated = true;
17156 return std::task::Poll::Ready(None);
17157 }
17158 if this.is_terminated {
17159 panic!("polled WritableRequestStream after completion");
17160 }
17161 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
17162 |bytes, handles| {
17163 match this.inner.channel().read_etc(cx, bytes, handles) {
17164 std::task::Poll::Ready(Ok(())) => {}
17165 std::task::Poll::Pending => return std::task::Poll::Pending,
17166 std::task::Poll::Ready(Err(None)) => {
17167 this.is_terminated = true;
17168 return std::task::Poll::Ready(None);
17169 }
17170 std::task::Poll::Ready(Err(Some(e))) => {
17171 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17172 e.into(),
17173 ))))
17174 }
17175 }
17176
17177 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17179
17180 std::task::Poll::Ready(Some(match header.ordinal {
17181 0x6a31437832469f82 => {
17182 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17183 let mut req = fidl::new_empty!(
17184 WritableWriteRequest,
17185 fdomain_client::fidl::FDomainResourceDialect
17186 );
17187 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
17188 let control_handle = WritableControlHandle { inner: this.inner.clone() };
17189 Ok(WritableRequest::Write {
17190 data: req.data,
17191
17192 responder: WritableWriteResponder {
17193 control_handle: std::mem::ManuallyDrop::new(control_handle),
17194 tx_id: header.tx_id,
17195 },
17196 })
17197 }
17198 _ => Err(fidl::Error::UnknownOrdinal {
17199 ordinal: header.ordinal,
17200 protocol_name:
17201 <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17202 }),
17203 }))
17204 },
17205 )
17206 }
17207}
17208
17209#[derive(Debug)]
17210pub enum WritableRequest {
17211 Write { data: Vec<u8>, responder: WritableWriteResponder },
17235}
17236
17237impl WritableRequest {
17238 #[allow(irrefutable_let_patterns)]
17239 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
17240 if let WritableRequest::Write { data, responder } = self {
17241 Some((data, responder))
17242 } else {
17243 None
17244 }
17245 }
17246
17247 pub fn method_name(&self) -> &'static str {
17249 match *self {
17250 WritableRequest::Write { .. } => "write",
17251 }
17252 }
17253}
17254
17255#[derive(Debug, Clone)]
17256pub struct WritableControlHandle {
17257 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17258}
17259
17260impl fdomain_client::fidl::ControlHandle for WritableControlHandle {
17261 fn shutdown(&self) {
17262 self.inner.shutdown()
17263 }
17264
17265 fn is_closed(&self) -> bool {
17266 self.inner.channel().is_closed()
17267 }
17268 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
17269 self.inner.channel().on_closed()
17270 }
17271}
17272
17273impl WritableControlHandle {}
17274
17275#[must_use = "FIDL methods require a response to be sent"]
17276#[derive(Debug)]
17277pub struct WritableWriteResponder {
17278 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
17279 tx_id: u32,
17280}
17281
17282impl std::ops::Drop for WritableWriteResponder {
17286 fn drop(&mut self) {
17287 self.control_handle.shutdown();
17288 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17290 }
17291}
17292
17293impl fdomain_client::fidl::Responder for WritableWriteResponder {
17294 type ControlHandle = WritableControlHandle;
17295
17296 fn control_handle(&self) -> &WritableControlHandle {
17297 &self.control_handle
17298 }
17299
17300 fn drop_without_shutdown(mut self) {
17301 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17303 std::mem::forget(self);
17305 }
17306}
17307
17308impl WritableWriteResponder {
17309 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17313 let _result = self.send_raw(result);
17314 if _result.is_err() {
17315 self.control_handle.shutdown();
17316 }
17317 self.drop_without_shutdown();
17318 _result
17319 }
17320
17321 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17323 let _result = self.send_raw(result);
17324 self.drop_without_shutdown();
17325 _result
17326 }
17327
17328 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17329 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
17330 result.map(|actual_count| (actual_count,)),
17331 self.tx_id,
17332 0x6a31437832469f82,
17333 fidl::encoding::DynamicFlags::empty(),
17334 )
17335 }
17336}
17337
17338mod internal {
17339 use super::*;
17340
17341 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
17342 type Borrowed<'a> = &'a mut Self;
17343 fn take_or_borrow<'a>(
17344 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17345 ) -> Self::Borrowed<'a> {
17346 value
17347 }
17348 }
17349
17350 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
17351 type Owned = Self;
17352
17353 #[inline(always)]
17354 fn inline_align(_context: fidl::encoding::Context) -> usize {
17355 8
17356 }
17357
17358 #[inline(always)]
17359 fn inline_size(_context: fidl::encoding::Context) -> usize {
17360 40
17361 }
17362 }
17363
17364 unsafe impl
17365 fidl::encoding::Encode<
17366 DirectoryCreateSymlinkRequest,
17367 fdomain_client::fidl::FDomainResourceDialect,
17368 > for &mut DirectoryCreateSymlinkRequest
17369 {
17370 #[inline]
17371 unsafe fn encode(
17372 self,
17373 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17374 offset: usize,
17375 _depth: fidl::encoding::Depth,
17376 ) -> fidl::Result<()> {
17377 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17378 fidl::encoding::Encode::<
17380 DirectoryCreateSymlinkRequest,
17381 fdomain_client::fidl::FDomainResourceDialect,
17382 >::encode(
17383 (
17384 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17385 &self.name,
17386 ),
17387 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
17388 &self.target,
17389 ),
17390 <fidl::encoding::Optional<
17391 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17392 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17393 &mut self.connection
17394 ),
17395 ),
17396 encoder,
17397 offset,
17398 _depth,
17399 )
17400 }
17401 }
17402 unsafe impl<
17403 T0: fidl::encoding::Encode<
17404 fidl::encoding::BoundedString<255>,
17405 fdomain_client::fidl::FDomainResourceDialect,
17406 >,
17407 T1: fidl::encoding::Encode<
17408 fidl::encoding::Vector<u8, 4095>,
17409 fdomain_client::fidl::FDomainResourceDialect,
17410 >,
17411 T2: fidl::encoding::Encode<
17412 fidl::encoding::Optional<
17413 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17414 >,
17415 fdomain_client::fidl::FDomainResourceDialect,
17416 >,
17417 >
17418 fidl::encoding::Encode<
17419 DirectoryCreateSymlinkRequest,
17420 fdomain_client::fidl::FDomainResourceDialect,
17421 > for (T0, T1, T2)
17422 {
17423 #[inline]
17424 unsafe fn encode(
17425 self,
17426 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17427 offset: usize,
17428 depth: fidl::encoding::Depth,
17429 ) -> fidl::Result<()> {
17430 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17431 unsafe {
17434 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
17435 (ptr as *mut u64).write_unaligned(0);
17436 }
17437 self.0.encode(encoder, offset + 0, depth)?;
17439 self.1.encode(encoder, offset + 16, depth)?;
17440 self.2.encode(encoder, offset + 32, depth)?;
17441 Ok(())
17442 }
17443 }
17444
17445 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17446 for DirectoryCreateSymlinkRequest
17447 {
17448 #[inline(always)]
17449 fn new_empty() -> Self {
17450 Self {
17451 name: fidl::new_empty!(
17452 fidl::encoding::BoundedString<255>,
17453 fdomain_client::fidl::FDomainResourceDialect
17454 ),
17455 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect),
17456 connection: fidl::new_empty!(
17457 fidl::encoding::Optional<
17458 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17459 >,
17460 fdomain_client::fidl::FDomainResourceDialect
17461 ),
17462 }
17463 }
17464
17465 #[inline]
17466 unsafe fn decode(
17467 &mut self,
17468 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17469 offset: usize,
17470 _depth: fidl::encoding::Depth,
17471 ) -> fidl::Result<()> {
17472 decoder.debug_check_bounds::<Self>(offset);
17473 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
17475 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17476 let mask = 0xffffffff00000000u64;
17477 let maskedval = padval & mask;
17478 if maskedval != 0 {
17479 return Err(fidl::Error::NonZeroPadding {
17480 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
17481 });
17482 }
17483 fidl::decode!(
17484 fidl::encoding::BoundedString<255>,
17485 fdomain_client::fidl::FDomainResourceDialect,
17486 &mut self.name,
17487 decoder,
17488 offset + 0,
17489 _depth
17490 )?;
17491 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
17492 fidl::decode!(
17493 fidl::encoding::Optional<
17494 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17495 >,
17496 fdomain_client::fidl::FDomainResourceDialect,
17497 &mut self.connection,
17498 decoder,
17499 offset + 32,
17500 _depth
17501 )?;
17502 Ok(())
17503 }
17504 }
17505
17506 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
17507 type Borrowed<'a> = &'a mut Self;
17508 fn take_or_borrow<'a>(
17509 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17510 ) -> Self::Borrowed<'a> {
17511 value
17512 }
17513 }
17514
17515 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
17516 type Owned = Self;
17517
17518 #[inline(always)]
17519 fn inline_align(_context: fidl::encoding::Context) -> usize {
17520 8
17521 }
17522
17523 #[inline(always)]
17524 fn inline_size(_context: fidl::encoding::Context) -> usize {
17525 32
17526 }
17527 }
17528
17529 unsafe impl
17530 fidl::encoding::Encode<
17531 DirectoryDeprecatedOpenRequest,
17532 fdomain_client::fidl::FDomainResourceDialect,
17533 > for &mut DirectoryDeprecatedOpenRequest
17534 {
17535 #[inline]
17536 unsafe fn encode(
17537 self,
17538 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17539 offset: usize,
17540 _depth: fidl::encoding::Depth,
17541 ) -> fidl::Result<()> {
17542 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17543 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17545 (
17546 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17547 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
17548 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17549 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17550 ),
17551 encoder, offset, _depth
17552 )
17553 }
17554 }
17555 unsafe impl<
17556 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
17557 T1: fidl::encoding::Encode<ModeType, fdomain_client::fidl::FDomainResourceDialect>,
17558 T2: fidl::encoding::Encode<
17559 fidl::encoding::BoundedString<4095>,
17560 fdomain_client::fidl::FDomainResourceDialect,
17561 >,
17562 T3: fidl::encoding::Encode<
17563 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17564 fdomain_client::fidl::FDomainResourceDialect,
17565 >,
17566 >
17567 fidl::encoding::Encode<
17568 DirectoryDeprecatedOpenRequest,
17569 fdomain_client::fidl::FDomainResourceDialect,
17570 > for (T0, T1, T2, T3)
17571 {
17572 #[inline]
17573 unsafe fn encode(
17574 self,
17575 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17576 offset: usize,
17577 depth: fidl::encoding::Depth,
17578 ) -> fidl::Result<()> {
17579 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17580 unsafe {
17583 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
17584 (ptr as *mut u64).write_unaligned(0);
17585 }
17586 self.0.encode(encoder, offset + 0, depth)?;
17588 self.1.encode(encoder, offset + 4, depth)?;
17589 self.2.encode(encoder, offset + 8, depth)?;
17590 self.3.encode(encoder, offset + 24, depth)?;
17591 Ok(())
17592 }
17593 }
17594
17595 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17596 for DirectoryDeprecatedOpenRequest
17597 {
17598 #[inline(always)]
17599 fn new_empty() -> Self {
17600 Self {
17601 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
17602 mode: fidl::new_empty!(ModeType, fdomain_client::fidl::FDomainResourceDialect),
17603 path: fidl::new_empty!(
17604 fidl::encoding::BoundedString<4095>,
17605 fdomain_client::fidl::FDomainResourceDialect
17606 ),
17607 object: fidl::new_empty!(
17608 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17609 fdomain_client::fidl::FDomainResourceDialect
17610 ),
17611 }
17612 }
17613
17614 #[inline]
17615 unsafe fn decode(
17616 &mut self,
17617 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17618 offset: usize,
17619 _depth: fidl::encoding::Depth,
17620 ) -> fidl::Result<()> {
17621 decoder.debug_check_bounds::<Self>(offset);
17622 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
17624 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17625 let mask = 0xffffffff00000000u64;
17626 let maskedval = padval & mask;
17627 if maskedval != 0 {
17628 return Err(fidl::Error::NonZeroPadding {
17629 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
17630 });
17631 }
17632 fidl::decode!(
17633 OpenFlags,
17634 fdomain_client::fidl::FDomainResourceDialect,
17635 &mut self.flags,
17636 decoder,
17637 offset + 0,
17638 _depth
17639 )?;
17640 fidl::decode!(
17641 ModeType,
17642 fdomain_client::fidl::FDomainResourceDialect,
17643 &mut self.mode,
17644 decoder,
17645 offset + 4,
17646 _depth
17647 )?;
17648 fidl::decode!(
17649 fidl::encoding::BoundedString<4095>,
17650 fdomain_client::fidl::FDomainResourceDialect,
17651 &mut self.path,
17652 decoder,
17653 offset + 8,
17654 _depth
17655 )?;
17656 fidl::decode!(
17657 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17658 fdomain_client::fidl::FDomainResourceDialect,
17659 &mut self.object,
17660 decoder,
17661 offset + 24,
17662 _depth
17663 )?;
17664 Ok(())
17665 }
17666 }
17667
17668 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
17669 type Borrowed<'a> = &'a mut Self;
17670 fn take_or_borrow<'a>(
17671 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17672 ) -> Self::Borrowed<'a> {
17673 value
17674 }
17675 }
17676
17677 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
17678 type Owned = Self;
17679
17680 #[inline(always)]
17681 fn inline_align(_context: fidl::encoding::Context) -> usize {
17682 4
17683 }
17684
17685 #[inline(always)]
17686 fn inline_size(_context: fidl::encoding::Context) -> usize {
17687 8
17688 }
17689 }
17690
17691 unsafe impl
17692 fidl::encoding::Encode<
17693 DirectoryGetTokenResponse,
17694 fdomain_client::fidl::FDomainResourceDialect,
17695 > for &mut DirectoryGetTokenResponse
17696 {
17697 #[inline]
17698 unsafe fn encode(
17699 self,
17700 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17701 offset: usize,
17702 _depth: fidl::encoding::Depth,
17703 ) -> fidl::Result<()> {
17704 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17705 fidl::encoding::Encode::<
17707 DirectoryGetTokenResponse,
17708 fdomain_client::fidl::FDomainResourceDialect,
17709 >::encode(
17710 (
17711 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
17712 <fidl::encoding::Optional<
17713 fidl::encoding::HandleType<
17714 fdomain_client::Handle,
17715 { fidl::ObjectType::NONE.into_raw() },
17716 2147483648,
17717 >,
17718 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17719 &mut self.token
17720 ),
17721 ),
17722 encoder,
17723 offset,
17724 _depth,
17725 )
17726 }
17727 }
17728 unsafe impl<
17729 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
17730 T1: fidl::encoding::Encode<
17731 fidl::encoding::Optional<
17732 fidl::encoding::HandleType<
17733 fdomain_client::Handle,
17734 { fidl::ObjectType::NONE.into_raw() },
17735 2147483648,
17736 >,
17737 >,
17738 fdomain_client::fidl::FDomainResourceDialect,
17739 >,
17740 >
17741 fidl::encoding::Encode<
17742 DirectoryGetTokenResponse,
17743 fdomain_client::fidl::FDomainResourceDialect,
17744 > for (T0, T1)
17745 {
17746 #[inline]
17747 unsafe fn encode(
17748 self,
17749 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17750 offset: usize,
17751 depth: fidl::encoding::Depth,
17752 ) -> fidl::Result<()> {
17753 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17754 self.0.encode(encoder, offset + 0, depth)?;
17758 self.1.encode(encoder, offset + 4, depth)?;
17759 Ok(())
17760 }
17761 }
17762
17763 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17764 for DirectoryGetTokenResponse
17765 {
17766 #[inline(always)]
17767 fn new_empty() -> Self {
17768 Self {
17769 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
17770 token: fidl::new_empty!(
17771 fidl::encoding::Optional<
17772 fidl::encoding::HandleType<
17773 fdomain_client::Handle,
17774 { fidl::ObjectType::NONE.into_raw() },
17775 2147483648,
17776 >,
17777 >,
17778 fdomain_client::fidl::FDomainResourceDialect
17779 ),
17780 }
17781 }
17782
17783 #[inline]
17784 unsafe fn decode(
17785 &mut self,
17786 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17787 offset: usize,
17788 _depth: fidl::encoding::Depth,
17789 ) -> fidl::Result<()> {
17790 decoder.debug_check_bounds::<Self>(offset);
17791 fidl::decode!(
17793 i32,
17794 fdomain_client::fidl::FDomainResourceDialect,
17795 &mut self.s,
17796 decoder,
17797 offset + 0,
17798 _depth
17799 )?;
17800 fidl::decode!(
17801 fidl::encoding::Optional<
17802 fidl::encoding::HandleType<
17803 fdomain_client::Handle,
17804 { fidl::ObjectType::NONE.into_raw() },
17805 2147483648,
17806 >,
17807 >,
17808 fdomain_client::fidl::FDomainResourceDialect,
17809 &mut self.token,
17810 decoder,
17811 offset + 4,
17812 _depth
17813 )?;
17814 Ok(())
17815 }
17816 }
17817
17818 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
17819 type Borrowed<'a> = &'a mut Self;
17820 fn take_or_borrow<'a>(
17821 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17822 ) -> Self::Borrowed<'a> {
17823 value
17824 }
17825 }
17826
17827 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
17828 type Owned = Self;
17829
17830 #[inline(always)]
17831 fn inline_align(_context: fidl::encoding::Context) -> usize {
17832 8
17833 }
17834
17835 #[inline(always)]
17836 fn inline_size(_context: fidl::encoding::Context) -> usize {
17837 40
17838 }
17839 }
17840
17841 unsafe impl
17842 fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17843 for &mut DirectoryLinkRequest
17844 {
17845 #[inline]
17846 unsafe fn encode(
17847 self,
17848 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17849 offset: usize,
17850 _depth: fidl::encoding::Depth,
17851 ) -> fidl::Result<()> {
17852 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17853 fidl::encoding::Encode::<
17855 DirectoryLinkRequest,
17856 fdomain_client::fidl::FDomainResourceDialect,
17857 >::encode(
17858 (
17859 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17860 &self.src,
17861 ),
17862 <fidl::encoding::HandleType<
17863 fdomain_client::Handle,
17864 { fidl::ObjectType::NONE.into_raw() },
17865 2147483648,
17866 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17867 &mut self.dst_parent_token,
17868 ),
17869 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17870 &self.dst,
17871 ),
17872 ),
17873 encoder,
17874 offset,
17875 _depth,
17876 )
17877 }
17878 }
17879 unsafe impl<
17880 T0: fidl::encoding::Encode<
17881 fidl::encoding::BoundedString<255>,
17882 fdomain_client::fidl::FDomainResourceDialect,
17883 >,
17884 T1: fidl::encoding::Encode<
17885 fidl::encoding::HandleType<
17886 fdomain_client::Handle,
17887 { fidl::ObjectType::NONE.into_raw() },
17888 2147483648,
17889 >,
17890 fdomain_client::fidl::FDomainResourceDialect,
17891 >,
17892 T2: fidl::encoding::Encode<
17893 fidl::encoding::BoundedString<255>,
17894 fdomain_client::fidl::FDomainResourceDialect,
17895 >,
17896 >
17897 fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17898 for (T0, T1, T2)
17899 {
17900 #[inline]
17901 unsafe fn encode(
17902 self,
17903 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17904 offset: usize,
17905 depth: fidl::encoding::Depth,
17906 ) -> fidl::Result<()> {
17907 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17908 unsafe {
17911 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
17912 (ptr as *mut u64).write_unaligned(0);
17913 }
17914 self.0.encode(encoder, offset + 0, depth)?;
17916 self.1.encode(encoder, offset + 16, depth)?;
17917 self.2.encode(encoder, offset + 24, depth)?;
17918 Ok(())
17919 }
17920 }
17921
17922 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17923 for DirectoryLinkRequest
17924 {
17925 #[inline(always)]
17926 fn new_empty() -> Self {
17927 Self {
17928 src: fidl::new_empty!(
17929 fidl::encoding::BoundedString<255>,
17930 fdomain_client::fidl::FDomainResourceDialect
17931 ),
17932 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17933 dst: fidl::new_empty!(
17934 fidl::encoding::BoundedString<255>,
17935 fdomain_client::fidl::FDomainResourceDialect
17936 ),
17937 }
17938 }
17939
17940 #[inline]
17941 unsafe fn decode(
17942 &mut self,
17943 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17944 offset: usize,
17945 _depth: fidl::encoding::Depth,
17946 ) -> fidl::Result<()> {
17947 decoder.debug_check_bounds::<Self>(offset);
17948 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
17950 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17951 let mask = 0xffffffff00000000u64;
17952 let maskedval = padval & mask;
17953 if maskedval != 0 {
17954 return Err(fidl::Error::NonZeroPadding {
17955 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
17956 });
17957 }
17958 fidl::decode!(
17959 fidl::encoding::BoundedString<255>,
17960 fdomain_client::fidl::FDomainResourceDialect,
17961 &mut self.src,
17962 decoder,
17963 offset + 0,
17964 _depth
17965 )?;
17966 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
17967 fidl::decode!(
17968 fidl::encoding::BoundedString<255>,
17969 fdomain_client::fidl::FDomainResourceDialect,
17970 &mut self.dst,
17971 decoder,
17972 offset + 24,
17973 _depth
17974 )?;
17975 Ok(())
17976 }
17977 }
17978
17979 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
17980 type Borrowed<'a> = &'a mut Self;
17981 fn take_or_borrow<'a>(
17982 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17983 ) -> Self::Borrowed<'a> {
17984 value
17985 }
17986 }
17987
17988 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
17989 type Owned = Self;
17990
17991 #[inline(always)]
17992 fn inline_align(_context: fidl::encoding::Context) -> usize {
17993 8
17994 }
17995
17996 #[inline(always)]
17997 fn inline_size(_context: fidl::encoding::Context) -> usize {
17998 48
17999 }
18000 }
18001
18002 unsafe impl
18003 fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
18004 for &mut DirectoryOpenRequest
18005 {
18006 #[inline]
18007 unsafe fn encode(
18008 self,
18009 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18010 offset: usize,
18011 _depth: fidl::encoding::Depth,
18012 ) -> fidl::Result<()> {
18013 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
18014 fidl::encoding::Encode::<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
18016 (
18017 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
18018 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
18019 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18020 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
18021 ),
18022 encoder, offset, _depth
18023 )
18024 }
18025 }
18026 unsafe impl<
18027 T0: fidl::encoding::Encode<
18028 fidl::encoding::BoundedString<4095>,
18029 fdomain_client::fidl::FDomainResourceDialect,
18030 >,
18031 T1: fidl::encoding::Encode<Flags, fdomain_client::fidl::FDomainResourceDialect>,
18032 T2: fidl::encoding::Encode<Options, fdomain_client::fidl::FDomainResourceDialect>,
18033 T3: fidl::encoding::Encode<
18034 fidl::encoding::HandleType<
18035 fdomain_client::Channel,
18036 { fidl::ObjectType::CHANNEL.into_raw() },
18037 2147483648,
18038 >,
18039 fdomain_client::fidl::FDomainResourceDialect,
18040 >,
18041 >
18042 fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
18043 for (T0, T1, T2, T3)
18044 {
18045 #[inline]
18046 unsafe fn encode(
18047 self,
18048 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18049 offset: usize,
18050 depth: fidl::encoding::Depth,
18051 ) -> fidl::Result<()> {
18052 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
18053 unsafe {
18056 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
18057 (ptr as *mut u64).write_unaligned(0);
18058 }
18059 self.0.encode(encoder, offset + 0, depth)?;
18061 self.1.encode(encoder, offset + 16, depth)?;
18062 self.2.encode(encoder, offset + 24, depth)?;
18063 self.3.encode(encoder, offset + 40, depth)?;
18064 Ok(())
18065 }
18066 }
18067
18068 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18069 for DirectoryOpenRequest
18070 {
18071 #[inline(always)]
18072 fn new_empty() -> Self {
18073 Self {
18074 path: fidl::new_empty!(
18075 fidl::encoding::BoundedString<4095>,
18076 fdomain_client::fidl::FDomainResourceDialect
18077 ),
18078 flags: fidl::new_empty!(Flags, fdomain_client::fidl::FDomainResourceDialect),
18079 options: fidl::new_empty!(Options, fdomain_client::fidl::FDomainResourceDialect),
18080 object: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18081 }
18082 }
18083
18084 #[inline]
18085 unsafe fn decode(
18086 &mut self,
18087 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18088 offset: usize,
18089 _depth: fidl::encoding::Depth,
18090 ) -> fidl::Result<()> {
18091 decoder.debug_check_bounds::<Self>(offset);
18092 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
18094 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18095 let mask = 0xffffffff00000000u64;
18096 let maskedval = padval & mask;
18097 if maskedval != 0 {
18098 return Err(fidl::Error::NonZeroPadding {
18099 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
18100 });
18101 }
18102 fidl::decode!(
18103 fidl::encoding::BoundedString<4095>,
18104 fdomain_client::fidl::FDomainResourceDialect,
18105 &mut self.path,
18106 decoder,
18107 offset + 0,
18108 _depth
18109 )?;
18110 fidl::decode!(
18111 Flags,
18112 fdomain_client::fidl::FDomainResourceDialect,
18113 &mut self.flags,
18114 decoder,
18115 offset + 16,
18116 _depth
18117 )?;
18118 fidl::decode!(
18119 Options,
18120 fdomain_client::fidl::FDomainResourceDialect,
18121 &mut self.options,
18122 decoder,
18123 offset + 24,
18124 _depth
18125 )?;
18126 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)?;
18127 Ok(())
18128 }
18129 }
18130
18131 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
18132 type Borrowed<'a> = &'a mut Self;
18133 fn take_or_borrow<'a>(
18134 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18135 ) -> Self::Borrowed<'a> {
18136 value
18137 }
18138 }
18139
18140 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
18141 type Owned = Self;
18142
18143 #[inline(always)]
18144 fn inline_align(_context: fidl::encoding::Context) -> usize {
18145 8
18146 }
18147
18148 #[inline(always)]
18149 fn inline_size(_context: fidl::encoding::Context) -> usize {
18150 40
18151 }
18152 }
18153
18154 unsafe impl
18155 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18156 for &mut DirectoryRenameRequest
18157 {
18158 #[inline]
18159 unsafe fn encode(
18160 self,
18161 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18162 offset: usize,
18163 _depth: fidl::encoding::Depth,
18164 ) -> fidl::Result<()> {
18165 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18166 fidl::encoding::Encode::<
18168 DirectoryRenameRequest,
18169 fdomain_client::fidl::FDomainResourceDialect,
18170 >::encode(
18171 (
18172 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18173 &self.src,
18174 ),
18175 <fidl::encoding::HandleType<
18176 fdomain_client::Event,
18177 { fidl::ObjectType::EVENT.into_raw() },
18178 2147483648,
18179 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18180 &mut self.dst_parent_token,
18181 ),
18182 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18183 &self.dst,
18184 ),
18185 ),
18186 encoder,
18187 offset,
18188 _depth,
18189 )
18190 }
18191 }
18192 unsafe impl<
18193 T0: fidl::encoding::Encode<
18194 fidl::encoding::BoundedString<255>,
18195 fdomain_client::fidl::FDomainResourceDialect,
18196 >,
18197 T1: fidl::encoding::Encode<
18198 fidl::encoding::HandleType<
18199 fdomain_client::Event,
18200 { fidl::ObjectType::EVENT.into_raw() },
18201 2147483648,
18202 >,
18203 fdomain_client::fidl::FDomainResourceDialect,
18204 >,
18205 T2: fidl::encoding::Encode<
18206 fidl::encoding::BoundedString<255>,
18207 fdomain_client::fidl::FDomainResourceDialect,
18208 >,
18209 >
18210 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18211 for (T0, T1, T2)
18212 {
18213 #[inline]
18214 unsafe fn encode(
18215 self,
18216 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18217 offset: usize,
18218 depth: fidl::encoding::Depth,
18219 ) -> fidl::Result<()> {
18220 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18221 unsafe {
18224 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18225 (ptr as *mut u64).write_unaligned(0);
18226 }
18227 self.0.encode(encoder, offset + 0, depth)?;
18229 self.1.encode(encoder, offset + 16, depth)?;
18230 self.2.encode(encoder, offset + 24, depth)?;
18231 Ok(())
18232 }
18233 }
18234
18235 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18236 for DirectoryRenameRequest
18237 {
18238 #[inline(always)]
18239 fn new_empty() -> Self {
18240 Self {
18241 src: fidl::new_empty!(
18242 fidl::encoding::BoundedString<255>,
18243 fdomain_client::fidl::FDomainResourceDialect
18244 ),
18245 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18246 dst: fidl::new_empty!(
18247 fidl::encoding::BoundedString<255>,
18248 fdomain_client::fidl::FDomainResourceDialect
18249 ),
18250 }
18251 }
18252
18253 #[inline]
18254 unsafe fn decode(
18255 &mut self,
18256 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18257 offset: usize,
18258 _depth: fidl::encoding::Depth,
18259 ) -> fidl::Result<()> {
18260 decoder.debug_check_bounds::<Self>(offset);
18261 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18263 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18264 let mask = 0xffffffff00000000u64;
18265 let maskedval = padval & mask;
18266 if maskedval != 0 {
18267 return Err(fidl::Error::NonZeroPadding {
18268 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18269 });
18270 }
18271 fidl::decode!(
18272 fidl::encoding::BoundedString<255>,
18273 fdomain_client::fidl::FDomainResourceDialect,
18274 &mut self.src,
18275 decoder,
18276 offset + 0,
18277 _depth
18278 )?;
18279 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)?;
18280 fidl::decode!(
18281 fidl::encoding::BoundedString<255>,
18282 fdomain_client::fidl::FDomainResourceDialect,
18283 &mut self.dst,
18284 decoder,
18285 offset + 24,
18286 _depth
18287 )?;
18288 Ok(())
18289 }
18290 }
18291
18292 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
18293 type Borrowed<'a> = &'a mut Self;
18294 fn take_or_borrow<'a>(
18295 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18296 ) -> Self::Borrowed<'a> {
18297 value
18298 }
18299 }
18300
18301 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
18302 type Owned = Self;
18303
18304 #[inline(always)]
18305 fn inline_align(_context: fidl::encoding::Context) -> usize {
18306 4
18307 }
18308
18309 #[inline(always)]
18310 fn inline_size(_context: fidl::encoding::Context) -> usize {
18311 12
18312 }
18313 }
18314
18315 unsafe impl
18316 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18317 for &mut DirectoryWatchRequest
18318 {
18319 #[inline]
18320 unsafe fn encode(
18321 self,
18322 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18323 offset: usize,
18324 _depth: fidl::encoding::Depth,
18325 ) -> fidl::Result<()> {
18326 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18327 fidl::encoding::Encode::<
18329 DirectoryWatchRequest,
18330 fdomain_client::fidl::FDomainResourceDialect,
18331 >::encode(
18332 (
18333 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
18334 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18335 <fidl::encoding::Endpoint<
18336 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18337 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18338 &mut self.watcher
18339 ),
18340 ),
18341 encoder,
18342 offset,
18343 _depth,
18344 )
18345 }
18346 }
18347 unsafe impl<
18348 T0: fidl::encoding::Encode<WatchMask, fdomain_client::fidl::FDomainResourceDialect>,
18349 T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
18350 T2: fidl::encoding::Encode<
18351 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18352 fdomain_client::fidl::FDomainResourceDialect,
18353 >,
18354 >
18355 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18356 for (T0, T1, T2)
18357 {
18358 #[inline]
18359 unsafe fn encode(
18360 self,
18361 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18362 offset: usize,
18363 depth: fidl::encoding::Depth,
18364 ) -> fidl::Result<()> {
18365 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18366 self.0.encode(encoder, offset + 0, depth)?;
18370 self.1.encode(encoder, offset + 4, depth)?;
18371 self.2.encode(encoder, offset + 8, depth)?;
18372 Ok(())
18373 }
18374 }
18375
18376 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18377 for DirectoryWatchRequest
18378 {
18379 #[inline(always)]
18380 fn new_empty() -> Self {
18381 Self {
18382 mask: fidl::new_empty!(WatchMask, fdomain_client::fidl::FDomainResourceDialect),
18383 options: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
18384 watcher: fidl::new_empty!(
18385 fidl::encoding::Endpoint<
18386 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18387 >,
18388 fdomain_client::fidl::FDomainResourceDialect
18389 ),
18390 }
18391 }
18392
18393 #[inline]
18394 unsafe fn decode(
18395 &mut self,
18396 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18397 offset: usize,
18398 _depth: fidl::encoding::Depth,
18399 ) -> fidl::Result<()> {
18400 decoder.debug_check_bounds::<Self>(offset);
18401 fidl::decode!(
18403 WatchMask,
18404 fdomain_client::fidl::FDomainResourceDialect,
18405 &mut self.mask,
18406 decoder,
18407 offset + 0,
18408 _depth
18409 )?;
18410 fidl::decode!(
18411 u32,
18412 fdomain_client::fidl::FDomainResourceDialect,
18413 &mut self.options,
18414 decoder,
18415 offset + 4,
18416 _depth
18417 )?;
18418 fidl::decode!(
18419 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18420 fdomain_client::fidl::FDomainResourceDialect,
18421 &mut self.watcher,
18422 decoder,
18423 offset + 8,
18424 _depth
18425 )?;
18426 Ok(())
18427 }
18428 }
18429
18430 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
18431 type Borrowed<'a> = &'a mut Self;
18432 fn take_or_borrow<'a>(
18433 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18434 ) -> Self::Borrowed<'a> {
18435 value
18436 }
18437 }
18438
18439 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
18440 type Owned = Self;
18441
18442 #[inline(always)]
18443 fn inline_align(_context: fidl::encoding::Context) -> usize {
18444 8
18445 }
18446
18447 #[inline(always)]
18448 fn inline_size(_context: fidl::encoding::Context) -> usize {
18449 24
18450 }
18451 }
18452
18453 unsafe impl
18454 fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18455 for &mut FileAllocateRequest
18456 {
18457 #[inline]
18458 unsafe fn encode(
18459 self,
18460 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18461 offset: usize,
18462 _depth: fidl::encoding::Depth,
18463 ) -> fidl::Result<()> {
18464 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18465 fidl::encoding::Encode::<
18467 FileAllocateRequest,
18468 fdomain_client::fidl::FDomainResourceDialect,
18469 >::encode(
18470 (
18471 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
18472 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
18473 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
18474 ),
18475 encoder,
18476 offset,
18477 _depth,
18478 )
18479 }
18480 }
18481 unsafe impl<
18482 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18483 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18484 T2: fidl::encoding::Encode<AllocateMode, fdomain_client::fidl::FDomainResourceDialect>,
18485 >
18486 fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18487 for (T0, T1, T2)
18488 {
18489 #[inline]
18490 unsafe fn encode(
18491 self,
18492 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18493 offset: usize,
18494 depth: fidl::encoding::Depth,
18495 ) -> fidl::Result<()> {
18496 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18497 unsafe {
18500 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18501 (ptr as *mut u64).write_unaligned(0);
18502 }
18503 self.0.encode(encoder, offset + 0, depth)?;
18505 self.1.encode(encoder, offset + 8, depth)?;
18506 self.2.encode(encoder, offset + 16, depth)?;
18507 Ok(())
18508 }
18509 }
18510
18511 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18512 for FileAllocateRequest
18513 {
18514 #[inline(always)]
18515 fn new_empty() -> Self {
18516 Self {
18517 offset: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18518 length: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18519 mode: fidl::new_empty!(AllocateMode, fdomain_client::fidl::FDomainResourceDialect),
18520 }
18521 }
18522
18523 #[inline]
18524 unsafe fn decode(
18525 &mut self,
18526 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18527 offset: usize,
18528 _depth: fidl::encoding::Depth,
18529 ) -> fidl::Result<()> {
18530 decoder.debug_check_bounds::<Self>(offset);
18531 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18533 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18534 let mask = 0xffffffff00000000u64;
18535 let maskedval = padval & mask;
18536 if maskedval != 0 {
18537 return Err(fidl::Error::NonZeroPadding {
18538 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18539 });
18540 }
18541 fidl::decode!(
18542 u64,
18543 fdomain_client::fidl::FDomainResourceDialect,
18544 &mut self.offset,
18545 decoder,
18546 offset + 0,
18547 _depth
18548 )?;
18549 fidl::decode!(
18550 u64,
18551 fdomain_client::fidl::FDomainResourceDialect,
18552 &mut self.length,
18553 decoder,
18554 offset + 8,
18555 _depth
18556 )?;
18557 fidl::decode!(
18558 AllocateMode,
18559 fdomain_client::fidl::FDomainResourceDialect,
18560 &mut self.mode,
18561 decoder,
18562 offset + 16,
18563 _depth
18564 )?;
18565 Ok(())
18566 }
18567 }
18568
18569 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
18570 type Borrowed<'a> = &'a mut Self;
18571 fn take_or_borrow<'a>(
18572 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18573 ) -> Self::Borrowed<'a> {
18574 value
18575 }
18576 }
18577
18578 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
18579 type Owned = Self;
18580
18581 #[inline(always)]
18582 fn inline_align(_context: fidl::encoding::Context) -> usize {
18583 8
18584 }
18585
18586 #[inline(always)]
18587 fn inline_size(_context: fidl::encoding::Context) -> usize {
18588 16
18589 }
18590 }
18591
18592 unsafe impl
18593 fidl::encoding::Encode<
18594 FileEnableVerityRequest,
18595 fdomain_client::fidl::FDomainResourceDialect,
18596 > for &mut FileEnableVerityRequest
18597 {
18598 #[inline]
18599 unsafe fn encode(
18600 self,
18601 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18602 offset: usize,
18603 _depth: fidl::encoding::Depth,
18604 ) -> fidl::Result<()> {
18605 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18606 fidl::encoding::Encode::<
18608 FileEnableVerityRequest,
18609 fdomain_client::fidl::FDomainResourceDialect,
18610 >::encode(
18611 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
18612 encoder,
18613 offset,
18614 _depth,
18615 )
18616 }
18617 }
18618 unsafe impl<
18619 T0: fidl::encoding::Encode<
18620 VerificationOptions,
18621 fdomain_client::fidl::FDomainResourceDialect,
18622 >,
18623 >
18624 fidl::encoding::Encode<
18625 FileEnableVerityRequest,
18626 fdomain_client::fidl::FDomainResourceDialect,
18627 > for (T0,)
18628 {
18629 #[inline]
18630 unsafe fn encode(
18631 self,
18632 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18633 offset: usize,
18634 depth: fidl::encoding::Depth,
18635 ) -> fidl::Result<()> {
18636 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18637 self.0.encode(encoder, offset + 0, depth)?;
18641 Ok(())
18642 }
18643 }
18644
18645 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18646 for FileEnableVerityRequest
18647 {
18648 #[inline(always)]
18649 fn new_empty() -> Self {
18650 Self {
18651 options: fidl::new_empty!(
18652 VerificationOptions,
18653 fdomain_client::fidl::FDomainResourceDialect
18654 ),
18655 }
18656 }
18657
18658 #[inline]
18659 unsafe fn decode(
18660 &mut self,
18661 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18662 offset: usize,
18663 _depth: fidl::encoding::Depth,
18664 ) -> fidl::Result<()> {
18665 decoder.debug_check_bounds::<Self>(offset);
18666 fidl::decode!(
18668 VerificationOptions,
18669 fdomain_client::fidl::FDomainResourceDialect,
18670 &mut self.options,
18671 decoder,
18672 offset + 0,
18673 _depth
18674 )?;
18675 Ok(())
18676 }
18677 }
18678
18679 impl fidl::encoding::ResourceTypeMarker for FileObject {
18680 type Borrowed<'a> = &'a mut Self;
18681 fn take_or_borrow<'a>(
18682 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18683 ) -> Self::Borrowed<'a> {
18684 value
18685 }
18686 }
18687
18688 unsafe impl fidl::encoding::TypeMarker for FileObject {
18689 type Owned = Self;
18690
18691 #[inline(always)]
18692 fn inline_align(_context: fidl::encoding::Context) -> usize {
18693 4
18694 }
18695
18696 #[inline(always)]
18697 fn inline_size(_context: fidl::encoding::Context) -> usize {
18698 8
18699 }
18700 }
18701
18702 unsafe impl fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18703 for &mut FileObject
18704 {
18705 #[inline]
18706 unsafe fn encode(
18707 self,
18708 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18709 offset: usize,
18710 _depth: fidl::encoding::Depth,
18711 ) -> fidl::Result<()> {
18712 encoder.debug_check_bounds::<FileObject>(offset);
18713 fidl::encoding::Encode::<FileObject, fdomain_client::fidl::FDomainResourceDialect>::encode(
18715 (
18716 <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),
18717 <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),
18718 ),
18719 encoder, offset, _depth
18720 )
18721 }
18722 }
18723 unsafe impl<
18724 T0: fidl::encoding::Encode<
18725 fidl::encoding::Optional<
18726 fidl::encoding::HandleType<
18727 fdomain_client::Event,
18728 { fidl::ObjectType::EVENT.into_raw() },
18729 2147483648,
18730 >,
18731 >,
18732 fdomain_client::fidl::FDomainResourceDialect,
18733 >,
18734 T1: fidl::encoding::Encode<
18735 fidl::encoding::Optional<
18736 fidl::encoding::HandleType<
18737 fdomain_client::Stream,
18738 { fidl::ObjectType::STREAM.into_raw() },
18739 2147483648,
18740 >,
18741 >,
18742 fdomain_client::fidl::FDomainResourceDialect,
18743 >,
18744 > fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18745 for (T0, T1)
18746 {
18747 #[inline]
18748 unsafe fn encode(
18749 self,
18750 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18751 offset: usize,
18752 depth: fidl::encoding::Depth,
18753 ) -> fidl::Result<()> {
18754 encoder.debug_check_bounds::<FileObject>(offset);
18755 self.0.encode(encoder, offset + 0, depth)?;
18759 self.1.encode(encoder, offset + 4, depth)?;
18760 Ok(())
18761 }
18762 }
18763
18764 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileObject {
18765 #[inline(always)]
18766 fn new_empty() -> Self {
18767 Self {
18768 event: fidl::new_empty!(
18769 fidl::encoding::Optional<
18770 fidl::encoding::HandleType<
18771 fdomain_client::Event,
18772 { fidl::ObjectType::EVENT.into_raw() },
18773 2147483648,
18774 >,
18775 >,
18776 fdomain_client::fidl::FDomainResourceDialect
18777 ),
18778 stream: fidl::new_empty!(
18779 fidl::encoding::Optional<
18780 fidl::encoding::HandleType<
18781 fdomain_client::Stream,
18782 { fidl::ObjectType::STREAM.into_raw() },
18783 2147483648,
18784 >,
18785 >,
18786 fdomain_client::fidl::FDomainResourceDialect
18787 ),
18788 }
18789 }
18790
18791 #[inline]
18792 unsafe fn decode(
18793 &mut self,
18794 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18795 offset: usize,
18796 _depth: fidl::encoding::Depth,
18797 ) -> fidl::Result<()> {
18798 decoder.debug_check_bounds::<Self>(offset);
18799 fidl::decode!(
18801 fidl::encoding::Optional<
18802 fidl::encoding::HandleType<
18803 fdomain_client::Event,
18804 { fidl::ObjectType::EVENT.into_raw() },
18805 2147483648,
18806 >,
18807 >,
18808 fdomain_client::fidl::FDomainResourceDialect,
18809 &mut self.event,
18810 decoder,
18811 offset + 0,
18812 _depth
18813 )?;
18814 fidl::decode!(
18815 fidl::encoding::Optional<
18816 fidl::encoding::HandleType<
18817 fdomain_client::Stream,
18818 { fidl::ObjectType::STREAM.into_raw() },
18819 2147483648,
18820 >,
18821 >,
18822 fdomain_client::fidl::FDomainResourceDialect,
18823 &mut self.stream,
18824 decoder,
18825 offset + 4,
18826 _depth
18827 )?;
18828 Ok(())
18829 }
18830 }
18831
18832 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
18833 type Borrowed<'a> = &'a mut Self;
18834 fn take_or_borrow<'a>(
18835 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18836 ) -> Self::Borrowed<'a> {
18837 value
18838 }
18839 }
18840
18841 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
18842 type Owned = Self;
18843
18844 #[inline(always)]
18845 fn inline_align(_context: fidl::encoding::Context) -> usize {
18846 4
18847 }
18848
18849 #[inline(always)]
18850 fn inline_size(_context: fidl::encoding::Context) -> usize {
18851 4
18852 }
18853 }
18854
18855 unsafe impl
18856 fidl::encoding::Encode<
18857 FileGetBackingMemoryResponse,
18858 fdomain_client::fidl::FDomainResourceDialect,
18859 > for &mut FileGetBackingMemoryResponse
18860 {
18861 #[inline]
18862 unsafe fn encode(
18863 self,
18864 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18865 offset: usize,
18866 _depth: fidl::encoding::Depth,
18867 ) -> fidl::Result<()> {
18868 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18869 fidl::encoding::Encode::<
18871 FileGetBackingMemoryResponse,
18872 fdomain_client::fidl::FDomainResourceDialect,
18873 >::encode(
18874 (<fidl::encoding::HandleType<
18875 fdomain_client::Vmo,
18876 { fidl::ObjectType::VMO.into_raw() },
18877 2147483648,
18878 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18879 &mut self.vmo
18880 ),),
18881 encoder,
18882 offset,
18883 _depth,
18884 )
18885 }
18886 }
18887 unsafe impl<
18888 T0: fidl::encoding::Encode<
18889 fidl::encoding::HandleType<
18890 fdomain_client::Vmo,
18891 { fidl::ObjectType::VMO.into_raw() },
18892 2147483648,
18893 >,
18894 fdomain_client::fidl::FDomainResourceDialect,
18895 >,
18896 >
18897 fidl::encoding::Encode<
18898 FileGetBackingMemoryResponse,
18899 fdomain_client::fidl::FDomainResourceDialect,
18900 > for (T0,)
18901 {
18902 #[inline]
18903 unsafe fn encode(
18904 self,
18905 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18906 offset: usize,
18907 depth: fidl::encoding::Depth,
18908 ) -> fidl::Result<()> {
18909 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18910 self.0.encode(encoder, offset + 0, depth)?;
18914 Ok(())
18915 }
18916 }
18917
18918 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18919 for FileGetBackingMemoryResponse
18920 {
18921 #[inline(always)]
18922 fn new_empty() -> Self {
18923 Self {
18924 vmo: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18925 }
18926 }
18927
18928 #[inline]
18929 unsafe fn decode(
18930 &mut self,
18931 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18932 offset: usize,
18933 _depth: fidl::encoding::Depth,
18934 ) -> fidl::Result<()> {
18935 decoder.debug_check_bounds::<Self>(offset);
18936 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)?;
18938 Ok(())
18939 }
18940 }
18941
18942 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
18943 type Borrowed<'a> = &'a mut Self;
18944 fn take_or_borrow<'a>(
18945 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18946 ) -> Self::Borrowed<'a> {
18947 value
18948 }
18949 }
18950
18951 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
18952 type Owned = Self;
18953
18954 #[inline(always)]
18955 fn inline_align(_context: fidl::encoding::Context) -> usize {
18956 8
18957 }
18958
18959 #[inline(always)]
18960 fn inline_size(_context: fidl::encoding::Context) -> usize {
18961 24
18962 }
18963 }
18964
18965 unsafe impl
18966 fidl::encoding::Encode<
18967 LinkableLinkIntoRequest,
18968 fdomain_client::fidl::FDomainResourceDialect,
18969 > for &mut LinkableLinkIntoRequest
18970 {
18971 #[inline]
18972 unsafe fn encode(
18973 self,
18974 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18975 offset: usize,
18976 _depth: fidl::encoding::Depth,
18977 ) -> fidl::Result<()> {
18978 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18979 fidl::encoding::Encode::<
18981 LinkableLinkIntoRequest,
18982 fdomain_client::fidl::FDomainResourceDialect,
18983 >::encode(
18984 (
18985 <fidl::encoding::HandleType<
18986 fdomain_client::Event,
18987 { fidl::ObjectType::EVENT.into_raw() },
18988 2147483648,
18989 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18990 &mut self.dst_parent_token,
18991 ),
18992 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18993 &self.dst,
18994 ),
18995 ),
18996 encoder,
18997 offset,
18998 _depth,
18999 )
19000 }
19001 }
19002 unsafe impl<
19003 T0: fidl::encoding::Encode<
19004 fidl::encoding::HandleType<
19005 fdomain_client::Event,
19006 { fidl::ObjectType::EVENT.into_raw() },
19007 2147483648,
19008 >,
19009 fdomain_client::fidl::FDomainResourceDialect,
19010 >,
19011 T1: fidl::encoding::Encode<
19012 fidl::encoding::BoundedString<255>,
19013 fdomain_client::fidl::FDomainResourceDialect,
19014 >,
19015 >
19016 fidl::encoding::Encode<
19017 LinkableLinkIntoRequest,
19018 fdomain_client::fidl::FDomainResourceDialect,
19019 > for (T0, T1)
19020 {
19021 #[inline]
19022 unsafe fn encode(
19023 self,
19024 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19025 offset: usize,
19026 depth: fidl::encoding::Depth,
19027 ) -> fidl::Result<()> {
19028 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
19029 unsafe {
19032 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19033 (ptr as *mut u64).write_unaligned(0);
19034 }
19035 self.0.encode(encoder, offset + 0, depth)?;
19037 self.1.encode(encoder, offset + 8, depth)?;
19038 Ok(())
19039 }
19040 }
19041
19042 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19043 for LinkableLinkIntoRequest
19044 {
19045 #[inline(always)]
19046 fn new_empty() -> Self {
19047 Self {
19048 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
19049 dst: fidl::new_empty!(
19050 fidl::encoding::BoundedString<255>,
19051 fdomain_client::fidl::FDomainResourceDialect
19052 ),
19053 }
19054 }
19055
19056 #[inline]
19057 unsafe fn decode(
19058 &mut self,
19059 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19060 offset: usize,
19061 _depth: fidl::encoding::Depth,
19062 ) -> fidl::Result<()> {
19063 decoder.debug_check_bounds::<Self>(offset);
19064 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19066 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19067 let mask = 0xffffffff00000000u64;
19068 let maskedval = padval & mask;
19069 if maskedval != 0 {
19070 return Err(fidl::Error::NonZeroPadding {
19071 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19072 });
19073 }
19074 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)?;
19075 fidl::decode!(
19076 fidl::encoding::BoundedString<255>,
19077 fdomain_client::fidl::FDomainResourceDialect,
19078 &mut self.dst,
19079 decoder,
19080 offset + 8,
19081 _depth
19082 )?;
19083 Ok(())
19084 }
19085 }
19086
19087 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
19088 type Borrowed<'a> = &'a mut Self;
19089 fn take_or_borrow<'a>(
19090 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19091 ) -> Self::Borrowed<'a> {
19092 value
19093 }
19094 }
19095
19096 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
19097 type Owned = Self;
19098
19099 #[inline(always)]
19100 fn inline_align(_context: fidl::encoding::Context) -> usize {
19101 4
19102 }
19103
19104 #[inline(always)]
19105 fn inline_size(_context: fidl::encoding::Context) -> usize {
19106 8
19107 }
19108 }
19109
19110 unsafe impl
19111 fidl::encoding::Encode<
19112 NodeDeprecatedCloneRequest,
19113 fdomain_client::fidl::FDomainResourceDialect,
19114 > for &mut NodeDeprecatedCloneRequest
19115 {
19116 #[inline]
19117 unsafe fn encode(
19118 self,
19119 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19120 offset: usize,
19121 _depth: fidl::encoding::Depth,
19122 ) -> fidl::Result<()> {
19123 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19124 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19126 (
19127 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
19128 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
19129 ),
19130 encoder, offset, _depth
19131 )
19132 }
19133 }
19134 unsafe impl<
19135 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
19136 T1: fidl::encoding::Encode<
19137 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19138 fdomain_client::fidl::FDomainResourceDialect,
19139 >,
19140 >
19141 fidl::encoding::Encode<
19142 NodeDeprecatedCloneRequest,
19143 fdomain_client::fidl::FDomainResourceDialect,
19144 > for (T0, T1)
19145 {
19146 #[inline]
19147 unsafe fn encode(
19148 self,
19149 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19150 offset: usize,
19151 depth: fidl::encoding::Depth,
19152 ) -> fidl::Result<()> {
19153 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19154 self.0.encode(encoder, offset + 0, depth)?;
19158 self.1.encode(encoder, offset + 4, depth)?;
19159 Ok(())
19160 }
19161 }
19162
19163 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19164 for NodeDeprecatedCloneRequest
19165 {
19166 #[inline(always)]
19167 fn new_empty() -> Self {
19168 Self {
19169 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
19170 object: fidl::new_empty!(
19171 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19172 fdomain_client::fidl::FDomainResourceDialect
19173 ),
19174 }
19175 }
19176
19177 #[inline]
19178 unsafe fn decode(
19179 &mut self,
19180 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19181 offset: usize,
19182 _depth: fidl::encoding::Depth,
19183 ) -> fidl::Result<()> {
19184 decoder.debug_check_bounds::<Self>(offset);
19185 fidl::decode!(
19187 OpenFlags,
19188 fdomain_client::fidl::FDomainResourceDialect,
19189 &mut self.flags,
19190 decoder,
19191 offset + 0,
19192 _depth
19193 )?;
19194 fidl::decode!(
19195 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19196 fdomain_client::fidl::FDomainResourceDialect,
19197 &mut self.object,
19198 decoder,
19199 offset + 4,
19200 _depth
19201 )?;
19202 Ok(())
19203 }
19204 }
19205
19206 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
19207 type Borrowed<'a> = &'a mut Self;
19208 fn take_or_borrow<'a>(
19209 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19210 ) -> Self::Borrowed<'a> {
19211 value
19212 }
19213 }
19214
19215 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
19216 type Owned = Self;
19217
19218 #[inline(always)]
19219 fn inline_align(_context: fidl::encoding::Context) -> usize {
19220 4
19221 }
19222
19223 #[inline(always)]
19224 fn inline_size(_context: fidl::encoding::Context) -> usize {
19225 4
19226 }
19227 }
19228
19229 unsafe impl
19230 fidl::encoding::Encode<
19231 NodeListExtendedAttributesRequest,
19232 fdomain_client::fidl::FDomainResourceDialect,
19233 > for &mut NodeListExtendedAttributesRequest
19234 {
19235 #[inline]
19236 unsafe fn encode(
19237 self,
19238 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19239 offset: usize,
19240 _depth: fidl::encoding::Depth,
19241 ) -> fidl::Result<()> {
19242 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19243 fidl::encoding::Encode::<
19245 NodeListExtendedAttributesRequest,
19246 fdomain_client::fidl::FDomainResourceDialect,
19247 >::encode(
19248 (<fidl::encoding::Endpoint<
19249 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19250 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19251 &mut self.iterator
19252 ),),
19253 encoder,
19254 offset,
19255 _depth,
19256 )
19257 }
19258 }
19259 unsafe impl<
19260 T0: fidl::encoding::Encode<
19261 fidl::encoding::Endpoint<
19262 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19263 >,
19264 fdomain_client::fidl::FDomainResourceDialect,
19265 >,
19266 >
19267 fidl::encoding::Encode<
19268 NodeListExtendedAttributesRequest,
19269 fdomain_client::fidl::FDomainResourceDialect,
19270 > for (T0,)
19271 {
19272 #[inline]
19273 unsafe fn encode(
19274 self,
19275 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19276 offset: usize,
19277 depth: fidl::encoding::Depth,
19278 ) -> fidl::Result<()> {
19279 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19280 self.0.encode(encoder, offset + 0, depth)?;
19284 Ok(())
19285 }
19286 }
19287
19288 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19289 for NodeListExtendedAttributesRequest
19290 {
19291 #[inline(always)]
19292 fn new_empty() -> Self {
19293 Self {
19294 iterator: fidl::new_empty!(
19295 fidl::encoding::Endpoint<
19296 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19297 >,
19298 fdomain_client::fidl::FDomainResourceDialect
19299 ),
19300 }
19301 }
19302
19303 #[inline]
19304 unsafe fn decode(
19305 &mut self,
19306 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19307 offset: usize,
19308 _depth: fidl::encoding::Depth,
19309 ) -> fidl::Result<()> {
19310 decoder.debug_check_bounds::<Self>(offset);
19311 fidl::decode!(
19313 fidl::encoding::Endpoint<
19314 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19315 >,
19316 fdomain_client::fidl::FDomainResourceDialect,
19317 &mut self.iterator,
19318 decoder,
19319 offset + 0,
19320 _depth
19321 )?;
19322 Ok(())
19323 }
19324 }
19325
19326 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
19327 type Borrowed<'a> = &'a mut Self;
19328 fn take_or_borrow<'a>(
19329 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19330 ) -> Self::Borrowed<'a> {
19331 value
19332 }
19333 }
19334
19335 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
19336 type Owned = Self;
19337
19338 #[inline(always)]
19339 fn inline_align(_context: fidl::encoding::Context) -> usize {
19340 8
19341 }
19342
19343 #[inline(always)]
19344 fn inline_size(_context: fidl::encoding::Context) -> usize {
19345 24
19346 }
19347 }
19348
19349 unsafe impl
19350 fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19351 for &mut NodeOnOpenRequest
19352 {
19353 #[inline]
19354 unsafe fn encode(
19355 self,
19356 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19357 offset: usize,
19358 _depth: fidl::encoding::Depth,
19359 ) -> fidl::Result<()> {
19360 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19361 fidl::encoding::Encode::<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19363 (
19364 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
19365 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
19366 ),
19367 encoder, offset, _depth
19368 )
19369 }
19370 }
19371 unsafe impl<
19372 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
19373 T1: fidl::encoding::Encode<
19374 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19375 fdomain_client::fidl::FDomainResourceDialect,
19376 >,
19377 >
19378 fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19379 for (T0, T1)
19380 {
19381 #[inline]
19382 unsafe fn encode(
19383 self,
19384 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19385 offset: usize,
19386 depth: fidl::encoding::Depth,
19387 ) -> fidl::Result<()> {
19388 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19389 unsafe {
19392 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19393 (ptr as *mut u64).write_unaligned(0);
19394 }
19395 self.0.encode(encoder, offset + 0, depth)?;
19397 self.1.encode(encoder, offset + 8, depth)?;
19398 Ok(())
19399 }
19400 }
19401
19402 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19403 for NodeOnOpenRequest
19404 {
19405 #[inline(always)]
19406 fn new_empty() -> Self {
19407 Self {
19408 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
19409 info: fidl::new_empty!(
19410 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19411 fdomain_client::fidl::FDomainResourceDialect
19412 ),
19413 }
19414 }
19415
19416 #[inline]
19417 unsafe fn decode(
19418 &mut self,
19419 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19420 offset: usize,
19421 _depth: fidl::encoding::Depth,
19422 ) -> fidl::Result<()> {
19423 decoder.debug_check_bounds::<Self>(offset);
19424 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19426 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19427 let mask = 0xffffffff00000000u64;
19428 let maskedval = padval & mask;
19429 if maskedval != 0 {
19430 return Err(fidl::Error::NonZeroPadding {
19431 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19432 });
19433 }
19434 fidl::decode!(
19435 i32,
19436 fdomain_client::fidl::FDomainResourceDialect,
19437 &mut self.s,
19438 decoder,
19439 offset + 0,
19440 _depth
19441 )?;
19442 fidl::decode!(
19443 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19444 fdomain_client::fidl::FDomainResourceDialect,
19445 &mut self.info,
19446 decoder,
19447 offset + 8,
19448 _depth
19449 )?;
19450 Ok(())
19451 }
19452 }
19453
19454 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
19455 type Borrowed<'a> = &'a mut Self;
19456 fn take_or_borrow<'a>(
19457 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19458 ) -> Self::Borrowed<'a> {
19459 value
19460 }
19461 }
19462
19463 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
19464 type Owned = Self;
19465
19466 #[inline(always)]
19467 fn inline_align(_context: fidl::encoding::Context) -> usize {
19468 8
19469 }
19470
19471 #[inline(always)]
19472 fn inline_size(_context: fidl::encoding::Context) -> usize {
19473 40
19474 }
19475 }
19476
19477 unsafe impl
19478 fidl::encoding::Encode<
19479 NodeSetExtendedAttributeRequest,
19480 fdomain_client::fidl::FDomainResourceDialect,
19481 > for &mut NodeSetExtendedAttributeRequest
19482 {
19483 #[inline]
19484 unsafe fn encode(
19485 self,
19486 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19487 offset: usize,
19488 _depth: fidl::encoding::Depth,
19489 ) -> fidl::Result<()> {
19490 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19491 fidl::encoding::Encode::<
19493 NodeSetExtendedAttributeRequest,
19494 fdomain_client::fidl::FDomainResourceDialect,
19495 >::encode(
19496 (
19497 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
19498 &self.name,
19499 ),
19500 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19501 &mut self.value,
19502 ),
19503 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
19504 &self.mode,
19505 ),
19506 ),
19507 encoder,
19508 offset,
19509 _depth,
19510 )
19511 }
19512 }
19513 unsafe impl<
19514 T0: fidl::encoding::Encode<
19515 fidl::encoding::Vector<u8, 255>,
19516 fdomain_client::fidl::FDomainResourceDialect,
19517 >,
19518 T1: fidl::encoding::Encode<
19519 ExtendedAttributeValue,
19520 fdomain_client::fidl::FDomainResourceDialect,
19521 >,
19522 T2: fidl::encoding::Encode<
19523 SetExtendedAttributeMode,
19524 fdomain_client::fidl::FDomainResourceDialect,
19525 >,
19526 >
19527 fidl::encoding::Encode<
19528 NodeSetExtendedAttributeRequest,
19529 fdomain_client::fidl::FDomainResourceDialect,
19530 > for (T0, T1, T2)
19531 {
19532 #[inline]
19533 unsafe fn encode(
19534 self,
19535 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19536 offset: usize,
19537 depth: fidl::encoding::Depth,
19538 ) -> fidl::Result<()> {
19539 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19540 unsafe {
19543 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
19544 (ptr as *mut u64).write_unaligned(0);
19545 }
19546 self.0.encode(encoder, offset + 0, depth)?;
19548 self.1.encode(encoder, offset + 16, depth)?;
19549 self.2.encode(encoder, offset + 32, depth)?;
19550 Ok(())
19551 }
19552 }
19553
19554 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19555 for NodeSetExtendedAttributeRequest
19556 {
19557 #[inline(always)]
19558 fn new_empty() -> Self {
19559 Self {
19560 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect),
19561 value: fidl::new_empty!(
19562 ExtendedAttributeValue,
19563 fdomain_client::fidl::FDomainResourceDialect
19564 ),
19565 mode: fidl::new_empty!(
19566 SetExtendedAttributeMode,
19567 fdomain_client::fidl::FDomainResourceDialect
19568 ),
19569 }
19570 }
19571
19572 #[inline]
19573 unsafe fn decode(
19574 &mut self,
19575 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19576 offset: usize,
19577 _depth: fidl::encoding::Depth,
19578 ) -> fidl::Result<()> {
19579 decoder.debug_check_bounds::<Self>(offset);
19580 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
19582 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19583 let mask = 0xffffffff00000000u64;
19584 let maskedval = padval & mask;
19585 if maskedval != 0 {
19586 return Err(fidl::Error::NonZeroPadding {
19587 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
19588 });
19589 }
19590 fidl::decode!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
19591 fidl::decode!(
19592 ExtendedAttributeValue,
19593 fdomain_client::fidl::FDomainResourceDialect,
19594 &mut self.value,
19595 decoder,
19596 offset + 16,
19597 _depth
19598 )?;
19599 fidl::decode!(
19600 SetExtendedAttributeMode,
19601 fdomain_client::fidl::FDomainResourceDialect,
19602 &mut self.mode,
19603 decoder,
19604 offset + 32,
19605 _depth
19606 )?;
19607 Ok(())
19608 }
19609 }
19610
19611 impl ConnectionInfo {
19612 #[inline(always)]
19613 fn max_ordinal_present(&self) -> u64 {
19614 if let Some(_) = self.rights {
19615 return 1;
19616 }
19617 0
19618 }
19619 }
19620
19621 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
19622 type Borrowed<'a> = &'a mut Self;
19623 fn take_or_borrow<'a>(
19624 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19625 ) -> Self::Borrowed<'a> {
19626 value
19627 }
19628 }
19629
19630 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
19631 type Owned = Self;
19632
19633 #[inline(always)]
19634 fn inline_align(_context: fidl::encoding::Context) -> usize {
19635 8
19636 }
19637
19638 #[inline(always)]
19639 fn inline_size(_context: fidl::encoding::Context) -> usize {
19640 16
19641 }
19642 }
19643
19644 unsafe impl fidl::encoding::Encode<ConnectionInfo, fdomain_client::fidl::FDomainResourceDialect>
19645 for &mut ConnectionInfo
19646 {
19647 unsafe fn encode(
19648 self,
19649 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19650 offset: usize,
19651 mut depth: fidl::encoding::Depth,
19652 ) -> fidl::Result<()> {
19653 encoder.debug_check_bounds::<ConnectionInfo>(offset);
19654 let max_ordinal: u64 = self.max_ordinal_present();
19656 encoder.write_num(max_ordinal, offset);
19657 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19658 if max_ordinal == 0 {
19660 return Ok(());
19661 }
19662 depth.increment()?;
19663 let envelope_size = 8;
19664 let bytes_len = max_ordinal as usize * envelope_size;
19665 #[allow(unused_variables)]
19666 let offset = encoder.out_of_line_offset(bytes_len);
19667 let mut _prev_end_offset: usize = 0;
19668 if 1 > max_ordinal {
19669 return Ok(());
19670 }
19671
19672 let cur_offset: usize = (1 - 1) * envelope_size;
19675
19676 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19678
19679 fidl::encoding::encode_in_envelope_optional::<
19684 Operations,
19685 fdomain_client::fidl::FDomainResourceDialect,
19686 >(
19687 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
19688 encoder,
19689 offset + cur_offset,
19690 depth,
19691 )?;
19692
19693 _prev_end_offset = cur_offset + envelope_size;
19694
19695 Ok(())
19696 }
19697 }
19698
19699 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {
19700 #[inline(always)]
19701 fn new_empty() -> Self {
19702 Self::default()
19703 }
19704
19705 unsafe fn decode(
19706 &mut self,
19707 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19708 offset: usize,
19709 mut depth: fidl::encoding::Depth,
19710 ) -> fidl::Result<()> {
19711 decoder.debug_check_bounds::<Self>(offset);
19712 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19713 None => return Err(fidl::Error::NotNullable),
19714 Some(len) => len,
19715 };
19716 if len == 0 {
19718 return Ok(());
19719 };
19720 depth.increment()?;
19721 let envelope_size = 8;
19722 let bytes_len = len * envelope_size;
19723 let offset = decoder.out_of_line_offset(bytes_len)?;
19724 let mut _next_ordinal_to_read = 0;
19726 let mut next_offset = offset;
19727 let end_offset = offset + bytes_len;
19728 _next_ordinal_to_read += 1;
19729 if next_offset >= end_offset {
19730 return Ok(());
19731 }
19732
19733 while _next_ordinal_to_read < 1 {
19735 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19736 _next_ordinal_to_read += 1;
19737 next_offset += envelope_size;
19738 }
19739
19740 let next_out_of_line = decoder.next_out_of_line();
19741 let handles_before = decoder.remaining_handles();
19742 if let Some((inlined, num_bytes, num_handles)) =
19743 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19744 {
19745 let member_inline_size =
19746 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19747 if inlined != (member_inline_size <= 4) {
19748 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19749 }
19750 let inner_offset;
19751 let mut inner_depth = depth.clone();
19752 if inlined {
19753 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19754 inner_offset = next_offset;
19755 } else {
19756 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19757 inner_depth.increment()?;
19758 }
19759 let val_ref = self.rights.get_or_insert_with(|| {
19760 fidl::new_empty!(Operations, fdomain_client::fidl::FDomainResourceDialect)
19761 });
19762 fidl::decode!(
19763 Operations,
19764 fdomain_client::fidl::FDomainResourceDialect,
19765 val_ref,
19766 decoder,
19767 inner_offset,
19768 inner_depth
19769 )?;
19770 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19771 {
19772 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19773 }
19774 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19775 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19776 }
19777 }
19778
19779 next_offset += envelope_size;
19780
19781 while next_offset < end_offset {
19783 _next_ordinal_to_read += 1;
19784 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19785 next_offset += envelope_size;
19786 }
19787
19788 Ok(())
19789 }
19790 }
19791
19792 impl FileInfo {
19793 #[inline(always)]
19794 fn max_ordinal_present(&self) -> u64 {
19795 if let Some(_) = self.attributes {
19796 return 4;
19797 }
19798 if let Some(_) = self.stream {
19799 return 3;
19800 }
19801 if let Some(_) = self.observer {
19802 return 2;
19803 }
19804 if let Some(_) = self.is_append {
19805 return 1;
19806 }
19807 0
19808 }
19809 }
19810
19811 impl fidl::encoding::ResourceTypeMarker for FileInfo {
19812 type Borrowed<'a> = &'a mut Self;
19813 fn take_or_borrow<'a>(
19814 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19815 ) -> Self::Borrowed<'a> {
19816 value
19817 }
19818 }
19819
19820 unsafe impl fidl::encoding::TypeMarker for FileInfo {
19821 type Owned = Self;
19822
19823 #[inline(always)]
19824 fn inline_align(_context: fidl::encoding::Context) -> usize {
19825 8
19826 }
19827
19828 #[inline(always)]
19829 fn inline_size(_context: fidl::encoding::Context) -> usize {
19830 16
19831 }
19832 }
19833
19834 unsafe impl fidl::encoding::Encode<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
19835 for &mut FileInfo
19836 {
19837 unsafe fn encode(
19838 self,
19839 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19840 offset: usize,
19841 mut depth: fidl::encoding::Depth,
19842 ) -> fidl::Result<()> {
19843 encoder.debug_check_bounds::<FileInfo>(offset);
19844 let max_ordinal: u64 = self.max_ordinal_present();
19846 encoder.write_num(max_ordinal, offset);
19847 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19848 if max_ordinal == 0 {
19850 return Ok(());
19851 }
19852 depth.increment()?;
19853 let envelope_size = 8;
19854 let bytes_len = max_ordinal as usize * envelope_size;
19855 #[allow(unused_variables)]
19856 let offset = encoder.out_of_line_offset(bytes_len);
19857 let mut _prev_end_offset: usize = 0;
19858 if 1 > max_ordinal {
19859 return Ok(());
19860 }
19861
19862 let cur_offset: usize = (1 - 1) * envelope_size;
19865
19866 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19868
19869 fidl::encoding::encode_in_envelope_optional::<
19874 bool,
19875 fdomain_client::fidl::FDomainResourceDialect,
19876 >(
19877 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
19878 encoder,
19879 offset + cur_offset,
19880 depth,
19881 )?;
19882
19883 _prev_end_offset = cur_offset + envelope_size;
19884 if 2 > max_ordinal {
19885 return Ok(());
19886 }
19887
19888 let cur_offset: usize = (2 - 1) * envelope_size;
19891
19892 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19894
19895 fidl::encoding::encode_in_envelope_optional::<
19900 fidl::encoding::HandleType<
19901 fdomain_client::Event,
19902 { fidl::ObjectType::EVENT.into_raw() },
19903 2147483648,
19904 >,
19905 fdomain_client::fidl::FDomainResourceDialect,
19906 >(
19907 self.observer.as_mut().map(
19908 <fidl::encoding::HandleType<
19909 fdomain_client::Event,
19910 { fidl::ObjectType::EVENT.into_raw() },
19911 2147483648,
19912 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19913 ),
19914 encoder,
19915 offset + cur_offset,
19916 depth,
19917 )?;
19918
19919 _prev_end_offset = cur_offset + envelope_size;
19920 if 3 > max_ordinal {
19921 return Ok(());
19922 }
19923
19924 let cur_offset: usize = (3 - 1) * envelope_size;
19927
19928 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19930
19931 fidl::encoding::encode_in_envelope_optional::<
19936 fidl::encoding::HandleType<
19937 fdomain_client::Stream,
19938 { fidl::ObjectType::STREAM.into_raw() },
19939 2147483648,
19940 >,
19941 fdomain_client::fidl::FDomainResourceDialect,
19942 >(
19943 self.stream.as_mut().map(
19944 <fidl::encoding::HandleType<
19945 fdomain_client::Stream,
19946 { fidl::ObjectType::STREAM.into_raw() },
19947 2147483648,
19948 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19949 ),
19950 encoder,
19951 offset + cur_offset,
19952 depth,
19953 )?;
19954
19955 _prev_end_offset = cur_offset + envelope_size;
19956 if 4 > max_ordinal {
19957 return Ok(());
19958 }
19959
19960 let cur_offset: usize = (4 - 1) * envelope_size;
19963
19964 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19966
19967 fidl::encoding::encode_in_envelope_optional::<
19972 NodeAttributes2,
19973 fdomain_client::fidl::FDomainResourceDialect,
19974 >(
19975 self.attributes
19976 .as_ref()
19977 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
19978 encoder,
19979 offset + cur_offset,
19980 depth,
19981 )?;
19982
19983 _prev_end_offset = cur_offset + envelope_size;
19984
19985 Ok(())
19986 }
19987 }
19988
19989 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileInfo {
19990 #[inline(always)]
19991 fn new_empty() -> Self {
19992 Self::default()
19993 }
19994
19995 unsafe fn decode(
19996 &mut self,
19997 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19998 offset: usize,
19999 mut depth: fidl::encoding::Depth,
20000 ) -> fidl::Result<()> {
20001 decoder.debug_check_bounds::<Self>(offset);
20002 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
20003 None => return Err(fidl::Error::NotNullable),
20004 Some(len) => len,
20005 };
20006 if len == 0 {
20008 return Ok(());
20009 };
20010 depth.increment()?;
20011 let envelope_size = 8;
20012 let bytes_len = len * envelope_size;
20013 let offset = decoder.out_of_line_offset(bytes_len)?;
20014 let mut _next_ordinal_to_read = 0;
20016 let mut next_offset = offset;
20017 let end_offset = offset + bytes_len;
20018 _next_ordinal_to_read += 1;
20019 if next_offset >= end_offset {
20020 return Ok(());
20021 }
20022
20023 while _next_ordinal_to_read < 1 {
20025 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20026 _next_ordinal_to_read += 1;
20027 next_offset += envelope_size;
20028 }
20029
20030 let next_out_of_line = decoder.next_out_of_line();
20031 let handles_before = decoder.remaining_handles();
20032 if let Some((inlined, num_bytes, num_handles)) =
20033 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20034 {
20035 let member_inline_size =
20036 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20037 if inlined != (member_inline_size <= 4) {
20038 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20039 }
20040 let inner_offset;
20041 let mut inner_depth = depth.clone();
20042 if inlined {
20043 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20044 inner_offset = next_offset;
20045 } else {
20046 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20047 inner_depth.increment()?;
20048 }
20049 let val_ref = self.is_append.get_or_insert_with(|| {
20050 fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect)
20051 });
20052 fidl::decode!(
20053 bool,
20054 fdomain_client::fidl::FDomainResourceDialect,
20055 val_ref,
20056 decoder,
20057 inner_offset,
20058 inner_depth
20059 )?;
20060 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20061 {
20062 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20063 }
20064 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20065 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20066 }
20067 }
20068
20069 next_offset += envelope_size;
20070 _next_ordinal_to_read += 1;
20071 if next_offset >= end_offset {
20072 return Ok(());
20073 }
20074
20075 while _next_ordinal_to_read < 2 {
20077 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20078 _next_ordinal_to_read += 1;
20079 next_offset += envelope_size;
20080 }
20081
20082 let next_out_of_line = decoder.next_out_of_line();
20083 let handles_before = decoder.remaining_handles();
20084 if let Some((inlined, num_bytes, num_handles)) =
20085 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20086 {
20087 let member_inline_size = <fidl::encoding::HandleType<
20088 fdomain_client::Event,
20089 { fidl::ObjectType::EVENT.into_raw() },
20090 2147483648,
20091 > as fidl::encoding::TypeMarker>::inline_size(
20092 decoder.context
20093 );
20094 if inlined != (member_inline_size <= 4) {
20095 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20096 }
20097 let inner_offset;
20098 let mut inner_depth = depth.clone();
20099 if inlined {
20100 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20101 inner_offset = next_offset;
20102 } else {
20103 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20104 inner_depth.increment()?;
20105 }
20106 let val_ref =
20107 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));
20108 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)?;
20109 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20110 {
20111 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20112 }
20113 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20114 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20115 }
20116 }
20117
20118 next_offset += envelope_size;
20119 _next_ordinal_to_read += 1;
20120 if next_offset >= end_offset {
20121 return Ok(());
20122 }
20123
20124 while _next_ordinal_to_read < 3 {
20126 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20127 _next_ordinal_to_read += 1;
20128 next_offset += envelope_size;
20129 }
20130
20131 let next_out_of_line = decoder.next_out_of_line();
20132 let handles_before = decoder.remaining_handles();
20133 if let Some((inlined, num_bytes, num_handles)) =
20134 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20135 {
20136 let member_inline_size = <fidl::encoding::HandleType<
20137 fdomain_client::Stream,
20138 { fidl::ObjectType::STREAM.into_raw() },
20139 2147483648,
20140 > as fidl::encoding::TypeMarker>::inline_size(
20141 decoder.context
20142 );
20143 if inlined != (member_inline_size <= 4) {
20144 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20145 }
20146 let inner_offset;
20147 let mut inner_depth = depth.clone();
20148 if inlined {
20149 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20150 inner_offset = next_offset;
20151 } else {
20152 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20153 inner_depth.increment()?;
20154 }
20155 let val_ref =
20156 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));
20157 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)?;
20158 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20159 {
20160 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20161 }
20162 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20163 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20164 }
20165 }
20166
20167 next_offset += envelope_size;
20168 _next_ordinal_to_read += 1;
20169 if next_offset >= end_offset {
20170 return Ok(());
20171 }
20172
20173 while _next_ordinal_to_read < 4 {
20175 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20176 _next_ordinal_to_read += 1;
20177 next_offset += envelope_size;
20178 }
20179
20180 let next_out_of_line = decoder.next_out_of_line();
20181 let handles_before = decoder.remaining_handles();
20182 if let Some((inlined, num_bytes, num_handles)) =
20183 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20184 {
20185 let member_inline_size =
20186 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20187 if inlined != (member_inline_size <= 4) {
20188 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20189 }
20190 let inner_offset;
20191 let mut inner_depth = depth.clone();
20192 if inlined {
20193 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20194 inner_offset = next_offset;
20195 } else {
20196 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20197 inner_depth.increment()?;
20198 }
20199 let val_ref = self.attributes.get_or_insert_with(|| {
20200 fidl::new_empty!(NodeAttributes2, fdomain_client::fidl::FDomainResourceDialect)
20201 });
20202 fidl::decode!(
20203 NodeAttributes2,
20204 fdomain_client::fidl::FDomainResourceDialect,
20205 val_ref,
20206 decoder,
20207 inner_offset,
20208 inner_depth
20209 )?;
20210 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20211 {
20212 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20213 }
20214 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20215 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20216 }
20217 }
20218
20219 next_offset += envelope_size;
20220
20221 while next_offset < end_offset {
20223 _next_ordinal_to_read += 1;
20224 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20225 next_offset += envelope_size;
20226 }
20227
20228 Ok(())
20229 }
20230 }
20231
20232 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
20233 type Borrowed<'a> = &'a mut Self;
20234 fn take_or_borrow<'a>(
20235 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20236 ) -> Self::Borrowed<'a> {
20237 value
20238 }
20239 }
20240
20241 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
20242 type Owned = Self;
20243
20244 #[inline(always)]
20245 fn inline_align(_context: fidl::encoding::Context) -> usize {
20246 8
20247 }
20248
20249 #[inline(always)]
20250 fn inline_size(_context: fidl::encoding::Context) -> usize {
20251 16
20252 }
20253 }
20254
20255 unsafe impl
20256 fidl::encoding::Encode<ExtendedAttributeValue, fdomain_client::fidl::FDomainResourceDialect>
20257 for &mut ExtendedAttributeValue
20258 {
20259 #[inline]
20260 unsafe fn encode(
20261 self,
20262 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20263 offset: usize,
20264 _depth: fidl::encoding::Depth,
20265 ) -> fidl::Result<()> {
20266 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
20267 encoder.write_num::<u64>(self.ordinal(), offset);
20268 match self {
20269 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
20270 fidl::encoding::Vector<u8, 32768>,
20271 fdomain_client::fidl::FDomainResourceDialect,
20272 >(
20273 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
20274 val,
20275 ),
20276 encoder,
20277 offset + 8,
20278 _depth,
20279 ),
20280 ExtendedAttributeValue::Buffer(ref mut val) => {
20281 fidl::encoding::encode_in_envelope::<
20282 fidl::encoding::HandleType<
20283 fdomain_client::Vmo,
20284 { fidl::ObjectType::VMO.into_raw() },
20285 2147483648,
20286 >,
20287 fdomain_client::fidl::FDomainResourceDialect,
20288 >(
20289 <fidl::encoding::HandleType<
20290 fdomain_client::Vmo,
20291 { fidl::ObjectType::VMO.into_raw() },
20292 2147483648,
20293 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20294 val
20295 ),
20296 encoder,
20297 offset + 8,
20298 _depth,
20299 )
20300 }
20301 ExtendedAttributeValue::__SourceBreaking { .. } => {
20302 Err(fidl::Error::UnknownUnionTag)
20303 }
20304 }
20305 }
20306 }
20307
20308 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20309 for ExtendedAttributeValue
20310 {
20311 #[inline(always)]
20312 fn new_empty() -> Self {
20313 Self::__SourceBreaking { unknown_ordinal: 0 }
20314 }
20315
20316 #[inline]
20317 unsafe fn decode(
20318 &mut self,
20319 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20320 offset: usize,
20321 mut depth: fidl::encoding::Depth,
20322 ) -> fidl::Result<()> {
20323 decoder.debug_check_bounds::<Self>(offset);
20324 #[allow(unused_variables)]
20325 let next_out_of_line = decoder.next_out_of_line();
20326 let handles_before = decoder.remaining_handles();
20327 let (ordinal, inlined, num_bytes, num_handles) =
20328 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20329
20330 let member_inline_size = match ordinal {
20331 1 => {
20332 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
20333 decoder.context,
20334 )
20335 }
20336 2 => <fidl::encoding::HandleType<
20337 fdomain_client::Vmo,
20338 { fidl::ObjectType::VMO.into_raw() },
20339 2147483648,
20340 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20341 0 => return Err(fidl::Error::UnknownUnionTag),
20342 _ => num_bytes as usize,
20343 };
20344
20345 if inlined != (member_inline_size <= 4) {
20346 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20347 }
20348 let _inner_offset;
20349 if inlined {
20350 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20351 _inner_offset = offset + 8;
20352 } else {
20353 depth.increment()?;
20354 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20355 }
20356 match ordinal {
20357 1 => {
20358 #[allow(irrefutable_let_patterns)]
20359 if let ExtendedAttributeValue::Bytes(_) = self {
20360 } else {
20362 *self = ExtendedAttributeValue::Bytes(
20364 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect),
20365 );
20366 }
20367 #[allow(irrefutable_let_patterns)]
20368 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
20369 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20370 } else {
20371 unreachable!()
20372 }
20373 }
20374 2 => {
20375 #[allow(irrefutable_let_patterns)]
20376 if let ExtendedAttributeValue::Buffer(_) = self {
20377 } else {
20379 *self = ExtendedAttributeValue::Buffer(
20381 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
20382 );
20383 }
20384 #[allow(irrefutable_let_patterns)]
20385 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
20386 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20387 } else {
20388 unreachable!()
20389 }
20390 }
20391 #[allow(deprecated)]
20392 ordinal => {
20393 for _ in 0..num_handles {
20394 decoder.drop_next_handle()?;
20395 }
20396 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
20397 }
20398 }
20399 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20400 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20401 }
20402 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20403 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20404 }
20405 Ok(())
20406 }
20407 }
20408
20409 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
20410 type Borrowed<'a> = &'a mut Self;
20411 fn take_or_borrow<'a>(
20412 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20413 ) -> Self::Borrowed<'a> {
20414 value
20415 }
20416 }
20417
20418 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
20419 type Owned = Self;
20420
20421 #[inline(always)]
20422 fn inline_align(_context: fidl::encoding::Context) -> usize {
20423 8
20424 }
20425
20426 #[inline(always)]
20427 fn inline_size(_context: fidl::encoding::Context) -> usize {
20428 16
20429 }
20430 }
20431
20432 unsafe impl
20433 fidl::encoding::Encode<NodeInfoDeprecated, fdomain_client::fidl::FDomainResourceDialect>
20434 for &mut NodeInfoDeprecated
20435 {
20436 #[inline]
20437 unsafe fn encode(
20438 self,
20439 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20440 offset: usize,
20441 _depth: fidl::encoding::Depth,
20442 ) -> fidl::Result<()> {
20443 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
20444 encoder.write_num::<u64>(self.ordinal(), offset);
20445 match self {
20446 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
20447 Service,
20448 fdomain_client::fidl::FDomainResourceDialect,
20449 >(
20450 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
20451 encoder,
20452 offset + 8,
20453 _depth,
20454 ),
20455 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20456 FileObject,
20457 fdomain_client::fidl::FDomainResourceDialect,
20458 >(
20459 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20460 encoder,
20461 offset + 8,
20462 _depth,
20463 ),
20464 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20465 DirectoryObject,
20466 fdomain_client::fidl::FDomainResourceDialect,
20467 >(
20468 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20469 encoder,
20470 offset + 8,
20471 _depth,
20472 ),
20473 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20474 SymlinkObject,
20475 fdomain_client::fidl::FDomainResourceDialect,
20476 >(
20477 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20478 encoder,
20479 offset + 8,
20480 _depth,
20481 ),
20482 }
20483 }
20484 }
20485
20486 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20487 for NodeInfoDeprecated
20488 {
20489 #[inline(always)]
20490 fn new_empty() -> Self {
20491 Self::Service(fidl::new_empty!(Service, fdomain_client::fidl::FDomainResourceDialect))
20492 }
20493
20494 #[inline]
20495 unsafe fn decode(
20496 &mut self,
20497 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20498 offset: usize,
20499 mut depth: fidl::encoding::Depth,
20500 ) -> fidl::Result<()> {
20501 decoder.debug_check_bounds::<Self>(offset);
20502 #[allow(unused_variables)]
20503 let next_out_of_line = decoder.next_out_of_line();
20504 let handles_before = decoder.remaining_handles();
20505 let (ordinal, inlined, num_bytes, num_handles) =
20506 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20507
20508 let member_inline_size = match ordinal {
20509 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20510 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20511 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20512 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20513 _ => return Err(fidl::Error::UnknownUnionTag),
20514 };
20515
20516 if inlined != (member_inline_size <= 4) {
20517 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20518 }
20519 let _inner_offset;
20520 if inlined {
20521 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20522 _inner_offset = offset + 8;
20523 } else {
20524 depth.increment()?;
20525 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20526 }
20527 match ordinal {
20528 1 => {
20529 #[allow(irrefutable_let_patterns)]
20530 if let NodeInfoDeprecated::Service(_) = self {
20531 } else {
20533 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
20535 Service,
20536 fdomain_client::fidl::FDomainResourceDialect
20537 ));
20538 }
20539 #[allow(irrefutable_let_patterns)]
20540 if let NodeInfoDeprecated::Service(ref mut val) = self {
20541 fidl::decode!(
20542 Service,
20543 fdomain_client::fidl::FDomainResourceDialect,
20544 val,
20545 decoder,
20546 _inner_offset,
20547 depth
20548 )?;
20549 } else {
20550 unreachable!()
20551 }
20552 }
20553 2 => {
20554 #[allow(irrefutable_let_patterns)]
20555 if let NodeInfoDeprecated::File(_) = self {
20556 } else {
20558 *self = NodeInfoDeprecated::File(fidl::new_empty!(
20560 FileObject,
20561 fdomain_client::fidl::FDomainResourceDialect
20562 ));
20563 }
20564 #[allow(irrefutable_let_patterns)]
20565 if let NodeInfoDeprecated::File(ref mut val) = self {
20566 fidl::decode!(
20567 FileObject,
20568 fdomain_client::fidl::FDomainResourceDialect,
20569 val,
20570 decoder,
20571 _inner_offset,
20572 depth
20573 )?;
20574 } else {
20575 unreachable!()
20576 }
20577 }
20578 3 => {
20579 #[allow(irrefutable_let_patterns)]
20580 if let NodeInfoDeprecated::Directory(_) = self {
20581 } else {
20583 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
20585 DirectoryObject,
20586 fdomain_client::fidl::FDomainResourceDialect
20587 ));
20588 }
20589 #[allow(irrefutable_let_patterns)]
20590 if let NodeInfoDeprecated::Directory(ref mut val) = self {
20591 fidl::decode!(
20592 DirectoryObject,
20593 fdomain_client::fidl::FDomainResourceDialect,
20594 val,
20595 decoder,
20596 _inner_offset,
20597 depth
20598 )?;
20599 } else {
20600 unreachable!()
20601 }
20602 }
20603 4 => {
20604 #[allow(irrefutable_let_patterns)]
20605 if let NodeInfoDeprecated::Symlink(_) = self {
20606 } else {
20608 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
20610 SymlinkObject,
20611 fdomain_client::fidl::FDomainResourceDialect
20612 ));
20613 }
20614 #[allow(irrefutable_let_patterns)]
20615 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
20616 fidl::decode!(
20617 SymlinkObject,
20618 fdomain_client::fidl::FDomainResourceDialect,
20619 val,
20620 decoder,
20621 _inner_offset,
20622 depth
20623 )?;
20624 } else {
20625 unreachable!()
20626 }
20627 }
20628 ordinal => panic!("unexpected ordinal {:?}", ordinal),
20629 }
20630 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20631 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20632 }
20633 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20634 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20635 }
20636 Ok(())
20637 }
20638 }
20639
20640 impl fidl::encoding::ResourceTypeMarker for Representation {
20641 type Borrowed<'a> = &'a mut Self;
20642 fn take_or_borrow<'a>(
20643 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20644 ) -> Self::Borrowed<'a> {
20645 value
20646 }
20647 }
20648
20649 unsafe impl fidl::encoding::TypeMarker for Representation {
20650 type Owned = Self;
20651
20652 #[inline(always)]
20653 fn inline_align(_context: fidl::encoding::Context) -> usize {
20654 8
20655 }
20656
20657 #[inline(always)]
20658 fn inline_size(_context: fidl::encoding::Context) -> usize {
20659 16
20660 }
20661 }
20662
20663 unsafe impl fidl::encoding::Encode<Representation, fdomain_client::fidl::FDomainResourceDialect>
20664 for &mut Representation
20665 {
20666 #[inline]
20667 unsafe fn encode(
20668 self,
20669 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20670 offset: usize,
20671 _depth: fidl::encoding::Depth,
20672 ) -> fidl::Result<()> {
20673 encoder.debug_check_bounds::<Representation>(offset);
20674 encoder.write_num::<u64>(self.ordinal(), offset);
20675 match self {
20676 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
20677 NodeInfo,
20678 fdomain_client::fidl::FDomainResourceDialect,
20679 >(
20680 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20681 encoder,
20682 offset + 8,
20683 _depth,
20684 ),
20685 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20686 DirectoryInfo,
20687 fdomain_client::fidl::FDomainResourceDialect,
20688 >(
20689 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20690 encoder,
20691 offset + 8,
20692 _depth,
20693 ),
20694 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20695 FileInfo,
20696 fdomain_client::fidl::FDomainResourceDialect,
20697 >(
20698 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20699 encoder,
20700 offset + 8,
20701 _depth,
20702 ),
20703 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20704 SymlinkInfo,
20705 fdomain_client::fidl::FDomainResourceDialect,
20706 >(
20707 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20708 encoder,
20709 offset + 8,
20710 _depth,
20711 ),
20712 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
20713 }
20714 }
20715 }
20716
20717 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Representation {
20718 #[inline(always)]
20719 fn new_empty() -> Self {
20720 Self::__SourceBreaking { unknown_ordinal: 0 }
20721 }
20722
20723 #[inline]
20724 unsafe fn decode(
20725 &mut self,
20726 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20727 offset: usize,
20728 mut depth: fidl::encoding::Depth,
20729 ) -> fidl::Result<()> {
20730 decoder.debug_check_bounds::<Self>(offset);
20731 #[allow(unused_variables)]
20732 let next_out_of_line = decoder.next_out_of_line();
20733 let handles_before = decoder.remaining_handles();
20734 let (ordinal, inlined, num_bytes, num_handles) =
20735 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20736
20737 let member_inline_size = match ordinal {
20738 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20739 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20740 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20741 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20742 0 => return Err(fidl::Error::UnknownUnionTag),
20743 _ => num_bytes as usize,
20744 };
20745
20746 if inlined != (member_inline_size <= 4) {
20747 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20748 }
20749 let _inner_offset;
20750 if inlined {
20751 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20752 _inner_offset = offset + 8;
20753 } else {
20754 depth.increment()?;
20755 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20756 }
20757 match ordinal {
20758 1 => {
20759 #[allow(irrefutable_let_patterns)]
20760 if let Representation::Node(_) = self {
20761 } else {
20763 *self = Representation::Node(fidl::new_empty!(
20765 NodeInfo,
20766 fdomain_client::fidl::FDomainResourceDialect
20767 ));
20768 }
20769 #[allow(irrefutable_let_patterns)]
20770 if let Representation::Node(ref mut val) = self {
20771 fidl::decode!(
20772 NodeInfo,
20773 fdomain_client::fidl::FDomainResourceDialect,
20774 val,
20775 decoder,
20776 _inner_offset,
20777 depth
20778 )?;
20779 } else {
20780 unreachable!()
20781 }
20782 }
20783 2 => {
20784 #[allow(irrefutable_let_patterns)]
20785 if let Representation::Directory(_) = self {
20786 } else {
20788 *self = Representation::Directory(fidl::new_empty!(
20790 DirectoryInfo,
20791 fdomain_client::fidl::FDomainResourceDialect
20792 ));
20793 }
20794 #[allow(irrefutable_let_patterns)]
20795 if let Representation::Directory(ref mut val) = self {
20796 fidl::decode!(
20797 DirectoryInfo,
20798 fdomain_client::fidl::FDomainResourceDialect,
20799 val,
20800 decoder,
20801 _inner_offset,
20802 depth
20803 )?;
20804 } else {
20805 unreachable!()
20806 }
20807 }
20808 3 => {
20809 #[allow(irrefutable_let_patterns)]
20810 if let Representation::File(_) = self {
20811 } else {
20813 *self = Representation::File(fidl::new_empty!(
20815 FileInfo,
20816 fdomain_client::fidl::FDomainResourceDialect
20817 ));
20818 }
20819 #[allow(irrefutable_let_patterns)]
20820 if let Representation::File(ref mut val) = self {
20821 fidl::decode!(
20822 FileInfo,
20823 fdomain_client::fidl::FDomainResourceDialect,
20824 val,
20825 decoder,
20826 _inner_offset,
20827 depth
20828 )?;
20829 } else {
20830 unreachable!()
20831 }
20832 }
20833 4 => {
20834 #[allow(irrefutable_let_patterns)]
20835 if let Representation::Symlink(_) = self {
20836 } else {
20838 *self = Representation::Symlink(fidl::new_empty!(
20840 SymlinkInfo,
20841 fdomain_client::fidl::FDomainResourceDialect
20842 ));
20843 }
20844 #[allow(irrefutable_let_patterns)]
20845 if let Representation::Symlink(ref mut val) = self {
20846 fidl::decode!(
20847 SymlinkInfo,
20848 fdomain_client::fidl::FDomainResourceDialect,
20849 val,
20850 decoder,
20851 _inner_offset,
20852 depth
20853 )?;
20854 } else {
20855 unreachable!()
20856 }
20857 }
20858 #[allow(deprecated)]
20859 ordinal => {
20860 for _ in 0..num_handles {
20861 decoder.drop_next_handle()?;
20862 }
20863 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
20864 }
20865 }
20866 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20867 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20868 }
20869 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20870 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20871 }
20872 Ok(())
20873 }
20874 }
20875}