1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_io__common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub type Token = fdomain_client::Event;
16
17#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18pub struct DirectoryCreateSymlinkRequest {
19 pub name: String,
20 pub target: Vec<u8>,
21 pub connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
22}
23
24impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
25 for DirectoryCreateSymlinkRequest
26{
27}
28
29#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30pub struct DirectoryDeprecatedOpenRequest {
31 pub flags: OpenFlags,
32 pub mode: ModeType,
33 pub path: String,
34 pub object: fdomain_client::fidl::ServerEnd<NodeMarker>,
35}
36
37impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
38 for DirectoryDeprecatedOpenRequest
39{
40}
41
42#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43pub struct DirectoryGetTokenResponse {
44 pub s: i32,
45 pub token: Option<fdomain_client::NullableHandle>,
46}
47
48impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryGetTokenResponse {}
49
50#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
51pub struct DirectoryLinkRequest {
52 pub src: String,
53 pub dst_parent_token: fdomain_client::NullableHandle,
54 pub dst: String,
55}
56
57impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryLinkRequest {}
58
59#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct DirectoryRenameRequest {
61 pub src: String,
62 pub dst_parent_token: fdomain_client::Event,
63 pub dst: String,
64}
65
66impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryRenameRequest {}
67
68#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
69pub struct DirectoryWatchRequest {
70 pub mask: WatchMask,
71 pub options: u32,
72 pub watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
73}
74
75impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryWatchRequest {}
76
77#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
78pub struct FileAllocateRequest {
79 pub offset: u64,
80 pub length: u64,
81 pub mode: AllocateMode,
86}
87
88impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileAllocateRequest {}
89
90#[derive(Debug, PartialEq)]
91pub struct FileEnableVerityRequest {
92 pub options: VerificationOptions,
93}
94
95impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileEnableVerityRequest {}
96
97#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
98pub struct FileObject {
99 pub event: Option<fdomain_client::Event>,
106 pub stream: Option<fdomain_client::Stream>,
110}
111
112impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileObject {}
113
114#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
115pub struct FileGetBackingMemoryResponse {
116 pub vmo: fdomain_client::Vmo,
117}
118
119impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
120 for FileGetBackingMemoryResponse
121{
122}
123
124#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
125pub struct LinkableLinkIntoRequest {
126 pub dst_parent_token: fdomain_client::Event,
127 pub dst: String,
128}
129
130impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LinkableLinkIntoRequest {}
131
132#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
133pub struct NodeDeprecatedCloneRequest {
134 pub flags: OpenFlags,
135 pub object: fdomain_client::fidl::ServerEnd<NodeMarker>,
136}
137
138impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeDeprecatedCloneRequest {}
139
140#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
141pub struct NodeListExtendedAttributesRequest {
142 pub iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
143}
144
145impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
146 for NodeListExtendedAttributesRequest
147{
148}
149
150#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
151pub struct NodeOnOpenRequest {
152 pub s: i32,
153 pub info: Option<Box<NodeInfoDeprecated>>,
154}
155
156impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeOnOpenRequest {}
157
158#[derive(Debug, PartialEq)]
159pub struct NodeSetExtendedAttributeRequest {
160 pub name: Vec<u8>,
161 pub value: ExtendedAttributeValue,
162 pub mode: SetExtendedAttributeMode,
164}
165
166impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
167 for NodeSetExtendedAttributeRequest
168{
169}
170
171#[derive(Debug, PartialEq)]
172pub struct OpenableOpenRequest {
173 pub path: String,
174 pub flags: Flags,
175 pub options: Options,
176 pub object: fdomain_client::Channel,
177}
178
179impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for OpenableOpenRequest {}
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 shutdown_with_epitaph(&self, status: zx_status::Status) {
717 self.inner.shutdown_with_epitaph(status)
718 }
719
720 fn is_closed(&self) -> bool {
721 self.inner.channel().is_closed()
722 }
723 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
724 self.inner.channel().on_closed()
725 }
726}
727
728impl AdvisoryLockingControlHandle {}
729
730#[must_use = "FIDL methods require a response to be sent"]
731#[derive(Debug)]
732pub struct AdvisoryLockingAdvisoryLockResponder {
733 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
734 tx_id: u32,
735}
736
737impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
741 fn drop(&mut self) {
742 self.control_handle.shutdown();
743 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
745 }
746}
747
748impl fdomain_client::fidl::Responder for AdvisoryLockingAdvisoryLockResponder {
749 type ControlHandle = AdvisoryLockingControlHandle;
750
751 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
752 &self.control_handle
753 }
754
755 fn drop_without_shutdown(mut self) {
756 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
758 std::mem::forget(self);
760 }
761}
762
763impl AdvisoryLockingAdvisoryLockResponder {
764 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
768 let _result = self.send_raw(result);
769 if _result.is_err() {
770 self.control_handle.shutdown();
771 }
772 self.drop_without_shutdown();
773 _result
774 }
775
776 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
778 let _result = self.send_raw(result);
779 self.drop_without_shutdown();
780 _result
781 }
782
783 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
784 self.control_handle
785 .inner
786 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
787 result,
788 self.tx_id,
789 0x6ee9c0ad53ec87aa,
790 fidl::encoding::DynamicFlags::empty(),
791 )
792 }
793}
794
795#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
796pub struct DirectoryMarker;
797
798impl fdomain_client::fidl::ProtocolMarker for DirectoryMarker {
799 type Proxy = DirectoryProxy;
800 type RequestStream = DirectoryRequestStream;
801
802 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
803}
804impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryMarker {}
805pub type DirectoryUnlinkResult = Result<(), i32>;
806pub type DirectoryRenameResult = Result<(), i32>;
807pub type DirectoryCreateSymlinkResult = Result<(), i32>;
808
809pub trait DirectoryProxyInterface: Send + Sync {
810 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
811 + Send;
812 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
813 fn r#clone(
814 &self,
815 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
816 ) -> Result<(), fidl::Error>;
817 type CloseResponseFut: std::future::Future<
818 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
819 > + Send;
820 fn r#close(&self) -> Self::CloseResponseFut;
821 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
822 fn r#query(&self) -> Self::QueryResponseFut;
823 fn r#deprecated_clone(
824 &self,
825 flags: OpenFlags,
826 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
827 ) -> Result<(), fidl::Error>;
828 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
829 + Send;
830 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
831 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
832 fn r#deprecated_set_attr(
833 &self,
834 flags: NodeAttributeFlags,
835 attributes: &NodeAttributes,
836 ) -> Self::DeprecatedSetAttrResponseFut;
837 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
838 + Send;
839 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
840 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
841 + Send;
842 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
843 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
844 + Send;
845 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
846 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
847 + Send;
848 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
849 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
850 + Send;
851 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
852 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
853 + Send;
854 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
855 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
856 + Send;
857 fn r#update_attributes(
858 &self,
859 payload: &MutableNodeAttributes,
860 ) -> Self::UpdateAttributesResponseFut;
861 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
862 fn r#sync(&self) -> Self::SyncResponseFut;
863 fn r#list_extended_attributes(
864 &self,
865 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
866 ) -> Result<(), fidl::Error>;
867 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
868 + Send;
869 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
870 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
871 + Send;
872 fn r#set_extended_attribute(
873 &self,
874 name: &[u8],
875 value: ExtendedAttributeValue,
876 mode: SetExtendedAttributeMode,
877 ) -> Self::SetExtendedAttributeResponseFut;
878 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
879 + Send;
880 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
881 fn r#open(
882 &self,
883 path: &str,
884 flags: Flags,
885 options: &Options,
886 object: fdomain_client::Channel,
887 ) -> Result<(), fidl::Error>;
888 fn r#deprecated_open(
889 &self,
890 flags: OpenFlags,
891 mode: ModeType,
892 path: &str,
893 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
894 ) -> Result<(), fidl::Error>;
895 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
896 + Send;
897 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
898 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
899 fn r#rewind(&self) -> Self::RewindResponseFut;
900 type GetTokenResponseFut: std::future::Future<
901 Output = Result<(i32, Option<fdomain_client::NullableHandle>), fidl::Error>,
902 > + Send;
903 fn r#get_token(&self) -> Self::GetTokenResponseFut;
904 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
905 fn r#link(
906 &self,
907 src: &str,
908 dst_parent_token: fdomain_client::NullableHandle,
909 dst: &str,
910 ) -> Self::LinkResponseFut;
911 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
912 + Send;
913 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
914 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
915 + Send;
916 fn r#rename(
917 &self,
918 src: &str,
919 dst_parent_token: fdomain_client::Event,
920 dst: &str,
921 ) -> Self::RenameResponseFut;
922 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
923 + Send;
924 fn r#create_symlink(
925 &self,
926 name: &str,
927 target: &[u8],
928 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
929 ) -> Self::CreateSymlinkResponseFut;
930 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
931 fn r#watch(
932 &self,
933 mask: WatchMask,
934 options: u32,
935 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
936 ) -> Self::WatchResponseFut;
937}
938
939#[derive(Debug, Clone)]
940pub struct DirectoryProxy {
941 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
942}
943
944impl fdomain_client::fidl::Proxy for DirectoryProxy {
945 type Protocol = DirectoryMarker;
946
947 fn from_channel(inner: fdomain_client::Channel) -> Self {
948 Self::new(inner)
949 }
950
951 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
952 self.client.into_channel().map_err(|client| Self { client })
953 }
954
955 fn as_channel(&self) -> &fdomain_client::Channel {
956 self.client.as_channel()
957 }
958}
959
960impl DirectoryProxy {
961 pub fn new(channel: fdomain_client::Channel) -> Self {
963 let protocol_name = <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
964 Self { client: fidl::client::Client::new(channel, protocol_name) }
965 }
966
967 pub fn take_event_stream(&self) -> DirectoryEventStream {
973 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
974 }
975
976 pub fn r#advisory_lock(
1000 &self,
1001 mut request: &AdvisoryLockRequest,
1002 ) -> fidl::client::QueryResponseFut<
1003 AdvisoryLockingAdvisoryLockResult,
1004 fdomain_client::fidl::FDomainResourceDialect,
1005 > {
1006 DirectoryProxyInterface::r#advisory_lock(self, request)
1007 }
1008
1009 pub fn r#clone(
1010 &self,
1011 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1012 ) -> Result<(), fidl::Error> {
1013 DirectoryProxyInterface::r#clone(self, request)
1014 }
1015
1016 pub fn r#close(
1027 &self,
1028 ) -> fidl::client::QueryResponseFut<
1029 fdomain_fuchsia_unknown::CloseableCloseResult,
1030 fdomain_client::fidl::FDomainResourceDialect,
1031 > {
1032 DirectoryProxyInterface::r#close(self)
1033 }
1034
1035 pub fn r#query(
1036 &self,
1037 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
1038 DirectoryProxyInterface::r#query(self)
1039 }
1040
1041 pub fn r#deprecated_clone(
1043 &self,
1044 mut flags: OpenFlags,
1045 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1046 ) -> Result<(), fidl::Error> {
1047 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1048 }
1049
1050 pub fn r#deprecated_get_attr(
1052 &self,
1053 ) -> fidl::client::QueryResponseFut<
1054 (i32, NodeAttributes),
1055 fdomain_client::fidl::FDomainResourceDialect,
1056 > {
1057 DirectoryProxyInterface::r#deprecated_get_attr(self)
1058 }
1059
1060 pub fn r#deprecated_set_attr(
1062 &self,
1063 mut flags: NodeAttributeFlags,
1064 mut attributes: &NodeAttributes,
1065 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1066 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1067 }
1068
1069 pub fn r#deprecated_get_flags(
1071 &self,
1072 ) -> fidl::client::QueryResponseFut<
1073 (i32, OpenFlags),
1074 fdomain_client::fidl::FDomainResourceDialect,
1075 > {
1076 DirectoryProxyInterface::r#deprecated_get_flags(self)
1077 }
1078
1079 pub fn r#deprecated_set_flags(
1081 &self,
1082 mut flags: OpenFlags,
1083 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1084 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1085 }
1086
1087 pub fn r#get_flags(
1096 &self,
1097 ) -> fidl::client::QueryResponseFut<
1098 NodeGetFlagsResult,
1099 fdomain_client::fidl::FDomainResourceDialect,
1100 > {
1101 DirectoryProxyInterface::r#get_flags(self)
1102 }
1103
1104 pub fn r#set_flags(
1114 &self,
1115 mut flags: Flags,
1116 ) -> fidl::client::QueryResponseFut<
1117 NodeSetFlagsResult,
1118 fdomain_client::fidl::FDomainResourceDialect,
1119 > {
1120 DirectoryProxyInterface::r#set_flags(self, flags)
1121 }
1122
1123 pub fn r#query_filesystem(
1127 &self,
1128 ) -> fidl::client::QueryResponseFut<
1129 (i32, Option<Box<FilesystemInfo>>),
1130 fdomain_client::fidl::FDomainResourceDialect,
1131 > {
1132 DirectoryProxyInterface::r#query_filesystem(self)
1133 }
1134
1135 pub fn r#get_attributes(
1149 &self,
1150 mut query: NodeAttributesQuery,
1151 ) -> fidl::client::QueryResponseFut<
1152 NodeGetAttributesResult,
1153 fdomain_client::fidl::FDomainResourceDialect,
1154 > {
1155 DirectoryProxyInterface::r#get_attributes(self, query)
1156 }
1157
1158 pub fn r#update_attributes(
1167 &self,
1168 mut payload: &MutableNodeAttributes,
1169 ) -> fidl::client::QueryResponseFut<
1170 NodeUpdateAttributesResult,
1171 fdomain_client::fidl::FDomainResourceDialect,
1172 > {
1173 DirectoryProxyInterface::r#update_attributes(self, payload)
1174 }
1175
1176 pub fn r#sync(
1186 &self,
1187 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
1188 {
1189 DirectoryProxyInterface::r#sync(self)
1190 }
1191
1192 pub fn r#list_extended_attributes(
1201 &self,
1202 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1203 ) -> Result<(), fidl::Error> {
1204 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
1205 }
1206
1207 pub fn r#get_extended_attribute(
1214 &self,
1215 mut name: &[u8],
1216 ) -> fidl::client::QueryResponseFut<
1217 NodeGetExtendedAttributeResult,
1218 fdomain_client::fidl::FDomainResourceDialect,
1219 > {
1220 DirectoryProxyInterface::r#get_extended_attribute(self, name)
1221 }
1222
1223 pub fn r#set_extended_attribute(
1231 &self,
1232 mut name: &[u8],
1233 mut value: ExtendedAttributeValue,
1234 mut mode: SetExtendedAttributeMode,
1235 ) -> fidl::client::QueryResponseFut<
1236 NodeSetExtendedAttributeResult,
1237 fdomain_client::fidl::FDomainResourceDialect,
1238 > {
1239 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
1240 }
1241
1242 pub fn r#remove_extended_attribute(
1248 &self,
1249 mut name: &[u8],
1250 ) -> fidl::client::QueryResponseFut<
1251 NodeRemoveExtendedAttributeResult,
1252 fdomain_client::fidl::FDomainResourceDialect,
1253 > {
1254 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
1255 }
1256
1257 pub fn r#open(
1264 &self,
1265 mut path: &str,
1266 mut flags: Flags,
1267 mut options: &Options,
1268 mut object: fdomain_client::Channel,
1269 ) -> Result<(), fidl::Error> {
1270 DirectoryProxyInterface::r#open(self, path, flags, options, object)
1271 }
1272
1273 pub fn r#deprecated_open(
1275 &self,
1276 mut flags: OpenFlags,
1277 mut mode: ModeType,
1278 mut path: &str,
1279 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1280 ) -> Result<(), fidl::Error> {
1281 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
1282 }
1283
1284 pub fn r#read_dirents(
1310 &self,
1311 mut max_bytes: u64,
1312 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fdomain_client::fidl::FDomainResourceDialect>
1313 {
1314 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
1315 }
1316
1317 pub fn r#rewind(
1321 &self,
1322 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1323 DirectoryProxyInterface::r#rewind(self)
1324 }
1325
1326 pub fn r#get_token(
1333 &self,
1334 ) -> fidl::client::QueryResponseFut<
1335 (i32, Option<fdomain_client::NullableHandle>),
1336 fdomain_client::fidl::FDomainResourceDialect,
1337 > {
1338 DirectoryProxyInterface::r#get_token(self)
1339 }
1340
1341 pub fn r#link(
1358 &self,
1359 mut src: &str,
1360 mut dst_parent_token: fdomain_client::NullableHandle,
1361 mut dst: &str,
1362 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1363 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
1364 }
1365
1366 pub fn r#unlink(
1391 &self,
1392 mut name: &str,
1393 mut options: &UnlinkOptions,
1394 ) -> fidl::client::QueryResponseFut<
1395 DirectoryUnlinkResult,
1396 fdomain_client::fidl::FDomainResourceDialect,
1397 > {
1398 DirectoryProxyInterface::r#unlink(self, name, options)
1399 }
1400
1401 pub fn r#rename(
1427 &self,
1428 mut src: &str,
1429 mut dst_parent_token: fdomain_client::Event,
1430 mut dst: &str,
1431 ) -> fidl::client::QueryResponseFut<
1432 DirectoryRenameResult,
1433 fdomain_client::fidl::FDomainResourceDialect,
1434 > {
1435 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
1436 }
1437
1438 pub fn r#create_symlink(
1453 &self,
1454 mut name: &str,
1455 mut target: &[u8],
1456 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
1457 ) -> fidl::client::QueryResponseFut<
1458 DirectoryCreateSymlinkResult,
1459 fdomain_client::fidl::FDomainResourceDialect,
1460 > {
1461 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
1462 }
1463
1464 pub fn r#watch(
1471 &self,
1472 mut mask: WatchMask,
1473 mut options: u32,
1474 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
1475 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1476 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
1477 }
1478}
1479
1480impl DirectoryProxyInterface for DirectoryProxy {
1481 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
1482 AdvisoryLockingAdvisoryLockResult,
1483 fdomain_client::fidl::FDomainResourceDialect,
1484 >;
1485 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
1486 fn _decode(
1487 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1488 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1489 let _response = fidl::client::decode_transaction_body::<
1490 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1491 fdomain_client::fidl::FDomainResourceDialect,
1492 0x6ee9c0ad53ec87aa,
1493 >(_buf?)?;
1494 Ok(_response.map(|x| x))
1495 }
1496 self.client.send_query_and_decode::<
1497 AdvisoryLockingAdvisoryLockRequest,
1498 AdvisoryLockingAdvisoryLockResult,
1499 >(
1500 (request,),
1501 0x6ee9c0ad53ec87aa,
1502 fidl::encoding::DynamicFlags::empty(),
1503 _decode,
1504 )
1505 }
1506
1507 fn r#clone(
1508 &self,
1509 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1510 ) -> Result<(), fidl::Error> {
1511 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
1512 (request,),
1513 0x20d8a7aba2168a79,
1514 fidl::encoding::DynamicFlags::empty(),
1515 )
1516 }
1517
1518 type CloseResponseFut = fidl::client::QueryResponseFut<
1519 fdomain_fuchsia_unknown::CloseableCloseResult,
1520 fdomain_client::fidl::FDomainResourceDialect,
1521 >;
1522 fn r#close(&self) -> Self::CloseResponseFut {
1523 fn _decode(
1524 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1525 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1526 let _response = fidl::client::decode_transaction_body::<
1527 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1528 fdomain_client::fidl::FDomainResourceDialect,
1529 0x5ac5d459ad7f657e,
1530 >(_buf?)?;
1531 Ok(_response.map(|x| x))
1532 }
1533 self.client.send_query_and_decode::<
1534 fidl::encoding::EmptyPayload,
1535 fdomain_fuchsia_unknown::CloseableCloseResult,
1536 >(
1537 (),
1538 0x5ac5d459ad7f657e,
1539 fidl::encoding::DynamicFlags::empty(),
1540 _decode,
1541 )
1542 }
1543
1544 type QueryResponseFut =
1545 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
1546 fn r#query(&self) -> Self::QueryResponseFut {
1547 fn _decode(
1548 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1549 ) -> Result<Vec<u8>, fidl::Error> {
1550 let _response = fidl::client::decode_transaction_body::<
1551 fdomain_fuchsia_unknown::QueryableQueryResponse,
1552 fdomain_client::fidl::FDomainResourceDialect,
1553 0x2658edee9decfc06,
1554 >(_buf?)?;
1555 Ok(_response.protocol)
1556 }
1557 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1558 (),
1559 0x2658edee9decfc06,
1560 fidl::encoding::DynamicFlags::empty(),
1561 _decode,
1562 )
1563 }
1564
1565 fn r#deprecated_clone(
1566 &self,
1567 mut flags: OpenFlags,
1568 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1569 ) -> Result<(), fidl::Error> {
1570 self.client.send::<NodeDeprecatedCloneRequest>(
1571 (flags, object),
1572 0x5a61678f293ce16f,
1573 fidl::encoding::DynamicFlags::FLEXIBLE,
1574 )
1575 }
1576
1577 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
1578 (i32, NodeAttributes),
1579 fdomain_client::fidl::FDomainResourceDialect,
1580 >;
1581 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
1582 fn _decode(
1583 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1584 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1585 let _response = fidl::client::decode_transaction_body::<
1586 NodeDeprecatedGetAttrResponse,
1587 fdomain_client::fidl::FDomainResourceDialect,
1588 0x78985e216314dafd,
1589 >(_buf?)?;
1590 Ok((_response.s, _response.attributes))
1591 }
1592 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
1593 (),
1594 0x78985e216314dafd,
1595 fidl::encoding::DynamicFlags::empty(),
1596 _decode,
1597 )
1598 }
1599
1600 type DeprecatedSetAttrResponseFut =
1601 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1602 fn r#deprecated_set_attr(
1603 &self,
1604 mut flags: NodeAttributeFlags,
1605 mut attributes: &NodeAttributes,
1606 ) -> Self::DeprecatedSetAttrResponseFut {
1607 fn _decode(
1608 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1609 ) -> Result<i32, fidl::Error> {
1610 let _response = fidl::client::decode_transaction_body::<
1611 NodeDeprecatedSetAttrResponse,
1612 fdomain_client::fidl::FDomainResourceDialect,
1613 0x4186c0f40d938f46,
1614 >(_buf?)?;
1615 Ok(_response.s)
1616 }
1617 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
1618 (flags, attributes),
1619 0x4186c0f40d938f46,
1620 fidl::encoding::DynamicFlags::empty(),
1621 _decode,
1622 )
1623 }
1624
1625 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
1626 (i32, OpenFlags),
1627 fdomain_client::fidl::FDomainResourceDialect,
1628 >;
1629 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
1630 fn _decode(
1631 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1632 ) -> Result<(i32, OpenFlags), fidl::Error> {
1633 let _response = fidl::client::decode_transaction_body::<
1634 NodeDeprecatedGetFlagsResponse,
1635 fdomain_client::fidl::FDomainResourceDialect,
1636 0x5b88fffb8eda3aa1,
1637 >(_buf?)?;
1638 Ok((_response.s, _response.flags))
1639 }
1640 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
1641 (),
1642 0x5b88fffb8eda3aa1,
1643 fidl::encoding::DynamicFlags::empty(),
1644 _decode,
1645 )
1646 }
1647
1648 type DeprecatedSetFlagsResponseFut =
1649 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1650 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
1651 fn _decode(
1652 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1653 ) -> Result<i32, fidl::Error> {
1654 let _response = fidl::client::decode_transaction_body::<
1655 NodeDeprecatedSetFlagsResponse,
1656 fdomain_client::fidl::FDomainResourceDialect,
1657 0x5295b76c71fde733,
1658 >(_buf?)?;
1659 Ok(_response.s)
1660 }
1661 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
1662 (flags,),
1663 0x5295b76c71fde733,
1664 fidl::encoding::DynamicFlags::empty(),
1665 _decode,
1666 )
1667 }
1668
1669 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
1670 NodeGetFlagsResult,
1671 fdomain_client::fidl::FDomainResourceDialect,
1672 >;
1673 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
1674 fn _decode(
1675 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1676 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1677 let _response = fidl::client::decode_transaction_body::<
1678 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1679 fdomain_client::fidl::FDomainResourceDialect,
1680 0x176eb318f64ec23,
1681 >(_buf?)?
1682 .into_result_fdomain::<DirectoryMarker>("get_flags")?;
1683 Ok(_response.map(|x| x.flags))
1684 }
1685 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
1686 (),
1687 0x176eb318f64ec23,
1688 fidl::encoding::DynamicFlags::FLEXIBLE,
1689 _decode,
1690 )
1691 }
1692
1693 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
1694 NodeSetFlagsResult,
1695 fdomain_client::fidl::FDomainResourceDialect,
1696 >;
1697 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
1698 fn _decode(
1699 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1700 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1701 let _response = fidl::client::decode_transaction_body::<
1702 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1703 fdomain_client::fidl::FDomainResourceDialect,
1704 0x55a8028685791ea8,
1705 >(_buf?)?
1706 .into_result_fdomain::<DirectoryMarker>("set_flags")?;
1707 Ok(_response.map(|x| x))
1708 }
1709 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
1710 (flags,),
1711 0x55a8028685791ea8,
1712 fidl::encoding::DynamicFlags::FLEXIBLE,
1713 _decode,
1714 )
1715 }
1716
1717 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
1718 (i32, Option<Box<FilesystemInfo>>),
1719 fdomain_client::fidl::FDomainResourceDialect,
1720 >;
1721 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
1722 fn _decode(
1723 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1724 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1725 let _response = fidl::client::decode_transaction_body::<
1726 NodeQueryFilesystemResponse,
1727 fdomain_client::fidl::FDomainResourceDialect,
1728 0x6f344a1c6b0a0610,
1729 >(_buf?)?;
1730 Ok((_response.s, _response.info))
1731 }
1732 self.client.send_query_and_decode::<
1733 fidl::encoding::EmptyPayload,
1734 (i32, Option<Box<FilesystemInfo>>),
1735 >(
1736 (),
1737 0x6f344a1c6b0a0610,
1738 fidl::encoding::DynamicFlags::empty(),
1739 _decode,
1740 )
1741 }
1742
1743 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
1744 NodeGetAttributesResult,
1745 fdomain_client::fidl::FDomainResourceDialect,
1746 >;
1747 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
1748 fn _decode(
1749 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1750 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1751 let _response = fidl::client::decode_transaction_body::<
1752 fidl::encoding::ResultType<NodeAttributes2, i32>,
1753 fdomain_client::fidl::FDomainResourceDialect,
1754 0x3d4396a638ea053b,
1755 >(_buf?)?;
1756 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1757 }
1758 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
1759 (query,),
1760 0x3d4396a638ea053b,
1761 fidl::encoding::DynamicFlags::empty(),
1762 _decode,
1763 )
1764 }
1765
1766 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
1767 NodeUpdateAttributesResult,
1768 fdomain_client::fidl::FDomainResourceDialect,
1769 >;
1770 fn r#update_attributes(
1771 &self,
1772 mut payload: &MutableNodeAttributes,
1773 ) -> Self::UpdateAttributesResponseFut {
1774 fn _decode(
1775 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1776 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1777 let _response = fidl::client::decode_transaction_body::<
1778 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1779 fdomain_client::fidl::FDomainResourceDialect,
1780 0x3308c1da5a89bf08,
1781 >(_buf?)?;
1782 Ok(_response.map(|x| x))
1783 }
1784 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
1785 payload,
1786 0x3308c1da5a89bf08,
1787 fidl::encoding::DynamicFlags::empty(),
1788 _decode,
1789 )
1790 }
1791
1792 type SyncResponseFut = fidl::client::QueryResponseFut<
1793 NodeSyncResult,
1794 fdomain_client::fidl::FDomainResourceDialect,
1795 >;
1796 fn r#sync(&self) -> Self::SyncResponseFut {
1797 fn _decode(
1798 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1799 ) -> Result<NodeSyncResult, fidl::Error> {
1800 let _response = fidl::client::decode_transaction_body::<
1801 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1802 fdomain_client::fidl::FDomainResourceDialect,
1803 0x2c5c27ca0ab5dc49,
1804 >(_buf?)?;
1805 Ok(_response.map(|x| x))
1806 }
1807 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
1808 (),
1809 0x2c5c27ca0ab5dc49,
1810 fidl::encoding::DynamicFlags::empty(),
1811 _decode,
1812 )
1813 }
1814
1815 fn r#list_extended_attributes(
1816 &self,
1817 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1818 ) -> Result<(), fidl::Error> {
1819 self.client.send::<NodeListExtendedAttributesRequest>(
1820 (iterator,),
1821 0x4b61033de007fcd0,
1822 fidl::encoding::DynamicFlags::empty(),
1823 )
1824 }
1825
1826 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1827 NodeGetExtendedAttributeResult,
1828 fdomain_client::fidl::FDomainResourceDialect,
1829 >;
1830 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
1831 fn _decode(
1832 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1833 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1834 let _response = fidl::client::decode_transaction_body::<
1835 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1836 fdomain_client::fidl::FDomainResourceDialect,
1837 0x45ffa3ccfdeb76db,
1838 >(_buf?)?;
1839 Ok(_response.map(|x| x))
1840 }
1841 self.client.send_query_and_decode::<
1842 NodeGetExtendedAttributeRequest,
1843 NodeGetExtendedAttributeResult,
1844 >(
1845 (name,),
1846 0x45ffa3ccfdeb76db,
1847 fidl::encoding::DynamicFlags::empty(),
1848 _decode,
1849 )
1850 }
1851
1852 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1853 NodeSetExtendedAttributeResult,
1854 fdomain_client::fidl::FDomainResourceDialect,
1855 >;
1856 fn r#set_extended_attribute(
1857 &self,
1858 mut name: &[u8],
1859 mut value: ExtendedAttributeValue,
1860 mut mode: SetExtendedAttributeMode,
1861 ) -> Self::SetExtendedAttributeResponseFut {
1862 fn _decode(
1863 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1864 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1865 let _response = fidl::client::decode_transaction_body::<
1866 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1867 fdomain_client::fidl::FDomainResourceDialect,
1868 0x4a951362f681f23c,
1869 >(_buf?)?;
1870 Ok(_response.map(|x| x))
1871 }
1872 self.client.send_query_and_decode::<
1873 NodeSetExtendedAttributeRequest,
1874 NodeSetExtendedAttributeResult,
1875 >(
1876 (name, &mut value, mode,),
1877 0x4a951362f681f23c,
1878 fidl::encoding::DynamicFlags::empty(),
1879 _decode,
1880 )
1881 }
1882
1883 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1884 NodeRemoveExtendedAttributeResult,
1885 fdomain_client::fidl::FDomainResourceDialect,
1886 >;
1887 fn r#remove_extended_attribute(
1888 &self,
1889 mut name: &[u8],
1890 ) -> Self::RemoveExtendedAttributeResponseFut {
1891 fn _decode(
1892 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1893 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1894 let _response = fidl::client::decode_transaction_body::<
1895 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1896 fdomain_client::fidl::FDomainResourceDialect,
1897 0x7a0b9f3a9bf9032d,
1898 >(_buf?)?;
1899 Ok(_response.map(|x| x))
1900 }
1901 self.client.send_query_and_decode::<
1902 NodeRemoveExtendedAttributeRequest,
1903 NodeRemoveExtendedAttributeResult,
1904 >(
1905 (name,),
1906 0x7a0b9f3a9bf9032d,
1907 fidl::encoding::DynamicFlags::empty(),
1908 _decode,
1909 )
1910 }
1911
1912 fn r#open(
1913 &self,
1914 mut path: &str,
1915 mut flags: Flags,
1916 mut options: &Options,
1917 mut object: fdomain_client::Channel,
1918 ) -> Result<(), fidl::Error> {
1919 self.client.send::<OpenableOpenRequest>(
1920 (path, flags, options, object),
1921 0x568ddcb9a9cbb6d9,
1922 fidl::encoding::DynamicFlags::FLEXIBLE,
1923 )
1924 }
1925
1926 fn r#deprecated_open(
1927 &self,
1928 mut flags: OpenFlags,
1929 mut mode: ModeType,
1930 mut path: &str,
1931 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1932 ) -> Result<(), fidl::Error> {
1933 self.client.send::<DirectoryDeprecatedOpenRequest>(
1934 (flags, mode, path, object),
1935 0x2c5044561d685ec0,
1936 fidl::encoding::DynamicFlags::FLEXIBLE,
1937 )
1938 }
1939
1940 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
1941 (i32, Vec<u8>),
1942 fdomain_client::fidl::FDomainResourceDialect,
1943 >;
1944 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
1945 fn _decode(
1946 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1947 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1948 let _response = fidl::client::decode_transaction_body::<
1949 DirectoryReadDirentsResponse,
1950 fdomain_client::fidl::FDomainResourceDialect,
1951 0x3582806bf27faa0a,
1952 >(_buf?)?;
1953 Ok((_response.s, _response.dirents))
1954 }
1955 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
1956 (max_bytes,),
1957 0x3582806bf27faa0a,
1958 fidl::encoding::DynamicFlags::empty(),
1959 _decode,
1960 )
1961 }
1962
1963 type RewindResponseFut =
1964 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1965 fn r#rewind(&self) -> Self::RewindResponseFut {
1966 fn _decode(
1967 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1968 ) -> Result<i32, fidl::Error> {
1969 let _response = fidl::client::decode_transaction_body::<
1970 DirectoryRewindResponse,
1971 fdomain_client::fidl::FDomainResourceDialect,
1972 0x16b1202af0f34c71,
1973 >(_buf?)?;
1974 Ok(_response.s)
1975 }
1976 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1977 (),
1978 0x16b1202af0f34c71,
1979 fidl::encoding::DynamicFlags::empty(),
1980 _decode,
1981 )
1982 }
1983
1984 type GetTokenResponseFut = fidl::client::QueryResponseFut<
1985 (i32, Option<fdomain_client::NullableHandle>),
1986 fdomain_client::fidl::FDomainResourceDialect,
1987 >;
1988 fn r#get_token(&self) -> Self::GetTokenResponseFut {
1989 fn _decode(
1990 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1991 ) -> Result<(i32, Option<fdomain_client::NullableHandle>), fidl::Error> {
1992 let _response = fidl::client::decode_transaction_body::<
1993 DirectoryGetTokenResponse,
1994 fdomain_client::fidl::FDomainResourceDialect,
1995 0x26ae9d18763c8655,
1996 >(_buf?)?;
1997 Ok((_response.s, _response.token))
1998 }
1999 self.client.send_query_and_decode::<
2000 fidl::encoding::EmptyPayload,
2001 (i32, Option<fdomain_client::NullableHandle>),
2002 >(
2003 (),
2004 0x26ae9d18763c8655,
2005 fidl::encoding::DynamicFlags::empty(),
2006 _decode,
2007 )
2008 }
2009
2010 type LinkResponseFut =
2011 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2012 fn r#link(
2013 &self,
2014 mut src: &str,
2015 mut dst_parent_token: fdomain_client::NullableHandle,
2016 mut dst: &str,
2017 ) -> Self::LinkResponseFut {
2018 fn _decode(
2019 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2020 ) -> Result<i32, fidl::Error> {
2021 let _response = fidl::client::decode_transaction_body::<
2022 DirectoryLinkResponse,
2023 fdomain_client::fidl::FDomainResourceDialect,
2024 0x740604c0c7c930e7,
2025 >(_buf?)?;
2026 Ok(_response.s)
2027 }
2028 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2029 (src, dst_parent_token, dst),
2030 0x740604c0c7c930e7,
2031 fidl::encoding::DynamicFlags::empty(),
2032 _decode,
2033 )
2034 }
2035
2036 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2037 DirectoryUnlinkResult,
2038 fdomain_client::fidl::FDomainResourceDialect,
2039 >;
2040 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2041 fn _decode(
2042 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2043 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2044 let _response = fidl::client::decode_transaction_body::<
2045 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2046 fdomain_client::fidl::FDomainResourceDialect,
2047 0x750a0326a78d7bed,
2048 >(_buf?)?;
2049 Ok(_response.map(|x| x))
2050 }
2051 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2052 (name, options),
2053 0x750a0326a78d7bed,
2054 fidl::encoding::DynamicFlags::empty(),
2055 _decode,
2056 )
2057 }
2058
2059 type RenameResponseFut = fidl::client::QueryResponseFut<
2060 DirectoryRenameResult,
2061 fdomain_client::fidl::FDomainResourceDialect,
2062 >;
2063 fn r#rename(
2064 &self,
2065 mut src: &str,
2066 mut dst_parent_token: fdomain_client::Event,
2067 mut dst: &str,
2068 ) -> Self::RenameResponseFut {
2069 fn _decode(
2070 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2071 ) -> Result<DirectoryRenameResult, fidl::Error> {
2072 let _response = fidl::client::decode_transaction_body::<
2073 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2074 fdomain_client::fidl::FDomainResourceDialect,
2075 0x7060e7723b9928de,
2076 >(_buf?)?;
2077 Ok(_response.map(|x| x))
2078 }
2079 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2080 (src, dst_parent_token, dst),
2081 0x7060e7723b9928de,
2082 fidl::encoding::DynamicFlags::empty(),
2083 _decode,
2084 )
2085 }
2086
2087 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2088 DirectoryCreateSymlinkResult,
2089 fdomain_client::fidl::FDomainResourceDialect,
2090 >;
2091 fn r#create_symlink(
2092 &self,
2093 mut name: &str,
2094 mut target: &[u8],
2095 mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
2096 ) -> Self::CreateSymlinkResponseFut {
2097 fn _decode(
2098 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2099 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2100 let _response = fidl::client::decode_transaction_body::<
2101 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2102 fdomain_client::fidl::FDomainResourceDialect,
2103 0x21ce0f19ec043889,
2104 >(_buf?)?;
2105 Ok(_response.map(|x| x))
2106 }
2107 self.client
2108 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2109 (name, target, connection),
2110 0x21ce0f19ec043889,
2111 fidl::encoding::DynamicFlags::empty(),
2112 _decode,
2113 )
2114 }
2115
2116 type WatchResponseFut =
2117 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2118 fn r#watch(
2119 &self,
2120 mut mask: WatchMask,
2121 mut options: u32,
2122 mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
2123 ) -> Self::WatchResponseFut {
2124 fn _decode(
2125 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2126 ) -> Result<i32, fidl::Error> {
2127 let _response = fidl::client::decode_transaction_body::<
2128 DirectoryWatchResponse,
2129 fdomain_client::fidl::FDomainResourceDialect,
2130 0x5717193a59d66d91,
2131 >(_buf?)?;
2132 Ok(_response.s)
2133 }
2134 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2135 (mask, options, watcher),
2136 0x5717193a59d66d91,
2137 fidl::encoding::DynamicFlags::empty(),
2138 _decode,
2139 )
2140 }
2141}
2142
2143pub struct DirectoryEventStream {
2144 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2145}
2146
2147impl std::marker::Unpin for DirectoryEventStream {}
2148
2149impl futures::stream::FusedStream for DirectoryEventStream {
2150 fn is_terminated(&self) -> bool {
2151 self.event_receiver.is_terminated()
2152 }
2153}
2154
2155impl futures::Stream for DirectoryEventStream {
2156 type Item = Result<DirectoryEvent, fidl::Error>;
2157
2158 fn poll_next(
2159 mut self: std::pin::Pin<&mut Self>,
2160 cx: &mut std::task::Context<'_>,
2161 ) -> std::task::Poll<Option<Self::Item>> {
2162 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2163 &mut self.event_receiver,
2164 cx
2165 )?) {
2166 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
2167 None => std::task::Poll::Ready(None),
2168 }
2169 }
2170}
2171
2172#[derive(Debug)]
2173pub enum DirectoryEvent {
2174 OnOpen_ {
2175 s: i32,
2176 info: Option<Box<NodeInfoDeprecated>>,
2177 },
2178 OnRepresentation {
2179 payload: Representation,
2180 },
2181 #[non_exhaustive]
2182 _UnknownEvent {
2183 ordinal: u64,
2185 },
2186}
2187
2188impl DirectoryEvent {
2189 #[allow(irrefutable_let_patterns)]
2190 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
2191 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
2192 }
2193 #[allow(irrefutable_let_patterns)]
2194 pub fn into_on_representation(self) -> Option<Representation> {
2195 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
2196 }
2197
2198 fn decode(
2200 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2201 ) -> Result<DirectoryEvent, fidl::Error> {
2202 let (bytes, _handles) = buf.split_mut();
2203 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2204 debug_assert_eq!(tx_header.tx_id, 0);
2205 match tx_header.ordinal {
2206 0x7fc7bbb1dbfd1972 => {
2207 let mut out = fidl::new_empty!(
2208 NodeOnOpenRequest,
2209 fdomain_client::fidl::FDomainResourceDialect
2210 );
2211 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2212 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
2213 }
2214 0x5cb40567d80a510c => {
2215 let mut out =
2216 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
2217 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
2218 Ok((DirectoryEvent::OnRepresentation { payload: out }))
2219 }
2220 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2221 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2222 }
2223 _ => Err(fidl::Error::UnknownOrdinal {
2224 ordinal: tx_header.ordinal,
2225 protocol_name:
2226 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2227 }),
2228 }
2229 }
2230}
2231
2232pub struct DirectoryRequestStream {
2234 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2235 is_terminated: bool,
2236}
2237
2238impl std::marker::Unpin for DirectoryRequestStream {}
2239
2240impl futures::stream::FusedStream for DirectoryRequestStream {
2241 fn is_terminated(&self) -> bool {
2242 self.is_terminated
2243 }
2244}
2245
2246impl fdomain_client::fidl::RequestStream for DirectoryRequestStream {
2247 type Protocol = DirectoryMarker;
2248 type ControlHandle = DirectoryControlHandle;
2249
2250 fn from_channel(channel: fdomain_client::Channel) -> Self {
2251 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2252 }
2253
2254 fn control_handle(&self) -> Self::ControlHandle {
2255 DirectoryControlHandle { inner: self.inner.clone() }
2256 }
2257
2258 fn into_inner(
2259 self,
2260 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2261 {
2262 (self.inner, self.is_terminated)
2263 }
2264
2265 fn from_inner(
2266 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2267 is_terminated: bool,
2268 ) -> Self {
2269 Self { inner, is_terminated }
2270 }
2271}
2272
2273impl futures::Stream for DirectoryRequestStream {
2274 type Item = Result<DirectoryRequest, fidl::Error>;
2275
2276 fn poll_next(
2277 mut self: std::pin::Pin<&mut Self>,
2278 cx: &mut std::task::Context<'_>,
2279 ) -> std::task::Poll<Option<Self::Item>> {
2280 let this = &mut *self;
2281 if this.inner.check_shutdown(cx) {
2282 this.is_terminated = true;
2283 return std::task::Poll::Ready(None);
2284 }
2285 if this.is_terminated {
2286 panic!("polled DirectoryRequestStream after completion");
2287 }
2288 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2289 |bytes, handles| {
2290 match this.inner.channel().read_etc(cx, bytes, handles) {
2291 std::task::Poll::Ready(Ok(())) => {}
2292 std::task::Poll::Pending => return std::task::Poll::Pending,
2293 std::task::Poll::Ready(Err(None)) => {
2294 this.is_terminated = true;
2295 return std::task::Poll::Ready(None);
2296 }
2297 std::task::Poll::Ready(Err(Some(e))) => {
2298 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2299 e.into(),
2300 ))));
2301 }
2302 }
2303
2304 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2306
2307 std::task::Poll::Ready(Some(match header.ordinal {
2308 0x6ee9c0ad53ec87aa => {
2309 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2310 let mut req = fidl::new_empty!(
2311 AdvisoryLockingAdvisoryLockRequest,
2312 fdomain_client::fidl::FDomainResourceDialect
2313 );
2314 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
2315 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2316 Ok(DirectoryRequest::AdvisoryLock {
2317 request: req.request,
2318
2319 responder: DirectoryAdvisoryLockResponder {
2320 control_handle: std::mem::ManuallyDrop::new(control_handle),
2321 tx_id: header.tx_id,
2322 },
2323 })
2324 }
2325 0x20d8a7aba2168a79 => {
2326 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2327 let mut req = fidl::new_empty!(
2328 fdomain_fuchsia_unknown::CloneableCloneRequest,
2329 fdomain_client::fidl::FDomainResourceDialect
2330 );
2331 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2332 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2333 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
2334 }
2335 0x5ac5d459ad7f657e => {
2336 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2337 let mut req = fidl::new_empty!(
2338 fidl::encoding::EmptyPayload,
2339 fdomain_client::fidl::FDomainResourceDialect
2340 );
2341 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2342 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2343 Ok(DirectoryRequest::Close {
2344 responder: DirectoryCloseResponder {
2345 control_handle: std::mem::ManuallyDrop::new(control_handle),
2346 tx_id: header.tx_id,
2347 },
2348 })
2349 }
2350 0x2658edee9decfc06 => {
2351 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2352 let mut req = fidl::new_empty!(
2353 fidl::encoding::EmptyPayload,
2354 fdomain_client::fidl::FDomainResourceDialect
2355 );
2356 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2357 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2358 Ok(DirectoryRequest::Query {
2359 responder: DirectoryQueryResponder {
2360 control_handle: std::mem::ManuallyDrop::new(control_handle),
2361 tx_id: header.tx_id,
2362 },
2363 })
2364 }
2365 0x5a61678f293ce16f => {
2366 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2367 let mut req = fidl::new_empty!(
2368 NodeDeprecatedCloneRequest,
2369 fdomain_client::fidl::FDomainResourceDialect
2370 );
2371 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2372 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2373 Ok(DirectoryRequest::DeprecatedClone {
2374 flags: req.flags,
2375 object: req.object,
2376
2377 control_handle,
2378 })
2379 }
2380 0x78985e216314dafd => {
2381 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2382 let mut req = fidl::new_empty!(
2383 fidl::encoding::EmptyPayload,
2384 fdomain_client::fidl::FDomainResourceDialect
2385 );
2386 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2387 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2388 Ok(DirectoryRequest::DeprecatedGetAttr {
2389 responder: DirectoryDeprecatedGetAttrResponder {
2390 control_handle: std::mem::ManuallyDrop::new(control_handle),
2391 tx_id: header.tx_id,
2392 },
2393 })
2394 }
2395 0x4186c0f40d938f46 => {
2396 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2397 let mut req = fidl::new_empty!(
2398 NodeDeprecatedSetAttrRequest,
2399 fdomain_client::fidl::FDomainResourceDialect
2400 );
2401 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
2402 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2403 Ok(DirectoryRequest::DeprecatedSetAttr {
2404 flags: req.flags,
2405 attributes: req.attributes,
2406
2407 responder: DirectoryDeprecatedSetAttrResponder {
2408 control_handle: std::mem::ManuallyDrop::new(control_handle),
2409 tx_id: header.tx_id,
2410 },
2411 })
2412 }
2413 0x5b88fffb8eda3aa1 => {
2414 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2415 let mut req = fidl::new_empty!(
2416 fidl::encoding::EmptyPayload,
2417 fdomain_client::fidl::FDomainResourceDialect
2418 );
2419 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2420 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2421 Ok(DirectoryRequest::DeprecatedGetFlags {
2422 responder: DirectoryDeprecatedGetFlagsResponder {
2423 control_handle: std::mem::ManuallyDrop::new(control_handle),
2424 tx_id: header.tx_id,
2425 },
2426 })
2427 }
2428 0x5295b76c71fde733 => {
2429 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2430 let mut req = fidl::new_empty!(
2431 NodeDeprecatedSetFlagsRequest,
2432 fdomain_client::fidl::FDomainResourceDialect
2433 );
2434 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2435 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2436 Ok(DirectoryRequest::DeprecatedSetFlags {
2437 flags: req.flags,
2438
2439 responder: DirectoryDeprecatedSetFlagsResponder {
2440 control_handle: std::mem::ManuallyDrop::new(control_handle),
2441 tx_id: header.tx_id,
2442 },
2443 })
2444 }
2445 0x176eb318f64ec23 => {
2446 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2447 let mut req = fidl::new_empty!(
2448 fidl::encoding::EmptyPayload,
2449 fdomain_client::fidl::FDomainResourceDialect
2450 );
2451 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2452 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2453 Ok(DirectoryRequest::GetFlags {
2454 responder: DirectoryGetFlagsResponder {
2455 control_handle: std::mem::ManuallyDrop::new(control_handle),
2456 tx_id: header.tx_id,
2457 },
2458 })
2459 }
2460 0x55a8028685791ea8 => {
2461 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2462 let mut req = fidl::new_empty!(
2463 NodeSetFlagsRequest,
2464 fdomain_client::fidl::FDomainResourceDialect
2465 );
2466 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2467 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2468 Ok(DirectoryRequest::SetFlags {
2469 flags: req.flags,
2470
2471 responder: DirectorySetFlagsResponder {
2472 control_handle: std::mem::ManuallyDrop::new(control_handle),
2473 tx_id: header.tx_id,
2474 },
2475 })
2476 }
2477 0x6f344a1c6b0a0610 => {
2478 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2479 let mut req = fidl::new_empty!(
2480 fidl::encoding::EmptyPayload,
2481 fdomain_client::fidl::FDomainResourceDialect
2482 );
2483 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2484 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2485 Ok(DirectoryRequest::QueryFilesystem {
2486 responder: DirectoryQueryFilesystemResponder {
2487 control_handle: std::mem::ManuallyDrop::new(control_handle),
2488 tx_id: header.tx_id,
2489 },
2490 })
2491 }
2492 0x3d4396a638ea053b => {
2493 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2494 let mut req = fidl::new_empty!(
2495 NodeGetAttributesRequest,
2496 fdomain_client::fidl::FDomainResourceDialect
2497 );
2498 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2499 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2500 Ok(DirectoryRequest::GetAttributes {
2501 query: req.query,
2502
2503 responder: DirectoryGetAttributesResponder {
2504 control_handle: std::mem::ManuallyDrop::new(control_handle),
2505 tx_id: header.tx_id,
2506 },
2507 })
2508 }
2509 0x3308c1da5a89bf08 => {
2510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2511 let mut req = fidl::new_empty!(
2512 MutableNodeAttributes,
2513 fdomain_client::fidl::FDomainResourceDialect
2514 );
2515 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
2516 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2517 Ok(DirectoryRequest::UpdateAttributes {
2518 payload: req,
2519 responder: DirectoryUpdateAttributesResponder {
2520 control_handle: std::mem::ManuallyDrop::new(control_handle),
2521 tx_id: header.tx_id,
2522 },
2523 })
2524 }
2525 0x2c5c27ca0ab5dc49 => {
2526 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2527 let mut req = fidl::new_empty!(
2528 fidl::encoding::EmptyPayload,
2529 fdomain_client::fidl::FDomainResourceDialect
2530 );
2531 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2532 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2533 Ok(DirectoryRequest::Sync {
2534 responder: DirectorySyncResponder {
2535 control_handle: std::mem::ManuallyDrop::new(control_handle),
2536 tx_id: header.tx_id,
2537 },
2538 })
2539 }
2540 0x4b61033de007fcd0 => {
2541 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2542 let mut req = fidl::new_empty!(
2543 NodeListExtendedAttributesRequest,
2544 fdomain_client::fidl::FDomainResourceDialect
2545 );
2546 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2547 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2548 Ok(DirectoryRequest::ListExtendedAttributes {
2549 iterator: req.iterator,
2550
2551 control_handle,
2552 })
2553 }
2554 0x45ffa3ccfdeb76db => {
2555 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2556 let mut req = fidl::new_empty!(
2557 NodeGetExtendedAttributeRequest,
2558 fdomain_client::fidl::FDomainResourceDialect
2559 );
2560 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2561 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2562 Ok(DirectoryRequest::GetExtendedAttribute {
2563 name: req.name,
2564
2565 responder: DirectoryGetExtendedAttributeResponder {
2566 control_handle: std::mem::ManuallyDrop::new(control_handle),
2567 tx_id: header.tx_id,
2568 },
2569 })
2570 }
2571 0x4a951362f681f23c => {
2572 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2573 let mut req = fidl::new_empty!(
2574 NodeSetExtendedAttributeRequest,
2575 fdomain_client::fidl::FDomainResourceDialect
2576 );
2577 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2578 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2579 Ok(DirectoryRequest::SetExtendedAttribute {
2580 name: req.name,
2581 value: req.value,
2582 mode: req.mode,
2583
2584 responder: DirectorySetExtendedAttributeResponder {
2585 control_handle: std::mem::ManuallyDrop::new(control_handle),
2586 tx_id: header.tx_id,
2587 },
2588 })
2589 }
2590 0x7a0b9f3a9bf9032d => {
2591 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2592 let mut req = fidl::new_empty!(
2593 NodeRemoveExtendedAttributeRequest,
2594 fdomain_client::fidl::FDomainResourceDialect
2595 );
2596 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2597 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2598 Ok(DirectoryRequest::RemoveExtendedAttribute {
2599 name: req.name,
2600
2601 responder: DirectoryRemoveExtendedAttributeResponder {
2602 control_handle: std::mem::ManuallyDrop::new(control_handle),
2603 tx_id: header.tx_id,
2604 },
2605 })
2606 }
2607 0x568ddcb9a9cbb6d9 => {
2608 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2609 let mut req = fidl::new_empty!(
2610 OpenableOpenRequest,
2611 fdomain_client::fidl::FDomainResourceDialect
2612 );
2613 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2614 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2615 Ok(DirectoryRequest::Open {
2616 path: req.path,
2617 flags: req.flags,
2618 options: req.options,
2619 object: req.object,
2620
2621 control_handle,
2622 })
2623 }
2624 0x2c5044561d685ec0 => {
2625 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2626 let mut req = fidl::new_empty!(
2627 DirectoryDeprecatedOpenRequest,
2628 fdomain_client::fidl::FDomainResourceDialect
2629 );
2630 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2631 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2632 Ok(DirectoryRequest::DeprecatedOpen {
2633 flags: req.flags,
2634 mode: req.mode,
2635 path: req.path,
2636 object: req.object,
2637
2638 control_handle,
2639 })
2640 }
2641 0x3582806bf27faa0a => {
2642 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2643 let mut req = fidl::new_empty!(
2644 DirectoryReadDirentsRequest,
2645 fdomain_client::fidl::FDomainResourceDialect
2646 );
2647 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
2648 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2649 Ok(DirectoryRequest::ReadDirents {
2650 max_bytes: req.max_bytes,
2651
2652 responder: DirectoryReadDirentsResponder {
2653 control_handle: std::mem::ManuallyDrop::new(control_handle),
2654 tx_id: header.tx_id,
2655 },
2656 })
2657 }
2658 0x16b1202af0f34c71 => {
2659 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2660 let mut req = fidl::new_empty!(
2661 fidl::encoding::EmptyPayload,
2662 fdomain_client::fidl::FDomainResourceDialect
2663 );
2664 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2665 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2666 Ok(DirectoryRequest::Rewind {
2667 responder: DirectoryRewindResponder {
2668 control_handle: std::mem::ManuallyDrop::new(control_handle),
2669 tx_id: header.tx_id,
2670 },
2671 })
2672 }
2673 0x26ae9d18763c8655 => {
2674 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2675 let mut req = fidl::new_empty!(
2676 fidl::encoding::EmptyPayload,
2677 fdomain_client::fidl::FDomainResourceDialect
2678 );
2679 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2680 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2681 Ok(DirectoryRequest::GetToken {
2682 responder: DirectoryGetTokenResponder {
2683 control_handle: std::mem::ManuallyDrop::new(control_handle),
2684 tx_id: header.tx_id,
2685 },
2686 })
2687 }
2688 0x740604c0c7c930e7 => {
2689 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2690 let mut req = fidl::new_empty!(
2691 DirectoryLinkRequest,
2692 fdomain_client::fidl::FDomainResourceDialect
2693 );
2694 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
2695 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2696 Ok(DirectoryRequest::Link {
2697 src: req.src,
2698 dst_parent_token: req.dst_parent_token,
2699 dst: req.dst,
2700
2701 responder: DirectoryLinkResponder {
2702 control_handle: std::mem::ManuallyDrop::new(control_handle),
2703 tx_id: header.tx_id,
2704 },
2705 })
2706 }
2707 0x750a0326a78d7bed => {
2708 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2709 let mut req = fidl::new_empty!(
2710 DirectoryUnlinkRequest,
2711 fdomain_client::fidl::FDomainResourceDialect
2712 );
2713 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2714 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2715 Ok(DirectoryRequest::Unlink {
2716 name: req.name,
2717 options: req.options,
2718
2719 responder: DirectoryUnlinkResponder {
2720 control_handle: std::mem::ManuallyDrop::new(control_handle),
2721 tx_id: header.tx_id,
2722 },
2723 })
2724 }
2725 0x7060e7723b9928de => {
2726 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2727 let mut req = fidl::new_empty!(
2728 DirectoryRenameRequest,
2729 fdomain_client::fidl::FDomainResourceDialect
2730 );
2731 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
2732 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2733 Ok(DirectoryRequest::Rename {
2734 src: req.src,
2735 dst_parent_token: req.dst_parent_token,
2736 dst: req.dst,
2737
2738 responder: DirectoryRenameResponder {
2739 control_handle: std::mem::ManuallyDrop::new(control_handle),
2740 tx_id: header.tx_id,
2741 },
2742 })
2743 }
2744 0x21ce0f19ec043889 => {
2745 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2746 let mut req = fidl::new_empty!(
2747 DirectoryCreateSymlinkRequest,
2748 fdomain_client::fidl::FDomainResourceDialect
2749 );
2750 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2751 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2752 Ok(DirectoryRequest::CreateSymlink {
2753 name: req.name,
2754 target: req.target,
2755 connection: req.connection,
2756
2757 responder: DirectoryCreateSymlinkResponder {
2758 control_handle: std::mem::ManuallyDrop::new(control_handle),
2759 tx_id: header.tx_id,
2760 },
2761 })
2762 }
2763 0x5717193a59d66d91 => {
2764 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2765 let mut req = fidl::new_empty!(
2766 DirectoryWatchRequest,
2767 fdomain_client::fidl::FDomainResourceDialect
2768 );
2769 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
2770 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2771 Ok(DirectoryRequest::Watch {
2772 mask: req.mask,
2773 options: req.options,
2774 watcher: req.watcher,
2775
2776 responder: DirectoryWatchResponder {
2777 control_handle: std::mem::ManuallyDrop::new(control_handle),
2778 tx_id: header.tx_id,
2779 },
2780 })
2781 }
2782 _ if header.tx_id == 0
2783 && header
2784 .dynamic_flags()
2785 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2786 {
2787 Ok(DirectoryRequest::_UnknownMethod {
2788 ordinal: header.ordinal,
2789 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2790 method_type: fidl::MethodType::OneWay,
2791 })
2792 }
2793 _ if header
2794 .dynamic_flags()
2795 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2796 {
2797 this.inner.send_framework_err(
2798 fidl::encoding::FrameworkErr::UnknownMethod,
2799 header.tx_id,
2800 header.ordinal,
2801 header.dynamic_flags(),
2802 (bytes, handles),
2803 )?;
2804 Ok(DirectoryRequest::_UnknownMethod {
2805 ordinal: header.ordinal,
2806 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2807 method_type: fidl::MethodType::TwoWay,
2808 })
2809 }
2810 _ => Err(fidl::Error::UnknownOrdinal {
2811 ordinal: header.ordinal,
2812 protocol_name:
2813 <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2814 }),
2815 }))
2816 },
2817 )
2818 }
2819}
2820
2821#[derive(Debug)]
2823pub enum DirectoryRequest {
2824 AdvisoryLock {
2848 request: AdvisoryLockRequest,
2849 responder: DirectoryAdvisoryLockResponder,
2850 },
2851 Clone {
2852 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
2853 control_handle: DirectoryControlHandle,
2854 },
2855 Close {
2866 responder: DirectoryCloseResponder,
2867 },
2868 Query {
2869 responder: DirectoryQueryResponder,
2870 },
2871 DeprecatedClone {
2873 flags: OpenFlags,
2874 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
2875 control_handle: DirectoryControlHandle,
2876 },
2877 DeprecatedGetAttr {
2879 responder: DirectoryDeprecatedGetAttrResponder,
2880 },
2881 DeprecatedSetAttr {
2883 flags: NodeAttributeFlags,
2884 attributes: NodeAttributes,
2885 responder: DirectoryDeprecatedSetAttrResponder,
2886 },
2887 DeprecatedGetFlags {
2889 responder: DirectoryDeprecatedGetFlagsResponder,
2890 },
2891 DeprecatedSetFlags {
2893 flags: OpenFlags,
2894 responder: DirectoryDeprecatedSetFlagsResponder,
2895 },
2896 GetFlags {
2905 responder: DirectoryGetFlagsResponder,
2906 },
2907 SetFlags {
2917 flags: Flags,
2918 responder: DirectorySetFlagsResponder,
2919 },
2920 QueryFilesystem {
2924 responder: DirectoryQueryFilesystemResponder,
2925 },
2926 GetAttributes {
2940 query: NodeAttributesQuery,
2941 responder: DirectoryGetAttributesResponder,
2942 },
2943 UpdateAttributes {
2952 payload: MutableNodeAttributes,
2953 responder: DirectoryUpdateAttributesResponder,
2954 },
2955 Sync {
2965 responder: DirectorySyncResponder,
2966 },
2967 ListExtendedAttributes {
2976 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
2977 control_handle: DirectoryControlHandle,
2978 },
2979 GetExtendedAttribute {
2986 name: Vec<u8>,
2987 responder: DirectoryGetExtendedAttributeResponder,
2988 },
2989 SetExtendedAttribute {
2997 name: Vec<u8>,
2998 value: ExtendedAttributeValue,
2999 mode: SetExtendedAttributeMode,
3000 responder: DirectorySetExtendedAttributeResponder,
3001 },
3002 RemoveExtendedAttribute {
3008 name: Vec<u8>,
3009 responder: DirectoryRemoveExtendedAttributeResponder,
3010 },
3011 Open {
3018 path: String,
3019 flags: Flags,
3020 options: Options,
3021 object: fdomain_client::Channel,
3022 control_handle: DirectoryControlHandle,
3023 },
3024 DeprecatedOpen {
3026 flags: OpenFlags,
3027 mode: ModeType,
3028 path: String,
3029 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
3030 control_handle: DirectoryControlHandle,
3031 },
3032 ReadDirents {
3058 max_bytes: u64,
3059 responder: DirectoryReadDirentsResponder,
3060 },
3061 Rewind {
3065 responder: DirectoryRewindResponder,
3066 },
3067 GetToken {
3074 responder: DirectoryGetTokenResponder,
3075 },
3076 Link {
3093 src: String,
3094 dst_parent_token: fdomain_client::NullableHandle,
3095 dst: String,
3096 responder: DirectoryLinkResponder,
3097 },
3098 Unlink {
3123 name: String,
3124 options: UnlinkOptions,
3125 responder: DirectoryUnlinkResponder,
3126 },
3127 Rename {
3153 src: String,
3154 dst_parent_token: fdomain_client::Event,
3155 dst: String,
3156 responder: DirectoryRenameResponder,
3157 },
3158 CreateSymlink {
3173 name: String,
3174 target: Vec<u8>,
3175 connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3176 responder: DirectoryCreateSymlinkResponder,
3177 },
3178 Watch {
3185 mask: WatchMask,
3186 options: u32,
3187 watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3188 responder: DirectoryWatchResponder,
3189 },
3190 #[non_exhaustive]
3192 _UnknownMethod {
3193 ordinal: u64,
3195 control_handle: DirectoryControlHandle,
3196 method_type: fidl::MethodType,
3197 },
3198}
3199
3200impl DirectoryRequest {
3201 #[allow(irrefutable_let_patterns)]
3202 pub fn into_advisory_lock(
3203 self,
3204 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
3205 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
3206 Some((request, responder))
3207 } else {
3208 None
3209 }
3210 }
3211
3212 #[allow(irrefutable_let_patterns)]
3213 pub fn into_clone(
3214 self,
3215 ) -> Option<(
3216 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
3217 DirectoryControlHandle,
3218 )> {
3219 if let DirectoryRequest::Clone { request, control_handle } = self {
3220 Some((request, control_handle))
3221 } else {
3222 None
3223 }
3224 }
3225
3226 #[allow(irrefutable_let_patterns)]
3227 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
3228 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
3229 }
3230
3231 #[allow(irrefutable_let_patterns)]
3232 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
3233 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
3234 }
3235
3236 #[allow(irrefutable_let_patterns)]
3237 pub fn into_deprecated_clone(
3238 self,
3239 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, DirectoryControlHandle)>
3240 {
3241 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
3242 Some((flags, object, control_handle))
3243 } else {
3244 None
3245 }
3246 }
3247
3248 #[allow(irrefutable_let_patterns)]
3249 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
3250 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
3251 Some((responder))
3252 } else {
3253 None
3254 }
3255 }
3256
3257 #[allow(irrefutable_let_patterns)]
3258 pub fn into_deprecated_set_attr(
3259 self,
3260 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
3261 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
3262 Some((flags, attributes, responder))
3263 } else {
3264 None
3265 }
3266 }
3267
3268 #[allow(irrefutable_let_patterns)]
3269 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
3270 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
3271 Some((responder))
3272 } else {
3273 None
3274 }
3275 }
3276
3277 #[allow(irrefutable_let_patterns)]
3278 pub fn into_deprecated_set_flags(
3279 self,
3280 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
3281 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
3282 Some((flags, responder))
3283 } else {
3284 None
3285 }
3286 }
3287
3288 #[allow(irrefutable_let_patterns)]
3289 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
3290 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
3291 }
3292
3293 #[allow(irrefutable_let_patterns)]
3294 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
3295 if let DirectoryRequest::SetFlags { flags, responder } = self {
3296 Some((flags, responder))
3297 } else {
3298 None
3299 }
3300 }
3301
3302 #[allow(irrefutable_let_patterns)]
3303 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
3304 if let DirectoryRequest::QueryFilesystem { responder } = self {
3305 Some((responder))
3306 } else {
3307 None
3308 }
3309 }
3310
3311 #[allow(irrefutable_let_patterns)]
3312 pub fn into_get_attributes(
3313 self,
3314 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
3315 if let DirectoryRequest::GetAttributes { query, responder } = self {
3316 Some((query, responder))
3317 } else {
3318 None
3319 }
3320 }
3321
3322 #[allow(irrefutable_let_patterns)]
3323 pub fn into_update_attributes(
3324 self,
3325 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
3326 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
3327 Some((payload, responder))
3328 } else {
3329 None
3330 }
3331 }
3332
3333 #[allow(irrefutable_let_patterns)]
3334 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
3335 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
3336 }
3337
3338 #[allow(irrefutable_let_patterns)]
3339 pub fn into_list_extended_attributes(
3340 self,
3341 ) -> Option<(
3342 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
3343 DirectoryControlHandle,
3344 )> {
3345 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
3346 Some((iterator, control_handle))
3347 } else {
3348 None
3349 }
3350 }
3351
3352 #[allow(irrefutable_let_patterns)]
3353 pub fn into_get_extended_attribute(
3354 self,
3355 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
3356 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
3357 Some((name, responder))
3358 } else {
3359 None
3360 }
3361 }
3362
3363 #[allow(irrefutable_let_patterns)]
3364 pub fn into_set_extended_attribute(
3365 self,
3366 ) -> Option<(
3367 Vec<u8>,
3368 ExtendedAttributeValue,
3369 SetExtendedAttributeMode,
3370 DirectorySetExtendedAttributeResponder,
3371 )> {
3372 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
3373 Some((name, value, mode, responder))
3374 } else {
3375 None
3376 }
3377 }
3378
3379 #[allow(irrefutable_let_patterns)]
3380 pub fn into_remove_extended_attribute(
3381 self,
3382 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
3383 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
3384 Some((name, responder))
3385 } else {
3386 None
3387 }
3388 }
3389
3390 #[allow(irrefutable_let_patterns)]
3391 pub fn into_open(
3392 self,
3393 ) -> Option<(String, Flags, Options, fdomain_client::Channel, DirectoryControlHandle)> {
3394 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
3395 Some((path, flags, options, object, control_handle))
3396 } else {
3397 None
3398 }
3399 }
3400
3401 #[allow(irrefutable_let_patterns)]
3402 pub fn into_deprecated_open(
3403 self,
3404 ) -> Option<(
3405 OpenFlags,
3406 ModeType,
3407 String,
3408 fdomain_client::fidl::ServerEnd<NodeMarker>,
3409 DirectoryControlHandle,
3410 )> {
3411 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
3412 {
3413 Some((flags, mode, path, object, control_handle))
3414 } else {
3415 None
3416 }
3417 }
3418
3419 #[allow(irrefutable_let_patterns)]
3420 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
3421 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
3422 Some((max_bytes, responder))
3423 } else {
3424 None
3425 }
3426 }
3427
3428 #[allow(irrefutable_let_patterns)]
3429 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
3430 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
3431 }
3432
3433 #[allow(irrefutable_let_patterns)]
3434 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
3435 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
3436 }
3437
3438 #[allow(irrefutable_let_patterns)]
3439 pub fn into_link(
3440 self,
3441 ) -> Option<(String, fdomain_client::NullableHandle, String, DirectoryLinkResponder)> {
3442 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
3443 Some((src, dst_parent_token, dst, responder))
3444 } else {
3445 None
3446 }
3447 }
3448
3449 #[allow(irrefutable_let_patterns)]
3450 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
3451 if let DirectoryRequest::Unlink { name, options, responder } = self {
3452 Some((name, options, responder))
3453 } else {
3454 None
3455 }
3456 }
3457
3458 #[allow(irrefutable_let_patterns)]
3459 pub fn into_rename(
3460 self,
3461 ) -> Option<(String, fdomain_client::Event, String, DirectoryRenameResponder)> {
3462 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
3463 Some((src, dst_parent_token, dst, responder))
3464 } else {
3465 None
3466 }
3467 }
3468
3469 #[allow(irrefutable_let_patterns)]
3470 pub fn into_create_symlink(
3471 self,
3472 ) -> Option<(
3473 String,
3474 Vec<u8>,
3475 Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3476 DirectoryCreateSymlinkResponder,
3477 )> {
3478 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
3479 Some((name, target, connection, responder))
3480 } else {
3481 None
3482 }
3483 }
3484
3485 #[allow(irrefutable_let_patterns)]
3486 pub fn into_watch(
3487 self,
3488 ) -> Option<(
3489 WatchMask,
3490 u32,
3491 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3492 DirectoryWatchResponder,
3493 )> {
3494 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
3495 Some((mask, options, watcher, responder))
3496 } else {
3497 None
3498 }
3499 }
3500
3501 pub fn method_name(&self) -> &'static str {
3503 match *self {
3504 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
3505 DirectoryRequest::Clone { .. } => "clone",
3506 DirectoryRequest::Close { .. } => "close",
3507 DirectoryRequest::Query { .. } => "query",
3508 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
3509 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
3510 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
3511 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
3512 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
3513 DirectoryRequest::GetFlags { .. } => "get_flags",
3514 DirectoryRequest::SetFlags { .. } => "set_flags",
3515 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
3516 DirectoryRequest::GetAttributes { .. } => "get_attributes",
3517 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
3518 DirectoryRequest::Sync { .. } => "sync",
3519 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
3520 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
3521 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
3522 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
3523 DirectoryRequest::Open { .. } => "open",
3524 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
3525 DirectoryRequest::ReadDirents { .. } => "read_dirents",
3526 DirectoryRequest::Rewind { .. } => "rewind",
3527 DirectoryRequest::GetToken { .. } => "get_token",
3528 DirectoryRequest::Link { .. } => "link",
3529 DirectoryRequest::Unlink { .. } => "unlink",
3530 DirectoryRequest::Rename { .. } => "rename",
3531 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
3532 DirectoryRequest::Watch { .. } => "watch",
3533 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3534 "unknown one-way method"
3535 }
3536 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3537 "unknown two-way method"
3538 }
3539 }
3540 }
3541}
3542
3543#[derive(Debug, Clone)]
3544pub struct DirectoryControlHandle {
3545 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3546}
3547
3548impl fdomain_client::fidl::ControlHandle for DirectoryControlHandle {
3549 fn shutdown(&self) {
3550 self.inner.shutdown()
3551 }
3552
3553 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3554 self.inner.shutdown_with_epitaph(status)
3555 }
3556
3557 fn is_closed(&self) -> bool {
3558 self.inner.channel().is_closed()
3559 }
3560 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3561 self.inner.channel().on_closed()
3562 }
3563}
3564
3565impl DirectoryControlHandle {
3566 pub fn send_on_open_(
3567 &self,
3568 mut s: i32,
3569 mut info: Option<NodeInfoDeprecated>,
3570 ) -> Result<(), fidl::Error> {
3571 self.inner.send::<NodeOnOpenRequest>(
3572 (s, info.as_mut()),
3573 0,
3574 0x7fc7bbb1dbfd1972,
3575 fidl::encoding::DynamicFlags::FLEXIBLE,
3576 )
3577 }
3578
3579 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
3580 self.inner.send::<Representation>(
3581 &mut payload,
3582 0,
3583 0x5cb40567d80a510c,
3584 fidl::encoding::DynamicFlags::empty(),
3585 )
3586 }
3587}
3588
3589#[must_use = "FIDL methods require a response to be sent"]
3590#[derive(Debug)]
3591pub struct DirectoryAdvisoryLockResponder {
3592 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3593 tx_id: u32,
3594}
3595
3596impl std::ops::Drop for DirectoryAdvisoryLockResponder {
3600 fn drop(&mut self) {
3601 self.control_handle.shutdown();
3602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3604 }
3605}
3606
3607impl fdomain_client::fidl::Responder for DirectoryAdvisoryLockResponder {
3608 type ControlHandle = DirectoryControlHandle;
3609
3610 fn control_handle(&self) -> &DirectoryControlHandle {
3611 &self.control_handle
3612 }
3613
3614 fn drop_without_shutdown(mut self) {
3615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3617 std::mem::forget(self);
3619 }
3620}
3621
3622impl DirectoryAdvisoryLockResponder {
3623 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3627 let _result = self.send_raw(result);
3628 if _result.is_err() {
3629 self.control_handle.shutdown();
3630 }
3631 self.drop_without_shutdown();
3632 _result
3633 }
3634
3635 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3637 let _result = self.send_raw(result);
3638 self.drop_without_shutdown();
3639 _result
3640 }
3641
3642 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3643 self.control_handle
3644 .inner
3645 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3646 result,
3647 self.tx_id,
3648 0x6ee9c0ad53ec87aa,
3649 fidl::encoding::DynamicFlags::empty(),
3650 )
3651 }
3652}
3653
3654#[must_use = "FIDL methods require a response to be sent"]
3655#[derive(Debug)]
3656pub struct DirectoryCloseResponder {
3657 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3658 tx_id: u32,
3659}
3660
3661impl std::ops::Drop for DirectoryCloseResponder {
3665 fn drop(&mut self) {
3666 self.control_handle.shutdown();
3667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3669 }
3670}
3671
3672impl fdomain_client::fidl::Responder for DirectoryCloseResponder {
3673 type ControlHandle = DirectoryControlHandle;
3674
3675 fn control_handle(&self) -> &DirectoryControlHandle {
3676 &self.control_handle
3677 }
3678
3679 fn drop_without_shutdown(mut self) {
3680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3682 std::mem::forget(self);
3684 }
3685}
3686
3687impl DirectoryCloseResponder {
3688 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3692 let _result = self.send_raw(result);
3693 if _result.is_err() {
3694 self.control_handle.shutdown();
3695 }
3696 self.drop_without_shutdown();
3697 _result
3698 }
3699
3700 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3702 let _result = self.send_raw(result);
3703 self.drop_without_shutdown();
3704 _result
3705 }
3706
3707 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3708 self.control_handle
3709 .inner
3710 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3711 result,
3712 self.tx_id,
3713 0x5ac5d459ad7f657e,
3714 fidl::encoding::DynamicFlags::empty(),
3715 )
3716 }
3717}
3718
3719#[must_use = "FIDL methods require a response to be sent"]
3720#[derive(Debug)]
3721pub struct DirectoryQueryResponder {
3722 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3723 tx_id: u32,
3724}
3725
3726impl std::ops::Drop for DirectoryQueryResponder {
3730 fn drop(&mut self) {
3731 self.control_handle.shutdown();
3732 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3734 }
3735}
3736
3737impl fdomain_client::fidl::Responder for DirectoryQueryResponder {
3738 type ControlHandle = DirectoryControlHandle;
3739
3740 fn control_handle(&self) -> &DirectoryControlHandle {
3741 &self.control_handle
3742 }
3743
3744 fn drop_without_shutdown(mut self) {
3745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3747 std::mem::forget(self);
3749 }
3750}
3751
3752impl DirectoryQueryResponder {
3753 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3757 let _result = self.send_raw(protocol);
3758 if _result.is_err() {
3759 self.control_handle.shutdown();
3760 }
3761 self.drop_without_shutdown();
3762 _result
3763 }
3764
3765 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3767 let _result = self.send_raw(protocol);
3768 self.drop_without_shutdown();
3769 _result
3770 }
3771
3772 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3773 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
3774 (protocol,),
3775 self.tx_id,
3776 0x2658edee9decfc06,
3777 fidl::encoding::DynamicFlags::empty(),
3778 )
3779 }
3780}
3781
3782#[must_use = "FIDL methods require a response to be sent"]
3783#[derive(Debug)]
3784pub struct DirectoryDeprecatedGetAttrResponder {
3785 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3786 tx_id: u32,
3787}
3788
3789impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
3793 fn drop(&mut self) {
3794 self.control_handle.shutdown();
3795 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3797 }
3798}
3799
3800impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetAttrResponder {
3801 type ControlHandle = DirectoryControlHandle;
3802
3803 fn control_handle(&self) -> &DirectoryControlHandle {
3804 &self.control_handle
3805 }
3806
3807 fn drop_without_shutdown(mut self) {
3808 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3810 std::mem::forget(self);
3812 }
3813}
3814
3815impl DirectoryDeprecatedGetAttrResponder {
3816 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3820 let _result = self.send_raw(s, attributes);
3821 if _result.is_err() {
3822 self.control_handle.shutdown();
3823 }
3824 self.drop_without_shutdown();
3825 _result
3826 }
3827
3828 pub fn send_no_shutdown_on_err(
3830 self,
3831 mut s: i32,
3832 mut attributes: &NodeAttributes,
3833 ) -> Result<(), fidl::Error> {
3834 let _result = self.send_raw(s, attributes);
3835 self.drop_without_shutdown();
3836 _result
3837 }
3838
3839 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3840 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
3841 (s, attributes),
3842 self.tx_id,
3843 0x78985e216314dafd,
3844 fidl::encoding::DynamicFlags::empty(),
3845 )
3846 }
3847}
3848
3849#[must_use = "FIDL methods require a response to be sent"]
3850#[derive(Debug)]
3851pub struct DirectoryDeprecatedSetAttrResponder {
3852 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3853 tx_id: u32,
3854}
3855
3856impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
3860 fn drop(&mut self) {
3861 self.control_handle.shutdown();
3862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3864 }
3865}
3866
3867impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetAttrResponder {
3868 type ControlHandle = DirectoryControlHandle;
3869
3870 fn control_handle(&self) -> &DirectoryControlHandle {
3871 &self.control_handle
3872 }
3873
3874 fn drop_without_shutdown(mut self) {
3875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3877 std::mem::forget(self);
3879 }
3880}
3881
3882impl DirectoryDeprecatedSetAttrResponder {
3883 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
3887 let _result = self.send_raw(s);
3888 if _result.is_err() {
3889 self.control_handle.shutdown();
3890 }
3891 self.drop_without_shutdown();
3892 _result
3893 }
3894
3895 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
3897 let _result = self.send_raw(s);
3898 self.drop_without_shutdown();
3899 _result
3900 }
3901
3902 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
3903 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
3904 (s,),
3905 self.tx_id,
3906 0x4186c0f40d938f46,
3907 fidl::encoding::DynamicFlags::empty(),
3908 )
3909 }
3910}
3911
3912#[must_use = "FIDL methods require a response to be sent"]
3913#[derive(Debug)]
3914pub struct DirectoryDeprecatedGetFlagsResponder {
3915 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3916 tx_id: u32,
3917}
3918
3919impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
3923 fn drop(&mut self) {
3924 self.control_handle.shutdown();
3925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3927 }
3928}
3929
3930impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetFlagsResponder {
3931 type ControlHandle = DirectoryControlHandle;
3932
3933 fn control_handle(&self) -> &DirectoryControlHandle {
3934 &self.control_handle
3935 }
3936
3937 fn drop_without_shutdown(mut self) {
3938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3940 std::mem::forget(self);
3942 }
3943}
3944
3945impl DirectoryDeprecatedGetFlagsResponder {
3946 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3950 let _result = self.send_raw(s, flags);
3951 if _result.is_err() {
3952 self.control_handle.shutdown();
3953 }
3954 self.drop_without_shutdown();
3955 _result
3956 }
3957
3958 pub fn send_no_shutdown_on_err(
3960 self,
3961 mut s: i32,
3962 mut flags: OpenFlags,
3963 ) -> Result<(), fidl::Error> {
3964 let _result = self.send_raw(s, flags);
3965 self.drop_without_shutdown();
3966 _result
3967 }
3968
3969 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3970 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
3971 (s, flags),
3972 self.tx_id,
3973 0x5b88fffb8eda3aa1,
3974 fidl::encoding::DynamicFlags::empty(),
3975 )
3976 }
3977}
3978
3979#[must_use = "FIDL methods require a response to be sent"]
3980#[derive(Debug)]
3981pub struct DirectoryDeprecatedSetFlagsResponder {
3982 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3983 tx_id: u32,
3984}
3985
3986impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
3990 fn drop(&mut self) {
3991 self.control_handle.shutdown();
3992 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3994 }
3995}
3996
3997impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetFlagsResponder {
3998 type ControlHandle = DirectoryControlHandle;
3999
4000 fn control_handle(&self) -> &DirectoryControlHandle {
4001 &self.control_handle
4002 }
4003
4004 fn drop_without_shutdown(mut self) {
4005 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4007 std::mem::forget(self);
4009 }
4010}
4011
4012impl DirectoryDeprecatedSetFlagsResponder {
4013 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4017 let _result = self.send_raw(s);
4018 if _result.is_err() {
4019 self.control_handle.shutdown();
4020 }
4021 self.drop_without_shutdown();
4022 _result
4023 }
4024
4025 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4027 let _result = self.send_raw(s);
4028 self.drop_without_shutdown();
4029 _result
4030 }
4031
4032 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4033 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4034 (s,),
4035 self.tx_id,
4036 0x5295b76c71fde733,
4037 fidl::encoding::DynamicFlags::empty(),
4038 )
4039 }
4040}
4041
4042#[must_use = "FIDL methods require a response to be sent"]
4043#[derive(Debug)]
4044pub struct DirectoryGetFlagsResponder {
4045 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4046 tx_id: u32,
4047}
4048
4049impl std::ops::Drop for DirectoryGetFlagsResponder {
4053 fn drop(&mut self) {
4054 self.control_handle.shutdown();
4055 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4057 }
4058}
4059
4060impl fdomain_client::fidl::Responder for DirectoryGetFlagsResponder {
4061 type ControlHandle = DirectoryControlHandle;
4062
4063 fn control_handle(&self) -> &DirectoryControlHandle {
4064 &self.control_handle
4065 }
4066
4067 fn drop_without_shutdown(mut self) {
4068 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4070 std::mem::forget(self);
4072 }
4073}
4074
4075impl DirectoryGetFlagsResponder {
4076 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4080 let _result = self.send_raw(result);
4081 if _result.is_err() {
4082 self.control_handle.shutdown();
4083 }
4084 self.drop_without_shutdown();
4085 _result
4086 }
4087
4088 pub fn send_no_shutdown_on_err(
4090 self,
4091 mut result: Result<Flags, i32>,
4092 ) -> Result<(), fidl::Error> {
4093 let _result = self.send_raw(result);
4094 self.drop_without_shutdown();
4095 _result
4096 }
4097
4098 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4099 self.control_handle
4100 .inner
4101 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4102 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4103 self.tx_id,
4104 0x176eb318f64ec23,
4105 fidl::encoding::DynamicFlags::FLEXIBLE,
4106 )
4107 }
4108}
4109
4110#[must_use = "FIDL methods require a response to be sent"]
4111#[derive(Debug)]
4112pub struct DirectorySetFlagsResponder {
4113 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4114 tx_id: u32,
4115}
4116
4117impl std::ops::Drop for DirectorySetFlagsResponder {
4121 fn drop(&mut self) {
4122 self.control_handle.shutdown();
4123 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4125 }
4126}
4127
4128impl fdomain_client::fidl::Responder for DirectorySetFlagsResponder {
4129 type ControlHandle = DirectoryControlHandle;
4130
4131 fn control_handle(&self) -> &DirectoryControlHandle {
4132 &self.control_handle
4133 }
4134
4135 fn drop_without_shutdown(mut self) {
4136 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4138 std::mem::forget(self);
4140 }
4141}
4142
4143impl DirectorySetFlagsResponder {
4144 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4148 let _result = self.send_raw(result);
4149 if _result.is_err() {
4150 self.control_handle.shutdown();
4151 }
4152 self.drop_without_shutdown();
4153 _result
4154 }
4155
4156 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4158 let _result = self.send_raw(result);
4159 self.drop_without_shutdown();
4160 _result
4161 }
4162
4163 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4164 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4165 fidl::encoding::EmptyStruct,
4166 i32,
4167 >>(
4168 fidl::encoding::FlexibleResult::new(result),
4169 self.tx_id,
4170 0x55a8028685791ea8,
4171 fidl::encoding::DynamicFlags::FLEXIBLE,
4172 )
4173 }
4174}
4175
4176#[must_use = "FIDL methods require a response to be sent"]
4177#[derive(Debug)]
4178pub struct DirectoryQueryFilesystemResponder {
4179 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4180 tx_id: u32,
4181}
4182
4183impl std::ops::Drop for DirectoryQueryFilesystemResponder {
4187 fn drop(&mut self) {
4188 self.control_handle.shutdown();
4189 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4191 }
4192}
4193
4194impl fdomain_client::fidl::Responder for DirectoryQueryFilesystemResponder {
4195 type ControlHandle = DirectoryControlHandle;
4196
4197 fn control_handle(&self) -> &DirectoryControlHandle {
4198 &self.control_handle
4199 }
4200
4201 fn drop_without_shutdown(mut self) {
4202 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4204 std::mem::forget(self);
4206 }
4207}
4208
4209impl DirectoryQueryFilesystemResponder {
4210 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4214 let _result = self.send_raw(s, info);
4215 if _result.is_err() {
4216 self.control_handle.shutdown();
4217 }
4218 self.drop_without_shutdown();
4219 _result
4220 }
4221
4222 pub fn send_no_shutdown_on_err(
4224 self,
4225 mut s: i32,
4226 mut info: Option<&FilesystemInfo>,
4227 ) -> Result<(), fidl::Error> {
4228 let _result = self.send_raw(s, info);
4229 self.drop_without_shutdown();
4230 _result
4231 }
4232
4233 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4234 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
4235 (s, info),
4236 self.tx_id,
4237 0x6f344a1c6b0a0610,
4238 fidl::encoding::DynamicFlags::empty(),
4239 )
4240 }
4241}
4242
4243#[must_use = "FIDL methods require a response to be sent"]
4244#[derive(Debug)]
4245pub struct DirectoryGetAttributesResponder {
4246 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4247 tx_id: u32,
4248}
4249
4250impl std::ops::Drop for DirectoryGetAttributesResponder {
4254 fn drop(&mut self) {
4255 self.control_handle.shutdown();
4256 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4258 }
4259}
4260
4261impl fdomain_client::fidl::Responder for DirectoryGetAttributesResponder {
4262 type ControlHandle = DirectoryControlHandle;
4263
4264 fn control_handle(&self) -> &DirectoryControlHandle {
4265 &self.control_handle
4266 }
4267
4268 fn drop_without_shutdown(mut self) {
4269 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4271 std::mem::forget(self);
4273 }
4274}
4275
4276impl DirectoryGetAttributesResponder {
4277 pub fn send(
4281 self,
4282 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4283 ) -> Result<(), fidl::Error> {
4284 let _result = self.send_raw(result);
4285 if _result.is_err() {
4286 self.control_handle.shutdown();
4287 }
4288 self.drop_without_shutdown();
4289 _result
4290 }
4291
4292 pub fn send_no_shutdown_on_err(
4294 self,
4295 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4296 ) -> Result<(), fidl::Error> {
4297 let _result = self.send_raw(result);
4298 self.drop_without_shutdown();
4299 _result
4300 }
4301
4302 fn send_raw(
4303 &self,
4304 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4305 ) -> Result<(), fidl::Error> {
4306 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
4307 result,
4308 self.tx_id,
4309 0x3d4396a638ea053b,
4310 fidl::encoding::DynamicFlags::empty(),
4311 )
4312 }
4313}
4314
4315#[must_use = "FIDL methods require a response to be sent"]
4316#[derive(Debug)]
4317pub struct DirectoryUpdateAttributesResponder {
4318 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4319 tx_id: u32,
4320}
4321
4322impl std::ops::Drop for DirectoryUpdateAttributesResponder {
4326 fn drop(&mut self) {
4327 self.control_handle.shutdown();
4328 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4330 }
4331}
4332
4333impl fdomain_client::fidl::Responder for DirectoryUpdateAttributesResponder {
4334 type ControlHandle = DirectoryControlHandle;
4335
4336 fn control_handle(&self) -> &DirectoryControlHandle {
4337 &self.control_handle
4338 }
4339
4340 fn drop_without_shutdown(mut self) {
4341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4343 std::mem::forget(self);
4345 }
4346}
4347
4348impl DirectoryUpdateAttributesResponder {
4349 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4353 let _result = self.send_raw(result);
4354 if _result.is_err() {
4355 self.control_handle.shutdown();
4356 }
4357 self.drop_without_shutdown();
4358 _result
4359 }
4360
4361 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4363 let _result = self.send_raw(result);
4364 self.drop_without_shutdown();
4365 _result
4366 }
4367
4368 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4369 self.control_handle
4370 .inner
4371 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4372 result,
4373 self.tx_id,
4374 0x3308c1da5a89bf08,
4375 fidl::encoding::DynamicFlags::empty(),
4376 )
4377 }
4378}
4379
4380#[must_use = "FIDL methods require a response to be sent"]
4381#[derive(Debug)]
4382pub struct DirectorySyncResponder {
4383 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4384 tx_id: u32,
4385}
4386
4387impl std::ops::Drop for DirectorySyncResponder {
4391 fn drop(&mut self) {
4392 self.control_handle.shutdown();
4393 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4395 }
4396}
4397
4398impl fdomain_client::fidl::Responder for DirectorySyncResponder {
4399 type ControlHandle = DirectoryControlHandle;
4400
4401 fn control_handle(&self) -> &DirectoryControlHandle {
4402 &self.control_handle
4403 }
4404
4405 fn drop_without_shutdown(mut self) {
4406 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4408 std::mem::forget(self);
4410 }
4411}
4412
4413impl DirectorySyncResponder {
4414 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4418 let _result = self.send_raw(result);
4419 if _result.is_err() {
4420 self.control_handle.shutdown();
4421 }
4422 self.drop_without_shutdown();
4423 _result
4424 }
4425
4426 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4428 let _result = self.send_raw(result);
4429 self.drop_without_shutdown();
4430 _result
4431 }
4432
4433 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4434 self.control_handle
4435 .inner
4436 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4437 result,
4438 self.tx_id,
4439 0x2c5c27ca0ab5dc49,
4440 fidl::encoding::DynamicFlags::empty(),
4441 )
4442 }
4443}
4444
4445#[must_use = "FIDL methods require a response to be sent"]
4446#[derive(Debug)]
4447pub struct DirectoryGetExtendedAttributeResponder {
4448 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4449 tx_id: u32,
4450}
4451
4452impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
4456 fn drop(&mut self) {
4457 self.control_handle.shutdown();
4458 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4460 }
4461}
4462
4463impl fdomain_client::fidl::Responder for DirectoryGetExtendedAttributeResponder {
4464 type ControlHandle = DirectoryControlHandle;
4465
4466 fn control_handle(&self) -> &DirectoryControlHandle {
4467 &self.control_handle
4468 }
4469
4470 fn drop_without_shutdown(mut self) {
4471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4473 std::mem::forget(self);
4475 }
4476}
4477
4478impl DirectoryGetExtendedAttributeResponder {
4479 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4483 let _result = self.send_raw(result);
4484 if _result.is_err() {
4485 self.control_handle.shutdown();
4486 }
4487 self.drop_without_shutdown();
4488 _result
4489 }
4490
4491 pub fn send_no_shutdown_on_err(
4493 self,
4494 mut result: Result<ExtendedAttributeValue, i32>,
4495 ) -> Result<(), fidl::Error> {
4496 let _result = self.send_raw(result);
4497 self.drop_without_shutdown();
4498 _result
4499 }
4500
4501 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4502 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
4503 result.as_mut().map_err(|e| *e),
4504 self.tx_id,
4505 0x45ffa3ccfdeb76db,
4506 fidl::encoding::DynamicFlags::empty(),
4507 )
4508 }
4509}
4510
4511#[must_use = "FIDL methods require a response to be sent"]
4512#[derive(Debug)]
4513pub struct DirectorySetExtendedAttributeResponder {
4514 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4515 tx_id: u32,
4516}
4517
4518impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
4522 fn drop(&mut self) {
4523 self.control_handle.shutdown();
4524 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4526 }
4527}
4528
4529impl fdomain_client::fidl::Responder for DirectorySetExtendedAttributeResponder {
4530 type ControlHandle = DirectoryControlHandle;
4531
4532 fn control_handle(&self) -> &DirectoryControlHandle {
4533 &self.control_handle
4534 }
4535
4536 fn drop_without_shutdown(mut self) {
4537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4539 std::mem::forget(self);
4541 }
4542}
4543
4544impl DirectorySetExtendedAttributeResponder {
4545 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4549 let _result = self.send_raw(result);
4550 if _result.is_err() {
4551 self.control_handle.shutdown();
4552 }
4553 self.drop_without_shutdown();
4554 _result
4555 }
4556
4557 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4559 let _result = self.send_raw(result);
4560 self.drop_without_shutdown();
4561 _result
4562 }
4563
4564 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4565 self.control_handle
4566 .inner
4567 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4568 result,
4569 self.tx_id,
4570 0x4a951362f681f23c,
4571 fidl::encoding::DynamicFlags::empty(),
4572 )
4573 }
4574}
4575
4576#[must_use = "FIDL methods require a response to be sent"]
4577#[derive(Debug)]
4578pub struct DirectoryRemoveExtendedAttributeResponder {
4579 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4580 tx_id: u32,
4581}
4582
4583impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
4587 fn drop(&mut self) {
4588 self.control_handle.shutdown();
4589 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4591 }
4592}
4593
4594impl fdomain_client::fidl::Responder for DirectoryRemoveExtendedAttributeResponder {
4595 type ControlHandle = DirectoryControlHandle;
4596
4597 fn control_handle(&self) -> &DirectoryControlHandle {
4598 &self.control_handle
4599 }
4600
4601 fn drop_without_shutdown(mut self) {
4602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4604 std::mem::forget(self);
4606 }
4607}
4608
4609impl DirectoryRemoveExtendedAttributeResponder {
4610 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4614 let _result = self.send_raw(result);
4615 if _result.is_err() {
4616 self.control_handle.shutdown();
4617 }
4618 self.drop_without_shutdown();
4619 _result
4620 }
4621
4622 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4624 let _result = self.send_raw(result);
4625 self.drop_without_shutdown();
4626 _result
4627 }
4628
4629 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4630 self.control_handle
4631 .inner
4632 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4633 result,
4634 self.tx_id,
4635 0x7a0b9f3a9bf9032d,
4636 fidl::encoding::DynamicFlags::empty(),
4637 )
4638 }
4639}
4640
4641#[must_use = "FIDL methods require a response to be sent"]
4642#[derive(Debug)]
4643pub struct DirectoryReadDirentsResponder {
4644 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4645 tx_id: u32,
4646}
4647
4648impl std::ops::Drop for DirectoryReadDirentsResponder {
4652 fn drop(&mut self) {
4653 self.control_handle.shutdown();
4654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4656 }
4657}
4658
4659impl fdomain_client::fidl::Responder for DirectoryReadDirentsResponder {
4660 type ControlHandle = DirectoryControlHandle;
4661
4662 fn control_handle(&self) -> &DirectoryControlHandle {
4663 &self.control_handle
4664 }
4665
4666 fn drop_without_shutdown(mut self) {
4667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4669 std::mem::forget(self);
4671 }
4672}
4673
4674impl DirectoryReadDirentsResponder {
4675 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4679 let _result = self.send_raw(s, dirents);
4680 if _result.is_err() {
4681 self.control_handle.shutdown();
4682 }
4683 self.drop_without_shutdown();
4684 _result
4685 }
4686
4687 pub fn send_no_shutdown_on_err(
4689 self,
4690 mut s: i32,
4691 mut dirents: &[u8],
4692 ) -> Result<(), fidl::Error> {
4693 let _result = self.send_raw(s, dirents);
4694 self.drop_without_shutdown();
4695 _result
4696 }
4697
4698 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4699 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
4700 (s, dirents),
4701 self.tx_id,
4702 0x3582806bf27faa0a,
4703 fidl::encoding::DynamicFlags::empty(),
4704 )
4705 }
4706}
4707
4708#[must_use = "FIDL methods require a response to be sent"]
4709#[derive(Debug)]
4710pub struct DirectoryRewindResponder {
4711 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4712 tx_id: u32,
4713}
4714
4715impl std::ops::Drop for DirectoryRewindResponder {
4719 fn drop(&mut self) {
4720 self.control_handle.shutdown();
4721 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4723 }
4724}
4725
4726impl fdomain_client::fidl::Responder for DirectoryRewindResponder {
4727 type ControlHandle = DirectoryControlHandle;
4728
4729 fn control_handle(&self) -> &DirectoryControlHandle {
4730 &self.control_handle
4731 }
4732
4733 fn drop_without_shutdown(mut self) {
4734 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4736 std::mem::forget(self);
4738 }
4739}
4740
4741impl DirectoryRewindResponder {
4742 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4746 let _result = self.send_raw(s);
4747 if _result.is_err() {
4748 self.control_handle.shutdown();
4749 }
4750 self.drop_without_shutdown();
4751 _result
4752 }
4753
4754 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4756 let _result = self.send_raw(s);
4757 self.drop_without_shutdown();
4758 _result
4759 }
4760
4761 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4762 self.control_handle.inner.send::<DirectoryRewindResponse>(
4763 (s,),
4764 self.tx_id,
4765 0x16b1202af0f34c71,
4766 fidl::encoding::DynamicFlags::empty(),
4767 )
4768 }
4769}
4770
4771#[must_use = "FIDL methods require a response to be sent"]
4772#[derive(Debug)]
4773pub struct DirectoryGetTokenResponder {
4774 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4775 tx_id: u32,
4776}
4777
4778impl std::ops::Drop for DirectoryGetTokenResponder {
4782 fn drop(&mut self) {
4783 self.control_handle.shutdown();
4784 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4786 }
4787}
4788
4789impl fdomain_client::fidl::Responder for DirectoryGetTokenResponder {
4790 type ControlHandle = DirectoryControlHandle;
4791
4792 fn control_handle(&self) -> &DirectoryControlHandle {
4793 &self.control_handle
4794 }
4795
4796 fn drop_without_shutdown(mut self) {
4797 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4799 std::mem::forget(self);
4801 }
4802}
4803
4804impl DirectoryGetTokenResponder {
4805 pub fn send(
4809 self,
4810 mut s: i32,
4811 mut token: Option<fdomain_client::NullableHandle>,
4812 ) -> Result<(), fidl::Error> {
4813 let _result = self.send_raw(s, token);
4814 if _result.is_err() {
4815 self.control_handle.shutdown();
4816 }
4817 self.drop_without_shutdown();
4818 _result
4819 }
4820
4821 pub fn send_no_shutdown_on_err(
4823 self,
4824 mut s: i32,
4825 mut token: Option<fdomain_client::NullableHandle>,
4826 ) -> Result<(), fidl::Error> {
4827 let _result = self.send_raw(s, token);
4828 self.drop_without_shutdown();
4829 _result
4830 }
4831
4832 fn send_raw(
4833 &self,
4834 mut s: i32,
4835 mut token: Option<fdomain_client::NullableHandle>,
4836 ) -> Result<(), fidl::Error> {
4837 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
4838 (s, token),
4839 self.tx_id,
4840 0x26ae9d18763c8655,
4841 fidl::encoding::DynamicFlags::empty(),
4842 )
4843 }
4844}
4845
4846#[must_use = "FIDL methods require a response to be sent"]
4847#[derive(Debug)]
4848pub struct DirectoryLinkResponder {
4849 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4850 tx_id: u32,
4851}
4852
4853impl std::ops::Drop for DirectoryLinkResponder {
4857 fn drop(&mut self) {
4858 self.control_handle.shutdown();
4859 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4861 }
4862}
4863
4864impl fdomain_client::fidl::Responder for DirectoryLinkResponder {
4865 type ControlHandle = DirectoryControlHandle;
4866
4867 fn control_handle(&self) -> &DirectoryControlHandle {
4868 &self.control_handle
4869 }
4870
4871 fn drop_without_shutdown(mut self) {
4872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4874 std::mem::forget(self);
4876 }
4877}
4878
4879impl DirectoryLinkResponder {
4880 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4884 let _result = self.send_raw(s);
4885 if _result.is_err() {
4886 self.control_handle.shutdown();
4887 }
4888 self.drop_without_shutdown();
4889 _result
4890 }
4891
4892 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4894 let _result = self.send_raw(s);
4895 self.drop_without_shutdown();
4896 _result
4897 }
4898
4899 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4900 self.control_handle.inner.send::<DirectoryLinkResponse>(
4901 (s,),
4902 self.tx_id,
4903 0x740604c0c7c930e7,
4904 fidl::encoding::DynamicFlags::empty(),
4905 )
4906 }
4907}
4908
4909#[must_use = "FIDL methods require a response to be sent"]
4910#[derive(Debug)]
4911pub struct DirectoryUnlinkResponder {
4912 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4913 tx_id: u32,
4914}
4915
4916impl std::ops::Drop for DirectoryUnlinkResponder {
4920 fn drop(&mut self) {
4921 self.control_handle.shutdown();
4922 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4924 }
4925}
4926
4927impl fdomain_client::fidl::Responder for DirectoryUnlinkResponder {
4928 type ControlHandle = DirectoryControlHandle;
4929
4930 fn control_handle(&self) -> &DirectoryControlHandle {
4931 &self.control_handle
4932 }
4933
4934 fn drop_without_shutdown(mut self) {
4935 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4937 std::mem::forget(self);
4939 }
4940}
4941
4942impl DirectoryUnlinkResponder {
4943 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4947 let _result = self.send_raw(result);
4948 if _result.is_err() {
4949 self.control_handle.shutdown();
4950 }
4951 self.drop_without_shutdown();
4952 _result
4953 }
4954
4955 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4957 let _result = self.send_raw(result);
4958 self.drop_without_shutdown();
4959 _result
4960 }
4961
4962 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4963 self.control_handle
4964 .inner
4965 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4966 result,
4967 self.tx_id,
4968 0x750a0326a78d7bed,
4969 fidl::encoding::DynamicFlags::empty(),
4970 )
4971 }
4972}
4973
4974#[must_use = "FIDL methods require a response to be sent"]
4975#[derive(Debug)]
4976pub struct DirectoryRenameResponder {
4977 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4978 tx_id: u32,
4979}
4980
4981impl std::ops::Drop for DirectoryRenameResponder {
4985 fn drop(&mut self) {
4986 self.control_handle.shutdown();
4987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4989 }
4990}
4991
4992impl fdomain_client::fidl::Responder for DirectoryRenameResponder {
4993 type ControlHandle = DirectoryControlHandle;
4994
4995 fn control_handle(&self) -> &DirectoryControlHandle {
4996 &self.control_handle
4997 }
4998
4999 fn drop_without_shutdown(mut self) {
5000 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5002 std::mem::forget(self);
5004 }
5005}
5006
5007impl DirectoryRenameResponder {
5008 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5012 let _result = self.send_raw(result);
5013 if _result.is_err() {
5014 self.control_handle.shutdown();
5015 }
5016 self.drop_without_shutdown();
5017 _result
5018 }
5019
5020 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5022 let _result = self.send_raw(result);
5023 self.drop_without_shutdown();
5024 _result
5025 }
5026
5027 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5028 self.control_handle
5029 .inner
5030 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5031 result,
5032 self.tx_id,
5033 0x7060e7723b9928de,
5034 fidl::encoding::DynamicFlags::empty(),
5035 )
5036 }
5037}
5038
5039#[must_use = "FIDL methods require a response to be sent"]
5040#[derive(Debug)]
5041pub struct DirectoryCreateSymlinkResponder {
5042 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5043 tx_id: u32,
5044}
5045
5046impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5050 fn drop(&mut self) {
5051 self.control_handle.shutdown();
5052 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5054 }
5055}
5056
5057impl fdomain_client::fidl::Responder for DirectoryCreateSymlinkResponder {
5058 type ControlHandle = DirectoryControlHandle;
5059
5060 fn control_handle(&self) -> &DirectoryControlHandle {
5061 &self.control_handle
5062 }
5063
5064 fn drop_without_shutdown(mut self) {
5065 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5067 std::mem::forget(self);
5069 }
5070}
5071
5072impl DirectoryCreateSymlinkResponder {
5073 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5077 let _result = self.send_raw(result);
5078 if _result.is_err() {
5079 self.control_handle.shutdown();
5080 }
5081 self.drop_without_shutdown();
5082 _result
5083 }
5084
5085 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5087 let _result = self.send_raw(result);
5088 self.drop_without_shutdown();
5089 _result
5090 }
5091
5092 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5093 self.control_handle
5094 .inner
5095 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5096 result,
5097 self.tx_id,
5098 0x21ce0f19ec043889,
5099 fidl::encoding::DynamicFlags::empty(),
5100 )
5101 }
5102}
5103
5104#[must_use = "FIDL methods require a response to be sent"]
5105#[derive(Debug)]
5106pub struct DirectoryWatchResponder {
5107 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5108 tx_id: u32,
5109}
5110
5111impl std::ops::Drop for DirectoryWatchResponder {
5115 fn drop(&mut self) {
5116 self.control_handle.shutdown();
5117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5119 }
5120}
5121
5122impl fdomain_client::fidl::Responder for DirectoryWatchResponder {
5123 type ControlHandle = DirectoryControlHandle;
5124
5125 fn control_handle(&self) -> &DirectoryControlHandle {
5126 &self.control_handle
5127 }
5128
5129 fn drop_without_shutdown(mut self) {
5130 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5132 std::mem::forget(self);
5134 }
5135}
5136
5137impl DirectoryWatchResponder {
5138 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5142 let _result = self.send_raw(s);
5143 if _result.is_err() {
5144 self.control_handle.shutdown();
5145 }
5146 self.drop_without_shutdown();
5147 _result
5148 }
5149
5150 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5152 let _result = self.send_raw(s);
5153 self.drop_without_shutdown();
5154 _result
5155 }
5156
5157 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5158 self.control_handle.inner.send::<DirectoryWatchResponse>(
5159 (s,),
5160 self.tx_id,
5161 0x5717193a59d66d91,
5162 fidl::encoding::DynamicFlags::empty(),
5163 )
5164 }
5165}
5166
5167#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5168pub struct DirectoryWatcherMarker;
5169
5170impl fdomain_client::fidl::ProtocolMarker for DirectoryWatcherMarker {
5171 type Proxy = DirectoryWatcherProxy;
5172 type RequestStream = DirectoryWatcherRequestStream;
5173
5174 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
5175}
5176
5177pub trait DirectoryWatcherProxyInterface: Send + Sync {}
5178
5179#[derive(Debug, Clone)]
5180pub struct DirectoryWatcherProxy {
5181 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5182}
5183
5184impl fdomain_client::fidl::Proxy for DirectoryWatcherProxy {
5185 type Protocol = DirectoryWatcherMarker;
5186
5187 fn from_channel(inner: fdomain_client::Channel) -> Self {
5188 Self::new(inner)
5189 }
5190
5191 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5192 self.client.into_channel().map_err(|client| Self { client })
5193 }
5194
5195 fn as_channel(&self) -> &fdomain_client::Channel {
5196 self.client.as_channel()
5197 }
5198}
5199
5200impl DirectoryWatcherProxy {
5201 pub fn new(channel: fdomain_client::Channel) -> Self {
5203 let protocol_name =
5204 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5205 Self { client: fidl::client::Client::new(channel, protocol_name) }
5206 }
5207
5208 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
5214 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
5215 }
5216}
5217
5218impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
5219
5220pub struct DirectoryWatcherEventStream {
5221 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5222}
5223
5224impl std::marker::Unpin for DirectoryWatcherEventStream {}
5225
5226impl futures::stream::FusedStream for DirectoryWatcherEventStream {
5227 fn is_terminated(&self) -> bool {
5228 self.event_receiver.is_terminated()
5229 }
5230}
5231
5232impl futures::Stream for DirectoryWatcherEventStream {
5233 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
5234
5235 fn poll_next(
5236 mut self: std::pin::Pin<&mut Self>,
5237 cx: &mut std::task::Context<'_>,
5238 ) -> std::task::Poll<Option<Self::Item>> {
5239 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5240 &mut self.event_receiver,
5241 cx
5242 )?) {
5243 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
5244 None => std::task::Poll::Ready(None),
5245 }
5246 }
5247}
5248
5249#[derive(Debug)]
5250pub enum DirectoryWatcherEvent {}
5251
5252impl DirectoryWatcherEvent {
5253 fn decode(
5255 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5256 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
5257 let (bytes, _handles) = buf.split_mut();
5258 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5259 debug_assert_eq!(tx_header.tx_id, 0);
5260 match tx_header.ordinal {
5261 _ => Err(fidl::Error::UnknownOrdinal {
5262 ordinal: tx_header.ordinal,
5263 protocol_name:
5264 <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5265 }),
5266 }
5267 }
5268}
5269
5270pub struct DirectoryWatcherRequestStream {
5272 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5273 is_terminated: bool,
5274}
5275
5276impl std::marker::Unpin for DirectoryWatcherRequestStream {}
5277
5278impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
5279 fn is_terminated(&self) -> bool {
5280 self.is_terminated
5281 }
5282}
5283
5284impl fdomain_client::fidl::RequestStream for DirectoryWatcherRequestStream {
5285 type Protocol = DirectoryWatcherMarker;
5286 type ControlHandle = DirectoryWatcherControlHandle;
5287
5288 fn from_channel(channel: fdomain_client::Channel) -> Self {
5289 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5290 }
5291
5292 fn control_handle(&self) -> Self::ControlHandle {
5293 DirectoryWatcherControlHandle { inner: self.inner.clone() }
5294 }
5295
5296 fn into_inner(
5297 self,
5298 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5299 {
5300 (self.inner, self.is_terminated)
5301 }
5302
5303 fn from_inner(
5304 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5305 is_terminated: bool,
5306 ) -> Self {
5307 Self { inner, is_terminated }
5308 }
5309}
5310
5311impl futures::Stream for DirectoryWatcherRequestStream {
5312 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
5313
5314 fn poll_next(
5315 mut self: std::pin::Pin<&mut Self>,
5316 cx: &mut std::task::Context<'_>,
5317 ) -> std::task::Poll<Option<Self::Item>> {
5318 let this = &mut *self;
5319 if this.inner.check_shutdown(cx) {
5320 this.is_terminated = true;
5321 return std::task::Poll::Ready(None);
5322 }
5323 if this.is_terminated {
5324 panic!("polled DirectoryWatcherRequestStream after completion");
5325 }
5326 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5327 |bytes, handles| {
5328 match this.inner.channel().read_etc(cx, bytes, handles) {
5329 std::task::Poll::Ready(Ok(())) => {}
5330 std::task::Poll::Pending => return std::task::Poll::Pending,
5331 std::task::Poll::Ready(Err(None)) => {
5332 this.is_terminated = true;
5333 return std::task::Poll::Ready(None);
5334 }
5335 std::task::Poll::Ready(Err(Some(e))) => {
5336 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5337 e.into(),
5338 ))));
5339 }
5340 }
5341
5342 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5344
5345 std::task::Poll::Ready(Some(match header.ordinal {
5346 _ => Err(fidl::Error::UnknownOrdinal {
5347 ordinal: header.ordinal,
5348 protocol_name: <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5349 }),
5350 }))
5351 },
5352 )
5353 }
5354}
5355
5356#[derive(Debug)]
5374pub enum DirectoryWatcherRequest {}
5375
5376impl DirectoryWatcherRequest {
5377 pub fn method_name(&self) -> &'static str {
5379 match *self {}
5380 }
5381}
5382
5383#[derive(Debug, Clone)]
5384pub struct DirectoryWatcherControlHandle {
5385 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5386}
5387
5388impl fdomain_client::fidl::ControlHandle for DirectoryWatcherControlHandle {
5389 fn shutdown(&self) {
5390 self.inner.shutdown()
5391 }
5392
5393 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5394 self.inner.shutdown_with_epitaph(status)
5395 }
5396
5397 fn is_closed(&self) -> bool {
5398 self.inner.channel().is_closed()
5399 }
5400 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5401 self.inner.channel().on_closed()
5402 }
5403}
5404
5405impl DirectoryWatcherControlHandle {}
5406
5407#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5408pub struct ExtendedAttributeIteratorMarker;
5409
5410impl fdomain_client::fidl::ProtocolMarker for ExtendedAttributeIteratorMarker {
5411 type Proxy = ExtendedAttributeIteratorProxy;
5412 type RequestStream = ExtendedAttributeIteratorRequestStream;
5413
5414 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
5415}
5416pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
5417
5418pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
5419 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
5420 + Send;
5421 fn r#get_next(&self) -> Self::GetNextResponseFut;
5422}
5423
5424#[derive(Debug, Clone)]
5425pub struct ExtendedAttributeIteratorProxy {
5426 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5427}
5428
5429impl fdomain_client::fidl::Proxy for ExtendedAttributeIteratorProxy {
5430 type Protocol = ExtendedAttributeIteratorMarker;
5431
5432 fn from_channel(inner: fdomain_client::Channel) -> Self {
5433 Self::new(inner)
5434 }
5435
5436 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5437 self.client.into_channel().map_err(|client| Self { client })
5438 }
5439
5440 fn as_channel(&self) -> &fdomain_client::Channel {
5441 self.client.as_channel()
5442 }
5443}
5444
5445impl ExtendedAttributeIteratorProxy {
5446 pub fn new(channel: fdomain_client::Channel) -> Self {
5448 let protocol_name =
5449 <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5450 Self { client: fidl::client::Client::new(channel, protocol_name) }
5451 }
5452
5453 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
5459 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5460 }
5461
5462 pub fn r#get_next(
5466 &self,
5467 ) -> fidl::client::QueryResponseFut<
5468 ExtendedAttributeIteratorGetNextResult,
5469 fdomain_client::fidl::FDomainResourceDialect,
5470 > {
5471 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
5472 }
5473}
5474
5475impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
5476 type GetNextResponseFut = fidl::client::QueryResponseFut<
5477 ExtendedAttributeIteratorGetNextResult,
5478 fdomain_client::fidl::FDomainResourceDialect,
5479 >;
5480 fn r#get_next(&self) -> Self::GetNextResponseFut {
5481 fn _decode(
5482 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5483 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
5484 let _response = fidl::client::decode_transaction_body::<
5485 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
5486 fdomain_client::fidl::FDomainResourceDialect,
5487 0x3ba664a1c2e45a7,
5488 >(_buf?)?;
5489 Ok(_response.map(|x| (x.attributes, x.last)))
5490 }
5491 self.client.send_query_and_decode::<
5492 fidl::encoding::EmptyPayload,
5493 ExtendedAttributeIteratorGetNextResult,
5494 >(
5495 (),
5496 0x3ba664a1c2e45a7,
5497 fidl::encoding::DynamicFlags::empty(),
5498 _decode,
5499 )
5500 }
5501}
5502
5503pub struct ExtendedAttributeIteratorEventStream {
5504 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5505}
5506
5507impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
5508
5509impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
5510 fn is_terminated(&self) -> bool {
5511 self.event_receiver.is_terminated()
5512 }
5513}
5514
5515impl futures::Stream for ExtendedAttributeIteratorEventStream {
5516 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
5517
5518 fn poll_next(
5519 mut self: std::pin::Pin<&mut Self>,
5520 cx: &mut std::task::Context<'_>,
5521 ) -> std::task::Poll<Option<Self::Item>> {
5522 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5523 &mut self.event_receiver,
5524 cx
5525 )?) {
5526 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
5527 None => std::task::Poll::Ready(None),
5528 }
5529 }
5530}
5531
5532#[derive(Debug)]
5533pub enum ExtendedAttributeIteratorEvent {}
5534
5535impl ExtendedAttributeIteratorEvent {
5536 fn decode(
5538 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5539 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
5540 let (bytes, _handles) = buf.split_mut();
5541 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5542 debug_assert_eq!(tx_header.tx_id, 0);
5543 match tx_header.ordinal {
5544 _ => Err(fidl::Error::UnknownOrdinal {
5545 ordinal: tx_header.ordinal,
5546 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5547 })
5548 }
5549 }
5550}
5551
5552pub struct ExtendedAttributeIteratorRequestStream {
5554 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5555 is_terminated: bool,
5556}
5557
5558impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
5559
5560impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
5561 fn is_terminated(&self) -> bool {
5562 self.is_terminated
5563 }
5564}
5565
5566impl fdomain_client::fidl::RequestStream for ExtendedAttributeIteratorRequestStream {
5567 type Protocol = ExtendedAttributeIteratorMarker;
5568 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5569
5570 fn from_channel(channel: fdomain_client::Channel) -> Self {
5571 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5572 }
5573
5574 fn control_handle(&self) -> Self::ControlHandle {
5575 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
5576 }
5577
5578 fn into_inner(
5579 self,
5580 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5581 {
5582 (self.inner, self.is_terminated)
5583 }
5584
5585 fn from_inner(
5586 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5587 is_terminated: bool,
5588 ) -> Self {
5589 Self { inner, is_terminated }
5590 }
5591}
5592
5593impl futures::Stream for ExtendedAttributeIteratorRequestStream {
5594 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
5595
5596 fn poll_next(
5597 mut self: std::pin::Pin<&mut Self>,
5598 cx: &mut std::task::Context<'_>,
5599 ) -> std::task::Poll<Option<Self::Item>> {
5600 let this = &mut *self;
5601 if this.inner.check_shutdown(cx) {
5602 this.is_terminated = true;
5603 return std::task::Poll::Ready(None);
5604 }
5605 if this.is_terminated {
5606 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
5607 }
5608 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5609 |bytes, handles| {
5610 match this.inner.channel().read_etc(cx, bytes, handles) {
5611 std::task::Poll::Ready(Ok(())) => {}
5612 std::task::Poll::Pending => return std::task::Poll::Pending,
5613 std::task::Poll::Ready(Err(None)) => {
5614 this.is_terminated = true;
5615 return std::task::Poll::Ready(None);
5616 }
5617 std::task::Poll::Ready(Err(Some(e))) => {
5618 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5619 e.into(),
5620 ))));
5621 }
5622 }
5623
5624 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5626
5627 std::task::Poll::Ready(Some(match header.ordinal {
5628 0x3ba664a1c2e45a7 => {
5629 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5630 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
5631 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5632 let control_handle = ExtendedAttributeIteratorControlHandle {
5633 inner: this.inner.clone(),
5634 };
5635 Ok(ExtendedAttributeIteratorRequest::GetNext {
5636 responder: ExtendedAttributeIteratorGetNextResponder {
5637 control_handle: std::mem::ManuallyDrop::new(control_handle),
5638 tx_id: header.tx_id,
5639 },
5640 })
5641 }
5642 _ => Err(fidl::Error::UnknownOrdinal {
5643 ordinal: header.ordinal,
5644 protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5645 }),
5646 }))
5647 },
5648 )
5649 }
5650}
5651
5652#[derive(Debug)]
5653pub enum ExtendedAttributeIteratorRequest {
5654 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
5658}
5659
5660impl ExtendedAttributeIteratorRequest {
5661 #[allow(irrefutable_let_patterns)]
5662 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
5663 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
5664 Some((responder))
5665 } else {
5666 None
5667 }
5668 }
5669
5670 pub fn method_name(&self) -> &'static str {
5672 match *self {
5673 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
5674 }
5675 }
5676}
5677
5678#[derive(Debug, Clone)]
5679pub struct ExtendedAttributeIteratorControlHandle {
5680 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5681}
5682
5683impl fdomain_client::fidl::ControlHandle for ExtendedAttributeIteratorControlHandle {
5684 fn shutdown(&self) {
5685 self.inner.shutdown()
5686 }
5687
5688 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5689 self.inner.shutdown_with_epitaph(status)
5690 }
5691
5692 fn is_closed(&self) -> bool {
5693 self.inner.channel().is_closed()
5694 }
5695 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5696 self.inner.channel().on_closed()
5697 }
5698}
5699
5700impl ExtendedAttributeIteratorControlHandle {}
5701
5702#[must_use = "FIDL methods require a response to be sent"]
5703#[derive(Debug)]
5704pub struct ExtendedAttributeIteratorGetNextResponder {
5705 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
5706 tx_id: u32,
5707}
5708
5709impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
5713 fn drop(&mut self) {
5714 self.control_handle.shutdown();
5715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5717 }
5718}
5719
5720impl fdomain_client::fidl::Responder for ExtendedAttributeIteratorGetNextResponder {
5721 type ControlHandle = ExtendedAttributeIteratorControlHandle;
5722
5723 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
5724 &self.control_handle
5725 }
5726
5727 fn drop_without_shutdown(mut self) {
5728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5730 std::mem::forget(self);
5732 }
5733}
5734
5735impl ExtendedAttributeIteratorGetNextResponder {
5736 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5740 let _result = self.send_raw(result);
5741 if _result.is_err() {
5742 self.control_handle.shutdown();
5743 }
5744 self.drop_without_shutdown();
5745 _result
5746 }
5747
5748 pub fn send_no_shutdown_on_err(
5750 self,
5751 mut result: Result<(&[Vec<u8>], bool), i32>,
5752 ) -> Result<(), fidl::Error> {
5753 let _result = self.send_raw(result);
5754 self.drop_without_shutdown();
5755 _result
5756 }
5757
5758 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5759 self.control_handle.inner.send::<fidl::encoding::ResultType<
5760 ExtendedAttributeIteratorGetNextResponse,
5761 i32,
5762 >>(
5763 result,
5764 self.tx_id,
5765 0x3ba664a1c2e45a7,
5766 fidl::encoding::DynamicFlags::empty(),
5767 )
5768 }
5769}
5770
5771#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5772pub struct FileMarker;
5773
5774impl fdomain_client::fidl::ProtocolMarker for FileMarker {
5775 type Proxy = FileProxy;
5776 type RequestStream = FileRequestStream;
5777
5778 const DEBUG_NAME: &'static str = "fuchsia.io.File";
5779}
5780impl fdomain_client::fidl::DiscoverableProtocolMarker for FileMarker {}
5781pub type FileSeekResult = Result<u64, i32>;
5782pub type FileReadAtResult = Result<Vec<u8>, i32>;
5783pub type FileWriteAtResult = Result<u64, i32>;
5784pub type FileResizeResult = Result<(), i32>;
5785pub type FileGetBackingMemoryResult = Result<fdomain_client::Vmo, i32>;
5786pub type FileAllocateResult = Result<(), i32>;
5787pub type FileEnableVerityResult = Result<(), i32>;
5788
5789pub trait FileProxyInterface: Send + Sync {
5790 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
5791 + Send;
5792 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
5793 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
5794 + Send;
5795 fn r#link_into(
5796 &self,
5797 dst_parent_token: fdomain_client::Event,
5798 dst: &str,
5799 ) -> Self::LinkIntoResponseFut;
5800 fn r#clone(
5801 &self,
5802 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5803 ) -> Result<(), fidl::Error>;
5804 type CloseResponseFut: std::future::Future<
5805 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
5806 > + Send;
5807 fn r#close(&self) -> Self::CloseResponseFut;
5808 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
5809 fn r#query(&self) -> Self::QueryResponseFut;
5810 fn r#deprecated_clone(
5811 &self,
5812 flags: OpenFlags,
5813 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
5814 ) -> Result<(), fidl::Error>;
5815 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
5816 + Send;
5817 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
5818 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
5819 fn r#deprecated_set_attr(
5820 &self,
5821 flags: NodeAttributeFlags,
5822 attributes: &NodeAttributes,
5823 ) -> Self::DeprecatedSetAttrResponseFut;
5824 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
5825 + Send;
5826 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
5827 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
5828 + Send;
5829 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
5830 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
5831 + Send;
5832 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
5833 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
5834 + Send;
5835 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
5836 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
5837 + Send;
5838 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
5839 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
5840 + Send;
5841 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
5842 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
5843 + Send;
5844 fn r#update_attributes(
5845 &self,
5846 payload: &MutableNodeAttributes,
5847 ) -> Self::UpdateAttributesResponseFut;
5848 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
5849 fn r#sync(&self) -> Self::SyncResponseFut;
5850 fn r#list_extended_attributes(
5851 &self,
5852 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
5853 ) -> Result<(), fidl::Error>;
5854 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
5855 + Send;
5856 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
5857 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
5858 + Send;
5859 fn r#set_extended_attribute(
5860 &self,
5861 name: &[u8],
5862 value: ExtendedAttributeValue,
5863 mode: SetExtendedAttributeMode,
5864 ) -> Self::SetExtendedAttributeResponseFut;
5865 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
5866 + Send;
5867 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
5868 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
5869 + Send;
5870 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
5871 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
5872 + Send;
5873 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
5874 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
5875 fn r#describe(&self) -> Self::DescribeResponseFut;
5876 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
5877 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
5878 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
5879 + Send;
5880 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
5881 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
5882 + Send;
5883 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
5884 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
5885 + Send;
5886 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
5887 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
5888 + Send;
5889 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
5890 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
5891 + Send;
5892 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
5893 -> Self::AllocateResponseFut;
5894 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
5895 + Send;
5896 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
5897}
5898
5899#[derive(Debug, Clone)]
5900pub struct FileProxy {
5901 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5902}
5903
5904impl fdomain_client::fidl::Proxy for FileProxy {
5905 type Protocol = FileMarker;
5906
5907 fn from_channel(inner: fdomain_client::Channel) -> Self {
5908 Self::new(inner)
5909 }
5910
5911 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5912 self.client.into_channel().map_err(|client| Self { client })
5913 }
5914
5915 fn as_channel(&self) -> &fdomain_client::Channel {
5916 self.client.as_channel()
5917 }
5918}
5919
5920impl FileProxy {
5921 pub fn new(channel: fdomain_client::Channel) -> Self {
5923 let protocol_name = <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5924 Self { client: fidl::client::Client::new(channel, protocol_name) }
5925 }
5926
5927 pub fn take_event_stream(&self) -> FileEventStream {
5933 FileEventStream { event_receiver: self.client.take_event_receiver() }
5934 }
5935
5936 pub fn r#advisory_lock(
5960 &self,
5961 mut request: &AdvisoryLockRequest,
5962 ) -> fidl::client::QueryResponseFut<
5963 AdvisoryLockingAdvisoryLockResult,
5964 fdomain_client::fidl::FDomainResourceDialect,
5965 > {
5966 FileProxyInterface::r#advisory_lock(self, request)
5967 }
5968
5969 pub fn r#link_into(
5992 &self,
5993 mut dst_parent_token: fdomain_client::Event,
5994 mut dst: &str,
5995 ) -> fidl::client::QueryResponseFut<
5996 LinkableLinkIntoResult,
5997 fdomain_client::fidl::FDomainResourceDialect,
5998 > {
5999 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
6000 }
6001
6002 pub fn r#clone(
6003 &self,
6004 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6005 ) -> Result<(), fidl::Error> {
6006 FileProxyInterface::r#clone(self, request)
6007 }
6008
6009 pub fn r#close(
6020 &self,
6021 ) -> fidl::client::QueryResponseFut<
6022 fdomain_fuchsia_unknown::CloseableCloseResult,
6023 fdomain_client::fidl::FDomainResourceDialect,
6024 > {
6025 FileProxyInterface::r#close(self)
6026 }
6027
6028 pub fn r#query(
6029 &self,
6030 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
6031 FileProxyInterface::r#query(self)
6032 }
6033
6034 pub fn r#deprecated_clone(
6036 &self,
6037 mut flags: OpenFlags,
6038 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6039 ) -> Result<(), fidl::Error> {
6040 FileProxyInterface::r#deprecated_clone(self, flags, object)
6041 }
6042
6043 pub fn r#deprecated_get_attr(
6045 &self,
6046 ) -> fidl::client::QueryResponseFut<
6047 (i32, NodeAttributes),
6048 fdomain_client::fidl::FDomainResourceDialect,
6049 > {
6050 FileProxyInterface::r#deprecated_get_attr(self)
6051 }
6052
6053 pub fn r#deprecated_set_attr(
6055 &self,
6056 mut flags: NodeAttributeFlags,
6057 mut attributes: &NodeAttributes,
6058 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6059 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
6060 }
6061
6062 pub fn r#deprecated_get_flags(
6064 &self,
6065 ) -> fidl::client::QueryResponseFut<
6066 (i32, OpenFlags),
6067 fdomain_client::fidl::FDomainResourceDialect,
6068 > {
6069 FileProxyInterface::r#deprecated_get_flags(self)
6070 }
6071
6072 pub fn r#deprecated_set_flags(
6074 &self,
6075 mut flags: OpenFlags,
6076 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6077 FileProxyInterface::r#deprecated_set_flags(self, flags)
6078 }
6079
6080 pub fn r#get_flags(
6089 &self,
6090 ) -> fidl::client::QueryResponseFut<
6091 NodeGetFlagsResult,
6092 fdomain_client::fidl::FDomainResourceDialect,
6093 > {
6094 FileProxyInterface::r#get_flags(self)
6095 }
6096
6097 pub fn r#set_flags(
6107 &self,
6108 mut flags: Flags,
6109 ) -> fidl::client::QueryResponseFut<
6110 NodeSetFlagsResult,
6111 fdomain_client::fidl::FDomainResourceDialect,
6112 > {
6113 FileProxyInterface::r#set_flags(self, flags)
6114 }
6115
6116 pub fn r#query_filesystem(
6120 &self,
6121 ) -> fidl::client::QueryResponseFut<
6122 (i32, Option<Box<FilesystemInfo>>),
6123 fdomain_client::fidl::FDomainResourceDialect,
6124 > {
6125 FileProxyInterface::r#query_filesystem(self)
6126 }
6127
6128 pub fn r#get_attributes(
6142 &self,
6143 mut query: NodeAttributesQuery,
6144 ) -> fidl::client::QueryResponseFut<
6145 NodeGetAttributesResult,
6146 fdomain_client::fidl::FDomainResourceDialect,
6147 > {
6148 FileProxyInterface::r#get_attributes(self, query)
6149 }
6150
6151 pub fn r#update_attributes(
6160 &self,
6161 mut payload: &MutableNodeAttributes,
6162 ) -> fidl::client::QueryResponseFut<
6163 NodeUpdateAttributesResult,
6164 fdomain_client::fidl::FDomainResourceDialect,
6165 > {
6166 FileProxyInterface::r#update_attributes(self, payload)
6167 }
6168
6169 pub fn r#sync(
6179 &self,
6180 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
6181 {
6182 FileProxyInterface::r#sync(self)
6183 }
6184
6185 pub fn r#list_extended_attributes(
6194 &self,
6195 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6196 ) -> Result<(), fidl::Error> {
6197 FileProxyInterface::r#list_extended_attributes(self, iterator)
6198 }
6199
6200 pub fn r#get_extended_attribute(
6207 &self,
6208 mut name: &[u8],
6209 ) -> fidl::client::QueryResponseFut<
6210 NodeGetExtendedAttributeResult,
6211 fdomain_client::fidl::FDomainResourceDialect,
6212 > {
6213 FileProxyInterface::r#get_extended_attribute(self, name)
6214 }
6215
6216 pub fn r#set_extended_attribute(
6224 &self,
6225 mut name: &[u8],
6226 mut value: ExtendedAttributeValue,
6227 mut mode: SetExtendedAttributeMode,
6228 ) -> fidl::client::QueryResponseFut<
6229 NodeSetExtendedAttributeResult,
6230 fdomain_client::fidl::FDomainResourceDialect,
6231 > {
6232 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
6233 }
6234
6235 pub fn r#remove_extended_attribute(
6241 &self,
6242 mut name: &[u8],
6243 ) -> fidl::client::QueryResponseFut<
6244 NodeRemoveExtendedAttributeResult,
6245 fdomain_client::fidl::FDomainResourceDialect,
6246 > {
6247 FileProxyInterface::r#remove_extended_attribute(self, name)
6248 }
6249
6250 pub fn r#read(
6269 &self,
6270 mut count: u64,
6271 ) -> fidl::client::QueryResponseFut<
6272 ReadableReadResult,
6273 fdomain_client::fidl::FDomainResourceDialect,
6274 > {
6275 FileProxyInterface::r#read(self, count)
6276 }
6277
6278 pub fn r#write(
6302 &self,
6303 mut data: &[u8],
6304 ) -> fidl::client::QueryResponseFut<
6305 WritableWriteResult,
6306 fdomain_client::fidl::FDomainResourceDialect,
6307 > {
6308 FileProxyInterface::r#write(self, data)
6309 }
6310
6311 pub fn r#describe(
6312 &self,
6313 ) -> fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
6314 {
6315 FileProxyInterface::r#describe(self)
6316 }
6317
6318 pub fn r#seek(
6328 &self,
6329 mut origin: SeekOrigin,
6330 mut offset: i64,
6331 ) -> fidl::client::QueryResponseFut<FileSeekResult, fdomain_client::fidl::FDomainResourceDialect>
6332 {
6333 FileProxyInterface::r#seek(self, origin, offset)
6334 }
6335
6336 pub fn r#read_at(
6354 &self,
6355 mut count: u64,
6356 mut offset: u64,
6357 ) -> fidl::client::QueryResponseFut<
6358 FileReadAtResult,
6359 fdomain_client::fidl::FDomainResourceDialect,
6360 > {
6361 FileProxyInterface::r#read_at(self, count, offset)
6362 }
6363
6364 pub fn r#write_at(
6386 &self,
6387 mut data: &[u8],
6388 mut offset: u64,
6389 ) -> fidl::client::QueryResponseFut<
6390 FileWriteAtResult,
6391 fdomain_client::fidl::FDomainResourceDialect,
6392 > {
6393 FileProxyInterface::r#write_at(self, data, offset)
6394 }
6395
6396 pub fn r#resize(
6405 &self,
6406 mut length: u64,
6407 ) -> fidl::client::QueryResponseFut<
6408 FileResizeResult,
6409 fdomain_client::fidl::FDomainResourceDialect,
6410 > {
6411 FileProxyInterface::r#resize(self, length)
6412 }
6413
6414 pub fn r#get_backing_memory(
6435 &self,
6436 mut flags: VmoFlags,
6437 ) -> fidl::client::QueryResponseFut<
6438 FileGetBackingMemoryResult,
6439 fdomain_client::fidl::FDomainResourceDialect,
6440 > {
6441 FileProxyInterface::r#get_backing_memory(self, flags)
6442 }
6443
6444 pub fn r#allocate(
6446 &self,
6447 mut offset: u64,
6448 mut length: u64,
6449 mut mode: AllocateMode,
6450 ) -> fidl::client::QueryResponseFut<
6451 FileAllocateResult,
6452 fdomain_client::fidl::FDomainResourceDialect,
6453 > {
6454 FileProxyInterface::r#allocate(self, offset, length, mode)
6455 }
6456
6457 pub fn r#enable_verity(
6469 &self,
6470 mut options: &VerificationOptions,
6471 ) -> fidl::client::QueryResponseFut<
6472 FileEnableVerityResult,
6473 fdomain_client::fidl::FDomainResourceDialect,
6474 > {
6475 FileProxyInterface::r#enable_verity(self, options)
6476 }
6477}
6478
6479impl FileProxyInterface for FileProxy {
6480 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
6481 AdvisoryLockingAdvisoryLockResult,
6482 fdomain_client::fidl::FDomainResourceDialect,
6483 >;
6484 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
6485 fn _decode(
6486 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6487 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6488 let _response = fidl::client::decode_transaction_body::<
6489 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6490 fdomain_client::fidl::FDomainResourceDialect,
6491 0x6ee9c0ad53ec87aa,
6492 >(_buf?)?;
6493 Ok(_response.map(|x| x))
6494 }
6495 self.client.send_query_and_decode::<
6496 AdvisoryLockingAdvisoryLockRequest,
6497 AdvisoryLockingAdvisoryLockResult,
6498 >(
6499 (request,),
6500 0x6ee9c0ad53ec87aa,
6501 fidl::encoding::DynamicFlags::empty(),
6502 _decode,
6503 )
6504 }
6505
6506 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
6507 LinkableLinkIntoResult,
6508 fdomain_client::fidl::FDomainResourceDialect,
6509 >;
6510 fn r#link_into(
6511 &self,
6512 mut dst_parent_token: fdomain_client::Event,
6513 mut dst: &str,
6514 ) -> Self::LinkIntoResponseFut {
6515 fn _decode(
6516 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6517 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
6518 let _response = fidl::client::decode_transaction_body::<
6519 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6520 fdomain_client::fidl::FDomainResourceDialect,
6521 0x54f3949246a03e74,
6522 >(_buf?)?;
6523 Ok(_response.map(|x| x))
6524 }
6525 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
6526 (dst_parent_token, dst),
6527 0x54f3949246a03e74,
6528 fidl::encoding::DynamicFlags::empty(),
6529 _decode,
6530 )
6531 }
6532
6533 fn r#clone(
6534 &self,
6535 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6536 ) -> Result<(), fidl::Error> {
6537 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
6538 (request,),
6539 0x20d8a7aba2168a79,
6540 fidl::encoding::DynamicFlags::empty(),
6541 )
6542 }
6543
6544 type CloseResponseFut = fidl::client::QueryResponseFut<
6545 fdomain_fuchsia_unknown::CloseableCloseResult,
6546 fdomain_client::fidl::FDomainResourceDialect,
6547 >;
6548 fn r#close(&self) -> Self::CloseResponseFut {
6549 fn _decode(
6550 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6551 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
6552 let _response = fidl::client::decode_transaction_body::<
6553 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6554 fdomain_client::fidl::FDomainResourceDialect,
6555 0x5ac5d459ad7f657e,
6556 >(_buf?)?;
6557 Ok(_response.map(|x| x))
6558 }
6559 self.client.send_query_and_decode::<
6560 fidl::encoding::EmptyPayload,
6561 fdomain_fuchsia_unknown::CloseableCloseResult,
6562 >(
6563 (),
6564 0x5ac5d459ad7f657e,
6565 fidl::encoding::DynamicFlags::empty(),
6566 _decode,
6567 )
6568 }
6569
6570 type QueryResponseFut =
6571 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
6572 fn r#query(&self) -> Self::QueryResponseFut {
6573 fn _decode(
6574 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6575 ) -> Result<Vec<u8>, fidl::Error> {
6576 let _response = fidl::client::decode_transaction_body::<
6577 fdomain_fuchsia_unknown::QueryableQueryResponse,
6578 fdomain_client::fidl::FDomainResourceDialect,
6579 0x2658edee9decfc06,
6580 >(_buf?)?;
6581 Ok(_response.protocol)
6582 }
6583 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
6584 (),
6585 0x2658edee9decfc06,
6586 fidl::encoding::DynamicFlags::empty(),
6587 _decode,
6588 )
6589 }
6590
6591 fn r#deprecated_clone(
6592 &self,
6593 mut flags: OpenFlags,
6594 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6595 ) -> Result<(), fidl::Error> {
6596 self.client.send::<NodeDeprecatedCloneRequest>(
6597 (flags, object),
6598 0x5a61678f293ce16f,
6599 fidl::encoding::DynamicFlags::FLEXIBLE,
6600 )
6601 }
6602
6603 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
6604 (i32, NodeAttributes),
6605 fdomain_client::fidl::FDomainResourceDialect,
6606 >;
6607 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
6608 fn _decode(
6609 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6610 ) -> Result<(i32, NodeAttributes), fidl::Error> {
6611 let _response = fidl::client::decode_transaction_body::<
6612 NodeDeprecatedGetAttrResponse,
6613 fdomain_client::fidl::FDomainResourceDialect,
6614 0x78985e216314dafd,
6615 >(_buf?)?;
6616 Ok((_response.s, _response.attributes))
6617 }
6618 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
6619 (),
6620 0x78985e216314dafd,
6621 fidl::encoding::DynamicFlags::empty(),
6622 _decode,
6623 )
6624 }
6625
6626 type DeprecatedSetAttrResponseFut =
6627 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6628 fn r#deprecated_set_attr(
6629 &self,
6630 mut flags: NodeAttributeFlags,
6631 mut attributes: &NodeAttributes,
6632 ) -> Self::DeprecatedSetAttrResponseFut {
6633 fn _decode(
6634 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6635 ) -> Result<i32, fidl::Error> {
6636 let _response = fidl::client::decode_transaction_body::<
6637 NodeDeprecatedSetAttrResponse,
6638 fdomain_client::fidl::FDomainResourceDialect,
6639 0x4186c0f40d938f46,
6640 >(_buf?)?;
6641 Ok(_response.s)
6642 }
6643 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
6644 (flags, attributes),
6645 0x4186c0f40d938f46,
6646 fidl::encoding::DynamicFlags::empty(),
6647 _decode,
6648 )
6649 }
6650
6651 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
6652 (i32, OpenFlags),
6653 fdomain_client::fidl::FDomainResourceDialect,
6654 >;
6655 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
6656 fn _decode(
6657 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6658 ) -> Result<(i32, OpenFlags), fidl::Error> {
6659 let _response = fidl::client::decode_transaction_body::<
6660 NodeDeprecatedGetFlagsResponse,
6661 fdomain_client::fidl::FDomainResourceDialect,
6662 0x5b88fffb8eda3aa1,
6663 >(_buf?)?;
6664 Ok((_response.s, _response.flags))
6665 }
6666 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
6667 (),
6668 0x5b88fffb8eda3aa1,
6669 fidl::encoding::DynamicFlags::empty(),
6670 _decode,
6671 )
6672 }
6673
6674 type DeprecatedSetFlagsResponseFut =
6675 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6676 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
6677 fn _decode(
6678 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6679 ) -> Result<i32, fidl::Error> {
6680 let _response = fidl::client::decode_transaction_body::<
6681 NodeDeprecatedSetFlagsResponse,
6682 fdomain_client::fidl::FDomainResourceDialect,
6683 0x5295b76c71fde733,
6684 >(_buf?)?;
6685 Ok(_response.s)
6686 }
6687 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
6688 (flags,),
6689 0x5295b76c71fde733,
6690 fidl::encoding::DynamicFlags::empty(),
6691 _decode,
6692 )
6693 }
6694
6695 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
6696 NodeGetFlagsResult,
6697 fdomain_client::fidl::FDomainResourceDialect,
6698 >;
6699 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
6700 fn _decode(
6701 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6702 ) -> Result<NodeGetFlagsResult, fidl::Error> {
6703 let _response = fidl::client::decode_transaction_body::<
6704 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
6705 fdomain_client::fidl::FDomainResourceDialect,
6706 0x176eb318f64ec23,
6707 >(_buf?)?
6708 .into_result_fdomain::<FileMarker>("get_flags")?;
6709 Ok(_response.map(|x| x.flags))
6710 }
6711 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
6712 (),
6713 0x176eb318f64ec23,
6714 fidl::encoding::DynamicFlags::FLEXIBLE,
6715 _decode,
6716 )
6717 }
6718
6719 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
6720 NodeSetFlagsResult,
6721 fdomain_client::fidl::FDomainResourceDialect,
6722 >;
6723 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
6724 fn _decode(
6725 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6726 ) -> Result<NodeSetFlagsResult, fidl::Error> {
6727 let _response = fidl::client::decode_transaction_body::<
6728 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
6729 fdomain_client::fidl::FDomainResourceDialect,
6730 0x55a8028685791ea8,
6731 >(_buf?)?
6732 .into_result_fdomain::<FileMarker>("set_flags")?;
6733 Ok(_response.map(|x| x))
6734 }
6735 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
6736 (flags,),
6737 0x55a8028685791ea8,
6738 fidl::encoding::DynamicFlags::FLEXIBLE,
6739 _decode,
6740 )
6741 }
6742
6743 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
6744 (i32, Option<Box<FilesystemInfo>>),
6745 fdomain_client::fidl::FDomainResourceDialect,
6746 >;
6747 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
6748 fn _decode(
6749 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6750 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
6751 let _response = fidl::client::decode_transaction_body::<
6752 NodeQueryFilesystemResponse,
6753 fdomain_client::fidl::FDomainResourceDialect,
6754 0x6f344a1c6b0a0610,
6755 >(_buf?)?;
6756 Ok((_response.s, _response.info))
6757 }
6758 self.client.send_query_and_decode::<
6759 fidl::encoding::EmptyPayload,
6760 (i32, Option<Box<FilesystemInfo>>),
6761 >(
6762 (),
6763 0x6f344a1c6b0a0610,
6764 fidl::encoding::DynamicFlags::empty(),
6765 _decode,
6766 )
6767 }
6768
6769 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
6770 NodeGetAttributesResult,
6771 fdomain_client::fidl::FDomainResourceDialect,
6772 >;
6773 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
6774 fn _decode(
6775 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6776 ) -> Result<NodeGetAttributesResult, fidl::Error> {
6777 let _response = fidl::client::decode_transaction_body::<
6778 fidl::encoding::ResultType<NodeAttributes2, i32>,
6779 fdomain_client::fidl::FDomainResourceDialect,
6780 0x3d4396a638ea053b,
6781 >(_buf?)?;
6782 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
6783 }
6784 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
6785 (query,),
6786 0x3d4396a638ea053b,
6787 fidl::encoding::DynamicFlags::empty(),
6788 _decode,
6789 )
6790 }
6791
6792 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
6793 NodeUpdateAttributesResult,
6794 fdomain_client::fidl::FDomainResourceDialect,
6795 >;
6796 fn r#update_attributes(
6797 &self,
6798 mut payload: &MutableNodeAttributes,
6799 ) -> Self::UpdateAttributesResponseFut {
6800 fn _decode(
6801 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6802 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
6803 let _response = fidl::client::decode_transaction_body::<
6804 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6805 fdomain_client::fidl::FDomainResourceDialect,
6806 0x3308c1da5a89bf08,
6807 >(_buf?)?;
6808 Ok(_response.map(|x| x))
6809 }
6810 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
6811 payload,
6812 0x3308c1da5a89bf08,
6813 fidl::encoding::DynamicFlags::empty(),
6814 _decode,
6815 )
6816 }
6817
6818 type SyncResponseFut = fidl::client::QueryResponseFut<
6819 NodeSyncResult,
6820 fdomain_client::fidl::FDomainResourceDialect,
6821 >;
6822 fn r#sync(&self) -> Self::SyncResponseFut {
6823 fn _decode(
6824 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6825 ) -> Result<NodeSyncResult, fidl::Error> {
6826 let _response = fidl::client::decode_transaction_body::<
6827 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6828 fdomain_client::fidl::FDomainResourceDialect,
6829 0x2c5c27ca0ab5dc49,
6830 >(_buf?)?;
6831 Ok(_response.map(|x| x))
6832 }
6833 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
6834 (),
6835 0x2c5c27ca0ab5dc49,
6836 fidl::encoding::DynamicFlags::empty(),
6837 _decode,
6838 )
6839 }
6840
6841 fn r#list_extended_attributes(
6842 &self,
6843 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6844 ) -> Result<(), fidl::Error> {
6845 self.client.send::<NodeListExtendedAttributesRequest>(
6846 (iterator,),
6847 0x4b61033de007fcd0,
6848 fidl::encoding::DynamicFlags::empty(),
6849 )
6850 }
6851
6852 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6853 NodeGetExtendedAttributeResult,
6854 fdomain_client::fidl::FDomainResourceDialect,
6855 >;
6856 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
6857 fn _decode(
6858 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6859 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
6860 let _response = fidl::client::decode_transaction_body::<
6861 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
6862 fdomain_client::fidl::FDomainResourceDialect,
6863 0x45ffa3ccfdeb76db,
6864 >(_buf?)?;
6865 Ok(_response.map(|x| x))
6866 }
6867 self.client.send_query_and_decode::<
6868 NodeGetExtendedAttributeRequest,
6869 NodeGetExtendedAttributeResult,
6870 >(
6871 (name,),
6872 0x45ffa3ccfdeb76db,
6873 fidl::encoding::DynamicFlags::empty(),
6874 _decode,
6875 )
6876 }
6877
6878 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6879 NodeSetExtendedAttributeResult,
6880 fdomain_client::fidl::FDomainResourceDialect,
6881 >;
6882 fn r#set_extended_attribute(
6883 &self,
6884 mut name: &[u8],
6885 mut value: ExtendedAttributeValue,
6886 mut mode: SetExtendedAttributeMode,
6887 ) -> Self::SetExtendedAttributeResponseFut {
6888 fn _decode(
6889 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6890 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
6891 let _response = fidl::client::decode_transaction_body::<
6892 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6893 fdomain_client::fidl::FDomainResourceDialect,
6894 0x4a951362f681f23c,
6895 >(_buf?)?;
6896 Ok(_response.map(|x| x))
6897 }
6898 self.client.send_query_and_decode::<
6899 NodeSetExtendedAttributeRequest,
6900 NodeSetExtendedAttributeResult,
6901 >(
6902 (name, &mut value, mode,),
6903 0x4a951362f681f23c,
6904 fidl::encoding::DynamicFlags::empty(),
6905 _decode,
6906 )
6907 }
6908
6909 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6910 NodeRemoveExtendedAttributeResult,
6911 fdomain_client::fidl::FDomainResourceDialect,
6912 >;
6913 fn r#remove_extended_attribute(
6914 &self,
6915 mut name: &[u8],
6916 ) -> Self::RemoveExtendedAttributeResponseFut {
6917 fn _decode(
6918 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6919 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
6920 let _response = fidl::client::decode_transaction_body::<
6921 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6922 fdomain_client::fidl::FDomainResourceDialect,
6923 0x7a0b9f3a9bf9032d,
6924 >(_buf?)?;
6925 Ok(_response.map(|x| x))
6926 }
6927 self.client.send_query_and_decode::<
6928 NodeRemoveExtendedAttributeRequest,
6929 NodeRemoveExtendedAttributeResult,
6930 >(
6931 (name,),
6932 0x7a0b9f3a9bf9032d,
6933 fidl::encoding::DynamicFlags::empty(),
6934 _decode,
6935 )
6936 }
6937
6938 type ReadResponseFut = fidl::client::QueryResponseFut<
6939 ReadableReadResult,
6940 fdomain_client::fidl::FDomainResourceDialect,
6941 >;
6942 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
6943 fn _decode(
6944 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6945 ) -> Result<ReadableReadResult, fidl::Error> {
6946 let _response = fidl::client::decode_transaction_body::<
6947 fidl::encoding::ResultType<ReadableReadResponse, i32>,
6948 fdomain_client::fidl::FDomainResourceDialect,
6949 0x57e419a298c8ede,
6950 >(_buf?)?;
6951 Ok(_response.map(|x| x.data))
6952 }
6953 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
6954 (count,),
6955 0x57e419a298c8ede,
6956 fidl::encoding::DynamicFlags::empty(),
6957 _decode,
6958 )
6959 }
6960
6961 type WriteResponseFut = fidl::client::QueryResponseFut<
6962 WritableWriteResult,
6963 fdomain_client::fidl::FDomainResourceDialect,
6964 >;
6965 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
6966 fn _decode(
6967 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6968 ) -> Result<WritableWriteResult, fidl::Error> {
6969 let _response = fidl::client::decode_transaction_body::<
6970 fidl::encoding::ResultType<WritableWriteResponse, i32>,
6971 fdomain_client::fidl::FDomainResourceDialect,
6972 0x6a31437832469f82,
6973 >(_buf?)?;
6974 Ok(_response.map(|x| x.actual_count))
6975 }
6976 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
6977 (data,),
6978 0x6a31437832469f82,
6979 fidl::encoding::DynamicFlags::empty(),
6980 _decode,
6981 )
6982 }
6983
6984 type DescribeResponseFut =
6985 fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>;
6986 fn r#describe(&self) -> Self::DescribeResponseFut {
6987 fn _decode(
6988 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6989 ) -> Result<FileInfo, fidl::Error> {
6990 let _response = fidl::client::decode_transaction_body::<
6991 FileInfo,
6992 fdomain_client::fidl::FDomainResourceDialect,
6993 0x68b5ac00c62906bc,
6994 >(_buf?)?;
6995 Ok(_response)
6996 }
6997 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
6998 (),
6999 0x68b5ac00c62906bc,
7000 fidl::encoding::DynamicFlags::empty(),
7001 _decode,
7002 )
7003 }
7004
7005 type SeekResponseFut = fidl::client::QueryResponseFut<
7006 FileSeekResult,
7007 fdomain_client::fidl::FDomainResourceDialect,
7008 >;
7009 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
7010 fn _decode(
7011 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7012 ) -> Result<FileSeekResult, fidl::Error> {
7013 let _response = fidl::client::decode_transaction_body::<
7014 fidl::encoding::ResultType<FileSeekResponse, i32>,
7015 fdomain_client::fidl::FDomainResourceDialect,
7016 0x78079168162c5207,
7017 >(_buf?)?;
7018 Ok(_response.map(|x| x.offset_from_start))
7019 }
7020 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
7021 (origin, offset),
7022 0x78079168162c5207,
7023 fidl::encoding::DynamicFlags::empty(),
7024 _decode,
7025 )
7026 }
7027
7028 type ReadAtResponseFut = fidl::client::QueryResponseFut<
7029 FileReadAtResult,
7030 fdomain_client::fidl::FDomainResourceDialect,
7031 >;
7032 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
7033 fn _decode(
7034 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7035 ) -> Result<FileReadAtResult, fidl::Error> {
7036 let _response = fidl::client::decode_transaction_body::<
7037 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7038 fdomain_client::fidl::FDomainResourceDialect,
7039 0x1607a293a60d723e,
7040 >(_buf?)?;
7041 Ok(_response.map(|x| x.data))
7042 }
7043 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
7044 (count, offset),
7045 0x1607a293a60d723e,
7046 fidl::encoding::DynamicFlags::empty(),
7047 _decode,
7048 )
7049 }
7050
7051 type WriteAtResponseFut = fidl::client::QueryResponseFut<
7052 FileWriteAtResult,
7053 fdomain_client::fidl::FDomainResourceDialect,
7054 >;
7055 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
7056 fn _decode(
7057 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7058 ) -> Result<FileWriteAtResult, fidl::Error> {
7059 let _response = fidl::client::decode_transaction_body::<
7060 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7061 fdomain_client::fidl::FDomainResourceDialect,
7062 0x793eefc0045e792b,
7063 >(_buf?)?;
7064 Ok(_response.map(|x| x.actual_count))
7065 }
7066 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
7067 (data, offset),
7068 0x793eefc0045e792b,
7069 fidl::encoding::DynamicFlags::empty(),
7070 _decode,
7071 )
7072 }
7073
7074 type ResizeResponseFut = fidl::client::QueryResponseFut<
7075 FileResizeResult,
7076 fdomain_client::fidl::FDomainResourceDialect,
7077 >;
7078 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
7079 fn _decode(
7080 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7081 ) -> Result<FileResizeResult, fidl::Error> {
7082 let _response = fidl::client::decode_transaction_body::<
7083 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7084 fdomain_client::fidl::FDomainResourceDialect,
7085 0x2b80825f0535743a,
7086 >(_buf?)?;
7087 Ok(_response.map(|x| x))
7088 }
7089 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
7090 (length,),
7091 0x2b80825f0535743a,
7092 fidl::encoding::DynamicFlags::empty(),
7093 _decode,
7094 )
7095 }
7096
7097 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
7098 FileGetBackingMemoryResult,
7099 fdomain_client::fidl::FDomainResourceDialect,
7100 >;
7101 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
7102 fn _decode(
7103 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7104 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7105 let _response = fidl::client::decode_transaction_body::<
7106 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7107 fdomain_client::fidl::FDomainResourceDialect,
7108 0xa6a9e654cbf62b,
7109 >(_buf?)?;
7110 Ok(_response.map(|x| x.vmo))
7111 }
7112 self.client
7113 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
7114 (flags,),
7115 0xa6a9e654cbf62b,
7116 fidl::encoding::DynamicFlags::empty(),
7117 _decode,
7118 )
7119 }
7120
7121 type AllocateResponseFut = fidl::client::QueryResponseFut<
7122 FileAllocateResult,
7123 fdomain_client::fidl::FDomainResourceDialect,
7124 >;
7125 fn r#allocate(
7126 &self,
7127 mut offset: u64,
7128 mut length: u64,
7129 mut mode: AllocateMode,
7130 ) -> Self::AllocateResponseFut {
7131 fn _decode(
7132 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7133 ) -> Result<FileAllocateResult, fidl::Error> {
7134 let _response = fidl::client::decode_transaction_body::<
7135 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7136 fdomain_client::fidl::FDomainResourceDialect,
7137 0x77fa0c330b57fd2e,
7138 >(_buf?)?
7139 .into_result_fdomain::<FileMarker>("allocate")?;
7140 Ok(_response.map(|x| x))
7141 }
7142 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
7143 (offset, length, mode),
7144 0x77fa0c330b57fd2e,
7145 fidl::encoding::DynamicFlags::FLEXIBLE,
7146 _decode,
7147 )
7148 }
7149
7150 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
7151 FileEnableVerityResult,
7152 fdomain_client::fidl::FDomainResourceDialect,
7153 >;
7154 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
7155 fn _decode(
7156 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7157 ) -> Result<FileEnableVerityResult, fidl::Error> {
7158 let _response = fidl::client::decode_transaction_body::<
7159 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7160 fdomain_client::fidl::FDomainResourceDialect,
7161 0x2c421ec3faaeb8bb,
7162 >(_buf?)?
7163 .into_result_fdomain::<FileMarker>("enable_verity")?;
7164 Ok(_response.map(|x| x))
7165 }
7166 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
7167 (options,),
7168 0x2c421ec3faaeb8bb,
7169 fidl::encoding::DynamicFlags::FLEXIBLE,
7170 _decode,
7171 )
7172 }
7173}
7174
7175pub struct FileEventStream {
7176 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7177}
7178
7179impl std::marker::Unpin for FileEventStream {}
7180
7181impl futures::stream::FusedStream for FileEventStream {
7182 fn is_terminated(&self) -> bool {
7183 self.event_receiver.is_terminated()
7184 }
7185}
7186
7187impl futures::Stream for FileEventStream {
7188 type Item = Result<FileEvent, fidl::Error>;
7189
7190 fn poll_next(
7191 mut self: std::pin::Pin<&mut Self>,
7192 cx: &mut std::task::Context<'_>,
7193 ) -> std::task::Poll<Option<Self::Item>> {
7194 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7195 &mut self.event_receiver,
7196 cx
7197 )?) {
7198 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
7199 None => std::task::Poll::Ready(None),
7200 }
7201 }
7202}
7203
7204#[derive(Debug)]
7205pub enum FileEvent {
7206 OnOpen_ {
7207 s: i32,
7208 info: Option<Box<NodeInfoDeprecated>>,
7209 },
7210 OnRepresentation {
7211 payload: Representation,
7212 },
7213 #[non_exhaustive]
7214 _UnknownEvent {
7215 ordinal: u64,
7217 },
7218}
7219
7220impl FileEvent {
7221 #[allow(irrefutable_let_patterns)]
7222 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
7223 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
7224 }
7225 #[allow(irrefutable_let_patterns)]
7226 pub fn into_on_representation(self) -> Option<Representation> {
7227 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
7228 }
7229
7230 fn decode(
7232 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7233 ) -> Result<FileEvent, fidl::Error> {
7234 let (bytes, _handles) = buf.split_mut();
7235 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7236 debug_assert_eq!(tx_header.tx_id, 0);
7237 match tx_header.ordinal {
7238 0x7fc7bbb1dbfd1972 => {
7239 let mut out = fidl::new_empty!(
7240 NodeOnOpenRequest,
7241 fdomain_client::fidl::FDomainResourceDialect
7242 );
7243 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
7244 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
7245 }
7246 0x5cb40567d80a510c => {
7247 let mut out =
7248 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
7249 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
7250 Ok((FileEvent::OnRepresentation { payload: out }))
7251 }
7252 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7253 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7254 }
7255 _ => Err(fidl::Error::UnknownOrdinal {
7256 ordinal: tx_header.ordinal,
7257 protocol_name: <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7258 }),
7259 }
7260 }
7261}
7262
7263pub struct FileRequestStream {
7265 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7266 is_terminated: bool,
7267}
7268
7269impl std::marker::Unpin for FileRequestStream {}
7270
7271impl futures::stream::FusedStream for FileRequestStream {
7272 fn is_terminated(&self) -> bool {
7273 self.is_terminated
7274 }
7275}
7276
7277impl fdomain_client::fidl::RequestStream for FileRequestStream {
7278 type Protocol = FileMarker;
7279 type ControlHandle = FileControlHandle;
7280
7281 fn from_channel(channel: fdomain_client::Channel) -> Self {
7282 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7283 }
7284
7285 fn control_handle(&self) -> Self::ControlHandle {
7286 FileControlHandle { inner: self.inner.clone() }
7287 }
7288
7289 fn into_inner(
7290 self,
7291 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7292 {
7293 (self.inner, self.is_terminated)
7294 }
7295
7296 fn from_inner(
7297 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7298 is_terminated: bool,
7299 ) -> Self {
7300 Self { inner, is_terminated }
7301 }
7302}
7303
7304impl futures::Stream for FileRequestStream {
7305 type Item = Result<FileRequest, fidl::Error>;
7306
7307 fn poll_next(
7308 mut self: std::pin::Pin<&mut Self>,
7309 cx: &mut std::task::Context<'_>,
7310 ) -> std::task::Poll<Option<Self::Item>> {
7311 let this = &mut *self;
7312 if this.inner.check_shutdown(cx) {
7313 this.is_terminated = true;
7314 return std::task::Poll::Ready(None);
7315 }
7316 if this.is_terminated {
7317 panic!("polled FileRequestStream after completion");
7318 }
7319 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7320 |bytes, handles| {
7321 match this.inner.channel().read_etc(cx, bytes, handles) {
7322 std::task::Poll::Ready(Ok(())) => {}
7323 std::task::Poll::Pending => return std::task::Poll::Pending,
7324 std::task::Poll::Ready(Err(None)) => {
7325 this.is_terminated = true;
7326 return std::task::Poll::Ready(None);
7327 }
7328 std::task::Poll::Ready(Err(Some(e))) => {
7329 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7330 e.into(),
7331 ))));
7332 }
7333 }
7334
7335 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7337
7338 std::task::Poll::Ready(Some(match header.ordinal {
7339 0x6ee9c0ad53ec87aa => {
7340 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7341 let mut req = fidl::new_empty!(
7342 AdvisoryLockingAdvisoryLockRequest,
7343 fdomain_client::fidl::FDomainResourceDialect
7344 );
7345 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
7346 let control_handle = FileControlHandle { inner: this.inner.clone() };
7347 Ok(FileRequest::AdvisoryLock {
7348 request: req.request,
7349
7350 responder: FileAdvisoryLockResponder {
7351 control_handle: std::mem::ManuallyDrop::new(control_handle),
7352 tx_id: header.tx_id,
7353 },
7354 })
7355 }
7356 0x54f3949246a03e74 => {
7357 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7358 let mut req = fidl::new_empty!(
7359 LinkableLinkIntoRequest,
7360 fdomain_client::fidl::FDomainResourceDialect
7361 );
7362 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
7363 let control_handle = FileControlHandle { inner: this.inner.clone() };
7364 Ok(FileRequest::LinkInto {
7365 dst_parent_token: req.dst_parent_token,
7366 dst: req.dst,
7367
7368 responder: FileLinkIntoResponder {
7369 control_handle: std::mem::ManuallyDrop::new(control_handle),
7370 tx_id: header.tx_id,
7371 },
7372 })
7373 }
7374 0x20d8a7aba2168a79 => {
7375 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7376 let mut req = fidl::new_empty!(
7377 fdomain_fuchsia_unknown::CloneableCloneRequest,
7378 fdomain_client::fidl::FDomainResourceDialect
7379 );
7380 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7381 let control_handle = FileControlHandle { inner: this.inner.clone() };
7382 Ok(FileRequest::Clone { request: req.request, control_handle })
7383 }
7384 0x5ac5d459ad7f657e => {
7385 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7386 let mut req = fidl::new_empty!(
7387 fidl::encoding::EmptyPayload,
7388 fdomain_client::fidl::FDomainResourceDialect
7389 );
7390 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7391 let control_handle = FileControlHandle { inner: this.inner.clone() };
7392 Ok(FileRequest::Close {
7393 responder: FileCloseResponder {
7394 control_handle: std::mem::ManuallyDrop::new(control_handle),
7395 tx_id: header.tx_id,
7396 },
7397 })
7398 }
7399 0x2658edee9decfc06 => {
7400 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7401 let mut req = fidl::new_empty!(
7402 fidl::encoding::EmptyPayload,
7403 fdomain_client::fidl::FDomainResourceDialect
7404 );
7405 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7406 let control_handle = FileControlHandle { inner: this.inner.clone() };
7407 Ok(FileRequest::Query {
7408 responder: FileQueryResponder {
7409 control_handle: std::mem::ManuallyDrop::new(control_handle),
7410 tx_id: header.tx_id,
7411 },
7412 })
7413 }
7414 0x5a61678f293ce16f => {
7415 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7416 let mut req = fidl::new_empty!(
7417 NodeDeprecatedCloneRequest,
7418 fdomain_client::fidl::FDomainResourceDialect
7419 );
7420 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7421 let control_handle = FileControlHandle { inner: this.inner.clone() };
7422 Ok(FileRequest::DeprecatedClone {
7423 flags: req.flags,
7424 object: req.object,
7425
7426 control_handle,
7427 })
7428 }
7429 0x78985e216314dafd => {
7430 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7431 let mut req = fidl::new_empty!(
7432 fidl::encoding::EmptyPayload,
7433 fdomain_client::fidl::FDomainResourceDialect
7434 );
7435 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7436 let control_handle = FileControlHandle { inner: this.inner.clone() };
7437 Ok(FileRequest::DeprecatedGetAttr {
7438 responder: FileDeprecatedGetAttrResponder {
7439 control_handle: std::mem::ManuallyDrop::new(control_handle),
7440 tx_id: header.tx_id,
7441 },
7442 })
7443 }
7444 0x4186c0f40d938f46 => {
7445 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7446 let mut req = fidl::new_empty!(
7447 NodeDeprecatedSetAttrRequest,
7448 fdomain_client::fidl::FDomainResourceDialect
7449 );
7450 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
7451 let control_handle = FileControlHandle { inner: this.inner.clone() };
7452 Ok(FileRequest::DeprecatedSetAttr {
7453 flags: req.flags,
7454 attributes: req.attributes,
7455
7456 responder: FileDeprecatedSetAttrResponder {
7457 control_handle: std::mem::ManuallyDrop::new(control_handle),
7458 tx_id: header.tx_id,
7459 },
7460 })
7461 }
7462 0x5b88fffb8eda3aa1 => {
7463 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7464 let mut req = fidl::new_empty!(
7465 fidl::encoding::EmptyPayload,
7466 fdomain_client::fidl::FDomainResourceDialect
7467 );
7468 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7469 let control_handle = FileControlHandle { inner: this.inner.clone() };
7470 Ok(FileRequest::DeprecatedGetFlags {
7471 responder: FileDeprecatedGetFlagsResponder {
7472 control_handle: std::mem::ManuallyDrop::new(control_handle),
7473 tx_id: header.tx_id,
7474 },
7475 })
7476 }
7477 0x5295b76c71fde733 => {
7478 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7479 let mut req = fidl::new_empty!(
7480 NodeDeprecatedSetFlagsRequest,
7481 fdomain_client::fidl::FDomainResourceDialect
7482 );
7483 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7484 let control_handle = FileControlHandle { inner: this.inner.clone() };
7485 Ok(FileRequest::DeprecatedSetFlags {
7486 flags: req.flags,
7487
7488 responder: FileDeprecatedSetFlagsResponder {
7489 control_handle: std::mem::ManuallyDrop::new(control_handle),
7490 tx_id: header.tx_id,
7491 },
7492 })
7493 }
7494 0x176eb318f64ec23 => {
7495 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7496 let mut req = fidl::new_empty!(
7497 fidl::encoding::EmptyPayload,
7498 fdomain_client::fidl::FDomainResourceDialect
7499 );
7500 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7501 let control_handle = FileControlHandle { inner: this.inner.clone() };
7502 Ok(FileRequest::GetFlags {
7503 responder: FileGetFlagsResponder {
7504 control_handle: std::mem::ManuallyDrop::new(control_handle),
7505 tx_id: header.tx_id,
7506 },
7507 })
7508 }
7509 0x55a8028685791ea8 => {
7510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7511 let mut req = fidl::new_empty!(
7512 NodeSetFlagsRequest,
7513 fdomain_client::fidl::FDomainResourceDialect
7514 );
7515 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7516 let control_handle = FileControlHandle { inner: this.inner.clone() };
7517 Ok(FileRequest::SetFlags {
7518 flags: req.flags,
7519
7520 responder: FileSetFlagsResponder {
7521 control_handle: std::mem::ManuallyDrop::new(control_handle),
7522 tx_id: header.tx_id,
7523 },
7524 })
7525 }
7526 0x6f344a1c6b0a0610 => {
7527 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7528 let mut req = fidl::new_empty!(
7529 fidl::encoding::EmptyPayload,
7530 fdomain_client::fidl::FDomainResourceDialect
7531 );
7532 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7533 let control_handle = FileControlHandle { inner: this.inner.clone() };
7534 Ok(FileRequest::QueryFilesystem {
7535 responder: FileQueryFilesystemResponder {
7536 control_handle: std::mem::ManuallyDrop::new(control_handle),
7537 tx_id: header.tx_id,
7538 },
7539 })
7540 }
7541 0x3d4396a638ea053b => {
7542 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7543 let mut req = fidl::new_empty!(
7544 NodeGetAttributesRequest,
7545 fdomain_client::fidl::FDomainResourceDialect
7546 );
7547 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7548 let control_handle = FileControlHandle { inner: this.inner.clone() };
7549 Ok(FileRequest::GetAttributes {
7550 query: req.query,
7551
7552 responder: FileGetAttributesResponder {
7553 control_handle: std::mem::ManuallyDrop::new(control_handle),
7554 tx_id: header.tx_id,
7555 },
7556 })
7557 }
7558 0x3308c1da5a89bf08 => {
7559 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7560 let mut req = fidl::new_empty!(
7561 MutableNodeAttributes,
7562 fdomain_client::fidl::FDomainResourceDialect
7563 );
7564 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
7565 let control_handle = FileControlHandle { inner: this.inner.clone() };
7566 Ok(FileRequest::UpdateAttributes {
7567 payload: req,
7568 responder: FileUpdateAttributesResponder {
7569 control_handle: std::mem::ManuallyDrop::new(control_handle),
7570 tx_id: header.tx_id,
7571 },
7572 })
7573 }
7574 0x2c5c27ca0ab5dc49 => {
7575 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7576 let mut req = fidl::new_empty!(
7577 fidl::encoding::EmptyPayload,
7578 fdomain_client::fidl::FDomainResourceDialect
7579 );
7580 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7581 let control_handle = FileControlHandle { inner: this.inner.clone() };
7582 Ok(FileRequest::Sync {
7583 responder: FileSyncResponder {
7584 control_handle: std::mem::ManuallyDrop::new(control_handle),
7585 tx_id: header.tx_id,
7586 },
7587 })
7588 }
7589 0x4b61033de007fcd0 => {
7590 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7591 let mut req = fidl::new_empty!(
7592 NodeListExtendedAttributesRequest,
7593 fdomain_client::fidl::FDomainResourceDialect
7594 );
7595 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7596 let control_handle = FileControlHandle { inner: this.inner.clone() };
7597 Ok(FileRequest::ListExtendedAttributes {
7598 iterator: req.iterator,
7599
7600 control_handle,
7601 })
7602 }
7603 0x45ffa3ccfdeb76db => {
7604 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7605 let mut req = fidl::new_empty!(
7606 NodeGetExtendedAttributeRequest,
7607 fdomain_client::fidl::FDomainResourceDialect
7608 );
7609 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7610 let control_handle = FileControlHandle { inner: this.inner.clone() };
7611 Ok(FileRequest::GetExtendedAttribute {
7612 name: req.name,
7613
7614 responder: FileGetExtendedAttributeResponder {
7615 control_handle: std::mem::ManuallyDrop::new(control_handle),
7616 tx_id: header.tx_id,
7617 },
7618 })
7619 }
7620 0x4a951362f681f23c => {
7621 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7622 let mut req = fidl::new_empty!(
7623 NodeSetExtendedAttributeRequest,
7624 fdomain_client::fidl::FDomainResourceDialect
7625 );
7626 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7627 let control_handle = FileControlHandle { inner: this.inner.clone() };
7628 Ok(FileRequest::SetExtendedAttribute {
7629 name: req.name,
7630 value: req.value,
7631 mode: req.mode,
7632
7633 responder: FileSetExtendedAttributeResponder {
7634 control_handle: std::mem::ManuallyDrop::new(control_handle),
7635 tx_id: header.tx_id,
7636 },
7637 })
7638 }
7639 0x7a0b9f3a9bf9032d => {
7640 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7641 let mut req = fidl::new_empty!(
7642 NodeRemoveExtendedAttributeRequest,
7643 fdomain_client::fidl::FDomainResourceDialect
7644 );
7645 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7646 let control_handle = FileControlHandle { inner: this.inner.clone() };
7647 Ok(FileRequest::RemoveExtendedAttribute {
7648 name: req.name,
7649
7650 responder: FileRemoveExtendedAttributeResponder {
7651 control_handle: std::mem::ManuallyDrop::new(control_handle),
7652 tx_id: header.tx_id,
7653 },
7654 })
7655 }
7656 0x57e419a298c8ede => {
7657 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7658 let mut req = fidl::new_empty!(
7659 ReadableReadRequest,
7660 fdomain_client::fidl::FDomainResourceDialect
7661 );
7662 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
7663 let control_handle = FileControlHandle { inner: this.inner.clone() };
7664 Ok(FileRequest::Read {
7665 count: req.count,
7666
7667 responder: FileReadResponder {
7668 control_handle: std::mem::ManuallyDrop::new(control_handle),
7669 tx_id: header.tx_id,
7670 },
7671 })
7672 }
7673 0x6a31437832469f82 => {
7674 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7675 let mut req = fidl::new_empty!(
7676 WritableWriteRequest,
7677 fdomain_client::fidl::FDomainResourceDialect
7678 );
7679 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7680 let control_handle = FileControlHandle { inner: this.inner.clone() };
7681 Ok(FileRequest::Write {
7682 data: req.data,
7683
7684 responder: FileWriteResponder {
7685 control_handle: std::mem::ManuallyDrop::new(control_handle),
7686 tx_id: header.tx_id,
7687 },
7688 })
7689 }
7690 0x68b5ac00c62906bc => {
7691 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7692 let mut req = fidl::new_empty!(
7693 fidl::encoding::EmptyPayload,
7694 fdomain_client::fidl::FDomainResourceDialect
7695 );
7696 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7697 let control_handle = FileControlHandle { inner: this.inner.clone() };
7698 Ok(FileRequest::Describe {
7699 responder: FileDescribeResponder {
7700 control_handle: std::mem::ManuallyDrop::new(control_handle),
7701 tx_id: header.tx_id,
7702 },
7703 })
7704 }
7705 0x78079168162c5207 => {
7706 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7707 let mut req = fidl::new_empty!(
7708 FileSeekRequest,
7709 fdomain_client::fidl::FDomainResourceDialect
7710 );
7711 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
7712 let control_handle = FileControlHandle { inner: this.inner.clone() };
7713 Ok(FileRequest::Seek {
7714 origin: req.origin,
7715 offset: req.offset,
7716
7717 responder: FileSeekResponder {
7718 control_handle: std::mem::ManuallyDrop::new(control_handle),
7719 tx_id: header.tx_id,
7720 },
7721 })
7722 }
7723 0x1607a293a60d723e => {
7724 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7725 let mut req = fidl::new_empty!(
7726 FileReadAtRequest,
7727 fdomain_client::fidl::FDomainResourceDialect
7728 );
7729 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
7730 let control_handle = FileControlHandle { inner: this.inner.clone() };
7731 Ok(FileRequest::ReadAt {
7732 count: req.count,
7733 offset: req.offset,
7734
7735 responder: FileReadAtResponder {
7736 control_handle: std::mem::ManuallyDrop::new(control_handle),
7737 tx_id: header.tx_id,
7738 },
7739 })
7740 }
7741 0x793eefc0045e792b => {
7742 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7743 let mut req = fidl::new_empty!(
7744 FileWriteAtRequest,
7745 fdomain_client::fidl::FDomainResourceDialect
7746 );
7747 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
7748 let control_handle = FileControlHandle { inner: this.inner.clone() };
7749 Ok(FileRequest::WriteAt {
7750 data: req.data,
7751 offset: req.offset,
7752
7753 responder: FileWriteAtResponder {
7754 control_handle: std::mem::ManuallyDrop::new(control_handle),
7755 tx_id: header.tx_id,
7756 },
7757 })
7758 }
7759 0x2b80825f0535743a => {
7760 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7761 let mut req = fidl::new_empty!(
7762 FileResizeRequest,
7763 fdomain_client::fidl::FDomainResourceDialect
7764 );
7765 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
7766 let control_handle = FileControlHandle { inner: this.inner.clone() };
7767 Ok(FileRequest::Resize {
7768 length: req.length,
7769
7770 responder: FileResizeResponder {
7771 control_handle: std::mem::ManuallyDrop::new(control_handle),
7772 tx_id: header.tx_id,
7773 },
7774 })
7775 }
7776 0xa6a9e654cbf62b => {
7777 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7778 let mut req = fidl::new_empty!(
7779 FileGetBackingMemoryRequest,
7780 fdomain_client::fidl::FDomainResourceDialect
7781 );
7782 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
7783 let control_handle = FileControlHandle { inner: this.inner.clone() };
7784 Ok(FileRequest::GetBackingMemory {
7785 flags: req.flags,
7786
7787 responder: FileGetBackingMemoryResponder {
7788 control_handle: std::mem::ManuallyDrop::new(control_handle),
7789 tx_id: header.tx_id,
7790 },
7791 })
7792 }
7793 0x77fa0c330b57fd2e => {
7794 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7795 let mut req = fidl::new_empty!(
7796 FileAllocateRequest,
7797 fdomain_client::fidl::FDomainResourceDialect
7798 );
7799 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
7800 let control_handle = FileControlHandle { inner: this.inner.clone() };
7801 Ok(FileRequest::Allocate {
7802 offset: req.offset,
7803 length: req.length,
7804 mode: req.mode,
7805
7806 responder: FileAllocateResponder {
7807 control_handle: std::mem::ManuallyDrop::new(control_handle),
7808 tx_id: header.tx_id,
7809 },
7810 })
7811 }
7812 0x2c421ec3faaeb8bb => {
7813 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7814 let mut req = fidl::new_empty!(
7815 FileEnableVerityRequest,
7816 fdomain_client::fidl::FDomainResourceDialect
7817 );
7818 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
7819 let control_handle = FileControlHandle { inner: this.inner.clone() };
7820 Ok(FileRequest::EnableVerity {
7821 options: req.options,
7822
7823 responder: FileEnableVerityResponder {
7824 control_handle: std::mem::ManuallyDrop::new(control_handle),
7825 tx_id: header.tx_id,
7826 },
7827 })
7828 }
7829 _ if header.tx_id == 0
7830 && header
7831 .dynamic_flags()
7832 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7833 {
7834 Ok(FileRequest::_UnknownMethod {
7835 ordinal: header.ordinal,
7836 control_handle: FileControlHandle { inner: this.inner.clone() },
7837 method_type: fidl::MethodType::OneWay,
7838 })
7839 }
7840 _ if header
7841 .dynamic_flags()
7842 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7843 {
7844 this.inner.send_framework_err(
7845 fidl::encoding::FrameworkErr::UnknownMethod,
7846 header.tx_id,
7847 header.ordinal,
7848 header.dynamic_flags(),
7849 (bytes, handles),
7850 )?;
7851 Ok(FileRequest::_UnknownMethod {
7852 ordinal: header.ordinal,
7853 control_handle: FileControlHandle { inner: this.inner.clone() },
7854 method_type: fidl::MethodType::TwoWay,
7855 })
7856 }
7857 _ => Err(fidl::Error::UnknownOrdinal {
7858 ordinal: header.ordinal,
7859 protocol_name:
7860 <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7861 }),
7862 }))
7863 },
7864 )
7865 }
7866}
7867
7868#[derive(Debug)]
7873pub enum FileRequest {
7874 AdvisoryLock {
7898 request: AdvisoryLockRequest,
7899 responder: FileAdvisoryLockResponder,
7900 },
7901 LinkInto {
7924 dst_parent_token: fdomain_client::Event,
7925 dst: String,
7926 responder: FileLinkIntoResponder,
7927 },
7928 Clone {
7929 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
7930 control_handle: FileControlHandle,
7931 },
7932 Close {
7943 responder: FileCloseResponder,
7944 },
7945 Query {
7946 responder: FileQueryResponder,
7947 },
7948 DeprecatedClone {
7950 flags: OpenFlags,
7951 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
7952 control_handle: FileControlHandle,
7953 },
7954 DeprecatedGetAttr {
7956 responder: FileDeprecatedGetAttrResponder,
7957 },
7958 DeprecatedSetAttr {
7960 flags: NodeAttributeFlags,
7961 attributes: NodeAttributes,
7962 responder: FileDeprecatedSetAttrResponder,
7963 },
7964 DeprecatedGetFlags {
7966 responder: FileDeprecatedGetFlagsResponder,
7967 },
7968 DeprecatedSetFlags {
7970 flags: OpenFlags,
7971 responder: FileDeprecatedSetFlagsResponder,
7972 },
7973 GetFlags {
7982 responder: FileGetFlagsResponder,
7983 },
7984 SetFlags {
7994 flags: Flags,
7995 responder: FileSetFlagsResponder,
7996 },
7997 QueryFilesystem {
8001 responder: FileQueryFilesystemResponder,
8002 },
8003 GetAttributes {
8017 query: NodeAttributesQuery,
8018 responder: FileGetAttributesResponder,
8019 },
8020 UpdateAttributes {
8029 payload: MutableNodeAttributes,
8030 responder: FileUpdateAttributesResponder,
8031 },
8032 Sync {
8042 responder: FileSyncResponder,
8043 },
8044 ListExtendedAttributes {
8053 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
8054 control_handle: FileControlHandle,
8055 },
8056 GetExtendedAttribute {
8063 name: Vec<u8>,
8064 responder: FileGetExtendedAttributeResponder,
8065 },
8066 SetExtendedAttribute {
8074 name: Vec<u8>,
8075 value: ExtendedAttributeValue,
8076 mode: SetExtendedAttributeMode,
8077 responder: FileSetExtendedAttributeResponder,
8078 },
8079 RemoveExtendedAttribute {
8085 name: Vec<u8>,
8086 responder: FileRemoveExtendedAttributeResponder,
8087 },
8088 Read {
8107 count: u64,
8108 responder: FileReadResponder,
8109 },
8110 Write {
8134 data: Vec<u8>,
8135 responder: FileWriteResponder,
8136 },
8137 Describe {
8138 responder: FileDescribeResponder,
8139 },
8140 Seek {
8150 origin: SeekOrigin,
8151 offset: i64,
8152 responder: FileSeekResponder,
8153 },
8154 ReadAt {
8172 count: u64,
8173 offset: u64,
8174 responder: FileReadAtResponder,
8175 },
8176 WriteAt {
8198 data: Vec<u8>,
8199 offset: u64,
8200 responder: FileWriteAtResponder,
8201 },
8202 Resize {
8211 length: u64,
8212 responder: FileResizeResponder,
8213 },
8214 GetBackingMemory {
8235 flags: VmoFlags,
8236 responder: FileGetBackingMemoryResponder,
8237 },
8238 Allocate {
8240 offset: u64,
8241 length: u64,
8242 mode: AllocateMode,
8243 responder: FileAllocateResponder,
8244 },
8245 EnableVerity {
8257 options: VerificationOptions,
8258 responder: FileEnableVerityResponder,
8259 },
8260 #[non_exhaustive]
8262 _UnknownMethod {
8263 ordinal: u64,
8265 control_handle: FileControlHandle,
8266 method_type: fidl::MethodType,
8267 },
8268}
8269
8270impl FileRequest {
8271 #[allow(irrefutable_let_patterns)]
8272 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
8273 if let FileRequest::AdvisoryLock { request, responder } = self {
8274 Some((request, responder))
8275 } else {
8276 None
8277 }
8278 }
8279
8280 #[allow(irrefutable_let_patterns)]
8281 pub fn into_link_into(self) -> Option<(fdomain_client::Event, String, FileLinkIntoResponder)> {
8282 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
8283 Some((dst_parent_token, dst, responder))
8284 } else {
8285 None
8286 }
8287 }
8288
8289 #[allow(irrefutable_let_patterns)]
8290 pub fn into_clone(
8291 self,
8292 ) -> Option<(
8293 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
8294 FileControlHandle,
8295 )> {
8296 if let FileRequest::Clone { request, control_handle } = self {
8297 Some((request, control_handle))
8298 } else {
8299 None
8300 }
8301 }
8302
8303 #[allow(irrefutable_let_patterns)]
8304 pub fn into_close(self) -> Option<(FileCloseResponder)> {
8305 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
8306 }
8307
8308 #[allow(irrefutable_let_patterns)]
8309 pub fn into_query(self) -> Option<(FileQueryResponder)> {
8310 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
8311 }
8312
8313 #[allow(irrefutable_let_patterns)]
8314 pub fn into_deprecated_clone(
8315 self,
8316 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, FileControlHandle)> {
8317 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
8318 Some((flags, object, control_handle))
8319 } else {
8320 None
8321 }
8322 }
8323
8324 #[allow(irrefutable_let_patterns)]
8325 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
8326 if let FileRequest::DeprecatedGetAttr { responder } = self {
8327 Some((responder))
8328 } else {
8329 None
8330 }
8331 }
8332
8333 #[allow(irrefutable_let_patterns)]
8334 pub fn into_deprecated_set_attr(
8335 self,
8336 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
8337 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
8338 Some((flags, attributes, responder))
8339 } else {
8340 None
8341 }
8342 }
8343
8344 #[allow(irrefutable_let_patterns)]
8345 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
8346 if let FileRequest::DeprecatedGetFlags { responder } = self {
8347 Some((responder))
8348 } else {
8349 None
8350 }
8351 }
8352
8353 #[allow(irrefutable_let_patterns)]
8354 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
8355 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
8356 Some((flags, responder))
8357 } else {
8358 None
8359 }
8360 }
8361
8362 #[allow(irrefutable_let_patterns)]
8363 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
8364 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
8365 }
8366
8367 #[allow(irrefutable_let_patterns)]
8368 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
8369 if let FileRequest::SetFlags { flags, responder } = self {
8370 Some((flags, responder))
8371 } else {
8372 None
8373 }
8374 }
8375
8376 #[allow(irrefutable_let_patterns)]
8377 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
8378 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
8379 }
8380
8381 #[allow(irrefutable_let_patterns)]
8382 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
8383 if let FileRequest::GetAttributes { query, responder } = self {
8384 Some((query, responder))
8385 } else {
8386 None
8387 }
8388 }
8389
8390 #[allow(irrefutable_let_patterns)]
8391 pub fn into_update_attributes(
8392 self,
8393 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
8394 if let FileRequest::UpdateAttributes { payload, responder } = self {
8395 Some((payload, responder))
8396 } else {
8397 None
8398 }
8399 }
8400
8401 #[allow(irrefutable_let_patterns)]
8402 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
8403 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
8404 }
8405
8406 #[allow(irrefutable_let_patterns)]
8407 pub fn into_list_extended_attributes(
8408 self,
8409 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
8410 {
8411 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
8412 Some((iterator, control_handle))
8413 } else {
8414 None
8415 }
8416 }
8417
8418 #[allow(irrefutable_let_patterns)]
8419 pub fn into_get_extended_attribute(
8420 self,
8421 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
8422 if let FileRequest::GetExtendedAttribute { name, responder } = self {
8423 Some((name, responder))
8424 } else {
8425 None
8426 }
8427 }
8428
8429 #[allow(irrefutable_let_patterns)]
8430 pub fn into_set_extended_attribute(
8431 self,
8432 ) -> Option<(
8433 Vec<u8>,
8434 ExtendedAttributeValue,
8435 SetExtendedAttributeMode,
8436 FileSetExtendedAttributeResponder,
8437 )> {
8438 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
8439 Some((name, value, mode, responder))
8440 } else {
8441 None
8442 }
8443 }
8444
8445 #[allow(irrefutable_let_patterns)]
8446 pub fn into_remove_extended_attribute(
8447 self,
8448 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
8449 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
8450 Some((name, responder))
8451 } else {
8452 None
8453 }
8454 }
8455
8456 #[allow(irrefutable_let_patterns)]
8457 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
8458 if let FileRequest::Read { count, responder } = self {
8459 Some((count, responder))
8460 } else {
8461 None
8462 }
8463 }
8464
8465 #[allow(irrefutable_let_patterns)]
8466 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
8467 if let FileRequest::Write { data, responder } = self {
8468 Some((data, responder))
8469 } else {
8470 None
8471 }
8472 }
8473
8474 #[allow(irrefutable_let_patterns)]
8475 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
8476 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
8477 }
8478
8479 #[allow(irrefutable_let_patterns)]
8480 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
8481 if let FileRequest::Seek { origin, offset, responder } = self {
8482 Some((origin, offset, responder))
8483 } else {
8484 None
8485 }
8486 }
8487
8488 #[allow(irrefutable_let_patterns)]
8489 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
8490 if let FileRequest::ReadAt { count, offset, responder } = self {
8491 Some((count, offset, responder))
8492 } else {
8493 None
8494 }
8495 }
8496
8497 #[allow(irrefutable_let_patterns)]
8498 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
8499 if let FileRequest::WriteAt { data, offset, responder } = self {
8500 Some((data, offset, responder))
8501 } else {
8502 None
8503 }
8504 }
8505
8506 #[allow(irrefutable_let_patterns)]
8507 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
8508 if let FileRequest::Resize { length, responder } = self {
8509 Some((length, responder))
8510 } else {
8511 None
8512 }
8513 }
8514
8515 #[allow(irrefutable_let_patterns)]
8516 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
8517 if let FileRequest::GetBackingMemory { flags, responder } = self {
8518 Some((flags, responder))
8519 } else {
8520 None
8521 }
8522 }
8523
8524 #[allow(irrefutable_let_patterns)]
8525 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
8526 if let FileRequest::Allocate { offset, length, mode, responder } = self {
8527 Some((offset, length, mode, responder))
8528 } else {
8529 None
8530 }
8531 }
8532
8533 #[allow(irrefutable_let_patterns)]
8534 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
8535 if let FileRequest::EnableVerity { options, responder } = self {
8536 Some((options, responder))
8537 } else {
8538 None
8539 }
8540 }
8541
8542 pub fn method_name(&self) -> &'static str {
8544 match *self {
8545 FileRequest::AdvisoryLock { .. } => "advisory_lock",
8546 FileRequest::LinkInto { .. } => "link_into",
8547 FileRequest::Clone { .. } => "clone",
8548 FileRequest::Close { .. } => "close",
8549 FileRequest::Query { .. } => "query",
8550 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
8551 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
8552 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
8553 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
8554 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
8555 FileRequest::GetFlags { .. } => "get_flags",
8556 FileRequest::SetFlags { .. } => "set_flags",
8557 FileRequest::QueryFilesystem { .. } => "query_filesystem",
8558 FileRequest::GetAttributes { .. } => "get_attributes",
8559 FileRequest::UpdateAttributes { .. } => "update_attributes",
8560 FileRequest::Sync { .. } => "sync",
8561 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
8562 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
8563 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
8564 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
8565 FileRequest::Read { .. } => "read",
8566 FileRequest::Write { .. } => "write",
8567 FileRequest::Describe { .. } => "describe",
8568 FileRequest::Seek { .. } => "seek",
8569 FileRequest::ReadAt { .. } => "read_at",
8570 FileRequest::WriteAt { .. } => "write_at",
8571 FileRequest::Resize { .. } => "resize",
8572 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
8573 FileRequest::Allocate { .. } => "allocate",
8574 FileRequest::EnableVerity { .. } => "enable_verity",
8575 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8576 "unknown one-way method"
8577 }
8578 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8579 "unknown two-way method"
8580 }
8581 }
8582 }
8583}
8584
8585#[derive(Debug, Clone)]
8586pub struct FileControlHandle {
8587 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8588}
8589
8590impl fdomain_client::fidl::ControlHandle for FileControlHandle {
8591 fn shutdown(&self) {
8592 self.inner.shutdown()
8593 }
8594
8595 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8596 self.inner.shutdown_with_epitaph(status)
8597 }
8598
8599 fn is_closed(&self) -> bool {
8600 self.inner.channel().is_closed()
8601 }
8602 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8603 self.inner.channel().on_closed()
8604 }
8605}
8606
8607impl FileControlHandle {
8608 pub fn send_on_open_(
8609 &self,
8610 mut s: i32,
8611 mut info: Option<NodeInfoDeprecated>,
8612 ) -> Result<(), fidl::Error> {
8613 self.inner.send::<NodeOnOpenRequest>(
8614 (s, info.as_mut()),
8615 0,
8616 0x7fc7bbb1dbfd1972,
8617 fidl::encoding::DynamicFlags::FLEXIBLE,
8618 )
8619 }
8620
8621 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
8622 self.inner.send::<Representation>(
8623 &mut payload,
8624 0,
8625 0x5cb40567d80a510c,
8626 fidl::encoding::DynamicFlags::empty(),
8627 )
8628 }
8629}
8630
8631#[must_use = "FIDL methods require a response to be sent"]
8632#[derive(Debug)]
8633pub struct FileAdvisoryLockResponder {
8634 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8635 tx_id: u32,
8636}
8637
8638impl std::ops::Drop for FileAdvisoryLockResponder {
8642 fn drop(&mut self) {
8643 self.control_handle.shutdown();
8644 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8646 }
8647}
8648
8649impl fdomain_client::fidl::Responder for FileAdvisoryLockResponder {
8650 type ControlHandle = FileControlHandle;
8651
8652 fn control_handle(&self) -> &FileControlHandle {
8653 &self.control_handle
8654 }
8655
8656 fn drop_without_shutdown(mut self) {
8657 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8659 std::mem::forget(self);
8661 }
8662}
8663
8664impl FileAdvisoryLockResponder {
8665 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8669 let _result = self.send_raw(result);
8670 if _result.is_err() {
8671 self.control_handle.shutdown();
8672 }
8673 self.drop_without_shutdown();
8674 _result
8675 }
8676
8677 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8679 let _result = self.send_raw(result);
8680 self.drop_without_shutdown();
8681 _result
8682 }
8683
8684 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8685 self.control_handle
8686 .inner
8687 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8688 result,
8689 self.tx_id,
8690 0x6ee9c0ad53ec87aa,
8691 fidl::encoding::DynamicFlags::empty(),
8692 )
8693 }
8694}
8695
8696#[must_use = "FIDL methods require a response to be sent"]
8697#[derive(Debug)]
8698pub struct FileLinkIntoResponder {
8699 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8700 tx_id: u32,
8701}
8702
8703impl std::ops::Drop for FileLinkIntoResponder {
8707 fn drop(&mut self) {
8708 self.control_handle.shutdown();
8709 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8711 }
8712}
8713
8714impl fdomain_client::fidl::Responder for FileLinkIntoResponder {
8715 type ControlHandle = FileControlHandle;
8716
8717 fn control_handle(&self) -> &FileControlHandle {
8718 &self.control_handle
8719 }
8720
8721 fn drop_without_shutdown(mut self) {
8722 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8724 std::mem::forget(self);
8726 }
8727}
8728
8729impl FileLinkIntoResponder {
8730 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8734 let _result = self.send_raw(result);
8735 if _result.is_err() {
8736 self.control_handle.shutdown();
8737 }
8738 self.drop_without_shutdown();
8739 _result
8740 }
8741
8742 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8744 let _result = self.send_raw(result);
8745 self.drop_without_shutdown();
8746 _result
8747 }
8748
8749 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8750 self.control_handle
8751 .inner
8752 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8753 result,
8754 self.tx_id,
8755 0x54f3949246a03e74,
8756 fidl::encoding::DynamicFlags::empty(),
8757 )
8758 }
8759}
8760
8761#[must_use = "FIDL methods require a response to be sent"]
8762#[derive(Debug)]
8763pub struct FileCloseResponder {
8764 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8765 tx_id: u32,
8766}
8767
8768impl std::ops::Drop for FileCloseResponder {
8772 fn drop(&mut self) {
8773 self.control_handle.shutdown();
8774 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8776 }
8777}
8778
8779impl fdomain_client::fidl::Responder for FileCloseResponder {
8780 type ControlHandle = FileControlHandle;
8781
8782 fn control_handle(&self) -> &FileControlHandle {
8783 &self.control_handle
8784 }
8785
8786 fn drop_without_shutdown(mut self) {
8787 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8789 std::mem::forget(self);
8791 }
8792}
8793
8794impl FileCloseResponder {
8795 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8799 let _result = self.send_raw(result);
8800 if _result.is_err() {
8801 self.control_handle.shutdown();
8802 }
8803 self.drop_without_shutdown();
8804 _result
8805 }
8806
8807 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8809 let _result = self.send_raw(result);
8810 self.drop_without_shutdown();
8811 _result
8812 }
8813
8814 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8815 self.control_handle
8816 .inner
8817 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8818 result,
8819 self.tx_id,
8820 0x5ac5d459ad7f657e,
8821 fidl::encoding::DynamicFlags::empty(),
8822 )
8823 }
8824}
8825
8826#[must_use = "FIDL methods require a response to be sent"]
8827#[derive(Debug)]
8828pub struct FileQueryResponder {
8829 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8830 tx_id: u32,
8831}
8832
8833impl std::ops::Drop for FileQueryResponder {
8837 fn drop(&mut self) {
8838 self.control_handle.shutdown();
8839 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8841 }
8842}
8843
8844impl fdomain_client::fidl::Responder for FileQueryResponder {
8845 type ControlHandle = FileControlHandle;
8846
8847 fn control_handle(&self) -> &FileControlHandle {
8848 &self.control_handle
8849 }
8850
8851 fn drop_without_shutdown(mut self) {
8852 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8854 std::mem::forget(self);
8856 }
8857}
8858
8859impl FileQueryResponder {
8860 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8864 let _result = self.send_raw(protocol);
8865 if _result.is_err() {
8866 self.control_handle.shutdown();
8867 }
8868 self.drop_without_shutdown();
8869 _result
8870 }
8871
8872 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8874 let _result = self.send_raw(protocol);
8875 self.drop_without_shutdown();
8876 _result
8877 }
8878
8879 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8880 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
8881 (protocol,),
8882 self.tx_id,
8883 0x2658edee9decfc06,
8884 fidl::encoding::DynamicFlags::empty(),
8885 )
8886 }
8887}
8888
8889#[must_use = "FIDL methods require a response to be sent"]
8890#[derive(Debug)]
8891pub struct FileDeprecatedGetAttrResponder {
8892 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8893 tx_id: u32,
8894}
8895
8896impl std::ops::Drop for FileDeprecatedGetAttrResponder {
8900 fn drop(&mut self) {
8901 self.control_handle.shutdown();
8902 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8904 }
8905}
8906
8907impl fdomain_client::fidl::Responder for FileDeprecatedGetAttrResponder {
8908 type ControlHandle = FileControlHandle;
8909
8910 fn control_handle(&self) -> &FileControlHandle {
8911 &self.control_handle
8912 }
8913
8914 fn drop_without_shutdown(mut self) {
8915 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8917 std::mem::forget(self);
8919 }
8920}
8921
8922impl FileDeprecatedGetAttrResponder {
8923 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8927 let _result = self.send_raw(s, attributes);
8928 if _result.is_err() {
8929 self.control_handle.shutdown();
8930 }
8931 self.drop_without_shutdown();
8932 _result
8933 }
8934
8935 pub fn send_no_shutdown_on_err(
8937 self,
8938 mut s: i32,
8939 mut attributes: &NodeAttributes,
8940 ) -> Result<(), fidl::Error> {
8941 let _result = self.send_raw(s, attributes);
8942 self.drop_without_shutdown();
8943 _result
8944 }
8945
8946 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8947 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
8948 (s, attributes),
8949 self.tx_id,
8950 0x78985e216314dafd,
8951 fidl::encoding::DynamicFlags::empty(),
8952 )
8953 }
8954}
8955
8956#[must_use = "FIDL methods require a response to be sent"]
8957#[derive(Debug)]
8958pub struct FileDeprecatedSetAttrResponder {
8959 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8960 tx_id: u32,
8961}
8962
8963impl std::ops::Drop for FileDeprecatedSetAttrResponder {
8967 fn drop(&mut self) {
8968 self.control_handle.shutdown();
8969 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8971 }
8972}
8973
8974impl fdomain_client::fidl::Responder for FileDeprecatedSetAttrResponder {
8975 type ControlHandle = FileControlHandle;
8976
8977 fn control_handle(&self) -> &FileControlHandle {
8978 &self.control_handle
8979 }
8980
8981 fn drop_without_shutdown(mut self) {
8982 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8984 std::mem::forget(self);
8986 }
8987}
8988
8989impl FileDeprecatedSetAttrResponder {
8990 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
8994 let _result = self.send_raw(s);
8995 if _result.is_err() {
8996 self.control_handle.shutdown();
8997 }
8998 self.drop_without_shutdown();
8999 _result
9000 }
9001
9002 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9004 let _result = self.send_raw(s);
9005 self.drop_without_shutdown();
9006 _result
9007 }
9008
9009 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9010 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
9011 (s,),
9012 self.tx_id,
9013 0x4186c0f40d938f46,
9014 fidl::encoding::DynamicFlags::empty(),
9015 )
9016 }
9017}
9018
9019#[must_use = "FIDL methods require a response to be sent"]
9020#[derive(Debug)]
9021pub struct FileDeprecatedGetFlagsResponder {
9022 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9023 tx_id: u32,
9024}
9025
9026impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
9030 fn drop(&mut self) {
9031 self.control_handle.shutdown();
9032 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9034 }
9035}
9036
9037impl fdomain_client::fidl::Responder for FileDeprecatedGetFlagsResponder {
9038 type ControlHandle = FileControlHandle;
9039
9040 fn control_handle(&self) -> &FileControlHandle {
9041 &self.control_handle
9042 }
9043
9044 fn drop_without_shutdown(mut self) {
9045 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9047 std::mem::forget(self);
9049 }
9050}
9051
9052impl FileDeprecatedGetFlagsResponder {
9053 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9057 let _result = self.send_raw(s, flags);
9058 if _result.is_err() {
9059 self.control_handle.shutdown();
9060 }
9061 self.drop_without_shutdown();
9062 _result
9063 }
9064
9065 pub fn send_no_shutdown_on_err(
9067 self,
9068 mut s: i32,
9069 mut flags: OpenFlags,
9070 ) -> Result<(), fidl::Error> {
9071 let _result = self.send_raw(s, flags);
9072 self.drop_without_shutdown();
9073 _result
9074 }
9075
9076 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9077 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
9078 (s, flags),
9079 self.tx_id,
9080 0x5b88fffb8eda3aa1,
9081 fidl::encoding::DynamicFlags::empty(),
9082 )
9083 }
9084}
9085
9086#[must_use = "FIDL methods require a response to be sent"]
9087#[derive(Debug)]
9088pub struct FileDeprecatedSetFlagsResponder {
9089 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9090 tx_id: u32,
9091}
9092
9093impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
9097 fn drop(&mut self) {
9098 self.control_handle.shutdown();
9099 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9101 }
9102}
9103
9104impl fdomain_client::fidl::Responder for FileDeprecatedSetFlagsResponder {
9105 type ControlHandle = FileControlHandle;
9106
9107 fn control_handle(&self) -> &FileControlHandle {
9108 &self.control_handle
9109 }
9110
9111 fn drop_without_shutdown(mut self) {
9112 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9114 std::mem::forget(self);
9116 }
9117}
9118
9119impl FileDeprecatedSetFlagsResponder {
9120 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9124 let _result = self.send_raw(s);
9125 if _result.is_err() {
9126 self.control_handle.shutdown();
9127 }
9128 self.drop_without_shutdown();
9129 _result
9130 }
9131
9132 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9134 let _result = self.send_raw(s);
9135 self.drop_without_shutdown();
9136 _result
9137 }
9138
9139 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9140 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
9141 (s,),
9142 self.tx_id,
9143 0x5295b76c71fde733,
9144 fidl::encoding::DynamicFlags::empty(),
9145 )
9146 }
9147}
9148
9149#[must_use = "FIDL methods require a response to be sent"]
9150#[derive(Debug)]
9151pub struct FileGetFlagsResponder {
9152 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9153 tx_id: u32,
9154}
9155
9156impl std::ops::Drop for FileGetFlagsResponder {
9160 fn drop(&mut self) {
9161 self.control_handle.shutdown();
9162 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9164 }
9165}
9166
9167impl fdomain_client::fidl::Responder for FileGetFlagsResponder {
9168 type ControlHandle = FileControlHandle;
9169
9170 fn control_handle(&self) -> &FileControlHandle {
9171 &self.control_handle
9172 }
9173
9174 fn drop_without_shutdown(mut self) {
9175 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9177 std::mem::forget(self);
9179 }
9180}
9181
9182impl FileGetFlagsResponder {
9183 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9187 let _result = self.send_raw(result);
9188 if _result.is_err() {
9189 self.control_handle.shutdown();
9190 }
9191 self.drop_without_shutdown();
9192 _result
9193 }
9194
9195 pub fn send_no_shutdown_on_err(
9197 self,
9198 mut result: Result<Flags, i32>,
9199 ) -> Result<(), fidl::Error> {
9200 let _result = self.send_raw(result);
9201 self.drop_without_shutdown();
9202 _result
9203 }
9204
9205 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9206 self.control_handle
9207 .inner
9208 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
9209 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
9210 self.tx_id,
9211 0x176eb318f64ec23,
9212 fidl::encoding::DynamicFlags::FLEXIBLE,
9213 )
9214 }
9215}
9216
9217#[must_use = "FIDL methods require a response to be sent"]
9218#[derive(Debug)]
9219pub struct FileSetFlagsResponder {
9220 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9221 tx_id: u32,
9222}
9223
9224impl std::ops::Drop for FileSetFlagsResponder {
9228 fn drop(&mut self) {
9229 self.control_handle.shutdown();
9230 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9232 }
9233}
9234
9235impl fdomain_client::fidl::Responder for FileSetFlagsResponder {
9236 type ControlHandle = FileControlHandle;
9237
9238 fn control_handle(&self) -> &FileControlHandle {
9239 &self.control_handle
9240 }
9241
9242 fn drop_without_shutdown(mut self) {
9243 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9245 std::mem::forget(self);
9247 }
9248}
9249
9250impl FileSetFlagsResponder {
9251 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9255 let _result = self.send_raw(result);
9256 if _result.is_err() {
9257 self.control_handle.shutdown();
9258 }
9259 self.drop_without_shutdown();
9260 _result
9261 }
9262
9263 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9265 let _result = self.send_raw(result);
9266 self.drop_without_shutdown();
9267 _result
9268 }
9269
9270 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9271 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9272 fidl::encoding::EmptyStruct,
9273 i32,
9274 >>(
9275 fidl::encoding::FlexibleResult::new(result),
9276 self.tx_id,
9277 0x55a8028685791ea8,
9278 fidl::encoding::DynamicFlags::FLEXIBLE,
9279 )
9280 }
9281}
9282
9283#[must_use = "FIDL methods require a response to be sent"]
9284#[derive(Debug)]
9285pub struct FileQueryFilesystemResponder {
9286 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9287 tx_id: u32,
9288}
9289
9290impl std::ops::Drop for FileQueryFilesystemResponder {
9294 fn drop(&mut self) {
9295 self.control_handle.shutdown();
9296 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9298 }
9299}
9300
9301impl fdomain_client::fidl::Responder for FileQueryFilesystemResponder {
9302 type ControlHandle = FileControlHandle;
9303
9304 fn control_handle(&self) -> &FileControlHandle {
9305 &self.control_handle
9306 }
9307
9308 fn drop_without_shutdown(mut self) {
9309 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9311 std::mem::forget(self);
9313 }
9314}
9315
9316impl FileQueryFilesystemResponder {
9317 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9321 let _result = self.send_raw(s, info);
9322 if _result.is_err() {
9323 self.control_handle.shutdown();
9324 }
9325 self.drop_without_shutdown();
9326 _result
9327 }
9328
9329 pub fn send_no_shutdown_on_err(
9331 self,
9332 mut s: i32,
9333 mut info: Option<&FilesystemInfo>,
9334 ) -> Result<(), fidl::Error> {
9335 let _result = self.send_raw(s, info);
9336 self.drop_without_shutdown();
9337 _result
9338 }
9339
9340 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9341 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
9342 (s, info),
9343 self.tx_id,
9344 0x6f344a1c6b0a0610,
9345 fidl::encoding::DynamicFlags::empty(),
9346 )
9347 }
9348}
9349
9350#[must_use = "FIDL methods require a response to be sent"]
9351#[derive(Debug)]
9352pub struct FileGetAttributesResponder {
9353 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9354 tx_id: u32,
9355}
9356
9357impl std::ops::Drop for FileGetAttributesResponder {
9361 fn drop(&mut self) {
9362 self.control_handle.shutdown();
9363 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9365 }
9366}
9367
9368impl fdomain_client::fidl::Responder for FileGetAttributesResponder {
9369 type ControlHandle = FileControlHandle;
9370
9371 fn control_handle(&self) -> &FileControlHandle {
9372 &self.control_handle
9373 }
9374
9375 fn drop_without_shutdown(mut self) {
9376 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9378 std::mem::forget(self);
9380 }
9381}
9382
9383impl FileGetAttributesResponder {
9384 pub fn send(
9388 self,
9389 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9390 ) -> Result<(), fidl::Error> {
9391 let _result = self.send_raw(result);
9392 if _result.is_err() {
9393 self.control_handle.shutdown();
9394 }
9395 self.drop_without_shutdown();
9396 _result
9397 }
9398
9399 pub fn send_no_shutdown_on_err(
9401 self,
9402 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9403 ) -> Result<(), fidl::Error> {
9404 let _result = self.send_raw(result);
9405 self.drop_without_shutdown();
9406 _result
9407 }
9408
9409 fn send_raw(
9410 &self,
9411 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9412 ) -> Result<(), fidl::Error> {
9413 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
9414 result,
9415 self.tx_id,
9416 0x3d4396a638ea053b,
9417 fidl::encoding::DynamicFlags::empty(),
9418 )
9419 }
9420}
9421
9422#[must_use = "FIDL methods require a response to be sent"]
9423#[derive(Debug)]
9424pub struct FileUpdateAttributesResponder {
9425 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9426 tx_id: u32,
9427}
9428
9429impl std::ops::Drop for FileUpdateAttributesResponder {
9433 fn drop(&mut self) {
9434 self.control_handle.shutdown();
9435 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9437 }
9438}
9439
9440impl fdomain_client::fidl::Responder for FileUpdateAttributesResponder {
9441 type ControlHandle = FileControlHandle;
9442
9443 fn control_handle(&self) -> &FileControlHandle {
9444 &self.control_handle
9445 }
9446
9447 fn drop_without_shutdown(mut self) {
9448 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9450 std::mem::forget(self);
9452 }
9453}
9454
9455impl FileUpdateAttributesResponder {
9456 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9460 let _result = self.send_raw(result);
9461 if _result.is_err() {
9462 self.control_handle.shutdown();
9463 }
9464 self.drop_without_shutdown();
9465 _result
9466 }
9467
9468 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9470 let _result = self.send_raw(result);
9471 self.drop_without_shutdown();
9472 _result
9473 }
9474
9475 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9476 self.control_handle
9477 .inner
9478 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9479 result,
9480 self.tx_id,
9481 0x3308c1da5a89bf08,
9482 fidl::encoding::DynamicFlags::empty(),
9483 )
9484 }
9485}
9486
9487#[must_use = "FIDL methods require a response to be sent"]
9488#[derive(Debug)]
9489pub struct FileSyncResponder {
9490 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9491 tx_id: u32,
9492}
9493
9494impl std::ops::Drop for FileSyncResponder {
9498 fn drop(&mut self) {
9499 self.control_handle.shutdown();
9500 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9502 }
9503}
9504
9505impl fdomain_client::fidl::Responder for FileSyncResponder {
9506 type ControlHandle = FileControlHandle;
9507
9508 fn control_handle(&self) -> &FileControlHandle {
9509 &self.control_handle
9510 }
9511
9512 fn drop_without_shutdown(mut self) {
9513 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9515 std::mem::forget(self);
9517 }
9518}
9519
9520impl FileSyncResponder {
9521 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9525 let _result = self.send_raw(result);
9526 if _result.is_err() {
9527 self.control_handle.shutdown();
9528 }
9529 self.drop_without_shutdown();
9530 _result
9531 }
9532
9533 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9535 let _result = self.send_raw(result);
9536 self.drop_without_shutdown();
9537 _result
9538 }
9539
9540 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9541 self.control_handle
9542 .inner
9543 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9544 result,
9545 self.tx_id,
9546 0x2c5c27ca0ab5dc49,
9547 fidl::encoding::DynamicFlags::empty(),
9548 )
9549 }
9550}
9551
9552#[must_use = "FIDL methods require a response to be sent"]
9553#[derive(Debug)]
9554pub struct FileGetExtendedAttributeResponder {
9555 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9556 tx_id: u32,
9557}
9558
9559impl std::ops::Drop for FileGetExtendedAttributeResponder {
9563 fn drop(&mut self) {
9564 self.control_handle.shutdown();
9565 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9567 }
9568}
9569
9570impl fdomain_client::fidl::Responder for FileGetExtendedAttributeResponder {
9571 type ControlHandle = FileControlHandle;
9572
9573 fn control_handle(&self) -> &FileControlHandle {
9574 &self.control_handle
9575 }
9576
9577 fn drop_without_shutdown(mut self) {
9578 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9580 std::mem::forget(self);
9582 }
9583}
9584
9585impl FileGetExtendedAttributeResponder {
9586 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9590 let _result = self.send_raw(result);
9591 if _result.is_err() {
9592 self.control_handle.shutdown();
9593 }
9594 self.drop_without_shutdown();
9595 _result
9596 }
9597
9598 pub fn send_no_shutdown_on_err(
9600 self,
9601 mut result: Result<ExtendedAttributeValue, i32>,
9602 ) -> Result<(), fidl::Error> {
9603 let _result = self.send_raw(result);
9604 self.drop_without_shutdown();
9605 _result
9606 }
9607
9608 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9609 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
9610 result.as_mut().map_err(|e| *e),
9611 self.tx_id,
9612 0x45ffa3ccfdeb76db,
9613 fidl::encoding::DynamicFlags::empty(),
9614 )
9615 }
9616}
9617
9618#[must_use = "FIDL methods require a response to be sent"]
9619#[derive(Debug)]
9620pub struct FileSetExtendedAttributeResponder {
9621 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9622 tx_id: u32,
9623}
9624
9625impl std::ops::Drop for FileSetExtendedAttributeResponder {
9629 fn drop(&mut self) {
9630 self.control_handle.shutdown();
9631 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9633 }
9634}
9635
9636impl fdomain_client::fidl::Responder for FileSetExtendedAttributeResponder {
9637 type ControlHandle = FileControlHandle;
9638
9639 fn control_handle(&self) -> &FileControlHandle {
9640 &self.control_handle
9641 }
9642
9643 fn drop_without_shutdown(mut self) {
9644 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9646 std::mem::forget(self);
9648 }
9649}
9650
9651impl FileSetExtendedAttributeResponder {
9652 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9656 let _result = self.send_raw(result);
9657 if _result.is_err() {
9658 self.control_handle.shutdown();
9659 }
9660 self.drop_without_shutdown();
9661 _result
9662 }
9663
9664 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9666 let _result = self.send_raw(result);
9667 self.drop_without_shutdown();
9668 _result
9669 }
9670
9671 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9672 self.control_handle
9673 .inner
9674 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9675 result,
9676 self.tx_id,
9677 0x4a951362f681f23c,
9678 fidl::encoding::DynamicFlags::empty(),
9679 )
9680 }
9681}
9682
9683#[must_use = "FIDL methods require a response to be sent"]
9684#[derive(Debug)]
9685pub struct FileRemoveExtendedAttributeResponder {
9686 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9687 tx_id: u32,
9688}
9689
9690impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
9694 fn drop(&mut self) {
9695 self.control_handle.shutdown();
9696 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9698 }
9699}
9700
9701impl fdomain_client::fidl::Responder for FileRemoveExtendedAttributeResponder {
9702 type ControlHandle = FileControlHandle;
9703
9704 fn control_handle(&self) -> &FileControlHandle {
9705 &self.control_handle
9706 }
9707
9708 fn drop_without_shutdown(mut self) {
9709 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9711 std::mem::forget(self);
9713 }
9714}
9715
9716impl FileRemoveExtendedAttributeResponder {
9717 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9721 let _result = self.send_raw(result);
9722 if _result.is_err() {
9723 self.control_handle.shutdown();
9724 }
9725 self.drop_without_shutdown();
9726 _result
9727 }
9728
9729 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9731 let _result = self.send_raw(result);
9732 self.drop_without_shutdown();
9733 _result
9734 }
9735
9736 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9737 self.control_handle
9738 .inner
9739 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9740 result,
9741 self.tx_id,
9742 0x7a0b9f3a9bf9032d,
9743 fidl::encoding::DynamicFlags::empty(),
9744 )
9745 }
9746}
9747
9748#[must_use = "FIDL methods require a response to be sent"]
9749#[derive(Debug)]
9750pub struct FileReadResponder {
9751 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9752 tx_id: u32,
9753}
9754
9755impl std::ops::Drop for FileReadResponder {
9759 fn drop(&mut self) {
9760 self.control_handle.shutdown();
9761 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9763 }
9764}
9765
9766impl fdomain_client::fidl::Responder for FileReadResponder {
9767 type ControlHandle = FileControlHandle;
9768
9769 fn control_handle(&self) -> &FileControlHandle {
9770 &self.control_handle
9771 }
9772
9773 fn drop_without_shutdown(mut self) {
9774 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9776 std::mem::forget(self);
9778 }
9779}
9780
9781impl FileReadResponder {
9782 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9786 let _result = self.send_raw(result);
9787 if _result.is_err() {
9788 self.control_handle.shutdown();
9789 }
9790 self.drop_without_shutdown();
9791 _result
9792 }
9793
9794 pub fn send_no_shutdown_on_err(
9796 self,
9797 mut result: Result<&[u8], i32>,
9798 ) -> Result<(), fidl::Error> {
9799 let _result = self.send_raw(result);
9800 self.drop_without_shutdown();
9801 _result
9802 }
9803
9804 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9805 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
9806 result.map(|data| (data,)),
9807 self.tx_id,
9808 0x57e419a298c8ede,
9809 fidl::encoding::DynamicFlags::empty(),
9810 )
9811 }
9812}
9813
9814#[must_use = "FIDL methods require a response to be sent"]
9815#[derive(Debug)]
9816pub struct FileWriteResponder {
9817 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9818 tx_id: u32,
9819}
9820
9821impl std::ops::Drop for FileWriteResponder {
9825 fn drop(&mut self) {
9826 self.control_handle.shutdown();
9827 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9829 }
9830}
9831
9832impl fdomain_client::fidl::Responder for FileWriteResponder {
9833 type ControlHandle = FileControlHandle;
9834
9835 fn control_handle(&self) -> &FileControlHandle {
9836 &self.control_handle
9837 }
9838
9839 fn drop_without_shutdown(mut self) {
9840 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9842 std::mem::forget(self);
9844 }
9845}
9846
9847impl FileWriteResponder {
9848 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9852 let _result = self.send_raw(result);
9853 if _result.is_err() {
9854 self.control_handle.shutdown();
9855 }
9856 self.drop_without_shutdown();
9857 _result
9858 }
9859
9860 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9862 let _result = self.send_raw(result);
9863 self.drop_without_shutdown();
9864 _result
9865 }
9866
9867 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9868 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
9869 result.map(|actual_count| (actual_count,)),
9870 self.tx_id,
9871 0x6a31437832469f82,
9872 fidl::encoding::DynamicFlags::empty(),
9873 )
9874 }
9875}
9876
9877#[must_use = "FIDL methods require a response to be sent"]
9878#[derive(Debug)]
9879pub struct FileDescribeResponder {
9880 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9881 tx_id: u32,
9882}
9883
9884impl std::ops::Drop for FileDescribeResponder {
9888 fn drop(&mut self) {
9889 self.control_handle.shutdown();
9890 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9892 }
9893}
9894
9895impl fdomain_client::fidl::Responder for FileDescribeResponder {
9896 type ControlHandle = FileControlHandle;
9897
9898 fn control_handle(&self) -> &FileControlHandle {
9899 &self.control_handle
9900 }
9901
9902 fn drop_without_shutdown(mut self) {
9903 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9905 std::mem::forget(self);
9907 }
9908}
9909
9910impl FileDescribeResponder {
9911 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9915 let _result = self.send_raw(payload);
9916 if _result.is_err() {
9917 self.control_handle.shutdown();
9918 }
9919 self.drop_without_shutdown();
9920 _result
9921 }
9922
9923 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9925 let _result = self.send_raw(payload);
9926 self.drop_without_shutdown();
9927 _result
9928 }
9929
9930 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9931 self.control_handle.inner.send::<FileInfo>(
9932 &mut payload,
9933 self.tx_id,
9934 0x68b5ac00c62906bc,
9935 fidl::encoding::DynamicFlags::empty(),
9936 )
9937 }
9938}
9939
9940#[must_use = "FIDL methods require a response to be sent"]
9941#[derive(Debug)]
9942pub struct FileSeekResponder {
9943 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9944 tx_id: u32,
9945}
9946
9947impl std::ops::Drop for FileSeekResponder {
9951 fn drop(&mut self) {
9952 self.control_handle.shutdown();
9953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9955 }
9956}
9957
9958impl fdomain_client::fidl::Responder for FileSeekResponder {
9959 type ControlHandle = FileControlHandle;
9960
9961 fn control_handle(&self) -> &FileControlHandle {
9962 &self.control_handle
9963 }
9964
9965 fn drop_without_shutdown(mut self) {
9966 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9968 std::mem::forget(self);
9970 }
9971}
9972
9973impl FileSeekResponder {
9974 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9978 let _result = self.send_raw(result);
9979 if _result.is_err() {
9980 self.control_handle.shutdown();
9981 }
9982 self.drop_without_shutdown();
9983 _result
9984 }
9985
9986 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9988 let _result = self.send_raw(result);
9989 self.drop_without_shutdown();
9990 _result
9991 }
9992
9993 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9994 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
9995 result.map(|offset_from_start| (offset_from_start,)),
9996 self.tx_id,
9997 0x78079168162c5207,
9998 fidl::encoding::DynamicFlags::empty(),
9999 )
10000 }
10001}
10002
10003#[must_use = "FIDL methods require a response to be sent"]
10004#[derive(Debug)]
10005pub struct FileReadAtResponder {
10006 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10007 tx_id: u32,
10008}
10009
10010impl std::ops::Drop for FileReadAtResponder {
10014 fn drop(&mut self) {
10015 self.control_handle.shutdown();
10016 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10018 }
10019}
10020
10021impl fdomain_client::fidl::Responder for FileReadAtResponder {
10022 type ControlHandle = FileControlHandle;
10023
10024 fn control_handle(&self) -> &FileControlHandle {
10025 &self.control_handle
10026 }
10027
10028 fn drop_without_shutdown(mut self) {
10029 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10031 std::mem::forget(self);
10033 }
10034}
10035
10036impl FileReadAtResponder {
10037 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10041 let _result = self.send_raw(result);
10042 if _result.is_err() {
10043 self.control_handle.shutdown();
10044 }
10045 self.drop_without_shutdown();
10046 _result
10047 }
10048
10049 pub fn send_no_shutdown_on_err(
10051 self,
10052 mut result: Result<&[u8], i32>,
10053 ) -> Result<(), fidl::Error> {
10054 let _result = self.send_raw(result);
10055 self.drop_without_shutdown();
10056 _result
10057 }
10058
10059 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10060 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
10061 result.map(|data| (data,)),
10062 self.tx_id,
10063 0x1607a293a60d723e,
10064 fidl::encoding::DynamicFlags::empty(),
10065 )
10066 }
10067}
10068
10069#[must_use = "FIDL methods require a response to be sent"]
10070#[derive(Debug)]
10071pub struct FileWriteAtResponder {
10072 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10073 tx_id: u32,
10074}
10075
10076impl std::ops::Drop for FileWriteAtResponder {
10080 fn drop(&mut self) {
10081 self.control_handle.shutdown();
10082 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10084 }
10085}
10086
10087impl fdomain_client::fidl::Responder for FileWriteAtResponder {
10088 type ControlHandle = FileControlHandle;
10089
10090 fn control_handle(&self) -> &FileControlHandle {
10091 &self.control_handle
10092 }
10093
10094 fn drop_without_shutdown(mut self) {
10095 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10097 std::mem::forget(self);
10099 }
10100}
10101
10102impl FileWriteAtResponder {
10103 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10107 let _result = self.send_raw(result);
10108 if _result.is_err() {
10109 self.control_handle.shutdown();
10110 }
10111 self.drop_without_shutdown();
10112 _result
10113 }
10114
10115 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10117 let _result = self.send_raw(result);
10118 self.drop_without_shutdown();
10119 _result
10120 }
10121
10122 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10123 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
10124 result.map(|actual_count| (actual_count,)),
10125 self.tx_id,
10126 0x793eefc0045e792b,
10127 fidl::encoding::DynamicFlags::empty(),
10128 )
10129 }
10130}
10131
10132#[must_use = "FIDL methods require a response to be sent"]
10133#[derive(Debug)]
10134pub struct FileResizeResponder {
10135 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10136 tx_id: u32,
10137}
10138
10139impl std::ops::Drop for FileResizeResponder {
10143 fn drop(&mut self) {
10144 self.control_handle.shutdown();
10145 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10147 }
10148}
10149
10150impl fdomain_client::fidl::Responder for FileResizeResponder {
10151 type ControlHandle = FileControlHandle;
10152
10153 fn control_handle(&self) -> &FileControlHandle {
10154 &self.control_handle
10155 }
10156
10157 fn drop_without_shutdown(mut self) {
10158 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10160 std::mem::forget(self);
10162 }
10163}
10164
10165impl FileResizeResponder {
10166 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10170 let _result = self.send_raw(result);
10171 if _result.is_err() {
10172 self.control_handle.shutdown();
10173 }
10174 self.drop_without_shutdown();
10175 _result
10176 }
10177
10178 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10180 let _result = self.send_raw(result);
10181 self.drop_without_shutdown();
10182 _result
10183 }
10184
10185 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10186 self.control_handle
10187 .inner
10188 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10189 result,
10190 self.tx_id,
10191 0x2b80825f0535743a,
10192 fidl::encoding::DynamicFlags::empty(),
10193 )
10194 }
10195}
10196
10197#[must_use = "FIDL methods require a response to be sent"]
10198#[derive(Debug)]
10199pub struct FileGetBackingMemoryResponder {
10200 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10201 tx_id: u32,
10202}
10203
10204impl std::ops::Drop for FileGetBackingMemoryResponder {
10208 fn drop(&mut self) {
10209 self.control_handle.shutdown();
10210 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10212 }
10213}
10214
10215impl fdomain_client::fidl::Responder for FileGetBackingMemoryResponder {
10216 type ControlHandle = FileControlHandle;
10217
10218 fn control_handle(&self) -> &FileControlHandle {
10219 &self.control_handle
10220 }
10221
10222 fn drop_without_shutdown(mut self) {
10223 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10225 std::mem::forget(self);
10227 }
10228}
10229
10230impl FileGetBackingMemoryResponder {
10231 pub fn send(self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10235 let _result = self.send_raw(result);
10236 if _result.is_err() {
10237 self.control_handle.shutdown();
10238 }
10239 self.drop_without_shutdown();
10240 _result
10241 }
10242
10243 pub fn send_no_shutdown_on_err(
10245 self,
10246 mut result: Result<fdomain_client::Vmo, i32>,
10247 ) -> Result<(), fidl::Error> {
10248 let _result = self.send_raw(result);
10249 self.drop_without_shutdown();
10250 _result
10251 }
10252
10253 fn send_raw(&self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10254 self.control_handle
10255 .inner
10256 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
10257 result.map(|vmo| (vmo,)),
10258 self.tx_id,
10259 0xa6a9e654cbf62b,
10260 fidl::encoding::DynamicFlags::empty(),
10261 )
10262 }
10263}
10264
10265#[must_use = "FIDL methods require a response to be sent"]
10266#[derive(Debug)]
10267pub struct FileAllocateResponder {
10268 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10269 tx_id: u32,
10270}
10271
10272impl std::ops::Drop for FileAllocateResponder {
10276 fn drop(&mut self) {
10277 self.control_handle.shutdown();
10278 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10280 }
10281}
10282
10283impl fdomain_client::fidl::Responder for FileAllocateResponder {
10284 type ControlHandle = FileControlHandle;
10285
10286 fn control_handle(&self) -> &FileControlHandle {
10287 &self.control_handle
10288 }
10289
10290 fn drop_without_shutdown(mut self) {
10291 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10293 std::mem::forget(self);
10295 }
10296}
10297
10298impl FileAllocateResponder {
10299 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10303 let _result = self.send_raw(result);
10304 if _result.is_err() {
10305 self.control_handle.shutdown();
10306 }
10307 self.drop_without_shutdown();
10308 _result
10309 }
10310
10311 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10313 let _result = self.send_raw(result);
10314 self.drop_without_shutdown();
10315 _result
10316 }
10317
10318 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10319 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10320 fidl::encoding::EmptyStruct,
10321 i32,
10322 >>(
10323 fidl::encoding::FlexibleResult::new(result),
10324 self.tx_id,
10325 0x77fa0c330b57fd2e,
10326 fidl::encoding::DynamicFlags::FLEXIBLE,
10327 )
10328 }
10329}
10330
10331#[must_use = "FIDL methods require a response to be sent"]
10332#[derive(Debug)]
10333pub struct FileEnableVerityResponder {
10334 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10335 tx_id: u32,
10336}
10337
10338impl std::ops::Drop for FileEnableVerityResponder {
10342 fn drop(&mut self) {
10343 self.control_handle.shutdown();
10344 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10346 }
10347}
10348
10349impl fdomain_client::fidl::Responder for FileEnableVerityResponder {
10350 type ControlHandle = FileControlHandle;
10351
10352 fn control_handle(&self) -> &FileControlHandle {
10353 &self.control_handle
10354 }
10355
10356 fn drop_without_shutdown(mut self) {
10357 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10359 std::mem::forget(self);
10361 }
10362}
10363
10364impl FileEnableVerityResponder {
10365 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10369 let _result = self.send_raw(result);
10370 if _result.is_err() {
10371 self.control_handle.shutdown();
10372 }
10373 self.drop_without_shutdown();
10374 _result
10375 }
10376
10377 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10379 let _result = self.send_raw(result);
10380 self.drop_without_shutdown();
10381 _result
10382 }
10383
10384 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10385 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10386 fidl::encoding::EmptyStruct,
10387 i32,
10388 >>(
10389 fidl::encoding::FlexibleResult::new(result),
10390 self.tx_id,
10391 0x2c421ec3faaeb8bb,
10392 fidl::encoding::DynamicFlags::FLEXIBLE,
10393 )
10394 }
10395}
10396
10397#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10398pub struct LinkableMarker;
10399
10400impl fdomain_client::fidl::ProtocolMarker for LinkableMarker {
10401 type Proxy = LinkableProxy;
10402 type RequestStream = LinkableRequestStream;
10403
10404 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
10405}
10406pub type LinkableLinkIntoResult = Result<(), i32>;
10407
10408pub trait LinkableProxyInterface: Send + Sync {
10409 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
10410 + Send;
10411 fn r#link_into(
10412 &self,
10413 dst_parent_token: fdomain_client::Event,
10414 dst: &str,
10415 ) -> Self::LinkIntoResponseFut;
10416}
10417
10418#[derive(Debug, Clone)]
10419pub struct LinkableProxy {
10420 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10421}
10422
10423impl fdomain_client::fidl::Proxy for LinkableProxy {
10424 type Protocol = LinkableMarker;
10425
10426 fn from_channel(inner: fdomain_client::Channel) -> Self {
10427 Self::new(inner)
10428 }
10429
10430 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10431 self.client.into_channel().map_err(|client| Self { client })
10432 }
10433
10434 fn as_channel(&self) -> &fdomain_client::Channel {
10435 self.client.as_channel()
10436 }
10437}
10438
10439impl LinkableProxy {
10440 pub fn new(channel: fdomain_client::Channel) -> Self {
10442 let protocol_name = <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10443 Self { client: fidl::client::Client::new(channel, protocol_name) }
10444 }
10445
10446 pub fn take_event_stream(&self) -> LinkableEventStream {
10452 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
10453 }
10454
10455 pub fn r#link_into(
10478 &self,
10479 mut dst_parent_token: fdomain_client::Event,
10480 mut dst: &str,
10481 ) -> fidl::client::QueryResponseFut<
10482 LinkableLinkIntoResult,
10483 fdomain_client::fidl::FDomainResourceDialect,
10484 > {
10485 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
10486 }
10487}
10488
10489impl LinkableProxyInterface for LinkableProxy {
10490 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
10491 LinkableLinkIntoResult,
10492 fdomain_client::fidl::FDomainResourceDialect,
10493 >;
10494 fn r#link_into(
10495 &self,
10496 mut dst_parent_token: fdomain_client::Event,
10497 mut dst: &str,
10498 ) -> Self::LinkIntoResponseFut {
10499 fn _decode(
10500 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10501 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
10502 let _response = fidl::client::decode_transaction_body::<
10503 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10504 fdomain_client::fidl::FDomainResourceDialect,
10505 0x54f3949246a03e74,
10506 >(_buf?)?;
10507 Ok(_response.map(|x| x))
10508 }
10509 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
10510 (dst_parent_token, dst),
10511 0x54f3949246a03e74,
10512 fidl::encoding::DynamicFlags::empty(),
10513 _decode,
10514 )
10515 }
10516}
10517
10518pub struct LinkableEventStream {
10519 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
10520}
10521
10522impl std::marker::Unpin for LinkableEventStream {}
10523
10524impl futures::stream::FusedStream for LinkableEventStream {
10525 fn is_terminated(&self) -> bool {
10526 self.event_receiver.is_terminated()
10527 }
10528}
10529
10530impl futures::Stream for LinkableEventStream {
10531 type Item = Result<LinkableEvent, fidl::Error>;
10532
10533 fn poll_next(
10534 mut self: std::pin::Pin<&mut Self>,
10535 cx: &mut std::task::Context<'_>,
10536 ) -> std::task::Poll<Option<Self::Item>> {
10537 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10538 &mut self.event_receiver,
10539 cx
10540 )?) {
10541 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
10542 None => std::task::Poll::Ready(None),
10543 }
10544 }
10545}
10546
10547#[derive(Debug)]
10548pub enum LinkableEvent {}
10549
10550impl LinkableEvent {
10551 fn decode(
10553 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10554 ) -> Result<LinkableEvent, fidl::Error> {
10555 let (bytes, _handles) = buf.split_mut();
10556 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10557 debug_assert_eq!(tx_header.tx_id, 0);
10558 match tx_header.ordinal {
10559 _ => Err(fidl::Error::UnknownOrdinal {
10560 ordinal: tx_header.ordinal,
10561 protocol_name: <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10562 }),
10563 }
10564 }
10565}
10566
10567pub struct LinkableRequestStream {
10569 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10570 is_terminated: bool,
10571}
10572
10573impl std::marker::Unpin for LinkableRequestStream {}
10574
10575impl futures::stream::FusedStream for LinkableRequestStream {
10576 fn is_terminated(&self) -> bool {
10577 self.is_terminated
10578 }
10579}
10580
10581impl fdomain_client::fidl::RequestStream for LinkableRequestStream {
10582 type Protocol = LinkableMarker;
10583 type ControlHandle = LinkableControlHandle;
10584
10585 fn from_channel(channel: fdomain_client::Channel) -> Self {
10586 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10587 }
10588
10589 fn control_handle(&self) -> Self::ControlHandle {
10590 LinkableControlHandle { inner: self.inner.clone() }
10591 }
10592
10593 fn into_inner(
10594 self,
10595 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
10596 {
10597 (self.inner, self.is_terminated)
10598 }
10599
10600 fn from_inner(
10601 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10602 is_terminated: bool,
10603 ) -> Self {
10604 Self { inner, is_terminated }
10605 }
10606}
10607
10608impl futures::Stream for LinkableRequestStream {
10609 type Item = Result<LinkableRequest, fidl::Error>;
10610
10611 fn poll_next(
10612 mut self: std::pin::Pin<&mut Self>,
10613 cx: &mut std::task::Context<'_>,
10614 ) -> std::task::Poll<Option<Self::Item>> {
10615 let this = &mut *self;
10616 if this.inner.check_shutdown(cx) {
10617 this.is_terminated = true;
10618 return std::task::Poll::Ready(None);
10619 }
10620 if this.is_terminated {
10621 panic!("polled LinkableRequestStream after completion");
10622 }
10623 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
10624 |bytes, handles| {
10625 match this.inner.channel().read_etc(cx, bytes, handles) {
10626 std::task::Poll::Ready(Ok(())) => {}
10627 std::task::Poll::Pending => return std::task::Poll::Pending,
10628 std::task::Poll::Ready(Err(None)) => {
10629 this.is_terminated = true;
10630 return std::task::Poll::Ready(None);
10631 }
10632 std::task::Poll::Ready(Err(Some(e))) => {
10633 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10634 e.into(),
10635 ))));
10636 }
10637 }
10638
10639 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10641
10642 std::task::Poll::Ready(Some(match header.ordinal {
10643 0x54f3949246a03e74 => {
10644 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10645 let mut req = fidl::new_empty!(
10646 LinkableLinkIntoRequest,
10647 fdomain_client::fidl::FDomainResourceDialect
10648 );
10649 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
10650 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
10651 Ok(LinkableRequest::LinkInto {
10652 dst_parent_token: req.dst_parent_token,
10653 dst: req.dst,
10654
10655 responder: LinkableLinkIntoResponder {
10656 control_handle: std::mem::ManuallyDrop::new(control_handle),
10657 tx_id: header.tx_id,
10658 },
10659 })
10660 }
10661 _ => Err(fidl::Error::UnknownOrdinal {
10662 ordinal: header.ordinal,
10663 protocol_name:
10664 <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10665 }),
10666 }))
10667 },
10668 )
10669 }
10670}
10671
10672#[derive(Debug)]
10673pub enum LinkableRequest {
10674 LinkInto {
10697 dst_parent_token: fdomain_client::Event,
10698 dst: String,
10699 responder: LinkableLinkIntoResponder,
10700 },
10701}
10702
10703impl LinkableRequest {
10704 #[allow(irrefutable_let_patterns)]
10705 pub fn into_link_into(
10706 self,
10707 ) -> Option<(fdomain_client::Event, String, LinkableLinkIntoResponder)> {
10708 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
10709 Some((dst_parent_token, dst, responder))
10710 } else {
10711 None
10712 }
10713 }
10714
10715 pub fn method_name(&self) -> &'static str {
10717 match *self {
10718 LinkableRequest::LinkInto { .. } => "link_into",
10719 }
10720 }
10721}
10722
10723#[derive(Debug, Clone)]
10724pub struct LinkableControlHandle {
10725 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10726}
10727
10728impl fdomain_client::fidl::ControlHandle for LinkableControlHandle {
10729 fn shutdown(&self) {
10730 self.inner.shutdown()
10731 }
10732
10733 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10734 self.inner.shutdown_with_epitaph(status)
10735 }
10736
10737 fn is_closed(&self) -> bool {
10738 self.inner.channel().is_closed()
10739 }
10740 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
10741 self.inner.channel().on_closed()
10742 }
10743}
10744
10745impl LinkableControlHandle {}
10746
10747#[must_use = "FIDL methods require a response to be sent"]
10748#[derive(Debug)]
10749pub struct LinkableLinkIntoResponder {
10750 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
10751 tx_id: u32,
10752}
10753
10754impl std::ops::Drop for LinkableLinkIntoResponder {
10758 fn drop(&mut self) {
10759 self.control_handle.shutdown();
10760 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10762 }
10763}
10764
10765impl fdomain_client::fidl::Responder for LinkableLinkIntoResponder {
10766 type ControlHandle = LinkableControlHandle;
10767
10768 fn control_handle(&self) -> &LinkableControlHandle {
10769 &self.control_handle
10770 }
10771
10772 fn drop_without_shutdown(mut self) {
10773 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10775 std::mem::forget(self);
10777 }
10778}
10779
10780impl LinkableLinkIntoResponder {
10781 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10785 let _result = self.send_raw(result);
10786 if _result.is_err() {
10787 self.control_handle.shutdown();
10788 }
10789 self.drop_without_shutdown();
10790 _result
10791 }
10792
10793 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10795 let _result = self.send_raw(result);
10796 self.drop_without_shutdown();
10797 _result
10798 }
10799
10800 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10801 self.control_handle
10802 .inner
10803 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10804 result,
10805 self.tx_id,
10806 0x54f3949246a03e74,
10807 fidl::encoding::DynamicFlags::empty(),
10808 )
10809 }
10810}
10811
10812#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10813pub struct NodeMarker;
10814
10815impl fdomain_client::fidl::ProtocolMarker for NodeMarker {
10816 type Proxy = NodeProxy;
10817 type RequestStream = NodeRequestStream;
10818
10819 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
10820}
10821impl fdomain_client::fidl::DiscoverableProtocolMarker for NodeMarker {}
10822pub type NodeGetFlagsResult = Result<Flags, i32>;
10823pub type NodeSetFlagsResult = Result<(), i32>;
10824pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
10825pub type NodeUpdateAttributesResult = Result<(), i32>;
10826pub type NodeSyncResult = Result<(), i32>;
10827pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
10828pub type NodeSetExtendedAttributeResult = Result<(), i32>;
10829pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
10830
10831pub trait NodeProxyInterface: Send + Sync {
10832 fn r#clone(
10833 &self,
10834 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10835 ) -> Result<(), fidl::Error>;
10836 type CloseResponseFut: std::future::Future<
10837 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
10838 > + Send;
10839 fn r#close(&self) -> Self::CloseResponseFut;
10840 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
10841 fn r#query(&self) -> Self::QueryResponseFut;
10842 fn r#deprecated_clone(
10843 &self,
10844 flags: OpenFlags,
10845 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10846 ) -> Result<(), fidl::Error>;
10847 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
10848 + Send;
10849 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
10850 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
10851 fn r#deprecated_set_attr(
10852 &self,
10853 flags: NodeAttributeFlags,
10854 attributes: &NodeAttributes,
10855 ) -> Self::DeprecatedSetAttrResponseFut;
10856 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
10857 + Send;
10858 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
10859 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
10860 + Send;
10861 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
10862 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
10863 + Send;
10864 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
10865 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
10866 + Send;
10867 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
10868 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
10869 + Send;
10870 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
10871 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
10872 + Send;
10873 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
10874 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
10875 + Send;
10876 fn r#update_attributes(
10877 &self,
10878 payload: &MutableNodeAttributes,
10879 ) -> Self::UpdateAttributesResponseFut;
10880 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
10881 fn r#sync(&self) -> Self::SyncResponseFut;
10882 fn r#list_extended_attributes(
10883 &self,
10884 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
10885 ) -> Result<(), fidl::Error>;
10886 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
10887 + Send;
10888 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
10889 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
10890 + Send;
10891 fn r#set_extended_attribute(
10892 &self,
10893 name: &[u8],
10894 value: ExtendedAttributeValue,
10895 mode: SetExtendedAttributeMode,
10896 ) -> Self::SetExtendedAttributeResponseFut;
10897 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
10898 + Send;
10899 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
10900}
10901
10902#[derive(Debug, Clone)]
10903pub struct NodeProxy {
10904 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10905}
10906
10907impl fdomain_client::fidl::Proxy for NodeProxy {
10908 type Protocol = NodeMarker;
10909
10910 fn from_channel(inner: fdomain_client::Channel) -> Self {
10911 Self::new(inner)
10912 }
10913
10914 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10915 self.client.into_channel().map_err(|client| Self { client })
10916 }
10917
10918 fn as_channel(&self) -> &fdomain_client::Channel {
10919 self.client.as_channel()
10920 }
10921}
10922
10923impl NodeProxy {
10924 pub fn new(channel: fdomain_client::Channel) -> Self {
10926 let protocol_name = <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10927 Self { client: fidl::client::Client::new(channel, protocol_name) }
10928 }
10929
10930 pub fn take_event_stream(&self) -> NodeEventStream {
10936 NodeEventStream { event_receiver: self.client.take_event_receiver() }
10937 }
10938
10939 pub fn r#clone(
10940 &self,
10941 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10942 ) -> Result<(), fidl::Error> {
10943 NodeProxyInterface::r#clone(self, request)
10944 }
10945
10946 pub fn r#close(
10957 &self,
10958 ) -> fidl::client::QueryResponseFut<
10959 fdomain_fuchsia_unknown::CloseableCloseResult,
10960 fdomain_client::fidl::FDomainResourceDialect,
10961 > {
10962 NodeProxyInterface::r#close(self)
10963 }
10964
10965 pub fn r#query(
10966 &self,
10967 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
10968 NodeProxyInterface::r#query(self)
10969 }
10970
10971 pub fn r#deprecated_clone(
10973 &self,
10974 mut flags: OpenFlags,
10975 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10976 ) -> Result<(), fidl::Error> {
10977 NodeProxyInterface::r#deprecated_clone(self, flags, object)
10978 }
10979
10980 pub fn r#deprecated_get_attr(
10982 &self,
10983 ) -> fidl::client::QueryResponseFut<
10984 (i32, NodeAttributes),
10985 fdomain_client::fidl::FDomainResourceDialect,
10986 > {
10987 NodeProxyInterface::r#deprecated_get_attr(self)
10988 }
10989
10990 pub fn r#deprecated_set_attr(
10992 &self,
10993 mut flags: NodeAttributeFlags,
10994 mut attributes: &NodeAttributes,
10995 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
10996 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
10997 }
10998
10999 pub fn r#deprecated_get_flags(
11001 &self,
11002 ) -> fidl::client::QueryResponseFut<
11003 (i32, OpenFlags),
11004 fdomain_client::fidl::FDomainResourceDialect,
11005 > {
11006 NodeProxyInterface::r#deprecated_get_flags(self)
11007 }
11008
11009 pub fn r#deprecated_set_flags(
11011 &self,
11012 mut flags: OpenFlags,
11013 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
11014 NodeProxyInterface::r#deprecated_set_flags(self, flags)
11015 }
11016
11017 pub fn r#get_flags(
11026 &self,
11027 ) -> fidl::client::QueryResponseFut<
11028 NodeGetFlagsResult,
11029 fdomain_client::fidl::FDomainResourceDialect,
11030 > {
11031 NodeProxyInterface::r#get_flags(self)
11032 }
11033
11034 pub fn r#set_flags(
11044 &self,
11045 mut flags: Flags,
11046 ) -> fidl::client::QueryResponseFut<
11047 NodeSetFlagsResult,
11048 fdomain_client::fidl::FDomainResourceDialect,
11049 > {
11050 NodeProxyInterface::r#set_flags(self, flags)
11051 }
11052
11053 pub fn r#query_filesystem(
11057 &self,
11058 ) -> fidl::client::QueryResponseFut<
11059 (i32, Option<Box<FilesystemInfo>>),
11060 fdomain_client::fidl::FDomainResourceDialect,
11061 > {
11062 NodeProxyInterface::r#query_filesystem(self)
11063 }
11064
11065 pub fn r#get_attributes(
11079 &self,
11080 mut query: NodeAttributesQuery,
11081 ) -> fidl::client::QueryResponseFut<
11082 NodeGetAttributesResult,
11083 fdomain_client::fidl::FDomainResourceDialect,
11084 > {
11085 NodeProxyInterface::r#get_attributes(self, query)
11086 }
11087
11088 pub fn r#update_attributes(
11097 &self,
11098 mut payload: &MutableNodeAttributes,
11099 ) -> fidl::client::QueryResponseFut<
11100 NodeUpdateAttributesResult,
11101 fdomain_client::fidl::FDomainResourceDialect,
11102 > {
11103 NodeProxyInterface::r#update_attributes(self, payload)
11104 }
11105
11106 pub fn r#sync(
11116 &self,
11117 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
11118 {
11119 NodeProxyInterface::r#sync(self)
11120 }
11121
11122 pub fn r#list_extended_attributes(
11131 &self,
11132 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11133 ) -> Result<(), fidl::Error> {
11134 NodeProxyInterface::r#list_extended_attributes(self, iterator)
11135 }
11136
11137 pub fn r#get_extended_attribute(
11144 &self,
11145 mut name: &[u8],
11146 ) -> fidl::client::QueryResponseFut<
11147 NodeGetExtendedAttributeResult,
11148 fdomain_client::fidl::FDomainResourceDialect,
11149 > {
11150 NodeProxyInterface::r#get_extended_attribute(self, name)
11151 }
11152
11153 pub fn r#set_extended_attribute(
11161 &self,
11162 mut name: &[u8],
11163 mut value: ExtendedAttributeValue,
11164 mut mode: SetExtendedAttributeMode,
11165 ) -> fidl::client::QueryResponseFut<
11166 NodeSetExtendedAttributeResult,
11167 fdomain_client::fidl::FDomainResourceDialect,
11168 > {
11169 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
11170 }
11171
11172 pub fn r#remove_extended_attribute(
11178 &self,
11179 mut name: &[u8],
11180 ) -> fidl::client::QueryResponseFut<
11181 NodeRemoveExtendedAttributeResult,
11182 fdomain_client::fidl::FDomainResourceDialect,
11183 > {
11184 NodeProxyInterface::r#remove_extended_attribute(self, name)
11185 }
11186}
11187
11188impl NodeProxyInterface for NodeProxy {
11189 fn r#clone(
11190 &self,
11191 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
11192 ) -> Result<(), fidl::Error> {
11193 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
11194 (request,),
11195 0x20d8a7aba2168a79,
11196 fidl::encoding::DynamicFlags::empty(),
11197 )
11198 }
11199
11200 type CloseResponseFut = fidl::client::QueryResponseFut<
11201 fdomain_fuchsia_unknown::CloseableCloseResult,
11202 fdomain_client::fidl::FDomainResourceDialect,
11203 >;
11204 fn r#close(&self) -> Self::CloseResponseFut {
11205 fn _decode(
11206 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11207 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
11208 let _response = fidl::client::decode_transaction_body::<
11209 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11210 fdomain_client::fidl::FDomainResourceDialect,
11211 0x5ac5d459ad7f657e,
11212 >(_buf?)?;
11213 Ok(_response.map(|x| x))
11214 }
11215 self.client.send_query_and_decode::<
11216 fidl::encoding::EmptyPayload,
11217 fdomain_fuchsia_unknown::CloseableCloseResult,
11218 >(
11219 (),
11220 0x5ac5d459ad7f657e,
11221 fidl::encoding::DynamicFlags::empty(),
11222 _decode,
11223 )
11224 }
11225
11226 type QueryResponseFut =
11227 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
11228 fn r#query(&self) -> Self::QueryResponseFut {
11229 fn _decode(
11230 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11231 ) -> Result<Vec<u8>, fidl::Error> {
11232 let _response = fidl::client::decode_transaction_body::<
11233 fdomain_fuchsia_unknown::QueryableQueryResponse,
11234 fdomain_client::fidl::FDomainResourceDialect,
11235 0x2658edee9decfc06,
11236 >(_buf?)?;
11237 Ok(_response.protocol)
11238 }
11239 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
11240 (),
11241 0x2658edee9decfc06,
11242 fidl::encoding::DynamicFlags::empty(),
11243 _decode,
11244 )
11245 }
11246
11247 fn r#deprecated_clone(
11248 &self,
11249 mut flags: OpenFlags,
11250 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11251 ) -> Result<(), fidl::Error> {
11252 self.client.send::<NodeDeprecatedCloneRequest>(
11253 (flags, object),
11254 0x5a61678f293ce16f,
11255 fidl::encoding::DynamicFlags::FLEXIBLE,
11256 )
11257 }
11258
11259 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
11260 (i32, NodeAttributes),
11261 fdomain_client::fidl::FDomainResourceDialect,
11262 >;
11263 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
11264 fn _decode(
11265 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11266 ) -> Result<(i32, NodeAttributes), fidl::Error> {
11267 let _response = fidl::client::decode_transaction_body::<
11268 NodeDeprecatedGetAttrResponse,
11269 fdomain_client::fidl::FDomainResourceDialect,
11270 0x78985e216314dafd,
11271 >(_buf?)?;
11272 Ok((_response.s, _response.attributes))
11273 }
11274 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
11275 (),
11276 0x78985e216314dafd,
11277 fidl::encoding::DynamicFlags::empty(),
11278 _decode,
11279 )
11280 }
11281
11282 type DeprecatedSetAttrResponseFut =
11283 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11284 fn r#deprecated_set_attr(
11285 &self,
11286 mut flags: NodeAttributeFlags,
11287 mut attributes: &NodeAttributes,
11288 ) -> Self::DeprecatedSetAttrResponseFut {
11289 fn _decode(
11290 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11291 ) -> Result<i32, fidl::Error> {
11292 let _response = fidl::client::decode_transaction_body::<
11293 NodeDeprecatedSetAttrResponse,
11294 fdomain_client::fidl::FDomainResourceDialect,
11295 0x4186c0f40d938f46,
11296 >(_buf?)?;
11297 Ok(_response.s)
11298 }
11299 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
11300 (flags, attributes),
11301 0x4186c0f40d938f46,
11302 fidl::encoding::DynamicFlags::empty(),
11303 _decode,
11304 )
11305 }
11306
11307 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
11308 (i32, OpenFlags),
11309 fdomain_client::fidl::FDomainResourceDialect,
11310 >;
11311 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
11312 fn _decode(
11313 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11314 ) -> Result<(i32, OpenFlags), fidl::Error> {
11315 let _response = fidl::client::decode_transaction_body::<
11316 NodeDeprecatedGetFlagsResponse,
11317 fdomain_client::fidl::FDomainResourceDialect,
11318 0x5b88fffb8eda3aa1,
11319 >(_buf?)?;
11320 Ok((_response.s, _response.flags))
11321 }
11322 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
11323 (),
11324 0x5b88fffb8eda3aa1,
11325 fidl::encoding::DynamicFlags::empty(),
11326 _decode,
11327 )
11328 }
11329
11330 type DeprecatedSetFlagsResponseFut =
11331 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11332 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
11333 fn _decode(
11334 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11335 ) -> Result<i32, fidl::Error> {
11336 let _response = fidl::client::decode_transaction_body::<
11337 NodeDeprecatedSetFlagsResponse,
11338 fdomain_client::fidl::FDomainResourceDialect,
11339 0x5295b76c71fde733,
11340 >(_buf?)?;
11341 Ok(_response.s)
11342 }
11343 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
11344 (flags,),
11345 0x5295b76c71fde733,
11346 fidl::encoding::DynamicFlags::empty(),
11347 _decode,
11348 )
11349 }
11350
11351 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
11352 NodeGetFlagsResult,
11353 fdomain_client::fidl::FDomainResourceDialect,
11354 >;
11355 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
11356 fn _decode(
11357 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11358 ) -> Result<NodeGetFlagsResult, fidl::Error> {
11359 let _response = fidl::client::decode_transaction_body::<
11360 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
11361 fdomain_client::fidl::FDomainResourceDialect,
11362 0x176eb318f64ec23,
11363 >(_buf?)?
11364 .into_result_fdomain::<NodeMarker>("get_flags")?;
11365 Ok(_response.map(|x| x.flags))
11366 }
11367 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
11368 (),
11369 0x176eb318f64ec23,
11370 fidl::encoding::DynamicFlags::FLEXIBLE,
11371 _decode,
11372 )
11373 }
11374
11375 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
11376 NodeSetFlagsResult,
11377 fdomain_client::fidl::FDomainResourceDialect,
11378 >;
11379 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
11380 fn _decode(
11381 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11382 ) -> Result<NodeSetFlagsResult, fidl::Error> {
11383 let _response = fidl::client::decode_transaction_body::<
11384 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
11385 fdomain_client::fidl::FDomainResourceDialect,
11386 0x55a8028685791ea8,
11387 >(_buf?)?
11388 .into_result_fdomain::<NodeMarker>("set_flags")?;
11389 Ok(_response.map(|x| x))
11390 }
11391 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
11392 (flags,),
11393 0x55a8028685791ea8,
11394 fidl::encoding::DynamicFlags::FLEXIBLE,
11395 _decode,
11396 )
11397 }
11398
11399 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
11400 (i32, Option<Box<FilesystemInfo>>),
11401 fdomain_client::fidl::FDomainResourceDialect,
11402 >;
11403 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
11404 fn _decode(
11405 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11406 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
11407 let _response = fidl::client::decode_transaction_body::<
11408 NodeQueryFilesystemResponse,
11409 fdomain_client::fidl::FDomainResourceDialect,
11410 0x6f344a1c6b0a0610,
11411 >(_buf?)?;
11412 Ok((_response.s, _response.info))
11413 }
11414 self.client.send_query_and_decode::<
11415 fidl::encoding::EmptyPayload,
11416 (i32, Option<Box<FilesystemInfo>>),
11417 >(
11418 (),
11419 0x6f344a1c6b0a0610,
11420 fidl::encoding::DynamicFlags::empty(),
11421 _decode,
11422 )
11423 }
11424
11425 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
11426 NodeGetAttributesResult,
11427 fdomain_client::fidl::FDomainResourceDialect,
11428 >;
11429 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
11430 fn _decode(
11431 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11432 ) -> Result<NodeGetAttributesResult, fidl::Error> {
11433 let _response = fidl::client::decode_transaction_body::<
11434 fidl::encoding::ResultType<NodeAttributes2, i32>,
11435 fdomain_client::fidl::FDomainResourceDialect,
11436 0x3d4396a638ea053b,
11437 >(_buf?)?;
11438 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
11439 }
11440 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
11441 (query,),
11442 0x3d4396a638ea053b,
11443 fidl::encoding::DynamicFlags::empty(),
11444 _decode,
11445 )
11446 }
11447
11448 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
11449 NodeUpdateAttributesResult,
11450 fdomain_client::fidl::FDomainResourceDialect,
11451 >;
11452 fn r#update_attributes(
11453 &self,
11454 mut payload: &MutableNodeAttributes,
11455 ) -> Self::UpdateAttributesResponseFut {
11456 fn _decode(
11457 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11458 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
11459 let _response = fidl::client::decode_transaction_body::<
11460 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11461 fdomain_client::fidl::FDomainResourceDialect,
11462 0x3308c1da5a89bf08,
11463 >(_buf?)?;
11464 Ok(_response.map(|x| x))
11465 }
11466 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
11467 payload,
11468 0x3308c1da5a89bf08,
11469 fidl::encoding::DynamicFlags::empty(),
11470 _decode,
11471 )
11472 }
11473
11474 type SyncResponseFut = fidl::client::QueryResponseFut<
11475 NodeSyncResult,
11476 fdomain_client::fidl::FDomainResourceDialect,
11477 >;
11478 fn r#sync(&self) -> Self::SyncResponseFut {
11479 fn _decode(
11480 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11481 ) -> Result<NodeSyncResult, fidl::Error> {
11482 let _response = fidl::client::decode_transaction_body::<
11483 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11484 fdomain_client::fidl::FDomainResourceDialect,
11485 0x2c5c27ca0ab5dc49,
11486 >(_buf?)?;
11487 Ok(_response.map(|x| x))
11488 }
11489 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
11490 (),
11491 0x2c5c27ca0ab5dc49,
11492 fidl::encoding::DynamicFlags::empty(),
11493 _decode,
11494 )
11495 }
11496
11497 fn r#list_extended_attributes(
11498 &self,
11499 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11500 ) -> Result<(), fidl::Error> {
11501 self.client.send::<NodeListExtendedAttributesRequest>(
11502 (iterator,),
11503 0x4b61033de007fcd0,
11504 fidl::encoding::DynamicFlags::empty(),
11505 )
11506 }
11507
11508 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11509 NodeGetExtendedAttributeResult,
11510 fdomain_client::fidl::FDomainResourceDialect,
11511 >;
11512 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
11513 fn _decode(
11514 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11515 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
11516 let _response = fidl::client::decode_transaction_body::<
11517 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
11518 fdomain_client::fidl::FDomainResourceDialect,
11519 0x45ffa3ccfdeb76db,
11520 >(_buf?)?;
11521 Ok(_response.map(|x| x))
11522 }
11523 self.client.send_query_and_decode::<
11524 NodeGetExtendedAttributeRequest,
11525 NodeGetExtendedAttributeResult,
11526 >(
11527 (name,),
11528 0x45ffa3ccfdeb76db,
11529 fidl::encoding::DynamicFlags::empty(),
11530 _decode,
11531 )
11532 }
11533
11534 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11535 NodeSetExtendedAttributeResult,
11536 fdomain_client::fidl::FDomainResourceDialect,
11537 >;
11538 fn r#set_extended_attribute(
11539 &self,
11540 mut name: &[u8],
11541 mut value: ExtendedAttributeValue,
11542 mut mode: SetExtendedAttributeMode,
11543 ) -> Self::SetExtendedAttributeResponseFut {
11544 fn _decode(
11545 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11546 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
11547 let _response = fidl::client::decode_transaction_body::<
11548 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11549 fdomain_client::fidl::FDomainResourceDialect,
11550 0x4a951362f681f23c,
11551 >(_buf?)?;
11552 Ok(_response.map(|x| x))
11553 }
11554 self.client.send_query_and_decode::<
11555 NodeSetExtendedAttributeRequest,
11556 NodeSetExtendedAttributeResult,
11557 >(
11558 (name, &mut value, mode,),
11559 0x4a951362f681f23c,
11560 fidl::encoding::DynamicFlags::empty(),
11561 _decode,
11562 )
11563 }
11564
11565 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11566 NodeRemoveExtendedAttributeResult,
11567 fdomain_client::fidl::FDomainResourceDialect,
11568 >;
11569 fn r#remove_extended_attribute(
11570 &self,
11571 mut name: &[u8],
11572 ) -> Self::RemoveExtendedAttributeResponseFut {
11573 fn _decode(
11574 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11575 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
11576 let _response = fidl::client::decode_transaction_body::<
11577 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11578 fdomain_client::fidl::FDomainResourceDialect,
11579 0x7a0b9f3a9bf9032d,
11580 >(_buf?)?;
11581 Ok(_response.map(|x| x))
11582 }
11583 self.client.send_query_and_decode::<
11584 NodeRemoveExtendedAttributeRequest,
11585 NodeRemoveExtendedAttributeResult,
11586 >(
11587 (name,),
11588 0x7a0b9f3a9bf9032d,
11589 fidl::encoding::DynamicFlags::empty(),
11590 _decode,
11591 )
11592 }
11593}
11594
11595pub struct NodeEventStream {
11596 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
11597}
11598
11599impl std::marker::Unpin for NodeEventStream {}
11600
11601impl futures::stream::FusedStream for NodeEventStream {
11602 fn is_terminated(&self) -> bool {
11603 self.event_receiver.is_terminated()
11604 }
11605}
11606
11607impl futures::Stream for NodeEventStream {
11608 type Item = Result<NodeEvent, fidl::Error>;
11609
11610 fn poll_next(
11611 mut self: std::pin::Pin<&mut Self>,
11612 cx: &mut std::task::Context<'_>,
11613 ) -> std::task::Poll<Option<Self::Item>> {
11614 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
11615 &mut self.event_receiver,
11616 cx
11617 )?) {
11618 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
11619 None => std::task::Poll::Ready(None),
11620 }
11621 }
11622}
11623
11624#[derive(Debug)]
11625pub enum NodeEvent {
11626 OnOpen_ {
11627 s: i32,
11628 info: Option<Box<NodeInfoDeprecated>>,
11629 },
11630 OnRepresentation {
11631 payload: Representation,
11632 },
11633 #[non_exhaustive]
11634 _UnknownEvent {
11635 ordinal: u64,
11637 },
11638}
11639
11640impl NodeEvent {
11641 #[allow(irrefutable_let_patterns)]
11642 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
11643 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
11644 }
11645 #[allow(irrefutable_let_patterns)]
11646 pub fn into_on_representation(self) -> Option<Representation> {
11647 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
11648 }
11649
11650 fn decode(
11652 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
11653 ) -> Result<NodeEvent, fidl::Error> {
11654 let (bytes, _handles) = buf.split_mut();
11655 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11656 debug_assert_eq!(tx_header.tx_id, 0);
11657 match tx_header.ordinal {
11658 0x7fc7bbb1dbfd1972 => {
11659 let mut out = fidl::new_empty!(
11660 NodeOnOpenRequest,
11661 fdomain_client::fidl::FDomainResourceDialect
11662 );
11663 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
11664 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
11665 }
11666 0x5cb40567d80a510c => {
11667 let mut out =
11668 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
11669 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
11670 Ok((NodeEvent::OnRepresentation { payload: out }))
11671 }
11672 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
11673 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
11674 }
11675 _ => Err(fidl::Error::UnknownOrdinal {
11676 ordinal: tx_header.ordinal,
11677 protocol_name: <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
11678 }),
11679 }
11680 }
11681}
11682
11683pub struct NodeRequestStream {
11685 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11686 is_terminated: bool,
11687}
11688
11689impl std::marker::Unpin for NodeRequestStream {}
11690
11691impl futures::stream::FusedStream for NodeRequestStream {
11692 fn is_terminated(&self) -> bool {
11693 self.is_terminated
11694 }
11695}
11696
11697impl fdomain_client::fidl::RequestStream for NodeRequestStream {
11698 type Protocol = NodeMarker;
11699 type ControlHandle = NodeControlHandle;
11700
11701 fn from_channel(channel: fdomain_client::Channel) -> Self {
11702 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
11703 }
11704
11705 fn control_handle(&self) -> Self::ControlHandle {
11706 NodeControlHandle { inner: self.inner.clone() }
11707 }
11708
11709 fn into_inner(
11710 self,
11711 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
11712 {
11713 (self.inner, self.is_terminated)
11714 }
11715
11716 fn from_inner(
11717 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11718 is_terminated: bool,
11719 ) -> Self {
11720 Self { inner, is_terminated }
11721 }
11722}
11723
11724impl futures::Stream for NodeRequestStream {
11725 type Item = Result<NodeRequest, fidl::Error>;
11726
11727 fn poll_next(
11728 mut self: std::pin::Pin<&mut Self>,
11729 cx: &mut std::task::Context<'_>,
11730 ) -> std::task::Poll<Option<Self::Item>> {
11731 let this = &mut *self;
11732 if this.inner.check_shutdown(cx) {
11733 this.is_terminated = true;
11734 return std::task::Poll::Ready(None);
11735 }
11736 if this.is_terminated {
11737 panic!("polled NodeRequestStream after completion");
11738 }
11739 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
11740 |bytes, handles| {
11741 match this.inner.channel().read_etc(cx, bytes, handles) {
11742 std::task::Poll::Ready(Ok(())) => {}
11743 std::task::Poll::Pending => return std::task::Poll::Pending,
11744 std::task::Poll::Ready(Err(None)) => {
11745 this.is_terminated = true;
11746 return std::task::Poll::Ready(None);
11747 }
11748 std::task::Poll::Ready(Err(Some(e))) => {
11749 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
11750 e.into(),
11751 ))));
11752 }
11753 }
11754
11755 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11757
11758 std::task::Poll::Ready(Some(match header.ordinal {
11759 0x20d8a7aba2168a79 => {
11760 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11761 let mut req = fidl::new_empty!(
11762 fdomain_fuchsia_unknown::CloneableCloneRequest,
11763 fdomain_client::fidl::FDomainResourceDialect
11764 );
11765 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11766 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11767 Ok(NodeRequest::Clone { request: req.request, control_handle })
11768 }
11769 0x5ac5d459ad7f657e => {
11770 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11771 let mut req = fidl::new_empty!(
11772 fidl::encoding::EmptyPayload,
11773 fdomain_client::fidl::FDomainResourceDialect
11774 );
11775 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11776 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11777 Ok(NodeRequest::Close {
11778 responder: NodeCloseResponder {
11779 control_handle: std::mem::ManuallyDrop::new(control_handle),
11780 tx_id: header.tx_id,
11781 },
11782 })
11783 }
11784 0x2658edee9decfc06 => {
11785 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11786 let mut req = fidl::new_empty!(
11787 fidl::encoding::EmptyPayload,
11788 fdomain_client::fidl::FDomainResourceDialect
11789 );
11790 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11791 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11792 Ok(NodeRequest::Query {
11793 responder: NodeQueryResponder {
11794 control_handle: std::mem::ManuallyDrop::new(control_handle),
11795 tx_id: header.tx_id,
11796 },
11797 })
11798 }
11799 0x5a61678f293ce16f => {
11800 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11801 let mut req = fidl::new_empty!(
11802 NodeDeprecatedCloneRequest,
11803 fdomain_client::fidl::FDomainResourceDialect
11804 );
11805 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11806 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11807 Ok(NodeRequest::DeprecatedClone {
11808 flags: req.flags,
11809 object: req.object,
11810
11811 control_handle,
11812 })
11813 }
11814 0x78985e216314dafd => {
11815 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11816 let mut req = fidl::new_empty!(
11817 fidl::encoding::EmptyPayload,
11818 fdomain_client::fidl::FDomainResourceDialect
11819 );
11820 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11821 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11822 Ok(NodeRequest::DeprecatedGetAttr {
11823 responder: NodeDeprecatedGetAttrResponder {
11824 control_handle: std::mem::ManuallyDrop::new(control_handle),
11825 tx_id: header.tx_id,
11826 },
11827 })
11828 }
11829 0x4186c0f40d938f46 => {
11830 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11831 let mut req = fidl::new_empty!(
11832 NodeDeprecatedSetAttrRequest,
11833 fdomain_client::fidl::FDomainResourceDialect
11834 );
11835 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
11836 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11837 Ok(NodeRequest::DeprecatedSetAttr {
11838 flags: req.flags,
11839 attributes: req.attributes,
11840
11841 responder: NodeDeprecatedSetAttrResponder {
11842 control_handle: std::mem::ManuallyDrop::new(control_handle),
11843 tx_id: header.tx_id,
11844 },
11845 })
11846 }
11847 0x5b88fffb8eda3aa1 => {
11848 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11849 let mut req = fidl::new_empty!(
11850 fidl::encoding::EmptyPayload,
11851 fdomain_client::fidl::FDomainResourceDialect
11852 );
11853 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11854 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11855 Ok(NodeRequest::DeprecatedGetFlags {
11856 responder: NodeDeprecatedGetFlagsResponder {
11857 control_handle: std::mem::ManuallyDrop::new(control_handle),
11858 tx_id: header.tx_id,
11859 },
11860 })
11861 }
11862 0x5295b76c71fde733 => {
11863 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11864 let mut req = fidl::new_empty!(
11865 NodeDeprecatedSetFlagsRequest,
11866 fdomain_client::fidl::FDomainResourceDialect
11867 );
11868 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11869 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11870 Ok(NodeRequest::DeprecatedSetFlags {
11871 flags: req.flags,
11872
11873 responder: NodeDeprecatedSetFlagsResponder {
11874 control_handle: std::mem::ManuallyDrop::new(control_handle),
11875 tx_id: header.tx_id,
11876 },
11877 })
11878 }
11879 0x176eb318f64ec23 => {
11880 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11881 let mut req = fidl::new_empty!(
11882 fidl::encoding::EmptyPayload,
11883 fdomain_client::fidl::FDomainResourceDialect
11884 );
11885 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11886 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11887 Ok(NodeRequest::GetFlags {
11888 responder: NodeGetFlagsResponder {
11889 control_handle: std::mem::ManuallyDrop::new(control_handle),
11890 tx_id: header.tx_id,
11891 },
11892 })
11893 }
11894 0x55a8028685791ea8 => {
11895 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11896 let mut req = fidl::new_empty!(
11897 NodeSetFlagsRequest,
11898 fdomain_client::fidl::FDomainResourceDialect
11899 );
11900 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11901 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11902 Ok(NodeRequest::SetFlags {
11903 flags: req.flags,
11904
11905 responder: NodeSetFlagsResponder {
11906 control_handle: std::mem::ManuallyDrop::new(control_handle),
11907 tx_id: header.tx_id,
11908 },
11909 })
11910 }
11911 0x6f344a1c6b0a0610 => {
11912 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11913 let mut req = fidl::new_empty!(
11914 fidl::encoding::EmptyPayload,
11915 fdomain_client::fidl::FDomainResourceDialect
11916 );
11917 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11918 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11919 Ok(NodeRequest::QueryFilesystem {
11920 responder: NodeQueryFilesystemResponder {
11921 control_handle: std::mem::ManuallyDrop::new(control_handle),
11922 tx_id: header.tx_id,
11923 },
11924 })
11925 }
11926 0x3d4396a638ea053b => {
11927 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11928 let mut req = fidl::new_empty!(
11929 NodeGetAttributesRequest,
11930 fdomain_client::fidl::FDomainResourceDialect
11931 );
11932 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11933 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11934 Ok(NodeRequest::GetAttributes {
11935 query: req.query,
11936
11937 responder: NodeGetAttributesResponder {
11938 control_handle: std::mem::ManuallyDrop::new(control_handle),
11939 tx_id: header.tx_id,
11940 },
11941 })
11942 }
11943 0x3308c1da5a89bf08 => {
11944 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11945 let mut req = fidl::new_empty!(
11946 MutableNodeAttributes,
11947 fdomain_client::fidl::FDomainResourceDialect
11948 );
11949 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
11950 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11951 Ok(NodeRequest::UpdateAttributes {
11952 payload: req,
11953 responder: NodeUpdateAttributesResponder {
11954 control_handle: std::mem::ManuallyDrop::new(control_handle),
11955 tx_id: header.tx_id,
11956 },
11957 })
11958 }
11959 0x2c5c27ca0ab5dc49 => {
11960 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11961 let mut req = fidl::new_empty!(
11962 fidl::encoding::EmptyPayload,
11963 fdomain_client::fidl::FDomainResourceDialect
11964 );
11965 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11966 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11967 Ok(NodeRequest::Sync {
11968 responder: NodeSyncResponder {
11969 control_handle: std::mem::ManuallyDrop::new(control_handle),
11970 tx_id: header.tx_id,
11971 },
11972 })
11973 }
11974 0x4b61033de007fcd0 => {
11975 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11976 let mut req = fidl::new_empty!(
11977 NodeListExtendedAttributesRequest,
11978 fdomain_client::fidl::FDomainResourceDialect
11979 );
11980 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11981 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11982 Ok(NodeRequest::ListExtendedAttributes {
11983 iterator: req.iterator,
11984
11985 control_handle,
11986 })
11987 }
11988 0x45ffa3ccfdeb76db => {
11989 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11990 let mut req = fidl::new_empty!(
11991 NodeGetExtendedAttributeRequest,
11992 fdomain_client::fidl::FDomainResourceDialect
11993 );
11994 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11995 let control_handle = NodeControlHandle { inner: this.inner.clone() };
11996 Ok(NodeRequest::GetExtendedAttribute {
11997 name: req.name,
11998
11999 responder: NodeGetExtendedAttributeResponder {
12000 control_handle: std::mem::ManuallyDrop::new(control_handle),
12001 tx_id: header.tx_id,
12002 },
12003 })
12004 }
12005 0x4a951362f681f23c => {
12006 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12007 let mut req = fidl::new_empty!(
12008 NodeSetExtendedAttributeRequest,
12009 fdomain_client::fidl::FDomainResourceDialect
12010 );
12011 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12012 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12013 Ok(NodeRequest::SetExtendedAttribute {
12014 name: req.name,
12015 value: req.value,
12016 mode: req.mode,
12017
12018 responder: NodeSetExtendedAttributeResponder {
12019 control_handle: std::mem::ManuallyDrop::new(control_handle),
12020 tx_id: header.tx_id,
12021 },
12022 })
12023 }
12024 0x7a0b9f3a9bf9032d => {
12025 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12026 let mut req = fidl::new_empty!(
12027 NodeRemoveExtendedAttributeRequest,
12028 fdomain_client::fidl::FDomainResourceDialect
12029 );
12030 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12031 let control_handle = NodeControlHandle { inner: this.inner.clone() };
12032 Ok(NodeRequest::RemoveExtendedAttribute {
12033 name: req.name,
12034
12035 responder: NodeRemoveExtendedAttributeResponder {
12036 control_handle: std::mem::ManuallyDrop::new(control_handle),
12037 tx_id: header.tx_id,
12038 },
12039 })
12040 }
12041 _ if header.tx_id == 0
12042 && header
12043 .dynamic_flags()
12044 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12045 {
12046 Ok(NodeRequest::_UnknownMethod {
12047 ordinal: header.ordinal,
12048 control_handle: NodeControlHandle { inner: this.inner.clone() },
12049 method_type: fidl::MethodType::OneWay,
12050 })
12051 }
12052 _ if header
12053 .dynamic_flags()
12054 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12055 {
12056 this.inner.send_framework_err(
12057 fidl::encoding::FrameworkErr::UnknownMethod,
12058 header.tx_id,
12059 header.ordinal,
12060 header.dynamic_flags(),
12061 (bytes, handles),
12062 )?;
12063 Ok(NodeRequest::_UnknownMethod {
12064 ordinal: header.ordinal,
12065 control_handle: NodeControlHandle { inner: this.inner.clone() },
12066 method_type: fidl::MethodType::TwoWay,
12067 })
12068 }
12069 _ => Err(fidl::Error::UnknownOrdinal {
12070 ordinal: header.ordinal,
12071 protocol_name:
12072 <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
12073 }),
12074 }))
12075 },
12076 )
12077 }
12078}
12079
12080#[derive(Debug)]
12082pub enum NodeRequest {
12083 Clone {
12084 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12085 control_handle: NodeControlHandle,
12086 },
12087 Close {
12098 responder: NodeCloseResponder,
12099 },
12100 Query {
12101 responder: NodeQueryResponder,
12102 },
12103 DeprecatedClone {
12105 flags: OpenFlags,
12106 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
12107 control_handle: NodeControlHandle,
12108 },
12109 DeprecatedGetAttr {
12111 responder: NodeDeprecatedGetAttrResponder,
12112 },
12113 DeprecatedSetAttr {
12115 flags: NodeAttributeFlags,
12116 attributes: NodeAttributes,
12117 responder: NodeDeprecatedSetAttrResponder,
12118 },
12119 DeprecatedGetFlags {
12121 responder: NodeDeprecatedGetFlagsResponder,
12122 },
12123 DeprecatedSetFlags {
12125 flags: OpenFlags,
12126 responder: NodeDeprecatedSetFlagsResponder,
12127 },
12128 GetFlags {
12137 responder: NodeGetFlagsResponder,
12138 },
12139 SetFlags {
12149 flags: Flags,
12150 responder: NodeSetFlagsResponder,
12151 },
12152 QueryFilesystem {
12156 responder: NodeQueryFilesystemResponder,
12157 },
12158 GetAttributes {
12172 query: NodeAttributesQuery,
12173 responder: NodeGetAttributesResponder,
12174 },
12175 UpdateAttributes {
12184 payload: MutableNodeAttributes,
12185 responder: NodeUpdateAttributesResponder,
12186 },
12187 Sync {
12197 responder: NodeSyncResponder,
12198 },
12199 ListExtendedAttributes {
12208 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
12209 control_handle: NodeControlHandle,
12210 },
12211 GetExtendedAttribute {
12218 name: Vec<u8>,
12219 responder: NodeGetExtendedAttributeResponder,
12220 },
12221 SetExtendedAttribute {
12229 name: Vec<u8>,
12230 value: ExtendedAttributeValue,
12231 mode: SetExtendedAttributeMode,
12232 responder: NodeSetExtendedAttributeResponder,
12233 },
12234 RemoveExtendedAttribute {
12240 name: Vec<u8>,
12241 responder: NodeRemoveExtendedAttributeResponder,
12242 },
12243 #[non_exhaustive]
12245 _UnknownMethod {
12246 ordinal: u64,
12248 control_handle: NodeControlHandle,
12249 method_type: fidl::MethodType,
12250 },
12251}
12252
12253impl NodeRequest {
12254 #[allow(irrefutable_let_patterns)]
12255 pub fn into_clone(
12256 self,
12257 ) -> Option<(
12258 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12259 NodeControlHandle,
12260 )> {
12261 if let NodeRequest::Clone { request, control_handle } = self {
12262 Some((request, control_handle))
12263 } else {
12264 None
12265 }
12266 }
12267
12268 #[allow(irrefutable_let_patterns)]
12269 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
12270 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
12271 }
12272
12273 #[allow(irrefutable_let_patterns)]
12274 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
12275 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
12276 }
12277
12278 #[allow(irrefutable_let_patterns)]
12279 pub fn into_deprecated_clone(
12280 self,
12281 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, NodeControlHandle)> {
12282 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
12283 Some((flags, object, control_handle))
12284 } else {
12285 None
12286 }
12287 }
12288
12289 #[allow(irrefutable_let_patterns)]
12290 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
12291 if let NodeRequest::DeprecatedGetAttr { responder } = self {
12292 Some((responder))
12293 } else {
12294 None
12295 }
12296 }
12297
12298 #[allow(irrefutable_let_patterns)]
12299 pub fn into_deprecated_set_attr(
12300 self,
12301 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
12302 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
12303 Some((flags, attributes, responder))
12304 } else {
12305 None
12306 }
12307 }
12308
12309 #[allow(irrefutable_let_patterns)]
12310 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
12311 if let NodeRequest::DeprecatedGetFlags { responder } = self {
12312 Some((responder))
12313 } else {
12314 None
12315 }
12316 }
12317
12318 #[allow(irrefutable_let_patterns)]
12319 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
12320 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
12321 Some((flags, responder))
12322 } else {
12323 None
12324 }
12325 }
12326
12327 #[allow(irrefutable_let_patterns)]
12328 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
12329 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
12330 }
12331
12332 #[allow(irrefutable_let_patterns)]
12333 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
12334 if let NodeRequest::SetFlags { flags, responder } = self {
12335 Some((flags, responder))
12336 } else {
12337 None
12338 }
12339 }
12340
12341 #[allow(irrefutable_let_patterns)]
12342 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
12343 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
12344 }
12345
12346 #[allow(irrefutable_let_patterns)]
12347 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
12348 if let NodeRequest::GetAttributes { query, responder } = self {
12349 Some((query, responder))
12350 } else {
12351 None
12352 }
12353 }
12354
12355 #[allow(irrefutable_let_patterns)]
12356 pub fn into_update_attributes(
12357 self,
12358 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
12359 if let NodeRequest::UpdateAttributes { payload, responder } = self {
12360 Some((payload, responder))
12361 } else {
12362 None
12363 }
12364 }
12365
12366 #[allow(irrefutable_let_patterns)]
12367 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
12368 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
12369 }
12370
12371 #[allow(irrefutable_let_patterns)]
12372 pub fn into_list_extended_attributes(
12373 self,
12374 ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
12375 {
12376 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
12377 Some((iterator, control_handle))
12378 } else {
12379 None
12380 }
12381 }
12382
12383 #[allow(irrefutable_let_patterns)]
12384 pub fn into_get_extended_attribute(
12385 self,
12386 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
12387 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
12388 Some((name, responder))
12389 } else {
12390 None
12391 }
12392 }
12393
12394 #[allow(irrefutable_let_patterns)]
12395 pub fn into_set_extended_attribute(
12396 self,
12397 ) -> Option<(
12398 Vec<u8>,
12399 ExtendedAttributeValue,
12400 SetExtendedAttributeMode,
12401 NodeSetExtendedAttributeResponder,
12402 )> {
12403 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
12404 Some((name, value, mode, responder))
12405 } else {
12406 None
12407 }
12408 }
12409
12410 #[allow(irrefutable_let_patterns)]
12411 pub fn into_remove_extended_attribute(
12412 self,
12413 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
12414 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
12415 Some((name, responder))
12416 } else {
12417 None
12418 }
12419 }
12420
12421 pub fn method_name(&self) -> &'static str {
12423 match *self {
12424 NodeRequest::Clone { .. } => "clone",
12425 NodeRequest::Close { .. } => "close",
12426 NodeRequest::Query { .. } => "query",
12427 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
12428 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
12429 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
12430 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
12431 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
12432 NodeRequest::GetFlags { .. } => "get_flags",
12433 NodeRequest::SetFlags { .. } => "set_flags",
12434 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
12435 NodeRequest::GetAttributes { .. } => "get_attributes",
12436 NodeRequest::UpdateAttributes { .. } => "update_attributes",
12437 NodeRequest::Sync { .. } => "sync",
12438 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
12439 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
12440 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
12441 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
12442 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
12443 "unknown one-way method"
12444 }
12445 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
12446 "unknown two-way method"
12447 }
12448 }
12449 }
12450}
12451
12452#[derive(Debug, Clone)]
12453pub struct NodeControlHandle {
12454 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
12455}
12456
12457impl fdomain_client::fidl::ControlHandle for NodeControlHandle {
12458 fn shutdown(&self) {
12459 self.inner.shutdown()
12460 }
12461
12462 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
12463 self.inner.shutdown_with_epitaph(status)
12464 }
12465
12466 fn is_closed(&self) -> bool {
12467 self.inner.channel().is_closed()
12468 }
12469 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
12470 self.inner.channel().on_closed()
12471 }
12472}
12473
12474impl NodeControlHandle {
12475 pub fn send_on_open_(
12476 &self,
12477 mut s: i32,
12478 mut info: Option<NodeInfoDeprecated>,
12479 ) -> Result<(), fidl::Error> {
12480 self.inner.send::<NodeOnOpenRequest>(
12481 (s, info.as_mut()),
12482 0,
12483 0x7fc7bbb1dbfd1972,
12484 fidl::encoding::DynamicFlags::FLEXIBLE,
12485 )
12486 }
12487
12488 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
12489 self.inner.send::<Representation>(
12490 &mut payload,
12491 0,
12492 0x5cb40567d80a510c,
12493 fidl::encoding::DynamicFlags::empty(),
12494 )
12495 }
12496}
12497
12498#[must_use = "FIDL methods require a response to be sent"]
12499#[derive(Debug)]
12500pub struct NodeCloseResponder {
12501 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12502 tx_id: u32,
12503}
12504
12505impl std::ops::Drop for NodeCloseResponder {
12509 fn drop(&mut self) {
12510 self.control_handle.shutdown();
12511 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12513 }
12514}
12515
12516impl fdomain_client::fidl::Responder for NodeCloseResponder {
12517 type ControlHandle = NodeControlHandle;
12518
12519 fn control_handle(&self) -> &NodeControlHandle {
12520 &self.control_handle
12521 }
12522
12523 fn drop_without_shutdown(mut self) {
12524 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12526 std::mem::forget(self);
12528 }
12529}
12530
12531impl NodeCloseResponder {
12532 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12536 let _result = self.send_raw(result);
12537 if _result.is_err() {
12538 self.control_handle.shutdown();
12539 }
12540 self.drop_without_shutdown();
12541 _result
12542 }
12543
12544 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12546 let _result = self.send_raw(result);
12547 self.drop_without_shutdown();
12548 _result
12549 }
12550
12551 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12552 self.control_handle
12553 .inner
12554 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12555 result,
12556 self.tx_id,
12557 0x5ac5d459ad7f657e,
12558 fidl::encoding::DynamicFlags::empty(),
12559 )
12560 }
12561}
12562
12563#[must_use = "FIDL methods require a response to be sent"]
12564#[derive(Debug)]
12565pub struct NodeQueryResponder {
12566 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12567 tx_id: u32,
12568}
12569
12570impl std::ops::Drop for NodeQueryResponder {
12574 fn drop(&mut self) {
12575 self.control_handle.shutdown();
12576 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12578 }
12579}
12580
12581impl fdomain_client::fidl::Responder for NodeQueryResponder {
12582 type ControlHandle = NodeControlHandle;
12583
12584 fn control_handle(&self) -> &NodeControlHandle {
12585 &self.control_handle
12586 }
12587
12588 fn drop_without_shutdown(mut self) {
12589 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12591 std::mem::forget(self);
12593 }
12594}
12595
12596impl NodeQueryResponder {
12597 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12601 let _result = self.send_raw(protocol);
12602 if _result.is_err() {
12603 self.control_handle.shutdown();
12604 }
12605 self.drop_without_shutdown();
12606 _result
12607 }
12608
12609 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12611 let _result = self.send_raw(protocol);
12612 self.drop_without_shutdown();
12613 _result
12614 }
12615
12616 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12617 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
12618 (protocol,),
12619 self.tx_id,
12620 0x2658edee9decfc06,
12621 fidl::encoding::DynamicFlags::empty(),
12622 )
12623 }
12624}
12625
12626#[must_use = "FIDL methods require a response to be sent"]
12627#[derive(Debug)]
12628pub struct NodeDeprecatedGetAttrResponder {
12629 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12630 tx_id: u32,
12631}
12632
12633impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
12637 fn drop(&mut self) {
12638 self.control_handle.shutdown();
12639 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12641 }
12642}
12643
12644impl fdomain_client::fidl::Responder for NodeDeprecatedGetAttrResponder {
12645 type ControlHandle = NodeControlHandle;
12646
12647 fn control_handle(&self) -> &NodeControlHandle {
12648 &self.control_handle
12649 }
12650
12651 fn drop_without_shutdown(mut self) {
12652 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12654 std::mem::forget(self);
12656 }
12657}
12658
12659impl NodeDeprecatedGetAttrResponder {
12660 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12664 let _result = self.send_raw(s, attributes);
12665 if _result.is_err() {
12666 self.control_handle.shutdown();
12667 }
12668 self.drop_without_shutdown();
12669 _result
12670 }
12671
12672 pub fn send_no_shutdown_on_err(
12674 self,
12675 mut s: i32,
12676 mut attributes: &NodeAttributes,
12677 ) -> Result<(), fidl::Error> {
12678 let _result = self.send_raw(s, attributes);
12679 self.drop_without_shutdown();
12680 _result
12681 }
12682
12683 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12684 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
12685 (s, attributes),
12686 self.tx_id,
12687 0x78985e216314dafd,
12688 fidl::encoding::DynamicFlags::empty(),
12689 )
12690 }
12691}
12692
12693#[must_use = "FIDL methods require a response to be sent"]
12694#[derive(Debug)]
12695pub struct NodeDeprecatedSetAttrResponder {
12696 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12697 tx_id: u32,
12698}
12699
12700impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
12704 fn drop(&mut self) {
12705 self.control_handle.shutdown();
12706 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12708 }
12709}
12710
12711impl fdomain_client::fidl::Responder for NodeDeprecatedSetAttrResponder {
12712 type ControlHandle = NodeControlHandle;
12713
12714 fn control_handle(&self) -> &NodeControlHandle {
12715 &self.control_handle
12716 }
12717
12718 fn drop_without_shutdown(mut self) {
12719 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12721 std::mem::forget(self);
12723 }
12724}
12725
12726impl NodeDeprecatedSetAttrResponder {
12727 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12731 let _result = self.send_raw(s);
12732 if _result.is_err() {
12733 self.control_handle.shutdown();
12734 }
12735 self.drop_without_shutdown();
12736 _result
12737 }
12738
12739 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12741 let _result = self.send_raw(s);
12742 self.drop_without_shutdown();
12743 _result
12744 }
12745
12746 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12747 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
12748 (s,),
12749 self.tx_id,
12750 0x4186c0f40d938f46,
12751 fidl::encoding::DynamicFlags::empty(),
12752 )
12753 }
12754}
12755
12756#[must_use = "FIDL methods require a response to be sent"]
12757#[derive(Debug)]
12758pub struct NodeDeprecatedGetFlagsResponder {
12759 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12760 tx_id: u32,
12761}
12762
12763impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
12767 fn drop(&mut self) {
12768 self.control_handle.shutdown();
12769 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12771 }
12772}
12773
12774impl fdomain_client::fidl::Responder for NodeDeprecatedGetFlagsResponder {
12775 type ControlHandle = NodeControlHandle;
12776
12777 fn control_handle(&self) -> &NodeControlHandle {
12778 &self.control_handle
12779 }
12780
12781 fn drop_without_shutdown(mut self) {
12782 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12784 std::mem::forget(self);
12786 }
12787}
12788
12789impl NodeDeprecatedGetFlagsResponder {
12790 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12794 let _result = self.send_raw(s, flags);
12795 if _result.is_err() {
12796 self.control_handle.shutdown();
12797 }
12798 self.drop_without_shutdown();
12799 _result
12800 }
12801
12802 pub fn send_no_shutdown_on_err(
12804 self,
12805 mut s: i32,
12806 mut flags: OpenFlags,
12807 ) -> Result<(), fidl::Error> {
12808 let _result = self.send_raw(s, flags);
12809 self.drop_without_shutdown();
12810 _result
12811 }
12812
12813 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12814 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
12815 (s, flags),
12816 self.tx_id,
12817 0x5b88fffb8eda3aa1,
12818 fidl::encoding::DynamicFlags::empty(),
12819 )
12820 }
12821}
12822
12823#[must_use = "FIDL methods require a response to be sent"]
12824#[derive(Debug)]
12825pub struct NodeDeprecatedSetFlagsResponder {
12826 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12827 tx_id: u32,
12828}
12829
12830impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
12834 fn drop(&mut self) {
12835 self.control_handle.shutdown();
12836 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12838 }
12839}
12840
12841impl fdomain_client::fidl::Responder for NodeDeprecatedSetFlagsResponder {
12842 type ControlHandle = NodeControlHandle;
12843
12844 fn control_handle(&self) -> &NodeControlHandle {
12845 &self.control_handle
12846 }
12847
12848 fn drop_without_shutdown(mut self) {
12849 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12851 std::mem::forget(self);
12853 }
12854}
12855
12856impl NodeDeprecatedSetFlagsResponder {
12857 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12861 let _result = self.send_raw(s);
12862 if _result.is_err() {
12863 self.control_handle.shutdown();
12864 }
12865 self.drop_without_shutdown();
12866 _result
12867 }
12868
12869 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12871 let _result = self.send_raw(s);
12872 self.drop_without_shutdown();
12873 _result
12874 }
12875
12876 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12877 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
12878 (s,),
12879 self.tx_id,
12880 0x5295b76c71fde733,
12881 fidl::encoding::DynamicFlags::empty(),
12882 )
12883 }
12884}
12885
12886#[must_use = "FIDL methods require a response to be sent"]
12887#[derive(Debug)]
12888pub struct NodeGetFlagsResponder {
12889 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12890 tx_id: u32,
12891}
12892
12893impl std::ops::Drop for NodeGetFlagsResponder {
12897 fn drop(&mut self) {
12898 self.control_handle.shutdown();
12899 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12901 }
12902}
12903
12904impl fdomain_client::fidl::Responder for NodeGetFlagsResponder {
12905 type ControlHandle = NodeControlHandle;
12906
12907 fn control_handle(&self) -> &NodeControlHandle {
12908 &self.control_handle
12909 }
12910
12911 fn drop_without_shutdown(mut self) {
12912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12914 std::mem::forget(self);
12916 }
12917}
12918
12919impl NodeGetFlagsResponder {
12920 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12924 let _result = self.send_raw(result);
12925 if _result.is_err() {
12926 self.control_handle.shutdown();
12927 }
12928 self.drop_without_shutdown();
12929 _result
12930 }
12931
12932 pub fn send_no_shutdown_on_err(
12934 self,
12935 mut result: Result<Flags, i32>,
12936 ) -> Result<(), fidl::Error> {
12937 let _result = self.send_raw(result);
12938 self.drop_without_shutdown();
12939 _result
12940 }
12941
12942 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12943 self.control_handle
12944 .inner
12945 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
12946 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
12947 self.tx_id,
12948 0x176eb318f64ec23,
12949 fidl::encoding::DynamicFlags::FLEXIBLE,
12950 )
12951 }
12952}
12953
12954#[must_use = "FIDL methods require a response to be sent"]
12955#[derive(Debug)]
12956pub struct NodeSetFlagsResponder {
12957 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12958 tx_id: u32,
12959}
12960
12961impl std::ops::Drop for NodeSetFlagsResponder {
12965 fn drop(&mut self) {
12966 self.control_handle.shutdown();
12967 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12969 }
12970}
12971
12972impl fdomain_client::fidl::Responder for NodeSetFlagsResponder {
12973 type ControlHandle = NodeControlHandle;
12974
12975 fn control_handle(&self) -> &NodeControlHandle {
12976 &self.control_handle
12977 }
12978
12979 fn drop_without_shutdown(mut self) {
12980 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12982 std::mem::forget(self);
12984 }
12985}
12986
12987impl NodeSetFlagsResponder {
12988 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12992 let _result = self.send_raw(result);
12993 if _result.is_err() {
12994 self.control_handle.shutdown();
12995 }
12996 self.drop_without_shutdown();
12997 _result
12998 }
12999
13000 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13002 let _result = self.send_raw(result);
13003 self.drop_without_shutdown();
13004 _result
13005 }
13006
13007 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13008 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
13009 fidl::encoding::EmptyStruct,
13010 i32,
13011 >>(
13012 fidl::encoding::FlexibleResult::new(result),
13013 self.tx_id,
13014 0x55a8028685791ea8,
13015 fidl::encoding::DynamicFlags::FLEXIBLE,
13016 )
13017 }
13018}
13019
13020#[must_use = "FIDL methods require a response to be sent"]
13021#[derive(Debug)]
13022pub struct NodeQueryFilesystemResponder {
13023 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13024 tx_id: u32,
13025}
13026
13027impl std::ops::Drop for NodeQueryFilesystemResponder {
13031 fn drop(&mut self) {
13032 self.control_handle.shutdown();
13033 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13035 }
13036}
13037
13038impl fdomain_client::fidl::Responder for NodeQueryFilesystemResponder {
13039 type ControlHandle = NodeControlHandle;
13040
13041 fn control_handle(&self) -> &NodeControlHandle {
13042 &self.control_handle
13043 }
13044
13045 fn drop_without_shutdown(mut self) {
13046 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13048 std::mem::forget(self);
13050 }
13051}
13052
13053impl NodeQueryFilesystemResponder {
13054 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13058 let _result = self.send_raw(s, info);
13059 if _result.is_err() {
13060 self.control_handle.shutdown();
13061 }
13062 self.drop_without_shutdown();
13063 _result
13064 }
13065
13066 pub fn send_no_shutdown_on_err(
13068 self,
13069 mut s: i32,
13070 mut info: Option<&FilesystemInfo>,
13071 ) -> Result<(), fidl::Error> {
13072 let _result = self.send_raw(s, info);
13073 self.drop_without_shutdown();
13074 _result
13075 }
13076
13077 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13078 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
13079 (s, info),
13080 self.tx_id,
13081 0x6f344a1c6b0a0610,
13082 fidl::encoding::DynamicFlags::empty(),
13083 )
13084 }
13085}
13086
13087#[must_use = "FIDL methods require a response to be sent"]
13088#[derive(Debug)]
13089pub struct NodeGetAttributesResponder {
13090 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13091 tx_id: u32,
13092}
13093
13094impl std::ops::Drop for NodeGetAttributesResponder {
13098 fn drop(&mut self) {
13099 self.control_handle.shutdown();
13100 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13102 }
13103}
13104
13105impl fdomain_client::fidl::Responder for NodeGetAttributesResponder {
13106 type ControlHandle = NodeControlHandle;
13107
13108 fn control_handle(&self) -> &NodeControlHandle {
13109 &self.control_handle
13110 }
13111
13112 fn drop_without_shutdown(mut self) {
13113 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13115 std::mem::forget(self);
13117 }
13118}
13119
13120impl NodeGetAttributesResponder {
13121 pub fn send(
13125 self,
13126 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13127 ) -> Result<(), fidl::Error> {
13128 let _result = self.send_raw(result);
13129 if _result.is_err() {
13130 self.control_handle.shutdown();
13131 }
13132 self.drop_without_shutdown();
13133 _result
13134 }
13135
13136 pub fn send_no_shutdown_on_err(
13138 self,
13139 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13140 ) -> Result<(), fidl::Error> {
13141 let _result = self.send_raw(result);
13142 self.drop_without_shutdown();
13143 _result
13144 }
13145
13146 fn send_raw(
13147 &self,
13148 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13149 ) -> Result<(), fidl::Error> {
13150 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
13151 result,
13152 self.tx_id,
13153 0x3d4396a638ea053b,
13154 fidl::encoding::DynamicFlags::empty(),
13155 )
13156 }
13157}
13158
13159#[must_use = "FIDL methods require a response to be sent"]
13160#[derive(Debug)]
13161pub struct NodeUpdateAttributesResponder {
13162 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13163 tx_id: u32,
13164}
13165
13166impl std::ops::Drop for NodeUpdateAttributesResponder {
13170 fn drop(&mut self) {
13171 self.control_handle.shutdown();
13172 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13174 }
13175}
13176
13177impl fdomain_client::fidl::Responder for NodeUpdateAttributesResponder {
13178 type ControlHandle = NodeControlHandle;
13179
13180 fn control_handle(&self) -> &NodeControlHandle {
13181 &self.control_handle
13182 }
13183
13184 fn drop_without_shutdown(mut self) {
13185 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13187 std::mem::forget(self);
13189 }
13190}
13191
13192impl NodeUpdateAttributesResponder {
13193 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13197 let _result = self.send_raw(result);
13198 if _result.is_err() {
13199 self.control_handle.shutdown();
13200 }
13201 self.drop_without_shutdown();
13202 _result
13203 }
13204
13205 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13207 let _result = self.send_raw(result);
13208 self.drop_without_shutdown();
13209 _result
13210 }
13211
13212 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13213 self.control_handle
13214 .inner
13215 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13216 result,
13217 self.tx_id,
13218 0x3308c1da5a89bf08,
13219 fidl::encoding::DynamicFlags::empty(),
13220 )
13221 }
13222}
13223
13224#[must_use = "FIDL methods require a response to be sent"]
13225#[derive(Debug)]
13226pub struct NodeSyncResponder {
13227 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13228 tx_id: u32,
13229}
13230
13231impl std::ops::Drop for NodeSyncResponder {
13235 fn drop(&mut self) {
13236 self.control_handle.shutdown();
13237 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13239 }
13240}
13241
13242impl fdomain_client::fidl::Responder for NodeSyncResponder {
13243 type ControlHandle = NodeControlHandle;
13244
13245 fn control_handle(&self) -> &NodeControlHandle {
13246 &self.control_handle
13247 }
13248
13249 fn drop_without_shutdown(mut self) {
13250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13252 std::mem::forget(self);
13254 }
13255}
13256
13257impl NodeSyncResponder {
13258 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13262 let _result = self.send_raw(result);
13263 if _result.is_err() {
13264 self.control_handle.shutdown();
13265 }
13266 self.drop_without_shutdown();
13267 _result
13268 }
13269
13270 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13272 let _result = self.send_raw(result);
13273 self.drop_without_shutdown();
13274 _result
13275 }
13276
13277 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13278 self.control_handle
13279 .inner
13280 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13281 result,
13282 self.tx_id,
13283 0x2c5c27ca0ab5dc49,
13284 fidl::encoding::DynamicFlags::empty(),
13285 )
13286 }
13287}
13288
13289#[must_use = "FIDL methods require a response to be sent"]
13290#[derive(Debug)]
13291pub struct NodeGetExtendedAttributeResponder {
13292 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13293 tx_id: u32,
13294}
13295
13296impl std::ops::Drop for NodeGetExtendedAttributeResponder {
13300 fn drop(&mut self) {
13301 self.control_handle.shutdown();
13302 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13304 }
13305}
13306
13307impl fdomain_client::fidl::Responder for NodeGetExtendedAttributeResponder {
13308 type ControlHandle = NodeControlHandle;
13309
13310 fn control_handle(&self) -> &NodeControlHandle {
13311 &self.control_handle
13312 }
13313
13314 fn drop_without_shutdown(mut self) {
13315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13317 std::mem::forget(self);
13319 }
13320}
13321
13322impl NodeGetExtendedAttributeResponder {
13323 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13327 let _result = self.send_raw(result);
13328 if _result.is_err() {
13329 self.control_handle.shutdown();
13330 }
13331 self.drop_without_shutdown();
13332 _result
13333 }
13334
13335 pub fn send_no_shutdown_on_err(
13337 self,
13338 mut result: Result<ExtendedAttributeValue, i32>,
13339 ) -> Result<(), fidl::Error> {
13340 let _result = self.send_raw(result);
13341 self.drop_without_shutdown();
13342 _result
13343 }
13344
13345 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13346 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
13347 result.as_mut().map_err(|e| *e),
13348 self.tx_id,
13349 0x45ffa3ccfdeb76db,
13350 fidl::encoding::DynamicFlags::empty(),
13351 )
13352 }
13353}
13354
13355#[must_use = "FIDL methods require a response to be sent"]
13356#[derive(Debug)]
13357pub struct NodeSetExtendedAttributeResponder {
13358 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13359 tx_id: u32,
13360}
13361
13362impl std::ops::Drop for NodeSetExtendedAttributeResponder {
13366 fn drop(&mut self) {
13367 self.control_handle.shutdown();
13368 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13370 }
13371}
13372
13373impl fdomain_client::fidl::Responder for NodeSetExtendedAttributeResponder {
13374 type ControlHandle = NodeControlHandle;
13375
13376 fn control_handle(&self) -> &NodeControlHandle {
13377 &self.control_handle
13378 }
13379
13380 fn drop_without_shutdown(mut self) {
13381 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13383 std::mem::forget(self);
13385 }
13386}
13387
13388impl NodeSetExtendedAttributeResponder {
13389 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13393 let _result = self.send_raw(result);
13394 if _result.is_err() {
13395 self.control_handle.shutdown();
13396 }
13397 self.drop_without_shutdown();
13398 _result
13399 }
13400
13401 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13403 let _result = self.send_raw(result);
13404 self.drop_without_shutdown();
13405 _result
13406 }
13407
13408 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13409 self.control_handle
13410 .inner
13411 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13412 result,
13413 self.tx_id,
13414 0x4a951362f681f23c,
13415 fidl::encoding::DynamicFlags::empty(),
13416 )
13417 }
13418}
13419
13420#[must_use = "FIDL methods require a response to be sent"]
13421#[derive(Debug)]
13422pub struct NodeRemoveExtendedAttributeResponder {
13423 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13424 tx_id: u32,
13425}
13426
13427impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
13431 fn drop(&mut self) {
13432 self.control_handle.shutdown();
13433 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13435 }
13436}
13437
13438impl fdomain_client::fidl::Responder for NodeRemoveExtendedAttributeResponder {
13439 type ControlHandle = NodeControlHandle;
13440
13441 fn control_handle(&self) -> &NodeControlHandle {
13442 &self.control_handle
13443 }
13444
13445 fn drop_without_shutdown(mut self) {
13446 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13448 std::mem::forget(self);
13450 }
13451}
13452
13453impl NodeRemoveExtendedAttributeResponder {
13454 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13458 let _result = self.send_raw(result);
13459 if _result.is_err() {
13460 self.control_handle.shutdown();
13461 }
13462 self.drop_without_shutdown();
13463 _result
13464 }
13465
13466 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13468 let _result = self.send_raw(result);
13469 self.drop_without_shutdown();
13470 _result
13471 }
13472
13473 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13474 self.control_handle
13475 .inner
13476 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13477 result,
13478 self.tx_id,
13479 0x7a0b9f3a9bf9032d,
13480 fidl::encoding::DynamicFlags::empty(),
13481 )
13482 }
13483}
13484
13485#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13486pub struct OpenableMarker;
13487
13488impl fdomain_client::fidl::ProtocolMarker for OpenableMarker {
13489 type Proxy = OpenableProxy;
13490 type RequestStream = OpenableRequestStream;
13491
13492 const DEBUG_NAME: &'static str = "(anonymous) Openable";
13493}
13494
13495pub trait OpenableProxyInterface: Send + Sync {
13496 fn r#open(
13497 &self,
13498 path: &str,
13499 flags: Flags,
13500 options: &Options,
13501 object: fdomain_client::Channel,
13502 ) -> Result<(), fidl::Error>;
13503}
13504
13505#[derive(Debug, Clone)]
13506pub struct OpenableProxy {
13507 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13508}
13509
13510impl fdomain_client::fidl::Proxy for OpenableProxy {
13511 type Protocol = OpenableMarker;
13512
13513 fn from_channel(inner: fdomain_client::Channel) -> Self {
13514 Self::new(inner)
13515 }
13516
13517 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13518 self.client.into_channel().map_err(|client| Self { client })
13519 }
13520
13521 fn as_channel(&self) -> &fdomain_client::Channel {
13522 self.client.as_channel()
13523 }
13524}
13525
13526impl OpenableProxy {
13527 pub fn new(channel: fdomain_client::Channel) -> Self {
13529 let protocol_name = <OpenableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13530 Self { client: fidl::client::Client::new(channel, protocol_name) }
13531 }
13532
13533 pub fn take_event_stream(&self) -> OpenableEventStream {
13539 OpenableEventStream { event_receiver: self.client.take_event_receiver() }
13540 }
13541
13542 pub fn r#open(
13549 &self,
13550 mut path: &str,
13551 mut flags: Flags,
13552 mut options: &Options,
13553 mut object: fdomain_client::Channel,
13554 ) -> Result<(), fidl::Error> {
13555 OpenableProxyInterface::r#open(self, path, flags, options, object)
13556 }
13557}
13558
13559impl OpenableProxyInterface for OpenableProxy {
13560 fn r#open(
13561 &self,
13562 mut path: &str,
13563 mut flags: Flags,
13564 mut options: &Options,
13565 mut object: fdomain_client::Channel,
13566 ) -> Result<(), fidl::Error> {
13567 self.client.send::<OpenableOpenRequest>(
13568 (path, flags, options, object),
13569 0x568ddcb9a9cbb6d9,
13570 fidl::encoding::DynamicFlags::FLEXIBLE,
13571 )
13572 }
13573}
13574
13575pub struct OpenableEventStream {
13576 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13577}
13578
13579impl std::marker::Unpin for OpenableEventStream {}
13580
13581impl futures::stream::FusedStream for OpenableEventStream {
13582 fn is_terminated(&self) -> bool {
13583 self.event_receiver.is_terminated()
13584 }
13585}
13586
13587impl futures::Stream for OpenableEventStream {
13588 type Item = Result<OpenableEvent, fidl::Error>;
13589
13590 fn poll_next(
13591 mut self: std::pin::Pin<&mut Self>,
13592 cx: &mut std::task::Context<'_>,
13593 ) -> std::task::Poll<Option<Self::Item>> {
13594 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13595 &mut self.event_receiver,
13596 cx
13597 )?) {
13598 Some(buf) => std::task::Poll::Ready(Some(OpenableEvent::decode(buf))),
13599 None => std::task::Poll::Ready(None),
13600 }
13601 }
13602}
13603
13604#[derive(Debug)]
13605pub enum OpenableEvent {
13606 #[non_exhaustive]
13607 _UnknownEvent {
13608 ordinal: u64,
13610 },
13611}
13612
13613impl OpenableEvent {
13614 fn decode(
13616 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13617 ) -> Result<OpenableEvent, fidl::Error> {
13618 let (bytes, _handles) = buf.split_mut();
13619 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13620 debug_assert_eq!(tx_header.tx_id, 0);
13621 match tx_header.ordinal {
13622 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
13623 Ok(OpenableEvent::_UnknownEvent { ordinal: tx_header.ordinal })
13624 }
13625 _ => Err(fidl::Error::UnknownOrdinal {
13626 ordinal: tx_header.ordinal,
13627 protocol_name: <OpenableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13628 }),
13629 }
13630 }
13631}
13632
13633pub struct OpenableRequestStream {
13635 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13636 is_terminated: bool,
13637}
13638
13639impl std::marker::Unpin for OpenableRequestStream {}
13640
13641impl futures::stream::FusedStream for OpenableRequestStream {
13642 fn is_terminated(&self) -> bool {
13643 self.is_terminated
13644 }
13645}
13646
13647impl fdomain_client::fidl::RequestStream for OpenableRequestStream {
13648 type Protocol = OpenableMarker;
13649 type ControlHandle = OpenableControlHandle;
13650
13651 fn from_channel(channel: fdomain_client::Channel) -> Self {
13652 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
13653 }
13654
13655 fn control_handle(&self) -> Self::ControlHandle {
13656 OpenableControlHandle { inner: self.inner.clone() }
13657 }
13658
13659 fn into_inner(
13660 self,
13661 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
13662 {
13663 (self.inner, self.is_terminated)
13664 }
13665
13666 fn from_inner(
13667 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13668 is_terminated: bool,
13669 ) -> Self {
13670 Self { inner, is_terminated }
13671 }
13672}
13673
13674impl futures::Stream for OpenableRequestStream {
13675 type Item = Result<OpenableRequest, fidl::Error>;
13676
13677 fn poll_next(
13678 mut self: std::pin::Pin<&mut Self>,
13679 cx: &mut std::task::Context<'_>,
13680 ) -> std::task::Poll<Option<Self::Item>> {
13681 let this = &mut *self;
13682 if this.inner.check_shutdown(cx) {
13683 this.is_terminated = true;
13684 return std::task::Poll::Ready(None);
13685 }
13686 if this.is_terminated {
13687 panic!("polled OpenableRequestStream after completion");
13688 }
13689 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
13690 |bytes, handles| {
13691 match this.inner.channel().read_etc(cx, bytes, handles) {
13692 std::task::Poll::Ready(Ok(())) => {}
13693 std::task::Poll::Pending => return std::task::Poll::Pending,
13694 std::task::Poll::Ready(Err(None)) => {
13695 this.is_terminated = true;
13696 return std::task::Poll::Ready(None);
13697 }
13698 std::task::Poll::Ready(Err(Some(e))) => {
13699 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
13700 e.into(),
13701 ))));
13702 }
13703 }
13704
13705 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13707
13708 std::task::Poll::Ready(Some(match header.ordinal {
13709 0x568ddcb9a9cbb6d9 => {
13710 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
13711 let mut req = fidl::new_empty!(
13712 OpenableOpenRequest,
13713 fdomain_client::fidl::FDomainResourceDialect
13714 );
13715 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
13716 let control_handle = OpenableControlHandle { inner: this.inner.clone() };
13717 Ok(OpenableRequest::Open {
13718 path: req.path,
13719 flags: req.flags,
13720 options: req.options,
13721 object: req.object,
13722
13723 control_handle,
13724 })
13725 }
13726 _ if header.tx_id == 0
13727 && header
13728 .dynamic_flags()
13729 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
13730 {
13731 Ok(OpenableRequest::_UnknownMethod {
13732 ordinal: header.ordinal,
13733 control_handle: OpenableControlHandle { inner: this.inner.clone() },
13734 method_type: fidl::MethodType::OneWay,
13735 })
13736 }
13737 _ if header
13738 .dynamic_flags()
13739 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
13740 {
13741 this.inner.send_framework_err(
13742 fidl::encoding::FrameworkErr::UnknownMethod,
13743 header.tx_id,
13744 header.ordinal,
13745 header.dynamic_flags(),
13746 (bytes, handles),
13747 )?;
13748 Ok(OpenableRequest::_UnknownMethod {
13749 ordinal: header.ordinal,
13750 control_handle: OpenableControlHandle { inner: this.inner.clone() },
13751 method_type: fidl::MethodType::TwoWay,
13752 })
13753 }
13754 _ => Err(fidl::Error::UnknownOrdinal {
13755 ordinal: header.ordinal,
13756 protocol_name:
13757 <OpenableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13758 }),
13759 }))
13760 },
13761 )
13762 }
13763}
13764
13765#[derive(Debug)]
13767pub enum OpenableRequest {
13768 Open {
13775 path: String,
13776 flags: Flags,
13777 options: Options,
13778 object: fdomain_client::Channel,
13779 control_handle: OpenableControlHandle,
13780 },
13781 #[non_exhaustive]
13783 _UnknownMethod {
13784 ordinal: u64,
13786 control_handle: OpenableControlHandle,
13787 method_type: fidl::MethodType,
13788 },
13789}
13790
13791impl OpenableRequest {
13792 #[allow(irrefutable_let_patterns)]
13793 pub fn into_open(
13794 self,
13795 ) -> Option<(String, Flags, Options, fdomain_client::Channel, OpenableControlHandle)> {
13796 if let OpenableRequest::Open { path, flags, options, object, control_handle } = self {
13797 Some((path, flags, options, object, control_handle))
13798 } else {
13799 None
13800 }
13801 }
13802
13803 pub fn method_name(&self) -> &'static str {
13805 match *self {
13806 OpenableRequest::Open { .. } => "open",
13807 OpenableRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
13808 "unknown one-way method"
13809 }
13810 OpenableRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
13811 "unknown two-way method"
13812 }
13813 }
13814 }
13815}
13816
13817#[derive(Debug, Clone)]
13818pub struct OpenableControlHandle {
13819 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13820}
13821
13822impl fdomain_client::fidl::ControlHandle for OpenableControlHandle {
13823 fn shutdown(&self) {
13824 self.inner.shutdown()
13825 }
13826
13827 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
13828 self.inner.shutdown_with_epitaph(status)
13829 }
13830
13831 fn is_closed(&self) -> bool {
13832 self.inner.channel().is_closed()
13833 }
13834 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
13835 self.inner.channel().on_closed()
13836 }
13837}
13838
13839impl OpenableControlHandle {}
13840
13841#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13842pub struct ReadableMarker;
13843
13844impl fdomain_client::fidl::ProtocolMarker for ReadableMarker {
13845 type Proxy = ReadableProxy;
13846 type RequestStream = ReadableRequestStream;
13847
13848 const DEBUG_NAME: &'static str = "(anonymous) Readable";
13849}
13850pub type ReadableReadResult = Result<Vec<u8>, i32>;
13851
13852pub trait ReadableProxyInterface: Send + Sync {
13853 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
13854 + Send;
13855 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
13856}
13857
13858#[derive(Debug, Clone)]
13859pub struct ReadableProxy {
13860 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13861}
13862
13863impl fdomain_client::fidl::Proxy for ReadableProxy {
13864 type Protocol = ReadableMarker;
13865
13866 fn from_channel(inner: fdomain_client::Channel) -> Self {
13867 Self::new(inner)
13868 }
13869
13870 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13871 self.client.into_channel().map_err(|client| Self { client })
13872 }
13873
13874 fn as_channel(&self) -> &fdomain_client::Channel {
13875 self.client.as_channel()
13876 }
13877}
13878
13879impl ReadableProxy {
13880 pub fn new(channel: fdomain_client::Channel) -> Self {
13882 let protocol_name = <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13883 Self { client: fidl::client::Client::new(channel, protocol_name) }
13884 }
13885
13886 pub fn take_event_stream(&self) -> ReadableEventStream {
13892 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
13893 }
13894
13895 pub fn r#read(
13914 &self,
13915 mut count: u64,
13916 ) -> fidl::client::QueryResponseFut<
13917 ReadableReadResult,
13918 fdomain_client::fidl::FDomainResourceDialect,
13919 > {
13920 ReadableProxyInterface::r#read(self, count)
13921 }
13922}
13923
13924impl ReadableProxyInterface for ReadableProxy {
13925 type ReadResponseFut = fidl::client::QueryResponseFut<
13926 ReadableReadResult,
13927 fdomain_client::fidl::FDomainResourceDialect,
13928 >;
13929 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
13930 fn _decode(
13931 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13932 ) -> Result<ReadableReadResult, fidl::Error> {
13933 let _response = fidl::client::decode_transaction_body::<
13934 fidl::encoding::ResultType<ReadableReadResponse, i32>,
13935 fdomain_client::fidl::FDomainResourceDialect,
13936 0x57e419a298c8ede,
13937 >(_buf?)?;
13938 Ok(_response.map(|x| x.data))
13939 }
13940 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
13941 (count,),
13942 0x57e419a298c8ede,
13943 fidl::encoding::DynamicFlags::empty(),
13944 _decode,
13945 )
13946 }
13947}
13948
13949pub struct ReadableEventStream {
13950 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13951}
13952
13953impl std::marker::Unpin for ReadableEventStream {}
13954
13955impl futures::stream::FusedStream for ReadableEventStream {
13956 fn is_terminated(&self) -> bool {
13957 self.event_receiver.is_terminated()
13958 }
13959}
13960
13961impl futures::Stream for ReadableEventStream {
13962 type Item = Result<ReadableEvent, fidl::Error>;
13963
13964 fn poll_next(
13965 mut self: std::pin::Pin<&mut Self>,
13966 cx: &mut std::task::Context<'_>,
13967 ) -> std::task::Poll<Option<Self::Item>> {
13968 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13969 &mut self.event_receiver,
13970 cx
13971 )?) {
13972 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
13973 None => std::task::Poll::Ready(None),
13974 }
13975 }
13976}
13977
13978#[derive(Debug)]
13979pub enum ReadableEvent {}
13980
13981impl ReadableEvent {
13982 fn decode(
13984 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13985 ) -> Result<ReadableEvent, fidl::Error> {
13986 let (bytes, _handles) = buf.split_mut();
13987 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13988 debug_assert_eq!(tx_header.tx_id, 0);
13989 match tx_header.ordinal {
13990 _ => Err(fidl::Error::UnknownOrdinal {
13991 ordinal: tx_header.ordinal,
13992 protocol_name: <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13993 }),
13994 }
13995 }
13996}
13997
13998pub struct ReadableRequestStream {
14000 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14001 is_terminated: bool,
14002}
14003
14004impl std::marker::Unpin for ReadableRequestStream {}
14005
14006impl futures::stream::FusedStream for ReadableRequestStream {
14007 fn is_terminated(&self) -> bool {
14008 self.is_terminated
14009 }
14010}
14011
14012impl fdomain_client::fidl::RequestStream for ReadableRequestStream {
14013 type Protocol = ReadableMarker;
14014 type ControlHandle = ReadableControlHandle;
14015
14016 fn from_channel(channel: fdomain_client::Channel) -> Self {
14017 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14018 }
14019
14020 fn control_handle(&self) -> Self::ControlHandle {
14021 ReadableControlHandle { inner: self.inner.clone() }
14022 }
14023
14024 fn into_inner(
14025 self,
14026 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
14027 {
14028 (self.inner, self.is_terminated)
14029 }
14030
14031 fn from_inner(
14032 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14033 is_terminated: bool,
14034 ) -> Self {
14035 Self { inner, is_terminated }
14036 }
14037}
14038
14039impl futures::Stream for ReadableRequestStream {
14040 type Item = Result<ReadableRequest, fidl::Error>;
14041
14042 fn poll_next(
14043 mut self: std::pin::Pin<&mut Self>,
14044 cx: &mut std::task::Context<'_>,
14045 ) -> std::task::Poll<Option<Self::Item>> {
14046 let this = &mut *self;
14047 if this.inner.check_shutdown(cx) {
14048 this.is_terminated = true;
14049 return std::task::Poll::Ready(None);
14050 }
14051 if this.is_terminated {
14052 panic!("polled ReadableRequestStream after completion");
14053 }
14054 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
14055 |bytes, handles| {
14056 match this.inner.channel().read_etc(cx, bytes, handles) {
14057 std::task::Poll::Ready(Ok(())) => {}
14058 std::task::Poll::Pending => return std::task::Poll::Pending,
14059 std::task::Poll::Ready(Err(None)) => {
14060 this.is_terminated = true;
14061 return std::task::Poll::Ready(None);
14062 }
14063 std::task::Poll::Ready(Err(Some(e))) => {
14064 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14065 e.into(),
14066 ))));
14067 }
14068 }
14069
14070 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14072
14073 std::task::Poll::Ready(Some(match header.ordinal {
14074 0x57e419a298c8ede => {
14075 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14076 let mut req = fidl::new_empty!(
14077 ReadableReadRequest,
14078 fdomain_client::fidl::FDomainResourceDialect
14079 );
14080 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
14081 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
14082 Ok(ReadableRequest::Read {
14083 count: req.count,
14084
14085 responder: ReadableReadResponder {
14086 control_handle: std::mem::ManuallyDrop::new(control_handle),
14087 tx_id: header.tx_id,
14088 },
14089 })
14090 }
14091 _ => Err(fidl::Error::UnknownOrdinal {
14092 ordinal: header.ordinal,
14093 protocol_name:
14094 <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
14095 }),
14096 }))
14097 },
14098 )
14099 }
14100}
14101
14102#[derive(Debug)]
14103pub enum ReadableRequest {
14104 Read { count: u64, responder: ReadableReadResponder },
14123}
14124
14125impl ReadableRequest {
14126 #[allow(irrefutable_let_patterns)]
14127 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
14128 if let ReadableRequest::Read { count, responder } = self {
14129 Some((count, responder))
14130 } else {
14131 None
14132 }
14133 }
14134
14135 pub fn method_name(&self) -> &'static str {
14137 match *self {
14138 ReadableRequest::Read { .. } => "read",
14139 }
14140 }
14141}
14142
14143#[derive(Debug, Clone)]
14144pub struct ReadableControlHandle {
14145 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14146}
14147
14148impl fdomain_client::fidl::ControlHandle for ReadableControlHandle {
14149 fn shutdown(&self) {
14150 self.inner.shutdown()
14151 }
14152
14153 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
14154 self.inner.shutdown_with_epitaph(status)
14155 }
14156
14157 fn is_closed(&self) -> bool {
14158 self.inner.channel().is_closed()
14159 }
14160 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
14161 self.inner.channel().on_closed()
14162 }
14163}
14164
14165impl ReadableControlHandle {}
14166
14167#[must_use = "FIDL methods require a response to be sent"]
14168#[derive(Debug)]
14169pub struct ReadableReadResponder {
14170 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
14171 tx_id: u32,
14172}
14173
14174impl std::ops::Drop for ReadableReadResponder {
14178 fn drop(&mut self) {
14179 self.control_handle.shutdown();
14180 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14182 }
14183}
14184
14185impl fdomain_client::fidl::Responder for ReadableReadResponder {
14186 type ControlHandle = ReadableControlHandle;
14187
14188 fn control_handle(&self) -> &ReadableControlHandle {
14189 &self.control_handle
14190 }
14191
14192 fn drop_without_shutdown(mut self) {
14193 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14195 std::mem::forget(self);
14197 }
14198}
14199
14200impl ReadableReadResponder {
14201 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
14205 let _result = self.send_raw(result);
14206 if _result.is_err() {
14207 self.control_handle.shutdown();
14208 }
14209 self.drop_without_shutdown();
14210 _result
14211 }
14212
14213 pub fn send_no_shutdown_on_err(
14215 self,
14216 mut result: Result<&[u8], i32>,
14217 ) -> Result<(), fidl::Error> {
14218 let _result = self.send_raw(result);
14219 self.drop_without_shutdown();
14220 _result
14221 }
14222
14223 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
14224 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
14225 result.map(|data| (data,)),
14226 self.tx_id,
14227 0x57e419a298c8ede,
14228 fidl::encoding::DynamicFlags::empty(),
14229 )
14230 }
14231}
14232
14233#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
14234pub struct SymlinkMarker;
14235
14236impl fdomain_client::fidl::ProtocolMarker for SymlinkMarker {
14237 type Proxy = SymlinkProxy;
14238 type RequestStream = SymlinkRequestStream;
14239
14240 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
14241}
14242impl fdomain_client::fidl::DiscoverableProtocolMarker for SymlinkMarker {}
14243
14244pub trait SymlinkProxyInterface: Send + Sync {
14245 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
14246 + Send;
14247 fn r#link_into(
14248 &self,
14249 dst_parent_token: fdomain_client::Event,
14250 dst: &str,
14251 ) -> Self::LinkIntoResponseFut;
14252 fn r#clone(
14253 &self,
14254 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14255 ) -> Result<(), fidl::Error>;
14256 type CloseResponseFut: std::future::Future<
14257 Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
14258 > + Send;
14259 fn r#close(&self) -> Self::CloseResponseFut;
14260 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
14261 fn r#query(&self) -> Self::QueryResponseFut;
14262 fn r#deprecated_clone(
14263 &self,
14264 flags: OpenFlags,
14265 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14266 ) -> Result<(), fidl::Error>;
14267 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
14268 + Send;
14269 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
14270 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
14271 fn r#deprecated_set_attr(
14272 &self,
14273 flags: NodeAttributeFlags,
14274 attributes: &NodeAttributes,
14275 ) -> Self::DeprecatedSetAttrResponseFut;
14276 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
14277 + Send;
14278 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
14279 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
14280 + Send;
14281 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
14282 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
14283 + Send;
14284 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
14285 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
14286 + Send;
14287 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
14288 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
14289 + Send;
14290 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
14291 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
14292 + Send;
14293 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
14294 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
14295 + Send;
14296 fn r#update_attributes(
14297 &self,
14298 payload: &MutableNodeAttributes,
14299 ) -> Self::UpdateAttributesResponseFut;
14300 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
14301 fn r#sync(&self) -> Self::SyncResponseFut;
14302 fn r#list_extended_attributes(
14303 &self,
14304 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14305 ) -> Result<(), fidl::Error>;
14306 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
14307 + Send;
14308 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
14309 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
14310 + Send;
14311 fn r#set_extended_attribute(
14312 &self,
14313 name: &[u8],
14314 value: ExtendedAttributeValue,
14315 mode: SetExtendedAttributeMode,
14316 ) -> Self::SetExtendedAttributeResponseFut;
14317 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
14318 + Send;
14319 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
14320 fn r#open(
14321 &self,
14322 path: &str,
14323 flags: Flags,
14324 options: &Options,
14325 object: fdomain_client::Channel,
14326 ) -> Result<(), fidl::Error>;
14327 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
14328 fn r#describe(&self) -> Self::DescribeResponseFut;
14329}
14330
14331#[derive(Debug, Clone)]
14332pub struct SymlinkProxy {
14333 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
14334}
14335
14336impl fdomain_client::fidl::Proxy for SymlinkProxy {
14337 type Protocol = SymlinkMarker;
14338
14339 fn from_channel(inner: fdomain_client::Channel) -> Self {
14340 Self::new(inner)
14341 }
14342
14343 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
14344 self.client.into_channel().map_err(|client| Self { client })
14345 }
14346
14347 fn as_channel(&self) -> &fdomain_client::Channel {
14348 self.client.as_channel()
14349 }
14350}
14351
14352impl SymlinkProxy {
14353 pub fn new(channel: fdomain_client::Channel) -> Self {
14355 let protocol_name = <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
14356 Self { client: fidl::client::Client::new(channel, protocol_name) }
14357 }
14358
14359 pub fn take_event_stream(&self) -> SymlinkEventStream {
14365 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
14366 }
14367
14368 pub fn r#link_into(
14391 &self,
14392 mut dst_parent_token: fdomain_client::Event,
14393 mut dst: &str,
14394 ) -> fidl::client::QueryResponseFut<
14395 LinkableLinkIntoResult,
14396 fdomain_client::fidl::FDomainResourceDialect,
14397 > {
14398 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
14399 }
14400
14401 pub fn r#clone(
14402 &self,
14403 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14404 ) -> Result<(), fidl::Error> {
14405 SymlinkProxyInterface::r#clone(self, request)
14406 }
14407
14408 pub fn r#close(
14419 &self,
14420 ) -> fidl::client::QueryResponseFut<
14421 fdomain_fuchsia_unknown::CloseableCloseResult,
14422 fdomain_client::fidl::FDomainResourceDialect,
14423 > {
14424 SymlinkProxyInterface::r#close(self)
14425 }
14426
14427 pub fn r#query(
14428 &self,
14429 ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
14430 SymlinkProxyInterface::r#query(self)
14431 }
14432
14433 pub fn r#deprecated_clone(
14435 &self,
14436 mut flags: OpenFlags,
14437 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14438 ) -> Result<(), fidl::Error> {
14439 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
14440 }
14441
14442 pub fn r#deprecated_get_attr(
14444 &self,
14445 ) -> fidl::client::QueryResponseFut<
14446 (i32, NodeAttributes),
14447 fdomain_client::fidl::FDomainResourceDialect,
14448 > {
14449 SymlinkProxyInterface::r#deprecated_get_attr(self)
14450 }
14451
14452 pub fn r#deprecated_set_attr(
14454 &self,
14455 mut flags: NodeAttributeFlags,
14456 mut attributes: &NodeAttributes,
14457 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14458 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
14459 }
14460
14461 pub fn r#deprecated_get_flags(
14463 &self,
14464 ) -> fidl::client::QueryResponseFut<
14465 (i32, OpenFlags),
14466 fdomain_client::fidl::FDomainResourceDialect,
14467 > {
14468 SymlinkProxyInterface::r#deprecated_get_flags(self)
14469 }
14470
14471 pub fn r#deprecated_set_flags(
14473 &self,
14474 mut flags: OpenFlags,
14475 ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14476 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
14477 }
14478
14479 pub fn r#get_flags(
14488 &self,
14489 ) -> fidl::client::QueryResponseFut<
14490 NodeGetFlagsResult,
14491 fdomain_client::fidl::FDomainResourceDialect,
14492 > {
14493 SymlinkProxyInterface::r#get_flags(self)
14494 }
14495
14496 pub fn r#set_flags(
14506 &self,
14507 mut flags: Flags,
14508 ) -> fidl::client::QueryResponseFut<
14509 NodeSetFlagsResult,
14510 fdomain_client::fidl::FDomainResourceDialect,
14511 > {
14512 SymlinkProxyInterface::r#set_flags(self, flags)
14513 }
14514
14515 pub fn r#query_filesystem(
14519 &self,
14520 ) -> fidl::client::QueryResponseFut<
14521 (i32, Option<Box<FilesystemInfo>>),
14522 fdomain_client::fidl::FDomainResourceDialect,
14523 > {
14524 SymlinkProxyInterface::r#query_filesystem(self)
14525 }
14526
14527 pub fn r#get_attributes(
14541 &self,
14542 mut query: NodeAttributesQuery,
14543 ) -> fidl::client::QueryResponseFut<
14544 NodeGetAttributesResult,
14545 fdomain_client::fidl::FDomainResourceDialect,
14546 > {
14547 SymlinkProxyInterface::r#get_attributes(self, query)
14548 }
14549
14550 pub fn r#update_attributes(
14559 &self,
14560 mut payload: &MutableNodeAttributes,
14561 ) -> fidl::client::QueryResponseFut<
14562 NodeUpdateAttributesResult,
14563 fdomain_client::fidl::FDomainResourceDialect,
14564 > {
14565 SymlinkProxyInterface::r#update_attributes(self, payload)
14566 }
14567
14568 pub fn r#sync(
14578 &self,
14579 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
14580 {
14581 SymlinkProxyInterface::r#sync(self)
14582 }
14583
14584 pub fn r#list_extended_attributes(
14593 &self,
14594 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14595 ) -> Result<(), fidl::Error> {
14596 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
14597 }
14598
14599 pub fn r#get_extended_attribute(
14606 &self,
14607 mut name: &[u8],
14608 ) -> fidl::client::QueryResponseFut<
14609 NodeGetExtendedAttributeResult,
14610 fdomain_client::fidl::FDomainResourceDialect,
14611 > {
14612 SymlinkProxyInterface::r#get_extended_attribute(self, name)
14613 }
14614
14615 pub fn r#set_extended_attribute(
14623 &self,
14624 mut name: &[u8],
14625 mut value: ExtendedAttributeValue,
14626 mut mode: SetExtendedAttributeMode,
14627 ) -> fidl::client::QueryResponseFut<
14628 NodeSetExtendedAttributeResult,
14629 fdomain_client::fidl::FDomainResourceDialect,
14630 > {
14631 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
14632 }
14633
14634 pub fn r#remove_extended_attribute(
14640 &self,
14641 mut name: &[u8],
14642 ) -> fidl::client::QueryResponseFut<
14643 NodeRemoveExtendedAttributeResult,
14644 fdomain_client::fidl::FDomainResourceDialect,
14645 > {
14646 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
14647 }
14648
14649 pub fn r#open(
14656 &self,
14657 mut path: &str,
14658 mut flags: Flags,
14659 mut options: &Options,
14660 mut object: fdomain_client::Channel,
14661 ) -> Result<(), fidl::Error> {
14662 SymlinkProxyInterface::r#open(self, path, flags, options, object)
14663 }
14664
14665 pub fn r#describe(
14666 &self,
14667 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>
14668 {
14669 SymlinkProxyInterface::r#describe(self)
14670 }
14671}
14672
14673impl SymlinkProxyInterface for SymlinkProxy {
14674 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
14675 LinkableLinkIntoResult,
14676 fdomain_client::fidl::FDomainResourceDialect,
14677 >;
14678 fn r#link_into(
14679 &self,
14680 mut dst_parent_token: fdomain_client::Event,
14681 mut dst: &str,
14682 ) -> Self::LinkIntoResponseFut {
14683 fn _decode(
14684 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14685 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
14686 let _response = fidl::client::decode_transaction_body::<
14687 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14688 fdomain_client::fidl::FDomainResourceDialect,
14689 0x54f3949246a03e74,
14690 >(_buf?)?;
14691 Ok(_response.map(|x| x))
14692 }
14693 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
14694 (dst_parent_token, dst),
14695 0x54f3949246a03e74,
14696 fidl::encoding::DynamicFlags::empty(),
14697 _decode,
14698 )
14699 }
14700
14701 fn r#clone(
14702 &self,
14703 mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14704 ) -> Result<(), fidl::Error> {
14705 self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
14706 (request,),
14707 0x20d8a7aba2168a79,
14708 fidl::encoding::DynamicFlags::empty(),
14709 )
14710 }
14711
14712 type CloseResponseFut = fidl::client::QueryResponseFut<
14713 fdomain_fuchsia_unknown::CloseableCloseResult,
14714 fdomain_client::fidl::FDomainResourceDialect,
14715 >;
14716 fn r#close(&self) -> Self::CloseResponseFut {
14717 fn _decode(
14718 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14719 ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
14720 let _response = fidl::client::decode_transaction_body::<
14721 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14722 fdomain_client::fidl::FDomainResourceDialect,
14723 0x5ac5d459ad7f657e,
14724 >(_buf?)?;
14725 Ok(_response.map(|x| x))
14726 }
14727 self.client.send_query_and_decode::<
14728 fidl::encoding::EmptyPayload,
14729 fdomain_fuchsia_unknown::CloseableCloseResult,
14730 >(
14731 (),
14732 0x5ac5d459ad7f657e,
14733 fidl::encoding::DynamicFlags::empty(),
14734 _decode,
14735 )
14736 }
14737
14738 type QueryResponseFut =
14739 fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
14740 fn r#query(&self) -> Self::QueryResponseFut {
14741 fn _decode(
14742 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14743 ) -> Result<Vec<u8>, fidl::Error> {
14744 let _response = fidl::client::decode_transaction_body::<
14745 fdomain_fuchsia_unknown::QueryableQueryResponse,
14746 fdomain_client::fidl::FDomainResourceDialect,
14747 0x2658edee9decfc06,
14748 >(_buf?)?;
14749 Ok(_response.protocol)
14750 }
14751 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14752 (),
14753 0x2658edee9decfc06,
14754 fidl::encoding::DynamicFlags::empty(),
14755 _decode,
14756 )
14757 }
14758
14759 fn r#deprecated_clone(
14760 &self,
14761 mut flags: OpenFlags,
14762 mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14763 ) -> Result<(), fidl::Error> {
14764 self.client.send::<NodeDeprecatedCloneRequest>(
14765 (flags, object),
14766 0x5a61678f293ce16f,
14767 fidl::encoding::DynamicFlags::FLEXIBLE,
14768 )
14769 }
14770
14771 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
14772 (i32, NodeAttributes),
14773 fdomain_client::fidl::FDomainResourceDialect,
14774 >;
14775 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
14776 fn _decode(
14777 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14778 ) -> Result<(i32, NodeAttributes), fidl::Error> {
14779 let _response = fidl::client::decode_transaction_body::<
14780 NodeDeprecatedGetAttrResponse,
14781 fdomain_client::fidl::FDomainResourceDialect,
14782 0x78985e216314dafd,
14783 >(_buf?)?;
14784 Ok((_response.s, _response.attributes))
14785 }
14786 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14787 (),
14788 0x78985e216314dafd,
14789 fidl::encoding::DynamicFlags::empty(),
14790 _decode,
14791 )
14792 }
14793
14794 type DeprecatedSetAttrResponseFut =
14795 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14796 fn r#deprecated_set_attr(
14797 &self,
14798 mut flags: NodeAttributeFlags,
14799 mut attributes: &NodeAttributes,
14800 ) -> Self::DeprecatedSetAttrResponseFut {
14801 fn _decode(
14802 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14803 ) -> Result<i32, fidl::Error> {
14804 let _response = fidl::client::decode_transaction_body::<
14805 NodeDeprecatedSetAttrResponse,
14806 fdomain_client::fidl::FDomainResourceDialect,
14807 0x4186c0f40d938f46,
14808 >(_buf?)?;
14809 Ok(_response.s)
14810 }
14811 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14812 (flags, attributes),
14813 0x4186c0f40d938f46,
14814 fidl::encoding::DynamicFlags::empty(),
14815 _decode,
14816 )
14817 }
14818
14819 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14820 (i32, OpenFlags),
14821 fdomain_client::fidl::FDomainResourceDialect,
14822 >;
14823 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14824 fn _decode(
14825 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14826 ) -> Result<(i32, OpenFlags), fidl::Error> {
14827 let _response = fidl::client::decode_transaction_body::<
14828 NodeDeprecatedGetFlagsResponse,
14829 fdomain_client::fidl::FDomainResourceDialect,
14830 0x5b88fffb8eda3aa1,
14831 >(_buf?)?;
14832 Ok((_response.s, _response.flags))
14833 }
14834 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14835 (),
14836 0x5b88fffb8eda3aa1,
14837 fidl::encoding::DynamicFlags::empty(),
14838 _decode,
14839 )
14840 }
14841
14842 type DeprecatedSetFlagsResponseFut =
14843 fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14844 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14845 fn _decode(
14846 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14847 ) -> Result<i32, fidl::Error> {
14848 let _response = fidl::client::decode_transaction_body::<
14849 NodeDeprecatedSetFlagsResponse,
14850 fdomain_client::fidl::FDomainResourceDialect,
14851 0x5295b76c71fde733,
14852 >(_buf?)?;
14853 Ok(_response.s)
14854 }
14855 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14856 (flags,),
14857 0x5295b76c71fde733,
14858 fidl::encoding::DynamicFlags::empty(),
14859 _decode,
14860 )
14861 }
14862
14863 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14864 NodeGetFlagsResult,
14865 fdomain_client::fidl::FDomainResourceDialect,
14866 >;
14867 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14868 fn _decode(
14869 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14870 ) -> Result<NodeGetFlagsResult, fidl::Error> {
14871 let _response = fidl::client::decode_transaction_body::<
14872 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14873 fdomain_client::fidl::FDomainResourceDialect,
14874 0x176eb318f64ec23,
14875 >(_buf?)?
14876 .into_result_fdomain::<SymlinkMarker>("get_flags")?;
14877 Ok(_response.map(|x| x.flags))
14878 }
14879 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14880 (),
14881 0x176eb318f64ec23,
14882 fidl::encoding::DynamicFlags::FLEXIBLE,
14883 _decode,
14884 )
14885 }
14886
14887 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14888 NodeSetFlagsResult,
14889 fdomain_client::fidl::FDomainResourceDialect,
14890 >;
14891 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14892 fn _decode(
14893 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14894 ) -> Result<NodeSetFlagsResult, fidl::Error> {
14895 let _response = fidl::client::decode_transaction_body::<
14896 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14897 fdomain_client::fidl::FDomainResourceDialect,
14898 0x55a8028685791ea8,
14899 >(_buf?)?
14900 .into_result_fdomain::<SymlinkMarker>("set_flags")?;
14901 Ok(_response.map(|x| x))
14902 }
14903 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14904 (flags,),
14905 0x55a8028685791ea8,
14906 fidl::encoding::DynamicFlags::FLEXIBLE,
14907 _decode,
14908 )
14909 }
14910
14911 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14912 (i32, Option<Box<FilesystemInfo>>),
14913 fdomain_client::fidl::FDomainResourceDialect,
14914 >;
14915 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14916 fn _decode(
14917 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14918 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14919 let _response = fidl::client::decode_transaction_body::<
14920 NodeQueryFilesystemResponse,
14921 fdomain_client::fidl::FDomainResourceDialect,
14922 0x6f344a1c6b0a0610,
14923 >(_buf?)?;
14924 Ok((_response.s, _response.info))
14925 }
14926 self.client.send_query_and_decode::<
14927 fidl::encoding::EmptyPayload,
14928 (i32, Option<Box<FilesystemInfo>>),
14929 >(
14930 (),
14931 0x6f344a1c6b0a0610,
14932 fidl::encoding::DynamicFlags::empty(),
14933 _decode,
14934 )
14935 }
14936
14937 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14938 NodeGetAttributesResult,
14939 fdomain_client::fidl::FDomainResourceDialect,
14940 >;
14941 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14942 fn _decode(
14943 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14944 ) -> Result<NodeGetAttributesResult, fidl::Error> {
14945 let _response = fidl::client::decode_transaction_body::<
14946 fidl::encoding::ResultType<NodeAttributes2, i32>,
14947 fdomain_client::fidl::FDomainResourceDialect,
14948 0x3d4396a638ea053b,
14949 >(_buf?)?;
14950 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14951 }
14952 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14953 (query,),
14954 0x3d4396a638ea053b,
14955 fidl::encoding::DynamicFlags::empty(),
14956 _decode,
14957 )
14958 }
14959
14960 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14961 NodeUpdateAttributesResult,
14962 fdomain_client::fidl::FDomainResourceDialect,
14963 >;
14964 fn r#update_attributes(
14965 &self,
14966 mut payload: &MutableNodeAttributes,
14967 ) -> Self::UpdateAttributesResponseFut {
14968 fn _decode(
14969 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14970 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14971 let _response = fidl::client::decode_transaction_body::<
14972 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14973 fdomain_client::fidl::FDomainResourceDialect,
14974 0x3308c1da5a89bf08,
14975 >(_buf?)?;
14976 Ok(_response.map(|x| x))
14977 }
14978 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14979 payload,
14980 0x3308c1da5a89bf08,
14981 fidl::encoding::DynamicFlags::empty(),
14982 _decode,
14983 )
14984 }
14985
14986 type SyncResponseFut = fidl::client::QueryResponseFut<
14987 NodeSyncResult,
14988 fdomain_client::fidl::FDomainResourceDialect,
14989 >;
14990 fn r#sync(&self) -> Self::SyncResponseFut {
14991 fn _decode(
14992 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14993 ) -> Result<NodeSyncResult, fidl::Error> {
14994 let _response = fidl::client::decode_transaction_body::<
14995 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14996 fdomain_client::fidl::FDomainResourceDialect,
14997 0x2c5c27ca0ab5dc49,
14998 >(_buf?)?;
14999 Ok(_response.map(|x| x))
15000 }
15001 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
15002 (),
15003 0x2c5c27ca0ab5dc49,
15004 fidl::encoding::DynamicFlags::empty(),
15005 _decode,
15006 )
15007 }
15008
15009 fn r#list_extended_attributes(
15010 &self,
15011 mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15012 ) -> Result<(), fidl::Error> {
15013 self.client.send::<NodeListExtendedAttributesRequest>(
15014 (iterator,),
15015 0x4b61033de007fcd0,
15016 fidl::encoding::DynamicFlags::empty(),
15017 )
15018 }
15019
15020 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
15021 NodeGetExtendedAttributeResult,
15022 fdomain_client::fidl::FDomainResourceDialect,
15023 >;
15024 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
15025 fn _decode(
15026 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
15027 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
15028 let _response = fidl::client::decode_transaction_body::<
15029 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
15030 fdomain_client::fidl::FDomainResourceDialect,
15031 0x45ffa3ccfdeb76db,
15032 >(_buf?)?;
15033 Ok(_response.map(|x| x))
15034 }
15035 self.client.send_query_and_decode::<
15036 NodeGetExtendedAttributeRequest,
15037 NodeGetExtendedAttributeResult,
15038 >(
15039 (name,),
15040 0x45ffa3ccfdeb76db,
15041 fidl::encoding::DynamicFlags::empty(),
15042 _decode,
15043 )
15044 }
15045
15046 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
15047 NodeSetExtendedAttributeResult,
15048 fdomain_client::fidl::FDomainResourceDialect,
15049 >;
15050 fn r#set_extended_attribute(
15051 &self,
15052 mut name: &[u8],
15053 mut value: ExtendedAttributeValue,
15054 mut mode: SetExtendedAttributeMode,
15055 ) -> Self::SetExtendedAttributeResponseFut {
15056 fn _decode(
15057 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
15058 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
15059 let _response = fidl::client::decode_transaction_body::<
15060 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
15061 fdomain_client::fidl::FDomainResourceDialect,
15062 0x4a951362f681f23c,
15063 >(_buf?)?;
15064 Ok(_response.map(|x| x))
15065 }
15066 self.client.send_query_and_decode::<
15067 NodeSetExtendedAttributeRequest,
15068 NodeSetExtendedAttributeResult,
15069 >(
15070 (name, &mut value, mode,),
15071 0x4a951362f681f23c,
15072 fidl::encoding::DynamicFlags::empty(),
15073 _decode,
15074 )
15075 }
15076
15077 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
15078 NodeRemoveExtendedAttributeResult,
15079 fdomain_client::fidl::FDomainResourceDialect,
15080 >;
15081 fn r#remove_extended_attribute(
15082 &self,
15083 mut name: &[u8],
15084 ) -> Self::RemoveExtendedAttributeResponseFut {
15085 fn _decode(
15086 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
15087 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
15088 let _response = fidl::client::decode_transaction_body::<
15089 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
15090 fdomain_client::fidl::FDomainResourceDialect,
15091 0x7a0b9f3a9bf9032d,
15092 >(_buf?)?;
15093 Ok(_response.map(|x| x))
15094 }
15095 self.client.send_query_and_decode::<
15096 NodeRemoveExtendedAttributeRequest,
15097 NodeRemoveExtendedAttributeResult,
15098 >(
15099 (name,),
15100 0x7a0b9f3a9bf9032d,
15101 fidl::encoding::DynamicFlags::empty(),
15102 _decode,
15103 )
15104 }
15105
15106 fn r#open(
15107 &self,
15108 mut path: &str,
15109 mut flags: Flags,
15110 mut options: &Options,
15111 mut object: fdomain_client::Channel,
15112 ) -> Result<(), fidl::Error> {
15113 self.client.send::<OpenableOpenRequest>(
15114 (path, flags, options, object),
15115 0x568ddcb9a9cbb6d9,
15116 fidl::encoding::DynamicFlags::FLEXIBLE,
15117 )
15118 }
15119
15120 type DescribeResponseFut =
15121 fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>;
15122 fn r#describe(&self) -> Self::DescribeResponseFut {
15123 fn _decode(
15124 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
15125 ) -> Result<SymlinkInfo, fidl::Error> {
15126 let _response = fidl::client::decode_transaction_body::<
15127 fidl::encoding::FlexibleType<SymlinkInfo>,
15128 fdomain_client::fidl::FDomainResourceDialect,
15129 0x742c2ea5e89831f3,
15130 >(_buf?)?
15131 .into_result_fdomain::<SymlinkMarker>("describe")?;
15132 Ok(_response)
15133 }
15134 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
15135 (),
15136 0x742c2ea5e89831f3,
15137 fidl::encoding::DynamicFlags::FLEXIBLE,
15138 _decode,
15139 )
15140 }
15141}
15142
15143pub struct SymlinkEventStream {
15144 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
15145}
15146
15147impl std::marker::Unpin for SymlinkEventStream {}
15148
15149impl futures::stream::FusedStream for SymlinkEventStream {
15150 fn is_terminated(&self) -> bool {
15151 self.event_receiver.is_terminated()
15152 }
15153}
15154
15155impl futures::Stream for SymlinkEventStream {
15156 type Item = Result<SymlinkEvent, fidl::Error>;
15157
15158 fn poll_next(
15159 mut self: std::pin::Pin<&mut Self>,
15160 cx: &mut std::task::Context<'_>,
15161 ) -> std::task::Poll<Option<Self::Item>> {
15162 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
15163 &mut self.event_receiver,
15164 cx
15165 )?) {
15166 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
15167 None => std::task::Poll::Ready(None),
15168 }
15169 }
15170}
15171
15172#[derive(Debug)]
15173pub enum SymlinkEvent {
15174 OnOpen_ {
15175 s: i32,
15176 info: Option<Box<NodeInfoDeprecated>>,
15177 },
15178 OnRepresentation {
15179 payload: Representation,
15180 },
15181 #[non_exhaustive]
15182 _UnknownEvent {
15183 ordinal: u64,
15185 },
15186}
15187
15188impl SymlinkEvent {
15189 #[allow(irrefutable_let_patterns)]
15190 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
15191 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
15192 }
15193 #[allow(irrefutable_let_patterns)]
15194 pub fn into_on_representation(self) -> Option<Representation> {
15195 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
15196 }
15197
15198 fn decode(
15200 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
15201 ) -> Result<SymlinkEvent, fidl::Error> {
15202 let (bytes, _handles) = buf.split_mut();
15203 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
15204 debug_assert_eq!(tx_header.tx_id, 0);
15205 match tx_header.ordinal {
15206 0x7fc7bbb1dbfd1972 => {
15207 let mut out = fidl::new_empty!(
15208 NodeOnOpenRequest,
15209 fdomain_client::fidl::FDomainResourceDialect
15210 );
15211 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
15212 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
15213 }
15214 0x5cb40567d80a510c => {
15215 let mut out =
15216 fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
15217 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
15218 Ok((SymlinkEvent::OnRepresentation { payload: out }))
15219 }
15220 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
15221 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
15222 }
15223 _ => Err(fidl::Error::UnknownOrdinal {
15224 ordinal: tx_header.ordinal,
15225 protocol_name: <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15226 }),
15227 }
15228 }
15229}
15230
15231pub struct SymlinkRequestStream {
15233 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15234 is_terminated: bool,
15235}
15236
15237impl std::marker::Unpin for SymlinkRequestStream {}
15238
15239impl futures::stream::FusedStream for SymlinkRequestStream {
15240 fn is_terminated(&self) -> bool {
15241 self.is_terminated
15242 }
15243}
15244
15245impl fdomain_client::fidl::RequestStream for SymlinkRequestStream {
15246 type Protocol = SymlinkMarker;
15247 type ControlHandle = SymlinkControlHandle;
15248
15249 fn from_channel(channel: fdomain_client::Channel) -> Self {
15250 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
15251 }
15252
15253 fn control_handle(&self) -> Self::ControlHandle {
15254 SymlinkControlHandle { inner: self.inner.clone() }
15255 }
15256
15257 fn into_inner(
15258 self,
15259 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
15260 {
15261 (self.inner, self.is_terminated)
15262 }
15263
15264 fn from_inner(
15265 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15266 is_terminated: bool,
15267 ) -> Self {
15268 Self { inner, is_terminated }
15269 }
15270}
15271
15272impl futures::Stream for SymlinkRequestStream {
15273 type Item = Result<SymlinkRequest, fidl::Error>;
15274
15275 fn poll_next(
15276 mut self: std::pin::Pin<&mut Self>,
15277 cx: &mut std::task::Context<'_>,
15278 ) -> std::task::Poll<Option<Self::Item>> {
15279 let this = &mut *self;
15280 if this.inner.check_shutdown(cx) {
15281 this.is_terminated = true;
15282 return std::task::Poll::Ready(None);
15283 }
15284 if this.is_terminated {
15285 panic!("polled SymlinkRequestStream after completion");
15286 }
15287 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
15288 |bytes, handles| {
15289 match this.inner.channel().read_etc(cx, bytes, handles) {
15290 std::task::Poll::Ready(Ok(())) => {}
15291 std::task::Poll::Pending => return std::task::Poll::Pending,
15292 std::task::Poll::Ready(Err(None)) => {
15293 this.is_terminated = true;
15294 return std::task::Poll::Ready(None);
15295 }
15296 std::task::Poll::Ready(Err(Some(e))) => {
15297 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
15298 e.into(),
15299 ))));
15300 }
15301 }
15302
15303 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
15305
15306 std::task::Poll::Ready(Some(match header.ordinal {
15307 0x54f3949246a03e74 => {
15308 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15309 let mut req = fidl::new_empty!(
15310 LinkableLinkIntoRequest,
15311 fdomain_client::fidl::FDomainResourceDialect
15312 );
15313 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
15314 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15315 Ok(SymlinkRequest::LinkInto {
15316 dst_parent_token: req.dst_parent_token,
15317 dst: req.dst,
15318
15319 responder: SymlinkLinkIntoResponder {
15320 control_handle: std::mem::ManuallyDrop::new(control_handle),
15321 tx_id: header.tx_id,
15322 },
15323 })
15324 }
15325 0x20d8a7aba2168a79 => {
15326 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15327 let mut req = fidl::new_empty!(
15328 fdomain_fuchsia_unknown::CloneableCloneRequest,
15329 fdomain_client::fidl::FDomainResourceDialect
15330 );
15331 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
15332 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15333 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
15334 }
15335 0x5ac5d459ad7f657e => {
15336 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15337 let mut req = fidl::new_empty!(
15338 fidl::encoding::EmptyPayload,
15339 fdomain_client::fidl::FDomainResourceDialect
15340 );
15341 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15342 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15343 Ok(SymlinkRequest::Close {
15344 responder: SymlinkCloseResponder {
15345 control_handle: std::mem::ManuallyDrop::new(control_handle),
15346 tx_id: header.tx_id,
15347 },
15348 })
15349 }
15350 0x2658edee9decfc06 => {
15351 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15352 let mut req = fidl::new_empty!(
15353 fidl::encoding::EmptyPayload,
15354 fdomain_client::fidl::FDomainResourceDialect
15355 );
15356 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15357 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15358 Ok(SymlinkRequest::Query {
15359 responder: SymlinkQueryResponder {
15360 control_handle: std::mem::ManuallyDrop::new(control_handle),
15361 tx_id: header.tx_id,
15362 },
15363 })
15364 }
15365 0x5a61678f293ce16f => {
15366 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15367 let mut req = fidl::new_empty!(
15368 NodeDeprecatedCloneRequest,
15369 fdomain_client::fidl::FDomainResourceDialect
15370 );
15371 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
15372 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15373 Ok(SymlinkRequest::DeprecatedClone {
15374 flags: req.flags,
15375 object: req.object,
15376
15377 control_handle,
15378 })
15379 }
15380 0x78985e216314dafd => {
15381 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15382 let mut req = fidl::new_empty!(
15383 fidl::encoding::EmptyPayload,
15384 fdomain_client::fidl::FDomainResourceDialect
15385 );
15386 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15387 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15388 Ok(SymlinkRequest::DeprecatedGetAttr {
15389 responder: SymlinkDeprecatedGetAttrResponder {
15390 control_handle: std::mem::ManuallyDrop::new(control_handle),
15391 tx_id: header.tx_id,
15392 },
15393 })
15394 }
15395 0x4186c0f40d938f46 => {
15396 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15397 let mut req = fidl::new_empty!(
15398 NodeDeprecatedSetAttrRequest,
15399 fdomain_client::fidl::FDomainResourceDialect
15400 );
15401 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
15402 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15403 Ok(SymlinkRequest::DeprecatedSetAttr {
15404 flags: req.flags,
15405 attributes: req.attributes,
15406
15407 responder: SymlinkDeprecatedSetAttrResponder {
15408 control_handle: std::mem::ManuallyDrop::new(control_handle),
15409 tx_id: header.tx_id,
15410 },
15411 })
15412 }
15413 0x5b88fffb8eda3aa1 => {
15414 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15415 let mut req = fidl::new_empty!(
15416 fidl::encoding::EmptyPayload,
15417 fdomain_client::fidl::FDomainResourceDialect
15418 );
15419 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15420 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15421 Ok(SymlinkRequest::DeprecatedGetFlags {
15422 responder: SymlinkDeprecatedGetFlagsResponder {
15423 control_handle: std::mem::ManuallyDrop::new(control_handle),
15424 tx_id: header.tx_id,
15425 },
15426 })
15427 }
15428 0x5295b76c71fde733 => {
15429 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15430 let mut req = fidl::new_empty!(
15431 NodeDeprecatedSetFlagsRequest,
15432 fdomain_client::fidl::FDomainResourceDialect
15433 );
15434 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15435 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15436 Ok(SymlinkRequest::DeprecatedSetFlags {
15437 flags: req.flags,
15438
15439 responder: SymlinkDeprecatedSetFlagsResponder {
15440 control_handle: std::mem::ManuallyDrop::new(control_handle),
15441 tx_id: header.tx_id,
15442 },
15443 })
15444 }
15445 0x176eb318f64ec23 => {
15446 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15447 let mut req = fidl::new_empty!(
15448 fidl::encoding::EmptyPayload,
15449 fdomain_client::fidl::FDomainResourceDialect
15450 );
15451 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15452 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15453 Ok(SymlinkRequest::GetFlags {
15454 responder: SymlinkGetFlagsResponder {
15455 control_handle: std::mem::ManuallyDrop::new(control_handle),
15456 tx_id: header.tx_id,
15457 },
15458 })
15459 }
15460 0x55a8028685791ea8 => {
15461 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15462 let mut req = fidl::new_empty!(
15463 NodeSetFlagsRequest,
15464 fdomain_client::fidl::FDomainResourceDialect
15465 );
15466 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15467 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15468 Ok(SymlinkRequest::SetFlags {
15469 flags: req.flags,
15470
15471 responder: SymlinkSetFlagsResponder {
15472 control_handle: std::mem::ManuallyDrop::new(control_handle),
15473 tx_id: header.tx_id,
15474 },
15475 })
15476 }
15477 0x6f344a1c6b0a0610 => {
15478 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15479 let mut req = fidl::new_empty!(
15480 fidl::encoding::EmptyPayload,
15481 fdomain_client::fidl::FDomainResourceDialect
15482 );
15483 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15484 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15485 Ok(SymlinkRequest::QueryFilesystem {
15486 responder: SymlinkQueryFilesystemResponder {
15487 control_handle: std::mem::ManuallyDrop::new(control_handle),
15488 tx_id: header.tx_id,
15489 },
15490 })
15491 }
15492 0x3d4396a638ea053b => {
15493 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15494 let mut req = fidl::new_empty!(
15495 NodeGetAttributesRequest,
15496 fdomain_client::fidl::FDomainResourceDialect
15497 );
15498 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15499 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15500 Ok(SymlinkRequest::GetAttributes {
15501 query: req.query,
15502
15503 responder: SymlinkGetAttributesResponder {
15504 control_handle: std::mem::ManuallyDrop::new(control_handle),
15505 tx_id: header.tx_id,
15506 },
15507 })
15508 }
15509 0x3308c1da5a89bf08 => {
15510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15511 let mut req = fidl::new_empty!(
15512 MutableNodeAttributes,
15513 fdomain_client::fidl::FDomainResourceDialect
15514 );
15515 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
15516 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15517 Ok(SymlinkRequest::UpdateAttributes {
15518 payload: req,
15519 responder: SymlinkUpdateAttributesResponder {
15520 control_handle: std::mem::ManuallyDrop::new(control_handle),
15521 tx_id: header.tx_id,
15522 },
15523 })
15524 }
15525 0x2c5c27ca0ab5dc49 => {
15526 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15527 let mut req = fidl::new_empty!(
15528 fidl::encoding::EmptyPayload,
15529 fdomain_client::fidl::FDomainResourceDialect
15530 );
15531 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15532 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15533 Ok(SymlinkRequest::Sync {
15534 responder: SymlinkSyncResponder {
15535 control_handle: std::mem::ManuallyDrop::new(control_handle),
15536 tx_id: header.tx_id,
15537 },
15538 })
15539 }
15540 0x4b61033de007fcd0 => {
15541 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15542 let mut req = fidl::new_empty!(
15543 NodeListExtendedAttributesRequest,
15544 fdomain_client::fidl::FDomainResourceDialect
15545 );
15546 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15547 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15548 Ok(SymlinkRequest::ListExtendedAttributes {
15549 iterator: req.iterator,
15550
15551 control_handle,
15552 })
15553 }
15554 0x45ffa3ccfdeb76db => {
15555 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15556 let mut req = fidl::new_empty!(
15557 NodeGetExtendedAttributeRequest,
15558 fdomain_client::fidl::FDomainResourceDialect
15559 );
15560 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15561 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15562 Ok(SymlinkRequest::GetExtendedAttribute {
15563 name: req.name,
15564
15565 responder: SymlinkGetExtendedAttributeResponder {
15566 control_handle: std::mem::ManuallyDrop::new(control_handle),
15567 tx_id: header.tx_id,
15568 },
15569 })
15570 }
15571 0x4a951362f681f23c => {
15572 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15573 let mut req = fidl::new_empty!(
15574 NodeSetExtendedAttributeRequest,
15575 fdomain_client::fidl::FDomainResourceDialect
15576 );
15577 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15578 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15579 Ok(SymlinkRequest::SetExtendedAttribute {
15580 name: req.name,
15581 value: req.value,
15582 mode: req.mode,
15583
15584 responder: SymlinkSetExtendedAttributeResponder {
15585 control_handle: std::mem::ManuallyDrop::new(control_handle),
15586 tx_id: header.tx_id,
15587 },
15588 })
15589 }
15590 0x7a0b9f3a9bf9032d => {
15591 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15592 let mut req = fidl::new_empty!(
15593 NodeRemoveExtendedAttributeRequest,
15594 fdomain_client::fidl::FDomainResourceDialect
15595 );
15596 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15597 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15598 Ok(SymlinkRequest::RemoveExtendedAttribute {
15599 name: req.name,
15600
15601 responder: SymlinkRemoveExtendedAttributeResponder {
15602 control_handle: std::mem::ManuallyDrop::new(control_handle),
15603 tx_id: header.tx_id,
15604 },
15605 })
15606 }
15607 0x568ddcb9a9cbb6d9 => {
15608 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15609 let mut req = fidl::new_empty!(
15610 OpenableOpenRequest,
15611 fdomain_client::fidl::FDomainResourceDialect
15612 );
15613 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
15614 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15615 Ok(SymlinkRequest::Open {
15616 path: req.path,
15617 flags: req.flags,
15618 options: req.options,
15619 object: req.object,
15620
15621 control_handle,
15622 })
15623 }
15624 0x742c2ea5e89831f3 => {
15625 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15626 let mut req = fidl::new_empty!(
15627 fidl::encoding::EmptyPayload,
15628 fdomain_client::fidl::FDomainResourceDialect
15629 );
15630 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15631 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15632 Ok(SymlinkRequest::Describe {
15633 responder: SymlinkDescribeResponder {
15634 control_handle: std::mem::ManuallyDrop::new(control_handle),
15635 tx_id: header.tx_id,
15636 },
15637 })
15638 }
15639 _ if header.tx_id == 0
15640 && header
15641 .dynamic_flags()
15642 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15643 {
15644 Ok(SymlinkRequest::_UnknownMethod {
15645 ordinal: header.ordinal,
15646 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15647 method_type: fidl::MethodType::OneWay,
15648 })
15649 }
15650 _ if header
15651 .dynamic_flags()
15652 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15653 {
15654 this.inner.send_framework_err(
15655 fidl::encoding::FrameworkErr::UnknownMethod,
15656 header.tx_id,
15657 header.ordinal,
15658 header.dynamic_flags(),
15659 (bytes, handles),
15660 )?;
15661 Ok(SymlinkRequest::_UnknownMethod {
15662 ordinal: header.ordinal,
15663 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15664 method_type: fidl::MethodType::TwoWay,
15665 })
15666 }
15667 _ => Err(fidl::Error::UnknownOrdinal {
15668 ordinal: header.ordinal,
15669 protocol_name:
15670 <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15671 }),
15672 }))
15673 },
15674 )
15675 }
15676}
15677
15678#[derive(Debug)]
15680pub enum SymlinkRequest {
15681 LinkInto {
15704 dst_parent_token: fdomain_client::Event,
15705 dst: String,
15706 responder: SymlinkLinkIntoResponder,
15707 },
15708 Clone {
15709 request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15710 control_handle: SymlinkControlHandle,
15711 },
15712 Close {
15723 responder: SymlinkCloseResponder,
15724 },
15725 Query {
15726 responder: SymlinkQueryResponder,
15727 },
15728 DeprecatedClone {
15730 flags: OpenFlags,
15731 object: fdomain_client::fidl::ServerEnd<NodeMarker>,
15732 control_handle: SymlinkControlHandle,
15733 },
15734 DeprecatedGetAttr {
15736 responder: SymlinkDeprecatedGetAttrResponder,
15737 },
15738 DeprecatedSetAttr {
15740 flags: NodeAttributeFlags,
15741 attributes: NodeAttributes,
15742 responder: SymlinkDeprecatedSetAttrResponder,
15743 },
15744 DeprecatedGetFlags {
15746 responder: SymlinkDeprecatedGetFlagsResponder,
15747 },
15748 DeprecatedSetFlags {
15750 flags: OpenFlags,
15751 responder: SymlinkDeprecatedSetFlagsResponder,
15752 },
15753 GetFlags {
15762 responder: SymlinkGetFlagsResponder,
15763 },
15764 SetFlags {
15774 flags: Flags,
15775 responder: SymlinkSetFlagsResponder,
15776 },
15777 QueryFilesystem {
15781 responder: SymlinkQueryFilesystemResponder,
15782 },
15783 GetAttributes {
15797 query: NodeAttributesQuery,
15798 responder: SymlinkGetAttributesResponder,
15799 },
15800 UpdateAttributes {
15809 payload: MutableNodeAttributes,
15810 responder: SymlinkUpdateAttributesResponder,
15811 },
15812 Sync {
15822 responder: SymlinkSyncResponder,
15823 },
15824 ListExtendedAttributes {
15833 iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15834 control_handle: SymlinkControlHandle,
15835 },
15836 GetExtendedAttribute {
15843 name: Vec<u8>,
15844 responder: SymlinkGetExtendedAttributeResponder,
15845 },
15846 SetExtendedAttribute {
15854 name: Vec<u8>,
15855 value: ExtendedAttributeValue,
15856 mode: SetExtendedAttributeMode,
15857 responder: SymlinkSetExtendedAttributeResponder,
15858 },
15859 RemoveExtendedAttribute {
15865 name: Vec<u8>,
15866 responder: SymlinkRemoveExtendedAttributeResponder,
15867 },
15868 Open {
15875 path: String,
15876 flags: Flags,
15877 options: Options,
15878 object: fdomain_client::Channel,
15879 control_handle: SymlinkControlHandle,
15880 },
15881 Describe {
15882 responder: SymlinkDescribeResponder,
15883 },
15884 #[non_exhaustive]
15886 _UnknownMethod {
15887 ordinal: u64,
15889 control_handle: SymlinkControlHandle,
15890 method_type: fidl::MethodType,
15891 },
15892}
15893
15894impl SymlinkRequest {
15895 #[allow(irrefutable_let_patterns)]
15896 pub fn into_link_into(
15897 self,
15898 ) -> Option<(fdomain_client::Event, String, SymlinkLinkIntoResponder)> {
15899 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
15900 Some((dst_parent_token, dst, responder))
15901 } else {
15902 None
15903 }
15904 }
15905
15906 #[allow(irrefutable_let_patterns)]
15907 pub fn into_clone(
15908 self,
15909 ) -> Option<(
15910 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15911 SymlinkControlHandle,
15912 )> {
15913 if let SymlinkRequest::Clone { request, control_handle } = self {
15914 Some((request, control_handle))
15915 } else {
15916 None
15917 }
15918 }
15919
15920 #[allow(irrefutable_let_patterns)]
15921 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
15922 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
15923 }
15924
15925 #[allow(irrefutable_let_patterns)]
15926 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
15927 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
15928 }
15929
15930 #[allow(irrefutable_let_patterns)]
15931 pub fn into_deprecated_clone(
15932 self,
15933 ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, SymlinkControlHandle)>
15934 {
15935 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
15936 Some((flags, object, control_handle))
15937 } else {
15938 None
15939 }
15940 }
15941
15942 #[allow(irrefutable_let_patterns)]
15943 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
15944 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
15945 Some((responder))
15946 } else {
15947 None
15948 }
15949 }
15950
15951 #[allow(irrefutable_let_patterns)]
15952 pub fn into_deprecated_set_attr(
15953 self,
15954 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
15955 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15956 Some((flags, attributes, responder))
15957 } else {
15958 None
15959 }
15960 }
15961
15962 #[allow(irrefutable_let_patterns)]
15963 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
15964 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
15965 Some((responder))
15966 } else {
15967 None
15968 }
15969 }
15970
15971 #[allow(irrefutable_let_patterns)]
15972 pub fn into_deprecated_set_flags(
15973 self,
15974 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
15975 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
15976 Some((flags, responder))
15977 } else {
15978 None
15979 }
15980 }
15981
15982 #[allow(irrefutable_let_patterns)]
15983 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
15984 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
15985 }
15986
15987 #[allow(irrefutable_let_patterns)]
15988 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
15989 if let SymlinkRequest::SetFlags { flags, responder } = self {
15990 Some((flags, responder))
15991 } else {
15992 None
15993 }
15994 }
15995
15996 #[allow(irrefutable_let_patterns)]
15997 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
15998 if let SymlinkRequest::QueryFilesystem { responder } = self {
15999 Some((responder))
16000 } else {
16001 None
16002 }
16003 }
16004
16005 #[allow(irrefutable_let_patterns)]
16006 pub fn into_get_attributes(
16007 self,
16008 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
16009 if let SymlinkRequest::GetAttributes { query, responder } = self {
16010 Some((query, responder))
16011 } else {
16012 None
16013 }
16014 }
16015
16016 #[allow(irrefutable_let_patterns)]
16017 pub fn into_update_attributes(
16018 self,
16019 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
16020 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
16021 Some((payload, responder))
16022 } else {
16023 None
16024 }
16025 }
16026
16027 #[allow(irrefutable_let_patterns)]
16028 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
16029 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
16030 }
16031
16032 #[allow(irrefutable_let_patterns)]
16033 pub fn into_list_extended_attributes(
16034 self,
16035 ) -> Option<(
16036 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
16037 SymlinkControlHandle,
16038 )> {
16039 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
16040 Some((iterator, control_handle))
16041 } else {
16042 None
16043 }
16044 }
16045
16046 #[allow(irrefutable_let_patterns)]
16047 pub fn into_get_extended_attribute(
16048 self,
16049 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
16050 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
16051 Some((name, responder))
16052 } else {
16053 None
16054 }
16055 }
16056
16057 #[allow(irrefutable_let_patterns)]
16058 pub fn into_set_extended_attribute(
16059 self,
16060 ) -> Option<(
16061 Vec<u8>,
16062 ExtendedAttributeValue,
16063 SetExtendedAttributeMode,
16064 SymlinkSetExtendedAttributeResponder,
16065 )> {
16066 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
16067 Some((name, value, mode, responder))
16068 } else {
16069 None
16070 }
16071 }
16072
16073 #[allow(irrefutable_let_patterns)]
16074 pub fn into_remove_extended_attribute(
16075 self,
16076 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
16077 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
16078 Some((name, responder))
16079 } else {
16080 None
16081 }
16082 }
16083
16084 #[allow(irrefutable_let_patterns)]
16085 pub fn into_open(
16086 self,
16087 ) -> Option<(String, Flags, Options, fdomain_client::Channel, SymlinkControlHandle)> {
16088 if let SymlinkRequest::Open { path, flags, options, object, control_handle } = self {
16089 Some((path, flags, options, object, control_handle))
16090 } else {
16091 None
16092 }
16093 }
16094
16095 #[allow(irrefutable_let_patterns)]
16096 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
16097 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
16098 }
16099
16100 pub fn method_name(&self) -> &'static str {
16102 match *self {
16103 SymlinkRequest::LinkInto { .. } => "link_into",
16104 SymlinkRequest::Clone { .. } => "clone",
16105 SymlinkRequest::Close { .. } => "close",
16106 SymlinkRequest::Query { .. } => "query",
16107 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
16108 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
16109 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
16110 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
16111 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
16112 SymlinkRequest::GetFlags { .. } => "get_flags",
16113 SymlinkRequest::SetFlags { .. } => "set_flags",
16114 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
16115 SymlinkRequest::GetAttributes { .. } => "get_attributes",
16116 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
16117 SymlinkRequest::Sync { .. } => "sync",
16118 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
16119 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
16120 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
16121 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
16122 SymlinkRequest::Open { .. } => "open",
16123 SymlinkRequest::Describe { .. } => "describe",
16124 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
16125 "unknown one-way method"
16126 }
16127 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
16128 "unknown two-way method"
16129 }
16130 }
16131 }
16132}
16133
16134#[derive(Debug, Clone)]
16135pub struct SymlinkControlHandle {
16136 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
16137}
16138
16139impl fdomain_client::fidl::ControlHandle for SymlinkControlHandle {
16140 fn shutdown(&self) {
16141 self.inner.shutdown()
16142 }
16143
16144 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
16145 self.inner.shutdown_with_epitaph(status)
16146 }
16147
16148 fn is_closed(&self) -> bool {
16149 self.inner.channel().is_closed()
16150 }
16151 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
16152 self.inner.channel().on_closed()
16153 }
16154}
16155
16156impl SymlinkControlHandle {
16157 pub fn send_on_open_(
16158 &self,
16159 mut s: i32,
16160 mut info: Option<NodeInfoDeprecated>,
16161 ) -> Result<(), fidl::Error> {
16162 self.inner.send::<NodeOnOpenRequest>(
16163 (s, info.as_mut()),
16164 0,
16165 0x7fc7bbb1dbfd1972,
16166 fidl::encoding::DynamicFlags::FLEXIBLE,
16167 )
16168 }
16169
16170 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
16171 self.inner.send::<Representation>(
16172 &mut payload,
16173 0,
16174 0x5cb40567d80a510c,
16175 fidl::encoding::DynamicFlags::empty(),
16176 )
16177 }
16178}
16179
16180#[must_use = "FIDL methods require a response to be sent"]
16181#[derive(Debug)]
16182pub struct SymlinkLinkIntoResponder {
16183 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16184 tx_id: u32,
16185}
16186
16187impl std::ops::Drop for SymlinkLinkIntoResponder {
16191 fn drop(&mut self) {
16192 self.control_handle.shutdown();
16193 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16195 }
16196}
16197
16198impl fdomain_client::fidl::Responder for SymlinkLinkIntoResponder {
16199 type ControlHandle = SymlinkControlHandle;
16200
16201 fn control_handle(&self) -> &SymlinkControlHandle {
16202 &self.control_handle
16203 }
16204
16205 fn drop_without_shutdown(mut self) {
16206 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16208 std::mem::forget(self);
16210 }
16211}
16212
16213impl SymlinkLinkIntoResponder {
16214 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16218 let _result = self.send_raw(result);
16219 if _result.is_err() {
16220 self.control_handle.shutdown();
16221 }
16222 self.drop_without_shutdown();
16223 _result
16224 }
16225
16226 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16228 let _result = self.send_raw(result);
16229 self.drop_without_shutdown();
16230 _result
16231 }
16232
16233 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16234 self.control_handle
16235 .inner
16236 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16237 result,
16238 self.tx_id,
16239 0x54f3949246a03e74,
16240 fidl::encoding::DynamicFlags::empty(),
16241 )
16242 }
16243}
16244
16245#[must_use = "FIDL methods require a response to be sent"]
16246#[derive(Debug)]
16247pub struct SymlinkCloseResponder {
16248 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16249 tx_id: u32,
16250}
16251
16252impl std::ops::Drop for SymlinkCloseResponder {
16256 fn drop(&mut self) {
16257 self.control_handle.shutdown();
16258 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16260 }
16261}
16262
16263impl fdomain_client::fidl::Responder for SymlinkCloseResponder {
16264 type ControlHandle = SymlinkControlHandle;
16265
16266 fn control_handle(&self) -> &SymlinkControlHandle {
16267 &self.control_handle
16268 }
16269
16270 fn drop_without_shutdown(mut self) {
16271 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16273 std::mem::forget(self);
16275 }
16276}
16277
16278impl SymlinkCloseResponder {
16279 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16283 let _result = self.send_raw(result);
16284 if _result.is_err() {
16285 self.control_handle.shutdown();
16286 }
16287 self.drop_without_shutdown();
16288 _result
16289 }
16290
16291 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16293 let _result = self.send_raw(result);
16294 self.drop_without_shutdown();
16295 _result
16296 }
16297
16298 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16299 self.control_handle
16300 .inner
16301 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16302 result,
16303 self.tx_id,
16304 0x5ac5d459ad7f657e,
16305 fidl::encoding::DynamicFlags::empty(),
16306 )
16307 }
16308}
16309
16310#[must_use = "FIDL methods require a response to be sent"]
16311#[derive(Debug)]
16312pub struct SymlinkQueryResponder {
16313 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16314 tx_id: u32,
16315}
16316
16317impl std::ops::Drop for SymlinkQueryResponder {
16321 fn drop(&mut self) {
16322 self.control_handle.shutdown();
16323 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16325 }
16326}
16327
16328impl fdomain_client::fidl::Responder for SymlinkQueryResponder {
16329 type ControlHandle = SymlinkControlHandle;
16330
16331 fn control_handle(&self) -> &SymlinkControlHandle {
16332 &self.control_handle
16333 }
16334
16335 fn drop_without_shutdown(mut self) {
16336 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16338 std::mem::forget(self);
16340 }
16341}
16342
16343impl SymlinkQueryResponder {
16344 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
16348 let _result = self.send_raw(protocol);
16349 if _result.is_err() {
16350 self.control_handle.shutdown();
16351 }
16352 self.drop_without_shutdown();
16353 _result
16354 }
16355
16356 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
16358 let _result = self.send_raw(protocol);
16359 self.drop_without_shutdown();
16360 _result
16361 }
16362
16363 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
16364 self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
16365 (protocol,),
16366 self.tx_id,
16367 0x2658edee9decfc06,
16368 fidl::encoding::DynamicFlags::empty(),
16369 )
16370 }
16371}
16372
16373#[must_use = "FIDL methods require a response to be sent"]
16374#[derive(Debug)]
16375pub struct SymlinkDeprecatedGetAttrResponder {
16376 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16377 tx_id: u32,
16378}
16379
16380impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
16384 fn drop(&mut self) {
16385 self.control_handle.shutdown();
16386 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16388 }
16389}
16390
16391impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetAttrResponder {
16392 type ControlHandle = SymlinkControlHandle;
16393
16394 fn control_handle(&self) -> &SymlinkControlHandle {
16395 &self.control_handle
16396 }
16397
16398 fn drop_without_shutdown(mut self) {
16399 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16401 std::mem::forget(self);
16403 }
16404}
16405
16406impl SymlinkDeprecatedGetAttrResponder {
16407 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
16411 let _result = self.send_raw(s, attributes);
16412 if _result.is_err() {
16413 self.control_handle.shutdown();
16414 }
16415 self.drop_without_shutdown();
16416 _result
16417 }
16418
16419 pub fn send_no_shutdown_on_err(
16421 self,
16422 mut s: i32,
16423 mut attributes: &NodeAttributes,
16424 ) -> Result<(), fidl::Error> {
16425 let _result = self.send_raw(s, attributes);
16426 self.drop_without_shutdown();
16427 _result
16428 }
16429
16430 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
16431 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
16432 (s, attributes),
16433 self.tx_id,
16434 0x78985e216314dafd,
16435 fidl::encoding::DynamicFlags::empty(),
16436 )
16437 }
16438}
16439
16440#[must_use = "FIDL methods require a response to be sent"]
16441#[derive(Debug)]
16442pub struct SymlinkDeprecatedSetAttrResponder {
16443 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16444 tx_id: u32,
16445}
16446
16447impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
16451 fn drop(&mut self) {
16452 self.control_handle.shutdown();
16453 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16455 }
16456}
16457
16458impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetAttrResponder {
16459 type ControlHandle = SymlinkControlHandle;
16460
16461 fn control_handle(&self) -> &SymlinkControlHandle {
16462 &self.control_handle
16463 }
16464
16465 fn drop_without_shutdown(mut self) {
16466 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16468 std::mem::forget(self);
16470 }
16471}
16472
16473impl SymlinkDeprecatedSetAttrResponder {
16474 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16478 let _result = self.send_raw(s);
16479 if _result.is_err() {
16480 self.control_handle.shutdown();
16481 }
16482 self.drop_without_shutdown();
16483 _result
16484 }
16485
16486 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16488 let _result = self.send_raw(s);
16489 self.drop_without_shutdown();
16490 _result
16491 }
16492
16493 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16494 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
16495 (s,),
16496 self.tx_id,
16497 0x4186c0f40d938f46,
16498 fidl::encoding::DynamicFlags::empty(),
16499 )
16500 }
16501}
16502
16503#[must_use = "FIDL methods require a response to be sent"]
16504#[derive(Debug)]
16505pub struct SymlinkDeprecatedGetFlagsResponder {
16506 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16507 tx_id: u32,
16508}
16509
16510impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
16514 fn drop(&mut self) {
16515 self.control_handle.shutdown();
16516 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16518 }
16519}
16520
16521impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetFlagsResponder {
16522 type ControlHandle = SymlinkControlHandle;
16523
16524 fn control_handle(&self) -> &SymlinkControlHandle {
16525 &self.control_handle
16526 }
16527
16528 fn drop_without_shutdown(mut self) {
16529 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16531 std::mem::forget(self);
16533 }
16534}
16535
16536impl SymlinkDeprecatedGetFlagsResponder {
16537 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16541 let _result = self.send_raw(s, flags);
16542 if _result.is_err() {
16543 self.control_handle.shutdown();
16544 }
16545 self.drop_without_shutdown();
16546 _result
16547 }
16548
16549 pub fn send_no_shutdown_on_err(
16551 self,
16552 mut s: i32,
16553 mut flags: OpenFlags,
16554 ) -> Result<(), fidl::Error> {
16555 let _result = self.send_raw(s, flags);
16556 self.drop_without_shutdown();
16557 _result
16558 }
16559
16560 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16561 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
16562 (s, flags),
16563 self.tx_id,
16564 0x5b88fffb8eda3aa1,
16565 fidl::encoding::DynamicFlags::empty(),
16566 )
16567 }
16568}
16569
16570#[must_use = "FIDL methods require a response to be sent"]
16571#[derive(Debug)]
16572pub struct SymlinkDeprecatedSetFlagsResponder {
16573 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16574 tx_id: u32,
16575}
16576
16577impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
16581 fn drop(&mut self) {
16582 self.control_handle.shutdown();
16583 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16585 }
16586}
16587
16588impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetFlagsResponder {
16589 type ControlHandle = SymlinkControlHandle;
16590
16591 fn control_handle(&self) -> &SymlinkControlHandle {
16592 &self.control_handle
16593 }
16594
16595 fn drop_without_shutdown(mut self) {
16596 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16598 std::mem::forget(self);
16600 }
16601}
16602
16603impl SymlinkDeprecatedSetFlagsResponder {
16604 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16608 let _result = self.send_raw(s);
16609 if _result.is_err() {
16610 self.control_handle.shutdown();
16611 }
16612 self.drop_without_shutdown();
16613 _result
16614 }
16615
16616 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16618 let _result = self.send_raw(s);
16619 self.drop_without_shutdown();
16620 _result
16621 }
16622
16623 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16624 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
16625 (s,),
16626 self.tx_id,
16627 0x5295b76c71fde733,
16628 fidl::encoding::DynamicFlags::empty(),
16629 )
16630 }
16631}
16632
16633#[must_use = "FIDL methods require a response to be sent"]
16634#[derive(Debug)]
16635pub struct SymlinkGetFlagsResponder {
16636 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16637 tx_id: u32,
16638}
16639
16640impl std::ops::Drop for SymlinkGetFlagsResponder {
16644 fn drop(&mut self) {
16645 self.control_handle.shutdown();
16646 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16648 }
16649}
16650
16651impl fdomain_client::fidl::Responder for SymlinkGetFlagsResponder {
16652 type ControlHandle = SymlinkControlHandle;
16653
16654 fn control_handle(&self) -> &SymlinkControlHandle {
16655 &self.control_handle
16656 }
16657
16658 fn drop_without_shutdown(mut self) {
16659 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16661 std::mem::forget(self);
16663 }
16664}
16665
16666impl SymlinkGetFlagsResponder {
16667 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16671 let _result = self.send_raw(result);
16672 if _result.is_err() {
16673 self.control_handle.shutdown();
16674 }
16675 self.drop_without_shutdown();
16676 _result
16677 }
16678
16679 pub fn send_no_shutdown_on_err(
16681 self,
16682 mut result: Result<Flags, i32>,
16683 ) -> Result<(), fidl::Error> {
16684 let _result = self.send_raw(result);
16685 self.drop_without_shutdown();
16686 _result
16687 }
16688
16689 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16690 self.control_handle
16691 .inner
16692 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
16693 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
16694 self.tx_id,
16695 0x176eb318f64ec23,
16696 fidl::encoding::DynamicFlags::FLEXIBLE,
16697 )
16698 }
16699}
16700
16701#[must_use = "FIDL methods require a response to be sent"]
16702#[derive(Debug)]
16703pub struct SymlinkSetFlagsResponder {
16704 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16705 tx_id: u32,
16706}
16707
16708impl std::ops::Drop for SymlinkSetFlagsResponder {
16712 fn drop(&mut self) {
16713 self.control_handle.shutdown();
16714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16716 }
16717}
16718
16719impl fdomain_client::fidl::Responder for SymlinkSetFlagsResponder {
16720 type ControlHandle = SymlinkControlHandle;
16721
16722 fn control_handle(&self) -> &SymlinkControlHandle {
16723 &self.control_handle
16724 }
16725
16726 fn drop_without_shutdown(mut self) {
16727 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16729 std::mem::forget(self);
16731 }
16732}
16733
16734impl SymlinkSetFlagsResponder {
16735 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16739 let _result = self.send_raw(result);
16740 if _result.is_err() {
16741 self.control_handle.shutdown();
16742 }
16743 self.drop_without_shutdown();
16744 _result
16745 }
16746
16747 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16749 let _result = self.send_raw(result);
16750 self.drop_without_shutdown();
16751 _result
16752 }
16753
16754 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16755 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
16756 fidl::encoding::EmptyStruct,
16757 i32,
16758 >>(
16759 fidl::encoding::FlexibleResult::new(result),
16760 self.tx_id,
16761 0x55a8028685791ea8,
16762 fidl::encoding::DynamicFlags::FLEXIBLE,
16763 )
16764 }
16765}
16766
16767#[must_use = "FIDL methods require a response to be sent"]
16768#[derive(Debug)]
16769pub struct SymlinkQueryFilesystemResponder {
16770 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16771 tx_id: u32,
16772}
16773
16774impl std::ops::Drop for SymlinkQueryFilesystemResponder {
16778 fn drop(&mut self) {
16779 self.control_handle.shutdown();
16780 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16782 }
16783}
16784
16785impl fdomain_client::fidl::Responder for SymlinkQueryFilesystemResponder {
16786 type ControlHandle = SymlinkControlHandle;
16787
16788 fn control_handle(&self) -> &SymlinkControlHandle {
16789 &self.control_handle
16790 }
16791
16792 fn drop_without_shutdown(mut self) {
16793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16795 std::mem::forget(self);
16797 }
16798}
16799
16800impl SymlinkQueryFilesystemResponder {
16801 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16805 let _result = self.send_raw(s, info);
16806 if _result.is_err() {
16807 self.control_handle.shutdown();
16808 }
16809 self.drop_without_shutdown();
16810 _result
16811 }
16812
16813 pub fn send_no_shutdown_on_err(
16815 self,
16816 mut s: i32,
16817 mut info: Option<&FilesystemInfo>,
16818 ) -> Result<(), fidl::Error> {
16819 let _result = self.send_raw(s, info);
16820 self.drop_without_shutdown();
16821 _result
16822 }
16823
16824 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16825 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
16826 (s, info),
16827 self.tx_id,
16828 0x6f344a1c6b0a0610,
16829 fidl::encoding::DynamicFlags::empty(),
16830 )
16831 }
16832}
16833
16834#[must_use = "FIDL methods require a response to be sent"]
16835#[derive(Debug)]
16836pub struct SymlinkGetAttributesResponder {
16837 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16838 tx_id: u32,
16839}
16840
16841impl std::ops::Drop for SymlinkGetAttributesResponder {
16845 fn drop(&mut self) {
16846 self.control_handle.shutdown();
16847 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16849 }
16850}
16851
16852impl fdomain_client::fidl::Responder for SymlinkGetAttributesResponder {
16853 type ControlHandle = SymlinkControlHandle;
16854
16855 fn control_handle(&self) -> &SymlinkControlHandle {
16856 &self.control_handle
16857 }
16858
16859 fn drop_without_shutdown(mut self) {
16860 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16862 std::mem::forget(self);
16864 }
16865}
16866
16867impl SymlinkGetAttributesResponder {
16868 pub fn send(
16872 self,
16873 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16874 ) -> Result<(), fidl::Error> {
16875 let _result = self.send_raw(result);
16876 if _result.is_err() {
16877 self.control_handle.shutdown();
16878 }
16879 self.drop_without_shutdown();
16880 _result
16881 }
16882
16883 pub fn send_no_shutdown_on_err(
16885 self,
16886 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16887 ) -> Result<(), fidl::Error> {
16888 let _result = self.send_raw(result);
16889 self.drop_without_shutdown();
16890 _result
16891 }
16892
16893 fn send_raw(
16894 &self,
16895 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16896 ) -> Result<(), fidl::Error> {
16897 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16898 result,
16899 self.tx_id,
16900 0x3d4396a638ea053b,
16901 fidl::encoding::DynamicFlags::empty(),
16902 )
16903 }
16904}
16905
16906#[must_use = "FIDL methods require a response to be sent"]
16907#[derive(Debug)]
16908pub struct SymlinkUpdateAttributesResponder {
16909 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16910 tx_id: u32,
16911}
16912
16913impl std::ops::Drop for SymlinkUpdateAttributesResponder {
16917 fn drop(&mut self) {
16918 self.control_handle.shutdown();
16919 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16921 }
16922}
16923
16924impl fdomain_client::fidl::Responder for SymlinkUpdateAttributesResponder {
16925 type ControlHandle = SymlinkControlHandle;
16926
16927 fn control_handle(&self) -> &SymlinkControlHandle {
16928 &self.control_handle
16929 }
16930
16931 fn drop_without_shutdown(mut self) {
16932 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16934 std::mem::forget(self);
16936 }
16937}
16938
16939impl SymlinkUpdateAttributesResponder {
16940 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16944 let _result = self.send_raw(result);
16945 if _result.is_err() {
16946 self.control_handle.shutdown();
16947 }
16948 self.drop_without_shutdown();
16949 _result
16950 }
16951
16952 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16954 let _result = self.send_raw(result);
16955 self.drop_without_shutdown();
16956 _result
16957 }
16958
16959 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16960 self.control_handle
16961 .inner
16962 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16963 result,
16964 self.tx_id,
16965 0x3308c1da5a89bf08,
16966 fidl::encoding::DynamicFlags::empty(),
16967 )
16968 }
16969}
16970
16971#[must_use = "FIDL methods require a response to be sent"]
16972#[derive(Debug)]
16973pub struct SymlinkSyncResponder {
16974 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16975 tx_id: u32,
16976}
16977
16978impl std::ops::Drop for SymlinkSyncResponder {
16982 fn drop(&mut self) {
16983 self.control_handle.shutdown();
16984 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16986 }
16987}
16988
16989impl fdomain_client::fidl::Responder for SymlinkSyncResponder {
16990 type ControlHandle = SymlinkControlHandle;
16991
16992 fn control_handle(&self) -> &SymlinkControlHandle {
16993 &self.control_handle
16994 }
16995
16996 fn drop_without_shutdown(mut self) {
16997 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16999 std::mem::forget(self);
17001 }
17002}
17003
17004impl SymlinkSyncResponder {
17005 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17009 let _result = self.send_raw(result);
17010 if _result.is_err() {
17011 self.control_handle.shutdown();
17012 }
17013 self.drop_without_shutdown();
17014 _result
17015 }
17016
17017 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17019 let _result = self.send_raw(result);
17020 self.drop_without_shutdown();
17021 _result
17022 }
17023
17024 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17025 self.control_handle
17026 .inner
17027 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
17028 result,
17029 self.tx_id,
17030 0x2c5c27ca0ab5dc49,
17031 fidl::encoding::DynamicFlags::empty(),
17032 )
17033 }
17034}
17035
17036#[must_use = "FIDL methods require a response to be sent"]
17037#[derive(Debug)]
17038pub struct SymlinkGetExtendedAttributeResponder {
17039 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
17040 tx_id: u32,
17041}
17042
17043impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
17047 fn drop(&mut self) {
17048 self.control_handle.shutdown();
17049 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17051 }
17052}
17053
17054impl fdomain_client::fidl::Responder for SymlinkGetExtendedAttributeResponder {
17055 type ControlHandle = SymlinkControlHandle;
17056
17057 fn control_handle(&self) -> &SymlinkControlHandle {
17058 &self.control_handle
17059 }
17060
17061 fn drop_without_shutdown(mut self) {
17062 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17064 std::mem::forget(self);
17066 }
17067}
17068
17069impl SymlinkGetExtendedAttributeResponder {
17070 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
17074 let _result = self.send_raw(result);
17075 if _result.is_err() {
17076 self.control_handle.shutdown();
17077 }
17078 self.drop_without_shutdown();
17079 _result
17080 }
17081
17082 pub fn send_no_shutdown_on_err(
17084 self,
17085 mut result: Result<ExtendedAttributeValue, i32>,
17086 ) -> Result<(), fidl::Error> {
17087 let _result = self.send_raw(result);
17088 self.drop_without_shutdown();
17089 _result
17090 }
17091
17092 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
17093 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
17094 result.as_mut().map_err(|e| *e),
17095 self.tx_id,
17096 0x45ffa3ccfdeb76db,
17097 fidl::encoding::DynamicFlags::empty(),
17098 )
17099 }
17100}
17101
17102#[must_use = "FIDL methods require a response to be sent"]
17103#[derive(Debug)]
17104pub struct SymlinkSetExtendedAttributeResponder {
17105 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
17106 tx_id: u32,
17107}
17108
17109impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
17113 fn drop(&mut self) {
17114 self.control_handle.shutdown();
17115 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17117 }
17118}
17119
17120impl fdomain_client::fidl::Responder for SymlinkSetExtendedAttributeResponder {
17121 type ControlHandle = SymlinkControlHandle;
17122
17123 fn control_handle(&self) -> &SymlinkControlHandle {
17124 &self.control_handle
17125 }
17126
17127 fn drop_without_shutdown(mut self) {
17128 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17130 std::mem::forget(self);
17132 }
17133}
17134
17135impl SymlinkSetExtendedAttributeResponder {
17136 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17140 let _result = self.send_raw(result);
17141 if _result.is_err() {
17142 self.control_handle.shutdown();
17143 }
17144 self.drop_without_shutdown();
17145 _result
17146 }
17147
17148 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17150 let _result = self.send_raw(result);
17151 self.drop_without_shutdown();
17152 _result
17153 }
17154
17155 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17156 self.control_handle
17157 .inner
17158 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
17159 result,
17160 self.tx_id,
17161 0x4a951362f681f23c,
17162 fidl::encoding::DynamicFlags::empty(),
17163 )
17164 }
17165}
17166
17167#[must_use = "FIDL methods require a response to be sent"]
17168#[derive(Debug)]
17169pub struct SymlinkRemoveExtendedAttributeResponder {
17170 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
17171 tx_id: u32,
17172}
17173
17174impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
17178 fn drop(&mut self) {
17179 self.control_handle.shutdown();
17180 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17182 }
17183}
17184
17185impl fdomain_client::fidl::Responder for SymlinkRemoveExtendedAttributeResponder {
17186 type ControlHandle = SymlinkControlHandle;
17187
17188 fn control_handle(&self) -> &SymlinkControlHandle {
17189 &self.control_handle
17190 }
17191
17192 fn drop_without_shutdown(mut self) {
17193 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17195 std::mem::forget(self);
17197 }
17198}
17199
17200impl SymlinkRemoveExtendedAttributeResponder {
17201 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17205 let _result = self.send_raw(result);
17206 if _result.is_err() {
17207 self.control_handle.shutdown();
17208 }
17209 self.drop_without_shutdown();
17210 _result
17211 }
17212
17213 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17215 let _result = self.send_raw(result);
17216 self.drop_without_shutdown();
17217 _result
17218 }
17219
17220 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
17221 self.control_handle
17222 .inner
17223 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
17224 result,
17225 self.tx_id,
17226 0x7a0b9f3a9bf9032d,
17227 fidl::encoding::DynamicFlags::empty(),
17228 )
17229 }
17230}
17231
17232#[must_use = "FIDL methods require a response to be sent"]
17233#[derive(Debug)]
17234pub struct SymlinkDescribeResponder {
17235 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
17236 tx_id: u32,
17237}
17238
17239impl std::ops::Drop for SymlinkDescribeResponder {
17243 fn drop(&mut self) {
17244 self.control_handle.shutdown();
17245 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17247 }
17248}
17249
17250impl fdomain_client::fidl::Responder for SymlinkDescribeResponder {
17251 type ControlHandle = SymlinkControlHandle;
17252
17253 fn control_handle(&self) -> &SymlinkControlHandle {
17254 &self.control_handle
17255 }
17256
17257 fn drop_without_shutdown(mut self) {
17258 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17260 std::mem::forget(self);
17262 }
17263}
17264
17265impl SymlinkDescribeResponder {
17266 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
17270 let _result = self.send_raw(payload);
17271 if _result.is_err() {
17272 self.control_handle.shutdown();
17273 }
17274 self.drop_without_shutdown();
17275 _result
17276 }
17277
17278 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
17280 let _result = self.send_raw(payload);
17281 self.drop_without_shutdown();
17282 _result
17283 }
17284
17285 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
17286 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
17287 fidl::encoding::Flexible::new(payload),
17288 self.tx_id,
17289 0x742c2ea5e89831f3,
17290 fidl::encoding::DynamicFlags::FLEXIBLE,
17291 )
17292 }
17293}
17294
17295#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17296pub struct WritableMarker;
17297
17298impl fdomain_client::fidl::ProtocolMarker for WritableMarker {
17299 type Proxy = WritableProxy;
17300 type RequestStream = WritableRequestStream;
17301
17302 const DEBUG_NAME: &'static str = "(anonymous) Writable";
17303}
17304pub type WritableWriteResult = Result<u64, i32>;
17305
17306pub trait WritableProxyInterface: Send + Sync {
17307 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
17308 + Send;
17309 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
17310}
17311
17312#[derive(Debug, Clone)]
17313pub struct WritableProxy {
17314 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
17315}
17316
17317impl fdomain_client::fidl::Proxy for WritableProxy {
17318 type Protocol = WritableMarker;
17319
17320 fn from_channel(inner: fdomain_client::Channel) -> Self {
17321 Self::new(inner)
17322 }
17323
17324 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
17325 self.client.into_channel().map_err(|client| Self { client })
17326 }
17327
17328 fn as_channel(&self) -> &fdomain_client::Channel {
17329 self.client.as_channel()
17330 }
17331}
17332
17333impl WritableProxy {
17334 pub fn new(channel: fdomain_client::Channel) -> Self {
17336 let protocol_name = <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
17337 Self { client: fidl::client::Client::new(channel, protocol_name) }
17338 }
17339
17340 pub fn take_event_stream(&self) -> WritableEventStream {
17346 WritableEventStream { event_receiver: self.client.take_event_receiver() }
17347 }
17348
17349 pub fn r#write(
17373 &self,
17374 mut data: &[u8],
17375 ) -> fidl::client::QueryResponseFut<
17376 WritableWriteResult,
17377 fdomain_client::fidl::FDomainResourceDialect,
17378 > {
17379 WritableProxyInterface::r#write(self, data)
17380 }
17381}
17382
17383impl WritableProxyInterface for WritableProxy {
17384 type WriteResponseFut = fidl::client::QueryResponseFut<
17385 WritableWriteResult,
17386 fdomain_client::fidl::FDomainResourceDialect,
17387 >;
17388 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
17389 fn _decode(
17390 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17391 ) -> Result<WritableWriteResult, fidl::Error> {
17392 let _response = fidl::client::decode_transaction_body::<
17393 fidl::encoding::ResultType<WritableWriteResponse, i32>,
17394 fdomain_client::fidl::FDomainResourceDialect,
17395 0x6a31437832469f82,
17396 >(_buf?)?;
17397 Ok(_response.map(|x| x.actual_count))
17398 }
17399 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
17400 (data,),
17401 0x6a31437832469f82,
17402 fidl::encoding::DynamicFlags::empty(),
17403 _decode,
17404 )
17405 }
17406}
17407
17408pub struct WritableEventStream {
17409 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
17410}
17411
17412impl std::marker::Unpin for WritableEventStream {}
17413
17414impl futures::stream::FusedStream for WritableEventStream {
17415 fn is_terminated(&self) -> bool {
17416 self.event_receiver.is_terminated()
17417 }
17418}
17419
17420impl futures::Stream for WritableEventStream {
17421 type Item = Result<WritableEvent, fidl::Error>;
17422
17423 fn poll_next(
17424 mut self: std::pin::Pin<&mut Self>,
17425 cx: &mut std::task::Context<'_>,
17426 ) -> std::task::Poll<Option<Self::Item>> {
17427 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17428 &mut self.event_receiver,
17429 cx
17430 )?) {
17431 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
17432 None => std::task::Poll::Ready(None),
17433 }
17434 }
17435}
17436
17437#[derive(Debug)]
17438pub enum WritableEvent {}
17439
17440impl WritableEvent {
17441 fn decode(
17443 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17444 ) -> Result<WritableEvent, fidl::Error> {
17445 let (bytes, _handles) = buf.split_mut();
17446 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17447 debug_assert_eq!(tx_header.tx_id, 0);
17448 match tx_header.ordinal {
17449 _ => Err(fidl::Error::UnknownOrdinal {
17450 ordinal: tx_header.ordinal,
17451 protocol_name: <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17452 }),
17453 }
17454 }
17455}
17456
17457pub struct WritableRequestStream {
17459 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17460 is_terminated: bool,
17461}
17462
17463impl std::marker::Unpin for WritableRequestStream {}
17464
17465impl futures::stream::FusedStream for WritableRequestStream {
17466 fn is_terminated(&self) -> bool {
17467 self.is_terminated
17468 }
17469}
17470
17471impl fdomain_client::fidl::RequestStream for WritableRequestStream {
17472 type Protocol = WritableMarker;
17473 type ControlHandle = WritableControlHandle;
17474
17475 fn from_channel(channel: fdomain_client::Channel) -> Self {
17476 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17477 }
17478
17479 fn control_handle(&self) -> Self::ControlHandle {
17480 WritableControlHandle { inner: self.inner.clone() }
17481 }
17482
17483 fn into_inner(
17484 self,
17485 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
17486 {
17487 (self.inner, self.is_terminated)
17488 }
17489
17490 fn from_inner(
17491 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17492 is_terminated: bool,
17493 ) -> Self {
17494 Self { inner, is_terminated }
17495 }
17496}
17497
17498impl futures::Stream for WritableRequestStream {
17499 type Item = Result<WritableRequest, fidl::Error>;
17500
17501 fn poll_next(
17502 mut self: std::pin::Pin<&mut Self>,
17503 cx: &mut std::task::Context<'_>,
17504 ) -> std::task::Poll<Option<Self::Item>> {
17505 let this = &mut *self;
17506 if this.inner.check_shutdown(cx) {
17507 this.is_terminated = true;
17508 return std::task::Poll::Ready(None);
17509 }
17510 if this.is_terminated {
17511 panic!("polled WritableRequestStream after completion");
17512 }
17513 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
17514 |bytes, handles| {
17515 match this.inner.channel().read_etc(cx, bytes, handles) {
17516 std::task::Poll::Ready(Ok(())) => {}
17517 std::task::Poll::Pending => return std::task::Poll::Pending,
17518 std::task::Poll::Ready(Err(None)) => {
17519 this.is_terminated = true;
17520 return std::task::Poll::Ready(None);
17521 }
17522 std::task::Poll::Ready(Err(Some(e))) => {
17523 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17524 e.into(),
17525 ))));
17526 }
17527 }
17528
17529 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17531
17532 std::task::Poll::Ready(Some(match header.ordinal {
17533 0x6a31437832469f82 => {
17534 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17535 let mut req = fidl::new_empty!(
17536 WritableWriteRequest,
17537 fdomain_client::fidl::FDomainResourceDialect
17538 );
17539 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
17540 let control_handle = WritableControlHandle { inner: this.inner.clone() };
17541 Ok(WritableRequest::Write {
17542 data: req.data,
17543
17544 responder: WritableWriteResponder {
17545 control_handle: std::mem::ManuallyDrop::new(control_handle),
17546 tx_id: header.tx_id,
17547 },
17548 })
17549 }
17550 _ => Err(fidl::Error::UnknownOrdinal {
17551 ordinal: header.ordinal,
17552 protocol_name:
17553 <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17554 }),
17555 }))
17556 },
17557 )
17558 }
17559}
17560
17561#[derive(Debug)]
17562pub enum WritableRequest {
17563 Write { data: Vec<u8>, responder: WritableWriteResponder },
17587}
17588
17589impl WritableRequest {
17590 #[allow(irrefutable_let_patterns)]
17591 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
17592 if let WritableRequest::Write { data, responder } = self {
17593 Some((data, responder))
17594 } else {
17595 None
17596 }
17597 }
17598
17599 pub fn method_name(&self) -> &'static str {
17601 match *self {
17602 WritableRequest::Write { .. } => "write",
17603 }
17604 }
17605}
17606
17607#[derive(Debug, Clone)]
17608pub struct WritableControlHandle {
17609 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17610}
17611
17612impl fdomain_client::fidl::ControlHandle for WritableControlHandle {
17613 fn shutdown(&self) {
17614 self.inner.shutdown()
17615 }
17616
17617 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
17618 self.inner.shutdown_with_epitaph(status)
17619 }
17620
17621 fn is_closed(&self) -> bool {
17622 self.inner.channel().is_closed()
17623 }
17624 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
17625 self.inner.channel().on_closed()
17626 }
17627}
17628
17629impl WritableControlHandle {}
17630
17631#[must_use = "FIDL methods require a response to be sent"]
17632#[derive(Debug)]
17633pub struct WritableWriteResponder {
17634 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
17635 tx_id: u32,
17636}
17637
17638impl std::ops::Drop for WritableWriteResponder {
17642 fn drop(&mut self) {
17643 self.control_handle.shutdown();
17644 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17646 }
17647}
17648
17649impl fdomain_client::fidl::Responder for WritableWriteResponder {
17650 type ControlHandle = WritableControlHandle;
17651
17652 fn control_handle(&self) -> &WritableControlHandle {
17653 &self.control_handle
17654 }
17655
17656 fn drop_without_shutdown(mut self) {
17657 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17659 std::mem::forget(self);
17661 }
17662}
17663
17664impl WritableWriteResponder {
17665 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17669 let _result = self.send_raw(result);
17670 if _result.is_err() {
17671 self.control_handle.shutdown();
17672 }
17673 self.drop_without_shutdown();
17674 _result
17675 }
17676
17677 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17679 let _result = self.send_raw(result);
17680 self.drop_without_shutdown();
17681 _result
17682 }
17683
17684 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17685 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
17686 result.map(|actual_count| (actual_count,)),
17687 self.tx_id,
17688 0x6a31437832469f82,
17689 fidl::encoding::DynamicFlags::empty(),
17690 )
17691 }
17692}
17693
17694mod internal {
17695 use super::*;
17696
17697 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
17698 type Borrowed<'a> = &'a mut Self;
17699 fn take_or_borrow<'a>(
17700 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17701 ) -> Self::Borrowed<'a> {
17702 value
17703 }
17704 }
17705
17706 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
17707 type Owned = Self;
17708
17709 #[inline(always)]
17710 fn inline_align(_context: fidl::encoding::Context) -> usize {
17711 8
17712 }
17713
17714 #[inline(always)]
17715 fn inline_size(_context: fidl::encoding::Context) -> usize {
17716 40
17717 }
17718 }
17719
17720 unsafe impl
17721 fidl::encoding::Encode<
17722 DirectoryCreateSymlinkRequest,
17723 fdomain_client::fidl::FDomainResourceDialect,
17724 > for &mut DirectoryCreateSymlinkRequest
17725 {
17726 #[inline]
17727 unsafe fn encode(
17728 self,
17729 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17730 offset: usize,
17731 _depth: fidl::encoding::Depth,
17732 ) -> fidl::Result<()> {
17733 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17734 fidl::encoding::Encode::<
17736 DirectoryCreateSymlinkRequest,
17737 fdomain_client::fidl::FDomainResourceDialect,
17738 >::encode(
17739 (
17740 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17741 &self.name,
17742 ),
17743 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
17744 &self.target,
17745 ),
17746 <fidl::encoding::Optional<
17747 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17748 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17749 &mut self.connection
17750 ),
17751 ),
17752 encoder,
17753 offset,
17754 _depth,
17755 )
17756 }
17757 }
17758 unsafe impl<
17759 T0: fidl::encoding::Encode<
17760 fidl::encoding::BoundedString<255>,
17761 fdomain_client::fidl::FDomainResourceDialect,
17762 >,
17763 T1: fidl::encoding::Encode<
17764 fidl::encoding::Vector<u8, 4095>,
17765 fdomain_client::fidl::FDomainResourceDialect,
17766 >,
17767 T2: fidl::encoding::Encode<
17768 fidl::encoding::Optional<
17769 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17770 >,
17771 fdomain_client::fidl::FDomainResourceDialect,
17772 >,
17773 >
17774 fidl::encoding::Encode<
17775 DirectoryCreateSymlinkRequest,
17776 fdomain_client::fidl::FDomainResourceDialect,
17777 > for (T0, T1, T2)
17778 {
17779 #[inline]
17780 unsafe fn encode(
17781 self,
17782 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17783 offset: usize,
17784 depth: fidl::encoding::Depth,
17785 ) -> fidl::Result<()> {
17786 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17787 unsafe {
17790 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
17791 (ptr as *mut u64).write_unaligned(0);
17792 }
17793 self.0.encode(encoder, offset + 0, depth)?;
17795 self.1.encode(encoder, offset + 16, depth)?;
17796 self.2.encode(encoder, offset + 32, depth)?;
17797 Ok(())
17798 }
17799 }
17800
17801 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17802 for DirectoryCreateSymlinkRequest
17803 {
17804 #[inline(always)]
17805 fn new_empty() -> Self {
17806 Self {
17807 name: fidl::new_empty!(
17808 fidl::encoding::BoundedString<255>,
17809 fdomain_client::fidl::FDomainResourceDialect
17810 ),
17811 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect),
17812 connection: fidl::new_empty!(
17813 fidl::encoding::Optional<
17814 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17815 >,
17816 fdomain_client::fidl::FDomainResourceDialect
17817 ),
17818 }
17819 }
17820
17821 #[inline]
17822 unsafe fn decode(
17823 &mut self,
17824 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17825 offset: usize,
17826 _depth: fidl::encoding::Depth,
17827 ) -> fidl::Result<()> {
17828 decoder.debug_check_bounds::<Self>(offset);
17829 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
17831 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17832 let mask = 0xffffffff00000000u64;
17833 let maskedval = padval & mask;
17834 if maskedval != 0 {
17835 return Err(fidl::Error::NonZeroPadding {
17836 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
17837 });
17838 }
17839 fidl::decode!(
17840 fidl::encoding::BoundedString<255>,
17841 fdomain_client::fidl::FDomainResourceDialect,
17842 &mut self.name,
17843 decoder,
17844 offset + 0,
17845 _depth
17846 )?;
17847 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
17848 fidl::decode!(
17849 fidl::encoding::Optional<
17850 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17851 >,
17852 fdomain_client::fidl::FDomainResourceDialect,
17853 &mut self.connection,
17854 decoder,
17855 offset + 32,
17856 _depth
17857 )?;
17858 Ok(())
17859 }
17860 }
17861
17862 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
17863 type Borrowed<'a> = &'a mut Self;
17864 fn take_or_borrow<'a>(
17865 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17866 ) -> Self::Borrowed<'a> {
17867 value
17868 }
17869 }
17870
17871 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
17872 type Owned = Self;
17873
17874 #[inline(always)]
17875 fn inline_align(_context: fidl::encoding::Context) -> usize {
17876 8
17877 }
17878
17879 #[inline(always)]
17880 fn inline_size(_context: fidl::encoding::Context) -> usize {
17881 32
17882 }
17883 }
17884
17885 unsafe impl
17886 fidl::encoding::Encode<
17887 DirectoryDeprecatedOpenRequest,
17888 fdomain_client::fidl::FDomainResourceDialect,
17889 > for &mut DirectoryDeprecatedOpenRequest
17890 {
17891 #[inline]
17892 unsafe fn encode(
17893 self,
17894 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17895 offset: usize,
17896 _depth: fidl::encoding::Depth,
17897 ) -> fidl::Result<()> {
17898 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17899 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17901 (
17902 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17903 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
17904 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17905 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17906 ),
17907 encoder, offset, _depth
17908 )
17909 }
17910 }
17911 unsafe impl<
17912 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
17913 T1: fidl::encoding::Encode<ModeType, fdomain_client::fidl::FDomainResourceDialect>,
17914 T2: fidl::encoding::Encode<
17915 fidl::encoding::BoundedString<4095>,
17916 fdomain_client::fidl::FDomainResourceDialect,
17917 >,
17918 T3: fidl::encoding::Encode<
17919 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17920 fdomain_client::fidl::FDomainResourceDialect,
17921 >,
17922 >
17923 fidl::encoding::Encode<
17924 DirectoryDeprecatedOpenRequest,
17925 fdomain_client::fidl::FDomainResourceDialect,
17926 > for (T0, T1, T2, T3)
17927 {
17928 #[inline]
17929 unsafe fn encode(
17930 self,
17931 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17932 offset: usize,
17933 depth: fidl::encoding::Depth,
17934 ) -> fidl::Result<()> {
17935 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17936 unsafe {
17939 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
17940 (ptr as *mut u64).write_unaligned(0);
17941 }
17942 self.0.encode(encoder, offset + 0, depth)?;
17944 self.1.encode(encoder, offset + 4, depth)?;
17945 self.2.encode(encoder, offset + 8, depth)?;
17946 self.3.encode(encoder, offset + 24, depth)?;
17947 Ok(())
17948 }
17949 }
17950
17951 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17952 for DirectoryDeprecatedOpenRequest
17953 {
17954 #[inline(always)]
17955 fn new_empty() -> Self {
17956 Self {
17957 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
17958 mode: fidl::new_empty!(ModeType, fdomain_client::fidl::FDomainResourceDialect),
17959 path: fidl::new_empty!(
17960 fidl::encoding::BoundedString<4095>,
17961 fdomain_client::fidl::FDomainResourceDialect
17962 ),
17963 object: fidl::new_empty!(
17964 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17965 fdomain_client::fidl::FDomainResourceDialect
17966 ),
17967 }
17968 }
17969
17970 #[inline]
17971 unsafe fn decode(
17972 &mut self,
17973 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17974 offset: usize,
17975 _depth: fidl::encoding::Depth,
17976 ) -> fidl::Result<()> {
17977 decoder.debug_check_bounds::<Self>(offset);
17978 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
17980 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17981 let mask = 0xffffffff00000000u64;
17982 let maskedval = padval & mask;
17983 if maskedval != 0 {
17984 return Err(fidl::Error::NonZeroPadding {
17985 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
17986 });
17987 }
17988 fidl::decode!(
17989 OpenFlags,
17990 fdomain_client::fidl::FDomainResourceDialect,
17991 &mut self.flags,
17992 decoder,
17993 offset + 0,
17994 _depth
17995 )?;
17996 fidl::decode!(
17997 ModeType,
17998 fdomain_client::fidl::FDomainResourceDialect,
17999 &mut self.mode,
18000 decoder,
18001 offset + 4,
18002 _depth
18003 )?;
18004 fidl::decode!(
18005 fidl::encoding::BoundedString<4095>,
18006 fdomain_client::fidl::FDomainResourceDialect,
18007 &mut self.path,
18008 decoder,
18009 offset + 8,
18010 _depth
18011 )?;
18012 fidl::decode!(
18013 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
18014 fdomain_client::fidl::FDomainResourceDialect,
18015 &mut self.object,
18016 decoder,
18017 offset + 24,
18018 _depth
18019 )?;
18020 Ok(())
18021 }
18022 }
18023
18024 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
18025 type Borrowed<'a> = &'a mut Self;
18026 fn take_or_borrow<'a>(
18027 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18028 ) -> Self::Borrowed<'a> {
18029 value
18030 }
18031 }
18032
18033 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
18034 type Owned = Self;
18035
18036 #[inline(always)]
18037 fn inline_align(_context: fidl::encoding::Context) -> usize {
18038 4
18039 }
18040
18041 #[inline(always)]
18042 fn inline_size(_context: fidl::encoding::Context) -> usize {
18043 8
18044 }
18045 }
18046
18047 unsafe impl
18048 fidl::encoding::Encode<
18049 DirectoryGetTokenResponse,
18050 fdomain_client::fidl::FDomainResourceDialect,
18051 > for &mut DirectoryGetTokenResponse
18052 {
18053 #[inline]
18054 unsafe fn encode(
18055 self,
18056 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18057 offset: usize,
18058 _depth: fidl::encoding::Depth,
18059 ) -> fidl::Result<()> {
18060 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
18061 fidl::encoding::Encode::<
18063 DirectoryGetTokenResponse,
18064 fdomain_client::fidl::FDomainResourceDialect,
18065 >::encode(
18066 (
18067 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
18068 <fidl::encoding::Optional<
18069 fidl::encoding::HandleType<
18070 fdomain_client::NullableHandle,
18071 { fidl::ObjectType::NONE.into_raw() },
18072 2147483648,
18073 >,
18074 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18075 &mut self.token
18076 ),
18077 ),
18078 encoder,
18079 offset,
18080 _depth,
18081 )
18082 }
18083 }
18084 unsafe impl<
18085 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
18086 T1: fidl::encoding::Encode<
18087 fidl::encoding::Optional<
18088 fidl::encoding::HandleType<
18089 fdomain_client::NullableHandle,
18090 { fidl::ObjectType::NONE.into_raw() },
18091 2147483648,
18092 >,
18093 >,
18094 fdomain_client::fidl::FDomainResourceDialect,
18095 >,
18096 >
18097 fidl::encoding::Encode<
18098 DirectoryGetTokenResponse,
18099 fdomain_client::fidl::FDomainResourceDialect,
18100 > for (T0, T1)
18101 {
18102 #[inline]
18103 unsafe fn encode(
18104 self,
18105 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18106 offset: usize,
18107 depth: fidl::encoding::Depth,
18108 ) -> fidl::Result<()> {
18109 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
18110 self.0.encode(encoder, offset + 0, depth)?;
18114 self.1.encode(encoder, offset + 4, depth)?;
18115 Ok(())
18116 }
18117 }
18118
18119 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18120 for DirectoryGetTokenResponse
18121 {
18122 #[inline(always)]
18123 fn new_empty() -> Self {
18124 Self {
18125 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
18126 token: fidl::new_empty!(
18127 fidl::encoding::Optional<
18128 fidl::encoding::HandleType<
18129 fdomain_client::NullableHandle,
18130 { fidl::ObjectType::NONE.into_raw() },
18131 2147483648,
18132 >,
18133 >,
18134 fdomain_client::fidl::FDomainResourceDialect
18135 ),
18136 }
18137 }
18138
18139 #[inline]
18140 unsafe fn decode(
18141 &mut self,
18142 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18143 offset: usize,
18144 _depth: fidl::encoding::Depth,
18145 ) -> fidl::Result<()> {
18146 decoder.debug_check_bounds::<Self>(offset);
18147 fidl::decode!(
18149 i32,
18150 fdomain_client::fidl::FDomainResourceDialect,
18151 &mut self.s,
18152 decoder,
18153 offset + 0,
18154 _depth
18155 )?;
18156 fidl::decode!(
18157 fidl::encoding::Optional<
18158 fidl::encoding::HandleType<
18159 fdomain_client::NullableHandle,
18160 { fidl::ObjectType::NONE.into_raw() },
18161 2147483648,
18162 >,
18163 >,
18164 fdomain_client::fidl::FDomainResourceDialect,
18165 &mut self.token,
18166 decoder,
18167 offset + 4,
18168 _depth
18169 )?;
18170 Ok(())
18171 }
18172 }
18173
18174 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
18175 type Borrowed<'a> = &'a mut Self;
18176 fn take_or_borrow<'a>(
18177 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18178 ) -> Self::Borrowed<'a> {
18179 value
18180 }
18181 }
18182
18183 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
18184 type Owned = Self;
18185
18186 #[inline(always)]
18187 fn inline_align(_context: fidl::encoding::Context) -> usize {
18188 8
18189 }
18190
18191 #[inline(always)]
18192 fn inline_size(_context: fidl::encoding::Context) -> usize {
18193 40
18194 }
18195 }
18196
18197 unsafe impl
18198 fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
18199 for &mut DirectoryLinkRequest
18200 {
18201 #[inline]
18202 unsafe fn encode(
18203 self,
18204 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18205 offset: usize,
18206 _depth: fidl::encoding::Depth,
18207 ) -> fidl::Result<()> {
18208 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
18209 fidl::encoding::Encode::<
18211 DirectoryLinkRequest,
18212 fdomain_client::fidl::FDomainResourceDialect,
18213 >::encode(
18214 (
18215 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18216 &self.src,
18217 ),
18218 <fidl::encoding::HandleType<
18219 fdomain_client::NullableHandle,
18220 { fidl::ObjectType::NONE.into_raw() },
18221 2147483648,
18222 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18223 &mut self.dst_parent_token,
18224 ),
18225 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18226 &self.dst,
18227 ),
18228 ),
18229 encoder,
18230 offset,
18231 _depth,
18232 )
18233 }
18234 }
18235 unsafe impl<
18236 T0: fidl::encoding::Encode<
18237 fidl::encoding::BoundedString<255>,
18238 fdomain_client::fidl::FDomainResourceDialect,
18239 >,
18240 T1: fidl::encoding::Encode<
18241 fidl::encoding::HandleType<
18242 fdomain_client::NullableHandle,
18243 { fidl::ObjectType::NONE.into_raw() },
18244 2147483648,
18245 >,
18246 fdomain_client::fidl::FDomainResourceDialect,
18247 >,
18248 T2: fidl::encoding::Encode<
18249 fidl::encoding::BoundedString<255>,
18250 fdomain_client::fidl::FDomainResourceDialect,
18251 >,
18252 > fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
18253 for (T0, T1, T2)
18254 {
18255 #[inline]
18256 unsafe fn encode(
18257 self,
18258 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18259 offset: usize,
18260 depth: fidl::encoding::Depth,
18261 ) -> fidl::Result<()> {
18262 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
18263 unsafe {
18266 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18267 (ptr as *mut u64).write_unaligned(0);
18268 }
18269 self.0.encode(encoder, offset + 0, depth)?;
18271 self.1.encode(encoder, offset + 16, depth)?;
18272 self.2.encode(encoder, offset + 24, depth)?;
18273 Ok(())
18274 }
18275 }
18276
18277 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18278 for DirectoryLinkRequest
18279 {
18280 #[inline(always)]
18281 fn new_empty() -> Self {
18282 Self {
18283 src: fidl::new_empty!(
18284 fidl::encoding::BoundedString<255>,
18285 fdomain_client::fidl::FDomainResourceDialect
18286 ),
18287 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18288 dst: fidl::new_empty!(
18289 fidl::encoding::BoundedString<255>,
18290 fdomain_client::fidl::FDomainResourceDialect
18291 ),
18292 }
18293 }
18294
18295 #[inline]
18296 unsafe fn decode(
18297 &mut self,
18298 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18299 offset: usize,
18300 _depth: fidl::encoding::Depth,
18301 ) -> fidl::Result<()> {
18302 decoder.debug_check_bounds::<Self>(offset);
18303 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18305 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18306 let mask = 0xffffffff00000000u64;
18307 let maskedval = padval & mask;
18308 if maskedval != 0 {
18309 return Err(fidl::Error::NonZeroPadding {
18310 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18311 });
18312 }
18313 fidl::decode!(
18314 fidl::encoding::BoundedString<255>,
18315 fdomain_client::fidl::FDomainResourceDialect,
18316 &mut self.src,
18317 decoder,
18318 offset + 0,
18319 _depth
18320 )?;
18321 fidl::decode!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
18322 fidl::decode!(
18323 fidl::encoding::BoundedString<255>,
18324 fdomain_client::fidl::FDomainResourceDialect,
18325 &mut self.dst,
18326 decoder,
18327 offset + 24,
18328 _depth
18329 )?;
18330 Ok(())
18331 }
18332 }
18333
18334 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
18335 type Borrowed<'a> = &'a mut Self;
18336 fn take_or_borrow<'a>(
18337 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18338 ) -> Self::Borrowed<'a> {
18339 value
18340 }
18341 }
18342
18343 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
18344 type Owned = Self;
18345
18346 #[inline(always)]
18347 fn inline_align(_context: fidl::encoding::Context) -> usize {
18348 8
18349 }
18350
18351 #[inline(always)]
18352 fn inline_size(_context: fidl::encoding::Context) -> usize {
18353 40
18354 }
18355 }
18356
18357 unsafe impl
18358 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18359 for &mut DirectoryRenameRequest
18360 {
18361 #[inline]
18362 unsafe fn encode(
18363 self,
18364 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18365 offset: usize,
18366 _depth: fidl::encoding::Depth,
18367 ) -> fidl::Result<()> {
18368 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18369 fidl::encoding::Encode::<
18371 DirectoryRenameRequest,
18372 fdomain_client::fidl::FDomainResourceDialect,
18373 >::encode(
18374 (
18375 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18376 &self.src,
18377 ),
18378 <fidl::encoding::HandleType<
18379 fdomain_client::Event,
18380 { fidl::ObjectType::EVENT.into_raw() },
18381 2147483648,
18382 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18383 &mut self.dst_parent_token,
18384 ),
18385 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18386 &self.dst,
18387 ),
18388 ),
18389 encoder,
18390 offset,
18391 _depth,
18392 )
18393 }
18394 }
18395 unsafe impl<
18396 T0: fidl::encoding::Encode<
18397 fidl::encoding::BoundedString<255>,
18398 fdomain_client::fidl::FDomainResourceDialect,
18399 >,
18400 T1: fidl::encoding::Encode<
18401 fidl::encoding::HandleType<
18402 fdomain_client::Event,
18403 { fidl::ObjectType::EVENT.into_raw() },
18404 2147483648,
18405 >,
18406 fdomain_client::fidl::FDomainResourceDialect,
18407 >,
18408 T2: fidl::encoding::Encode<
18409 fidl::encoding::BoundedString<255>,
18410 fdomain_client::fidl::FDomainResourceDialect,
18411 >,
18412 >
18413 fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18414 for (T0, T1, T2)
18415 {
18416 #[inline]
18417 unsafe fn encode(
18418 self,
18419 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18420 offset: usize,
18421 depth: fidl::encoding::Depth,
18422 ) -> fidl::Result<()> {
18423 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18424 unsafe {
18427 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18428 (ptr as *mut u64).write_unaligned(0);
18429 }
18430 self.0.encode(encoder, offset + 0, depth)?;
18432 self.1.encode(encoder, offset + 16, depth)?;
18433 self.2.encode(encoder, offset + 24, depth)?;
18434 Ok(())
18435 }
18436 }
18437
18438 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18439 for DirectoryRenameRequest
18440 {
18441 #[inline(always)]
18442 fn new_empty() -> Self {
18443 Self {
18444 src: fidl::new_empty!(
18445 fidl::encoding::BoundedString<255>,
18446 fdomain_client::fidl::FDomainResourceDialect
18447 ),
18448 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18449 dst: fidl::new_empty!(
18450 fidl::encoding::BoundedString<255>,
18451 fdomain_client::fidl::FDomainResourceDialect
18452 ),
18453 }
18454 }
18455
18456 #[inline]
18457 unsafe fn decode(
18458 &mut self,
18459 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18460 offset: usize,
18461 _depth: fidl::encoding::Depth,
18462 ) -> fidl::Result<()> {
18463 decoder.debug_check_bounds::<Self>(offset);
18464 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18466 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18467 let mask = 0xffffffff00000000u64;
18468 let maskedval = padval & mask;
18469 if maskedval != 0 {
18470 return Err(fidl::Error::NonZeroPadding {
18471 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18472 });
18473 }
18474 fidl::decode!(
18475 fidl::encoding::BoundedString<255>,
18476 fdomain_client::fidl::FDomainResourceDialect,
18477 &mut self.src,
18478 decoder,
18479 offset + 0,
18480 _depth
18481 )?;
18482 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)?;
18483 fidl::decode!(
18484 fidl::encoding::BoundedString<255>,
18485 fdomain_client::fidl::FDomainResourceDialect,
18486 &mut self.dst,
18487 decoder,
18488 offset + 24,
18489 _depth
18490 )?;
18491 Ok(())
18492 }
18493 }
18494
18495 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
18496 type Borrowed<'a> = &'a mut Self;
18497 fn take_or_borrow<'a>(
18498 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18499 ) -> Self::Borrowed<'a> {
18500 value
18501 }
18502 }
18503
18504 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
18505 type Owned = Self;
18506
18507 #[inline(always)]
18508 fn inline_align(_context: fidl::encoding::Context) -> usize {
18509 4
18510 }
18511
18512 #[inline(always)]
18513 fn inline_size(_context: fidl::encoding::Context) -> usize {
18514 12
18515 }
18516 }
18517
18518 unsafe impl
18519 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18520 for &mut DirectoryWatchRequest
18521 {
18522 #[inline]
18523 unsafe fn encode(
18524 self,
18525 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18526 offset: usize,
18527 _depth: fidl::encoding::Depth,
18528 ) -> fidl::Result<()> {
18529 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18530 fidl::encoding::Encode::<
18532 DirectoryWatchRequest,
18533 fdomain_client::fidl::FDomainResourceDialect,
18534 >::encode(
18535 (
18536 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
18537 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18538 <fidl::encoding::Endpoint<
18539 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18540 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18541 &mut self.watcher
18542 ),
18543 ),
18544 encoder,
18545 offset,
18546 _depth,
18547 )
18548 }
18549 }
18550 unsafe impl<
18551 T0: fidl::encoding::Encode<WatchMask, fdomain_client::fidl::FDomainResourceDialect>,
18552 T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
18553 T2: fidl::encoding::Encode<
18554 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18555 fdomain_client::fidl::FDomainResourceDialect,
18556 >,
18557 >
18558 fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18559 for (T0, T1, T2)
18560 {
18561 #[inline]
18562 unsafe fn encode(
18563 self,
18564 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18565 offset: usize,
18566 depth: fidl::encoding::Depth,
18567 ) -> fidl::Result<()> {
18568 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18569 self.0.encode(encoder, offset + 0, depth)?;
18573 self.1.encode(encoder, offset + 4, depth)?;
18574 self.2.encode(encoder, offset + 8, depth)?;
18575 Ok(())
18576 }
18577 }
18578
18579 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18580 for DirectoryWatchRequest
18581 {
18582 #[inline(always)]
18583 fn new_empty() -> Self {
18584 Self {
18585 mask: fidl::new_empty!(WatchMask, fdomain_client::fidl::FDomainResourceDialect),
18586 options: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
18587 watcher: fidl::new_empty!(
18588 fidl::encoding::Endpoint<
18589 fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18590 >,
18591 fdomain_client::fidl::FDomainResourceDialect
18592 ),
18593 }
18594 }
18595
18596 #[inline]
18597 unsafe fn decode(
18598 &mut self,
18599 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18600 offset: usize,
18601 _depth: fidl::encoding::Depth,
18602 ) -> fidl::Result<()> {
18603 decoder.debug_check_bounds::<Self>(offset);
18604 fidl::decode!(
18606 WatchMask,
18607 fdomain_client::fidl::FDomainResourceDialect,
18608 &mut self.mask,
18609 decoder,
18610 offset + 0,
18611 _depth
18612 )?;
18613 fidl::decode!(
18614 u32,
18615 fdomain_client::fidl::FDomainResourceDialect,
18616 &mut self.options,
18617 decoder,
18618 offset + 4,
18619 _depth
18620 )?;
18621 fidl::decode!(
18622 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18623 fdomain_client::fidl::FDomainResourceDialect,
18624 &mut self.watcher,
18625 decoder,
18626 offset + 8,
18627 _depth
18628 )?;
18629 Ok(())
18630 }
18631 }
18632
18633 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
18634 type Borrowed<'a> = &'a mut Self;
18635 fn take_or_borrow<'a>(
18636 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18637 ) -> Self::Borrowed<'a> {
18638 value
18639 }
18640 }
18641
18642 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
18643 type Owned = Self;
18644
18645 #[inline(always)]
18646 fn inline_align(_context: fidl::encoding::Context) -> usize {
18647 8
18648 }
18649
18650 #[inline(always)]
18651 fn inline_size(_context: fidl::encoding::Context) -> usize {
18652 24
18653 }
18654 }
18655
18656 unsafe impl
18657 fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18658 for &mut FileAllocateRequest
18659 {
18660 #[inline]
18661 unsafe fn encode(
18662 self,
18663 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18664 offset: usize,
18665 _depth: fidl::encoding::Depth,
18666 ) -> fidl::Result<()> {
18667 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18668 fidl::encoding::Encode::<
18670 FileAllocateRequest,
18671 fdomain_client::fidl::FDomainResourceDialect,
18672 >::encode(
18673 (
18674 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
18675 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
18676 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
18677 ),
18678 encoder,
18679 offset,
18680 _depth,
18681 )
18682 }
18683 }
18684 unsafe impl<
18685 T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18686 T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18687 T2: fidl::encoding::Encode<AllocateMode, fdomain_client::fidl::FDomainResourceDialect>,
18688 > fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18689 for (T0, T1, T2)
18690 {
18691 #[inline]
18692 unsafe fn encode(
18693 self,
18694 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18695 offset: usize,
18696 depth: fidl::encoding::Depth,
18697 ) -> fidl::Result<()> {
18698 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18699 unsafe {
18702 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18703 (ptr as *mut u64).write_unaligned(0);
18704 }
18705 self.0.encode(encoder, offset + 0, depth)?;
18707 self.1.encode(encoder, offset + 8, depth)?;
18708 self.2.encode(encoder, offset + 16, depth)?;
18709 Ok(())
18710 }
18711 }
18712
18713 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18714 for FileAllocateRequest
18715 {
18716 #[inline(always)]
18717 fn new_empty() -> Self {
18718 Self {
18719 offset: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18720 length: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18721 mode: fidl::new_empty!(AllocateMode, fdomain_client::fidl::FDomainResourceDialect),
18722 }
18723 }
18724
18725 #[inline]
18726 unsafe fn decode(
18727 &mut self,
18728 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18729 offset: usize,
18730 _depth: fidl::encoding::Depth,
18731 ) -> fidl::Result<()> {
18732 decoder.debug_check_bounds::<Self>(offset);
18733 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18735 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18736 let mask = 0xffffffff00000000u64;
18737 let maskedval = padval & mask;
18738 if maskedval != 0 {
18739 return Err(fidl::Error::NonZeroPadding {
18740 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18741 });
18742 }
18743 fidl::decode!(
18744 u64,
18745 fdomain_client::fidl::FDomainResourceDialect,
18746 &mut self.offset,
18747 decoder,
18748 offset + 0,
18749 _depth
18750 )?;
18751 fidl::decode!(
18752 u64,
18753 fdomain_client::fidl::FDomainResourceDialect,
18754 &mut self.length,
18755 decoder,
18756 offset + 8,
18757 _depth
18758 )?;
18759 fidl::decode!(
18760 AllocateMode,
18761 fdomain_client::fidl::FDomainResourceDialect,
18762 &mut self.mode,
18763 decoder,
18764 offset + 16,
18765 _depth
18766 )?;
18767 Ok(())
18768 }
18769 }
18770
18771 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
18772 type Borrowed<'a> = &'a mut Self;
18773 fn take_or_borrow<'a>(
18774 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18775 ) -> Self::Borrowed<'a> {
18776 value
18777 }
18778 }
18779
18780 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
18781 type Owned = Self;
18782
18783 #[inline(always)]
18784 fn inline_align(_context: fidl::encoding::Context) -> usize {
18785 8
18786 }
18787
18788 #[inline(always)]
18789 fn inline_size(_context: fidl::encoding::Context) -> usize {
18790 16
18791 }
18792 }
18793
18794 unsafe impl
18795 fidl::encoding::Encode<
18796 FileEnableVerityRequest,
18797 fdomain_client::fidl::FDomainResourceDialect,
18798 > for &mut FileEnableVerityRequest
18799 {
18800 #[inline]
18801 unsafe fn encode(
18802 self,
18803 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18804 offset: usize,
18805 _depth: fidl::encoding::Depth,
18806 ) -> fidl::Result<()> {
18807 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18808 fidl::encoding::Encode::<
18810 FileEnableVerityRequest,
18811 fdomain_client::fidl::FDomainResourceDialect,
18812 >::encode(
18813 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
18814 encoder,
18815 offset,
18816 _depth,
18817 )
18818 }
18819 }
18820 unsafe impl<
18821 T0: fidl::encoding::Encode<VerificationOptions, fdomain_client::fidl::FDomainResourceDialect>,
18822 >
18823 fidl::encoding::Encode<
18824 FileEnableVerityRequest,
18825 fdomain_client::fidl::FDomainResourceDialect,
18826 > for (T0,)
18827 {
18828 #[inline]
18829 unsafe fn encode(
18830 self,
18831 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18832 offset: usize,
18833 depth: fidl::encoding::Depth,
18834 ) -> fidl::Result<()> {
18835 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18836 self.0.encode(encoder, offset + 0, depth)?;
18840 Ok(())
18841 }
18842 }
18843
18844 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18845 for FileEnableVerityRequest
18846 {
18847 #[inline(always)]
18848 fn new_empty() -> Self {
18849 Self {
18850 options: fidl::new_empty!(
18851 VerificationOptions,
18852 fdomain_client::fidl::FDomainResourceDialect
18853 ),
18854 }
18855 }
18856
18857 #[inline]
18858 unsafe fn decode(
18859 &mut self,
18860 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18861 offset: usize,
18862 _depth: fidl::encoding::Depth,
18863 ) -> fidl::Result<()> {
18864 decoder.debug_check_bounds::<Self>(offset);
18865 fidl::decode!(
18867 VerificationOptions,
18868 fdomain_client::fidl::FDomainResourceDialect,
18869 &mut self.options,
18870 decoder,
18871 offset + 0,
18872 _depth
18873 )?;
18874 Ok(())
18875 }
18876 }
18877
18878 impl fidl::encoding::ResourceTypeMarker for FileObject {
18879 type Borrowed<'a> = &'a mut Self;
18880 fn take_or_borrow<'a>(
18881 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18882 ) -> Self::Borrowed<'a> {
18883 value
18884 }
18885 }
18886
18887 unsafe impl fidl::encoding::TypeMarker for FileObject {
18888 type Owned = Self;
18889
18890 #[inline(always)]
18891 fn inline_align(_context: fidl::encoding::Context) -> usize {
18892 4
18893 }
18894
18895 #[inline(always)]
18896 fn inline_size(_context: fidl::encoding::Context) -> usize {
18897 8
18898 }
18899 }
18900
18901 unsafe impl fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18902 for &mut FileObject
18903 {
18904 #[inline]
18905 unsafe fn encode(
18906 self,
18907 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18908 offset: usize,
18909 _depth: fidl::encoding::Depth,
18910 ) -> fidl::Result<()> {
18911 encoder.debug_check_bounds::<FileObject>(offset);
18912 fidl::encoding::Encode::<FileObject, fdomain_client::fidl::FDomainResourceDialect>::encode(
18914 (
18915 <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),
18916 <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),
18917 ),
18918 encoder, offset, _depth
18919 )
18920 }
18921 }
18922 unsafe impl<
18923 T0: fidl::encoding::Encode<
18924 fidl::encoding::Optional<
18925 fidl::encoding::HandleType<
18926 fdomain_client::Event,
18927 { fidl::ObjectType::EVENT.into_raw() },
18928 2147483648,
18929 >,
18930 >,
18931 fdomain_client::fidl::FDomainResourceDialect,
18932 >,
18933 T1: fidl::encoding::Encode<
18934 fidl::encoding::Optional<
18935 fidl::encoding::HandleType<
18936 fdomain_client::Stream,
18937 { fidl::ObjectType::STREAM.into_raw() },
18938 2147483648,
18939 >,
18940 >,
18941 fdomain_client::fidl::FDomainResourceDialect,
18942 >,
18943 > fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18944 for (T0, T1)
18945 {
18946 #[inline]
18947 unsafe fn encode(
18948 self,
18949 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18950 offset: usize,
18951 depth: fidl::encoding::Depth,
18952 ) -> fidl::Result<()> {
18953 encoder.debug_check_bounds::<FileObject>(offset);
18954 self.0.encode(encoder, offset + 0, depth)?;
18958 self.1.encode(encoder, offset + 4, depth)?;
18959 Ok(())
18960 }
18961 }
18962
18963 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileObject {
18964 #[inline(always)]
18965 fn new_empty() -> Self {
18966 Self {
18967 event: fidl::new_empty!(
18968 fidl::encoding::Optional<
18969 fidl::encoding::HandleType<
18970 fdomain_client::Event,
18971 { fidl::ObjectType::EVENT.into_raw() },
18972 2147483648,
18973 >,
18974 >,
18975 fdomain_client::fidl::FDomainResourceDialect
18976 ),
18977 stream: fidl::new_empty!(
18978 fidl::encoding::Optional<
18979 fidl::encoding::HandleType<
18980 fdomain_client::Stream,
18981 { fidl::ObjectType::STREAM.into_raw() },
18982 2147483648,
18983 >,
18984 >,
18985 fdomain_client::fidl::FDomainResourceDialect
18986 ),
18987 }
18988 }
18989
18990 #[inline]
18991 unsafe fn decode(
18992 &mut self,
18993 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18994 offset: usize,
18995 _depth: fidl::encoding::Depth,
18996 ) -> fidl::Result<()> {
18997 decoder.debug_check_bounds::<Self>(offset);
18998 fidl::decode!(
19000 fidl::encoding::Optional<
19001 fidl::encoding::HandleType<
19002 fdomain_client::Event,
19003 { fidl::ObjectType::EVENT.into_raw() },
19004 2147483648,
19005 >,
19006 >,
19007 fdomain_client::fidl::FDomainResourceDialect,
19008 &mut self.event,
19009 decoder,
19010 offset + 0,
19011 _depth
19012 )?;
19013 fidl::decode!(
19014 fidl::encoding::Optional<
19015 fidl::encoding::HandleType<
19016 fdomain_client::Stream,
19017 { fidl::ObjectType::STREAM.into_raw() },
19018 2147483648,
19019 >,
19020 >,
19021 fdomain_client::fidl::FDomainResourceDialect,
19022 &mut self.stream,
19023 decoder,
19024 offset + 4,
19025 _depth
19026 )?;
19027 Ok(())
19028 }
19029 }
19030
19031 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
19032 type Borrowed<'a> = &'a mut Self;
19033 fn take_or_borrow<'a>(
19034 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19035 ) -> Self::Borrowed<'a> {
19036 value
19037 }
19038 }
19039
19040 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
19041 type Owned = Self;
19042
19043 #[inline(always)]
19044 fn inline_align(_context: fidl::encoding::Context) -> usize {
19045 4
19046 }
19047
19048 #[inline(always)]
19049 fn inline_size(_context: fidl::encoding::Context) -> usize {
19050 4
19051 }
19052 }
19053
19054 unsafe impl
19055 fidl::encoding::Encode<
19056 FileGetBackingMemoryResponse,
19057 fdomain_client::fidl::FDomainResourceDialect,
19058 > for &mut FileGetBackingMemoryResponse
19059 {
19060 #[inline]
19061 unsafe fn encode(
19062 self,
19063 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19064 offset: usize,
19065 _depth: fidl::encoding::Depth,
19066 ) -> fidl::Result<()> {
19067 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
19068 fidl::encoding::Encode::<
19070 FileGetBackingMemoryResponse,
19071 fdomain_client::fidl::FDomainResourceDialect,
19072 >::encode(
19073 (<fidl::encoding::HandleType<
19074 fdomain_client::Vmo,
19075 { fidl::ObjectType::VMO.into_raw() },
19076 2147483648,
19077 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19078 &mut self.vmo
19079 ),),
19080 encoder,
19081 offset,
19082 _depth,
19083 )
19084 }
19085 }
19086 unsafe impl<
19087 T0: fidl::encoding::Encode<
19088 fidl::encoding::HandleType<
19089 fdomain_client::Vmo,
19090 { fidl::ObjectType::VMO.into_raw() },
19091 2147483648,
19092 >,
19093 fdomain_client::fidl::FDomainResourceDialect,
19094 >,
19095 >
19096 fidl::encoding::Encode<
19097 FileGetBackingMemoryResponse,
19098 fdomain_client::fidl::FDomainResourceDialect,
19099 > for (T0,)
19100 {
19101 #[inline]
19102 unsafe fn encode(
19103 self,
19104 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19105 offset: usize,
19106 depth: fidl::encoding::Depth,
19107 ) -> fidl::Result<()> {
19108 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
19109 self.0.encode(encoder, offset + 0, depth)?;
19113 Ok(())
19114 }
19115 }
19116
19117 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19118 for FileGetBackingMemoryResponse
19119 {
19120 #[inline(always)]
19121 fn new_empty() -> Self {
19122 Self {
19123 vmo: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
19124 }
19125 }
19126
19127 #[inline]
19128 unsafe fn decode(
19129 &mut self,
19130 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19131 offset: usize,
19132 _depth: fidl::encoding::Depth,
19133 ) -> fidl::Result<()> {
19134 decoder.debug_check_bounds::<Self>(offset);
19135 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)?;
19137 Ok(())
19138 }
19139 }
19140
19141 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
19142 type Borrowed<'a> = &'a mut Self;
19143 fn take_or_borrow<'a>(
19144 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19145 ) -> Self::Borrowed<'a> {
19146 value
19147 }
19148 }
19149
19150 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
19151 type Owned = Self;
19152
19153 #[inline(always)]
19154 fn inline_align(_context: fidl::encoding::Context) -> usize {
19155 8
19156 }
19157
19158 #[inline(always)]
19159 fn inline_size(_context: fidl::encoding::Context) -> usize {
19160 24
19161 }
19162 }
19163
19164 unsafe impl
19165 fidl::encoding::Encode<
19166 LinkableLinkIntoRequest,
19167 fdomain_client::fidl::FDomainResourceDialect,
19168 > for &mut LinkableLinkIntoRequest
19169 {
19170 #[inline]
19171 unsafe fn encode(
19172 self,
19173 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19174 offset: usize,
19175 _depth: fidl::encoding::Depth,
19176 ) -> fidl::Result<()> {
19177 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
19178 fidl::encoding::Encode::<
19180 LinkableLinkIntoRequest,
19181 fdomain_client::fidl::FDomainResourceDialect,
19182 >::encode(
19183 (
19184 <fidl::encoding::HandleType<
19185 fdomain_client::Event,
19186 { fidl::ObjectType::EVENT.into_raw() },
19187 2147483648,
19188 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19189 &mut self.dst_parent_token,
19190 ),
19191 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
19192 &self.dst,
19193 ),
19194 ),
19195 encoder,
19196 offset,
19197 _depth,
19198 )
19199 }
19200 }
19201 unsafe impl<
19202 T0: fidl::encoding::Encode<
19203 fidl::encoding::HandleType<
19204 fdomain_client::Event,
19205 { fidl::ObjectType::EVENT.into_raw() },
19206 2147483648,
19207 >,
19208 fdomain_client::fidl::FDomainResourceDialect,
19209 >,
19210 T1: fidl::encoding::Encode<
19211 fidl::encoding::BoundedString<255>,
19212 fdomain_client::fidl::FDomainResourceDialect,
19213 >,
19214 >
19215 fidl::encoding::Encode<
19216 LinkableLinkIntoRequest,
19217 fdomain_client::fidl::FDomainResourceDialect,
19218 > for (T0, T1)
19219 {
19220 #[inline]
19221 unsafe fn encode(
19222 self,
19223 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19224 offset: usize,
19225 depth: fidl::encoding::Depth,
19226 ) -> fidl::Result<()> {
19227 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
19228 unsafe {
19231 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19232 (ptr as *mut u64).write_unaligned(0);
19233 }
19234 self.0.encode(encoder, offset + 0, depth)?;
19236 self.1.encode(encoder, offset + 8, depth)?;
19237 Ok(())
19238 }
19239 }
19240
19241 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19242 for LinkableLinkIntoRequest
19243 {
19244 #[inline(always)]
19245 fn new_empty() -> Self {
19246 Self {
19247 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
19248 dst: fidl::new_empty!(
19249 fidl::encoding::BoundedString<255>,
19250 fdomain_client::fidl::FDomainResourceDialect
19251 ),
19252 }
19253 }
19254
19255 #[inline]
19256 unsafe fn decode(
19257 &mut self,
19258 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19259 offset: usize,
19260 _depth: fidl::encoding::Depth,
19261 ) -> fidl::Result<()> {
19262 decoder.debug_check_bounds::<Self>(offset);
19263 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19265 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19266 let mask = 0xffffffff00000000u64;
19267 let maskedval = padval & mask;
19268 if maskedval != 0 {
19269 return Err(fidl::Error::NonZeroPadding {
19270 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19271 });
19272 }
19273 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)?;
19274 fidl::decode!(
19275 fidl::encoding::BoundedString<255>,
19276 fdomain_client::fidl::FDomainResourceDialect,
19277 &mut self.dst,
19278 decoder,
19279 offset + 8,
19280 _depth
19281 )?;
19282 Ok(())
19283 }
19284 }
19285
19286 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
19287 type Borrowed<'a> = &'a mut Self;
19288 fn take_or_borrow<'a>(
19289 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19290 ) -> Self::Borrowed<'a> {
19291 value
19292 }
19293 }
19294
19295 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
19296 type Owned = Self;
19297
19298 #[inline(always)]
19299 fn inline_align(_context: fidl::encoding::Context) -> usize {
19300 4
19301 }
19302
19303 #[inline(always)]
19304 fn inline_size(_context: fidl::encoding::Context) -> usize {
19305 8
19306 }
19307 }
19308
19309 unsafe impl
19310 fidl::encoding::Encode<
19311 NodeDeprecatedCloneRequest,
19312 fdomain_client::fidl::FDomainResourceDialect,
19313 > for &mut NodeDeprecatedCloneRequest
19314 {
19315 #[inline]
19316 unsafe fn encode(
19317 self,
19318 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19319 offset: usize,
19320 _depth: fidl::encoding::Depth,
19321 ) -> fidl::Result<()> {
19322 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19323 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19325 (
19326 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
19327 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
19328 ),
19329 encoder, offset, _depth
19330 )
19331 }
19332 }
19333 unsafe impl<
19334 T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
19335 T1: fidl::encoding::Encode<
19336 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19337 fdomain_client::fidl::FDomainResourceDialect,
19338 >,
19339 >
19340 fidl::encoding::Encode<
19341 NodeDeprecatedCloneRequest,
19342 fdomain_client::fidl::FDomainResourceDialect,
19343 > for (T0, T1)
19344 {
19345 #[inline]
19346 unsafe fn encode(
19347 self,
19348 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19349 offset: usize,
19350 depth: fidl::encoding::Depth,
19351 ) -> fidl::Result<()> {
19352 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19353 self.0.encode(encoder, offset + 0, depth)?;
19357 self.1.encode(encoder, offset + 4, depth)?;
19358 Ok(())
19359 }
19360 }
19361
19362 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19363 for NodeDeprecatedCloneRequest
19364 {
19365 #[inline(always)]
19366 fn new_empty() -> Self {
19367 Self {
19368 flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
19369 object: fidl::new_empty!(
19370 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19371 fdomain_client::fidl::FDomainResourceDialect
19372 ),
19373 }
19374 }
19375
19376 #[inline]
19377 unsafe fn decode(
19378 &mut self,
19379 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19380 offset: usize,
19381 _depth: fidl::encoding::Depth,
19382 ) -> fidl::Result<()> {
19383 decoder.debug_check_bounds::<Self>(offset);
19384 fidl::decode!(
19386 OpenFlags,
19387 fdomain_client::fidl::FDomainResourceDialect,
19388 &mut self.flags,
19389 decoder,
19390 offset + 0,
19391 _depth
19392 )?;
19393 fidl::decode!(
19394 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19395 fdomain_client::fidl::FDomainResourceDialect,
19396 &mut self.object,
19397 decoder,
19398 offset + 4,
19399 _depth
19400 )?;
19401 Ok(())
19402 }
19403 }
19404
19405 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
19406 type Borrowed<'a> = &'a mut Self;
19407 fn take_or_borrow<'a>(
19408 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19409 ) -> Self::Borrowed<'a> {
19410 value
19411 }
19412 }
19413
19414 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
19415 type Owned = Self;
19416
19417 #[inline(always)]
19418 fn inline_align(_context: fidl::encoding::Context) -> usize {
19419 4
19420 }
19421
19422 #[inline(always)]
19423 fn inline_size(_context: fidl::encoding::Context) -> usize {
19424 4
19425 }
19426 }
19427
19428 unsafe impl
19429 fidl::encoding::Encode<
19430 NodeListExtendedAttributesRequest,
19431 fdomain_client::fidl::FDomainResourceDialect,
19432 > for &mut NodeListExtendedAttributesRequest
19433 {
19434 #[inline]
19435 unsafe fn encode(
19436 self,
19437 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19438 offset: usize,
19439 _depth: fidl::encoding::Depth,
19440 ) -> fidl::Result<()> {
19441 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19442 fidl::encoding::Encode::<
19444 NodeListExtendedAttributesRequest,
19445 fdomain_client::fidl::FDomainResourceDialect,
19446 >::encode(
19447 (<fidl::encoding::Endpoint<
19448 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19449 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19450 &mut self.iterator
19451 ),),
19452 encoder,
19453 offset,
19454 _depth,
19455 )
19456 }
19457 }
19458 unsafe impl<
19459 T0: fidl::encoding::Encode<
19460 fidl::encoding::Endpoint<
19461 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19462 >,
19463 fdomain_client::fidl::FDomainResourceDialect,
19464 >,
19465 >
19466 fidl::encoding::Encode<
19467 NodeListExtendedAttributesRequest,
19468 fdomain_client::fidl::FDomainResourceDialect,
19469 > for (T0,)
19470 {
19471 #[inline]
19472 unsafe fn encode(
19473 self,
19474 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19475 offset: usize,
19476 depth: fidl::encoding::Depth,
19477 ) -> fidl::Result<()> {
19478 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19479 self.0.encode(encoder, offset + 0, depth)?;
19483 Ok(())
19484 }
19485 }
19486
19487 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19488 for NodeListExtendedAttributesRequest
19489 {
19490 #[inline(always)]
19491 fn new_empty() -> Self {
19492 Self {
19493 iterator: fidl::new_empty!(
19494 fidl::encoding::Endpoint<
19495 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19496 >,
19497 fdomain_client::fidl::FDomainResourceDialect
19498 ),
19499 }
19500 }
19501
19502 #[inline]
19503 unsafe fn decode(
19504 &mut self,
19505 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19506 offset: usize,
19507 _depth: fidl::encoding::Depth,
19508 ) -> fidl::Result<()> {
19509 decoder.debug_check_bounds::<Self>(offset);
19510 fidl::decode!(
19512 fidl::encoding::Endpoint<
19513 fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19514 >,
19515 fdomain_client::fidl::FDomainResourceDialect,
19516 &mut self.iterator,
19517 decoder,
19518 offset + 0,
19519 _depth
19520 )?;
19521 Ok(())
19522 }
19523 }
19524
19525 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
19526 type Borrowed<'a> = &'a mut Self;
19527 fn take_or_borrow<'a>(
19528 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19529 ) -> Self::Borrowed<'a> {
19530 value
19531 }
19532 }
19533
19534 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
19535 type Owned = Self;
19536
19537 #[inline(always)]
19538 fn inline_align(_context: fidl::encoding::Context) -> usize {
19539 8
19540 }
19541
19542 #[inline(always)]
19543 fn inline_size(_context: fidl::encoding::Context) -> usize {
19544 24
19545 }
19546 }
19547
19548 unsafe impl
19549 fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19550 for &mut NodeOnOpenRequest
19551 {
19552 #[inline]
19553 unsafe fn encode(
19554 self,
19555 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19556 offset: usize,
19557 _depth: fidl::encoding::Depth,
19558 ) -> fidl::Result<()> {
19559 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19560 fidl::encoding::Encode::<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19562 (
19563 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
19564 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
19565 ),
19566 encoder, offset, _depth
19567 )
19568 }
19569 }
19570 unsafe impl<
19571 T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
19572 T1: fidl::encoding::Encode<
19573 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19574 fdomain_client::fidl::FDomainResourceDialect,
19575 >,
19576 > fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19577 for (T0, T1)
19578 {
19579 #[inline]
19580 unsafe fn encode(
19581 self,
19582 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19583 offset: usize,
19584 depth: fidl::encoding::Depth,
19585 ) -> fidl::Result<()> {
19586 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19587 unsafe {
19590 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19591 (ptr as *mut u64).write_unaligned(0);
19592 }
19593 self.0.encode(encoder, offset + 0, depth)?;
19595 self.1.encode(encoder, offset + 8, depth)?;
19596 Ok(())
19597 }
19598 }
19599
19600 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19601 for NodeOnOpenRequest
19602 {
19603 #[inline(always)]
19604 fn new_empty() -> Self {
19605 Self {
19606 s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
19607 info: fidl::new_empty!(
19608 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19609 fdomain_client::fidl::FDomainResourceDialect
19610 ),
19611 }
19612 }
19613
19614 #[inline]
19615 unsafe fn decode(
19616 &mut self,
19617 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19618 offset: usize,
19619 _depth: fidl::encoding::Depth,
19620 ) -> fidl::Result<()> {
19621 decoder.debug_check_bounds::<Self>(offset);
19622 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19624 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19625 let mask = 0xffffffff00000000u64;
19626 let maskedval = padval & mask;
19627 if maskedval != 0 {
19628 return Err(fidl::Error::NonZeroPadding {
19629 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19630 });
19631 }
19632 fidl::decode!(
19633 i32,
19634 fdomain_client::fidl::FDomainResourceDialect,
19635 &mut self.s,
19636 decoder,
19637 offset + 0,
19638 _depth
19639 )?;
19640 fidl::decode!(
19641 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19642 fdomain_client::fidl::FDomainResourceDialect,
19643 &mut self.info,
19644 decoder,
19645 offset + 8,
19646 _depth
19647 )?;
19648 Ok(())
19649 }
19650 }
19651
19652 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
19653 type Borrowed<'a> = &'a mut Self;
19654 fn take_or_borrow<'a>(
19655 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19656 ) -> Self::Borrowed<'a> {
19657 value
19658 }
19659 }
19660
19661 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
19662 type Owned = Self;
19663
19664 #[inline(always)]
19665 fn inline_align(_context: fidl::encoding::Context) -> usize {
19666 8
19667 }
19668
19669 #[inline(always)]
19670 fn inline_size(_context: fidl::encoding::Context) -> usize {
19671 40
19672 }
19673 }
19674
19675 unsafe impl
19676 fidl::encoding::Encode<
19677 NodeSetExtendedAttributeRequest,
19678 fdomain_client::fidl::FDomainResourceDialect,
19679 > for &mut NodeSetExtendedAttributeRequest
19680 {
19681 #[inline]
19682 unsafe fn encode(
19683 self,
19684 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19685 offset: usize,
19686 _depth: fidl::encoding::Depth,
19687 ) -> fidl::Result<()> {
19688 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19689 fidl::encoding::Encode::<
19691 NodeSetExtendedAttributeRequest,
19692 fdomain_client::fidl::FDomainResourceDialect,
19693 >::encode(
19694 (
19695 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
19696 &self.name,
19697 ),
19698 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19699 &mut self.value,
19700 ),
19701 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
19702 &self.mode,
19703 ),
19704 ),
19705 encoder,
19706 offset,
19707 _depth,
19708 )
19709 }
19710 }
19711 unsafe impl<
19712 T0: fidl::encoding::Encode<
19713 fidl::encoding::Vector<u8, 255>,
19714 fdomain_client::fidl::FDomainResourceDialect,
19715 >,
19716 T1: fidl::encoding::Encode<
19717 ExtendedAttributeValue,
19718 fdomain_client::fidl::FDomainResourceDialect,
19719 >,
19720 T2: fidl::encoding::Encode<
19721 SetExtendedAttributeMode,
19722 fdomain_client::fidl::FDomainResourceDialect,
19723 >,
19724 >
19725 fidl::encoding::Encode<
19726 NodeSetExtendedAttributeRequest,
19727 fdomain_client::fidl::FDomainResourceDialect,
19728 > for (T0, T1, T2)
19729 {
19730 #[inline]
19731 unsafe fn encode(
19732 self,
19733 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19734 offset: usize,
19735 depth: fidl::encoding::Depth,
19736 ) -> fidl::Result<()> {
19737 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19738 unsafe {
19741 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
19742 (ptr as *mut u64).write_unaligned(0);
19743 }
19744 self.0.encode(encoder, offset + 0, depth)?;
19746 self.1.encode(encoder, offset + 16, depth)?;
19747 self.2.encode(encoder, offset + 32, depth)?;
19748 Ok(())
19749 }
19750 }
19751
19752 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19753 for NodeSetExtendedAttributeRequest
19754 {
19755 #[inline(always)]
19756 fn new_empty() -> Self {
19757 Self {
19758 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect),
19759 value: fidl::new_empty!(
19760 ExtendedAttributeValue,
19761 fdomain_client::fidl::FDomainResourceDialect
19762 ),
19763 mode: fidl::new_empty!(
19764 SetExtendedAttributeMode,
19765 fdomain_client::fidl::FDomainResourceDialect
19766 ),
19767 }
19768 }
19769
19770 #[inline]
19771 unsafe fn decode(
19772 &mut self,
19773 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19774 offset: usize,
19775 _depth: fidl::encoding::Depth,
19776 ) -> fidl::Result<()> {
19777 decoder.debug_check_bounds::<Self>(offset);
19778 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
19780 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19781 let mask = 0xffffffff00000000u64;
19782 let maskedval = padval & mask;
19783 if maskedval != 0 {
19784 return Err(fidl::Error::NonZeroPadding {
19785 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
19786 });
19787 }
19788 fidl::decode!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
19789 fidl::decode!(
19790 ExtendedAttributeValue,
19791 fdomain_client::fidl::FDomainResourceDialect,
19792 &mut self.value,
19793 decoder,
19794 offset + 16,
19795 _depth
19796 )?;
19797 fidl::decode!(
19798 SetExtendedAttributeMode,
19799 fdomain_client::fidl::FDomainResourceDialect,
19800 &mut self.mode,
19801 decoder,
19802 offset + 32,
19803 _depth
19804 )?;
19805 Ok(())
19806 }
19807 }
19808
19809 impl fidl::encoding::ResourceTypeMarker for OpenableOpenRequest {
19810 type Borrowed<'a> = &'a mut Self;
19811 fn take_or_borrow<'a>(
19812 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19813 ) -> Self::Borrowed<'a> {
19814 value
19815 }
19816 }
19817
19818 unsafe impl fidl::encoding::TypeMarker for OpenableOpenRequest {
19819 type Owned = Self;
19820
19821 #[inline(always)]
19822 fn inline_align(_context: fidl::encoding::Context) -> usize {
19823 8
19824 }
19825
19826 #[inline(always)]
19827 fn inline_size(_context: fidl::encoding::Context) -> usize {
19828 48
19829 }
19830 }
19831
19832 unsafe impl
19833 fidl::encoding::Encode<OpenableOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19834 for &mut OpenableOpenRequest
19835 {
19836 #[inline]
19837 unsafe fn encode(
19838 self,
19839 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19840 offset: usize,
19841 _depth: fidl::encoding::Depth,
19842 ) -> fidl::Result<()> {
19843 encoder.debug_check_bounds::<OpenableOpenRequest>(offset);
19844 fidl::encoding::Encode::<OpenableOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19846 (
19847 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
19848 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
19849 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
19850 <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
19851 ),
19852 encoder, offset, _depth
19853 )
19854 }
19855 }
19856 unsafe impl<
19857 T0: fidl::encoding::Encode<
19858 fidl::encoding::BoundedString<4095>,
19859 fdomain_client::fidl::FDomainResourceDialect,
19860 >,
19861 T1: fidl::encoding::Encode<Flags, fdomain_client::fidl::FDomainResourceDialect>,
19862 T2: fidl::encoding::Encode<Options, fdomain_client::fidl::FDomainResourceDialect>,
19863 T3: fidl::encoding::Encode<
19864 fidl::encoding::HandleType<
19865 fdomain_client::Channel,
19866 { fidl::ObjectType::CHANNEL.into_raw() },
19867 2147483648,
19868 >,
19869 fdomain_client::fidl::FDomainResourceDialect,
19870 >,
19871 > fidl::encoding::Encode<OpenableOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19872 for (T0, T1, T2, T3)
19873 {
19874 #[inline]
19875 unsafe fn encode(
19876 self,
19877 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19878 offset: usize,
19879 depth: fidl::encoding::Depth,
19880 ) -> fidl::Result<()> {
19881 encoder.debug_check_bounds::<OpenableOpenRequest>(offset);
19882 unsafe {
19885 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
19886 (ptr as *mut u64).write_unaligned(0);
19887 }
19888 self.0.encode(encoder, offset + 0, depth)?;
19890 self.1.encode(encoder, offset + 16, depth)?;
19891 self.2.encode(encoder, offset + 24, depth)?;
19892 self.3.encode(encoder, offset + 40, depth)?;
19893 Ok(())
19894 }
19895 }
19896
19897 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19898 for OpenableOpenRequest
19899 {
19900 #[inline(always)]
19901 fn new_empty() -> Self {
19902 Self {
19903 path: fidl::new_empty!(
19904 fidl::encoding::BoundedString<4095>,
19905 fdomain_client::fidl::FDomainResourceDialect
19906 ),
19907 flags: fidl::new_empty!(Flags, fdomain_client::fidl::FDomainResourceDialect),
19908 options: fidl::new_empty!(Options, fdomain_client::fidl::FDomainResourceDialect),
19909 object: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
19910 }
19911 }
19912
19913 #[inline]
19914 unsafe fn decode(
19915 &mut self,
19916 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19917 offset: usize,
19918 _depth: fidl::encoding::Depth,
19919 ) -> fidl::Result<()> {
19920 decoder.debug_check_bounds::<Self>(offset);
19921 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
19923 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19924 let mask = 0xffffffff00000000u64;
19925 let maskedval = padval & mask;
19926 if maskedval != 0 {
19927 return Err(fidl::Error::NonZeroPadding {
19928 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
19929 });
19930 }
19931 fidl::decode!(
19932 fidl::encoding::BoundedString<4095>,
19933 fdomain_client::fidl::FDomainResourceDialect,
19934 &mut self.path,
19935 decoder,
19936 offset + 0,
19937 _depth
19938 )?;
19939 fidl::decode!(
19940 Flags,
19941 fdomain_client::fidl::FDomainResourceDialect,
19942 &mut self.flags,
19943 decoder,
19944 offset + 16,
19945 _depth
19946 )?;
19947 fidl::decode!(
19948 Options,
19949 fdomain_client::fidl::FDomainResourceDialect,
19950 &mut self.options,
19951 decoder,
19952 offset + 24,
19953 _depth
19954 )?;
19955 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)?;
19956 Ok(())
19957 }
19958 }
19959
19960 impl ConnectionInfo {
19961 #[inline(always)]
19962 fn max_ordinal_present(&self) -> u64 {
19963 if let Some(_) = self.rights {
19964 return 1;
19965 }
19966 0
19967 }
19968 }
19969
19970 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
19971 type Borrowed<'a> = &'a mut Self;
19972 fn take_or_borrow<'a>(
19973 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19974 ) -> Self::Borrowed<'a> {
19975 value
19976 }
19977 }
19978
19979 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
19980 type Owned = Self;
19981
19982 #[inline(always)]
19983 fn inline_align(_context: fidl::encoding::Context) -> usize {
19984 8
19985 }
19986
19987 #[inline(always)]
19988 fn inline_size(_context: fidl::encoding::Context) -> usize {
19989 16
19990 }
19991 }
19992
19993 unsafe impl fidl::encoding::Encode<ConnectionInfo, fdomain_client::fidl::FDomainResourceDialect>
19994 for &mut ConnectionInfo
19995 {
19996 unsafe fn encode(
19997 self,
19998 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19999 offset: usize,
20000 mut depth: fidl::encoding::Depth,
20001 ) -> fidl::Result<()> {
20002 encoder.debug_check_bounds::<ConnectionInfo>(offset);
20003 let max_ordinal: u64 = self.max_ordinal_present();
20005 encoder.write_num(max_ordinal, offset);
20006 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
20007 if max_ordinal == 0 {
20009 return Ok(());
20010 }
20011 depth.increment()?;
20012 let envelope_size = 8;
20013 let bytes_len = max_ordinal as usize * envelope_size;
20014 #[allow(unused_variables)]
20015 let offset = encoder.out_of_line_offset(bytes_len);
20016 let mut _prev_end_offset: usize = 0;
20017 if 1 > max_ordinal {
20018 return Ok(());
20019 }
20020
20021 let cur_offset: usize = (1 - 1) * envelope_size;
20024
20025 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
20027
20028 fidl::encoding::encode_in_envelope_optional::<
20033 Operations,
20034 fdomain_client::fidl::FDomainResourceDialect,
20035 >(
20036 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
20037 encoder,
20038 offset + cur_offset,
20039 depth,
20040 )?;
20041
20042 _prev_end_offset = cur_offset + envelope_size;
20043
20044 Ok(())
20045 }
20046 }
20047
20048 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {
20049 #[inline(always)]
20050 fn new_empty() -> Self {
20051 Self::default()
20052 }
20053
20054 unsafe fn decode(
20055 &mut self,
20056 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20057 offset: usize,
20058 mut depth: fidl::encoding::Depth,
20059 ) -> fidl::Result<()> {
20060 decoder.debug_check_bounds::<Self>(offset);
20061 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
20062 None => return Err(fidl::Error::NotNullable),
20063 Some(len) => len,
20064 };
20065 if len == 0 {
20067 return Ok(());
20068 };
20069 depth.increment()?;
20070 let envelope_size = 8;
20071 let bytes_len = len * envelope_size;
20072 let offset = decoder.out_of_line_offset(bytes_len)?;
20073 let mut _next_ordinal_to_read = 0;
20075 let mut next_offset = offset;
20076 let end_offset = offset + bytes_len;
20077 _next_ordinal_to_read += 1;
20078 if next_offset >= end_offset {
20079 return Ok(());
20080 }
20081
20082 while _next_ordinal_to_read < 1 {
20084 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20085 _next_ordinal_to_read += 1;
20086 next_offset += envelope_size;
20087 }
20088
20089 let next_out_of_line = decoder.next_out_of_line();
20090 let handles_before = decoder.remaining_handles();
20091 if let Some((inlined, num_bytes, num_handles)) =
20092 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20093 {
20094 let member_inline_size =
20095 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20096 if inlined != (member_inline_size <= 4) {
20097 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20098 }
20099 let inner_offset;
20100 let mut inner_depth = depth.clone();
20101 if inlined {
20102 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20103 inner_offset = next_offset;
20104 } else {
20105 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20106 inner_depth.increment()?;
20107 }
20108 let val_ref = self.rights.get_or_insert_with(|| {
20109 fidl::new_empty!(Operations, fdomain_client::fidl::FDomainResourceDialect)
20110 });
20111 fidl::decode!(
20112 Operations,
20113 fdomain_client::fidl::FDomainResourceDialect,
20114 val_ref,
20115 decoder,
20116 inner_offset,
20117 inner_depth
20118 )?;
20119 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20120 {
20121 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20122 }
20123 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20124 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20125 }
20126 }
20127
20128 next_offset += envelope_size;
20129
20130 while next_offset < end_offset {
20132 _next_ordinal_to_read += 1;
20133 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20134 next_offset += envelope_size;
20135 }
20136
20137 Ok(())
20138 }
20139 }
20140
20141 impl FileInfo {
20142 #[inline(always)]
20143 fn max_ordinal_present(&self) -> u64 {
20144 if let Some(_) = self.attributes {
20145 return 4;
20146 }
20147 if let Some(_) = self.stream {
20148 return 3;
20149 }
20150 if let Some(_) = self.observer {
20151 return 2;
20152 }
20153 if let Some(_) = self.is_append {
20154 return 1;
20155 }
20156 0
20157 }
20158 }
20159
20160 impl fidl::encoding::ResourceTypeMarker for FileInfo {
20161 type Borrowed<'a> = &'a mut Self;
20162 fn take_or_borrow<'a>(
20163 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20164 ) -> Self::Borrowed<'a> {
20165 value
20166 }
20167 }
20168
20169 unsafe impl fidl::encoding::TypeMarker for FileInfo {
20170 type Owned = Self;
20171
20172 #[inline(always)]
20173 fn inline_align(_context: fidl::encoding::Context) -> usize {
20174 8
20175 }
20176
20177 #[inline(always)]
20178 fn inline_size(_context: fidl::encoding::Context) -> usize {
20179 16
20180 }
20181 }
20182
20183 unsafe impl fidl::encoding::Encode<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
20184 for &mut FileInfo
20185 {
20186 unsafe fn encode(
20187 self,
20188 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20189 offset: usize,
20190 mut depth: fidl::encoding::Depth,
20191 ) -> fidl::Result<()> {
20192 encoder.debug_check_bounds::<FileInfo>(offset);
20193 let max_ordinal: u64 = self.max_ordinal_present();
20195 encoder.write_num(max_ordinal, offset);
20196 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
20197 if max_ordinal == 0 {
20199 return Ok(());
20200 }
20201 depth.increment()?;
20202 let envelope_size = 8;
20203 let bytes_len = max_ordinal as usize * envelope_size;
20204 #[allow(unused_variables)]
20205 let offset = encoder.out_of_line_offset(bytes_len);
20206 let mut _prev_end_offset: usize = 0;
20207 if 1 > max_ordinal {
20208 return Ok(());
20209 }
20210
20211 let cur_offset: usize = (1 - 1) * envelope_size;
20214
20215 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
20217
20218 fidl::encoding::encode_in_envelope_optional::<
20223 bool,
20224 fdomain_client::fidl::FDomainResourceDialect,
20225 >(
20226 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
20227 encoder,
20228 offset + cur_offset,
20229 depth,
20230 )?;
20231
20232 _prev_end_offset = cur_offset + envelope_size;
20233 if 2 > max_ordinal {
20234 return Ok(());
20235 }
20236
20237 let cur_offset: usize = (2 - 1) * envelope_size;
20240
20241 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
20243
20244 fidl::encoding::encode_in_envelope_optional::<
20249 fidl::encoding::HandleType<
20250 fdomain_client::Event,
20251 { fidl::ObjectType::EVENT.into_raw() },
20252 2147483648,
20253 >,
20254 fdomain_client::fidl::FDomainResourceDialect,
20255 >(
20256 self.observer.as_mut().map(
20257 <fidl::encoding::HandleType<
20258 fdomain_client::Event,
20259 { fidl::ObjectType::EVENT.into_raw() },
20260 2147483648,
20261 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
20262 ),
20263 encoder,
20264 offset + cur_offset,
20265 depth,
20266 )?;
20267
20268 _prev_end_offset = cur_offset + envelope_size;
20269 if 3 > max_ordinal {
20270 return Ok(());
20271 }
20272
20273 let cur_offset: usize = (3 - 1) * envelope_size;
20276
20277 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
20279
20280 fidl::encoding::encode_in_envelope_optional::<
20285 fidl::encoding::HandleType<
20286 fdomain_client::Stream,
20287 { fidl::ObjectType::STREAM.into_raw() },
20288 2147483648,
20289 >,
20290 fdomain_client::fidl::FDomainResourceDialect,
20291 >(
20292 self.stream.as_mut().map(
20293 <fidl::encoding::HandleType<
20294 fdomain_client::Stream,
20295 { fidl::ObjectType::STREAM.into_raw() },
20296 2147483648,
20297 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
20298 ),
20299 encoder,
20300 offset + cur_offset,
20301 depth,
20302 )?;
20303
20304 _prev_end_offset = cur_offset + envelope_size;
20305 if 4 > max_ordinal {
20306 return Ok(());
20307 }
20308
20309 let cur_offset: usize = (4 - 1) * envelope_size;
20312
20313 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
20315
20316 fidl::encoding::encode_in_envelope_optional::<
20321 NodeAttributes2,
20322 fdomain_client::fidl::FDomainResourceDialect,
20323 >(
20324 self.attributes
20325 .as_ref()
20326 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
20327 encoder,
20328 offset + cur_offset,
20329 depth,
20330 )?;
20331
20332 _prev_end_offset = cur_offset + envelope_size;
20333
20334 Ok(())
20335 }
20336 }
20337
20338 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileInfo {
20339 #[inline(always)]
20340 fn new_empty() -> Self {
20341 Self::default()
20342 }
20343
20344 unsafe fn decode(
20345 &mut self,
20346 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20347 offset: usize,
20348 mut depth: fidl::encoding::Depth,
20349 ) -> fidl::Result<()> {
20350 decoder.debug_check_bounds::<Self>(offset);
20351 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
20352 None => return Err(fidl::Error::NotNullable),
20353 Some(len) => len,
20354 };
20355 if len == 0 {
20357 return Ok(());
20358 };
20359 depth.increment()?;
20360 let envelope_size = 8;
20361 let bytes_len = len * envelope_size;
20362 let offset = decoder.out_of_line_offset(bytes_len)?;
20363 let mut _next_ordinal_to_read = 0;
20365 let mut next_offset = offset;
20366 let end_offset = offset + bytes_len;
20367 _next_ordinal_to_read += 1;
20368 if next_offset >= end_offset {
20369 return Ok(());
20370 }
20371
20372 while _next_ordinal_to_read < 1 {
20374 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20375 _next_ordinal_to_read += 1;
20376 next_offset += envelope_size;
20377 }
20378
20379 let next_out_of_line = decoder.next_out_of_line();
20380 let handles_before = decoder.remaining_handles();
20381 if let Some((inlined, num_bytes, num_handles)) =
20382 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20383 {
20384 let member_inline_size =
20385 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20386 if inlined != (member_inline_size <= 4) {
20387 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20388 }
20389 let inner_offset;
20390 let mut inner_depth = depth.clone();
20391 if inlined {
20392 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20393 inner_offset = next_offset;
20394 } else {
20395 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20396 inner_depth.increment()?;
20397 }
20398 let val_ref = self.is_append.get_or_insert_with(|| {
20399 fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect)
20400 });
20401 fidl::decode!(
20402 bool,
20403 fdomain_client::fidl::FDomainResourceDialect,
20404 val_ref,
20405 decoder,
20406 inner_offset,
20407 inner_depth
20408 )?;
20409 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20410 {
20411 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20412 }
20413 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20414 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20415 }
20416 }
20417
20418 next_offset += envelope_size;
20419 _next_ordinal_to_read += 1;
20420 if next_offset >= end_offset {
20421 return Ok(());
20422 }
20423
20424 while _next_ordinal_to_read < 2 {
20426 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20427 _next_ordinal_to_read += 1;
20428 next_offset += envelope_size;
20429 }
20430
20431 let next_out_of_line = decoder.next_out_of_line();
20432 let handles_before = decoder.remaining_handles();
20433 if let Some((inlined, num_bytes, num_handles)) =
20434 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20435 {
20436 let member_inline_size = <fidl::encoding::HandleType<
20437 fdomain_client::Event,
20438 { fidl::ObjectType::EVENT.into_raw() },
20439 2147483648,
20440 > as fidl::encoding::TypeMarker>::inline_size(
20441 decoder.context
20442 );
20443 if inlined != (member_inline_size <= 4) {
20444 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20445 }
20446 let inner_offset;
20447 let mut inner_depth = depth.clone();
20448 if inlined {
20449 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20450 inner_offset = next_offset;
20451 } else {
20452 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20453 inner_depth.increment()?;
20454 }
20455 let val_ref =
20456 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));
20457 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)?;
20458 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20459 {
20460 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20461 }
20462 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20463 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20464 }
20465 }
20466
20467 next_offset += envelope_size;
20468 _next_ordinal_to_read += 1;
20469 if next_offset >= end_offset {
20470 return Ok(());
20471 }
20472
20473 while _next_ordinal_to_read < 3 {
20475 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20476 _next_ordinal_to_read += 1;
20477 next_offset += envelope_size;
20478 }
20479
20480 let next_out_of_line = decoder.next_out_of_line();
20481 let handles_before = decoder.remaining_handles();
20482 if let Some((inlined, num_bytes, num_handles)) =
20483 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20484 {
20485 let member_inline_size = <fidl::encoding::HandleType<
20486 fdomain_client::Stream,
20487 { fidl::ObjectType::STREAM.into_raw() },
20488 2147483648,
20489 > as fidl::encoding::TypeMarker>::inline_size(
20490 decoder.context
20491 );
20492 if inlined != (member_inline_size <= 4) {
20493 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20494 }
20495 let inner_offset;
20496 let mut inner_depth = depth.clone();
20497 if inlined {
20498 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20499 inner_offset = next_offset;
20500 } else {
20501 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20502 inner_depth.increment()?;
20503 }
20504 let val_ref =
20505 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));
20506 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)?;
20507 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20508 {
20509 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20510 }
20511 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20512 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20513 }
20514 }
20515
20516 next_offset += envelope_size;
20517 _next_ordinal_to_read += 1;
20518 if next_offset >= end_offset {
20519 return Ok(());
20520 }
20521
20522 while _next_ordinal_to_read < 4 {
20524 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20525 _next_ordinal_to_read += 1;
20526 next_offset += envelope_size;
20527 }
20528
20529 let next_out_of_line = decoder.next_out_of_line();
20530 let handles_before = decoder.remaining_handles();
20531 if let Some((inlined, num_bytes, num_handles)) =
20532 fidl::encoding::decode_envelope_header(decoder, next_offset)?
20533 {
20534 let member_inline_size =
20535 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20536 if inlined != (member_inline_size <= 4) {
20537 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20538 }
20539 let inner_offset;
20540 let mut inner_depth = depth.clone();
20541 if inlined {
20542 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20543 inner_offset = next_offset;
20544 } else {
20545 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20546 inner_depth.increment()?;
20547 }
20548 let val_ref = self.attributes.get_or_insert_with(|| {
20549 fidl::new_empty!(NodeAttributes2, fdomain_client::fidl::FDomainResourceDialect)
20550 });
20551 fidl::decode!(
20552 NodeAttributes2,
20553 fdomain_client::fidl::FDomainResourceDialect,
20554 val_ref,
20555 decoder,
20556 inner_offset,
20557 inner_depth
20558 )?;
20559 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20560 {
20561 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20562 }
20563 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20564 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20565 }
20566 }
20567
20568 next_offset += envelope_size;
20569
20570 while next_offset < end_offset {
20572 _next_ordinal_to_read += 1;
20573 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20574 next_offset += envelope_size;
20575 }
20576
20577 Ok(())
20578 }
20579 }
20580
20581 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
20582 type Borrowed<'a> = &'a mut Self;
20583 fn take_or_borrow<'a>(
20584 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20585 ) -> Self::Borrowed<'a> {
20586 value
20587 }
20588 }
20589
20590 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
20591 type Owned = Self;
20592
20593 #[inline(always)]
20594 fn inline_align(_context: fidl::encoding::Context) -> usize {
20595 8
20596 }
20597
20598 #[inline(always)]
20599 fn inline_size(_context: fidl::encoding::Context) -> usize {
20600 16
20601 }
20602 }
20603
20604 unsafe impl
20605 fidl::encoding::Encode<ExtendedAttributeValue, fdomain_client::fidl::FDomainResourceDialect>
20606 for &mut ExtendedAttributeValue
20607 {
20608 #[inline]
20609 unsafe fn encode(
20610 self,
20611 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20612 offset: usize,
20613 _depth: fidl::encoding::Depth,
20614 ) -> fidl::Result<()> {
20615 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
20616 encoder.write_num::<u64>(self.ordinal(), offset);
20617 match self {
20618 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
20619 fidl::encoding::Vector<u8, 32768>,
20620 fdomain_client::fidl::FDomainResourceDialect,
20621 >(
20622 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
20623 val,
20624 ),
20625 encoder,
20626 offset + 8,
20627 _depth,
20628 ),
20629 ExtendedAttributeValue::Buffer(ref mut val) => {
20630 fidl::encoding::encode_in_envelope::<
20631 fidl::encoding::HandleType<
20632 fdomain_client::Vmo,
20633 { fidl::ObjectType::VMO.into_raw() },
20634 2147483648,
20635 >,
20636 fdomain_client::fidl::FDomainResourceDialect,
20637 >(
20638 <fidl::encoding::HandleType<
20639 fdomain_client::Vmo,
20640 { fidl::ObjectType::VMO.into_raw() },
20641 2147483648,
20642 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20643 val
20644 ),
20645 encoder,
20646 offset + 8,
20647 _depth,
20648 )
20649 }
20650 ExtendedAttributeValue::__SourceBreaking { .. } => {
20651 Err(fidl::Error::UnknownUnionTag)
20652 }
20653 }
20654 }
20655 }
20656
20657 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20658 for ExtendedAttributeValue
20659 {
20660 #[inline(always)]
20661 fn new_empty() -> Self {
20662 Self::__SourceBreaking { unknown_ordinal: 0 }
20663 }
20664
20665 #[inline]
20666 unsafe fn decode(
20667 &mut self,
20668 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20669 offset: usize,
20670 mut depth: fidl::encoding::Depth,
20671 ) -> fidl::Result<()> {
20672 decoder.debug_check_bounds::<Self>(offset);
20673 #[allow(unused_variables)]
20674 let next_out_of_line = decoder.next_out_of_line();
20675 let handles_before = decoder.remaining_handles();
20676 let (ordinal, inlined, num_bytes, num_handles) =
20677 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20678
20679 let member_inline_size = match ordinal {
20680 1 => {
20681 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
20682 decoder.context,
20683 )
20684 }
20685 2 => <fidl::encoding::HandleType<
20686 fdomain_client::Vmo,
20687 { fidl::ObjectType::VMO.into_raw() },
20688 2147483648,
20689 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20690 0 => return Err(fidl::Error::UnknownUnionTag),
20691 _ => num_bytes as usize,
20692 };
20693
20694 if inlined != (member_inline_size <= 4) {
20695 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20696 }
20697 let _inner_offset;
20698 if inlined {
20699 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20700 _inner_offset = offset + 8;
20701 } else {
20702 depth.increment()?;
20703 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20704 }
20705 match ordinal {
20706 1 => {
20707 #[allow(irrefutable_let_patterns)]
20708 if let ExtendedAttributeValue::Bytes(_) = self {
20709 } else {
20711 *self = ExtendedAttributeValue::Bytes(
20713 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect),
20714 );
20715 }
20716 #[allow(irrefutable_let_patterns)]
20717 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
20718 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20719 } else {
20720 unreachable!()
20721 }
20722 }
20723 2 => {
20724 #[allow(irrefutable_let_patterns)]
20725 if let ExtendedAttributeValue::Buffer(_) = self {
20726 } else {
20728 *self = ExtendedAttributeValue::Buffer(
20730 fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
20731 );
20732 }
20733 #[allow(irrefutable_let_patterns)]
20734 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
20735 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20736 } else {
20737 unreachable!()
20738 }
20739 }
20740 #[allow(deprecated)]
20741 ordinal => {
20742 for _ in 0..num_handles {
20743 decoder.drop_next_handle()?;
20744 }
20745 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
20746 }
20747 }
20748 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20749 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20750 }
20751 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20752 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20753 }
20754 Ok(())
20755 }
20756 }
20757
20758 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
20759 type Borrowed<'a> = &'a mut Self;
20760 fn take_or_borrow<'a>(
20761 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20762 ) -> Self::Borrowed<'a> {
20763 value
20764 }
20765 }
20766
20767 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
20768 type Owned = Self;
20769
20770 #[inline(always)]
20771 fn inline_align(_context: fidl::encoding::Context) -> usize {
20772 8
20773 }
20774
20775 #[inline(always)]
20776 fn inline_size(_context: fidl::encoding::Context) -> usize {
20777 16
20778 }
20779 }
20780
20781 unsafe impl
20782 fidl::encoding::Encode<NodeInfoDeprecated, fdomain_client::fidl::FDomainResourceDialect>
20783 for &mut NodeInfoDeprecated
20784 {
20785 #[inline]
20786 unsafe fn encode(
20787 self,
20788 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20789 offset: usize,
20790 _depth: fidl::encoding::Depth,
20791 ) -> fidl::Result<()> {
20792 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
20793 encoder.write_num::<u64>(self.ordinal(), offset);
20794 match self {
20795 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
20796 Service,
20797 fdomain_client::fidl::FDomainResourceDialect,
20798 >(
20799 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
20800 encoder,
20801 offset + 8,
20802 _depth,
20803 ),
20804 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20805 FileObject,
20806 fdomain_client::fidl::FDomainResourceDialect,
20807 >(
20808 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20809 encoder,
20810 offset + 8,
20811 _depth,
20812 ),
20813 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20814 DirectoryObject,
20815 fdomain_client::fidl::FDomainResourceDialect,
20816 >(
20817 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20818 encoder,
20819 offset + 8,
20820 _depth,
20821 ),
20822 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20823 SymlinkObject,
20824 fdomain_client::fidl::FDomainResourceDialect,
20825 >(
20826 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20827 encoder,
20828 offset + 8,
20829 _depth,
20830 ),
20831 }
20832 }
20833 }
20834
20835 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20836 for NodeInfoDeprecated
20837 {
20838 #[inline(always)]
20839 fn new_empty() -> Self {
20840 Self::Service(fidl::new_empty!(Service, fdomain_client::fidl::FDomainResourceDialect))
20841 }
20842
20843 #[inline]
20844 unsafe fn decode(
20845 &mut self,
20846 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20847 offset: usize,
20848 mut depth: fidl::encoding::Depth,
20849 ) -> fidl::Result<()> {
20850 decoder.debug_check_bounds::<Self>(offset);
20851 #[allow(unused_variables)]
20852 let next_out_of_line = decoder.next_out_of_line();
20853 let handles_before = decoder.remaining_handles();
20854 let (ordinal, inlined, num_bytes, num_handles) =
20855 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20856
20857 let member_inline_size = match ordinal {
20858 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20859 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20860 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20861 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20862 _ => return Err(fidl::Error::UnknownUnionTag),
20863 };
20864
20865 if inlined != (member_inline_size <= 4) {
20866 return Err(fidl::Error::InvalidInlineBitInEnvelope);
20867 }
20868 let _inner_offset;
20869 if inlined {
20870 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20871 _inner_offset = offset + 8;
20872 } else {
20873 depth.increment()?;
20874 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20875 }
20876 match ordinal {
20877 1 => {
20878 #[allow(irrefutable_let_patterns)]
20879 if let NodeInfoDeprecated::Service(_) = self {
20880 } else {
20882 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
20884 Service,
20885 fdomain_client::fidl::FDomainResourceDialect
20886 ));
20887 }
20888 #[allow(irrefutable_let_patterns)]
20889 if let NodeInfoDeprecated::Service(ref mut val) = self {
20890 fidl::decode!(
20891 Service,
20892 fdomain_client::fidl::FDomainResourceDialect,
20893 val,
20894 decoder,
20895 _inner_offset,
20896 depth
20897 )?;
20898 } else {
20899 unreachable!()
20900 }
20901 }
20902 2 => {
20903 #[allow(irrefutable_let_patterns)]
20904 if let NodeInfoDeprecated::File(_) = self {
20905 } else {
20907 *self = NodeInfoDeprecated::File(fidl::new_empty!(
20909 FileObject,
20910 fdomain_client::fidl::FDomainResourceDialect
20911 ));
20912 }
20913 #[allow(irrefutable_let_patterns)]
20914 if let NodeInfoDeprecated::File(ref mut val) = self {
20915 fidl::decode!(
20916 FileObject,
20917 fdomain_client::fidl::FDomainResourceDialect,
20918 val,
20919 decoder,
20920 _inner_offset,
20921 depth
20922 )?;
20923 } else {
20924 unreachable!()
20925 }
20926 }
20927 3 => {
20928 #[allow(irrefutable_let_patterns)]
20929 if let NodeInfoDeprecated::Directory(_) = self {
20930 } else {
20932 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
20934 DirectoryObject,
20935 fdomain_client::fidl::FDomainResourceDialect
20936 ));
20937 }
20938 #[allow(irrefutable_let_patterns)]
20939 if let NodeInfoDeprecated::Directory(ref mut val) = self {
20940 fidl::decode!(
20941 DirectoryObject,
20942 fdomain_client::fidl::FDomainResourceDialect,
20943 val,
20944 decoder,
20945 _inner_offset,
20946 depth
20947 )?;
20948 } else {
20949 unreachable!()
20950 }
20951 }
20952 4 => {
20953 #[allow(irrefutable_let_patterns)]
20954 if let NodeInfoDeprecated::Symlink(_) = self {
20955 } else {
20957 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
20959 SymlinkObject,
20960 fdomain_client::fidl::FDomainResourceDialect
20961 ));
20962 }
20963 #[allow(irrefutable_let_patterns)]
20964 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
20965 fidl::decode!(
20966 SymlinkObject,
20967 fdomain_client::fidl::FDomainResourceDialect,
20968 val,
20969 decoder,
20970 _inner_offset,
20971 depth
20972 )?;
20973 } else {
20974 unreachable!()
20975 }
20976 }
20977 ordinal => panic!("unexpected ordinal {:?}", ordinal),
20978 }
20979 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20980 return Err(fidl::Error::InvalidNumBytesInEnvelope);
20981 }
20982 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20983 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20984 }
20985 Ok(())
20986 }
20987 }
20988
20989 impl fidl::encoding::ResourceTypeMarker for Representation {
20990 type Borrowed<'a> = &'a mut Self;
20991 fn take_or_borrow<'a>(
20992 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20993 ) -> Self::Borrowed<'a> {
20994 value
20995 }
20996 }
20997
20998 unsafe impl fidl::encoding::TypeMarker for Representation {
20999 type Owned = Self;
21000
21001 #[inline(always)]
21002 fn inline_align(_context: fidl::encoding::Context) -> usize {
21003 8
21004 }
21005
21006 #[inline(always)]
21007 fn inline_size(_context: fidl::encoding::Context) -> usize {
21008 16
21009 }
21010 }
21011
21012 unsafe impl fidl::encoding::Encode<Representation, fdomain_client::fidl::FDomainResourceDialect>
21013 for &mut Representation
21014 {
21015 #[inline]
21016 unsafe fn encode(
21017 self,
21018 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
21019 offset: usize,
21020 _depth: fidl::encoding::Depth,
21021 ) -> fidl::Result<()> {
21022 encoder.debug_check_bounds::<Representation>(offset);
21023 encoder.write_num::<u64>(self.ordinal(), offset);
21024 match self {
21025 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
21026 NodeInfo,
21027 fdomain_client::fidl::FDomainResourceDialect,
21028 >(
21029 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
21030 encoder,
21031 offset + 8,
21032 _depth,
21033 ),
21034 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
21035 DirectoryInfo,
21036 fdomain_client::fidl::FDomainResourceDialect,
21037 >(
21038 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
21039 encoder,
21040 offset + 8,
21041 _depth,
21042 ),
21043 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
21044 FileInfo,
21045 fdomain_client::fidl::FDomainResourceDialect,
21046 >(
21047 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
21048 encoder,
21049 offset + 8,
21050 _depth,
21051 ),
21052 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
21053 SymlinkInfo,
21054 fdomain_client::fidl::FDomainResourceDialect,
21055 >(
21056 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
21057 encoder,
21058 offset + 8,
21059 _depth,
21060 ),
21061 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
21062 }
21063 }
21064 }
21065
21066 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Representation {
21067 #[inline(always)]
21068 fn new_empty() -> Self {
21069 Self::__SourceBreaking { unknown_ordinal: 0 }
21070 }
21071
21072 #[inline]
21073 unsafe fn decode(
21074 &mut self,
21075 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
21076 offset: usize,
21077 mut depth: fidl::encoding::Depth,
21078 ) -> fidl::Result<()> {
21079 decoder.debug_check_bounds::<Self>(offset);
21080 #[allow(unused_variables)]
21081 let next_out_of_line = decoder.next_out_of_line();
21082 let handles_before = decoder.remaining_handles();
21083 let (ordinal, inlined, num_bytes, num_handles) =
21084 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
21085
21086 let member_inline_size = match ordinal {
21087 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
21088 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
21089 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
21090 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
21091 0 => return Err(fidl::Error::UnknownUnionTag),
21092 _ => num_bytes as usize,
21093 };
21094
21095 if inlined != (member_inline_size <= 4) {
21096 return Err(fidl::Error::InvalidInlineBitInEnvelope);
21097 }
21098 let _inner_offset;
21099 if inlined {
21100 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
21101 _inner_offset = offset + 8;
21102 } else {
21103 depth.increment()?;
21104 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
21105 }
21106 match ordinal {
21107 1 => {
21108 #[allow(irrefutable_let_patterns)]
21109 if let Representation::Node(_) = self {
21110 } else {
21112 *self = Representation::Node(fidl::new_empty!(
21114 NodeInfo,
21115 fdomain_client::fidl::FDomainResourceDialect
21116 ));
21117 }
21118 #[allow(irrefutable_let_patterns)]
21119 if let Representation::Node(ref mut val) = self {
21120 fidl::decode!(
21121 NodeInfo,
21122 fdomain_client::fidl::FDomainResourceDialect,
21123 val,
21124 decoder,
21125 _inner_offset,
21126 depth
21127 )?;
21128 } else {
21129 unreachable!()
21130 }
21131 }
21132 2 => {
21133 #[allow(irrefutable_let_patterns)]
21134 if let Representation::Directory(_) = self {
21135 } else {
21137 *self = Representation::Directory(fidl::new_empty!(
21139 DirectoryInfo,
21140 fdomain_client::fidl::FDomainResourceDialect
21141 ));
21142 }
21143 #[allow(irrefutable_let_patterns)]
21144 if let Representation::Directory(ref mut val) = self {
21145 fidl::decode!(
21146 DirectoryInfo,
21147 fdomain_client::fidl::FDomainResourceDialect,
21148 val,
21149 decoder,
21150 _inner_offset,
21151 depth
21152 )?;
21153 } else {
21154 unreachable!()
21155 }
21156 }
21157 3 => {
21158 #[allow(irrefutable_let_patterns)]
21159 if let Representation::File(_) = self {
21160 } else {
21162 *self = Representation::File(fidl::new_empty!(
21164 FileInfo,
21165 fdomain_client::fidl::FDomainResourceDialect
21166 ));
21167 }
21168 #[allow(irrefutable_let_patterns)]
21169 if let Representation::File(ref mut val) = self {
21170 fidl::decode!(
21171 FileInfo,
21172 fdomain_client::fidl::FDomainResourceDialect,
21173 val,
21174 decoder,
21175 _inner_offset,
21176 depth
21177 )?;
21178 } else {
21179 unreachable!()
21180 }
21181 }
21182 4 => {
21183 #[allow(irrefutable_let_patterns)]
21184 if let Representation::Symlink(_) = self {
21185 } else {
21187 *self = Representation::Symlink(fidl::new_empty!(
21189 SymlinkInfo,
21190 fdomain_client::fidl::FDomainResourceDialect
21191 ));
21192 }
21193 #[allow(irrefutable_let_patterns)]
21194 if let Representation::Symlink(ref mut val) = self {
21195 fidl::decode!(
21196 SymlinkInfo,
21197 fdomain_client::fidl::FDomainResourceDialect,
21198 val,
21199 decoder,
21200 _inner_offset,
21201 depth
21202 )?;
21203 } else {
21204 unreachable!()
21205 }
21206 }
21207 #[allow(deprecated)]
21208 ordinal => {
21209 for _ in 0..num_handles {
21210 decoder.drop_next_handle()?;
21211 }
21212 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
21213 }
21214 }
21215 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
21216 return Err(fidl::Error::InvalidNumBytesInEnvelope);
21217 }
21218 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
21219 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
21220 }
21221 Ok(())
21222 }
21223 }
21224}