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 DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
825 + Send;
826 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
827 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
828 fn r#deprecated_set_attr(
829 &self,
830 flags: NodeAttributeFlags,
831 attributes: &NodeAttributes,
832 ) -> Self::DeprecatedSetAttrResponseFut;
833 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
834 + Send;
835 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
836 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
837 + Send;
838 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
839 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
840 + Send;
841 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
842 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
843 + Send;
844 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
845 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
846 + Send;
847 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
848 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
849 + Send;
850 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
851 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
852 + Send;
853 fn r#update_attributes(
854 &self,
855 payload: &MutableNodeAttributes,
856 ) -> Self::UpdateAttributesResponseFut;
857 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
858 fn r#sync(&self) -> Self::SyncResponseFut;
859 fn r#list_extended_attributes(
860 &self,
861 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
862 ) -> Result<(), fidl::Error>;
863 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
864 + Send;
865 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
866 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
867 + Send;
868 fn r#set_extended_attribute(
869 &self,
870 name: &[u8],
871 value: ExtendedAttributeValue,
872 mode: SetExtendedAttributeMode,
873 ) -> Self::SetExtendedAttributeResponseFut;
874 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
875 + Send;
876 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
877 fn r#deprecated_open(
878 &self,
879 flags: OpenFlags,
880 mode: ModeType,
881 path: &str,
882 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
883 ) -> Result<(), fidl::Error>;
884 fn r#open(
885 &self,
886 path: &str,
887 flags: Flags,
888 options: &Options,
889 object: fdomain_client::Channel,
890 ) -> Result<(), fidl::Error>;
891 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
892 + Send;
893 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
894 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
895 fn r#rewind(&self) -> Self::RewindResponseFut;
896 type GetTokenResponseFut: std::future::Future<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#deprecated_get_attr(
1047 &self,
1048 ) -> fidl::client::QueryResponseFut<
1049 (i32, NodeAttributes),
1050 fdomain_client::fidl::FDomainResourceDialect,
1051 > {
1052 DirectoryProxyInterface::r#deprecated_get_attr(self)
1053 }
1054
1055 pub fn r#deprecated_set_attr(
1057 &self,
1058 mut flags: NodeAttributeFlags,
1059 mut attributes: &NodeAttributes,
1060 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1061 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1062 }
1063
1064 pub fn r#deprecated_get_flags(
1066 &self,
1067 ) -> fidl::client::QueryResponseFut<
1068 (i32, OpenFlags),
1069 fdomain_client::fidl::FDomainResourceDialect,
1070 > {
1071 DirectoryProxyInterface::r#deprecated_get_flags(self)
1072 }
1073
1074 pub fn r#deprecated_set_flags(
1076 &self,
1077 mut flags: OpenFlags,
1078 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1079 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1080 }
1081
1082 pub fn r#get_flags(
1091 &self,
1092 ) -> fidl::client::QueryResponseFut<
1093 NodeGetFlagsResult,
1094 fdomain_client::fidl::FDomainResourceDialect,
1095 > {
1096 DirectoryProxyInterface::r#get_flags(self)
1097 }
1098
1099 pub fn r#set_flags(
1109 &self,
1110 mut flags: Flags,
1111 ) -> fidl::client::QueryResponseFut<
1112 NodeSetFlagsResult,
1113 fdomain_client::fidl::FDomainResourceDialect,
1114 > {
1115 DirectoryProxyInterface::r#set_flags(self, flags)
1116 }
1117
1118 pub fn r#query_filesystem(
1120 &self,
1121 ) -> fidl::client::QueryResponseFut<
1122 (i32, Option<Box<FilesystemInfo>>),
1123 fdomain_client::fidl::FDomainResourceDialect,
1124 > {
1125 DirectoryProxyInterface::r#query_filesystem(self)
1126 }
1127
1128 pub fn r#get_attributes(
1142 &self,
1143 mut query: NodeAttributesQuery,
1144 ) -> fidl::client::QueryResponseFut<
1145 NodeGetAttributesResult,
1146 fdomain_client::fidl::FDomainResourceDialect,
1147 > {
1148 DirectoryProxyInterface::r#get_attributes(self, query)
1149 }
1150
1151 pub fn r#update_attributes(
1160 &self,
1161 mut payload: &MutableNodeAttributes,
1162 ) -> fidl::client::QueryResponseFut<
1163 NodeUpdateAttributesResult,
1164 fdomain_client::fidl::FDomainResourceDialect,
1165 > {
1166 DirectoryProxyInterface::r#update_attributes(self, payload)
1167 }
1168
1169 pub fn r#sync(
1179 &self,
1180 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
1181 {
1182 DirectoryProxyInterface::r#sync(self)
1183 }
1184
1185 pub fn r#list_extended_attributes(
1194 &self,
1195 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1196 ) -> Result<(), fidl::Error> {
1197 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
1198 }
1199
1200 pub fn r#get_extended_attribute(
1207 &self,
1208 mut name: &[u8],
1209 ) -> fidl::client::QueryResponseFut<
1210 NodeGetExtendedAttributeResult,
1211 fdomain_client::fidl::FDomainResourceDialect,
1212 > {
1213 DirectoryProxyInterface::r#get_extended_attribute(self, name)
1214 }
1215
1216 pub fn r#set_extended_attribute(
1224 &self,
1225 mut name: &[u8],
1226 mut value: ExtendedAttributeValue,
1227 mut mode: SetExtendedAttributeMode,
1228 ) -> fidl::client::QueryResponseFut<
1229 NodeSetExtendedAttributeResult,
1230 fdomain_client::fidl::FDomainResourceDialect,
1231 > {
1232 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
1233 }
1234
1235 pub fn r#remove_extended_attribute(
1241 &self,
1242 mut name: &[u8],
1243 ) -> fidl::client::QueryResponseFut<
1244 NodeRemoveExtendedAttributeResult,
1245 fdomain_client::fidl::FDomainResourceDialect,
1246 > {
1247 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
1248 }
1249
1250 pub fn r#deprecated_open(
1252 &self,
1253 mut flags: OpenFlags,
1254 mut mode: ModeType,
1255 mut path: &str,
1256 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1257 ) -> Result<(), fidl::Error> {
1258 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
1259 }
1260
1261 pub fn r#open(
1268 &self,
1269 mut path: &str,
1270 mut flags: Flags,
1271 mut options: &Options,
1272 mut object: fdomain_client::Channel,
1273 ) -> Result<(), fidl::Error> {
1274 DirectoryProxyInterface::r#open(self, path, flags, options, object)
1275 }
1276
1277 pub fn r#read_dirents(
1303 &self,
1304 mut max_bytes: u64,
1305 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fdomain_client::fidl::FDomainResourceDialect>
1306 {
1307 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
1308 }
1309
1310 pub fn r#rewind(
1314 &self,
1315 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1316 DirectoryProxyInterface::r#rewind(self)
1317 }
1318
1319 pub fn r#get_token(
1326 &self,
1327 ) -> fidl::client::QueryResponseFut<
1328 (i32, Option<fdomain_client::Handle>),
1329 fdomain_client::fidl::FDomainResourceDialect,
1330 > {
1331 DirectoryProxyInterface::r#get_token(self)
1332 }
1333
1334 pub fn r#link(
1351 &self,
1352 mut src: &str,
1353 mut dst_parent_token: fdomain_client::Handle,
1354 mut dst: &str,
1355 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1356 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
1357 }
1358
1359 pub fn r#unlink(
1384 &self,
1385 mut name: &str,
1386 mut options: &UnlinkOptions,
1387 ) -> fidl::client::QueryResponseFut<
1388 DirectoryUnlinkResult,
1389 fdomain_client::fidl::FDomainResourceDialect,
1390 > {
1391 DirectoryProxyInterface::r#unlink(self, name, options)
1392 }
1393
1394 pub fn r#rename(
1420 &self,
1421 mut src: &str,
1422 mut dst_parent_token: fdomain_client::Event,
1423 mut dst: &str,
1424 ) -> fidl::client::QueryResponseFut<
1425 DirectoryRenameResult,
1426 fdomain_client::fidl::FDomainResourceDialect,
1427 > {
1428 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
1429 }
1430
1431 pub fn r#create_symlink(
1446 &self,
1447 mut name: &str,
1448 mut target: &[u8],
1449 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
1450 ) -> fidl::client::QueryResponseFut<
1451 DirectoryCreateSymlinkResult,
1452 fdomain_client::fidl::FDomainResourceDialect,
1453 > {
1454 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
1455 }
1456
1457 pub fn r#watch(
1464 &self,
1465 mut mask: WatchMask,
1466 mut options: u32,
1467 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
1468 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1469 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
1470 }
1471}
1472
1473impl DirectoryProxyInterface for DirectoryProxy {
1474 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
1475 AdvisoryLockingAdvisoryLockResult,
1476 fdomain_client::fidl::FDomainResourceDialect,
1477 >;
1478 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
1479 fn _decode(
1480 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1481 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1482 let _response = fidl::client::decode_transaction_body::<
1483 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1484 fdomain_client::fidl::FDomainResourceDialect,
1485 0x6ee9c0ad53ec87aa,
1486 >(_buf?)?;
1487 Ok(_response.map(|x| x))
1488 }
1489 self.client.send_query_and_decode::<
1490 AdvisoryLockingAdvisoryLockRequest,
1491 AdvisoryLockingAdvisoryLockResult,
1492 >(
1493 (request,),
1494 0x6ee9c0ad53ec87aa,
1495 fidl::encoding::DynamicFlags::empty(),
1496 _decode,
1497 )
1498 }
1499
1500 fn r#clone(
1501 &self,
1502 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1503 ) -> Result<(), fidl::Error> {
1504 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
1505 (request,),
1506 0x20d8a7aba2168a79,
1507 fidl::encoding::DynamicFlags::empty(),
1508 )
1509 }
1510
1511 type CloseResponseFut = fidl::client::QueryResponseFut<
1512 fdomain_fuchsia_unknown::CloseableCloseResult,
1513 fdomain_client::fidl::FDomainResourceDialect,
1514 >;
1515 fn r#close(&self) -> Self::CloseResponseFut {
1516 fn _decode(
1517 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1518 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1519 let _response = fidl::client::decode_transaction_body::<
1520 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1521 fdomain_client::fidl::FDomainResourceDialect,
1522 0x5ac5d459ad7f657e,
1523 >(_buf?)?;
1524 Ok(_response.map(|x| x))
1525 }
1526 self.client.send_query_and_decode::<
1527 fidl::encoding::EmptyPayload,
1528 fdomain_fuchsia_unknown::CloseableCloseResult,
1529 >(
1530 (),
1531 0x5ac5d459ad7f657e,
1532 fidl::encoding::DynamicFlags::empty(),
1533 _decode,
1534 )
1535 }
1536
1537 type QueryResponseFut =
1538 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
1539 fn r#query(&self) -> Self::QueryResponseFut {
1540 fn _decode(
1541 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1542 ) -> Result<Vec<u8>, fidl::Error> {
1543 let _response = fidl::client::decode_transaction_body::<
1544 fdomain_fuchsia_unknown::QueryableQueryResponse,
1545 fdomain_client::fidl::FDomainResourceDialect,
1546 0x2658edee9decfc06,
1547 >(_buf?)?;
1548 Ok(_response.protocol)
1549 }
1550 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1551 (),
1552 0x2658edee9decfc06,
1553 fidl::encoding::DynamicFlags::empty(),
1554 _decode,
1555 )
1556 }
1557
1558 fn r#deprecated_clone(
1559 &self,
1560 mut flags: OpenFlags,
1561 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1562 ) -> Result<(), fidl::Error> {
1563 self.client.send::<NodeDeprecatedCloneRequest>(
1564 (flags, object),
1565 0x5a61678f293ce16f,
1566 fidl::encoding::DynamicFlags::FLEXIBLE,
1567 )
1568 }
1569
1570 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
1571 (i32, NodeAttributes),
1572 fdomain_client::fidl::FDomainResourceDialect,
1573 >;
1574 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
1575 fn _decode(
1576 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1577 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1578 let _response = fidl::client::decode_transaction_body::<
1579 NodeDeprecatedGetAttrResponse,
1580 fdomain_client::fidl::FDomainResourceDialect,
1581 0x78985e216314dafd,
1582 >(_buf?)?;
1583 Ok((_response.s, _response.attributes))
1584 }
1585 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
1586 (),
1587 0x78985e216314dafd,
1588 fidl::encoding::DynamicFlags::empty(),
1589 _decode,
1590 )
1591 }
1592
1593 type DeprecatedSetAttrResponseFut =
1594 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1595 fn r#deprecated_set_attr(
1596 &self,
1597 mut flags: NodeAttributeFlags,
1598 mut attributes: &NodeAttributes,
1599 ) -> Self::DeprecatedSetAttrResponseFut {
1600 fn _decode(
1601 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1602 ) -> Result<i32, fidl::Error> {
1603 let _response = fidl::client::decode_transaction_body::<
1604 NodeDeprecatedSetAttrResponse,
1605 fdomain_client::fidl::FDomainResourceDialect,
1606 0x4186c0f40d938f46,
1607 >(_buf?)?;
1608 Ok(_response.s)
1609 }
1610 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
1611 (flags, attributes),
1612 0x4186c0f40d938f46,
1613 fidl::encoding::DynamicFlags::empty(),
1614 _decode,
1615 )
1616 }
1617
1618 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
1619 (i32, OpenFlags),
1620 fdomain_client::fidl::FDomainResourceDialect,
1621 >;
1622 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
1623 fn _decode(
1624 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1625 ) -> Result<(i32, OpenFlags), fidl::Error> {
1626 let _response = fidl::client::decode_transaction_body::<
1627 NodeDeprecatedGetFlagsResponse,
1628 fdomain_client::fidl::FDomainResourceDialect,
1629 0x5b88fffb8eda3aa1,
1630 >(_buf?)?;
1631 Ok((_response.s, _response.flags))
1632 }
1633 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
1634 (),
1635 0x5b88fffb8eda3aa1,
1636 fidl::encoding::DynamicFlags::empty(),
1637 _decode,
1638 )
1639 }
1640
1641 type DeprecatedSetFlagsResponseFut =
1642 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1643 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
1644 fn _decode(
1645 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1646 ) -> Result<i32, fidl::Error> {
1647 let _response = fidl::client::decode_transaction_body::<
1648 NodeDeprecatedSetFlagsResponse,
1649 fdomain_client::fidl::FDomainResourceDialect,
1650 0x5295b76c71fde733,
1651 >(_buf?)?;
1652 Ok(_response.s)
1653 }
1654 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
1655 (flags,),
1656 0x5295b76c71fde733,
1657 fidl::encoding::DynamicFlags::empty(),
1658 _decode,
1659 )
1660 }
1661
1662 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
1663 NodeGetFlagsResult,
1664 fdomain_client::fidl::FDomainResourceDialect,
1665 >;
1666 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
1667 fn _decode(
1668 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1669 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1670 let _response = fidl::client::decode_transaction_body::<
1671 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1672 fdomain_client::fidl::FDomainResourceDialect,
1673 0x176eb318f64ec23,
1674 >(_buf?)?
1675 .into_result_fdomain::<DirectoryMarker>("get_flags")?;
1676 Ok(_response.map(|x| x.flags))
1677 }
1678 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
1679 (),
1680 0x176eb318f64ec23,
1681 fidl::encoding::DynamicFlags::FLEXIBLE,
1682 _decode,
1683 )
1684 }
1685
1686 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
1687 NodeSetFlagsResult,
1688 fdomain_client::fidl::FDomainResourceDialect,
1689 >;
1690 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
1691 fn _decode(
1692 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1693 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1694 let _response = fidl::client::decode_transaction_body::<
1695 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1696 fdomain_client::fidl::FDomainResourceDialect,
1697 0x55a8028685791ea8,
1698 >(_buf?)?
1699 .into_result_fdomain::<DirectoryMarker>("set_flags")?;
1700 Ok(_response.map(|x| x))
1701 }
1702 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
1703 (flags,),
1704 0x55a8028685791ea8,
1705 fidl::encoding::DynamicFlags::FLEXIBLE,
1706 _decode,
1707 )
1708 }
1709
1710 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
1711 (i32, Option<Box<FilesystemInfo>>),
1712 fdomain_client::fidl::FDomainResourceDialect,
1713 >;
1714 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
1715 fn _decode(
1716 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1717 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1718 let _response = fidl::client::decode_transaction_body::<
1719 NodeQueryFilesystemResponse,
1720 fdomain_client::fidl::FDomainResourceDialect,
1721 0x6f344a1c6b0a0610,
1722 >(_buf?)?;
1723 Ok((_response.s, _response.info))
1724 }
1725 self.client.send_query_and_decode::<
1726 fidl::encoding::EmptyPayload,
1727 (i32, Option<Box<FilesystemInfo>>),
1728 >(
1729 (),
1730 0x6f344a1c6b0a0610,
1731 fidl::encoding::DynamicFlags::empty(),
1732 _decode,
1733 )
1734 }
1735
1736 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
1737 NodeGetAttributesResult,
1738 fdomain_client::fidl::FDomainResourceDialect,
1739 >;
1740 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
1741 fn _decode(
1742 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1743 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1744 let _response = fidl::client::decode_transaction_body::<
1745 fidl::encoding::ResultType<NodeAttributes2, i32>,
1746 fdomain_client::fidl::FDomainResourceDialect,
1747 0x3d4396a638ea053b,
1748 >(_buf?)?;
1749 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1750 }
1751 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
1752 (query,),
1753 0x3d4396a638ea053b,
1754 fidl::encoding::DynamicFlags::empty(),
1755 _decode,
1756 )
1757 }
1758
1759 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
1760 NodeUpdateAttributesResult,
1761 fdomain_client::fidl::FDomainResourceDialect,
1762 >;
1763 fn r#update_attributes(
1764 &self,
1765 mut payload: &MutableNodeAttributes,
1766 ) -> Self::UpdateAttributesResponseFut {
1767 fn _decode(
1768 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1769 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1770 let _response = fidl::client::decode_transaction_body::<
1771 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1772 fdomain_client::fidl::FDomainResourceDialect,
1773 0x3308c1da5a89bf08,
1774 >(_buf?)?;
1775 Ok(_response.map(|x| x))
1776 }
1777 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
1778 payload,
1779 0x3308c1da5a89bf08,
1780 fidl::encoding::DynamicFlags::empty(),
1781 _decode,
1782 )
1783 }
1784
1785 type SyncResponseFut = fidl::client::QueryResponseFut<
1786 NodeSyncResult,
1787 fdomain_client::fidl::FDomainResourceDialect,
1788 >;
1789 fn r#sync(&self) -> Self::SyncResponseFut {
1790 fn _decode(
1791 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1792 ) -> Result<NodeSyncResult, fidl::Error> {
1793 let _response = fidl::client::decode_transaction_body::<
1794 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1795 fdomain_client::fidl::FDomainResourceDialect,
1796 0x2c5c27ca0ab5dc49,
1797 >(_buf?)?;
1798 Ok(_response.map(|x| x))
1799 }
1800 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
1801 (),
1802 0x2c5c27ca0ab5dc49,
1803 fidl::encoding::DynamicFlags::empty(),
1804 _decode,
1805 )
1806 }
1807
1808 fn r#list_extended_attributes(
1809 &self,
1810 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1811 ) -> Result<(), fidl::Error> {
1812 self.client.send::<NodeListExtendedAttributesRequest>(
1813 (iterator,),
1814 0x4b61033de007fcd0,
1815 fidl::encoding::DynamicFlags::empty(),
1816 )
1817 }
1818
1819 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1820 NodeGetExtendedAttributeResult,
1821 fdomain_client::fidl::FDomainResourceDialect,
1822 >;
1823 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
1824 fn _decode(
1825 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1826 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1827 let _response = fidl::client::decode_transaction_body::<
1828 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1829 fdomain_client::fidl::FDomainResourceDialect,
1830 0x45ffa3ccfdeb76db,
1831 >(_buf?)?;
1832 Ok(_response.map(|x| x))
1833 }
1834 self.client.send_query_and_decode::<
1835 NodeGetExtendedAttributeRequest,
1836 NodeGetExtendedAttributeResult,
1837 >(
1838 (name,),
1839 0x45ffa3ccfdeb76db,
1840 fidl::encoding::DynamicFlags::empty(),
1841 _decode,
1842 )
1843 }
1844
1845 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1846 NodeSetExtendedAttributeResult,
1847 fdomain_client::fidl::FDomainResourceDialect,
1848 >;
1849 fn r#set_extended_attribute(
1850 &self,
1851 mut name: &[u8],
1852 mut value: ExtendedAttributeValue,
1853 mut mode: SetExtendedAttributeMode,
1854 ) -> Self::SetExtendedAttributeResponseFut {
1855 fn _decode(
1856 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1857 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1858 let _response = fidl::client::decode_transaction_body::<
1859 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1860 fdomain_client::fidl::FDomainResourceDialect,
1861 0x4a951362f681f23c,
1862 >(_buf?)?;
1863 Ok(_response.map(|x| x))
1864 }
1865 self.client.send_query_and_decode::<
1866 NodeSetExtendedAttributeRequest,
1867 NodeSetExtendedAttributeResult,
1868 >(
1869 (name, &mut value, mode,),
1870 0x4a951362f681f23c,
1871 fidl::encoding::DynamicFlags::empty(),
1872 _decode,
1873 )
1874 }
1875
1876 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1877 NodeRemoveExtendedAttributeResult,
1878 fdomain_client::fidl::FDomainResourceDialect,
1879 >;
1880 fn r#remove_extended_attribute(
1881 &self,
1882 mut name: &[u8],
1883 ) -> Self::RemoveExtendedAttributeResponseFut {
1884 fn _decode(
1885 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1886 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1887 let _response = fidl::client::decode_transaction_body::<
1888 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1889 fdomain_client::fidl::FDomainResourceDialect,
1890 0x7a0b9f3a9bf9032d,
1891 >(_buf?)?;
1892 Ok(_response.map(|x| x))
1893 }
1894 self.client.send_query_and_decode::<
1895 NodeRemoveExtendedAttributeRequest,
1896 NodeRemoveExtendedAttributeResult,
1897 >(
1898 (name,),
1899 0x7a0b9f3a9bf9032d,
1900 fidl::encoding::DynamicFlags::empty(),
1901 _decode,
1902 )
1903 }
1904
1905 fn r#deprecated_open(
1906 &self,
1907 mut flags: OpenFlags,
1908 mut mode: ModeType,
1909 mut path: &str,
1910 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1911 ) -> Result<(), fidl::Error> {
1912 self.client.send::<DirectoryDeprecatedOpenRequest>(
1913 (flags, mode, path, object),
1914 0x2c5044561d685ec0,
1915 fidl::encoding::DynamicFlags::FLEXIBLE,
1916 )
1917 }
1918
1919 fn r#open(
1920 &self,
1921 mut path: &str,
1922 mut flags: Flags,
1923 mut options: &Options,
1924 mut object: fdomain_client::Channel,
1925 ) -> Result<(), fidl::Error> {
1926 self.client.send::<DirectoryOpenRequest>(
1927 (path, flags, options, object),
1928 0x568ddcb9a9cbb6d9,
1929 fidl::encoding::DynamicFlags::empty(),
1930 )
1931 }
1932
1933 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
1934 (i32, Vec<u8>),
1935 fdomain_client::fidl::FDomainResourceDialect,
1936 >;
1937 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
1938 fn _decode(
1939 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1940 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1941 let _response = fidl::client::decode_transaction_body::<
1942 DirectoryReadDirentsResponse,
1943 fdomain_client::fidl::FDomainResourceDialect,
1944 0x3582806bf27faa0a,
1945 >(_buf?)?;
1946 Ok((_response.s, _response.dirents))
1947 }
1948 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
1949 (max_bytes,),
1950 0x3582806bf27faa0a,
1951 fidl::encoding::DynamicFlags::empty(),
1952 _decode,
1953 )
1954 }
1955
1956 type RewindResponseFut =
1957 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1958 fn r#rewind(&self) -> Self::RewindResponseFut {
1959 fn _decode(
1960 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1961 ) -> Result<i32, fidl::Error> {
1962 let _response = fidl::client::decode_transaction_body::<
1963 DirectoryRewindResponse,
1964 fdomain_client::fidl::FDomainResourceDialect,
1965 0x16b1202af0f34c71,
1966 >(_buf?)?;
1967 Ok(_response.s)
1968 }
1969 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1970 (),
1971 0x16b1202af0f34c71,
1972 fidl::encoding::DynamicFlags::empty(),
1973 _decode,
1974 )
1975 }
1976
1977 type GetTokenResponseFut = fidl::client::QueryResponseFut<
1978 (i32, Option<fdomain_client::Handle>),
1979 fdomain_client::fidl::FDomainResourceDialect,
1980 >;
1981 fn r#get_token(&self) -> Self::GetTokenResponseFut {
1982 fn _decode(
1983 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1984 ) -> Result<(i32, Option<fdomain_client::Handle>), fidl::Error> {
1985 let _response = fidl::client::decode_transaction_body::<
1986 DirectoryGetTokenResponse,
1987 fdomain_client::fidl::FDomainResourceDialect,
1988 0x26ae9d18763c8655,
1989 >(_buf?)?;
1990 Ok((_response.s, _response.token))
1991 }
1992 self.client.send_query_and_decode::<
1993 fidl::encoding::EmptyPayload,
1994 (i32, Option<fdomain_client::Handle>),
1995 >(
1996 (),
1997 0x26ae9d18763c8655,
1998 fidl::encoding::DynamicFlags::empty(),
1999 _decode,
2000 )
2001 }
2002
2003 type LinkResponseFut =
2004 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2005 fn r#link(
2006 &self,
2007 mut src: &str,
2008 mut dst_parent_token: fdomain_client::Handle,
2009 mut dst: &str,
2010 ) -> Self::LinkResponseFut {
2011 fn _decode(
2012 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2013 ) -> Result<i32, fidl::Error> {
2014 let _response = fidl::client::decode_transaction_body::<
2015 DirectoryLinkResponse,
2016 fdomain_client::fidl::FDomainResourceDialect,
2017 0x740604c0c7c930e7,
2018 >(_buf?)?;
2019 Ok(_response.s)
2020 }
2021 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2022 (src, dst_parent_token, dst),
2023 0x740604c0c7c930e7,
2024 fidl::encoding::DynamicFlags::empty(),
2025 _decode,
2026 )
2027 }
2028
2029 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2030 DirectoryUnlinkResult,
2031 fdomain_client::fidl::FDomainResourceDialect,
2032 >;
2033 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2034 fn _decode(
2035 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2036 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2037 let _response = fidl::client::decode_transaction_body::<
2038 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2039 fdomain_client::fidl::FDomainResourceDialect,
2040 0x750a0326a78d7bed,
2041 >(_buf?)?;
2042 Ok(_response.map(|x| x))
2043 }
2044 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2045 (name, options),
2046 0x750a0326a78d7bed,
2047 fidl::encoding::DynamicFlags::empty(),
2048 _decode,
2049 )
2050 }
2051
2052 type RenameResponseFut = fidl::client::QueryResponseFut<
2053 DirectoryRenameResult,
2054 fdomain_client::fidl::FDomainResourceDialect,
2055 >;
2056 fn r#rename(
2057 &self,
2058 mut src: &str,
2059 mut dst_parent_token: fdomain_client::Event,
2060 mut dst: &str,
2061 ) -> Self::RenameResponseFut {
2062 fn _decode(
2063 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2064 ) -> Result<DirectoryRenameResult, fidl::Error> {
2065 let _response = fidl::client::decode_transaction_body::<
2066 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2067 fdomain_client::fidl::FDomainResourceDialect,
2068 0x7060e7723b9928de,
2069 >(_buf?)?;
2070 Ok(_response.map(|x| x))
2071 }
2072 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2073 (src, dst_parent_token, dst),
2074 0x7060e7723b9928de,
2075 fidl::encoding::DynamicFlags::empty(),
2076 _decode,
2077 )
2078 }
2079
2080 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2081 DirectoryCreateSymlinkResult,
2082 fdomain_client::fidl::FDomainResourceDialect,
2083 >;
2084 fn r#create_symlink(
2085 &self,
2086 mut name: &str,
2087 mut target: &[u8],
2088 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
2089 ) -> Self::CreateSymlinkResponseFut {
2090 fn _decode(
2091 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2092 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2093 let _response = fidl::client::decode_transaction_body::<
2094 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2095 fdomain_client::fidl::FDomainResourceDialect,
2096 0x21ce0f19ec043889,
2097 >(_buf?)?;
2098 Ok(_response.map(|x| x))
2099 }
2100 self.client
2101 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2102 (name, target, connection),
2103 0x21ce0f19ec043889,
2104 fidl::encoding::DynamicFlags::empty(),
2105 _decode,
2106 )
2107 }
2108
2109 type WatchResponseFut =
2110 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2111 fn r#watch(
2112 &self,
2113 mut mask: WatchMask,
2114 mut options: u32,
2115 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
2116 ) -> Self::WatchResponseFut {
2117 fn _decode(
2118 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2119 ) -> Result<i32, fidl::Error> {
2120 let _response = fidl::client::decode_transaction_body::<
2121 DirectoryWatchResponse,
2122 fdomain_client::fidl::FDomainResourceDialect,
2123 0x5717193a59d66d91,
2124 >(_buf?)?;
2125 Ok(_response.s)
2126 }
2127 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2128 (mask, options, watcher),
2129 0x5717193a59d66d91,
2130 fidl::encoding::DynamicFlags::empty(),
2131 _decode,
2132 )
2133 }
2134}
2135
2136pub struct DirectoryEventStream {
2137 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2138}
2139
2140impl std::marker::Unpin for DirectoryEventStream {}
2141
2142impl futures::stream::FusedStream for DirectoryEventStream {
2143 fn is_terminated(&self) -> bool {
2144 self.event_receiver.is_terminated()
2145 }
2146}
2147
2148impl futures::Stream for DirectoryEventStream {
2149 type Item = Result<DirectoryEvent, fidl::Error>;
2150
2151 fn poll_next(
2152 mut self: std::pin::Pin<&mut Self>,
2153 cx: &mut std::task::Context<'_>,
2154 ) -> std::task::Poll<Option<Self::Item>> {
2155 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2156 &mut self.event_receiver,
2157 cx
2158 )?) {
2159 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
2160 None => std::task::Poll::Ready(None),
2161 }
2162 }
2163}
2164
2165#[derive(Debug)]
2166pub enum DirectoryEvent {
2167 OnOpen_ {
2168 s: i32,
2169 info: Option<Box<NodeInfoDeprecated>>,
2170 },
2171 OnRepresentation {
2172 payload: Representation,
2173 },
2174 #[non_exhaustive]
2175 _UnknownEvent {
2176 ordinal: u64,
2178 },
2179}
2180
2181impl DirectoryEvent {
2182 #[allow(irrefutable_let_patterns)]
2183 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
2184 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
2185 }
2186 #[allow(irrefutable_let_patterns)]
2187 pub fn into_on_representation(self) -> Option<Representation> {
2188 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
2189 }
2190
2191 fn decode(
2193 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2194 ) -> Result<DirectoryEvent, fidl::Error> {
2195 let (bytes, _handles) = buf.split_mut();
2196 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2197 debug_assert_eq!(tx_header.tx_id, 0);
2198 match tx_header.ordinal {
2199 0x7fc7bbb1dbfd1972 => {
2200 let mut out = fidl::new_empty!(
2201 NodeOnOpenRequest,
2202 fdomain_client::fidl::FDomainResourceDialect
2203 );
2204 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2205 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
2206 }
2207 0x5cb40567d80a510c => {
2208 let mut out =
2209 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
2210 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
2211 Ok((DirectoryEvent::OnRepresentation { payload: out }))
2212 }
2213 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2214 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2215 }
2216 _ => Err(fidl::Error::UnknownOrdinal {
2217 ordinal: tx_header.ordinal,
2218 protocol_name:
2219 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2220 }),
2221 }
2222 }
2223}
2224
2225pub struct DirectoryRequestStream {
2227 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2228 is_terminated: bool,
2229}
2230
2231impl std::marker::Unpin for DirectoryRequestStream {}
2232
2233impl futures::stream::FusedStream for DirectoryRequestStream {
2234 fn is_terminated(&self) -> bool {
2235 self.is_terminated
2236 }
2237}
2238
2239impl fdomain_client::fidl::RequestStream for DirectoryRequestStream {
2240 type Protocol = DirectoryMarker;
2241 type ControlHandle = DirectoryControlHandle;
2242
2243 fn from_channel(channel: fdomain_client::Channel) -> Self {
2244 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2245 }
2246
2247 fn control_handle(&self) -> Self::ControlHandle {
2248 DirectoryControlHandle { inner: self.inner.clone() }
2249 }
2250
2251 fn into_inner(
2252 self,
2253 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2254 {
2255 (self.inner, self.is_terminated)
2256 }
2257
2258 fn from_inner(
2259 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2260 is_terminated: bool,
2261 ) -> Self {
2262 Self { inner, is_terminated }
2263 }
2264}
2265
2266impl futures::Stream for DirectoryRequestStream {
2267 type Item = Result<DirectoryRequest, fidl::Error>;
2268
2269 fn poll_next(
2270 mut self: std::pin::Pin<&mut Self>,
2271 cx: &mut std::task::Context<'_>,
2272 ) -> std::task::Poll<Option<Self::Item>> {
2273 let this = &mut *self;
2274 if this.inner.check_shutdown(cx) {
2275 this.is_terminated = true;
2276 return std::task::Poll::Ready(None);
2277 }
2278 if this.is_terminated {
2279 panic!("polled DirectoryRequestStream after completion");
2280 }
2281 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2282 |bytes, handles| {
2283 match this.inner.channel().read_etc(cx, bytes, handles) {
2284 std::task::Poll::Ready(Ok(())) => {}
2285 std::task::Poll::Pending => return std::task::Poll::Pending,
2286 std::task::Poll::Ready(Err(None)) => {
2287 this.is_terminated = true;
2288 return std::task::Poll::Ready(None);
2289 }
2290 std::task::Poll::Ready(Err(Some(e))) => {
2291 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2292 e.into(),
2293 ))));
2294 }
2295 }
2296
2297 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2299
2300 std::task::Poll::Ready(Some(match header.ordinal {
2301 0x6ee9c0ad53ec87aa => {
2302 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2303 let mut req = fidl::new_empty!(
2304 AdvisoryLockingAdvisoryLockRequest,
2305 fdomain_client::fidl::FDomainResourceDialect
2306 );
2307 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
2308 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2309 Ok(DirectoryRequest::AdvisoryLock {
2310 request: req.request,
2311
2312 responder: DirectoryAdvisoryLockResponder {
2313 control_handle: std::mem::ManuallyDrop::new(control_handle),
2314 tx_id: header.tx_id,
2315 },
2316 })
2317 }
2318 0x20d8a7aba2168a79 => {
2319 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2320 let mut req = fidl::new_empty!(
2321 fdomain_fuchsia_unknown::CloneableCloneRequest,
2322 fdomain_client::fidl::FDomainResourceDialect
2323 );
2324 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2325 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2326 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
2327 }
2328 0x5ac5d459ad7f657e => {
2329 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2330 let mut req = fidl::new_empty!(
2331 fidl::encoding::EmptyPayload,
2332 fdomain_client::fidl::FDomainResourceDialect
2333 );
2334 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2335 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2336 Ok(DirectoryRequest::Close {
2337 responder: DirectoryCloseResponder {
2338 control_handle: std::mem::ManuallyDrop::new(control_handle),
2339 tx_id: header.tx_id,
2340 },
2341 })
2342 }
2343 0x2658edee9decfc06 => {
2344 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2345 let mut req = fidl::new_empty!(
2346 fidl::encoding::EmptyPayload,
2347 fdomain_client::fidl::FDomainResourceDialect
2348 );
2349 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2350 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2351 Ok(DirectoryRequest::Query {
2352 responder: DirectoryQueryResponder {
2353 control_handle: std::mem::ManuallyDrop::new(control_handle),
2354 tx_id: header.tx_id,
2355 },
2356 })
2357 }
2358 0x5a61678f293ce16f => {
2359 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2360 let mut req = fidl::new_empty!(
2361 NodeDeprecatedCloneRequest,
2362 fdomain_client::fidl::FDomainResourceDialect
2363 );
2364 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2365 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2366 Ok(DirectoryRequest::DeprecatedClone {
2367 flags: req.flags,
2368 object: req.object,
2369
2370 control_handle,
2371 })
2372 }
2373 0x78985e216314dafd => {
2374 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2375 let mut req = fidl::new_empty!(
2376 fidl::encoding::EmptyPayload,
2377 fdomain_client::fidl::FDomainResourceDialect
2378 );
2379 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2380 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2381 Ok(DirectoryRequest::DeprecatedGetAttr {
2382 responder: DirectoryDeprecatedGetAttrResponder {
2383 control_handle: std::mem::ManuallyDrop::new(control_handle),
2384 tx_id: header.tx_id,
2385 },
2386 })
2387 }
2388 0x4186c0f40d938f46 => {
2389 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2390 let mut req = fidl::new_empty!(
2391 NodeDeprecatedSetAttrRequest,
2392 fdomain_client::fidl::FDomainResourceDialect
2393 );
2394 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
2395 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2396 Ok(DirectoryRequest::DeprecatedSetAttr {
2397 flags: req.flags,
2398 attributes: req.attributes,
2399
2400 responder: DirectoryDeprecatedSetAttrResponder {
2401 control_handle: std::mem::ManuallyDrop::new(control_handle),
2402 tx_id: header.tx_id,
2403 },
2404 })
2405 }
2406 0x5b88fffb8eda3aa1 => {
2407 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2408 let mut req = fidl::new_empty!(
2409 fidl::encoding::EmptyPayload,
2410 fdomain_client::fidl::FDomainResourceDialect
2411 );
2412 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2413 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2414 Ok(DirectoryRequest::DeprecatedGetFlags {
2415 responder: DirectoryDeprecatedGetFlagsResponder {
2416 control_handle: std::mem::ManuallyDrop::new(control_handle),
2417 tx_id: header.tx_id,
2418 },
2419 })
2420 }
2421 0x5295b76c71fde733 => {
2422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2423 let mut req = fidl::new_empty!(
2424 NodeDeprecatedSetFlagsRequest,
2425 fdomain_client::fidl::FDomainResourceDialect
2426 );
2427 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2428 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2429 Ok(DirectoryRequest::DeprecatedSetFlags {
2430 flags: req.flags,
2431
2432 responder: DirectoryDeprecatedSetFlagsResponder {
2433 control_handle: std::mem::ManuallyDrop::new(control_handle),
2434 tx_id: header.tx_id,
2435 },
2436 })
2437 }
2438 0x176eb318f64ec23 => {
2439 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2440 let mut req = fidl::new_empty!(
2441 fidl::encoding::EmptyPayload,
2442 fdomain_client::fidl::FDomainResourceDialect
2443 );
2444 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2445 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2446 Ok(DirectoryRequest::GetFlags {
2447 responder: DirectoryGetFlagsResponder {
2448 control_handle: std::mem::ManuallyDrop::new(control_handle),
2449 tx_id: header.tx_id,
2450 },
2451 })
2452 }
2453 0x55a8028685791ea8 => {
2454 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2455 let mut req = fidl::new_empty!(
2456 NodeSetFlagsRequest,
2457 fdomain_client::fidl::FDomainResourceDialect
2458 );
2459 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2460 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2461 Ok(DirectoryRequest::SetFlags {
2462 flags: req.flags,
2463
2464 responder: DirectorySetFlagsResponder {
2465 control_handle: std::mem::ManuallyDrop::new(control_handle),
2466 tx_id: header.tx_id,
2467 },
2468 })
2469 }
2470 0x6f344a1c6b0a0610 => {
2471 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2472 let mut req = fidl::new_empty!(
2473 fidl::encoding::EmptyPayload,
2474 fdomain_client::fidl::FDomainResourceDialect
2475 );
2476 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2477 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2478 Ok(DirectoryRequest::QueryFilesystem {
2479 responder: DirectoryQueryFilesystemResponder {
2480 control_handle: std::mem::ManuallyDrop::new(control_handle),
2481 tx_id: header.tx_id,
2482 },
2483 })
2484 }
2485 0x3d4396a638ea053b => {
2486 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2487 let mut req = fidl::new_empty!(
2488 NodeGetAttributesRequest,
2489 fdomain_client::fidl::FDomainResourceDialect
2490 );
2491 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2492 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2493 Ok(DirectoryRequest::GetAttributes {
2494 query: req.query,
2495
2496 responder: DirectoryGetAttributesResponder {
2497 control_handle: std::mem::ManuallyDrop::new(control_handle),
2498 tx_id: header.tx_id,
2499 },
2500 })
2501 }
2502 0x3308c1da5a89bf08 => {
2503 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2504 let mut req = fidl::new_empty!(
2505 MutableNodeAttributes,
2506 fdomain_client::fidl::FDomainResourceDialect
2507 );
2508 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
2509 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2510 Ok(DirectoryRequest::UpdateAttributes {
2511 payload: req,
2512 responder: DirectoryUpdateAttributesResponder {
2513 control_handle: std::mem::ManuallyDrop::new(control_handle),
2514 tx_id: header.tx_id,
2515 },
2516 })
2517 }
2518 0x2c5c27ca0ab5dc49 => {
2519 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2520 let mut req = fidl::new_empty!(
2521 fidl::encoding::EmptyPayload,
2522 fdomain_client::fidl::FDomainResourceDialect
2523 );
2524 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2525 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2526 Ok(DirectoryRequest::Sync {
2527 responder: DirectorySyncResponder {
2528 control_handle: std::mem::ManuallyDrop::new(control_handle),
2529 tx_id: header.tx_id,
2530 },
2531 })
2532 }
2533 0x4b61033de007fcd0 => {
2534 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2535 let mut req = fidl::new_empty!(
2536 NodeListExtendedAttributesRequest,
2537 fdomain_client::fidl::FDomainResourceDialect
2538 );
2539 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2540 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2541 Ok(DirectoryRequest::ListExtendedAttributes {
2542 iterator: req.iterator,
2543
2544 control_handle,
2545 })
2546 }
2547 0x45ffa3ccfdeb76db => {
2548 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2549 let mut req = fidl::new_empty!(
2550 NodeGetExtendedAttributeRequest,
2551 fdomain_client::fidl::FDomainResourceDialect
2552 );
2553 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2554 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2555 Ok(DirectoryRequest::GetExtendedAttribute {
2556 name: req.name,
2557
2558 responder: DirectoryGetExtendedAttributeResponder {
2559 control_handle: std::mem::ManuallyDrop::new(control_handle),
2560 tx_id: header.tx_id,
2561 },
2562 })
2563 }
2564 0x4a951362f681f23c => {
2565 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2566 let mut req = fidl::new_empty!(
2567 NodeSetExtendedAttributeRequest,
2568 fdomain_client::fidl::FDomainResourceDialect
2569 );
2570 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2571 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2572 Ok(DirectoryRequest::SetExtendedAttribute {
2573 name: req.name,
2574 value: req.value,
2575 mode: req.mode,
2576
2577 responder: DirectorySetExtendedAttributeResponder {
2578 control_handle: std::mem::ManuallyDrop::new(control_handle),
2579 tx_id: header.tx_id,
2580 },
2581 })
2582 }
2583 0x7a0b9f3a9bf9032d => {
2584 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2585 let mut req = fidl::new_empty!(
2586 NodeRemoveExtendedAttributeRequest,
2587 fdomain_client::fidl::FDomainResourceDialect
2588 );
2589 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2590 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2591 Ok(DirectoryRequest::RemoveExtendedAttribute {
2592 name: req.name,
2593
2594 responder: DirectoryRemoveExtendedAttributeResponder {
2595 control_handle: std::mem::ManuallyDrop::new(control_handle),
2596 tx_id: header.tx_id,
2597 },
2598 })
2599 }
2600 0x2c5044561d685ec0 => {
2601 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2602 let mut req = fidl::new_empty!(
2603 DirectoryDeprecatedOpenRequest,
2604 fdomain_client::fidl::FDomainResourceDialect
2605 );
2606 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2607 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2608 Ok(DirectoryRequest::DeprecatedOpen {
2609 flags: req.flags,
2610 mode: req.mode,
2611 path: req.path,
2612 object: req.object,
2613
2614 control_handle,
2615 })
2616 }
2617 0x568ddcb9a9cbb6d9 => {
2618 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2619 let mut req = fidl::new_empty!(
2620 DirectoryOpenRequest,
2621 fdomain_client::fidl::FDomainResourceDialect
2622 );
2623 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2624 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2625 Ok(DirectoryRequest::Open {
2626 path: req.path,
2627 flags: req.flags,
2628 options: req.options,
2629 object: req.object,
2630
2631 control_handle,
2632 })
2633 }
2634 0x3582806bf27faa0a => {
2635 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2636 let mut req = fidl::new_empty!(
2637 DirectoryReadDirentsRequest,
2638 fdomain_client::fidl::FDomainResourceDialect
2639 );
2640 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
2641 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2642 Ok(DirectoryRequest::ReadDirents {
2643 max_bytes: req.max_bytes,
2644
2645 responder: DirectoryReadDirentsResponder {
2646 control_handle: std::mem::ManuallyDrop::new(control_handle),
2647 tx_id: header.tx_id,
2648 },
2649 })
2650 }
2651 0x16b1202af0f34c71 => {
2652 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2653 let mut req = fidl::new_empty!(
2654 fidl::encoding::EmptyPayload,
2655 fdomain_client::fidl::FDomainResourceDialect
2656 );
2657 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2658 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2659 Ok(DirectoryRequest::Rewind {
2660 responder: DirectoryRewindResponder {
2661 control_handle: std::mem::ManuallyDrop::new(control_handle),
2662 tx_id: header.tx_id,
2663 },
2664 })
2665 }
2666 0x26ae9d18763c8655 => {
2667 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2668 let mut req = fidl::new_empty!(
2669 fidl::encoding::EmptyPayload,
2670 fdomain_client::fidl::FDomainResourceDialect
2671 );
2672 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2673 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2674 Ok(DirectoryRequest::GetToken {
2675 responder: DirectoryGetTokenResponder {
2676 control_handle: std::mem::ManuallyDrop::new(control_handle),
2677 tx_id: header.tx_id,
2678 },
2679 })
2680 }
2681 0x740604c0c7c930e7 => {
2682 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2683 let mut req = fidl::new_empty!(
2684 DirectoryLinkRequest,
2685 fdomain_client::fidl::FDomainResourceDialect
2686 );
2687 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
2688 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2689 Ok(DirectoryRequest::Link {
2690 src: req.src,
2691 dst_parent_token: req.dst_parent_token,
2692 dst: req.dst,
2693
2694 responder: DirectoryLinkResponder {
2695 control_handle: std::mem::ManuallyDrop::new(control_handle),
2696 tx_id: header.tx_id,
2697 },
2698 })
2699 }
2700 0x750a0326a78d7bed => {
2701 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2702 let mut req = fidl::new_empty!(
2703 DirectoryUnlinkRequest,
2704 fdomain_client::fidl::FDomainResourceDialect
2705 );
2706 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2707 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2708 Ok(DirectoryRequest::Unlink {
2709 name: req.name,
2710 options: req.options,
2711
2712 responder: DirectoryUnlinkResponder {
2713 control_handle: std::mem::ManuallyDrop::new(control_handle),
2714 tx_id: header.tx_id,
2715 },
2716 })
2717 }
2718 0x7060e7723b9928de => {
2719 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2720 let mut req = fidl::new_empty!(
2721 DirectoryRenameRequest,
2722 fdomain_client::fidl::FDomainResourceDialect
2723 );
2724 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
2725 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2726 Ok(DirectoryRequest::Rename {
2727 src: req.src,
2728 dst_parent_token: req.dst_parent_token,
2729 dst: req.dst,
2730
2731 responder: DirectoryRenameResponder {
2732 control_handle: std::mem::ManuallyDrop::new(control_handle),
2733 tx_id: header.tx_id,
2734 },
2735 })
2736 }
2737 0x21ce0f19ec043889 => {
2738 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2739 let mut req = fidl::new_empty!(
2740 DirectoryCreateSymlinkRequest,
2741 fdomain_client::fidl::FDomainResourceDialect
2742 );
2743 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2744 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2745 Ok(DirectoryRequest::CreateSymlink {
2746 name: req.name,
2747 target: req.target,
2748 connection: req.connection,
2749
2750 responder: DirectoryCreateSymlinkResponder {
2751 control_handle: std::mem::ManuallyDrop::new(control_handle),
2752 tx_id: header.tx_id,
2753 },
2754 })
2755 }
2756 0x5717193a59d66d91 => {
2757 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2758 let mut req = fidl::new_empty!(
2759 DirectoryWatchRequest,
2760 fdomain_client::fidl::FDomainResourceDialect
2761 );
2762 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
2763 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2764 Ok(DirectoryRequest::Watch {
2765 mask: req.mask,
2766 options: req.options,
2767 watcher: req.watcher,
2768
2769 responder: DirectoryWatchResponder {
2770 control_handle: std::mem::ManuallyDrop::new(control_handle),
2771 tx_id: header.tx_id,
2772 },
2773 })
2774 }
2775 _ if header.tx_id == 0
2776 && header
2777 .dynamic_flags()
2778 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2779 {
2780 Ok(DirectoryRequest::_UnknownMethod {
2781 ordinal: header.ordinal,
2782 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2783 method_type: fidl::MethodType::OneWay,
2784 })
2785 }
2786 _ if header
2787 .dynamic_flags()
2788 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2789 {
2790 this.inner.send_framework_err(
2791 fidl::encoding::FrameworkErr::UnknownMethod,
2792 header.tx_id,
2793 header.ordinal,
2794 header.dynamic_flags(),
2795 (bytes, handles),
2796 )?;
2797 Ok(DirectoryRequest::_UnknownMethod {
2798 ordinal: header.ordinal,
2799 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2800 method_type: fidl::MethodType::TwoWay,
2801 })
2802 }
2803 _ => Err(fidl::Error::UnknownOrdinal {
2804 ordinal: header.ordinal,
2805 protocol_name:
2806 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2807 }),
2808 }))
2809 },
2810 )
2811 }
2812}
2813
2814#[derive(Debug)]
2816pub enum DirectoryRequest {
2817 AdvisoryLock {
2841 request: AdvisoryLockRequest,
2842 responder: DirectoryAdvisoryLockResponder,
2843 },
2844 Clone {
2845 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
2846 control_handle: DirectoryControlHandle,
2847 },
2848 Close {
2859 responder: DirectoryCloseResponder,
2860 },
2861 Query {
2862 responder: DirectoryQueryResponder,
2863 },
2864 DeprecatedClone {
2866 flags: OpenFlags,
2867 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
2868 control_handle: DirectoryControlHandle,
2869 },
2870 DeprecatedGetAttr {
2872 responder: DirectoryDeprecatedGetAttrResponder,
2873 },
2874 DeprecatedSetAttr {
2876 flags: NodeAttributeFlags,
2877 attributes: NodeAttributes,
2878 responder: DirectoryDeprecatedSetAttrResponder,
2879 },
2880 DeprecatedGetFlags {
2882 responder: DirectoryDeprecatedGetFlagsResponder,
2883 },
2884 DeprecatedSetFlags {
2886 flags: OpenFlags,
2887 responder: DirectoryDeprecatedSetFlagsResponder,
2888 },
2889 GetFlags {
2898 responder: DirectoryGetFlagsResponder,
2899 },
2900 SetFlags {
2910 flags: Flags,
2911 responder: DirectorySetFlagsResponder,
2912 },
2913 QueryFilesystem {
2915 responder: DirectoryQueryFilesystemResponder,
2916 },
2917 GetAttributes {
2931 query: NodeAttributesQuery,
2932 responder: DirectoryGetAttributesResponder,
2933 },
2934 UpdateAttributes {
2943 payload: MutableNodeAttributes,
2944 responder: DirectoryUpdateAttributesResponder,
2945 },
2946 Sync {
2956 responder: DirectorySyncResponder,
2957 },
2958 ListExtendedAttributes {
2967 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
2968 control_handle: DirectoryControlHandle,
2969 },
2970 GetExtendedAttribute {
2977 name: Vec<u8>,
2978 responder: DirectoryGetExtendedAttributeResponder,
2979 },
2980 SetExtendedAttribute {
2988 name: Vec<u8>,
2989 value: ExtendedAttributeValue,
2990 mode: SetExtendedAttributeMode,
2991 responder: DirectorySetExtendedAttributeResponder,
2992 },
2993 RemoveExtendedAttribute {
2999 name: Vec<u8>,
3000 responder: DirectoryRemoveExtendedAttributeResponder,
3001 },
3002 DeprecatedOpen {
3004 flags: OpenFlags,
3005 mode: ModeType,
3006 path: String,
3007 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
3008 control_handle: DirectoryControlHandle,
3009 },
3010 Open {
3017 path: String,
3018 flags: Flags,
3019 options: Options,
3020 object: fdomain_client::Channel,
3021 control_handle: DirectoryControlHandle,
3022 },
3023 ReadDirents {
3049 max_bytes: u64,
3050 responder: DirectoryReadDirentsResponder,
3051 },
3052 Rewind {
3056 responder: DirectoryRewindResponder,
3057 },
3058 GetToken {
3065 responder: DirectoryGetTokenResponder,
3066 },
3067 Link {
3084 src: String,
3085 dst_parent_token: fdomain_client::Handle,
3086 dst: String,
3087 responder: DirectoryLinkResponder,
3088 },
3089 Unlink {
3114 name: String,
3115 options: UnlinkOptions,
3116 responder: DirectoryUnlinkResponder,
3117 },
3118 Rename {
3144 src: String,
3145 dst_parent_token: fdomain_client::Event,
3146 dst: String,
3147 responder: DirectoryRenameResponder,
3148 },
3149 CreateSymlink {
3164 name: String,
3165 target: Vec<u8>,
3166 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3167 responder: DirectoryCreateSymlinkResponder,
3168 },
3169 Watch {
3176 mask: WatchMask,
3177 options: u32,
3178 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3179 responder: DirectoryWatchResponder,
3180 },
3181 #[non_exhaustive]
3183 _UnknownMethod {
3184 ordinal: u64,
3186 control_handle: DirectoryControlHandle,
3187 method_type: fidl::MethodType,
3188 },
3189}
3190
3191impl DirectoryRequest {
3192 #[allow(irrefutable_let_patterns)]
3193 pub fn into_advisory_lock(
3194 self,
3195 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
3196 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
3197 Some((request, responder))
3198 } else {
3199 None
3200 }
3201 }
3202
3203 #[allow(irrefutable_let_patterns)]
3204 pub fn into_clone(
3205 self,
3206 ) -> Option<(
3207 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
3208 DirectoryControlHandle,
3209 )> {
3210 if let DirectoryRequest::Clone { request, control_handle } = self {
3211 Some((request, control_handle))
3212 } else {
3213 None
3214 }
3215 }
3216
3217 #[allow(irrefutable_let_patterns)]
3218 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
3219 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
3220 }
3221
3222 #[allow(irrefutable_let_patterns)]
3223 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
3224 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
3225 }
3226
3227 #[allow(irrefutable_let_patterns)]
3228 pub fn into_deprecated_clone(
3229 self,
3230 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, DirectoryControlHandle)>
3231 {
3232 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
3233 Some((flags, object, control_handle))
3234 } else {
3235 None
3236 }
3237 }
3238
3239 #[allow(irrefutable_let_patterns)]
3240 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
3241 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
3242 Some((responder))
3243 } else {
3244 None
3245 }
3246 }
3247
3248 #[allow(irrefutable_let_patterns)]
3249 pub fn into_deprecated_set_attr(
3250 self,
3251 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
3252 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
3253 Some((flags, attributes, responder))
3254 } else {
3255 None
3256 }
3257 }
3258
3259 #[allow(irrefutable_let_patterns)]
3260 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
3261 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
3262 Some((responder))
3263 } else {
3264 None
3265 }
3266 }
3267
3268 #[allow(irrefutable_let_patterns)]
3269 pub fn into_deprecated_set_flags(
3270 self,
3271 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
3272 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
3273 Some((flags, responder))
3274 } else {
3275 None
3276 }
3277 }
3278
3279 #[allow(irrefutable_let_patterns)]
3280 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
3281 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
3282 }
3283
3284 #[allow(irrefutable_let_patterns)]
3285 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
3286 if let DirectoryRequest::SetFlags { flags, responder } = self {
3287 Some((flags, responder))
3288 } else {
3289 None
3290 }
3291 }
3292
3293 #[allow(irrefutable_let_patterns)]
3294 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
3295 if let DirectoryRequest::QueryFilesystem { responder } = self {
3296 Some((responder))
3297 } else {
3298 None
3299 }
3300 }
3301
3302 #[allow(irrefutable_let_patterns)]
3303 pub fn into_get_attributes(
3304 self,
3305 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
3306 if let DirectoryRequest::GetAttributes { query, responder } = self {
3307 Some((query, responder))
3308 } else {
3309 None
3310 }
3311 }
3312
3313 #[allow(irrefutable_let_patterns)]
3314 pub fn into_update_attributes(
3315 self,
3316 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
3317 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
3318 Some((payload, responder))
3319 } else {
3320 None
3321 }
3322 }
3323
3324 #[allow(irrefutable_let_patterns)]
3325 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
3326 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
3327 }
3328
3329 #[allow(irrefutable_let_patterns)]
3330 pub fn into_list_extended_attributes(
3331 self,
3332 ) -> Option<(
3333 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
3334 DirectoryControlHandle,
3335 )> {
3336 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
3337 Some((iterator, control_handle))
3338 } else {
3339 None
3340 }
3341 }
3342
3343 #[allow(irrefutable_let_patterns)]
3344 pub fn into_get_extended_attribute(
3345 self,
3346 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
3347 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
3348 Some((name, responder))
3349 } else {
3350 None
3351 }
3352 }
3353
3354 #[allow(irrefutable_let_patterns)]
3355 pub fn into_set_extended_attribute(
3356 self,
3357 ) -> Option<(
3358 Vec<u8>,
3359 ExtendedAttributeValue,
3360 SetExtendedAttributeMode,
3361 DirectorySetExtendedAttributeResponder,
3362 )> {
3363 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
3364 Some((name, value, mode, responder))
3365 } else {
3366 None
3367 }
3368 }
3369
3370 #[allow(irrefutable_let_patterns)]
3371 pub fn into_remove_extended_attribute(
3372 self,
3373 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
3374 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
3375 Some((name, responder))
3376 } else {
3377 None
3378 }
3379 }
3380
3381 #[allow(irrefutable_let_patterns)]
3382 pub fn into_deprecated_open(
3383 self,
3384 ) -> Option<(
3385 OpenFlags,
3386 ModeType,
3387 String,
3388 fdomain_client::fidl::ServerEnd<NodeMarker>,
3389 DirectoryControlHandle,
3390 )> {
3391 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
3392 {
3393 Some((flags, mode, path, object, control_handle))
3394 } else {
3395 None
3396 }
3397 }
3398
3399 #[allow(irrefutable_let_patterns)]
3400 pub fn into_open(
3401 self,
3402 ) -> Option<(String, Flags, Options, fdomain_client::Channel, DirectoryControlHandle)> {
3403 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
3404 Some((path, flags, options, object, control_handle))
3405 } else {
3406 None
3407 }
3408 }
3409
3410 #[allow(irrefutable_let_patterns)]
3411 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
3412 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
3413 Some((max_bytes, responder))
3414 } else {
3415 None
3416 }
3417 }
3418
3419 #[allow(irrefutable_let_patterns)]
3420 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
3421 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
3422 }
3423
3424 #[allow(irrefutable_let_patterns)]
3425 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
3426 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
3427 }
3428
3429 #[allow(irrefutable_let_patterns)]
3430 pub fn into_link(
3431 self,
3432 ) -> Option<(String, fdomain_client::Handle, String, DirectoryLinkResponder)> {
3433 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
3434 Some((src, dst_parent_token, dst, responder))
3435 } else {
3436 None
3437 }
3438 }
3439
3440 #[allow(irrefutable_let_patterns)]
3441 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
3442 if let DirectoryRequest::Unlink { name, options, responder } = self {
3443 Some((name, options, responder))
3444 } else {
3445 None
3446 }
3447 }
3448
3449 #[allow(irrefutable_let_patterns)]
3450 pub fn into_rename(
3451 self,
3452 ) -> Option<(String, fdomain_client::Event, String, DirectoryRenameResponder)> {
3453 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
3454 Some((src, dst_parent_token, dst, responder))
3455 } else {
3456 None
3457 }
3458 }
3459
3460 #[allow(irrefutable_let_patterns)]
3461 pub fn into_create_symlink(
3462 self,
3463 ) -> Option<(
3464 String,
3465 Vec<u8>,
3466 Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3467 DirectoryCreateSymlinkResponder,
3468 )> {
3469 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
3470 Some((name, target, connection, responder))
3471 } else {
3472 None
3473 }
3474 }
3475
3476 #[allow(irrefutable_let_patterns)]
3477 pub fn into_watch(
3478 self,
3479 ) -> Option<(
3480 WatchMask,
3481 u32,
3482 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3483 DirectoryWatchResponder,
3484 )> {
3485 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
3486 Some((mask, options, watcher, responder))
3487 } else {
3488 None
3489 }
3490 }
3491
3492 pub fn method_name(&self) -> &'static str {
3494 match *self {
3495 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
3496 DirectoryRequest::Clone { .. } => "clone",
3497 DirectoryRequest::Close { .. } => "close",
3498 DirectoryRequest::Query { .. } => "query",
3499 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
3500 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
3501 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
3502 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
3503 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
3504 DirectoryRequest::GetFlags { .. } => "get_flags",
3505 DirectoryRequest::SetFlags { .. } => "set_flags",
3506 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
3507 DirectoryRequest::GetAttributes { .. } => "get_attributes",
3508 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
3509 DirectoryRequest::Sync { .. } => "sync",
3510 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
3511 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
3512 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
3513 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
3514 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
3515 DirectoryRequest::Open { .. } => "open",
3516 DirectoryRequest::ReadDirents { .. } => "read_dirents",
3517 DirectoryRequest::Rewind { .. } => "rewind",
3518 DirectoryRequest::GetToken { .. } => "get_token",
3519 DirectoryRequest::Link { .. } => "link",
3520 DirectoryRequest::Unlink { .. } => "unlink",
3521 DirectoryRequest::Rename { .. } => "rename",
3522 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
3523 DirectoryRequest::Watch { .. } => "watch",
3524 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3525 "unknown one-way method"
3526 }
3527 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3528 "unknown two-way method"
3529 }
3530 }
3531 }
3532}
3533
3534#[derive(Debug, Clone)]
3535pub struct DirectoryControlHandle {
3536 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3537}
3538
3539impl fdomain_client::fidl::ControlHandle for DirectoryControlHandle {
3540 fn shutdown(&self) {
3541 self.inner.shutdown()
3542 }
3543
3544 fn is_closed(&self) -> bool {
3545 self.inner.channel().is_closed()
3546 }
3547 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3548 self.inner.channel().on_closed()
3549 }
3550}
3551
3552impl DirectoryControlHandle {
3553 pub fn send_on_open_(
3554 &self,
3555 mut s: i32,
3556 mut info: Option<NodeInfoDeprecated>,
3557 ) -> Result<(), fidl::Error> {
3558 self.inner.send::<NodeOnOpenRequest>(
3559 (s, info.as_mut()),
3560 0,
3561 0x7fc7bbb1dbfd1972,
3562 fidl::encoding::DynamicFlags::FLEXIBLE,
3563 )
3564 }
3565
3566 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
3567 self.inner.send::<Representation>(
3568 &mut payload,
3569 0,
3570 0x5cb40567d80a510c,
3571 fidl::encoding::DynamicFlags::empty(),
3572 )
3573 }
3574}
3575
3576#[must_use = "FIDL methods require a response to be sent"]
3577#[derive(Debug)]
3578pub struct DirectoryAdvisoryLockResponder {
3579 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3580 tx_id: u32,
3581}
3582
3583impl std::ops::Drop for DirectoryAdvisoryLockResponder {
3587 fn drop(&mut self) {
3588 self.control_handle.shutdown();
3589 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3591 }
3592}
3593
3594impl fdomain_client::fidl::Responder for DirectoryAdvisoryLockResponder {
3595 type ControlHandle = DirectoryControlHandle;
3596
3597 fn control_handle(&self) -> &DirectoryControlHandle {
3598 &self.control_handle
3599 }
3600
3601 fn drop_without_shutdown(mut self) {
3602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3604 std::mem::forget(self);
3606 }
3607}
3608
3609impl DirectoryAdvisoryLockResponder {
3610 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3614 let _result = self.send_raw(result);
3615 if _result.is_err() {
3616 self.control_handle.shutdown();
3617 }
3618 self.drop_without_shutdown();
3619 _result
3620 }
3621
3622 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3624 let _result = self.send_raw(result);
3625 self.drop_without_shutdown();
3626 _result
3627 }
3628
3629 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3630 self.control_handle
3631 .inner
3632 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3633 result,
3634 self.tx_id,
3635 0x6ee9c0ad53ec87aa,
3636 fidl::encoding::DynamicFlags::empty(),
3637 )
3638 }
3639}
3640
3641#[must_use = "FIDL methods require a response to be sent"]
3642#[derive(Debug)]
3643pub struct DirectoryCloseResponder {
3644 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3645 tx_id: u32,
3646}
3647
3648impl std::ops::Drop for DirectoryCloseResponder {
3652 fn drop(&mut self) {
3653 self.control_handle.shutdown();
3654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3656 }
3657}
3658
3659impl fdomain_client::fidl::Responder for DirectoryCloseResponder {
3660 type ControlHandle = DirectoryControlHandle;
3661
3662 fn control_handle(&self) -> &DirectoryControlHandle {
3663 &self.control_handle
3664 }
3665
3666 fn drop_without_shutdown(mut self) {
3667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3669 std::mem::forget(self);
3671 }
3672}
3673
3674impl DirectoryCloseResponder {
3675 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3679 let _result = self.send_raw(result);
3680 if _result.is_err() {
3681 self.control_handle.shutdown();
3682 }
3683 self.drop_without_shutdown();
3684 _result
3685 }
3686
3687 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3689 let _result = self.send_raw(result);
3690 self.drop_without_shutdown();
3691 _result
3692 }
3693
3694 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3695 self.control_handle
3696 .inner
3697 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3698 result,
3699 self.tx_id,
3700 0x5ac5d459ad7f657e,
3701 fidl::encoding::DynamicFlags::empty(),
3702 )
3703 }
3704}
3705
3706#[must_use = "FIDL methods require a response to be sent"]
3707#[derive(Debug)]
3708pub struct DirectoryQueryResponder {
3709 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3710 tx_id: u32,
3711}
3712
3713impl std::ops::Drop for DirectoryQueryResponder {
3717 fn drop(&mut self) {
3718 self.control_handle.shutdown();
3719 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3721 }
3722}
3723
3724impl fdomain_client::fidl::Responder for DirectoryQueryResponder {
3725 type ControlHandle = DirectoryControlHandle;
3726
3727 fn control_handle(&self) -> &DirectoryControlHandle {
3728 &self.control_handle
3729 }
3730
3731 fn drop_without_shutdown(mut self) {
3732 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3734 std::mem::forget(self);
3736 }
3737}
3738
3739impl DirectoryQueryResponder {
3740 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3744 let _result = self.send_raw(protocol);
3745 if _result.is_err() {
3746 self.control_handle.shutdown();
3747 }
3748 self.drop_without_shutdown();
3749 _result
3750 }
3751
3752 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3754 let _result = self.send_raw(protocol);
3755 self.drop_without_shutdown();
3756 _result
3757 }
3758
3759 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3760 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
3761 (protocol,),
3762 self.tx_id,
3763 0x2658edee9decfc06,
3764 fidl::encoding::DynamicFlags::empty(),
3765 )
3766 }
3767}
3768
3769#[must_use = "FIDL methods require a response to be sent"]
3770#[derive(Debug)]
3771pub struct DirectoryDeprecatedGetAttrResponder {
3772 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3773 tx_id: u32,
3774}
3775
3776impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
3780 fn drop(&mut self) {
3781 self.control_handle.shutdown();
3782 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3784 }
3785}
3786
3787impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetAttrResponder {
3788 type ControlHandle = DirectoryControlHandle;
3789
3790 fn control_handle(&self) -> &DirectoryControlHandle {
3791 &self.control_handle
3792 }
3793
3794 fn drop_without_shutdown(mut self) {
3795 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3797 std::mem::forget(self);
3799 }
3800}
3801
3802impl DirectoryDeprecatedGetAttrResponder {
3803 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3807 let _result = self.send_raw(s, attributes);
3808 if _result.is_err() {
3809 self.control_handle.shutdown();
3810 }
3811 self.drop_without_shutdown();
3812 _result
3813 }
3814
3815 pub fn send_no_shutdown_on_err(
3817 self,
3818 mut s: i32,
3819 mut attributes: &NodeAttributes,
3820 ) -> Result<(), fidl::Error> {
3821 let _result = self.send_raw(s, attributes);
3822 self.drop_without_shutdown();
3823 _result
3824 }
3825
3826 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3827 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
3828 (s, attributes),
3829 self.tx_id,
3830 0x78985e216314dafd,
3831 fidl::encoding::DynamicFlags::empty(),
3832 )
3833 }
3834}
3835
3836#[must_use = "FIDL methods require a response to be sent"]
3837#[derive(Debug)]
3838pub struct DirectoryDeprecatedSetAttrResponder {
3839 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3840 tx_id: u32,
3841}
3842
3843impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
3847 fn drop(&mut self) {
3848 self.control_handle.shutdown();
3849 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3851 }
3852}
3853
3854impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetAttrResponder {
3855 type ControlHandle = DirectoryControlHandle;
3856
3857 fn control_handle(&self) -> &DirectoryControlHandle {
3858 &self.control_handle
3859 }
3860
3861 fn drop_without_shutdown(mut self) {
3862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3864 std::mem::forget(self);
3866 }
3867}
3868
3869impl DirectoryDeprecatedSetAttrResponder {
3870 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
3874 let _result = self.send_raw(s);
3875 if _result.is_err() {
3876 self.control_handle.shutdown();
3877 }
3878 self.drop_without_shutdown();
3879 _result
3880 }
3881
3882 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
3884 let _result = self.send_raw(s);
3885 self.drop_without_shutdown();
3886 _result
3887 }
3888
3889 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
3890 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
3891 (s,),
3892 self.tx_id,
3893 0x4186c0f40d938f46,
3894 fidl::encoding::DynamicFlags::empty(),
3895 )
3896 }
3897}
3898
3899#[must_use = "FIDL methods require a response to be sent"]
3900#[derive(Debug)]
3901pub struct DirectoryDeprecatedGetFlagsResponder {
3902 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3903 tx_id: u32,
3904}
3905
3906impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
3910 fn drop(&mut self) {
3911 self.control_handle.shutdown();
3912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3914 }
3915}
3916
3917impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetFlagsResponder {
3918 type ControlHandle = DirectoryControlHandle;
3919
3920 fn control_handle(&self) -> &DirectoryControlHandle {
3921 &self.control_handle
3922 }
3923
3924 fn drop_without_shutdown(mut self) {
3925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3927 std::mem::forget(self);
3929 }
3930}
3931
3932impl DirectoryDeprecatedGetFlagsResponder {
3933 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3937 let _result = self.send_raw(s, flags);
3938 if _result.is_err() {
3939 self.control_handle.shutdown();
3940 }
3941 self.drop_without_shutdown();
3942 _result
3943 }
3944
3945 pub fn send_no_shutdown_on_err(
3947 self,
3948 mut s: i32,
3949 mut flags: OpenFlags,
3950 ) -> Result<(), fidl::Error> {
3951 let _result = self.send_raw(s, flags);
3952 self.drop_without_shutdown();
3953 _result
3954 }
3955
3956 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3957 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
3958 (s, flags),
3959 self.tx_id,
3960 0x5b88fffb8eda3aa1,
3961 fidl::encoding::DynamicFlags::empty(),
3962 )
3963 }
3964}
3965
3966#[must_use = "FIDL methods require a response to be sent"]
3967#[derive(Debug)]
3968pub struct DirectoryDeprecatedSetFlagsResponder {
3969 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3970 tx_id: u32,
3971}
3972
3973impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
3977 fn drop(&mut self) {
3978 self.control_handle.shutdown();
3979 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3981 }
3982}
3983
3984impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetFlagsResponder {
3985 type ControlHandle = DirectoryControlHandle;
3986
3987 fn control_handle(&self) -> &DirectoryControlHandle {
3988 &self.control_handle
3989 }
3990
3991 fn drop_without_shutdown(mut self) {
3992 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3994 std::mem::forget(self);
3996 }
3997}
3998
3999impl DirectoryDeprecatedSetFlagsResponder {
4000 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4004 let _result = self.send_raw(s);
4005 if _result.is_err() {
4006 self.control_handle.shutdown();
4007 }
4008 self.drop_without_shutdown();
4009 _result
4010 }
4011
4012 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4014 let _result = self.send_raw(s);
4015 self.drop_without_shutdown();
4016 _result
4017 }
4018
4019 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4020 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4021 (s,),
4022 self.tx_id,
4023 0x5295b76c71fde733,
4024 fidl::encoding::DynamicFlags::empty(),
4025 )
4026 }
4027}
4028
4029#[must_use = "FIDL methods require a response to be sent"]
4030#[derive(Debug)]
4031pub struct DirectoryGetFlagsResponder {
4032 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4033 tx_id: u32,
4034}
4035
4036impl std::ops::Drop for DirectoryGetFlagsResponder {
4040 fn drop(&mut self) {
4041 self.control_handle.shutdown();
4042 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4044 }
4045}
4046
4047impl fdomain_client::fidl::Responder for DirectoryGetFlagsResponder {
4048 type ControlHandle = DirectoryControlHandle;
4049
4050 fn control_handle(&self) -> &DirectoryControlHandle {
4051 &self.control_handle
4052 }
4053
4054 fn drop_without_shutdown(mut self) {
4055 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4057 std::mem::forget(self);
4059 }
4060}
4061
4062impl DirectoryGetFlagsResponder {
4063 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4067 let _result = self.send_raw(result);
4068 if _result.is_err() {
4069 self.control_handle.shutdown();
4070 }
4071 self.drop_without_shutdown();
4072 _result
4073 }
4074
4075 pub fn send_no_shutdown_on_err(
4077 self,
4078 mut result: Result<Flags, i32>,
4079 ) -> Result<(), fidl::Error> {
4080 let _result = self.send_raw(result);
4081 self.drop_without_shutdown();
4082 _result
4083 }
4084
4085 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4086 self.control_handle
4087 .inner
4088 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4089 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4090 self.tx_id,
4091 0x176eb318f64ec23,
4092 fidl::encoding::DynamicFlags::FLEXIBLE,
4093 )
4094 }
4095}
4096
4097#[must_use = "FIDL methods require a response to be sent"]
4098#[derive(Debug)]
4099pub struct DirectorySetFlagsResponder {
4100 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4101 tx_id: u32,
4102}
4103
4104impl std::ops::Drop for DirectorySetFlagsResponder {
4108 fn drop(&mut self) {
4109 self.control_handle.shutdown();
4110 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4112 }
4113}
4114
4115impl fdomain_client::fidl::Responder for DirectorySetFlagsResponder {
4116 type ControlHandle = DirectoryControlHandle;
4117
4118 fn control_handle(&self) -> &DirectoryControlHandle {
4119 &self.control_handle
4120 }
4121
4122 fn drop_without_shutdown(mut self) {
4123 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4125 std::mem::forget(self);
4127 }
4128}
4129
4130impl DirectorySetFlagsResponder {
4131 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4135 let _result = self.send_raw(result);
4136 if _result.is_err() {
4137 self.control_handle.shutdown();
4138 }
4139 self.drop_without_shutdown();
4140 _result
4141 }
4142
4143 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4145 let _result = self.send_raw(result);
4146 self.drop_without_shutdown();
4147 _result
4148 }
4149
4150 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4151 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4152 fidl::encoding::EmptyStruct,
4153 i32,
4154 >>(
4155 fidl::encoding::FlexibleResult::new(result),
4156 self.tx_id,
4157 0x55a8028685791ea8,
4158 fidl::encoding::DynamicFlags::FLEXIBLE,
4159 )
4160 }
4161}
4162
4163#[must_use = "FIDL methods require a response to be sent"]
4164#[derive(Debug)]
4165pub struct DirectoryQueryFilesystemResponder {
4166 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4167 tx_id: u32,
4168}
4169
4170impl std::ops::Drop for DirectoryQueryFilesystemResponder {
4174 fn drop(&mut self) {
4175 self.control_handle.shutdown();
4176 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4178 }
4179}
4180
4181impl fdomain_client::fidl::Responder for DirectoryQueryFilesystemResponder {
4182 type ControlHandle = DirectoryControlHandle;
4183
4184 fn control_handle(&self) -> &DirectoryControlHandle {
4185 &self.control_handle
4186 }
4187
4188 fn drop_without_shutdown(mut self) {
4189 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4191 std::mem::forget(self);
4193 }
4194}
4195
4196impl DirectoryQueryFilesystemResponder {
4197 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4201 let _result = self.send_raw(s, info);
4202 if _result.is_err() {
4203 self.control_handle.shutdown();
4204 }
4205 self.drop_without_shutdown();
4206 _result
4207 }
4208
4209 pub fn send_no_shutdown_on_err(
4211 self,
4212 mut s: i32,
4213 mut info: Option<&FilesystemInfo>,
4214 ) -> Result<(), fidl::Error> {
4215 let _result = self.send_raw(s, info);
4216 self.drop_without_shutdown();
4217 _result
4218 }
4219
4220 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4221 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
4222 (s, info),
4223 self.tx_id,
4224 0x6f344a1c6b0a0610,
4225 fidl::encoding::DynamicFlags::empty(),
4226 )
4227 }
4228}
4229
4230#[must_use = "FIDL methods require a response to be sent"]
4231#[derive(Debug)]
4232pub struct DirectoryGetAttributesResponder {
4233 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4234 tx_id: u32,
4235}
4236
4237impl std::ops::Drop for DirectoryGetAttributesResponder {
4241 fn drop(&mut self) {
4242 self.control_handle.shutdown();
4243 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4245 }
4246}
4247
4248impl fdomain_client::fidl::Responder for DirectoryGetAttributesResponder {
4249 type ControlHandle = DirectoryControlHandle;
4250
4251 fn control_handle(&self) -> &DirectoryControlHandle {
4252 &self.control_handle
4253 }
4254
4255 fn drop_without_shutdown(mut self) {
4256 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4258 std::mem::forget(self);
4260 }
4261}
4262
4263impl DirectoryGetAttributesResponder {
4264 pub fn send(
4268 self,
4269 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4270 ) -> Result<(), fidl::Error> {
4271 let _result = self.send_raw(result);
4272 if _result.is_err() {
4273 self.control_handle.shutdown();
4274 }
4275 self.drop_without_shutdown();
4276 _result
4277 }
4278
4279 pub fn send_no_shutdown_on_err(
4281 self,
4282 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4283 ) -> Result<(), fidl::Error> {
4284 let _result = self.send_raw(result);
4285 self.drop_without_shutdown();
4286 _result
4287 }
4288
4289 fn send_raw(
4290 &self,
4291 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4292 ) -> Result<(), fidl::Error> {
4293 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
4294 result,
4295 self.tx_id,
4296 0x3d4396a638ea053b,
4297 fidl::encoding::DynamicFlags::empty(),
4298 )
4299 }
4300}
4301
4302#[must_use = "FIDL methods require a response to be sent"]
4303#[derive(Debug)]
4304pub struct DirectoryUpdateAttributesResponder {
4305 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4306 tx_id: u32,
4307}
4308
4309impl std::ops::Drop for DirectoryUpdateAttributesResponder {
4313 fn drop(&mut self) {
4314 self.control_handle.shutdown();
4315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4317 }
4318}
4319
4320impl fdomain_client::fidl::Responder for DirectoryUpdateAttributesResponder {
4321 type ControlHandle = DirectoryControlHandle;
4322
4323 fn control_handle(&self) -> &DirectoryControlHandle {
4324 &self.control_handle
4325 }
4326
4327 fn drop_without_shutdown(mut self) {
4328 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4330 std::mem::forget(self);
4332 }
4333}
4334
4335impl DirectoryUpdateAttributesResponder {
4336 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4340 let _result = self.send_raw(result);
4341 if _result.is_err() {
4342 self.control_handle.shutdown();
4343 }
4344 self.drop_without_shutdown();
4345 _result
4346 }
4347
4348 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4350 let _result = self.send_raw(result);
4351 self.drop_without_shutdown();
4352 _result
4353 }
4354
4355 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4356 self.control_handle
4357 .inner
4358 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4359 result,
4360 self.tx_id,
4361 0x3308c1da5a89bf08,
4362 fidl::encoding::DynamicFlags::empty(),
4363 )
4364 }
4365}
4366
4367#[must_use = "FIDL methods require a response to be sent"]
4368#[derive(Debug)]
4369pub struct DirectorySyncResponder {
4370 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4371 tx_id: u32,
4372}
4373
4374impl std::ops::Drop for DirectorySyncResponder {
4378 fn drop(&mut self) {
4379 self.control_handle.shutdown();
4380 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4382 }
4383}
4384
4385impl fdomain_client::fidl::Responder for DirectorySyncResponder {
4386 type ControlHandle = DirectoryControlHandle;
4387
4388 fn control_handle(&self) -> &DirectoryControlHandle {
4389 &self.control_handle
4390 }
4391
4392 fn drop_without_shutdown(mut self) {
4393 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4395 std::mem::forget(self);
4397 }
4398}
4399
4400impl DirectorySyncResponder {
4401 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4405 let _result = self.send_raw(result);
4406 if _result.is_err() {
4407 self.control_handle.shutdown();
4408 }
4409 self.drop_without_shutdown();
4410 _result
4411 }
4412
4413 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4415 let _result = self.send_raw(result);
4416 self.drop_without_shutdown();
4417 _result
4418 }
4419
4420 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4421 self.control_handle
4422 .inner
4423 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4424 result,
4425 self.tx_id,
4426 0x2c5c27ca0ab5dc49,
4427 fidl::encoding::DynamicFlags::empty(),
4428 )
4429 }
4430}
4431
4432#[must_use = "FIDL methods require a response to be sent"]
4433#[derive(Debug)]
4434pub struct DirectoryGetExtendedAttributeResponder {
4435 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4436 tx_id: u32,
4437}
4438
4439impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
4443 fn drop(&mut self) {
4444 self.control_handle.shutdown();
4445 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4447 }
4448}
4449
4450impl fdomain_client::fidl::Responder for DirectoryGetExtendedAttributeResponder {
4451 type ControlHandle = DirectoryControlHandle;
4452
4453 fn control_handle(&self) -> &DirectoryControlHandle {
4454 &self.control_handle
4455 }
4456
4457 fn drop_without_shutdown(mut self) {
4458 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4460 std::mem::forget(self);
4462 }
4463}
4464
4465impl DirectoryGetExtendedAttributeResponder {
4466 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4470 let _result = self.send_raw(result);
4471 if _result.is_err() {
4472 self.control_handle.shutdown();
4473 }
4474 self.drop_without_shutdown();
4475 _result
4476 }
4477
4478 pub fn send_no_shutdown_on_err(
4480 self,
4481 mut result: Result<ExtendedAttributeValue, i32>,
4482 ) -> Result<(), fidl::Error> {
4483 let _result = self.send_raw(result);
4484 self.drop_without_shutdown();
4485 _result
4486 }
4487
4488 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4489 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
4490 result.as_mut().map_err(|e| *e),
4491 self.tx_id,
4492 0x45ffa3ccfdeb76db,
4493 fidl::encoding::DynamicFlags::empty(),
4494 )
4495 }
4496}
4497
4498#[must_use = "FIDL methods require a response to be sent"]
4499#[derive(Debug)]
4500pub struct DirectorySetExtendedAttributeResponder {
4501 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4502 tx_id: u32,
4503}
4504
4505impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
4509 fn drop(&mut self) {
4510 self.control_handle.shutdown();
4511 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4513 }
4514}
4515
4516impl fdomain_client::fidl::Responder for DirectorySetExtendedAttributeResponder {
4517 type ControlHandle = DirectoryControlHandle;
4518
4519 fn control_handle(&self) -> &DirectoryControlHandle {
4520 &self.control_handle
4521 }
4522
4523 fn drop_without_shutdown(mut self) {
4524 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4526 std::mem::forget(self);
4528 }
4529}
4530
4531impl DirectorySetExtendedAttributeResponder {
4532 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4536 let _result = self.send_raw(result);
4537 if _result.is_err() {
4538 self.control_handle.shutdown();
4539 }
4540 self.drop_without_shutdown();
4541 _result
4542 }
4543
4544 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4546 let _result = self.send_raw(result);
4547 self.drop_without_shutdown();
4548 _result
4549 }
4550
4551 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4552 self.control_handle
4553 .inner
4554 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4555 result,
4556 self.tx_id,
4557 0x4a951362f681f23c,
4558 fidl::encoding::DynamicFlags::empty(),
4559 )
4560 }
4561}
4562
4563#[must_use = "FIDL methods require a response to be sent"]
4564#[derive(Debug)]
4565pub struct DirectoryRemoveExtendedAttributeResponder {
4566 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4567 tx_id: u32,
4568}
4569
4570impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
4574 fn drop(&mut self) {
4575 self.control_handle.shutdown();
4576 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4578 }
4579}
4580
4581impl fdomain_client::fidl::Responder for DirectoryRemoveExtendedAttributeResponder {
4582 type ControlHandle = DirectoryControlHandle;
4583
4584 fn control_handle(&self) -> &DirectoryControlHandle {
4585 &self.control_handle
4586 }
4587
4588 fn drop_without_shutdown(mut self) {
4589 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4591 std::mem::forget(self);
4593 }
4594}
4595
4596impl DirectoryRemoveExtendedAttributeResponder {
4597 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4601 let _result = self.send_raw(result);
4602 if _result.is_err() {
4603 self.control_handle.shutdown();
4604 }
4605 self.drop_without_shutdown();
4606 _result
4607 }
4608
4609 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4611 let _result = self.send_raw(result);
4612 self.drop_without_shutdown();
4613 _result
4614 }
4615
4616 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4617 self.control_handle
4618 .inner
4619 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4620 result,
4621 self.tx_id,
4622 0x7a0b9f3a9bf9032d,
4623 fidl::encoding::DynamicFlags::empty(),
4624 )
4625 }
4626}
4627
4628#[must_use = "FIDL methods require a response to be sent"]
4629#[derive(Debug)]
4630pub struct DirectoryReadDirentsResponder {
4631 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4632 tx_id: u32,
4633}
4634
4635impl std::ops::Drop for DirectoryReadDirentsResponder {
4639 fn drop(&mut self) {
4640 self.control_handle.shutdown();
4641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4643 }
4644}
4645
4646impl fdomain_client::fidl::Responder for DirectoryReadDirentsResponder {
4647 type ControlHandle = DirectoryControlHandle;
4648
4649 fn control_handle(&self) -> &DirectoryControlHandle {
4650 &self.control_handle
4651 }
4652
4653 fn drop_without_shutdown(mut self) {
4654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4656 std::mem::forget(self);
4658 }
4659}
4660
4661impl DirectoryReadDirentsResponder {
4662 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4666 let _result = self.send_raw(s, dirents);
4667 if _result.is_err() {
4668 self.control_handle.shutdown();
4669 }
4670 self.drop_without_shutdown();
4671 _result
4672 }
4673
4674 pub fn send_no_shutdown_on_err(
4676 self,
4677 mut s: i32,
4678 mut dirents: &[u8],
4679 ) -> Result<(), fidl::Error> {
4680 let _result = self.send_raw(s, dirents);
4681 self.drop_without_shutdown();
4682 _result
4683 }
4684
4685 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4686 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
4687 (s, dirents),
4688 self.tx_id,
4689 0x3582806bf27faa0a,
4690 fidl::encoding::DynamicFlags::empty(),
4691 )
4692 }
4693}
4694
4695#[must_use = "FIDL methods require a response to be sent"]
4696#[derive(Debug)]
4697pub struct DirectoryRewindResponder {
4698 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4699 tx_id: u32,
4700}
4701
4702impl std::ops::Drop for DirectoryRewindResponder {
4706 fn drop(&mut self) {
4707 self.control_handle.shutdown();
4708 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4710 }
4711}
4712
4713impl fdomain_client::fidl::Responder for DirectoryRewindResponder {
4714 type ControlHandle = DirectoryControlHandle;
4715
4716 fn control_handle(&self) -> &DirectoryControlHandle {
4717 &self.control_handle
4718 }
4719
4720 fn drop_without_shutdown(mut self) {
4721 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4723 std::mem::forget(self);
4725 }
4726}
4727
4728impl DirectoryRewindResponder {
4729 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4733 let _result = self.send_raw(s);
4734 if _result.is_err() {
4735 self.control_handle.shutdown();
4736 }
4737 self.drop_without_shutdown();
4738 _result
4739 }
4740
4741 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4743 let _result = self.send_raw(s);
4744 self.drop_without_shutdown();
4745 _result
4746 }
4747
4748 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4749 self.control_handle.inner.send::<DirectoryRewindResponse>(
4750 (s,),
4751 self.tx_id,
4752 0x16b1202af0f34c71,
4753 fidl::encoding::DynamicFlags::empty(),
4754 )
4755 }
4756}
4757
4758#[must_use = "FIDL methods require a response to be sent"]
4759#[derive(Debug)]
4760pub struct DirectoryGetTokenResponder {
4761 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4762 tx_id: u32,
4763}
4764
4765impl std::ops::Drop for DirectoryGetTokenResponder {
4769 fn drop(&mut self) {
4770 self.control_handle.shutdown();
4771 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4773 }
4774}
4775
4776impl fdomain_client::fidl::Responder for DirectoryGetTokenResponder {
4777 type ControlHandle = DirectoryControlHandle;
4778
4779 fn control_handle(&self) -> &DirectoryControlHandle {
4780 &self.control_handle
4781 }
4782
4783 fn drop_without_shutdown(mut self) {
4784 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4786 std::mem::forget(self);
4788 }
4789}
4790
4791impl DirectoryGetTokenResponder {
4792 pub fn send(
4796 self,
4797 mut s: i32,
4798 mut token: Option<fdomain_client::Handle>,
4799 ) -> Result<(), fidl::Error> {
4800 let _result = self.send_raw(s, token);
4801 if _result.is_err() {
4802 self.control_handle.shutdown();
4803 }
4804 self.drop_without_shutdown();
4805 _result
4806 }
4807
4808 pub fn send_no_shutdown_on_err(
4810 self,
4811 mut s: i32,
4812 mut token: Option<fdomain_client::Handle>,
4813 ) -> Result<(), fidl::Error> {
4814 let _result = self.send_raw(s, token);
4815 self.drop_without_shutdown();
4816 _result
4817 }
4818
4819 fn send_raw(
4820 &self,
4821 mut s: i32,
4822 mut token: Option<fdomain_client::Handle>,
4823 ) -> Result<(), fidl::Error> {
4824 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
4825 (s, token),
4826 self.tx_id,
4827 0x26ae9d18763c8655,
4828 fidl::encoding::DynamicFlags::empty(),
4829 )
4830 }
4831}
4832
4833#[must_use = "FIDL methods require a response to be sent"]
4834#[derive(Debug)]
4835pub struct DirectoryLinkResponder {
4836 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4837 tx_id: u32,
4838}
4839
4840impl std::ops::Drop for DirectoryLinkResponder {
4844 fn drop(&mut self) {
4845 self.control_handle.shutdown();
4846 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4848 }
4849}
4850
4851impl fdomain_client::fidl::Responder for DirectoryLinkResponder {
4852 type ControlHandle = DirectoryControlHandle;
4853
4854 fn control_handle(&self) -> &DirectoryControlHandle {
4855 &self.control_handle
4856 }
4857
4858 fn drop_without_shutdown(mut self) {
4859 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4861 std::mem::forget(self);
4863 }
4864}
4865
4866impl DirectoryLinkResponder {
4867 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4871 let _result = self.send_raw(s);
4872 if _result.is_err() {
4873 self.control_handle.shutdown();
4874 }
4875 self.drop_without_shutdown();
4876 _result
4877 }
4878
4879 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4881 let _result = self.send_raw(s);
4882 self.drop_without_shutdown();
4883 _result
4884 }
4885
4886 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4887 self.control_handle.inner.send::<DirectoryLinkResponse>(
4888 (s,),
4889 self.tx_id,
4890 0x740604c0c7c930e7,
4891 fidl::encoding::DynamicFlags::empty(),
4892 )
4893 }
4894}
4895
4896#[must_use = "FIDL methods require a response to be sent"]
4897#[derive(Debug)]
4898pub struct DirectoryUnlinkResponder {
4899 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4900 tx_id: u32,
4901}
4902
4903impl std::ops::Drop for DirectoryUnlinkResponder {
4907 fn drop(&mut self) {
4908 self.control_handle.shutdown();
4909 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4911 }
4912}
4913
4914impl fdomain_client::fidl::Responder for DirectoryUnlinkResponder {
4915 type ControlHandle = DirectoryControlHandle;
4916
4917 fn control_handle(&self) -> &DirectoryControlHandle {
4918 &self.control_handle
4919 }
4920
4921 fn drop_without_shutdown(mut self) {
4922 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4924 std::mem::forget(self);
4926 }
4927}
4928
4929impl DirectoryUnlinkResponder {
4930 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4934 let _result = self.send_raw(result);
4935 if _result.is_err() {
4936 self.control_handle.shutdown();
4937 }
4938 self.drop_without_shutdown();
4939 _result
4940 }
4941
4942 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4944 let _result = self.send_raw(result);
4945 self.drop_without_shutdown();
4946 _result
4947 }
4948
4949 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4950 self.control_handle
4951 .inner
4952 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4953 result,
4954 self.tx_id,
4955 0x750a0326a78d7bed,
4956 fidl::encoding::DynamicFlags::empty(),
4957 )
4958 }
4959}
4960
4961#[must_use = "FIDL methods require a response to be sent"]
4962#[derive(Debug)]
4963pub struct DirectoryRenameResponder {
4964 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4965 tx_id: u32,
4966}
4967
4968impl std::ops::Drop for DirectoryRenameResponder {
4972 fn drop(&mut self) {
4973 self.control_handle.shutdown();
4974 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4976 }
4977}
4978
4979impl fdomain_client::fidl::Responder for DirectoryRenameResponder {
4980 type ControlHandle = DirectoryControlHandle;
4981
4982 fn control_handle(&self) -> &DirectoryControlHandle {
4983 &self.control_handle
4984 }
4985
4986 fn drop_without_shutdown(mut self) {
4987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4989 std::mem::forget(self);
4991 }
4992}
4993
4994impl DirectoryRenameResponder {
4995 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4999 let _result = self.send_raw(result);
5000 if _result.is_err() {
5001 self.control_handle.shutdown();
5002 }
5003 self.drop_without_shutdown();
5004 _result
5005 }
5006
5007 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5009 let _result = self.send_raw(result);
5010 self.drop_without_shutdown();
5011 _result
5012 }
5013
5014 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5015 self.control_handle
5016 .inner
5017 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5018 result,
5019 self.tx_id,
5020 0x7060e7723b9928de,
5021 fidl::encoding::DynamicFlags::empty(),
5022 )
5023 }
5024}
5025
5026#[must_use = "FIDL methods require a response to be sent"]
5027#[derive(Debug)]
5028pub struct DirectoryCreateSymlinkResponder {
5029 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5030 tx_id: u32,
5031}
5032
5033impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5037 fn drop(&mut self) {
5038 self.control_handle.shutdown();
5039 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5041 }
5042}
5043
5044impl fdomain_client::fidl::Responder for DirectoryCreateSymlinkResponder {
5045 type ControlHandle = DirectoryControlHandle;
5046
5047 fn control_handle(&self) -> &DirectoryControlHandle {
5048 &self.control_handle
5049 }
5050
5051 fn drop_without_shutdown(mut self) {
5052 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5054 std::mem::forget(self);
5056 }
5057}
5058
5059impl DirectoryCreateSymlinkResponder {
5060 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5064 let _result = self.send_raw(result);
5065 if _result.is_err() {
5066 self.control_handle.shutdown();
5067 }
5068 self.drop_without_shutdown();
5069 _result
5070 }
5071
5072 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5074 let _result = self.send_raw(result);
5075 self.drop_without_shutdown();
5076 _result
5077 }
5078
5079 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5080 self.control_handle
5081 .inner
5082 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5083 result,
5084 self.tx_id,
5085 0x21ce0f19ec043889,
5086 fidl::encoding::DynamicFlags::empty(),
5087 )
5088 }
5089}
5090
5091#[must_use = "FIDL methods require a response to be sent"]
5092#[derive(Debug)]
5093pub struct DirectoryWatchResponder {
5094 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5095 tx_id: u32,
5096}
5097
5098impl std::ops::Drop for DirectoryWatchResponder {
5102 fn drop(&mut self) {
5103 self.control_handle.shutdown();
5104 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5106 }
5107}
5108
5109impl fdomain_client::fidl::Responder for DirectoryWatchResponder {
5110 type ControlHandle = DirectoryControlHandle;
5111
5112 fn control_handle(&self) -> &DirectoryControlHandle {
5113 &self.control_handle
5114 }
5115
5116 fn drop_without_shutdown(mut self) {
5117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5119 std::mem::forget(self);
5121 }
5122}
5123
5124impl DirectoryWatchResponder {
5125 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5129 let _result = self.send_raw(s);
5130 if _result.is_err() {
5131 self.control_handle.shutdown();
5132 }
5133 self.drop_without_shutdown();
5134 _result
5135 }
5136
5137 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5139 let _result = self.send_raw(s);
5140 self.drop_without_shutdown();
5141 _result
5142 }
5143
5144 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5145 self.control_handle.inner.send::<DirectoryWatchResponse>(
5146 (s,),
5147 self.tx_id,
5148 0x5717193a59d66d91,
5149 fidl::encoding::DynamicFlags::empty(),
5150 )
5151 }
5152}
5153
5154#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5155pub struct DirectoryWatcherMarker;
5156
5157impl fdomain_client::fidl::ProtocolMarker for DirectoryWatcherMarker {
5158 type Proxy = DirectoryWatcherProxy;
5159 type RequestStream = DirectoryWatcherRequestStream;
5160
5161 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
5162}
5163
5164pub trait DirectoryWatcherProxyInterface: Send + Sync {}
5165
5166#[derive(Debug, Clone)]
5167pub struct DirectoryWatcherProxy {
5168 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5169}
5170
5171impl fdomain_client::fidl::Proxy for DirectoryWatcherProxy {
5172 type Protocol = DirectoryWatcherMarker;
5173
5174 fn from_channel(inner: fdomain_client::Channel) -> Self {
5175 Self::new(inner)
5176 }
5177
5178 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5179 self.client.into_channel().map_err(|client| Self { client })
5180 }
5181
5182 fn as_channel(&self) -> &fdomain_client::Channel {
5183 self.client.as_channel()
5184 }
5185}
5186
5187impl DirectoryWatcherProxy {
5188 pub fn new(channel: fdomain_client::Channel) -> Self {
5190 let protocol_name =
5191 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5192 Self { client: fidl::client::Client::new(channel, protocol_name) }
5193 }
5194
5195 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
5201 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
5202 }
5203}
5204
5205impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
5206
5207pub struct DirectoryWatcherEventStream {
5208 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5209}
5210
5211impl std::marker::Unpin for DirectoryWatcherEventStream {}
5212
5213impl futures::stream::FusedStream for DirectoryWatcherEventStream {
5214 fn is_terminated(&self) -> bool {
5215 self.event_receiver.is_terminated()
5216 }
5217}
5218
5219impl futures::Stream for DirectoryWatcherEventStream {
5220 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
5221
5222 fn poll_next(
5223 mut self: std::pin::Pin<&mut Self>,
5224 cx: &mut std::task::Context<'_>,
5225 ) -> std::task::Poll<Option<Self::Item>> {
5226 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5227 &mut self.event_receiver,
5228 cx
5229 )?) {
5230 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
5231 None => std::task::Poll::Ready(None),
5232 }
5233 }
5234}
5235
5236#[derive(Debug)]
5237pub enum DirectoryWatcherEvent {}
5238
5239impl DirectoryWatcherEvent {
5240 fn decode(
5242 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5243 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
5244 let (bytes, _handles) = buf.split_mut();
5245 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5246 debug_assert_eq!(tx_header.tx_id, 0);
5247 match tx_header.ordinal {
5248 _ => Err(fidl::Error::UnknownOrdinal {
5249 ordinal: tx_header.ordinal,
5250 protocol_name:
5251 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5252 }),
5253 }
5254 }
5255}
5256
5257pub struct DirectoryWatcherRequestStream {
5259 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5260 is_terminated: bool,
5261}
5262
5263impl std::marker::Unpin for DirectoryWatcherRequestStream {}
5264
5265impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
5266 fn is_terminated(&self) -> bool {
5267 self.is_terminated
5268 }
5269}
5270
5271impl fdomain_client::fidl::RequestStream for DirectoryWatcherRequestStream {
5272 type Protocol = DirectoryWatcherMarker;
5273 type ControlHandle = DirectoryWatcherControlHandle;
5274
5275 fn from_channel(channel: fdomain_client::Channel) -> Self {
5276 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5277 }
5278
5279 fn control_handle(&self) -> Self::ControlHandle {
5280 DirectoryWatcherControlHandle { inner: self.inner.clone() }
5281 }
5282
5283 fn into_inner(
5284 self,
5285 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5286 {
5287 (self.inner, self.is_terminated)
5288 }
5289
5290 fn from_inner(
5291 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5292 is_terminated: bool,
5293 ) -> Self {
5294 Self { inner, is_terminated }
5295 }
5296}
5297
5298impl futures::Stream for DirectoryWatcherRequestStream {
5299 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
5300
5301 fn poll_next(
5302 mut self: std::pin::Pin<&mut Self>,
5303 cx: &mut std::task::Context<'_>,
5304 ) -> std::task::Poll<Option<Self::Item>> {
5305 let this = &mut *self;
5306 if this.inner.check_shutdown(cx) {
5307 this.is_terminated = true;
5308 return std::task::Poll::Ready(None);
5309 }
5310 if this.is_terminated {
5311 panic!("polled DirectoryWatcherRequestStream after completion");
5312 }
5313 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5314 |bytes, handles| {
5315 match this.inner.channel().read_etc(cx, bytes, handles) {
5316 std::task::Poll::Ready(Ok(())) => {}
5317 std::task::Poll::Pending => return std::task::Poll::Pending,
5318 std::task::Poll::Ready(Err(None)) => {
5319 this.is_terminated = true;
5320 return std::task::Poll::Ready(None);
5321 }
5322 std::task::Poll::Ready(Err(Some(e))) => {
5323 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5324 e.into(),
5325 ))));
5326 }
5327 }
5328
5329 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5331
5332 std::task::Poll::Ready(Some(match header.ordinal {
5333 _ => Err(fidl::Error::UnknownOrdinal {
5334 ordinal: header.ordinal,
5335 protocol_name: <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5336 }),
5337 }))
5338 },
5339 )
5340 }
5341}
5342
5343#[derive(Debug)]
5361pub enum DirectoryWatcherRequest {}
5362
5363impl DirectoryWatcherRequest {
5364 pub fn method_name(&self) -> &'static str {
5366 match *self {}
5367 }
5368}
5369
5370#[derive(Debug, Clone)]
5371pub struct DirectoryWatcherControlHandle {
5372 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5373}
5374
5375impl fdomain_client::fidl::ControlHandle for DirectoryWatcherControlHandle {
5376 fn shutdown(&self) {
5377 self.inner.shutdown()
5378 }
5379
5380 fn is_closed(&self) -> bool {
5381 self.inner.channel().is_closed()
5382 }
5383 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5384 self.inner.channel().on_closed()
5385 }
5386}
5387
5388impl DirectoryWatcherControlHandle {}
5389
5390#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5391pub struct ExtendedAttributeIteratorMarker;
5392
5393impl fdomain_client::fidl::ProtocolMarker for ExtendedAttributeIteratorMarker {
5394 type Proxy = ExtendedAttributeIteratorProxy;
5395 type RequestStream = ExtendedAttributeIteratorRequestStream;
5396
5397 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
5398}
5399pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
5400
5401pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
5402 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
5403 + Send;
5404 fn r#get_next(&self) -> Self::GetNextResponseFut;
5405}
5406
5407#[derive(Debug, Clone)]
5408pub struct ExtendedAttributeIteratorProxy {
5409 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5410}
5411
5412impl fdomain_client::fidl::Proxy for ExtendedAttributeIteratorProxy {
5413 type Protocol = ExtendedAttributeIteratorMarker;
5414
5415 fn from_channel(inner: fdomain_client::Channel) -> Self {
5416 Self::new(inner)
5417 }
5418
5419 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5420 self.client.into_channel().map_err(|client| Self { client })
5421 }
5422
5423 fn as_channel(&self) -> &fdomain_client::Channel {
5424 self.client.as_channel()
5425 }
5426}
5427
5428impl ExtendedAttributeIteratorProxy {
5429 pub fn new(channel: fdomain_client::Channel) -> Self {
5431 let protocol_name =
5432 <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5433 Self { client: fidl::client::Client::new(channel, protocol_name) }
5434 }
5435
5436 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
5442 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5443 }
5444
5445 pub fn r#get_next(
5449 &self,
5450 ) -> fidl::client::QueryResponseFut<
5451 ExtendedAttributeIteratorGetNextResult,
5452 fdomain_client::fidl::FDomainResourceDialect,
5453 > {
5454 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
5455 }
5456}
5457
5458impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
5459 type GetNextResponseFut = fidl::client::QueryResponseFut<
5460 ExtendedAttributeIteratorGetNextResult,
5461 fdomain_client::fidl::FDomainResourceDialect,
5462 >;
5463 fn r#get_next(&self) -> Self::GetNextResponseFut {
5464 fn _decode(
5465 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5466 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
5467 let _response = fidl::client::decode_transaction_body::<
5468 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
5469 fdomain_client::fidl::FDomainResourceDialect,
5470 0x3ba664a1c2e45a7,
5471 >(_buf?)?;
5472 Ok(_response.map(|x| (x.attributes, x.last)))
5473 }
5474 self.client.send_query_and_decode::<
5475 fidl::encoding::EmptyPayload,
5476 ExtendedAttributeIteratorGetNextResult,
5477 >(
5478 (),
5479 0x3ba664a1c2e45a7,
5480 fidl::encoding::DynamicFlags::empty(),
5481 _decode,
5482 )
5483 }
5484}
5485
5486pub struct ExtendedAttributeIteratorEventStream {
5487 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5488}
5489
5490impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
5491
5492impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
5493 fn is_terminated(&self) -> bool {
5494 self.event_receiver.is_terminated()
5495 }
5496}
5497
5498impl futures::Stream for ExtendedAttributeIteratorEventStream {
5499 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
5500
5501 fn poll_next(
5502 mut self: std::pin::Pin<&mut Self>,
5503 cx: &mut std::task::Context<'_>,
5504 ) -> std::task::Poll<Option<Self::Item>> {
5505 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5506 &mut self.event_receiver,
5507 cx
5508 )?) {
5509 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
5510 None => std::task::Poll::Ready(None),
5511 }
5512 }
5513}
5514
5515#[derive(Debug)]
5516pub enum ExtendedAttributeIteratorEvent {}
5517
5518impl ExtendedAttributeIteratorEvent {
5519 fn decode(
5521 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5522 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
5523 let (bytes, _handles) = buf.split_mut();
5524 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5525 debug_assert_eq!(tx_header.tx_id, 0);
5526 match tx_header.ordinal {
5527 _ => Err(fidl::Error::UnknownOrdinal {
5528 ordinal: tx_header.ordinal,
5529 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5530 })
5531 }
5532 }
5533}
5534
5535pub struct ExtendedAttributeIteratorRequestStream {
5537 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5538 is_terminated: bool,
5539}
5540
5541impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
5542
5543impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
5544 fn is_terminated(&self) -> bool {
5545 self.is_terminated
5546 }
5547}
5548
5549impl fdomain_client::fidl::RequestStream for ExtendedAttributeIteratorRequestStream {
5550 type Protocol = ExtendedAttributeIteratorMarker;
5551 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5552
5553 fn from_channel(channel: fdomain_client::Channel) -> Self {
5554 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5555 }
5556
5557 fn control_handle(&self) -> Self::ControlHandle {
5558 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
5559 }
5560
5561 fn into_inner(
5562 self,
5563 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5564 {
5565 (self.inner, self.is_terminated)
5566 }
5567
5568 fn from_inner(
5569 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5570 is_terminated: bool,
5571 ) -> Self {
5572 Self { inner, is_terminated }
5573 }
5574}
5575
5576impl futures::Stream for ExtendedAttributeIteratorRequestStream {
5577 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
5578
5579 fn poll_next(
5580 mut self: std::pin::Pin<&mut Self>,
5581 cx: &mut std::task::Context<'_>,
5582 ) -> std::task::Poll<Option<Self::Item>> {
5583 let this = &mut *self;
5584 if this.inner.check_shutdown(cx) {
5585 this.is_terminated = true;
5586 return std::task::Poll::Ready(None);
5587 }
5588 if this.is_terminated {
5589 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
5590 }
5591 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5592 |bytes, handles| {
5593 match this.inner.channel().read_etc(cx, bytes, handles) {
5594 std::task::Poll::Ready(Ok(())) => {}
5595 std::task::Poll::Pending => return std::task::Poll::Pending,
5596 std::task::Poll::Ready(Err(None)) => {
5597 this.is_terminated = true;
5598 return std::task::Poll::Ready(None);
5599 }
5600 std::task::Poll::Ready(Err(Some(e))) => {
5601 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5602 e.into(),
5603 ))));
5604 }
5605 }
5606
5607 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5609
5610 std::task::Poll::Ready(Some(match header.ordinal {
5611 0x3ba664a1c2e45a7 => {
5612 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5613 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
5614 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5615 let control_handle = ExtendedAttributeIteratorControlHandle {
5616 inner: this.inner.clone(),
5617 };
5618 Ok(ExtendedAttributeIteratorRequest::GetNext {
5619 responder: ExtendedAttributeIteratorGetNextResponder {
5620 control_handle: std::mem::ManuallyDrop::new(control_handle),
5621 tx_id: header.tx_id,
5622 },
5623 })
5624 }
5625 _ => Err(fidl::Error::UnknownOrdinal {
5626 ordinal: header.ordinal,
5627 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5628 }),
5629 }))
5630 },
5631 )
5632 }
5633}
5634
5635#[derive(Debug)]
5636pub enum ExtendedAttributeIteratorRequest {
5637 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
5641}
5642
5643impl ExtendedAttributeIteratorRequest {
5644 #[allow(irrefutable_let_patterns)]
5645 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
5646 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
5647 Some((responder))
5648 } else {
5649 None
5650 }
5651 }
5652
5653 pub fn method_name(&self) -> &'static str {
5655 match *self {
5656 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
5657 }
5658 }
5659}
5660
5661#[derive(Debug, Clone)]
5662pub struct ExtendedAttributeIteratorControlHandle {
5663 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5664}
5665
5666impl fdomain_client::fidl::ControlHandle for ExtendedAttributeIteratorControlHandle {
5667 fn shutdown(&self) {
5668 self.inner.shutdown()
5669 }
5670
5671 fn is_closed(&self) -> bool {
5672 self.inner.channel().is_closed()
5673 }
5674 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5675 self.inner.channel().on_closed()
5676 }
5677}
5678
5679impl ExtendedAttributeIteratorControlHandle {}
5680
5681#[must_use = "FIDL methods require a response to be sent"]
5682#[derive(Debug)]
5683pub struct ExtendedAttributeIteratorGetNextResponder {
5684 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
5685 tx_id: u32,
5686}
5687
5688impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
5692 fn drop(&mut self) {
5693 self.control_handle.shutdown();
5694 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5696 }
5697}
5698
5699impl fdomain_client::fidl::Responder for ExtendedAttributeIteratorGetNextResponder {
5700 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5701
5702 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
5703 &self.control_handle
5704 }
5705
5706 fn drop_without_shutdown(mut self) {
5707 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5709 std::mem::forget(self);
5711 }
5712}
5713
5714impl ExtendedAttributeIteratorGetNextResponder {
5715 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5719 let _result = self.send_raw(result);
5720 if _result.is_err() {
5721 self.control_handle.shutdown();
5722 }
5723 self.drop_without_shutdown();
5724 _result
5725 }
5726
5727 pub fn send_no_shutdown_on_err(
5729 self,
5730 mut result: Result<(&[Vec<u8>], bool), i32>,
5731 ) -> Result<(), fidl::Error> {
5732 let _result = self.send_raw(result);
5733 self.drop_without_shutdown();
5734 _result
5735 }
5736
5737 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5738 self.control_handle.inner.send::<fidl::encoding::ResultType<
5739 ExtendedAttributeIteratorGetNextResponse,
5740 i32,
5741 >>(
5742 result,
5743 self.tx_id,
5744 0x3ba664a1c2e45a7,
5745 fidl::encoding::DynamicFlags::empty(),
5746 )
5747 }
5748}
5749
5750#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5751pub struct FileMarker;
5752
5753impl fdomain_client::fidl::ProtocolMarker for FileMarker {
5754 type Proxy = FileProxy;
5755 type RequestStream = FileRequestStream;
5756
5757 const DEBUG_NAME: &'static str = "fuchsia.io.File";
5758}
5759impl fdomain_client::fidl::DiscoverableProtocolMarker for FileMarker {}
5760pub type FileSeekResult = Result<u64, i32>;
5761pub type FileReadAtResult = Result<Vec<u8>, i32>;
5762pub type FileWriteAtResult = Result<u64, i32>;
5763pub type FileResizeResult = Result<(), i32>;
5764pub type FileGetBackingMemoryResult = Result<fdomain_client::Vmo, i32>;
5765pub type FileAllocateResult = Result<(), i32>;
5766pub type FileEnableVerityResult = Result<(), i32>;
5767
5768pub trait FileProxyInterface: Send + Sync {
5769 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
5770 + Send;
5771 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
5772 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
5773 + Send;
5774 fn r#link_into(
5775 &self,
5776 dst_parent_token: fdomain_client::Event,
5777 dst: &str,
5778 ) -> Self::LinkIntoResponseFut;
5779 fn r#clone(
5780 &self,
5781 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5782 ) -> Result<(), fidl::Error>;
5783 type CloseResponseFut: std::future::Future<
5784 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
5785 > + Send;
5786 fn r#close(&self) -> Self::CloseResponseFut;
5787 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
5788 fn r#query(&self) -> Self::QueryResponseFut;
5789 fn r#deprecated_clone(
5790 &self,
5791 flags: OpenFlags,
5792 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
5793 ) -> Result<(), fidl::Error>;
5794 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
5795 + Send;
5796 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
5797 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
5798 fn r#deprecated_set_attr(
5799 &self,
5800 flags: NodeAttributeFlags,
5801 attributes: &NodeAttributes,
5802 ) -> Self::DeprecatedSetAttrResponseFut;
5803 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
5804 + Send;
5805 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
5806 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
5807 + Send;
5808 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
5809 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
5810 + Send;
5811 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
5812 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
5813 + Send;
5814 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
5815 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
5816 + Send;
5817 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
5818 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
5819 + Send;
5820 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
5821 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
5822 + Send;
5823 fn r#update_attributes(
5824 &self,
5825 payload: &MutableNodeAttributes,
5826 ) -> Self::UpdateAttributesResponseFut;
5827 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
5828 fn r#sync(&self) -> Self::SyncResponseFut;
5829 fn r#list_extended_attributes(
5830 &self,
5831 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
5832 ) -> Result<(), fidl::Error>;
5833 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
5834 + Send;
5835 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
5836 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
5837 + Send;
5838 fn r#set_extended_attribute(
5839 &self,
5840 name: &[u8],
5841 value: ExtendedAttributeValue,
5842 mode: SetExtendedAttributeMode,
5843 ) -> Self::SetExtendedAttributeResponseFut;
5844 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
5845 + Send;
5846 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
5847 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
5848 + Send;
5849 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
5850 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
5851 + Send;
5852 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
5853 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
5854 fn r#describe(&self) -> Self::DescribeResponseFut;
5855 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
5856 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
5857 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
5858 + Send;
5859 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
5860 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
5861 + Send;
5862 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
5863 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
5864 + Send;
5865 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
5866 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
5867 + Send;
5868 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
5869 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
5870 + Send;
5871 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
5872 -> Self::AllocateResponseFut;
5873 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
5874 + Send;
5875 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
5876}
5877
5878#[derive(Debug, Clone)]
5879pub struct FileProxy {
5880 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5881}
5882
5883impl fdomain_client::fidl::Proxy for FileProxy {
5884 type Protocol = FileMarker;
5885
5886 fn from_channel(inner: fdomain_client::Channel) -> Self {
5887 Self::new(inner)
5888 }
5889
5890 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5891 self.client.into_channel().map_err(|client| Self { client })
5892 }
5893
5894 fn as_channel(&self) -> &fdomain_client::Channel {
5895 self.client.as_channel()
5896 }
5897}
5898
5899impl FileProxy {
5900 pub fn new(channel: fdomain_client::Channel) -> Self {
5902 let protocol_name = <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5903 Self { client: fidl::client::Client::new(channel, protocol_name) }
5904 }
5905
5906 pub fn take_event_stream(&self) -> FileEventStream {
5912 FileEventStream { event_receiver: self.client.take_event_receiver() }
5913 }
5914
5915 pub fn r#advisory_lock(
5939 &self,
5940 mut request: &AdvisoryLockRequest,
5941 ) -> fidl::client::QueryResponseFut<
5942 AdvisoryLockingAdvisoryLockResult,
5943 fdomain_client::fidl::FDomainResourceDialect,
5944 > {
5945 FileProxyInterface::r#advisory_lock(self, request)
5946 }
5947
5948 pub fn r#link_into(
5971 &self,
5972 mut dst_parent_token: fdomain_client::Event,
5973 mut dst: &str,
5974 ) -> fidl::client::QueryResponseFut<
5975 LinkableLinkIntoResult,
5976 fdomain_client::fidl::FDomainResourceDialect,
5977 > {
5978 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
5979 }
5980
5981 pub fn r#clone(
5982 &self,
5983 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5984 ) -> Result<(), fidl::Error> {
5985 FileProxyInterface::r#clone(self, request)
5986 }
5987
5988 pub fn r#close(
5999 &self,
6000 ) -> fidl::client::QueryResponseFut<
6001 fdomain_fuchsia_unknown::CloseableCloseResult,
6002 fdomain_client::fidl::FDomainResourceDialect,
6003 > {
6004 FileProxyInterface::r#close(self)
6005 }
6006
6007 pub fn r#query(
6008 &self,
6009 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
6010 FileProxyInterface::r#query(self)
6011 }
6012
6013 pub fn r#deprecated_clone(
6015 &self,
6016 mut flags: OpenFlags,
6017 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6018 ) -> Result<(), fidl::Error> {
6019 FileProxyInterface::r#deprecated_clone(self, flags, object)
6020 }
6021
6022 pub fn r#deprecated_get_attr(
6024 &self,
6025 ) -> fidl::client::QueryResponseFut<
6026 (i32, NodeAttributes),
6027 fdomain_client::fidl::FDomainResourceDialect,
6028 > {
6029 FileProxyInterface::r#deprecated_get_attr(self)
6030 }
6031
6032 pub fn r#deprecated_set_attr(
6034 &self,
6035 mut flags: NodeAttributeFlags,
6036 mut attributes: &NodeAttributes,
6037 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6038 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
6039 }
6040
6041 pub fn r#deprecated_get_flags(
6043 &self,
6044 ) -> fidl::client::QueryResponseFut<
6045 (i32, OpenFlags),
6046 fdomain_client::fidl::FDomainResourceDialect,
6047 > {
6048 FileProxyInterface::r#deprecated_get_flags(self)
6049 }
6050
6051 pub fn r#deprecated_set_flags(
6053 &self,
6054 mut flags: OpenFlags,
6055 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6056 FileProxyInterface::r#deprecated_set_flags(self, flags)
6057 }
6058
6059 pub fn r#get_flags(
6068 &self,
6069 ) -> fidl::client::QueryResponseFut<
6070 NodeGetFlagsResult,
6071 fdomain_client::fidl::FDomainResourceDialect,
6072 > {
6073 FileProxyInterface::r#get_flags(self)
6074 }
6075
6076 pub fn r#set_flags(
6086 &self,
6087 mut flags: Flags,
6088 ) -> fidl::client::QueryResponseFut<
6089 NodeSetFlagsResult,
6090 fdomain_client::fidl::FDomainResourceDialect,
6091 > {
6092 FileProxyInterface::r#set_flags(self, flags)
6093 }
6094
6095 pub fn r#query_filesystem(
6097 &self,
6098 ) -> fidl::client::QueryResponseFut<
6099 (i32, Option<Box<FilesystemInfo>>),
6100 fdomain_client::fidl::FDomainResourceDialect,
6101 > {
6102 FileProxyInterface::r#query_filesystem(self)
6103 }
6104
6105 pub fn r#get_attributes(
6119 &self,
6120 mut query: NodeAttributesQuery,
6121 ) -> fidl::client::QueryResponseFut<
6122 NodeGetAttributesResult,
6123 fdomain_client::fidl::FDomainResourceDialect,
6124 > {
6125 FileProxyInterface::r#get_attributes(self, query)
6126 }
6127
6128 pub fn r#update_attributes(
6137 &self,
6138 mut payload: &MutableNodeAttributes,
6139 ) -> fidl::client::QueryResponseFut<
6140 NodeUpdateAttributesResult,
6141 fdomain_client::fidl::FDomainResourceDialect,
6142 > {
6143 FileProxyInterface::r#update_attributes(self, payload)
6144 }
6145
6146 pub fn r#sync(
6156 &self,
6157 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
6158 {
6159 FileProxyInterface::r#sync(self)
6160 }
6161
6162 pub fn r#list_extended_attributes(
6171 &self,
6172 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6173 ) -> Result<(), fidl::Error> {
6174 FileProxyInterface::r#list_extended_attributes(self, iterator)
6175 }
6176
6177 pub fn r#get_extended_attribute(
6184 &self,
6185 mut name: &[u8],
6186 ) -> fidl::client::QueryResponseFut<
6187 NodeGetExtendedAttributeResult,
6188 fdomain_client::fidl::FDomainResourceDialect,
6189 > {
6190 FileProxyInterface::r#get_extended_attribute(self, name)
6191 }
6192
6193 pub fn r#set_extended_attribute(
6201 &self,
6202 mut name: &[u8],
6203 mut value: ExtendedAttributeValue,
6204 mut mode: SetExtendedAttributeMode,
6205 ) -> fidl::client::QueryResponseFut<
6206 NodeSetExtendedAttributeResult,
6207 fdomain_client::fidl::FDomainResourceDialect,
6208 > {
6209 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
6210 }
6211
6212 pub fn r#remove_extended_attribute(
6218 &self,
6219 mut name: &[u8],
6220 ) -> fidl::client::QueryResponseFut<
6221 NodeRemoveExtendedAttributeResult,
6222 fdomain_client::fidl::FDomainResourceDialect,
6223 > {
6224 FileProxyInterface::r#remove_extended_attribute(self, name)
6225 }
6226
6227 pub fn r#read(
6246 &self,
6247 mut count: u64,
6248 ) -> fidl::client::QueryResponseFut<
6249 ReadableReadResult,
6250 fdomain_client::fidl::FDomainResourceDialect,
6251 > {
6252 FileProxyInterface::r#read(self, count)
6253 }
6254
6255 pub fn r#write(
6279 &self,
6280 mut data: &[u8],
6281 ) -> fidl::client::QueryResponseFut<
6282 WritableWriteResult,
6283 fdomain_client::fidl::FDomainResourceDialect,
6284 > {
6285 FileProxyInterface::r#write(self, data)
6286 }
6287
6288 pub fn r#describe(
6289 &self,
6290 ) -> fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
6291 {
6292 FileProxyInterface::r#describe(self)
6293 }
6294
6295 pub fn r#seek(
6305 &self,
6306 mut origin: SeekOrigin,
6307 mut offset: i64,
6308 ) -> fidl::client::QueryResponseFut<FileSeekResult, fdomain_client::fidl::FDomainResourceDialect>
6309 {
6310 FileProxyInterface::r#seek(self, origin, offset)
6311 }
6312
6313 pub fn r#read_at(
6331 &self,
6332 mut count: u64,
6333 mut offset: u64,
6334 ) -> fidl::client::QueryResponseFut<
6335 FileReadAtResult,
6336 fdomain_client::fidl::FDomainResourceDialect,
6337 > {
6338 FileProxyInterface::r#read_at(self, count, offset)
6339 }
6340
6341 pub fn r#write_at(
6363 &self,
6364 mut data: &[u8],
6365 mut offset: u64,
6366 ) -> fidl::client::QueryResponseFut<
6367 FileWriteAtResult,
6368 fdomain_client::fidl::FDomainResourceDialect,
6369 > {
6370 FileProxyInterface::r#write_at(self, data, offset)
6371 }
6372
6373 pub fn r#resize(
6382 &self,
6383 mut length: u64,
6384 ) -> fidl::client::QueryResponseFut<
6385 FileResizeResult,
6386 fdomain_client::fidl::FDomainResourceDialect,
6387 > {
6388 FileProxyInterface::r#resize(self, length)
6389 }
6390
6391 pub fn r#get_backing_memory(
6412 &self,
6413 mut flags: VmoFlags,
6414 ) -> fidl::client::QueryResponseFut<
6415 FileGetBackingMemoryResult,
6416 fdomain_client::fidl::FDomainResourceDialect,
6417 > {
6418 FileProxyInterface::r#get_backing_memory(self, flags)
6419 }
6420
6421 pub fn r#allocate(
6423 &self,
6424 mut offset: u64,
6425 mut length: u64,
6426 mut mode: AllocateMode,
6427 ) -> fidl::client::QueryResponseFut<
6428 FileAllocateResult,
6429 fdomain_client::fidl::FDomainResourceDialect,
6430 > {
6431 FileProxyInterface::r#allocate(self, offset, length, mode)
6432 }
6433
6434 pub fn r#enable_verity(
6446 &self,
6447 mut options: &VerificationOptions,
6448 ) -> fidl::client::QueryResponseFut<
6449 FileEnableVerityResult,
6450 fdomain_client::fidl::FDomainResourceDialect,
6451 > {
6452 FileProxyInterface::r#enable_verity(self, options)
6453 }
6454}
6455
6456impl FileProxyInterface for FileProxy {
6457 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
6458 AdvisoryLockingAdvisoryLockResult,
6459 fdomain_client::fidl::FDomainResourceDialect,
6460 >;
6461 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
6462 fn _decode(
6463 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6464 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6465 let _response = fidl::client::decode_transaction_body::<
6466 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6467 fdomain_client::fidl::FDomainResourceDialect,
6468 0x6ee9c0ad53ec87aa,
6469 >(_buf?)?;
6470 Ok(_response.map(|x| x))
6471 }
6472 self.client.send_query_and_decode::<
6473 AdvisoryLockingAdvisoryLockRequest,
6474 AdvisoryLockingAdvisoryLockResult,
6475 >(
6476 (request,),
6477 0x6ee9c0ad53ec87aa,
6478 fidl::encoding::DynamicFlags::empty(),
6479 _decode,
6480 )
6481 }
6482
6483 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
6484 LinkableLinkIntoResult,
6485 fdomain_client::fidl::FDomainResourceDialect,
6486 >;
6487 fn r#link_into(
6488 &self,
6489 mut dst_parent_token: fdomain_client::Event,
6490 mut dst: &str,
6491 ) -> Self::LinkIntoResponseFut {
6492 fn _decode(
6493 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6494 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
6495 let _response = fidl::client::decode_transaction_body::<
6496 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6497 fdomain_client::fidl::FDomainResourceDialect,
6498 0x54f3949246a03e74,
6499 >(_buf?)?;
6500 Ok(_response.map(|x| x))
6501 }
6502 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
6503 (dst_parent_token, dst),
6504 0x54f3949246a03e74,
6505 fidl::encoding::DynamicFlags::empty(),
6506 _decode,
6507 )
6508 }
6509
6510 fn r#clone(
6511 &self,
6512 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6513 ) -> Result<(), fidl::Error> {
6514 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
6515 (request,),
6516 0x20d8a7aba2168a79,
6517 fidl::encoding::DynamicFlags::empty(),
6518 )
6519 }
6520
6521 type CloseResponseFut = fidl::client::QueryResponseFut<
6522 fdomain_fuchsia_unknown::CloseableCloseResult,
6523 fdomain_client::fidl::FDomainResourceDialect,
6524 >;
6525 fn r#close(&self) -> Self::CloseResponseFut {
6526 fn _decode(
6527 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6528 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
6529 let _response = fidl::client::decode_transaction_body::<
6530 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6531 fdomain_client::fidl::FDomainResourceDialect,
6532 0x5ac5d459ad7f657e,
6533 >(_buf?)?;
6534 Ok(_response.map(|x| x))
6535 }
6536 self.client.send_query_and_decode::<
6537 fidl::encoding::EmptyPayload,
6538 fdomain_fuchsia_unknown::CloseableCloseResult,
6539 >(
6540 (),
6541 0x5ac5d459ad7f657e,
6542 fidl::encoding::DynamicFlags::empty(),
6543 _decode,
6544 )
6545 }
6546
6547 type QueryResponseFut =
6548 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
6549 fn r#query(&self) -> Self::QueryResponseFut {
6550 fn _decode(
6551 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6552 ) -> Result<Vec<u8>, fidl::Error> {
6553 let _response = fidl::client::decode_transaction_body::<
6554 fdomain_fuchsia_unknown::QueryableQueryResponse,
6555 fdomain_client::fidl::FDomainResourceDialect,
6556 0x2658edee9decfc06,
6557 >(_buf?)?;
6558 Ok(_response.protocol)
6559 }
6560 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
6561 (),
6562 0x2658edee9decfc06,
6563 fidl::encoding::DynamicFlags::empty(),
6564 _decode,
6565 )
6566 }
6567
6568 fn r#deprecated_clone(
6569 &self,
6570 mut flags: OpenFlags,
6571 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6572 ) -> Result<(), fidl::Error> {
6573 self.client.send::<NodeDeprecatedCloneRequest>(
6574 (flags, object),
6575 0x5a61678f293ce16f,
6576 fidl::encoding::DynamicFlags::FLEXIBLE,
6577 )
6578 }
6579
6580 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
6581 (i32, NodeAttributes),
6582 fdomain_client::fidl::FDomainResourceDialect,
6583 >;
6584 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
6585 fn _decode(
6586 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6587 ) -> Result<(i32, NodeAttributes), fidl::Error> {
6588 let _response = fidl::client::decode_transaction_body::<
6589 NodeDeprecatedGetAttrResponse,
6590 fdomain_client::fidl::FDomainResourceDialect,
6591 0x78985e216314dafd,
6592 >(_buf?)?;
6593 Ok((_response.s, _response.attributes))
6594 }
6595 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
6596 (),
6597 0x78985e216314dafd,
6598 fidl::encoding::DynamicFlags::empty(),
6599 _decode,
6600 )
6601 }
6602
6603 type DeprecatedSetAttrResponseFut =
6604 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6605 fn r#deprecated_set_attr(
6606 &self,
6607 mut flags: NodeAttributeFlags,
6608 mut attributes: &NodeAttributes,
6609 ) -> Self::DeprecatedSetAttrResponseFut {
6610 fn _decode(
6611 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6612 ) -> Result<i32, fidl::Error> {
6613 let _response = fidl::client::decode_transaction_body::<
6614 NodeDeprecatedSetAttrResponse,
6615 fdomain_client::fidl::FDomainResourceDialect,
6616 0x4186c0f40d938f46,
6617 >(_buf?)?;
6618 Ok(_response.s)
6619 }
6620 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
6621 (flags, attributes),
6622 0x4186c0f40d938f46,
6623 fidl::encoding::DynamicFlags::empty(),
6624 _decode,
6625 )
6626 }
6627
6628 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
6629 (i32, OpenFlags),
6630 fdomain_client::fidl::FDomainResourceDialect,
6631 >;
6632 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
6633 fn _decode(
6634 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6635 ) -> Result<(i32, OpenFlags), fidl::Error> {
6636 let _response = fidl::client::decode_transaction_body::<
6637 NodeDeprecatedGetFlagsResponse,
6638 fdomain_client::fidl::FDomainResourceDialect,
6639 0x5b88fffb8eda3aa1,
6640 >(_buf?)?;
6641 Ok((_response.s, _response.flags))
6642 }
6643 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
6644 (),
6645 0x5b88fffb8eda3aa1,
6646 fidl::encoding::DynamicFlags::empty(),
6647 _decode,
6648 )
6649 }
6650
6651 type DeprecatedSetFlagsResponseFut =
6652 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6653 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
6654 fn _decode(
6655 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6656 ) -> Result<i32, fidl::Error> {
6657 let _response = fidl::client::decode_transaction_body::<
6658 NodeDeprecatedSetFlagsResponse,
6659 fdomain_client::fidl::FDomainResourceDialect,
6660 0x5295b76c71fde733,
6661 >(_buf?)?;
6662 Ok(_response.s)
6663 }
6664 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
6665 (flags,),
6666 0x5295b76c71fde733,
6667 fidl::encoding::DynamicFlags::empty(),
6668 _decode,
6669 )
6670 }
6671
6672 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
6673 NodeGetFlagsResult,
6674 fdomain_client::fidl::FDomainResourceDialect,
6675 >;
6676 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
6677 fn _decode(
6678 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6679 ) -> Result<NodeGetFlagsResult, fidl::Error> {
6680 let _response = fidl::client::decode_transaction_body::<
6681 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
6682 fdomain_client::fidl::FDomainResourceDialect,
6683 0x176eb318f64ec23,
6684 >(_buf?)?
6685 .into_result_fdomain::<FileMarker>("get_flags")?;
6686 Ok(_response.map(|x| x.flags))
6687 }
6688 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
6689 (),
6690 0x176eb318f64ec23,
6691 fidl::encoding::DynamicFlags::FLEXIBLE,
6692 _decode,
6693 )
6694 }
6695
6696 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
6697 NodeSetFlagsResult,
6698 fdomain_client::fidl::FDomainResourceDialect,
6699 >;
6700 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
6701 fn _decode(
6702 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6703 ) -> Result<NodeSetFlagsResult, fidl::Error> {
6704 let _response = fidl::client::decode_transaction_body::<
6705 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
6706 fdomain_client::fidl::FDomainResourceDialect,
6707 0x55a8028685791ea8,
6708 >(_buf?)?
6709 .into_result_fdomain::<FileMarker>("set_flags")?;
6710 Ok(_response.map(|x| x))
6711 }
6712 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
6713 (flags,),
6714 0x55a8028685791ea8,
6715 fidl::encoding::DynamicFlags::FLEXIBLE,
6716 _decode,
6717 )
6718 }
6719
6720 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
6721 (i32, Option<Box<FilesystemInfo>>),
6722 fdomain_client::fidl::FDomainResourceDialect,
6723 >;
6724 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
6725 fn _decode(
6726 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6727 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
6728 let _response = fidl::client::decode_transaction_body::<
6729 NodeQueryFilesystemResponse,
6730 fdomain_client::fidl::FDomainResourceDialect,
6731 0x6f344a1c6b0a0610,
6732 >(_buf?)?;
6733 Ok((_response.s, _response.info))
6734 }
6735 self.client.send_query_and_decode::<
6736 fidl::encoding::EmptyPayload,
6737 (i32, Option<Box<FilesystemInfo>>),
6738 >(
6739 (),
6740 0x6f344a1c6b0a0610,
6741 fidl::encoding::DynamicFlags::empty(),
6742 _decode,
6743 )
6744 }
6745
6746 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
6747 NodeGetAttributesResult,
6748 fdomain_client::fidl::FDomainResourceDialect,
6749 >;
6750 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
6751 fn _decode(
6752 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6753 ) -> Result<NodeGetAttributesResult, fidl::Error> {
6754 let _response = fidl::client::decode_transaction_body::<
6755 fidl::encoding::ResultType<NodeAttributes2, i32>,
6756 fdomain_client::fidl::FDomainResourceDialect,
6757 0x3d4396a638ea053b,
6758 >(_buf?)?;
6759 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
6760 }
6761 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
6762 (query,),
6763 0x3d4396a638ea053b,
6764 fidl::encoding::DynamicFlags::empty(),
6765 _decode,
6766 )
6767 }
6768
6769 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
6770 NodeUpdateAttributesResult,
6771 fdomain_client::fidl::FDomainResourceDialect,
6772 >;
6773 fn r#update_attributes(
6774 &self,
6775 mut payload: &MutableNodeAttributes,
6776 ) -> Self::UpdateAttributesResponseFut {
6777 fn _decode(
6778 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6779 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
6780 let _response = fidl::client::decode_transaction_body::<
6781 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6782 fdomain_client::fidl::FDomainResourceDialect,
6783 0x3308c1da5a89bf08,
6784 >(_buf?)?;
6785 Ok(_response.map(|x| x))
6786 }
6787 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
6788 payload,
6789 0x3308c1da5a89bf08,
6790 fidl::encoding::DynamicFlags::empty(),
6791 _decode,
6792 )
6793 }
6794
6795 type SyncResponseFut = fidl::client::QueryResponseFut<
6796 NodeSyncResult,
6797 fdomain_client::fidl::FDomainResourceDialect,
6798 >;
6799 fn r#sync(&self) -> Self::SyncResponseFut {
6800 fn _decode(
6801 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6802 ) -> Result<NodeSyncResult, fidl::Error> {
6803 let _response = fidl::client::decode_transaction_body::<
6804 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6805 fdomain_client::fidl::FDomainResourceDialect,
6806 0x2c5c27ca0ab5dc49,
6807 >(_buf?)?;
6808 Ok(_response.map(|x| x))
6809 }
6810 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
6811 (),
6812 0x2c5c27ca0ab5dc49,
6813 fidl::encoding::DynamicFlags::empty(),
6814 _decode,
6815 )
6816 }
6817
6818 fn r#list_extended_attributes(
6819 &self,
6820 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6821 ) -> Result<(), fidl::Error> {
6822 self.client.send::<NodeListExtendedAttributesRequest>(
6823 (iterator,),
6824 0x4b61033de007fcd0,
6825 fidl::encoding::DynamicFlags::empty(),
6826 )
6827 }
6828
6829 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6830 NodeGetExtendedAttributeResult,
6831 fdomain_client::fidl::FDomainResourceDialect,
6832 >;
6833 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
6834 fn _decode(
6835 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6836 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
6837 let _response = fidl::client::decode_transaction_body::<
6838 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
6839 fdomain_client::fidl::FDomainResourceDialect,
6840 0x45ffa3ccfdeb76db,
6841 >(_buf?)?;
6842 Ok(_response.map(|x| x))
6843 }
6844 self.client.send_query_and_decode::<
6845 NodeGetExtendedAttributeRequest,
6846 NodeGetExtendedAttributeResult,
6847 >(
6848 (name,),
6849 0x45ffa3ccfdeb76db,
6850 fidl::encoding::DynamicFlags::empty(),
6851 _decode,
6852 )
6853 }
6854
6855 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6856 NodeSetExtendedAttributeResult,
6857 fdomain_client::fidl::FDomainResourceDialect,
6858 >;
6859 fn r#set_extended_attribute(
6860 &self,
6861 mut name: &[u8],
6862 mut value: ExtendedAttributeValue,
6863 mut mode: SetExtendedAttributeMode,
6864 ) -> Self::SetExtendedAttributeResponseFut {
6865 fn _decode(
6866 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6867 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
6868 let _response = fidl::client::decode_transaction_body::<
6869 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6870 fdomain_client::fidl::FDomainResourceDialect,
6871 0x4a951362f681f23c,
6872 >(_buf?)?;
6873 Ok(_response.map(|x| x))
6874 }
6875 self.client.send_query_and_decode::<
6876 NodeSetExtendedAttributeRequest,
6877 NodeSetExtendedAttributeResult,
6878 >(
6879 (name, &mut value, mode,),
6880 0x4a951362f681f23c,
6881 fidl::encoding::DynamicFlags::empty(),
6882 _decode,
6883 )
6884 }
6885
6886 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6887 NodeRemoveExtendedAttributeResult,
6888 fdomain_client::fidl::FDomainResourceDialect,
6889 >;
6890 fn r#remove_extended_attribute(
6891 &self,
6892 mut name: &[u8],
6893 ) -> Self::RemoveExtendedAttributeResponseFut {
6894 fn _decode(
6895 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6896 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
6897 let _response = fidl::client::decode_transaction_body::<
6898 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6899 fdomain_client::fidl::FDomainResourceDialect,
6900 0x7a0b9f3a9bf9032d,
6901 >(_buf?)?;
6902 Ok(_response.map(|x| x))
6903 }
6904 self.client.send_query_and_decode::<
6905 NodeRemoveExtendedAttributeRequest,
6906 NodeRemoveExtendedAttributeResult,
6907 >(
6908 (name,),
6909 0x7a0b9f3a9bf9032d,
6910 fidl::encoding::DynamicFlags::empty(),
6911 _decode,
6912 )
6913 }
6914
6915 type ReadResponseFut = fidl::client::QueryResponseFut<
6916 ReadableReadResult,
6917 fdomain_client::fidl::FDomainResourceDialect,
6918 >;
6919 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
6920 fn _decode(
6921 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6922 ) -> Result<ReadableReadResult, fidl::Error> {
6923 let _response = fidl::client::decode_transaction_body::<
6924 fidl::encoding::ResultType<ReadableReadResponse, i32>,
6925 fdomain_client::fidl::FDomainResourceDialect,
6926 0x57e419a298c8ede,
6927 >(_buf?)?;
6928 Ok(_response.map(|x| x.data))
6929 }
6930 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
6931 (count,),
6932 0x57e419a298c8ede,
6933 fidl::encoding::DynamicFlags::empty(),
6934 _decode,
6935 )
6936 }
6937
6938 type WriteResponseFut = fidl::client::QueryResponseFut<
6939 WritableWriteResult,
6940 fdomain_client::fidl::FDomainResourceDialect,
6941 >;
6942 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
6943 fn _decode(
6944 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6945 ) -> Result<WritableWriteResult, fidl::Error> {
6946 let _response = fidl::client::decode_transaction_body::<
6947 fidl::encoding::ResultType<WritableWriteResponse, i32>,
6948 fdomain_client::fidl::FDomainResourceDialect,
6949 0x6a31437832469f82,
6950 >(_buf?)?;
6951 Ok(_response.map(|x| x.actual_count))
6952 }
6953 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
6954 (data,),
6955 0x6a31437832469f82,
6956 fidl::encoding::DynamicFlags::empty(),
6957 _decode,
6958 )
6959 }
6960
6961 type DescribeResponseFut =
6962 fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>;
6963 fn r#describe(&self) -> Self::DescribeResponseFut {
6964 fn _decode(
6965 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6966 ) -> Result<FileInfo, fidl::Error> {
6967 let _response = fidl::client::decode_transaction_body::<
6968 FileInfo,
6969 fdomain_client::fidl::FDomainResourceDialect,
6970 0x68b5ac00c62906bc,
6971 >(_buf?)?;
6972 Ok(_response)
6973 }
6974 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
6975 (),
6976 0x68b5ac00c62906bc,
6977 fidl::encoding::DynamicFlags::empty(),
6978 _decode,
6979 )
6980 }
6981
6982 type SeekResponseFut = fidl::client::QueryResponseFut<
6983 FileSeekResult,
6984 fdomain_client::fidl::FDomainResourceDialect,
6985 >;
6986 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
6987 fn _decode(
6988 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6989 ) -> Result<FileSeekResult, fidl::Error> {
6990 let _response = fidl::client::decode_transaction_body::<
6991 fidl::encoding::ResultType<FileSeekResponse, i32>,
6992 fdomain_client::fidl::FDomainResourceDialect,
6993 0x78079168162c5207,
6994 >(_buf?)?;
6995 Ok(_response.map(|x| x.offset_from_start))
6996 }
6997 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
6998 (origin, offset),
6999 0x78079168162c5207,
7000 fidl::encoding::DynamicFlags::empty(),
7001 _decode,
7002 )
7003 }
7004
7005 type ReadAtResponseFut = fidl::client::QueryResponseFut<
7006 FileReadAtResult,
7007 fdomain_client::fidl::FDomainResourceDialect,
7008 >;
7009 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
7010 fn _decode(
7011 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7012 ) -> Result<FileReadAtResult, fidl::Error> {
7013 let _response = fidl::client::decode_transaction_body::<
7014 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7015 fdomain_client::fidl::FDomainResourceDialect,
7016 0x1607a293a60d723e,
7017 >(_buf?)?;
7018 Ok(_response.map(|x| x.data))
7019 }
7020 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
7021 (count, offset),
7022 0x1607a293a60d723e,
7023 fidl::encoding::DynamicFlags::empty(),
7024 _decode,
7025 )
7026 }
7027
7028 type WriteAtResponseFut = fidl::client::QueryResponseFut<
7029 FileWriteAtResult,
7030 fdomain_client::fidl::FDomainResourceDialect,
7031 >;
7032 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
7033 fn _decode(
7034 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7035 ) -> Result<FileWriteAtResult, fidl::Error> {
7036 let _response = fidl::client::decode_transaction_body::<
7037 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7038 fdomain_client::fidl::FDomainResourceDialect,
7039 0x793eefc0045e792b,
7040 >(_buf?)?;
7041 Ok(_response.map(|x| x.actual_count))
7042 }
7043 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
7044 (data, offset),
7045 0x793eefc0045e792b,
7046 fidl::encoding::DynamicFlags::empty(),
7047 _decode,
7048 )
7049 }
7050
7051 type ResizeResponseFut = fidl::client::QueryResponseFut<
7052 FileResizeResult,
7053 fdomain_client::fidl::FDomainResourceDialect,
7054 >;
7055 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
7056 fn _decode(
7057 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7058 ) -> Result<FileResizeResult, fidl::Error> {
7059 let _response = fidl::client::decode_transaction_body::<
7060 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7061 fdomain_client::fidl::FDomainResourceDialect,
7062 0x2b80825f0535743a,
7063 >(_buf?)?;
7064 Ok(_response.map(|x| x))
7065 }
7066 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
7067 (length,),
7068 0x2b80825f0535743a,
7069 fidl::encoding::DynamicFlags::empty(),
7070 _decode,
7071 )
7072 }
7073
7074 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
7075 FileGetBackingMemoryResult,
7076 fdomain_client::fidl::FDomainResourceDialect,
7077 >;
7078 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
7079 fn _decode(
7080 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7081 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7082 let _response = fidl::client::decode_transaction_body::<
7083 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7084 fdomain_client::fidl::FDomainResourceDialect,
7085 0xa6a9e654cbf62b,
7086 >(_buf?)?;
7087 Ok(_response.map(|x| x.vmo))
7088 }
7089 self.client
7090 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
7091 (flags,),
7092 0xa6a9e654cbf62b,
7093 fidl::encoding::DynamicFlags::empty(),
7094 _decode,
7095 )
7096 }
7097
7098 type AllocateResponseFut = fidl::client::QueryResponseFut<
7099 FileAllocateResult,
7100 fdomain_client::fidl::FDomainResourceDialect,
7101 >;
7102 fn r#allocate(
7103 &self,
7104 mut offset: u64,
7105 mut length: u64,
7106 mut mode: AllocateMode,
7107 ) -> Self::AllocateResponseFut {
7108 fn _decode(
7109 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7110 ) -> Result<FileAllocateResult, fidl::Error> {
7111 let _response = fidl::client::decode_transaction_body::<
7112 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7113 fdomain_client::fidl::FDomainResourceDialect,
7114 0x77fa0c330b57fd2e,
7115 >(_buf?)?
7116 .into_result_fdomain::<FileMarker>("allocate")?;
7117 Ok(_response.map(|x| x))
7118 }
7119 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
7120 (offset, length, mode),
7121 0x77fa0c330b57fd2e,
7122 fidl::encoding::DynamicFlags::FLEXIBLE,
7123 _decode,
7124 )
7125 }
7126
7127 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
7128 FileEnableVerityResult,
7129 fdomain_client::fidl::FDomainResourceDialect,
7130 >;
7131 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
7132 fn _decode(
7133 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7134 ) -> Result<FileEnableVerityResult, fidl::Error> {
7135 let _response = fidl::client::decode_transaction_body::<
7136 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7137 fdomain_client::fidl::FDomainResourceDialect,
7138 0x2c421ec3faaeb8bb,
7139 >(_buf?)?
7140 .into_result_fdomain::<FileMarker>("enable_verity")?;
7141 Ok(_response.map(|x| x))
7142 }
7143 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
7144 (options,),
7145 0x2c421ec3faaeb8bb,
7146 fidl::encoding::DynamicFlags::FLEXIBLE,
7147 _decode,
7148 )
7149 }
7150}
7151
7152pub struct FileEventStream {
7153 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7154}
7155
7156impl std::marker::Unpin for FileEventStream {}
7157
7158impl futures::stream::FusedStream for FileEventStream {
7159 fn is_terminated(&self) -> bool {
7160 self.event_receiver.is_terminated()
7161 }
7162}
7163
7164impl futures::Stream for FileEventStream {
7165 type Item = Result<FileEvent, fidl::Error>;
7166
7167 fn poll_next(
7168 mut self: std::pin::Pin<&mut Self>,
7169 cx: &mut std::task::Context<'_>,
7170 ) -> std::task::Poll<Option<Self::Item>> {
7171 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7172 &mut self.event_receiver,
7173 cx
7174 )?) {
7175 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
7176 None => std::task::Poll::Ready(None),
7177 }
7178 }
7179}
7180
7181#[derive(Debug)]
7182pub enum FileEvent {
7183 OnOpen_ {
7184 s: i32,
7185 info: Option<Box<NodeInfoDeprecated>>,
7186 },
7187 OnRepresentation {
7188 payload: Representation,
7189 },
7190 #[non_exhaustive]
7191 _UnknownEvent {
7192 ordinal: u64,
7194 },
7195}
7196
7197impl FileEvent {
7198 #[allow(irrefutable_let_patterns)]
7199 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
7200 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
7201 }
7202 #[allow(irrefutable_let_patterns)]
7203 pub fn into_on_representation(self) -> Option<Representation> {
7204 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
7205 }
7206
7207 fn decode(
7209 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7210 ) -> Result<FileEvent, fidl::Error> {
7211 let (bytes, _handles) = buf.split_mut();
7212 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7213 debug_assert_eq!(tx_header.tx_id, 0);
7214 match tx_header.ordinal {
7215 0x7fc7bbb1dbfd1972 => {
7216 let mut out = fidl::new_empty!(
7217 NodeOnOpenRequest,
7218 fdomain_client::fidl::FDomainResourceDialect
7219 );
7220 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
7221 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
7222 }
7223 0x5cb40567d80a510c => {
7224 let mut out =
7225 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
7226 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
7227 Ok((FileEvent::OnRepresentation { payload: out }))
7228 }
7229 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7230 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7231 }
7232 _ => Err(fidl::Error::UnknownOrdinal {
7233 ordinal: tx_header.ordinal,
7234 protocol_name: <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7235 }),
7236 }
7237 }
7238}
7239
7240pub struct FileRequestStream {
7242 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7243 is_terminated: bool,
7244}
7245
7246impl std::marker::Unpin for FileRequestStream {}
7247
7248impl futures::stream::FusedStream for FileRequestStream {
7249 fn is_terminated(&self) -> bool {
7250 self.is_terminated
7251 }
7252}
7253
7254impl fdomain_client::fidl::RequestStream for FileRequestStream {
7255 type Protocol = FileMarker;
7256 type ControlHandle = FileControlHandle;
7257
7258 fn from_channel(channel: fdomain_client::Channel) -> Self {
7259 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7260 }
7261
7262 fn control_handle(&self) -> Self::ControlHandle {
7263 FileControlHandle { inner: self.inner.clone() }
7264 }
7265
7266 fn into_inner(
7267 self,
7268 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7269 {
7270 (self.inner, self.is_terminated)
7271 }
7272
7273 fn from_inner(
7274 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7275 is_terminated: bool,
7276 ) -> Self {
7277 Self { inner, is_terminated }
7278 }
7279}
7280
7281impl futures::Stream for FileRequestStream {
7282 type Item = Result<FileRequest, fidl::Error>;
7283
7284 fn poll_next(
7285 mut self: std::pin::Pin<&mut Self>,
7286 cx: &mut std::task::Context<'_>,
7287 ) -> std::task::Poll<Option<Self::Item>> {
7288 let this = &mut *self;
7289 if this.inner.check_shutdown(cx) {
7290 this.is_terminated = true;
7291 return std::task::Poll::Ready(None);
7292 }
7293 if this.is_terminated {
7294 panic!("polled FileRequestStream after completion");
7295 }
7296 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7297 |bytes, handles| {
7298 match this.inner.channel().read_etc(cx, bytes, handles) {
7299 std::task::Poll::Ready(Ok(())) => {}
7300 std::task::Poll::Pending => return std::task::Poll::Pending,
7301 std::task::Poll::Ready(Err(None)) => {
7302 this.is_terminated = true;
7303 return std::task::Poll::Ready(None);
7304 }
7305 std::task::Poll::Ready(Err(Some(e))) => {
7306 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7307 e.into(),
7308 ))));
7309 }
7310 }
7311
7312 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7314
7315 std::task::Poll::Ready(Some(match header.ordinal {
7316 0x6ee9c0ad53ec87aa => {
7317 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7318 let mut req = fidl::new_empty!(
7319 AdvisoryLockingAdvisoryLockRequest,
7320 fdomain_client::fidl::FDomainResourceDialect
7321 );
7322 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
7323 let control_handle = FileControlHandle { inner: this.inner.clone() };
7324 Ok(FileRequest::AdvisoryLock {
7325 request: req.request,
7326
7327 responder: FileAdvisoryLockResponder {
7328 control_handle: std::mem::ManuallyDrop::new(control_handle),
7329 tx_id: header.tx_id,
7330 },
7331 })
7332 }
7333 0x54f3949246a03e74 => {
7334 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7335 let mut req = fidl::new_empty!(
7336 LinkableLinkIntoRequest,
7337 fdomain_client::fidl::FDomainResourceDialect
7338 );
7339 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
7340 let control_handle = FileControlHandle { inner: this.inner.clone() };
7341 Ok(FileRequest::LinkInto {
7342 dst_parent_token: req.dst_parent_token,
7343 dst: req.dst,
7344
7345 responder: FileLinkIntoResponder {
7346 control_handle: std::mem::ManuallyDrop::new(control_handle),
7347 tx_id: header.tx_id,
7348 },
7349 })
7350 }
7351 0x20d8a7aba2168a79 => {
7352 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7353 let mut req = fidl::new_empty!(
7354 fdomain_fuchsia_unknown::CloneableCloneRequest,
7355 fdomain_client::fidl::FDomainResourceDialect
7356 );
7357 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7358 let control_handle = FileControlHandle { inner: this.inner.clone() };
7359 Ok(FileRequest::Clone { request: req.request, control_handle })
7360 }
7361 0x5ac5d459ad7f657e => {
7362 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7363 let mut req = fidl::new_empty!(
7364 fidl::encoding::EmptyPayload,
7365 fdomain_client::fidl::FDomainResourceDialect
7366 );
7367 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7368 let control_handle = FileControlHandle { inner: this.inner.clone() };
7369 Ok(FileRequest::Close {
7370 responder: FileCloseResponder {
7371 control_handle: std::mem::ManuallyDrop::new(control_handle),
7372 tx_id: header.tx_id,
7373 },
7374 })
7375 }
7376 0x2658edee9decfc06 => {
7377 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7378 let mut req = fidl::new_empty!(
7379 fidl::encoding::EmptyPayload,
7380 fdomain_client::fidl::FDomainResourceDialect
7381 );
7382 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7383 let control_handle = FileControlHandle { inner: this.inner.clone() };
7384 Ok(FileRequest::Query {
7385 responder: FileQueryResponder {
7386 control_handle: std::mem::ManuallyDrop::new(control_handle),
7387 tx_id: header.tx_id,
7388 },
7389 })
7390 }
7391 0x5a61678f293ce16f => {
7392 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7393 let mut req = fidl::new_empty!(
7394 NodeDeprecatedCloneRequest,
7395 fdomain_client::fidl::FDomainResourceDialect
7396 );
7397 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7398 let control_handle = FileControlHandle { inner: this.inner.clone() };
7399 Ok(FileRequest::DeprecatedClone {
7400 flags: req.flags,
7401 object: req.object,
7402
7403 control_handle,
7404 })
7405 }
7406 0x78985e216314dafd => {
7407 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7408 let mut req = fidl::new_empty!(
7409 fidl::encoding::EmptyPayload,
7410 fdomain_client::fidl::FDomainResourceDialect
7411 );
7412 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7413 let control_handle = FileControlHandle { inner: this.inner.clone() };
7414 Ok(FileRequest::DeprecatedGetAttr {
7415 responder: FileDeprecatedGetAttrResponder {
7416 control_handle: std::mem::ManuallyDrop::new(control_handle),
7417 tx_id: header.tx_id,
7418 },
7419 })
7420 }
7421 0x4186c0f40d938f46 => {
7422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7423 let mut req = fidl::new_empty!(
7424 NodeDeprecatedSetAttrRequest,
7425 fdomain_client::fidl::FDomainResourceDialect
7426 );
7427 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
7428 let control_handle = FileControlHandle { inner: this.inner.clone() };
7429 Ok(FileRequest::DeprecatedSetAttr {
7430 flags: req.flags,
7431 attributes: req.attributes,
7432
7433 responder: FileDeprecatedSetAttrResponder {
7434 control_handle: std::mem::ManuallyDrop::new(control_handle),
7435 tx_id: header.tx_id,
7436 },
7437 })
7438 }
7439 0x5b88fffb8eda3aa1 => {
7440 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7441 let mut req = fidl::new_empty!(
7442 fidl::encoding::EmptyPayload,
7443 fdomain_client::fidl::FDomainResourceDialect
7444 );
7445 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7446 let control_handle = FileControlHandle { inner: this.inner.clone() };
7447 Ok(FileRequest::DeprecatedGetFlags {
7448 responder: FileDeprecatedGetFlagsResponder {
7449 control_handle: std::mem::ManuallyDrop::new(control_handle),
7450 tx_id: header.tx_id,
7451 },
7452 })
7453 }
7454 0x5295b76c71fde733 => {
7455 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7456 let mut req = fidl::new_empty!(
7457 NodeDeprecatedSetFlagsRequest,
7458 fdomain_client::fidl::FDomainResourceDialect
7459 );
7460 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7461 let control_handle = FileControlHandle { inner: this.inner.clone() };
7462 Ok(FileRequest::DeprecatedSetFlags {
7463 flags: req.flags,
7464
7465 responder: FileDeprecatedSetFlagsResponder {
7466 control_handle: std::mem::ManuallyDrop::new(control_handle),
7467 tx_id: header.tx_id,
7468 },
7469 })
7470 }
7471 0x176eb318f64ec23 => {
7472 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7473 let mut req = fidl::new_empty!(
7474 fidl::encoding::EmptyPayload,
7475 fdomain_client::fidl::FDomainResourceDialect
7476 );
7477 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7478 let control_handle = FileControlHandle { inner: this.inner.clone() };
7479 Ok(FileRequest::GetFlags {
7480 responder: FileGetFlagsResponder {
7481 control_handle: std::mem::ManuallyDrop::new(control_handle),
7482 tx_id: header.tx_id,
7483 },
7484 })
7485 }
7486 0x55a8028685791ea8 => {
7487 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7488 let mut req = fidl::new_empty!(
7489 NodeSetFlagsRequest,
7490 fdomain_client::fidl::FDomainResourceDialect
7491 );
7492 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7493 let control_handle = FileControlHandle { inner: this.inner.clone() };
7494 Ok(FileRequest::SetFlags {
7495 flags: req.flags,
7496
7497 responder: FileSetFlagsResponder {
7498 control_handle: std::mem::ManuallyDrop::new(control_handle),
7499 tx_id: header.tx_id,
7500 },
7501 })
7502 }
7503 0x6f344a1c6b0a0610 => {
7504 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7505 let mut req = fidl::new_empty!(
7506 fidl::encoding::EmptyPayload,
7507 fdomain_client::fidl::FDomainResourceDialect
7508 );
7509 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7510 let control_handle = FileControlHandle { inner: this.inner.clone() };
7511 Ok(FileRequest::QueryFilesystem {
7512 responder: FileQueryFilesystemResponder {
7513 control_handle: std::mem::ManuallyDrop::new(control_handle),
7514 tx_id: header.tx_id,
7515 },
7516 })
7517 }
7518 0x3d4396a638ea053b => {
7519 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7520 let mut req = fidl::new_empty!(
7521 NodeGetAttributesRequest,
7522 fdomain_client::fidl::FDomainResourceDialect
7523 );
7524 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7525 let control_handle = FileControlHandle { inner: this.inner.clone() };
7526 Ok(FileRequest::GetAttributes {
7527 query: req.query,
7528
7529 responder: FileGetAttributesResponder {
7530 control_handle: std::mem::ManuallyDrop::new(control_handle),
7531 tx_id: header.tx_id,
7532 },
7533 })
7534 }
7535 0x3308c1da5a89bf08 => {
7536 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7537 let mut req = fidl::new_empty!(
7538 MutableNodeAttributes,
7539 fdomain_client::fidl::FDomainResourceDialect
7540 );
7541 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
7542 let control_handle = FileControlHandle { inner: this.inner.clone() };
7543 Ok(FileRequest::UpdateAttributes {
7544 payload: req,
7545 responder: FileUpdateAttributesResponder {
7546 control_handle: std::mem::ManuallyDrop::new(control_handle),
7547 tx_id: header.tx_id,
7548 },
7549 })
7550 }
7551 0x2c5c27ca0ab5dc49 => {
7552 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7553 let mut req = fidl::new_empty!(
7554 fidl::encoding::EmptyPayload,
7555 fdomain_client::fidl::FDomainResourceDialect
7556 );
7557 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7558 let control_handle = FileControlHandle { inner: this.inner.clone() };
7559 Ok(FileRequest::Sync {
7560 responder: FileSyncResponder {
7561 control_handle: std::mem::ManuallyDrop::new(control_handle),
7562 tx_id: header.tx_id,
7563 },
7564 })
7565 }
7566 0x4b61033de007fcd0 => {
7567 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7568 let mut req = fidl::new_empty!(
7569 NodeListExtendedAttributesRequest,
7570 fdomain_client::fidl::FDomainResourceDialect
7571 );
7572 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7573 let control_handle = FileControlHandle { inner: this.inner.clone() };
7574 Ok(FileRequest::ListExtendedAttributes {
7575 iterator: req.iterator,
7576
7577 control_handle,
7578 })
7579 }
7580 0x45ffa3ccfdeb76db => {
7581 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7582 let mut req = fidl::new_empty!(
7583 NodeGetExtendedAttributeRequest,
7584 fdomain_client::fidl::FDomainResourceDialect
7585 );
7586 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7587 let control_handle = FileControlHandle { inner: this.inner.clone() };
7588 Ok(FileRequest::GetExtendedAttribute {
7589 name: req.name,
7590
7591 responder: FileGetExtendedAttributeResponder {
7592 control_handle: std::mem::ManuallyDrop::new(control_handle),
7593 tx_id: header.tx_id,
7594 },
7595 })
7596 }
7597 0x4a951362f681f23c => {
7598 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7599 let mut req = fidl::new_empty!(
7600 NodeSetExtendedAttributeRequest,
7601 fdomain_client::fidl::FDomainResourceDialect
7602 );
7603 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7604 let control_handle = FileControlHandle { inner: this.inner.clone() };
7605 Ok(FileRequest::SetExtendedAttribute {
7606 name: req.name,
7607 value: req.value,
7608 mode: req.mode,
7609
7610 responder: FileSetExtendedAttributeResponder {
7611 control_handle: std::mem::ManuallyDrop::new(control_handle),
7612 tx_id: header.tx_id,
7613 },
7614 })
7615 }
7616 0x7a0b9f3a9bf9032d => {
7617 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7618 let mut req = fidl::new_empty!(
7619 NodeRemoveExtendedAttributeRequest,
7620 fdomain_client::fidl::FDomainResourceDialect
7621 );
7622 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7623 let control_handle = FileControlHandle { inner: this.inner.clone() };
7624 Ok(FileRequest::RemoveExtendedAttribute {
7625 name: req.name,
7626
7627 responder: FileRemoveExtendedAttributeResponder {
7628 control_handle: std::mem::ManuallyDrop::new(control_handle),
7629 tx_id: header.tx_id,
7630 },
7631 })
7632 }
7633 0x57e419a298c8ede => {
7634 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7635 let mut req = fidl::new_empty!(
7636 ReadableReadRequest,
7637 fdomain_client::fidl::FDomainResourceDialect
7638 );
7639 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
7640 let control_handle = FileControlHandle { inner: this.inner.clone() };
7641 Ok(FileRequest::Read {
7642 count: req.count,
7643
7644 responder: FileReadResponder {
7645 control_handle: std::mem::ManuallyDrop::new(control_handle),
7646 tx_id: header.tx_id,
7647 },
7648 })
7649 }
7650 0x6a31437832469f82 => {
7651 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7652 let mut req = fidl::new_empty!(
7653 WritableWriteRequest,
7654 fdomain_client::fidl::FDomainResourceDialect
7655 );
7656 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7657 let control_handle = FileControlHandle { inner: this.inner.clone() };
7658 Ok(FileRequest::Write {
7659 data: req.data,
7660
7661 responder: FileWriteResponder {
7662 control_handle: std::mem::ManuallyDrop::new(control_handle),
7663 tx_id: header.tx_id,
7664 },
7665 })
7666 }
7667 0x68b5ac00c62906bc => {
7668 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7669 let mut req = fidl::new_empty!(
7670 fidl::encoding::EmptyPayload,
7671 fdomain_client::fidl::FDomainResourceDialect
7672 );
7673 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7674 let control_handle = FileControlHandle { inner: this.inner.clone() };
7675 Ok(FileRequest::Describe {
7676 responder: FileDescribeResponder {
7677 control_handle: std::mem::ManuallyDrop::new(control_handle),
7678 tx_id: header.tx_id,
7679 },
7680 })
7681 }
7682 0x78079168162c5207 => {
7683 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7684 let mut req = fidl::new_empty!(
7685 FileSeekRequest,
7686 fdomain_client::fidl::FDomainResourceDialect
7687 );
7688 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
7689 let control_handle = FileControlHandle { inner: this.inner.clone() };
7690 Ok(FileRequest::Seek {
7691 origin: req.origin,
7692 offset: req.offset,
7693
7694 responder: FileSeekResponder {
7695 control_handle: std::mem::ManuallyDrop::new(control_handle),
7696 tx_id: header.tx_id,
7697 },
7698 })
7699 }
7700 0x1607a293a60d723e => {
7701 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7702 let mut req = fidl::new_empty!(
7703 FileReadAtRequest,
7704 fdomain_client::fidl::FDomainResourceDialect
7705 );
7706 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
7707 let control_handle = FileControlHandle { inner: this.inner.clone() };
7708 Ok(FileRequest::ReadAt {
7709 count: req.count,
7710 offset: req.offset,
7711
7712 responder: FileReadAtResponder {
7713 control_handle: std::mem::ManuallyDrop::new(control_handle),
7714 tx_id: header.tx_id,
7715 },
7716 })
7717 }
7718 0x793eefc0045e792b => {
7719 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7720 let mut req = fidl::new_empty!(
7721 FileWriteAtRequest,
7722 fdomain_client::fidl::FDomainResourceDialect
7723 );
7724 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
7725 let control_handle = FileControlHandle { inner: this.inner.clone() };
7726 Ok(FileRequest::WriteAt {
7727 data: req.data,
7728 offset: req.offset,
7729
7730 responder: FileWriteAtResponder {
7731 control_handle: std::mem::ManuallyDrop::new(control_handle),
7732 tx_id: header.tx_id,
7733 },
7734 })
7735 }
7736 0x2b80825f0535743a => {
7737 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7738 let mut req = fidl::new_empty!(
7739 FileResizeRequest,
7740 fdomain_client::fidl::FDomainResourceDialect
7741 );
7742 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
7743 let control_handle = FileControlHandle { inner: this.inner.clone() };
7744 Ok(FileRequest::Resize {
7745 length: req.length,
7746
7747 responder: FileResizeResponder {
7748 control_handle: std::mem::ManuallyDrop::new(control_handle),
7749 tx_id: header.tx_id,
7750 },
7751 })
7752 }
7753 0xa6a9e654cbf62b => {
7754 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7755 let mut req = fidl::new_empty!(
7756 FileGetBackingMemoryRequest,
7757 fdomain_client::fidl::FDomainResourceDialect
7758 );
7759 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
7760 let control_handle = FileControlHandle { inner: this.inner.clone() };
7761 Ok(FileRequest::GetBackingMemory {
7762 flags: req.flags,
7763
7764 responder: FileGetBackingMemoryResponder {
7765 control_handle: std::mem::ManuallyDrop::new(control_handle),
7766 tx_id: header.tx_id,
7767 },
7768 })
7769 }
7770 0x77fa0c330b57fd2e => {
7771 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7772 let mut req = fidl::new_empty!(
7773 FileAllocateRequest,
7774 fdomain_client::fidl::FDomainResourceDialect
7775 );
7776 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
7777 let control_handle = FileControlHandle { inner: this.inner.clone() };
7778 Ok(FileRequest::Allocate {
7779 offset: req.offset,
7780 length: req.length,
7781 mode: req.mode,
7782
7783 responder: FileAllocateResponder {
7784 control_handle: std::mem::ManuallyDrop::new(control_handle),
7785 tx_id: header.tx_id,
7786 },
7787 })
7788 }
7789 0x2c421ec3faaeb8bb => {
7790 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7791 let mut req = fidl::new_empty!(
7792 FileEnableVerityRequest,
7793 fdomain_client::fidl::FDomainResourceDialect
7794 );
7795 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
7796 let control_handle = FileControlHandle { inner: this.inner.clone() };
7797 Ok(FileRequest::EnableVerity {
7798 options: req.options,
7799
7800 responder: FileEnableVerityResponder {
7801 control_handle: std::mem::ManuallyDrop::new(control_handle),
7802 tx_id: header.tx_id,
7803 },
7804 })
7805 }
7806 _ if header.tx_id == 0
7807 && header
7808 .dynamic_flags()
7809 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7810 {
7811 Ok(FileRequest::_UnknownMethod {
7812 ordinal: header.ordinal,
7813 control_handle: FileControlHandle { inner: this.inner.clone() },
7814 method_type: fidl::MethodType::OneWay,
7815 })
7816 }
7817 _ if header
7818 .dynamic_flags()
7819 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7820 {
7821 this.inner.send_framework_err(
7822 fidl::encoding::FrameworkErr::UnknownMethod,
7823 header.tx_id,
7824 header.ordinal,
7825 header.dynamic_flags(),
7826 (bytes, handles),
7827 )?;
7828 Ok(FileRequest::_UnknownMethod {
7829 ordinal: header.ordinal,
7830 control_handle: FileControlHandle { inner: this.inner.clone() },
7831 method_type: fidl::MethodType::TwoWay,
7832 })
7833 }
7834 _ => Err(fidl::Error::UnknownOrdinal {
7835 ordinal: header.ordinal,
7836 protocol_name:
7837 <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7838 }),
7839 }))
7840 },
7841 )
7842 }
7843}
7844
7845#[derive(Debug)]
7850pub enum FileRequest {
7851 AdvisoryLock {
7875 request: AdvisoryLockRequest,
7876 responder: FileAdvisoryLockResponder,
7877 },
7878 LinkInto {
7901 dst_parent_token: fdomain_client::Event,
7902 dst: String,
7903 responder: FileLinkIntoResponder,
7904 },
7905 Clone {
7906 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
7907 control_handle: FileControlHandle,
7908 },
7909 Close {
7920 responder: FileCloseResponder,
7921 },
7922 Query {
7923 responder: FileQueryResponder,
7924 },
7925 DeprecatedClone {
7927 flags: OpenFlags,
7928 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
7929 control_handle: FileControlHandle,
7930 },
7931 DeprecatedGetAttr {
7933 responder: FileDeprecatedGetAttrResponder,
7934 },
7935 DeprecatedSetAttr {
7937 flags: NodeAttributeFlags,
7938 attributes: NodeAttributes,
7939 responder: FileDeprecatedSetAttrResponder,
7940 },
7941 DeprecatedGetFlags {
7943 responder: FileDeprecatedGetFlagsResponder,
7944 },
7945 DeprecatedSetFlags {
7947 flags: OpenFlags,
7948 responder: FileDeprecatedSetFlagsResponder,
7949 },
7950 GetFlags {
7959 responder: FileGetFlagsResponder,
7960 },
7961 SetFlags {
7971 flags: Flags,
7972 responder: FileSetFlagsResponder,
7973 },
7974 QueryFilesystem {
7976 responder: FileQueryFilesystemResponder,
7977 },
7978 GetAttributes {
7992 query: NodeAttributesQuery,
7993 responder: FileGetAttributesResponder,
7994 },
7995 UpdateAttributes {
8004 payload: MutableNodeAttributes,
8005 responder: FileUpdateAttributesResponder,
8006 },
8007 Sync {
8017 responder: FileSyncResponder,
8018 },
8019 ListExtendedAttributes {
8028 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
8029 control_handle: FileControlHandle,
8030 },
8031 GetExtendedAttribute {
8038 name: Vec<u8>,
8039 responder: FileGetExtendedAttributeResponder,
8040 },
8041 SetExtendedAttribute {
8049 name: Vec<u8>,
8050 value: ExtendedAttributeValue,
8051 mode: SetExtendedAttributeMode,
8052 responder: FileSetExtendedAttributeResponder,
8053 },
8054 RemoveExtendedAttribute {
8060 name: Vec<u8>,
8061 responder: FileRemoveExtendedAttributeResponder,
8062 },
8063 Read {
8082 count: u64,
8083 responder: FileReadResponder,
8084 },
8085 Write {
8109 data: Vec<u8>,
8110 responder: FileWriteResponder,
8111 },
8112 Describe {
8113 responder: FileDescribeResponder,
8114 },
8115 Seek {
8125 origin: SeekOrigin,
8126 offset: i64,
8127 responder: FileSeekResponder,
8128 },
8129 ReadAt {
8147 count: u64,
8148 offset: u64,
8149 responder: FileReadAtResponder,
8150 },
8151 WriteAt {
8173 data: Vec<u8>,
8174 offset: u64,
8175 responder: FileWriteAtResponder,
8176 },
8177 Resize {
8186 length: u64,
8187 responder: FileResizeResponder,
8188 },
8189 GetBackingMemory {
8210 flags: VmoFlags,
8211 responder: FileGetBackingMemoryResponder,
8212 },
8213 Allocate {
8215 offset: u64,
8216 length: u64,
8217 mode: AllocateMode,
8218 responder: FileAllocateResponder,
8219 },
8220 EnableVerity {
8232 options: VerificationOptions,
8233 responder: FileEnableVerityResponder,
8234 },
8235 #[non_exhaustive]
8237 _UnknownMethod {
8238 ordinal: u64,
8240 control_handle: FileControlHandle,
8241 method_type: fidl::MethodType,
8242 },
8243}
8244
8245impl FileRequest {
8246 #[allow(irrefutable_let_patterns)]
8247 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
8248 if let FileRequest::AdvisoryLock { request, responder } = self {
8249 Some((request, responder))
8250 } else {
8251 None
8252 }
8253 }
8254
8255 #[allow(irrefutable_let_patterns)]
8256 pub fn into_link_into(self) -> Option<(fdomain_client::Event, String, FileLinkIntoResponder)> {
8257 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
8258 Some((dst_parent_token, dst, responder))
8259 } else {
8260 None
8261 }
8262 }
8263
8264 #[allow(irrefutable_let_patterns)]
8265 pub fn into_clone(
8266 self,
8267 ) -> Option<(
8268 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
8269 FileControlHandle,
8270 )> {
8271 if let FileRequest::Clone { request, control_handle } = self {
8272 Some((request, control_handle))
8273 } else {
8274 None
8275 }
8276 }
8277
8278 #[allow(irrefutable_let_patterns)]
8279 pub fn into_close(self) -> Option<(FileCloseResponder)> {
8280 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
8281 }
8282
8283 #[allow(irrefutable_let_patterns)]
8284 pub fn into_query(self) -> Option<(FileQueryResponder)> {
8285 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
8286 }
8287
8288 #[allow(irrefutable_let_patterns)]
8289 pub fn into_deprecated_clone(
8290 self,
8291 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, FileControlHandle)> {
8292 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
8293 Some((flags, object, control_handle))
8294 } else {
8295 None
8296 }
8297 }
8298
8299 #[allow(irrefutable_let_patterns)]
8300 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
8301 if let FileRequest::DeprecatedGetAttr { responder } = self {
8302 Some((responder))
8303 } else {
8304 None
8305 }
8306 }
8307
8308 #[allow(irrefutable_let_patterns)]
8309 pub fn into_deprecated_set_attr(
8310 self,
8311 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
8312 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
8313 Some((flags, attributes, responder))
8314 } else {
8315 None
8316 }
8317 }
8318
8319 #[allow(irrefutable_let_patterns)]
8320 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
8321 if let FileRequest::DeprecatedGetFlags { responder } = self {
8322 Some((responder))
8323 } else {
8324 None
8325 }
8326 }
8327
8328 #[allow(irrefutable_let_patterns)]
8329 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
8330 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
8331 Some((flags, responder))
8332 } else {
8333 None
8334 }
8335 }
8336
8337 #[allow(irrefutable_let_patterns)]
8338 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
8339 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
8340 }
8341
8342 #[allow(irrefutable_let_patterns)]
8343 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
8344 if let FileRequest::SetFlags { flags, responder } = self {
8345 Some((flags, responder))
8346 } else {
8347 None
8348 }
8349 }
8350
8351 #[allow(irrefutable_let_patterns)]
8352 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
8353 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
8354 }
8355
8356 #[allow(irrefutable_let_patterns)]
8357 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
8358 if let FileRequest::GetAttributes { query, responder } = self {
8359 Some((query, responder))
8360 } else {
8361 None
8362 }
8363 }
8364
8365 #[allow(irrefutable_let_patterns)]
8366 pub fn into_update_attributes(
8367 self,
8368 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
8369 if let FileRequest::UpdateAttributes { payload, responder } = self {
8370 Some((payload, responder))
8371 } else {
8372 None
8373 }
8374 }
8375
8376 #[allow(irrefutable_let_patterns)]
8377 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
8378 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
8379 }
8380
8381 #[allow(irrefutable_let_patterns)]
8382 pub fn into_list_extended_attributes(
8383 self,
8384 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
8385 {
8386 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
8387 Some((iterator, control_handle))
8388 } else {
8389 None
8390 }
8391 }
8392
8393 #[allow(irrefutable_let_patterns)]
8394 pub fn into_get_extended_attribute(
8395 self,
8396 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
8397 if let FileRequest::GetExtendedAttribute { name, responder } = self {
8398 Some((name, responder))
8399 } else {
8400 None
8401 }
8402 }
8403
8404 #[allow(irrefutable_let_patterns)]
8405 pub fn into_set_extended_attribute(
8406 self,
8407 ) -> Option<(
8408 Vec<u8>,
8409 ExtendedAttributeValue,
8410 SetExtendedAttributeMode,
8411 FileSetExtendedAttributeResponder,
8412 )> {
8413 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
8414 Some((name, value, mode, responder))
8415 } else {
8416 None
8417 }
8418 }
8419
8420 #[allow(irrefutable_let_patterns)]
8421 pub fn into_remove_extended_attribute(
8422 self,
8423 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
8424 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
8425 Some((name, responder))
8426 } else {
8427 None
8428 }
8429 }
8430
8431 #[allow(irrefutable_let_patterns)]
8432 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
8433 if let FileRequest::Read { count, responder } = self {
8434 Some((count, responder))
8435 } else {
8436 None
8437 }
8438 }
8439
8440 #[allow(irrefutable_let_patterns)]
8441 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
8442 if let FileRequest::Write { data, responder } = self {
8443 Some((data, responder))
8444 } else {
8445 None
8446 }
8447 }
8448
8449 #[allow(irrefutable_let_patterns)]
8450 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
8451 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
8452 }
8453
8454 #[allow(irrefutable_let_patterns)]
8455 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
8456 if let FileRequest::Seek { origin, offset, responder } = self {
8457 Some((origin, offset, responder))
8458 } else {
8459 None
8460 }
8461 }
8462
8463 #[allow(irrefutable_let_patterns)]
8464 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
8465 if let FileRequest::ReadAt { count, offset, responder } = self {
8466 Some((count, offset, responder))
8467 } else {
8468 None
8469 }
8470 }
8471
8472 #[allow(irrefutable_let_patterns)]
8473 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
8474 if let FileRequest::WriteAt { data, offset, responder } = self {
8475 Some((data, offset, responder))
8476 } else {
8477 None
8478 }
8479 }
8480
8481 #[allow(irrefutable_let_patterns)]
8482 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
8483 if let FileRequest::Resize { length, responder } = self {
8484 Some((length, responder))
8485 } else {
8486 None
8487 }
8488 }
8489
8490 #[allow(irrefutable_let_patterns)]
8491 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
8492 if let FileRequest::GetBackingMemory { flags, responder } = self {
8493 Some((flags, responder))
8494 } else {
8495 None
8496 }
8497 }
8498
8499 #[allow(irrefutable_let_patterns)]
8500 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
8501 if let FileRequest::Allocate { offset, length, mode, responder } = self {
8502 Some((offset, length, mode, responder))
8503 } else {
8504 None
8505 }
8506 }
8507
8508 #[allow(irrefutable_let_patterns)]
8509 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
8510 if let FileRequest::EnableVerity { options, responder } = self {
8511 Some((options, responder))
8512 } else {
8513 None
8514 }
8515 }
8516
8517 pub fn method_name(&self) -> &'static str {
8519 match *self {
8520 FileRequest::AdvisoryLock { .. } => "advisory_lock",
8521 FileRequest::LinkInto { .. } => "link_into",
8522 FileRequest::Clone { .. } => "clone",
8523 FileRequest::Close { .. } => "close",
8524 FileRequest::Query { .. } => "query",
8525 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
8526 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
8527 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
8528 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
8529 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
8530 FileRequest::GetFlags { .. } => "get_flags",
8531 FileRequest::SetFlags { .. } => "set_flags",
8532 FileRequest::QueryFilesystem { .. } => "query_filesystem",
8533 FileRequest::GetAttributes { .. } => "get_attributes",
8534 FileRequest::UpdateAttributes { .. } => "update_attributes",
8535 FileRequest::Sync { .. } => "sync",
8536 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
8537 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
8538 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
8539 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
8540 FileRequest::Read { .. } => "read",
8541 FileRequest::Write { .. } => "write",
8542 FileRequest::Describe { .. } => "describe",
8543 FileRequest::Seek { .. } => "seek",
8544 FileRequest::ReadAt { .. } => "read_at",
8545 FileRequest::WriteAt { .. } => "write_at",
8546 FileRequest::Resize { .. } => "resize",
8547 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
8548 FileRequest::Allocate { .. } => "allocate",
8549 FileRequest::EnableVerity { .. } => "enable_verity",
8550 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8551 "unknown one-way method"
8552 }
8553 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8554 "unknown two-way method"
8555 }
8556 }
8557 }
8558}
8559
8560#[derive(Debug, Clone)]
8561pub struct FileControlHandle {
8562 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8563}
8564
8565impl fdomain_client::fidl::ControlHandle for FileControlHandle {
8566 fn shutdown(&self) {
8567 self.inner.shutdown()
8568 }
8569
8570 fn is_closed(&self) -> bool {
8571 self.inner.channel().is_closed()
8572 }
8573 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8574 self.inner.channel().on_closed()
8575 }
8576}
8577
8578impl FileControlHandle {
8579 pub fn send_on_open_(
8580 &self,
8581 mut s: i32,
8582 mut info: Option<NodeInfoDeprecated>,
8583 ) -> Result<(), fidl::Error> {
8584 self.inner.send::<NodeOnOpenRequest>(
8585 (s, info.as_mut()),
8586 0,
8587 0x7fc7bbb1dbfd1972,
8588 fidl::encoding::DynamicFlags::FLEXIBLE,
8589 )
8590 }
8591
8592 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
8593 self.inner.send::<Representation>(
8594 &mut payload,
8595 0,
8596 0x5cb40567d80a510c,
8597 fidl::encoding::DynamicFlags::empty(),
8598 )
8599 }
8600}
8601
8602#[must_use = "FIDL methods require a response to be sent"]
8603#[derive(Debug)]
8604pub struct FileAdvisoryLockResponder {
8605 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8606 tx_id: u32,
8607}
8608
8609impl std::ops::Drop for FileAdvisoryLockResponder {
8613 fn drop(&mut self) {
8614 self.control_handle.shutdown();
8615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8617 }
8618}
8619
8620impl fdomain_client::fidl::Responder for FileAdvisoryLockResponder {
8621 type ControlHandle = FileControlHandle;
8622
8623 fn control_handle(&self) -> &FileControlHandle {
8624 &self.control_handle
8625 }
8626
8627 fn drop_without_shutdown(mut self) {
8628 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8630 std::mem::forget(self);
8632 }
8633}
8634
8635impl FileAdvisoryLockResponder {
8636 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8640 let _result = self.send_raw(result);
8641 if _result.is_err() {
8642 self.control_handle.shutdown();
8643 }
8644 self.drop_without_shutdown();
8645 _result
8646 }
8647
8648 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8650 let _result = self.send_raw(result);
8651 self.drop_without_shutdown();
8652 _result
8653 }
8654
8655 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8656 self.control_handle
8657 .inner
8658 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8659 result,
8660 self.tx_id,
8661 0x6ee9c0ad53ec87aa,
8662 fidl::encoding::DynamicFlags::empty(),
8663 )
8664 }
8665}
8666
8667#[must_use = "FIDL methods require a response to be sent"]
8668#[derive(Debug)]
8669pub struct FileLinkIntoResponder {
8670 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8671 tx_id: u32,
8672}
8673
8674impl std::ops::Drop for FileLinkIntoResponder {
8678 fn drop(&mut self) {
8679 self.control_handle.shutdown();
8680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8682 }
8683}
8684
8685impl fdomain_client::fidl::Responder for FileLinkIntoResponder {
8686 type ControlHandle = FileControlHandle;
8687
8688 fn control_handle(&self) -> &FileControlHandle {
8689 &self.control_handle
8690 }
8691
8692 fn drop_without_shutdown(mut self) {
8693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8695 std::mem::forget(self);
8697 }
8698}
8699
8700impl FileLinkIntoResponder {
8701 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8705 let _result = self.send_raw(result);
8706 if _result.is_err() {
8707 self.control_handle.shutdown();
8708 }
8709 self.drop_without_shutdown();
8710 _result
8711 }
8712
8713 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8715 let _result = self.send_raw(result);
8716 self.drop_without_shutdown();
8717 _result
8718 }
8719
8720 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8721 self.control_handle
8722 .inner
8723 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8724 result,
8725 self.tx_id,
8726 0x54f3949246a03e74,
8727 fidl::encoding::DynamicFlags::empty(),
8728 )
8729 }
8730}
8731
8732#[must_use = "FIDL methods require a response to be sent"]
8733#[derive(Debug)]
8734pub struct FileCloseResponder {
8735 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8736 tx_id: u32,
8737}
8738
8739impl std::ops::Drop for FileCloseResponder {
8743 fn drop(&mut self) {
8744 self.control_handle.shutdown();
8745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8747 }
8748}
8749
8750impl fdomain_client::fidl::Responder for FileCloseResponder {
8751 type ControlHandle = FileControlHandle;
8752
8753 fn control_handle(&self) -> &FileControlHandle {
8754 &self.control_handle
8755 }
8756
8757 fn drop_without_shutdown(mut self) {
8758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8760 std::mem::forget(self);
8762 }
8763}
8764
8765impl FileCloseResponder {
8766 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8770 let _result = self.send_raw(result);
8771 if _result.is_err() {
8772 self.control_handle.shutdown();
8773 }
8774 self.drop_without_shutdown();
8775 _result
8776 }
8777
8778 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8780 let _result = self.send_raw(result);
8781 self.drop_without_shutdown();
8782 _result
8783 }
8784
8785 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8786 self.control_handle
8787 .inner
8788 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8789 result,
8790 self.tx_id,
8791 0x5ac5d459ad7f657e,
8792 fidl::encoding::DynamicFlags::empty(),
8793 )
8794 }
8795}
8796
8797#[must_use = "FIDL methods require a response to be sent"]
8798#[derive(Debug)]
8799pub struct FileQueryResponder {
8800 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8801 tx_id: u32,
8802}
8803
8804impl std::ops::Drop for FileQueryResponder {
8808 fn drop(&mut self) {
8809 self.control_handle.shutdown();
8810 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8812 }
8813}
8814
8815impl fdomain_client::fidl::Responder for FileQueryResponder {
8816 type ControlHandle = FileControlHandle;
8817
8818 fn control_handle(&self) -> &FileControlHandle {
8819 &self.control_handle
8820 }
8821
8822 fn drop_without_shutdown(mut self) {
8823 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8825 std::mem::forget(self);
8827 }
8828}
8829
8830impl FileQueryResponder {
8831 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8835 let _result = self.send_raw(protocol);
8836 if _result.is_err() {
8837 self.control_handle.shutdown();
8838 }
8839 self.drop_without_shutdown();
8840 _result
8841 }
8842
8843 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8845 let _result = self.send_raw(protocol);
8846 self.drop_without_shutdown();
8847 _result
8848 }
8849
8850 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8851 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
8852 (protocol,),
8853 self.tx_id,
8854 0x2658edee9decfc06,
8855 fidl::encoding::DynamicFlags::empty(),
8856 )
8857 }
8858}
8859
8860#[must_use = "FIDL methods require a response to be sent"]
8861#[derive(Debug)]
8862pub struct FileDeprecatedGetAttrResponder {
8863 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8864 tx_id: u32,
8865}
8866
8867impl std::ops::Drop for FileDeprecatedGetAttrResponder {
8871 fn drop(&mut self) {
8872 self.control_handle.shutdown();
8873 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8875 }
8876}
8877
8878impl fdomain_client::fidl::Responder for FileDeprecatedGetAttrResponder {
8879 type ControlHandle = FileControlHandle;
8880
8881 fn control_handle(&self) -> &FileControlHandle {
8882 &self.control_handle
8883 }
8884
8885 fn drop_without_shutdown(mut self) {
8886 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8888 std::mem::forget(self);
8890 }
8891}
8892
8893impl FileDeprecatedGetAttrResponder {
8894 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8898 let _result = self.send_raw(s, attributes);
8899 if _result.is_err() {
8900 self.control_handle.shutdown();
8901 }
8902 self.drop_without_shutdown();
8903 _result
8904 }
8905
8906 pub fn send_no_shutdown_on_err(
8908 self,
8909 mut s: i32,
8910 mut attributes: &NodeAttributes,
8911 ) -> Result<(), fidl::Error> {
8912 let _result = self.send_raw(s, attributes);
8913 self.drop_without_shutdown();
8914 _result
8915 }
8916
8917 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8918 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
8919 (s, attributes),
8920 self.tx_id,
8921 0x78985e216314dafd,
8922 fidl::encoding::DynamicFlags::empty(),
8923 )
8924 }
8925}
8926
8927#[must_use = "FIDL methods require a response to be sent"]
8928#[derive(Debug)]
8929pub struct FileDeprecatedSetAttrResponder {
8930 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8931 tx_id: u32,
8932}
8933
8934impl std::ops::Drop for FileDeprecatedSetAttrResponder {
8938 fn drop(&mut self) {
8939 self.control_handle.shutdown();
8940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8942 }
8943}
8944
8945impl fdomain_client::fidl::Responder for FileDeprecatedSetAttrResponder {
8946 type ControlHandle = FileControlHandle;
8947
8948 fn control_handle(&self) -> &FileControlHandle {
8949 &self.control_handle
8950 }
8951
8952 fn drop_without_shutdown(mut self) {
8953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8955 std::mem::forget(self);
8957 }
8958}
8959
8960impl FileDeprecatedSetAttrResponder {
8961 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
8965 let _result = self.send_raw(s);
8966 if _result.is_err() {
8967 self.control_handle.shutdown();
8968 }
8969 self.drop_without_shutdown();
8970 _result
8971 }
8972
8973 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
8975 let _result = self.send_raw(s);
8976 self.drop_without_shutdown();
8977 _result
8978 }
8979
8980 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
8981 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
8982 (s,),
8983 self.tx_id,
8984 0x4186c0f40d938f46,
8985 fidl::encoding::DynamicFlags::empty(),
8986 )
8987 }
8988}
8989
8990#[must_use = "FIDL methods require a response to be sent"]
8991#[derive(Debug)]
8992pub struct FileDeprecatedGetFlagsResponder {
8993 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8994 tx_id: u32,
8995}
8996
8997impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
9001 fn drop(&mut self) {
9002 self.control_handle.shutdown();
9003 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9005 }
9006}
9007
9008impl fdomain_client::fidl::Responder for FileDeprecatedGetFlagsResponder {
9009 type ControlHandle = FileControlHandle;
9010
9011 fn control_handle(&self) -> &FileControlHandle {
9012 &self.control_handle
9013 }
9014
9015 fn drop_without_shutdown(mut self) {
9016 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9018 std::mem::forget(self);
9020 }
9021}
9022
9023impl FileDeprecatedGetFlagsResponder {
9024 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9028 let _result = self.send_raw(s, flags);
9029 if _result.is_err() {
9030 self.control_handle.shutdown();
9031 }
9032 self.drop_without_shutdown();
9033 _result
9034 }
9035
9036 pub fn send_no_shutdown_on_err(
9038 self,
9039 mut s: i32,
9040 mut flags: OpenFlags,
9041 ) -> Result<(), fidl::Error> {
9042 let _result = self.send_raw(s, flags);
9043 self.drop_without_shutdown();
9044 _result
9045 }
9046
9047 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9048 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
9049 (s, flags),
9050 self.tx_id,
9051 0x5b88fffb8eda3aa1,
9052 fidl::encoding::DynamicFlags::empty(),
9053 )
9054 }
9055}
9056
9057#[must_use = "FIDL methods require a response to be sent"]
9058#[derive(Debug)]
9059pub struct FileDeprecatedSetFlagsResponder {
9060 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9061 tx_id: u32,
9062}
9063
9064impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
9068 fn drop(&mut self) {
9069 self.control_handle.shutdown();
9070 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9072 }
9073}
9074
9075impl fdomain_client::fidl::Responder for FileDeprecatedSetFlagsResponder {
9076 type ControlHandle = FileControlHandle;
9077
9078 fn control_handle(&self) -> &FileControlHandle {
9079 &self.control_handle
9080 }
9081
9082 fn drop_without_shutdown(mut self) {
9083 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9085 std::mem::forget(self);
9087 }
9088}
9089
9090impl FileDeprecatedSetFlagsResponder {
9091 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9095 let _result = self.send_raw(s);
9096 if _result.is_err() {
9097 self.control_handle.shutdown();
9098 }
9099 self.drop_without_shutdown();
9100 _result
9101 }
9102
9103 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9105 let _result = self.send_raw(s);
9106 self.drop_without_shutdown();
9107 _result
9108 }
9109
9110 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9111 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
9112 (s,),
9113 self.tx_id,
9114 0x5295b76c71fde733,
9115 fidl::encoding::DynamicFlags::empty(),
9116 )
9117 }
9118}
9119
9120#[must_use = "FIDL methods require a response to be sent"]
9121#[derive(Debug)]
9122pub struct FileGetFlagsResponder {
9123 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9124 tx_id: u32,
9125}
9126
9127impl std::ops::Drop for FileGetFlagsResponder {
9131 fn drop(&mut self) {
9132 self.control_handle.shutdown();
9133 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9135 }
9136}
9137
9138impl fdomain_client::fidl::Responder for FileGetFlagsResponder {
9139 type ControlHandle = FileControlHandle;
9140
9141 fn control_handle(&self) -> &FileControlHandle {
9142 &self.control_handle
9143 }
9144
9145 fn drop_without_shutdown(mut self) {
9146 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9148 std::mem::forget(self);
9150 }
9151}
9152
9153impl FileGetFlagsResponder {
9154 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9158 let _result = self.send_raw(result);
9159 if _result.is_err() {
9160 self.control_handle.shutdown();
9161 }
9162 self.drop_without_shutdown();
9163 _result
9164 }
9165
9166 pub fn send_no_shutdown_on_err(
9168 self,
9169 mut result: Result<Flags, i32>,
9170 ) -> Result<(), fidl::Error> {
9171 let _result = self.send_raw(result);
9172 self.drop_without_shutdown();
9173 _result
9174 }
9175
9176 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9177 self.control_handle
9178 .inner
9179 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
9180 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
9181 self.tx_id,
9182 0x176eb318f64ec23,
9183 fidl::encoding::DynamicFlags::FLEXIBLE,
9184 )
9185 }
9186}
9187
9188#[must_use = "FIDL methods require a response to be sent"]
9189#[derive(Debug)]
9190pub struct FileSetFlagsResponder {
9191 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9192 tx_id: u32,
9193}
9194
9195impl std::ops::Drop for FileSetFlagsResponder {
9199 fn drop(&mut self) {
9200 self.control_handle.shutdown();
9201 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9203 }
9204}
9205
9206impl fdomain_client::fidl::Responder for FileSetFlagsResponder {
9207 type ControlHandle = FileControlHandle;
9208
9209 fn control_handle(&self) -> &FileControlHandle {
9210 &self.control_handle
9211 }
9212
9213 fn drop_without_shutdown(mut self) {
9214 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9216 std::mem::forget(self);
9218 }
9219}
9220
9221impl FileSetFlagsResponder {
9222 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9226 let _result = self.send_raw(result);
9227 if _result.is_err() {
9228 self.control_handle.shutdown();
9229 }
9230 self.drop_without_shutdown();
9231 _result
9232 }
9233
9234 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9236 let _result = self.send_raw(result);
9237 self.drop_without_shutdown();
9238 _result
9239 }
9240
9241 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9242 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9243 fidl::encoding::EmptyStruct,
9244 i32,
9245 >>(
9246 fidl::encoding::FlexibleResult::new(result),
9247 self.tx_id,
9248 0x55a8028685791ea8,
9249 fidl::encoding::DynamicFlags::FLEXIBLE,
9250 )
9251 }
9252}
9253
9254#[must_use = "FIDL methods require a response to be sent"]
9255#[derive(Debug)]
9256pub struct FileQueryFilesystemResponder {
9257 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9258 tx_id: u32,
9259}
9260
9261impl std::ops::Drop for FileQueryFilesystemResponder {
9265 fn drop(&mut self) {
9266 self.control_handle.shutdown();
9267 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9269 }
9270}
9271
9272impl fdomain_client::fidl::Responder for FileQueryFilesystemResponder {
9273 type ControlHandle = FileControlHandle;
9274
9275 fn control_handle(&self) -> &FileControlHandle {
9276 &self.control_handle
9277 }
9278
9279 fn drop_without_shutdown(mut self) {
9280 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9282 std::mem::forget(self);
9284 }
9285}
9286
9287impl FileQueryFilesystemResponder {
9288 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9292 let _result = self.send_raw(s, info);
9293 if _result.is_err() {
9294 self.control_handle.shutdown();
9295 }
9296 self.drop_without_shutdown();
9297 _result
9298 }
9299
9300 pub fn send_no_shutdown_on_err(
9302 self,
9303 mut s: i32,
9304 mut info: Option<&FilesystemInfo>,
9305 ) -> Result<(), fidl::Error> {
9306 let _result = self.send_raw(s, info);
9307 self.drop_without_shutdown();
9308 _result
9309 }
9310
9311 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9312 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
9313 (s, info),
9314 self.tx_id,
9315 0x6f344a1c6b0a0610,
9316 fidl::encoding::DynamicFlags::empty(),
9317 )
9318 }
9319}
9320
9321#[must_use = "FIDL methods require a response to be sent"]
9322#[derive(Debug)]
9323pub struct FileGetAttributesResponder {
9324 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9325 tx_id: u32,
9326}
9327
9328impl std::ops::Drop for FileGetAttributesResponder {
9332 fn drop(&mut self) {
9333 self.control_handle.shutdown();
9334 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9336 }
9337}
9338
9339impl fdomain_client::fidl::Responder for FileGetAttributesResponder {
9340 type ControlHandle = FileControlHandle;
9341
9342 fn control_handle(&self) -> &FileControlHandle {
9343 &self.control_handle
9344 }
9345
9346 fn drop_without_shutdown(mut self) {
9347 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9349 std::mem::forget(self);
9351 }
9352}
9353
9354impl FileGetAttributesResponder {
9355 pub fn send(
9359 self,
9360 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9361 ) -> Result<(), fidl::Error> {
9362 let _result = self.send_raw(result);
9363 if _result.is_err() {
9364 self.control_handle.shutdown();
9365 }
9366 self.drop_without_shutdown();
9367 _result
9368 }
9369
9370 pub fn send_no_shutdown_on_err(
9372 self,
9373 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9374 ) -> Result<(), fidl::Error> {
9375 let _result = self.send_raw(result);
9376 self.drop_without_shutdown();
9377 _result
9378 }
9379
9380 fn send_raw(
9381 &self,
9382 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9383 ) -> Result<(), fidl::Error> {
9384 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
9385 result,
9386 self.tx_id,
9387 0x3d4396a638ea053b,
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 FileUpdateAttributesResponder {
9396 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9397 tx_id: u32,
9398}
9399
9400impl std::ops::Drop for FileUpdateAttributesResponder {
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 FileUpdateAttributesResponder {
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 FileUpdateAttributesResponder {
9427 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9431 let _result = self.send_raw(result);
9432 if _result.is_err() {
9433 self.control_handle.shutdown();
9434 }
9435 self.drop_without_shutdown();
9436 _result
9437 }
9438
9439 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9441 let _result = self.send_raw(result);
9442 self.drop_without_shutdown();
9443 _result
9444 }
9445
9446 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9447 self.control_handle
9448 .inner
9449 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9450 result,
9451 self.tx_id,
9452 0x3308c1da5a89bf08,
9453 fidl::encoding::DynamicFlags::empty(),
9454 )
9455 }
9456}
9457
9458#[must_use = "FIDL methods require a response to be sent"]
9459#[derive(Debug)]
9460pub struct FileSyncResponder {
9461 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9462 tx_id: u32,
9463}
9464
9465impl std::ops::Drop for FileSyncResponder {
9469 fn drop(&mut self) {
9470 self.control_handle.shutdown();
9471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9473 }
9474}
9475
9476impl fdomain_client::fidl::Responder for FileSyncResponder {
9477 type ControlHandle = FileControlHandle;
9478
9479 fn control_handle(&self) -> &FileControlHandle {
9480 &self.control_handle
9481 }
9482
9483 fn drop_without_shutdown(mut self) {
9484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9486 std::mem::forget(self);
9488 }
9489}
9490
9491impl FileSyncResponder {
9492 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9496 let _result = self.send_raw(result);
9497 if _result.is_err() {
9498 self.control_handle.shutdown();
9499 }
9500 self.drop_without_shutdown();
9501 _result
9502 }
9503
9504 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9506 let _result = self.send_raw(result);
9507 self.drop_without_shutdown();
9508 _result
9509 }
9510
9511 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9512 self.control_handle
9513 .inner
9514 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9515 result,
9516 self.tx_id,
9517 0x2c5c27ca0ab5dc49,
9518 fidl::encoding::DynamicFlags::empty(),
9519 )
9520 }
9521}
9522
9523#[must_use = "FIDL methods require a response to be sent"]
9524#[derive(Debug)]
9525pub struct FileGetExtendedAttributeResponder {
9526 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9527 tx_id: u32,
9528}
9529
9530impl std::ops::Drop for FileGetExtendedAttributeResponder {
9534 fn drop(&mut self) {
9535 self.control_handle.shutdown();
9536 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9538 }
9539}
9540
9541impl fdomain_client::fidl::Responder for FileGetExtendedAttributeResponder {
9542 type ControlHandle = FileControlHandle;
9543
9544 fn control_handle(&self) -> &FileControlHandle {
9545 &self.control_handle
9546 }
9547
9548 fn drop_without_shutdown(mut self) {
9549 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9551 std::mem::forget(self);
9553 }
9554}
9555
9556impl FileGetExtendedAttributeResponder {
9557 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9561 let _result = self.send_raw(result);
9562 if _result.is_err() {
9563 self.control_handle.shutdown();
9564 }
9565 self.drop_without_shutdown();
9566 _result
9567 }
9568
9569 pub fn send_no_shutdown_on_err(
9571 self,
9572 mut result: Result<ExtendedAttributeValue, i32>,
9573 ) -> Result<(), fidl::Error> {
9574 let _result = self.send_raw(result);
9575 self.drop_without_shutdown();
9576 _result
9577 }
9578
9579 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9580 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
9581 result.as_mut().map_err(|e| *e),
9582 self.tx_id,
9583 0x45ffa3ccfdeb76db,
9584 fidl::encoding::DynamicFlags::empty(),
9585 )
9586 }
9587}
9588
9589#[must_use = "FIDL methods require a response to be sent"]
9590#[derive(Debug)]
9591pub struct FileSetExtendedAttributeResponder {
9592 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9593 tx_id: u32,
9594}
9595
9596impl std::ops::Drop for FileSetExtendedAttributeResponder {
9600 fn drop(&mut self) {
9601 self.control_handle.shutdown();
9602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9604 }
9605}
9606
9607impl fdomain_client::fidl::Responder for FileSetExtendedAttributeResponder {
9608 type ControlHandle = FileControlHandle;
9609
9610 fn control_handle(&self) -> &FileControlHandle {
9611 &self.control_handle
9612 }
9613
9614 fn drop_without_shutdown(mut self) {
9615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9617 std::mem::forget(self);
9619 }
9620}
9621
9622impl FileSetExtendedAttributeResponder {
9623 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9627 let _result = self.send_raw(result);
9628 if _result.is_err() {
9629 self.control_handle.shutdown();
9630 }
9631 self.drop_without_shutdown();
9632 _result
9633 }
9634
9635 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9637 let _result = self.send_raw(result);
9638 self.drop_without_shutdown();
9639 _result
9640 }
9641
9642 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9643 self.control_handle
9644 .inner
9645 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9646 result,
9647 self.tx_id,
9648 0x4a951362f681f23c,
9649 fidl::encoding::DynamicFlags::empty(),
9650 )
9651 }
9652}
9653
9654#[must_use = "FIDL methods require a response to be sent"]
9655#[derive(Debug)]
9656pub struct FileRemoveExtendedAttributeResponder {
9657 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9658 tx_id: u32,
9659}
9660
9661impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
9665 fn drop(&mut self) {
9666 self.control_handle.shutdown();
9667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9669 }
9670}
9671
9672impl fdomain_client::fidl::Responder for FileRemoveExtendedAttributeResponder {
9673 type ControlHandle = FileControlHandle;
9674
9675 fn control_handle(&self) -> &FileControlHandle {
9676 &self.control_handle
9677 }
9678
9679 fn drop_without_shutdown(mut self) {
9680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9682 std::mem::forget(self);
9684 }
9685}
9686
9687impl FileRemoveExtendedAttributeResponder {
9688 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9692 let _result = self.send_raw(result);
9693 if _result.is_err() {
9694 self.control_handle.shutdown();
9695 }
9696 self.drop_without_shutdown();
9697 _result
9698 }
9699
9700 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9702 let _result = self.send_raw(result);
9703 self.drop_without_shutdown();
9704 _result
9705 }
9706
9707 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9708 self.control_handle
9709 .inner
9710 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9711 result,
9712 self.tx_id,
9713 0x7a0b9f3a9bf9032d,
9714 fidl::encoding::DynamicFlags::empty(),
9715 )
9716 }
9717}
9718
9719#[must_use = "FIDL methods require a response to be sent"]
9720#[derive(Debug)]
9721pub struct FileReadResponder {
9722 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9723 tx_id: u32,
9724}
9725
9726impl std::ops::Drop for FileReadResponder {
9730 fn drop(&mut self) {
9731 self.control_handle.shutdown();
9732 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9734 }
9735}
9736
9737impl fdomain_client::fidl::Responder for FileReadResponder {
9738 type ControlHandle = FileControlHandle;
9739
9740 fn control_handle(&self) -> &FileControlHandle {
9741 &self.control_handle
9742 }
9743
9744 fn drop_without_shutdown(mut self) {
9745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9747 std::mem::forget(self);
9749 }
9750}
9751
9752impl FileReadResponder {
9753 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9757 let _result = self.send_raw(result);
9758 if _result.is_err() {
9759 self.control_handle.shutdown();
9760 }
9761 self.drop_without_shutdown();
9762 _result
9763 }
9764
9765 pub fn send_no_shutdown_on_err(
9767 self,
9768 mut result: Result<&[u8], i32>,
9769 ) -> Result<(), fidl::Error> {
9770 let _result = self.send_raw(result);
9771 self.drop_without_shutdown();
9772 _result
9773 }
9774
9775 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9776 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
9777 result.map(|data| (data,)),
9778 self.tx_id,
9779 0x57e419a298c8ede,
9780 fidl::encoding::DynamicFlags::empty(),
9781 )
9782 }
9783}
9784
9785#[must_use = "FIDL methods require a response to be sent"]
9786#[derive(Debug)]
9787pub struct FileWriteResponder {
9788 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9789 tx_id: u32,
9790}
9791
9792impl std::ops::Drop for FileWriteResponder {
9796 fn drop(&mut self) {
9797 self.control_handle.shutdown();
9798 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9800 }
9801}
9802
9803impl fdomain_client::fidl::Responder for FileWriteResponder {
9804 type ControlHandle = FileControlHandle;
9805
9806 fn control_handle(&self) -> &FileControlHandle {
9807 &self.control_handle
9808 }
9809
9810 fn drop_without_shutdown(mut self) {
9811 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9813 std::mem::forget(self);
9815 }
9816}
9817
9818impl FileWriteResponder {
9819 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9823 let _result = self.send_raw(result);
9824 if _result.is_err() {
9825 self.control_handle.shutdown();
9826 }
9827 self.drop_without_shutdown();
9828 _result
9829 }
9830
9831 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9833 let _result = self.send_raw(result);
9834 self.drop_without_shutdown();
9835 _result
9836 }
9837
9838 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9839 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
9840 result.map(|actual_count| (actual_count,)),
9841 self.tx_id,
9842 0x6a31437832469f82,
9843 fidl::encoding::DynamicFlags::empty(),
9844 )
9845 }
9846}
9847
9848#[must_use = "FIDL methods require a response to be sent"]
9849#[derive(Debug)]
9850pub struct FileDescribeResponder {
9851 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9852 tx_id: u32,
9853}
9854
9855impl std::ops::Drop for FileDescribeResponder {
9859 fn drop(&mut self) {
9860 self.control_handle.shutdown();
9861 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9863 }
9864}
9865
9866impl fdomain_client::fidl::Responder for FileDescribeResponder {
9867 type ControlHandle = FileControlHandle;
9868
9869 fn control_handle(&self) -> &FileControlHandle {
9870 &self.control_handle
9871 }
9872
9873 fn drop_without_shutdown(mut self) {
9874 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9876 std::mem::forget(self);
9878 }
9879}
9880
9881impl FileDescribeResponder {
9882 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9886 let _result = self.send_raw(payload);
9887 if _result.is_err() {
9888 self.control_handle.shutdown();
9889 }
9890 self.drop_without_shutdown();
9891 _result
9892 }
9893
9894 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9896 let _result = self.send_raw(payload);
9897 self.drop_without_shutdown();
9898 _result
9899 }
9900
9901 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9902 self.control_handle.inner.send::<FileInfo>(
9903 &mut payload,
9904 self.tx_id,
9905 0x68b5ac00c62906bc,
9906 fidl::encoding::DynamicFlags::empty(),
9907 )
9908 }
9909}
9910
9911#[must_use = "FIDL methods require a response to be sent"]
9912#[derive(Debug)]
9913pub struct FileSeekResponder {
9914 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9915 tx_id: u32,
9916}
9917
9918impl std::ops::Drop for FileSeekResponder {
9922 fn drop(&mut self) {
9923 self.control_handle.shutdown();
9924 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9926 }
9927}
9928
9929impl fdomain_client::fidl::Responder for FileSeekResponder {
9930 type ControlHandle = FileControlHandle;
9931
9932 fn control_handle(&self) -> &FileControlHandle {
9933 &self.control_handle
9934 }
9935
9936 fn drop_without_shutdown(mut self) {
9937 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9939 std::mem::forget(self);
9941 }
9942}
9943
9944impl FileSeekResponder {
9945 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9949 let _result = self.send_raw(result);
9950 if _result.is_err() {
9951 self.control_handle.shutdown();
9952 }
9953 self.drop_without_shutdown();
9954 _result
9955 }
9956
9957 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9959 let _result = self.send_raw(result);
9960 self.drop_without_shutdown();
9961 _result
9962 }
9963
9964 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9965 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
9966 result.map(|offset_from_start| (offset_from_start,)),
9967 self.tx_id,
9968 0x78079168162c5207,
9969 fidl::encoding::DynamicFlags::empty(),
9970 )
9971 }
9972}
9973
9974#[must_use = "FIDL methods require a response to be sent"]
9975#[derive(Debug)]
9976pub struct FileReadAtResponder {
9977 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9978 tx_id: u32,
9979}
9980
9981impl std::ops::Drop for FileReadAtResponder {
9985 fn drop(&mut self) {
9986 self.control_handle.shutdown();
9987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9989 }
9990}
9991
9992impl fdomain_client::fidl::Responder for FileReadAtResponder {
9993 type ControlHandle = FileControlHandle;
9994
9995 fn control_handle(&self) -> &FileControlHandle {
9996 &self.control_handle
9997 }
9998
9999 fn drop_without_shutdown(mut self) {
10000 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10002 std::mem::forget(self);
10004 }
10005}
10006
10007impl FileReadAtResponder {
10008 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10012 let _result = self.send_raw(result);
10013 if _result.is_err() {
10014 self.control_handle.shutdown();
10015 }
10016 self.drop_without_shutdown();
10017 _result
10018 }
10019
10020 pub fn send_no_shutdown_on_err(
10022 self,
10023 mut result: Result<&[u8], i32>,
10024 ) -> Result<(), fidl::Error> {
10025 let _result = self.send_raw(result);
10026 self.drop_without_shutdown();
10027 _result
10028 }
10029
10030 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10031 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
10032 result.map(|data| (data,)),
10033 self.tx_id,
10034 0x1607a293a60d723e,
10035 fidl::encoding::DynamicFlags::empty(),
10036 )
10037 }
10038}
10039
10040#[must_use = "FIDL methods require a response to be sent"]
10041#[derive(Debug)]
10042pub struct FileWriteAtResponder {
10043 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10044 tx_id: u32,
10045}
10046
10047impl std::ops::Drop for FileWriteAtResponder {
10051 fn drop(&mut self) {
10052 self.control_handle.shutdown();
10053 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10055 }
10056}
10057
10058impl fdomain_client::fidl::Responder for FileWriteAtResponder {
10059 type ControlHandle = FileControlHandle;
10060
10061 fn control_handle(&self) -> &FileControlHandle {
10062 &self.control_handle
10063 }
10064
10065 fn drop_without_shutdown(mut self) {
10066 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10068 std::mem::forget(self);
10070 }
10071}
10072
10073impl FileWriteAtResponder {
10074 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10078 let _result = self.send_raw(result);
10079 if _result.is_err() {
10080 self.control_handle.shutdown();
10081 }
10082 self.drop_without_shutdown();
10083 _result
10084 }
10085
10086 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10088 let _result = self.send_raw(result);
10089 self.drop_without_shutdown();
10090 _result
10091 }
10092
10093 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10094 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
10095 result.map(|actual_count| (actual_count,)),
10096 self.tx_id,
10097 0x793eefc0045e792b,
10098 fidl::encoding::DynamicFlags::empty(),
10099 )
10100 }
10101}
10102
10103#[must_use = "FIDL methods require a response to be sent"]
10104#[derive(Debug)]
10105pub struct FileResizeResponder {
10106 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10107 tx_id: u32,
10108}
10109
10110impl std::ops::Drop for FileResizeResponder {
10114 fn drop(&mut self) {
10115 self.control_handle.shutdown();
10116 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10118 }
10119}
10120
10121impl fdomain_client::fidl::Responder for FileResizeResponder {
10122 type ControlHandle = FileControlHandle;
10123
10124 fn control_handle(&self) -> &FileControlHandle {
10125 &self.control_handle
10126 }
10127
10128 fn drop_without_shutdown(mut self) {
10129 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10131 std::mem::forget(self);
10133 }
10134}
10135
10136impl FileResizeResponder {
10137 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10141 let _result = self.send_raw(result);
10142 if _result.is_err() {
10143 self.control_handle.shutdown();
10144 }
10145 self.drop_without_shutdown();
10146 _result
10147 }
10148
10149 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10151 let _result = self.send_raw(result);
10152 self.drop_without_shutdown();
10153 _result
10154 }
10155
10156 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10157 self.control_handle
10158 .inner
10159 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10160 result,
10161 self.tx_id,
10162 0x2b80825f0535743a,
10163 fidl::encoding::DynamicFlags::empty(),
10164 )
10165 }
10166}
10167
10168#[must_use = "FIDL methods require a response to be sent"]
10169#[derive(Debug)]
10170pub struct FileGetBackingMemoryResponder {
10171 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10172 tx_id: u32,
10173}
10174
10175impl std::ops::Drop for FileGetBackingMemoryResponder {
10179 fn drop(&mut self) {
10180 self.control_handle.shutdown();
10181 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10183 }
10184}
10185
10186impl fdomain_client::fidl::Responder for FileGetBackingMemoryResponder {
10187 type ControlHandle = FileControlHandle;
10188
10189 fn control_handle(&self) -> &FileControlHandle {
10190 &self.control_handle
10191 }
10192
10193 fn drop_without_shutdown(mut self) {
10194 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10196 std::mem::forget(self);
10198 }
10199}
10200
10201impl FileGetBackingMemoryResponder {
10202 pub fn send(self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10206 let _result = self.send_raw(result);
10207 if _result.is_err() {
10208 self.control_handle.shutdown();
10209 }
10210 self.drop_without_shutdown();
10211 _result
10212 }
10213
10214 pub fn send_no_shutdown_on_err(
10216 self,
10217 mut result: Result<fdomain_client::Vmo, i32>,
10218 ) -> Result<(), fidl::Error> {
10219 let _result = self.send_raw(result);
10220 self.drop_without_shutdown();
10221 _result
10222 }
10223
10224 fn send_raw(&self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10225 self.control_handle
10226 .inner
10227 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
10228 result.map(|vmo| (vmo,)),
10229 self.tx_id,
10230 0xa6a9e654cbf62b,
10231 fidl::encoding::DynamicFlags::empty(),
10232 )
10233 }
10234}
10235
10236#[must_use = "FIDL methods require a response to be sent"]
10237#[derive(Debug)]
10238pub struct FileAllocateResponder {
10239 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10240 tx_id: u32,
10241}
10242
10243impl std::ops::Drop for FileAllocateResponder {
10247 fn drop(&mut self) {
10248 self.control_handle.shutdown();
10249 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10251 }
10252}
10253
10254impl fdomain_client::fidl::Responder for FileAllocateResponder {
10255 type ControlHandle = FileControlHandle;
10256
10257 fn control_handle(&self) -> &FileControlHandle {
10258 &self.control_handle
10259 }
10260
10261 fn drop_without_shutdown(mut self) {
10262 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10264 std::mem::forget(self);
10266 }
10267}
10268
10269impl FileAllocateResponder {
10270 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10274 let _result = self.send_raw(result);
10275 if _result.is_err() {
10276 self.control_handle.shutdown();
10277 }
10278 self.drop_without_shutdown();
10279 _result
10280 }
10281
10282 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10284 let _result = self.send_raw(result);
10285 self.drop_without_shutdown();
10286 _result
10287 }
10288
10289 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10290 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10291 fidl::encoding::EmptyStruct,
10292 i32,
10293 >>(
10294 fidl::encoding::FlexibleResult::new(result),
10295 self.tx_id,
10296 0x77fa0c330b57fd2e,
10297 fidl::encoding::DynamicFlags::FLEXIBLE,
10298 )
10299 }
10300}
10301
10302#[must_use = "FIDL methods require a response to be sent"]
10303#[derive(Debug)]
10304pub struct FileEnableVerityResponder {
10305 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10306 tx_id: u32,
10307}
10308
10309impl std::ops::Drop for FileEnableVerityResponder {
10313 fn drop(&mut self) {
10314 self.control_handle.shutdown();
10315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10317 }
10318}
10319
10320impl fdomain_client::fidl::Responder for FileEnableVerityResponder {
10321 type ControlHandle = FileControlHandle;
10322
10323 fn control_handle(&self) -> &FileControlHandle {
10324 &self.control_handle
10325 }
10326
10327 fn drop_without_shutdown(mut self) {
10328 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10330 std::mem::forget(self);
10332 }
10333}
10334
10335impl FileEnableVerityResponder {
10336 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10340 let _result = self.send_raw(result);
10341 if _result.is_err() {
10342 self.control_handle.shutdown();
10343 }
10344 self.drop_without_shutdown();
10345 _result
10346 }
10347
10348 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10350 let _result = self.send_raw(result);
10351 self.drop_without_shutdown();
10352 _result
10353 }
10354
10355 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10356 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10357 fidl::encoding::EmptyStruct,
10358 i32,
10359 >>(
10360 fidl::encoding::FlexibleResult::new(result),
10361 self.tx_id,
10362 0x2c421ec3faaeb8bb,
10363 fidl::encoding::DynamicFlags::FLEXIBLE,
10364 )
10365 }
10366}
10367
10368#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10369pub struct LinkableMarker;
10370
10371impl fdomain_client::fidl::ProtocolMarker for LinkableMarker {
10372 type Proxy = LinkableProxy;
10373 type RequestStream = LinkableRequestStream;
10374
10375 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
10376}
10377pub type LinkableLinkIntoResult = Result<(), i32>;
10378
10379pub trait LinkableProxyInterface: Send + Sync {
10380 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
10381 + Send;
10382 fn r#link_into(
10383 &self,
10384 dst_parent_token: fdomain_client::Event,
10385 dst: &str,
10386 ) -> Self::LinkIntoResponseFut;
10387}
10388
10389#[derive(Debug, Clone)]
10390pub struct LinkableProxy {
10391 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10392}
10393
10394impl fdomain_client::fidl::Proxy for LinkableProxy {
10395 type Protocol = LinkableMarker;
10396
10397 fn from_channel(inner: fdomain_client::Channel) -> Self {
10398 Self::new(inner)
10399 }
10400
10401 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10402 self.client.into_channel().map_err(|client| Self { client })
10403 }
10404
10405 fn as_channel(&self) -> &fdomain_client::Channel {
10406 self.client.as_channel()
10407 }
10408}
10409
10410impl LinkableProxy {
10411 pub fn new(channel: fdomain_client::Channel) -> Self {
10413 let protocol_name = <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10414 Self { client: fidl::client::Client::new(channel, protocol_name) }
10415 }
10416
10417 pub fn take_event_stream(&self) -> LinkableEventStream {
10423 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
10424 }
10425
10426 pub fn r#link_into(
10449 &self,
10450 mut dst_parent_token: fdomain_client::Event,
10451 mut dst: &str,
10452 ) -> fidl::client::QueryResponseFut<
10453 LinkableLinkIntoResult,
10454 fdomain_client::fidl::FDomainResourceDialect,
10455 > {
10456 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
10457 }
10458}
10459
10460impl LinkableProxyInterface for LinkableProxy {
10461 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
10462 LinkableLinkIntoResult,
10463 fdomain_client::fidl::FDomainResourceDialect,
10464 >;
10465 fn r#link_into(
10466 &self,
10467 mut dst_parent_token: fdomain_client::Event,
10468 mut dst: &str,
10469 ) -> Self::LinkIntoResponseFut {
10470 fn _decode(
10471 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10472 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
10473 let _response = fidl::client::decode_transaction_body::<
10474 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10475 fdomain_client::fidl::FDomainResourceDialect,
10476 0x54f3949246a03e74,
10477 >(_buf?)?;
10478 Ok(_response.map(|x| x))
10479 }
10480 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
10481 (dst_parent_token, dst),
10482 0x54f3949246a03e74,
10483 fidl::encoding::DynamicFlags::empty(),
10484 _decode,
10485 )
10486 }
10487}
10488
10489pub struct LinkableEventStream {
10490 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
10491}
10492
10493impl std::marker::Unpin for LinkableEventStream {}
10494
10495impl futures::stream::FusedStream for LinkableEventStream {
10496 fn is_terminated(&self) -> bool {
10497 self.event_receiver.is_terminated()
10498 }
10499}
10500
10501impl futures::Stream for LinkableEventStream {
10502 type Item = Result<LinkableEvent, fidl::Error>;
10503
10504 fn poll_next(
10505 mut self: std::pin::Pin<&mut Self>,
10506 cx: &mut std::task::Context<'_>,
10507 ) -> std::task::Poll<Option<Self::Item>> {
10508 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10509 &mut self.event_receiver,
10510 cx
10511 )?) {
10512 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
10513 None => std::task::Poll::Ready(None),
10514 }
10515 }
10516}
10517
10518#[derive(Debug)]
10519pub enum LinkableEvent {}
10520
10521impl LinkableEvent {
10522 fn decode(
10524 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10525 ) -> Result<LinkableEvent, fidl::Error> {
10526 let (bytes, _handles) = buf.split_mut();
10527 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10528 debug_assert_eq!(tx_header.tx_id, 0);
10529 match tx_header.ordinal {
10530 _ => Err(fidl::Error::UnknownOrdinal {
10531 ordinal: tx_header.ordinal,
10532 protocol_name: <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10533 }),
10534 }
10535 }
10536}
10537
10538pub struct LinkableRequestStream {
10540 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10541 is_terminated: bool,
10542}
10543
10544impl std::marker::Unpin for LinkableRequestStream {}
10545
10546impl futures::stream::FusedStream for LinkableRequestStream {
10547 fn is_terminated(&self) -> bool {
10548 self.is_terminated
10549 }
10550}
10551
10552impl fdomain_client::fidl::RequestStream for LinkableRequestStream {
10553 type Protocol = LinkableMarker;
10554 type ControlHandle = LinkableControlHandle;
10555
10556 fn from_channel(channel: fdomain_client::Channel) -> Self {
10557 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10558 }
10559
10560 fn control_handle(&self) -> Self::ControlHandle {
10561 LinkableControlHandle { inner: self.inner.clone() }
10562 }
10563
10564 fn into_inner(
10565 self,
10566 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
10567 {
10568 (self.inner, self.is_terminated)
10569 }
10570
10571 fn from_inner(
10572 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10573 is_terminated: bool,
10574 ) -> Self {
10575 Self { inner, is_terminated }
10576 }
10577}
10578
10579impl futures::Stream for LinkableRequestStream {
10580 type Item = Result<LinkableRequest, fidl::Error>;
10581
10582 fn poll_next(
10583 mut self: std::pin::Pin<&mut Self>,
10584 cx: &mut std::task::Context<'_>,
10585 ) -> std::task::Poll<Option<Self::Item>> {
10586 let this = &mut *self;
10587 if this.inner.check_shutdown(cx) {
10588 this.is_terminated = true;
10589 return std::task::Poll::Ready(None);
10590 }
10591 if this.is_terminated {
10592 panic!("polled LinkableRequestStream after completion");
10593 }
10594 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
10595 |bytes, handles| {
10596 match this.inner.channel().read_etc(cx, bytes, handles) {
10597 std::task::Poll::Ready(Ok(())) => {}
10598 std::task::Poll::Pending => return std::task::Poll::Pending,
10599 std::task::Poll::Ready(Err(None)) => {
10600 this.is_terminated = true;
10601 return std::task::Poll::Ready(None);
10602 }
10603 std::task::Poll::Ready(Err(Some(e))) => {
10604 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10605 e.into(),
10606 ))));
10607 }
10608 }
10609
10610 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10612
10613 std::task::Poll::Ready(Some(match header.ordinal {
10614 0x54f3949246a03e74 => {
10615 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10616 let mut req = fidl::new_empty!(
10617 LinkableLinkIntoRequest,
10618 fdomain_client::fidl::FDomainResourceDialect
10619 );
10620 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
10621 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
10622 Ok(LinkableRequest::LinkInto {
10623 dst_parent_token: req.dst_parent_token,
10624 dst: req.dst,
10625
10626 responder: LinkableLinkIntoResponder {
10627 control_handle: std::mem::ManuallyDrop::new(control_handle),
10628 tx_id: header.tx_id,
10629 },
10630 })
10631 }
10632 _ => Err(fidl::Error::UnknownOrdinal {
10633 ordinal: header.ordinal,
10634 protocol_name:
10635 <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10636 }),
10637 }))
10638 },
10639 )
10640 }
10641}
10642
10643#[derive(Debug)]
10644pub enum LinkableRequest {
10645 LinkInto {
10668 dst_parent_token: fdomain_client::Event,
10669 dst: String,
10670 responder: LinkableLinkIntoResponder,
10671 },
10672}
10673
10674impl LinkableRequest {
10675 #[allow(irrefutable_let_patterns)]
10676 pub fn into_link_into(
10677 self,
10678 ) -> Option<(fdomain_client::Event, String, LinkableLinkIntoResponder)> {
10679 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
10680 Some((dst_parent_token, dst, responder))
10681 } else {
10682 None
10683 }
10684 }
10685
10686 pub fn method_name(&self) -> &'static str {
10688 match *self {
10689 LinkableRequest::LinkInto { .. } => "link_into",
10690 }
10691 }
10692}
10693
10694#[derive(Debug, Clone)]
10695pub struct LinkableControlHandle {
10696 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10697}
10698
10699impl fdomain_client::fidl::ControlHandle for LinkableControlHandle {
10700 fn shutdown(&self) {
10701 self.inner.shutdown()
10702 }
10703
10704 fn is_closed(&self) -> bool {
10705 self.inner.channel().is_closed()
10706 }
10707 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
10708 self.inner.channel().on_closed()
10709 }
10710}
10711
10712impl LinkableControlHandle {}
10713
10714#[must_use = "FIDL methods require a response to be sent"]
10715#[derive(Debug)]
10716pub struct LinkableLinkIntoResponder {
10717 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
10718 tx_id: u32,
10719}
10720
10721impl std::ops::Drop for LinkableLinkIntoResponder {
10725 fn drop(&mut self) {
10726 self.control_handle.shutdown();
10727 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10729 }
10730}
10731
10732impl fdomain_client::fidl::Responder for LinkableLinkIntoResponder {
10733 type ControlHandle = LinkableControlHandle;
10734
10735 fn control_handle(&self) -> &LinkableControlHandle {
10736 &self.control_handle
10737 }
10738
10739 fn drop_without_shutdown(mut self) {
10740 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10742 std::mem::forget(self);
10744 }
10745}
10746
10747impl LinkableLinkIntoResponder {
10748 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10752 let _result = self.send_raw(result);
10753 if _result.is_err() {
10754 self.control_handle.shutdown();
10755 }
10756 self.drop_without_shutdown();
10757 _result
10758 }
10759
10760 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10762 let _result = self.send_raw(result);
10763 self.drop_without_shutdown();
10764 _result
10765 }
10766
10767 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10768 self.control_handle
10769 .inner
10770 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10771 result,
10772 self.tx_id,
10773 0x54f3949246a03e74,
10774 fidl::encoding::DynamicFlags::empty(),
10775 )
10776 }
10777}
10778
10779#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10780pub struct NodeMarker;
10781
10782impl fdomain_client::fidl::ProtocolMarker for NodeMarker {
10783 type Proxy = NodeProxy;
10784 type RequestStream = NodeRequestStream;
10785
10786 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
10787}
10788impl fdomain_client::fidl::DiscoverableProtocolMarker for NodeMarker {}
10789pub type NodeGetFlagsResult = Result<Flags, i32>;
10790pub type NodeSetFlagsResult = Result<(), i32>;
10791pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
10792pub type NodeUpdateAttributesResult = Result<(), i32>;
10793pub type NodeSyncResult = Result<(), i32>;
10794pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
10795pub type NodeSetExtendedAttributeResult = Result<(), i32>;
10796pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
10797
10798pub trait NodeProxyInterface: Send + Sync {
10799 fn r#clone(
10800 &self,
10801 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10802 ) -> Result<(), fidl::Error>;
10803 type CloseResponseFut: std::future::Future<
10804 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
10805 > + Send;
10806 fn r#close(&self) -> Self::CloseResponseFut;
10807 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
10808 fn r#query(&self) -> Self::QueryResponseFut;
10809 fn r#deprecated_clone(
10810 &self,
10811 flags: OpenFlags,
10812 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10813 ) -> Result<(), fidl::Error>;
10814 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
10815 + Send;
10816 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
10817 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
10818 fn r#deprecated_set_attr(
10819 &self,
10820 flags: NodeAttributeFlags,
10821 attributes: &NodeAttributes,
10822 ) -> Self::DeprecatedSetAttrResponseFut;
10823 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
10824 + Send;
10825 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
10826 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
10827 + Send;
10828 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
10829 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
10830 + Send;
10831 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
10832 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
10833 + Send;
10834 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
10835 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
10836 + Send;
10837 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
10838 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
10839 + Send;
10840 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
10841 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
10842 + Send;
10843 fn r#update_attributes(
10844 &self,
10845 payload: &MutableNodeAttributes,
10846 ) -> Self::UpdateAttributesResponseFut;
10847 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
10848 fn r#sync(&self) -> Self::SyncResponseFut;
10849 fn r#list_extended_attributes(
10850 &self,
10851 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
10852 ) -> Result<(), fidl::Error>;
10853 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
10854 + Send;
10855 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
10856 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
10857 + Send;
10858 fn r#set_extended_attribute(
10859 &self,
10860 name: &[u8],
10861 value: ExtendedAttributeValue,
10862 mode: SetExtendedAttributeMode,
10863 ) -> Self::SetExtendedAttributeResponseFut;
10864 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
10865 + Send;
10866 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
10867}
10868
10869#[derive(Debug, Clone)]
10870pub struct NodeProxy {
10871 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10872}
10873
10874impl fdomain_client::fidl::Proxy for NodeProxy {
10875 type Protocol = NodeMarker;
10876
10877 fn from_channel(inner: fdomain_client::Channel) -> Self {
10878 Self::new(inner)
10879 }
10880
10881 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10882 self.client.into_channel().map_err(|client| Self { client })
10883 }
10884
10885 fn as_channel(&self) -> &fdomain_client::Channel {
10886 self.client.as_channel()
10887 }
10888}
10889
10890impl NodeProxy {
10891 pub fn new(channel: fdomain_client::Channel) -> Self {
10893 let protocol_name = <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10894 Self { client: fidl::client::Client::new(channel, protocol_name) }
10895 }
10896
10897 pub fn take_event_stream(&self) -> NodeEventStream {
10903 NodeEventStream { event_receiver: self.client.take_event_receiver() }
10904 }
10905
10906 pub fn r#clone(
10907 &self,
10908 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10909 ) -> Result<(), fidl::Error> {
10910 NodeProxyInterface::r#clone(self, request)
10911 }
10912
10913 pub fn r#close(
10924 &self,
10925 ) -> fidl::client::QueryResponseFut<
10926 fdomain_fuchsia_unknown::CloseableCloseResult,
10927 fdomain_client::fidl::FDomainResourceDialect,
10928 > {
10929 NodeProxyInterface::r#close(self)
10930 }
10931
10932 pub fn r#query(
10933 &self,
10934 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
10935 NodeProxyInterface::r#query(self)
10936 }
10937
10938 pub fn r#deprecated_clone(
10940 &self,
10941 mut flags: OpenFlags,
10942 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10943 ) -> Result<(), fidl::Error> {
10944 NodeProxyInterface::r#deprecated_clone(self, flags, object)
10945 }
10946
10947 pub fn r#deprecated_get_attr(
10949 &self,
10950 ) -> fidl::client::QueryResponseFut<
10951 (i32, NodeAttributes),
10952 fdomain_client::fidl::FDomainResourceDialect,
10953 > {
10954 NodeProxyInterface::r#deprecated_get_attr(self)
10955 }
10956
10957 pub fn r#deprecated_set_attr(
10959 &self,
10960 mut flags: NodeAttributeFlags,
10961 mut attributes: &NodeAttributes,
10962 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
10963 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
10964 }
10965
10966 pub fn r#deprecated_get_flags(
10968 &self,
10969 ) -> fidl::client::QueryResponseFut<
10970 (i32, OpenFlags),
10971 fdomain_client::fidl::FDomainResourceDialect,
10972 > {
10973 NodeProxyInterface::r#deprecated_get_flags(self)
10974 }
10975
10976 pub fn r#deprecated_set_flags(
10978 &self,
10979 mut flags: OpenFlags,
10980 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
10981 NodeProxyInterface::r#deprecated_set_flags(self, flags)
10982 }
10983
10984 pub fn r#get_flags(
10993 &self,
10994 ) -> fidl::client::QueryResponseFut<
10995 NodeGetFlagsResult,
10996 fdomain_client::fidl::FDomainResourceDialect,
10997 > {
10998 NodeProxyInterface::r#get_flags(self)
10999 }
11000
11001 pub fn r#set_flags(
11011 &self,
11012 mut flags: Flags,
11013 ) -> fidl::client::QueryResponseFut<
11014 NodeSetFlagsResult,
11015 fdomain_client::fidl::FDomainResourceDialect,
11016 > {
11017 NodeProxyInterface::r#set_flags(self, flags)
11018 }
11019
11020 pub fn r#query_filesystem(
11022 &self,
11023 ) -> fidl::client::QueryResponseFut<
11024 (i32, Option<Box<FilesystemInfo>>),
11025 fdomain_client::fidl::FDomainResourceDialect,
11026 > {
11027 NodeProxyInterface::r#query_filesystem(self)
11028 }
11029
11030 pub fn r#get_attributes(
11044 &self,
11045 mut query: NodeAttributesQuery,
11046 ) -> fidl::client::QueryResponseFut<
11047 NodeGetAttributesResult,
11048 fdomain_client::fidl::FDomainResourceDialect,
11049 > {
11050 NodeProxyInterface::r#get_attributes(self, query)
11051 }
11052
11053 pub fn r#update_attributes(
11062 &self,
11063 mut payload: &MutableNodeAttributes,
11064 ) -> fidl::client::QueryResponseFut<
11065 NodeUpdateAttributesResult,
11066 fdomain_client::fidl::FDomainResourceDialect,
11067 > {
11068 NodeProxyInterface::r#update_attributes(self, payload)
11069 }
11070
11071 pub fn r#sync(
11081 &self,
11082 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
11083 {
11084 NodeProxyInterface::r#sync(self)
11085 }
11086
11087 pub fn r#list_extended_attributes(
11096 &self,
11097 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11098 ) -> Result<(), fidl::Error> {
11099 NodeProxyInterface::r#list_extended_attributes(self, iterator)
11100 }
11101
11102 pub fn r#get_extended_attribute(
11109 &self,
11110 mut name: &[u8],
11111 ) -> fidl::client::QueryResponseFut<
11112 NodeGetExtendedAttributeResult,
11113 fdomain_client::fidl::FDomainResourceDialect,
11114 > {
11115 NodeProxyInterface::r#get_extended_attribute(self, name)
11116 }
11117
11118 pub fn r#set_extended_attribute(
11126 &self,
11127 mut name: &[u8],
11128 mut value: ExtendedAttributeValue,
11129 mut mode: SetExtendedAttributeMode,
11130 ) -> fidl::client::QueryResponseFut<
11131 NodeSetExtendedAttributeResult,
11132 fdomain_client::fidl::FDomainResourceDialect,
11133 > {
11134 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
11135 }
11136
11137 pub fn r#remove_extended_attribute(
11143 &self,
11144 mut name: &[u8],
11145 ) -> fidl::client::QueryResponseFut<
11146 NodeRemoveExtendedAttributeResult,
11147 fdomain_client::fidl::FDomainResourceDialect,
11148 > {
11149 NodeProxyInterface::r#remove_extended_attribute(self, name)
11150 }
11151}
11152
11153impl NodeProxyInterface for NodeProxy {
11154 fn r#clone(
11155 &self,
11156 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
11157 ) -> Result<(), fidl::Error> {
11158 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
11159 (request,),
11160 0x20d8a7aba2168a79,
11161 fidl::encoding::DynamicFlags::empty(),
11162 )
11163 }
11164
11165 type CloseResponseFut = fidl::client::QueryResponseFut<
11166 fdomain_fuchsia_unknown::CloseableCloseResult,
11167 fdomain_client::fidl::FDomainResourceDialect,
11168 >;
11169 fn r#close(&self) -> Self::CloseResponseFut {
11170 fn _decode(
11171 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11172 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
11173 let _response = fidl::client::decode_transaction_body::<
11174 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11175 fdomain_client::fidl::FDomainResourceDialect,
11176 0x5ac5d459ad7f657e,
11177 >(_buf?)?;
11178 Ok(_response.map(|x| x))
11179 }
11180 self.client.send_query_and_decode::<
11181 fidl::encoding::EmptyPayload,
11182 fdomain_fuchsia_unknown::CloseableCloseResult,
11183 >(
11184 (),
11185 0x5ac5d459ad7f657e,
11186 fidl::encoding::DynamicFlags::empty(),
11187 _decode,
11188 )
11189 }
11190
11191 type QueryResponseFut =
11192 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
11193 fn r#query(&self) -> Self::QueryResponseFut {
11194 fn _decode(
11195 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11196 ) -> Result<Vec<u8>, fidl::Error> {
11197 let _response = fidl::client::decode_transaction_body::<
11198 fdomain_fuchsia_unknown::QueryableQueryResponse,
11199 fdomain_client::fidl::FDomainResourceDialect,
11200 0x2658edee9decfc06,
11201 >(_buf?)?;
11202 Ok(_response.protocol)
11203 }
11204 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
11205 (),
11206 0x2658edee9decfc06,
11207 fidl::encoding::DynamicFlags::empty(),
11208 _decode,
11209 )
11210 }
11211
11212 fn r#deprecated_clone(
11213 &self,
11214 mut flags: OpenFlags,
11215 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11216 ) -> Result<(), fidl::Error> {
11217 self.client.send::<NodeDeprecatedCloneRequest>(
11218 (flags, object),
11219 0x5a61678f293ce16f,
11220 fidl::encoding::DynamicFlags::FLEXIBLE,
11221 )
11222 }
11223
11224 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
11225 (i32, NodeAttributes),
11226 fdomain_client::fidl::FDomainResourceDialect,
11227 >;
11228 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
11229 fn _decode(
11230 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11231 ) -> Result<(i32, NodeAttributes), fidl::Error> {
11232 let _response = fidl::client::decode_transaction_body::<
11233 NodeDeprecatedGetAttrResponse,
11234 fdomain_client::fidl::FDomainResourceDialect,
11235 0x78985e216314dafd,
11236 >(_buf?)?;
11237 Ok((_response.s, _response.attributes))
11238 }
11239 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
11240 (),
11241 0x78985e216314dafd,
11242 fidl::encoding::DynamicFlags::empty(),
11243 _decode,
11244 )
11245 }
11246
11247 type DeprecatedSetAttrResponseFut =
11248 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11249 fn r#deprecated_set_attr(
11250 &self,
11251 mut flags: NodeAttributeFlags,
11252 mut attributes: &NodeAttributes,
11253 ) -> Self::DeprecatedSetAttrResponseFut {
11254 fn _decode(
11255 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11256 ) -> Result<i32, fidl::Error> {
11257 let _response = fidl::client::decode_transaction_body::<
11258 NodeDeprecatedSetAttrResponse,
11259 fdomain_client::fidl::FDomainResourceDialect,
11260 0x4186c0f40d938f46,
11261 >(_buf?)?;
11262 Ok(_response.s)
11263 }
11264 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
11265 (flags, attributes),
11266 0x4186c0f40d938f46,
11267 fidl::encoding::DynamicFlags::empty(),
11268 _decode,
11269 )
11270 }
11271
11272 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
11273 (i32, OpenFlags),
11274 fdomain_client::fidl::FDomainResourceDialect,
11275 >;
11276 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
11277 fn _decode(
11278 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11279 ) -> Result<(i32, OpenFlags), fidl::Error> {
11280 let _response = fidl::client::decode_transaction_body::<
11281 NodeDeprecatedGetFlagsResponse,
11282 fdomain_client::fidl::FDomainResourceDialect,
11283 0x5b88fffb8eda3aa1,
11284 >(_buf?)?;
11285 Ok((_response.s, _response.flags))
11286 }
11287 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
11288 (),
11289 0x5b88fffb8eda3aa1,
11290 fidl::encoding::DynamicFlags::empty(),
11291 _decode,
11292 )
11293 }
11294
11295 type DeprecatedSetFlagsResponseFut =
11296 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11297 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
11298 fn _decode(
11299 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11300 ) -> Result<i32, fidl::Error> {
11301 let _response = fidl::client::decode_transaction_body::<
11302 NodeDeprecatedSetFlagsResponse,
11303 fdomain_client::fidl::FDomainResourceDialect,
11304 0x5295b76c71fde733,
11305 >(_buf?)?;
11306 Ok(_response.s)
11307 }
11308 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
11309 (flags,),
11310 0x5295b76c71fde733,
11311 fidl::encoding::DynamicFlags::empty(),
11312 _decode,
11313 )
11314 }
11315
11316 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
11317 NodeGetFlagsResult,
11318 fdomain_client::fidl::FDomainResourceDialect,
11319 >;
11320 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
11321 fn _decode(
11322 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11323 ) -> Result<NodeGetFlagsResult, fidl::Error> {
11324 let _response = fidl::client::decode_transaction_body::<
11325 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
11326 fdomain_client::fidl::FDomainResourceDialect,
11327 0x176eb318f64ec23,
11328 >(_buf?)?
11329 .into_result_fdomain::<NodeMarker>("get_flags")?;
11330 Ok(_response.map(|x| x.flags))
11331 }
11332 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
11333 (),
11334 0x176eb318f64ec23,
11335 fidl::encoding::DynamicFlags::FLEXIBLE,
11336 _decode,
11337 )
11338 }
11339
11340 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
11341 NodeSetFlagsResult,
11342 fdomain_client::fidl::FDomainResourceDialect,
11343 >;
11344 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
11345 fn _decode(
11346 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11347 ) -> Result<NodeSetFlagsResult, fidl::Error> {
11348 let _response = fidl::client::decode_transaction_body::<
11349 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
11350 fdomain_client::fidl::FDomainResourceDialect,
11351 0x55a8028685791ea8,
11352 >(_buf?)?
11353 .into_result_fdomain::<NodeMarker>("set_flags")?;
11354 Ok(_response.map(|x| x))
11355 }
11356 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
11357 (flags,),
11358 0x55a8028685791ea8,
11359 fidl::encoding::DynamicFlags::FLEXIBLE,
11360 _decode,
11361 )
11362 }
11363
11364 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
11365 (i32, Option<Box<FilesystemInfo>>),
11366 fdomain_client::fidl::FDomainResourceDialect,
11367 >;
11368 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
11369 fn _decode(
11370 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11371 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
11372 let _response = fidl::client::decode_transaction_body::<
11373 NodeQueryFilesystemResponse,
11374 fdomain_client::fidl::FDomainResourceDialect,
11375 0x6f344a1c6b0a0610,
11376 >(_buf?)?;
11377 Ok((_response.s, _response.info))
11378 }
11379 self.client.send_query_and_decode::<
11380 fidl::encoding::EmptyPayload,
11381 (i32, Option<Box<FilesystemInfo>>),
11382 >(
11383 (),
11384 0x6f344a1c6b0a0610,
11385 fidl::encoding::DynamicFlags::empty(),
11386 _decode,
11387 )
11388 }
11389
11390 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
11391 NodeGetAttributesResult,
11392 fdomain_client::fidl::FDomainResourceDialect,
11393 >;
11394 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
11395 fn _decode(
11396 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11397 ) -> Result<NodeGetAttributesResult, fidl::Error> {
11398 let _response = fidl::client::decode_transaction_body::<
11399 fidl::encoding::ResultType<NodeAttributes2, i32>,
11400 fdomain_client::fidl::FDomainResourceDialect,
11401 0x3d4396a638ea053b,
11402 >(_buf?)?;
11403 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
11404 }
11405 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
11406 (query,),
11407 0x3d4396a638ea053b,
11408 fidl::encoding::DynamicFlags::empty(),
11409 _decode,
11410 )
11411 }
11412
11413 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
11414 NodeUpdateAttributesResult,
11415 fdomain_client::fidl::FDomainResourceDialect,
11416 >;
11417 fn r#update_attributes(
11418 &self,
11419 mut payload: &MutableNodeAttributes,
11420 ) -> Self::UpdateAttributesResponseFut {
11421 fn _decode(
11422 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11423 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
11424 let _response = fidl::client::decode_transaction_body::<
11425 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11426 fdomain_client::fidl::FDomainResourceDialect,
11427 0x3308c1da5a89bf08,
11428 >(_buf?)?;
11429 Ok(_response.map(|x| x))
11430 }
11431 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
11432 payload,
11433 0x3308c1da5a89bf08,
11434 fidl::encoding::DynamicFlags::empty(),
11435 _decode,
11436 )
11437 }
11438
11439 type SyncResponseFut = fidl::client::QueryResponseFut<
11440 NodeSyncResult,
11441 fdomain_client::fidl::FDomainResourceDialect,
11442 >;
11443 fn r#sync(&self) -> Self::SyncResponseFut {
11444 fn _decode(
11445 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11446 ) -> Result<NodeSyncResult, fidl::Error> {
11447 let _response = fidl::client::decode_transaction_body::<
11448 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11449 fdomain_client::fidl::FDomainResourceDialect,
11450 0x2c5c27ca0ab5dc49,
11451 >(_buf?)?;
11452 Ok(_response.map(|x| x))
11453 }
11454 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
11455 (),
11456 0x2c5c27ca0ab5dc49,
11457 fidl::encoding::DynamicFlags::empty(),
11458 _decode,
11459 )
11460 }
11461
11462 fn r#list_extended_attributes(
11463 &self,
11464 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11465 ) -> Result<(), fidl::Error> {
11466 self.client.send::<NodeListExtendedAttributesRequest>(
11467 (iterator,),
11468 0x4b61033de007fcd0,
11469 fidl::encoding::DynamicFlags::empty(),
11470 )
11471 }
11472
11473 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11474 NodeGetExtendedAttributeResult,
11475 fdomain_client::fidl::FDomainResourceDialect,
11476 >;
11477 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
11478 fn _decode(
11479 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11480 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
11481 let _response = fidl::client::decode_transaction_body::<
11482 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
11483 fdomain_client::fidl::FDomainResourceDialect,
11484 0x45ffa3ccfdeb76db,
11485 >(_buf?)?;
11486 Ok(_response.map(|x| x))
11487 }
11488 self.client.send_query_and_decode::<
11489 NodeGetExtendedAttributeRequest,
11490 NodeGetExtendedAttributeResult,
11491 >(
11492 (name,),
11493 0x45ffa3ccfdeb76db,
11494 fidl::encoding::DynamicFlags::empty(),
11495 _decode,
11496 )
11497 }
11498
11499 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11500 NodeSetExtendedAttributeResult,
11501 fdomain_client::fidl::FDomainResourceDialect,
11502 >;
11503 fn r#set_extended_attribute(
11504 &self,
11505 mut name: &[u8],
11506 mut value: ExtendedAttributeValue,
11507 mut mode: SetExtendedAttributeMode,
11508 ) -> Self::SetExtendedAttributeResponseFut {
11509 fn _decode(
11510 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11511 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
11512 let _response = fidl::client::decode_transaction_body::<
11513 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11514 fdomain_client::fidl::FDomainResourceDialect,
11515 0x4a951362f681f23c,
11516 >(_buf?)?;
11517 Ok(_response.map(|x| x))
11518 }
11519 self.client.send_query_and_decode::<
11520 NodeSetExtendedAttributeRequest,
11521 NodeSetExtendedAttributeResult,
11522 >(
11523 (name, &mut value, mode,),
11524 0x4a951362f681f23c,
11525 fidl::encoding::DynamicFlags::empty(),
11526 _decode,
11527 )
11528 }
11529
11530 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11531 NodeRemoveExtendedAttributeResult,
11532 fdomain_client::fidl::FDomainResourceDialect,
11533 >;
11534 fn r#remove_extended_attribute(
11535 &self,
11536 mut name: &[u8],
11537 ) -> Self::RemoveExtendedAttributeResponseFut {
11538 fn _decode(
11539 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11540 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
11541 let _response = fidl::client::decode_transaction_body::<
11542 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11543 fdomain_client::fidl::FDomainResourceDialect,
11544 0x7a0b9f3a9bf9032d,
11545 >(_buf?)?;
11546 Ok(_response.map(|x| x))
11547 }
11548 self.client.send_query_and_decode::<
11549 NodeRemoveExtendedAttributeRequest,
11550 NodeRemoveExtendedAttributeResult,
11551 >(
11552 (name,),
11553 0x7a0b9f3a9bf9032d,
11554 fidl::encoding::DynamicFlags::empty(),
11555 _decode,
11556 )
11557 }
11558}
11559
11560pub struct NodeEventStream {
11561 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
11562}
11563
11564impl std::marker::Unpin for NodeEventStream {}
11565
11566impl futures::stream::FusedStream for NodeEventStream {
11567 fn is_terminated(&self) -> bool {
11568 self.event_receiver.is_terminated()
11569 }
11570}
11571
11572impl futures::Stream for NodeEventStream {
11573 type Item = Result<NodeEvent, fidl::Error>;
11574
11575 fn poll_next(
11576 mut self: std::pin::Pin<&mut Self>,
11577 cx: &mut std::task::Context<'_>,
11578 ) -> std::task::Poll<Option<Self::Item>> {
11579 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
11580 &mut self.event_receiver,
11581 cx
11582 )?) {
11583 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
11584 None => std::task::Poll::Ready(None),
11585 }
11586 }
11587}
11588
11589#[derive(Debug)]
11590pub enum NodeEvent {
11591 OnOpen_ {
11592 s: i32,
11593 info: Option<Box<NodeInfoDeprecated>>,
11594 },
11595 OnRepresentation {
11596 payload: Representation,
11597 },
11598 #[non_exhaustive]
11599 _UnknownEvent {
11600 ordinal: u64,
11602 },
11603}
11604
11605impl NodeEvent {
11606 #[allow(irrefutable_let_patterns)]
11607 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
11608 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
11609 }
11610 #[allow(irrefutable_let_patterns)]
11611 pub fn into_on_representation(self) -> Option<Representation> {
11612 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
11613 }
11614
11615 fn decode(
11617 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
11618 ) -> Result<NodeEvent, fidl::Error> {
11619 let (bytes, _handles) = buf.split_mut();
11620 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11621 debug_assert_eq!(tx_header.tx_id, 0);
11622 match tx_header.ordinal {
11623 0x7fc7bbb1dbfd1972 => {
11624 let mut out = fidl::new_empty!(
11625 NodeOnOpenRequest,
11626 fdomain_client::fidl::FDomainResourceDialect
11627 );
11628 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
11629 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
11630 }
11631 0x5cb40567d80a510c => {
11632 let mut out =
11633 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
11634 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
11635 Ok((NodeEvent::OnRepresentation { payload: out }))
11636 }
11637 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
11638 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
11639 }
11640 _ => Err(fidl::Error::UnknownOrdinal {
11641 ordinal: tx_header.ordinal,
11642 protocol_name: <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
11643 }),
11644 }
11645 }
11646}
11647
11648pub struct NodeRequestStream {
11650 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11651 is_terminated: bool,
11652}
11653
11654impl std::marker::Unpin for NodeRequestStream {}
11655
11656impl futures::stream::FusedStream for NodeRequestStream {
11657 fn is_terminated(&self) -> bool {
11658 self.is_terminated
11659 }
11660}
11661
11662impl fdomain_client::fidl::RequestStream for NodeRequestStream {
11663 type Protocol = NodeMarker;
11664 type ControlHandle = NodeControlHandle;
11665
11666 fn from_channel(channel: fdomain_client::Channel) -> Self {
11667 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
11668 }
11669
11670 fn control_handle(&self) -> Self::ControlHandle {
11671 NodeControlHandle { inner: self.inner.clone() }
11672 }
11673
11674 fn into_inner(
11675 self,
11676 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
11677 {
11678 (self.inner, self.is_terminated)
11679 }
11680
11681 fn from_inner(
11682 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11683 is_terminated: bool,
11684 ) -> Self {
11685 Self { inner, is_terminated }
11686 }
11687}
11688
11689impl futures::Stream for NodeRequestStream {
11690 type Item = Result<NodeRequest, fidl::Error>;
11691
11692 fn poll_next(
11693 mut self: std::pin::Pin<&mut Self>,
11694 cx: &mut std::task::Context<'_>,
11695 ) -> std::task::Poll<Option<Self::Item>> {
11696 let this = &mut *self;
11697 if this.inner.check_shutdown(cx) {
11698 this.is_terminated = true;
11699 return std::task::Poll::Ready(None);
11700 }
11701 if this.is_terminated {
11702 panic!("polled NodeRequestStream after completion");
11703 }
11704 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
11705 |bytes, handles| {
11706 match this.inner.channel().read_etc(cx, bytes, handles) {
11707 std::task::Poll::Ready(Ok(())) => {}
11708 std::task::Poll::Pending => return std::task::Poll::Pending,
11709 std::task::Poll::Ready(Err(None)) => {
11710 this.is_terminated = true;
11711 return std::task::Poll::Ready(None);
11712 }
11713 std::task::Poll::Ready(Err(Some(e))) => {
11714 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
11715 e.into(),
11716 ))));
11717 }
11718 }
11719
11720 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11722
11723 std::task::Poll::Ready(Some(match header.ordinal {
11724 0x20d8a7aba2168a79 => {
11725 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11726 let mut req = fidl::new_empty!(
11727 fdomain_fuchsia_unknown::CloneableCloneRequest,
11728 fdomain_client::fidl::FDomainResourceDialect
11729 );
11730 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11731 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11732 Ok(NodeRequest::Clone { request: req.request, control_handle })
11733 }
11734 0x5ac5d459ad7f657e => {
11735 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11736 let mut req = fidl::new_empty!(
11737 fidl::encoding::EmptyPayload,
11738 fdomain_client::fidl::FDomainResourceDialect
11739 );
11740 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11741 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11742 Ok(NodeRequest::Close {
11743 responder: NodeCloseResponder {
11744 control_handle: std::mem::ManuallyDrop::new(control_handle),
11745 tx_id: header.tx_id,
11746 },
11747 })
11748 }
11749 0x2658edee9decfc06 => {
11750 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11751 let mut req = fidl::new_empty!(
11752 fidl::encoding::EmptyPayload,
11753 fdomain_client::fidl::FDomainResourceDialect
11754 );
11755 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11756 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11757 Ok(NodeRequest::Query {
11758 responder: NodeQueryResponder {
11759 control_handle: std::mem::ManuallyDrop::new(control_handle),
11760 tx_id: header.tx_id,
11761 },
11762 })
11763 }
11764 0x5a61678f293ce16f => {
11765 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11766 let mut req = fidl::new_empty!(
11767 NodeDeprecatedCloneRequest,
11768 fdomain_client::fidl::FDomainResourceDialect
11769 );
11770 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11771 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11772 Ok(NodeRequest::DeprecatedClone {
11773 flags: req.flags,
11774 object: req.object,
11775
11776 control_handle,
11777 })
11778 }
11779 0x78985e216314dafd => {
11780 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11781 let mut req = fidl::new_empty!(
11782 fidl::encoding::EmptyPayload,
11783 fdomain_client::fidl::FDomainResourceDialect
11784 );
11785 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11786 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11787 Ok(NodeRequest::DeprecatedGetAttr {
11788 responder: NodeDeprecatedGetAttrResponder {
11789 control_handle: std::mem::ManuallyDrop::new(control_handle),
11790 tx_id: header.tx_id,
11791 },
11792 })
11793 }
11794 0x4186c0f40d938f46 => {
11795 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11796 let mut req = fidl::new_empty!(
11797 NodeDeprecatedSetAttrRequest,
11798 fdomain_client::fidl::FDomainResourceDialect
11799 );
11800 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
11801 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11802 Ok(NodeRequest::DeprecatedSetAttr {
11803 flags: req.flags,
11804 attributes: req.attributes,
11805
11806 responder: NodeDeprecatedSetAttrResponder {
11807 control_handle: std::mem::ManuallyDrop::new(control_handle),
11808 tx_id: header.tx_id,
11809 },
11810 })
11811 }
11812 0x5b88fffb8eda3aa1 => {
11813 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11814 let mut req = fidl::new_empty!(
11815 fidl::encoding::EmptyPayload,
11816 fdomain_client::fidl::FDomainResourceDialect
11817 );
11818 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11819 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11820 Ok(NodeRequest::DeprecatedGetFlags {
11821 responder: NodeDeprecatedGetFlagsResponder {
11822 control_handle: std::mem::ManuallyDrop::new(control_handle),
11823 tx_id: header.tx_id,
11824 },
11825 })
11826 }
11827 0x5295b76c71fde733 => {
11828 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11829 let mut req = fidl::new_empty!(
11830 NodeDeprecatedSetFlagsRequest,
11831 fdomain_client::fidl::FDomainResourceDialect
11832 );
11833 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11834 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11835 Ok(NodeRequest::DeprecatedSetFlags {
11836 flags: req.flags,
11837
11838 responder: NodeDeprecatedSetFlagsResponder {
11839 control_handle: std::mem::ManuallyDrop::new(control_handle),
11840 tx_id: header.tx_id,
11841 },
11842 })
11843 }
11844 0x176eb318f64ec23 => {
11845 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11846 let mut req = fidl::new_empty!(
11847 fidl::encoding::EmptyPayload,
11848 fdomain_client::fidl::FDomainResourceDialect
11849 );
11850 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11851 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11852 Ok(NodeRequest::GetFlags {
11853 responder: NodeGetFlagsResponder {
11854 control_handle: std::mem::ManuallyDrop::new(control_handle),
11855 tx_id: header.tx_id,
11856 },
11857 })
11858 }
11859 0x55a8028685791ea8 => {
11860 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11861 let mut req = fidl::new_empty!(
11862 NodeSetFlagsRequest,
11863 fdomain_client::fidl::FDomainResourceDialect
11864 );
11865 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11866 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11867 Ok(NodeRequest::SetFlags {
11868 flags: req.flags,
11869
11870 responder: NodeSetFlagsResponder {
11871 control_handle: std::mem::ManuallyDrop::new(control_handle),
11872 tx_id: header.tx_id,
11873 },
11874 })
11875 }
11876 0x6f344a1c6b0a0610 => {
11877 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11878 let mut req = fidl::new_empty!(
11879 fidl::encoding::EmptyPayload,
11880 fdomain_client::fidl::FDomainResourceDialect
11881 );
11882 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11883 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11884 Ok(NodeRequest::QueryFilesystem {
11885 responder: NodeQueryFilesystemResponder {
11886 control_handle: std::mem::ManuallyDrop::new(control_handle),
11887 tx_id: header.tx_id,
11888 },
11889 })
11890 }
11891 0x3d4396a638ea053b => {
11892 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11893 let mut req = fidl::new_empty!(
11894 NodeGetAttributesRequest,
11895 fdomain_client::fidl::FDomainResourceDialect
11896 );
11897 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11898 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11899 Ok(NodeRequest::GetAttributes {
11900 query: req.query,
11901
11902 responder: NodeGetAttributesResponder {
11903 control_handle: std::mem::ManuallyDrop::new(control_handle),
11904 tx_id: header.tx_id,
11905 },
11906 })
11907 }
11908 0x3308c1da5a89bf08 => {
11909 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11910 let mut req = fidl::new_empty!(
11911 MutableNodeAttributes,
11912 fdomain_client::fidl::FDomainResourceDialect
11913 );
11914 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
11915 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11916 Ok(NodeRequest::UpdateAttributes {
11917 payload: req,
11918 responder: NodeUpdateAttributesResponder {
11919 control_handle: std::mem::ManuallyDrop::new(control_handle),
11920 tx_id: header.tx_id,
11921 },
11922 })
11923 }
11924 0x2c5c27ca0ab5dc49 => {
11925 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11926 let mut req = fidl::new_empty!(
11927 fidl::encoding::EmptyPayload,
11928 fdomain_client::fidl::FDomainResourceDialect
11929 );
11930 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11931 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11932 Ok(NodeRequest::Sync {
11933 responder: NodeSyncResponder {
11934 control_handle: std::mem::ManuallyDrop::new(control_handle),
11935 tx_id: header.tx_id,
11936 },
11937 })
11938 }
11939 0x4b61033de007fcd0 => {
11940 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11941 let mut req = fidl::new_empty!(
11942 NodeListExtendedAttributesRequest,
11943 fdomain_client::fidl::FDomainResourceDialect
11944 );
11945 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11946 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11947 Ok(NodeRequest::ListExtendedAttributes {
11948 iterator: req.iterator,
11949
11950 control_handle,
11951 })
11952 }
11953 0x45ffa3ccfdeb76db => {
11954 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11955 let mut req = fidl::new_empty!(
11956 NodeGetExtendedAttributeRequest,
11957 fdomain_client::fidl::FDomainResourceDialect
11958 );
11959 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11960 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11961 Ok(NodeRequest::GetExtendedAttribute {
11962 name: req.name,
11963
11964 responder: NodeGetExtendedAttributeResponder {
11965 control_handle: std::mem::ManuallyDrop::new(control_handle),
11966 tx_id: header.tx_id,
11967 },
11968 })
11969 }
11970 0x4a951362f681f23c => {
11971 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11972 let mut req = fidl::new_empty!(
11973 NodeSetExtendedAttributeRequest,
11974 fdomain_client::fidl::FDomainResourceDialect
11975 );
11976 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11977 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11978 Ok(NodeRequest::SetExtendedAttribute {
11979 name: req.name,
11980 value: req.value,
11981 mode: req.mode,
11982
11983 responder: NodeSetExtendedAttributeResponder {
11984 control_handle: std::mem::ManuallyDrop::new(control_handle),
11985 tx_id: header.tx_id,
11986 },
11987 })
11988 }
11989 0x7a0b9f3a9bf9032d => {
11990 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11991 let mut req = fidl::new_empty!(
11992 NodeRemoveExtendedAttributeRequest,
11993 fdomain_client::fidl::FDomainResourceDialect
11994 );
11995 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11996 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11997 Ok(NodeRequest::RemoveExtendedAttribute {
11998 name: req.name,
11999
12000 responder: NodeRemoveExtendedAttributeResponder {
12001 control_handle: std::mem::ManuallyDrop::new(control_handle),
12002 tx_id: header.tx_id,
12003 },
12004 })
12005 }
12006 _ if header.tx_id == 0
12007 && header
12008 .dynamic_flags()
12009 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12010 {
12011 Ok(NodeRequest::_UnknownMethod {
12012 ordinal: header.ordinal,
12013 control_handle: NodeControlHandle { inner: this.inner.clone() },
12014 method_type: fidl::MethodType::OneWay,
12015 })
12016 }
12017 _ if header
12018 .dynamic_flags()
12019 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12020 {
12021 this.inner.send_framework_err(
12022 fidl::encoding::FrameworkErr::UnknownMethod,
12023 header.tx_id,
12024 header.ordinal,
12025 header.dynamic_flags(),
12026 (bytes, handles),
12027 )?;
12028 Ok(NodeRequest::_UnknownMethod {
12029 ordinal: header.ordinal,
12030 control_handle: NodeControlHandle { inner: this.inner.clone() },
12031 method_type: fidl::MethodType::TwoWay,
12032 })
12033 }
12034 _ => Err(fidl::Error::UnknownOrdinal {
12035 ordinal: header.ordinal,
12036 protocol_name:
12037 <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
12038 }),
12039 }))
12040 },
12041 )
12042 }
12043}
12044
12045#[derive(Debug)]
12047pub enum NodeRequest {
12048 Clone {
12049 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12050 control_handle: NodeControlHandle,
12051 },
12052 Close {
12063 responder: NodeCloseResponder,
12064 },
12065 Query {
12066 responder: NodeQueryResponder,
12067 },
12068 DeprecatedClone {
12070 flags: OpenFlags,
12071 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
12072 control_handle: NodeControlHandle,
12073 },
12074 DeprecatedGetAttr {
12076 responder: NodeDeprecatedGetAttrResponder,
12077 },
12078 DeprecatedSetAttr {
12080 flags: NodeAttributeFlags,
12081 attributes: NodeAttributes,
12082 responder: NodeDeprecatedSetAttrResponder,
12083 },
12084 DeprecatedGetFlags {
12086 responder: NodeDeprecatedGetFlagsResponder,
12087 },
12088 DeprecatedSetFlags {
12090 flags: OpenFlags,
12091 responder: NodeDeprecatedSetFlagsResponder,
12092 },
12093 GetFlags {
12102 responder: NodeGetFlagsResponder,
12103 },
12104 SetFlags {
12114 flags: Flags,
12115 responder: NodeSetFlagsResponder,
12116 },
12117 QueryFilesystem {
12119 responder: NodeQueryFilesystemResponder,
12120 },
12121 GetAttributes {
12135 query: NodeAttributesQuery,
12136 responder: NodeGetAttributesResponder,
12137 },
12138 UpdateAttributes {
12147 payload: MutableNodeAttributes,
12148 responder: NodeUpdateAttributesResponder,
12149 },
12150 Sync {
12160 responder: NodeSyncResponder,
12161 },
12162 ListExtendedAttributes {
12171 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
12172 control_handle: NodeControlHandle,
12173 },
12174 GetExtendedAttribute {
12181 name: Vec<u8>,
12182 responder: NodeGetExtendedAttributeResponder,
12183 },
12184 SetExtendedAttribute {
12192 name: Vec<u8>,
12193 value: ExtendedAttributeValue,
12194 mode: SetExtendedAttributeMode,
12195 responder: NodeSetExtendedAttributeResponder,
12196 },
12197 RemoveExtendedAttribute {
12203 name: Vec<u8>,
12204 responder: NodeRemoveExtendedAttributeResponder,
12205 },
12206 #[non_exhaustive]
12208 _UnknownMethod {
12209 ordinal: u64,
12211 control_handle: NodeControlHandle,
12212 method_type: fidl::MethodType,
12213 },
12214}
12215
12216impl NodeRequest {
12217 #[allow(irrefutable_let_patterns)]
12218 pub fn into_clone(
12219 self,
12220 ) -> Option<(
12221 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12222 NodeControlHandle,
12223 )> {
12224 if let NodeRequest::Clone { request, control_handle } = self {
12225 Some((request, control_handle))
12226 } else {
12227 None
12228 }
12229 }
12230
12231 #[allow(irrefutable_let_patterns)]
12232 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
12233 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
12234 }
12235
12236 #[allow(irrefutable_let_patterns)]
12237 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
12238 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
12239 }
12240
12241 #[allow(irrefutable_let_patterns)]
12242 pub fn into_deprecated_clone(
12243 self,
12244 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, NodeControlHandle)> {
12245 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
12246 Some((flags, object, control_handle))
12247 } else {
12248 None
12249 }
12250 }
12251
12252 #[allow(irrefutable_let_patterns)]
12253 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
12254 if let NodeRequest::DeprecatedGetAttr { responder } = self {
12255 Some((responder))
12256 } else {
12257 None
12258 }
12259 }
12260
12261 #[allow(irrefutable_let_patterns)]
12262 pub fn into_deprecated_set_attr(
12263 self,
12264 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
12265 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
12266 Some((flags, attributes, responder))
12267 } else {
12268 None
12269 }
12270 }
12271
12272 #[allow(irrefutable_let_patterns)]
12273 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
12274 if let NodeRequest::DeprecatedGetFlags { responder } = self {
12275 Some((responder))
12276 } else {
12277 None
12278 }
12279 }
12280
12281 #[allow(irrefutable_let_patterns)]
12282 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
12283 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
12284 Some((flags, responder))
12285 } else {
12286 None
12287 }
12288 }
12289
12290 #[allow(irrefutable_let_patterns)]
12291 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
12292 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
12293 }
12294
12295 #[allow(irrefutable_let_patterns)]
12296 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
12297 if let NodeRequest::SetFlags { flags, responder } = self {
12298 Some((flags, responder))
12299 } else {
12300 None
12301 }
12302 }
12303
12304 #[allow(irrefutable_let_patterns)]
12305 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
12306 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
12307 }
12308
12309 #[allow(irrefutable_let_patterns)]
12310 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
12311 if let NodeRequest::GetAttributes { query, responder } = self {
12312 Some((query, responder))
12313 } else {
12314 None
12315 }
12316 }
12317
12318 #[allow(irrefutable_let_patterns)]
12319 pub fn into_update_attributes(
12320 self,
12321 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
12322 if let NodeRequest::UpdateAttributes { payload, responder } = self {
12323 Some((payload, responder))
12324 } else {
12325 None
12326 }
12327 }
12328
12329 #[allow(irrefutable_let_patterns)]
12330 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
12331 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
12332 }
12333
12334 #[allow(irrefutable_let_patterns)]
12335 pub fn into_list_extended_attributes(
12336 self,
12337 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
12338 {
12339 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
12340 Some((iterator, control_handle))
12341 } else {
12342 None
12343 }
12344 }
12345
12346 #[allow(irrefutable_let_patterns)]
12347 pub fn into_get_extended_attribute(
12348 self,
12349 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
12350 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
12351 Some((name, responder))
12352 } else {
12353 None
12354 }
12355 }
12356
12357 #[allow(irrefutable_let_patterns)]
12358 pub fn into_set_extended_attribute(
12359 self,
12360 ) -> Option<(
12361 Vec<u8>,
12362 ExtendedAttributeValue,
12363 SetExtendedAttributeMode,
12364 NodeSetExtendedAttributeResponder,
12365 )> {
12366 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
12367 Some((name, value, mode, responder))
12368 } else {
12369 None
12370 }
12371 }
12372
12373 #[allow(irrefutable_let_patterns)]
12374 pub fn into_remove_extended_attribute(
12375 self,
12376 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
12377 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
12378 Some((name, responder))
12379 } else {
12380 None
12381 }
12382 }
12383
12384 pub fn method_name(&self) -> &'static str {
12386 match *self {
12387 NodeRequest::Clone { .. } => "clone",
12388 NodeRequest::Close { .. } => "close",
12389 NodeRequest::Query { .. } => "query",
12390 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
12391 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
12392 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
12393 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
12394 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
12395 NodeRequest::GetFlags { .. } => "get_flags",
12396 NodeRequest::SetFlags { .. } => "set_flags",
12397 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
12398 NodeRequest::GetAttributes { .. } => "get_attributes",
12399 NodeRequest::UpdateAttributes { .. } => "update_attributes",
12400 NodeRequest::Sync { .. } => "sync",
12401 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
12402 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
12403 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
12404 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
12405 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
12406 "unknown one-way method"
12407 }
12408 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
12409 "unknown two-way method"
12410 }
12411 }
12412 }
12413}
12414
12415#[derive(Debug, Clone)]
12416pub struct NodeControlHandle {
12417 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
12418}
12419
12420impl fdomain_client::fidl::ControlHandle for NodeControlHandle {
12421 fn shutdown(&self) {
12422 self.inner.shutdown()
12423 }
12424
12425 fn is_closed(&self) -> bool {
12426 self.inner.channel().is_closed()
12427 }
12428 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
12429 self.inner.channel().on_closed()
12430 }
12431}
12432
12433impl NodeControlHandle {
12434 pub fn send_on_open_(
12435 &self,
12436 mut s: i32,
12437 mut info: Option<NodeInfoDeprecated>,
12438 ) -> Result<(), fidl::Error> {
12439 self.inner.send::<NodeOnOpenRequest>(
12440 (s, info.as_mut()),
12441 0,
12442 0x7fc7bbb1dbfd1972,
12443 fidl::encoding::DynamicFlags::FLEXIBLE,
12444 )
12445 }
12446
12447 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
12448 self.inner.send::<Representation>(
12449 &mut payload,
12450 0,
12451 0x5cb40567d80a510c,
12452 fidl::encoding::DynamicFlags::empty(),
12453 )
12454 }
12455}
12456
12457#[must_use = "FIDL methods require a response to be sent"]
12458#[derive(Debug)]
12459pub struct NodeCloseResponder {
12460 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12461 tx_id: u32,
12462}
12463
12464impl std::ops::Drop for NodeCloseResponder {
12468 fn drop(&mut self) {
12469 self.control_handle.shutdown();
12470 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12472 }
12473}
12474
12475impl fdomain_client::fidl::Responder for NodeCloseResponder {
12476 type ControlHandle = NodeControlHandle;
12477
12478 fn control_handle(&self) -> &NodeControlHandle {
12479 &self.control_handle
12480 }
12481
12482 fn drop_without_shutdown(mut self) {
12483 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12485 std::mem::forget(self);
12487 }
12488}
12489
12490impl NodeCloseResponder {
12491 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12495 let _result = self.send_raw(result);
12496 if _result.is_err() {
12497 self.control_handle.shutdown();
12498 }
12499 self.drop_without_shutdown();
12500 _result
12501 }
12502
12503 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12505 let _result = self.send_raw(result);
12506 self.drop_without_shutdown();
12507 _result
12508 }
12509
12510 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12511 self.control_handle
12512 .inner
12513 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12514 result,
12515 self.tx_id,
12516 0x5ac5d459ad7f657e,
12517 fidl::encoding::DynamicFlags::empty(),
12518 )
12519 }
12520}
12521
12522#[must_use = "FIDL methods require a response to be sent"]
12523#[derive(Debug)]
12524pub struct NodeQueryResponder {
12525 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12526 tx_id: u32,
12527}
12528
12529impl std::ops::Drop for NodeQueryResponder {
12533 fn drop(&mut self) {
12534 self.control_handle.shutdown();
12535 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12537 }
12538}
12539
12540impl fdomain_client::fidl::Responder for NodeQueryResponder {
12541 type ControlHandle = NodeControlHandle;
12542
12543 fn control_handle(&self) -> &NodeControlHandle {
12544 &self.control_handle
12545 }
12546
12547 fn drop_without_shutdown(mut self) {
12548 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12550 std::mem::forget(self);
12552 }
12553}
12554
12555impl NodeQueryResponder {
12556 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12560 let _result = self.send_raw(protocol);
12561 if _result.is_err() {
12562 self.control_handle.shutdown();
12563 }
12564 self.drop_without_shutdown();
12565 _result
12566 }
12567
12568 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12570 let _result = self.send_raw(protocol);
12571 self.drop_without_shutdown();
12572 _result
12573 }
12574
12575 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12576 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
12577 (protocol,),
12578 self.tx_id,
12579 0x2658edee9decfc06,
12580 fidl::encoding::DynamicFlags::empty(),
12581 )
12582 }
12583}
12584
12585#[must_use = "FIDL methods require a response to be sent"]
12586#[derive(Debug)]
12587pub struct NodeDeprecatedGetAttrResponder {
12588 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12589 tx_id: u32,
12590}
12591
12592impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
12596 fn drop(&mut self) {
12597 self.control_handle.shutdown();
12598 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12600 }
12601}
12602
12603impl fdomain_client::fidl::Responder for NodeDeprecatedGetAttrResponder {
12604 type ControlHandle = NodeControlHandle;
12605
12606 fn control_handle(&self) -> &NodeControlHandle {
12607 &self.control_handle
12608 }
12609
12610 fn drop_without_shutdown(mut self) {
12611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12613 std::mem::forget(self);
12615 }
12616}
12617
12618impl NodeDeprecatedGetAttrResponder {
12619 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12623 let _result = self.send_raw(s, attributes);
12624 if _result.is_err() {
12625 self.control_handle.shutdown();
12626 }
12627 self.drop_without_shutdown();
12628 _result
12629 }
12630
12631 pub fn send_no_shutdown_on_err(
12633 self,
12634 mut s: i32,
12635 mut attributes: &NodeAttributes,
12636 ) -> Result<(), fidl::Error> {
12637 let _result = self.send_raw(s, attributes);
12638 self.drop_without_shutdown();
12639 _result
12640 }
12641
12642 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12643 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
12644 (s, attributes),
12645 self.tx_id,
12646 0x78985e216314dafd,
12647 fidl::encoding::DynamicFlags::empty(),
12648 )
12649 }
12650}
12651
12652#[must_use = "FIDL methods require a response to be sent"]
12653#[derive(Debug)]
12654pub struct NodeDeprecatedSetAttrResponder {
12655 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12656 tx_id: u32,
12657}
12658
12659impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
12663 fn drop(&mut self) {
12664 self.control_handle.shutdown();
12665 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12667 }
12668}
12669
12670impl fdomain_client::fidl::Responder for NodeDeprecatedSetAttrResponder {
12671 type ControlHandle = NodeControlHandle;
12672
12673 fn control_handle(&self) -> &NodeControlHandle {
12674 &self.control_handle
12675 }
12676
12677 fn drop_without_shutdown(mut self) {
12678 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12680 std::mem::forget(self);
12682 }
12683}
12684
12685impl NodeDeprecatedSetAttrResponder {
12686 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12690 let _result = self.send_raw(s);
12691 if _result.is_err() {
12692 self.control_handle.shutdown();
12693 }
12694 self.drop_without_shutdown();
12695 _result
12696 }
12697
12698 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12700 let _result = self.send_raw(s);
12701 self.drop_without_shutdown();
12702 _result
12703 }
12704
12705 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12706 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
12707 (s,),
12708 self.tx_id,
12709 0x4186c0f40d938f46,
12710 fidl::encoding::DynamicFlags::empty(),
12711 )
12712 }
12713}
12714
12715#[must_use = "FIDL methods require a response to be sent"]
12716#[derive(Debug)]
12717pub struct NodeDeprecatedGetFlagsResponder {
12718 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12719 tx_id: u32,
12720}
12721
12722impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
12726 fn drop(&mut self) {
12727 self.control_handle.shutdown();
12728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12730 }
12731}
12732
12733impl fdomain_client::fidl::Responder for NodeDeprecatedGetFlagsResponder {
12734 type ControlHandle = NodeControlHandle;
12735
12736 fn control_handle(&self) -> &NodeControlHandle {
12737 &self.control_handle
12738 }
12739
12740 fn drop_without_shutdown(mut self) {
12741 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12743 std::mem::forget(self);
12745 }
12746}
12747
12748impl NodeDeprecatedGetFlagsResponder {
12749 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12753 let _result = self.send_raw(s, flags);
12754 if _result.is_err() {
12755 self.control_handle.shutdown();
12756 }
12757 self.drop_without_shutdown();
12758 _result
12759 }
12760
12761 pub fn send_no_shutdown_on_err(
12763 self,
12764 mut s: i32,
12765 mut flags: OpenFlags,
12766 ) -> Result<(), fidl::Error> {
12767 let _result = self.send_raw(s, flags);
12768 self.drop_without_shutdown();
12769 _result
12770 }
12771
12772 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12773 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
12774 (s, flags),
12775 self.tx_id,
12776 0x5b88fffb8eda3aa1,
12777 fidl::encoding::DynamicFlags::empty(),
12778 )
12779 }
12780}
12781
12782#[must_use = "FIDL methods require a response to be sent"]
12783#[derive(Debug)]
12784pub struct NodeDeprecatedSetFlagsResponder {
12785 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12786 tx_id: u32,
12787}
12788
12789impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
12793 fn drop(&mut self) {
12794 self.control_handle.shutdown();
12795 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12797 }
12798}
12799
12800impl fdomain_client::fidl::Responder for NodeDeprecatedSetFlagsResponder {
12801 type ControlHandle = NodeControlHandle;
12802
12803 fn control_handle(&self) -> &NodeControlHandle {
12804 &self.control_handle
12805 }
12806
12807 fn drop_without_shutdown(mut self) {
12808 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12810 std::mem::forget(self);
12812 }
12813}
12814
12815impl NodeDeprecatedSetFlagsResponder {
12816 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12820 let _result = self.send_raw(s);
12821 if _result.is_err() {
12822 self.control_handle.shutdown();
12823 }
12824 self.drop_without_shutdown();
12825 _result
12826 }
12827
12828 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12830 let _result = self.send_raw(s);
12831 self.drop_without_shutdown();
12832 _result
12833 }
12834
12835 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12836 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
12837 (s,),
12838 self.tx_id,
12839 0x5295b76c71fde733,
12840 fidl::encoding::DynamicFlags::empty(),
12841 )
12842 }
12843}
12844
12845#[must_use = "FIDL methods require a response to be sent"]
12846#[derive(Debug)]
12847pub struct NodeGetFlagsResponder {
12848 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12849 tx_id: u32,
12850}
12851
12852impl std::ops::Drop for NodeGetFlagsResponder {
12856 fn drop(&mut self) {
12857 self.control_handle.shutdown();
12858 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12860 }
12861}
12862
12863impl fdomain_client::fidl::Responder for NodeGetFlagsResponder {
12864 type ControlHandle = NodeControlHandle;
12865
12866 fn control_handle(&self) -> &NodeControlHandle {
12867 &self.control_handle
12868 }
12869
12870 fn drop_without_shutdown(mut self) {
12871 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12873 std::mem::forget(self);
12875 }
12876}
12877
12878impl NodeGetFlagsResponder {
12879 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12883 let _result = self.send_raw(result);
12884 if _result.is_err() {
12885 self.control_handle.shutdown();
12886 }
12887 self.drop_without_shutdown();
12888 _result
12889 }
12890
12891 pub fn send_no_shutdown_on_err(
12893 self,
12894 mut result: Result<Flags, i32>,
12895 ) -> Result<(), fidl::Error> {
12896 let _result = self.send_raw(result);
12897 self.drop_without_shutdown();
12898 _result
12899 }
12900
12901 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12902 self.control_handle
12903 .inner
12904 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
12905 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
12906 self.tx_id,
12907 0x176eb318f64ec23,
12908 fidl::encoding::DynamicFlags::FLEXIBLE,
12909 )
12910 }
12911}
12912
12913#[must_use = "FIDL methods require a response to be sent"]
12914#[derive(Debug)]
12915pub struct NodeSetFlagsResponder {
12916 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12917 tx_id: u32,
12918}
12919
12920impl std::ops::Drop for NodeSetFlagsResponder {
12924 fn drop(&mut self) {
12925 self.control_handle.shutdown();
12926 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12928 }
12929}
12930
12931impl fdomain_client::fidl::Responder for NodeSetFlagsResponder {
12932 type ControlHandle = NodeControlHandle;
12933
12934 fn control_handle(&self) -> &NodeControlHandle {
12935 &self.control_handle
12936 }
12937
12938 fn drop_without_shutdown(mut self) {
12939 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12941 std::mem::forget(self);
12943 }
12944}
12945
12946impl NodeSetFlagsResponder {
12947 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12951 let _result = self.send_raw(result);
12952 if _result.is_err() {
12953 self.control_handle.shutdown();
12954 }
12955 self.drop_without_shutdown();
12956 _result
12957 }
12958
12959 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12961 let _result = self.send_raw(result);
12962 self.drop_without_shutdown();
12963 _result
12964 }
12965
12966 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12967 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12968 fidl::encoding::EmptyStruct,
12969 i32,
12970 >>(
12971 fidl::encoding::FlexibleResult::new(result),
12972 self.tx_id,
12973 0x55a8028685791ea8,
12974 fidl::encoding::DynamicFlags::FLEXIBLE,
12975 )
12976 }
12977}
12978
12979#[must_use = "FIDL methods require a response to be sent"]
12980#[derive(Debug)]
12981pub struct NodeQueryFilesystemResponder {
12982 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12983 tx_id: u32,
12984}
12985
12986impl std::ops::Drop for NodeQueryFilesystemResponder {
12990 fn drop(&mut self) {
12991 self.control_handle.shutdown();
12992 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12994 }
12995}
12996
12997impl fdomain_client::fidl::Responder for NodeQueryFilesystemResponder {
12998 type ControlHandle = NodeControlHandle;
12999
13000 fn control_handle(&self) -> &NodeControlHandle {
13001 &self.control_handle
13002 }
13003
13004 fn drop_without_shutdown(mut self) {
13005 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13007 std::mem::forget(self);
13009 }
13010}
13011
13012impl NodeQueryFilesystemResponder {
13013 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13017 let _result = self.send_raw(s, info);
13018 if _result.is_err() {
13019 self.control_handle.shutdown();
13020 }
13021 self.drop_without_shutdown();
13022 _result
13023 }
13024
13025 pub fn send_no_shutdown_on_err(
13027 self,
13028 mut s: i32,
13029 mut info: Option<&FilesystemInfo>,
13030 ) -> Result<(), fidl::Error> {
13031 let _result = self.send_raw(s, info);
13032 self.drop_without_shutdown();
13033 _result
13034 }
13035
13036 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13037 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
13038 (s, info),
13039 self.tx_id,
13040 0x6f344a1c6b0a0610,
13041 fidl::encoding::DynamicFlags::empty(),
13042 )
13043 }
13044}
13045
13046#[must_use = "FIDL methods require a response to be sent"]
13047#[derive(Debug)]
13048pub struct NodeGetAttributesResponder {
13049 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13050 tx_id: u32,
13051}
13052
13053impl std::ops::Drop for NodeGetAttributesResponder {
13057 fn drop(&mut self) {
13058 self.control_handle.shutdown();
13059 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13061 }
13062}
13063
13064impl fdomain_client::fidl::Responder for NodeGetAttributesResponder {
13065 type ControlHandle = NodeControlHandle;
13066
13067 fn control_handle(&self) -> &NodeControlHandle {
13068 &self.control_handle
13069 }
13070
13071 fn drop_without_shutdown(mut self) {
13072 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13074 std::mem::forget(self);
13076 }
13077}
13078
13079impl NodeGetAttributesResponder {
13080 pub fn send(
13084 self,
13085 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13086 ) -> Result<(), fidl::Error> {
13087 let _result = self.send_raw(result);
13088 if _result.is_err() {
13089 self.control_handle.shutdown();
13090 }
13091 self.drop_without_shutdown();
13092 _result
13093 }
13094
13095 pub fn send_no_shutdown_on_err(
13097 self,
13098 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13099 ) -> Result<(), fidl::Error> {
13100 let _result = self.send_raw(result);
13101 self.drop_without_shutdown();
13102 _result
13103 }
13104
13105 fn send_raw(
13106 &self,
13107 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13108 ) -> Result<(), fidl::Error> {
13109 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
13110 result,
13111 self.tx_id,
13112 0x3d4396a638ea053b,
13113 fidl::encoding::DynamicFlags::empty(),
13114 )
13115 }
13116}
13117
13118#[must_use = "FIDL methods require a response to be sent"]
13119#[derive(Debug)]
13120pub struct NodeUpdateAttributesResponder {
13121 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13122 tx_id: u32,
13123}
13124
13125impl std::ops::Drop for NodeUpdateAttributesResponder {
13129 fn drop(&mut self) {
13130 self.control_handle.shutdown();
13131 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13133 }
13134}
13135
13136impl fdomain_client::fidl::Responder for NodeUpdateAttributesResponder {
13137 type ControlHandle = NodeControlHandle;
13138
13139 fn control_handle(&self) -> &NodeControlHandle {
13140 &self.control_handle
13141 }
13142
13143 fn drop_without_shutdown(mut self) {
13144 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13146 std::mem::forget(self);
13148 }
13149}
13150
13151impl NodeUpdateAttributesResponder {
13152 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13156 let _result = self.send_raw(result);
13157 if _result.is_err() {
13158 self.control_handle.shutdown();
13159 }
13160 self.drop_without_shutdown();
13161 _result
13162 }
13163
13164 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13166 let _result = self.send_raw(result);
13167 self.drop_without_shutdown();
13168 _result
13169 }
13170
13171 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13172 self.control_handle
13173 .inner
13174 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13175 result,
13176 self.tx_id,
13177 0x3308c1da5a89bf08,
13178 fidl::encoding::DynamicFlags::empty(),
13179 )
13180 }
13181}
13182
13183#[must_use = "FIDL methods require a response to be sent"]
13184#[derive(Debug)]
13185pub struct NodeSyncResponder {
13186 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13187 tx_id: u32,
13188}
13189
13190impl std::ops::Drop for NodeSyncResponder {
13194 fn drop(&mut self) {
13195 self.control_handle.shutdown();
13196 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13198 }
13199}
13200
13201impl fdomain_client::fidl::Responder for NodeSyncResponder {
13202 type ControlHandle = NodeControlHandle;
13203
13204 fn control_handle(&self) -> &NodeControlHandle {
13205 &self.control_handle
13206 }
13207
13208 fn drop_without_shutdown(mut self) {
13209 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13211 std::mem::forget(self);
13213 }
13214}
13215
13216impl NodeSyncResponder {
13217 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13221 let _result = self.send_raw(result);
13222 if _result.is_err() {
13223 self.control_handle.shutdown();
13224 }
13225 self.drop_without_shutdown();
13226 _result
13227 }
13228
13229 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13231 let _result = self.send_raw(result);
13232 self.drop_without_shutdown();
13233 _result
13234 }
13235
13236 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13237 self.control_handle
13238 .inner
13239 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13240 result,
13241 self.tx_id,
13242 0x2c5c27ca0ab5dc49,
13243 fidl::encoding::DynamicFlags::empty(),
13244 )
13245 }
13246}
13247
13248#[must_use = "FIDL methods require a response to be sent"]
13249#[derive(Debug)]
13250pub struct NodeGetExtendedAttributeResponder {
13251 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13252 tx_id: u32,
13253}
13254
13255impl std::ops::Drop for NodeGetExtendedAttributeResponder {
13259 fn drop(&mut self) {
13260 self.control_handle.shutdown();
13261 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13263 }
13264}
13265
13266impl fdomain_client::fidl::Responder for NodeGetExtendedAttributeResponder {
13267 type ControlHandle = NodeControlHandle;
13268
13269 fn control_handle(&self) -> &NodeControlHandle {
13270 &self.control_handle
13271 }
13272
13273 fn drop_without_shutdown(mut self) {
13274 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13276 std::mem::forget(self);
13278 }
13279}
13280
13281impl NodeGetExtendedAttributeResponder {
13282 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13286 let _result = self.send_raw(result);
13287 if _result.is_err() {
13288 self.control_handle.shutdown();
13289 }
13290 self.drop_without_shutdown();
13291 _result
13292 }
13293
13294 pub fn send_no_shutdown_on_err(
13296 self,
13297 mut result: Result<ExtendedAttributeValue, i32>,
13298 ) -> Result<(), fidl::Error> {
13299 let _result = self.send_raw(result);
13300 self.drop_without_shutdown();
13301 _result
13302 }
13303
13304 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13305 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
13306 result.as_mut().map_err(|e| *e),
13307 self.tx_id,
13308 0x45ffa3ccfdeb76db,
13309 fidl::encoding::DynamicFlags::empty(),
13310 )
13311 }
13312}
13313
13314#[must_use = "FIDL methods require a response to be sent"]
13315#[derive(Debug)]
13316pub struct NodeSetExtendedAttributeResponder {
13317 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13318 tx_id: u32,
13319}
13320
13321impl std::ops::Drop for NodeSetExtendedAttributeResponder {
13325 fn drop(&mut self) {
13326 self.control_handle.shutdown();
13327 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13329 }
13330}
13331
13332impl fdomain_client::fidl::Responder for NodeSetExtendedAttributeResponder {
13333 type ControlHandle = NodeControlHandle;
13334
13335 fn control_handle(&self) -> &NodeControlHandle {
13336 &self.control_handle
13337 }
13338
13339 fn drop_without_shutdown(mut self) {
13340 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13342 std::mem::forget(self);
13344 }
13345}
13346
13347impl NodeSetExtendedAttributeResponder {
13348 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13352 let _result = self.send_raw(result);
13353 if _result.is_err() {
13354 self.control_handle.shutdown();
13355 }
13356 self.drop_without_shutdown();
13357 _result
13358 }
13359
13360 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13362 let _result = self.send_raw(result);
13363 self.drop_without_shutdown();
13364 _result
13365 }
13366
13367 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13368 self.control_handle
13369 .inner
13370 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13371 result,
13372 self.tx_id,
13373 0x4a951362f681f23c,
13374 fidl::encoding::DynamicFlags::empty(),
13375 )
13376 }
13377}
13378
13379#[must_use = "FIDL methods require a response to be sent"]
13380#[derive(Debug)]
13381pub struct NodeRemoveExtendedAttributeResponder {
13382 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13383 tx_id: u32,
13384}
13385
13386impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
13390 fn drop(&mut self) {
13391 self.control_handle.shutdown();
13392 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13394 }
13395}
13396
13397impl fdomain_client::fidl::Responder for NodeRemoveExtendedAttributeResponder {
13398 type ControlHandle = NodeControlHandle;
13399
13400 fn control_handle(&self) -> &NodeControlHandle {
13401 &self.control_handle
13402 }
13403
13404 fn drop_without_shutdown(mut self) {
13405 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13407 std::mem::forget(self);
13409 }
13410}
13411
13412impl NodeRemoveExtendedAttributeResponder {
13413 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13417 let _result = self.send_raw(result);
13418 if _result.is_err() {
13419 self.control_handle.shutdown();
13420 }
13421 self.drop_without_shutdown();
13422 _result
13423 }
13424
13425 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13427 let _result = self.send_raw(result);
13428 self.drop_without_shutdown();
13429 _result
13430 }
13431
13432 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13433 self.control_handle
13434 .inner
13435 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13436 result,
13437 self.tx_id,
13438 0x7a0b9f3a9bf9032d,
13439 fidl::encoding::DynamicFlags::empty(),
13440 )
13441 }
13442}
13443
13444#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13445pub struct ReadableMarker;
13446
13447impl fdomain_client::fidl::ProtocolMarker for ReadableMarker {
13448 type Proxy = ReadableProxy;
13449 type RequestStream = ReadableRequestStream;
13450
13451 const DEBUG_NAME: &'static str = "(anonymous) Readable";
13452}
13453pub type ReadableReadResult = Result<Vec<u8>, i32>;
13454
13455pub trait ReadableProxyInterface: Send + Sync {
13456 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
13457 + Send;
13458 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
13459}
13460
13461#[derive(Debug, Clone)]
13462pub struct ReadableProxy {
13463 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13464}
13465
13466impl fdomain_client::fidl::Proxy for ReadableProxy {
13467 type Protocol = ReadableMarker;
13468
13469 fn from_channel(inner: fdomain_client::Channel) -> Self {
13470 Self::new(inner)
13471 }
13472
13473 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13474 self.client.into_channel().map_err(|client| Self { client })
13475 }
13476
13477 fn as_channel(&self) -> &fdomain_client::Channel {
13478 self.client.as_channel()
13479 }
13480}
13481
13482impl ReadableProxy {
13483 pub fn new(channel: fdomain_client::Channel) -> Self {
13485 let protocol_name = <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13486 Self { client: fidl::client::Client::new(channel, protocol_name) }
13487 }
13488
13489 pub fn take_event_stream(&self) -> ReadableEventStream {
13495 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
13496 }
13497
13498 pub fn r#read(
13517 &self,
13518 mut count: u64,
13519 ) -> fidl::client::QueryResponseFut<
13520 ReadableReadResult,
13521 fdomain_client::fidl::FDomainResourceDialect,
13522 > {
13523 ReadableProxyInterface::r#read(self, count)
13524 }
13525}
13526
13527impl ReadableProxyInterface for ReadableProxy {
13528 type ReadResponseFut = fidl::client::QueryResponseFut<
13529 ReadableReadResult,
13530 fdomain_client::fidl::FDomainResourceDialect,
13531 >;
13532 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
13533 fn _decode(
13534 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13535 ) -> Result<ReadableReadResult, fidl::Error> {
13536 let _response = fidl::client::decode_transaction_body::<
13537 fidl::encoding::ResultType<ReadableReadResponse, i32>,
13538 fdomain_client::fidl::FDomainResourceDialect,
13539 0x57e419a298c8ede,
13540 >(_buf?)?;
13541 Ok(_response.map(|x| x.data))
13542 }
13543 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
13544 (count,),
13545 0x57e419a298c8ede,
13546 fidl::encoding::DynamicFlags::empty(),
13547 _decode,
13548 )
13549 }
13550}
13551
13552pub struct ReadableEventStream {
13553 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13554}
13555
13556impl std::marker::Unpin for ReadableEventStream {}
13557
13558impl futures::stream::FusedStream for ReadableEventStream {
13559 fn is_terminated(&self) -> bool {
13560 self.event_receiver.is_terminated()
13561 }
13562}
13563
13564impl futures::Stream for ReadableEventStream {
13565 type Item = Result<ReadableEvent, fidl::Error>;
13566
13567 fn poll_next(
13568 mut self: std::pin::Pin<&mut Self>,
13569 cx: &mut std::task::Context<'_>,
13570 ) -> std::task::Poll<Option<Self::Item>> {
13571 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13572 &mut self.event_receiver,
13573 cx
13574 )?) {
13575 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
13576 None => std::task::Poll::Ready(None),
13577 }
13578 }
13579}
13580
13581#[derive(Debug)]
13582pub enum ReadableEvent {}
13583
13584impl ReadableEvent {
13585 fn decode(
13587 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13588 ) -> Result<ReadableEvent, fidl::Error> {
13589 let (bytes, _handles) = buf.split_mut();
13590 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13591 debug_assert_eq!(tx_header.tx_id, 0);
13592 match tx_header.ordinal {
13593 _ => Err(fidl::Error::UnknownOrdinal {
13594 ordinal: tx_header.ordinal,
13595 protocol_name: <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13596 }),
13597 }
13598 }
13599}
13600
13601pub struct ReadableRequestStream {
13603 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13604 is_terminated: bool,
13605}
13606
13607impl std::marker::Unpin for ReadableRequestStream {}
13608
13609impl futures::stream::FusedStream for ReadableRequestStream {
13610 fn is_terminated(&self) -> bool {
13611 self.is_terminated
13612 }
13613}
13614
13615impl fdomain_client::fidl::RequestStream for ReadableRequestStream {
13616 type Protocol = ReadableMarker;
13617 type ControlHandle = ReadableControlHandle;
13618
13619 fn from_channel(channel: fdomain_client::Channel) -> Self {
13620 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
13621 }
13622
13623 fn control_handle(&self) -> Self::ControlHandle {
13624 ReadableControlHandle { inner: self.inner.clone() }
13625 }
13626
13627 fn into_inner(
13628 self,
13629 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
13630 {
13631 (self.inner, self.is_terminated)
13632 }
13633
13634 fn from_inner(
13635 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13636 is_terminated: bool,
13637 ) -> Self {
13638 Self { inner, is_terminated }
13639 }
13640}
13641
13642impl futures::Stream for ReadableRequestStream {
13643 type Item = Result<ReadableRequest, fidl::Error>;
13644
13645 fn poll_next(
13646 mut self: std::pin::Pin<&mut Self>,
13647 cx: &mut std::task::Context<'_>,
13648 ) -> std::task::Poll<Option<Self::Item>> {
13649 let this = &mut *self;
13650 if this.inner.check_shutdown(cx) {
13651 this.is_terminated = true;
13652 return std::task::Poll::Ready(None);
13653 }
13654 if this.is_terminated {
13655 panic!("polled ReadableRequestStream after completion");
13656 }
13657 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
13658 |bytes, handles| {
13659 match this.inner.channel().read_etc(cx, bytes, handles) {
13660 std::task::Poll::Ready(Ok(())) => {}
13661 std::task::Poll::Pending => return std::task::Poll::Pending,
13662 std::task::Poll::Ready(Err(None)) => {
13663 this.is_terminated = true;
13664 return std::task::Poll::Ready(None);
13665 }
13666 std::task::Poll::Ready(Err(Some(e))) => {
13667 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
13668 e.into(),
13669 ))));
13670 }
13671 }
13672
13673 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13675
13676 std::task::Poll::Ready(Some(match header.ordinal {
13677 0x57e419a298c8ede => {
13678 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
13679 let mut req = fidl::new_empty!(
13680 ReadableReadRequest,
13681 fdomain_client::fidl::FDomainResourceDialect
13682 );
13683 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
13684 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
13685 Ok(ReadableRequest::Read {
13686 count: req.count,
13687
13688 responder: ReadableReadResponder {
13689 control_handle: std::mem::ManuallyDrop::new(control_handle),
13690 tx_id: header.tx_id,
13691 },
13692 })
13693 }
13694 _ => Err(fidl::Error::UnknownOrdinal {
13695 ordinal: header.ordinal,
13696 protocol_name:
13697 <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13698 }),
13699 }))
13700 },
13701 )
13702 }
13703}
13704
13705#[derive(Debug)]
13706pub enum ReadableRequest {
13707 Read { count: u64, responder: ReadableReadResponder },
13726}
13727
13728impl ReadableRequest {
13729 #[allow(irrefutable_let_patterns)]
13730 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
13731 if let ReadableRequest::Read { count, responder } = self {
13732 Some((count, responder))
13733 } else {
13734 None
13735 }
13736 }
13737
13738 pub fn method_name(&self) -> &'static str {
13740 match *self {
13741 ReadableRequest::Read { .. } => "read",
13742 }
13743 }
13744}
13745
13746#[derive(Debug, Clone)]
13747pub struct ReadableControlHandle {
13748 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13749}
13750
13751impl fdomain_client::fidl::ControlHandle for ReadableControlHandle {
13752 fn shutdown(&self) {
13753 self.inner.shutdown()
13754 }
13755
13756 fn is_closed(&self) -> bool {
13757 self.inner.channel().is_closed()
13758 }
13759 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
13760 self.inner.channel().on_closed()
13761 }
13762}
13763
13764impl ReadableControlHandle {}
13765
13766#[must_use = "FIDL methods require a response to be sent"]
13767#[derive(Debug)]
13768pub struct ReadableReadResponder {
13769 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
13770 tx_id: u32,
13771}
13772
13773impl std::ops::Drop for ReadableReadResponder {
13777 fn drop(&mut self) {
13778 self.control_handle.shutdown();
13779 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13781 }
13782}
13783
13784impl fdomain_client::fidl::Responder for ReadableReadResponder {
13785 type ControlHandle = ReadableControlHandle;
13786
13787 fn control_handle(&self) -> &ReadableControlHandle {
13788 &self.control_handle
13789 }
13790
13791 fn drop_without_shutdown(mut self) {
13792 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13794 std::mem::forget(self);
13796 }
13797}
13798
13799impl ReadableReadResponder {
13800 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13804 let _result = self.send_raw(result);
13805 if _result.is_err() {
13806 self.control_handle.shutdown();
13807 }
13808 self.drop_without_shutdown();
13809 _result
13810 }
13811
13812 pub fn send_no_shutdown_on_err(
13814 self,
13815 mut result: Result<&[u8], i32>,
13816 ) -> Result<(), fidl::Error> {
13817 let _result = self.send_raw(result);
13818 self.drop_without_shutdown();
13819 _result
13820 }
13821
13822 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13823 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
13824 result.map(|data| (data,)),
13825 self.tx_id,
13826 0x57e419a298c8ede,
13827 fidl::encoding::DynamicFlags::empty(),
13828 )
13829 }
13830}
13831
13832#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13833pub struct SymlinkMarker;
13834
13835impl fdomain_client::fidl::ProtocolMarker for SymlinkMarker {
13836 type Proxy = SymlinkProxy;
13837 type RequestStream = SymlinkRequestStream;
13838
13839 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
13840}
13841impl fdomain_client::fidl::DiscoverableProtocolMarker for SymlinkMarker {}
13842
13843pub trait SymlinkProxyInterface: Send + Sync {
13844 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
13845 + Send;
13846 fn r#link_into(
13847 &self,
13848 dst_parent_token: fdomain_client::Event,
13849 dst: &str,
13850 ) -> Self::LinkIntoResponseFut;
13851 fn r#clone(
13852 &self,
13853 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13854 ) -> Result<(), fidl::Error>;
13855 type CloseResponseFut: std::future::Future<
13856 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
13857 > + Send;
13858 fn r#close(&self) -> Self::CloseResponseFut;
13859 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
13860 fn r#query(&self) -> Self::QueryResponseFut;
13861 fn r#deprecated_clone(
13862 &self,
13863 flags: OpenFlags,
13864 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
13865 ) -> Result<(), fidl::Error>;
13866 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
13867 + Send;
13868 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
13869 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
13870 fn r#deprecated_set_attr(
13871 &self,
13872 flags: NodeAttributeFlags,
13873 attributes: &NodeAttributes,
13874 ) -> Self::DeprecatedSetAttrResponseFut;
13875 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
13876 + Send;
13877 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
13878 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
13879 + Send;
13880 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
13881 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
13882 + Send;
13883 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
13884 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
13885 + Send;
13886 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
13887 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
13888 + Send;
13889 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
13890 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
13891 + Send;
13892 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
13893 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
13894 + Send;
13895 fn r#update_attributes(
13896 &self,
13897 payload: &MutableNodeAttributes,
13898 ) -> Self::UpdateAttributesResponseFut;
13899 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
13900 fn r#sync(&self) -> Self::SyncResponseFut;
13901 fn r#list_extended_attributes(
13902 &self,
13903 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
13904 ) -> Result<(), fidl::Error>;
13905 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
13906 + Send;
13907 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
13908 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
13909 + Send;
13910 fn r#set_extended_attribute(
13911 &self,
13912 name: &[u8],
13913 value: ExtendedAttributeValue,
13914 mode: SetExtendedAttributeMode,
13915 ) -> Self::SetExtendedAttributeResponseFut;
13916 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
13917 + Send;
13918 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
13919 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
13920 fn r#describe(&self) -> Self::DescribeResponseFut;
13921}
13922
13923#[derive(Debug, Clone)]
13924pub struct SymlinkProxy {
13925 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13926}
13927
13928impl fdomain_client::fidl::Proxy for SymlinkProxy {
13929 type Protocol = SymlinkMarker;
13930
13931 fn from_channel(inner: fdomain_client::Channel) -> Self {
13932 Self::new(inner)
13933 }
13934
13935 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13936 self.client.into_channel().map_err(|client| Self { client })
13937 }
13938
13939 fn as_channel(&self) -> &fdomain_client::Channel {
13940 self.client.as_channel()
13941 }
13942}
13943
13944impl SymlinkProxy {
13945 pub fn new(channel: fdomain_client::Channel) -> Self {
13947 let protocol_name = <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13948 Self { client: fidl::client::Client::new(channel, protocol_name) }
13949 }
13950
13951 pub fn take_event_stream(&self) -> SymlinkEventStream {
13957 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
13958 }
13959
13960 pub fn r#link_into(
13983 &self,
13984 mut dst_parent_token: fdomain_client::Event,
13985 mut dst: &str,
13986 ) -> fidl::client::QueryResponseFut<
13987 LinkableLinkIntoResult,
13988 fdomain_client::fidl::FDomainResourceDialect,
13989 > {
13990 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
13991 }
13992
13993 pub fn r#clone(
13994 &self,
13995 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13996 ) -> Result<(), fidl::Error> {
13997 SymlinkProxyInterface::r#clone(self, request)
13998 }
13999
14000 pub fn r#close(
14011 &self,
14012 ) -> fidl::client::QueryResponseFut<
14013 fdomain_fuchsia_unknown::CloseableCloseResult,
14014 fdomain_client::fidl::FDomainResourceDialect,
14015 > {
14016 SymlinkProxyInterface::r#close(self)
14017 }
14018
14019 pub fn r#query(
14020 &self,
14021 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
14022 SymlinkProxyInterface::r#query(self)
14023 }
14024
14025 pub fn r#deprecated_clone(
14027 &self,
14028 mut flags: OpenFlags,
14029 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14030 ) -> Result<(), fidl::Error> {
14031 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
14032 }
14033
14034 pub fn r#deprecated_get_attr(
14036 &self,
14037 ) -> fidl::client::QueryResponseFut<
14038 (i32, NodeAttributes),
14039 fdomain_client::fidl::FDomainResourceDialect,
14040 > {
14041 SymlinkProxyInterface::r#deprecated_get_attr(self)
14042 }
14043
14044 pub fn r#deprecated_set_attr(
14046 &self,
14047 mut flags: NodeAttributeFlags,
14048 mut attributes: &NodeAttributes,
14049 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14050 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
14051 }
14052
14053 pub fn r#deprecated_get_flags(
14055 &self,
14056 ) -> fidl::client::QueryResponseFut<
14057 (i32, OpenFlags),
14058 fdomain_client::fidl::FDomainResourceDialect,
14059 > {
14060 SymlinkProxyInterface::r#deprecated_get_flags(self)
14061 }
14062
14063 pub fn r#deprecated_set_flags(
14065 &self,
14066 mut flags: OpenFlags,
14067 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14068 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
14069 }
14070
14071 pub fn r#get_flags(
14080 &self,
14081 ) -> fidl::client::QueryResponseFut<
14082 NodeGetFlagsResult,
14083 fdomain_client::fidl::FDomainResourceDialect,
14084 > {
14085 SymlinkProxyInterface::r#get_flags(self)
14086 }
14087
14088 pub fn r#set_flags(
14098 &self,
14099 mut flags: Flags,
14100 ) -> fidl::client::QueryResponseFut<
14101 NodeSetFlagsResult,
14102 fdomain_client::fidl::FDomainResourceDialect,
14103 > {
14104 SymlinkProxyInterface::r#set_flags(self, flags)
14105 }
14106
14107 pub fn r#query_filesystem(
14109 &self,
14110 ) -> fidl::client::QueryResponseFut<
14111 (i32, Option<Box<FilesystemInfo>>),
14112 fdomain_client::fidl::FDomainResourceDialect,
14113 > {
14114 SymlinkProxyInterface::r#query_filesystem(self)
14115 }
14116
14117 pub fn r#get_attributes(
14131 &self,
14132 mut query: NodeAttributesQuery,
14133 ) -> fidl::client::QueryResponseFut<
14134 NodeGetAttributesResult,
14135 fdomain_client::fidl::FDomainResourceDialect,
14136 > {
14137 SymlinkProxyInterface::r#get_attributes(self, query)
14138 }
14139
14140 pub fn r#update_attributes(
14149 &self,
14150 mut payload: &MutableNodeAttributes,
14151 ) -> fidl::client::QueryResponseFut<
14152 NodeUpdateAttributesResult,
14153 fdomain_client::fidl::FDomainResourceDialect,
14154 > {
14155 SymlinkProxyInterface::r#update_attributes(self, payload)
14156 }
14157
14158 pub fn r#sync(
14168 &self,
14169 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
14170 {
14171 SymlinkProxyInterface::r#sync(self)
14172 }
14173
14174 pub fn r#list_extended_attributes(
14183 &self,
14184 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14185 ) -> Result<(), fidl::Error> {
14186 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
14187 }
14188
14189 pub fn r#get_extended_attribute(
14196 &self,
14197 mut name: &[u8],
14198 ) -> fidl::client::QueryResponseFut<
14199 NodeGetExtendedAttributeResult,
14200 fdomain_client::fidl::FDomainResourceDialect,
14201 > {
14202 SymlinkProxyInterface::r#get_extended_attribute(self, name)
14203 }
14204
14205 pub fn r#set_extended_attribute(
14213 &self,
14214 mut name: &[u8],
14215 mut value: ExtendedAttributeValue,
14216 mut mode: SetExtendedAttributeMode,
14217 ) -> fidl::client::QueryResponseFut<
14218 NodeSetExtendedAttributeResult,
14219 fdomain_client::fidl::FDomainResourceDialect,
14220 > {
14221 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
14222 }
14223
14224 pub fn r#remove_extended_attribute(
14230 &self,
14231 mut name: &[u8],
14232 ) -> fidl::client::QueryResponseFut<
14233 NodeRemoveExtendedAttributeResult,
14234 fdomain_client::fidl::FDomainResourceDialect,
14235 > {
14236 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
14237 }
14238
14239 pub fn r#describe(
14240 &self,
14241 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>
14242 {
14243 SymlinkProxyInterface::r#describe(self)
14244 }
14245}
14246
14247impl SymlinkProxyInterface for SymlinkProxy {
14248 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
14249 LinkableLinkIntoResult,
14250 fdomain_client::fidl::FDomainResourceDialect,
14251 >;
14252 fn r#link_into(
14253 &self,
14254 mut dst_parent_token: fdomain_client::Event,
14255 mut dst: &str,
14256 ) -> Self::LinkIntoResponseFut {
14257 fn _decode(
14258 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14259 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
14260 let _response = fidl::client::decode_transaction_body::<
14261 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14262 fdomain_client::fidl::FDomainResourceDialect,
14263 0x54f3949246a03e74,
14264 >(_buf?)?;
14265 Ok(_response.map(|x| x))
14266 }
14267 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
14268 (dst_parent_token, dst),
14269 0x54f3949246a03e74,
14270 fidl::encoding::DynamicFlags::empty(),
14271 _decode,
14272 )
14273 }
14274
14275 fn r#clone(
14276 &self,
14277 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14278 ) -> Result<(), fidl::Error> {
14279 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
14280 (request,),
14281 0x20d8a7aba2168a79,
14282 fidl::encoding::DynamicFlags::empty(),
14283 )
14284 }
14285
14286 type CloseResponseFut = fidl::client::QueryResponseFut<
14287 fdomain_fuchsia_unknown::CloseableCloseResult,
14288 fdomain_client::fidl::FDomainResourceDialect,
14289 >;
14290 fn r#close(&self) -> Self::CloseResponseFut {
14291 fn _decode(
14292 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14293 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
14294 let _response = fidl::client::decode_transaction_body::<
14295 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14296 fdomain_client::fidl::FDomainResourceDialect,
14297 0x5ac5d459ad7f657e,
14298 >(_buf?)?;
14299 Ok(_response.map(|x| x))
14300 }
14301 self.client.send_query_and_decode::<
14302 fidl::encoding::EmptyPayload,
14303 fdomain_fuchsia_unknown::CloseableCloseResult,
14304 >(
14305 (),
14306 0x5ac5d459ad7f657e,
14307 fidl::encoding::DynamicFlags::empty(),
14308 _decode,
14309 )
14310 }
14311
14312 type QueryResponseFut =
14313 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
14314 fn r#query(&self) -> Self::QueryResponseFut {
14315 fn _decode(
14316 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14317 ) -> Result<Vec<u8>, fidl::Error> {
14318 let _response = fidl::client::decode_transaction_body::<
14319 fdomain_fuchsia_unknown::QueryableQueryResponse,
14320 fdomain_client::fidl::FDomainResourceDialect,
14321 0x2658edee9decfc06,
14322 >(_buf?)?;
14323 Ok(_response.protocol)
14324 }
14325 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14326 (),
14327 0x2658edee9decfc06,
14328 fidl::encoding::DynamicFlags::empty(),
14329 _decode,
14330 )
14331 }
14332
14333 fn r#deprecated_clone(
14334 &self,
14335 mut flags: OpenFlags,
14336 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14337 ) -> Result<(), fidl::Error> {
14338 self.client.send::<NodeDeprecatedCloneRequest>(
14339 (flags, object),
14340 0x5a61678f293ce16f,
14341 fidl::encoding::DynamicFlags::FLEXIBLE,
14342 )
14343 }
14344
14345 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
14346 (i32, NodeAttributes),
14347 fdomain_client::fidl::FDomainResourceDialect,
14348 >;
14349 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
14350 fn _decode(
14351 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14352 ) -> Result<(i32, NodeAttributes), fidl::Error> {
14353 let _response = fidl::client::decode_transaction_body::<
14354 NodeDeprecatedGetAttrResponse,
14355 fdomain_client::fidl::FDomainResourceDialect,
14356 0x78985e216314dafd,
14357 >(_buf?)?;
14358 Ok((_response.s, _response.attributes))
14359 }
14360 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14361 (),
14362 0x78985e216314dafd,
14363 fidl::encoding::DynamicFlags::empty(),
14364 _decode,
14365 )
14366 }
14367
14368 type DeprecatedSetAttrResponseFut =
14369 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14370 fn r#deprecated_set_attr(
14371 &self,
14372 mut flags: NodeAttributeFlags,
14373 mut attributes: &NodeAttributes,
14374 ) -> Self::DeprecatedSetAttrResponseFut {
14375 fn _decode(
14376 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14377 ) -> Result<i32, fidl::Error> {
14378 let _response = fidl::client::decode_transaction_body::<
14379 NodeDeprecatedSetAttrResponse,
14380 fdomain_client::fidl::FDomainResourceDialect,
14381 0x4186c0f40d938f46,
14382 >(_buf?)?;
14383 Ok(_response.s)
14384 }
14385 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14386 (flags, attributes),
14387 0x4186c0f40d938f46,
14388 fidl::encoding::DynamicFlags::empty(),
14389 _decode,
14390 )
14391 }
14392
14393 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14394 (i32, OpenFlags),
14395 fdomain_client::fidl::FDomainResourceDialect,
14396 >;
14397 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14398 fn _decode(
14399 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14400 ) -> Result<(i32, OpenFlags), fidl::Error> {
14401 let _response = fidl::client::decode_transaction_body::<
14402 NodeDeprecatedGetFlagsResponse,
14403 fdomain_client::fidl::FDomainResourceDialect,
14404 0x5b88fffb8eda3aa1,
14405 >(_buf?)?;
14406 Ok((_response.s, _response.flags))
14407 }
14408 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14409 (),
14410 0x5b88fffb8eda3aa1,
14411 fidl::encoding::DynamicFlags::empty(),
14412 _decode,
14413 )
14414 }
14415
14416 type DeprecatedSetFlagsResponseFut =
14417 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14418 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14419 fn _decode(
14420 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14421 ) -> Result<i32, fidl::Error> {
14422 let _response = fidl::client::decode_transaction_body::<
14423 NodeDeprecatedSetFlagsResponse,
14424 fdomain_client::fidl::FDomainResourceDialect,
14425 0x5295b76c71fde733,
14426 >(_buf?)?;
14427 Ok(_response.s)
14428 }
14429 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14430 (flags,),
14431 0x5295b76c71fde733,
14432 fidl::encoding::DynamicFlags::empty(),
14433 _decode,
14434 )
14435 }
14436
14437 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14438 NodeGetFlagsResult,
14439 fdomain_client::fidl::FDomainResourceDialect,
14440 >;
14441 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14442 fn _decode(
14443 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14444 ) -> Result<NodeGetFlagsResult, fidl::Error> {
14445 let _response = fidl::client::decode_transaction_body::<
14446 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14447 fdomain_client::fidl::FDomainResourceDialect,
14448 0x176eb318f64ec23,
14449 >(_buf?)?
14450 .into_result_fdomain::<SymlinkMarker>("get_flags")?;
14451 Ok(_response.map(|x| x.flags))
14452 }
14453 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14454 (),
14455 0x176eb318f64ec23,
14456 fidl::encoding::DynamicFlags::FLEXIBLE,
14457 _decode,
14458 )
14459 }
14460
14461 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14462 NodeSetFlagsResult,
14463 fdomain_client::fidl::FDomainResourceDialect,
14464 >;
14465 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14466 fn _decode(
14467 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14468 ) -> Result<NodeSetFlagsResult, fidl::Error> {
14469 let _response = fidl::client::decode_transaction_body::<
14470 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14471 fdomain_client::fidl::FDomainResourceDialect,
14472 0x55a8028685791ea8,
14473 >(_buf?)?
14474 .into_result_fdomain::<SymlinkMarker>("set_flags")?;
14475 Ok(_response.map(|x| x))
14476 }
14477 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14478 (flags,),
14479 0x55a8028685791ea8,
14480 fidl::encoding::DynamicFlags::FLEXIBLE,
14481 _decode,
14482 )
14483 }
14484
14485 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14486 (i32, Option<Box<FilesystemInfo>>),
14487 fdomain_client::fidl::FDomainResourceDialect,
14488 >;
14489 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14490 fn _decode(
14491 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14492 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14493 let _response = fidl::client::decode_transaction_body::<
14494 NodeQueryFilesystemResponse,
14495 fdomain_client::fidl::FDomainResourceDialect,
14496 0x6f344a1c6b0a0610,
14497 >(_buf?)?;
14498 Ok((_response.s, _response.info))
14499 }
14500 self.client.send_query_and_decode::<
14501 fidl::encoding::EmptyPayload,
14502 (i32, Option<Box<FilesystemInfo>>),
14503 >(
14504 (),
14505 0x6f344a1c6b0a0610,
14506 fidl::encoding::DynamicFlags::empty(),
14507 _decode,
14508 )
14509 }
14510
14511 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14512 NodeGetAttributesResult,
14513 fdomain_client::fidl::FDomainResourceDialect,
14514 >;
14515 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14516 fn _decode(
14517 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14518 ) -> Result<NodeGetAttributesResult, fidl::Error> {
14519 let _response = fidl::client::decode_transaction_body::<
14520 fidl::encoding::ResultType<NodeAttributes2, i32>,
14521 fdomain_client::fidl::FDomainResourceDialect,
14522 0x3d4396a638ea053b,
14523 >(_buf?)?;
14524 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14525 }
14526 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14527 (query,),
14528 0x3d4396a638ea053b,
14529 fidl::encoding::DynamicFlags::empty(),
14530 _decode,
14531 )
14532 }
14533
14534 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14535 NodeUpdateAttributesResult,
14536 fdomain_client::fidl::FDomainResourceDialect,
14537 >;
14538 fn r#update_attributes(
14539 &self,
14540 mut payload: &MutableNodeAttributes,
14541 ) -> Self::UpdateAttributesResponseFut {
14542 fn _decode(
14543 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14544 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14545 let _response = fidl::client::decode_transaction_body::<
14546 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14547 fdomain_client::fidl::FDomainResourceDialect,
14548 0x3308c1da5a89bf08,
14549 >(_buf?)?;
14550 Ok(_response.map(|x| x))
14551 }
14552 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14553 payload,
14554 0x3308c1da5a89bf08,
14555 fidl::encoding::DynamicFlags::empty(),
14556 _decode,
14557 )
14558 }
14559
14560 type SyncResponseFut = fidl::client::QueryResponseFut<
14561 NodeSyncResult,
14562 fdomain_client::fidl::FDomainResourceDialect,
14563 >;
14564 fn r#sync(&self) -> Self::SyncResponseFut {
14565 fn _decode(
14566 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14567 ) -> Result<NodeSyncResult, fidl::Error> {
14568 let _response = fidl::client::decode_transaction_body::<
14569 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14570 fdomain_client::fidl::FDomainResourceDialect,
14571 0x2c5c27ca0ab5dc49,
14572 >(_buf?)?;
14573 Ok(_response.map(|x| x))
14574 }
14575 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14576 (),
14577 0x2c5c27ca0ab5dc49,
14578 fidl::encoding::DynamicFlags::empty(),
14579 _decode,
14580 )
14581 }
14582
14583 fn r#list_extended_attributes(
14584 &self,
14585 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14586 ) -> Result<(), fidl::Error> {
14587 self.client.send::<NodeListExtendedAttributesRequest>(
14588 (iterator,),
14589 0x4b61033de007fcd0,
14590 fidl::encoding::DynamicFlags::empty(),
14591 )
14592 }
14593
14594 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14595 NodeGetExtendedAttributeResult,
14596 fdomain_client::fidl::FDomainResourceDialect,
14597 >;
14598 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14599 fn _decode(
14600 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14601 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14602 let _response = fidl::client::decode_transaction_body::<
14603 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14604 fdomain_client::fidl::FDomainResourceDialect,
14605 0x45ffa3ccfdeb76db,
14606 >(_buf?)?;
14607 Ok(_response.map(|x| x))
14608 }
14609 self.client.send_query_and_decode::<
14610 NodeGetExtendedAttributeRequest,
14611 NodeGetExtendedAttributeResult,
14612 >(
14613 (name,),
14614 0x45ffa3ccfdeb76db,
14615 fidl::encoding::DynamicFlags::empty(),
14616 _decode,
14617 )
14618 }
14619
14620 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14621 NodeSetExtendedAttributeResult,
14622 fdomain_client::fidl::FDomainResourceDialect,
14623 >;
14624 fn r#set_extended_attribute(
14625 &self,
14626 mut name: &[u8],
14627 mut value: ExtendedAttributeValue,
14628 mut mode: SetExtendedAttributeMode,
14629 ) -> Self::SetExtendedAttributeResponseFut {
14630 fn _decode(
14631 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14632 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14633 let _response = fidl::client::decode_transaction_body::<
14634 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14635 fdomain_client::fidl::FDomainResourceDialect,
14636 0x4a951362f681f23c,
14637 >(_buf?)?;
14638 Ok(_response.map(|x| x))
14639 }
14640 self.client.send_query_and_decode::<
14641 NodeSetExtendedAttributeRequest,
14642 NodeSetExtendedAttributeResult,
14643 >(
14644 (name, &mut value, mode,),
14645 0x4a951362f681f23c,
14646 fidl::encoding::DynamicFlags::empty(),
14647 _decode,
14648 )
14649 }
14650
14651 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14652 NodeRemoveExtendedAttributeResult,
14653 fdomain_client::fidl::FDomainResourceDialect,
14654 >;
14655 fn r#remove_extended_attribute(
14656 &self,
14657 mut name: &[u8],
14658 ) -> Self::RemoveExtendedAttributeResponseFut {
14659 fn _decode(
14660 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14661 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14662 let _response = fidl::client::decode_transaction_body::<
14663 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14664 fdomain_client::fidl::FDomainResourceDialect,
14665 0x7a0b9f3a9bf9032d,
14666 >(_buf?)?;
14667 Ok(_response.map(|x| x))
14668 }
14669 self.client.send_query_and_decode::<
14670 NodeRemoveExtendedAttributeRequest,
14671 NodeRemoveExtendedAttributeResult,
14672 >(
14673 (name,),
14674 0x7a0b9f3a9bf9032d,
14675 fidl::encoding::DynamicFlags::empty(),
14676 _decode,
14677 )
14678 }
14679
14680 type DescribeResponseFut =
14681 fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>;
14682 fn r#describe(&self) -> Self::DescribeResponseFut {
14683 fn _decode(
14684 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14685 ) -> Result<SymlinkInfo, fidl::Error> {
14686 let _response = fidl::client::decode_transaction_body::<
14687 fidl::encoding::FlexibleType<SymlinkInfo>,
14688 fdomain_client::fidl::FDomainResourceDialect,
14689 0x742c2ea5e89831f3,
14690 >(_buf?)?
14691 .into_result_fdomain::<SymlinkMarker>("describe")?;
14692 Ok(_response)
14693 }
14694 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
14695 (),
14696 0x742c2ea5e89831f3,
14697 fidl::encoding::DynamicFlags::FLEXIBLE,
14698 _decode,
14699 )
14700 }
14701}
14702
14703pub struct SymlinkEventStream {
14704 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
14705}
14706
14707impl std::marker::Unpin for SymlinkEventStream {}
14708
14709impl futures::stream::FusedStream for SymlinkEventStream {
14710 fn is_terminated(&self) -> bool {
14711 self.event_receiver.is_terminated()
14712 }
14713}
14714
14715impl futures::Stream for SymlinkEventStream {
14716 type Item = Result<SymlinkEvent, fidl::Error>;
14717
14718 fn poll_next(
14719 mut self: std::pin::Pin<&mut Self>,
14720 cx: &mut std::task::Context<'_>,
14721 ) -> std::task::Poll<Option<Self::Item>> {
14722 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14723 &mut self.event_receiver,
14724 cx
14725 )?) {
14726 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
14727 None => std::task::Poll::Ready(None),
14728 }
14729 }
14730}
14731
14732#[derive(Debug)]
14733pub enum SymlinkEvent {
14734 OnOpen_ {
14735 s: i32,
14736 info: Option<Box<NodeInfoDeprecated>>,
14737 },
14738 OnRepresentation {
14739 payload: Representation,
14740 },
14741 #[non_exhaustive]
14742 _UnknownEvent {
14743 ordinal: u64,
14745 },
14746}
14747
14748impl SymlinkEvent {
14749 #[allow(irrefutable_let_patterns)]
14750 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14751 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14752 }
14753 #[allow(irrefutable_let_patterns)]
14754 pub fn into_on_representation(self) -> Option<Representation> {
14755 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14756 }
14757
14758 fn decode(
14760 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14761 ) -> Result<SymlinkEvent, fidl::Error> {
14762 let (bytes, _handles) = buf.split_mut();
14763 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14764 debug_assert_eq!(tx_header.tx_id, 0);
14765 match tx_header.ordinal {
14766 0x7fc7bbb1dbfd1972 => {
14767 let mut out = fidl::new_empty!(
14768 NodeOnOpenRequest,
14769 fdomain_client::fidl::FDomainResourceDialect
14770 );
14771 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14772 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
14773 }
14774 0x5cb40567d80a510c => {
14775 let mut out =
14776 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
14777 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14778 Ok((SymlinkEvent::OnRepresentation { payload: out }))
14779 }
14780 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14781 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14782 }
14783 _ => Err(fidl::Error::UnknownOrdinal {
14784 ordinal: tx_header.ordinal,
14785 protocol_name: <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
14786 }),
14787 }
14788 }
14789}
14790
14791pub struct SymlinkRequestStream {
14793 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14794 is_terminated: bool,
14795}
14796
14797impl std::marker::Unpin for SymlinkRequestStream {}
14798
14799impl futures::stream::FusedStream for SymlinkRequestStream {
14800 fn is_terminated(&self) -> bool {
14801 self.is_terminated
14802 }
14803}
14804
14805impl fdomain_client::fidl::RequestStream for SymlinkRequestStream {
14806 type Protocol = SymlinkMarker;
14807 type ControlHandle = SymlinkControlHandle;
14808
14809 fn from_channel(channel: fdomain_client::Channel) -> Self {
14810 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14811 }
14812
14813 fn control_handle(&self) -> Self::ControlHandle {
14814 SymlinkControlHandle { inner: self.inner.clone() }
14815 }
14816
14817 fn into_inner(
14818 self,
14819 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
14820 {
14821 (self.inner, self.is_terminated)
14822 }
14823
14824 fn from_inner(
14825 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14826 is_terminated: bool,
14827 ) -> Self {
14828 Self { inner, is_terminated }
14829 }
14830}
14831
14832impl futures::Stream for SymlinkRequestStream {
14833 type Item = Result<SymlinkRequest, fidl::Error>;
14834
14835 fn poll_next(
14836 mut self: std::pin::Pin<&mut Self>,
14837 cx: &mut std::task::Context<'_>,
14838 ) -> std::task::Poll<Option<Self::Item>> {
14839 let this = &mut *self;
14840 if this.inner.check_shutdown(cx) {
14841 this.is_terminated = true;
14842 return std::task::Poll::Ready(None);
14843 }
14844 if this.is_terminated {
14845 panic!("polled SymlinkRequestStream after completion");
14846 }
14847 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
14848 |bytes, handles| {
14849 match this.inner.channel().read_etc(cx, bytes, handles) {
14850 std::task::Poll::Ready(Ok(())) => {}
14851 std::task::Poll::Pending => return std::task::Poll::Pending,
14852 std::task::Poll::Ready(Err(None)) => {
14853 this.is_terminated = true;
14854 return std::task::Poll::Ready(None);
14855 }
14856 std::task::Poll::Ready(Err(Some(e))) => {
14857 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14858 e.into(),
14859 ))));
14860 }
14861 }
14862
14863 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14865
14866 std::task::Poll::Ready(Some(match header.ordinal {
14867 0x54f3949246a03e74 => {
14868 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14869 let mut req = fidl::new_empty!(
14870 LinkableLinkIntoRequest,
14871 fdomain_client::fidl::FDomainResourceDialect
14872 );
14873 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
14874 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14875 Ok(SymlinkRequest::LinkInto {
14876 dst_parent_token: req.dst_parent_token,
14877 dst: req.dst,
14878
14879 responder: SymlinkLinkIntoResponder {
14880 control_handle: std::mem::ManuallyDrop::new(control_handle),
14881 tx_id: header.tx_id,
14882 },
14883 })
14884 }
14885 0x20d8a7aba2168a79 => {
14886 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14887 let mut req = fidl::new_empty!(
14888 fdomain_fuchsia_unknown::CloneableCloneRequest,
14889 fdomain_client::fidl::FDomainResourceDialect
14890 );
14891 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14892 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14893 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
14894 }
14895 0x5ac5d459ad7f657e => {
14896 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14897 let mut req = fidl::new_empty!(
14898 fidl::encoding::EmptyPayload,
14899 fdomain_client::fidl::FDomainResourceDialect
14900 );
14901 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14902 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14903 Ok(SymlinkRequest::Close {
14904 responder: SymlinkCloseResponder {
14905 control_handle: std::mem::ManuallyDrop::new(control_handle),
14906 tx_id: header.tx_id,
14907 },
14908 })
14909 }
14910 0x2658edee9decfc06 => {
14911 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14912 let mut req = fidl::new_empty!(
14913 fidl::encoding::EmptyPayload,
14914 fdomain_client::fidl::FDomainResourceDialect
14915 );
14916 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14917 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14918 Ok(SymlinkRequest::Query {
14919 responder: SymlinkQueryResponder {
14920 control_handle: std::mem::ManuallyDrop::new(control_handle),
14921 tx_id: header.tx_id,
14922 },
14923 })
14924 }
14925 0x5a61678f293ce16f => {
14926 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14927 let mut req = fidl::new_empty!(
14928 NodeDeprecatedCloneRequest,
14929 fdomain_client::fidl::FDomainResourceDialect
14930 );
14931 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14932 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14933 Ok(SymlinkRequest::DeprecatedClone {
14934 flags: req.flags,
14935 object: req.object,
14936
14937 control_handle,
14938 })
14939 }
14940 0x78985e216314dafd => {
14941 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14942 let mut req = fidl::new_empty!(
14943 fidl::encoding::EmptyPayload,
14944 fdomain_client::fidl::FDomainResourceDialect
14945 );
14946 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14947 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14948 Ok(SymlinkRequest::DeprecatedGetAttr {
14949 responder: SymlinkDeprecatedGetAttrResponder {
14950 control_handle: std::mem::ManuallyDrop::new(control_handle),
14951 tx_id: header.tx_id,
14952 },
14953 })
14954 }
14955 0x4186c0f40d938f46 => {
14956 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14957 let mut req = fidl::new_empty!(
14958 NodeDeprecatedSetAttrRequest,
14959 fdomain_client::fidl::FDomainResourceDialect
14960 );
14961 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14962 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14963 Ok(SymlinkRequest::DeprecatedSetAttr {
14964 flags: req.flags,
14965 attributes: req.attributes,
14966
14967 responder: SymlinkDeprecatedSetAttrResponder {
14968 control_handle: std::mem::ManuallyDrop::new(control_handle),
14969 tx_id: header.tx_id,
14970 },
14971 })
14972 }
14973 0x5b88fffb8eda3aa1 => {
14974 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14975 let mut req = fidl::new_empty!(
14976 fidl::encoding::EmptyPayload,
14977 fdomain_client::fidl::FDomainResourceDialect
14978 );
14979 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14980 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14981 Ok(SymlinkRequest::DeprecatedGetFlags {
14982 responder: SymlinkDeprecatedGetFlagsResponder {
14983 control_handle: std::mem::ManuallyDrop::new(control_handle),
14984 tx_id: header.tx_id,
14985 },
14986 })
14987 }
14988 0x5295b76c71fde733 => {
14989 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14990 let mut req = fidl::new_empty!(
14991 NodeDeprecatedSetFlagsRequest,
14992 fdomain_client::fidl::FDomainResourceDialect
14993 );
14994 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14995 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14996 Ok(SymlinkRequest::DeprecatedSetFlags {
14997 flags: req.flags,
14998
14999 responder: SymlinkDeprecatedSetFlagsResponder {
15000 control_handle: std::mem::ManuallyDrop::new(control_handle),
15001 tx_id: header.tx_id,
15002 },
15003 })
15004 }
15005 0x176eb318f64ec23 => {
15006 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15007 let mut req = fidl::new_empty!(
15008 fidl::encoding::EmptyPayload,
15009 fdomain_client::fidl::FDomainResourceDialect
15010 );
15011 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15012 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15013 Ok(SymlinkRequest::GetFlags {
15014 responder: SymlinkGetFlagsResponder {
15015 control_handle: std::mem::ManuallyDrop::new(control_handle),
15016 tx_id: header.tx_id,
15017 },
15018 })
15019 }
15020 0x55a8028685791ea8 => {
15021 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15022 let mut req = fidl::new_empty!(
15023 NodeSetFlagsRequest,
15024 fdomain_client::fidl::FDomainResourceDialect
15025 );
15026 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15027 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15028 Ok(SymlinkRequest::SetFlags {
15029 flags: req.flags,
15030
15031 responder: SymlinkSetFlagsResponder {
15032 control_handle: std::mem::ManuallyDrop::new(control_handle),
15033 tx_id: header.tx_id,
15034 },
15035 })
15036 }
15037 0x6f344a1c6b0a0610 => {
15038 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15039 let mut req = fidl::new_empty!(
15040 fidl::encoding::EmptyPayload,
15041 fdomain_client::fidl::FDomainResourceDialect
15042 );
15043 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15044 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15045 Ok(SymlinkRequest::QueryFilesystem {
15046 responder: SymlinkQueryFilesystemResponder {
15047 control_handle: std::mem::ManuallyDrop::new(control_handle),
15048 tx_id: header.tx_id,
15049 },
15050 })
15051 }
15052 0x3d4396a638ea053b => {
15053 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15054 let mut req = fidl::new_empty!(
15055 NodeGetAttributesRequest,
15056 fdomain_client::fidl::FDomainResourceDialect
15057 );
15058 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15059 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15060 Ok(SymlinkRequest::GetAttributes {
15061 query: req.query,
15062
15063 responder: SymlinkGetAttributesResponder {
15064 control_handle: std::mem::ManuallyDrop::new(control_handle),
15065 tx_id: header.tx_id,
15066 },
15067 })
15068 }
15069 0x3308c1da5a89bf08 => {
15070 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15071 let mut req = fidl::new_empty!(
15072 MutableNodeAttributes,
15073 fdomain_client::fidl::FDomainResourceDialect
15074 );
15075 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
15076 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15077 Ok(SymlinkRequest::UpdateAttributes {
15078 payload: req,
15079 responder: SymlinkUpdateAttributesResponder {
15080 control_handle: std::mem::ManuallyDrop::new(control_handle),
15081 tx_id: header.tx_id,
15082 },
15083 })
15084 }
15085 0x2c5c27ca0ab5dc49 => {
15086 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15087 let mut req = fidl::new_empty!(
15088 fidl::encoding::EmptyPayload,
15089 fdomain_client::fidl::FDomainResourceDialect
15090 );
15091 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15092 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15093 Ok(SymlinkRequest::Sync {
15094 responder: SymlinkSyncResponder {
15095 control_handle: std::mem::ManuallyDrop::new(control_handle),
15096 tx_id: header.tx_id,
15097 },
15098 })
15099 }
15100 0x4b61033de007fcd0 => {
15101 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15102 let mut req = fidl::new_empty!(
15103 NodeListExtendedAttributesRequest,
15104 fdomain_client::fidl::FDomainResourceDialect
15105 );
15106 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15107 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15108 Ok(SymlinkRequest::ListExtendedAttributes {
15109 iterator: req.iterator,
15110
15111 control_handle,
15112 })
15113 }
15114 0x45ffa3ccfdeb76db => {
15115 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15116 let mut req = fidl::new_empty!(
15117 NodeGetExtendedAttributeRequest,
15118 fdomain_client::fidl::FDomainResourceDialect
15119 );
15120 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15121 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15122 Ok(SymlinkRequest::GetExtendedAttribute {
15123 name: req.name,
15124
15125 responder: SymlinkGetExtendedAttributeResponder {
15126 control_handle: std::mem::ManuallyDrop::new(control_handle),
15127 tx_id: header.tx_id,
15128 },
15129 })
15130 }
15131 0x4a951362f681f23c => {
15132 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15133 let mut req = fidl::new_empty!(
15134 NodeSetExtendedAttributeRequest,
15135 fdomain_client::fidl::FDomainResourceDialect
15136 );
15137 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15138 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15139 Ok(SymlinkRequest::SetExtendedAttribute {
15140 name: req.name,
15141 value: req.value,
15142 mode: req.mode,
15143
15144 responder: SymlinkSetExtendedAttributeResponder {
15145 control_handle: std::mem::ManuallyDrop::new(control_handle),
15146 tx_id: header.tx_id,
15147 },
15148 })
15149 }
15150 0x7a0b9f3a9bf9032d => {
15151 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15152 let mut req = fidl::new_empty!(
15153 NodeRemoveExtendedAttributeRequest,
15154 fdomain_client::fidl::FDomainResourceDialect
15155 );
15156 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15157 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15158 Ok(SymlinkRequest::RemoveExtendedAttribute {
15159 name: req.name,
15160
15161 responder: SymlinkRemoveExtendedAttributeResponder {
15162 control_handle: std::mem::ManuallyDrop::new(control_handle),
15163 tx_id: header.tx_id,
15164 },
15165 })
15166 }
15167 0x742c2ea5e89831f3 => {
15168 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15169 let mut req = fidl::new_empty!(
15170 fidl::encoding::EmptyPayload,
15171 fdomain_client::fidl::FDomainResourceDialect
15172 );
15173 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15174 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15175 Ok(SymlinkRequest::Describe {
15176 responder: SymlinkDescribeResponder {
15177 control_handle: std::mem::ManuallyDrop::new(control_handle),
15178 tx_id: header.tx_id,
15179 },
15180 })
15181 }
15182 _ if header.tx_id == 0
15183 && header
15184 .dynamic_flags()
15185 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15186 {
15187 Ok(SymlinkRequest::_UnknownMethod {
15188 ordinal: header.ordinal,
15189 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15190 method_type: fidl::MethodType::OneWay,
15191 })
15192 }
15193 _ if header
15194 .dynamic_flags()
15195 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15196 {
15197 this.inner.send_framework_err(
15198 fidl::encoding::FrameworkErr::UnknownMethod,
15199 header.tx_id,
15200 header.ordinal,
15201 header.dynamic_flags(),
15202 (bytes, handles),
15203 )?;
15204 Ok(SymlinkRequest::_UnknownMethod {
15205 ordinal: header.ordinal,
15206 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15207 method_type: fidl::MethodType::TwoWay,
15208 })
15209 }
15210 _ => Err(fidl::Error::UnknownOrdinal {
15211 ordinal: header.ordinal,
15212 protocol_name:
15213 <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15214 }),
15215 }))
15216 },
15217 )
15218 }
15219}
15220
15221#[derive(Debug)]
15223pub enum SymlinkRequest {
15224 LinkInto {
15247 dst_parent_token: fdomain_client::Event,
15248 dst: String,
15249 responder: SymlinkLinkIntoResponder,
15250 },
15251 Clone {
15252 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15253 control_handle: SymlinkControlHandle,
15254 },
15255 Close {
15266 responder: SymlinkCloseResponder,
15267 },
15268 Query {
15269 responder: SymlinkQueryResponder,
15270 },
15271 DeprecatedClone {
15273 flags: OpenFlags,
15274 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
15275 control_handle: SymlinkControlHandle,
15276 },
15277 DeprecatedGetAttr {
15279 responder: SymlinkDeprecatedGetAttrResponder,
15280 },
15281 DeprecatedSetAttr {
15283 flags: NodeAttributeFlags,
15284 attributes: NodeAttributes,
15285 responder: SymlinkDeprecatedSetAttrResponder,
15286 },
15287 DeprecatedGetFlags {
15289 responder: SymlinkDeprecatedGetFlagsResponder,
15290 },
15291 DeprecatedSetFlags {
15293 flags: OpenFlags,
15294 responder: SymlinkDeprecatedSetFlagsResponder,
15295 },
15296 GetFlags {
15305 responder: SymlinkGetFlagsResponder,
15306 },
15307 SetFlags {
15317 flags: Flags,
15318 responder: SymlinkSetFlagsResponder,
15319 },
15320 QueryFilesystem {
15322 responder: SymlinkQueryFilesystemResponder,
15323 },
15324 GetAttributes {
15338 query: NodeAttributesQuery,
15339 responder: SymlinkGetAttributesResponder,
15340 },
15341 UpdateAttributes {
15350 payload: MutableNodeAttributes,
15351 responder: SymlinkUpdateAttributesResponder,
15352 },
15353 Sync {
15363 responder: SymlinkSyncResponder,
15364 },
15365 ListExtendedAttributes {
15374 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15375 control_handle: SymlinkControlHandle,
15376 },
15377 GetExtendedAttribute {
15384 name: Vec<u8>,
15385 responder: SymlinkGetExtendedAttributeResponder,
15386 },
15387 SetExtendedAttribute {
15395 name: Vec<u8>,
15396 value: ExtendedAttributeValue,
15397 mode: SetExtendedAttributeMode,
15398 responder: SymlinkSetExtendedAttributeResponder,
15399 },
15400 RemoveExtendedAttribute {
15406 name: Vec<u8>,
15407 responder: SymlinkRemoveExtendedAttributeResponder,
15408 },
15409 Describe {
15410 responder: SymlinkDescribeResponder,
15411 },
15412 #[non_exhaustive]
15414 _UnknownMethod {
15415 ordinal: u64,
15417 control_handle: SymlinkControlHandle,
15418 method_type: fidl::MethodType,
15419 },
15420}
15421
15422impl SymlinkRequest {
15423 #[allow(irrefutable_let_patterns)]
15424 pub fn into_link_into(
15425 self,
15426 ) -> Option<(fdomain_client::Event, String, SymlinkLinkIntoResponder)> {
15427 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
15428 Some((dst_parent_token, dst, responder))
15429 } else {
15430 None
15431 }
15432 }
15433
15434 #[allow(irrefutable_let_patterns)]
15435 pub fn into_clone(
15436 self,
15437 ) -> Option<(
15438 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15439 SymlinkControlHandle,
15440 )> {
15441 if let SymlinkRequest::Clone { request, control_handle } = self {
15442 Some((request, control_handle))
15443 } else {
15444 None
15445 }
15446 }
15447
15448 #[allow(irrefutable_let_patterns)]
15449 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
15450 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
15451 }
15452
15453 #[allow(irrefutable_let_patterns)]
15454 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
15455 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
15456 }
15457
15458 #[allow(irrefutable_let_patterns)]
15459 pub fn into_deprecated_clone(
15460 self,
15461 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, SymlinkControlHandle)>
15462 {
15463 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
15464 Some((flags, object, control_handle))
15465 } else {
15466 None
15467 }
15468 }
15469
15470 #[allow(irrefutable_let_patterns)]
15471 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
15472 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
15473 Some((responder))
15474 } else {
15475 None
15476 }
15477 }
15478
15479 #[allow(irrefutable_let_patterns)]
15480 pub fn into_deprecated_set_attr(
15481 self,
15482 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
15483 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15484 Some((flags, attributes, responder))
15485 } else {
15486 None
15487 }
15488 }
15489
15490 #[allow(irrefutable_let_patterns)]
15491 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
15492 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
15493 Some((responder))
15494 } else {
15495 None
15496 }
15497 }
15498
15499 #[allow(irrefutable_let_patterns)]
15500 pub fn into_deprecated_set_flags(
15501 self,
15502 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
15503 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
15504 Some((flags, responder))
15505 } else {
15506 None
15507 }
15508 }
15509
15510 #[allow(irrefutable_let_patterns)]
15511 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
15512 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
15513 }
15514
15515 #[allow(irrefutable_let_patterns)]
15516 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
15517 if let SymlinkRequest::SetFlags { flags, responder } = self {
15518 Some((flags, responder))
15519 } else {
15520 None
15521 }
15522 }
15523
15524 #[allow(irrefutable_let_patterns)]
15525 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
15526 if let SymlinkRequest::QueryFilesystem { responder } = self {
15527 Some((responder))
15528 } else {
15529 None
15530 }
15531 }
15532
15533 #[allow(irrefutable_let_patterns)]
15534 pub fn into_get_attributes(
15535 self,
15536 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
15537 if let SymlinkRequest::GetAttributes { query, responder } = self {
15538 Some((query, responder))
15539 } else {
15540 None
15541 }
15542 }
15543
15544 #[allow(irrefutable_let_patterns)]
15545 pub fn into_update_attributes(
15546 self,
15547 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
15548 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
15549 Some((payload, responder))
15550 } else {
15551 None
15552 }
15553 }
15554
15555 #[allow(irrefutable_let_patterns)]
15556 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
15557 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
15558 }
15559
15560 #[allow(irrefutable_let_patterns)]
15561 pub fn into_list_extended_attributes(
15562 self,
15563 ) -> Option<(
15564 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15565 SymlinkControlHandle,
15566 )> {
15567 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
15568 Some((iterator, control_handle))
15569 } else {
15570 None
15571 }
15572 }
15573
15574 #[allow(irrefutable_let_patterns)]
15575 pub fn into_get_extended_attribute(
15576 self,
15577 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
15578 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
15579 Some((name, responder))
15580 } else {
15581 None
15582 }
15583 }
15584
15585 #[allow(irrefutable_let_patterns)]
15586 pub fn into_set_extended_attribute(
15587 self,
15588 ) -> Option<(
15589 Vec<u8>,
15590 ExtendedAttributeValue,
15591 SetExtendedAttributeMode,
15592 SymlinkSetExtendedAttributeResponder,
15593 )> {
15594 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
15595 Some((name, value, mode, responder))
15596 } else {
15597 None
15598 }
15599 }
15600
15601 #[allow(irrefutable_let_patterns)]
15602 pub fn into_remove_extended_attribute(
15603 self,
15604 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
15605 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
15606 Some((name, responder))
15607 } else {
15608 None
15609 }
15610 }
15611
15612 #[allow(irrefutable_let_patterns)]
15613 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
15614 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
15615 }
15616
15617 pub fn method_name(&self) -> &'static str {
15619 match *self {
15620 SymlinkRequest::LinkInto { .. } => "link_into",
15621 SymlinkRequest::Clone { .. } => "clone",
15622 SymlinkRequest::Close { .. } => "close",
15623 SymlinkRequest::Query { .. } => "query",
15624 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
15625 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
15626 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
15627 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
15628 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
15629 SymlinkRequest::GetFlags { .. } => "get_flags",
15630 SymlinkRequest::SetFlags { .. } => "set_flags",
15631 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
15632 SymlinkRequest::GetAttributes { .. } => "get_attributes",
15633 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
15634 SymlinkRequest::Sync { .. } => "sync",
15635 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15636 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15637 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15638 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15639 SymlinkRequest::Describe { .. } => "describe",
15640 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15641 "unknown one-way method"
15642 }
15643 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15644 "unknown two-way method"
15645 }
15646 }
15647 }
15648}
15649
15650#[derive(Debug, Clone)]
15651pub struct SymlinkControlHandle {
15652 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15653}
15654
15655impl fdomain_client::fidl::ControlHandle for SymlinkControlHandle {
15656 fn shutdown(&self) {
15657 self.inner.shutdown()
15658 }
15659
15660 fn is_closed(&self) -> bool {
15661 self.inner.channel().is_closed()
15662 }
15663 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
15664 self.inner.channel().on_closed()
15665 }
15666}
15667
15668impl SymlinkControlHandle {
15669 pub fn send_on_open_(
15670 &self,
15671 mut s: i32,
15672 mut info: Option<NodeInfoDeprecated>,
15673 ) -> Result<(), fidl::Error> {
15674 self.inner.send::<NodeOnOpenRequest>(
15675 (s, info.as_mut()),
15676 0,
15677 0x7fc7bbb1dbfd1972,
15678 fidl::encoding::DynamicFlags::FLEXIBLE,
15679 )
15680 }
15681
15682 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15683 self.inner.send::<Representation>(
15684 &mut payload,
15685 0,
15686 0x5cb40567d80a510c,
15687 fidl::encoding::DynamicFlags::empty(),
15688 )
15689 }
15690}
15691
15692#[must_use = "FIDL methods require a response to be sent"]
15693#[derive(Debug)]
15694pub struct SymlinkLinkIntoResponder {
15695 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15696 tx_id: u32,
15697}
15698
15699impl std::ops::Drop for SymlinkLinkIntoResponder {
15703 fn drop(&mut self) {
15704 self.control_handle.shutdown();
15705 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15707 }
15708}
15709
15710impl fdomain_client::fidl::Responder for SymlinkLinkIntoResponder {
15711 type ControlHandle = SymlinkControlHandle;
15712
15713 fn control_handle(&self) -> &SymlinkControlHandle {
15714 &self.control_handle
15715 }
15716
15717 fn drop_without_shutdown(mut self) {
15718 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15720 std::mem::forget(self);
15722 }
15723}
15724
15725impl SymlinkLinkIntoResponder {
15726 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15730 let _result = self.send_raw(result);
15731 if _result.is_err() {
15732 self.control_handle.shutdown();
15733 }
15734 self.drop_without_shutdown();
15735 _result
15736 }
15737
15738 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15740 let _result = self.send_raw(result);
15741 self.drop_without_shutdown();
15742 _result
15743 }
15744
15745 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15746 self.control_handle
15747 .inner
15748 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15749 result,
15750 self.tx_id,
15751 0x54f3949246a03e74,
15752 fidl::encoding::DynamicFlags::empty(),
15753 )
15754 }
15755}
15756
15757#[must_use = "FIDL methods require a response to be sent"]
15758#[derive(Debug)]
15759pub struct SymlinkCloseResponder {
15760 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15761 tx_id: u32,
15762}
15763
15764impl std::ops::Drop for SymlinkCloseResponder {
15768 fn drop(&mut self) {
15769 self.control_handle.shutdown();
15770 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15772 }
15773}
15774
15775impl fdomain_client::fidl::Responder for SymlinkCloseResponder {
15776 type ControlHandle = SymlinkControlHandle;
15777
15778 fn control_handle(&self) -> &SymlinkControlHandle {
15779 &self.control_handle
15780 }
15781
15782 fn drop_without_shutdown(mut self) {
15783 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15785 std::mem::forget(self);
15787 }
15788}
15789
15790impl SymlinkCloseResponder {
15791 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15795 let _result = self.send_raw(result);
15796 if _result.is_err() {
15797 self.control_handle.shutdown();
15798 }
15799 self.drop_without_shutdown();
15800 _result
15801 }
15802
15803 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15805 let _result = self.send_raw(result);
15806 self.drop_without_shutdown();
15807 _result
15808 }
15809
15810 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15811 self.control_handle
15812 .inner
15813 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15814 result,
15815 self.tx_id,
15816 0x5ac5d459ad7f657e,
15817 fidl::encoding::DynamicFlags::empty(),
15818 )
15819 }
15820}
15821
15822#[must_use = "FIDL methods require a response to be sent"]
15823#[derive(Debug)]
15824pub struct SymlinkQueryResponder {
15825 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15826 tx_id: u32,
15827}
15828
15829impl std::ops::Drop for SymlinkQueryResponder {
15833 fn drop(&mut self) {
15834 self.control_handle.shutdown();
15835 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15837 }
15838}
15839
15840impl fdomain_client::fidl::Responder for SymlinkQueryResponder {
15841 type ControlHandle = SymlinkControlHandle;
15842
15843 fn control_handle(&self) -> &SymlinkControlHandle {
15844 &self.control_handle
15845 }
15846
15847 fn drop_without_shutdown(mut self) {
15848 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15850 std::mem::forget(self);
15852 }
15853}
15854
15855impl SymlinkQueryResponder {
15856 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15860 let _result = self.send_raw(protocol);
15861 if _result.is_err() {
15862 self.control_handle.shutdown();
15863 }
15864 self.drop_without_shutdown();
15865 _result
15866 }
15867
15868 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15870 let _result = self.send_raw(protocol);
15871 self.drop_without_shutdown();
15872 _result
15873 }
15874
15875 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15876 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
15877 (protocol,),
15878 self.tx_id,
15879 0x2658edee9decfc06,
15880 fidl::encoding::DynamicFlags::empty(),
15881 )
15882 }
15883}
15884
15885#[must_use = "FIDL methods require a response to be sent"]
15886#[derive(Debug)]
15887pub struct SymlinkDeprecatedGetAttrResponder {
15888 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15889 tx_id: u32,
15890}
15891
15892impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
15896 fn drop(&mut self) {
15897 self.control_handle.shutdown();
15898 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15900 }
15901}
15902
15903impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetAttrResponder {
15904 type ControlHandle = SymlinkControlHandle;
15905
15906 fn control_handle(&self) -> &SymlinkControlHandle {
15907 &self.control_handle
15908 }
15909
15910 fn drop_without_shutdown(mut self) {
15911 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15913 std::mem::forget(self);
15915 }
15916}
15917
15918impl SymlinkDeprecatedGetAttrResponder {
15919 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15923 let _result = self.send_raw(s, attributes);
15924 if _result.is_err() {
15925 self.control_handle.shutdown();
15926 }
15927 self.drop_without_shutdown();
15928 _result
15929 }
15930
15931 pub fn send_no_shutdown_on_err(
15933 self,
15934 mut s: i32,
15935 mut attributes: &NodeAttributes,
15936 ) -> Result<(), fidl::Error> {
15937 let _result = self.send_raw(s, attributes);
15938 self.drop_without_shutdown();
15939 _result
15940 }
15941
15942 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15943 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15944 (s, attributes),
15945 self.tx_id,
15946 0x78985e216314dafd,
15947 fidl::encoding::DynamicFlags::empty(),
15948 )
15949 }
15950}
15951
15952#[must_use = "FIDL methods require a response to be sent"]
15953#[derive(Debug)]
15954pub struct SymlinkDeprecatedSetAttrResponder {
15955 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15956 tx_id: u32,
15957}
15958
15959impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
15963 fn drop(&mut self) {
15964 self.control_handle.shutdown();
15965 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15967 }
15968}
15969
15970impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetAttrResponder {
15971 type ControlHandle = SymlinkControlHandle;
15972
15973 fn control_handle(&self) -> &SymlinkControlHandle {
15974 &self.control_handle
15975 }
15976
15977 fn drop_without_shutdown(mut self) {
15978 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15980 std::mem::forget(self);
15982 }
15983}
15984
15985impl SymlinkDeprecatedSetAttrResponder {
15986 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15990 let _result = self.send_raw(s);
15991 if _result.is_err() {
15992 self.control_handle.shutdown();
15993 }
15994 self.drop_without_shutdown();
15995 _result
15996 }
15997
15998 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16000 let _result = self.send_raw(s);
16001 self.drop_without_shutdown();
16002 _result
16003 }
16004
16005 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16006 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
16007 (s,),
16008 self.tx_id,
16009 0x4186c0f40d938f46,
16010 fidl::encoding::DynamicFlags::empty(),
16011 )
16012 }
16013}
16014
16015#[must_use = "FIDL methods require a response to be sent"]
16016#[derive(Debug)]
16017pub struct SymlinkDeprecatedGetFlagsResponder {
16018 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16019 tx_id: u32,
16020}
16021
16022impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
16026 fn drop(&mut self) {
16027 self.control_handle.shutdown();
16028 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16030 }
16031}
16032
16033impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetFlagsResponder {
16034 type ControlHandle = SymlinkControlHandle;
16035
16036 fn control_handle(&self) -> &SymlinkControlHandle {
16037 &self.control_handle
16038 }
16039
16040 fn drop_without_shutdown(mut self) {
16041 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16043 std::mem::forget(self);
16045 }
16046}
16047
16048impl SymlinkDeprecatedGetFlagsResponder {
16049 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16053 let _result = self.send_raw(s, flags);
16054 if _result.is_err() {
16055 self.control_handle.shutdown();
16056 }
16057 self.drop_without_shutdown();
16058 _result
16059 }
16060
16061 pub fn send_no_shutdown_on_err(
16063 self,
16064 mut s: i32,
16065 mut flags: OpenFlags,
16066 ) -> Result<(), fidl::Error> {
16067 let _result = self.send_raw(s, flags);
16068 self.drop_without_shutdown();
16069 _result
16070 }
16071
16072 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16073 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
16074 (s, flags),
16075 self.tx_id,
16076 0x5b88fffb8eda3aa1,
16077 fidl::encoding::DynamicFlags::empty(),
16078 )
16079 }
16080}
16081
16082#[must_use = "FIDL methods require a response to be sent"]
16083#[derive(Debug)]
16084pub struct SymlinkDeprecatedSetFlagsResponder {
16085 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16086 tx_id: u32,
16087}
16088
16089impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
16093 fn drop(&mut self) {
16094 self.control_handle.shutdown();
16095 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16097 }
16098}
16099
16100impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetFlagsResponder {
16101 type ControlHandle = SymlinkControlHandle;
16102
16103 fn control_handle(&self) -> &SymlinkControlHandle {
16104 &self.control_handle
16105 }
16106
16107 fn drop_without_shutdown(mut self) {
16108 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16110 std::mem::forget(self);
16112 }
16113}
16114
16115impl SymlinkDeprecatedSetFlagsResponder {
16116 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16120 let _result = self.send_raw(s);
16121 if _result.is_err() {
16122 self.control_handle.shutdown();
16123 }
16124 self.drop_without_shutdown();
16125 _result
16126 }
16127
16128 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16130 let _result = self.send_raw(s);
16131 self.drop_without_shutdown();
16132 _result
16133 }
16134
16135 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16136 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
16137 (s,),
16138 self.tx_id,
16139 0x5295b76c71fde733,
16140 fidl::encoding::DynamicFlags::empty(),
16141 )
16142 }
16143}
16144
16145#[must_use = "FIDL methods require a response to be sent"]
16146#[derive(Debug)]
16147pub struct SymlinkGetFlagsResponder {
16148 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16149 tx_id: u32,
16150}
16151
16152impl std::ops::Drop for SymlinkGetFlagsResponder {
16156 fn drop(&mut self) {
16157 self.control_handle.shutdown();
16158 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16160 }
16161}
16162
16163impl fdomain_client::fidl::Responder for SymlinkGetFlagsResponder {
16164 type ControlHandle = SymlinkControlHandle;
16165
16166 fn control_handle(&self) -> &SymlinkControlHandle {
16167 &self.control_handle
16168 }
16169
16170 fn drop_without_shutdown(mut self) {
16171 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16173 std::mem::forget(self);
16175 }
16176}
16177
16178impl SymlinkGetFlagsResponder {
16179 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16183 let _result = self.send_raw(result);
16184 if _result.is_err() {
16185 self.control_handle.shutdown();
16186 }
16187 self.drop_without_shutdown();
16188 _result
16189 }
16190
16191 pub fn send_no_shutdown_on_err(
16193 self,
16194 mut result: Result<Flags, i32>,
16195 ) -> Result<(), fidl::Error> {
16196 let _result = self.send_raw(result);
16197 self.drop_without_shutdown();
16198 _result
16199 }
16200
16201 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16202 self.control_handle
16203 .inner
16204 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
16205 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
16206 self.tx_id,
16207 0x176eb318f64ec23,
16208 fidl::encoding::DynamicFlags::FLEXIBLE,
16209 )
16210 }
16211}
16212
16213#[must_use = "FIDL methods require a response to be sent"]
16214#[derive(Debug)]
16215pub struct SymlinkSetFlagsResponder {
16216 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16217 tx_id: u32,
16218}
16219
16220impl std::ops::Drop for SymlinkSetFlagsResponder {
16224 fn drop(&mut self) {
16225 self.control_handle.shutdown();
16226 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16228 }
16229}
16230
16231impl fdomain_client::fidl::Responder for SymlinkSetFlagsResponder {
16232 type ControlHandle = SymlinkControlHandle;
16233
16234 fn control_handle(&self) -> &SymlinkControlHandle {
16235 &self.control_handle
16236 }
16237
16238 fn drop_without_shutdown(mut self) {
16239 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16241 std::mem::forget(self);
16243 }
16244}
16245
16246impl SymlinkSetFlagsResponder {
16247 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16251 let _result = self.send_raw(result);
16252 if _result.is_err() {
16253 self.control_handle.shutdown();
16254 }
16255 self.drop_without_shutdown();
16256 _result
16257 }
16258
16259 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16261 let _result = self.send_raw(result);
16262 self.drop_without_shutdown();
16263 _result
16264 }
16265
16266 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16267 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
16268 fidl::encoding::EmptyStruct,
16269 i32,
16270 >>(
16271 fidl::encoding::FlexibleResult::new(result),
16272 self.tx_id,
16273 0x55a8028685791ea8,
16274 fidl::encoding::DynamicFlags::FLEXIBLE,
16275 )
16276 }
16277}
16278
16279#[must_use = "FIDL methods require a response to be sent"]
16280#[derive(Debug)]
16281pub struct SymlinkQueryFilesystemResponder {
16282 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16283 tx_id: u32,
16284}
16285
16286impl std::ops::Drop for SymlinkQueryFilesystemResponder {
16290 fn drop(&mut self) {
16291 self.control_handle.shutdown();
16292 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16294 }
16295}
16296
16297impl fdomain_client::fidl::Responder for SymlinkQueryFilesystemResponder {
16298 type ControlHandle = SymlinkControlHandle;
16299
16300 fn control_handle(&self) -> &SymlinkControlHandle {
16301 &self.control_handle
16302 }
16303
16304 fn drop_without_shutdown(mut self) {
16305 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16307 std::mem::forget(self);
16309 }
16310}
16311
16312impl SymlinkQueryFilesystemResponder {
16313 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16317 let _result = self.send_raw(s, info);
16318 if _result.is_err() {
16319 self.control_handle.shutdown();
16320 }
16321 self.drop_without_shutdown();
16322 _result
16323 }
16324
16325 pub fn send_no_shutdown_on_err(
16327 self,
16328 mut s: i32,
16329 mut info: Option<&FilesystemInfo>,
16330 ) -> Result<(), fidl::Error> {
16331 let _result = self.send_raw(s, info);
16332 self.drop_without_shutdown();
16333 _result
16334 }
16335
16336 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16337 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
16338 (s, info),
16339 self.tx_id,
16340 0x6f344a1c6b0a0610,
16341 fidl::encoding::DynamicFlags::empty(),
16342 )
16343 }
16344}
16345
16346#[must_use = "FIDL methods require a response to be sent"]
16347#[derive(Debug)]
16348pub struct SymlinkGetAttributesResponder {
16349 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16350 tx_id: u32,
16351}
16352
16353impl std::ops::Drop for SymlinkGetAttributesResponder {
16357 fn drop(&mut self) {
16358 self.control_handle.shutdown();
16359 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16361 }
16362}
16363
16364impl fdomain_client::fidl::Responder for SymlinkGetAttributesResponder {
16365 type ControlHandle = SymlinkControlHandle;
16366
16367 fn control_handle(&self) -> &SymlinkControlHandle {
16368 &self.control_handle
16369 }
16370
16371 fn drop_without_shutdown(mut self) {
16372 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16374 std::mem::forget(self);
16376 }
16377}
16378
16379impl SymlinkGetAttributesResponder {
16380 pub fn send(
16384 self,
16385 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16386 ) -> 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(
16397 self,
16398 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16399 ) -> Result<(), fidl::Error> {
16400 let _result = self.send_raw(result);
16401 self.drop_without_shutdown();
16402 _result
16403 }
16404
16405 fn send_raw(
16406 &self,
16407 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16408 ) -> Result<(), fidl::Error> {
16409 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16410 result,
16411 self.tx_id,
16412 0x3d4396a638ea053b,
16413 fidl::encoding::DynamicFlags::empty(),
16414 )
16415 }
16416}
16417
16418#[must_use = "FIDL methods require a response to be sent"]
16419#[derive(Debug)]
16420pub struct SymlinkUpdateAttributesResponder {
16421 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16422 tx_id: u32,
16423}
16424
16425impl std::ops::Drop for SymlinkUpdateAttributesResponder {
16429 fn drop(&mut self) {
16430 self.control_handle.shutdown();
16431 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16433 }
16434}
16435
16436impl fdomain_client::fidl::Responder for SymlinkUpdateAttributesResponder {
16437 type ControlHandle = SymlinkControlHandle;
16438
16439 fn control_handle(&self) -> &SymlinkControlHandle {
16440 &self.control_handle
16441 }
16442
16443 fn drop_without_shutdown(mut self) {
16444 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16446 std::mem::forget(self);
16448 }
16449}
16450
16451impl SymlinkUpdateAttributesResponder {
16452 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16456 let _result = self.send_raw(result);
16457 if _result.is_err() {
16458 self.control_handle.shutdown();
16459 }
16460 self.drop_without_shutdown();
16461 _result
16462 }
16463
16464 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16466 let _result = self.send_raw(result);
16467 self.drop_without_shutdown();
16468 _result
16469 }
16470
16471 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16472 self.control_handle
16473 .inner
16474 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16475 result,
16476 self.tx_id,
16477 0x3308c1da5a89bf08,
16478 fidl::encoding::DynamicFlags::empty(),
16479 )
16480 }
16481}
16482
16483#[must_use = "FIDL methods require a response to be sent"]
16484#[derive(Debug)]
16485pub struct SymlinkSyncResponder {
16486 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16487 tx_id: u32,
16488}
16489
16490impl std::ops::Drop for SymlinkSyncResponder {
16494 fn drop(&mut self) {
16495 self.control_handle.shutdown();
16496 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16498 }
16499}
16500
16501impl fdomain_client::fidl::Responder for SymlinkSyncResponder {
16502 type ControlHandle = SymlinkControlHandle;
16503
16504 fn control_handle(&self) -> &SymlinkControlHandle {
16505 &self.control_handle
16506 }
16507
16508 fn drop_without_shutdown(mut self) {
16509 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16511 std::mem::forget(self);
16513 }
16514}
16515
16516impl SymlinkSyncResponder {
16517 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16521 let _result = self.send_raw(result);
16522 if _result.is_err() {
16523 self.control_handle.shutdown();
16524 }
16525 self.drop_without_shutdown();
16526 _result
16527 }
16528
16529 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16531 let _result = self.send_raw(result);
16532 self.drop_without_shutdown();
16533 _result
16534 }
16535
16536 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16537 self.control_handle
16538 .inner
16539 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16540 result,
16541 self.tx_id,
16542 0x2c5c27ca0ab5dc49,
16543 fidl::encoding::DynamicFlags::empty(),
16544 )
16545 }
16546}
16547
16548#[must_use = "FIDL methods require a response to be sent"]
16549#[derive(Debug)]
16550pub struct SymlinkGetExtendedAttributeResponder {
16551 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16552 tx_id: u32,
16553}
16554
16555impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
16559 fn drop(&mut self) {
16560 self.control_handle.shutdown();
16561 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16563 }
16564}
16565
16566impl fdomain_client::fidl::Responder for SymlinkGetExtendedAttributeResponder {
16567 type ControlHandle = SymlinkControlHandle;
16568
16569 fn control_handle(&self) -> &SymlinkControlHandle {
16570 &self.control_handle
16571 }
16572
16573 fn drop_without_shutdown(mut self) {
16574 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16576 std::mem::forget(self);
16578 }
16579}
16580
16581impl SymlinkGetExtendedAttributeResponder {
16582 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16586 let _result = self.send_raw(result);
16587 if _result.is_err() {
16588 self.control_handle.shutdown();
16589 }
16590 self.drop_without_shutdown();
16591 _result
16592 }
16593
16594 pub fn send_no_shutdown_on_err(
16596 self,
16597 mut result: Result<ExtendedAttributeValue, i32>,
16598 ) -> Result<(), fidl::Error> {
16599 let _result = self.send_raw(result);
16600 self.drop_without_shutdown();
16601 _result
16602 }
16603
16604 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16605 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
16606 result.as_mut().map_err(|e| *e),
16607 self.tx_id,
16608 0x45ffa3ccfdeb76db,
16609 fidl::encoding::DynamicFlags::empty(),
16610 )
16611 }
16612}
16613
16614#[must_use = "FIDL methods require a response to be sent"]
16615#[derive(Debug)]
16616pub struct SymlinkSetExtendedAttributeResponder {
16617 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16618 tx_id: u32,
16619}
16620
16621impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
16625 fn drop(&mut self) {
16626 self.control_handle.shutdown();
16627 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16629 }
16630}
16631
16632impl fdomain_client::fidl::Responder for SymlinkSetExtendedAttributeResponder {
16633 type ControlHandle = SymlinkControlHandle;
16634
16635 fn control_handle(&self) -> &SymlinkControlHandle {
16636 &self.control_handle
16637 }
16638
16639 fn drop_without_shutdown(mut self) {
16640 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16642 std::mem::forget(self);
16644 }
16645}
16646
16647impl SymlinkSetExtendedAttributeResponder {
16648 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16652 let _result = self.send_raw(result);
16653 if _result.is_err() {
16654 self.control_handle.shutdown();
16655 }
16656 self.drop_without_shutdown();
16657 _result
16658 }
16659
16660 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16662 let _result = self.send_raw(result);
16663 self.drop_without_shutdown();
16664 _result
16665 }
16666
16667 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16668 self.control_handle
16669 .inner
16670 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16671 result,
16672 self.tx_id,
16673 0x4a951362f681f23c,
16674 fidl::encoding::DynamicFlags::empty(),
16675 )
16676 }
16677}
16678
16679#[must_use = "FIDL methods require a response to be sent"]
16680#[derive(Debug)]
16681pub struct SymlinkRemoveExtendedAttributeResponder {
16682 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16683 tx_id: u32,
16684}
16685
16686impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
16690 fn drop(&mut self) {
16691 self.control_handle.shutdown();
16692 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16694 }
16695}
16696
16697impl fdomain_client::fidl::Responder for SymlinkRemoveExtendedAttributeResponder {
16698 type ControlHandle = SymlinkControlHandle;
16699
16700 fn control_handle(&self) -> &SymlinkControlHandle {
16701 &self.control_handle
16702 }
16703
16704 fn drop_without_shutdown(mut self) {
16705 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16707 std::mem::forget(self);
16709 }
16710}
16711
16712impl SymlinkRemoveExtendedAttributeResponder {
16713 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16717 let _result = self.send_raw(result);
16718 if _result.is_err() {
16719 self.control_handle.shutdown();
16720 }
16721 self.drop_without_shutdown();
16722 _result
16723 }
16724
16725 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16727 let _result = self.send_raw(result);
16728 self.drop_without_shutdown();
16729 _result
16730 }
16731
16732 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16733 self.control_handle
16734 .inner
16735 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16736 result,
16737 self.tx_id,
16738 0x7a0b9f3a9bf9032d,
16739 fidl::encoding::DynamicFlags::empty(),
16740 )
16741 }
16742}
16743
16744#[must_use = "FIDL methods require a response to be sent"]
16745#[derive(Debug)]
16746pub struct SymlinkDescribeResponder {
16747 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16748 tx_id: u32,
16749}
16750
16751impl std::ops::Drop for SymlinkDescribeResponder {
16755 fn drop(&mut self) {
16756 self.control_handle.shutdown();
16757 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16759 }
16760}
16761
16762impl fdomain_client::fidl::Responder for SymlinkDescribeResponder {
16763 type ControlHandle = SymlinkControlHandle;
16764
16765 fn control_handle(&self) -> &SymlinkControlHandle {
16766 &self.control_handle
16767 }
16768
16769 fn drop_without_shutdown(mut self) {
16770 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16772 std::mem::forget(self);
16774 }
16775}
16776
16777impl SymlinkDescribeResponder {
16778 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16782 let _result = self.send_raw(payload);
16783 if _result.is_err() {
16784 self.control_handle.shutdown();
16785 }
16786 self.drop_without_shutdown();
16787 _result
16788 }
16789
16790 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16792 let _result = self.send_raw(payload);
16793 self.drop_without_shutdown();
16794 _result
16795 }
16796
16797 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16798 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
16799 fidl::encoding::Flexible::new(payload),
16800 self.tx_id,
16801 0x742c2ea5e89831f3,
16802 fidl::encoding::DynamicFlags::FLEXIBLE,
16803 )
16804 }
16805}
16806
16807#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16808pub struct WritableMarker;
16809
16810impl fdomain_client::fidl::ProtocolMarker for WritableMarker {
16811 type Proxy = WritableProxy;
16812 type RequestStream = WritableRequestStream;
16813
16814 const DEBUG_NAME: &'static str = "(anonymous) Writable";
16815}
16816pub type WritableWriteResult = Result<u64, i32>;
16817
16818pub trait WritableProxyInterface: Send + Sync {
16819 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
16820 + Send;
16821 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
16822}
16823
16824#[derive(Debug, Clone)]
16825pub struct WritableProxy {
16826 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
16827}
16828
16829impl fdomain_client::fidl::Proxy for WritableProxy {
16830 type Protocol = WritableMarker;
16831
16832 fn from_channel(inner: fdomain_client::Channel) -> Self {
16833 Self::new(inner)
16834 }
16835
16836 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
16837 self.client.into_channel().map_err(|client| Self { client })
16838 }
16839
16840 fn as_channel(&self) -> &fdomain_client::Channel {
16841 self.client.as_channel()
16842 }
16843}
16844
16845impl WritableProxy {
16846 pub fn new(channel: fdomain_client::Channel) -> Self {
16848 let protocol_name = <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
16849 Self { client: fidl::client::Client::new(channel, protocol_name) }
16850 }
16851
16852 pub fn take_event_stream(&self) -> WritableEventStream {
16858 WritableEventStream { event_receiver: self.client.take_event_receiver() }
16859 }
16860
16861 pub fn r#write(
16885 &self,
16886 mut data: &[u8],
16887 ) -> fidl::client::QueryResponseFut<
16888 WritableWriteResult,
16889 fdomain_client::fidl::FDomainResourceDialect,
16890 > {
16891 WritableProxyInterface::r#write(self, data)
16892 }
16893}
16894
16895impl WritableProxyInterface for WritableProxy {
16896 type WriteResponseFut = fidl::client::QueryResponseFut<
16897 WritableWriteResult,
16898 fdomain_client::fidl::FDomainResourceDialect,
16899 >;
16900 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
16901 fn _decode(
16902 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16903 ) -> Result<WritableWriteResult, fidl::Error> {
16904 let _response = fidl::client::decode_transaction_body::<
16905 fidl::encoding::ResultType<WritableWriteResponse, i32>,
16906 fdomain_client::fidl::FDomainResourceDialect,
16907 0x6a31437832469f82,
16908 >(_buf?)?;
16909 Ok(_response.map(|x| x.actual_count))
16910 }
16911 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
16912 (data,),
16913 0x6a31437832469f82,
16914 fidl::encoding::DynamicFlags::empty(),
16915 _decode,
16916 )
16917 }
16918}
16919
16920pub struct WritableEventStream {
16921 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
16922}
16923
16924impl std::marker::Unpin for WritableEventStream {}
16925
16926impl futures::stream::FusedStream for WritableEventStream {
16927 fn is_terminated(&self) -> bool {
16928 self.event_receiver.is_terminated()
16929 }
16930}
16931
16932impl futures::Stream for WritableEventStream {
16933 type Item = Result<WritableEvent, fidl::Error>;
16934
16935 fn poll_next(
16936 mut self: std::pin::Pin<&mut Self>,
16937 cx: &mut std::task::Context<'_>,
16938 ) -> std::task::Poll<Option<Self::Item>> {
16939 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16940 &mut self.event_receiver,
16941 cx
16942 )?) {
16943 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
16944 None => std::task::Poll::Ready(None),
16945 }
16946 }
16947}
16948
16949#[derive(Debug)]
16950pub enum WritableEvent {}
16951
16952impl WritableEvent {
16953 fn decode(
16955 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16956 ) -> Result<WritableEvent, fidl::Error> {
16957 let (bytes, _handles) = buf.split_mut();
16958 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16959 debug_assert_eq!(tx_header.tx_id, 0);
16960 match tx_header.ordinal {
16961 _ => Err(fidl::Error::UnknownOrdinal {
16962 ordinal: tx_header.ordinal,
16963 protocol_name: <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
16964 }),
16965 }
16966 }
16967}
16968
16969pub struct WritableRequestStream {
16971 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
16972 is_terminated: bool,
16973}
16974
16975impl std::marker::Unpin for WritableRequestStream {}
16976
16977impl futures::stream::FusedStream for WritableRequestStream {
16978 fn is_terminated(&self) -> bool {
16979 self.is_terminated
16980 }
16981}
16982
16983impl fdomain_client::fidl::RequestStream for WritableRequestStream {
16984 type Protocol = WritableMarker;
16985 type ControlHandle = WritableControlHandle;
16986
16987 fn from_channel(channel: fdomain_client::Channel) -> Self {
16988 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16989 }
16990
16991 fn control_handle(&self) -> Self::ControlHandle {
16992 WritableControlHandle { inner: self.inner.clone() }
16993 }
16994
16995 fn into_inner(
16996 self,
16997 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
16998 {
16999 (self.inner, self.is_terminated)
17000 }
17001
17002 fn from_inner(
17003 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17004 is_terminated: bool,
17005 ) -> Self {
17006 Self { inner, is_terminated }
17007 }
17008}
17009
17010impl futures::Stream for WritableRequestStream {
17011 type Item = Result<WritableRequest, fidl::Error>;
17012
17013 fn poll_next(
17014 mut self: std::pin::Pin<&mut Self>,
17015 cx: &mut std::task::Context<'_>,
17016 ) -> std::task::Poll<Option<Self::Item>> {
17017 let this = &mut *self;
17018 if this.inner.check_shutdown(cx) {
17019 this.is_terminated = true;
17020 return std::task::Poll::Ready(None);
17021 }
17022 if this.is_terminated {
17023 panic!("polled WritableRequestStream after completion");
17024 }
17025 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
17026 |bytes, handles| {
17027 match this.inner.channel().read_etc(cx, bytes, handles) {
17028 std::task::Poll::Ready(Ok(())) => {}
17029 std::task::Poll::Pending => return std::task::Poll::Pending,
17030 std::task::Poll::Ready(Err(None)) => {
17031 this.is_terminated = true;
17032 return std::task::Poll::Ready(None);
17033 }
17034 std::task::Poll::Ready(Err(Some(e))) => {
17035 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17036 e.into(),
17037 ))));
17038 }
17039 }
17040
17041 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17043
17044 std::task::Poll::Ready(Some(match header.ordinal {
17045 0x6a31437832469f82 => {
17046 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17047 let mut req = fidl::new_empty!(
17048 WritableWriteRequest,
17049 fdomain_client::fidl::FDomainResourceDialect
17050 );
17051 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
17052 let control_handle = WritableControlHandle { inner: this.inner.clone() };
17053 Ok(WritableRequest::Write {
17054 data: req.data,
17055
17056 responder: WritableWriteResponder {
17057 control_handle: std::mem::ManuallyDrop::new(control_handle),
17058 tx_id: header.tx_id,
17059 },
17060 })
17061 }
17062 _ => Err(fidl::Error::UnknownOrdinal {
17063 ordinal: header.ordinal,
17064 protocol_name:
17065 <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17066 }),
17067 }))
17068 },
17069 )
17070 }
17071}
17072
17073#[derive(Debug)]
17074pub enum WritableRequest {
17075 Write { data: Vec<u8>, responder: WritableWriteResponder },
17099}
17100
17101impl WritableRequest {
17102 #[allow(irrefutable_let_patterns)]
17103 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
17104 if let WritableRequest::Write { data, responder } = self {
17105 Some((data, responder))
17106 } else {
17107 None
17108 }
17109 }
17110
17111 pub fn method_name(&self) -> &'static str {
17113 match *self {
17114 WritableRequest::Write { .. } => "write",
17115 }
17116 }
17117}
17118
17119#[derive(Debug, Clone)]
17120pub struct WritableControlHandle {
17121 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17122}
17123
17124impl fdomain_client::fidl::ControlHandle for WritableControlHandle {
17125 fn shutdown(&self) {
17126 self.inner.shutdown()
17127 }
17128
17129 fn is_closed(&self) -> bool {
17130 self.inner.channel().is_closed()
17131 }
17132 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
17133 self.inner.channel().on_closed()
17134 }
17135}
17136
17137impl WritableControlHandle {}
17138
17139#[must_use = "FIDL methods require a response to be sent"]
17140#[derive(Debug)]
17141pub struct WritableWriteResponder {
17142 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
17143 tx_id: u32,
17144}
17145
17146impl std::ops::Drop for WritableWriteResponder {
17150 fn drop(&mut self) {
17151 self.control_handle.shutdown();
17152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17154 }
17155}
17156
17157impl fdomain_client::fidl::Responder for WritableWriteResponder {
17158 type ControlHandle = WritableControlHandle;
17159
17160 fn control_handle(&self) -> &WritableControlHandle {
17161 &self.control_handle
17162 }
17163
17164 fn drop_without_shutdown(mut self) {
17165 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17167 std::mem::forget(self);
17169 }
17170}
17171
17172impl WritableWriteResponder {
17173 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17177 let _result = self.send_raw(result);
17178 if _result.is_err() {
17179 self.control_handle.shutdown();
17180 }
17181 self.drop_without_shutdown();
17182 _result
17183 }
17184
17185 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17187 let _result = self.send_raw(result);
17188 self.drop_without_shutdown();
17189 _result
17190 }
17191
17192 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17193 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
17194 result.map(|actual_count| (actual_count,)),
17195 self.tx_id,
17196 0x6a31437832469f82,
17197 fidl::encoding::DynamicFlags::empty(),
17198 )
17199 }
17200}
17201
17202mod internal {
17203 use super::*;
17204
17205 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
17206 type Borrowed<'a> = &'a mut Self;
17207 fn take_or_borrow<'a>(
17208 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17209 ) -> Self::Borrowed<'a> {
17210 value
17211 }
17212 }
17213
17214 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
17215 type Owned = Self;
17216
17217 #[inline(always)]
17218 fn inline_align(_context: fidl::encoding::Context) -> usize {
17219 8
17220 }
17221
17222 #[inline(always)]
17223 fn inline_size(_context: fidl::encoding::Context) -> usize {
17224 40
17225 }
17226 }
17227
17228 unsafe impl
17229 fidl::encoding::Encode<
17230 DirectoryCreateSymlinkRequest,
17231 fdomain_client::fidl::FDomainResourceDialect,
17232 > for &mut DirectoryCreateSymlinkRequest
17233 {
17234 #[inline]
17235 unsafe fn encode(
17236 self,
17237 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17238 offset: usize,
17239 _depth: fidl::encoding::Depth,
17240 ) -> fidl::Result<()> {
17241 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17242 fidl::encoding::Encode::<
17244 DirectoryCreateSymlinkRequest,
17245 fdomain_client::fidl::FDomainResourceDialect,
17246 >::encode(
17247 (
17248 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17249 &self.name,
17250 ),
17251 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
17252 &self.target,
17253 ),
17254 <fidl::encoding::Optional<
17255 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17256 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17257 &mut self.connection
17258 ),
17259 ),
17260 encoder,
17261 offset,
17262 _depth,
17263 )
17264 }
17265 }
17266 unsafe impl<
17267 T0: fidl::encoding::Encode<
17268 fidl::encoding::BoundedString<255>,
17269 fdomain_client::fidl::FDomainResourceDialect,
17270 >,
17271 T1: fidl::encoding::Encode<
17272 fidl::encoding::Vector<u8, 4095>,
17273 fdomain_client::fidl::FDomainResourceDialect,
17274 >,
17275 T2: fidl::encoding::Encode<
17276 fidl::encoding::Optional<
17277 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17278 >,
17279 fdomain_client::fidl::FDomainResourceDialect,
17280 >,
17281 >
17282 fidl::encoding::Encode<
17283 DirectoryCreateSymlinkRequest,
17284 fdomain_client::fidl::FDomainResourceDialect,
17285 > for (T0, T1, T2)
17286 {
17287 #[inline]
17288 unsafe fn encode(
17289 self,
17290 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17291 offset: usize,
17292 depth: fidl::encoding::Depth,
17293 ) -> fidl::Result<()> {
17294 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17295 unsafe {
17298 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
17299 (ptr as *mut u64).write_unaligned(0);
17300 }
17301 self.0.encode(encoder, offset + 0, depth)?;
17303 self.1.encode(encoder, offset + 16, depth)?;
17304 self.2.encode(encoder, offset + 32, depth)?;
17305 Ok(())
17306 }
17307 }
17308
17309 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17310 for DirectoryCreateSymlinkRequest
17311 {
17312 #[inline(always)]
17313 fn new_empty() -> Self {
17314 Self {
17315 name: fidl::new_empty!(
17316 fidl::encoding::BoundedString<255>,
17317 fdomain_client::fidl::FDomainResourceDialect
17318 ),
17319 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect),
17320 connection: fidl::new_empty!(
17321 fidl::encoding::Optional<
17322 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17323 >,
17324 fdomain_client::fidl::FDomainResourceDialect
17325 ),
17326 }
17327 }
17328
17329 #[inline]
17330 unsafe fn decode(
17331 &mut self,
17332 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17333 offset: usize,
17334 _depth: fidl::encoding::Depth,
17335 ) -> fidl::Result<()> {
17336 decoder.debug_check_bounds::<Self>(offset);
17337 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
17339 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17340 let mask = 0xffffffff00000000u64;
17341 let maskedval = padval & mask;
17342 if maskedval != 0 {
17343 return Err(fidl::Error::NonZeroPadding {
17344 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
17345 });
17346 }
17347 fidl::decode!(
17348 fidl::encoding::BoundedString<255>,
17349 fdomain_client::fidl::FDomainResourceDialect,
17350 &mut self.name,
17351 decoder,
17352 offset + 0,
17353 _depth
17354 )?;
17355 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
17356 fidl::decode!(
17357 fidl::encoding::Optional<
17358 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17359 >,
17360 fdomain_client::fidl::FDomainResourceDialect,
17361 &mut self.connection,
17362 decoder,
17363 offset + 32,
17364 _depth
17365 )?;
17366 Ok(())
17367 }
17368 }
17369
17370 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
17371 type Borrowed<'a> = &'a mut Self;
17372 fn take_or_borrow<'a>(
17373 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17374 ) -> Self::Borrowed<'a> {
17375 value
17376 }
17377 }
17378
17379 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
17380 type Owned = Self;
17381
17382 #[inline(always)]
17383 fn inline_align(_context: fidl::encoding::Context) -> usize {
17384 8
17385 }
17386
17387 #[inline(always)]
17388 fn inline_size(_context: fidl::encoding::Context) -> usize {
17389 32
17390 }
17391 }
17392
17393 unsafe impl
17394 fidl::encoding::Encode<
17395 DirectoryDeprecatedOpenRequest,
17396 fdomain_client::fidl::FDomainResourceDialect,
17397 > for &mut DirectoryDeprecatedOpenRequest
17398 {
17399 #[inline]
17400 unsafe fn encode(
17401 self,
17402 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17403 offset: usize,
17404 _depth: fidl::encoding::Depth,
17405 ) -> fidl::Result<()> {
17406 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17407 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17409 (
17410 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17411 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
17412 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17413 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17414 ),
17415 encoder, offset, _depth
17416 )
17417 }
17418 }
17419 unsafe impl<
17420 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
17421 T1: fidl::encoding::Encode<ModeType, fdomain_client::fidl::FDomainResourceDialect>,
17422 T2: fidl::encoding::Encode<
17423 fidl::encoding::BoundedString<4095>,
17424 fdomain_client::fidl::FDomainResourceDialect,
17425 >,
17426 T3: fidl::encoding::Encode<
17427 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17428 fdomain_client::fidl::FDomainResourceDialect,
17429 >,
17430 >
17431 fidl::encoding::Encode<
17432 DirectoryDeprecatedOpenRequest,
17433 fdomain_client::fidl::FDomainResourceDialect,
17434 > for (T0, T1, T2, T3)
17435 {
17436 #[inline]
17437 unsafe fn encode(
17438 self,
17439 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17440 offset: usize,
17441 depth: fidl::encoding::Depth,
17442 ) -> fidl::Result<()> {
17443 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17444 unsafe {
17447 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
17448 (ptr as *mut u64).write_unaligned(0);
17449 }
17450 self.0.encode(encoder, offset + 0, depth)?;
17452 self.1.encode(encoder, offset + 4, depth)?;
17453 self.2.encode(encoder, offset + 8, depth)?;
17454 self.3.encode(encoder, offset + 24, depth)?;
17455 Ok(())
17456 }
17457 }
17458
17459 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17460 for DirectoryDeprecatedOpenRequest
17461 {
17462 #[inline(always)]
17463 fn new_empty() -> Self {
17464 Self {
17465 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
17466 mode: fidl::new_empty!(ModeType, fdomain_client::fidl::FDomainResourceDialect),
17467 path: fidl::new_empty!(
17468 fidl::encoding::BoundedString<4095>,
17469 fdomain_client::fidl::FDomainResourceDialect
17470 ),
17471 object: fidl::new_empty!(
17472 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17473 fdomain_client::fidl::FDomainResourceDialect
17474 ),
17475 }
17476 }
17477
17478 #[inline]
17479 unsafe fn decode(
17480 &mut self,
17481 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17482 offset: usize,
17483 _depth: fidl::encoding::Depth,
17484 ) -> fidl::Result<()> {
17485 decoder.debug_check_bounds::<Self>(offset);
17486 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
17488 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17489 let mask = 0xffffffff00000000u64;
17490 let maskedval = padval & mask;
17491 if maskedval != 0 {
17492 return Err(fidl::Error::NonZeroPadding {
17493 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
17494 });
17495 }
17496 fidl::decode!(
17497 OpenFlags,
17498 fdomain_client::fidl::FDomainResourceDialect,
17499 &mut self.flags,
17500 decoder,
17501 offset + 0,
17502 _depth
17503 )?;
17504 fidl::decode!(
17505 ModeType,
17506 fdomain_client::fidl::FDomainResourceDialect,
17507 &mut self.mode,
17508 decoder,
17509 offset + 4,
17510 _depth
17511 )?;
17512 fidl::decode!(
17513 fidl::encoding::BoundedString<4095>,
17514 fdomain_client::fidl::FDomainResourceDialect,
17515 &mut self.path,
17516 decoder,
17517 offset + 8,
17518 _depth
17519 )?;
17520 fidl::decode!(
17521 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17522 fdomain_client::fidl::FDomainResourceDialect,
17523 &mut self.object,
17524 decoder,
17525 offset + 24,
17526 _depth
17527 )?;
17528 Ok(())
17529 }
17530 }
17531
17532 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
17533 type Borrowed<'a> = &'a mut Self;
17534 fn take_or_borrow<'a>(
17535 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17536 ) -> Self::Borrowed<'a> {
17537 value
17538 }
17539 }
17540
17541 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
17542 type Owned = Self;
17543
17544 #[inline(always)]
17545 fn inline_align(_context: fidl::encoding::Context) -> usize {
17546 4
17547 }
17548
17549 #[inline(always)]
17550 fn inline_size(_context: fidl::encoding::Context) -> usize {
17551 8
17552 }
17553 }
17554
17555 unsafe impl
17556 fidl::encoding::Encode<
17557 DirectoryGetTokenResponse,
17558 fdomain_client::fidl::FDomainResourceDialect,
17559 > for &mut DirectoryGetTokenResponse
17560 {
17561 #[inline]
17562 unsafe fn encode(
17563 self,
17564 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17565 offset: usize,
17566 _depth: fidl::encoding::Depth,
17567 ) -> fidl::Result<()> {
17568 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17569 fidl::encoding::Encode::<
17571 DirectoryGetTokenResponse,
17572 fdomain_client::fidl::FDomainResourceDialect,
17573 >::encode(
17574 (
17575 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
17576 <fidl::encoding::Optional<
17577 fidl::encoding::HandleType<
17578 fdomain_client::Handle,
17579 { fidl::ObjectType::NONE.into_raw() },
17580 2147483648,
17581 >,
17582 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17583 &mut self.token
17584 ),
17585 ),
17586 encoder,
17587 offset,
17588 _depth,
17589 )
17590 }
17591 }
17592 unsafe impl<
17593 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
17594 T1: fidl::encoding::Encode<
17595 fidl::encoding::Optional<
17596 fidl::encoding::HandleType<
17597 fdomain_client::Handle,
17598 { fidl::ObjectType::NONE.into_raw() },
17599 2147483648,
17600 >,
17601 >,
17602 fdomain_client::fidl::FDomainResourceDialect,
17603 >,
17604 >
17605 fidl::encoding::Encode<
17606 DirectoryGetTokenResponse,
17607 fdomain_client::fidl::FDomainResourceDialect,
17608 > for (T0, T1)
17609 {
17610 #[inline]
17611 unsafe fn encode(
17612 self,
17613 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17614 offset: usize,
17615 depth: fidl::encoding::Depth,
17616 ) -> fidl::Result<()> {
17617 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17618 self.0.encode(encoder, offset + 0, depth)?;
17622 self.1.encode(encoder, offset + 4, depth)?;
17623 Ok(())
17624 }
17625 }
17626
17627 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17628 for DirectoryGetTokenResponse
17629 {
17630 #[inline(always)]
17631 fn new_empty() -> Self {
17632 Self {
17633 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
17634 token: fidl::new_empty!(
17635 fidl::encoding::Optional<
17636 fidl::encoding::HandleType<
17637 fdomain_client::Handle,
17638 { fidl::ObjectType::NONE.into_raw() },
17639 2147483648,
17640 >,
17641 >,
17642 fdomain_client::fidl::FDomainResourceDialect
17643 ),
17644 }
17645 }
17646
17647 #[inline]
17648 unsafe fn decode(
17649 &mut self,
17650 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17651 offset: usize,
17652 _depth: fidl::encoding::Depth,
17653 ) -> fidl::Result<()> {
17654 decoder.debug_check_bounds::<Self>(offset);
17655 fidl::decode!(
17657 i32,
17658 fdomain_client::fidl::FDomainResourceDialect,
17659 &mut self.s,
17660 decoder,
17661 offset + 0,
17662 _depth
17663 )?;
17664 fidl::decode!(
17665 fidl::encoding::Optional<
17666 fidl::encoding::HandleType<
17667 fdomain_client::Handle,
17668 { fidl::ObjectType::NONE.into_raw() },
17669 2147483648,
17670 >,
17671 >,
17672 fdomain_client::fidl::FDomainResourceDialect,
17673 &mut self.token,
17674 decoder,
17675 offset + 4,
17676 _depth
17677 )?;
17678 Ok(())
17679 }
17680 }
17681
17682 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
17683 type Borrowed<'a> = &'a mut Self;
17684 fn take_or_borrow<'a>(
17685 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17686 ) -> Self::Borrowed<'a> {
17687 value
17688 }
17689 }
17690
17691 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
17692 type Owned = Self;
17693
17694 #[inline(always)]
17695 fn inline_align(_context: fidl::encoding::Context) -> usize {
17696 8
17697 }
17698
17699 #[inline(always)]
17700 fn inline_size(_context: fidl::encoding::Context) -> usize {
17701 40
17702 }
17703 }
17704
17705 unsafe impl
17706 fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17707 for &mut DirectoryLinkRequest
17708 {
17709 #[inline]
17710 unsafe fn encode(
17711 self,
17712 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17713 offset: usize,
17714 _depth: fidl::encoding::Depth,
17715 ) -> fidl::Result<()> {
17716 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17717 fidl::encoding::Encode::<
17719 DirectoryLinkRequest,
17720 fdomain_client::fidl::FDomainResourceDialect,
17721 >::encode(
17722 (
17723 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17724 &self.src,
17725 ),
17726 <fidl::encoding::HandleType<
17727 fdomain_client::Handle,
17728 { fidl::ObjectType::NONE.into_raw() },
17729 2147483648,
17730 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17731 &mut self.dst_parent_token,
17732 ),
17733 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17734 &self.dst,
17735 ),
17736 ),
17737 encoder,
17738 offset,
17739 _depth,
17740 )
17741 }
17742 }
17743 unsafe impl<
17744 T0: fidl::encoding::Encode<
17745 fidl::encoding::BoundedString<255>,
17746 fdomain_client::fidl::FDomainResourceDialect,
17747 >,
17748 T1: fidl::encoding::Encode<
17749 fidl::encoding::HandleType<
17750 fdomain_client::Handle,
17751 { fidl::ObjectType::NONE.into_raw() },
17752 2147483648,
17753 >,
17754 fdomain_client::fidl::FDomainResourceDialect,
17755 >,
17756 T2: fidl::encoding::Encode<
17757 fidl::encoding::BoundedString<255>,
17758 fdomain_client::fidl::FDomainResourceDialect,
17759 >,
17760 > fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17761 for (T0, T1, T2)
17762 {
17763 #[inline]
17764 unsafe fn encode(
17765 self,
17766 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17767 offset: usize,
17768 depth: fidl::encoding::Depth,
17769 ) -> fidl::Result<()> {
17770 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17771 unsafe {
17774 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
17775 (ptr as *mut u64).write_unaligned(0);
17776 }
17777 self.0.encode(encoder, offset + 0, depth)?;
17779 self.1.encode(encoder, offset + 16, depth)?;
17780 self.2.encode(encoder, offset + 24, depth)?;
17781 Ok(())
17782 }
17783 }
17784
17785 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17786 for DirectoryLinkRequest
17787 {
17788 #[inline(always)]
17789 fn new_empty() -> Self {
17790 Self {
17791 src: fidl::new_empty!(
17792 fidl::encoding::BoundedString<255>,
17793 fdomain_client::fidl::FDomainResourceDialect
17794 ),
17795 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17796 dst: fidl::new_empty!(
17797 fidl::encoding::BoundedString<255>,
17798 fdomain_client::fidl::FDomainResourceDialect
17799 ),
17800 }
17801 }
17802
17803 #[inline]
17804 unsafe fn decode(
17805 &mut self,
17806 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17807 offset: usize,
17808 _depth: fidl::encoding::Depth,
17809 ) -> fidl::Result<()> {
17810 decoder.debug_check_bounds::<Self>(offset);
17811 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
17813 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17814 let mask = 0xffffffff00000000u64;
17815 let maskedval = padval & mask;
17816 if maskedval != 0 {
17817 return Err(fidl::Error::NonZeroPadding {
17818 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
17819 });
17820 }
17821 fidl::decode!(
17822 fidl::encoding::BoundedString<255>,
17823 fdomain_client::fidl::FDomainResourceDialect,
17824 &mut self.src,
17825 decoder,
17826 offset + 0,
17827 _depth
17828 )?;
17829 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)?;
17830 fidl::decode!(
17831 fidl::encoding::BoundedString<255>,
17832 fdomain_client::fidl::FDomainResourceDialect,
17833 &mut self.dst,
17834 decoder,
17835 offset + 24,
17836 _depth
17837 )?;
17838 Ok(())
17839 }
17840 }
17841
17842 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
17843 type Borrowed<'a> = &'a mut Self;
17844 fn take_or_borrow<'a>(
17845 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17846 ) -> Self::Borrowed<'a> {
17847 value
17848 }
17849 }
17850
17851 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
17852 type Owned = Self;
17853
17854 #[inline(always)]
17855 fn inline_align(_context: fidl::encoding::Context) -> usize {
17856 8
17857 }
17858
17859 #[inline(always)]
17860 fn inline_size(_context: fidl::encoding::Context) -> usize {
17861 48
17862 }
17863 }
17864
17865 unsafe impl
17866 fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17867 for &mut DirectoryOpenRequest
17868 {
17869 #[inline]
17870 unsafe fn encode(
17871 self,
17872 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17873 offset: usize,
17874 _depth: fidl::encoding::Depth,
17875 ) -> fidl::Result<()> {
17876 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17877 fidl::encoding::Encode::<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17879 (
17880 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17881 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17882 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
17883 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17884 ),
17885 encoder, offset, _depth
17886 )
17887 }
17888 }
17889 unsafe impl<
17890 T0: fidl::encoding::Encode<
17891 fidl::encoding::BoundedString<4095>,
17892 fdomain_client::fidl::FDomainResourceDialect,
17893 >,
17894 T1: fidl::encoding::Encode<Flags, fdomain_client::fidl::FDomainResourceDialect>,
17895 T2: fidl::encoding::Encode<Options, fdomain_client::fidl::FDomainResourceDialect>,
17896 T3: fidl::encoding::Encode<
17897 fidl::encoding::HandleType<
17898 fdomain_client::Channel,
17899 { fidl::ObjectType::CHANNEL.into_raw() },
17900 2147483648,
17901 >,
17902 fdomain_client::fidl::FDomainResourceDialect,
17903 >,
17904 > fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17905 for (T0, T1, T2, T3)
17906 {
17907 #[inline]
17908 unsafe fn encode(
17909 self,
17910 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17911 offset: usize,
17912 depth: fidl::encoding::Depth,
17913 ) -> fidl::Result<()> {
17914 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17915 unsafe {
17918 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
17919 (ptr as *mut u64).write_unaligned(0);
17920 }
17921 self.0.encode(encoder, offset + 0, depth)?;
17923 self.1.encode(encoder, offset + 16, depth)?;
17924 self.2.encode(encoder, offset + 24, depth)?;
17925 self.3.encode(encoder, offset + 40, depth)?;
17926 Ok(())
17927 }
17928 }
17929
17930 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17931 for DirectoryOpenRequest
17932 {
17933 #[inline(always)]
17934 fn new_empty() -> Self {
17935 Self {
17936 path: fidl::new_empty!(
17937 fidl::encoding::BoundedString<4095>,
17938 fdomain_client::fidl::FDomainResourceDialect
17939 ),
17940 flags: fidl::new_empty!(Flags, fdomain_client::fidl::FDomainResourceDialect),
17941 options: fidl::new_empty!(Options, fdomain_client::fidl::FDomainResourceDialect),
17942 object: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17943 }
17944 }
17945
17946 #[inline]
17947 unsafe fn decode(
17948 &mut self,
17949 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17950 offset: usize,
17951 _depth: fidl::encoding::Depth,
17952 ) -> fidl::Result<()> {
17953 decoder.debug_check_bounds::<Self>(offset);
17954 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
17956 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17957 let mask = 0xffffffff00000000u64;
17958 let maskedval = padval & mask;
17959 if maskedval != 0 {
17960 return Err(fidl::Error::NonZeroPadding {
17961 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
17962 });
17963 }
17964 fidl::decode!(
17965 fidl::encoding::BoundedString<4095>,
17966 fdomain_client::fidl::FDomainResourceDialect,
17967 &mut self.path,
17968 decoder,
17969 offset + 0,
17970 _depth
17971 )?;
17972 fidl::decode!(
17973 Flags,
17974 fdomain_client::fidl::FDomainResourceDialect,
17975 &mut self.flags,
17976 decoder,
17977 offset + 16,
17978 _depth
17979 )?;
17980 fidl::decode!(
17981 Options,
17982 fdomain_client::fidl::FDomainResourceDialect,
17983 &mut self.options,
17984 decoder,
17985 offset + 24,
17986 _depth
17987 )?;
17988 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)?;
17989 Ok(())
17990 }
17991 }
17992
17993 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
17994 type Borrowed<'a> = &'a mut Self;
17995 fn take_or_borrow<'a>(
17996 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17997 ) -> Self::Borrowed<'a> {
17998 value
17999 }
18000 }
18001
18002 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
18003 type Owned = Self;
18004
18005 #[inline(always)]
18006 fn inline_align(_context: fidl::encoding::Context) -> usize {
18007 8
18008 }
18009
18010 #[inline(always)]
18011 fn inline_size(_context: fidl::encoding::Context) -> usize {
18012 40
18013 }
18014 }
18015
18016 unsafe impl
18017 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18018 for &mut DirectoryRenameRequest
18019 {
18020 #[inline]
18021 unsafe fn encode(
18022 self,
18023 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18024 offset: usize,
18025 _depth: fidl::encoding::Depth,
18026 ) -> fidl::Result<()> {
18027 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18028 fidl::encoding::Encode::<
18030 DirectoryRenameRequest,
18031 fdomain_client::fidl::FDomainResourceDialect,
18032 >::encode(
18033 (
18034 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18035 &self.src,
18036 ),
18037 <fidl::encoding::HandleType<
18038 fdomain_client::Event,
18039 { fidl::ObjectType::EVENT.into_raw() },
18040 2147483648,
18041 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18042 &mut self.dst_parent_token,
18043 ),
18044 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18045 &self.dst,
18046 ),
18047 ),
18048 encoder,
18049 offset,
18050 _depth,
18051 )
18052 }
18053 }
18054 unsafe impl<
18055 T0: fidl::encoding::Encode<
18056 fidl::encoding::BoundedString<255>,
18057 fdomain_client::fidl::FDomainResourceDialect,
18058 >,
18059 T1: fidl::encoding::Encode<
18060 fidl::encoding::HandleType<
18061 fdomain_client::Event,
18062 { fidl::ObjectType::EVENT.into_raw() },
18063 2147483648,
18064 >,
18065 fdomain_client::fidl::FDomainResourceDialect,
18066 >,
18067 T2: fidl::encoding::Encode<
18068 fidl::encoding::BoundedString<255>,
18069 fdomain_client::fidl::FDomainResourceDialect,
18070 >,
18071 >
18072 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18073 for (T0, T1, T2)
18074 {
18075 #[inline]
18076 unsafe fn encode(
18077 self,
18078 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18079 offset: usize,
18080 depth: fidl::encoding::Depth,
18081 ) -> fidl::Result<()> {
18082 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18083 unsafe {
18086 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18087 (ptr as *mut u64).write_unaligned(0);
18088 }
18089 self.0.encode(encoder, offset + 0, depth)?;
18091 self.1.encode(encoder, offset + 16, depth)?;
18092 self.2.encode(encoder, offset + 24, depth)?;
18093 Ok(())
18094 }
18095 }
18096
18097 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18098 for DirectoryRenameRequest
18099 {
18100 #[inline(always)]
18101 fn new_empty() -> Self {
18102 Self {
18103 src: fidl::new_empty!(
18104 fidl::encoding::BoundedString<255>,
18105 fdomain_client::fidl::FDomainResourceDialect
18106 ),
18107 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18108 dst: fidl::new_empty!(
18109 fidl::encoding::BoundedString<255>,
18110 fdomain_client::fidl::FDomainResourceDialect
18111 ),
18112 }
18113 }
18114
18115 #[inline]
18116 unsafe fn decode(
18117 &mut self,
18118 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18119 offset: usize,
18120 _depth: fidl::encoding::Depth,
18121 ) -> fidl::Result<()> {
18122 decoder.debug_check_bounds::<Self>(offset);
18123 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18125 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18126 let mask = 0xffffffff00000000u64;
18127 let maskedval = padval & mask;
18128 if maskedval != 0 {
18129 return Err(fidl::Error::NonZeroPadding {
18130 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18131 });
18132 }
18133 fidl::decode!(
18134 fidl::encoding::BoundedString<255>,
18135 fdomain_client::fidl::FDomainResourceDialect,
18136 &mut self.src,
18137 decoder,
18138 offset + 0,
18139 _depth
18140 )?;
18141 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)?;
18142 fidl::decode!(
18143 fidl::encoding::BoundedString<255>,
18144 fdomain_client::fidl::FDomainResourceDialect,
18145 &mut self.dst,
18146 decoder,
18147 offset + 24,
18148 _depth
18149 )?;
18150 Ok(())
18151 }
18152 }
18153
18154 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
18155 type Borrowed<'a> = &'a mut Self;
18156 fn take_or_borrow<'a>(
18157 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18158 ) -> Self::Borrowed<'a> {
18159 value
18160 }
18161 }
18162
18163 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
18164 type Owned = Self;
18165
18166 #[inline(always)]
18167 fn inline_align(_context: fidl::encoding::Context) -> usize {
18168 4
18169 }
18170
18171 #[inline(always)]
18172 fn inline_size(_context: fidl::encoding::Context) -> usize {
18173 12
18174 }
18175 }
18176
18177 unsafe impl
18178 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18179 for &mut DirectoryWatchRequest
18180 {
18181 #[inline]
18182 unsafe fn encode(
18183 self,
18184 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18185 offset: usize,
18186 _depth: fidl::encoding::Depth,
18187 ) -> fidl::Result<()> {
18188 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18189 fidl::encoding::Encode::<
18191 DirectoryWatchRequest,
18192 fdomain_client::fidl::FDomainResourceDialect,
18193 >::encode(
18194 (
18195 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
18196 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18197 <fidl::encoding::Endpoint<
18198 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18199 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18200 &mut self.watcher
18201 ),
18202 ),
18203 encoder,
18204 offset,
18205 _depth,
18206 )
18207 }
18208 }
18209 unsafe impl<
18210 T0: fidl::encoding::Encode<WatchMask, fdomain_client::fidl::FDomainResourceDialect>,
18211 T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
18212 T2: fidl::encoding::Encode<
18213 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18214 fdomain_client::fidl::FDomainResourceDialect,
18215 >,
18216 >
18217 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18218 for (T0, T1, T2)
18219 {
18220 #[inline]
18221 unsafe fn encode(
18222 self,
18223 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18224 offset: usize,
18225 depth: fidl::encoding::Depth,
18226 ) -> fidl::Result<()> {
18227 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18228 self.0.encode(encoder, offset + 0, depth)?;
18232 self.1.encode(encoder, offset + 4, depth)?;
18233 self.2.encode(encoder, offset + 8, depth)?;
18234 Ok(())
18235 }
18236 }
18237
18238 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18239 for DirectoryWatchRequest
18240 {
18241 #[inline(always)]
18242 fn new_empty() -> Self {
18243 Self {
18244 mask: fidl::new_empty!(WatchMask, fdomain_client::fidl::FDomainResourceDialect),
18245 options: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
18246 watcher: fidl::new_empty!(
18247 fidl::encoding::Endpoint<
18248 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18249 >,
18250 fdomain_client::fidl::FDomainResourceDialect
18251 ),
18252 }
18253 }
18254
18255 #[inline]
18256 unsafe fn decode(
18257 &mut self,
18258 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18259 offset: usize,
18260 _depth: fidl::encoding::Depth,
18261 ) -> fidl::Result<()> {
18262 decoder.debug_check_bounds::<Self>(offset);
18263 fidl::decode!(
18265 WatchMask,
18266 fdomain_client::fidl::FDomainResourceDialect,
18267 &mut self.mask,
18268 decoder,
18269 offset + 0,
18270 _depth
18271 )?;
18272 fidl::decode!(
18273 u32,
18274 fdomain_client::fidl::FDomainResourceDialect,
18275 &mut self.options,
18276 decoder,
18277 offset + 4,
18278 _depth
18279 )?;
18280 fidl::decode!(
18281 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18282 fdomain_client::fidl::FDomainResourceDialect,
18283 &mut self.watcher,
18284 decoder,
18285 offset + 8,
18286 _depth
18287 )?;
18288 Ok(())
18289 }
18290 }
18291
18292 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
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 FileAllocateRequest {
18302 type Owned = Self;
18303
18304 #[inline(always)]
18305 fn inline_align(_context: fidl::encoding::Context) -> usize {
18306 8
18307 }
18308
18309 #[inline(always)]
18310 fn inline_size(_context: fidl::encoding::Context) -> usize {
18311 24
18312 }
18313 }
18314
18315 unsafe impl
18316 fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18317 for &mut FileAllocateRequest
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::<FileAllocateRequest>(offset);
18327 fidl::encoding::Encode::<
18329 FileAllocateRequest,
18330 fdomain_client::fidl::FDomainResourceDialect,
18331 >::encode(
18332 (
18333 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
18334 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
18335 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
18336 ),
18337 encoder,
18338 offset,
18339 _depth,
18340 )
18341 }
18342 }
18343 unsafe impl<
18344 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18345 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18346 T2: fidl::encoding::Encode<AllocateMode, fdomain_client::fidl::FDomainResourceDialect>,
18347 > fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18348 for (T0, T1, T2)
18349 {
18350 #[inline]
18351 unsafe fn encode(
18352 self,
18353 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18354 offset: usize,
18355 depth: fidl::encoding::Depth,
18356 ) -> fidl::Result<()> {
18357 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18358 unsafe {
18361 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18362 (ptr as *mut u64).write_unaligned(0);
18363 }
18364 self.0.encode(encoder, offset + 0, depth)?;
18366 self.1.encode(encoder, offset + 8, depth)?;
18367 self.2.encode(encoder, offset + 16, depth)?;
18368 Ok(())
18369 }
18370 }
18371
18372 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18373 for FileAllocateRequest
18374 {
18375 #[inline(always)]
18376 fn new_empty() -> Self {
18377 Self {
18378 offset: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18379 length: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18380 mode: fidl::new_empty!(AllocateMode, fdomain_client::fidl::FDomainResourceDialect),
18381 }
18382 }
18383
18384 #[inline]
18385 unsafe fn decode(
18386 &mut self,
18387 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18388 offset: usize,
18389 _depth: fidl::encoding::Depth,
18390 ) -> fidl::Result<()> {
18391 decoder.debug_check_bounds::<Self>(offset);
18392 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18394 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18395 let mask = 0xffffffff00000000u64;
18396 let maskedval = padval & mask;
18397 if maskedval != 0 {
18398 return Err(fidl::Error::NonZeroPadding {
18399 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18400 });
18401 }
18402 fidl::decode!(
18403 u64,
18404 fdomain_client::fidl::FDomainResourceDialect,
18405 &mut self.offset,
18406 decoder,
18407 offset + 0,
18408 _depth
18409 )?;
18410 fidl::decode!(
18411 u64,
18412 fdomain_client::fidl::FDomainResourceDialect,
18413 &mut self.length,
18414 decoder,
18415 offset + 8,
18416 _depth
18417 )?;
18418 fidl::decode!(
18419 AllocateMode,
18420 fdomain_client::fidl::FDomainResourceDialect,
18421 &mut self.mode,
18422 decoder,
18423 offset + 16,
18424 _depth
18425 )?;
18426 Ok(())
18427 }
18428 }
18429
18430 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
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 FileEnableVerityRequest {
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 16
18450 }
18451 }
18452
18453 unsafe impl
18454 fidl::encoding::Encode<
18455 FileEnableVerityRequest,
18456 fdomain_client::fidl::FDomainResourceDialect,
18457 > for &mut FileEnableVerityRequest
18458 {
18459 #[inline]
18460 unsafe fn encode(
18461 self,
18462 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18463 offset: usize,
18464 _depth: fidl::encoding::Depth,
18465 ) -> fidl::Result<()> {
18466 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18467 fidl::encoding::Encode::<
18469 FileEnableVerityRequest,
18470 fdomain_client::fidl::FDomainResourceDialect,
18471 >::encode(
18472 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
18473 encoder,
18474 offset,
18475 _depth,
18476 )
18477 }
18478 }
18479 unsafe impl<
18480 T0: fidl::encoding::Encode<VerificationOptions, fdomain_client::fidl::FDomainResourceDialect>,
18481 >
18482 fidl::encoding::Encode<
18483 FileEnableVerityRequest,
18484 fdomain_client::fidl::FDomainResourceDialect,
18485 > for (T0,)
18486 {
18487 #[inline]
18488 unsafe fn encode(
18489 self,
18490 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18491 offset: usize,
18492 depth: fidl::encoding::Depth,
18493 ) -> fidl::Result<()> {
18494 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18495 self.0.encode(encoder, offset + 0, depth)?;
18499 Ok(())
18500 }
18501 }
18502
18503 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18504 for FileEnableVerityRequest
18505 {
18506 #[inline(always)]
18507 fn new_empty() -> Self {
18508 Self {
18509 options: fidl::new_empty!(
18510 VerificationOptions,
18511 fdomain_client::fidl::FDomainResourceDialect
18512 ),
18513 }
18514 }
18515
18516 #[inline]
18517 unsafe fn decode(
18518 &mut self,
18519 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18520 offset: usize,
18521 _depth: fidl::encoding::Depth,
18522 ) -> fidl::Result<()> {
18523 decoder.debug_check_bounds::<Self>(offset);
18524 fidl::decode!(
18526 VerificationOptions,
18527 fdomain_client::fidl::FDomainResourceDialect,
18528 &mut self.options,
18529 decoder,
18530 offset + 0,
18531 _depth
18532 )?;
18533 Ok(())
18534 }
18535 }
18536
18537 impl fidl::encoding::ResourceTypeMarker for FileObject {
18538 type Borrowed<'a> = &'a mut Self;
18539 fn take_or_borrow<'a>(
18540 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18541 ) -> Self::Borrowed<'a> {
18542 value
18543 }
18544 }
18545
18546 unsafe impl fidl::encoding::TypeMarker for FileObject {
18547 type Owned = Self;
18548
18549 #[inline(always)]
18550 fn inline_align(_context: fidl::encoding::Context) -> usize {
18551 4
18552 }
18553
18554 #[inline(always)]
18555 fn inline_size(_context: fidl::encoding::Context) -> usize {
18556 8
18557 }
18558 }
18559
18560 unsafe impl fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18561 for &mut FileObject
18562 {
18563 #[inline]
18564 unsafe fn encode(
18565 self,
18566 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18567 offset: usize,
18568 _depth: fidl::encoding::Depth,
18569 ) -> fidl::Result<()> {
18570 encoder.debug_check_bounds::<FileObject>(offset);
18571 fidl::encoding::Encode::<FileObject, fdomain_client::fidl::FDomainResourceDialect>::encode(
18573 (
18574 <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),
18575 <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),
18576 ),
18577 encoder, offset, _depth
18578 )
18579 }
18580 }
18581 unsafe impl<
18582 T0: fidl::encoding::Encode<
18583 fidl::encoding::Optional<
18584 fidl::encoding::HandleType<
18585 fdomain_client::Event,
18586 { fidl::ObjectType::EVENT.into_raw() },
18587 2147483648,
18588 >,
18589 >,
18590 fdomain_client::fidl::FDomainResourceDialect,
18591 >,
18592 T1: fidl::encoding::Encode<
18593 fidl::encoding::Optional<
18594 fidl::encoding::HandleType<
18595 fdomain_client::Stream,
18596 { fidl::ObjectType::STREAM.into_raw() },
18597 2147483648,
18598 >,
18599 >,
18600 fdomain_client::fidl::FDomainResourceDialect,
18601 >,
18602 > fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18603 for (T0, T1)
18604 {
18605 #[inline]
18606 unsafe fn encode(
18607 self,
18608 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18609 offset: usize,
18610 depth: fidl::encoding::Depth,
18611 ) -> fidl::Result<()> {
18612 encoder.debug_check_bounds::<FileObject>(offset);
18613 self.0.encode(encoder, offset + 0, depth)?;
18617 self.1.encode(encoder, offset + 4, depth)?;
18618 Ok(())
18619 }
18620 }
18621
18622 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileObject {
18623 #[inline(always)]
18624 fn new_empty() -> Self {
18625 Self {
18626 event: fidl::new_empty!(
18627 fidl::encoding::Optional<
18628 fidl::encoding::HandleType<
18629 fdomain_client::Event,
18630 { fidl::ObjectType::EVENT.into_raw() },
18631 2147483648,
18632 >,
18633 >,
18634 fdomain_client::fidl::FDomainResourceDialect
18635 ),
18636 stream: fidl::new_empty!(
18637 fidl::encoding::Optional<
18638 fidl::encoding::HandleType<
18639 fdomain_client::Stream,
18640 { fidl::ObjectType::STREAM.into_raw() },
18641 2147483648,
18642 >,
18643 >,
18644 fdomain_client::fidl::FDomainResourceDialect
18645 ),
18646 }
18647 }
18648
18649 #[inline]
18650 unsafe fn decode(
18651 &mut self,
18652 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18653 offset: usize,
18654 _depth: fidl::encoding::Depth,
18655 ) -> fidl::Result<()> {
18656 decoder.debug_check_bounds::<Self>(offset);
18657 fidl::decode!(
18659 fidl::encoding::Optional<
18660 fidl::encoding::HandleType<
18661 fdomain_client::Event,
18662 { fidl::ObjectType::EVENT.into_raw() },
18663 2147483648,
18664 >,
18665 >,
18666 fdomain_client::fidl::FDomainResourceDialect,
18667 &mut self.event,
18668 decoder,
18669 offset + 0,
18670 _depth
18671 )?;
18672 fidl::decode!(
18673 fidl::encoding::Optional<
18674 fidl::encoding::HandleType<
18675 fdomain_client::Stream,
18676 { fidl::ObjectType::STREAM.into_raw() },
18677 2147483648,
18678 >,
18679 >,
18680 fdomain_client::fidl::FDomainResourceDialect,
18681 &mut self.stream,
18682 decoder,
18683 offset + 4,
18684 _depth
18685 )?;
18686 Ok(())
18687 }
18688 }
18689
18690 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
18691 type Borrowed<'a> = &'a mut Self;
18692 fn take_or_borrow<'a>(
18693 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18694 ) -> Self::Borrowed<'a> {
18695 value
18696 }
18697 }
18698
18699 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
18700 type Owned = Self;
18701
18702 #[inline(always)]
18703 fn inline_align(_context: fidl::encoding::Context) -> usize {
18704 4
18705 }
18706
18707 #[inline(always)]
18708 fn inline_size(_context: fidl::encoding::Context) -> usize {
18709 4
18710 }
18711 }
18712
18713 unsafe impl
18714 fidl::encoding::Encode<
18715 FileGetBackingMemoryResponse,
18716 fdomain_client::fidl::FDomainResourceDialect,
18717 > for &mut FileGetBackingMemoryResponse
18718 {
18719 #[inline]
18720 unsafe fn encode(
18721 self,
18722 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18723 offset: usize,
18724 _depth: fidl::encoding::Depth,
18725 ) -> fidl::Result<()> {
18726 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18727 fidl::encoding::Encode::<
18729 FileGetBackingMemoryResponse,
18730 fdomain_client::fidl::FDomainResourceDialect,
18731 >::encode(
18732 (<fidl::encoding::HandleType<
18733 fdomain_client::Vmo,
18734 { fidl::ObjectType::VMO.into_raw() },
18735 2147483648,
18736 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18737 &mut self.vmo
18738 ),),
18739 encoder,
18740 offset,
18741 _depth,
18742 )
18743 }
18744 }
18745 unsafe impl<
18746 T0: fidl::encoding::Encode<
18747 fidl::encoding::HandleType<
18748 fdomain_client::Vmo,
18749 { fidl::ObjectType::VMO.into_raw() },
18750 2147483648,
18751 >,
18752 fdomain_client::fidl::FDomainResourceDialect,
18753 >,
18754 >
18755 fidl::encoding::Encode<
18756 FileGetBackingMemoryResponse,
18757 fdomain_client::fidl::FDomainResourceDialect,
18758 > for (T0,)
18759 {
18760 #[inline]
18761 unsafe fn encode(
18762 self,
18763 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18764 offset: usize,
18765 depth: fidl::encoding::Depth,
18766 ) -> fidl::Result<()> {
18767 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18768 self.0.encode(encoder, offset + 0, depth)?;
18772 Ok(())
18773 }
18774 }
18775
18776 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18777 for FileGetBackingMemoryResponse
18778 {
18779 #[inline(always)]
18780 fn new_empty() -> Self {
18781 Self {
18782 vmo: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18783 }
18784 }
18785
18786 #[inline]
18787 unsafe fn decode(
18788 &mut self,
18789 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18790 offset: usize,
18791 _depth: fidl::encoding::Depth,
18792 ) -> fidl::Result<()> {
18793 decoder.debug_check_bounds::<Self>(offset);
18794 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)?;
18796 Ok(())
18797 }
18798 }
18799
18800 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
18801 type Borrowed<'a> = &'a mut Self;
18802 fn take_or_borrow<'a>(
18803 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18804 ) -> Self::Borrowed<'a> {
18805 value
18806 }
18807 }
18808
18809 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
18810 type Owned = Self;
18811
18812 #[inline(always)]
18813 fn inline_align(_context: fidl::encoding::Context) -> usize {
18814 8
18815 }
18816
18817 #[inline(always)]
18818 fn inline_size(_context: fidl::encoding::Context) -> usize {
18819 24
18820 }
18821 }
18822
18823 unsafe impl
18824 fidl::encoding::Encode<
18825 LinkableLinkIntoRequest,
18826 fdomain_client::fidl::FDomainResourceDialect,
18827 > for &mut LinkableLinkIntoRequest
18828 {
18829 #[inline]
18830 unsafe fn encode(
18831 self,
18832 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18833 offset: usize,
18834 _depth: fidl::encoding::Depth,
18835 ) -> fidl::Result<()> {
18836 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18837 fidl::encoding::Encode::<
18839 LinkableLinkIntoRequest,
18840 fdomain_client::fidl::FDomainResourceDialect,
18841 >::encode(
18842 (
18843 <fidl::encoding::HandleType<
18844 fdomain_client::Event,
18845 { fidl::ObjectType::EVENT.into_raw() },
18846 2147483648,
18847 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18848 &mut self.dst_parent_token,
18849 ),
18850 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18851 &self.dst,
18852 ),
18853 ),
18854 encoder,
18855 offset,
18856 _depth,
18857 )
18858 }
18859 }
18860 unsafe impl<
18861 T0: fidl::encoding::Encode<
18862 fidl::encoding::HandleType<
18863 fdomain_client::Event,
18864 { fidl::ObjectType::EVENT.into_raw() },
18865 2147483648,
18866 >,
18867 fdomain_client::fidl::FDomainResourceDialect,
18868 >,
18869 T1: fidl::encoding::Encode<
18870 fidl::encoding::BoundedString<255>,
18871 fdomain_client::fidl::FDomainResourceDialect,
18872 >,
18873 >
18874 fidl::encoding::Encode<
18875 LinkableLinkIntoRequest,
18876 fdomain_client::fidl::FDomainResourceDialect,
18877 > for (T0, T1)
18878 {
18879 #[inline]
18880 unsafe fn encode(
18881 self,
18882 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18883 offset: usize,
18884 depth: fidl::encoding::Depth,
18885 ) -> fidl::Result<()> {
18886 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18887 unsafe {
18890 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18891 (ptr as *mut u64).write_unaligned(0);
18892 }
18893 self.0.encode(encoder, offset + 0, depth)?;
18895 self.1.encode(encoder, offset + 8, depth)?;
18896 Ok(())
18897 }
18898 }
18899
18900 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18901 for LinkableLinkIntoRequest
18902 {
18903 #[inline(always)]
18904 fn new_empty() -> Self {
18905 Self {
18906 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18907 dst: fidl::new_empty!(
18908 fidl::encoding::BoundedString<255>,
18909 fdomain_client::fidl::FDomainResourceDialect
18910 ),
18911 }
18912 }
18913
18914 #[inline]
18915 unsafe fn decode(
18916 &mut self,
18917 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18918 offset: usize,
18919 _depth: fidl::encoding::Depth,
18920 ) -> fidl::Result<()> {
18921 decoder.debug_check_bounds::<Self>(offset);
18922 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
18924 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18925 let mask = 0xffffffff00000000u64;
18926 let maskedval = padval & mask;
18927 if maskedval != 0 {
18928 return Err(fidl::Error::NonZeroPadding {
18929 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18930 });
18931 }
18932 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)?;
18933 fidl::decode!(
18934 fidl::encoding::BoundedString<255>,
18935 fdomain_client::fidl::FDomainResourceDialect,
18936 &mut self.dst,
18937 decoder,
18938 offset + 8,
18939 _depth
18940 )?;
18941 Ok(())
18942 }
18943 }
18944
18945 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
18946 type Borrowed<'a> = &'a mut Self;
18947 fn take_or_borrow<'a>(
18948 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18949 ) -> Self::Borrowed<'a> {
18950 value
18951 }
18952 }
18953
18954 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
18955 type Owned = Self;
18956
18957 #[inline(always)]
18958 fn inline_align(_context: fidl::encoding::Context) -> usize {
18959 4
18960 }
18961
18962 #[inline(always)]
18963 fn inline_size(_context: fidl::encoding::Context) -> usize {
18964 8
18965 }
18966 }
18967
18968 unsafe impl
18969 fidl::encoding::Encode<
18970 NodeDeprecatedCloneRequest,
18971 fdomain_client::fidl::FDomainResourceDialect,
18972 > for &mut NodeDeprecatedCloneRequest
18973 {
18974 #[inline]
18975 unsafe fn encode(
18976 self,
18977 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18978 offset: usize,
18979 _depth: fidl::encoding::Depth,
18980 ) -> fidl::Result<()> {
18981 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
18982 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
18984 (
18985 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
18986 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
18987 ),
18988 encoder, offset, _depth
18989 )
18990 }
18991 }
18992 unsafe impl<
18993 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
18994 T1: fidl::encoding::Encode<
18995 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
18996 fdomain_client::fidl::FDomainResourceDialect,
18997 >,
18998 >
18999 fidl::encoding::Encode<
19000 NodeDeprecatedCloneRequest,
19001 fdomain_client::fidl::FDomainResourceDialect,
19002 > for (T0, T1)
19003 {
19004 #[inline]
19005 unsafe fn encode(
19006 self,
19007 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19008 offset: usize,
19009 depth: fidl::encoding::Depth,
19010 ) -> fidl::Result<()> {
19011 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19012 self.0.encode(encoder, offset + 0, depth)?;
19016 self.1.encode(encoder, offset + 4, depth)?;
19017 Ok(())
19018 }
19019 }
19020
19021 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19022 for NodeDeprecatedCloneRequest
19023 {
19024 #[inline(always)]
19025 fn new_empty() -> Self {
19026 Self {
19027 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
19028 object: fidl::new_empty!(
19029 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19030 fdomain_client::fidl::FDomainResourceDialect
19031 ),
19032 }
19033 }
19034
19035 #[inline]
19036 unsafe fn decode(
19037 &mut self,
19038 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19039 offset: usize,
19040 _depth: fidl::encoding::Depth,
19041 ) -> fidl::Result<()> {
19042 decoder.debug_check_bounds::<Self>(offset);
19043 fidl::decode!(
19045 OpenFlags,
19046 fdomain_client::fidl::FDomainResourceDialect,
19047 &mut self.flags,
19048 decoder,
19049 offset + 0,
19050 _depth
19051 )?;
19052 fidl::decode!(
19053 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19054 fdomain_client::fidl::FDomainResourceDialect,
19055 &mut self.object,
19056 decoder,
19057 offset + 4,
19058 _depth
19059 )?;
19060 Ok(())
19061 }
19062 }
19063
19064 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
19065 type Borrowed<'a> = &'a mut Self;
19066 fn take_or_borrow<'a>(
19067 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19068 ) -> Self::Borrowed<'a> {
19069 value
19070 }
19071 }
19072
19073 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
19074 type Owned = Self;
19075
19076 #[inline(always)]
19077 fn inline_align(_context: fidl::encoding::Context) -> usize {
19078 4
19079 }
19080
19081 #[inline(always)]
19082 fn inline_size(_context: fidl::encoding::Context) -> usize {
19083 4
19084 }
19085 }
19086
19087 unsafe impl
19088 fidl::encoding::Encode<
19089 NodeListExtendedAttributesRequest,
19090 fdomain_client::fidl::FDomainResourceDialect,
19091 > for &mut NodeListExtendedAttributesRequest
19092 {
19093 #[inline]
19094 unsafe fn encode(
19095 self,
19096 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19097 offset: usize,
19098 _depth: fidl::encoding::Depth,
19099 ) -> fidl::Result<()> {
19100 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19101 fidl::encoding::Encode::<
19103 NodeListExtendedAttributesRequest,
19104 fdomain_client::fidl::FDomainResourceDialect,
19105 >::encode(
19106 (<fidl::encoding::Endpoint<
19107 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19108 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19109 &mut self.iterator
19110 ),),
19111 encoder,
19112 offset,
19113 _depth,
19114 )
19115 }
19116 }
19117 unsafe impl<
19118 T0: fidl::encoding::Encode<
19119 fidl::encoding::Endpoint<
19120 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19121 >,
19122 fdomain_client::fidl::FDomainResourceDialect,
19123 >,
19124 >
19125 fidl::encoding::Encode<
19126 NodeListExtendedAttributesRequest,
19127 fdomain_client::fidl::FDomainResourceDialect,
19128 > for (T0,)
19129 {
19130 #[inline]
19131 unsafe fn encode(
19132 self,
19133 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19134 offset: usize,
19135 depth: fidl::encoding::Depth,
19136 ) -> fidl::Result<()> {
19137 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19138 self.0.encode(encoder, offset + 0, depth)?;
19142 Ok(())
19143 }
19144 }
19145
19146 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19147 for NodeListExtendedAttributesRequest
19148 {
19149 #[inline(always)]
19150 fn new_empty() -> Self {
19151 Self {
19152 iterator: fidl::new_empty!(
19153 fidl::encoding::Endpoint<
19154 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19155 >,
19156 fdomain_client::fidl::FDomainResourceDialect
19157 ),
19158 }
19159 }
19160
19161 #[inline]
19162 unsafe fn decode(
19163 &mut self,
19164 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19165 offset: usize,
19166 _depth: fidl::encoding::Depth,
19167 ) -> fidl::Result<()> {
19168 decoder.debug_check_bounds::<Self>(offset);
19169 fidl::decode!(
19171 fidl::encoding::Endpoint<
19172 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19173 >,
19174 fdomain_client::fidl::FDomainResourceDialect,
19175 &mut self.iterator,
19176 decoder,
19177 offset + 0,
19178 _depth
19179 )?;
19180 Ok(())
19181 }
19182 }
19183
19184 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
19185 type Borrowed<'a> = &'a mut Self;
19186 fn take_or_borrow<'a>(
19187 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19188 ) -> Self::Borrowed<'a> {
19189 value
19190 }
19191 }
19192
19193 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
19194 type Owned = Self;
19195
19196 #[inline(always)]
19197 fn inline_align(_context: fidl::encoding::Context) -> usize {
19198 8
19199 }
19200
19201 #[inline(always)]
19202 fn inline_size(_context: fidl::encoding::Context) -> usize {
19203 24
19204 }
19205 }
19206
19207 unsafe impl
19208 fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19209 for &mut NodeOnOpenRequest
19210 {
19211 #[inline]
19212 unsafe fn encode(
19213 self,
19214 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19215 offset: usize,
19216 _depth: fidl::encoding::Depth,
19217 ) -> fidl::Result<()> {
19218 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19219 fidl::encoding::Encode::<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19221 (
19222 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
19223 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
19224 ),
19225 encoder, offset, _depth
19226 )
19227 }
19228 }
19229 unsafe impl<
19230 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
19231 T1: fidl::encoding::Encode<
19232 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19233 fdomain_client::fidl::FDomainResourceDialect,
19234 >,
19235 > fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19236 for (T0, T1)
19237 {
19238 #[inline]
19239 unsafe fn encode(
19240 self,
19241 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19242 offset: usize,
19243 depth: fidl::encoding::Depth,
19244 ) -> fidl::Result<()> {
19245 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19246 unsafe {
19249 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19250 (ptr as *mut u64).write_unaligned(0);
19251 }
19252 self.0.encode(encoder, offset + 0, depth)?;
19254 self.1.encode(encoder, offset + 8, depth)?;
19255 Ok(())
19256 }
19257 }
19258
19259 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19260 for NodeOnOpenRequest
19261 {
19262 #[inline(always)]
19263 fn new_empty() -> Self {
19264 Self {
19265 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
19266 info: fidl::new_empty!(
19267 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19268 fdomain_client::fidl::FDomainResourceDialect
19269 ),
19270 }
19271 }
19272
19273 #[inline]
19274 unsafe fn decode(
19275 &mut self,
19276 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19277 offset: usize,
19278 _depth: fidl::encoding::Depth,
19279 ) -> fidl::Result<()> {
19280 decoder.debug_check_bounds::<Self>(offset);
19281 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19283 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19284 let mask = 0xffffffff00000000u64;
19285 let maskedval = padval & mask;
19286 if maskedval != 0 {
19287 return Err(fidl::Error::NonZeroPadding {
19288 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19289 });
19290 }
19291 fidl::decode!(
19292 i32,
19293 fdomain_client::fidl::FDomainResourceDialect,
19294 &mut self.s,
19295 decoder,
19296 offset + 0,
19297 _depth
19298 )?;
19299 fidl::decode!(
19300 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19301 fdomain_client::fidl::FDomainResourceDialect,
19302 &mut self.info,
19303 decoder,
19304 offset + 8,
19305 _depth
19306 )?;
19307 Ok(())
19308 }
19309 }
19310
19311 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
19312 type Borrowed<'a> = &'a mut Self;
19313 fn take_or_borrow<'a>(
19314 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19315 ) -> Self::Borrowed<'a> {
19316 value
19317 }
19318 }
19319
19320 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
19321 type Owned = Self;
19322
19323 #[inline(always)]
19324 fn inline_align(_context: fidl::encoding::Context) -> usize {
19325 8
19326 }
19327
19328 #[inline(always)]
19329 fn inline_size(_context: fidl::encoding::Context) -> usize {
19330 40
19331 }
19332 }
19333
19334 unsafe impl
19335 fidl::encoding::Encode<
19336 NodeSetExtendedAttributeRequest,
19337 fdomain_client::fidl::FDomainResourceDialect,
19338 > for &mut NodeSetExtendedAttributeRequest
19339 {
19340 #[inline]
19341 unsafe fn encode(
19342 self,
19343 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19344 offset: usize,
19345 _depth: fidl::encoding::Depth,
19346 ) -> fidl::Result<()> {
19347 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19348 fidl::encoding::Encode::<
19350 NodeSetExtendedAttributeRequest,
19351 fdomain_client::fidl::FDomainResourceDialect,
19352 >::encode(
19353 (
19354 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
19355 &self.name,
19356 ),
19357 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19358 &mut self.value,
19359 ),
19360 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
19361 &self.mode,
19362 ),
19363 ),
19364 encoder,
19365 offset,
19366 _depth,
19367 )
19368 }
19369 }
19370 unsafe impl<
19371 T0: fidl::encoding::Encode<
19372 fidl::encoding::Vector<u8, 255>,
19373 fdomain_client::fidl::FDomainResourceDialect,
19374 >,
19375 T1: fidl::encoding::Encode<
19376 ExtendedAttributeValue,
19377 fdomain_client::fidl::FDomainResourceDialect,
19378 >,
19379 T2: fidl::encoding::Encode<
19380 SetExtendedAttributeMode,
19381 fdomain_client::fidl::FDomainResourceDialect,
19382 >,
19383 >
19384 fidl::encoding::Encode<
19385 NodeSetExtendedAttributeRequest,
19386 fdomain_client::fidl::FDomainResourceDialect,
19387 > for (T0, T1, T2)
19388 {
19389 #[inline]
19390 unsafe fn encode(
19391 self,
19392 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19393 offset: usize,
19394 depth: fidl::encoding::Depth,
19395 ) -> fidl::Result<()> {
19396 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19397 unsafe {
19400 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
19401 (ptr as *mut u64).write_unaligned(0);
19402 }
19403 self.0.encode(encoder, offset + 0, depth)?;
19405 self.1.encode(encoder, offset + 16, depth)?;
19406 self.2.encode(encoder, offset + 32, depth)?;
19407 Ok(())
19408 }
19409 }
19410
19411 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19412 for NodeSetExtendedAttributeRequest
19413 {
19414 #[inline(always)]
19415 fn new_empty() -> Self {
19416 Self {
19417 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect),
19418 value: fidl::new_empty!(
19419 ExtendedAttributeValue,
19420 fdomain_client::fidl::FDomainResourceDialect
19421 ),
19422 mode: fidl::new_empty!(
19423 SetExtendedAttributeMode,
19424 fdomain_client::fidl::FDomainResourceDialect
19425 ),
19426 }
19427 }
19428
19429 #[inline]
19430 unsafe fn decode(
19431 &mut self,
19432 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19433 offset: usize,
19434 _depth: fidl::encoding::Depth,
19435 ) -> fidl::Result<()> {
19436 decoder.debug_check_bounds::<Self>(offset);
19437 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
19439 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19440 let mask = 0xffffffff00000000u64;
19441 let maskedval = padval & mask;
19442 if maskedval != 0 {
19443 return Err(fidl::Error::NonZeroPadding {
19444 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
19445 });
19446 }
19447 fidl::decode!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
19448 fidl::decode!(
19449 ExtendedAttributeValue,
19450 fdomain_client::fidl::FDomainResourceDialect,
19451 &mut self.value,
19452 decoder,
19453 offset + 16,
19454 _depth
19455 )?;
19456 fidl::decode!(
19457 SetExtendedAttributeMode,
19458 fdomain_client::fidl::FDomainResourceDialect,
19459 &mut self.mode,
19460 decoder,
19461 offset + 32,
19462 _depth
19463 )?;
19464 Ok(())
19465 }
19466 }
19467
19468 impl ConnectionInfo {
19469 #[inline(always)]
19470 fn max_ordinal_present(&self) -> u64 {
19471 if let Some(_) = self.rights {
19472 return 1;
19473 }
19474 0
19475 }
19476 }
19477
19478 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
19479 type Borrowed<'a> = &'a mut Self;
19480 fn take_or_borrow<'a>(
19481 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19482 ) -> Self::Borrowed<'a> {
19483 value
19484 }
19485 }
19486
19487 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
19488 type Owned = Self;
19489
19490 #[inline(always)]
19491 fn inline_align(_context: fidl::encoding::Context) -> usize {
19492 8
19493 }
19494
19495 #[inline(always)]
19496 fn inline_size(_context: fidl::encoding::Context) -> usize {
19497 16
19498 }
19499 }
19500
19501 unsafe impl fidl::encoding::Encode<ConnectionInfo, fdomain_client::fidl::FDomainResourceDialect>
19502 for &mut ConnectionInfo
19503 {
19504 unsafe fn encode(
19505 self,
19506 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19507 offset: usize,
19508 mut depth: fidl::encoding::Depth,
19509 ) -> fidl::Result<()> {
19510 encoder.debug_check_bounds::<ConnectionInfo>(offset);
19511 let max_ordinal: u64 = self.max_ordinal_present();
19513 encoder.write_num(max_ordinal, offset);
19514 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19515 if max_ordinal == 0 {
19517 return Ok(());
19518 }
19519 depth.increment()?;
19520 let envelope_size = 8;
19521 let bytes_len = max_ordinal as usize * envelope_size;
19522 #[allow(unused_variables)]
19523 let offset = encoder.out_of_line_offset(bytes_len);
19524 let mut _prev_end_offset: usize = 0;
19525 if 1 > max_ordinal {
19526 return Ok(());
19527 }
19528
19529 let cur_offset: usize = (1 - 1) * envelope_size;
19532
19533 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19535
19536 fidl::encoding::encode_in_envelope_optional::<
19541 Operations,
19542 fdomain_client::fidl::FDomainResourceDialect,
19543 >(
19544 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
19545 encoder,
19546 offset + cur_offset,
19547 depth,
19548 )?;
19549
19550 _prev_end_offset = cur_offset + envelope_size;
19551
19552 Ok(())
19553 }
19554 }
19555
19556 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {
19557 #[inline(always)]
19558 fn new_empty() -> Self {
19559 Self::default()
19560 }
19561
19562 unsafe fn decode(
19563 &mut self,
19564 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19565 offset: usize,
19566 mut depth: fidl::encoding::Depth,
19567 ) -> fidl::Result<()> {
19568 decoder.debug_check_bounds::<Self>(offset);
19569 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19570 None => return Err(fidl::Error::NotNullable),
19571 Some(len) => len,
19572 };
19573 if len == 0 {
19575 return Ok(());
19576 };
19577 depth.increment()?;
19578 let envelope_size = 8;
19579 let bytes_len = len * envelope_size;
19580 let offset = decoder.out_of_line_offset(bytes_len)?;
19581 let mut _next_ordinal_to_read = 0;
19583 let mut next_offset = offset;
19584 let end_offset = offset + bytes_len;
19585 _next_ordinal_to_read += 1;
19586 if next_offset >= end_offset {
19587 return Ok(());
19588 }
19589
19590 while _next_ordinal_to_read < 1 {
19592 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19593 _next_ordinal_to_read += 1;
19594 next_offset += envelope_size;
19595 }
19596
19597 let next_out_of_line = decoder.next_out_of_line();
19598 let handles_before = decoder.remaining_handles();
19599 if let Some((inlined, num_bytes, num_handles)) =
19600 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19601 {
19602 let member_inline_size =
19603 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19604 if inlined != (member_inline_size <= 4) {
19605 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19606 }
19607 let inner_offset;
19608 let mut inner_depth = depth.clone();
19609 if inlined {
19610 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19611 inner_offset = next_offset;
19612 } else {
19613 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19614 inner_depth.increment()?;
19615 }
19616 let val_ref = self.rights.get_or_insert_with(|| {
19617 fidl::new_empty!(Operations, fdomain_client::fidl::FDomainResourceDialect)
19618 });
19619 fidl::decode!(
19620 Operations,
19621 fdomain_client::fidl::FDomainResourceDialect,
19622 val_ref,
19623 decoder,
19624 inner_offset,
19625 inner_depth
19626 )?;
19627 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19628 {
19629 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19630 }
19631 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19632 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19633 }
19634 }
19635
19636 next_offset += envelope_size;
19637
19638 while next_offset < end_offset {
19640 _next_ordinal_to_read += 1;
19641 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19642 next_offset += envelope_size;
19643 }
19644
19645 Ok(())
19646 }
19647 }
19648
19649 impl FileInfo {
19650 #[inline(always)]
19651 fn max_ordinal_present(&self) -> u64 {
19652 if let Some(_) = self.attributes {
19653 return 4;
19654 }
19655 if let Some(_) = self.stream {
19656 return 3;
19657 }
19658 if let Some(_) = self.observer {
19659 return 2;
19660 }
19661 if let Some(_) = self.is_append {
19662 return 1;
19663 }
19664 0
19665 }
19666 }
19667
19668 impl fidl::encoding::ResourceTypeMarker for FileInfo {
19669 type Borrowed<'a> = &'a mut Self;
19670 fn take_or_borrow<'a>(
19671 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19672 ) -> Self::Borrowed<'a> {
19673 value
19674 }
19675 }
19676
19677 unsafe impl fidl::encoding::TypeMarker for FileInfo {
19678 type Owned = Self;
19679
19680 #[inline(always)]
19681 fn inline_align(_context: fidl::encoding::Context) -> usize {
19682 8
19683 }
19684
19685 #[inline(always)]
19686 fn inline_size(_context: fidl::encoding::Context) -> usize {
19687 16
19688 }
19689 }
19690
19691 unsafe impl fidl::encoding::Encode<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
19692 for &mut FileInfo
19693 {
19694 unsafe fn encode(
19695 self,
19696 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19697 offset: usize,
19698 mut depth: fidl::encoding::Depth,
19699 ) -> fidl::Result<()> {
19700 encoder.debug_check_bounds::<FileInfo>(offset);
19701 let max_ordinal: u64 = self.max_ordinal_present();
19703 encoder.write_num(max_ordinal, offset);
19704 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19705 if max_ordinal == 0 {
19707 return Ok(());
19708 }
19709 depth.increment()?;
19710 let envelope_size = 8;
19711 let bytes_len = max_ordinal as usize * envelope_size;
19712 #[allow(unused_variables)]
19713 let offset = encoder.out_of_line_offset(bytes_len);
19714 let mut _prev_end_offset: usize = 0;
19715 if 1 > max_ordinal {
19716 return Ok(());
19717 }
19718
19719 let cur_offset: usize = (1 - 1) * envelope_size;
19722
19723 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19725
19726 fidl::encoding::encode_in_envelope_optional::<
19731 bool,
19732 fdomain_client::fidl::FDomainResourceDialect,
19733 >(
19734 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
19735 encoder,
19736 offset + cur_offset,
19737 depth,
19738 )?;
19739
19740 _prev_end_offset = cur_offset + envelope_size;
19741 if 2 > max_ordinal {
19742 return Ok(());
19743 }
19744
19745 let cur_offset: usize = (2 - 1) * envelope_size;
19748
19749 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19751
19752 fidl::encoding::encode_in_envelope_optional::<
19757 fidl::encoding::HandleType<
19758 fdomain_client::Event,
19759 { fidl::ObjectType::EVENT.into_raw() },
19760 2147483648,
19761 >,
19762 fdomain_client::fidl::FDomainResourceDialect,
19763 >(
19764 self.observer.as_mut().map(
19765 <fidl::encoding::HandleType<
19766 fdomain_client::Event,
19767 { fidl::ObjectType::EVENT.into_raw() },
19768 2147483648,
19769 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19770 ),
19771 encoder,
19772 offset + cur_offset,
19773 depth,
19774 )?;
19775
19776 _prev_end_offset = cur_offset + envelope_size;
19777 if 3 > max_ordinal {
19778 return Ok(());
19779 }
19780
19781 let cur_offset: usize = (3 - 1) * envelope_size;
19784
19785 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19787
19788 fidl::encoding::encode_in_envelope_optional::<
19793 fidl::encoding::HandleType<
19794 fdomain_client::Stream,
19795 { fidl::ObjectType::STREAM.into_raw() },
19796 2147483648,
19797 >,
19798 fdomain_client::fidl::FDomainResourceDialect,
19799 >(
19800 self.stream.as_mut().map(
19801 <fidl::encoding::HandleType<
19802 fdomain_client::Stream,
19803 { fidl::ObjectType::STREAM.into_raw() },
19804 2147483648,
19805 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19806 ),
19807 encoder,
19808 offset + cur_offset,
19809 depth,
19810 )?;
19811
19812 _prev_end_offset = cur_offset + envelope_size;
19813 if 4 > max_ordinal {
19814 return Ok(());
19815 }
19816
19817 let cur_offset: usize = (4 - 1) * envelope_size;
19820
19821 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19823
19824 fidl::encoding::encode_in_envelope_optional::<
19829 NodeAttributes2,
19830 fdomain_client::fidl::FDomainResourceDialect,
19831 >(
19832 self.attributes
19833 .as_ref()
19834 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
19835 encoder,
19836 offset + cur_offset,
19837 depth,
19838 )?;
19839
19840 _prev_end_offset = cur_offset + envelope_size;
19841
19842 Ok(())
19843 }
19844 }
19845
19846 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileInfo {
19847 #[inline(always)]
19848 fn new_empty() -> Self {
19849 Self::default()
19850 }
19851
19852 unsafe fn decode(
19853 &mut self,
19854 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19855 offset: usize,
19856 mut depth: fidl::encoding::Depth,
19857 ) -> fidl::Result<()> {
19858 decoder.debug_check_bounds::<Self>(offset);
19859 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19860 None => return Err(fidl::Error::NotNullable),
19861 Some(len) => len,
19862 };
19863 if len == 0 {
19865 return Ok(());
19866 };
19867 depth.increment()?;
19868 let envelope_size = 8;
19869 let bytes_len = len * envelope_size;
19870 let offset = decoder.out_of_line_offset(bytes_len)?;
19871 let mut _next_ordinal_to_read = 0;
19873 let mut next_offset = offset;
19874 let end_offset = offset + bytes_len;
19875 _next_ordinal_to_read += 1;
19876 if next_offset >= end_offset {
19877 return Ok(());
19878 }
19879
19880 while _next_ordinal_to_read < 1 {
19882 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19883 _next_ordinal_to_read += 1;
19884 next_offset += envelope_size;
19885 }
19886
19887 let next_out_of_line = decoder.next_out_of_line();
19888 let handles_before = decoder.remaining_handles();
19889 if let Some((inlined, num_bytes, num_handles)) =
19890 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19891 {
19892 let member_inline_size =
19893 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19894 if inlined != (member_inline_size <= 4) {
19895 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19896 }
19897 let inner_offset;
19898 let mut inner_depth = depth.clone();
19899 if inlined {
19900 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19901 inner_offset = next_offset;
19902 } else {
19903 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19904 inner_depth.increment()?;
19905 }
19906 let val_ref = self.is_append.get_or_insert_with(|| {
19907 fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect)
19908 });
19909 fidl::decode!(
19910 bool,
19911 fdomain_client::fidl::FDomainResourceDialect,
19912 val_ref,
19913 decoder,
19914 inner_offset,
19915 inner_depth
19916 )?;
19917 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19918 {
19919 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19920 }
19921 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19922 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19923 }
19924 }
19925
19926 next_offset += envelope_size;
19927 _next_ordinal_to_read += 1;
19928 if next_offset >= end_offset {
19929 return Ok(());
19930 }
19931
19932 while _next_ordinal_to_read < 2 {
19934 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19935 _next_ordinal_to_read += 1;
19936 next_offset += envelope_size;
19937 }
19938
19939 let next_out_of_line = decoder.next_out_of_line();
19940 let handles_before = decoder.remaining_handles();
19941 if let Some((inlined, num_bytes, num_handles)) =
19942 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19943 {
19944 let member_inline_size = <fidl::encoding::HandleType<
19945 fdomain_client::Event,
19946 { fidl::ObjectType::EVENT.into_raw() },
19947 2147483648,
19948 > as fidl::encoding::TypeMarker>::inline_size(
19949 decoder.context
19950 );
19951 if inlined != (member_inline_size <= 4) {
19952 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19953 }
19954 let inner_offset;
19955 let mut inner_depth = depth.clone();
19956 if inlined {
19957 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19958 inner_offset = next_offset;
19959 } else {
19960 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19961 inner_depth.increment()?;
19962 }
19963 let val_ref =
19964 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));
19965 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)?;
19966 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19967 {
19968 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19969 }
19970 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19971 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19972 }
19973 }
19974
19975 next_offset += envelope_size;
19976 _next_ordinal_to_read += 1;
19977 if next_offset >= end_offset {
19978 return Ok(());
19979 }
19980
19981 while _next_ordinal_to_read < 3 {
19983 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19984 _next_ordinal_to_read += 1;
19985 next_offset += envelope_size;
19986 }
19987
19988 let next_out_of_line = decoder.next_out_of_line();
19989 let handles_before = decoder.remaining_handles();
19990 if let Some((inlined, num_bytes, num_handles)) =
19991 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19992 {
19993 let member_inline_size = <fidl::encoding::HandleType<
19994 fdomain_client::Stream,
19995 { fidl::ObjectType::STREAM.into_raw() },
19996 2147483648,
19997 > as fidl::encoding::TypeMarker>::inline_size(
19998 decoder.context
19999 );
20000 if inlined != (member_inline_size <= 4) {
20001 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20002 }
20003 let inner_offset;
20004 let mut inner_depth = depth.clone();
20005 if inlined {
20006 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20007 inner_offset = next_offset;
20008 } else {
20009 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20010 inner_depth.increment()?;
20011 }
20012 let val_ref =
20013 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));
20014 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)?;
20015 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20016 {
20017 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20018 }
20019 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20020 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20021 }
20022 }
20023
20024 next_offset += envelope_size;
20025 _next_ordinal_to_read += 1;
20026 if next_offset >= end_offset {
20027 return Ok(());
20028 }
20029
20030 while _next_ordinal_to_read < 4 {
20032 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20033 _next_ordinal_to_read += 1;
20034 next_offset += envelope_size;
20035 }
20036
20037 let next_out_of_line = decoder.next_out_of_line();
20038 let handles_before = decoder.remaining_handles();
20039 if let Some((inlined, num_bytes, num_handles)) =
20040 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20041 {
20042 let member_inline_size =
20043 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20044 if inlined != (member_inline_size <= 4) {
20045 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20046 }
20047 let inner_offset;
20048 let mut inner_depth = depth.clone();
20049 if inlined {
20050 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20051 inner_offset = next_offset;
20052 } else {
20053 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20054 inner_depth.increment()?;
20055 }
20056 let val_ref = self.attributes.get_or_insert_with(|| {
20057 fidl::new_empty!(NodeAttributes2, fdomain_client::fidl::FDomainResourceDialect)
20058 });
20059 fidl::decode!(
20060 NodeAttributes2,
20061 fdomain_client::fidl::FDomainResourceDialect,
20062 val_ref,
20063 decoder,
20064 inner_offset,
20065 inner_depth
20066 )?;
20067 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20068 {
20069 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20070 }
20071 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20072 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20073 }
20074 }
20075
20076 next_offset += envelope_size;
20077
20078 while next_offset < end_offset {
20080 _next_ordinal_to_read += 1;
20081 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20082 next_offset += envelope_size;
20083 }
20084
20085 Ok(())
20086 }
20087 }
20088
20089 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
20090 type Borrowed<'a> = &'a mut Self;
20091 fn take_or_borrow<'a>(
20092 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20093 ) -> Self::Borrowed<'a> {
20094 value
20095 }
20096 }
20097
20098 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
20099 type Owned = Self;
20100
20101 #[inline(always)]
20102 fn inline_align(_context: fidl::encoding::Context) -> usize {
20103 8
20104 }
20105
20106 #[inline(always)]
20107 fn inline_size(_context: fidl::encoding::Context) -> usize {
20108 16
20109 }
20110 }
20111
20112 unsafe impl
20113 fidl::encoding::Encode<ExtendedAttributeValue, fdomain_client::fidl::FDomainResourceDialect>
20114 for &mut ExtendedAttributeValue
20115 {
20116 #[inline]
20117 unsafe fn encode(
20118 self,
20119 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20120 offset: usize,
20121 _depth: fidl::encoding::Depth,
20122 ) -> fidl::Result<()> {
20123 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
20124 encoder.write_num::<u64>(self.ordinal(), offset);
20125 match self {
20126 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
20127 fidl::encoding::Vector<u8, 32768>,
20128 fdomain_client::fidl::FDomainResourceDialect,
20129 >(
20130 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
20131 val,
20132 ),
20133 encoder,
20134 offset + 8,
20135 _depth,
20136 ),
20137 ExtendedAttributeValue::Buffer(ref mut val) => {
20138 fidl::encoding::encode_in_envelope::<
20139 fidl::encoding::HandleType<
20140 fdomain_client::Vmo,
20141 { fidl::ObjectType::VMO.into_raw() },
20142 2147483648,
20143 >,
20144 fdomain_client::fidl::FDomainResourceDialect,
20145 >(
20146 <fidl::encoding::HandleType<
20147 fdomain_client::Vmo,
20148 { fidl::ObjectType::VMO.into_raw() },
20149 2147483648,
20150 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20151 val
20152 ),
20153 encoder,
20154 offset + 8,
20155 _depth,
20156 )
20157 }
20158 ExtendedAttributeValue::__SourceBreaking { .. } => {
20159 Err(fidl::Error::UnknownUnionTag)
20160 }
20161 }
20162 }
20163 }
20164
20165 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20166 for ExtendedAttributeValue
20167 {
20168 #[inline(always)]
20169 fn new_empty() -> Self {
20170 Self::__SourceBreaking { unknown_ordinal: 0 }
20171 }
20172
20173 #[inline]
20174 unsafe fn decode(
20175 &mut self,
20176 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20177 offset: usize,
20178 mut depth: fidl::encoding::Depth,
20179 ) -> fidl::Result<()> {
20180 decoder.debug_check_bounds::<Self>(offset);
20181 #[allow(unused_variables)]
20182 let next_out_of_line = decoder.next_out_of_line();
20183 let handles_before = decoder.remaining_handles();
20184 let (ordinal, inlined, num_bytes, num_handles) =
20185 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20186
20187 let member_inline_size = match ordinal {
20188 1 => {
20189 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
20190 decoder.context,
20191 )
20192 }
20193 2 => <fidl::encoding::HandleType<
20194 fdomain_client::Vmo,
20195 { fidl::ObjectType::VMO.into_raw() },
20196 2147483648,
20197 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20198 0 => return Err(fidl::Error::UnknownUnionTag),
20199 _ => num_bytes as usize,
20200 };
20201
20202 if inlined != (member_inline_size <= 4) {
20203 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20204 }
20205 let _inner_offset;
20206 if inlined {
20207 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20208 _inner_offset = offset + 8;
20209 } else {
20210 depth.increment()?;
20211 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20212 }
20213 match ordinal {
20214 1 => {
20215 #[allow(irrefutable_let_patterns)]
20216 if let ExtendedAttributeValue::Bytes(_) = self {
20217 } else {
20219 *self = ExtendedAttributeValue::Bytes(
20221 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect),
20222 );
20223 }
20224 #[allow(irrefutable_let_patterns)]
20225 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
20226 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20227 } else {
20228 unreachable!()
20229 }
20230 }
20231 2 => {
20232 #[allow(irrefutable_let_patterns)]
20233 if let ExtendedAttributeValue::Buffer(_) = self {
20234 } else {
20236 *self = ExtendedAttributeValue::Buffer(
20238 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
20239 );
20240 }
20241 #[allow(irrefutable_let_patterns)]
20242 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
20243 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20244 } else {
20245 unreachable!()
20246 }
20247 }
20248 #[allow(deprecated)]
20249 ordinal => {
20250 for _ in 0..num_handles {
20251 decoder.drop_next_handle()?;
20252 }
20253 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
20254 }
20255 }
20256 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20257 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20258 }
20259 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20260 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20261 }
20262 Ok(())
20263 }
20264 }
20265
20266 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
20267 type Borrowed<'a> = &'a mut Self;
20268 fn take_or_borrow<'a>(
20269 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20270 ) -> Self::Borrowed<'a> {
20271 value
20272 }
20273 }
20274
20275 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
20276 type Owned = Self;
20277
20278 #[inline(always)]
20279 fn inline_align(_context: fidl::encoding::Context) -> usize {
20280 8
20281 }
20282
20283 #[inline(always)]
20284 fn inline_size(_context: fidl::encoding::Context) -> usize {
20285 16
20286 }
20287 }
20288
20289 unsafe impl
20290 fidl::encoding::Encode<NodeInfoDeprecated, fdomain_client::fidl::FDomainResourceDialect>
20291 for &mut NodeInfoDeprecated
20292 {
20293 #[inline]
20294 unsafe fn encode(
20295 self,
20296 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20297 offset: usize,
20298 _depth: fidl::encoding::Depth,
20299 ) -> fidl::Result<()> {
20300 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
20301 encoder.write_num::<u64>(self.ordinal(), offset);
20302 match self {
20303 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
20304 Service,
20305 fdomain_client::fidl::FDomainResourceDialect,
20306 >(
20307 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
20308 encoder,
20309 offset + 8,
20310 _depth,
20311 ),
20312 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20313 FileObject,
20314 fdomain_client::fidl::FDomainResourceDialect,
20315 >(
20316 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20317 encoder,
20318 offset + 8,
20319 _depth,
20320 ),
20321 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20322 DirectoryObject,
20323 fdomain_client::fidl::FDomainResourceDialect,
20324 >(
20325 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20326 encoder,
20327 offset + 8,
20328 _depth,
20329 ),
20330 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20331 SymlinkObject,
20332 fdomain_client::fidl::FDomainResourceDialect,
20333 >(
20334 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20335 encoder,
20336 offset + 8,
20337 _depth,
20338 ),
20339 }
20340 }
20341 }
20342
20343 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20344 for NodeInfoDeprecated
20345 {
20346 #[inline(always)]
20347 fn new_empty() -> Self {
20348 Self::Service(fidl::new_empty!(Service, fdomain_client::fidl::FDomainResourceDialect))
20349 }
20350
20351 #[inline]
20352 unsafe fn decode(
20353 &mut self,
20354 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20355 offset: usize,
20356 mut depth: fidl::encoding::Depth,
20357 ) -> fidl::Result<()> {
20358 decoder.debug_check_bounds::<Self>(offset);
20359 #[allow(unused_variables)]
20360 let next_out_of_line = decoder.next_out_of_line();
20361 let handles_before = decoder.remaining_handles();
20362 let (ordinal, inlined, num_bytes, num_handles) =
20363 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20364
20365 let member_inline_size = match ordinal {
20366 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20367 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20368 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20369 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20370 _ => return Err(fidl::Error::UnknownUnionTag),
20371 };
20372
20373 if inlined != (member_inline_size <= 4) {
20374 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20375 }
20376 let _inner_offset;
20377 if inlined {
20378 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20379 _inner_offset = offset + 8;
20380 } else {
20381 depth.increment()?;
20382 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20383 }
20384 match ordinal {
20385 1 => {
20386 #[allow(irrefutable_let_patterns)]
20387 if let NodeInfoDeprecated::Service(_) = self {
20388 } else {
20390 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
20392 Service,
20393 fdomain_client::fidl::FDomainResourceDialect
20394 ));
20395 }
20396 #[allow(irrefutable_let_patterns)]
20397 if let NodeInfoDeprecated::Service(ref mut val) = self {
20398 fidl::decode!(
20399 Service,
20400 fdomain_client::fidl::FDomainResourceDialect,
20401 val,
20402 decoder,
20403 _inner_offset,
20404 depth
20405 )?;
20406 } else {
20407 unreachable!()
20408 }
20409 }
20410 2 => {
20411 #[allow(irrefutable_let_patterns)]
20412 if let NodeInfoDeprecated::File(_) = self {
20413 } else {
20415 *self = NodeInfoDeprecated::File(fidl::new_empty!(
20417 FileObject,
20418 fdomain_client::fidl::FDomainResourceDialect
20419 ));
20420 }
20421 #[allow(irrefutable_let_patterns)]
20422 if let NodeInfoDeprecated::File(ref mut val) = self {
20423 fidl::decode!(
20424 FileObject,
20425 fdomain_client::fidl::FDomainResourceDialect,
20426 val,
20427 decoder,
20428 _inner_offset,
20429 depth
20430 )?;
20431 } else {
20432 unreachable!()
20433 }
20434 }
20435 3 => {
20436 #[allow(irrefutable_let_patterns)]
20437 if let NodeInfoDeprecated::Directory(_) = self {
20438 } else {
20440 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
20442 DirectoryObject,
20443 fdomain_client::fidl::FDomainResourceDialect
20444 ));
20445 }
20446 #[allow(irrefutable_let_patterns)]
20447 if let NodeInfoDeprecated::Directory(ref mut val) = self {
20448 fidl::decode!(
20449 DirectoryObject,
20450 fdomain_client::fidl::FDomainResourceDialect,
20451 val,
20452 decoder,
20453 _inner_offset,
20454 depth
20455 )?;
20456 } else {
20457 unreachable!()
20458 }
20459 }
20460 4 => {
20461 #[allow(irrefutable_let_patterns)]
20462 if let NodeInfoDeprecated::Symlink(_) = self {
20463 } else {
20465 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
20467 SymlinkObject,
20468 fdomain_client::fidl::FDomainResourceDialect
20469 ));
20470 }
20471 #[allow(irrefutable_let_patterns)]
20472 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
20473 fidl::decode!(
20474 SymlinkObject,
20475 fdomain_client::fidl::FDomainResourceDialect,
20476 val,
20477 decoder,
20478 _inner_offset,
20479 depth
20480 )?;
20481 } else {
20482 unreachable!()
20483 }
20484 }
20485 ordinal => panic!("unexpected ordinal {:?}", ordinal),
20486 }
20487 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20488 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20489 }
20490 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20491 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20492 }
20493 Ok(())
20494 }
20495 }
20496
20497 impl fidl::encoding::ResourceTypeMarker for Representation {
20498 type Borrowed<'a> = &'a mut Self;
20499 fn take_or_borrow<'a>(
20500 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20501 ) -> Self::Borrowed<'a> {
20502 value
20503 }
20504 }
20505
20506 unsafe impl fidl::encoding::TypeMarker for Representation {
20507 type Owned = Self;
20508
20509 #[inline(always)]
20510 fn inline_align(_context: fidl::encoding::Context) -> usize {
20511 8
20512 }
20513
20514 #[inline(always)]
20515 fn inline_size(_context: fidl::encoding::Context) -> usize {
20516 16
20517 }
20518 }
20519
20520 unsafe impl fidl::encoding::Encode<Representation, fdomain_client::fidl::FDomainResourceDialect>
20521 for &mut Representation
20522 {
20523 #[inline]
20524 unsafe fn encode(
20525 self,
20526 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20527 offset: usize,
20528 _depth: fidl::encoding::Depth,
20529 ) -> fidl::Result<()> {
20530 encoder.debug_check_bounds::<Representation>(offset);
20531 encoder.write_num::<u64>(self.ordinal(), offset);
20532 match self {
20533 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
20534 NodeInfo,
20535 fdomain_client::fidl::FDomainResourceDialect,
20536 >(
20537 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20538 encoder,
20539 offset + 8,
20540 _depth,
20541 ),
20542 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20543 DirectoryInfo,
20544 fdomain_client::fidl::FDomainResourceDialect,
20545 >(
20546 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20547 encoder,
20548 offset + 8,
20549 _depth,
20550 ),
20551 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20552 FileInfo,
20553 fdomain_client::fidl::FDomainResourceDialect,
20554 >(
20555 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20556 encoder,
20557 offset + 8,
20558 _depth,
20559 ),
20560 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20561 SymlinkInfo,
20562 fdomain_client::fidl::FDomainResourceDialect,
20563 >(
20564 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20565 encoder,
20566 offset + 8,
20567 _depth,
20568 ),
20569 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
20570 }
20571 }
20572 }
20573
20574 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Representation {
20575 #[inline(always)]
20576 fn new_empty() -> Self {
20577 Self::__SourceBreaking { unknown_ordinal: 0 }
20578 }
20579
20580 #[inline]
20581 unsafe fn decode(
20582 &mut self,
20583 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20584 offset: usize,
20585 mut depth: fidl::encoding::Depth,
20586 ) -> fidl::Result<()> {
20587 decoder.debug_check_bounds::<Self>(offset);
20588 #[allow(unused_variables)]
20589 let next_out_of_line = decoder.next_out_of_line();
20590 let handles_before = decoder.remaining_handles();
20591 let (ordinal, inlined, num_bytes, num_handles) =
20592 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20593
20594 let member_inline_size = match ordinal {
20595 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20596 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20597 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20598 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20599 0 => return Err(fidl::Error::UnknownUnionTag),
20600 _ => num_bytes as usize,
20601 };
20602
20603 if inlined != (member_inline_size <= 4) {
20604 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20605 }
20606 let _inner_offset;
20607 if inlined {
20608 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20609 _inner_offset = offset + 8;
20610 } else {
20611 depth.increment()?;
20612 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20613 }
20614 match ordinal {
20615 1 => {
20616 #[allow(irrefutable_let_patterns)]
20617 if let Representation::Node(_) = self {
20618 } else {
20620 *self = Representation::Node(fidl::new_empty!(
20622 NodeInfo,
20623 fdomain_client::fidl::FDomainResourceDialect
20624 ));
20625 }
20626 #[allow(irrefutable_let_patterns)]
20627 if let Representation::Node(ref mut val) = self {
20628 fidl::decode!(
20629 NodeInfo,
20630 fdomain_client::fidl::FDomainResourceDialect,
20631 val,
20632 decoder,
20633 _inner_offset,
20634 depth
20635 )?;
20636 } else {
20637 unreachable!()
20638 }
20639 }
20640 2 => {
20641 #[allow(irrefutable_let_patterns)]
20642 if let Representation::Directory(_) = self {
20643 } else {
20645 *self = Representation::Directory(fidl::new_empty!(
20647 DirectoryInfo,
20648 fdomain_client::fidl::FDomainResourceDialect
20649 ));
20650 }
20651 #[allow(irrefutable_let_patterns)]
20652 if let Representation::Directory(ref mut val) = self {
20653 fidl::decode!(
20654 DirectoryInfo,
20655 fdomain_client::fidl::FDomainResourceDialect,
20656 val,
20657 decoder,
20658 _inner_offset,
20659 depth
20660 )?;
20661 } else {
20662 unreachable!()
20663 }
20664 }
20665 3 => {
20666 #[allow(irrefutable_let_patterns)]
20667 if let Representation::File(_) = self {
20668 } else {
20670 *self = Representation::File(fidl::new_empty!(
20672 FileInfo,
20673 fdomain_client::fidl::FDomainResourceDialect
20674 ));
20675 }
20676 #[allow(irrefutable_let_patterns)]
20677 if let Representation::File(ref mut val) = self {
20678 fidl::decode!(
20679 FileInfo,
20680 fdomain_client::fidl::FDomainResourceDialect,
20681 val,
20682 decoder,
20683 _inner_offset,
20684 depth
20685 )?;
20686 } else {
20687 unreachable!()
20688 }
20689 }
20690 4 => {
20691 #[allow(irrefutable_let_patterns)]
20692 if let Representation::Symlink(_) = self {
20693 } else {
20695 *self = Representation::Symlink(fidl::new_empty!(
20697 SymlinkInfo,
20698 fdomain_client::fidl::FDomainResourceDialect
20699 ));
20700 }
20701 #[allow(irrefutable_let_patterns)]
20702 if let Representation::Symlink(ref mut val) = self {
20703 fidl::decode!(
20704 SymlinkInfo,
20705 fdomain_client::fidl::FDomainResourceDialect,
20706 val,
20707 decoder,
20708 _inner_offset,
20709 depth
20710 )?;
20711 } else {
20712 unreachable!()
20713 }
20714 }
20715 #[allow(deprecated)]
20716 ordinal => {
20717 for _ in 0..num_handles {
20718 decoder.drop_next_handle()?;
20719 }
20720 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
20721 }
20722 }
20723 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20724 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20725 }
20726 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20727 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20728 }
20729 Ok(())
20730 }
20731 }
20732}