1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_io__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14pub type Token = fidl::Event;
17
18#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct DirectoryCreateSymlinkRequest {
20 pub name: String,
21 pub target: Vec<u8>,
22 pub connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
23}
24
25impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
26 for DirectoryCreateSymlinkRequest
27{
28}
29
30#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub struct DirectoryDeprecatedOpenRequest {
32 pub flags: OpenFlags,
33 pub mode: ModeType,
34 pub path: String,
35 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
36}
37
38impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
39 for DirectoryDeprecatedOpenRequest
40{
41}
42
43#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44pub struct DirectoryGetTokenResponse {
45 pub s: i32,
46 pub token: Option<fidl::Handle>,
47}
48
49impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryGetTokenResponse {}
50
51#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct DirectoryLinkRequest {
53 pub src: String,
54 pub dst_parent_token: fidl::Handle,
55 pub dst: String,
56}
57
58impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryLinkRequest {}
59
60#[derive(Debug, PartialEq)]
61pub struct DirectoryOpenRequest {
62 pub path: String,
63 pub flags: Flags,
64 pub options: Options,
65 pub object: fidl::Channel,
66}
67
68impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryOpenRequest {}
69
70#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct DirectoryRenameRequest {
72 pub src: String,
73 pub dst_parent_token: fidl::Event,
74 pub dst: String,
75}
76
77impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryRenameRequest {}
78
79#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
80pub struct DirectoryWatchRequest {
81 pub mask: WatchMask,
82 pub options: u32,
83 pub watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
84}
85
86impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryWatchRequest {}
87
88#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct FileAllocateRequest {
90 pub offset: u64,
91 pub length: u64,
92 pub mode: AllocateMode,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileAllocateRequest {}
100
101#[derive(Debug, PartialEq)]
102pub struct FileEnableVerityRequest {
103 pub options: VerificationOptions,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileEnableVerityRequest {}
107
108#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct FileObject {
110 pub event: Option<fidl::Event>,
117 pub stream: Option<fidl::Stream>,
121}
122
123impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {}
124
125#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
126pub struct FileGetBackingMemoryResponse {
127 pub vmo: fidl::Vmo,
128}
129
130impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
131 for FileGetBackingMemoryResponse
132{
133}
134
135#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
136pub struct LinkableLinkIntoRequest {
137 pub dst_parent_token: fidl::Event,
138 pub dst: String,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LinkableLinkIntoRequest {}
142
143#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
144pub struct NodeDeprecatedCloneRequest {
145 pub flags: OpenFlags,
146 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
150 for NodeDeprecatedCloneRequest
151{
152}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct NodeListExtendedAttributesRequest {
156 pub iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
157}
158
159impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
160 for NodeListExtendedAttributesRequest
161{
162}
163
164#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
165pub struct NodeOnOpenRequest {
166 pub s: i32,
167 pub info: Option<Box<NodeInfoDeprecated>>,
168}
169
170impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeOnOpenRequest {}
171
172#[derive(Debug, PartialEq)]
173pub struct NodeSetExtendedAttributeRequest {
174 pub name: Vec<u8>,
175 pub value: ExtendedAttributeValue,
176 pub mode: SetExtendedAttributeMode,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181 for NodeSetExtendedAttributeRequest
182{
183}
184
185#[derive(Debug, Default, PartialEq)]
186pub struct ConnectionInfo {
187 pub rights: Option<Operations>,
194 #[doc(hidden)]
195 pub __source_breaking: fidl::marker::SourceBreaking,
196}
197
198impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectionInfo {}
199
200#[derive(Debug, Default, PartialEq)]
202pub struct FileInfo {
203 pub is_append: Option<bool>,
207 pub observer: Option<fidl::Event>,
220 pub stream: Option<fidl::Stream>,
227 pub attributes: Option<NodeAttributes2>,
229 #[doc(hidden)]
230 pub __source_breaking: fidl::marker::SourceBreaking,
231}
232
233impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {}
234
235#[derive(Debug)]
239pub enum ExtendedAttributeValue {
240 Bytes(Vec<u8>),
241 Buffer(fidl::Vmo),
242 #[doc(hidden)]
243 __SourceBreaking {
244 unknown_ordinal: u64,
245 },
246}
247
248#[macro_export]
250macro_rules! ExtendedAttributeValueUnknown {
251 () => {
252 _
253 };
254}
255
256impl PartialEq for ExtendedAttributeValue {
258 fn eq(&self, other: &Self) -> bool {
259 match (self, other) {
260 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
261 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
262 _ => false,
263 }
264 }
265}
266
267impl ExtendedAttributeValue {
268 #[inline]
269 pub fn ordinal(&self) -> u64 {
270 match *self {
271 Self::Bytes(_) => 1,
272 Self::Buffer(_) => 2,
273 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
274 }
275 }
276
277 #[inline]
278 pub fn unknown_variant_for_testing() -> Self {
279 Self::__SourceBreaking { unknown_ordinal: 0 }
280 }
281
282 #[inline]
283 pub fn is_unknown(&self) -> bool {
284 match self {
285 Self::__SourceBreaking { .. } => true,
286 _ => false,
287 }
288 }
289}
290
291impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExtendedAttributeValue {}
292
293#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub enum NodeInfoDeprecated {
295 Service(Service),
297 File(FileObject),
299 Directory(DirectoryObject),
301 Symlink(SymlinkObject),
303}
304
305impl NodeInfoDeprecated {
306 #[inline]
307 pub fn ordinal(&self) -> u64 {
308 match *self {
309 Self::Service(_) => 1,
310 Self::File(_) => 2,
311 Self::Directory(_) => 3,
312 Self::Symlink(_) => 4,
313 }
314 }
315}
316
317impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeInfoDeprecated {}
318
319#[derive(Debug)]
320pub enum Representation {
321 Node(NodeInfo),
323 Directory(DirectoryInfo),
325 File(FileInfo),
327 Symlink(SymlinkInfo),
329 #[doc(hidden)]
330 __SourceBreaking { unknown_ordinal: u64 },
331}
332
333#[macro_export]
335macro_rules! RepresentationUnknown {
336 () => {
337 _
338 };
339}
340
341impl PartialEq for Representation {
343 fn eq(&self, other: &Self) -> bool {
344 match (self, other) {
345 (Self::Node(x), Self::Node(y)) => *x == *y,
346 (Self::Directory(x), Self::Directory(y)) => *x == *y,
347 (Self::File(x), Self::File(y)) => *x == *y,
348 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
349 _ => false,
350 }
351 }
352}
353
354impl Representation {
355 #[inline]
356 pub fn ordinal(&self) -> u64 {
357 match *self {
358 Self::Node(_) => 1,
359 Self::Directory(_) => 2,
360 Self::File(_) => 3,
361 Self::Symlink(_) => 4,
362 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
363 }
364 }
365
366 #[inline]
367 pub fn unknown_variant_for_testing() -> Self {
368 Self::__SourceBreaking { unknown_ordinal: 0 }
369 }
370
371 #[inline]
372 pub fn is_unknown(&self) -> bool {
373 match self {
374 Self::__SourceBreaking { .. } => true,
375 _ => false,
376 }
377 }
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Representation {}
381
382#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
383pub struct AdvisoryLockingMarker;
384
385impl fidl::endpoints::ProtocolMarker for AdvisoryLockingMarker {
386 type Proxy = AdvisoryLockingProxy;
387 type RequestStream = AdvisoryLockingRequestStream;
388 #[cfg(target_os = "fuchsia")]
389 type SynchronousProxy = AdvisoryLockingSynchronousProxy;
390
391 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
392}
393pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
394
395pub trait AdvisoryLockingProxyInterface: Send + Sync {
396 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
397 + Send;
398 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
399}
400#[derive(Debug)]
401#[cfg(target_os = "fuchsia")]
402pub struct AdvisoryLockingSynchronousProxy {
403 client: fidl::client::sync::Client,
404}
405
406#[cfg(target_os = "fuchsia")]
407impl fidl::endpoints::SynchronousProxy for AdvisoryLockingSynchronousProxy {
408 type Proxy = AdvisoryLockingProxy;
409 type Protocol = AdvisoryLockingMarker;
410
411 fn from_channel(inner: fidl::Channel) -> Self {
412 Self::new(inner)
413 }
414
415 fn into_channel(self) -> fidl::Channel {
416 self.client.into_channel()
417 }
418
419 fn as_channel(&self) -> &fidl::Channel {
420 self.client.as_channel()
421 }
422}
423
424#[cfg(target_os = "fuchsia")]
425impl AdvisoryLockingSynchronousProxy {
426 pub fn new(channel: fidl::Channel) -> Self {
427 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
428 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
429 }
430
431 pub fn into_channel(self) -> fidl::Channel {
432 self.client.into_channel()
433 }
434
435 pub fn wait_for_event(
438 &self,
439 deadline: zx::MonotonicInstant,
440 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
441 AdvisoryLockingEvent::decode(self.client.wait_for_event(deadline)?)
442 }
443
444 pub fn r#advisory_lock(
468 &self,
469 mut request: &AdvisoryLockRequest,
470 ___deadline: zx::MonotonicInstant,
471 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
472 let _response = self.client.send_query::<
473 AdvisoryLockingAdvisoryLockRequest,
474 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
475 >(
476 (request,),
477 0x6ee9c0ad53ec87aa,
478 fidl::encoding::DynamicFlags::empty(),
479 ___deadline,
480 )?;
481 Ok(_response.map(|x| x))
482 }
483}
484
485#[cfg(target_os = "fuchsia")]
486impl From<AdvisoryLockingSynchronousProxy> for zx::Handle {
487 fn from(value: AdvisoryLockingSynchronousProxy) -> Self {
488 value.into_channel().into()
489 }
490}
491
492#[cfg(target_os = "fuchsia")]
493impl From<fidl::Channel> for AdvisoryLockingSynchronousProxy {
494 fn from(value: fidl::Channel) -> Self {
495 Self::new(value)
496 }
497}
498
499#[derive(Debug, Clone)]
500pub struct AdvisoryLockingProxy {
501 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
502}
503
504impl fidl::endpoints::Proxy for AdvisoryLockingProxy {
505 type Protocol = AdvisoryLockingMarker;
506
507 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
508 Self::new(inner)
509 }
510
511 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
512 self.client.into_channel().map_err(|client| Self { client })
513 }
514
515 fn as_channel(&self) -> &::fidl::AsyncChannel {
516 self.client.as_channel()
517 }
518}
519
520impl AdvisoryLockingProxy {
521 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
523 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
524 Self { client: fidl::client::Client::new(channel, protocol_name) }
525 }
526
527 pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
533 AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
534 }
535
536 pub fn r#advisory_lock(
560 &self,
561 mut request: &AdvisoryLockRequest,
562 ) -> fidl::client::QueryResponseFut<
563 AdvisoryLockingAdvisoryLockResult,
564 fidl::encoding::DefaultFuchsiaResourceDialect,
565 > {
566 AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
567 }
568}
569
570impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
571 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
572 AdvisoryLockingAdvisoryLockResult,
573 fidl::encoding::DefaultFuchsiaResourceDialect,
574 >;
575 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
576 fn _decode(
577 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
578 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
579 let _response = fidl::client::decode_transaction_body::<
580 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
581 fidl::encoding::DefaultFuchsiaResourceDialect,
582 0x6ee9c0ad53ec87aa,
583 >(_buf?)?;
584 Ok(_response.map(|x| x))
585 }
586 self.client.send_query_and_decode::<
587 AdvisoryLockingAdvisoryLockRequest,
588 AdvisoryLockingAdvisoryLockResult,
589 >(
590 (request,),
591 0x6ee9c0ad53ec87aa,
592 fidl::encoding::DynamicFlags::empty(),
593 _decode,
594 )
595 }
596}
597
598pub struct AdvisoryLockingEventStream {
599 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
600}
601
602impl std::marker::Unpin for AdvisoryLockingEventStream {}
603
604impl futures::stream::FusedStream for AdvisoryLockingEventStream {
605 fn is_terminated(&self) -> bool {
606 self.event_receiver.is_terminated()
607 }
608}
609
610impl futures::Stream for AdvisoryLockingEventStream {
611 type Item = Result<AdvisoryLockingEvent, fidl::Error>;
612
613 fn poll_next(
614 mut self: std::pin::Pin<&mut Self>,
615 cx: &mut std::task::Context<'_>,
616 ) -> std::task::Poll<Option<Self::Item>> {
617 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
618 &mut self.event_receiver,
619 cx
620 )?) {
621 Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
622 None => std::task::Poll::Ready(None),
623 }
624 }
625}
626
627#[derive(Debug)]
628pub enum AdvisoryLockingEvent {}
629
630impl AdvisoryLockingEvent {
631 fn decode(
633 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
634 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
635 let (bytes, _handles) = buf.split_mut();
636 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
637 debug_assert_eq!(tx_header.tx_id, 0);
638 match tx_header.ordinal {
639 _ => Err(fidl::Error::UnknownOrdinal {
640 ordinal: tx_header.ordinal,
641 protocol_name:
642 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
643 }),
644 }
645 }
646}
647
648pub struct AdvisoryLockingRequestStream {
650 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
651 is_terminated: bool,
652}
653
654impl std::marker::Unpin for AdvisoryLockingRequestStream {}
655
656impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
657 fn is_terminated(&self) -> bool {
658 self.is_terminated
659 }
660}
661
662impl fidl::endpoints::RequestStream for AdvisoryLockingRequestStream {
663 type Protocol = AdvisoryLockingMarker;
664 type ControlHandle = AdvisoryLockingControlHandle;
665
666 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
667 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
668 }
669
670 fn control_handle(&self) -> Self::ControlHandle {
671 AdvisoryLockingControlHandle { inner: self.inner.clone() }
672 }
673
674 fn into_inner(
675 self,
676 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
677 {
678 (self.inner, self.is_terminated)
679 }
680
681 fn from_inner(
682 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
683 is_terminated: bool,
684 ) -> Self {
685 Self { inner, is_terminated }
686 }
687}
688
689impl futures::Stream for AdvisoryLockingRequestStream {
690 type Item = Result<AdvisoryLockingRequest, fidl::Error>;
691
692 fn poll_next(
693 mut self: std::pin::Pin<&mut Self>,
694 cx: &mut std::task::Context<'_>,
695 ) -> std::task::Poll<Option<Self::Item>> {
696 let this = &mut *self;
697 if this.inner.check_shutdown(cx) {
698 this.is_terminated = true;
699 return std::task::Poll::Ready(None);
700 }
701 if this.is_terminated {
702 panic!("polled AdvisoryLockingRequestStream after completion");
703 }
704 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
705 |bytes, handles| {
706 match this.inner.channel().read_etc(cx, bytes, handles) {
707 std::task::Poll::Ready(Ok(())) => {}
708 std::task::Poll::Pending => return std::task::Poll::Pending,
709 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
710 this.is_terminated = true;
711 return std::task::Poll::Ready(None);
712 }
713 std::task::Poll::Ready(Err(e)) => {
714 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
715 e.into(),
716 ))))
717 }
718 }
719
720 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
722
723 std::task::Poll::Ready(Some(match header.ordinal {
724 0x6ee9c0ad53ec87aa => {
725 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
726 let mut req = fidl::new_empty!(
727 AdvisoryLockingAdvisoryLockRequest,
728 fidl::encoding::DefaultFuchsiaResourceDialect
729 );
730 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
731 let control_handle =
732 AdvisoryLockingControlHandle { inner: this.inner.clone() };
733 Ok(AdvisoryLockingRequest::AdvisoryLock {
734 request: req.request,
735
736 responder: AdvisoryLockingAdvisoryLockResponder {
737 control_handle: std::mem::ManuallyDrop::new(control_handle),
738 tx_id: header.tx_id,
739 },
740 })
741 }
742 _ => Err(fidl::Error::UnknownOrdinal {
743 ordinal: header.ordinal,
744 protocol_name:
745 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
746 }),
747 }))
748 },
749 )
750 }
751}
752
753#[derive(Debug)]
766pub enum AdvisoryLockingRequest {
767 AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
791}
792
793impl AdvisoryLockingRequest {
794 #[allow(irrefutable_let_patterns)]
795 pub fn into_advisory_lock(
796 self,
797 ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
798 if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
799 Some((request, responder))
800 } else {
801 None
802 }
803 }
804
805 pub fn method_name(&self) -> &'static str {
807 match *self {
808 AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
809 }
810 }
811}
812
813#[derive(Debug, Clone)]
814pub struct AdvisoryLockingControlHandle {
815 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
816}
817
818impl fidl::endpoints::ControlHandle for AdvisoryLockingControlHandle {
819 fn shutdown(&self) {
820 self.inner.shutdown()
821 }
822 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
823 self.inner.shutdown_with_epitaph(status)
824 }
825
826 fn is_closed(&self) -> bool {
827 self.inner.channel().is_closed()
828 }
829 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
830 self.inner.channel().on_closed()
831 }
832
833 #[cfg(target_os = "fuchsia")]
834 fn signal_peer(
835 &self,
836 clear_mask: zx::Signals,
837 set_mask: zx::Signals,
838 ) -> Result<(), zx_status::Status> {
839 use fidl::Peered;
840 self.inner.channel().signal_peer(clear_mask, set_mask)
841 }
842}
843
844impl AdvisoryLockingControlHandle {}
845
846#[must_use = "FIDL methods require a response to be sent"]
847#[derive(Debug)]
848pub struct AdvisoryLockingAdvisoryLockResponder {
849 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
850 tx_id: u32,
851}
852
853impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
857 fn drop(&mut self) {
858 self.control_handle.shutdown();
859 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
861 }
862}
863
864impl fidl::endpoints::Responder for AdvisoryLockingAdvisoryLockResponder {
865 type ControlHandle = AdvisoryLockingControlHandle;
866
867 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
868 &self.control_handle
869 }
870
871 fn drop_without_shutdown(mut self) {
872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
874 std::mem::forget(self);
876 }
877}
878
879impl AdvisoryLockingAdvisoryLockResponder {
880 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
884 let _result = self.send_raw(result);
885 if _result.is_err() {
886 self.control_handle.shutdown();
887 }
888 self.drop_without_shutdown();
889 _result
890 }
891
892 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
894 let _result = self.send_raw(result);
895 self.drop_without_shutdown();
896 _result
897 }
898
899 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
900 self.control_handle
901 .inner
902 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
903 result,
904 self.tx_id,
905 0x6ee9c0ad53ec87aa,
906 fidl::encoding::DynamicFlags::empty(),
907 )
908 }
909}
910
911#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
912pub struct DirectoryMarker;
913
914impl fidl::endpoints::ProtocolMarker for DirectoryMarker {
915 type Proxy = DirectoryProxy;
916 type RequestStream = DirectoryRequestStream;
917 #[cfg(target_os = "fuchsia")]
918 type SynchronousProxy = DirectorySynchronousProxy;
919
920 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
921}
922impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryMarker {}
923pub type DirectoryUnlinkResult = Result<(), i32>;
924pub type DirectoryRenameResult = Result<(), i32>;
925pub type DirectoryCreateSymlinkResult = Result<(), i32>;
926
927pub trait DirectoryProxyInterface: Send + Sync {
928 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
929 + Send;
930 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
931 fn r#clone(
932 &self,
933 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
934 ) -> Result<(), fidl::Error>;
935 type CloseResponseFut: std::future::Future<
936 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
937 > + Send;
938 fn r#close(&self) -> Self::CloseResponseFut;
939 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
940 fn r#query(&self) -> Self::QueryResponseFut;
941 fn r#deprecated_clone(
942 &self,
943 flags: OpenFlags,
944 object: fidl::endpoints::ServerEnd<NodeMarker>,
945 ) -> Result<(), fidl::Error>;
946 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
947 + Send;
948 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
949 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
950 fn r#deprecated_set_attr(
951 &self,
952 flags: NodeAttributeFlags,
953 attributes: &NodeAttributes,
954 ) -> Self::DeprecatedSetAttrResponseFut;
955 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
956 + Send;
957 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
958 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
959 + Send;
960 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
961 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
962 + Send;
963 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
964 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
965 + Send;
966 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
967 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
968 + Send;
969 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
970 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
971 + Send;
972 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
973 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
974 + Send;
975 fn r#update_attributes(
976 &self,
977 payload: &MutableNodeAttributes,
978 ) -> Self::UpdateAttributesResponseFut;
979 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
980 fn r#sync(&self) -> Self::SyncResponseFut;
981 fn r#list_extended_attributes(
982 &self,
983 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
984 ) -> Result<(), fidl::Error>;
985 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
986 + Send;
987 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
988 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
989 + Send;
990 fn r#set_extended_attribute(
991 &self,
992 name: &[u8],
993 value: ExtendedAttributeValue,
994 mode: SetExtendedAttributeMode,
995 ) -> Self::SetExtendedAttributeResponseFut;
996 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
997 + Send;
998 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
999 fn r#deprecated_open(
1000 &self,
1001 flags: OpenFlags,
1002 mode: ModeType,
1003 path: &str,
1004 object: fidl::endpoints::ServerEnd<NodeMarker>,
1005 ) -> Result<(), fidl::Error>;
1006 fn r#open(
1007 &self,
1008 path: &str,
1009 flags: Flags,
1010 options: &Options,
1011 object: fidl::Channel,
1012 ) -> Result<(), fidl::Error>;
1013 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
1014 + Send;
1015 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
1016 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1017 fn r#rewind(&self) -> Self::RewindResponseFut;
1018 type GetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fidl::Handle>), fidl::Error>>
1019 + Send;
1020 fn r#get_token(&self) -> Self::GetTokenResponseFut;
1021 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1022 fn r#link(&self, src: &str, dst_parent_token: fidl::Handle, dst: &str)
1023 -> Self::LinkResponseFut;
1024 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
1025 + Send;
1026 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
1027 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
1028 + Send;
1029 fn r#rename(
1030 &self,
1031 src: &str,
1032 dst_parent_token: fidl::Event,
1033 dst: &str,
1034 ) -> Self::RenameResponseFut;
1035 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
1036 + Send;
1037 fn r#create_symlink(
1038 &self,
1039 name: &str,
1040 target: &[u8],
1041 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1042 ) -> Self::CreateSymlinkResponseFut;
1043 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1044 fn r#watch(
1045 &self,
1046 mask: WatchMask,
1047 options: u32,
1048 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1049 ) -> Self::WatchResponseFut;
1050}
1051#[derive(Debug)]
1052#[cfg(target_os = "fuchsia")]
1053pub struct DirectorySynchronousProxy {
1054 client: fidl::client::sync::Client,
1055}
1056
1057#[cfg(target_os = "fuchsia")]
1058impl fidl::endpoints::SynchronousProxy for DirectorySynchronousProxy {
1059 type Proxy = DirectoryProxy;
1060 type Protocol = DirectoryMarker;
1061
1062 fn from_channel(inner: fidl::Channel) -> Self {
1063 Self::new(inner)
1064 }
1065
1066 fn into_channel(self) -> fidl::Channel {
1067 self.client.into_channel()
1068 }
1069
1070 fn as_channel(&self) -> &fidl::Channel {
1071 self.client.as_channel()
1072 }
1073}
1074
1075#[cfg(target_os = "fuchsia")]
1076impl DirectorySynchronousProxy {
1077 pub fn new(channel: fidl::Channel) -> Self {
1078 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1079 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1080 }
1081
1082 pub fn into_channel(self) -> fidl::Channel {
1083 self.client.into_channel()
1084 }
1085
1086 pub fn wait_for_event(
1089 &self,
1090 deadline: zx::MonotonicInstant,
1091 ) -> Result<DirectoryEvent, fidl::Error> {
1092 DirectoryEvent::decode(self.client.wait_for_event(deadline)?)
1093 }
1094
1095 pub fn r#advisory_lock(
1119 &self,
1120 mut request: &AdvisoryLockRequest,
1121 ___deadline: zx::MonotonicInstant,
1122 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1123 let _response = self.client.send_query::<
1124 AdvisoryLockingAdvisoryLockRequest,
1125 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1126 >(
1127 (request,),
1128 0x6ee9c0ad53ec87aa,
1129 fidl::encoding::DynamicFlags::empty(),
1130 ___deadline,
1131 )?;
1132 Ok(_response.map(|x| x))
1133 }
1134
1135 pub fn r#clone(
1136 &self,
1137 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1138 ) -> Result<(), fidl::Error> {
1139 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1140 (request,),
1141 0x20d8a7aba2168a79,
1142 fidl::encoding::DynamicFlags::empty(),
1143 )
1144 }
1145
1146 pub fn r#close(
1157 &self,
1158 ___deadline: zx::MonotonicInstant,
1159 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1160 let _response = self.client.send_query::<
1161 fidl::encoding::EmptyPayload,
1162 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1163 >(
1164 (),
1165 0x5ac5d459ad7f657e,
1166 fidl::encoding::DynamicFlags::empty(),
1167 ___deadline,
1168 )?;
1169 Ok(_response.map(|x| x))
1170 }
1171
1172 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
1173 let _response = self.client.send_query::<
1174 fidl::encoding::EmptyPayload,
1175 fidl_fuchsia_unknown::QueryableQueryResponse,
1176 >(
1177 (),
1178 0x2658edee9decfc06,
1179 fidl::encoding::DynamicFlags::empty(),
1180 ___deadline,
1181 )?;
1182 Ok(_response.protocol)
1183 }
1184
1185 pub fn r#deprecated_clone(
1187 &self,
1188 mut flags: OpenFlags,
1189 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1190 ) -> Result<(), fidl::Error> {
1191 self.client.send::<NodeDeprecatedCloneRequest>(
1192 (flags, object),
1193 0x5a61678f293ce16f,
1194 fidl::encoding::DynamicFlags::FLEXIBLE,
1195 )
1196 }
1197
1198 pub fn r#deprecated_get_attr(
1200 &self,
1201 ___deadline: zx::MonotonicInstant,
1202 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1203 let _response =
1204 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
1205 (),
1206 0x78985e216314dafd,
1207 fidl::encoding::DynamicFlags::empty(),
1208 ___deadline,
1209 )?;
1210 Ok((_response.s, _response.attributes))
1211 }
1212
1213 pub fn r#deprecated_set_attr(
1215 &self,
1216 mut flags: NodeAttributeFlags,
1217 mut attributes: &NodeAttributes,
1218 ___deadline: zx::MonotonicInstant,
1219 ) -> Result<i32, fidl::Error> {
1220 let _response =
1221 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
1222 (flags, attributes),
1223 0x4186c0f40d938f46,
1224 fidl::encoding::DynamicFlags::empty(),
1225 ___deadline,
1226 )?;
1227 Ok(_response.s)
1228 }
1229
1230 pub fn r#deprecated_get_flags(
1232 &self,
1233 ___deadline: zx::MonotonicInstant,
1234 ) -> Result<(i32, OpenFlags), fidl::Error> {
1235 let _response = self
1236 .client
1237 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
1238 (),
1239 0x5b88fffb8eda3aa1,
1240 fidl::encoding::DynamicFlags::empty(),
1241 ___deadline,
1242 )?;
1243 Ok((_response.s, _response.flags))
1244 }
1245
1246 pub fn r#deprecated_set_flags(
1248 &self,
1249 mut flags: OpenFlags,
1250 ___deadline: zx::MonotonicInstant,
1251 ) -> Result<i32, fidl::Error> {
1252 let _response = self
1253 .client
1254 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
1255 (flags,),
1256 0x5295b76c71fde733,
1257 fidl::encoding::DynamicFlags::empty(),
1258 ___deadline,
1259 )?;
1260 Ok(_response.s)
1261 }
1262
1263 pub fn r#get_flags(
1272 &self,
1273 ___deadline: zx::MonotonicInstant,
1274 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1275 let _response = self.client.send_query::<
1276 fidl::encoding::EmptyPayload,
1277 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1278 >(
1279 (),
1280 0x176eb318f64ec23,
1281 fidl::encoding::DynamicFlags::FLEXIBLE,
1282 ___deadline,
1283 )?
1284 .into_result::<DirectoryMarker>("get_flags")?;
1285 Ok(_response.map(|x| x.flags))
1286 }
1287
1288 pub fn r#set_flags(
1298 &self,
1299 mut flags: Flags,
1300 ___deadline: zx::MonotonicInstant,
1301 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1302 let _response = self.client.send_query::<
1303 NodeSetFlagsRequest,
1304 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1305 >(
1306 (flags,),
1307 0x55a8028685791ea8,
1308 fidl::encoding::DynamicFlags::FLEXIBLE,
1309 ___deadline,
1310 )?
1311 .into_result::<DirectoryMarker>("set_flags")?;
1312 Ok(_response.map(|x| x))
1313 }
1314
1315 pub fn r#query_filesystem(
1317 &self,
1318 ___deadline: zx::MonotonicInstant,
1319 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1320 let _response =
1321 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
1322 (),
1323 0x6f344a1c6b0a0610,
1324 fidl::encoding::DynamicFlags::empty(),
1325 ___deadline,
1326 )?;
1327 Ok((_response.s, _response.info))
1328 }
1329
1330 pub fn r#get_attributes(
1344 &self,
1345 mut query: NodeAttributesQuery,
1346 ___deadline: zx::MonotonicInstant,
1347 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1348 let _response = self.client.send_query::<
1349 NodeGetAttributesRequest,
1350 fidl::encoding::ResultType<NodeAttributes2, i32>,
1351 >(
1352 (query,),
1353 0x3d4396a638ea053b,
1354 fidl::encoding::DynamicFlags::empty(),
1355 ___deadline,
1356 )?;
1357 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1358 }
1359
1360 pub fn r#update_attributes(
1369 &self,
1370 mut payload: &MutableNodeAttributes,
1371 ___deadline: zx::MonotonicInstant,
1372 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1373 let _response = self.client.send_query::<
1374 MutableNodeAttributes,
1375 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1376 >(
1377 payload,
1378 0x3308c1da5a89bf08,
1379 fidl::encoding::DynamicFlags::empty(),
1380 ___deadline,
1381 )?;
1382 Ok(_response.map(|x| x))
1383 }
1384
1385 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
1395 let _response = self.client.send_query::<
1396 fidl::encoding::EmptyPayload,
1397 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1398 >(
1399 (),
1400 0x2c5c27ca0ab5dc49,
1401 fidl::encoding::DynamicFlags::empty(),
1402 ___deadline,
1403 )?;
1404 Ok(_response.map(|x| x))
1405 }
1406
1407 pub fn r#list_extended_attributes(
1416 &self,
1417 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1418 ) -> Result<(), fidl::Error> {
1419 self.client.send::<NodeListExtendedAttributesRequest>(
1420 (iterator,),
1421 0x4b61033de007fcd0,
1422 fidl::encoding::DynamicFlags::empty(),
1423 )
1424 }
1425
1426 pub fn r#get_extended_attribute(
1433 &self,
1434 mut name: &[u8],
1435 ___deadline: zx::MonotonicInstant,
1436 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1437 let _response = self.client.send_query::<
1438 NodeGetExtendedAttributeRequest,
1439 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1440 >(
1441 (name,),
1442 0x45ffa3ccfdeb76db,
1443 fidl::encoding::DynamicFlags::empty(),
1444 ___deadline,
1445 )?;
1446 Ok(_response.map(|x| x))
1447 }
1448
1449 pub fn r#set_extended_attribute(
1457 &self,
1458 mut name: &[u8],
1459 mut value: ExtendedAttributeValue,
1460 mut mode: SetExtendedAttributeMode,
1461 ___deadline: zx::MonotonicInstant,
1462 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1463 let _response = self.client.send_query::<
1464 NodeSetExtendedAttributeRequest,
1465 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1466 >(
1467 (name, &mut value, mode,),
1468 0x4a951362f681f23c,
1469 fidl::encoding::DynamicFlags::empty(),
1470 ___deadline,
1471 )?;
1472 Ok(_response.map(|x| x))
1473 }
1474
1475 pub fn r#remove_extended_attribute(
1481 &self,
1482 mut name: &[u8],
1483 ___deadline: zx::MonotonicInstant,
1484 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1485 let _response = self.client.send_query::<
1486 NodeRemoveExtendedAttributeRequest,
1487 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1488 >(
1489 (name,),
1490 0x7a0b9f3a9bf9032d,
1491 fidl::encoding::DynamicFlags::empty(),
1492 ___deadline,
1493 )?;
1494 Ok(_response.map(|x| x))
1495 }
1496
1497 pub fn r#deprecated_open(
1499 &self,
1500 mut flags: OpenFlags,
1501 mut mode: ModeType,
1502 mut path: &str,
1503 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1504 ) -> Result<(), fidl::Error> {
1505 self.client.send::<DirectoryDeprecatedOpenRequest>(
1506 (flags, mode, path, object),
1507 0x2c5044561d685ec0,
1508 fidl::encoding::DynamicFlags::FLEXIBLE,
1509 )
1510 }
1511
1512 pub fn r#open(
1519 &self,
1520 mut path: &str,
1521 mut flags: Flags,
1522 mut options: &Options,
1523 mut object: fidl::Channel,
1524 ) -> Result<(), fidl::Error> {
1525 self.client.send::<DirectoryOpenRequest>(
1526 (path, flags, options, object),
1527 0x568ddcb9a9cbb6d9,
1528 fidl::encoding::DynamicFlags::empty(),
1529 )
1530 }
1531
1532 pub fn r#read_dirents(
1558 &self,
1559 mut max_bytes: u64,
1560 ___deadline: zx::MonotonicInstant,
1561 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1562 let _response =
1563 self.client.send_query::<DirectoryReadDirentsRequest, DirectoryReadDirentsResponse>(
1564 (max_bytes,),
1565 0x3582806bf27faa0a,
1566 fidl::encoding::DynamicFlags::empty(),
1567 ___deadline,
1568 )?;
1569 Ok((_response.s, _response.dirents))
1570 }
1571
1572 pub fn r#rewind(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
1576 let _response =
1577 self.client.send_query::<fidl::encoding::EmptyPayload, DirectoryRewindResponse>(
1578 (),
1579 0x16b1202af0f34c71,
1580 fidl::encoding::DynamicFlags::empty(),
1581 ___deadline,
1582 )?;
1583 Ok(_response.s)
1584 }
1585
1586 pub fn r#get_token(
1593 &self,
1594 ___deadline: zx::MonotonicInstant,
1595 ) -> Result<(i32, Option<fidl::Handle>), fidl::Error> {
1596 let _response =
1597 self.client.send_query::<fidl::encoding::EmptyPayload, DirectoryGetTokenResponse>(
1598 (),
1599 0x26ae9d18763c8655,
1600 fidl::encoding::DynamicFlags::empty(),
1601 ___deadline,
1602 )?;
1603 Ok((_response.s, _response.token))
1604 }
1605
1606 pub fn r#link(
1623 &self,
1624 mut src: &str,
1625 mut dst_parent_token: fidl::Handle,
1626 mut dst: &str,
1627 ___deadline: zx::MonotonicInstant,
1628 ) -> Result<i32, fidl::Error> {
1629 let _response = self.client.send_query::<DirectoryLinkRequest, DirectoryLinkResponse>(
1630 (src, dst_parent_token, dst),
1631 0x740604c0c7c930e7,
1632 fidl::encoding::DynamicFlags::empty(),
1633 ___deadline,
1634 )?;
1635 Ok(_response.s)
1636 }
1637
1638 pub fn r#unlink(
1663 &self,
1664 mut name: &str,
1665 mut options: &UnlinkOptions,
1666 ___deadline: zx::MonotonicInstant,
1667 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
1668 let _response = self.client.send_query::<
1669 DirectoryUnlinkRequest,
1670 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1671 >(
1672 (name, options,),
1673 0x750a0326a78d7bed,
1674 fidl::encoding::DynamicFlags::empty(),
1675 ___deadline,
1676 )?;
1677 Ok(_response.map(|x| x))
1678 }
1679
1680 pub fn r#rename(
1706 &self,
1707 mut src: &str,
1708 mut dst_parent_token: fidl::Event,
1709 mut dst: &str,
1710 ___deadline: zx::MonotonicInstant,
1711 ) -> Result<DirectoryRenameResult, fidl::Error> {
1712 let _response = self.client.send_query::<
1713 DirectoryRenameRequest,
1714 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1715 >(
1716 (src, dst_parent_token, dst,),
1717 0x7060e7723b9928de,
1718 fidl::encoding::DynamicFlags::empty(),
1719 ___deadline,
1720 )?;
1721 Ok(_response.map(|x| x))
1722 }
1723
1724 pub fn r#create_symlink(
1739 &self,
1740 mut name: &str,
1741 mut target: &[u8],
1742 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1743 ___deadline: zx::MonotonicInstant,
1744 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
1745 let _response = self.client.send_query::<
1746 DirectoryCreateSymlinkRequest,
1747 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1748 >(
1749 (name, target, connection,),
1750 0x21ce0f19ec043889,
1751 fidl::encoding::DynamicFlags::empty(),
1752 ___deadline,
1753 )?;
1754 Ok(_response.map(|x| x))
1755 }
1756
1757 pub fn r#watch(
1764 &self,
1765 mut mask: WatchMask,
1766 mut options: u32,
1767 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1768 ___deadline: zx::MonotonicInstant,
1769 ) -> Result<i32, fidl::Error> {
1770 let _response = self.client.send_query::<DirectoryWatchRequest, DirectoryWatchResponse>(
1771 (mask, options, watcher),
1772 0x5717193a59d66d91,
1773 fidl::encoding::DynamicFlags::empty(),
1774 ___deadline,
1775 )?;
1776 Ok(_response.s)
1777 }
1778}
1779
1780#[cfg(target_os = "fuchsia")]
1781impl From<DirectorySynchronousProxy> for zx::Handle {
1782 fn from(value: DirectorySynchronousProxy) -> Self {
1783 value.into_channel().into()
1784 }
1785}
1786
1787#[cfg(target_os = "fuchsia")]
1788impl From<fidl::Channel> for DirectorySynchronousProxy {
1789 fn from(value: fidl::Channel) -> Self {
1790 Self::new(value)
1791 }
1792}
1793
1794#[derive(Debug, Clone)]
1795pub struct DirectoryProxy {
1796 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1797}
1798
1799impl fidl::endpoints::Proxy for DirectoryProxy {
1800 type Protocol = DirectoryMarker;
1801
1802 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1803 Self::new(inner)
1804 }
1805
1806 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1807 self.client.into_channel().map_err(|client| Self { client })
1808 }
1809
1810 fn as_channel(&self) -> &::fidl::AsyncChannel {
1811 self.client.as_channel()
1812 }
1813}
1814
1815impl DirectoryProxy {
1816 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1818 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1819 Self { client: fidl::client::Client::new(channel, protocol_name) }
1820 }
1821
1822 pub fn take_event_stream(&self) -> DirectoryEventStream {
1828 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
1829 }
1830
1831 pub fn r#advisory_lock(
1855 &self,
1856 mut request: &AdvisoryLockRequest,
1857 ) -> fidl::client::QueryResponseFut<
1858 AdvisoryLockingAdvisoryLockResult,
1859 fidl::encoding::DefaultFuchsiaResourceDialect,
1860 > {
1861 DirectoryProxyInterface::r#advisory_lock(self, request)
1862 }
1863
1864 pub fn r#clone(
1865 &self,
1866 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1867 ) -> Result<(), fidl::Error> {
1868 DirectoryProxyInterface::r#clone(self, request)
1869 }
1870
1871 pub fn r#close(
1882 &self,
1883 ) -> fidl::client::QueryResponseFut<
1884 fidl_fuchsia_unknown::CloseableCloseResult,
1885 fidl::encoding::DefaultFuchsiaResourceDialect,
1886 > {
1887 DirectoryProxyInterface::r#close(self)
1888 }
1889
1890 pub fn r#query(
1891 &self,
1892 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1893 {
1894 DirectoryProxyInterface::r#query(self)
1895 }
1896
1897 pub fn r#deprecated_clone(
1899 &self,
1900 mut flags: OpenFlags,
1901 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1902 ) -> Result<(), fidl::Error> {
1903 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1904 }
1905
1906 pub fn r#deprecated_get_attr(
1908 &self,
1909 ) -> fidl::client::QueryResponseFut<
1910 (i32, NodeAttributes),
1911 fidl::encoding::DefaultFuchsiaResourceDialect,
1912 > {
1913 DirectoryProxyInterface::r#deprecated_get_attr(self)
1914 }
1915
1916 pub fn r#deprecated_set_attr(
1918 &self,
1919 mut flags: NodeAttributeFlags,
1920 mut attributes: &NodeAttributes,
1921 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1922 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1923 }
1924
1925 pub fn r#deprecated_get_flags(
1927 &self,
1928 ) -> fidl::client::QueryResponseFut<
1929 (i32, OpenFlags),
1930 fidl::encoding::DefaultFuchsiaResourceDialect,
1931 > {
1932 DirectoryProxyInterface::r#deprecated_get_flags(self)
1933 }
1934
1935 pub fn r#deprecated_set_flags(
1937 &self,
1938 mut flags: OpenFlags,
1939 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1940 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1941 }
1942
1943 pub fn r#get_flags(
1952 &self,
1953 ) -> fidl::client::QueryResponseFut<
1954 NodeGetFlagsResult,
1955 fidl::encoding::DefaultFuchsiaResourceDialect,
1956 > {
1957 DirectoryProxyInterface::r#get_flags(self)
1958 }
1959
1960 pub fn r#set_flags(
1970 &self,
1971 mut flags: Flags,
1972 ) -> fidl::client::QueryResponseFut<
1973 NodeSetFlagsResult,
1974 fidl::encoding::DefaultFuchsiaResourceDialect,
1975 > {
1976 DirectoryProxyInterface::r#set_flags(self, flags)
1977 }
1978
1979 pub fn r#query_filesystem(
1981 &self,
1982 ) -> fidl::client::QueryResponseFut<
1983 (i32, Option<Box<FilesystemInfo>>),
1984 fidl::encoding::DefaultFuchsiaResourceDialect,
1985 > {
1986 DirectoryProxyInterface::r#query_filesystem(self)
1987 }
1988
1989 pub fn r#get_attributes(
2003 &self,
2004 mut query: NodeAttributesQuery,
2005 ) -> fidl::client::QueryResponseFut<
2006 NodeGetAttributesResult,
2007 fidl::encoding::DefaultFuchsiaResourceDialect,
2008 > {
2009 DirectoryProxyInterface::r#get_attributes(self, query)
2010 }
2011
2012 pub fn r#update_attributes(
2021 &self,
2022 mut payload: &MutableNodeAttributes,
2023 ) -> fidl::client::QueryResponseFut<
2024 NodeUpdateAttributesResult,
2025 fidl::encoding::DefaultFuchsiaResourceDialect,
2026 > {
2027 DirectoryProxyInterface::r#update_attributes(self, payload)
2028 }
2029
2030 pub fn r#sync(
2040 &self,
2041 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
2042 {
2043 DirectoryProxyInterface::r#sync(self)
2044 }
2045
2046 pub fn r#list_extended_attributes(
2055 &self,
2056 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2057 ) -> Result<(), fidl::Error> {
2058 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
2059 }
2060
2061 pub fn r#get_extended_attribute(
2068 &self,
2069 mut name: &[u8],
2070 ) -> fidl::client::QueryResponseFut<
2071 NodeGetExtendedAttributeResult,
2072 fidl::encoding::DefaultFuchsiaResourceDialect,
2073 > {
2074 DirectoryProxyInterface::r#get_extended_attribute(self, name)
2075 }
2076
2077 pub fn r#set_extended_attribute(
2085 &self,
2086 mut name: &[u8],
2087 mut value: ExtendedAttributeValue,
2088 mut mode: SetExtendedAttributeMode,
2089 ) -> fidl::client::QueryResponseFut<
2090 NodeSetExtendedAttributeResult,
2091 fidl::encoding::DefaultFuchsiaResourceDialect,
2092 > {
2093 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
2094 }
2095
2096 pub fn r#remove_extended_attribute(
2102 &self,
2103 mut name: &[u8],
2104 ) -> fidl::client::QueryResponseFut<
2105 NodeRemoveExtendedAttributeResult,
2106 fidl::encoding::DefaultFuchsiaResourceDialect,
2107 > {
2108 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
2109 }
2110
2111 pub fn r#deprecated_open(
2113 &self,
2114 mut flags: OpenFlags,
2115 mut mode: ModeType,
2116 mut path: &str,
2117 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2118 ) -> Result<(), fidl::Error> {
2119 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
2120 }
2121
2122 pub fn r#open(
2129 &self,
2130 mut path: &str,
2131 mut flags: Flags,
2132 mut options: &Options,
2133 mut object: fidl::Channel,
2134 ) -> Result<(), fidl::Error> {
2135 DirectoryProxyInterface::r#open(self, path, flags, options, object)
2136 }
2137
2138 pub fn r#read_dirents(
2164 &self,
2165 mut max_bytes: u64,
2166 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fidl::encoding::DefaultFuchsiaResourceDialect>
2167 {
2168 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
2169 }
2170
2171 pub fn r#rewind(
2175 &self,
2176 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2177 DirectoryProxyInterface::r#rewind(self)
2178 }
2179
2180 pub fn r#get_token(
2187 &self,
2188 ) -> fidl::client::QueryResponseFut<
2189 (i32, Option<fidl::Handle>),
2190 fidl::encoding::DefaultFuchsiaResourceDialect,
2191 > {
2192 DirectoryProxyInterface::r#get_token(self)
2193 }
2194
2195 pub fn r#link(
2212 &self,
2213 mut src: &str,
2214 mut dst_parent_token: fidl::Handle,
2215 mut dst: &str,
2216 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2217 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
2218 }
2219
2220 pub fn r#unlink(
2245 &self,
2246 mut name: &str,
2247 mut options: &UnlinkOptions,
2248 ) -> fidl::client::QueryResponseFut<
2249 DirectoryUnlinkResult,
2250 fidl::encoding::DefaultFuchsiaResourceDialect,
2251 > {
2252 DirectoryProxyInterface::r#unlink(self, name, options)
2253 }
2254
2255 pub fn r#rename(
2281 &self,
2282 mut src: &str,
2283 mut dst_parent_token: fidl::Event,
2284 mut dst: &str,
2285 ) -> fidl::client::QueryResponseFut<
2286 DirectoryRenameResult,
2287 fidl::encoding::DefaultFuchsiaResourceDialect,
2288 > {
2289 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
2290 }
2291
2292 pub fn r#create_symlink(
2307 &self,
2308 mut name: &str,
2309 mut target: &[u8],
2310 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2311 ) -> fidl::client::QueryResponseFut<
2312 DirectoryCreateSymlinkResult,
2313 fidl::encoding::DefaultFuchsiaResourceDialect,
2314 > {
2315 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
2316 }
2317
2318 pub fn r#watch(
2325 &self,
2326 mut mask: WatchMask,
2327 mut options: u32,
2328 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2329 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2330 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
2331 }
2332}
2333
2334impl DirectoryProxyInterface for DirectoryProxy {
2335 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
2336 AdvisoryLockingAdvisoryLockResult,
2337 fidl::encoding::DefaultFuchsiaResourceDialect,
2338 >;
2339 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
2340 fn _decode(
2341 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2342 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
2343 let _response = fidl::client::decode_transaction_body::<
2344 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2345 fidl::encoding::DefaultFuchsiaResourceDialect,
2346 0x6ee9c0ad53ec87aa,
2347 >(_buf?)?;
2348 Ok(_response.map(|x| x))
2349 }
2350 self.client.send_query_and_decode::<
2351 AdvisoryLockingAdvisoryLockRequest,
2352 AdvisoryLockingAdvisoryLockResult,
2353 >(
2354 (request,),
2355 0x6ee9c0ad53ec87aa,
2356 fidl::encoding::DynamicFlags::empty(),
2357 _decode,
2358 )
2359 }
2360
2361 fn r#clone(
2362 &self,
2363 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
2364 ) -> Result<(), fidl::Error> {
2365 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
2366 (request,),
2367 0x20d8a7aba2168a79,
2368 fidl::encoding::DynamicFlags::empty(),
2369 )
2370 }
2371
2372 type CloseResponseFut = fidl::client::QueryResponseFut<
2373 fidl_fuchsia_unknown::CloseableCloseResult,
2374 fidl::encoding::DefaultFuchsiaResourceDialect,
2375 >;
2376 fn r#close(&self) -> Self::CloseResponseFut {
2377 fn _decode(
2378 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2379 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
2380 let _response = fidl::client::decode_transaction_body::<
2381 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2382 fidl::encoding::DefaultFuchsiaResourceDialect,
2383 0x5ac5d459ad7f657e,
2384 >(_buf?)?;
2385 Ok(_response.map(|x| x))
2386 }
2387 self.client.send_query_and_decode::<
2388 fidl::encoding::EmptyPayload,
2389 fidl_fuchsia_unknown::CloseableCloseResult,
2390 >(
2391 (),
2392 0x5ac5d459ad7f657e,
2393 fidl::encoding::DynamicFlags::empty(),
2394 _decode,
2395 )
2396 }
2397
2398 type QueryResponseFut =
2399 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
2400 fn r#query(&self) -> Self::QueryResponseFut {
2401 fn _decode(
2402 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2403 ) -> Result<Vec<u8>, fidl::Error> {
2404 let _response = fidl::client::decode_transaction_body::<
2405 fidl_fuchsia_unknown::QueryableQueryResponse,
2406 fidl::encoding::DefaultFuchsiaResourceDialect,
2407 0x2658edee9decfc06,
2408 >(_buf?)?;
2409 Ok(_response.protocol)
2410 }
2411 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
2412 (),
2413 0x2658edee9decfc06,
2414 fidl::encoding::DynamicFlags::empty(),
2415 _decode,
2416 )
2417 }
2418
2419 fn r#deprecated_clone(
2420 &self,
2421 mut flags: OpenFlags,
2422 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2423 ) -> Result<(), fidl::Error> {
2424 self.client.send::<NodeDeprecatedCloneRequest>(
2425 (flags, object),
2426 0x5a61678f293ce16f,
2427 fidl::encoding::DynamicFlags::FLEXIBLE,
2428 )
2429 }
2430
2431 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
2432 (i32, NodeAttributes),
2433 fidl::encoding::DefaultFuchsiaResourceDialect,
2434 >;
2435 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
2436 fn _decode(
2437 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2438 ) -> Result<(i32, NodeAttributes), fidl::Error> {
2439 let _response = fidl::client::decode_transaction_body::<
2440 NodeDeprecatedGetAttrResponse,
2441 fidl::encoding::DefaultFuchsiaResourceDialect,
2442 0x78985e216314dafd,
2443 >(_buf?)?;
2444 Ok((_response.s, _response.attributes))
2445 }
2446 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
2447 (),
2448 0x78985e216314dafd,
2449 fidl::encoding::DynamicFlags::empty(),
2450 _decode,
2451 )
2452 }
2453
2454 type DeprecatedSetAttrResponseFut =
2455 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2456 fn r#deprecated_set_attr(
2457 &self,
2458 mut flags: NodeAttributeFlags,
2459 mut attributes: &NodeAttributes,
2460 ) -> Self::DeprecatedSetAttrResponseFut {
2461 fn _decode(
2462 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2463 ) -> Result<i32, fidl::Error> {
2464 let _response = fidl::client::decode_transaction_body::<
2465 NodeDeprecatedSetAttrResponse,
2466 fidl::encoding::DefaultFuchsiaResourceDialect,
2467 0x4186c0f40d938f46,
2468 >(_buf?)?;
2469 Ok(_response.s)
2470 }
2471 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
2472 (flags, attributes),
2473 0x4186c0f40d938f46,
2474 fidl::encoding::DynamicFlags::empty(),
2475 _decode,
2476 )
2477 }
2478
2479 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
2480 (i32, OpenFlags),
2481 fidl::encoding::DefaultFuchsiaResourceDialect,
2482 >;
2483 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
2484 fn _decode(
2485 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2486 ) -> Result<(i32, OpenFlags), fidl::Error> {
2487 let _response = fidl::client::decode_transaction_body::<
2488 NodeDeprecatedGetFlagsResponse,
2489 fidl::encoding::DefaultFuchsiaResourceDialect,
2490 0x5b88fffb8eda3aa1,
2491 >(_buf?)?;
2492 Ok((_response.s, _response.flags))
2493 }
2494 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
2495 (),
2496 0x5b88fffb8eda3aa1,
2497 fidl::encoding::DynamicFlags::empty(),
2498 _decode,
2499 )
2500 }
2501
2502 type DeprecatedSetFlagsResponseFut =
2503 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2504 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
2505 fn _decode(
2506 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2507 ) -> Result<i32, fidl::Error> {
2508 let _response = fidl::client::decode_transaction_body::<
2509 NodeDeprecatedSetFlagsResponse,
2510 fidl::encoding::DefaultFuchsiaResourceDialect,
2511 0x5295b76c71fde733,
2512 >(_buf?)?;
2513 Ok(_response.s)
2514 }
2515 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
2516 (flags,),
2517 0x5295b76c71fde733,
2518 fidl::encoding::DynamicFlags::empty(),
2519 _decode,
2520 )
2521 }
2522
2523 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
2524 NodeGetFlagsResult,
2525 fidl::encoding::DefaultFuchsiaResourceDialect,
2526 >;
2527 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
2528 fn _decode(
2529 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2530 ) -> Result<NodeGetFlagsResult, fidl::Error> {
2531 let _response = fidl::client::decode_transaction_body::<
2532 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
2533 fidl::encoding::DefaultFuchsiaResourceDialect,
2534 0x176eb318f64ec23,
2535 >(_buf?)?
2536 .into_result::<DirectoryMarker>("get_flags")?;
2537 Ok(_response.map(|x| x.flags))
2538 }
2539 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
2540 (),
2541 0x176eb318f64ec23,
2542 fidl::encoding::DynamicFlags::FLEXIBLE,
2543 _decode,
2544 )
2545 }
2546
2547 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
2548 NodeSetFlagsResult,
2549 fidl::encoding::DefaultFuchsiaResourceDialect,
2550 >;
2551 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
2552 fn _decode(
2553 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2554 ) -> Result<NodeSetFlagsResult, fidl::Error> {
2555 let _response = fidl::client::decode_transaction_body::<
2556 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2557 fidl::encoding::DefaultFuchsiaResourceDialect,
2558 0x55a8028685791ea8,
2559 >(_buf?)?
2560 .into_result::<DirectoryMarker>("set_flags")?;
2561 Ok(_response.map(|x| x))
2562 }
2563 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
2564 (flags,),
2565 0x55a8028685791ea8,
2566 fidl::encoding::DynamicFlags::FLEXIBLE,
2567 _decode,
2568 )
2569 }
2570
2571 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
2572 (i32, Option<Box<FilesystemInfo>>),
2573 fidl::encoding::DefaultFuchsiaResourceDialect,
2574 >;
2575 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
2576 fn _decode(
2577 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2578 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
2579 let _response = fidl::client::decode_transaction_body::<
2580 NodeQueryFilesystemResponse,
2581 fidl::encoding::DefaultFuchsiaResourceDialect,
2582 0x6f344a1c6b0a0610,
2583 >(_buf?)?;
2584 Ok((_response.s, _response.info))
2585 }
2586 self.client.send_query_and_decode::<
2587 fidl::encoding::EmptyPayload,
2588 (i32, Option<Box<FilesystemInfo>>),
2589 >(
2590 (),
2591 0x6f344a1c6b0a0610,
2592 fidl::encoding::DynamicFlags::empty(),
2593 _decode,
2594 )
2595 }
2596
2597 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
2598 NodeGetAttributesResult,
2599 fidl::encoding::DefaultFuchsiaResourceDialect,
2600 >;
2601 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
2602 fn _decode(
2603 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2604 ) -> Result<NodeGetAttributesResult, fidl::Error> {
2605 let _response = fidl::client::decode_transaction_body::<
2606 fidl::encoding::ResultType<NodeAttributes2, i32>,
2607 fidl::encoding::DefaultFuchsiaResourceDialect,
2608 0x3d4396a638ea053b,
2609 >(_buf?)?;
2610 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
2611 }
2612 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
2613 (query,),
2614 0x3d4396a638ea053b,
2615 fidl::encoding::DynamicFlags::empty(),
2616 _decode,
2617 )
2618 }
2619
2620 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
2621 NodeUpdateAttributesResult,
2622 fidl::encoding::DefaultFuchsiaResourceDialect,
2623 >;
2624 fn r#update_attributes(
2625 &self,
2626 mut payload: &MutableNodeAttributes,
2627 ) -> Self::UpdateAttributesResponseFut {
2628 fn _decode(
2629 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2630 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
2631 let _response = fidl::client::decode_transaction_body::<
2632 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2633 fidl::encoding::DefaultFuchsiaResourceDialect,
2634 0x3308c1da5a89bf08,
2635 >(_buf?)?;
2636 Ok(_response.map(|x| x))
2637 }
2638 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
2639 payload,
2640 0x3308c1da5a89bf08,
2641 fidl::encoding::DynamicFlags::empty(),
2642 _decode,
2643 )
2644 }
2645
2646 type SyncResponseFut = fidl::client::QueryResponseFut<
2647 NodeSyncResult,
2648 fidl::encoding::DefaultFuchsiaResourceDialect,
2649 >;
2650 fn r#sync(&self) -> Self::SyncResponseFut {
2651 fn _decode(
2652 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2653 ) -> Result<NodeSyncResult, fidl::Error> {
2654 let _response = fidl::client::decode_transaction_body::<
2655 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2656 fidl::encoding::DefaultFuchsiaResourceDialect,
2657 0x2c5c27ca0ab5dc49,
2658 >(_buf?)?;
2659 Ok(_response.map(|x| x))
2660 }
2661 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
2662 (),
2663 0x2c5c27ca0ab5dc49,
2664 fidl::encoding::DynamicFlags::empty(),
2665 _decode,
2666 )
2667 }
2668
2669 fn r#list_extended_attributes(
2670 &self,
2671 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2672 ) -> Result<(), fidl::Error> {
2673 self.client.send::<NodeListExtendedAttributesRequest>(
2674 (iterator,),
2675 0x4b61033de007fcd0,
2676 fidl::encoding::DynamicFlags::empty(),
2677 )
2678 }
2679
2680 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2681 NodeGetExtendedAttributeResult,
2682 fidl::encoding::DefaultFuchsiaResourceDialect,
2683 >;
2684 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
2685 fn _decode(
2686 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2687 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
2688 let _response = fidl::client::decode_transaction_body::<
2689 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
2690 fidl::encoding::DefaultFuchsiaResourceDialect,
2691 0x45ffa3ccfdeb76db,
2692 >(_buf?)?;
2693 Ok(_response.map(|x| x))
2694 }
2695 self.client.send_query_and_decode::<
2696 NodeGetExtendedAttributeRequest,
2697 NodeGetExtendedAttributeResult,
2698 >(
2699 (name,),
2700 0x45ffa3ccfdeb76db,
2701 fidl::encoding::DynamicFlags::empty(),
2702 _decode,
2703 )
2704 }
2705
2706 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2707 NodeSetExtendedAttributeResult,
2708 fidl::encoding::DefaultFuchsiaResourceDialect,
2709 >;
2710 fn r#set_extended_attribute(
2711 &self,
2712 mut name: &[u8],
2713 mut value: ExtendedAttributeValue,
2714 mut mode: SetExtendedAttributeMode,
2715 ) -> Self::SetExtendedAttributeResponseFut {
2716 fn _decode(
2717 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2718 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
2719 let _response = fidl::client::decode_transaction_body::<
2720 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2721 fidl::encoding::DefaultFuchsiaResourceDialect,
2722 0x4a951362f681f23c,
2723 >(_buf?)?;
2724 Ok(_response.map(|x| x))
2725 }
2726 self.client.send_query_and_decode::<
2727 NodeSetExtendedAttributeRequest,
2728 NodeSetExtendedAttributeResult,
2729 >(
2730 (name, &mut value, mode,),
2731 0x4a951362f681f23c,
2732 fidl::encoding::DynamicFlags::empty(),
2733 _decode,
2734 )
2735 }
2736
2737 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2738 NodeRemoveExtendedAttributeResult,
2739 fidl::encoding::DefaultFuchsiaResourceDialect,
2740 >;
2741 fn r#remove_extended_attribute(
2742 &self,
2743 mut name: &[u8],
2744 ) -> Self::RemoveExtendedAttributeResponseFut {
2745 fn _decode(
2746 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2747 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
2748 let _response = fidl::client::decode_transaction_body::<
2749 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2750 fidl::encoding::DefaultFuchsiaResourceDialect,
2751 0x7a0b9f3a9bf9032d,
2752 >(_buf?)?;
2753 Ok(_response.map(|x| x))
2754 }
2755 self.client.send_query_and_decode::<
2756 NodeRemoveExtendedAttributeRequest,
2757 NodeRemoveExtendedAttributeResult,
2758 >(
2759 (name,),
2760 0x7a0b9f3a9bf9032d,
2761 fidl::encoding::DynamicFlags::empty(),
2762 _decode,
2763 )
2764 }
2765
2766 fn r#deprecated_open(
2767 &self,
2768 mut flags: OpenFlags,
2769 mut mode: ModeType,
2770 mut path: &str,
2771 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2772 ) -> Result<(), fidl::Error> {
2773 self.client.send::<DirectoryDeprecatedOpenRequest>(
2774 (flags, mode, path, object),
2775 0x2c5044561d685ec0,
2776 fidl::encoding::DynamicFlags::FLEXIBLE,
2777 )
2778 }
2779
2780 fn r#open(
2781 &self,
2782 mut path: &str,
2783 mut flags: Flags,
2784 mut options: &Options,
2785 mut object: fidl::Channel,
2786 ) -> Result<(), fidl::Error> {
2787 self.client.send::<DirectoryOpenRequest>(
2788 (path, flags, options, object),
2789 0x568ddcb9a9cbb6d9,
2790 fidl::encoding::DynamicFlags::empty(),
2791 )
2792 }
2793
2794 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
2795 (i32, Vec<u8>),
2796 fidl::encoding::DefaultFuchsiaResourceDialect,
2797 >;
2798 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
2799 fn _decode(
2800 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2801 ) -> Result<(i32, Vec<u8>), fidl::Error> {
2802 let _response = fidl::client::decode_transaction_body::<
2803 DirectoryReadDirentsResponse,
2804 fidl::encoding::DefaultFuchsiaResourceDialect,
2805 0x3582806bf27faa0a,
2806 >(_buf?)?;
2807 Ok((_response.s, _response.dirents))
2808 }
2809 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
2810 (max_bytes,),
2811 0x3582806bf27faa0a,
2812 fidl::encoding::DynamicFlags::empty(),
2813 _decode,
2814 )
2815 }
2816
2817 type RewindResponseFut =
2818 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2819 fn r#rewind(&self) -> Self::RewindResponseFut {
2820 fn _decode(
2821 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2822 ) -> Result<i32, fidl::Error> {
2823 let _response = fidl::client::decode_transaction_body::<
2824 DirectoryRewindResponse,
2825 fidl::encoding::DefaultFuchsiaResourceDialect,
2826 0x16b1202af0f34c71,
2827 >(_buf?)?;
2828 Ok(_response.s)
2829 }
2830 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2831 (),
2832 0x16b1202af0f34c71,
2833 fidl::encoding::DynamicFlags::empty(),
2834 _decode,
2835 )
2836 }
2837
2838 type GetTokenResponseFut = fidl::client::QueryResponseFut<
2839 (i32, Option<fidl::Handle>),
2840 fidl::encoding::DefaultFuchsiaResourceDialect,
2841 >;
2842 fn r#get_token(&self) -> Self::GetTokenResponseFut {
2843 fn _decode(
2844 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2845 ) -> Result<(i32, Option<fidl::Handle>), fidl::Error> {
2846 let _response = fidl::client::decode_transaction_body::<
2847 DirectoryGetTokenResponse,
2848 fidl::encoding::DefaultFuchsiaResourceDialect,
2849 0x26ae9d18763c8655,
2850 >(_buf?)?;
2851 Ok((_response.s, _response.token))
2852 }
2853 self.client
2854 .send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, Option<fidl::Handle>)>(
2855 (),
2856 0x26ae9d18763c8655,
2857 fidl::encoding::DynamicFlags::empty(),
2858 _decode,
2859 )
2860 }
2861
2862 type LinkResponseFut =
2863 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2864 fn r#link(
2865 &self,
2866 mut src: &str,
2867 mut dst_parent_token: fidl::Handle,
2868 mut dst: &str,
2869 ) -> Self::LinkResponseFut {
2870 fn _decode(
2871 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2872 ) -> Result<i32, fidl::Error> {
2873 let _response = fidl::client::decode_transaction_body::<
2874 DirectoryLinkResponse,
2875 fidl::encoding::DefaultFuchsiaResourceDialect,
2876 0x740604c0c7c930e7,
2877 >(_buf?)?;
2878 Ok(_response.s)
2879 }
2880 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2881 (src, dst_parent_token, dst),
2882 0x740604c0c7c930e7,
2883 fidl::encoding::DynamicFlags::empty(),
2884 _decode,
2885 )
2886 }
2887
2888 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2889 DirectoryUnlinkResult,
2890 fidl::encoding::DefaultFuchsiaResourceDialect,
2891 >;
2892 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2893 fn _decode(
2894 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2895 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2896 let _response = fidl::client::decode_transaction_body::<
2897 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2898 fidl::encoding::DefaultFuchsiaResourceDialect,
2899 0x750a0326a78d7bed,
2900 >(_buf?)?;
2901 Ok(_response.map(|x| x))
2902 }
2903 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2904 (name, options),
2905 0x750a0326a78d7bed,
2906 fidl::encoding::DynamicFlags::empty(),
2907 _decode,
2908 )
2909 }
2910
2911 type RenameResponseFut = fidl::client::QueryResponseFut<
2912 DirectoryRenameResult,
2913 fidl::encoding::DefaultFuchsiaResourceDialect,
2914 >;
2915 fn r#rename(
2916 &self,
2917 mut src: &str,
2918 mut dst_parent_token: fidl::Event,
2919 mut dst: &str,
2920 ) -> Self::RenameResponseFut {
2921 fn _decode(
2922 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2923 ) -> Result<DirectoryRenameResult, fidl::Error> {
2924 let _response = fidl::client::decode_transaction_body::<
2925 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2926 fidl::encoding::DefaultFuchsiaResourceDialect,
2927 0x7060e7723b9928de,
2928 >(_buf?)?;
2929 Ok(_response.map(|x| x))
2930 }
2931 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2932 (src, dst_parent_token, dst),
2933 0x7060e7723b9928de,
2934 fidl::encoding::DynamicFlags::empty(),
2935 _decode,
2936 )
2937 }
2938
2939 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2940 DirectoryCreateSymlinkResult,
2941 fidl::encoding::DefaultFuchsiaResourceDialect,
2942 >;
2943 fn r#create_symlink(
2944 &self,
2945 mut name: &str,
2946 mut target: &[u8],
2947 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2948 ) -> Self::CreateSymlinkResponseFut {
2949 fn _decode(
2950 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2951 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2952 let _response = fidl::client::decode_transaction_body::<
2953 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2954 fidl::encoding::DefaultFuchsiaResourceDialect,
2955 0x21ce0f19ec043889,
2956 >(_buf?)?;
2957 Ok(_response.map(|x| x))
2958 }
2959 self.client
2960 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2961 (name, target, connection),
2962 0x21ce0f19ec043889,
2963 fidl::encoding::DynamicFlags::empty(),
2964 _decode,
2965 )
2966 }
2967
2968 type WatchResponseFut =
2969 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2970 fn r#watch(
2971 &self,
2972 mut mask: WatchMask,
2973 mut options: u32,
2974 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2975 ) -> Self::WatchResponseFut {
2976 fn _decode(
2977 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2978 ) -> Result<i32, fidl::Error> {
2979 let _response = fidl::client::decode_transaction_body::<
2980 DirectoryWatchResponse,
2981 fidl::encoding::DefaultFuchsiaResourceDialect,
2982 0x5717193a59d66d91,
2983 >(_buf?)?;
2984 Ok(_response.s)
2985 }
2986 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2987 (mask, options, watcher),
2988 0x5717193a59d66d91,
2989 fidl::encoding::DynamicFlags::empty(),
2990 _decode,
2991 )
2992 }
2993}
2994
2995pub struct DirectoryEventStream {
2996 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2997}
2998
2999impl std::marker::Unpin for DirectoryEventStream {}
3000
3001impl futures::stream::FusedStream for DirectoryEventStream {
3002 fn is_terminated(&self) -> bool {
3003 self.event_receiver.is_terminated()
3004 }
3005}
3006
3007impl futures::Stream for DirectoryEventStream {
3008 type Item = Result<DirectoryEvent, fidl::Error>;
3009
3010 fn poll_next(
3011 mut self: std::pin::Pin<&mut Self>,
3012 cx: &mut std::task::Context<'_>,
3013 ) -> std::task::Poll<Option<Self::Item>> {
3014 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3015 &mut self.event_receiver,
3016 cx
3017 )?) {
3018 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
3019 None => std::task::Poll::Ready(None),
3020 }
3021 }
3022}
3023
3024#[derive(Debug)]
3025pub enum DirectoryEvent {
3026 OnOpen_ {
3027 s: i32,
3028 info: Option<Box<NodeInfoDeprecated>>,
3029 },
3030 OnRepresentation {
3031 payload: Representation,
3032 },
3033 #[non_exhaustive]
3034 _UnknownEvent {
3035 ordinal: u64,
3037 },
3038}
3039
3040impl DirectoryEvent {
3041 #[allow(irrefutable_let_patterns)]
3042 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
3043 if let DirectoryEvent::OnOpen_ { s, info } = self {
3044 Some((s, info))
3045 } else {
3046 None
3047 }
3048 }
3049 #[allow(irrefutable_let_patterns)]
3050 pub fn into_on_representation(self) -> Option<Representation> {
3051 if let DirectoryEvent::OnRepresentation { payload } = self {
3052 Some((payload))
3053 } else {
3054 None
3055 }
3056 }
3057
3058 fn decode(
3060 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3061 ) -> Result<DirectoryEvent, fidl::Error> {
3062 let (bytes, _handles) = buf.split_mut();
3063 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3064 debug_assert_eq!(tx_header.tx_id, 0);
3065 match tx_header.ordinal {
3066 0x7fc7bbb1dbfd1972 => {
3067 let mut out = fidl::new_empty!(
3068 NodeOnOpenRequest,
3069 fidl::encoding::DefaultFuchsiaResourceDialect
3070 );
3071 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3072 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
3073 }
3074 0x5cb40567d80a510c => {
3075 let mut out =
3076 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
3077 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
3078 Ok((DirectoryEvent::OnRepresentation { payload: out }))
3079 }
3080 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3081 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3082 }
3083 _ => Err(fidl::Error::UnknownOrdinal {
3084 ordinal: tx_header.ordinal,
3085 protocol_name: <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3086 }),
3087 }
3088 }
3089}
3090
3091pub struct DirectoryRequestStream {
3093 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3094 is_terminated: bool,
3095}
3096
3097impl std::marker::Unpin for DirectoryRequestStream {}
3098
3099impl futures::stream::FusedStream for DirectoryRequestStream {
3100 fn is_terminated(&self) -> bool {
3101 self.is_terminated
3102 }
3103}
3104
3105impl fidl::endpoints::RequestStream for DirectoryRequestStream {
3106 type Protocol = DirectoryMarker;
3107 type ControlHandle = DirectoryControlHandle;
3108
3109 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3110 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3111 }
3112
3113 fn control_handle(&self) -> Self::ControlHandle {
3114 DirectoryControlHandle { inner: self.inner.clone() }
3115 }
3116
3117 fn into_inner(
3118 self,
3119 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3120 {
3121 (self.inner, self.is_terminated)
3122 }
3123
3124 fn from_inner(
3125 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3126 is_terminated: bool,
3127 ) -> Self {
3128 Self { inner, is_terminated }
3129 }
3130}
3131
3132impl futures::Stream for DirectoryRequestStream {
3133 type Item = Result<DirectoryRequest, fidl::Error>;
3134
3135 fn poll_next(
3136 mut self: std::pin::Pin<&mut Self>,
3137 cx: &mut std::task::Context<'_>,
3138 ) -> std::task::Poll<Option<Self::Item>> {
3139 let this = &mut *self;
3140 if this.inner.check_shutdown(cx) {
3141 this.is_terminated = true;
3142 return std::task::Poll::Ready(None);
3143 }
3144 if this.is_terminated {
3145 panic!("polled DirectoryRequestStream after completion");
3146 }
3147 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3148 |bytes, handles| {
3149 match this.inner.channel().read_etc(cx, bytes, handles) {
3150 std::task::Poll::Ready(Ok(())) => {}
3151 std::task::Poll::Pending => return std::task::Poll::Pending,
3152 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3153 this.is_terminated = true;
3154 return std::task::Poll::Ready(None);
3155 }
3156 std::task::Poll::Ready(Err(e)) => {
3157 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3158 e.into(),
3159 ))))
3160 }
3161 }
3162
3163 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3165
3166 std::task::Poll::Ready(Some(match header.ordinal {
3167 0x6ee9c0ad53ec87aa => {
3168 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3169 let mut req = fidl::new_empty!(
3170 AdvisoryLockingAdvisoryLockRequest,
3171 fidl::encoding::DefaultFuchsiaResourceDialect
3172 );
3173 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
3174 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3175 Ok(DirectoryRequest::AdvisoryLock {
3176 request: req.request,
3177
3178 responder: DirectoryAdvisoryLockResponder {
3179 control_handle: std::mem::ManuallyDrop::new(control_handle),
3180 tx_id: header.tx_id,
3181 },
3182 })
3183 }
3184 0x20d8a7aba2168a79 => {
3185 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3186 let mut req = fidl::new_empty!(
3187 fidl_fuchsia_unknown::CloneableCloneRequest,
3188 fidl::encoding::DefaultFuchsiaResourceDialect
3189 );
3190 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3191 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3192 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
3193 }
3194 0x5ac5d459ad7f657e => {
3195 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3196 let mut req = fidl::new_empty!(
3197 fidl::encoding::EmptyPayload,
3198 fidl::encoding::DefaultFuchsiaResourceDialect
3199 );
3200 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3201 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3202 Ok(DirectoryRequest::Close {
3203 responder: DirectoryCloseResponder {
3204 control_handle: std::mem::ManuallyDrop::new(control_handle),
3205 tx_id: header.tx_id,
3206 },
3207 })
3208 }
3209 0x2658edee9decfc06 => {
3210 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3211 let mut req = fidl::new_empty!(
3212 fidl::encoding::EmptyPayload,
3213 fidl::encoding::DefaultFuchsiaResourceDialect
3214 );
3215 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3216 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3217 Ok(DirectoryRequest::Query {
3218 responder: DirectoryQueryResponder {
3219 control_handle: std::mem::ManuallyDrop::new(control_handle),
3220 tx_id: header.tx_id,
3221 },
3222 })
3223 }
3224 0x5a61678f293ce16f => {
3225 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3226 let mut req = fidl::new_empty!(
3227 NodeDeprecatedCloneRequest,
3228 fidl::encoding::DefaultFuchsiaResourceDialect
3229 );
3230 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3231 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3232 Ok(DirectoryRequest::DeprecatedClone {
3233 flags: req.flags,
3234 object: req.object,
3235
3236 control_handle,
3237 })
3238 }
3239 0x78985e216314dafd => {
3240 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3241 let mut req = fidl::new_empty!(
3242 fidl::encoding::EmptyPayload,
3243 fidl::encoding::DefaultFuchsiaResourceDialect
3244 );
3245 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3246 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3247 Ok(DirectoryRequest::DeprecatedGetAttr {
3248 responder: DirectoryDeprecatedGetAttrResponder {
3249 control_handle: std::mem::ManuallyDrop::new(control_handle),
3250 tx_id: header.tx_id,
3251 },
3252 })
3253 }
3254 0x4186c0f40d938f46 => {
3255 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3256 let mut req = fidl::new_empty!(
3257 NodeDeprecatedSetAttrRequest,
3258 fidl::encoding::DefaultFuchsiaResourceDialect
3259 );
3260 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
3261 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3262 Ok(DirectoryRequest::DeprecatedSetAttr {
3263 flags: req.flags,
3264 attributes: req.attributes,
3265
3266 responder: DirectoryDeprecatedSetAttrResponder {
3267 control_handle: std::mem::ManuallyDrop::new(control_handle),
3268 tx_id: header.tx_id,
3269 },
3270 })
3271 }
3272 0x5b88fffb8eda3aa1 => {
3273 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3274 let mut req = fidl::new_empty!(
3275 fidl::encoding::EmptyPayload,
3276 fidl::encoding::DefaultFuchsiaResourceDialect
3277 );
3278 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3279 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3280 Ok(DirectoryRequest::DeprecatedGetFlags {
3281 responder: DirectoryDeprecatedGetFlagsResponder {
3282 control_handle: std::mem::ManuallyDrop::new(control_handle),
3283 tx_id: header.tx_id,
3284 },
3285 })
3286 }
3287 0x5295b76c71fde733 => {
3288 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3289 let mut req = fidl::new_empty!(
3290 NodeDeprecatedSetFlagsRequest,
3291 fidl::encoding::DefaultFuchsiaResourceDialect
3292 );
3293 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3294 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3295 Ok(DirectoryRequest::DeprecatedSetFlags {
3296 flags: req.flags,
3297
3298 responder: DirectoryDeprecatedSetFlagsResponder {
3299 control_handle: std::mem::ManuallyDrop::new(control_handle),
3300 tx_id: header.tx_id,
3301 },
3302 })
3303 }
3304 0x176eb318f64ec23 => {
3305 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3306 let mut req = fidl::new_empty!(
3307 fidl::encoding::EmptyPayload,
3308 fidl::encoding::DefaultFuchsiaResourceDialect
3309 );
3310 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3311 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3312 Ok(DirectoryRequest::GetFlags {
3313 responder: DirectoryGetFlagsResponder {
3314 control_handle: std::mem::ManuallyDrop::new(control_handle),
3315 tx_id: header.tx_id,
3316 },
3317 })
3318 }
3319 0x55a8028685791ea8 => {
3320 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3321 let mut req = fidl::new_empty!(
3322 NodeSetFlagsRequest,
3323 fidl::encoding::DefaultFuchsiaResourceDialect
3324 );
3325 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3326 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3327 Ok(DirectoryRequest::SetFlags {
3328 flags: req.flags,
3329
3330 responder: DirectorySetFlagsResponder {
3331 control_handle: std::mem::ManuallyDrop::new(control_handle),
3332 tx_id: header.tx_id,
3333 },
3334 })
3335 }
3336 0x6f344a1c6b0a0610 => {
3337 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3338 let mut req = fidl::new_empty!(
3339 fidl::encoding::EmptyPayload,
3340 fidl::encoding::DefaultFuchsiaResourceDialect
3341 );
3342 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3343 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3344 Ok(DirectoryRequest::QueryFilesystem {
3345 responder: DirectoryQueryFilesystemResponder {
3346 control_handle: std::mem::ManuallyDrop::new(control_handle),
3347 tx_id: header.tx_id,
3348 },
3349 })
3350 }
3351 0x3d4396a638ea053b => {
3352 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3353 let mut req = fidl::new_empty!(
3354 NodeGetAttributesRequest,
3355 fidl::encoding::DefaultFuchsiaResourceDialect
3356 );
3357 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3358 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3359 Ok(DirectoryRequest::GetAttributes {
3360 query: req.query,
3361
3362 responder: DirectoryGetAttributesResponder {
3363 control_handle: std::mem::ManuallyDrop::new(control_handle),
3364 tx_id: header.tx_id,
3365 },
3366 })
3367 }
3368 0x3308c1da5a89bf08 => {
3369 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3370 let mut req = fidl::new_empty!(
3371 MutableNodeAttributes,
3372 fidl::encoding::DefaultFuchsiaResourceDialect
3373 );
3374 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
3375 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3376 Ok(DirectoryRequest::UpdateAttributes {
3377 payload: req,
3378 responder: DirectoryUpdateAttributesResponder {
3379 control_handle: std::mem::ManuallyDrop::new(control_handle),
3380 tx_id: header.tx_id,
3381 },
3382 })
3383 }
3384 0x2c5c27ca0ab5dc49 => {
3385 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3386 let mut req = fidl::new_empty!(
3387 fidl::encoding::EmptyPayload,
3388 fidl::encoding::DefaultFuchsiaResourceDialect
3389 );
3390 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3391 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3392 Ok(DirectoryRequest::Sync {
3393 responder: DirectorySyncResponder {
3394 control_handle: std::mem::ManuallyDrop::new(control_handle),
3395 tx_id: header.tx_id,
3396 },
3397 })
3398 }
3399 0x4b61033de007fcd0 => {
3400 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3401 let mut req = fidl::new_empty!(
3402 NodeListExtendedAttributesRequest,
3403 fidl::encoding::DefaultFuchsiaResourceDialect
3404 );
3405 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3406 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3407 Ok(DirectoryRequest::ListExtendedAttributes {
3408 iterator: req.iterator,
3409
3410 control_handle,
3411 })
3412 }
3413 0x45ffa3ccfdeb76db => {
3414 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3415 let mut req = fidl::new_empty!(
3416 NodeGetExtendedAttributeRequest,
3417 fidl::encoding::DefaultFuchsiaResourceDialect
3418 );
3419 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3420 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3421 Ok(DirectoryRequest::GetExtendedAttribute {
3422 name: req.name,
3423
3424 responder: DirectoryGetExtendedAttributeResponder {
3425 control_handle: std::mem::ManuallyDrop::new(control_handle),
3426 tx_id: header.tx_id,
3427 },
3428 })
3429 }
3430 0x4a951362f681f23c => {
3431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3432 let mut req = fidl::new_empty!(
3433 NodeSetExtendedAttributeRequest,
3434 fidl::encoding::DefaultFuchsiaResourceDialect
3435 );
3436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3437 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3438 Ok(DirectoryRequest::SetExtendedAttribute {
3439 name: req.name,
3440 value: req.value,
3441 mode: req.mode,
3442
3443 responder: DirectorySetExtendedAttributeResponder {
3444 control_handle: std::mem::ManuallyDrop::new(control_handle),
3445 tx_id: header.tx_id,
3446 },
3447 })
3448 }
3449 0x7a0b9f3a9bf9032d => {
3450 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3451 let mut req = fidl::new_empty!(
3452 NodeRemoveExtendedAttributeRequest,
3453 fidl::encoding::DefaultFuchsiaResourceDialect
3454 );
3455 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3456 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3457 Ok(DirectoryRequest::RemoveExtendedAttribute {
3458 name: req.name,
3459
3460 responder: DirectoryRemoveExtendedAttributeResponder {
3461 control_handle: std::mem::ManuallyDrop::new(control_handle),
3462 tx_id: header.tx_id,
3463 },
3464 })
3465 }
3466 0x2c5044561d685ec0 => {
3467 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3468 let mut req = fidl::new_empty!(
3469 DirectoryDeprecatedOpenRequest,
3470 fidl::encoding::DefaultFuchsiaResourceDialect
3471 );
3472 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3473 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3474 Ok(DirectoryRequest::DeprecatedOpen {
3475 flags: req.flags,
3476 mode: req.mode,
3477 path: req.path,
3478 object: req.object,
3479
3480 control_handle,
3481 })
3482 }
3483 0x568ddcb9a9cbb6d9 => {
3484 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3485 let mut req = fidl::new_empty!(
3486 DirectoryOpenRequest,
3487 fidl::encoding::DefaultFuchsiaResourceDialect
3488 );
3489 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3490 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3491 Ok(DirectoryRequest::Open {
3492 path: req.path,
3493 flags: req.flags,
3494 options: req.options,
3495 object: req.object,
3496
3497 control_handle,
3498 })
3499 }
3500 0x3582806bf27faa0a => {
3501 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3502 let mut req = fidl::new_empty!(
3503 DirectoryReadDirentsRequest,
3504 fidl::encoding::DefaultFuchsiaResourceDialect
3505 );
3506 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
3507 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3508 Ok(DirectoryRequest::ReadDirents {
3509 max_bytes: req.max_bytes,
3510
3511 responder: DirectoryReadDirentsResponder {
3512 control_handle: std::mem::ManuallyDrop::new(control_handle),
3513 tx_id: header.tx_id,
3514 },
3515 })
3516 }
3517 0x16b1202af0f34c71 => {
3518 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3519 let mut req = fidl::new_empty!(
3520 fidl::encoding::EmptyPayload,
3521 fidl::encoding::DefaultFuchsiaResourceDialect
3522 );
3523 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3524 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3525 Ok(DirectoryRequest::Rewind {
3526 responder: DirectoryRewindResponder {
3527 control_handle: std::mem::ManuallyDrop::new(control_handle),
3528 tx_id: header.tx_id,
3529 },
3530 })
3531 }
3532 0x26ae9d18763c8655 => {
3533 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3534 let mut req = fidl::new_empty!(
3535 fidl::encoding::EmptyPayload,
3536 fidl::encoding::DefaultFuchsiaResourceDialect
3537 );
3538 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3539 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3540 Ok(DirectoryRequest::GetToken {
3541 responder: DirectoryGetTokenResponder {
3542 control_handle: std::mem::ManuallyDrop::new(control_handle),
3543 tx_id: header.tx_id,
3544 },
3545 })
3546 }
3547 0x740604c0c7c930e7 => {
3548 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3549 let mut req = fidl::new_empty!(
3550 DirectoryLinkRequest,
3551 fidl::encoding::DefaultFuchsiaResourceDialect
3552 );
3553 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
3554 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3555 Ok(DirectoryRequest::Link {
3556 src: req.src,
3557 dst_parent_token: req.dst_parent_token,
3558 dst: req.dst,
3559
3560 responder: DirectoryLinkResponder {
3561 control_handle: std::mem::ManuallyDrop::new(control_handle),
3562 tx_id: header.tx_id,
3563 },
3564 })
3565 }
3566 0x750a0326a78d7bed => {
3567 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3568 let mut req = fidl::new_empty!(
3569 DirectoryUnlinkRequest,
3570 fidl::encoding::DefaultFuchsiaResourceDialect
3571 );
3572 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3573 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3574 Ok(DirectoryRequest::Unlink {
3575 name: req.name,
3576 options: req.options,
3577
3578 responder: DirectoryUnlinkResponder {
3579 control_handle: std::mem::ManuallyDrop::new(control_handle),
3580 tx_id: header.tx_id,
3581 },
3582 })
3583 }
3584 0x7060e7723b9928de => {
3585 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3586 let mut req = fidl::new_empty!(
3587 DirectoryRenameRequest,
3588 fidl::encoding::DefaultFuchsiaResourceDialect
3589 );
3590 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
3591 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3592 Ok(DirectoryRequest::Rename {
3593 src: req.src,
3594 dst_parent_token: req.dst_parent_token,
3595 dst: req.dst,
3596
3597 responder: DirectoryRenameResponder {
3598 control_handle: std::mem::ManuallyDrop::new(control_handle),
3599 tx_id: header.tx_id,
3600 },
3601 })
3602 }
3603 0x21ce0f19ec043889 => {
3604 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3605 let mut req = fidl::new_empty!(
3606 DirectoryCreateSymlinkRequest,
3607 fidl::encoding::DefaultFuchsiaResourceDialect
3608 );
3609 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3610 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3611 Ok(DirectoryRequest::CreateSymlink {
3612 name: req.name,
3613 target: req.target,
3614 connection: req.connection,
3615
3616 responder: DirectoryCreateSymlinkResponder {
3617 control_handle: std::mem::ManuallyDrop::new(control_handle),
3618 tx_id: header.tx_id,
3619 },
3620 })
3621 }
3622 0x5717193a59d66d91 => {
3623 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3624 let mut req = fidl::new_empty!(
3625 DirectoryWatchRequest,
3626 fidl::encoding::DefaultFuchsiaResourceDialect
3627 );
3628 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
3629 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3630 Ok(DirectoryRequest::Watch {
3631 mask: req.mask,
3632 options: req.options,
3633 watcher: req.watcher,
3634
3635 responder: DirectoryWatchResponder {
3636 control_handle: std::mem::ManuallyDrop::new(control_handle),
3637 tx_id: header.tx_id,
3638 },
3639 })
3640 }
3641 _ if header.tx_id == 0
3642 && header
3643 .dynamic_flags()
3644 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3645 {
3646 Ok(DirectoryRequest::_UnknownMethod {
3647 ordinal: header.ordinal,
3648 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3649 method_type: fidl::MethodType::OneWay,
3650 })
3651 }
3652 _ if header
3653 .dynamic_flags()
3654 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3655 {
3656 this.inner.send_framework_err(
3657 fidl::encoding::FrameworkErr::UnknownMethod,
3658 header.tx_id,
3659 header.ordinal,
3660 header.dynamic_flags(),
3661 (bytes, handles),
3662 )?;
3663 Ok(DirectoryRequest::_UnknownMethod {
3664 ordinal: header.ordinal,
3665 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3666 method_type: fidl::MethodType::TwoWay,
3667 })
3668 }
3669 _ => Err(fidl::Error::UnknownOrdinal {
3670 ordinal: header.ordinal,
3671 protocol_name:
3672 <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3673 }),
3674 }))
3675 },
3676 )
3677 }
3678}
3679
3680#[derive(Debug)]
3682pub enum DirectoryRequest {
3683 AdvisoryLock {
3707 request: AdvisoryLockRequest,
3708 responder: DirectoryAdvisoryLockResponder,
3709 },
3710 Clone {
3711 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3712 control_handle: DirectoryControlHandle,
3713 },
3714 Close {
3725 responder: DirectoryCloseResponder,
3726 },
3727 Query {
3728 responder: DirectoryQueryResponder,
3729 },
3730 DeprecatedClone {
3732 flags: OpenFlags,
3733 object: fidl::endpoints::ServerEnd<NodeMarker>,
3734 control_handle: DirectoryControlHandle,
3735 },
3736 DeprecatedGetAttr {
3738 responder: DirectoryDeprecatedGetAttrResponder,
3739 },
3740 DeprecatedSetAttr {
3742 flags: NodeAttributeFlags,
3743 attributes: NodeAttributes,
3744 responder: DirectoryDeprecatedSetAttrResponder,
3745 },
3746 DeprecatedGetFlags {
3748 responder: DirectoryDeprecatedGetFlagsResponder,
3749 },
3750 DeprecatedSetFlags {
3752 flags: OpenFlags,
3753 responder: DirectoryDeprecatedSetFlagsResponder,
3754 },
3755 GetFlags {
3764 responder: DirectoryGetFlagsResponder,
3765 },
3766 SetFlags {
3776 flags: Flags,
3777 responder: DirectorySetFlagsResponder,
3778 },
3779 QueryFilesystem {
3781 responder: DirectoryQueryFilesystemResponder,
3782 },
3783 GetAttributes {
3797 query: NodeAttributesQuery,
3798 responder: DirectoryGetAttributesResponder,
3799 },
3800 UpdateAttributes {
3809 payload: MutableNodeAttributes,
3810 responder: DirectoryUpdateAttributesResponder,
3811 },
3812 Sync {
3822 responder: DirectorySyncResponder,
3823 },
3824 ListExtendedAttributes {
3833 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
3834 control_handle: DirectoryControlHandle,
3835 },
3836 GetExtendedAttribute {
3843 name: Vec<u8>,
3844 responder: DirectoryGetExtendedAttributeResponder,
3845 },
3846 SetExtendedAttribute {
3854 name: Vec<u8>,
3855 value: ExtendedAttributeValue,
3856 mode: SetExtendedAttributeMode,
3857 responder: DirectorySetExtendedAttributeResponder,
3858 },
3859 RemoveExtendedAttribute {
3865 name: Vec<u8>,
3866 responder: DirectoryRemoveExtendedAttributeResponder,
3867 },
3868 DeprecatedOpen {
3870 flags: OpenFlags,
3871 mode: ModeType,
3872 path: String,
3873 object: fidl::endpoints::ServerEnd<NodeMarker>,
3874 control_handle: DirectoryControlHandle,
3875 },
3876 Open {
3883 path: String,
3884 flags: Flags,
3885 options: Options,
3886 object: fidl::Channel,
3887 control_handle: DirectoryControlHandle,
3888 },
3889 ReadDirents {
3915 max_bytes: u64,
3916 responder: DirectoryReadDirentsResponder,
3917 },
3918 Rewind {
3922 responder: DirectoryRewindResponder,
3923 },
3924 GetToken {
3931 responder: DirectoryGetTokenResponder,
3932 },
3933 Link {
3950 src: String,
3951 dst_parent_token: fidl::Handle,
3952 dst: String,
3953 responder: DirectoryLinkResponder,
3954 },
3955 Unlink {
3980 name: String,
3981 options: UnlinkOptions,
3982 responder: DirectoryUnlinkResponder,
3983 },
3984 Rename {
4010 src: String,
4011 dst_parent_token: fidl::Event,
4012 dst: String,
4013 responder: DirectoryRenameResponder,
4014 },
4015 CreateSymlink {
4030 name: String,
4031 target: Vec<u8>,
4032 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4033 responder: DirectoryCreateSymlinkResponder,
4034 },
4035 Watch {
4042 mask: WatchMask,
4043 options: u32,
4044 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4045 responder: DirectoryWatchResponder,
4046 },
4047 #[non_exhaustive]
4049 _UnknownMethod {
4050 ordinal: u64,
4052 control_handle: DirectoryControlHandle,
4053 method_type: fidl::MethodType,
4054 },
4055}
4056
4057impl DirectoryRequest {
4058 #[allow(irrefutable_let_patterns)]
4059 pub fn into_advisory_lock(
4060 self,
4061 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
4062 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
4063 Some((request, responder))
4064 } else {
4065 None
4066 }
4067 }
4068
4069 #[allow(irrefutable_let_patterns)]
4070 pub fn into_clone(
4071 self,
4072 ) -> Option<(
4073 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
4074 DirectoryControlHandle,
4075 )> {
4076 if let DirectoryRequest::Clone { request, control_handle } = self {
4077 Some((request, control_handle))
4078 } else {
4079 None
4080 }
4081 }
4082
4083 #[allow(irrefutable_let_patterns)]
4084 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
4085 if let DirectoryRequest::Close { responder } = self {
4086 Some((responder))
4087 } else {
4088 None
4089 }
4090 }
4091
4092 #[allow(irrefutable_let_patterns)]
4093 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
4094 if let DirectoryRequest::Query { responder } = self {
4095 Some((responder))
4096 } else {
4097 None
4098 }
4099 }
4100
4101 #[allow(irrefutable_let_patterns)]
4102 pub fn into_deprecated_clone(
4103 self,
4104 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, DirectoryControlHandle)> {
4105 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
4106 Some((flags, object, control_handle))
4107 } else {
4108 None
4109 }
4110 }
4111
4112 #[allow(irrefutable_let_patterns)]
4113 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
4114 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
4115 Some((responder))
4116 } else {
4117 None
4118 }
4119 }
4120
4121 #[allow(irrefutable_let_patterns)]
4122 pub fn into_deprecated_set_attr(
4123 self,
4124 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
4125 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
4126 Some((flags, attributes, responder))
4127 } else {
4128 None
4129 }
4130 }
4131
4132 #[allow(irrefutable_let_patterns)]
4133 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
4134 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
4135 Some((responder))
4136 } else {
4137 None
4138 }
4139 }
4140
4141 #[allow(irrefutable_let_patterns)]
4142 pub fn into_deprecated_set_flags(
4143 self,
4144 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
4145 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
4146 Some((flags, responder))
4147 } else {
4148 None
4149 }
4150 }
4151
4152 #[allow(irrefutable_let_patterns)]
4153 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
4154 if let DirectoryRequest::GetFlags { responder } = self {
4155 Some((responder))
4156 } else {
4157 None
4158 }
4159 }
4160
4161 #[allow(irrefutable_let_patterns)]
4162 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
4163 if let DirectoryRequest::SetFlags { flags, responder } = self {
4164 Some((flags, responder))
4165 } else {
4166 None
4167 }
4168 }
4169
4170 #[allow(irrefutable_let_patterns)]
4171 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
4172 if let DirectoryRequest::QueryFilesystem { responder } = self {
4173 Some((responder))
4174 } else {
4175 None
4176 }
4177 }
4178
4179 #[allow(irrefutable_let_patterns)]
4180 pub fn into_get_attributes(
4181 self,
4182 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
4183 if let DirectoryRequest::GetAttributes { query, responder } = self {
4184 Some((query, responder))
4185 } else {
4186 None
4187 }
4188 }
4189
4190 #[allow(irrefutable_let_patterns)]
4191 pub fn into_update_attributes(
4192 self,
4193 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
4194 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
4195 Some((payload, responder))
4196 } else {
4197 None
4198 }
4199 }
4200
4201 #[allow(irrefutable_let_patterns)]
4202 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
4203 if let DirectoryRequest::Sync { responder } = self {
4204 Some((responder))
4205 } else {
4206 None
4207 }
4208 }
4209
4210 #[allow(irrefutable_let_patterns)]
4211 pub fn into_list_extended_attributes(
4212 self,
4213 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, DirectoryControlHandle)>
4214 {
4215 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
4216 Some((iterator, control_handle))
4217 } else {
4218 None
4219 }
4220 }
4221
4222 #[allow(irrefutable_let_patterns)]
4223 pub fn into_get_extended_attribute(
4224 self,
4225 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
4226 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
4227 Some((name, responder))
4228 } else {
4229 None
4230 }
4231 }
4232
4233 #[allow(irrefutable_let_patterns)]
4234 pub fn into_set_extended_attribute(
4235 self,
4236 ) -> Option<(
4237 Vec<u8>,
4238 ExtendedAttributeValue,
4239 SetExtendedAttributeMode,
4240 DirectorySetExtendedAttributeResponder,
4241 )> {
4242 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
4243 Some((name, value, mode, responder))
4244 } else {
4245 None
4246 }
4247 }
4248
4249 #[allow(irrefutable_let_patterns)]
4250 pub fn into_remove_extended_attribute(
4251 self,
4252 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
4253 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
4254 Some((name, responder))
4255 } else {
4256 None
4257 }
4258 }
4259
4260 #[allow(irrefutable_let_patterns)]
4261 pub fn into_deprecated_open(
4262 self,
4263 ) -> Option<(
4264 OpenFlags,
4265 ModeType,
4266 String,
4267 fidl::endpoints::ServerEnd<NodeMarker>,
4268 DirectoryControlHandle,
4269 )> {
4270 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
4271 {
4272 Some((flags, mode, path, object, control_handle))
4273 } else {
4274 None
4275 }
4276 }
4277
4278 #[allow(irrefutable_let_patterns)]
4279 pub fn into_open(
4280 self,
4281 ) -> Option<(String, Flags, Options, fidl::Channel, DirectoryControlHandle)> {
4282 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
4283 Some((path, flags, options, object, control_handle))
4284 } else {
4285 None
4286 }
4287 }
4288
4289 #[allow(irrefutable_let_patterns)]
4290 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
4291 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
4292 Some((max_bytes, responder))
4293 } else {
4294 None
4295 }
4296 }
4297
4298 #[allow(irrefutable_let_patterns)]
4299 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
4300 if let DirectoryRequest::Rewind { responder } = self {
4301 Some((responder))
4302 } else {
4303 None
4304 }
4305 }
4306
4307 #[allow(irrefutable_let_patterns)]
4308 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
4309 if let DirectoryRequest::GetToken { responder } = self {
4310 Some((responder))
4311 } else {
4312 None
4313 }
4314 }
4315
4316 #[allow(irrefutable_let_patterns)]
4317 pub fn into_link(self) -> Option<(String, fidl::Handle, String, DirectoryLinkResponder)> {
4318 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
4319 Some((src, dst_parent_token, dst, responder))
4320 } else {
4321 None
4322 }
4323 }
4324
4325 #[allow(irrefutable_let_patterns)]
4326 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
4327 if let DirectoryRequest::Unlink { name, options, responder } = self {
4328 Some((name, options, responder))
4329 } else {
4330 None
4331 }
4332 }
4333
4334 #[allow(irrefutable_let_patterns)]
4335 pub fn into_rename(self) -> Option<(String, fidl::Event, String, DirectoryRenameResponder)> {
4336 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
4337 Some((src, dst_parent_token, dst, responder))
4338 } else {
4339 None
4340 }
4341 }
4342
4343 #[allow(irrefutable_let_patterns)]
4344 pub fn into_create_symlink(
4345 self,
4346 ) -> Option<(
4347 String,
4348 Vec<u8>,
4349 Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4350 DirectoryCreateSymlinkResponder,
4351 )> {
4352 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
4353 Some((name, target, connection, responder))
4354 } else {
4355 None
4356 }
4357 }
4358
4359 #[allow(irrefutable_let_patterns)]
4360 pub fn into_watch(
4361 self,
4362 ) -> Option<(
4363 WatchMask,
4364 u32,
4365 fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4366 DirectoryWatchResponder,
4367 )> {
4368 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
4369 Some((mask, options, watcher, responder))
4370 } else {
4371 None
4372 }
4373 }
4374
4375 pub fn method_name(&self) -> &'static str {
4377 match *self {
4378 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
4379 DirectoryRequest::Clone { .. } => "clone",
4380 DirectoryRequest::Close { .. } => "close",
4381 DirectoryRequest::Query { .. } => "query",
4382 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
4383 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
4384 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
4385 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
4386 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
4387 DirectoryRequest::GetFlags { .. } => "get_flags",
4388 DirectoryRequest::SetFlags { .. } => "set_flags",
4389 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
4390 DirectoryRequest::GetAttributes { .. } => "get_attributes",
4391 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
4392 DirectoryRequest::Sync { .. } => "sync",
4393 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
4394 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
4395 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
4396 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
4397 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
4398 DirectoryRequest::Open { .. } => "open",
4399 DirectoryRequest::ReadDirents { .. } => "read_dirents",
4400 DirectoryRequest::Rewind { .. } => "rewind",
4401 DirectoryRequest::GetToken { .. } => "get_token",
4402 DirectoryRequest::Link { .. } => "link",
4403 DirectoryRequest::Unlink { .. } => "unlink",
4404 DirectoryRequest::Rename { .. } => "rename",
4405 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
4406 DirectoryRequest::Watch { .. } => "watch",
4407 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4408 "unknown one-way method"
4409 }
4410 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4411 "unknown two-way method"
4412 }
4413 }
4414 }
4415}
4416
4417#[derive(Debug, Clone)]
4418pub struct DirectoryControlHandle {
4419 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4420}
4421
4422impl fidl::endpoints::ControlHandle for DirectoryControlHandle {
4423 fn shutdown(&self) {
4424 self.inner.shutdown()
4425 }
4426 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4427 self.inner.shutdown_with_epitaph(status)
4428 }
4429
4430 fn is_closed(&self) -> bool {
4431 self.inner.channel().is_closed()
4432 }
4433 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4434 self.inner.channel().on_closed()
4435 }
4436
4437 #[cfg(target_os = "fuchsia")]
4438 fn signal_peer(
4439 &self,
4440 clear_mask: zx::Signals,
4441 set_mask: zx::Signals,
4442 ) -> Result<(), zx_status::Status> {
4443 use fidl::Peered;
4444 self.inner.channel().signal_peer(clear_mask, set_mask)
4445 }
4446}
4447
4448impl DirectoryControlHandle {
4449 pub fn send_on_open_(
4450 &self,
4451 mut s: i32,
4452 mut info: Option<NodeInfoDeprecated>,
4453 ) -> Result<(), fidl::Error> {
4454 self.inner.send::<NodeOnOpenRequest>(
4455 (s, info.as_mut()),
4456 0,
4457 0x7fc7bbb1dbfd1972,
4458 fidl::encoding::DynamicFlags::empty(),
4459 )
4460 }
4461
4462 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
4463 self.inner.send::<Representation>(
4464 &mut payload,
4465 0,
4466 0x5cb40567d80a510c,
4467 fidl::encoding::DynamicFlags::empty(),
4468 )
4469 }
4470}
4471
4472#[must_use = "FIDL methods require a response to be sent"]
4473#[derive(Debug)]
4474pub struct DirectoryAdvisoryLockResponder {
4475 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4476 tx_id: u32,
4477}
4478
4479impl std::ops::Drop for DirectoryAdvisoryLockResponder {
4483 fn drop(&mut self) {
4484 self.control_handle.shutdown();
4485 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4487 }
4488}
4489
4490impl fidl::endpoints::Responder for DirectoryAdvisoryLockResponder {
4491 type ControlHandle = DirectoryControlHandle;
4492
4493 fn control_handle(&self) -> &DirectoryControlHandle {
4494 &self.control_handle
4495 }
4496
4497 fn drop_without_shutdown(mut self) {
4498 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4500 std::mem::forget(self);
4502 }
4503}
4504
4505impl DirectoryAdvisoryLockResponder {
4506 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4510 let _result = self.send_raw(result);
4511 if _result.is_err() {
4512 self.control_handle.shutdown();
4513 }
4514 self.drop_without_shutdown();
4515 _result
4516 }
4517
4518 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4520 let _result = self.send_raw(result);
4521 self.drop_without_shutdown();
4522 _result
4523 }
4524
4525 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4526 self.control_handle
4527 .inner
4528 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4529 result,
4530 self.tx_id,
4531 0x6ee9c0ad53ec87aa,
4532 fidl::encoding::DynamicFlags::empty(),
4533 )
4534 }
4535}
4536
4537#[must_use = "FIDL methods require a response to be sent"]
4538#[derive(Debug)]
4539pub struct DirectoryCloseResponder {
4540 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4541 tx_id: u32,
4542}
4543
4544impl std::ops::Drop for DirectoryCloseResponder {
4548 fn drop(&mut self) {
4549 self.control_handle.shutdown();
4550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4552 }
4553}
4554
4555impl fidl::endpoints::Responder for DirectoryCloseResponder {
4556 type ControlHandle = DirectoryControlHandle;
4557
4558 fn control_handle(&self) -> &DirectoryControlHandle {
4559 &self.control_handle
4560 }
4561
4562 fn drop_without_shutdown(mut self) {
4563 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4565 std::mem::forget(self);
4567 }
4568}
4569
4570impl DirectoryCloseResponder {
4571 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4575 let _result = self.send_raw(result);
4576 if _result.is_err() {
4577 self.control_handle.shutdown();
4578 }
4579 self.drop_without_shutdown();
4580 _result
4581 }
4582
4583 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4585 let _result = self.send_raw(result);
4586 self.drop_without_shutdown();
4587 _result
4588 }
4589
4590 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4591 self.control_handle
4592 .inner
4593 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4594 result,
4595 self.tx_id,
4596 0x5ac5d459ad7f657e,
4597 fidl::encoding::DynamicFlags::empty(),
4598 )
4599 }
4600}
4601
4602#[must_use = "FIDL methods require a response to be sent"]
4603#[derive(Debug)]
4604pub struct DirectoryQueryResponder {
4605 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4606 tx_id: u32,
4607}
4608
4609impl std::ops::Drop for DirectoryQueryResponder {
4613 fn drop(&mut self) {
4614 self.control_handle.shutdown();
4615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4617 }
4618}
4619
4620impl fidl::endpoints::Responder for DirectoryQueryResponder {
4621 type ControlHandle = DirectoryControlHandle;
4622
4623 fn control_handle(&self) -> &DirectoryControlHandle {
4624 &self.control_handle
4625 }
4626
4627 fn drop_without_shutdown(mut self) {
4628 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4630 std::mem::forget(self);
4632 }
4633}
4634
4635impl DirectoryQueryResponder {
4636 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4640 let _result = self.send_raw(protocol);
4641 if _result.is_err() {
4642 self.control_handle.shutdown();
4643 }
4644 self.drop_without_shutdown();
4645 _result
4646 }
4647
4648 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4650 let _result = self.send_raw(protocol);
4651 self.drop_without_shutdown();
4652 _result
4653 }
4654
4655 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4656 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4657 (protocol,),
4658 self.tx_id,
4659 0x2658edee9decfc06,
4660 fidl::encoding::DynamicFlags::empty(),
4661 )
4662 }
4663}
4664
4665#[must_use = "FIDL methods require a response to be sent"]
4666#[derive(Debug)]
4667pub struct DirectoryDeprecatedGetAttrResponder {
4668 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4669 tx_id: u32,
4670}
4671
4672impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
4676 fn drop(&mut self) {
4677 self.control_handle.shutdown();
4678 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4680 }
4681}
4682
4683impl fidl::endpoints::Responder for DirectoryDeprecatedGetAttrResponder {
4684 type ControlHandle = DirectoryControlHandle;
4685
4686 fn control_handle(&self) -> &DirectoryControlHandle {
4687 &self.control_handle
4688 }
4689
4690 fn drop_without_shutdown(mut self) {
4691 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4693 std::mem::forget(self);
4695 }
4696}
4697
4698impl DirectoryDeprecatedGetAttrResponder {
4699 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4703 let _result = self.send_raw(s, attributes);
4704 if _result.is_err() {
4705 self.control_handle.shutdown();
4706 }
4707 self.drop_without_shutdown();
4708 _result
4709 }
4710
4711 pub fn send_no_shutdown_on_err(
4713 self,
4714 mut s: i32,
4715 mut attributes: &NodeAttributes,
4716 ) -> Result<(), fidl::Error> {
4717 let _result = self.send_raw(s, attributes);
4718 self.drop_without_shutdown();
4719 _result
4720 }
4721
4722 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4723 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
4724 (s, attributes),
4725 self.tx_id,
4726 0x78985e216314dafd,
4727 fidl::encoding::DynamicFlags::empty(),
4728 )
4729 }
4730}
4731
4732#[must_use = "FIDL methods require a response to be sent"]
4733#[derive(Debug)]
4734pub struct DirectoryDeprecatedSetAttrResponder {
4735 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4736 tx_id: u32,
4737}
4738
4739impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
4743 fn drop(&mut self) {
4744 self.control_handle.shutdown();
4745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4747 }
4748}
4749
4750impl fidl::endpoints::Responder for DirectoryDeprecatedSetAttrResponder {
4751 type ControlHandle = DirectoryControlHandle;
4752
4753 fn control_handle(&self) -> &DirectoryControlHandle {
4754 &self.control_handle
4755 }
4756
4757 fn drop_without_shutdown(mut self) {
4758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4760 std::mem::forget(self);
4762 }
4763}
4764
4765impl DirectoryDeprecatedSetAttrResponder {
4766 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4770 let _result = self.send_raw(s);
4771 if _result.is_err() {
4772 self.control_handle.shutdown();
4773 }
4774 self.drop_without_shutdown();
4775 _result
4776 }
4777
4778 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4780 let _result = self.send_raw(s);
4781 self.drop_without_shutdown();
4782 _result
4783 }
4784
4785 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4786 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
4787 (s,),
4788 self.tx_id,
4789 0x4186c0f40d938f46,
4790 fidl::encoding::DynamicFlags::empty(),
4791 )
4792 }
4793}
4794
4795#[must_use = "FIDL methods require a response to be sent"]
4796#[derive(Debug)]
4797pub struct DirectoryDeprecatedGetFlagsResponder {
4798 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4799 tx_id: u32,
4800}
4801
4802impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
4806 fn drop(&mut self) {
4807 self.control_handle.shutdown();
4808 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4810 }
4811}
4812
4813impl fidl::endpoints::Responder for DirectoryDeprecatedGetFlagsResponder {
4814 type ControlHandle = DirectoryControlHandle;
4815
4816 fn control_handle(&self) -> &DirectoryControlHandle {
4817 &self.control_handle
4818 }
4819
4820 fn drop_without_shutdown(mut self) {
4821 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4823 std::mem::forget(self);
4825 }
4826}
4827
4828impl DirectoryDeprecatedGetFlagsResponder {
4829 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4833 let _result = self.send_raw(s, flags);
4834 if _result.is_err() {
4835 self.control_handle.shutdown();
4836 }
4837 self.drop_without_shutdown();
4838 _result
4839 }
4840
4841 pub fn send_no_shutdown_on_err(
4843 self,
4844 mut s: i32,
4845 mut flags: OpenFlags,
4846 ) -> Result<(), fidl::Error> {
4847 let _result = self.send_raw(s, flags);
4848 self.drop_without_shutdown();
4849 _result
4850 }
4851
4852 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4853 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
4854 (s, flags),
4855 self.tx_id,
4856 0x5b88fffb8eda3aa1,
4857 fidl::encoding::DynamicFlags::empty(),
4858 )
4859 }
4860}
4861
4862#[must_use = "FIDL methods require a response to be sent"]
4863#[derive(Debug)]
4864pub struct DirectoryDeprecatedSetFlagsResponder {
4865 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4866 tx_id: u32,
4867}
4868
4869impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4873 fn drop(&mut self) {
4874 self.control_handle.shutdown();
4875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4877 }
4878}
4879
4880impl fidl::endpoints::Responder for DirectoryDeprecatedSetFlagsResponder {
4881 type ControlHandle = DirectoryControlHandle;
4882
4883 fn control_handle(&self) -> &DirectoryControlHandle {
4884 &self.control_handle
4885 }
4886
4887 fn drop_without_shutdown(mut self) {
4888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4890 std::mem::forget(self);
4892 }
4893}
4894
4895impl DirectoryDeprecatedSetFlagsResponder {
4896 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4900 let _result = self.send_raw(s);
4901 if _result.is_err() {
4902 self.control_handle.shutdown();
4903 }
4904 self.drop_without_shutdown();
4905 _result
4906 }
4907
4908 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4910 let _result = self.send_raw(s);
4911 self.drop_without_shutdown();
4912 _result
4913 }
4914
4915 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4916 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4917 (s,),
4918 self.tx_id,
4919 0x5295b76c71fde733,
4920 fidl::encoding::DynamicFlags::empty(),
4921 )
4922 }
4923}
4924
4925#[must_use = "FIDL methods require a response to be sent"]
4926#[derive(Debug)]
4927pub struct DirectoryGetFlagsResponder {
4928 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4929 tx_id: u32,
4930}
4931
4932impl std::ops::Drop for DirectoryGetFlagsResponder {
4936 fn drop(&mut self) {
4937 self.control_handle.shutdown();
4938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4940 }
4941}
4942
4943impl fidl::endpoints::Responder for DirectoryGetFlagsResponder {
4944 type ControlHandle = DirectoryControlHandle;
4945
4946 fn control_handle(&self) -> &DirectoryControlHandle {
4947 &self.control_handle
4948 }
4949
4950 fn drop_without_shutdown(mut self) {
4951 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4953 std::mem::forget(self);
4955 }
4956}
4957
4958impl DirectoryGetFlagsResponder {
4959 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4963 let _result = self.send_raw(result);
4964 if _result.is_err() {
4965 self.control_handle.shutdown();
4966 }
4967 self.drop_without_shutdown();
4968 _result
4969 }
4970
4971 pub fn send_no_shutdown_on_err(
4973 self,
4974 mut result: Result<Flags, i32>,
4975 ) -> Result<(), fidl::Error> {
4976 let _result = self.send_raw(result);
4977 self.drop_without_shutdown();
4978 _result
4979 }
4980
4981 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4982 self.control_handle
4983 .inner
4984 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4985 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4986 self.tx_id,
4987 0x176eb318f64ec23,
4988 fidl::encoding::DynamicFlags::FLEXIBLE,
4989 )
4990 }
4991}
4992
4993#[must_use = "FIDL methods require a response to be sent"]
4994#[derive(Debug)]
4995pub struct DirectorySetFlagsResponder {
4996 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4997 tx_id: u32,
4998}
4999
5000impl std::ops::Drop for DirectorySetFlagsResponder {
5004 fn drop(&mut self) {
5005 self.control_handle.shutdown();
5006 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5008 }
5009}
5010
5011impl fidl::endpoints::Responder for DirectorySetFlagsResponder {
5012 type ControlHandle = DirectoryControlHandle;
5013
5014 fn control_handle(&self) -> &DirectoryControlHandle {
5015 &self.control_handle
5016 }
5017
5018 fn drop_without_shutdown(mut self) {
5019 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5021 std::mem::forget(self);
5023 }
5024}
5025
5026impl DirectorySetFlagsResponder {
5027 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5031 let _result = self.send_raw(result);
5032 if _result.is_err() {
5033 self.control_handle.shutdown();
5034 }
5035 self.drop_without_shutdown();
5036 _result
5037 }
5038
5039 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5041 let _result = self.send_raw(result);
5042 self.drop_without_shutdown();
5043 _result
5044 }
5045
5046 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5047 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5048 fidl::encoding::EmptyStruct,
5049 i32,
5050 >>(
5051 fidl::encoding::FlexibleResult::new(result),
5052 self.tx_id,
5053 0x55a8028685791ea8,
5054 fidl::encoding::DynamicFlags::FLEXIBLE,
5055 )
5056 }
5057}
5058
5059#[must_use = "FIDL methods require a response to be sent"]
5060#[derive(Debug)]
5061pub struct DirectoryQueryFilesystemResponder {
5062 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5063 tx_id: u32,
5064}
5065
5066impl std::ops::Drop for DirectoryQueryFilesystemResponder {
5070 fn drop(&mut self) {
5071 self.control_handle.shutdown();
5072 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5074 }
5075}
5076
5077impl fidl::endpoints::Responder for DirectoryQueryFilesystemResponder {
5078 type ControlHandle = DirectoryControlHandle;
5079
5080 fn control_handle(&self) -> &DirectoryControlHandle {
5081 &self.control_handle
5082 }
5083
5084 fn drop_without_shutdown(mut self) {
5085 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5087 std::mem::forget(self);
5089 }
5090}
5091
5092impl DirectoryQueryFilesystemResponder {
5093 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5097 let _result = self.send_raw(s, info);
5098 if _result.is_err() {
5099 self.control_handle.shutdown();
5100 }
5101 self.drop_without_shutdown();
5102 _result
5103 }
5104
5105 pub fn send_no_shutdown_on_err(
5107 self,
5108 mut s: i32,
5109 mut info: Option<&FilesystemInfo>,
5110 ) -> Result<(), fidl::Error> {
5111 let _result = self.send_raw(s, info);
5112 self.drop_without_shutdown();
5113 _result
5114 }
5115
5116 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5117 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
5118 (s, info),
5119 self.tx_id,
5120 0x6f344a1c6b0a0610,
5121 fidl::encoding::DynamicFlags::empty(),
5122 )
5123 }
5124}
5125
5126#[must_use = "FIDL methods require a response to be sent"]
5127#[derive(Debug)]
5128pub struct DirectoryGetAttributesResponder {
5129 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5130 tx_id: u32,
5131}
5132
5133impl std::ops::Drop for DirectoryGetAttributesResponder {
5137 fn drop(&mut self) {
5138 self.control_handle.shutdown();
5139 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5141 }
5142}
5143
5144impl fidl::endpoints::Responder for DirectoryGetAttributesResponder {
5145 type ControlHandle = DirectoryControlHandle;
5146
5147 fn control_handle(&self) -> &DirectoryControlHandle {
5148 &self.control_handle
5149 }
5150
5151 fn drop_without_shutdown(mut self) {
5152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5154 std::mem::forget(self);
5156 }
5157}
5158
5159impl DirectoryGetAttributesResponder {
5160 pub fn send(
5164 self,
5165 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5166 ) -> Result<(), fidl::Error> {
5167 let _result = self.send_raw(result);
5168 if _result.is_err() {
5169 self.control_handle.shutdown();
5170 }
5171 self.drop_without_shutdown();
5172 _result
5173 }
5174
5175 pub fn send_no_shutdown_on_err(
5177 self,
5178 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5179 ) -> Result<(), fidl::Error> {
5180 let _result = self.send_raw(result);
5181 self.drop_without_shutdown();
5182 _result
5183 }
5184
5185 fn send_raw(
5186 &self,
5187 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5188 ) -> Result<(), fidl::Error> {
5189 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
5190 result,
5191 self.tx_id,
5192 0x3d4396a638ea053b,
5193 fidl::encoding::DynamicFlags::empty(),
5194 )
5195 }
5196}
5197
5198#[must_use = "FIDL methods require a response to be sent"]
5199#[derive(Debug)]
5200pub struct DirectoryUpdateAttributesResponder {
5201 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5202 tx_id: u32,
5203}
5204
5205impl std::ops::Drop for DirectoryUpdateAttributesResponder {
5209 fn drop(&mut self) {
5210 self.control_handle.shutdown();
5211 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5213 }
5214}
5215
5216impl fidl::endpoints::Responder for DirectoryUpdateAttributesResponder {
5217 type ControlHandle = DirectoryControlHandle;
5218
5219 fn control_handle(&self) -> &DirectoryControlHandle {
5220 &self.control_handle
5221 }
5222
5223 fn drop_without_shutdown(mut self) {
5224 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5226 std::mem::forget(self);
5228 }
5229}
5230
5231impl DirectoryUpdateAttributesResponder {
5232 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5236 let _result = self.send_raw(result);
5237 if _result.is_err() {
5238 self.control_handle.shutdown();
5239 }
5240 self.drop_without_shutdown();
5241 _result
5242 }
5243
5244 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5246 let _result = self.send_raw(result);
5247 self.drop_without_shutdown();
5248 _result
5249 }
5250
5251 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5252 self.control_handle
5253 .inner
5254 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5255 result,
5256 self.tx_id,
5257 0x3308c1da5a89bf08,
5258 fidl::encoding::DynamicFlags::empty(),
5259 )
5260 }
5261}
5262
5263#[must_use = "FIDL methods require a response to be sent"]
5264#[derive(Debug)]
5265pub struct DirectorySyncResponder {
5266 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5267 tx_id: u32,
5268}
5269
5270impl std::ops::Drop for DirectorySyncResponder {
5274 fn drop(&mut self) {
5275 self.control_handle.shutdown();
5276 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5278 }
5279}
5280
5281impl fidl::endpoints::Responder for DirectorySyncResponder {
5282 type ControlHandle = DirectoryControlHandle;
5283
5284 fn control_handle(&self) -> &DirectoryControlHandle {
5285 &self.control_handle
5286 }
5287
5288 fn drop_without_shutdown(mut self) {
5289 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5291 std::mem::forget(self);
5293 }
5294}
5295
5296impl DirectorySyncResponder {
5297 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5301 let _result = self.send_raw(result);
5302 if _result.is_err() {
5303 self.control_handle.shutdown();
5304 }
5305 self.drop_without_shutdown();
5306 _result
5307 }
5308
5309 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5311 let _result = self.send_raw(result);
5312 self.drop_without_shutdown();
5313 _result
5314 }
5315
5316 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5317 self.control_handle
5318 .inner
5319 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5320 result,
5321 self.tx_id,
5322 0x2c5c27ca0ab5dc49,
5323 fidl::encoding::DynamicFlags::empty(),
5324 )
5325 }
5326}
5327
5328#[must_use = "FIDL methods require a response to be sent"]
5329#[derive(Debug)]
5330pub struct DirectoryGetExtendedAttributeResponder {
5331 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5332 tx_id: u32,
5333}
5334
5335impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
5339 fn drop(&mut self) {
5340 self.control_handle.shutdown();
5341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5343 }
5344}
5345
5346impl fidl::endpoints::Responder for DirectoryGetExtendedAttributeResponder {
5347 type ControlHandle = DirectoryControlHandle;
5348
5349 fn control_handle(&self) -> &DirectoryControlHandle {
5350 &self.control_handle
5351 }
5352
5353 fn drop_without_shutdown(mut self) {
5354 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5356 std::mem::forget(self);
5358 }
5359}
5360
5361impl DirectoryGetExtendedAttributeResponder {
5362 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5366 let _result = self.send_raw(result);
5367 if _result.is_err() {
5368 self.control_handle.shutdown();
5369 }
5370 self.drop_without_shutdown();
5371 _result
5372 }
5373
5374 pub fn send_no_shutdown_on_err(
5376 self,
5377 mut result: Result<ExtendedAttributeValue, i32>,
5378 ) -> Result<(), fidl::Error> {
5379 let _result = self.send_raw(result);
5380 self.drop_without_shutdown();
5381 _result
5382 }
5383
5384 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5385 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
5386 result.as_mut().map_err(|e| *e),
5387 self.tx_id,
5388 0x45ffa3ccfdeb76db,
5389 fidl::encoding::DynamicFlags::empty(),
5390 )
5391 }
5392}
5393
5394#[must_use = "FIDL methods require a response to be sent"]
5395#[derive(Debug)]
5396pub struct DirectorySetExtendedAttributeResponder {
5397 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5398 tx_id: u32,
5399}
5400
5401impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
5405 fn drop(&mut self) {
5406 self.control_handle.shutdown();
5407 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5409 }
5410}
5411
5412impl fidl::endpoints::Responder for DirectorySetExtendedAttributeResponder {
5413 type ControlHandle = DirectoryControlHandle;
5414
5415 fn control_handle(&self) -> &DirectoryControlHandle {
5416 &self.control_handle
5417 }
5418
5419 fn drop_without_shutdown(mut self) {
5420 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5422 std::mem::forget(self);
5424 }
5425}
5426
5427impl DirectorySetExtendedAttributeResponder {
5428 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5432 let _result = self.send_raw(result);
5433 if _result.is_err() {
5434 self.control_handle.shutdown();
5435 }
5436 self.drop_without_shutdown();
5437 _result
5438 }
5439
5440 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5442 let _result = self.send_raw(result);
5443 self.drop_without_shutdown();
5444 _result
5445 }
5446
5447 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5448 self.control_handle
5449 .inner
5450 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5451 result,
5452 self.tx_id,
5453 0x4a951362f681f23c,
5454 fidl::encoding::DynamicFlags::empty(),
5455 )
5456 }
5457}
5458
5459#[must_use = "FIDL methods require a response to be sent"]
5460#[derive(Debug)]
5461pub struct DirectoryRemoveExtendedAttributeResponder {
5462 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5463 tx_id: u32,
5464}
5465
5466impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
5470 fn drop(&mut self) {
5471 self.control_handle.shutdown();
5472 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5474 }
5475}
5476
5477impl fidl::endpoints::Responder for DirectoryRemoveExtendedAttributeResponder {
5478 type ControlHandle = DirectoryControlHandle;
5479
5480 fn control_handle(&self) -> &DirectoryControlHandle {
5481 &self.control_handle
5482 }
5483
5484 fn drop_without_shutdown(mut self) {
5485 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5487 std::mem::forget(self);
5489 }
5490}
5491
5492impl DirectoryRemoveExtendedAttributeResponder {
5493 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5497 let _result = self.send_raw(result);
5498 if _result.is_err() {
5499 self.control_handle.shutdown();
5500 }
5501 self.drop_without_shutdown();
5502 _result
5503 }
5504
5505 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5507 let _result = self.send_raw(result);
5508 self.drop_without_shutdown();
5509 _result
5510 }
5511
5512 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5513 self.control_handle
5514 .inner
5515 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5516 result,
5517 self.tx_id,
5518 0x7a0b9f3a9bf9032d,
5519 fidl::encoding::DynamicFlags::empty(),
5520 )
5521 }
5522}
5523
5524#[must_use = "FIDL methods require a response to be sent"]
5525#[derive(Debug)]
5526pub struct DirectoryReadDirentsResponder {
5527 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5528 tx_id: u32,
5529}
5530
5531impl std::ops::Drop for DirectoryReadDirentsResponder {
5535 fn drop(&mut self) {
5536 self.control_handle.shutdown();
5537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5539 }
5540}
5541
5542impl fidl::endpoints::Responder for DirectoryReadDirentsResponder {
5543 type ControlHandle = DirectoryControlHandle;
5544
5545 fn control_handle(&self) -> &DirectoryControlHandle {
5546 &self.control_handle
5547 }
5548
5549 fn drop_without_shutdown(mut self) {
5550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5552 std::mem::forget(self);
5554 }
5555}
5556
5557impl DirectoryReadDirentsResponder {
5558 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5562 let _result = self.send_raw(s, dirents);
5563 if _result.is_err() {
5564 self.control_handle.shutdown();
5565 }
5566 self.drop_without_shutdown();
5567 _result
5568 }
5569
5570 pub fn send_no_shutdown_on_err(
5572 self,
5573 mut s: i32,
5574 mut dirents: &[u8],
5575 ) -> Result<(), fidl::Error> {
5576 let _result = self.send_raw(s, dirents);
5577 self.drop_without_shutdown();
5578 _result
5579 }
5580
5581 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5582 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
5583 (s, dirents),
5584 self.tx_id,
5585 0x3582806bf27faa0a,
5586 fidl::encoding::DynamicFlags::empty(),
5587 )
5588 }
5589}
5590
5591#[must_use = "FIDL methods require a response to be sent"]
5592#[derive(Debug)]
5593pub struct DirectoryRewindResponder {
5594 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5595 tx_id: u32,
5596}
5597
5598impl std::ops::Drop for DirectoryRewindResponder {
5602 fn drop(&mut self) {
5603 self.control_handle.shutdown();
5604 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5606 }
5607}
5608
5609impl fidl::endpoints::Responder for DirectoryRewindResponder {
5610 type ControlHandle = DirectoryControlHandle;
5611
5612 fn control_handle(&self) -> &DirectoryControlHandle {
5613 &self.control_handle
5614 }
5615
5616 fn drop_without_shutdown(mut self) {
5617 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5619 std::mem::forget(self);
5621 }
5622}
5623
5624impl DirectoryRewindResponder {
5625 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5629 let _result = self.send_raw(s);
5630 if _result.is_err() {
5631 self.control_handle.shutdown();
5632 }
5633 self.drop_without_shutdown();
5634 _result
5635 }
5636
5637 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5639 let _result = self.send_raw(s);
5640 self.drop_without_shutdown();
5641 _result
5642 }
5643
5644 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5645 self.control_handle.inner.send::<DirectoryRewindResponse>(
5646 (s,),
5647 self.tx_id,
5648 0x16b1202af0f34c71,
5649 fidl::encoding::DynamicFlags::empty(),
5650 )
5651 }
5652}
5653
5654#[must_use = "FIDL methods require a response to be sent"]
5655#[derive(Debug)]
5656pub struct DirectoryGetTokenResponder {
5657 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5658 tx_id: u32,
5659}
5660
5661impl std::ops::Drop for DirectoryGetTokenResponder {
5665 fn drop(&mut self) {
5666 self.control_handle.shutdown();
5667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5669 }
5670}
5671
5672impl fidl::endpoints::Responder for DirectoryGetTokenResponder {
5673 type ControlHandle = DirectoryControlHandle;
5674
5675 fn control_handle(&self) -> &DirectoryControlHandle {
5676 &self.control_handle
5677 }
5678
5679 fn drop_without_shutdown(mut self) {
5680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5682 std::mem::forget(self);
5684 }
5685}
5686
5687impl DirectoryGetTokenResponder {
5688 pub fn send(self, mut s: i32, mut token: Option<fidl::Handle>) -> Result<(), fidl::Error> {
5692 let _result = self.send_raw(s, token);
5693 if _result.is_err() {
5694 self.control_handle.shutdown();
5695 }
5696 self.drop_without_shutdown();
5697 _result
5698 }
5699
5700 pub fn send_no_shutdown_on_err(
5702 self,
5703 mut s: i32,
5704 mut token: Option<fidl::Handle>,
5705 ) -> Result<(), fidl::Error> {
5706 let _result = self.send_raw(s, token);
5707 self.drop_without_shutdown();
5708 _result
5709 }
5710
5711 fn send_raw(&self, mut s: i32, mut token: Option<fidl::Handle>) -> Result<(), fidl::Error> {
5712 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
5713 (s, token),
5714 self.tx_id,
5715 0x26ae9d18763c8655,
5716 fidl::encoding::DynamicFlags::empty(),
5717 )
5718 }
5719}
5720
5721#[must_use = "FIDL methods require a response to be sent"]
5722#[derive(Debug)]
5723pub struct DirectoryLinkResponder {
5724 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5725 tx_id: u32,
5726}
5727
5728impl std::ops::Drop for DirectoryLinkResponder {
5732 fn drop(&mut self) {
5733 self.control_handle.shutdown();
5734 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5736 }
5737}
5738
5739impl fidl::endpoints::Responder for DirectoryLinkResponder {
5740 type ControlHandle = DirectoryControlHandle;
5741
5742 fn control_handle(&self) -> &DirectoryControlHandle {
5743 &self.control_handle
5744 }
5745
5746 fn drop_without_shutdown(mut self) {
5747 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5749 std::mem::forget(self);
5751 }
5752}
5753
5754impl DirectoryLinkResponder {
5755 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5759 let _result = self.send_raw(s);
5760 if _result.is_err() {
5761 self.control_handle.shutdown();
5762 }
5763 self.drop_without_shutdown();
5764 _result
5765 }
5766
5767 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5769 let _result = self.send_raw(s);
5770 self.drop_without_shutdown();
5771 _result
5772 }
5773
5774 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5775 self.control_handle.inner.send::<DirectoryLinkResponse>(
5776 (s,),
5777 self.tx_id,
5778 0x740604c0c7c930e7,
5779 fidl::encoding::DynamicFlags::empty(),
5780 )
5781 }
5782}
5783
5784#[must_use = "FIDL methods require a response to be sent"]
5785#[derive(Debug)]
5786pub struct DirectoryUnlinkResponder {
5787 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5788 tx_id: u32,
5789}
5790
5791impl std::ops::Drop for DirectoryUnlinkResponder {
5795 fn drop(&mut self) {
5796 self.control_handle.shutdown();
5797 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5799 }
5800}
5801
5802impl fidl::endpoints::Responder for DirectoryUnlinkResponder {
5803 type ControlHandle = DirectoryControlHandle;
5804
5805 fn control_handle(&self) -> &DirectoryControlHandle {
5806 &self.control_handle
5807 }
5808
5809 fn drop_without_shutdown(mut self) {
5810 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5812 std::mem::forget(self);
5814 }
5815}
5816
5817impl DirectoryUnlinkResponder {
5818 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5822 let _result = self.send_raw(result);
5823 if _result.is_err() {
5824 self.control_handle.shutdown();
5825 }
5826 self.drop_without_shutdown();
5827 _result
5828 }
5829
5830 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5832 let _result = self.send_raw(result);
5833 self.drop_without_shutdown();
5834 _result
5835 }
5836
5837 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5838 self.control_handle
5839 .inner
5840 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5841 result,
5842 self.tx_id,
5843 0x750a0326a78d7bed,
5844 fidl::encoding::DynamicFlags::empty(),
5845 )
5846 }
5847}
5848
5849#[must_use = "FIDL methods require a response to be sent"]
5850#[derive(Debug)]
5851pub struct DirectoryRenameResponder {
5852 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5853 tx_id: u32,
5854}
5855
5856impl std::ops::Drop for DirectoryRenameResponder {
5860 fn drop(&mut self) {
5861 self.control_handle.shutdown();
5862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5864 }
5865}
5866
5867impl fidl::endpoints::Responder for DirectoryRenameResponder {
5868 type ControlHandle = DirectoryControlHandle;
5869
5870 fn control_handle(&self) -> &DirectoryControlHandle {
5871 &self.control_handle
5872 }
5873
5874 fn drop_without_shutdown(mut self) {
5875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5877 std::mem::forget(self);
5879 }
5880}
5881
5882impl DirectoryRenameResponder {
5883 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5887 let _result = self.send_raw(result);
5888 if _result.is_err() {
5889 self.control_handle.shutdown();
5890 }
5891 self.drop_without_shutdown();
5892 _result
5893 }
5894
5895 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5897 let _result = self.send_raw(result);
5898 self.drop_without_shutdown();
5899 _result
5900 }
5901
5902 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5903 self.control_handle
5904 .inner
5905 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5906 result,
5907 self.tx_id,
5908 0x7060e7723b9928de,
5909 fidl::encoding::DynamicFlags::empty(),
5910 )
5911 }
5912}
5913
5914#[must_use = "FIDL methods require a response to be sent"]
5915#[derive(Debug)]
5916pub struct DirectoryCreateSymlinkResponder {
5917 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5918 tx_id: u32,
5919}
5920
5921impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5925 fn drop(&mut self) {
5926 self.control_handle.shutdown();
5927 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5929 }
5930}
5931
5932impl fidl::endpoints::Responder for DirectoryCreateSymlinkResponder {
5933 type ControlHandle = DirectoryControlHandle;
5934
5935 fn control_handle(&self) -> &DirectoryControlHandle {
5936 &self.control_handle
5937 }
5938
5939 fn drop_without_shutdown(mut self) {
5940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5942 std::mem::forget(self);
5944 }
5945}
5946
5947impl DirectoryCreateSymlinkResponder {
5948 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5952 let _result = self.send_raw(result);
5953 if _result.is_err() {
5954 self.control_handle.shutdown();
5955 }
5956 self.drop_without_shutdown();
5957 _result
5958 }
5959
5960 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5962 let _result = self.send_raw(result);
5963 self.drop_without_shutdown();
5964 _result
5965 }
5966
5967 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5968 self.control_handle
5969 .inner
5970 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5971 result,
5972 self.tx_id,
5973 0x21ce0f19ec043889,
5974 fidl::encoding::DynamicFlags::empty(),
5975 )
5976 }
5977}
5978
5979#[must_use = "FIDL methods require a response to be sent"]
5980#[derive(Debug)]
5981pub struct DirectoryWatchResponder {
5982 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5983 tx_id: u32,
5984}
5985
5986impl std::ops::Drop for DirectoryWatchResponder {
5990 fn drop(&mut self) {
5991 self.control_handle.shutdown();
5992 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5994 }
5995}
5996
5997impl fidl::endpoints::Responder for DirectoryWatchResponder {
5998 type ControlHandle = DirectoryControlHandle;
5999
6000 fn control_handle(&self) -> &DirectoryControlHandle {
6001 &self.control_handle
6002 }
6003
6004 fn drop_without_shutdown(mut self) {
6005 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6007 std::mem::forget(self);
6009 }
6010}
6011
6012impl DirectoryWatchResponder {
6013 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
6017 let _result = self.send_raw(s);
6018 if _result.is_err() {
6019 self.control_handle.shutdown();
6020 }
6021 self.drop_without_shutdown();
6022 _result
6023 }
6024
6025 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
6027 let _result = self.send_raw(s);
6028 self.drop_without_shutdown();
6029 _result
6030 }
6031
6032 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
6033 self.control_handle.inner.send::<DirectoryWatchResponse>(
6034 (s,),
6035 self.tx_id,
6036 0x5717193a59d66d91,
6037 fidl::encoding::DynamicFlags::empty(),
6038 )
6039 }
6040}
6041
6042#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6043pub struct DirectoryWatcherMarker;
6044
6045impl fidl::endpoints::ProtocolMarker for DirectoryWatcherMarker {
6046 type Proxy = DirectoryWatcherProxy;
6047 type RequestStream = DirectoryWatcherRequestStream;
6048 #[cfg(target_os = "fuchsia")]
6049 type SynchronousProxy = DirectoryWatcherSynchronousProxy;
6050
6051 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
6052}
6053
6054pub trait DirectoryWatcherProxyInterface: Send + Sync {}
6055#[derive(Debug)]
6056#[cfg(target_os = "fuchsia")]
6057pub struct DirectoryWatcherSynchronousProxy {
6058 client: fidl::client::sync::Client,
6059}
6060
6061#[cfg(target_os = "fuchsia")]
6062impl fidl::endpoints::SynchronousProxy for DirectoryWatcherSynchronousProxy {
6063 type Proxy = DirectoryWatcherProxy;
6064 type Protocol = DirectoryWatcherMarker;
6065
6066 fn from_channel(inner: fidl::Channel) -> Self {
6067 Self::new(inner)
6068 }
6069
6070 fn into_channel(self) -> fidl::Channel {
6071 self.client.into_channel()
6072 }
6073
6074 fn as_channel(&self) -> &fidl::Channel {
6075 self.client.as_channel()
6076 }
6077}
6078
6079#[cfg(target_os = "fuchsia")]
6080impl DirectoryWatcherSynchronousProxy {
6081 pub fn new(channel: fidl::Channel) -> Self {
6082 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6083 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6084 }
6085
6086 pub fn into_channel(self) -> fidl::Channel {
6087 self.client.into_channel()
6088 }
6089
6090 pub fn wait_for_event(
6093 &self,
6094 deadline: zx::MonotonicInstant,
6095 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6096 DirectoryWatcherEvent::decode(self.client.wait_for_event(deadline)?)
6097 }
6098}
6099
6100#[cfg(target_os = "fuchsia")]
6101impl From<DirectoryWatcherSynchronousProxy> for zx::Handle {
6102 fn from(value: DirectoryWatcherSynchronousProxy) -> Self {
6103 value.into_channel().into()
6104 }
6105}
6106
6107#[cfg(target_os = "fuchsia")]
6108impl From<fidl::Channel> for DirectoryWatcherSynchronousProxy {
6109 fn from(value: fidl::Channel) -> Self {
6110 Self::new(value)
6111 }
6112}
6113
6114#[derive(Debug, Clone)]
6115pub struct DirectoryWatcherProxy {
6116 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6117}
6118
6119impl fidl::endpoints::Proxy for DirectoryWatcherProxy {
6120 type Protocol = DirectoryWatcherMarker;
6121
6122 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6123 Self::new(inner)
6124 }
6125
6126 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6127 self.client.into_channel().map_err(|client| Self { client })
6128 }
6129
6130 fn as_channel(&self) -> &::fidl::AsyncChannel {
6131 self.client.as_channel()
6132 }
6133}
6134
6135impl DirectoryWatcherProxy {
6136 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6138 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6139 Self { client: fidl::client::Client::new(channel, protocol_name) }
6140 }
6141
6142 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
6148 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
6149 }
6150}
6151
6152impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
6153
6154pub struct DirectoryWatcherEventStream {
6155 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6156}
6157
6158impl std::marker::Unpin for DirectoryWatcherEventStream {}
6159
6160impl futures::stream::FusedStream for DirectoryWatcherEventStream {
6161 fn is_terminated(&self) -> bool {
6162 self.event_receiver.is_terminated()
6163 }
6164}
6165
6166impl futures::Stream for DirectoryWatcherEventStream {
6167 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
6168
6169 fn poll_next(
6170 mut self: std::pin::Pin<&mut Self>,
6171 cx: &mut std::task::Context<'_>,
6172 ) -> std::task::Poll<Option<Self::Item>> {
6173 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6174 &mut self.event_receiver,
6175 cx
6176 )?) {
6177 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
6178 None => std::task::Poll::Ready(None),
6179 }
6180 }
6181}
6182
6183#[derive(Debug)]
6184pub enum DirectoryWatcherEvent {}
6185
6186impl DirectoryWatcherEvent {
6187 fn decode(
6189 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6190 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6191 let (bytes, _handles) = buf.split_mut();
6192 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6193 debug_assert_eq!(tx_header.tx_id, 0);
6194 match tx_header.ordinal {
6195 _ => Err(fidl::Error::UnknownOrdinal {
6196 ordinal: tx_header.ordinal,
6197 protocol_name:
6198 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6199 }),
6200 }
6201 }
6202}
6203
6204pub struct DirectoryWatcherRequestStream {
6206 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6207 is_terminated: bool,
6208}
6209
6210impl std::marker::Unpin for DirectoryWatcherRequestStream {}
6211
6212impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
6213 fn is_terminated(&self) -> bool {
6214 self.is_terminated
6215 }
6216}
6217
6218impl fidl::endpoints::RequestStream for DirectoryWatcherRequestStream {
6219 type Protocol = DirectoryWatcherMarker;
6220 type ControlHandle = DirectoryWatcherControlHandle;
6221
6222 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6223 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6224 }
6225
6226 fn control_handle(&self) -> Self::ControlHandle {
6227 DirectoryWatcherControlHandle { inner: self.inner.clone() }
6228 }
6229
6230 fn into_inner(
6231 self,
6232 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6233 {
6234 (self.inner, self.is_terminated)
6235 }
6236
6237 fn from_inner(
6238 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6239 is_terminated: bool,
6240 ) -> Self {
6241 Self { inner, is_terminated }
6242 }
6243}
6244
6245impl futures::Stream for DirectoryWatcherRequestStream {
6246 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
6247
6248 fn poll_next(
6249 mut self: std::pin::Pin<&mut Self>,
6250 cx: &mut std::task::Context<'_>,
6251 ) -> std::task::Poll<Option<Self::Item>> {
6252 let this = &mut *self;
6253 if this.inner.check_shutdown(cx) {
6254 this.is_terminated = true;
6255 return std::task::Poll::Ready(None);
6256 }
6257 if this.is_terminated {
6258 panic!("polled DirectoryWatcherRequestStream after completion");
6259 }
6260 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6261 |bytes, handles| {
6262 match this.inner.channel().read_etc(cx, bytes, handles) {
6263 std::task::Poll::Ready(Ok(())) => {}
6264 std::task::Poll::Pending => return std::task::Poll::Pending,
6265 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6266 this.is_terminated = true;
6267 return std::task::Poll::Ready(None);
6268 }
6269 std::task::Poll::Ready(Err(e)) => {
6270 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6271 e.into(),
6272 ))))
6273 }
6274 }
6275
6276 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6278
6279 std::task::Poll::Ready(Some(match header.ordinal {
6280 _ => Err(fidl::Error::UnknownOrdinal {
6281 ordinal: header.ordinal,
6282 protocol_name:
6283 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6284 }),
6285 }))
6286 },
6287 )
6288 }
6289}
6290
6291#[derive(Debug)]
6309pub enum DirectoryWatcherRequest {}
6310
6311impl DirectoryWatcherRequest {
6312 pub fn method_name(&self) -> &'static str {
6314 match *self {}
6315 }
6316}
6317
6318#[derive(Debug, Clone)]
6319pub struct DirectoryWatcherControlHandle {
6320 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6321}
6322
6323impl fidl::endpoints::ControlHandle for DirectoryWatcherControlHandle {
6324 fn shutdown(&self) {
6325 self.inner.shutdown()
6326 }
6327 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6328 self.inner.shutdown_with_epitaph(status)
6329 }
6330
6331 fn is_closed(&self) -> bool {
6332 self.inner.channel().is_closed()
6333 }
6334 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6335 self.inner.channel().on_closed()
6336 }
6337
6338 #[cfg(target_os = "fuchsia")]
6339 fn signal_peer(
6340 &self,
6341 clear_mask: zx::Signals,
6342 set_mask: zx::Signals,
6343 ) -> Result<(), zx_status::Status> {
6344 use fidl::Peered;
6345 self.inner.channel().signal_peer(clear_mask, set_mask)
6346 }
6347}
6348
6349impl DirectoryWatcherControlHandle {}
6350
6351#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6352pub struct ExtendedAttributeIteratorMarker;
6353
6354impl fidl::endpoints::ProtocolMarker for ExtendedAttributeIteratorMarker {
6355 type Proxy = ExtendedAttributeIteratorProxy;
6356 type RequestStream = ExtendedAttributeIteratorRequestStream;
6357 #[cfg(target_os = "fuchsia")]
6358 type SynchronousProxy = ExtendedAttributeIteratorSynchronousProxy;
6359
6360 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
6361}
6362pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
6363
6364pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
6365 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
6366 + Send;
6367 fn r#get_next(&self) -> Self::GetNextResponseFut;
6368}
6369#[derive(Debug)]
6370#[cfg(target_os = "fuchsia")]
6371pub struct ExtendedAttributeIteratorSynchronousProxy {
6372 client: fidl::client::sync::Client,
6373}
6374
6375#[cfg(target_os = "fuchsia")]
6376impl fidl::endpoints::SynchronousProxy for ExtendedAttributeIteratorSynchronousProxy {
6377 type Proxy = ExtendedAttributeIteratorProxy;
6378 type Protocol = ExtendedAttributeIteratorMarker;
6379
6380 fn from_channel(inner: fidl::Channel) -> Self {
6381 Self::new(inner)
6382 }
6383
6384 fn into_channel(self) -> fidl::Channel {
6385 self.client.into_channel()
6386 }
6387
6388 fn as_channel(&self) -> &fidl::Channel {
6389 self.client.as_channel()
6390 }
6391}
6392
6393#[cfg(target_os = "fuchsia")]
6394impl ExtendedAttributeIteratorSynchronousProxy {
6395 pub fn new(channel: fidl::Channel) -> Self {
6396 let protocol_name =
6397 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6398 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6399 }
6400
6401 pub fn into_channel(self) -> fidl::Channel {
6402 self.client.into_channel()
6403 }
6404
6405 pub fn wait_for_event(
6408 &self,
6409 deadline: zx::MonotonicInstant,
6410 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6411 ExtendedAttributeIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6412 }
6413
6414 pub fn r#get_next(
6418 &self,
6419 ___deadline: zx::MonotonicInstant,
6420 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6421 let _response = self.client.send_query::<
6422 fidl::encoding::EmptyPayload,
6423 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6424 >(
6425 (),
6426 0x3ba664a1c2e45a7,
6427 fidl::encoding::DynamicFlags::empty(),
6428 ___deadline,
6429 )?;
6430 Ok(_response.map(|x| (x.attributes, x.last)))
6431 }
6432}
6433
6434#[cfg(target_os = "fuchsia")]
6435impl From<ExtendedAttributeIteratorSynchronousProxy> for zx::Handle {
6436 fn from(value: ExtendedAttributeIteratorSynchronousProxy) -> Self {
6437 value.into_channel().into()
6438 }
6439}
6440
6441#[cfg(target_os = "fuchsia")]
6442impl From<fidl::Channel> for ExtendedAttributeIteratorSynchronousProxy {
6443 fn from(value: fidl::Channel) -> Self {
6444 Self::new(value)
6445 }
6446}
6447
6448#[derive(Debug, Clone)]
6449pub struct ExtendedAttributeIteratorProxy {
6450 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6451}
6452
6453impl fidl::endpoints::Proxy for ExtendedAttributeIteratorProxy {
6454 type Protocol = ExtendedAttributeIteratorMarker;
6455
6456 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6457 Self::new(inner)
6458 }
6459
6460 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6461 self.client.into_channel().map_err(|client| Self { client })
6462 }
6463
6464 fn as_channel(&self) -> &::fidl::AsyncChannel {
6465 self.client.as_channel()
6466 }
6467}
6468
6469impl ExtendedAttributeIteratorProxy {
6470 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6472 let protocol_name =
6473 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6474 Self { client: fidl::client::Client::new(channel, protocol_name) }
6475 }
6476
6477 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
6483 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6484 }
6485
6486 pub fn r#get_next(
6490 &self,
6491 ) -> fidl::client::QueryResponseFut<
6492 ExtendedAttributeIteratorGetNextResult,
6493 fidl::encoding::DefaultFuchsiaResourceDialect,
6494 > {
6495 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
6496 }
6497}
6498
6499impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
6500 type GetNextResponseFut = fidl::client::QueryResponseFut<
6501 ExtendedAttributeIteratorGetNextResult,
6502 fidl::encoding::DefaultFuchsiaResourceDialect,
6503 >;
6504 fn r#get_next(&self) -> Self::GetNextResponseFut {
6505 fn _decode(
6506 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6507 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6508 let _response = fidl::client::decode_transaction_body::<
6509 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6510 fidl::encoding::DefaultFuchsiaResourceDialect,
6511 0x3ba664a1c2e45a7,
6512 >(_buf?)?;
6513 Ok(_response.map(|x| (x.attributes, x.last)))
6514 }
6515 self.client.send_query_and_decode::<
6516 fidl::encoding::EmptyPayload,
6517 ExtendedAttributeIteratorGetNextResult,
6518 >(
6519 (),
6520 0x3ba664a1c2e45a7,
6521 fidl::encoding::DynamicFlags::empty(),
6522 _decode,
6523 )
6524 }
6525}
6526
6527pub struct ExtendedAttributeIteratorEventStream {
6528 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6529}
6530
6531impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
6532
6533impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
6534 fn is_terminated(&self) -> bool {
6535 self.event_receiver.is_terminated()
6536 }
6537}
6538
6539impl futures::Stream for ExtendedAttributeIteratorEventStream {
6540 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
6541
6542 fn poll_next(
6543 mut self: std::pin::Pin<&mut Self>,
6544 cx: &mut std::task::Context<'_>,
6545 ) -> std::task::Poll<Option<Self::Item>> {
6546 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6547 &mut self.event_receiver,
6548 cx
6549 )?) {
6550 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
6551 None => std::task::Poll::Ready(None),
6552 }
6553 }
6554}
6555
6556#[derive(Debug)]
6557pub enum ExtendedAttributeIteratorEvent {}
6558
6559impl ExtendedAttributeIteratorEvent {
6560 fn decode(
6562 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6563 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6564 let (bytes, _handles) = buf.split_mut();
6565 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6566 debug_assert_eq!(tx_header.tx_id, 0);
6567 match tx_header.ordinal {
6568 _ => Err(fidl::Error::UnknownOrdinal {
6569 ordinal: tx_header.ordinal,
6570 protocol_name:
6571 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6572 }),
6573 }
6574 }
6575}
6576
6577pub struct ExtendedAttributeIteratorRequestStream {
6579 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6580 is_terminated: bool,
6581}
6582
6583impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
6584
6585impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
6586 fn is_terminated(&self) -> bool {
6587 self.is_terminated
6588 }
6589}
6590
6591impl fidl::endpoints::RequestStream for ExtendedAttributeIteratorRequestStream {
6592 type Protocol = ExtendedAttributeIteratorMarker;
6593 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6594
6595 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6596 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6597 }
6598
6599 fn control_handle(&self) -> Self::ControlHandle {
6600 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
6601 }
6602
6603 fn into_inner(
6604 self,
6605 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6606 {
6607 (self.inner, self.is_terminated)
6608 }
6609
6610 fn from_inner(
6611 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6612 is_terminated: bool,
6613 ) -> Self {
6614 Self { inner, is_terminated }
6615 }
6616}
6617
6618impl futures::Stream for ExtendedAttributeIteratorRequestStream {
6619 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
6620
6621 fn poll_next(
6622 mut self: std::pin::Pin<&mut Self>,
6623 cx: &mut std::task::Context<'_>,
6624 ) -> std::task::Poll<Option<Self::Item>> {
6625 let this = &mut *self;
6626 if this.inner.check_shutdown(cx) {
6627 this.is_terminated = true;
6628 return std::task::Poll::Ready(None);
6629 }
6630 if this.is_terminated {
6631 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
6632 }
6633 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6634 |bytes, handles| {
6635 match this.inner.channel().read_etc(cx, bytes, handles) {
6636 std::task::Poll::Ready(Ok(())) => {}
6637 std::task::Poll::Pending => return std::task::Poll::Pending,
6638 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6639 this.is_terminated = true;
6640 return std::task::Poll::Ready(None);
6641 }
6642 std::task::Poll::Ready(Err(e)) => {
6643 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6644 e.into(),
6645 ))))
6646 }
6647 }
6648
6649 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6651
6652 std::task::Poll::Ready(Some(match header.ordinal {
6653 0x3ba664a1c2e45a7 => {
6654 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6655 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
6656 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6657 let control_handle = ExtendedAttributeIteratorControlHandle {
6658 inner: this.inner.clone(),
6659 };
6660 Ok(ExtendedAttributeIteratorRequest::GetNext {
6661 responder: ExtendedAttributeIteratorGetNextResponder {
6662 control_handle: std::mem::ManuallyDrop::new(control_handle),
6663 tx_id: header.tx_id,
6664 },
6665 })
6666 }
6667 _ => Err(fidl::Error::UnknownOrdinal {
6668 ordinal: header.ordinal,
6669 protocol_name: <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6670 }),
6671 }))
6672 },
6673 )
6674 }
6675}
6676
6677#[derive(Debug)]
6678pub enum ExtendedAttributeIteratorRequest {
6679 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
6683}
6684
6685impl ExtendedAttributeIteratorRequest {
6686 #[allow(irrefutable_let_patterns)]
6687 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
6688 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
6689 Some((responder))
6690 } else {
6691 None
6692 }
6693 }
6694
6695 pub fn method_name(&self) -> &'static str {
6697 match *self {
6698 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
6699 }
6700 }
6701}
6702
6703#[derive(Debug, Clone)]
6704pub struct ExtendedAttributeIteratorControlHandle {
6705 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6706}
6707
6708impl fidl::endpoints::ControlHandle for ExtendedAttributeIteratorControlHandle {
6709 fn shutdown(&self) {
6710 self.inner.shutdown()
6711 }
6712 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6713 self.inner.shutdown_with_epitaph(status)
6714 }
6715
6716 fn is_closed(&self) -> bool {
6717 self.inner.channel().is_closed()
6718 }
6719 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6720 self.inner.channel().on_closed()
6721 }
6722
6723 #[cfg(target_os = "fuchsia")]
6724 fn signal_peer(
6725 &self,
6726 clear_mask: zx::Signals,
6727 set_mask: zx::Signals,
6728 ) -> Result<(), zx_status::Status> {
6729 use fidl::Peered;
6730 self.inner.channel().signal_peer(clear_mask, set_mask)
6731 }
6732}
6733
6734impl ExtendedAttributeIteratorControlHandle {}
6735
6736#[must_use = "FIDL methods require a response to be sent"]
6737#[derive(Debug)]
6738pub struct ExtendedAttributeIteratorGetNextResponder {
6739 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
6740 tx_id: u32,
6741}
6742
6743impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
6747 fn drop(&mut self) {
6748 self.control_handle.shutdown();
6749 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6751 }
6752}
6753
6754impl fidl::endpoints::Responder for ExtendedAttributeIteratorGetNextResponder {
6755 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6756
6757 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
6758 &self.control_handle
6759 }
6760
6761 fn drop_without_shutdown(mut self) {
6762 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6764 std::mem::forget(self);
6766 }
6767}
6768
6769impl ExtendedAttributeIteratorGetNextResponder {
6770 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6774 let _result = self.send_raw(result);
6775 if _result.is_err() {
6776 self.control_handle.shutdown();
6777 }
6778 self.drop_without_shutdown();
6779 _result
6780 }
6781
6782 pub fn send_no_shutdown_on_err(
6784 self,
6785 mut result: Result<(&[Vec<u8>], bool), i32>,
6786 ) -> Result<(), fidl::Error> {
6787 let _result = self.send_raw(result);
6788 self.drop_without_shutdown();
6789 _result
6790 }
6791
6792 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6793 self.control_handle.inner.send::<fidl::encoding::ResultType<
6794 ExtendedAttributeIteratorGetNextResponse,
6795 i32,
6796 >>(
6797 result,
6798 self.tx_id,
6799 0x3ba664a1c2e45a7,
6800 fidl::encoding::DynamicFlags::empty(),
6801 )
6802 }
6803}
6804
6805#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6806pub struct FileMarker;
6807
6808impl fidl::endpoints::ProtocolMarker for FileMarker {
6809 type Proxy = FileProxy;
6810 type RequestStream = FileRequestStream;
6811 #[cfg(target_os = "fuchsia")]
6812 type SynchronousProxy = FileSynchronousProxy;
6813
6814 const DEBUG_NAME: &'static str = "fuchsia.io.File";
6815}
6816impl fidl::endpoints::DiscoverableProtocolMarker for FileMarker {}
6817pub type FileSeekResult = Result<u64, i32>;
6818pub type FileReadAtResult = Result<Vec<u8>, i32>;
6819pub type FileWriteAtResult = Result<u64, i32>;
6820pub type FileResizeResult = Result<(), i32>;
6821pub type FileGetBackingMemoryResult = Result<fidl::Vmo, i32>;
6822pub type FileAllocateResult = Result<(), i32>;
6823pub type FileEnableVerityResult = Result<(), i32>;
6824
6825pub trait FileProxyInterface: Send + Sync {
6826 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
6827 + Send;
6828 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
6829 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
6830 + Send;
6831 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
6832 fn r#clone(
6833 &self,
6834 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
6835 ) -> Result<(), fidl::Error>;
6836 type CloseResponseFut: std::future::Future<
6837 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
6838 > + Send;
6839 fn r#close(&self) -> Self::CloseResponseFut;
6840 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
6841 fn r#query(&self) -> Self::QueryResponseFut;
6842 fn r#deprecated_clone(
6843 &self,
6844 flags: OpenFlags,
6845 object: fidl::endpoints::ServerEnd<NodeMarker>,
6846 ) -> Result<(), fidl::Error>;
6847 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
6848 + Send;
6849 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
6850 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6851 fn r#deprecated_set_attr(
6852 &self,
6853 flags: NodeAttributeFlags,
6854 attributes: &NodeAttributes,
6855 ) -> Self::DeprecatedSetAttrResponseFut;
6856 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
6857 + Send;
6858 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
6859 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
6860 + Send;
6861 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
6862 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
6863 + Send;
6864 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
6865 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
6866 + Send;
6867 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
6868 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
6869 + Send;
6870 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
6871 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
6872 + Send;
6873 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
6874 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
6875 + Send;
6876 fn r#update_attributes(
6877 &self,
6878 payload: &MutableNodeAttributes,
6879 ) -> Self::UpdateAttributesResponseFut;
6880 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
6881 fn r#sync(&self) -> Self::SyncResponseFut;
6882 fn r#list_extended_attributes(
6883 &self,
6884 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
6885 ) -> Result<(), fidl::Error>;
6886 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
6887 + Send;
6888 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
6889 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
6890 + Send;
6891 fn r#set_extended_attribute(
6892 &self,
6893 name: &[u8],
6894 value: ExtendedAttributeValue,
6895 mode: SetExtendedAttributeMode,
6896 ) -> Self::SetExtendedAttributeResponseFut;
6897 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
6898 + Send;
6899 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
6900 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
6901 + Send;
6902 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
6903 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
6904 + Send;
6905 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
6906 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
6907 fn r#describe(&self) -> Self::DescribeResponseFut;
6908 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
6909 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
6910 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
6911 + Send;
6912 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
6913 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
6914 + Send;
6915 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
6916 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
6917 + Send;
6918 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
6919 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
6920 + Send;
6921 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
6922 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
6923 + Send;
6924 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
6925 -> Self::AllocateResponseFut;
6926 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
6927 + Send;
6928 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
6929}
6930#[derive(Debug)]
6931#[cfg(target_os = "fuchsia")]
6932pub struct FileSynchronousProxy {
6933 client: fidl::client::sync::Client,
6934}
6935
6936#[cfg(target_os = "fuchsia")]
6937impl fidl::endpoints::SynchronousProxy for FileSynchronousProxy {
6938 type Proxy = FileProxy;
6939 type Protocol = FileMarker;
6940
6941 fn from_channel(inner: fidl::Channel) -> Self {
6942 Self::new(inner)
6943 }
6944
6945 fn into_channel(self) -> fidl::Channel {
6946 self.client.into_channel()
6947 }
6948
6949 fn as_channel(&self) -> &fidl::Channel {
6950 self.client.as_channel()
6951 }
6952}
6953
6954#[cfg(target_os = "fuchsia")]
6955impl FileSynchronousProxy {
6956 pub fn new(channel: fidl::Channel) -> Self {
6957 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6958 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6959 }
6960
6961 pub fn into_channel(self) -> fidl::Channel {
6962 self.client.into_channel()
6963 }
6964
6965 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<FileEvent, fidl::Error> {
6968 FileEvent::decode(self.client.wait_for_event(deadline)?)
6969 }
6970
6971 pub fn r#advisory_lock(
6995 &self,
6996 mut request: &AdvisoryLockRequest,
6997 ___deadline: zx::MonotonicInstant,
6998 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6999 let _response = self.client.send_query::<
7000 AdvisoryLockingAdvisoryLockRequest,
7001 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7002 >(
7003 (request,),
7004 0x6ee9c0ad53ec87aa,
7005 fidl::encoding::DynamicFlags::empty(),
7006 ___deadline,
7007 )?;
7008 Ok(_response.map(|x| x))
7009 }
7010
7011 pub fn r#link_into(
7034 &self,
7035 mut dst_parent_token: fidl::Event,
7036 mut dst: &str,
7037 ___deadline: zx::MonotonicInstant,
7038 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
7039 let _response = self.client.send_query::<
7040 LinkableLinkIntoRequest,
7041 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7042 >(
7043 (dst_parent_token, dst,),
7044 0x54f3949246a03e74,
7045 fidl::encoding::DynamicFlags::empty(),
7046 ___deadline,
7047 )?;
7048 Ok(_response.map(|x| x))
7049 }
7050
7051 pub fn r#clone(
7052 &self,
7053 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7054 ) -> Result<(), fidl::Error> {
7055 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
7056 (request,),
7057 0x20d8a7aba2168a79,
7058 fidl::encoding::DynamicFlags::empty(),
7059 )
7060 }
7061
7062 pub fn r#close(
7073 &self,
7074 ___deadline: zx::MonotonicInstant,
7075 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
7076 let _response = self.client.send_query::<
7077 fidl::encoding::EmptyPayload,
7078 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7079 >(
7080 (),
7081 0x5ac5d459ad7f657e,
7082 fidl::encoding::DynamicFlags::empty(),
7083 ___deadline,
7084 )?;
7085 Ok(_response.map(|x| x))
7086 }
7087
7088 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
7089 let _response = self.client.send_query::<
7090 fidl::encoding::EmptyPayload,
7091 fidl_fuchsia_unknown::QueryableQueryResponse,
7092 >(
7093 (),
7094 0x2658edee9decfc06,
7095 fidl::encoding::DynamicFlags::empty(),
7096 ___deadline,
7097 )?;
7098 Ok(_response.protocol)
7099 }
7100
7101 pub fn r#deprecated_clone(
7103 &self,
7104 mut flags: OpenFlags,
7105 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7106 ) -> Result<(), fidl::Error> {
7107 self.client.send::<NodeDeprecatedCloneRequest>(
7108 (flags, object),
7109 0x5a61678f293ce16f,
7110 fidl::encoding::DynamicFlags::FLEXIBLE,
7111 )
7112 }
7113
7114 pub fn r#deprecated_get_attr(
7116 &self,
7117 ___deadline: zx::MonotonicInstant,
7118 ) -> Result<(i32, NodeAttributes), fidl::Error> {
7119 let _response =
7120 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
7121 (),
7122 0x78985e216314dafd,
7123 fidl::encoding::DynamicFlags::empty(),
7124 ___deadline,
7125 )?;
7126 Ok((_response.s, _response.attributes))
7127 }
7128
7129 pub fn r#deprecated_set_attr(
7131 &self,
7132 mut flags: NodeAttributeFlags,
7133 mut attributes: &NodeAttributes,
7134 ___deadline: zx::MonotonicInstant,
7135 ) -> Result<i32, fidl::Error> {
7136 let _response =
7137 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
7138 (flags, attributes),
7139 0x4186c0f40d938f46,
7140 fidl::encoding::DynamicFlags::empty(),
7141 ___deadline,
7142 )?;
7143 Ok(_response.s)
7144 }
7145
7146 pub fn r#deprecated_get_flags(
7148 &self,
7149 ___deadline: zx::MonotonicInstant,
7150 ) -> Result<(i32, OpenFlags), fidl::Error> {
7151 let _response = self
7152 .client
7153 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
7154 (),
7155 0x5b88fffb8eda3aa1,
7156 fidl::encoding::DynamicFlags::empty(),
7157 ___deadline,
7158 )?;
7159 Ok((_response.s, _response.flags))
7160 }
7161
7162 pub fn r#deprecated_set_flags(
7164 &self,
7165 mut flags: OpenFlags,
7166 ___deadline: zx::MonotonicInstant,
7167 ) -> Result<i32, fidl::Error> {
7168 let _response = self
7169 .client
7170 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
7171 (flags,),
7172 0x5295b76c71fde733,
7173 fidl::encoding::DynamicFlags::empty(),
7174 ___deadline,
7175 )?;
7176 Ok(_response.s)
7177 }
7178
7179 pub fn r#get_flags(
7188 &self,
7189 ___deadline: zx::MonotonicInstant,
7190 ) -> Result<NodeGetFlagsResult, fidl::Error> {
7191 let _response = self.client.send_query::<
7192 fidl::encoding::EmptyPayload,
7193 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
7194 >(
7195 (),
7196 0x176eb318f64ec23,
7197 fidl::encoding::DynamicFlags::FLEXIBLE,
7198 ___deadline,
7199 )?
7200 .into_result::<FileMarker>("get_flags")?;
7201 Ok(_response.map(|x| x.flags))
7202 }
7203
7204 pub fn r#set_flags(
7214 &self,
7215 mut flags: Flags,
7216 ___deadline: zx::MonotonicInstant,
7217 ) -> Result<NodeSetFlagsResult, fidl::Error> {
7218 let _response = self.client.send_query::<
7219 NodeSetFlagsRequest,
7220 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7221 >(
7222 (flags,),
7223 0x55a8028685791ea8,
7224 fidl::encoding::DynamicFlags::FLEXIBLE,
7225 ___deadline,
7226 )?
7227 .into_result::<FileMarker>("set_flags")?;
7228 Ok(_response.map(|x| x))
7229 }
7230
7231 pub fn r#query_filesystem(
7233 &self,
7234 ___deadline: zx::MonotonicInstant,
7235 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
7236 let _response =
7237 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
7238 (),
7239 0x6f344a1c6b0a0610,
7240 fidl::encoding::DynamicFlags::empty(),
7241 ___deadline,
7242 )?;
7243 Ok((_response.s, _response.info))
7244 }
7245
7246 pub fn r#get_attributes(
7260 &self,
7261 mut query: NodeAttributesQuery,
7262 ___deadline: zx::MonotonicInstant,
7263 ) -> Result<NodeGetAttributesResult, fidl::Error> {
7264 let _response = self.client.send_query::<
7265 NodeGetAttributesRequest,
7266 fidl::encoding::ResultType<NodeAttributes2, i32>,
7267 >(
7268 (query,),
7269 0x3d4396a638ea053b,
7270 fidl::encoding::DynamicFlags::empty(),
7271 ___deadline,
7272 )?;
7273 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
7274 }
7275
7276 pub fn r#update_attributes(
7285 &self,
7286 mut payload: &MutableNodeAttributes,
7287 ___deadline: zx::MonotonicInstant,
7288 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
7289 let _response = self.client.send_query::<
7290 MutableNodeAttributes,
7291 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7292 >(
7293 payload,
7294 0x3308c1da5a89bf08,
7295 fidl::encoding::DynamicFlags::empty(),
7296 ___deadline,
7297 )?;
7298 Ok(_response.map(|x| x))
7299 }
7300
7301 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
7311 let _response = self.client.send_query::<
7312 fidl::encoding::EmptyPayload,
7313 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7314 >(
7315 (),
7316 0x2c5c27ca0ab5dc49,
7317 fidl::encoding::DynamicFlags::empty(),
7318 ___deadline,
7319 )?;
7320 Ok(_response.map(|x| x))
7321 }
7322
7323 pub fn r#list_extended_attributes(
7332 &self,
7333 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7334 ) -> Result<(), fidl::Error> {
7335 self.client.send::<NodeListExtendedAttributesRequest>(
7336 (iterator,),
7337 0x4b61033de007fcd0,
7338 fidl::encoding::DynamicFlags::empty(),
7339 )
7340 }
7341
7342 pub fn r#get_extended_attribute(
7349 &self,
7350 mut name: &[u8],
7351 ___deadline: zx::MonotonicInstant,
7352 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
7353 let _response = self.client.send_query::<
7354 NodeGetExtendedAttributeRequest,
7355 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
7356 >(
7357 (name,),
7358 0x45ffa3ccfdeb76db,
7359 fidl::encoding::DynamicFlags::empty(),
7360 ___deadline,
7361 )?;
7362 Ok(_response.map(|x| x))
7363 }
7364
7365 pub fn r#set_extended_attribute(
7373 &self,
7374 mut name: &[u8],
7375 mut value: ExtendedAttributeValue,
7376 mut mode: SetExtendedAttributeMode,
7377 ___deadline: zx::MonotonicInstant,
7378 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
7379 let _response = self.client.send_query::<
7380 NodeSetExtendedAttributeRequest,
7381 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7382 >(
7383 (name, &mut value, mode,),
7384 0x4a951362f681f23c,
7385 fidl::encoding::DynamicFlags::empty(),
7386 ___deadline,
7387 )?;
7388 Ok(_response.map(|x| x))
7389 }
7390
7391 pub fn r#remove_extended_attribute(
7397 &self,
7398 mut name: &[u8],
7399 ___deadline: zx::MonotonicInstant,
7400 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
7401 let _response = self.client.send_query::<
7402 NodeRemoveExtendedAttributeRequest,
7403 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7404 >(
7405 (name,),
7406 0x7a0b9f3a9bf9032d,
7407 fidl::encoding::DynamicFlags::empty(),
7408 ___deadline,
7409 )?;
7410 Ok(_response.map(|x| x))
7411 }
7412
7413 pub fn r#read(
7432 &self,
7433 mut count: u64,
7434 ___deadline: zx::MonotonicInstant,
7435 ) -> Result<ReadableReadResult, fidl::Error> {
7436 let _response = self.client.send_query::<
7437 ReadableReadRequest,
7438 fidl::encoding::ResultType<ReadableReadResponse, i32>,
7439 >(
7440 (count,),
7441 0x57e419a298c8ede,
7442 fidl::encoding::DynamicFlags::empty(),
7443 ___deadline,
7444 )?;
7445 Ok(_response.map(|x| x.data))
7446 }
7447
7448 pub fn r#write(
7472 &self,
7473 mut data: &[u8],
7474 ___deadline: zx::MonotonicInstant,
7475 ) -> Result<WritableWriteResult, fidl::Error> {
7476 let _response = self.client.send_query::<
7477 WritableWriteRequest,
7478 fidl::encoding::ResultType<WritableWriteResponse, i32>,
7479 >(
7480 (data,),
7481 0x6a31437832469f82,
7482 fidl::encoding::DynamicFlags::empty(),
7483 ___deadline,
7484 )?;
7485 Ok(_response.map(|x| x.actual_count))
7486 }
7487
7488 pub fn r#describe(&self, ___deadline: zx::MonotonicInstant) -> Result<FileInfo, fidl::Error> {
7489 let _response = self.client.send_query::<fidl::encoding::EmptyPayload, FileInfo>(
7490 (),
7491 0x68b5ac00c62906bc,
7492 fidl::encoding::DynamicFlags::empty(),
7493 ___deadline,
7494 )?;
7495 Ok(_response)
7496 }
7497
7498 pub fn r#seek(
7508 &self,
7509 mut origin: SeekOrigin,
7510 mut offset: i64,
7511 ___deadline: zx::MonotonicInstant,
7512 ) -> Result<FileSeekResult, fidl::Error> {
7513 let _response = self
7514 .client
7515 .send_query::<FileSeekRequest, fidl::encoding::ResultType<FileSeekResponse, i32>>(
7516 (origin, offset),
7517 0x78079168162c5207,
7518 fidl::encoding::DynamicFlags::empty(),
7519 ___deadline,
7520 )?;
7521 Ok(_response.map(|x| x.offset_from_start))
7522 }
7523
7524 pub fn r#read_at(
7542 &self,
7543 mut count: u64,
7544 mut offset: u64,
7545 ___deadline: zx::MonotonicInstant,
7546 ) -> Result<FileReadAtResult, fidl::Error> {
7547 let _response = self
7548 .client
7549 .send_query::<FileReadAtRequest, fidl::encoding::ResultType<FileReadAtResponse, i32>>(
7550 (count, offset),
7551 0x1607a293a60d723e,
7552 fidl::encoding::DynamicFlags::empty(),
7553 ___deadline,
7554 )?;
7555 Ok(_response.map(|x| x.data))
7556 }
7557
7558 pub fn r#write_at(
7580 &self,
7581 mut data: &[u8],
7582 mut offset: u64,
7583 ___deadline: zx::MonotonicInstant,
7584 ) -> Result<FileWriteAtResult, fidl::Error> {
7585 let _response = self
7586 .client
7587 .send_query::<FileWriteAtRequest, fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
7588 (data, offset),
7589 0x793eefc0045e792b,
7590 fidl::encoding::DynamicFlags::empty(),
7591 ___deadline,
7592 )?;
7593 Ok(_response.map(|x| x.actual_count))
7594 }
7595
7596 pub fn r#resize(
7605 &self,
7606 mut length: u64,
7607 ___deadline: zx::MonotonicInstant,
7608 ) -> Result<FileResizeResult, fidl::Error> {
7609 let _response = self.client.send_query::<
7610 FileResizeRequest,
7611 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7612 >(
7613 (length,),
7614 0x2b80825f0535743a,
7615 fidl::encoding::DynamicFlags::empty(),
7616 ___deadline,
7617 )?;
7618 Ok(_response.map(|x| x))
7619 }
7620
7621 pub fn r#get_backing_memory(
7642 &self,
7643 mut flags: VmoFlags,
7644 ___deadline: zx::MonotonicInstant,
7645 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7646 let _response = self.client.send_query::<
7647 FileGetBackingMemoryRequest,
7648 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7649 >(
7650 (flags,),
7651 0xa6a9e654cbf62b,
7652 fidl::encoding::DynamicFlags::empty(),
7653 ___deadline,
7654 )?;
7655 Ok(_response.map(|x| x.vmo))
7656 }
7657
7658 pub fn r#allocate(
7660 &self,
7661 mut offset: u64,
7662 mut length: u64,
7663 mut mode: AllocateMode,
7664 ___deadline: zx::MonotonicInstant,
7665 ) -> Result<FileAllocateResult, fidl::Error> {
7666 let _response = self.client.send_query::<
7667 FileAllocateRequest,
7668 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7669 >(
7670 (offset, length, mode,),
7671 0x77fa0c330b57fd2e,
7672 fidl::encoding::DynamicFlags::FLEXIBLE,
7673 ___deadline,
7674 )?
7675 .into_result::<FileMarker>("allocate")?;
7676 Ok(_response.map(|x| x))
7677 }
7678
7679 pub fn r#enable_verity(
7691 &self,
7692 mut options: &VerificationOptions,
7693 ___deadline: zx::MonotonicInstant,
7694 ) -> Result<FileEnableVerityResult, fidl::Error> {
7695 let _response = self.client.send_query::<
7696 FileEnableVerityRequest,
7697 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7698 >(
7699 (options,),
7700 0x2c421ec3faaeb8bb,
7701 fidl::encoding::DynamicFlags::FLEXIBLE,
7702 ___deadline,
7703 )?
7704 .into_result::<FileMarker>("enable_verity")?;
7705 Ok(_response.map(|x| x))
7706 }
7707}
7708
7709#[cfg(target_os = "fuchsia")]
7710impl From<FileSynchronousProxy> for zx::Handle {
7711 fn from(value: FileSynchronousProxy) -> Self {
7712 value.into_channel().into()
7713 }
7714}
7715
7716#[cfg(target_os = "fuchsia")]
7717impl From<fidl::Channel> for FileSynchronousProxy {
7718 fn from(value: fidl::Channel) -> Self {
7719 Self::new(value)
7720 }
7721}
7722
7723#[derive(Debug, Clone)]
7724pub struct FileProxy {
7725 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7726}
7727
7728impl fidl::endpoints::Proxy for FileProxy {
7729 type Protocol = FileMarker;
7730
7731 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7732 Self::new(inner)
7733 }
7734
7735 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7736 self.client.into_channel().map_err(|client| Self { client })
7737 }
7738
7739 fn as_channel(&self) -> &::fidl::AsyncChannel {
7740 self.client.as_channel()
7741 }
7742}
7743
7744impl FileProxy {
7745 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7747 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7748 Self { client: fidl::client::Client::new(channel, protocol_name) }
7749 }
7750
7751 pub fn take_event_stream(&self) -> FileEventStream {
7757 FileEventStream { event_receiver: self.client.take_event_receiver() }
7758 }
7759
7760 pub fn r#advisory_lock(
7784 &self,
7785 mut request: &AdvisoryLockRequest,
7786 ) -> fidl::client::QueryResponseFut<
7787 AdvisoryLockingAdvisoryLockResult,
7788 fidl::encoding::DefaultFuchsiaResourceDialect,
7789 > {
7790 FileProxyInterface::r#advisory_lock(self, request)
7791 }
7792
7793 pub fn r#link_into(
7816 &self,
7817 mut dst_parent_token: fidl::Event,
7818 mut dst: &str,
7819 ) -> fidl::client::QueryResponseFut<
7820 LinkableLinkIntoResult,
7821 fidl::encoding::DefaultFuchsiaResourceDialect,
7822 > {
7823 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
7824 }
7825
7826 pub fn r#clone(
7827 &self,
7828 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7829 ) -> Result<(), fidl::Error> {
7830 FileProxyInterface::r#clone(self, request)
7831 }
7832
7833 pub fn r#close(
7844 &self,
7845 ) -> fidl::client::QueryResponseFut<
7846 fidl_fuchsia_unknown::CloseableCloseResult,
7847 fidl::encoding::DefaultFuchsiaResourceDialect,
7848 > {
7849 FileProxyInterface::r#close(self)
7850 }
7851
7852 pub fn r#query(
7853 &self,
7854 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
7855 {
7856 FileProxyInterface::r#query(self)
7857 }
7858
7859 pub fn r#deprecated_clone(
7861 &self,
7862 mut flags: OpenFlags,
7863 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7864 ) -> Result<(), fidl::Error> {
7865 FileProxyInterface::r#deprecated_clone(self, flags, object)
7866 }
7867
7868 pub fn r#deprecated_get_attr(
7870 &self,
7871 ) -> fidl::client::QueryResponseFut<
7872 (i32, NodeAttributes),
7873 fidl::encoding::DefaultFuchsiaResourceDialect,
7874 > {
7875 FileProxyInterface::r#deprecated_get_attr(self)
7876 }
7877
7878 pub fn r#deprecated_set_attr(
7880 &self,
7881 mut flags: NodeAttributeFlags,
7882 mut attributes: &NodeAttributes,
7883 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7884 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
7885 }
7886
7887 pub fn r#deprecated_get_flags(
7889 &self,
7890 ) -> fidl::client::QueryResponseFut<
7891 (i32, OpenFlags),
7892 fidl::encoding::DefaultFuchsiaResourceDialect,
7893 > {
7894 FileProxyInterface::r#deprecated_get_flags(self)
7895 }
7896
7897 pub fn r#deprecated_set_flags(
7899 &self,
7900 mut flags: OpenFlags,
7901 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7902 FileProxyInterface::r#deprecated_set_flags(self, flags)
7903 }
7904
7905 pub fn r#get_flags(
7914 &self,
7915 ) -> fidl::client::QueryResponseFut<
7916 NodeGetFlagsResult,
7917 fidl::encoding::DefaultFuchsiaResourceDialect,
7918 > {
7919 FileProxyInterface::r#get_flags(self)
7920 }
7921
7922 pub fn r#set_flags(
7932 &self,
7933 mut flags: Flags,
7934 ) -> fidl::client::QueryResponseFut<
7935 NodeSetFlagsResult,
7936 fidl::encoding::DefaultFuchsiaResourceDialect,
7937 > {
7938 FileProxyInterface::r#set_flags(self, flags)
7939 }
7940
7941 pub fn r#query_filesystem(
7943 &self,
7944 ) -> fidl::client::QueryResponseFut<
7945 (i32, Option<Box<FilesystemInfo>>),
7946 fidl::encoding::DefaultFuchsiaResourceDialect,
7947 > {
7948 FileProxyInterface::r#query_filesystem(self)
7949 }
7950
7951 pub fn r#get_attributes(
7965 &self,
7966 mut query: NodeAttributesQuery,
7967 ) -> fidl::client::QueryResponseFut<
7968 NodeGetAttributesResult,
7969 fidl::encoding::DefaultFuchsiaResourceDialect,
7970 > {
7971 FileProxyInterface::r#get_attributes(self, query)
7972 }
7973
7974 pub fn r#update_attributes(
7983 &self,
7984 mut payload: &MutableNodeAttributes,
7985 ) -> fidl::client::QueryResponseFut<
7986 NodeUpdateAttributesResult,
7987 fidl::encoding::DefaultFuchsiaResourceDialect,
7988 > {
7989 FileProxyInterface::r#update_attributes(self, payload)
7990 }
7991
7992 pub fn r#sync(
8002 &self,
8003 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8004 {
8005 FileProxyInterface::r#sync(self)
8006 }
8007
8008 pub fn r#list_extended_attributes(
8017 &self,
8018 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8019 ) -> Result<(), fidl::Error> {
8020 FileProxyInterface::r#list_extended_attributes(self, iterator)
8021 }
8022
8023 pub fn r#get_extended_attribute(
8030 &self,
8031 mut name: &[u8],
8032 ) -> fidl::client::QueryResponseFut<
8033 NodeGetExtendedAttributeResult,
8034 fidl::encoding::DefaultFuchsiaResourceDialect,
8035 > {
8036 FileProxyInterface::r#get_extended_attribute(self, name)
8037 }
8038
8039 pub fn r#set_extended_attribute(
8047 &self,
8048 mut name: &[u8],
8049 mut value: ExtendedAttributeValue,
8050 mut mode: SetExtendedAttributeMode,
8051 ) -> fidl::client::QueryResponseFut<
8052 NodeSetExtendedAttributeResult,
8053 fidl::encoding::DefaultFuchsiaResourceDialect,
8054 > {
8055 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
8056 }
8057
8058 pub fn r#remove_extended_attribute(
8064 &self,
8065 mut name: &[u8],
8066 ) -> fidl::client::QueryResponseFut<
8067 NodeRemoveExtendedAttributeResult,
8068 fidl::encoding::DefaultFuchsiaResourceDialect,
8069 > {
8070 FileProxyInterface::r#remove_extended_attribute(self, name)
8071 }
8072
8073 pub fn r#read(
8092 &self,
8093 mut count: u64,
8094 ) -> fidl::client::QueryResponseFut<
8095 ReadableReadResult,
8096 fidl::encoding::DefaultFuchsiaResourceDialect,
8097 > {
8098 FileProxyInterface::r#read(self, count)
8099 }
8100
8101 pub fn r#write(
8125 &self,
8126 mut data: &[u8],
8127 ) -> fidl::client::QueryResponseFut<
8128 WritableWriteResult,
8129 fidl::encoding::DefaultFuchsiaResourceDialect,
8130 > {
8131 FileProxyInterface::r#write(self, data)
8132 }
8133
8134 pub fn r#describe(
8135 &self,
8136 ) -> fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
8137 {
8138 FileProxyInterface::r#describe(self)
8139 }
8140
8141 pub fn r#seek(
8151 &self,
8152 mut origin: SeekOrigin,
8153 mut offset: i64,
8154 ) -> fidl::client::QueryResponseFut<FileSeekResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8155 {
8156 FileProxyInterface::r#seek(self, origin, offset)
8157 }
8158
8159 pub fn r#read_at(
8177 &self,
8178 mut count: u64,
8179 mut offset: u64,
8180 ) -> fidl::client::QueryResponseFut<
8181 FileReadAtResult,
8182 fidl::encoding::DefaultFuchsiaResourceDialect,
8183 > {
8184 FileProxyInterface::r#read_at(self, count, offset)
8185 }
8186
8187 pub fn r#write_at(
8209 &self,
8210 mut data: &[u8],
8211 mut offset: u64,
8212 ) -> fidl::client::QueryResponseFut<
8213 FileWriteAtResult,
8214 fidl::encoding::DefaultFuchsiaResourceDialect,
8215 > {
8216 FileProxyInterface::r#write_at(self, data, offset)
8217 }
8218
8219 pub fn r#resize(
8228 &self,
8229 mut length: u64,
8230 ) -> fidl::client::QueryResponseFut<
8231 FileResizeResult,
8232 fidl::encoding::DefaultFuchsiaResourceDialect,
8233 > {
8234 FileProxyInterface::r#resize(self, length)
8235 }
8236
8237 pub fn r#get_backing_memory(
8258 &self,
8259 mut flags: VmoFlags,
8260 ) -> fidl::client::QueryResponseFut<
8261 FileGetBackingMemoryResult,
8262 fidl::encoding::DefaultFuchsiaResourceDialect,
8263 > {
8264 FileProxyInterface::r#get_backing_memory(self, flags)
8265 }
8266
8267 pub fn r#allocate(
8269 &self,
8270 mut offset: u64,
8271 mut length: u64,
8272 mut mode: AllocateMode,
8273 ) -> fidl::client::QueryResponseFut<
8274 FileAllocateResult,
8275 fidl::encoding::DefaultFuchsiaResourceDialect,
8276 > {
8277 FileProxyInterface::r#allocate(self, offset, length, mode)
8278 }
8279
8280 pub fn r#enable_verity(
8292 &self,
8293 mut options: &VerificationOptions,
8294 ) -> fidl::client::QueryResponseFut<
8295 FileEnableVerityResult,
8296 fidl::encoding::DefaultFuchsiaResourceDialect,
8297 > {
8298 FileProxyInterface::r#enable_verity(self, options)
8299 }
8300}
8301
8302impl FileProxyInterface for FileProxy {
8303 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
8304 AdvisoryLockingAdvisoryLockResult,
8305 fidl::encoding::DefaultFuchsiaResourceDialect,
8306 >;
8307 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
8308 fn _decode(
8309 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8310 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
8311 let _response = fidl::client::decode_transaction_body::<
8312 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8313 fidl::encoding::DefaultFuchsiaResourceDialect,
8314 0x6ee9c0ad53ec87aa,
8315 >(_buf?)?;
8316 Ok(_response.map(|x| x))
8317 }
8318 self.client.send_query_and_decode::<
8319 AdvisoryLockingAdvisoryLockRequest,
8320 AdvisoryLockingAdvisoryLockResult,
8321 >(
8322 (request,),
8323 0x6ee9c0ad53ec87aa,
8324 fidl::encoding::DynamicFlags::empty(),
8325 _decode,
8326 )
8327 }
8328
8329 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
8330 LinkableLinkIntoResult,
8331 fidl::encoding::DefaultFuchsiaResourceDialect,
8332 >;
8333 fn r#link_into(
8334 &self,
8335 mut dst_parent_token: fidl::Event,
8336 mut dst: &str,
8337 ) -> Self::LinkIntoResponseFut {
8338 fn _decode(
8339 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8340 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
8341 let _response = fidl::client::decode_transaction_body::<
8342 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8343 fidl::encoding::DefaultFuchsiaResourceDialect,
8344 0x54f3949246a03e74,
8345 >(_buf?)?;
8346 Ok(_response.map(|x| x))
8347 }
8348 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
8349 (dst_parent_token, dst),
8350 0x54f3949246a03e74,
8351 fidl::encoding::DynamicFlags::empty(),
8352 _decode,
8353 )
8354 }
8355
8356 fn r#clone(
8357 &self,
8358 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8359 ) -> Result<(), fidl::Error> {
8360 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
8361 (request,),
8362 0x20d8a7aba2168a79,
8363 fidl::encoding::DynamicFlags::empty(),
8364 )
8365 }
8366
8367 type CloseResponseFut = fidl::client::QueryResponseFut<
8368 fidl_fuchsia_unknown::CloseableCloseResult,
8369 fidl::encoding::DefaultFuchsiaResourceDialect,
8370 >;
8371 fn r#close(&self) -> Self::CloseResponseFut {
8372 fn _decode(
8373 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8374 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
8375 let _response = fidl::client::decode_transaction_body::<
8376 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8377 fidl::encoding::DefaultFuchsiaResourceDialect,
8378 0x5ac5d459ad7f657e,
8379 >(_buf?)?;
8380 Ok(_response.map(|x| x))
8381 }
8382 self.client.send_query_and_decode::<
8383 fidl::encoding::EmptyPayload,
8384 fidl_fuchsia_unknown::CloseableCloseResult,
8385 >(
8386 (),
8387 0x5ac5d459ad7f657e,
8388 fidl::encoding::DynamicFlags::empty(),
8389 _decode,
8390 )
8391 }
8392
8393 type QueryResponseFut =
8394 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8395 fn r#query(&self) -> Self::QueryResponseFut {
8396 fn _decode(
8397 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8398 ) -> Result<Vec<u8>, fidl::Error> {
8399 let _response = fidl::client::decode_transaction_body::<
8400 fidl_fuchsia_unknown::QueryableQueryResponse,
8401 fidl::encoding::DefaultFuchsiaResourceDialect,
8402 0x2658edee9decfc06,
8403 >(_buf?)?;
8404 Ok(_response.protocol)
8405 }
8406 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
8407 (),
8408 0x2658edee9decfc06,
8409 fidl::encoding::DynamicFlags::empty(),
8410 _decode,
8411 )
8412 }
8413
8414 fn r#deprecated_clone(
8415 &self,
8416 mut flags: OpenFlags,
8417 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
8418 ) -> Result<(), fidl::Error> {
8419 self.client.send::<NodeDeprecatedCloneRequest>(
8420 (flags, object),
8421 0x5a61678f293ce16f,
8422 fidl::encoding::DynamicFlags::FLEXIBLE,
8423 )
8424 }
8425
8426 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
8427 (i32, NodeAttributes),
8428 fidl::encoding::DefaultFuchsiaResourceDialect,
8429 >;
8430 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
8431 fn _decode(
8432 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8433 ) -> Result<(i32, NodeAttributes), fidl::Error> {
8434 let _response = fidl::client::decode_transaction_body::<
8435 NodeDeprecatedGetAttrResponse,
8436 fidl::encoding::DefaultFuchsiaResourceDialect,
8437 0x78985e216314dafd,
8438 >(_buf?)?;
8439 Ok((_response.s, _response.attributes))
8440 }
8441 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
8442 (),
8443 0x78985e216314dafd,
8444 fidl::encoding::DynamicFlags::empty(),
8445 _decode,
8446 )
8447 }
8448
8449 type DeprecatedSetAttrResponseFut =
8450 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8451 fn r#deprecated_set_attr(
8452 &self,
8453 mut flags: NodeAttributeFlags,
8454 mut attributes: &NodeAttributes,
8455 ) -> Self::DeprecatedSetAttrResponseFut {
8456 fn _decode(
8457 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8458 ) -> Result<i32, fidl::Error> {
8459 let _response = fidl::client::decode_transaction_body::<
8460 NodeDeprecatedSetAttrResponse,
8461 fidl::encoding::DefaultFuchsiaResourceDialect,
8462 0x4186c0f40d938f46,
8463 >(_buf?)?;
8464 Ok(_response.s)
8465 }
8466 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
8467 (flags, attributes),
8468 0x4186c0f40d938f46,
8469 fidl::encoding::DynamicFlags::empty(),
8470 _decode,
8471 )
8472 }
8473
8474 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
8475 (i32, OpenFlags),
8476 fidl::encoding::DefaultFuchsiaResourceDialect,
8477 >;
8478 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
8479 fn _decode(
8480 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8481 ) -> Result<(i32, OpenFlags), fidl::Error> {
8482 let _response = fidl::client::decode_transaction_body::<
8483 NodeDeprecatedGetFlagsResponse,
8484 fidl::encoding::DefaultFuchsiaResourceDialect,
8485 0x5b88fffb8eda3aa1,
8486 >(_buf?)?;
8487 Ok((_response.s, _response.flags))
8488 }
8489 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
8490 (),
8491 0x5b88fffb8eda3aa1,
8492 fidl::encoding::DynamicFlags::empty(),
8493 _decode,
8494 )
8495 }
8496
8497 type DeprecatedSetFlagsResponseFut =
8498 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8499 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
8500 fn _decode(
8501 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8502 ) -> Result<i32, fidl::Error> {
8503 let _response = fidl::client::decode_transaction_body::<
8504 NodeDeprecatedSetFlagsResponse,
8505 fidl::encoding::DefaultFuchsiaResourceDialect,
8506 0x5295b76c71fde733,
8507 >(_buf?)?;
8508 Ok(_response.s)
8509 }
8510 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
8511 (flags,),
8512 0x5295b76c71fde733,
8513 fidl::encoding::DynamicFlags::empty(),
8514 _decode,
8515 )
8516 }
8517
8518 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
8519 NodeGetFlagsResult,
8520 fidl::encoding::DefaultFuchsiaResourceDialect,
8521 >;
8522 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
8523 fn _decode(
8524 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8525 ) -> Result<NodeGetFlagsResult, fidl::Error> {
8526 let _response = fidl::client::decode_transaction_body::<
8527 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
8528 fidl::encoding::DefaultFuchsiaResourceDialect,
8529 0x176eb318f64ec23,
8530 >(_buf?)?
8531 .into_result::<FileMarker>("get_flags")?;
8532 Ok(_response.map(|x| x.flags))
8533 }
8534 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
8535 (),
8536 0x176eb318f64ec23,
8537 fidl::encoding::DynamicFlags::FLEXIBLE,
8538 _decode,
8539 )
8540 }
8541
8542 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
8543 NodeSetFlagsResult,
8544 fidl::encoding::DefaultFuchsiaResourceDialect,
8545 >;
8546 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
8547 fn _decode(
8548 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8549 ) -> Result<NodeSetFlagsResult, fidl::Error> {
8550 let _response = fidl::client::decode_transaction_body::<
8551 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8552 fidl::encoding::DefaultFuchsiaResourceDialect,
8553 0x55a8028685791ea8,
8554 >(_buf?)?
8555 .into_result::<FileMarker>("set_flags")?;
8556 Ok(_response.map(|x| x))
8557 }
8558 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
8559 (flags,),
8560 0x55a8028685791ea8,
8561 fidl::encoding::DynamicFlags::FLEXIBLE,
8562 _decode,
8563 )
8564 }
8565
8566 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
8567 (i32, Option<Box<FilesystemInfo>>),
8568 fidl::encoding::DefaultFuchsiaResourceDialect,
8569 >;
8570 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
8571 fn _decode(
8572 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8573 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
8574 let _response = fidl::client::decode_transaction_body::<
8575 NodeQueryFilesystemResponse,
8576 fidl::encoding::DefaultFuchsiaResourceDialect,
8577 0x6f344a1c6b0a0610,
8578 >(_buf?)?;
8579 Ok((_response.s, _response.info))
8580 }
8581 self.client.send_query_and_decode::<
8582 fidl::encoding::EmptyPayload,
8583 (i32, Option<Box<FilesystemInfo>>),
8584 >(
8585 (),
8586 0x6f344a1c6b0a0610,
8587 fidl::encoding::DynamicFlags::empty(),
8588 _decode,
8589 )
8590 }
8591
8592 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
8593 NodeGetAttributesResult,
8594 fidl::encoding::DefaultFuchsiaResourceDialect,
8595 >;
8596 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
8597 fn _decode(
8598 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8599 ) -> Result<NodeGetAttributesResult, fidl::Error> {
8600 let _response = fidl::client::decode_transaction_body::<
8601 fidl::encoding::ResultType<NodeAttributes2, i32>,
8602 fidl::encoding::DefaultFuchsiaResourceDialect,
8603 0x3d4396a638ea053b,
8604 >(_buf?)?;
8605 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
8606 }
8607 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
8608 (query,),
8609 0x3d4396a638ea053b,
8610 fidl::encoding::DynamicFlags::empty(),
8611 _decode,
8612 )
8613 }
8614
8615 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
8616 NodeUpdateAttributesResult,
8617 fidl::encoding::DefaultFuchsiaResourceDialect,
8618 >;
8619 fn r#update_attributes(
8620 &self,
8621 mut payload: &MutableNodeAttributes,
8622 ) -> Self::UpdateAttributesResponseFut {
8623 fn _decode(
8624 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8625 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
8626 let _response = fidl::client::decode_transaction_body::<
8627 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8628 fidl::encoding::DefaultFuchsiaResourceDialect,
8629 0x3308c1da5a89bf08,
8630 >(_buf?)?;
8631 Ok(_response.map(|x| x))
8632 }
8633 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
8634 payload,
8635 0x3308c1da5a89bf08,
8636 fidl::encoding::DynamicFlags::empty(),
8637 _decode,
8638 )
8639 }
8640
8641 type SyncResponseFut = fidl::client::QueryResponseFut<
8642 NodeSyncResult,
8643 fidl::encoding::DefaultFuchsiaResourceDialect,
8644 >;
8645 fn r#sync(&self) -> Self::SyncResponseFut {
8646 fn _decode(
8647 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8648 ) -> Result<NodeSyncResult, fidl::Error> {
8649 let _response = fidl::client::decode_transaction_body::<
8650 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8651 fidl::encoding::DefaultFuchsiaResourceDialect,
8652 0x2c5c27ca0ab5dc49,
8653 >(_buf?)?;
8654 Ok(_response.map(|x| x))
8655 }
8656 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
8657 (),
8658 0x2c5c27ca0ab5dc49,
8659 fidl::encoding::DynamicFlags::empty(),
8660 _decode,
8661 )
8662 }
8663
8664 fn r#list_extended_attributes(
8665 &self,
8666 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8667 ) -> Result<(), fidl::Error> {
8668 self.client.send::<NodeListExtendedAttributesRequest>(
8669 (iterator,),
8670 0x4b61033de007fcd0,
8671 fidl::encoding::DynamicFlags::empty(),
8672 )
8673 }
8674
8675 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8676 NodeGetExtendedAttributeResult,
8677 fidl::encoding::DefaultFuchsiaResourceDialect,
8678 >;
8679 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
8680 fn _decode(
8681 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8682 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
8683 let _response = fidl::client::decode_transaction_body::<
8684 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
8685 fidl::encoding::DefaultFuchsiaResourceDialect,
8686 0x45ffa3ccfdeb76db,
8687 >(_buf?)?;
8688 Ok(_response.map(|x| x))
8689 }
8690 self.client.send_query_and_decode::<
8691 NodeGetExtendedAttributeRequest,
8692 NodeGetExtendedAttributeResult,
8693 >(
8694 (name,),
8695 0x45ffa3ccfdeb76db,
8696 fidl::encoding::DynamicFlags::empty(),
8697 _decode,
8698 )
8699 }
8700
8701 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8702 NodeSetExtendedAttributeResult,
8703 fidl::encoding::DefaultFuchsiaResourceDialect,
8704 >;
8705 fn r#set_extended_attribute(
8706 &self,
8707 mut name: &[u8],
8708 mut value: ExtendedAttributeValue,
8709 mut mode: SetExtendedAttributeMode,
8710 ) -> Self::SetExtendedAttributeResponseFut {
8711 fn _decode(
8712 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8713 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
8714 let _response = fidl::client::decode_transaction_body::<
8715 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8716 fidl::encoding::DefaultFuchsiaResourceDialect,
8717 0x4a951362f681f23c,
8718 >(_buf?)?;
8719 Ok(_response.map(|x| x))
8720 }
8721 self.client.send_query_and_decode::<
8722 NodeSetExtendedAttributeRequest,
8723 NodeSetExtendedAttributeResult,
8724 >(
8725 (name, &mut value, mode,),
8726 0x4a951362f681f23c,
8727 fidl::encoding::DynamicFlags::empty(),
8728 _decode,
8729 )
8730 }
8731
8732 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8733 NodeRemoveExtendedAttributeResult,
8734 fidl::encoding::DefaultFuchsiaResourceDialect,
8735 >;
8736 fn r#remove_extended_attribute(
8737 &self,
8738 mut name: &[u8],
8739 ) -> Self::RemoveExtendedAttributeResponseFut {
8740 fn _decode(
8741 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8742 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
8743 let _response = fidl::client::decode_transaction_body::<
8744 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8745 fidl::encoding::DefaultFuchsiaResourceDialect,
8746 0x7a0b9f3a9bf9032d,
8747 >(_buf?)?;
8748 Ok(_response.map(|x| x))
8749 }
8750 self.client.send_query_and_decode::<
8751 NodeRemoveExtendedAttributeRequest,
8752 NodeRemoveExtendedAttributeResult,
8753 >(
8754 (name,),
8755 0x7a0b9f3a9bf9032d,
8756 fidl::encoding::DynamicFlags::empty(),
8757 _decode,
8758 )
8759 }
8760
8761 type ReadResponseFut = fidl::client::QueryResponseFut<
8762 ReadableReadResult,
8763 fidl::encoding::DefaultFuchsiaResourceDialect,
8764 >;
8765 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
8766 fn _decode(
8767 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8768 ) -> Result<ReadableReadResult, fidl::Error> {
8769 let _response = fidl::client::decode_transaction_body::<
8770 fidl::encoding::ResultType<ReadableReadResponse, i32>,
8771 fidl::encoding::DefaultFuchsiaResourceDialect,
8772 0x57e419a298c8ede,
8773 >(_buf?)?;
8774 Ok(_response.map(|x| x.data))
8775 }
8776 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
8777 (count,),
8778 0x57e419a298c8ede,
8779 fidl::encoding::DynamicFlags::empty(),
8780 _decode,
8781 )
8782 }
8783
8784 type WriteResponseFut = fidl::client::QueryResponseFut<
8785 WritableWriteResult,
8786 fidl::encoding::DefaultFuchsiaResourceDialect,
8787 >;
8788 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
8789 fn _decode(
8790 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8791 ) -> Result<WritableWriteResult, fidl::Error> {
8792 let _response = fidl::client::decode_transaction_body::<
8793 fidl::encoding::ResultType<WritableWriteResponse, i32>,
8794 fidl::encoding::DefaultFuchsiaResourceDialect,
8795 0x6a31437832469f82,
8796 >(_buf?)?;
8797 Ok(_response.map(|x| x.actual_count))
8798 }
8799 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
8800 (data,),
8801 0x6a31437832469f82,
8802 fidl::encoding::DynamicFlags::empty(),
8803 _decode,
8804 )
8805 }
8806
8807 type DescribeResponseFut =
8808 fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
8809 fn r#describe(&self) -> Self::DescribeResponseFut {
8810 fn _decode(
8811 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8812 ) -> Result<FileInfo, fidl::Error> {
8813 let _response = fidl::client::decode_transaction_body::<
8814 FileInfo,
8815 fidl::encoding::DefaultFuchsiaResourceDialect,
8816 0x68b5ac00c62906bc,
8817 >(_buf?)?;
8818 Ok(_response)
8819 }
8820 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
8821 (),
8822 0x68b5ac00c62906bc,
8823 fidl::encoding::DynamicFlags::empty(),
8824 _decode,
8825 )
8826 }
8827
8828 type SeekResponseFut = fidl::client::QueryResponseFut<
8829 FileSeekResult,
8830 fidl::encoding::DefaultFuchsiaResourceDialect,
8831 >;
8832 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
8833 fn _decode(
8834 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8835 ) -> Result<FileSeekResult, fidl::Error> {
8836 let _response = fidl::client::decode_transaction_body::<
8837 fidl::encoding::ResultType<FileSeekResponse, i32>,
8838 fidl::encoding::DefaultFuchsiaResourceDialect,
8839 0x78079168162c5207,
8840 >(_buf?)?;
8841 Ok(_response.map(|x| x.offset_from_start))
8842 }
8843 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
8844 (origin, offset),
8845 0x78079168162c5207,
8846 fidl::encoding::DynamicFlags::empty(),
8847 _decode,
8848 )
8849 }
8850
8851 type ReadAtResponseFut = fidl::client::QueryResponseFut<
8852 FileReadAtResult,
8853 fidl::encoding::DefaultFuchsiaResourceDialect,
8854 >;
8855 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
8856 fn _decode(
8857 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8858 ) -> Result<FileReadAtResult, fidl::Error> {
8859 let _response = fidl::client::decode_transaction_body::<
8860 fidl::encoding::ResultType<FileReadAtResponse, i32>,
8861 fidl::encoding::DefaultFuchsiaResourceDialect,
8862 0x1607a293a60d723e,
8863 >(_buf?)?;
8864 Ok(_response.map(|x| x.data))
8865 }
8866 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
8867 (count, offset),
8868 0x1607a293a60d723e,
8869 fidl::encoding::DynamicFlags::empty(),
8870 _decode,
8871 )
8872 }
8873
8874 type WriteAtResponseFut = fidl::client::QueryResponseFut<
8875 FileWriteAtResult,
8876 fidl::encoding::DefaultFuchsiaResourceDialect,
8877 >;
8878 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
8879 fn _decode(
8880 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8881 ) -> Result<FileWriteAtResult, fidl::Error> {
8882 let _response = fidl::client::decode_transaction_body::<
8883 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
8884 fidl::encoding::DefaultFuchsiaResourceDialect,
8885 0x793eefc0045e792b,
8886 >(_buf?)?;
8887 Ok(_response.map(|x| x.actual_count))
8888 }
8889 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
8890 (data, offset),
8891 0x793eefc0045e792b,
8892 fidl::encoding::DynamicFlags::empty(),
8893 _decode,
8894 )
8895 }
8896
8897 type ResizeResponseFut = fidl::client::QueryResponseFut<
8898 FileResizeResult,
8899 fidl::encoding::DefaultFuchsiaResourceDialect,
8900 >;
8901 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
8902 fn _decode(
8903 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8904 ) -> Result<FileResizeResult, fidl::Error> {
8905 let _response = fidl::client::decode_transaction_body::<
8906 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8907 fidl::encoding::DefaultFuchsiaResourceDialect,
8908 0x2b80825f0535743a,
8909 >(_buf?)?;
8910 Ok(_response.map(|x| x))
8911 }
8912 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
8913 (length,),
8914 0x2b80825f0535743a,
8915 fidl::encoding::DynamicFlags::empty(),
8916 _decode,
8917 )
8918 }
8919
8920 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
8921 FileGetBackingMemoryResult,
8922 fidl::encoding::DefaultFuchsiaResourceDialect,
8923 >;
8924 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
8925 fn _decode(
8926 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8927 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
8928 let _response = fidl::client::decode_transaction_body::<
8929 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
8930 fidl::encoding::DefaultFuchsiaResourceDialect,
8931 0xa6a9e654cbf62b,
8932 >(_buf?)?;
8933 Ok(_response.map(|x| x.vmo))
8934 }
8935 self.client
8936 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
8937 (flags,),
8938 0xa6a9e654cbf62b,
8939 fidl::encoding::DynamicFlags::empty(),
8940 _decode,
8941 )
8942 }
8943
8944 type AllocateResponseFut = fidl::client::QueryResponseFut<
8945 FileAllocateResult,
8946 fidl::encoding::DefaultFuchsiaResourceDialect,
8947 >;
8948 fn r#allocate(
8949 &self,
8950 mut offset: u64,
8951 mut length: u64,
8952 mut mode: AllocateMode,
8953 ) -> Self::AllocateResponseFut {
8954 fn _decode(
8955 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8956 ) -> Result<FileAllocateResult, fidl::Error> {
8957 let _response = fidl::client::decode_transaction_body::<
8958 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8959 fidl::encoding::DefaultFuchsiaResourceDialect,
8960 0x77fa0c330b57fd2e,
8961 >(_buf?)?
8962 .into_result::<FileMarker>("allocate")?;
8963 Ok(_response.map(|x| x))
8964 }
8965 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
8966 (offset, length, mode),
8967 0x77fa0c330b57fd2e,
8968 fidl::encoding::DynamicFlags::FLEXIBLE,
8969 _decode,
8970 )
8971 }
8972
8973 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
8974 FileEnableVerityResult,
8975 fidl::encoding::DefaultFuchsiaResourceDialect,
8976 >;
8977 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
8978 fn _decode(
8979 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8980 ) -> Result<FileEnableVerityResult, fidl::Error> {
8981 let _response = fidl::client::decode_transaction_body::<
8982 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8983 fidl::encoding::DefaultFuchsiaResourceDialect,
8984 0x2c421ec3faaeb8bb,
8985 >(_buf?)?
8986 .into_result::<FileMarker>("enable_verity")?;
8987 Ok(_response.map(|x| x))
8988 }
8989 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
8990 (options,),
8991 0x2c421ec3faaeb8bb,
8992 fidl::encoding::DynamicFlags::FLEXIBLE,
8993 _decode,
8994 )
8995 }
8996}
8997
8998pub struct FileEventStream {
8999 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9000}
9001
9002impl std::marker::Unpin for FileEventStream {}
9003
9004impl futures::stream::FusedStream for FileEventStream {
9005 fn is_terminated(&self) -> bool {
9006 self.event_receiver.is_terminated()
9007 }
9008}
9009
9010impl futures::Stream for FileEventStream {
9011 type Item = Result<FileEvent, fidl::Error>;
9012
9013 fn poll_next(
9014 mut self: std::pin::Pin<&mut Self>,
9015 cx: &mut std::task::Context<'_>,
9016 ) -> std::task::Poll<Option<Self::Item>> {
9017 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9018 &mut self.event_receiver,
9019 cx
9020 )?) {
9021 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
9022 None => std::task::Poll::Ready(None),
9023 }
9024 }
9025}
9026
9027#[derive(Debug)]
9028pub enum FileEvent {
9029 OnOpen_ {
9030 s: i32,
9031 info: Option<Box<NodeInfoDeprecated>>,
9032 },
9033 OnRepresentation {
9034 payload: Representation,
9035 },
9036 #[non_exhaustive]
9037 _UnknownEvent {
9038 ordinal: u64,
9040 },
9041}
9042
9043impl FileEvent {
9044 #[allow(irrefutable_let_patterns)]
9045 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
9046 if let FileEvent::OnOpen_ { s, info } = self {
9047 Some((s, info))
9048 } else {
9049 None
9050 }
9051 }
9052 #[allow(irrefutable_let_patterns)]
9053 pub fn into_on_representation(self) -> Option<Representation> {
9054 if let FileEvent::OnRepresentation { payload } = self {
9055 Some((payload))
9056 } else {
9057 None
9058 }
9059 }
9060
9061 fn decode(
9063 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9064 ) -> Result<FileEvent, fidl::Error> {
9065 let (bytes, _handles) = buf.split_mut();
9066 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9067 debug_assert_eq!(tx_header.tx_id, 0);
9068 match tx_header.ordinal {
9069 0x7fc7bbb1dbfd1972 => {
9070 let mut out = fidl::new_empty!(
9071 NodeOnOpenRequest,
9072 fidl::encoding::DefaultFuchsiaResourceDialect
9073 );
9074 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
9075 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
9076 }
9077 0x5cb40567d80a510c => {
9078 let mut out =
9079 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
9080 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
9081 Ok((FileEvent::OnRepresentation { payload: out }))
9082 }
9083 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9084 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9085 }
9086 _ => Err(fidl::Error::UnknownOrdinal {
9087 ordinal: tx_header.ordinal,
9088 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9089 }),
9090 }
9091 }
9092}
9093
9094pub struct FileRequestStream {
9096 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9097 is_terminated: bool,
9098}
9099
9100impl std::marker::Unpin for FileRequestStream {}
9101
9102impl futures::stream::FusedStream for FileRequestStream {
9103 fn is_terminated(&self) -> bool {
9104 self.is_terminated
9105 }
9106}
9107
9108impl fidl::endpoints::RequestStream for FileRequestStream {
9109 type Protocol = FileMarker;
9110 type ControlHandle = FileControlHandle;
9111
9112 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9113 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9114 }
9115
9116 fn control_handle(&self) -> Self::ControlHandle {
9117 FileControlHandle { inner: self.inner.clone() }
9118 }
9119
9120 fn into_inner(
9121 self,
9122 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9123 {
9124 (self.inner, self.is_terminated)
9125 }
9126
9127 fn from_inner(
9128 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9129 is_terminated: bool,
9130 ) -> Self {
9131 Self { inner, is_terminated }
9132 }
9133}
9134
9135impl futures::Stream for FileRequestStream {
9136 type Item = Result<FileRequest, fidl::Error>;
9137
9138 fn poll_next(
9139 mut self: std::pin::Pin<&mut Self>,
9140 cx: &mut std::task::Context<'_>,
9141 ) -> std::task::Poll<Option<Self::Item>> {
9142 let this = &mut *self;
9143 if this.inner.check_shutdown(cx) {
9144 this.is_terminated = true;
9145 return std::task::Poll::Ready(None);
9146 }
9147 if this.is_terminated {
9148 panic!("polled FileRequestStream after completion");
9149 }
9150 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9151 |bytes, handles| {
9152 match this.inner.channel().read_etc(cx, bytes, handles) {
9153 std::task::Poll::Ready(Ok(())) => {}
9154 std::task::Poll::Pending => return std::task::Poll::Pending,
9155 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9156 this.is_terminated = true;
9157 return std::task::Poll::Ready(None);
9158 }
9159 std::task::Poll::Ready(Err(e)) => {
9160 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9161 e.into(),
9162 ))))
9163 }
9164 }
9165
9166 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9168
9169 std::task::Poll::Ready(Some(match header.ordinal {
9170 0x6ee9c0ad53ec87aa => {
9171 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9172 let mut req = fidl::new_empty!(
9173 AdvisoryLockingAdvisoryLockRequest,
9174 fidl::encoding::DefaultFuchsiaResourceDialect
9175 );
9176 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
9177 let control_handle = FileControlHandle { inner: this.inner.clone() };
9178 Ok(FileRequest::AdvisoryLock {
9179 request: req.request,
9180
9181 responder: FileAdvisoryLockResponder {
9182 control_handle: std::mem::ManuallyDrop::new(control_handle),
9183 tx_id: header.tx_id,
9184 },
9185 })
9186 }
9187 0x54f3949246a03e74 => {
9188 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9189 let mut req = fidl::new_empty!(
9190 LinkableLinkIntoRequest,
9191 fidl::encoding::DefaultFuchsiaResourceDialect
9192 );
9193 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
9194 let control_handle = FileControlHandle { inner: this.inner.clone() };
9195 Ok(FileRequest::LinkInto {
9196 dst_parent_token: req.dst_parent_token,
9197 dst: req.dst,
9198
9199 responder: FileLinkIntoResponder {
9200 control_handle: std::mem::ManuallyDrop::new(control_handle),
9201 tx_id: header.tx_id,
9202 },
9203 })
9204 }
9205 0x20d8a7aba2168a79 => {
9206 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9207 let mut req = fidl::new_empty!(
9208 fidl_fuchsia_unknown::CloneableCloneRequest,
9209 fidl::encoding::DefaultFuchsiaResourceDialect
9210 );
9211 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9212 let control_handle = FileControlHandle { inner: this.inner.clone() };
9213 Ok(FileRequest::Clone { request: req.request, control_handle })
9214 }
9215 0x5ac5d459ad7f657e => {
9216 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9217 let mut req = fidl::new_empty!(
9218 fidl::encoding::EmptyPayload,
9219 fidl::encoding::DefaultFuchsiaResourceDialect
9220 );
9221 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9222 let control_handle = FileControlHandle { inner: this.inner.clone() };
9223 Ok(FileRequest::Close {
9224 responder: FileCloseResponder {
9225 control_handle: std::mem::ManuallyDrop::new(control_handle),
9226 tx_id: header.tx_id,
9227 },
9228 })
9229 }
9230 0x2658edee9decfc06 => {
9231 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9232 let mut req = fidl::new_empty!(
9233 fidl::encoding::EmptyPayload,
9234 fidl::encoding::DefaultFuchsiaResourceDialect
9235 );
9236 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9237 let control_handle = FileControlHandle { inner: this.inner.clone() };
9238 Ok(FileRequest::Query {
9239 responder: FileQueryResponder {
9240 control_handle: std::mem::ManuallyDrop::new(control_handle),
9241 tx_id: header.tx_id,
9242 },
9243 })
9244 }
9245 0x5a61678f293ce16f => {
9246 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9247 let mut req = fidl::new_empty!(
9248 NodeDeprecatedCloneRequest,
9249 fidl::encoding::DefaultFuchsiaResourceDialect
9250 );
9251 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9252 let control_handle = FileControlHandle { inner: this.inner.clone() };
9253 Ok(FileRequest::DeprecatedClone {
9254 flags: req.flags,
9255 object: req.object,
9256
9257 control_handle,
9258 })
9259 }
9260 0x78985e216314dafd => {
9261 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9262 let mut req = fidl::new_empty!(
9263 fidl::encoding::EmptyPayload,
9264 fidl::encoding::DefaultFuchsiaResourceDialect
9265 );
9266 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9267 let control_handle = FileControlHandle { inner: this.inner.clone() };
9268 Ok(FileRequest::DeprecatedGetAttr {
9269 responder: FileDeprecatedGetAttrResponder {
9270 control_handle: std::mem::ManuallyDrop::new(control_handle),
9271 tx_id: header.tx_id,
9272 },
9273 })
9274 }
9275 0x4186c0f40d938f46 => {
9276 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9277 let mut req = fidl::new_empty!(
9278 NodeDeprecatedSetAttrRequest,
9279 fidl::encoding::DefaultFuchsiaResourceDialect
9280 );
9281 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
9282 let control_handle = FileControlHandle { inner: this.inner.clone() };
9283 Ok(FileRequest::DeprecatedSetAttr {
9284 flags: req.flags,
9285 attributes: req.attributes,
9286
9287 responder: FileDeprecatedSetAttrResponder {
9288 control_handle: std::mem::ManuallyDrop::new(control_handle),
9289 tx_id: header.tx_id,
9290 },
9291 })
9292 }
9293 0x5b88fffb8eda3aa1 => {
9294 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9295 let mut req = fidl::new_empty!(
9296 fidl::encoding::EmptyPayload,
9297 fidl::encoding::DefaultFuchsiaResourceDialect
9298 );
9299 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9300 let control_handle = FileControlHandle { inner: this.inner.clone() };
9301 Ok(FileRequest::DeprecatedGetFlags {
9302 responder: FileDeprecatedGetFlagsResponder {
9303 control_handle: std::mem::ManuallyDrop::new(control_handle),
9304 tx_id: header.tx_id,
9305 },
9306 })
9307 }
9308 0x5295b76c71fde733 => {
9309 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9310 let mut req = fidl::new_empty!(
9311 NodeDeprecatedSetFlagsRequest,
9312 fidl::encoding::DefaultFuchsiaResourceDialect
9313 );
9314 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9315 let control_handle = FileControlHandle { inner: this.inner.clone() };
9316 Ok(FileRequest::DeprecatedSetFlags {
9317 flags: req.flags,
9318
9319 responder: FileDeprecatedSetFlagsResponder {
9320 control_handle: std::mem::ManuallyDrop::new(control_handle),
9321 tx_id: header.tx_id,
9322 },
9323 })
9324 }
9325 0x176eb318f64ec23 => {
9326 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9327 let mut req = fidl::new_empty!(
9328 fidl::encoding::EmptyPayload,
9329 fidl::encoding::DefaultFuchsiaResourceDialect
9330 );
9331 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9332 let control_handle = FileControlHandle { inner: this.inner.clone() };
9333 Ok(FileRequest::GetFlags {
9334 responder: FileGetFlagsResponder {
9335 control_handle: std::mem::ManuallyDrop::new(control_handle),
9336 tx_id: header.tx_id,
9337 },
9338 })
9339 }
9340 0x55a8028685791ea8 => {
9341 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9342 let mut req = fidl::new_empty!(
9343 NodeSetFlagsRequest,
9344 fidl::encoding::DefaultFuchsiaResourceDialect
9345 );
9346 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9347 let control_handle = FileControlHandle { inner: this.inner.clone() };
9348 Ok(FileRequest::SetFlags {
9349 flags: req.flags,
9350
9351 responder: FileSetFlagsResponder {
9352 control_handle: std::mem::ManuallyDrop::new(control_handle),
9353 tx_id: header.tx_id,
9354 },
9355 })
9356 }
9357 0x6f344a1c6b0a0610 => {
9358 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9359 let mut req = fidl::new_empty!(
9360 fidl::encoding::EmptyPayload,
9361 fidl::encoding::DefaultFuchsiaResourceDialect
9362 );
9363 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9364 let control_handle = FileControlHandle { inner: this.inner.clone() };
9365 Ok(FileRequest::QueryFilesystem {
9366 responder: FileQueryFilesystemResponder {
9367 control_handle: std::mem::ManuallyDrop::new(control_handle),
9368 tx_id: header.tx_id,
9369 },
9370 })
9371 }
9372 0x3d4396a638ea053b => {
9373 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9374 let mut req = fidl::new_empty!(
9375 NodeGetAttributesRequest,
9376 fidl::encoding::DefaultFuchsiaResourceDialect
9377 );
9378 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9379 let control_handle = FileControlHandle { inner: this.inner.clone() };
9380 Ok(FileRequest::GetAttributes {
9381 query: req.query,
9382
9383 responder: FileGetAttributesResponder {
9384 control_handle: std::mem::ManuallyDrop::new(control_handle),
9385 tx_id: header.tx_id,
9386 },
9387 })
9388 }
9389 0x3308c1da5a89bf08 => {
9390 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9391 let mut req = fidl::new_empty!(
9392 MutableNodeAttributes,
9393 fidl::encoding::DefaultFuchsiaResourceDialect
9394 );
9395 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
9396 let control_handle = FileControlHandle { inner: this.inner.clone() };
9397 Ok(FileRequest::UpdateAttributes {
9398 payload: req,
9399 responder: FileUpdateAttributesResponder {
9400 control_handle: std::mem::ManuallyDrop::new(control_handle),
9401 tx_id: header.tx_id,
9402 },
9403 })
9404 }
9405 0x2c5c27ca0ab5dc49 => {
9406 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9407 let mut req = fidl::new_empty!(
9408 fidl::encoding::EmptyPayload,
9409 fidl::encoding::DefaultFuchsiaResourceDialect
9410 );
9411 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9412 let control_handle = FileControlHandle { inner: this.inner.clone() };
9413 Ok(FileRequest::Sync {
9414 responder: FileSyncResponder {
9415 control_handle: std::mem::ManuallyDrop::new(control_handle),
9416 tx_id: header.tx_id,
9417 },
9418 })
9419 }
9420 0x4b61033de007fcd0 => {
9421 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9422 let mut req = fidl::new_empty!(
9423 NodeListExtendedAttributesRequest,
9424 fidl::encoding::DefaultFuchsiaResourceDialect
9425 );
9426 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9427 let control_handle = FileControlHandle { inner: this.inner.clone() };
9428 Ok(FileRequest::ListExtendedAttributes {
9429 iterator: req.iterator,
9430
9431 control_handle,
9432 })
9433 }
9434 0x45ffa3ccfdeb76db => {
9435 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9436 let mut req = fidl::new_empty!(
9437 NodeGetExtendedAttributeRequest,
9438 fidl::encoding::DefaultFuchsiaResourceDialect
9439 );
9440 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9441 let control_handle = FileControlHandle { inner: this.inner.clone() };
9442 Ok(FileRequest::GetExtendedAttribute {
9443 name: req.name,
9444
9445 responder: FileGetExtendedAttributeResponder {
9446 control_handle: std::mem::ManuallyDrop::new(control_handle),
9447 tx_id: header.tx_id,
9448 },
9449 })
9450 }
9451 0x4a951362f681f23c => {
9452 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9453 let mut req = fidl::new_empty!(
9454 NodeSetExtendedAttributeRequest,
9455 fidl::encoding::DefaultFuchsiaResourceDialect
9456 );
9457 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9458 let control_handle = FileControlHandle { inner: this.inner.clone() };
9459 Ok(FileRequest::SetExtendedAttribute {
9460 name: req.name,
9461 value: req.value,
9462 mode: req.mode,
9463
9464 responder: FileSetExtendedAttributeResponder {
9465 control_handle: std::mem::ManuallyDrop::new(control_handle),
9466 tx_id: header.tx_id,
9467 },
9468 })
9469 }
9470 0x7a0b9f3a9bf9032d => {
9471 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9472 let mut req = fidl::new_empty!(
9473 NodeRemoveExtendedAttributeRequest,
9474 fidl::encoding::DefaultFuchsiaResourceDialect
9475 );
9476 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9477 let control_handle = FileControlHandle { inner: this.inner.clone() };
9478 Ok(FileRequest::RemoveExtendedAttribute {
9479 name: req.name,
9480
9481 responder: FileRemoveExtendedAttributeResponder {
9482 control_handle: std::mem::ManuallyDrop::new(control_handle),
9483 tx_id: header.tx_id,
9484 },
9485 })
9486 }
9487 0x57e419a298c8ede => {
9488 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9489 let mut req = fidl::new_empty!(
9490 ReadableReadRequest,
9491 fidl::encoding::DefaultFuchsiaResourceDialect
9492 );
9493 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
9494 let control_handle = FileControlHandle { inner: this.inner.clone() };
9495 Ok(FileRequest::Read {
9496 count: req.count,
9497
9498 responder: FileReadResponder {
9499 control_handle: std::mem::ManuallyDrop::new(control_handle),
9500 tx_id: header.tx_id,
9501 },
9502 })
9503 }
9504 0x6a31437832469f82 => {
9505 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9506 let mut req = fidl::new_empty!(
9507 WritableWriteRequest,
9508 fidl::encoding::DefaultFuchsiaResourceDialect
9509 );
9510 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
9511 let control_handle = FileControlHandle { inner: this.inner.clone() };
9512 Ok(FileRequest::Write {
9513 data: req.data,
9514
9515 responder: FileWriteResponder {
9516 control_handle: std::mem::ManuallyDrop::new(control_handle),
9517 tx_id: header.tx_id,
9518 },
9519 })
9520 }
9521 0x68b5ac00c62906bc => {
9522 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9523 let mut req = fidl::new_empty!(
9524 fidl::encoding::EmptyPayload,
9525 fidl::encoding::DefaultFuchsiaResourceDialect
9526 );
9527 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9528 let control_handle = FileControlHandle { inner: this.inner.clone() };
9529 Ok(FileRequest::Describe {
9530 responder: FileDescribeResponder {
9531 control_handle: std::mem::ManuallyDrop::new(control_handle),
9532 tx_id: header.tx_id,
9533 },
9534 })
9535 }
9536 0x78079168162c5207 => {
9537 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9538 let mut req = fidl::new_empty!(
9539 FileSeekRequest,
9540 fidl::encoding::DefaultFuchsiaResourceDialect
9541 );
9542 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
9543 let control_handle = FileControlHandle { inner: this.inner.clone() };
9544 Ok(FileRequest::Seek {
9545 origin: req.origin,
9546 offset: req.offset,
9547
9548 responder: FileSeekResponder {
9549 control_handle: std::mem::ManuallyDrop::new(control_handle),
9550 tx_id: header.tx_id,
9551 },
9552 })
9553 }
9554 0x1607a293a60d723e => {
9555 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9556 let mut req = fidl::new_empty!(
9557 FileReadAtRequest,
9558 fidl::encoding::DefaultFuchsiaResourceDialect
9559 );
9560 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
9561 let control_handle = FileControlHandle { inner: this.inner.clone() };
9562 Ok(FileRequest::ReadAt {
9563 count: req.count,
9564 offset: req.offset,
9565
9566 responder: FileReadAtResponder {
9567 control_handle: std::mem::ManuallyDrop::new(control_handle),
9568 tx_id: header.tx_id,
9569 },
9570 })
9571 }
9572 0x793eefc0045e792b => {
9573 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9574 let mut req = fidl::new_empty!(
9575 FileWriteAtRequest,
9576 fidl::encoding::DefaultFuchsiaResourceDialect
9577 );
9578 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
9579 let control_handle = FileControlHandle { inner: this.inner.clone() };
9580 Ok(FileRequest::WriteAt {
9581 data: req.data,
9582 offset: req.offset,
9583
9584 responder: FileWriteAtResponder {
9585 control_handle: std::mem::ManuallyDrop::new(control_handle),
9586 tx_id: header.tx_id,
9587 },
9588 })
9589 }
9590 0x2b80825f0535743a => {
9591 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9592 let mut req = fidl::new_empty!(
9593 FileResizeRequest,
9594 fidl::encoding::DefaultFuchsiaResourceDialect
9595 );
9596 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
9597 let control_handle = FileControlHandle { inner: this.inner.clone() };
9598 Ok(FileRequest::Resize {
9599 length: req.length,
9600
9601 responder: FileResizeResponder {
9602 control_handle: std::mem::ManuallyDrop::new(control_handle),
9603 tx_id: header.tx_id,
9604 },
9605 })
9606 }
9607 0xa6a9e654cbf62b => {
9608 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9609 let mut req = fidl::new_empty!(
9610 FileGetBackingMemoryRequest,
9611 fidl::encoding::DefaultFuchsiaResourceDialect
9612 );
9613 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
9614 let control_handle = FileControlHandle { inner: this.inner.clone() };
9615 Ok(FileRequest::GetBackingMemory {
9616 flags: req.flags,
9617
9618 responder: FileGetBackingMemoryResponder {
9619 control_handle: std::mem::ManuallyDrop::new(control_handle),
9620 tx_id: header.tx_id,
9621 },
9622 })
9623 }
9624 0x77fa0c330b57fd2e => {
9625 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9626 let mut req = fidl::new_empty!(
9627 FileAllocateRequest,
9628 fidl::encoding::DefaultFuchsiaResourceDialect
9629 );
9630 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
9631 let control_handle = FileControlHandle { inner: this.inner.clone() };
9632 Ok(FileRequest::Allocate {
9633 offset: req.offset,
9634 length: req.length,
9635 mode: req.mode,
9636
9637 responder: FileAllocateResponder {
9638 control_handle: std::mem::ManuallyDrop::new(control_handle),
9639 tx_id: header.tx_id,
9640 },
9641 })
9642 }
9643 0x2c421ec3faaeb8bb => {
9644 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9645 let mut req = fidl::new_empty!(
9646 FileEnableVerityRequest,
9647 fidl::encoding::DefaultFuchsiaResourceDialect
9648 );
9649 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
9650 let control_handle = FileControlHandle { inner: this.inner.clone() };
9651 Ok(FileRequest::EnableVerity {
9652 options: req.options,
9653
9654 responder: FileEnableVerityResponder {
9655 control_handle: std::mem::ManuallyDrop::new(control_handle),
9656 tx_id: header.tx_id,
9657 },
9658 })
9659 }
9660 _ if header.tx_id == 0
9661 && header
9662 .dynamic_flags()
9663 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9664 {
9665 Ok(FileRequest::_UnknownMethod {
9666 ordinal: header.ordinal,
9667 control_handle: FileControlHandle { inner: this.inner.clone() },
9668 method_type: fidl::MethodType::OneWay,
9669 })
9670 }
9671 _ if header
9672 .dynamic_flags()
9673 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9674 {
9675 this.inner.send_framework_err(
9676 fidl::encoding::FrameworkErr::UnknownMethod,
9677 header.tx_id,
9678 header.ordinal,
9679 header.dynamic_flags(),
9680 (bytes, handles),
9681 )?;
9682 Ok(FileRequest::_UnknownMethod {
9683 ordinal: header.ordinal,
9684 control_handle: FileControlHandle { inner: this.inner.clone() },
9685 method_type: fidl::MethodType::TwoWay,
9686 })
9687 }
9688 _ => Err(fidl::Error::UnknownOrdinal {
9689 ordinal: header.ordinal,
9690 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9691 }),
9692 }))
9693 },
9694 )
9695 }
9696}
9697
9698#[derive(Debug)]
9703pub enum FileRequest {
9704 AdvisoryLock {
9728 request: AdvisoryLockRequest,
9729 responder: FileAdvisoryLockResponder,
9730 },
9731 LinkInto {
9754 dst_parent_token: fidl::Event,
9755 dst: String,
9756 responder: FileLinkIntoResponder,
9757 },
9758 Clone {
9759 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
9760 control_handle: FileControlHandle,
9761 },
9762 Close {
9773 responder: FileCloseResponder,
9774 },
9775 Query {
9776 responder: FileQueryResponder,
9777 },
9778 DeprecatedClone {
9780 flags: OpenFlags,
9781 object: fidl::endpoints::ServerEnd<NodeMarker>,
9782 control_handle: FileControlHandle,
9783 },
9784 DeprecatedGetAttr {
9786 responder: FileDeprecatedGetAttrResponder,
9787 },
9788 DeprecatedSetAttr {
9790 flags: NodeAttributeFlags,
9791 attributes: NodeAttributes,
9792 responder: FileDeprecatedSetAttrResponder,
9793 },
9794 DeprecatedGetFlags {
9796 responder: FileDeprecatedGetFlagsResponder,
9797 },
9798 DeprecatedSetFlags {
9800 flags: OpenFlags,
9801 responder: FileDeprecatedSetFlagsResponder,
9802 },
9803 GetFlags {
9812 responder: FileGetFlagsResponder,
9813 },
9814 SetFlags {
9824 flags: Flags,
9825 responder: FileSetFlagsResponder,
9826 },
9827 QueryFilesystem {
9829 responder: FileQueryFilesystemResponder,
9830 },
9831 GetAttributes {
9845 query: NodeAttributesQuery,
9846 responder: FileGetAttributesResponder,
9847 },
9848 UpdateAttributes {
9857 payload: MutableNodeAttributes,
9858 responder: FileUpdateAttributesResponder,
9859 },
9860 Sync {
9870 responder: FileSyncResponder,
9871 },
9872 ListExtendedAttributes {
9881 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
9882 control_handle: FileControlHandle,
9883 },
9884 GetExtendedAttribute {
9891 name: Vec<u8>,
9892 responder: FileGetExtendedAttributeResponder,
9893 },
9894 SetExtendedAttribute {
9902 name: Vec<u8>,
9903 value: ExtendedAttributeValue,
9904 mode: SetExtendedAttributeMode,
9905 responder: FileSetExtendedAttributeResponder,
9906 },
9907 RemoveExtendedAttribute {
9913 name: Vec<u8>,
9914 responder: FileRemoveExtendedAttributeResponder,
9915 },
9916 Read {
9935 count: u64,
9936 responder: FileReadResponder,
9937 },
9938 Write {
9962 data: Vec<u8>,
9963 responder: FileWriteResponder,
9964 },
9965 Describe {
9966 responder: FileDescribeResponder,
9967 },
9968 Seek {
9978 origin: SeekOrigin,
9979 offset: i64,
9980 responder: FileSeekResponder,
9981 },
9982 ReadAt {
10000 count: u64,
10001 offset: u64,
10002 responder: FileReadAtResponder,
10003 },
10004 WriteAt {
10026 data: Vec<u8>,
10027 offset: u64,
10028 responder: FileWriteAtResponder,
10029 },
10030 Resize {
10039 length: u64,
10040 responder: FileResizeResponder,
10041 },
10042 GetBackingMemory {
10063 flags: VmoFlags,
10064 responder: FileGetBackingMemoryResponder,
10065 },
10066 Allocate {
10068 offset: u64,
10069 length: u64,
10070 mode: AllocateMode,
10071 responder: FileAllocateResponder,
10072 },
10073 EnableVerity {
10085 options: VerificationOptions,
10086 responder: FileEnableVerityResponder,
10087 },
10088 #[non_exhaustive]
10090 _UnknownMethod {
10091 ordinal: u64,
10093 control_handle: FileControlHandle,
10094 method_type: fidl::MethodType,
10095 },
10096}
10097
10098impl FileRequest {
10099 #[allow(irrefutable_let_patterns)]
10100 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
10101 if let FileRequest::AdvisoryLock { request, responder } = self {
10102 Some((request, responder))
10103 } else {
10104 None
10105 }
10106 }
10107
10108 #[allow(irrefutable_let_patterns)]
10109 pub fn into_link_into(self) -> Option<(fidl::Event, String, FileLinkIntoResponder)> {
10110 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
10111 Some((dst_parent_token, dst, responder))
10112 } else {
10113 None
10114 }
10115 }
10116
10117 #[allow(irrefutable_let_patterns)]
10118 pub fn into_clone(
10119 self,
10120 ) -> Option<(
10121 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10122 FileControlHandle,
10123 )> {
10124 if let FileRequest::Clone { request, control_handle } = self {
10125 Some((request, control_handle))
10126 } else {
10127 None
10128 }
10129 }
10130
10131 #[allow(irrefutable_let_patterns)]
10132 pub fn into_close(self) -> Option<(FileCloseResponder)> {
10133 if let FileRequest::Close { responder } = self {
10134 Some((responder))
10135 } else {
10136 None
10137 }
10138 }
10139
10140 #[allow(irrefutable_let_patterns)]
10141 pub fn into_query(self) -> Option<(FileQueryResponder)> {
10142 if let FileRequest::Query { responder } = self {
10143 Some((responder))
10144 } else {
10145 None
10146 }
10147 }
10148
10149 #[allow(irrefutable_let_patterns)]
10150 pub fn into_deprecated_clone(
10151 self,
10152 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, FileControlHandle)> {
10153 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
10154 Some((flags, object, control_handle))
10155 } else {
10156 None
10157 }
10158 }
10159
10160 #[allow(irrefutable_let_patterns)]
10161 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
10162 if let FileRequest::DeprecatedGetAttr { responder } = self {
10163 Some((responder))
10164 } else {
10165 None
10166 }
10167 }
10168
10169 #[allow(irrefutable_let_patterns)]
10170 pub fn into_deprecated_set_attr(
10171 self,
10172 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
10173 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
10174 Some((flags, attributes, responder))
10175 } else {
10176 None
10177 }
10178 }
10179
10180 #[allow(irrefutable_let_patterns)]
10181 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
10182 if let FileRequest::DeprecatedGetFlags { responder } = self {
10183 Some((responder))
10184 } else {
10185 None
10186 }
10187 }
10188
10189 #[allow(irrefutable_let_patterns)]
10190 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
10191 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
10192 Some((flags, responder))
10193 } else {
10194 None
10195 }
10196 }
10197
10198 #[allow(irrefutable_let_patterns)]
10199 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
10200 if let FileRequest::GetFlags { responder } = self {
10201 Some((responder))
10202 } else {
10203 None
10204 }
10205 }
10206
10207 #[allow(irrefutable_let_patterns)]
10208 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
10209 if let FileRequest::SetFlags { flags, responder } = self {
10210 Some((flags, responder))
10211 } else {
10212 None
10213 }
10214 }
10215
10216 #[allow(irrefutable_let_patterns)]
10217 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
10218 if let FileRequest::QueryFilesystem { responder } = self {
10219 Some((responder))
10220 } else {
10221 None
10222 }
10223 }
10224
10225 #[allow(irrefutable_let_patterns)]
10226 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
10227 if let FileRequest::GetAttributes { query, responder } = self {
10228 Some((query, responder))
10229 } else {
10230 None
10231 }
10232 }
10233
10234 #[allow(irrefutable_let_patterns)]
10235 pub fn into_update_attributes(
10236 self,
10237 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
10238 if let FileRequest::UpdateAttributes { payload, responder } = self {
10239 Some((payload, responder))
10240 } else {
10241 None
10242 }
10243 }
10244
10245 #[allow(irrefutable_let_patterns)]
10246 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
10247 if let FileRequest::Sync { responder } = self {
10248 Some((responder))
10249 } else {
10250 None
10251 }
10252 }
10253
10254 #[allow(irrefutable_let_patterns)]
10255 pub fn into_list_extended_attributes(
10256 self,
10257 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
10258 {
10259 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
10260 Some((iterator, control_handle))
10261 } else {
10262 None
10263 }
10264 }
10265
10266 #[allow(irrefutable_let_patterns)]
10267 pub fn into_get_extended_attribute(
10268 self,
10269 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
10270 if let FileRequest::GetExtendedAttribute { name, responder } = self {
10271 Some((name, responder))
10272 } else {
10273 None
10274 }
10275 }
10276
10277 #[allow(irrefutable_let_patterns)]
10278 pub fn into_set_extended_attribute(
10279 self,
10280 ) -> Option<(
10281 Vec<u8>,
10282 ExtendedAttributeValue,
10283 SetExtendedAttributeMode,
10284 FileSetExtendedAttributeResponder,
10285 )> {
10286 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
10287 Some((name, value, mode, responder))
10288 } else {
10289 None
10290 }
10291 }
10292
10293 #[allow(irrefutable_let_patterns)]
10294 pub fn into_remove_extended_attribute(
10295 self,
10296 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
10297 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
10298 Some((name, responder))
10299 } else {
10300 None
10301 }
10302 }
10303
10304 #[allow(irrefutable_let_patterns)]
10305 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
10306 if let FileRequest::Read { count, responder } = self {
10307 Some((count, responder))
10308 } else {
10309 None
10310 }
10311 }
10312
10313 #[allow(irrefutable_let_patterns)]
10314 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
10315 if let FileRequest::Write { data, responder } = self {
10316 Some((data, responder))
10317 } else {
10318 None
10319 }
10320 }
10321
10322 #[allow(irrefutable_let_patterns)]
10323 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
10324 if let FileRequest::Describe { responder } = self {
10325 Some((responder))
10326 } else {
10327 None
10328 }
10329 }
10330
10331 #[allow(irrefutable_let_patterns)]
10332 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
10333 if let FileRequest::Seek { origin, offset, responder } = self {
10334 Some((origin, offset, responder))
10335 } else {
10336 None
10337 }
10338 }
10339
10340 #[allow(irrefutable_let_patterns)]
10341 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
10342 if let FileRequest::ReadAt { count, offset, responder } = self {
10343 Some((count, offset, responder))
10344 } else {
10345 None
10346 }
10347 }
10348
10349 #[allow(irrefutable_let_patterns)]
10350 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
10351 if let FileRequest::WriteAt { data, offset, responder } = self {
10352 Some((data, offset, responder))
10353 } else {
10354 None
10355 }
10356 }
10357
10358 #[allow(irrefutable_let_patterns)]
10359 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
10360 if let FileRequest::Resize { length, responder } = self {
10361 Some((length, responder))
10362 } else {
10363 None
10364 }
10365 }
10366
10367 #[allow(irrefutable_let_patterns)]
10368 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
10369 if let FileRequest::GetBackingMemory { flags, responder } = self {
10370 Some((flags, responder))
10371 } else {
10372 None
10373 }
10374 }
10375
10376 #[allow(irrefutable_let_patterns)]
10377 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
10378 if let FileRequest::Allocate { offset, length, mode, responder } = self {
10379 Some((offset, length, mode, responder))
10380 } else {
10381 None
10382 }
10383 }
10384
10385 #[allow(irrefutable_let_patterns)]
10386 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
10387 if let FileRequest::EnableVerity { options, responder } = self {
10388 Some((options, responder))
10389 } else {
10390 None
10391 }
10392 }
10393
10394 pub fn method_name(&self) -> &'static str {
10396 match *self {
10397 FileRequest::AdvisoryLock { .. } => "advisory_lock",
10398 FileRequest::LinkInto { .. } => "link_into",
10399 FileRequest::Clone { .. } => "clone",
10400 FileRequest::Close { .. } => "close",
10401 FileRequest::Query { .. } => "query",
10402 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
10403 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
10404 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
10405 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
10406 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
10407 FileRequest::GetFlags { .. } => "get_flags",
10408 FileRequest::SetFlags { .. } => "set_flags",
10409 FileRequest::QueryFilesystem { .. } => "query_filesystem",
10410 FileRequest::GetAttributes { .. } => "get_attributes",
10411 FileRequest::UpdateAttributes { .. } => "update_attributes",
10412 FileRequest::Sync { .. } => "sync",
10413 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
10414 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
10415 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
10416 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
10417 FileRequest::Read { .. } => "read",
10418 FileRequest::Write { .. } => "write",
10419 FileRequest::Describe { .. } => "describe",
10420 FileRequest::Seek { .. } => "seek",
10421 FileRequest::ReadAt { .. } => "read_at",
10422 FileRequest::WriteAt { .. } => "write_at",
10423 FileRequest::Resize { .. } => "resize",
10424 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
10425 FileRequest::Allocate { .. } => "allocate",
10426 FileRequest::EnableVerity { .. } => "enable_verity",
10427 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10428 "unknown one-way method"
10429 }
10430 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10431 "unknown two-way method"
10432 }
10433 }
10434 }
10435}
10436
10437#[derive(Debug, Clone)]
10438pub struct FileControlHandle {
10439 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10440}
10441
10442impl fidl::endpoints::ControlHandle for FileControlHandle {
10443 fn shutdown(&self) {
10444 self.inner.shutdown()
10445 }
10446 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10447 self.inner.shutdown_with_epitaph(status)
10448 }
10449
10450 fn is_closed(&self) -> bool {
10451 self.inner.channel().is_closed()
10452 }
10453 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10454 self.inner.channel().on_closed()
10455 }
10456
10457 #[cfg(target_os = "fuchsia")]
10458 fn signal_peer(
10459 &self,
10460 clear_mask: zx::Signals,
10461 set_mask: zx::Signals,
10462 ) -> Result<(), zx_status::Status> {
10463 use fidl::Peered;
10464 self.inner.channel().signal_peer(clear_mask, set_mask)
10465 }
10466}
10467
10468impl FileControlHandle {
10469 pub fn send_on_open_(
10470 &self,
10471 mut s: i32,
10472 mut info: Option<NodeInfoDeprecated>,
10473 ) -> Result<(), fidl::Error> {
10474 self.inner.send::<NodeOnOpenRequest>(
10475 (s, info.as_mut()),
10476 0,
10477 0x7fc7bbb1dbfd1972,
10478 fidl::encoding::DynamicFlags::empty(),
10479 )
10480 }
10481
10482 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
10483 self.inner.send::<Representation>(
10484 &mut payload,
10485 0,
10486 0x5cb40567d80a510c,
10487 fidl::encoding::DynamicFlags::empty(),
10488 )
10489 }
10490}
10491
10492#[must_use = "FIDL methods require a response to be sent"]
10493#[derive(Debug)]
10494pub struct FileAdvisoryLockResponder {
10495 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10496 tx_id: u32,
10497}
10498
10499impl std::ops::Drop for FileAdvisoryLockResponder {
10503 fn drop(&mut self) {
10504 self.control_handle.shutdown();
10505 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10507 }
10508}
10509
10510impl fidl::endpoints::Responder for FileAdvisoryLockResponder {
10511 type ControlHandle = FileControlHandle;
10512
10513 fn control_handle(&self) -> &FileControlHandle {
10514 &self.control_handle
10515 }
10516
10517 fn drop_without_shutdown(mut self) {
10518 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10520 std::mem::forget(self);
10522 }
10523}
10524
10525impl FileAdvisoryLockResponder {
10526 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10530 let _result = self.send_raw(result);
10531 if _result.is_err() {
10532 self.control_handle.shutdown();
10533 }
10534 self.drop_without_shutdown();
10535 _result
10536 }
10537
10538 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10540 let _result = self.send_raw(result);
10541 self.drop_without_shutdown();
10542 _result
10543 }
10544
10545 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10546 self.control_handle
10547 .inner
10548 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10549 result,
10550 self.tx_id,
10551 0x6ee9c0ad53ec87aa,
10552 fidl::encoding::DynamicFlags::empty(),
10553 )
10554 }
10555}
10556
10557#[must_use = "FIDL methods require a response to be sent"]
10558#[derive(Debug)]
10559pub struct FileLinkIntoResponder {
10560 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10561 tx_id: u32,
10562}
10563
10564impl std::ops::Drop for FileLinkIntoResponder {
10568 fn drop(&mut self) {
10569 self.control_handle.shutdown();
10570 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10572 }
10573}
10574
10575impl fidl::endpoints::Responder for FileLinkIntoResponder {
10576 type ControlHandle = FileControlHandle;
10577
10578 fn control_handle(&self) -> &FileControlHandle {
10579 &self.control_handle
10580 }
10581
10582 fn drop_without_shutdown(mut self) {
10583 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10585 std::mem::forget(self);
10587 }
10588}
10589
10590impl FileLinkIntoResponder {
10591 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10595 let _result = self.send_raw(result);
10596 if _result.is_err() {
10597 self.control_handle.shutdown();
10598 }
10599 self.drop_without_shutdown();
10600 _result
10601 }
10602
10603 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10605 let _result = self.send_raw(result);
10606 self.drop_without_shutdown();
10607 _result
10608 }
10609
10610 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10611 self.control_handle
10612 .inner
10613 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10614 result,
10615 self.tx_id,
10616 0x54f3949246a03e74,
10617 fidl::encoding::DynamicFlags::empty(),
10618 )
10619 }
10620}
10621
10622#[must_use = "FIDL methods require a response to be sent"]
10623#[derive(Debug)]
10624pub struct FileCloseResponder {
10625 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10626 tx_id: u32,
10627}
10628
10629impl std::ops::Drop for FileCloseResponder {
10633 fn drop(&mut self) {
10634 self.control_handle.shutdown();
10635 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10637 }
10638}
10639
10640impl fidl::endpoints::Responder for FileCloseResponder {
10641 type ControlHandle = FileControlHandle;
10642
10643 fn control_handle(&self) -> &FileControlHandle {
10644 &self.control_handle
10645 }
10646
10647 fn drop_without_shutdown(mut self) {
10648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10650 std::mem::forget(self);
10652 }
10653}
10654
10655impl FileCloseResponder {
10656 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10660 let _result = self.send_raw(result);
10661 if _result.is_err() {
10662 self.control_handle.shutdown();
10663 }
10664 self.drop_without_shutdown();
10665 _result
10666 }
10667
10668 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10670 let _result = self.send_raw(result);
10671 self.drop_without_shutdown();
10672 _result
10673 }
10674
10675 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10676 self.control_handle
10677 .inner
10678 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10679 result,
10680 self.tx_id,
10681 0x5ac5d459ad7f657e,
10682 fidl::encoding::DynamicFlags::empty(),
10683 )
10684 }
10685}
10686
10687#[must_use = "FIDL methods require a response to be sent"]
10688#[derive(Debug)]
10689pub struct FileQueryResponder {
10690 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10691 tx_id: u32,
10692}
10693
10694impl std::ops::Drop for FileQueryResponder {
10698 fn drop(&mut self) {
10699 self.control_handle.shutdown();
10700 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10702 }
10703}
10704
10705impl fidl::endpoints::Responder for FileQueryResponder {
10706 type ControlHandle = FileControlHandle;
10707
10708 fn control_handle(&self) -> &FileControlHandle {
10709 &self.control_handle
10710 }
10711
10712 fn drop_without_shutdown(mut self) {
10713 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10715 std::mem::forget(self);
10717 }
10718}
10719
10720impl FileQueryResponder {
10721 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10725 let _result = self.send_raw(protocol);
10726 if _result.is_err() {
10727 self.control_handle.shutdown();
10728 }
10729 self.drop_without_shutdown();
10730 _result
10731 }
10732
10733 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10735 let _result = self.send_raw(protocol);
10736 self.drop_without_shutdown();
10737 _result
10738 }
10739
10740 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10741 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
10742 (protocol,),
10743 self.tx_id,
10744 0x2658edee9decfc06,
10745 fidl::encoding::DynamicFlags::empty(),
10746 )
10747 }
10748}
10749
10750#[must_use = "FIDL methods require a response to be sent"]
10751#[derive(Debug)]
10752pub struct FileDeprecatedGetAttrResponder {
10753 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10754 tx_id: u32,
10755}
10756
10757impl std::ops::Drop for FileDeprecatedGetAttrResponder {
10761 fn drop(&mut self) {
10762 self.control_handle.shutdown();
10763 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10765 }
10766}
10767
10768impl fidl::endpoints::Responder for FileDeprecatedGetAttrResponder {
10769 type ControlHandle = FileControlHandle;
10770
10771 fn control_handle(&self) -> &FileControlHandle {
10772 &self.control_handle
10773 }
10774
10775 fn drop_without_shutdown(mut self) {
10776 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10778 std::mem::forget(self);
10780 }
10781}
10782
10783impl FileDeprecatedGetAttrResponder {
10784 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10788 let _result = self.send_raw(s, attributes);
10789 if _result.is_err() {
10790 self.control_handle.shutdown();
10791 }
10792 self.drop_without_shutdown();
10793 _result
10794 }
10795
10796 pub fn send_no_shutdown_on_err(
10798 self,
10799 mut s: i32,
10800 mut attributes: &NodeAttributes,
10801 ) -> Result<(), fidl::Error> {
10802 let _result = self.send_raw(s, attributes);
10803 self.drop_without_shutdown();
10804 _result
10805 }
10806
10807 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10808 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
10809 (s, attributes),
10810 self.tx_id,
10811 0x78985e216314dafd,
10812 fidl::encoding::DynamicFlags::empty(),
10813 )
10814 }
10815}
10816
10817#[must_use = "FIDL methods require a response to be sent"]
10818#[derive(Debug)]
10819pub struct FileDeprecatedSetAttrResponder {
10820 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10821 tx_id: u32,
10822}
10823
10824impl std::ops::Drop for FileDeprecatedSetAttrResponder {
10828 fn drop(&mut self) {
10829 self.control_handle.shutdown();
10830 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10832 }
10833}
10834
10835impl fidl::endpoints::Responder for FileDeprecatedSetAttrResponder {
10836 type ControlHandle = FileControlHandle;
10837
10838 fn control_handle(&self) -> &FileControlHandle {
10839 &self.control_handle
10840 }
10841
10842 fn drop_without_shutdown(mut self) {
10843 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10845 std::mem::forget(self);
10847 }
10848}
10849
10850impl FileDeprecatedSetAttrResponder {
10851 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10855 let _result = self.send_raw(s);
10856 if _result.is_err() {
10857 self.control_handle.shutdown();
10858 }
10859 self.drop_without_shutdown();
10860 _result
10861 }
10862
10863 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
10865 let _result = self.send_raw(s);
10866 self.drop_without_shutdown();
10867 _result
10868 }
10869
10870 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
10871 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
10872 (s,),
10873 self.tx_id,
10874 0x4186c0f40d938f46,
10875 fidl::encoding::DynamicFlags::empty(),
10876 )
10877 }
10878}
10879
10880#[must_use = "FIDL methods require a response to be sent"]
10881#[derive(Debug)]
10882pub struct FileDeprecatedGetFlagsResponder {
10883 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10884 tx_id: u32,
10885}
10886
10887impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
10891 fn drop(&mut self) {
10892 self.control_handle.shutdown();
10893 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10895 }
10896}
10897
10898impl fidl::endpoints::Responder for FileDeprecatedGetFlagsResponder {
10899 type ControlHandle = FileControlHandle;
10900
10901 fn control_handle(&self) -> &FileControlHandle {
10902 &self.control_handle
10903 }
10904
10905 fn drop_without_shutdown(mut self) {
10906 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10908 std::mem::forget(self);
10910 }
10911}
10912
10913impl FileDeprecatedGetFlagsResponder {
10914 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10918 let _result = self.send_raw(s, flags);
10919 if _result.is_err() {
10920 self.control_handle.shutdown();
10921 }
10922 self.drop_without_shutdown();
10923 _result
10924 }
10925
10926 pub fn send_no_shutdown_on_err(
10928 self,
10929 mut s: i32,
10930 mut flags: OpenFlags,
10931 ) -> Result<(), fidl::Error> {
10932 let _result = self.send_raw(s, flags);
10933 self.drop_without_shutdown();
10934 _result
10935 }
10936
10937 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10938 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
10939 (s, flags),
10940 self.tx_id,
10941 0x5b88fffb8eda3aa1,
10942 fidl::encoding::DynamicFlags::empty(),
10943 )
10944 }
10945}
10946
10947#[must_use = "FIDL methods require a response to be sent"]
10948#[derive(Debug)]
10949pub struct FileDeprecatedSetFlagsResponder {
10950 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10951 tx_id: u32,
10952}
10953
10954impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
10958 fn drop(&mut self) {
10959 self.control_handle.shutdown();
10960 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10962 }
10963}
10964
10965impl fidl::endpoints::Responder for FileDeprecatedSetFlagsResponder {
10966 type ControlHandle = FileControlHandle;
10967
10968 fn control_handle(&self) -> &FileControlHandle {
10969 &self.control_handle
10970 }
10971
10972 fn drop_without_shutdown(mut self) {
10973 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10975 std::mem::forget(self);
10977 }
10978}
10979
10980impl FileDeprecatedSetFlagsResponder {
10981 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10985 let _result = self.send_raw(s);
10986 if _result.is_err() {
10987 self.control_handle.shutdown();
10988 }
10989 self.drop_without_shutdown();
10990 _result
10991 }
10992
10993 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
10995 let _result = self.send_raw(s);
10996 self.drop_without_shutdown();
10997 _result
10998 }
10999
11000 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11001 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
11002 (s,),
11003 self.tx_id,
11004 0x5295b76c71fde733,
11005 fidl::encoding::DynamicFlags::empty(),
11006 )
11007 }
11008}
11009
11010#[must_use = "FIDL methods require a response to be sent"]
11011#[derive(Debug)]
11012pub struct FileGetFlagsResponder {
11013 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11014 tx_id: u32,
11015}
11016
11017impl std::ops::Drop for FileGetFlagsResponder {
11021 fn drop(&mut self) {
11022 self.control_handle.shutdown();
11023 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11025 }
11026}
11027
11028impl fidl::endpoints::Responder for FileGetFlagsResponder {
11029 type ControlHandle = FileControlHandle;
11030
11031 fn control_handle(&self) -> &FileControlHandle {
11032 &self.control_handle
11033 }
11034
11035 fn drop_without_shutdown(mut self) {
11036 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11038 std::mem::forget(self);
11040 }
11041}
11042
11043impl FileGetFlagsResponder {
11044 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11048 let _result = self.send_raw(result);
11049 if _result.is_err() {
11050 self.control_handle.shutdown();
11051 }
11052 self.drop_without_shutdown();
11053 _result
11054 }
11055
11056 pub fn send_no_shutdown_on_err(
11058 self,
11059 mut result: Result<Flags, i32>,
11060 ) -> Result<(), fidl::Error> {
11061 let _result = self.send_raw(result);
11062 self.drop_without_shutdown();
11063 _result
11064 }
11065
11066 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11067 self.control_handle
11068 .inner
11069 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
11070 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
11071 self.tx_id,
11072 0x176eb318f64ec23,
11073 fidl::encoding::DynamicFlags::FLEXIBLE,
11074 )
11075 }
11076}
11077
11078#[must_use = "FIDL methods require a response to be sent"]
11079#[derive(Debug)]
11080pub struct FileSetFlagsResponder {
11081 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11082 tx_id: u32,
11083}
11084
11085impl std::ops::Drop for FileSetFlagsResponder {
11089 fn drop(&mut self) {
11090 self.control_handle.shutdown();
11091 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11093 }
11094}
11095
11096impl fidl::endpoints::Responder for FileSetFlagsResponder {
11097 type ControlHandle = FileControlHandle;
11098
11099 fn control_handle(&self) -> &FileControlHandle {
11100 &self.control_handle
11101 }
11102
11103 fn drop_without_shutdown(mut self) {
11104 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11106 std::mem::forget(self);
11108 }
11109}
11110
11111impl FileSetFlagsResponder {
11112 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11116 let _result = self.send_raw(result);
11117 if _result.is_err() {
11118 self.control_handle.shutdown();
11119 }
11120 self.drop_without_shutdown();
11121 _result
11122 }
11123
11124 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11126 let _result = self.send_raw(result);
11127 self.drop_without_shutdown();
11128 _result
11129 }
11130
11131 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11132 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
11133 fidl::encoding::EmptyStruct,
11134 i32,
11135 >>(
11136 fidl::encoding::FlexibleResult::new(result),
11137 self.tx_id,
11138 0x55a8028685791ea8,
11139 fidl::encoding::DynamicFlags::FLEXIBLE,
11140 )
11141 }
11142}
11143
11144#[must_use = "FIDL methods require a response to be sent"]
11145#[derive(Debug)]
11146pub struct FileQueryFilesystemResponder {
11147 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11148 tx_id: u32,
11149}
11150
11151impl std::ops::Drop for FileQueryFilesystemResponder {
11155 fn drop(&mut self) {
11156 self.control_handle.shutdown();
11157 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11159 }
11160}
11161
11162impl fidl::endpoints::Responder for FileQueryFilesystemResponder {
11163 type ControlHandle = FileControlHandle;
11164
11165 fn control_handle(&self) -> &FileControlHandle {
11166 &self.control_handle
11167 }
11168
11169 fn drop_without_shutdown(mut self) {
11170 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11172 std::mem::forget(self);
11174 }
11175}
11176
11177impl FileQueryFilesystemResponder {
11178 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11182 let _result = self.send_raw(s, info);
11183 if _result.is_err() {
11184 self.control_handle.shutdown();
11185 }
11186 self.drop_without_shutdown();
11187 _result
11188 }
11189
11190 pub fn send_no_shutdown_on_err(
11192 self,
11193 mut s: i32,
11194 mut info: Option<&FilesystemInfo>,
11195 ) -> Result<(), fidl::Error> {
11196 let _result = self.send_raw(s, info);
11197 self.drop_without_shutdown();
11198 _result
11199 }
11200
11201 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11202 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
11203 (s, info),
11204 self.tx_id,
11205 0x6f344a1c6b0a0610,
11206 fidl::encoding::DynamicFlags::empty(),
11207 )
11208 }
11209}
11210
11211#[must_use = "FIDL methods require a response to be sent"]
11212#[derive(Debug)]
11213pub struct FileGetAttributesResponder {
11214 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11215 tx_id: u32,
11216}
11217
11218impl std::ops::Drop for FileGetAttributesResponder {
11222 fn drop(&mut self) {
11223 self.control_handle.shutdown();
11224 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11226 }
11227}
11228
11229impl fidl::endpoints::Responder for FileGetAttributesResponder {
11230 type ControlHandle = FileControlHandle;
11231
11232 fn control_handle(&self) -> &FileControlHandle {
11233 &self.control_handle
11234 }
11235
11236 fn drop_without_shutdown(mut self) {
11237 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11239 std::mem::forget(self);
11241 }
11242}
11243
11244impl FileGetAttributesResponder {
11245 pub fn send(
11249 self,
11250 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11251 ) -> Result<(), fidl::Error> {
11252 let _result = self.send_raw(result);
11253 if _result.is_err() {
11254 self.control_handle.shutdown();
11255 }
11256 self.drop_without_shutdown();
11257 _result
11258 }
11259
11260 pub fn send_no_shutdown_on_err(
11262 self,
11263 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11264 ) -> Result<(), fidl::Error> {
11265 let _result = self.send_raw(result);
11266 self.drop_without_shutdown();
11267 _result
11268 }
11269
11270 fn send_raw(
11271 &self,
11272 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11273 ) -> Result<(), fidl::Error> {
11274 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
11275 result,
11276 self.tx_id,
11277 0x3d4396a638ea053b,
11278 fidl::encoding::DynamicFlags::empty(),
11279 )
11280 }
11281}
11282
11283#[must_use = "FIDL methods require a response to be sent"]
11284#[derive(Debug)]
11285pub struct FileUpdateAttributesResponder {
11286 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11287 tx_id: u32,
11288}
11289
11290impl std::ops::Drop for FileUpdateAttributesResponder {
11294 fn drop(&mut self) {
11295 self.control_handle.shutdown();
11296 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11298 }
11299}
11300
11301impl fidl::endpoints::Responder for FileUpdateAttributesResponder {
11302 type ControlHandle = FileControlHandle;
11303
11304 fn control_handle(&self) -> &FileControlHandle {
11305 &self.control_handle
11306 }
11307
11308 fn drop_without_shutdown(mut self) {
11309 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11311 std::mem::forget(self);
11313 }
11314}
11315
11316impl FileUpdateAttributesResponder {
11317 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11321 let _result = self.send_raw(result);
11322 if _result.is_err() {
11323 self.control_handle.shutdown();
11324 }
11325 self.drop_without_shutdown();
11326 _result
11327 }
11328
11329 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11331 let _result = self.send_raw(result);
11332 self.drop_without_shutdown();
11333 _result
11334 }
11335
11336 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11337 self.control_handle
11338 .inner
11339 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11340 result,
11341 self.tx_id,
11342 0x3308c1da5a89bf08,
11343 fidl::encoding::DynamicFlags::empty(),
11344 )
11345 }
11346}
11347
11348#[must_use = "FIDL methods require a response to be sent"]
11349#[derive(Debug)]
11350pub struct FileSyncResponder {
11351 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11352 tx_id: u32,
11353}
11354
11355impl std::ops::Drop for FileSyncResponder {
11359 fn drop(&mut self) {
11360 self.control_handle.shutdown();
11361 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11363 }
11364}
11365
11366impl fidl::endpoints::Responder for FileSyncResponder {
11367 type ControlHandle = FileControlHandle;
11368
11369 fn control_handle(&self) -> &FileControlHandle {
11370 &self.control_handle
11371 }
11372
11373 fn drop_without_shutdown(mut self) {
11374 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11376 std::mem::forget(self);
11378 }
11379}
11380
11381impl FileSyncResponder {
11382 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11386 let _result = self.send_raw(result);
11387 if _result.is_err() {
11388 self.control_handle.shutdown();
11389 }
11390 self.drop_without_shutdown();
11391 _result
11392 }
11393
11394 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11396 let _result = self.send_raw(result);
11397 self.drop_without_shutdown();
11398 _result
11399 }
11400
11401 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11402 self.control_handle
11403 .inner
11404 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11405 result,
11406 self.tx_id,
11407 0x2c5c27ca0ab5dc49,
11408 fidl::encoding::DynamicFlags::empty(),
11409 )
11410 }
11411}
11412
11413#[must_use = "FIDL methods require a response to be sent"]
11414#[derive(Debug)]
11415pub struct FileGetExtendedAttributeResponder {
11416 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11417 tx_id: u32,
11418}
11419
11420impl std::ops::Drop for FileGetExtendedAttributeResponder {
11424 fn drop(&mut self) {
11425 self.control_handle.shutdown();
11426 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11428 }
11429}
11430
11431impl fidl::endpoints::Responder for FileGetExtendedAttributeResponder {
11432 type ControlHandle = FileControlHandle;
11433
11434 fn control_handle(&self) -> &FileControlHandle {
11435 &self.control_handle
11436 }
11437
11438 fn drop_without_shutdown(mut self) {
11439 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11441 std::mem::forget(self);
11443 }
11444}
11445
11446impl FileGetExtendedAttributeResponder {
11447 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11451 let _result = self.send_raw(result);
11452 if _result.is_err() {
11453 self.control_handle.shutdown();
11454 }
11455 self.drop_without_shutdown();
11456 _result
11457 }
11458
11459 pub fn send_no_shutdown_on_err(
11461 self,
11462 mut result: Result<ExtendedAttributeValue, i32>,
11463 ) -> Result<(), fidl::Error> {
11464 let _result = self.send_raw(result);
11465 self.drop_without_shutdown();
11466 _result
11467 }
11468
11469 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11470 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
11471 result.as_mut().map_err(|e| *e),
11472 self.tx_id,
11473 0x45ffa3ccfdeb76db,
11474 fidl::encoding::DynamicFlags::empty(),
11475 )
11476 }
11477}
11478
11479#[must_use = "FIDL methods require a response to be sent"]
11480#[derive(Debug)]
11481pub struct FileSetExtendedAttributeResponder {
11482 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11483 tx_id: u32,
11484}
11485
11486impl std::ops::Drop for FileSetExtendedAttributeResponder {
11490 fn drop(&mut self) {
11491 self.control_handle.shutdown();
11492 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11494 }
11495}
11496
11497impl fidl::endpoints::Responder for FileSetExtendedAttributeResponder {
11498 type ControlHandle = FileControlHandle;
11499
11500 fn control_handle(&self) -> &FileControlHandle {
11501 &self.control_handle
11502 }
11503
11504 fn drop_without_shutdown(mut self) {
11505 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11507 std::mem::forget(self);
11509 }
11510}
11511
11512impl FileSetExtendedAttributeResponder {
11513 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11517 let _result = self.send_raw(result);
11518 if _result.is_err() {
11519 self.control_handle.shutdown();
11520 }
11521 self.drop_without_shutdown();
11522 _result
11523 }
11524
11525 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11527 let _result = self.send_raw(result);
11528 self.drop_without_shutdown();
11529 _result
11530 }
11531
11532 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11533 self.control_handle
11534 .inner
11535 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11536 result,
11537 self.tx_id,
11538 0x4a951362f681f23c,
11539 fidl::encoding::DynamicFlags::empty(),
11540 )
11541 }
11542}
11543
11544#[must_use = "FIDL methods require a response to be sent"]
11545#[derive(Debug)]
11546pub struct FileRemoveExtendedAttributeResponder {
11547 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11548 tx_id: u32,
11549}
11550
11551impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
11555 fn drop(&mut self) {
11556 self.control_handle.shutdown();
11557 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11559 }
11560}
11561
11562impl fidl::endpoints::Responder for FileRemoveExtendedAttributeResponder {
11563 type ControlHandle = FileControlHandle;
11564
11565 fn control_handle(&self) -> &FileControlHandle {
11566 &self.control_handle
11567 }
11568
11569 fn drop_without_shutdown(mut self) {
11570 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11572 std::mem::forget(self);
11574 }
11575}
11576
11577impl FileRemoveExtendedAttributeResponder {
11578 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11582 let _result = self.send_raw(result);
11583 if _result.is_err() {
11584 self.control_handle.shutdown();
11585 }
11586 self.drop_without_shutdown();
11587 _result
11588 }
11589
11590 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11592 let _result = self.send_raw(result);
11593 self.drop_without_shutdown();
11594 _result
11595 }
11596
11597 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11598 self.control_handle
11599 .inner
11600 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11601 result,
11602 self.tx_id,
11603 0x7a0b9f3a9bf9032d,
11604 fidl::encoding::DynamicFlags::empty(),
11605 )
11606 }
11607}
11608
11609#[must_use = "FIDL methods require a response to be sent"]
11610#[derive(Debug)]
11611pub struct FileReadResponder {
11612 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11613 tx_id: u32,
11614}
11615
11616impl std::ops::Drop for FileReadResponder {
11620 fn drop(&mut self) {
11621 self.control_handle.shutdown();
11622 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11624 }
11625}
11626
11627impl fidl::endpoints::Responder for FileReadResponder {
11628 type ControlHandle = FileControlHandle;
11629
11630 fn control_handle(&self) -> &FileControlHandle {
11631 &self.control_handle
11632 }
11633
11634 fn drop_without_shutdown(mut self) {
11635 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11637 std::mem::forget(self);
11639 }
11640}
11641
11642impl FileReadResponder {
11643 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11647 let _result = self.send_raw(result);
11648 if _result.is_err() {
11649 self.control_handle.shutdown();
11650 }
11651 self.drop_without_shutdown();
11652 _result
11653 }
11654
11655 pub fn send_no_shutdown_on_err(
11657 self,
11658 mut result: Result<&[u8], i32>,
11659 ) -> Result<(), fidl::Error> {
11660 let _result = self.send_raw(result);
11661 self.drop_without_shutdown();
11662 _result
11663 }
11664
11665 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11666 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
11667 result.map(|data| (data,)),
11668 self.tx_id,
11669 0x57e419a298c8ede,
11670 fidl::encoding::DynamicFlags::empty(),
11671 )
11672 }
11673}
11674
11675#[must_use = "FIDL methods require a response to be sent"]
11676#[derive(Debug)]
11677pub struct FileWriteResponder {
11678 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11679 tx_id: u32,
11680}
11681
11682impl std::ops::Drop for FileWriteResponder {
11686 fn drop(&mut self) {
11687 self.control_handle.shutdown();
11688 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11690 }
11691}
11692
11693impl fidl::endpoints::Responder for FileWriteResponder {
11694 type ControlHandle = FileControlHandle;
11695
11696 fn control_handle(&self) -> &FileControlHandle {
11697 &self.control_handle
11698 }
11699
11700 fn drop_without_shutdown(mut self) {
11701 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11703 std::mem::forget(self);
11705 }
11706}
11707
11708impl FileWriteResponder {
11709 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11713 let _result = self.send_raw(result);
11714 if _result.is_err() {
11715 self.control_handle.shutdown();
11716 }
11717 self.drop_without_shutdown();
11718 _result
11719 }
11720
11721 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11723 let _result = self.send_raw(result);
11724 self.drop_without_shutdown();
11725 _result
11726 }
11727
11728 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11729 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
11730 result.map(|actual_count| (actual_count,)),
11731 self.tx_id,
11732 0x6a31437832469f82,
11733 fidl::encoding::DynamicFlags::empty(),
11734 )
11735 }
11736}
11737
11738#[must_use = "FIDL methods require a response to be sent"]
11739#[derive(Debug)]
11740pub struct FileDescribeResponder {
11741 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11742 tx_id: u32,
11743}
11744
11745impl std::ops::Drop for FileDescribeResponder {
11749 fn drop(&mut self) {
11750 self.control_handle.shutdown();
11751 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11753 }
11754}
11755
11756impl fidl::endpoints::Responder for FileDescribeResponder {
11757 type ControlHandle = FileControlHandle;
11758
11759 fn control_handle(&self) -> &FileControlHandle {
11760 &self.control_handle
11761 }
11762
11763 fn drop_without_shutdown(mut self) {
11764 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11766 std::mem::forget(self);
11768 }
11769}
11770
11771impl FileDescribeResponder {
11772 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11776 let _result = self.send_raw(payload);
11777 if _result.is_err() {
11778 self.control_handle.shutdown();
11779 }
11780 self.drop_without_shutdown();
11781 _result
11782 }
11783
11784 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11786 let _result = self.send_raw(payload);
11787 self.drop_without_shutdown();
11788 _result
11789 }
11790
11791 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11792 self.control_handle.inner.send::<FileInfo>(
11793 &mut payload,
11794 self.tx_id,
11795 0x68b5ac00c62906bc,
11796 fidl::encoding::DynamicFlags::empty(),
11797 )
11798 }
11799}
11800
11801#[must_use = "FIDL methods require a response to be sent"]
11802#[derive(Debug)]
11803pub struct FileSeekResponder {
11804 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11805 tx_id: u32,
11806}
11807
11808impl std::ops::Drop for FileSeekResponder {
11812 fn drop(&mut self) {
11813 self.control_handle.shutdown();
11814 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11816 }
11817}
11818
11819impl fidl::endpoints::Responder for FileSeekResponder {
11820 type ControlHandle = FileControlHandle;
11821
11822 fn control_handle(&self) -> &FileControlHandle {
11823 &self.control_handle
11824 }
11825
11826 fn drop_without_shutdown(mut self) {
11827 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11829 std::mem::forget(self);
11831 }
11832}
11833
11834impl FileSeekResponder {
11835 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11839 let _result = self.send_raw(result);
11840 if _result.is_err() {
11841 self.control_handle.shutdown();
11842 }
11843 self.drop_without_shutdown();
11844 _result
11845 }
11846
11847 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11849 let _result = self.send_raw(result);
11850 self.drop_without_shutdown();
11851 _result
11852 }
11853
11854 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11855 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
11856 result.map(|offset_from_start| (offset_from_start,)),
11857 self.tx_id,
11858 0x78079168162c5207,
11859 fidl::encoding::DynamicFlags::empty(),
11860 )
11861 }
11862}
11863
11864#[must_use = "FIDL methods require a response to be sent"]
11865#[derive(Debug)]
11866pub struct FileReadAtResponder {
11867 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11868 tx_id: u32,
11869}
11870
11871impl std::ops::Drop for FileReadAtResponder {
11875 fn drop(&mut self) {
11876 self.control_handle.shutdown();
11877 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11879 }
11880}
11881
11882impl fidl::endpoints::Responder for FileReadAtResponder {
11883 type ControlHandle = FileControlHandle;
11884
11885 fn control_handle(&self) -> &FileControlHandle {
11886 &self.control_handle
11887 }
11888
11889 fn drop_without_shutdown(mut self) {
11890 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11892 std::mem::forget(self);
11894 }
11895}
11896
11897impl FileReadAtResponder {
11898 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11902 let _result = self.send_raw(result);
11903 if _result.is_err() {
11904 self.control_handle.shutdown();
11905 }
11906 self.drop_without_shutdown();
11907 _result
11908 }
11909
11910 pub fn send_no_shutdown_on_err(
11912 self,
11913 mut result: Result<&[u8], i32>,
11914 ) -> Result<(), fidl::Error> {
11915 let _result = self.send_raw(result);
11916 self.drop_without_shutdown();
11917 _result
11918 }
11919
11920 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11921 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
11922 result.map(|data| (data,)),
11923 self.tx_id,
11924 0x1607a293a60d723e,
11925 fidl::encoding::DynamicFlags::empty(),
11926 )
11927 }
11928}
11929
11930#[must_use = "FIDL methods require a response to be sent"]
11931#[derive(Debug)]
11932pub struct FileWriteAtResponder {
11933 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11934 tx_id: u32,
11935}
11936
11937impl std::ops::Drop for FileWriteAtResponder {
11941 fn drop(&mut self) {
11942 self.control_handle.shutdown();
11943 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11945 }
11946}
11947
11948impl fidl::endpoints::Responder for FileWriteAtResponder {
11949 type ControlHandle = FileControlHandle;
11950
11951 fn control_handle(&self) -> &FileControlHandle {
11952 &self.control_handle
11953 }
11954
11955 fn drop_without_shutdown(mut self) {
11956 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11958 std::mem::forget(self);
11960 }
11961}
11962
11963impl FileWriteAtResponder {
11964 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11968 let _result = self.send_raw(result);
11969 if _result.is_err() {
11970 self.control_handle.shutdown();
11971 }
11972 self.drop_without_shutdown();
11973 _result
11974 }
11975
11976 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11978 let _result = self.send_raw(result);
11979 self.drop_without_shutdown();
11980 _result
11981 }
11982
11983 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11984 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
11985 result.map(|actual_count| (actual_count,)),
11986 self.tx_id,
11987 0x793eefc0045e792b,
11988 fidl::encoding::DynamicFlags::empty(),
11989 )
11990 }
11991}
11992
11993#[must_use = "FIDL methods require a response to be sent"]
11994#[derive(Debug)]
11995pub struct FileResizeResponder {
11996 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11997 tx_id: u32,
11998}
11999
12000impl std::ops::Drop for FileResizeResponder {
12004 fn drop(&mut self) {
12005 self.control_handle.shutdown();
12006 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12008 }
12009}
12010
12011impl fidl::endpoints::Responder for FileResizeResponder {
12012 type ControlHandle = FileControlHandle;
12013
12014 fn control_handle(&self) -> &FileControlHandle {
12015 &self.control_handle
12016 }
12017
12018 fn drop_without_shutdown(mut self) {
12019 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12021 std::mem::forget(self);
12023 }
12024}
12025
12026impl FileResizeResponder {
12027 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12031 let _result = self.send_raw(result);
12032 if _result.is_err() {
12033 self.control_handle.shutdown();
12034 }
12035 self.drop_without_shutdown();
12036 _result
12037 }
12038
12039 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12041 let _result = self.send_raw(result);
12042 self.drop_without_shutdown();
12043 _result
12044 }
12045
12046 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12047 self.control_handle
12048 .inner
12049 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12050 result,
12051 self.tx_id,
12052 0x2b80825f0535743a,
12053 fidl::encoding::DynamicFlags::empty(),
12054 )
12055 }
12056}
12057
12058#[must_use = "FIDL methods require a response to be sent"]
12059#[derive(Debug)]
12060pub struct FileGetBackingMemoryResponder {
12061 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12062 tx_id: u32,
12063}
12064
12065impl std::ops::Drop for FileGetBackingMemoryResponder {
12069 fn drop(&mut self) {
12070 self.control_handle.shutdown();
12071 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12073 }
12074}
12075
12076impl fidl::endpoints::Responder for FileGetBackingMemoryResponder {
12077 type ControlHandle = FileControlHandle;
12078
12079 fn control_handle(&self) -> &FileControlHandle {
12080 &self.control_handle
12081 }
12082
12083 fn drop_without_shutdown(mut self) {
12084 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12086 std::mem::forget(self);
12088 }
12089}
12090
12091impl FileGetBackingMemoryResponder {
12092 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12096 let _result = self.send_raw(result);
12097 if _result.is_err() {
12098 self.control_handle.shutdown();
12099 }
12100 self.drop_without_shutdown();
12101 _result
12102 }
12103
12104 pub fn send_no_shutdown_on_err(
12106 self,
12107 mut result: Result<fidl::Vmo, i32>,
12108 ) -> Result<(), fidl::Error> {
12109 let _result = self.send_raw(result);
12110 self.drop_without_shutdown();
12111 _result
12112 }
12113
12114 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12115 self.control_handle
12116 .inner
12117 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
12118 result.map(|vmo| (vmo,)),
12119 self.tx_id,
12120 0xa6a9e654cbf62b,
12121 fidl::encoding::DynamicFlags::empty(),
12122 )
12123 }
12124}
12125
12126#[must_use = "FIDL methods require a response to be sent"]
12127#[derive(Debug)]
12128pub struct FileAllocateResponder {
12129 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12130 tx_id: u32,
12131}
12132
12133impl std::ops::Drop for FileAllocateResponder {
12137 fn drop(&mut self) {
12138 self.control_handle.shutdown();
12139 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12141 }
12142}
12143
12144impl fidl::endpoints::Responder for FileAllocateResponder {
12145 type ControlHandle = FileControlHandle;
12146
12147 fn control_handle(&self) -> &FileControlHandle {
12148 &self.control_handle
12149 }
12150
12151 fn drop_without_shutdown(mut self) {
12152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12154 std::mem::forget(self);
12156 }
12157}
12158
12159impl FileAllocateResponder {
12160 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12164 let _result = self.send_raw(result);
12165 if _result.is_err() {
12166 self.control_handle.shutdown();
12167 }
12168 self.drop_without_shutdown();
12169 _result
12170 }
12171
12172 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12174 let _result = self.send_raw(result);
12175 self.drop_without_shutdown();
12176 _result
12177 }
12178
12179 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12180 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12181 fidl::encoding::EmptyStruct,
12182 i32,
12183 >>(
12184 fidl::encoding::FlexibleResult::new(result),
12185 self.tx_id,
12186 0x77fa0c330b57fd2e,
12187 fidl::encoding::DynamicFlags::FLEXIBLE,
12188 )
12189 }
12190}
12191
12192#[must_use = "FIDL methods require a response to be sent"]
12193#[derive(Debug)]
12194pub struct FileEnableVerityResponder {
12195 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12196 tx_id: u32,
12197}
12198
12199impl std::ops::Drop for FileEnableVerityResponder {
12203 fn drop(&mut self) {
12204 self.control_handle.shutdown();
12205 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12207 }
12208}
12209
12210impl fidl::endpoints::Responder for FileEnableVerityResponder {
12211 type ControlHandle = FileControlHandle;
12212
12213 fn control_handle(&self) -> &FileControlHandle {
12214 &self.control_handle
12215 }
12216
12217 fn drop_without_shutdown(mut self) {
12218 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12220 std::mem::forget(self);
12222 }
12223}
12224
12225impl FileEnableVerityResponder {
12226 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12230 let _result = self.send_raw(result);
12231 if _result.is_err() {
12232 self.control_handle.shutdown();
12233 }
12234 self.drop_without_shutdown();
12235 _result
12236 }
12237
12238 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12240 let _result = self.send_raw(result);
12241 self.drop_without_shutdown();
12242 _result
12243 }
12244
12245 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12246 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12247 fidl::encoding::EmptyStruct,
12248 i32,
12249 >>(
12250 fidl::encoding::FlexibleResult::new(result),
12251 self.tx_id,
12252 0x2c421ec3faaeb8bb,
12253 fidl::encoding::DynamicFlags::FLEXIBLE,
12254 )
12255 }
12256}
12257
12258#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12259pub struct LinkableMarker;
12260
12261impl fidl::endpoints::ProtocolMarker for LinkableMarker {
12262 type Proxy = LinkableProxy;
12263 type RequestStream = LinkableRequestStream;
12264 #[cfg(target_os = "fuchsia")]
12265 type SynchronousProxy = LinkableSynchronousProxy;
12266
12267 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
12268}
12269pub type LinkableLinkIntoResult = Result<(), i32>;
12270
12271pub trait LinkableProxyInterface: Send + Sync {
12272 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
12273 + Send;
12274 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
12275}
12276#[derive(Debug)]
12277#[cfg(target_os = "fuchsia")]
12278pub struct LinkableSynchronousProxy {
12279 client: fidl::client::sync::Client,
12280}
12281
12282#[cfg(target_os = "fuchsia")]
12283impl fidl::endpoints::SynchronousProxy for LinkableSynchronousProxy {
12284 type Proxy = LinkableProxy;
12285 type Protocol = LinkableMarker;
12286
12287 fn from_channel(inner: fidl::Channel) -> Self {
12288 Self::new(inner)
12289 }
12290
12291 fn into_channel(self) -> fidl::Channel {
12292 self.client.into_channel()
12293 }
12294
12295 fn as_channel(&self) -> &fidl::Channel {
12296 self.client.as_channel()
12297 }
12298}
12299
12300#[cfg(target_os = "fuchsia")]
12301impl LinkableSynchronousProxy {
12302 pub fn new(channel: fidl::Channel) -> Self {
12303 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12304 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
12305 }
12306
12307 pub fn into_channel(self) -> fidl::Channel {
12308 self.client.into_channel()
12309 }
12310
12311 pub fn wait_for_event(
12314 &self,
12315 deadline: zx::MonotonicInstant,
12316 ) -> Result<LinkableEvent, fidl::Error> {
12317 LinkableEvent::decode(self.client.wait_for_event(deadline)?)
12318 }
12319
12320 pub fn r#link_into(
12343 &self,
12344 mut dst_parent_token: fidl::Event,
12345 mut dst: &str,
12346 ___deadline: zx::MonotonicInstant,
12347 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12348 let _response = self.client.send_query::<
12349 LinkableLinkIntoRequest,
12350 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12351 >(
12352 (dst_parent_token, dst,),
12353 0x54f3949246a03e74,
12354 fidl::encoding::DynamicFlags::empty(),
12355 ___deadline,
12356 )?;
12357 Ok(_response.map(|x| x))
12358 }
12359}
12360
12361#[cfg(target_os = "fuchsia")]
12362impl From<LinkableSynchronousProxy> for zx::Handle {
12363 fn from(value: LinkableSynchronousProxy) -> Self {
12364 value.into_channel().into()
12365 }
12366}
12367
12368#[cfg(target_os = "fuchsia")]
12369impl From<fidl::Channel> for LinkableSynchronousProxy {
12370 fn from(value: fidl::Channel) -> Self {
12371 Self::new(value)
12372 }
12373}
12374
12375#[derive(Debug, Clone)]
12376pub struct LinkableProxy {
12377 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
12378}
12379
12380impl fidl::endpoints::Proxy for LinkableProxy {
12381 type Protocol = LinkableMarker;
12382
12383 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
12384 Self::new(inner)
12385 }
12386
12387 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
12388 self.client.into_channel().map_err(|client| Self { client })
12389 }
12390
12391 fn as_channel(&self) -> &::fidl::AsyncChannel {
12392 self.client.as_channel()
12393 }
12394}
12395
12396impl LinkableProxy {
12397 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
12399 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12400 Self { client: fidl::client::Client::new(channel, protocol_name) }
12401 }
12402
12403 pub fn take_event_stream(&self) -> LinkableEventStream {
12409 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
12410 }
12411
12412 pub fn r#link_into(
12435 &self,
12436 mut dst_parent_token: fidl::Event,
12437 mut dst: &str,
12438 ) -> fidl::client::QueryResponseFut<
12439 LinkableLinkIntoResult,
12440 fidl::encoding::DefaultFuchsiaResourceDialect,
12441 > {
12442 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
12443 }
12444}
12445
12446impl LinkableProxyInterface for LinkableProxy {
12447 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
12448 LinkableLinkIntoResult,
12449 fidl::encoding::DefaultFuchsiaResourceDialect,
12450 >;
12451 fn r#link_into(
12452 &self,
12453 mut dst_parent_token: fidl::Event,
12454 mut dst: &str,
12455 ) -> Self::LinkIntoResponseFut {
12456 fn _decode(
12457 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
12458 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12459 let _response = fidl::client::decode_transaction_body::<
12460 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12461 fidl::encoding::DefaultFuchsiaResourceDialect,
12462 0x54f3949246a03e74,
12463 >(_buf?)?;
12464 Ok(_response.map(|x| x))
12465 }
12466 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
12467 (dst_parent_token, dst),
12468 0x54f3949246a03e74,
12469 fidl::encoding::DynamicFlags::empty(),
12470 _decode,
12471 )
12472 }
12473}
12474
12475pub struct LinkableEventStream {
12476 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
12477}
12478
12479impl std::marker::Unpin for LinkableEventStream {}
12480
12481impl futures::stream::FusedStream for LinkableEventStream {
12482 fn is_terminated(&self) -> bool {
12483 self.event_receiver.is_terminated()
12484 }
12485}
12486
12487impl futures::Stream for LinkableEventStream {
12488 type Item = Result<LinkableEvent, fidl::Error>;
12489
12490 fn poll_next(
12491 mut self: std::pin::Pin<&mut Self>,
12492 cx: &mut std::task::Context<'_>,
12493 ) -> std::task::Poll<Option<Self::Item>> {
12494 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
12495 &mut self.event_receiver,
12496 cx
12497 )?) {
12498 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
12499 None => std::task::Poll::Ready(None),
12500 }
12501 }
12502}
12503
12504#[derive(Debug)]
12505pub enum LinkableEvent {}
12506
12507impl LinkableEvent {
12508 fn decode(
12510 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
12511 ) -> Result<LinkableEvent, fidl::Error> {
12512 let (bytes, _handles) = buf.split_mut();
12513 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12514 debug_assert_eq!(tx_header.tx_id, 0);
12515 match tx_header.ordinal {
12516 _ => Err(fidl::Error::UnknownOrdinal {
12517 ordinal: tx_header.ordinal,
12518 protocol_name: <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12519 }),
12520 }
12521 }
12522}
12523
12524pub struct LinkableRequestStream {
12526 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12527 is_terminated: bool,
12528}
12529
12530impl std::marker::Unpin for LinkableRequestStream {}
12531
12532impl futures::stream::FusedStream for LinkableRequestStream {
12533 fn is_terminated(&self) -> bool {
12534 self.is_terminated
12535 }
12536}
12537
12538impl fidl::endpoints::RequestStream for LinkableRequestStream {
12539 type Protocol = LinkableMarker;
12540 type ControlHandle = LinkableControlHandle;
12541
12542 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
12543 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
12544 }
12545
12546 fn control_handle(&self) -> Self::ControlHandle {
12547 LinkableControlHandle { inner: self.inner.clone() }
12548 }
12549
12550 fn into_inner(
12551 self,
12552 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
12553 {
12554 (self.inner, self.is_terminated)
12555 }
12556
12557 fn from_inner(
12558 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12559 is_terminated: bool,
12560 ) -> Self {
12561 Self { inner, is_terminated }
12562 }
12563}
12564
12565impl futures::Stream for LinkableRequestStream {
12566 type Item = Result<LinkableRequest, fidl::Error>;
12567
12568 fn poll_next(
12569 mut self: std::pin::Pin<&mut Self>,
12570 cx: &mut std::task::Context<'_>,
12571 ) -> std::task::Poll<Option<Self::Item>> {
12572 let this = &mut *self;
12573 if this.inner.check_shutdown(cx) {
12574 this.is_terminated = true;
12575 return std::task::Poll::Ready(None);
12576 }
12577 if this.is_terminated {
12578 panic!("polled LinkableRequestStream after completion");
12579 }
12580 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
12581 |bytes, handles| {
12582 match this.inner.channel().read_etc(cx, bytes, handles) {
12583 std::task::Poll::Ready(Ok(())) => {}
12584 std::task::Poll::Pending => return std::task::Poll::Pending,
12585 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
12586 this.is_terminated = true;
12587 return std::task::Poll::Ready(None);
12588 }
12589 std::task::Poll::Ready(Err(e)) => {
12590 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
12591 e.into(),
12592 ))))
12593 }
12594 }
12595
12596 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12598
12599 std::task::Poll::Ready(Some(match header.ordinal {
12600 0x54f3949246a03e74 => {
12601 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12602 let mut req = fidl::new_empty!(
12603 LinkableLinkIntoRequest,
12604 fidl::encoding::DefaultFuchsiaResourceDialect
12605 );
12606 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
12607 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
12608 Ok(LinkableRequest::LinkInto {
12609 dst_parent_token: req.dst_parent_token,
12610 dst: req.dst,
12611
12612 responder: LinkableLinkIntoResponder {
12613 control_handle: std::mem::ManuallyDrop::new(control_handle),
12614 tx_id: header.tx_id,
12615 },
12616 })
12617 }
12618 _ => Err(fidl::Error::UnknownOrdinal {
12619 ordinal: header.ordinal,
12620 protocol_name:
12621 <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12622 }),
12623 }))
12624 },
12625 )
12626 }
12627}
12628
12629#[derive(Debug)]
12630pub enum LinkableRequest {
12631 LinkInto { dst_parent_token: fidl::Event, dst: String, responder: LinkableLinkIntoResponder },
12654}
12655
12656impl LinkableRequest {
12657 #[allow(irrefutable_let_patterns)]
12658 pub fn into_link_into(self) -> Option<(fidl::Event, String, LinkableLinkIntoResponder)> {
12659 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
12660 Some((dst_parent_token, dst, responder))
12661 } else {
12662 None
12663 }
12664 }
12665
12666 pub fn method_name(&self) -> &'static str {
12668 match *self {
12669 LinkableRequest::LinkInto { .. } => "link_into",
12670 }
12671 }
12672}
12673
12674#[derive(Debug, Clone)]
12675pub struct LinkableControlHandle {
12676 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12677}
12678
12679impl fidl::endpoints::ControlHandle for LinkableControlHandle {
12680 fn shutdown(&self) {
12681 self.inner.shutdown()
12682 }
12683 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
12684 self.inner.shutdown_with_epitaph(status)
12685 }
12686
12687 fn is_closed(&self) -> bool {
12688 self.inner.channel().is_closed()
12689 }
12690 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
12691 self.inner.channel().on_closed()
12692 }
12693
12694 #[cfg(target_os = "fuchsia")]
12695 fn signal_peer(
12696 &self,
12697 clear_mask: zx::Signals,
12698 set_mask: zx::Signals,
12699 ) -> Result<(), zx_status::Status> {
12700 use fidl::Peered;
12701 self.inner.channel().signal_peer(clear_mask, set_mask)
12702 }
12703}
12704
12705impl LinkableControlHandle {}
12706
12707#[must_use = "FIDL methods require a response to be sent"]
12708#[derive(Debug)]
12709pub struct LinkableLinkIntoResponder {
12710 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
12711 tx_id: u32,
12712}
12713
12714impl std::ops::Drop for LinkableLinkIntoResponder {
12718 fn drop(&mut self) {
12719 self.control_handle.shutdown();
12720 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12722 }
12723}
12724
12725impl fidl::endpoints::Responder for LinkableLinkIntoResponder {
12726 type ControlHandle = LinkableControlHandle;
12727
12728 fn control_handle(&self) -> &LinkableControlHandle {
12729 &self.control_handle
12730 }
12731
12732 fn drop_without_shutdown(mut self) {
12733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12735 std::mem::forget(self);
12737 }
12738}
12739
12740impl LinkableLinkIntoResponder {
12741 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12745 let _result = self.send_raw(result);
12746 if _result.is_err() {
12747 self.control_handle.shutdown();
12748 }
12749 self.drop_without_shutdown();
12750 _result
12751 }
12752
12753 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12755 let _result = self.send_raw(result);
12756 self.drop_without_shutdown();
12757 _result
12758 }
12759
12760 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12761 self.control_handle
12762 .inner
12763 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12764 result,
12765 self.tx_id,
12766 0x54f3949246a03e74,
12767 fidl::encoding::DynamicFlags::empty(),
12768 )
12769 }
12770}
12771
12772#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12773pub struct NodeMarker;
12774
12775impl fidl::endpoints::ProtocolMarker for NodeMarker {
12776 type Proxy = NodeProxy;
12777 type RequestStream = NodeRequestStream;
12778 #[cfg(target_os = "fuchsia")]
12779 type SynchronousProxy = NodeSynchronousProxy;
12780
12781 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
12782}
12783impl fidl::endpoints::DiscoverableProtocolMarker for NodeMarker {}
12784pub type NodeGetFlagsResult = Result<Flags, i32>;
12785pub type NodeSetFlagsResult = Result<(), i32>;
12786pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
12787pub type NodeUpdateAttributesResult = Result<(), i32>;
12788pub type NodeSyncResult = Result<(), i32>;
12789pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
12790pub type NodeSetExtendedAttributeResult = Result<(), i32>;
12791pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
12792
12793pub trait NodeProxyInterface: Send + Sync {
12794 fn r#clone(
12795 &self,
12796 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12797 ) -> Result<(), fidl::Error>;
12798 type CloseResponseFut: std::future::Future<
12799 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
12800 > + Send;
12801 fn r#close(&self) -> Self::CloseResponseFut;
12802 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
12803 fn r#query(&self) -> Self::QueryResponseFut;
12804 fn r#deprecated_clone(
12805 &self,
12806 flags: OpenFlags,
12807 object: fidl::endpoints::ServerEnd<NodeMarker>,
12808 ) -> Result<(), fidl::Error>;
12809 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
12810 + Send;
12811 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
12812 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
12813 fn r#deprecated_set_attr(
12814 &self,
12815 flags: NodeAttributeFlags,
12816 attributes: &NodeAttributes,
12817 ) -> Self::DeprecatedSetAttrResponseFut;
12818 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
12819 + Send;
12820 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
12821 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
12822 + Send;
12823 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
12824 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
12825 + Send;
12826 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
12827 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
12828 + Send;
12829 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
12830 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
12831 + Send;
12832 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
12833 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
12834 + Send;
12835 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
12836 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
12837 + Send;
12838 fn r#update_attributes(
12839 &self,
12840 payload: &MutableNodeAttributes,
12841 ) -> Self::UpdateAttributesResponseFut;
12842 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
12843 fn r#sync(&self) -> Self::SyncResponseFut;
12844 fn r#list_extended_attributes(
12845 &self,
12846 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
12847 ) -> Result<(), fidl::Error>;
12848 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
12849 + Send;
12850 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
12851 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
12852 + Send;
12853 fn r#set_extended_attribute(
12854 &self,
12855 name: &[u8],
12856 value: ExtendedAttributeValue,
12857 mode: SetExtendedAttributeMode,
12858 ) -> Self::SetExtendedAttributeResponseFut;
12859 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
12860 + Send;
12861 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
12862}
12863#[derive(Debug)]
12864#[cfg(target_os = "fuchsia")]
12865pub struct NodeSynchronousProxy {
12866 client: fidl::client::sync::Client,
12867}
12868
12869#[cfg(target_os = "fuchsia")]
12870impl fidl::endpoints::SynchronousProxy for NodeSynchronousProxy {
12871 type Proxy = NodeProxy;
12872 type Protocol = NodeMarker;
12873
12874 fn from_channel(inner: fidl::Channel) -> Self {
12875 Self::new(inner)
12876 }
12877
12878 fn into_channel(self) -> fidl::Channel {
12879 self.client.into_channel()
12880 }
12881
12882 fn as_channel(&self) -> &fidl::Channel {
12883 self.client.as_channel()
12884 }
12885}
12886
12887#[cfg(target_os = "fuchsia")]
12888impl NodeSynchronousProxy {
12889 pub fn new(channel: fidl::Channel) -> Self {
12890 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12891 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
12892 }
12893
12894 pub fn into_channel(self) -> fidl::Channel {
12895 self.client.into_channel()
12896 }
12897
12898 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<NodeEvent, fidl::Error> {
12901 NodeEvent::decode(self.client.wait_for_event(deadline)?)
12902 }
12903
12904 pub fn r#clone(
12905 &self,
12906 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12907 ) -> Result<(), fidl::Error> {
12908 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
12909 (request,),
12910 0x20d8a7aba2168a79,
12911 fidl::encoding::DynamicFlags::empty(),
12912 )
12913 }
12914
12915 pub fn r#close(
12926 &self,
12927 ___deadline: zx::MonotonicInstant,
12928 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
12929 let _response = self.client.send_query::<
12930 fidl::encoding::EmptyPayload,
12931 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12932 >(
12933 (),
12934 0x5ac5d459ad7f657e,
12935 fidl::encoding::DynamicFlags::empty(),
12936 ___deadline,
12937 )?;
12938 Ok(_response.map(|x| x))
12939 }
12940
12941 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
12942 let _response = self.client.send_query::<
12943 fidl::encoding::EmptyPayload,
12944 fidl_fuchsia_unknown::QueryableQueryResponse,
12945 >(
12946 (),
12947 0x2658edee9decfc06,
12948 fidl::encoding::DynamicFlags::empty(),
12949 ___deadline,
12950 )?;
12951 Ok(_response.protocol)
12952 }
12953
12954 pub fn r#deprecated_clone(
12956 &self,
12957 mut flags: OpenFlags,
12958 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
12959 ) -> Result<(), fidl::Error> {
12960 self.client.send::<NodeDeprecatedCloneRequest>(
12961 (flags, object),
12962 0x5a61678f293ce16f,
12963 fidl::encoding::DynamicFlags::FLEXIBLE,
12964 )
12965 }
12966
12967 pub fn r#deprecated_get_attr(
12969 &self,
12970 ___deadline: zx::MonotonicInstant,
12971 ) -> Result<(i32, NodeAttributes), fidl::Error> {
12972 let _response =
12973 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
12974 (),
12975 0x78985e216314dafd,
12976 fidl::encoding::DynamicFlags::empty(),
12977 ___deadline,
12978 )?;
12979 Ok((_response.s, _response.attributes))
12980 }
12981
12982 pub fn r#deprecated_set_attr(
12984 &self,
12985 mut flags: NodeAttributeFlags,
12986 mut attributes: &NodeAttributes,
12987 ___deadline: zx::MonotonicInstant,
12988 ) -> Result<i32, fidl::Error> {
12989 let _response =
12990 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
12991 (flags, attributes),
12992 0x4186c0f40d938f46,
12993 fidl::encoding::DynamicFlags::empty(),
12994 ___deadline,
12995 )?;
12996 Ok(_response.s)
12997 }
12998
12999 pub fn r#deprecated_get_flags(
13001 &self,
13002 ___deadline: zx::MonotonicInstant,
13003 ) -> Result<(i32, OpenFlags), fidl::Error> {
13004 let _response = self
13005 .client
13006 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
13007 (),
13008 0x5b88fffb8eda3aa1,
13009 fidl::encoding::DynamicFlags::empty(),
13010 ___deadline,
13011 )?;
13012 Ok((_response.s, _response.flags))
13013 }
13014
13015 pub fn r#deprecated_set_flags(
13017 &self,
13018 mut flags: OpenFlags,
13019 ___deadline: zx::MonotonicInstant,
13020 ) -> Result<i32, fidl::Error> {
13021 let _response = self
13022 .client
13023 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
13024 (flags,),
13025 0x5295b76c71fde733,
13026 fidl::encoding::DynamicFlags::empty(),
13027 ___deadline,
13028 )?;
13029 Ok(_response.s)
13030 }
13031
13032 pub fn r#get_flags(
13041 &self,
13042 ___deadline: zx::MonotonicInstant,
13043 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13044 let _response = self.client.send_query::<
13045 fidl::encoding::EmptyPayload,
13046 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13047 >(
13048 (),
13049 0x176eb318f64ec23,
13050 fidl::encoding::DynamicFlags::FLEXIBLE,
13051 ___deadline,
13052 )?
13053 .into_result::<NodeMarker>("get_flags")?;
13054 Ok(_response.map(|x| x.flags))
13055 }
13056
13057 pub fn r#set_flags(
13067 &self,
13068 mut flags: Flags,
13069 ___deadline: zx::MonotonicInstant,
13070 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13071 let _response = self.client.send_query::<
13072 NodeSetFlagsRequest,
13073 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13074 >(
13075 (flags,),
13076 0x55a8028685791ea8,
13077 fidl::encoding::DynamicFlags::FLEXIBLE,
13078 ___deadline,
13079 )?
13080 .into_result::<NodeMarker>("set_flags")?;
13081 Ok(_response.map(|x| x))
13082 }
13083
13084 pub fn r#query_filesystem(
13086 &self,
13087 ___deadline: zx::MonotonicInstant,
13088 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13089 let _response =
13090 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
13091 (),
13092 0x6f344a1c6b0a0610,
13093 fidl::encoding::DynamicFlags::empty(),
13094 ___deadline,
13095 )?;
13096 Ok((_response.s, _response.info))
13097 }
13098
13099 pub fn r#get_attributes(
13113 &self,
13114 mut query: NodeAttributesQuery,
13115 ___deadline: zx::MonotonicInstant,
13116 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13117 let _response = self.client.send_query::<
13118 NodeGetAttributesRequest,
13119 fidl::encoding::ResultType<NodeAttributes2, i32>,
13120 >(
13121 (query,),
13122 0x3d4396a638ea053b,
13123 fidl::encoding::DynamicFlags::empty(),
13124 ___deadline,
13125 )?;
13126 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13127 }
13128
13129 pub fn r#update_attributes(
13138 &self,
13139 mut payload: &MutableNodeAttributes,
13140 ___deadline: zx::MonotonicInstant,
13141 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13142 let _response = self.client.send_query::<
13143 MutableNodeAttributes,
13144 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13145 >(
13146 payload,
13147 0x3308c1da5a89bf08,
13148 fidl::encoding::DynamicFlags::empty(),
13149 ___deadline,
13150 )?;
13151 Ok(_response.map(|x| x))
13152 }
13153
13154 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
13164 let _response = self.client.send_query::<
13165 fidl::encoding::EmptyPayload,
13166 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13167 >(
13168 (),
13169 0x2c5c27ca0ab5dc49,
13170 fidl::encoding::DynamicFlags::empty(),
13171 ___deadline,
13172 )?;
13173 Ok(_response.map(|x| x))
13174 }
13175
13176 pub fn r#list_extended_attributes(
13185 &self,
13186 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13187 ) -> Result<(), fidl::Error> {
13188 self.client.send::<NodeListExtendedAttributesRequest>(
13189 (iterator,),
13190 0x4b61033de007fcd0,
13191 fidl::encoding::DynamicFlags::empty(),
13192 )
13193 }
13194
13195 pub fn r#get_extended_attribute(
13202 &self,
13203 mut name: &[u8],
13204 ___deadline: zx::MonotonicInstant,
13205 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13206 let _response = self.client.send_query::<
13207 NodeGetExtendedAttributeRequest,
13208 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13209 >(
13210 (name,),
13211 0x45ffa3ccfdeb76db,
13212 fidl::encoding::DynamicFlags::empty(),
13213 ___deadline,
13214 )?;
13215 Ok(_response.map(|x| x))
13216 }
13217
13218 pub fn r#set_extended_attribute(
13226 &self,
13227 mut name: &[u8],
13228 mut value: ExtendedAttributeValue,
13229 mut mode: SetExtendedAttributeMode,
13230 ___deadline: zx::MonotonicInstant,
13231 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13232 let _response = self.client.send_query::<
13233 NodeSetExtendedAttributeRequest,
13234 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13235 >(
13236 (name, &mut value, mode,),
13237 0x4a951362f681f23c,
13238 fidl::encoding::DynamicFlags::empty(),
13239 ___deadline,
13240 )?;
13241 Ok(_response.map(|x| x))
13242 }
13243
13244 pub fn r#remove_extended_attribute(
13250 &self,
13251 mut name: &[u8],
13252 ___deadline: zx::MonotonicInstant,
13253 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13254 let _response = self.client.send_query::<
13255 NodeRemoveExtendedAttributeRequest,
13256 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13257 >(
13258 (name,),
13259 0x7a0b9f3a9bf9032d,
13260 fidl::encoding::DynamicFlags::empty(),
13261 ___deadline,
13262 )?;
13263 Ok(_response.map(|x| x))
13264 }
13265}
13266
13267#[cfg(target_os = "fuchsia")]
13268impl From<NodeSynchronousProxy> for zx::Handle {
13269 fn from(value: NodeSynchronousProxy) -> Self {
13270 value.into_channel().into()
13271 }
13272}
13273
13274#[cfg(target_os = "fuchsia")]
13275impl From<fidl::Channel> for NodeSynchronousProxy {
13276 fn from(value: fidl::Channel) -> Self {
13277 Self::new(value)
13278 }
13279}
13280
13281#[derive(Debug, Clone)]
13282pub struct NodeProxy {
13283 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
13284}
13285
13286impl fidl::endpoints::Proxy for NodeProxy {
13287 type Protocol = NodeMarker;
13288
13289 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
13290 Self::new(inner)
13291 }
13292
13293 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
13294 self.client.into_channel().map_err(|client| Self { client })
13295 }
13296
13297 fn as_channel(&self) -> &::fidl::AsyncChannel {
13298 self.client.as_channel()
13299 }
13300}
13301
13302impl NodeProxy {
13303 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
13305 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
13306 Self { client: fidl::client::Client::new(channel, protocol_name) }
13307 }
13308
13309 pub fn take_event_stream(&self) -> NodeEventStream {
13315 NodeEventStream { event_receiver: self.client.take_event_receiver() }
13316 }
13317
13318 pub fn r#clone(
13319 &self,
13320 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13321 ) -> Result<(), fidl::Error> {
13322 NodeProxyInterface::r#clone(self, request)
13323 }
13324
13325 pub fn r#close(
13336 &self,
13337 ) -> fidl::client::QueryResponseFut<
13338 fidl_fuchsia_unknown::CloseableCloseResult,
13339 fidl::encoding::DefaultFuchsiaResourceDialect,
13340 > {
13341 NodeProxyInterface::r#close(self)
13342 }
13343
13344 pub fn r#query(
13345 &self,
13346 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
13347 {
13348 NodeProxyInterface::r#query(self)
13349 }
13350
13351 pub fn r#deprecated_clone(
13353 &self,
13354 mut flags: OpenFlags,
13355 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13356 ) -> Result<(), fidl::Error> {
13357 NodeProxyInterface::r#deprecated_clone(self, flags, object)
13358 }
13359
13360 pub fn r#deprecated_get_attr(
13362 &self,
13363 ) -> fidl::client::QueryResponseFut<
13364 (i32, NodeAttributes),
13365 fidl::encoding::DefaultFuchsiaResourceDialect,
13366 > {
13367 NodeProxyInterface::r#deprecated_get_attr(self)
13368 }
13369
13370 pub fn r#deprecated_set_attr(
13372 &self,
13373 mut flags: NodeAttributeFlags,
13374 mut attributes: &NodeAttributes,
13375 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13376 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
13377 }
13378
13379 pub fn r#deprecated_get_flags(
13381 &self,
13382 ) -> fidl::client::QueryResponseFut<
13383 (i32, OpenFlags),
13384 fidl::encoding::DefaultFuchsiaResourceDialect,
13385 > {
13386 NodeProxyInterface::r#deprecated_get_flags(self)
13387 }
13388
13389 pub fn r#deprecated_set_flags(
13391 &self,
13392 mut flags: OpenFlags,
13393 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13394 NodeProxyInterface::r#deprecated_set_flags(self, flags)
13395 }
13396
13397 pub fn r#get_flags(
13406 &self,
13407 ) -> fidl::client::QueryResponseFut<
13408 NodeGetFlagsResult,
13409 fidl::encoding::DefaultFuchsiaResourceDialect,
13410 > {
13411 NodeProxyInterface::r#get_flags(self)
13412 }
13413
13414 pub fn r#set_flags(
13424 &self,
13425 mut flags: Flags,
13426 ) -> fidl::client::QueryResponseFut<
13427 NodeSetFlagsResult,
13428 fidl::encoding::DefaultFuchsiaResourceDialect,
13429 > {
13430 NodeProxyInterface::r#set_flags(self, flags)
13431 }
13432
13433 pub fn r#query_filesystem(
13435 &self,
13436 ) -> fidl::client::QueryResponseFut<
13437 (i32, Option<Box<FilesystemInfo>>),
13438 fidl::encoding::DefaultFuchsiaResourceDialect,
13439 > {
13440 NodeProxyInterface::r#query_filesystem(self)
13441 }
13442
13443 pub fn r#get_attributes(
13457 &self,
13458 mut query: NodeAttributesQuery,
13459 ) -> fidl::client::QueryResponseFut<
13460 NodeGetAttributesResult,
13461 fidl::encoding::DefaultFuchsiaResourceDialect,
13462 > {
13463 NodeProxyInterface::r#get_attributes(self, query)
13464 }
13465
13466 pub fn r#update_attributes(
13475 &self,
13476 mut payload: &MutableNodeAttributes,
13477 ) -> fidl::client::QueryResponseFut<
13478 NodeUpdateAttributesResult,
13479 fidl::encoding::DefaultFuchsiaResourceDialect,
13480 > {
13481 NodeProxyInterface::r#update_attributes(self, payload)
13482 }
13483
13484 pub fn r#sync(
13494 &self,
13495 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
13496 {
13497 NodeProxyInterface::r#sync(self)
13498 }
13499
13500 pub fn r#list_extended_attributes(
13509 &self,
13510 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13511 ) -> Result<(), fidl::Error> {
13512 NodeProxyInterface::r#list_extended_attributes(self, iterator)
13513 }
13514
13515 pub fn r#get_extended_attribute(
13522 &self,
13523 mut name: &[u8],
13524 ) -> fidl::client::QueryResponseFut<
13525 NodeGetExtendedAttributeResult,
13526 fidl::encoding::DefaultFuchsiaResourceDialect,
13527 > {
13528 NodeProxyInterface::r#get_extended_attribute(self, name)
13529 }
13530
13531 pub fn r#set_extended_attribute(
13539 &self,
13540 mut name: &[u8],
13541 mut value: ExtendedAttributeValue,
13542 mut mode: SetExtendedAttributeMode,
13543 ) -> fidl::client::QueryResponseFut<
13544 NodeSetExtendedAttributeResult,
13545 fidl::encoding::DefaultFuchsiaResourceDialect,
13546 > {
13547 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
13548 }
13549
13550 pub fn r#remove_extended_attribute(
13556 &self,
13557 mut name: &[u8],
13558 ) -> fidl::client::QueryResponseFut<
13559 NodeRemoveExtendedAttributeResult,
13560 fidl::encoding::DefaultFuchsiaResourceDialect,
13561 > {
13562 NodeProxyInterface::r#remove_extended_attribute(self, name)
13563 }
13564}
13565
13566impl NodeProxyInterface for NodeProxy {
13567 fn r#clone(
13568 &self,
13569 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13570 ) -> Result<(), fidl::Error> {
13571 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13572 (request,),
13573 0x20d8a7aba2168a79,
13574 fidl::encoding::DynamicFlags::empty(),
13575 )
13576 }
13577
13578 type CloseResponseFut = fidl::client::QueryResponseFut<
13579 fidl_fuchsia_unknown::CloseableCloseResult,
13580 fidl::encoding::DefaultFuchsiaResourceDialect,
13581 >;
13582 fn r#close(&self) -> Self::CloseResponseFut {
13583 fn _decode(
13584 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13585 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13586 let _response = fidl::client::decode_transaction_body::<
13587 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13588 fidl::encoding::DefaultFuchsiaResourceDialect,
13589 0x5ac5d459ad7f657e,
13590 >(_buf?)?;
13591 Ok(_response.map(|x| x))
13592 }
13593 self.client.send_query_and_decode::<
13594 fidl::encoding::EmptyPayload,
13595 fidl_fuchsia_unknown::CloseableCloseResult,
13596 >(
13597 (),
13598 0x5ac5d459ad7f657e,
13599 fidl::encoding::DynamicFlags::empty(),
13600 _decode,
13601 )
13602 }
13603
13604 type QueryResponseFut =
13605 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
13606 fn r#query(&self) -> Self::QueryResponseFut {
13607 fn _decode(
13608 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13609 ) -> Result<Vec<u8>, fidl::Error> {
13610 let _response = fidl::client::decode_transaction_body::<
13611 fidl_fuchsia_unknown::QueryableQueryResponse,
13612 fidl::encoding::DefaultFuchsiaResourceDialect,
13613 0x2658edee9decfc06,
13614 >(_buf?)?;
13615 Ok(_response.protocol)
13616 }
13617 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
13618 (),
13619 0x2658edee9decfc06,
13620 fidl::encoding::DynamicFlags::empty(),
13621 _decode,
13622 )
13623 }
13624
13625 fn r#deprecated_clone(
13626 &self,
13627 mut flags: OpenFlags,
13628 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13629 ) -> Result<(), fidl::Error> {
13630 self.client.send::<NodeDeprecatedCloneRequest>(
13631 (flags, object),
13632 0x5a61678f293ce16f,
13633 fidl::encoding::DynamicFlags::FLEXIBLE,
13634 )
13635 }
13636
13637 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
13638 (i32, NodeAttributes),
13639 fidl::encoding::DefaultFuchsiaResourceDialect,
13640 >;
13641 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
13642 fn _decode(
13643 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13644 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13645 let _response = fidl::client::decode_transaction_body::<
13646 NodeDeprecatedGetAttrResponse,
13647 fidl::encoding::DefaultFuchsiaResourceDialect,
13648 0x78985e216314dafd,
13649 >(_buf?)?;
13650 Ok((_response.s, _response.attributes))
13651 }
13652 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
13653 (),
13654 0x78985e216314dafd,
13655 fidl::encoding::DynamicFlags::empty(),
13656 _decode,
13657 )
13658 }
13659
13660 type DeprecatedSetAttrResponseFut =
13661 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13662 fn r#deprecated_set_attr(
13663 &self,
13664 mut flags: NodeAttributeFlags,
13665 mut attributes: &NodeAttributes,
13666 ) -> Self::DeprecatedSetAttrResponseFut {
13667 fn _decode(
13668 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13669 ) -> Result<i32, fidl::Error> {
13670 let _response = fidl::client::decode_transaction_body::<
13671 NodeDeprecatedSetAttrResponse,
13672 fidl::encoding::DefaultFuchsiaResourceDialect,
13673 0x4186c0f40d938f46,
13674 >(_buf?)?;
13675 Ok(_response.s)
13676 }
13677 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
13678 (flags, attributes),
13679 0x4186c0f40d938f46,
13680 fidl::encoding::DynamicFlags::empty(),
13681 _decode,
13682 )
13683 }
13684
13685 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
13686 (i32, OpenFlags),
13687 fidl::encoding::DefaultFuchsiaResourceDialect,
13688 >;
13689 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
13690 fn _decode(
13691 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13692 ) -> Result<(i32, OpenFlags), fidl::Error> {
13693 let _response = fidl::client::decode_transaction_body::<
13694 NodeDeprecatedGetFlagsResponse,
13695 fidl::encoding::DefaultFuchsiaResourceDialect,
13696 0x5b88fffb8eda3aa1,
13697 >(_buf?)?;
13698 Ok((_response.s, _response.flags))
13699 }
13700 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
13701 (),
13702 0x5b88fffb8eda3aa1,
13703 fidl::encoding::DynamicFlags::empty(),
13704 _decode,
13705 )
13706 }
13707
13708 type DeprecatedSetFlagsResponseFut =
13709 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13710 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
13711 fn _decode(
13712 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13713 ) -> Result<i32, fidl::Error> {
13714 let _response = fidl::client::decode_transaction_body::<
13715 NodeDeprecatedSetFlagsResponse,
13716 fidl::encoding::DefaultFuchsiaResourceDialect,
13717 0x5295b76c71fde733,
13718 >(_buf?)?;
13719 Ok(_response.s)
13720 }
13721 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
13722 (flags,),
13723 0x5295b76c71fde733,
13724 fidl::encoding::DynamicFlags::empty(),
13725 _decode,
13726 )
13727 }
13728
13729 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
13730 NodeGetFlagsResult,
13731 fidl::encoding::DefaultFuchsiaResourceDialect,
13732 >;
13733 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
13734 fn _decode(
13735 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13736 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13737 let _response = fidl::client::decode_transaction_body::<
13738 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13739 fidl::encoding::DefaultFuchsiaResourceDialect,
13740 0x176eb318f64ec23,
13741 >(_buf?)?
13742 .into_result::<NodeMarker>("get_flags")?;
13743 Ok(_response.map(|x| x.flags))
13744 }
13745 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
13746 (),
13747 0x176eb318f64ec23,
13748 fidl::encoding::DynamicFlags::FLEXIBLE,
13749 _decode,
13750 )
13751 }
13752
13753 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
13754 NodeSetFlagsResult,
13755 fidl::encoding::DefaultFuchsiaResourceDialect,
13756 >;
13757 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
13758 fn _decode(
13759 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13760 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13761 let _response = fidl::client::decode_transaction_body::<
13762 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13763 fidl::encoding::DefaultFuchsiaResourceDialect,
13764 0x55a8028685791ea8,
13765 >(_buf?)?
13766 .into_result::<NodeMarker>("set_flags")?;
13767 Ok(_response.map(|x| x))
13768 }
13769 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
13770 (flags,),
13771 0x55a8028685791ea8,
13772 fidl::encoding::DynamicFlags::FLEXIBLE,
13773 _decode,
13774 )
13775 }
13776
13777 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
13778 (i32, Option<Box<FilesystemInfo>>),
13779 fidl::encoding::DefaultFuchsiaResourceDialect,
13780 >;
13781 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
13782 fn _decode(
13783 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13784 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13785 let _response = fidl::client::decode_transaction_body::<
13786 NodeQueryFilesystemResponse,
13787 fidl::encoding::DefaultFuchsiaResourceDialect,
13788 0x6f344a1c6b0a0610,
13789 >(_buf?)?;
13790 Ok((_response.s, _response.info))
13791 }
13792 self.client.send_query_and_decode::<
13793 fidl::encoding::EmptyPayload,
13794 (i32, Option<Box<FilesystemInfo>>),
13795 >(
13796 (),
13797 0x6f344a1c6b0a0610,
13798 fidl::encoding::DynamicFlags::empty(),
13799 _decode,
13800 )
13801 }
13802
13803 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
13804 NodeGetAttributesResult,
13805 fidl::encoding::DefaultFuchsiaResourceDialect,
13806 >;
13807 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
13808 fn _decode(
13809 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13810 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13811 let _response = fidl::client::decode_transaction_body::<
13812 fidl::encoding::ResultType<NodeAttributes2, i32>,
13813 fidl::encoding::DefaultFuchsiaResourceDialect,
13814 0x3d4396a638ea053b,
13815 >(_buf?)?;
13816 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13817 }
13818 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
13819 (query,),
13820 0x3d4396a638ea053b,
13821 fidl::encoding::DynamicFlags::empty(),
13822 _decode,
13823 )
13824 }
13825
13826 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
13827 NodeUpdateAttributesResult,
13828 fidl::encoding::DefaultFuchsiaResourceDialect,
13829 >;
13830 fn r#update_attributes(
13831 &self,
13832 mut payload: &MutableNodeAttributes,
13833 ) -> Self::UpdateAttributesResponseFut {
13834 fn _decode(
13835 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13836 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13837 let _response = fidl::client::decode_transaction_body::<
13838 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13839 fidl::encoding::DefaultFuchsiaResourceDialect,
13840 0x3308c1da5a89bf08,
13841 >(_buf?)?;
13842 Ok(_response.map(|x| x))
13843 }
13844 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
13845 payload,
13846 0x3308c1da5a89bf08,
13847 fidl::encoding::DynamicFlags::empty(),
13848 _decode,
13849 )
13850 }
13851
13852 type SyncResponseFut = fidl::client::QueryResponseFut<
13853 NodeSyncResult,
13854 fidl::encoding::DefaultFuchsiaResourceDialect,
13855 >;
13856 fn r#sync(&self) -> Self::SyncResponseFut {
13857 fn _decode(
13858 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13859 ) -> Result<NodeSyncResult, fidl::Error> {
13860 let _response = fidl::client::decode_transaction_body::<
13861 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13862 fidl::encoding::DefaultFuchsiaResourceDialect,
13863 0x2c5c27ca0ab5dc49,
13864 >(_buf?)?;
13865 Ok(_response.map(|x| x))
13866 }
13867 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
13868 (),
13869 0x2c5c27ca0ab5dc49,
13870 fidl::encoding::DynamicFlags::empty(),
13871 _decode,
13872 )
13873 }
13874
13875 fn r#list_extended_attributes(
13876 &self,
13877 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13878 ) -> Result<(), fidl::Error> {
13879 self.client.send::<NodeListExtendedAttributesRequest>(
13880 (iterator,),
13881 0x4b61033de007fcd0,
13882 fidl::encoding::DynamicFlags::empty(),
13883 )
13884 }
13885
13886 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13887 NodeGetExtendedAttributeResult,
13888 fidl::encoding::DefaultFuchsiaResourceDialect,
13889 >;
13890 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
13891 fn _decode(
13892 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13893 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13894 let _response = fidl::client::decode_transaction_body::<
13895 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13896 fidl::encoding::DefaultFuchsiaResourceDialect,
13897 0x45ffa3ccfdeb76db,
13898 >(_buf?)?;
13899 Ok(_response.map(|x| x))
13900 }
13901 self.client.send_query_and_decode::<
13902 NodeGetExtendedAttributeRequest,
13903 NodeGetExtendedAttributeResult,
13904 >(
13905 (name,),
13906 0x45ffa3ccfdeb76db,
13907 fidl::encoding::DynamicFlags::empty(),
13908 _decode,
13909 )
13910 }
13911
13912 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13913 NodeSetExtendedAttributeResult,
13914 fidl::encoding::DefaultFuchsiaResourceDialect,
13915 >;
13916 fn r#set_extended_attribute(
13917 &self,
13918 mut name: &[u8],
13919 mut value: ExtendedAttributeValue,
13920 mut mode: SetExtendedAttributeMode,
13921 ) -> Self::SetExtendedAttributeResponseFut {
13922 fn _decode(
13923 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13924 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13925 let _response = fidl::client::decode_transaction_body::<
13926 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13927 fidl::encoding::DefaultFuchsiaResourceDialect,
13928 0x4a951362f681f23c,
13929 >(_buf?)?;
13930 Ok(_response.map(|x| x))
13931 }
13932 self.client.send_query_and_decode::<
13933 NodeSetExtendedAttributeRequest,
13934 NodeSetExtendedAttributeResult,
13935 >(
13936 (name, &mut value, mode,),
13937 0x4a951362f681f23c,
13938 fidl::encoding::DynamicFlags::empty(),
13939 _decode,
13940 )
13941 }
13942
13943 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13944 NodeRemoveExtendedAttributeResult,
13945 fidl::encoding::DefaultFuchsiaResourceDialect,
13946 >;
13947 fn r#remove_extended_attribute(
13948 &self,
13949 mut name: &[u8],
13950 ) -> Self::RemoveExtendedAttributeResponseFut {
13951 fn _decode(
13952 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13953 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13954 let _response = fidl::client::decode_transaction_body::<
13955 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13956 fidl::encoding::DefaultFuchsiaResourceDialect,
13957 0x7a0b9f3a9bf9032d,
13958 >(_buf?)?;
13959 Ok(_response.map(|x| x))
13960 }
13961 self.client.send_query_and_decode::<
13962 NodeRemoveExtendedAttributeRequest,
13963 NodeRemoveExtendedAttributeResult,
13964 >(
13965 (name,),
13966 0x7a0b9f3a9bf9032d,
13967 fidl::encoding::DynamicFlags::empty(),
13968 _decode,
13969 )
13970 }
13971}
13972
13973pub struct NodeEventStream {
13974 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
13975}
13976
13977impl std::marker::Unpin for NodeEventStream {}
13978
13979impl futures::stream::FusedStream for NodeEventStream {
13980 fn is_terminated(&self) -> bool {
13981 self.event_receiver.is_terminated()
13982 }
13983}
13984
13985impl futures::Stream for NodeEventStream {
13986 type Item = Result<NodeEvent, fidl::Error>;
13987
13988 fn poll_next(
13989 mut self: std::pin::Pin<&mut Self>,
13990 cx: &mut std::task::Context<'_>,
13991 ) -> std::task::Poll<Option<Self::Item>> {
13992 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13993 &mut self.event_receiver,
13994 cx
13995 )?) {
13996 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
13997 None => std::task::Poll::Ready(None),
13998 }
13999 }
14000}
14001
14002#[derive(Debug)]
14003pub enum NodeEvent {
14004 OnOpen_ {
14005 s: i32,
14006 info: Option<Box<NodeInfoDeprecated>>,
14007 },
14008 OnRepresentation {
14009 payload: Representation,
14010 },
14011 #[non_exhaustive]
14012 _UnknownEvent {
14013 ordinal: u64,
14015 },
14016}
14017
14018impl NodeEvent {
14019 #[allow(irrefutable_let_patterns)]
14020 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14021 if let NodeEvent::OnOpen_ { s, info } = self {
14022 Some((s, info))
14023 } else {
14024 None
14025 }
14026 }
14027 #[allow(irrefutable_let_patterns)]
14028 pub fn into_on_representation(self) -> Option<Representation> {
14029 if let NodeEvent::OnRepresentation { payload } = self {
14030 Some((payload))
14031 } else {
14032 None
14033 }
14034 }
14035
14036 fn decode(
14038 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14039 ) -> Result<NodeEvent, fidl::Error> {
14040 let (bytes, _handles) = buf.split_mut();
14041 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14042 debug_assert_eq!(tx_header.tx_id, 0);
14043 match tx_header.ordinal {
14044 0x7fc7bbb1dbfd1972 => {
14045 let mut out = fidl::new_empty!(
14046 NodeOnOpenRequest,
14047 fidl::encoding::DefaultFuchsiaResourceDialect
14048 );
14049 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14050 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
14051 }
14052 0x5cb40567d80a510c => {
14053 let mut out =
14054 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
14055 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14056 Ok((NodeEvent::OnRepresentation { payload: out }))
14057 }
14058 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14059 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14060 }
14061 _ => Err(fidl::Error::UnknownOrdinal {
14062 ordinal: tx_header.ordinal,
14063 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14064 }),
14065 }
14066 }
14067}
14068
14069pub struct NodeRequestStream {
14071 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14072 is_terminated: bool,
14073}
14074
14075impl std::marker::Unpin for NodeRequestStream {}
14076
14077impl futures::stream::FusedStream for NodeRequestStream {
14078 fn is_terminated(&self) -> bool {
14079 self.is_terminated
14080 }
14081}
14082
14083impl fidl::endpoints::RequestStream for NodeRequestStream {
14084 type Protocol = NodeMarker;
14085 type ControlHandle = NodeControlHandle;
14086
14087 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
14088 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14089 }
14090
14091 fn control_handle(&self) -> Self::ControlHandle {
14092 NodeControlHandle { inner: self.inner.clone() }
14093 }
14094
14095 fn into_inner(
14096 self,
14097 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
14098 {
14099 (self.inner, self.is_terminated)
14100 }
14101
14102 fn from_inner(
14103 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14104 is_terminated: bool,
14105 ) -> Self {
14106 Self { inner, is_terminated }
14107 }
14108}
14109
14110impl futures::Stream for NodeRequestStream {
14111 type Item = Result<NodeRequest, fidl::Error>;
14112
14113 fn poll_next(
14114 mut self: std::pin::Pin<&mut Self>,
14115 cx: &mut std::task::Context<'_>,
14116 ) -> std::task::Poll<Option<Self::Item>> {
14117 let this = &mut *self;
14118 if this.inner.check_shutdown(cx) {
14119 this.is_terminated = true;
14120 return std::task::Poll::Ready(None);
14121 }
14122 if this.is_terminated {
14123 panic!("polled NodeRequestStream after completion");
14124 }
14125 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
14126 |bytes, handles| {
14127 match this.inner.channel().read_etc(cx, bytes, handles) {
14128 std::task::Poll::Ready(Ok(())) => {}
14129 std::task::Poll::Pending => return std::task::Poll::Pending,
14130 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
14131 this.is_terminated = true;
14132 return std::task::Poll::Ready(None);
14133 }
14134 std::task::Poll::Ready(Err(e)) => {
14135 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14136 e.into(),
14137 ))))
14138 }
14139 }
14140
14141 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14143
14144 std::task::Poll::Ready(Some(match header.ordinal {
14145 0x20d8a7aba2168a79 => {
14146 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14147 let mut req = fidl::new_empty!(
14148 fidl_fuchsia_unknown::CloneableCloneRequest,
14149 fidl::encoding::DefaultFuchsiaResourceDialect
14150 );
14151 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14152 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14153 Ok(NodeRequest::Clone { request: req.request, control_handle })
14154 }
14155 0x5ac5d459ad7f657e => {
14156 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14157 let mut req = fidl::new_empty!(
14158 fidl::encoding::EmptyPayload,
14159 fidl::encoding::DefaultFuchsiaResourceDialect
14160 );
14161 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14162 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14163 Ok(NodeRequest::Close {
14164 responder: NodeCloseResponder {
14165 control_handle: std::mem::ManuallyDrop::new(control_handle),
14166 tx_id: header.tx_id,
14167 },
14168 })
14169 }
14170 0x2658edee9decfc06 => {
14171 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14172 let mut req = fidl::new_empty!(
14173 fidl::encoding::EmptyPayload,
14174 fidl::encoding::DefaultFuchsiaResourceDialect
14175 );
14176 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14177 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14178 Ok(NodeRequest::Query {
14179 responder: NodeQueryResponder {
14180 control_handle: std::mem::ManuallyDrop::new(control_handle),
14181 tx_id: header.tx_id,
14182 },
14183 })
14184 }
14185 0x5a61678f293ce16f => {
14186 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14187 let mut req = fidl::new_empty!(
14188 NodeDeprecatedCloneRequest,
14189 fidl::encoding::DefaultFuchsiaResourceDialect
14190 );
14191 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14192 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14193 Ok(NodeRequest::DeprecatedClone {
14194 flags: req.flags,
14195 object: req.object,
14196
14197 control_handle,
14198 })
14199 }
14200 0x78985e216314dafd => {
14201 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14202 let mut req = fidl::new_empty!(
14203 fidl::encoding::EmptyPayload,
14204 fidl::encoding::DefaultFuchsiaResourceDialect
14205 );
14206 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14207 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14208 Ok(NodeRequest::DeprecatedGetAttr {
14209 responder: NodeDeprecatedGetAttrResponder {
14210 control_handle: std::mem::ManuallyDrop::new(control_handle),
14211 tx_id: header.tx_id,
14212 },
14213 })
14214 }
14215 0x4186c0f40d938f46 => {
14216 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14217 let mut req = fidl::new_empty!(
14218 NodeDeprecatedSetAttrRequest,
14219 fidl::encoding::DefaultFuchsiaResourceDialect
14220 );
14221 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14222 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14223 Ok(NodeRequest::DeprecatedSetAttr {
14224 flags: req.flags,
14225 attributes: req.attributes,
14226
14227 responder: NodeDeprecatedSetAttrResponder {
14228 control_handle: std::mem::ManuallyDrop::new(control_handle),
14229 tx_id: header.tx_id,
14230 },
14231 })
14232 }
14233 0x5b88fffb8eda3aa1 => {
14234 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14235 let mut req = fidl::new_empty!(
14236 fidl::encoding::EmptyPayload,
14237 fidl::encoding::DefaultFuchsiaResourceDialect
14238 );
14239 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14240 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14241 Ok(NodeRequest::DeprecatedGetFlags {
14242 responder: NodeDeprecatedGetFlagsResponder {
14243 control_handle: std::mem::ManuallyDrop::new(control_handle),
14244 tx_id: header.tx_id,
14245 },
14246 })
14247 }
14248 0x5295b76c71fde733 => {
14249 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14250 let mut req = fidl::new_empty!(
14251 NodeDeprecatedSetFlagsRequest,
14252 fidl::encoding::DefaultFuchsiaResourceDialect
14253 );
14254 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14255 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14256 Ok(NodeRequest::DeprecatedSetFlags {
14257 flags: req.flags,
14258
14259 responder: NodeDeprecatedSetFlagsResponder {
14260 control_handle: std::mem::ManuallyDrop::new(control_handle),
14261 tx_id: header.tx_id,
14262 },
14263 })
14264 }
14265 0x176eb318f64ec23 => {
14266 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14267 let mut req = fidl::new_empty!(
14268 fidl::encoding::EmptyPayload,
14269 fidl::encoding::DefaultFuchsiaResourceDialect
14270 );
14271 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14272 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14273 Ok(NodeRequest::GetFlags {
14274 responder: NodeGetFlagsResponder {
14275 control_handle: std::mem::ManuallyDrop::new(control_handle),
14276 tx_id: header.tx_id,
14277 },
14278 })
14279 }
14280 0x55a8028685791ea8 => {
14281 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14282 let mut req = fidl::new_empty!(
14283 NodeSetFlagsRequest,
14284 fidl::encoding::DefaultFuchsiaResourceDialect
14285 );
14286 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14287 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14288 Ok(NodeRequest::SetFlags {
14289 flags: req.flags,
14290
14291 responder: NodeSetFlagsResponder {
14292 control_handle: std::mem::ManuallyDrop::new(control_handle),
14293 tx_id: header.tx_id,
14294 },
14295 })
14296 }
14297 0x6f344a1c6b0a0610 => {
14298 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14299 let mut req = fidl::new_empty!(
14300 fidl::encoding::EmptyPayload,
14301 fidl::encoding::DefaultFuchsiaResourceDialect
14302 );
14303 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14304 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14305 Ok(NodeRequest::QueryFilesystem {
14306 responder: NodeQueryFilesystemResponder {
14307 control_handle: std::mem::ManuallyDrop::new(control_handle),
14308 tx_id: header.tx_id,
14309 },
14310 })
14311 }
14312 0x3d4396a638ea053b => {
14313 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14314 let mut req = fidl::new_empty!(
14315 NodeGetAttributesRequest,
14316 fidl::encoding::DefaultFuchsiaResourceDialect
14317 );
14318 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14319 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14320 Ok(NodeRequest::GetAttributes {
14321 query: req.query,
14322
14323 responder: NodeGetAttributesResponder {
14324 control_handle: std::mem::ManuallyDrop::new(control_handle),
14325 tx_id: header.tx_id,
14326 },
14327 })
14328 }
14329 0x3308c1da5a89bf08 => {
14330 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14331 let mut req = fidl::new_empty!(
14332 MutableNodeAttributes,
14333 fidl::encoding::DefaultFuchsiaResourceDialect
14334 );
14335 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
14336 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14337 Ok(NodeRequest::UpdateAttributes {
14338 payload: req,
14339 responder: NodeUpdateAttributesResponder {
14340 control_handle: std::mem::ManuallyDrop::new(control_handle),
14341 tx_id: header.tx_id,
14342 },
14343 })
14344 }
14345 0x2c5c27ca0ab5dc49 => {
14346 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14347 let mut req = fidl::new_empty!(
14348 fidl::encoding::EmptyPayload,
14349 fidl::encoding::DefaultFuchsiaResourceDialect
14350 );
14351 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14352 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14353 Ok(NodeRequest::Sync {
14354 responder: NodeSyncResponder {
14355 control_handle: std::mem::ManuallyDrop::new(control_handle),
14356 tx_id: header.tx_id,
14357 },
14358 })
14359 }
14360 0x4b61033de007fcd0 => {
14361 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14362 let mut req = fidl::new_empty!(
14363 NodeListExtendedAttributesRequest,
14364 fidl::encoding::DefaultFuchsiaResourceDialect
14365 );
14366 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14367 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14368 Ok(NodeRequest::ListExtendedAttributes {
14369 iterator: req.iterator,
14370
14371 control_handle,
14372 })
14373 }
14374 0x45ffa3ccfdeb76db => {
14375 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14376 let mut req = fidl::new_empty!(
14377 NodeGetExtendedAttributeRequest,
14378 fidl::encoding::DefaultFuchsiaResourceDialect
14379 );
14380 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14381 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14382 Ok(NodeRequest::GetExtendedAttribute {
14383 name: req.name,
14384
14385 responder: NodeGetExtendedAttributeResponder {
14386 control_handle: std::mem::ManuallyDrop::new(control_handle),
14387 tx_id: header.tx_id,
14388 },
14389 })
14390 }
14391 0x4a951362f681f23c => {
14392 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14393 let mut req = fidl::new_empty!(
14394 NodeSetExtendedAttributeRequest,
14395 fidl::encoding::DefaultFuchsiaResourceDialect
14396 );
14397 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14398 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14399 Ok(NodeRequest::SetExtendedAttribute {
14400 name: req.name,
14401 value: req.value,
14402 mode: req.mode,
14403
14404 responder: NodeSetExtendedAttributeResponder {
14405 control_handle: std::mem::ManuallyDrop::new(control_handle),
14406 tx_id: header.tx_id,
14407 },
14408 })
14409 }
14410 0x7a0b9f3a9bf9032d => {
14411 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14412 let mut req = fidl::new_empty!(
14413 NodeRemoveExtendedAttributeRequest,
14414 fidl::encoding::DefaultFuchsiaResourceDialect
14415 );
14416 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14417 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14418 Ok(NodeRequest::RemoveExtendedAttribute {
14419 name: req.name,
14420
14421 responder: NodeRemoveExtendedAttributeResponder {
14422 control_handle: std::mem::ManuallyDrop::new(control_handle),
14423 tx_id: header.tx_id,
14424 },
14425 })
14426 }
14427 _ if header.tx_id == 0
14428 && header
14429 .dynamic_flags()
14430 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14431 {
14432 Ok(NodeRequest::_UnknownMethod {
14433 ordinal: header.ordinal,
14434 control_handle: NodeControlHandle { inner: this.inner.clone() },
14435 method_type: fidl::MethodType::OneWay,
14436 })
14437 }
14438 _ if header
14439 .dynamic_flags()
14440 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14441 {
14442 this.inner.send_framework_err(
14443 fidl::encoding::FrameworkErr::UnknownMethod,
14444 header.tx_id,
14445 header.ordinal,
14446 header.dynamic_flags(),
14447 (bytes, handles),
14448 )?;
14449 Ok(NodeRequest::_UnknownMethod {
14450 ordinal: header.ordinal,
14451 control_handle: NodeControlHandle { inner: this.inner.clone() },
14452 method_type: fidl::MethodType::TwoWay,
14453 })
14454 }
14455 _ => Err(fidl::Error::UnknownOrdinal {
14456 ordinal: header.ordinal,
14457 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14458 }),
14459 }))
14460 },
14461 )
14462 }
14463}
14464
14465#[derive(Debug)]
14467pub enum NodeRequest {
14468 Clone {
14469 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14470 control_handle: NodeControlHandle,
14471 },
14472 Close {
14483 responder: NodeCloseResponder,
14484 },
14485 Query {
14486 responder: NodeQueryResponder,
14487 },
14488 DeprecatedClone {
14490 flags: OpenFlags,
14491 object: fidl::endpoints::ServerEnd<NodeMarker>,
14492 control_handle: NodeControlHandle,
14493 },
14494 DeprecatedGetAttr {
14496 responder: NodeDeprecatedGetAttrResponder,
14497 },
14498 DeprecatedSetAttr {
14500 flags: NodeAttributeFlags,
14501 attributes: NodeAttributes,
14502 responder: NodeDeprecatedSetAttrResponder,
14503 },
14504 DeprecatedGetFlags {
14506 responder: NodeDeprecatedGetFlagsResponder,
14507 },
14508 DeprecatedSetFlags {
14510 flags: OpenFlags,
14511 responder: NodeDeprecatedSetFlagsResponder,
14512 },
14513 GetFlags {
14522 responder: NodeGetFlagsResponder,
14523 },
14524 SetFlags {
14534 flags: Flags,
14535 responder: NodeSetFlagsResponder,
14536 },
14537 QueryFilesystem {
14539 responder: NodeQueryFilesystemResponder,
14540 },
14541 GetAttributes {
14555 query: NodeAttributesQuery,
14556 responder: NodeGetAttributesResponder,
14557 },
14558 UpdateAttributes {
14567 payload: MutableNodeAttributes,
14568 responder: NodeUpdateAttributesResponder,
14569 },
14570 Sync {
14580 responder: NodeSyncResponder,
14581 },
14582 ListExtendedAttributes {
14591 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14592 control_handle: NodeControlHandle,
14593 },
14594 GetExtendedAttribute {
14601 name: Vec<u8>,
14602 responder: NodeGetExtendedAttributeResponder,
14603 },
14604 SetExtendedAttribute {
14612 name: Vec<u8>,
14613 value: ExtendedAttributeValue,
14614 mode: SetExtendedAttributeMode,
14615 responder: NodeSetExtendedAttributeResponder,
14616 },
14617 RemoveExtendedAttribute {
14623 name: Vec<u8>,
14624 responder: NodeRemoveExtendedAttributeResponder,
14625 },
14626 #[non_exhaustive]
14628 _UnknownMethod {
14629 ordinal: u64,
14631 control_handle: NodeControlHandle,
14632 method_type: fidl::MethodType,
14633 },
14634}
14635
14636impl NodeRequest {
14637 #[allow(irrefutable_let_patterns)]
14638 pub fn into_clone(
14639 self,
14640 ) -> Option<(
14641 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14642 NodeControlHandle,
14643 )> {
14644 if let NodeRequest::Clone { request, control_handle } = self {
14645 Some((request, control_handle))
14646 } else {
14647 None
14648 }
14649 }
14650
14651 #[allow(irrefutable_let_patterns)]
14652 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
14653 if let NodeRequest::Close { responder } = self {
14654 Some((responder))
14655 } else {
14656 None
14657 }
14658 }
14659
14660 #[allow(irrefutable_let_patterns)]
14661 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
14662 if let NodeRequest::Query { responder } = self {
14663 Some((responder))
14664 } else {
14665 None
14666 }
14667 }
14668
14669 #[allow(irrefutable_let_patterns)]
14670 pub fn into_deprecated_clone(
14671 self,
14672 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, NodeControlHandle)> {
14673 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
14674 Some((flags, object, control_handle))
14675 } else {
14676 None
14677 }
14678 }
14679
14680 #[allow(irrefutable_let_patterns)]
14681 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
14682 if let NodeRequest::DeprecatedGetAttr { responder } = self {
14683 Some((responder))
14684 } else {
14685 None
14686 }
14687 }
14688
14689 #[allow(irrefutable_let_patterns)]
14690 pub fn into_deprecated_set_attr(
14691 self,
14692 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
14693 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
14694 Some((flags, attributes, responder))
14695 } else {
14696 None
14697 }
14698 }
14699
14700 #[allow(irrefutable_let_patterns)]
14701 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
14702 if let NodeRequest::DeprecatedGetFlags { responder } = self {
14703 Some((responder))
14704 } else {
14705 None
14706 }
14707 }
14708
14709 #[allow(irrefutable_let_patterns)]
14710 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
14711 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
14712 Some((flags, responder))
14713 } else {
14714 None
14715 }
14716 }
14717
14718 #[allow(irrefutable_let_patterns)]
14719 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
14720 if let NodeRequest::GetFlags { responder } = self {
14721 Some((responder))
14722 } else {
14723 None
14724 }
14725 }
14726
14727 #[allow(irrefutable_let_patterns)]
14728 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
14729 if let NodeRequest::SetFlags { flags, responder } = self {
14730 Some((flags, responder))
14731 } else {
14732 None
14733 }
14734 }
14735
14736 #[allow(irrefutable_let_patterns)]
14737 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
14738 if let NodeRequest::QueryFilesystem { responder } = self {
14739 Some((responder))
14740 } else {
14741 None
14742 }
14743 }
14744
14745 #[allow(irrefutable_let_patterns)]
14746 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
14747 if let NodeRequest::GetAttributes { query, responder } = self {
14748 Some((query, responder))
14749 } else {
14750 None
14751 }
14752 }
14753
14754 #[allow(irrefutable_let_patterns)]
14755 pub fn into_update_attributes(
14756 self,
14757 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
14758 if let NodeRequest::UpdateAttributes { payload, responder } = self {
14759 Some((payload, responder))
14760 } else {
14761 None
14762 }
14763 }
14764
14765 #[allow(irrefutable_let_patterns)]
14766 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
14767 if let NodeRequest::Sync { responder } = self {
14768 Some((responder))
14769 } else {
14770 None
14771 }
14772 }
14773
14774 #[allow(irrefutable_let_patterns)]
14775 pub fn into_list_extended_attributes(
14776 self,
14777 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
14778 {
14779 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
14780 Some((iterator, control_handle))
14781 } else {
14782 None
14783 }
14784 }
14785
14786 #[allow(irrefutable_let_patterns)]
14787 pub fn into_get_extended_attribute(
14788 self,
14789 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
14790 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
14791 Some((name, responder))
14792 } else {
14793 None
14794 }
14795 }
14796
14797 #[allow(irrefutable_let_patterns)]
14798 pub fn into_set_extended_attribute(
14799 self,
14800 ) -> Option<(
14801 Vec<u8>,
14802 ExtendedAttributeValue,
14803 SetExtendedAttributeMode,
14804 NodeSetExtendedAttributeResponder,
14805 )> {
14806 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
14807 Some((name, value, mode, responder))
14808 } else {
14809 None
14810 }
14811 }
14812
14813 #[allow(irrefutable_let_patterns)]
14814 pub fn into_remove_extended_attribute(
14815 self,
14816 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
14817 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
14818 Some((name, responder))
14819 } else {
14820 None
14821 }
14822 }
14823
14824 pub fn method_name(&self) -> &'static str {
14826 match *self {
14827 NodeRequest::Clone { .. } => "clone",
14828 NodeRequest::Close { .. } => "close",
14829 NodeRequest::Query { .. } => "query",
14830 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
14831 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
14832 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
14833 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
14834 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
14835 NodeRequest::GetFlags { .. } => "get_flags",
14836 NodeRequest::SetFlags { .. } => "set_flags",
14837 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
14838 NodeRequest::GetAttributes { .. } => "get_attributes",
14839 NodeRequest::UpdateAttributes { .. } => "update_attributes",
14840 NodeRequest::Sync { .. } => "sync",
14841 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
14842 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
14843 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
14844 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
14845 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
14846 "unknown one-way method"
14847 }
14848 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
14849 "unknown two-way method"
14850 }
14851 }
14852 }
14853}
14854
14855#[derive(Debug, Clone)]
14856pub struct NodeControlHandle {
14857 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14858}
14859
14860impl fidl::endpoints::ControlHandle for NodeControlHandle {
14861 fn shutdown(&self) {
14862 self.inner.shutdown()
14863 }
14864 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
14865 self.inner.shutdown_with_epitaph(status)
14866 }
14867
14868 fn is_closed(&self) -> bool {
14869 self.inner.channel().is_closed()
14870 }
14871 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
14872 self.inner.channel().on_closed()
14873 }
14874
14875 #[cfg(target_os = "fuchsia")]
14876 fn signal_peer(
14877 &self,
14878 clear_mask: zx::Signals,
14879 set_mask: zx::Signals,
14880 ) -> Result<(), zx_status::Status> {
14881 use fidl::Peered;
14882 self.inner.channel().signal_peer(clear_mask, set_mask)
14883 }
14884}
14885
14886impl NodeControlHandle {
14887 pub fn send_on_open_(
14888 &self,
14889 mut s: i32,
14890 mut info: Option<NodeInfoDeprecated>,
14891 ) -> Result<(), fidl::Error> {
14892 self.inner.send::<NodeOnOpenRequest>(
14893 (s, info.as_mut()),
14894 0,
14895 0x7fc7bbb1dbfd1972,
14896 fidl::encoding::DynamicFlags::empty(),
14897 )
14898 }
14899
14900 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
14901 self.inner.send::<Representation>(
14902 &mut payload,
14903 0,
14904 0x5cb40567d80a510c,
14905 fidl::encoding::DynamicFlags::empty(),
14906 )
14907 }
14908}
14909
14910#[must_use = "FIDL methods require a response to be sent"]
14911#[derive(Debug)]
14912pub struct NodeCloseResponder {
14913 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
14914 tx_id: u32,
14915}
14916
14917impl std::ops::Drop for NodeCloseResponder {
14921 fn drop(&mut self) {
14922 self.control_handle.shutdown();
14923 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14925 }
14926}
14927
14928impl fidl::endpoints::Responder for NodeCloseResponder {
14929 type ControlHandle = NodeControlHandle;
14930
14931 fn control_handle(&self) -> &NodeControlHandle {
14932 &self.control_handle
14933 }
14934
14935 fn drop_without_shutdown(mut self) {
14936 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14938 std::mem::forget(self);
14940 }
14941}
14942
14943impl NodeCloseResponder {
14944 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
14948 let _result = self.send_raw(result);
14949 if _result.is_err() {
14950 self.control_handle.shutdown();
14951 }
14952 self.drop_without_shutdown();
14953 _result
14954 }
14955
14956 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
14958 let _result = self.send_raw(result);
14959 self.drop_without_shutdown();
14960 _result
14961 }
14962
14963 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
14964 self.control_handle
14965 .inner
14966 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
14967 result,
14968 self.tx_id,
14969 0x5ac5d459ad7f657e,
14970 fidl::encoding::DynamicFlags::empty(),
14971 )
14972 }
14973}
14974
14975#[must_use = "FIDL methods require a response to be sent"]
14976#[derive(Debug)]
14977pub struct NodeQueryResponder {
14978 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
14979 tx_id: u32,
14980}
14981
14982impl std::ops::Drop for NodeQueryResponder {
14986 fn drop(&mut self) {
14987 self.control_handle.shutdown();
14988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14990 }
14991}
14992
14993impl fidl::endpoints::Responder for NodeQueryResponder {
14994 type ControlHandle = NodeControlHandle;
14995
14996 fn control_handle(&self) -> &NodeControlHandle {
14997 &self.control_handle
14998 }
14999
15000 fn drop_without_shutdown(mut self) {
15001 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15003 std::mem::forget(self);
15005 }
15006}
15007
15008impl NodeQueryResponder {
15009 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15013 let _result = self.send_raw(protocol);
15014 if _result.is_err() {
15015 self.control_handle.shutdown();
15016 }
15017 self.drop_without_shutdown();
15018 _result
15019 }
15020
15021 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15023 let _result = self.send_raw(protocol);
15024 self.drop_without_shutdown();
15025 _result
15026 }
15027
15028 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15029 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
15030 (protocol,),
15031 self.tx_id,
15032 0x2658edee9decfc06,
15033 fidl::encoding::DynamicFlags::empty(),
15034 )
15035 }
15036}
15037
15038#[must_use = "FIDL methods require a response to be sent"]
15039#[derive(Debug)]
15040pub struct NodeDeprecatedGetAttrResponder {
15041 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15042 tx_id: u32,
15043}
15044
15045impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
15049 fn drop(&mut self) {
15050 self.control_handle.shutdown();
15051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15053 }
15054}
15055
15056impl fidl::endpoints::Responder for NodeDeprecatedGetAttrResponder {
15057 type ControlHandle = NodeControlHandle;
15058
15059 fn control_handle(&self) -> &NodeControlHandle {
15060 &self.control_handle
15061 }
15062
15063 fn drop_without_shutdown(mut self) {
15064 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15066 std::mem::forget(self);
15068 }
15069}
15070
15071impl NodeDeprecatedGetAttrResponder {
15072 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15076 let _result = self.send_raw(s, attributes);
15077 if _result.is_err() {
15078 self.control_handle.shutdown();
15079 }
15080 self.drop_without_shutdown();
15081 _result
15082 }
15083
15084 pub fn send_no_shutdown_on_err(
15086 self,
15087 mut s: i32,
15088 mut attributes: &NodeAttributes,
15089 ) -> Result<(), fidl::Error> {
15090 let _result = self.send_raw(s, attributes);
15091 self.drop_without_shutdown();
15092 _result
15093 }
15094
15095 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15096 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15097 (s, attributes),
15098 self.tx_id,
15099 0x78985e216314dafd,
15100 fidl::encoding::DynamicFlags::empty(),
15101 )
15102 }
15103}
15104
15105#[must_use = "FIDL methods require a response to be sent"]
15106#[derive(Debug)]
15107pub struct NodeDeprecatedSetAttrResponder {
15108 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15109 tx_id: u32,
15110}
15111
15112impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
15116 fn drop(&mut self) {
15117 self.control_handle.shutdown();
15118 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15120 }
15121}
15122
15123impl fidl::endpoints::Responder for NodeDeprecatedSetAttrResponder {
15124 type ControlHandle = NodeControlHandle;
15125
15126 fn control_handle(&self) -> &NodeControlHandle {
15127 &self.control_handle
15128 }
15129
15130 fn drop_without_shutdown(mut self) {
15131 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15133 std::mem::forget(self);
15135 }
15136}
15137
15138impl NodeDeprecatedSetAttrResponder {
15139 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15143 let _result = self.send_raw(s);
15144 if _result.is_err() {
15145 self.control_handle.shutdown();
15146 }
15147 self.drop_without_shutdown();
15148 _result
15149 }
15150
15151 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15153 let _result = self.send_raw(s);
15154 self.drop_without_shutdown();
15155 _result
15156 }
15157
15158 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15159 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
15160 (s,),
15161 self.tx_id,
15162 0x4186c0f40d938f46,
15163 fidl::encoding::DynamicFlags::empty(),
15164 )
15165 }
15166}
15167
15168#[must_use = "FIDL methods require a response to be sent"]
15169#[derive(Debug)]
15170pub struct NodeDeprecatedGetFlagsResponder {
15171 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15172 tx_id: u32,
15173}
15174
15175impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
15179 fn drop(&mut self) {
15180 self.control_handle.shutdown();
15181 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15183 }
15184}
15185
15186impl fidl::endpoints::Responder for NodeDeprecatedGetFlagsResponder {
15187 type ControlHandle = NodeControlHandle;
15188
15189 fn control_handle(&self) -> &NodeControlHandle {
15190 &self.control_handle
15191 }
15192
15193 fn drop_without_shutdown(mut self) {
15194 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15196 std::mem::forget(self);
15198 }
15199}
15200
15201impl NodeDeprecatedGetFlagsResponder {
15202 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15206 let _result = self.send_raw(s, flags);
15207 if _result.is_err() {
15208 self.control_handle.shutdown();
15209 }
15210 self.drop_without_shutdown();
15211 _result
15212 }
15213
15214 pub fn send_no_shutdown_on_err(
15216 self,
15217 mut s: i32,
15218 mut flags: OpenFlags,
15219 ) -> Result<(), fidl::Error> {
15220 let _result = self.send_raw(s, flags);
15221 self.drop_without_shutdown();
15222 _result
15223 }
15224
15225 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15226 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
15227 (s, flags),
15228 self.tx_id,
15229 0x5b88fffb8eda3aa1,
15230 fidl::encoding::DynamicFlags::empty(),
15231 )
15232 }
15233}
15234
15235#[must_use = "FIDL methods require a response to be sent"]
15236#[derive(Debug)]
15237pub struct NodeDeprecatedSetFlagsResponder {
15238 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15239 tx_id: u32,
15240}
15241
15242impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
15246 fn drop(&mut self) {
15247 self.control_handle.shutdown();
15248 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15250 }
15251}
15252
15253impl fidl::endpoints::Responder for NodeDeprecatedSetFlagsResponder {
15254 type ControlHandle = NodeControlHandle;
15255
15256 fn control_handle(&self) -> &NodeControlHandle {
15257 &self.control_handle
15258 }
15259
15260 fn drop_without_shutdown(mut self) {
15261 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15263 std::mem::forget(self);
15265 }
15266}
15267
15268impl NodeDeprecatedSetFlagsResponder {
15269 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15273 let _result = self.send_raw(s);
15274 if _result.is_err() {
15275 self.control_handle.shutdown();
15276 }
15277 self.drop_without_shutdown();
15278 _result
15279 }
15280
15281 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15283 let _result = self.send_raw(s);
15284 self.drop_without_shutdown();
15285 _result
15286 }
15287
15288 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15289 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
15290 (s,),
15291 self.tx_id,
15292 0x5295b76c71fde733,
15293 fidl::encoding::DynamicFlags::empty(),
15294 )
15295 }
15296}
15297
15298#[must_use = "FIDL methods require a response to be sent"]
15299#[derive(Debug)]
15300pub struct NodeGetFlagsResponder {
15301 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15302 tx_id: u32,
15303}
15304
15305impl std::ops::Drop for NodeGetFlagsResponder {
15309 fn drop(&mut self) {
15310 self.control_handle.shutdown();
15311 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15313 }
15314}
15315
15316impl fidl::endpoints::Responder for NodeGetFlagsResponder {
15317 type ControlHandle = NodeControlHandle;
15318
15319 fn control_handle(&self) -> &NodeControlHandle {
15320 &self.control_handle
15321 }
15322
15323 fn drop_without_shutdown(mut self) {
15324 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15326 std::mem::forget(self);
15328 }
15329}
15330
15331impl NodeGetFlagsResponder {
15332 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15336 let _result = self.send_raw(result);
15337 if _result.is_err() {
15338 self.control_handle.shutdown();
15339 }
15340 self.drop_without_shutdown();
15341 _result
15342 }
15343
15344 pub fn send_no_shutdown_on_err(
15346 self,
15347 mut result: Result<Flags, i32>,
15348 ) -> Result<(), fidl::Error> {
15349 let _result = self.send_raw(result);
15350 self.drop_without_shutdown();
15351 _result
15352 }
15353
15354 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15355 self.control_handle
15356 .inner
15357 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
15358 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
15359 self.tx_id,
15360 0x176eb318f64ec23,
15361 fidl::encoding::DynamicFlags::FLEXIBLE,
15362 )
15363 }
15364}
15365
15366#[must_use = "FIDL methods require a response to be sent"]
15367#[derive(Debug)]
15368pub struct NodeSetFlagsResponder {
15369 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15370 tx_id: u32,
15371}
15372
15373impl std::ops::Drop for NodeSetFlagsResponder {
15377 fn drop(&mut self) {
15378 self.control_handle.shutdown();
15379 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15381 }
15382}
15383
15384impl fidl::endpoints::Responder for NodeSetFlagsResponder {
15385 type ControlHandle = NodeControlHandle;
15386
15387 fn control_handle(&self) -> &NodeControlHandle {
15388 &self.control_handle
15389 }
15390
15391 fn drop_without_shutdown(mut self) {
15392 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15394 std::mem::forget(self);
15396 }
15397}
15398
15399impl NodeSetFlagsResponder {
15400 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15404 let _result = self.send_raw(result);
15405 if _result.is_err() {
15406 self.control_handle.shutdown();
15407 }
15408 self.drop_without_shutdown();
15409 _result
15410 }
15411
15412 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15414 let _result = self.send_raw(result);
15415 self.drop_without_shutdown();
15416 _result
15417 }
15418
15419 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15420 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
15421 fidl::encoding::EmptyStruct,
15422 i32,
15423 >>(
15424 fidl::encoding::FlexibleResult::new(result),
15425 self.tx_id,
15426 0x55a8028685791ea8,
15427 fidl::encoding::DynamicFlags::FLEXIBLE,
15428 )
15429 }
15430}
15431
15432#[must_use = "FIDL methods require a response to be sent"]
15433#[derive(Debug)]
15434pub struct NodeQueryFilesystemResponder {
15435 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15436 tx_id: u32,
15437}
15438
15439impl std::ops::Drop for NodeQueryFilesystemResponder {
15443 fn drop(&mut self) {
15444 self.control_handle.shutdown();
15445 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15447 }
15448}
15449
15450impl fidl::endpoints::Responder for NodeQueryFilesystemResponder {
15451 type ControlHandle = NodeControlHandle;
15452
15453 fn control_handle(&self) -> &NodeControlHandle {
15454 &self.control_handle
15455 }
15456
15457 fn drop_without_shutdown(mut self) {
15458 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15460 std::mem::forget(self);
15462 }
15463}
15464
15465impl NodeQueryFilesystemResponder {
15466 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15470 let _result = self.send_raw(s, info);
15471 if _result.is_err() {
15472 self.control_handle.shutdown();
15473 }
15474 self.drop_without_shutdown();
15475 _result
15476 }
15477
15478 pub fn send_no_shutdown_on_err(
15480 self,
15481 mut s: i32,
15482 mut info: Option<&FilesystemInfo>,
15483 ) -> Result<(), fidl::Error> {
15484 let _result = self.send_raw(s, info);
15485 self.drop_without_shutdown();
15486 _result
15487 }
15488
15489 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15490 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
15491 (s, info),
15492 self.tx_id,
15493 0x6f344a1c6b0a0610,
15494 fidl::encoding::DynamicFlags::empty(),
15495 )
15496 }
15497}
15498
15499#[must_use = "FIDL methods require a response to be sent"]
15500#[derive(Debug)]
15501pub struct NodeGetAttributesResponder {
15502 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15503 tx_id: u32,
15504}
15505
15506impl std::ops::Drop for NodeGetAttributesResponder {
15510 fn drop(&mut self) {
15511 self.control_handle.shutdown();
15512 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15514 }
15515}
15516
15517impl fidl::endpoints::Responder for NodeGetAttributesResponder {
15518 type ControlHandle = NodeControlHandle;
15519
15520 fn control_handle(&self) -> &NodeControlHandle {
15521 &self.control_handle
15522 }
15523
15524 fn drop_without_shutdown(mut self) {
15525 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15527 std::mem::forget(self);
15529 }
15530}
15531
15532impl NodeGetAttributesResponder {
15533 pub fn send(
15537 self,
15538 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15539 ) -> Result<(), fidl::Error> {
15540 let _result = self.send_raw(result);
15541 if _result.is_err() {
15542 self.control_handle.shutdown();
15543 }
15544 self.drop_without_shutdown();
15545 _result
15546 }
15547
15548 pub fn send_no_shutdown_on_err(
15550 self,
15551 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15552 ) -> Result<(), fidl::Error> {
15553 let _result = self.send_raw(result);
15554 self.drop_without_shutdown();
15555 _result
15556 }
15557
15558 fn send_raw(
15559 &self,
15560 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15561 ) -> Result<(), fidl::Error> {
15562 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
15563 result,
15564 self.tx_id,
15565 0x3d4396a638ea053b,
15566 fidl::encoding::DynamicFlags::empty(),
15567 )
15568 }
15569}
15570
15571#[must_use = "FIDL methods require a response to be sent"]
15572#[derive(Debug)]
15573pub struct NodeUpdateAttributesResponder {
15574 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15575 tx_id: u32,
15576}
15577
15578impl std::ops::Drop for NodeUpdateAttributesResponder {
15582 fn drop(&mut self) {
15583 self.control_handle.shutdown();
15584 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15586 }
15587}
15588
15589impl fidl::endpoints::Responder for NodeUpdateAttributesResponder {
15590 type ControlHandle = NodeControlHandle;
15591
15592 fn control_handle(&self) -> &NodeControlHandle {
15593 &self.control_handle
15594 }
15595
15596 fn drop_without_shutdown(mut self) {
15597 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15599 std::mem::forget(self);
15601 }
15602}
15603
15604impl NodeUpdateAttributesResponder {
15605 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15609 let _result = self.send_raw(result);
15610 if _result.is_err() {
15611 self.control_handle.shutdown();
15612 }
15613 self.drop_without_shutdown();
15614 _result
15615 }
15616
15617 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15619 let _result = self.send_raw(result);
15620 self.drop_without_shutdown();
15621 _result
15622 }
15623
15624 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15625 self.control_handle
15626 .inner
15627 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15628 result,
15629 self.tx_id,
15630 0x3308c1da5a89bf08,
15631 fidl::encoding::DynamicFlags::empty(),
15632 )
15633 }
15634}
15635
15636#[must_use = "FIDL methods require a response to be sent"]
15637#[derive(Debug)]
15638pub struct NodeSyncResponder {
15639 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15640 tx_id: u32,
15641}
15642
15643impl std::ops::Drop for NodeSyncResponder {
15647 fn drop(&mut self) {
15648 self.control_handle.shutdown();
15649 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15651 }
15652}
15653
15654impl fidl::endpoints::Responder for NodeSyncResponder {
15655 type ControlHandle = NodeControlHandle;
15656
15657 fn control_handle(&self) -> &NodeControlHandle {
15658 &self.control_handle
15659 }
15660
15661 fn drop_without_shutdown(mut self) {
15662 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15664 std::mem::forget(self);
15666 }
15667}
15668
15669impl NodeSyncResponder {
15670 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15674 let _result = self.send_raw(result);
15675 if _result.is_err() {
15676 self.control_handle.shutdown();
15677 }
15678 self.drop_without_shutdown();
15679 _result
15680 }
15681
15682 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15684 let _result = self.send_raw(result);
15685 self.drop_without_shutdown();
15686 _result
15687 }
15688
15689 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15690 self.control_handle
15691 .inner
15692 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15693 result,
15694 self.tx_id,
15695 0x2c5c27ca0ab5dc49,
15696 fidl::encoding::DynamicFlags::empty(),
15697 )
15698 }
15699}
15700
15701#[must_use = "FIDL methods require a response to be sent"]
15702#[derive(Debug)]
15703pub struct NodeGetExtendedAttributeResponder {
15704 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15705 tx_id: u32,
15706}
15707
15708impl std::ops::Drop for NodeGetExtendedAttributeResponder {
15712 fn drop(&mut self) {
15713 self.control_handle.shutdown();
15714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15716 }
15717}
15718
15719impl fidl::endpoints::Responder for NodeGetExtendedAttributeResponder {
15720 type ControlHandle = NodeControlHandle;
15721
15722 fn control_handle(&self) -> &NodeControlHandle {
15723 &self.control_handle
15724 }
15725
15726 fn drop_without_shutdown(mut self) {
15727 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15729 std::mem::forget(self);
15731 }
15732}
15733
15734impl NodeGetExtendedAttributeResponder {
15735 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15739 let _result = self.send_raw(result);
15740 if _result.is_err() {
15741 self.control_handle.shutdown();
15742 }
15743 self.drop_without_shutdown();
15744 _result
15745 }
15746
15747 pub fn send_no_shutdown_on_err(
15749 self,
15750 mut result: Result<ExtendedAttributeValue, i32>,
15751 ) -> Result<(), fidl::Error> {
15752 let _result = self.send_raw(result);
15753 self.drop_without_shutdown();
15754 _result
15755 }
15756
15757 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15758 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
15759 result.as_mut().map_err(|e| *e),
15760 self.tx_id,
15761 0x45ffa3ccfdeb76db,
15762 fidl::encoding::DynamicFlags::empty(),
15763 )
15764 }
15765}
15766
15767#[must_use = "FIDL methods require a response to be sent"]
15768#[derive(Debug)]
15769pub struct NodeSetExtendedAttributeResponder {
15770 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15771 tx_id: u32,
15772}
15773
15774impl std::ops::Drop for NodeSetExtendedAttributeResponder {
15778 fn drop(&mut self) {
15779 self.control_handle.shutdown();
15780 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15782 }
15783}
15784
15785impl fidl::endpoints::Responder for NodeSetExtendedAttributeResponder {
15786 type ControlHandle = NodeControlHandle;
15787
15788 fn control_handle(&self) -> &NodeControlHandle {
15789 &self.control_handle
15790 }
15791
15792 fn drop_without_shutdown(mut self) {
15793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15795 std::mem::forget(self);
15797 }
15798}
15799
15800impl NodeSetExtendedAttributeResponder {
15801 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15805 let _result = self.send_raw(result);
15806 if _result.is_err() {
15807 self.control_handle.shutdown();
15808 }
15809 self.drop_without_shutdown();
15810 _result
15811 }
15812
15813 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15815 let _result = self.send_raw(result);
15816 self.drop_without_shutdown();
15817 _result
15818 }
15819
15820 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15821 self.control_handle
15822 .inner
15823 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15824 result,
15825 self.tx_id,
15826 0x4a951362f681f23c,
15827 fidl::encoding::DynamicFlags::empty(),
15828 )
15829 }
15830}
15831
15832#[must_use = "FIDL methods require a response to be sent"]
15833#[derive(Debug)]
15834pub struct NodeRemoveExtendedAttributeResponder {
15835 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15836 tx_id: u32,
15837}
15838
15839impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
15843 fn drop(&mut self) {
15844 self.control_handle.shutdown();
15845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15847 }
15848}
15849
15850impl fidl::endpoints::Responder for NodeRemoveExtendedAttributeResponder {
15851 type ControlHandle = NodeControlHandle;
15852
15853 fn control_handle(&self) -> &NodeControlHandle {
15854 &self.control_handle
15855 }
15856
15857 fn drop_without_shutdown(mut self) {
15858 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15860 std::mem::forget(self);
15862 }
15863}
15864
15865impl NodeRemoveExtendedAttributeResponder {
15866 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15870 let _result = self.send_raw(result);
15871 if _result.is_err() {
15872 self.control_handle.shutdown();
15873 }
15874 self.drop_without_shutdown();
15875 _result
15876 }
15877
15878 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15880 let _result = self.send_raw(result);
15881 self.drop_without_shutdown();
15882 _result
15883 }
15884
15885 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15886 self.control_handle
15887 .inner
15888 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15889 result,
15890 self.tx_id,
15891 0x7a0b9f3a9bf9032d,
15892 fidl::encoding::DynamicFlags::empty(),
15893 )
15894 }
15895}
15896
15897#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15898pub struct ReadableMarker;
15899
15900impl fidl::endpoints::ProtocolMarker for ReadableMarker {
15901 type Proxy = ReadableProxy;
15902 type RequestStream = ReadableRequestStream;
15903 #[cfg(target_os = "fuchsia")]
15904 type SynchronousProxy = ReadableSynchronousProxy;
15905
15906 const DEBUG_NAME: &'static str = "(anonymous) Readable";
15907}
15908pub type ReadableReadResult = Result<Vec<u8>, i32>;
15909
15910pub trait ReadableProxyInterface: Send + Sync {
15911 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
15912 + Send;
15913 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
15914}
15915#[derive(Debug)]
15916#[cfg(target_os = "fuchsia")]
15917pub struct ReadableSynchronousProxy {
15918 client: fidl::client::sync::Client,
15919}
15920
15921#[cfg(target_os = "fuchsia")]
15922impl fidl::endpoints::SynchronousProxy for ReadableSynchronousProxy {
15923 type Proxy = ReadableProxy;
15924 type Protocol = ReadableMarker;
15925
15926 fn from_channel(inner: fidl::Channel) -> Self {
15927 Self::new(inner)
15928 }
15929
15930 fn into_channel(self) -> fidl::Channel {
15931 self.client.into_channel()
15932 }
15933
15934 fn as_channel(&self) -> &fidl::Channel {
15935 self.client.as_channel()
15936 }
15937}
15938
15939#[cfg(target_os = "fuchsia")]
15940impl ReadableSynchronousProxy {
15941 pub fn new(channel: fidl::Channel) -> Self {
15942 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
15943 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
15944 }
15945
15946 pub fn into_channel(self) -> fidl::Channel {
15947 self.client.into_channel()
15948 }
15949
15950 pub fn wait_for_event(
15953 &self,
15954 deadline: zx::MonotonicInstant,
15955 ) -> Result<ReadableEvent, fidl::Error> {
15956 ReadableEvent::decode(self.client.wait_for_event(deadline)?)
15957 }
15958
15959 pub fn r#read(
15978 &self,
15979 mut count: u64,
15980 ___deadline: zx::MonotonicInstant,
15981 ) -> Result<ReadableReadResult, fidl::Error> {
15982 let _response = self.client.send_query::<
15983 ReadableReadRequest,
15984 fidl::encoding::ResultType<ReadableReadResponse, i32>,
15985 >(
15986 (count,),
15987 0x57e419a298c8ede,
15988 fidl::encoding::DynamicFlags::empty(),
15989 ___deadline,
15990 )?;
15991 Ok(_response.map(|x| x.data))
15992 }
15993}
15994
15995#[cfg(target_os = "fuchsia")]
15996impl From<ReadableSynchronousProxy> for zx::Handle {
15997 fn from(value: ReadableSynchronousProxy) -> Self {
15998 value.into_channel().into()
15999 }
16000}
16001
16002#[cfg(target_os = "fuchsia")]
16003impl From<fidl::Channel> for ReadableSynchronousProxy {
16004 fn from(value: fidl::Channel) -> Self {
16005 Self::new(value)
16006 }
16007}
16008
16009#[derive(Debug, Clone)]
16010pub struct ReadableProxy {
16011 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16012}
16013
16014impl fidl::endpoints::Proxy for ReadableProxy {
16015 type Protocol = ReadableMarker;
16016
16017 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16018 Self::new(inner)
16019 }
16020
16021 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16022 self.client.into_channel().map_err(|client| Self { client })
16023 }
16024
16025 fn as_channel(&self) -> &::fidl::AsyncChannel {
16026 self.client.as_channel()
16027 }
16028}
16029
16030impl ReadableProxy {
16031 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16033 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16034 Self { client: fidl::client::Client::new(channel, protocol_name) }
16035 }
16036
16037 pub fn take_event_stream(&self) -> ReadableEventStream {
16043 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
16044 }
16045
16046 pub fn r#read(
16065 &self,
16066 mut count: u64,
16067 ) -> fidl::client::QueryResponseFut<
16068 ReadableReadResult,
16069 fidl::encoding::DefaultFuchsiaResourceDialect,
16070 > {
16071 ReadableProxyInterface::r#read(self, count)
16072 }
16073}
16074
16075impl ReadableProxyInterface for ReadableProxy {
16076 type ReadResponseFut = fidl::client::QueryResponseFut<
16077 ReadableReadResult,
16078 fidl::encoding::DefaultFuchsiaResourceDialect,
16079 >;
16080 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
16081 fn _decode(
16082 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16083 ) -> Result<ReadableReadResult, fidl::Error> {
16084 let _response = fidl::client::decode_transaction_body::<
16085 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16086 fidl::encoding::DefaultFuchsiaResourceDialect,
16087 0x57e419a298c8ede,
16088 >(_buf?)?;
16089 Ok(_response.map(|x| x.data))
16090 }
16091 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
16092 (count,),
16093 0x57e419a298c8ede,
16094 fidl::encoding::DynamicFlags::empty(),
16095 _decode,
16096 )
16097 }
16098}
16099
16100pub struct ReadableEventStream {
16101 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16102}
16103
16104impl std::marker::Unpin for ReadableEventStream {}
16105
16106impl futures::stream::FusedStream for ReadableEventStream {
16107 fn is_terminated(&self) -> bool {
16108 self.event_receiver.is_terminated()
16109 }
16110}
16111
16112impl futures::Stream for ReadableEventStream {
16113 type Item = Result<ReadableEvent, fidl::Error>;
16114
16115 fn poll_next(
16116 mut self: std::pin::Pin<&mut Self>,
16117 cx: &mut std::task::Context<'_>,
16118 ) -> std::task::Poll<Option<Self::Item>> {
16119 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16120 &mut self.event_receiver,
16121 cx
16122 )?) {
16123 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
16124 None => std::task::Poll::Ready(None),
16125 }
16126 }
16127}
16128
16129#[derive(Debug)]
16130pub enum ReadableEvent {}
16131
16132impl ReadableEvent {
16133 fn decode(
16135 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16136 ) -> Result<ReadableEvent, fidl::Error> {
16137 let (bytes, _handles) = buf.split_mut();
16138 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16139 debug_assert_eq!(tx_header.tx_id, 0);
16140 match tx_header.ordinal {
16141 _ => Err(fidl::Error::UnknownOrdinal {
16142 ordinal: tx_header.ordinal,
16143 protocol_name: <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16144 }),
16145 }
16146 }
16147}
16148
16149pub struct ReadableRequestStream {
16151 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16152 is_terminated: bool,
16153}
16154
16155impl std::marker::Unpin for ReadableRequestStream {}
16156
16157impl futures::stream::FusedStream for ReadableRequestStream {
16158 fn is_terminated(&self) -> bool {
16159 self.is_terminated
16160 }
16161}
16162
16163impl fidl::endpoints::RequestStream for ReadableRequestStream {
16164 type Protocol = ReadableMarker;
16165 type ControlHandle = ReadableControlHandle;
16166
16167 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16168 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16169 }
16170
16171 fn control_handle(&self) -> Self::ControlHandle {
16172 ReadableControlHandle { inner: self.inner.clone() }
16173 }
16174
16175 fn into_inner(
16176 self,
16177 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16178 {
16179 (self.inner, self.is_terminated)
16180 }
16181
16182 fn from_inner(
16183 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16184 is_terminated: bool,
16185 ) -> Self {
16186 Self { inner, is_terminated }
16187 }
16188}
16189
16190impl futures::Stream for ReadableRequestStream {
16191 type Item = Result<ReadableRequest, fidl::Error>;
16192
16193 fn poll_next(
16194 mut self: std::pin::Pin<&mut Self>,
16195 cx: &mut std::task::Context<'_>,
16196 ) -> std::task::Poll<Option<Self::Item>> {
16197 let this = &mut *self;
16198 if this.inner.check_shutdown(cx) {
16199 this.is_terminated = true;
16200 return std::task::Poll::Ready(None);
16201 }
16202 if this.is_terminated {
16203 panic!("polled ReadableRequestStream after completion");
16204 }
16205 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16206 |bytes, handles| {
16207 match this.inner.channel().read_etc(cx, bytes, handles) {
16208 std::task::Poll::Ready(Ok(())) => {}
16209 std::task::Poll::Pending => return std::task::Poll::Pending,
16210 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16211 this.is_terminated = true;
16212 return std::task::Poll::Ready(None);
16213 }
16214 std::task::Poll::Ready(Err(e)) => {
16215 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16216 e.into(),
16217 ))))
16218 }
16219 }
16220
16221 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16223
16224 std::task::Poll::Ready(Some(match header.ordinal {
16225 0x57e419a298c8ede => {
16226 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
16227 let mut req = fidl::new_empty!(
16228 ReadableReadRequest,
16229 fidl::encoding::DefaultFuchsiaResourceDialect
16230 );
16231 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
16232 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
16233 Ok(ReadableRequest::Read {
16234 count: req.count,
16235
16236 responder: ReadableReadResponder {
16237 control_handle: std::mem::ManuallyDrop::new(control_handle),
16238 tx_id: header.tx_id,
16239 },
16240 })
16241 }
16242 _ => Err(fidl::Error::UnknownOrdinal {
16243 ordinal: header.ordinal,
16244 protocol_name:
16245 <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16246 }),
16247 }))
16248 },
16249 )
16250 }
16251}
16252
16253#[derive(Debug)]
16254pub enum ReadableRequest {
16255 Read { count: u64, responder: ReadableReadResponder },
16274}
16275
16276impl ReadableRequest {
16277 #[allow(irrefutable_let_patterns)]
16278 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
16279 if let ReadableRequest::Read { count, responder } = self {
16280 Some((count, responder))
16281 } else {
16282 None
16283 }
16284 }
16285
16286 pub fn method_name(&self) -> &'static str {
16288 match *self {
16289 ReadableRequest::Read { .. } => "read",
16290 }
16291 }
16292}
16293
16294#[derive(Debug, Clone)]
16295pub struct ReadableControlHandle {
16296 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16297}
16298
16299impl fidl::endpoints::ControlHandle for ReadableControlHandle {
16300 fn shutdown(&self) {
16301 self.inner.shutdown()
16302 }
16303 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
16304 self.inner.shutdown_with_epitaph(status)
16305 }
16306
16307 fn is_closed(&self) -> bool {
16308 self.inner.channel().is_closed()
16309 }
16310 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16311 self.inner.channel().on_closed()
16312 }
16313
16314 #[cfg(target_os = "fuchsia")]
16315 fn signal_peer(
16316 &self,
16317 clear_mask: zx::Signals,
16318 set_mask: zx::Signals,
16319 ) -> Result<(), zx_status::Status> {
16320 use fidl::Peered;
16321 self.inner.channel().signal_peer(clear_mask, set_mask)
16322 }
16323}
16324
16325impl ReadableControlHandle {}
16326
16327#[must_use = "FIDL methods require a response to be sent"]
16328#[derive(Debug)]
16329pub struct ReadableReadResponder {
16330 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
16331 tx_id: u32,
16332}
16333
16334impl std::ops::Drop for ReadableReadResponder {
16338 fn drop(&mut self) {
16339 self.control_handle.shutdown();
16340 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16342 }
16343}
16344
16345impl fidl::endpoints::Responder for ReadableReadResponder {
16346 type ControlHandle = ReadableControlHandle;
16347
16348 fn control_handle(&self) -> &ReadableControlHandle {
16349 &self.control_handle
16350 }
16351
16352 fn drop_without_shutdown(mut self) {
16353 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16355 std::mem::forget(self);
16357 }
16358}
16359
16360impl ReadableReadResponder {
16361 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16365 let _result = self.send_raw(result);
16366 if _result.is_err() {
16367 self.control_handle.shutdown();
16368 }
16369 self.drop_without_shutdown();
16370 _result
16371 }
16372
16373 pub fn send_no_shutdown_on_err(
16375 self,
16376 mut result: Result<&[u8], i32>,
16377 ) -> Result<(), fidl::Error> {
16378 let _result = self.send_raw(result);
16379 self.drop_without_shutdown();
16380 _result
16381 }
16382
16383 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16384 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
16385 result.map(|data| (data,)),
16386 self.tx_id,
16387 0x57e419a298c8ede,
16388 fidl::encoding::DynamicFlags::empty(),
16389 )
16390 }
16391}
16392
16393#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16394pub struct SymlinkMarker;
16395
16396impl fidl::endpoints::ProtocolMarker for SymlinkMarker {
16397 type Proxy = SymlinkProxy;
16398 type RequestStream = SymlinkRequestStream;
16399 #[cfg(target_os = "fuchsia")]
16400 type SynchronousProxy = SymlinkSynchronousProxy;
16401
16402 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
16403}
16404impl fidl::endpoints::DiscoverableProtocolMarker for SymlinkMarker {}
16405
16406pub trait SymlinkProxyInterface: Send + Sync {
16407 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
16408 + Send;
16409 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
16410 fn r#clone(
16411 &self,
16412 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16413 ) -> Result<(), fidl::Error>;
16414 type CloseResponseFut: std::future::Future<
16415 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
16416 > + Send;
16417 fn r#close(&self) -> Self::CloseResponseFut;
16418 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
16419 fn r#query(&self) -> Self::QueryResponseFut;
16420 fn r#deprecated_clone(
16421 &self,
16422 flags: OpenFlags,
16423 object: fidl::endpoints::ServerEnd<NodeMarker>,
16424 ) -> Result<(), fidl::Error>;
16425 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
16426 + Send;
16427 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
16428 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
16429 fn r#deprecated_set_attr(
16430 &self,
16431 flags: NodeAttributeFlags,
16432 attributes: &NodeAttributes,
16433 ) -> Self::DeprecatedSetAttrResponseFut;
16434 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
16435 + Send;
16436 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
16437 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
16438 + Send;
16439 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
16440 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
16441 + Send;
16442 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
16443 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
16444 + Send;
16445 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
16446 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
16447 + Send;
16448 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
16449 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
16450 + Send;
16451 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
16452 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
16453 + Send;
16454 fn r#update_attributes(
16455 &self,
16456 payload: &MutableNodeAttributes,
16457 ) -> Self::UpdateAttributesResponseFut;
16458 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
16459 fn r#sync(&self) -> Self::SyncResponseFut;
16460 fn r#list_extended_attributes(
16461 &self,
16462 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16463 ) -> Result<(), fidl::Error>;
16464 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
16465 + Send;
16466 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
16467 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
16468 + Send;
16469 fn r#set_extended_attribute(
16470 &self,
16471 name: &[u8],
16472 value: ExtendedAttributeValue,
16473 mode: SetExtendedAttributeMode,
16474 ) -> Self::SetExtendedAttributeResponseFut;
16475 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
16476 + Send;
16477 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
16478 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
16479 fn r#describe(&self) -> Self::DescribeResponseFut;
16480}
16481#[derive(Debug)]
16482#[cfg(target_os = "fuchsia")]
16483pub struct SymlinkSynchronousProxy {
16484 client: fidl::client::sync::Client,
16485}
16486
16487#[cfg(target_os = "fuchsia")]
16488impl fidl::endpoints::SynchronousProxy for SymlinkSynchronousProxy {
16489 type Proxy = SymlinkProxy;
16490 type Protocol = SymlinkMarker;
16491
16492 fn from_channel(inner: fidl::Channel) -> Self {
16493 Self::new(inner)
16494 }
16495
16496 fn into_channel(self) -> fidl::Channel {
16497 self.client.into_channel()
16498 }
16499
16500 fn as_channel(&self) -> &fidl::Channel {
16501 self.client.as_channel()
16502 }
16503}
16504
16505#[cfg(target_os = "fuchsia")]
16506impl SymlinkSynchronousProxy {
16507 pub fn new(channel: fidl::Channel) -> Self {
16508 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16509 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
16510 }
16511
16512 pub fn into_channel(self) -> fidl::Channel {
16513 self.client.into_channel()
16514 }
16515
16516 pub fn wait_for_event(
16519 &self,
16520 deadline: zx::MonotonicInstant,
16521 ) -> Result<SymlinkEvent, fidl::Error> {
16522 SymlinkEvent::decode(self.client.wait_for_event(deadline)?)
16523 }
16524
16525 pub fn r#link_into(
16548 &self,
16549 mut dst_parent_token: fidl::Event,
16550 mut dst: &str,
16551 ___deadline: zx::MonotonicInstant,
16552 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
16553 let _response = self.client.send_query::<
16554 LinkableLinkIntoRequest,
16555 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16556 >(
16557 (dst_parent_token, dst,),
16558 0x54f3949246a03e74,
16559 fidl::encoding::DynamicFlags::empty(),
16560 ___deadline,
16561 )?;
16562 Ok(_response.map(|x| x))
16563 }
16564
16565 pub fn r#clone(
16566 &self,
16567 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16568 ) -> Result<(), fidl::Error> {
16569 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
16570 (request,),
16571 0x20d8a7aba2168a79,
16572 fidl::encoding::DynamicFlags::empty(),
16573 )
16574 }
16575
16576 pub fn r#close(
16587 &self,
16588 ___deadline: zx::MonotonicInstant,
16589 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
16590 let _response = self.client.send_query::<
16591 fidl::encoding::EmptyPayload,
16592 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16593 >(
16594 (),
16595 0x5ac5d459ad7f657e,
16596 fidl::encoding::DynamicFlags::empty(),
16597 ___deadline,
16598 )?;
16599 Ok(_response.map(|x| x))
16600 }
16601
16602 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
16603 let _response = self.client.send_query::<
16604 fidl::encoding::EmptyPayload,
16605 fidl_fuchsia_unknown::QueryableQueryResponse,
16606 >(
16607 (),
16608 0x2658edee9decfc06,
16609 fidl::encoding::DynamicFlags::empty(),
16610 ___deadline,
16611 )?;
16612 Ok(_response.protocol)
16613 }
16614
16615 pub fn r#deprecated_clone(
16617 &self,
16618 mut flags: OpenFlags,
16619 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
16620 ) -> Result<(), fidl::Error> {
16621 self.client.send::<NodeDeprecatedCloneRequest>(
16622 (flags, object),
16623 0x5a61678f293ce16f,
16624 fidl::encoding::DynamicFlags::FLEXIBLE,
16625 )
16626 }
16627
16628 pub fn r#deprecated_get_attr(
16630 &self,
16631 ___deadline: zx::MonotonicInstant,
16632 ) -> Result<(i32, NodeAttributes), fidl::Error> {
16633 let _response =
16634 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
16635 (),
16636 0x78985e216314dafd,
16637 fidl::encoding::DynamicFlags::empty(),
16638 ___deadline,
16639 )?;
16640 Ok((_response.s, _response.attributes))
16641 }
16642
16643 pub fn r#deprecated_set_attr(
16645 &self,
16646 mut flags: NodeAttributeFlags,
16647 mut attributes: &NodeAttributes,
16648 ___deadline: zx::MonotonicInstant,
16649 ) -> Result<i32, fidl::Error> {
16650 let _response =
16651 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
16652 (flags, attributes),
16653 0x4186c0f40d938f46,
16654 fidl::encoding::DynamicFlags::empty(),
16655 ___deadline,
16656 )?;
16657 Ok(_response.s)
16658 }
16659
16660 pub fn r#deprecated_get_flags(
16662 &self,
16663 ___deadline: zx::MonotonicInstant,
16664 ) -> Result<(i32, OpenFlags), fidl::Error> {
16665 let _response = self
16666 .client
16667 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
16668 (),
16669 0x5b88fffb8eda3aa1,
16670 fidl::encoding::DynamicFlags::empty(),
16671 ___deadline,
16672 )?;
16673 Ok((_response.s, _response.flags))
16674 }
16675
16676 pub fn r#deprecated_set_flags(
16678 &self,
16679 mut flags: OpenFlags,
16680 ___deadline: zx::MonotonicInstant,
16681 ) -> Result<i32, fidl::Error> {
16682 let _response = self
16683 .client
16684 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
16685 (flags,),
16686 0x5295b76c71fde733,
16687 fidl::encoding::DynamicFlags::empty(),
16688 ___deadline,
16689 )?;
16690 Ok(_response.s)
16691 }
16692
16693 pub fn r#get_flags(
16702 &self,
16703 ___deadline: zx::MonotonicInstant,
16704 ) -> Result<NodeGetFlagsResult, fidl::Error> {
16705 let _response = self.client.send_query::<
16706 fidl::encoding::EmptyPayload,
16707 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
16708 >(
16709 (),
16710 0x176eb318f64ec23,
16711 fidl::encoding::DynamicFlags::FLEXIBLE,
16712 ___deadline,
16713 )?
16714 .into_result::<SymlinkMarker>("get_flags")?;
16715 Ok(_response.map(|x| x.flags))
16716 }
16717
16718 pub fn r#set_flags(
16728 &self,
16729 mut flags: Flags,
16730 ___deadline: zx::MonotonicInstant,
16731 ) -> Result<NodeSetFlagsResult, fidl::Error> {
16732 let _response = self.client.send_query::<
16733 NodeSetFlagsRequest,
16734 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
16735 >(
16736 (flags,),
16737 0x55a8028685791ea8,
16738 fidl::encoding::DynamicFlags::FLEXIBLE,
16739 ___deadline,
16740 )?
16741 .into_result::<SymlinkMarker>("set_flags")?;
16742 Ok(_response.map(|x| x))
16743 }
16744
16745 pub fn r#query_filesystem(
16747 &self,
16748 ___deadline: zx::MonotonicInstant,
16749 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
16750 let _response =
16751 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
16752 (),
16753 0x6f344a1c6b0a0610,
16754 fidl::encoding::DynamicFlags::empty(),
16755 ___deadline,
16756 )?;
16757 Ok((_response.s, _response.info))
16758 }
16759
16760 pub fn r#get_attributes(
16774 &self,
16775 mut query: NodeAttributesQuery,
16776 ___deadline: zx::MonotonicInstant,
16777 ) -> Result<NodeGetAttributesResult, fidl::Error> {
16778 let _response = self.client.send_query::<
16779 NodeGetAttributesRequest,
16780 fidl::encoding::ResultType<NodeAttributes2, i32>,
16781 >(
16782 (query,),
16783 0x3d4396a638ea053b,
16784 fidl::encoding::DynamicFlags::empty(),
16785 ___deadline,
16786 )?;
16787 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
16788 }
16789
16790 pub fn r#update_attributes(
16799 &self,
16800 mut payload: &MutableNodeAttributes,
16801 ___deadline: zx::MonotonicInstant,
16802 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
16803 let _response = self.client.send_query::<
16804 MutableNodeAttributes,
16805 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16806 >(
16807 payload,
16808 0x3308c1da5a89bf08,
16809 fidl::encoding::DynamicFlags::empty(),
16810 ___deadline,
16811 )?;
16812 Ok(_response.map(|x| x))
16813 }
16814
16815 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
16825 let _response = self.client.send_query::<
16826 fidl::encoding::EmptyPayload,
16827 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16828 >(
16829 (),
16830 0x2c5c27ca0ab5dc49,
16831 fidl::encoding::DynamicFlags::empty(),
16832 ___deadline,
16833 )?;
16834 Ok(_response.map(|x| x))
16835 }
16836
16837 pub fn r#list_extended_attributes(
16846 &self,
16847 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16848 ) -> Result<(), fidl::Error> {
16849 self.client.send::<NodeListExtendedAttributesRequest>(
16850 (iterator,),
16851 0x4b61033de007fcd0,
16852 fidl::encoding::DynamicFlags::empty(),
16853 )
16854 }
16855
16856 pub fn r#get_extended_attribute(
16863 &self,
16864 mut name: &[u8],
16865 ___deadline: zx::MonotonicInstant,
16866 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
16867 let _response = self.client.send_query::<
16868 NodeGetExtendedAttributeRequest,
16869 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
16870 >(
16871 (name,),
16872 0x45ffa3ccfdeb76db,
16873 fidl::encoding::DynamicFlags::empty(),
16874 ___deadline,
16875 )?;
16876 Ok(_response.map(|x| x))
16877 }
16878
16879 pub fn r#set_extended_attribute(
16887 &self,
16888 mut name: &[u8],
16889 mut value: ExtendedAttributeValue,
16890 mut mode: SetExtendedAttributeMode,
16891 ___deadline: zx::MonotonicInstant,
16892 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
16893 let _response = self.client.send_query::<
16894 NodeSetExtendedAttributeRequest,
16895 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16896 >(
16897 (name, &mut value, mode,),
16898 0x4a951362f681f23c,
16899 fidl::encoding::DynamicFlags::empty(),
16900 ___deadline,
16901 )?;
16902 Ok(_response.map(|x| x))
16903 }
16904
16905 pub fn r#remove_extended_attribute(
16911 &self,
16912 mut name: &[u8],
16913 ___deadline: zx::MonotonicInstant,
16914 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
16915 let _response = self.client.send_query::<
16916 NodeRemoveExtendedAttributeRequest,
16917 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16918 >(
16919 (name,),
16920 0x7a0b9f3a9bf9032d,
16921 fidl::encoding::DynamicFlags::empty(),
16922 ___deadline,
16923 )?;
16924 Ok(_response.map(|x| x))
16925 }
16926
16927 pub fn r#describe(
16928 &self,
16929 ___deadline: zx::MonotonicInstant,
16930 ) -> Result<SymlinkInfo, fidl::Error> {
16931 let _response = self
16932 .client
16933 .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleType<SymlinkInfo>>(
16934 (),
16935 0x742c2ea5e89831f3,
16936 fidl::encoding::DynamicFlags::FLEXIBLE,
16937 ___deadline,
16938 )?
16939 .into_result::<SymlinkMarker>("describe")?;
16940 Ok(_response)
16941 }
16942}
16943
16944#[cfg(target_os = "fuchsia")]
16945impl From<SymlinkSynchronousProxy> for zx::Handle {
16946 fn from(value: SymlinkSynchronousProxy) -> Self {
16947 value.into_channel().into()
16948 }
16949}
16950
16951#[cfg(target_os = "fuchsia")]
16952impl From<fidl::Channel> for SymlinkSynchronousProxy {
16953 fn from(value: fidl::Channel) -> Self {
16954 Self::new(value)
16955 }
16956}
16957
16958#[derive(Debug, Clone)]
16959pub struct SymlinkProxy {
16960 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16961}
16962
16963impl fidl::endpoints::Proxy for SymlinkProxy {
16964 type Protocol = SymlinkMarker;
16965
16966 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16967 Self::new(inner)
16968 }
16969
16970 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16971 self.client.into_channel().map_err(|client| Self { client })
16972 }
16973
16974 fn as_channel(&self) -> &::fidl::AsyncChannel {
16975 self.client.as_channel()
16976 }
16977}
16978
16979impl SymlinkProxy {
16980 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16982 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16983 Self { client: fidl::client::Client::new(channel, protocol_name) }
16984 }
16985
16986 pub fn take_event_stream(&self) -> SymlinkEventStream {
16992 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
16993 }
16994
16995 pub fn r#link_into(
17018 &self,
17019 mut dst_parent_token: fidl::Event,
17020 mut dst: &str,
17021 ) -> fidl::client::QueryResponseFut<
17022 LinkableLinkIntoResult,
17023 fidl::encoding::DefaultFuchsiaResourceDialect,
17024 > {
17025 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
17026 }
17027
17028 pub fn r#clone(
17029 &self,
17030 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17031 ) -> Result<(), fidl::Error> {
17032 SymlinkProxyInterface::r#clone(self, request)
17033 }
17034
17035 pub fn r#close(
17046 &self,
17047 ) -> fidl::client::QueryResponseFut<
17048 fidl_fuchsia_unknown::CloseableCloseResult,
17049 fidl::encoding::DefaultFuchsiaResourceDialect,
17050 > {
17051 SymlinkProxyInterface::r#close(self)
17052 }
17053
17054 pub fn r#query(
17055 &self,
17056 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
17057 {
17058 SymlinkProxyInterface::r#query(self)
17059 }
17060
17061 pub fn r#deprecated_clone(
17063 &self,
17064 mut flags: OpenFlags,
17065 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17066 ) -> Result<(), fidl::Error> {
17067 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
17068 }
17069
17070 pub fn r#deprecated_get_attr(
17072 &self,
17073 ) -> fidl::client::QueryResponseFut<
17074 (i32, NodeAttributes),
17075 fidl::encoding::DefaultFuchsiaResourceDialect,
17076 > {
17077 SymlinkProxyInterface::r#deprecated_get_attr(self)
17078 }
17079
17080 pub fn r#deprecated_set_attr(
17082 &self,
17083 mut flags: NodeAttributeFlags,
17084 mut attributes: &NodeAttributes,
17085 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17086 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
17087 }
17088
17089 pub fn r#deprecated_get_flags(
17091 &self,
17092 ) -> fidl::client::QueryResponseFut<
17093 (i32, OpenFlags),
17094 fidl::encoding::DefaultFuchsiaResourceDialect,
17095 > {
17096 SymlinkProxyInterface::r#deprecated_get_flags(self)
17097 }
17098
17099 pub fn r#deprecated_set_flags(
17101 &self,
17102 mut flags: OpenFlags,
17103 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17104 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
17105 }
17106
17107 pub fn r#get_flags(
17116 &self,
17117 ) -> fidl::client::QueryResponseFut<
17118 NodeGetFlagsResult,
17119 fidl::encoding::DefaultFuchsiaResourceDialect,
17120 > {
17121 SymlinkProxyInterface::r#get_flags(self)
17122 }
17123
17124 pub fn r#set_flags(
17134 &self,
17135 mut flags: Flags,
17136 ) -> fidl::client::QueryResponseFut<
17137 NodeSetFlagsResult,
17138 fidl::encoding::DefaultFuchsiaResourceDialect,
17139 > {
17140 SymlinkProxyInterface::r#set_flags(self, flags)
17141 }
17142
17143 pub fn r#query_filesystem(
17145 &self,
17146 ) -> fidl::client::QueryResponseFut<
17147 (i32, Option<Box<FilesystemInfo>>),
17148 fidl::encoding::DefaultFuchsiaResourceDialect,
17149 > {
17150 SymlinkProxyInterface::r#query_filesystem(self)
17151 }
17152
17153 pub fn r#get_attributes(
17167 &self,
17168 mut query: NodeAttributesQuery,
17169 ) -> fidl::client::QueryResponseFut<
17170 NodeGetAttributesResult,
17171 fidl::encoding::DefaultFuchsiaResourceDialect,
17172 > {
17173 SymlinkProxyInterface::r#get_attributes(self, query)
17174 }
17175
17176 pub fn r#update_attributes(
17185 &self,
17186 mut payload: &MutableNodeAttributes,
17187 ) -> fidl::client::QueryResponseFut<
17188 NodeUpdateAttributesResult,
17189 fidl::encoding::DefaultFuchsiaResourceDialect,
17190 > {
17191 SymlinkProxyInterface::r#update_attributes(self, payload)
17192 }
17193
17194 pub fn r#sync(
17204 &self,
17205 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
17206 {
17207 SymlinkProxyInterface::r#sync(self)
17208 }
17209
17210 pub fn r#list_extended_attributes(
17219 &self,
17220 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17221 ) -> Result<(), fidl::Error> {
17222 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
17223 }
17224
17225 pub fn r#get_extended_attribute(
17232 &self,
17233 mut name: &[u8],
17234 ) -> fidl::client::QueryResponseFut<
17235 NodeGetExtendedAttributeResult,
17236 fidl::encoding::DefaultFuchsiaResourceDialect,
17237 > {
17238 SymlinkProxyInterface::r#get_extended_attribute(self, name)
17239 }
17240
17241 pub fn r#set_extended_attribute(
17249 &self,
17250 mut name: &[u8],
17251 mut value: ExtendedAttributeValue,
17252 mut mode: SetExtendedAttributeMode,
17253 ) -> fidl::client::QueryResponseFut<
17254 NodeSetExtendedAttributeResult,
17255 fidl::encoding::DefaultFuchsiaResourceDialect,
17256 > {
17257 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
17258 }
17259
17260 pub fn r#remove_extended_attribute(
17266 &self,
17267 mut name: &[u8],
17268 ) -> fidl::client::QueryResponseFut<
17269 NodeRemoveExtendedAttributeResult,
17270 fidl::encoding::DefaultFuchsiaResourceDialect,
17271 > {
17272 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
17273 }
17274
17275 pub fn r#describe(
17276 &self,
17277 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
17278 {
17279 SymlinkProxyInterface::r#describe(self)
17280 }
17281}
17282
17283impl SymlinkProxyInterface for SymlinkProxy {
17284 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
17285 LinkableLinkIntoResult,
17286 fidl::encoding::DefaultFuchsiaResourceDialect,
17287 >;
17288 fn r#link_into(
17289 &self,
17290 mut dst_parent_token: fidl::Event,
17291 mut dst: &str,
17292 ) -> Self::LinkIntoResponseFut {
17293 fn _decode(
17294 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17295 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
17296 let _response = fidl::client::decode_transaction_body::<
17297 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17298 fidl::encoding::DefaultFuchsiaResourceDialect,
17299 0x54f3949246a03e74,
17300 >(_buf?)?;
17301 Ok(_response.map(|x| x))
17302 }
17303 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
17304 (dst_parent_token, dst),
17305 0x54f3949246a03e74,
17306 fidl::encoding::DynamicFlags::empty(),
17307 _decode,
17308 )
17309 }
17310
17311 fn r#clone(
17312 &self,
17313 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17314 ) -> Result<(), fidl::Error> {
17315 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
17316 (request,),
17317 0x20d8a7aba2168a79,
17318 fidl::encoding::DynamicFlags::empty(),
17319 )
17320 }
17321
17322 type CloseResponseFut = fidl::client::QueryResponseFut<
17323 fidl_fuchsia_unknown::CloseableCloseResult,
17324 fidl::encoding::DefaultFuchsiaResourceDialect,
17325 >;
17326 fn r#close(&self) -> Self::CloseResponseFut {
17327 fn _decode(
17328 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17329 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
17330 let _response = fidl::client::decode_transaction_body::<
17331 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17332 fidl::encoding::DefaultFuchsiaResourceDialect,
17333 0x5ac5d459ad7f657e,
17334 >(_buf?)?;
17335 Ok(_response.map(|x| x))
17336 }
17337 self.client.send_query_and_decode::<
17338 fidl::encoding::EmptyPayload,
17339 fidl_fuchsia_unknown::CloseableCloseResult,
17340 >(
17341 (),
17342 0x5ac5d459ad7f657e,
17343 fidl::encoding::DynamicFlags::empty(),
17344 _decode,
17345 )
17346 }
17347
17348 type QueryResponseFut =
17349 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
17350 fn r#query(&self) -> Self::QueryResponseFut {
17351 fn _decode(
17352 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17353 ) -> Result<Vec<u8>, fidl::Error> {
17354 let _response = fidl::client::decode_transaction_body::<
17355 fidl_fuchsia_unknown::QueryableQueryResponse,
17356 fidl::encoding::DefaultFuchsiaResourceDialect,
17357 0x2658edee9decfc06,
17358 >(_buf?)?;
17359 Ok(_response.protocol)
17360 }
17361 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
17362 (),
17363 0x2658edee9decfc06,
17364 fidl::encoding::DynamicFlags::empty(),
17365 _decode,
17366 )
17367 }
17368
17369 fn r#deprecated_clone(
17370 &self,
17371 mut flags: OpenFlags,
17372 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17373 ) -> Result<(), fidl::Error> {
17374 self.client.send::<NodeDeprecatedCloneRequest>(
17375 (flags, object),
17376 0x5a61678f293ce16f,
17377 fidl::encoding::DynamicFlags::FLEXIBLE,
17378 )
17379 }
17380
17381 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
17382 (i32, NodeAttributes),
17383 fidl::encoding::DefaultFuchsiaResourceDialect,
17384 >;
17385 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
17386 fn _decode(
17387 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17388 ) -> Result<(i32, NodeAttributes), fidl::Error> {
17389 let _response = fidl::client::decode_transaction_body::<
17390 NodeDeprecatedGetAttrResponse,
17391 fidl::encoding::DefaultFuchsiaResourceDialect,
17392 0x78985e216314dafd,
17393 >(_buf?)?;
17394 Ok((_response.s, _response.attributes))
17395 }
17396 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
17397 (),
17398 0x78985e216314dafd,
17399 fidl::encoding::DynamicFlags::empty(),
17400 _decode,
17401 )
17402 }
17403
17404 type DeprecatedSetAttrResponseFut =
17405 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17406 fn r#deprecated_set_attr(
17407 &self,
17408 mut flags: NodeAttributeFlags,
17409 mut attributes: &NodeAttributes,
17410 ) -> Self::DeprecatedSetAttrResponseFut {
17411 fn _decode(
17412 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17413 ) -> Result<i32, fidl::Error> {
17414 let _response = fidl::client::decode_transaction_body::<
17415 NodeDeprecatedSetAttrResponse,
17416 fidl::encoding::DefaultFuchsiaResourceDialect,
17417 0x4186c0f40d938f46,
17418 >(_buf?)?;
17419 Ok(_response.s)
17420 }
17421 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
17422 (flags, attributes),
17423 0x4186c0f40d938f46,
17424 fidl::encoding::DynamicFlags::empty(),
17425 _decode,
17426 )
17427 }
17428
17429 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
17430 (i32, OpenFlags),
17431 fidl::encoding::DefaultFuchsiaResourceDialect,
17432 >;
17433 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
17434 fn _decode(
17435 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17436 ) -> Result<(i32, OpenFlags), fidl::Error> {
17437 let _response = fidl::client::decode_transaction_body::<
17438 NodeDeprecatedGetFlagsResponse,
17439 fidl::encoding::DefaultFuchsiaResourceDialect,
17440 0x5b88fffb8eda3aa1,
17441 >(_buf?)?;
17442 Ok((_response.s, _response.flags))
17443 }
17444 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
17445 (),
17446 0x5b88fffb8eda3aa1,
17447 fidl::encoding::DynamicFlags::empty(),
17448 _decode,
17449 )
17450 }
17451
17452 type DeprecatedSetFlagsResponseFut =
17453 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17454 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
17455 fn _decode(
17456 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17457 ) -> Result<i32, fidl::Error> {
17458 let _response = fidl::client::decode_transaction_body::<
17459 NodeDeprecatedSetFlagsResponse,
17460 fidl::encoding::DefaultFuchsiaResourceDialect,
17461 0x5295b76c71fde733,
17462 >(_buf?)?;
17463 Ok(_response.s)
17464 }
17465 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
17466 (flags,),
17467 0x5295b76c71fde733,
17468 fidl::encoding::DynamicFlags::empty(),
17469 _decode,
17470 )
17471 }
17472
17473 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
17474 NodeGetFlagsResult,
17475 fidl::encoding::DefaultFuchsiaResourceDialect,
17476 >;
17477 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
17478 fn _decode(
17479 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17480 ) -> Result<NodeGetFlagsResult, fidl::Error> {
17481 let _response = fidl::client::decode_transaction_body::<
17482 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
17483 fidl::encoding::DefaultFuchsiaResourceDialect,
17484 0x176eb318f64ec23,
17485 >(_buf?)?
17486 .into_result::<SymlinkMarker>("get_flags")?;
17487 Ok(_response.map(|x| x.flags))
17488 }
17489 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
17490 (),
17491 0x176eb318f64ec23,
17492 fidl::encoding::DynamicFlags::FLEXIBLE,
17493 _decode,
17494 )
17495 }
17496
17497 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
17498 NodeSetFlagsResult,
17499 fidl::encoding::DefaultFuchsiaResourceDialect,
17500 >;
17501 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
17502 fn _decode(
17503 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17504 ) -> Result<NodeSetFlagsResult, fidl::Error> {
17505 let _response = fidl::client::decode_transaction_body::<
17506 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
17507 fidl::encoding::DefaultFuchsiaResourceDialect,
17508 0x55a8028685791ea8,
17509 >(_buf?)?
17510 .into_result::<SymlinkMarker>("set_flags")?;
17511 Ok(_response.map(|x| x))
17512 }
17513 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
17514 (flags,),
17515 0x55a8028685791ea8,
17516 fidl::encoding::DynamicFlags::FLEXIBLE,
17517 _decode,
17518 )
17519 }
17520
17521 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
17522 (i32, Option<Box<FilesystemInfo>>),
17523 fidl::encoding::DefaultFuchsiaResourceDialect,
17524 >;
17525 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
17526 fn _decode(
17527 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17528 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
17529 let _response = fidl::client::decode_transaction_body::<
17530 NodeQueryFilesystemResponse,
17531 fidl::encoding::DefaultFuchsiaResourceDialect,
17532 0x6f344a1c6b0a0610,
17533 >(_buf?)?;
17534 Ok((_response.s, _response.info))
17535 }
17536 self.client.send_query_and_decode::<
17537 fidl::encoding::EmptyPayload,
17538 (i32, Option<Box<FilesystemInfo>>),
17539 >(
17540 (),
17541 0x6f344a1c6b0a0610,
17542 fidl::encoding::DynamicFlags::empty(),
17543 _decode,
17544 )
17545 }
17546
17547 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
17548 NodeGetAttributesResult,
17549 fidl::encoding::DefaultFuchsiaResourceDialect,
17550 >;
17551 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
17552 fn _decode(
17553 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17554 ) -> Result<NodeGetAttributesResult, fidl::Error> {
17555 let _response = fidl::client::decode_transaction_body::<
17556 fidl::encoding::ResultType<NodeAttributes2, i32>,
17557 fidl::encoding::DefaultFuchsiaResourceDialect,
17558 0x3d4396a638ea053b,
17559 >(_buf?)?;
17560 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
17561 }
17562 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
17563 (query,),
17564 0x3d4396a638ea053b,
17565 fidl::encoding::DynamicFlags::empty(),
17566 _decode,
17567 )
17568 }
17569
17570 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
17571 NodeUpdateAttributesResult,
17572 fidl::encoding::DefaultFuchsiaResourceDialect,
17573 >;
17574 fn r#update_attributes(
17575 &self,
17576 mut payload: &MutableNodeAttributes,
17577 ) -> Self::UpdateAttributesResponseFut {
17578 fn _decode(
17579 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17580 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
17581 let _response = fidl::client::decode_transaction_body::<
17582 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17583 fidl::encoding::DefaultFuchsiaResourceDialect,
17584 0x3308c1da5a89bf08,
17585 >(_buf?)?;
17586 Ok(_response.map(|x| x))
17587 }
17588 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
17589 payload,
17590 0x3308c1da5a89bf08,
17591 fidl::encoding::DynamicFlags::empty(),
17592 _decode,
17593 )
17594 }
17595
17596 type SyncResponseFut = fidl::client::QueryResponseFut<
17597 NodeSyncResult,
17598 fidl::encoding::DefaultFuchsiaResourceDialect,
17599 >;
17600 fn r#sync(&self) -> Self::SyncResponseFut {
17601 fn _decode(
17602 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17603 ) -> Result<NodeSyncResult, fidl::Error> {
17604 let _response = fidl::client::decode_transaction_body::<
17605 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17606 fidl::encoding::DefaultFuchsiaResourceDialect,
17607 0x2c5c27ca0ab5dc49,
17608 >(_buf?)?;
17609 Ok(_response.map(|x| x))
17610 }
17611 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
17612 (),
17613 0x2c5c27ca0ab5dc49,
17614 fidl::encoding::DynamicFlags::empty(),
17615 _decode,
17616 )
17617 }
17618
17619 fn r#list_extended_attributes(
17620 &self,
17621 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17622 ) -> Result<(), fidl::Error> {
17623 self.client.send::<NodeListExtendedAttributesRequest>(
17624 (iterator,),
17625 0x4b61033de007fcd0,
17626 fidl::encoding::DynamicFlags::empty(),
17627 )
17628 }
17629
17630 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17631 NodeGetExtendedAttributeResult,
17632 fidl::encoding::DefaultFuchsiaResourceDialect,
17633 >;
17634 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
17635 fn _decode(
17636 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17637 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
17638 let _response = fidl::client::decode_transaction_body::<
17639 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
17640 fidl::encoding::DefaultFuchsiaResourceDialect,
17641 0x45ffa3ccfdeb76db,
17642 >(_buf?)?;
17643 Ok(_response.map(|x| x))
17644 }
17645 self.client.send_query_and_decode::<
17646 NodeGetExtendedAttributeRequest,
17647 NodeGetExtendedAttributeResult,
17648 >(
17649 (name,),
17650 0x45ffa3ccfdeb76db,
17651 fidl::encoding::DynamicFlags::empty(),
17652 _decode,
17653 )
17654 }
17655
17656 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17657 NodeSetExtendedAttributeResult,
17658 fidl::encoding::DefaultFuchsiaResourceDialect,
17659 >;
17660 fn r#set_extended_attribute(
17661 &self,
17662 mut name: &[u8],
17663 mut value: ExtendedAttributeValue,
17664 mut mode: SetExtendedAttributeMode,
17665 ) -> Self::SetExtendedAttributeResponseFut {
17666 fn _decode(
17667 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17668 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17669 let _response = fidl::client::decode_transaction_body::<
17670 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17671 fidl::encoding::DefaultFuchsiaResourceDialect,
17672 0x4a951362f681f23c,
17673 >(_buf?)?;
17674 Ok(_response.map(|x| x))
17675 }
17676 self.client.send_query_and_decode::<
17677 NodeSetExtendedAttributeRequest,
17678 NodeSetExtendedAttributeResult,
17679 >(
17680 (name, &mut value, mode,),
17681 0x4a951362f681f23c,
17682 fidl::encoding::DynamicFlags::empty(),
17683 _decode,
17684 )
17685 }
17686
17687 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17688 NodeRemoveExtendedAttributeResult,
17689 fidl::encoding::DefaultFuchsiaResourceDialect,
17690 >;
17691 fn r#remove_extended_attribute(
17692 &self,
17693 mut name: &[u8],
17694 ) -> Self::RemoveExtendedAttributeResponseFut {
17695 fn _decode(
17696 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17697 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17698 let _response = fidl::client::decode_transaction_body::<
17699 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17700 fidl::encoding::DefaultFuchsiaResourceDialect,
17701 0x7a0b9f3a9bf9032d,
17702 >(_buf?)?;
17703 Ok(_response.map(|x| x))
17704 }
17705 self.client.send_query_and_decode::<
17706 NodeRemoveExtendedAttributeRequest,
17707 NodeRemoveExtendedAttributeResult,
17708 >(
17709 (name,),
17710 0x7a0b9f3a9bf9032d,
17711 fidl::encoding::DynamicFlags::empty(),
17712 _decode,
17713 )
17714 }
17715
17716 type DescribeResponseFut =
17717 fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
17718 fn r#describe(&self) -> Self::DescribeResponseFut {
17719 fn _decode(
17720 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17721 ) -> Result<SymlinkInfo, fidl::Error> {
17722 let _response = fidl::client::decode_transaction_body::<
17723 fidl::encoding::FlexibleType<SymlinkInfo>,
17724 fidl::encoding::DefaultFuchsiaResourceDialect,
17725 0x742c2ea5e89831f3,
17726 >(_buf?)?
17727 .into_result::<SymlinkMarker>("describe")?;
17728 Ok(_response)
17729 }
17730 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
17731 (),
17732 0x742c2ea5e89831f3,
17733 fidl::encoding::DynamicFlags::FLEXIBLE,
17734 _decode,
17735 )
17736 }
17737}
17738
17739pub struct SymlinkEventStream {
17740 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
17741}
17742
17743impl std::marker::Unpin for SymlinkEventStream {}
17744
17745impl futures::stream::FusedStream for SymlinkEventStream {
17746 fn is_terminated(&self) -> bool {
17747 self.event_receiver.is_terminated()
17748 }
17749}
17750
17751impl futures::Stream for SymlinkEventStream {
17752 type Item = Result<SymlinkEvent, fidl::Error>;
17753
17754 fn poll_next(
17755 mut self: std::pin::Pin<&mut Self>,
17756 cx: &mut std::task::Context<'_>,
17757 ) -> std::task::Poll<Option<Self::Item>> {
17758 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17759 &mut self.event_receiver,
17760 cx
17761 )?) {
17762 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
17763 None => std::task::Poll::Ready(None),
17764 }
17765 }
17766}
17767
17768#[derive(Debug)]
17769pub enum SymlinkEvent {
17770 OnOpen_ {
17771 s: i32,
17772 info: Option<Box<NodeInfoDeprecated>>,
17773 },
17774 OnRepresentation {
17775 payload: Representation,
17776 },
17777 #[non_exhaustive]
17778 _UnknownEvent {
17779 ordinal: u64,
17781 },
17782}
17783
17784impl SymlinkEvent {
17785 #[allow(irrefutable_let_patterns)]
17786 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
17787 if let SymlinkEvent::OnOpen_ { s, info } = self {
17788 Some((s, info))
17789 } else {
17790 None
17791 }
17792 }
17793 #[allow(irrefutable_let_patterns)]
17794 pub fn into_on_representation(self) -> Option<Representation> {
17795 if let SymlinkEvent::OnRepresentation { payload } = self {
17796 Some((payload))
17797 } else {
17798 None
17799 }
17800 }
17801
17802 fn decode(
17804 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17805 ) -> Result<SymlinkEvent, fidl::Error> {
17806 let (bytes, _handles) = buf.split_mut();
17807 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17808 debug_assert_eq!(tx_header.tx_id, 0);
17809 match tx_header.ordinal {
17810 0x7fc7bbb1dbfd1972 => {
17811 let mut out = fidl::new_empty!(
17812 NodeOnOpenRequest,
17813 fidl::encoding::DefaultFuchsiaResourceDialect
17814 );
17815 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
17816 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
17817 }
17818 0x5cb40567d80a510c => {
17819 let mut out =
17820 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
17821 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
17822 Ok((SymlinkEvent::OnRepresentation { payload: out }))
17823 }
17824 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
17825 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
17826 }
17827 _ => Err(fidl::Error::UnknownOrdinal {
17828 ordinal: tx_header.ordinal,
17829 protocol_name: <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
17830 }),
17831 }
17832 }
17833}
17834
17835pub struct SymlinkRequestStream {
17837 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17838 is_terminated: bool,
17839}
17840
17841impl std::marker::Unpin for SymlinkRequestStream {}
17842
17843impl futures::stream::FusedStream for SymlinkRequestStream {
17844 fn is_terminated(&self) -> bool {
17845 self.is_terminated
17846 }
17847}
17848
17849impl fidl::endpoints::RequestStream for SymlinkRequestStream {
17850 type Protocol = SymlinkMarker;
17851 type ControlHandle = SymlinkControlHandle;
17852
17853 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
17854 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17855 }
17856
17857 fn control_handle(&self) -> Self::ControlHandle {
17858 SymlinkControlHandle { inner: self.inner.clone() }
17859 }
17860
17861 fn into_inner(
17862 self,
17863 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
17864 {
17865 (self.inner, self.is_terminated)
17866 }
17867
17868 fn from_inner(
17869 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17870 is_terminated: bool,
17871 ) -> Self {
17872 Self { inner, is_terminated }
17873 }
17874}
17875
17876impl futures::Stream for SymlinkRequestStream {
17877 type Item = Result<SymlinkRequest, fidl::Error>;
17878
17879 fn poll_next(
17880 mut self: std::pin::Pin<&mut Self>,
17881 cx: &mut std::task::Context<'_>,
17882 ) -> std::task::Poll<Option<Self::Item>> {
17883 let this = &mut *self;
17884 if this.inner.check_shutdown(cx) {
17885 this.is_terminated = true;
17886 return std::task::Poll::Ready(None);
17887 }
17888 if this.is_terminated {
17889 panic!("polled SymlinkRequestStream after completion");
17890 }
17891 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
17892 |bytes, handles| {
17893 match this.inner.channel().read_etc(cx, bytes, handles) {
17894 std::task::Poll::Ready(Ok(())) => {}
17895 std::task::Poll::Pending => return std::task::Poll::Pending,
17896 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
17897 this.is_terminated = true;
17898 return std::task::Poll::Ready(None);
17899 }
17900 std::task::Poll::Ready(Err(e)) => {
17901 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17902 e.into(),
17903 ))))
17904 }
17905 }
17906
17907 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17909
17910 std::task::Poll::Ready(Some(match header.ordinal {
17911 0x54f3949246a03e74 => {
17912 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17913 let mut req = fidl::new_empty!(
17914 LinkableLinkIntoRequest,
17915 fidl::encoding::DefaultFuchsiaResourceDialect
17916 );
17917 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
17918 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17919 Ok(SymlinkRequest::LinkInto {
17920 dst_parent_token: req.dst_parent_token,
17921 dst: req.dst,
17922
17923 responder: SymlinkLinkIntoResponder {
17924 control_handle: std::mem::ManuallyDrop::new(control_handle),
17925 tx_id: header.tx_id,
17926 },
17927 })
17928 }
17929 0x20d8a7aba2168a79 => {
17930 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
17931 let mut req = fidl::new_empty!(
17932 fidl_fuchsia_unknown::CloneableCloneRequest,
17933 fidl::encoding::DefaultFuchsiaResourceDialect
17934 );
17935 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
17936 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17937 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
17938 }
17939 0x5ac5d459ad7f657e => {
17940 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17941 let mut req = fidl::new_empty!(
17942 fidl::encoding::EmptyPayload,
17943 fidl::encoding::DefaultFuchsiaResourceDialect
17944 );
17945 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
17946 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17947 Ok(SymlinkRequest::Close {
17948 responder: SymlinkCloseResponder {
17949 control_handle: std::mem::ManuallyDrop::new(control_handle),
17950 tx_id: header.tx_id,
17951 },
17952 })
17953 }
17954 0x2658edee9decfc06 => {
17955 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17956 let mut req = fidl::new_empty!(
17957 fidl::encoding::EmptyPayload,
17958 fidl::encoding::DefaultFuchsiaResourceDialect
17959 );
17960 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
17961 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17962 Ok(SymlinkRequest::Query {
17963 responder: SymlinkQueryResponder {
17964 control_handle: std::mem::ManuallyDrop::new(control_handle),
17965 tx_id: header.tx_id,
17966 },
17967 })
17968 }
17969 0x5a61678f293ce16f => {
17970 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
17971 let mut req = fidl::new_empty!(
17972 NodeDeprecatedCloneRequest,
17973 fidl::encoding::DefaultFuchsiaResourceDialect
17974 );
17975 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
17976 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17977 Ok(SymlinkRequest::DeprecatedClone {
17978 flags: req.flags,
17979 object: req.object,
17980
17981 control_handle,
17982 })
17983 }
17984 0x78985e216314dafd => {
17985 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17986 let mut req = fidl::new_empty!(
17987 fidl::encoding::EmptyPayload,
17988 fidl::encoding::DefaultFuchsiaResourceDialect
17989 );
17990 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
17991 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17992 Ok(SymlinkRequest::DeprecatedGetAttr {
17993 responder: SymlinkDeprecatedGetAttrResponder {
17994 control_handle: std::mem::ManuallyDrop::new(control_handle),
17995 tx_id: header.tx_id,
17996 },
17997 })
17998 }
17999 0x4186c0f40d938f46 => {
18000 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18001 let mut req = fidl::new_empty!(
18002 NodeDeprecatedSetAttrRequest,
18003 fidl::encoding::DefaultFuchsiaResourceDialect
18004 );
18005 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
18006 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18007 Ok(SymlinkRequest::DeprecatedSetAttr {
18008 flags: req.flags,
18009 attributes: req.attributes,
18010
18011 responder: SymlinkDeprecatedSetAttrResponder {
18012 control_handle: std::mem::ManuallyDrop::new(control_handle),
18013 tx_id: header.tx_id,
18014 },
18015 })
18016 }
18017 0x5b88fffb8eda3aa1 => {
18018 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18019 let mut req = fidl::new_empty!(
18020 fidl::encoding::EmptyPayload,
18021 fidl::encoding::DefaultFuchsiaResourceDialect
18022 );
18023 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18024 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18025 Ok(SymlinkRequest::DeprecatedGetFlags {
18026 responder: SymlinkDeprecatedGetFlagsResponder {
18027 control_handle: std::mem::ManuallyDrop::new(control_handle),
18028 tx_id: header.tx_id,
18029 },
18030 })
18031 }
18032 0x5295b76c71fde733 => {
18033 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18034 let mut req = fidl::new_empty!(
18035 NodeDeprecatedSetFlagsRequest,
18036 fidl::encoding::DefaultFuchsiaResourceDialect
18037 );
18038 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18039 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18040 Ok(SymlinkRequest::DeprecatedSetFlags {
18041 flags: req.flags,
18042
18043 responder: SymlinkDeprecatedSetFlagsResponder {
18044 control_handle: std::mem::ManuallyDrop::new(control_handle),
18045 tx_id: header.tx_id,
18046 },
18047 })
18048 }
18049 0x176eb318f64ec23 => {
18050 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18051 let mut req = fidl::new_empty!(
18052 fidl::encoding::EmptyPayload,
18053 fidl::encoding::DefaultFuchsiaResourceDialect
18054 );
18055 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18056 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18057 Ok(SymlinkRequest::GetFlags {
18058 responder: SymlinkGetFlagsResponder {
18059 control_handle: std::mem::ManuallyDrop::new(control_handle),
18060 tx_id: header.tx_id,
18061 },
18062 })
18063 }
18064 0x55a8028685791ea8 => {
18065 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18066 let mut req = fidl::new_empty!(
18067 NodeSetFlagsRequest,
18068 fidl::encoding::DefaultFuchsiaResourceDialect
18069 );
18070 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18071 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18072 Ok(SymlinkRequest::SetFlags {
18073 flags: req.flags,
18074
18075 responder: SymlinkSetFlagsResponder {
18076 control_handle: std::mem::ManuallyDrop::new(control_handle),
18077 tx_id: header.tx_id,
18078 },
18079 })
18080 }
18081 0x6f344a1c6b0a0610 => {
18082 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18083 let mut req = fidl::new_empty!(
18084 fidl::encoding::EmptyPayload,
18085 fidl::encoding::DefaultFuchsiaResourceDialect
18086 );
18087 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18088 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18089 Ok(SymlinkRequest::QueryFilesystem {
18090 responder: SymlinkQueryFilesystemResponder {
18091 control_handle: std::mem::ManuallyDrop::new(control_handle),
18092 tx_id: header.tx_id,
18093 },
18094 })
18095 }
18096 0x3d4396a638ea053b => {
18097 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18098 let mut req = fidl::new_empty!(
18099 NodeGetAttributesRequest,
18100 fidl::encoding::DefaultFuchsiaResourceDialect
18101 );
18102 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18103 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18104 Ok(SymlinkRequest::GetAttributes {
18105 query: req.query,
18106
18107 responder: SymlinkGetAttributesResponder {
18108 control_handle: std::mem::ManuallyDrop::new(control_handle),
18109 tx_id: header.tx_id,
18110 },
18111 })
18112 }
18113 0x3308c1da5a89bf08 => {
18114 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18115 let mut req = fidl::new_empty!(
18116 MutableNodeAttributes,
18117 fidl::encoding::DefaultFuchsiaResourceDialect
18118 );
18119 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
18120 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18121 Ok(SymlinkRequest::UpdateAttributes {
18122 payload: req,
18123 responder: SymlinkUpdateAttributesResponder {
18124 control_handle: std::mem::ManuallyDrop::new(control_handle),
18125 tx_id: header.tx_id,
18126 },
18127 })
18128 }
18129 0x2c5c27ca0ab5dc49 => {
18130 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18131 let mut req = fidl::new_empty!(
18132 fidl::encoding::EmptyPayload,
18133 fidl::encoding::DefaultFuchsiaResourceDialect
18134 );
18135 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18136 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18137 Ok(SymlinkRequest::Sync {
18138 responder: SymlinkSyncResponder {
18139 control_handle: std::mem::ManuallyDrop::new(control_handle),
18140 tx_id: header.tx_id,
18141 },
18142 })
18143 }
18144 0x4b61033de007fcd0 => {
18145 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18146 let mut req = fidl::new_empty!(
18147 NodeListExtendedAttributesRequest,
18148 fidl::encoding::DefaultFuchsiaResourceDialect
18149 );
18150 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18151 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18152 Ok(SymlinkRequest::ListExtendedAttributes {
18153 iterator: req.iterator,
18154
18155 control_handle,
18156 })
18157 }
18158 0x45ffa3ccfdeb76db => {
18159 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18160 let mut req = fidl::new_empty!(
18161 NodeGetExtendedAttributeRequest,
18162 fidl::encoding::DefaultFuchsiaResourceDialect
18163 );
18164 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18165 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18166 Ok(SymlinkRequest::GetExtendedAttribute {
18167 name: req.name,
18168
18169 responder: SymlinkGetExtendedAttributeResponder {
18170 control_handle: std::mem::ManuallyDrop::new(control_handle),
18171 tx_id: header.tx_id,
18172 },
18173 })
18174 }
18175 0x4a951362f681f23c => {
18176 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18177 let mut req = fidl::new_empty!(
18178 NodeSetExtendedAttributeRequest,
18179 fidl::encoding::DefaultFuchsiaResourceDialect
18180 );
18181 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18182 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18183 Ok(SymlinkRequest::SetExtendedAttribute {
18184 name: req.name,
18185 value: req.value,
18186 mode: req.mode,
18187
18188 responder: SymlinkSetExtendedAttributeResponder {
18189 control_handle: std::mem::ManuallyDrop::new(control_handle),
18190 tx_id: header.tx_id,
18191 },
18192 })
18193 }
18194 0x7a0b9f3a9bf9032d => {
18195 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18196 let mut req = fidl::new_empty!(
18197 NodeRemoveExtendedAttributeRequest,
18198 fidl::encoding::DefaultFuchsiaResourceDialect
18199 );
18200 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18201 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18202 Ok(SymlinkRequest::RemoveExtendedAttribute {
18203 name: req.name,
18204
18205 responder: SymlinkRemoveExtendedAttributeResponder {
18206 control_handle: std::mem::ManuallyDrop::new(control_handle),
18207 tx_id: header.tx_id,
18208 },
18209 })
18210 }
18211 0x742c2ea5e89831f3 => {
18212 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18213 let mut req = fidl::new_empty!(
18214 fidl::encoding::EmptyPayload,
18215 fidl::encoding::DefaultFuchsiaResourceDialect
18216 );
18217 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18218 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18219 Ok(SymlinkRequest::Describe {
18220 responder: SymlinkDescribeResponder {
18221 control_handle: std::mem::ManuallyDrop::new(control_handle),
18222 tx_id: header.tx_id,
18223 },
18224 })
18225 }
18226 _ if header.tx_id == 0
18227 && header
18228 .dynamic_flags()
18229 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18230 {
18231 Ok(SymlinkRequest::_UnknownMethod {
18232 ordinal: header.ordinal,
18233 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18234 method_type: fidl::MethodType::OneWay,
18235 })
18236 }
18237 _ if header
18238 .dynamic_flags()
18239 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18240 {
18241 this.inner.send_framework_err(
18242 fidl::encoding::FrameworkErr::UnknownMethod,
18243 header.tx_id,
18244 header.ordinal,
18245 header.dynamic_flags(),
18246 (bytes, handles),
18247 )?;
18248 Ok(SymlinkRequest::_UnknownMethod {
18249 ordinal: header.ordinal,
18250 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18251 method_type: fidl::MethodType::TwoWay,
18252 })
18253 }
18254 _ => Err(fidl::Error::UnknownOrdinal {
18255 ordinal: header.ordinal,
18256 protocol_name:
18257 <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
18258 }),
18259 }))
18260 },
18261 )
18262 }
18263}
18264
18265#[derive(Debug)]
18267pub enum SymlinkRequest {
18268 LinkInto {
18291 dst_parent_token: fidl::Event,
18292 dst: String,
18293 responder: SymlinkLinkIntoResponder,
18294 },
18295 Clone {
18296 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18297 control_handle: SymlinkControlHandle,
18298 },
18299 Close {
18310 responder: SymlinkCloseResponder,
18311 },
18312 Query {
18313 responder: SymlinkQueryResponder,
18314 },
18315 DeprecatedClone {
18317 flags: OpenFlags,
18318 object: fidl::endpoints::ServerEnd<NodeMarker>,
18319 control_handle: SymlinkControlHandle,
18320 },
18321 DeprecatedGetAttr {
18323 responder: SymlinkDeprecatedGetAttrResponder,
18324 },
18325 DeprecatedSetAttr {
18327 flags: NodeAttributeFlags,
18328 attributes: NodeAttributes,
18329 responder: SymlinkDeprecatedSetAttrResponder,
18330 },
18331 DeprecatedGetFlags {
18333 responder: SymlinkDeprecatedGetFlagsResponder,
18334 },
18335 DeprecatedSetFlags {
18337 flags: OpenFlags,
18338 responder: SymlinkDeprecatedSetFlagsResponder,
18339 },
18340 GetFlags {
18349 responder: SymlinkGetFlagsResponder,
18350 },
18351 SetFlags {
18361 flags: Flags,
18362 responder: SymlinkSetFlagsResponder,
18363 },
18364 QueryFilesystem {
18366 responder: SymlinkQueryFilesystemResponder,
18367 },
18368 GetAttributes {
18382 query: NodeAttributesQuery,
18383 responder: SymlinkGetAttributesResponder,
18384 },
18385 UpdateAttributes {
18394 payload: MutableNodeAttributes,
18395 responder: SymlinkUpdateAttributesResponder,
18396 },
18397 Sync {
18407 responder: SymlinkSyncResponder,
18408 },
18409 ListExtendedAttributes {
18418 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18419 control_handle: SymlinkControlHandle,
18420 },
18421 GetExtendedAttribute {
18428 name: Vec<u8>,
18429 responder: SymlinkGetExtendedAttributeResponder,
18430 },
18431 SetExtendedAttribute {
18439 name: Vec<u8>,
18440 value: ExtendedAttributeValue,
18441 mode: SetExtendedAttributeMode,
18442 responder: SymlinkSetExtendedAttributeResponder,
18443 },
18444 RemoveExtendedAttribute {
18450 name: Vec<u8>,
18451 responder: SymlinkRemoveExtendedAttributeResponder,
18452 },
18453 Describe {
18454 responder: SymlinkDescribeResponder,
18455 },
18456 #[non_exhaustive]
18458 _UnknownMethod {
18459 ordinal: u64,
18461 control_handle: SymlinkControlHandle,
18462 method_type: fidl::MethodType,
18463 },
18464}
18465
18466impl SymlinkRequest {
18467 #[allow(irrefutable_let_patterns)]
18468 pub fn into_link_into(self) -> Option<(fidl::Event, String, SymlinkLinkIntoResponder)> {
18469 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
18470 Some((dst_parent_token, dst, responder))
18471 } else {
18472 None
18473 }
18474 }
18475
18476 #[allow(irrefutable_let_patterns)]
18477 pub fn into_clone(
18478 self,
18479 ) -> Option<(
18480 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18481 SymlinkControlHandle,
18482 )> {
18483 if let SymlinkRequest::Clone { request, control_handle } = self {
18484 Some((request, control_handle))
18485 } else {
18486 None
18487 }
18488 }
18489
18490 #[allow(irrefutable_let_patterns)]
18491 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
18492 if let SymlinkRequest::Close { responder } = self {
18493 Some((responder))
18494 } else {
18495 None
18496 }
18497 }
18498
18499 #[allow(irrefutable_let_patterns)]
18500 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
18501 if let SymlinkRequest::Query { responder } = self {
18502 Some((responder))
18503 } else {
18504 None
18505 }
18506 }
18507
18508 #[allow(irrefutable_let_patterns)]
18509 pub fn into_deprecated_clone(
18510 self,
18511 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, SymlinkControlHandle)> {
18512 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
18513 Some((flags, object, control_handle))
18514 } else {
18515 None
18516 }
18517 }
18518
18519 #[allow(irrefutable_let_patterns)]
18520 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
18521 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
18522 Some((responder))
18523 } else {
18524 None
18525 }
18526 }
18527
18528 #[allow(irrefutable_let_patterns)]
18529 pub fn into_deprecated_set_attr(
18530 self,
18531 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
18532 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
18533 Some((flags, attributes, responder))
18534 } else {
18535 None
18536 }
18537 }
18538
18539 #[allow(irrefutable_let_patterns)]
18540 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
18541 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
18542 Some((responder))
18543 } else {
18544 None
18545 }
18546 }
18547
18548 #[allow(irrefutable_let_patterns)]
18549 pub fn into_deprecated_set_flags(
18550 self,
18551 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
18552 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
18553 Some((flags, responder))
18554 } else {
18555 None
18556 }
18557 }
18558
18559 #[allow(irrefutable_let_patterns)]
18560 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
18561 if let SymlinkRequest::GetFlags { responder } = self {
18562 Some((responder))
18563 } else {
18564 None
18565 }
18566 }
18567
18568 #[allow(irrefutable_let_patterns)]
18569 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
18570 if let SymlinkRequest::SetFlags { flags, responder } = self {
18571 Some((flags, responder))
18572 } else {
18573 None
18574 }
18575 }
18576
18577 #[allow(irrefutable_let_patterns)]
18578 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
18579 if let SymlinkRequest::QueryFilesystem { responder } = self {
18580 Some((responder))
18581 } else {
18582 None
18583 }
18584 }
18585
18586 #[allow(irrefutable_let_patterns)]
18587 pub fn into_get_attributes(
18588 self,
18589 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
18590 if let SymlinkRequest::GetAttributes { query, responder } = self {
18591 Some((query, responder))
18592 } else {
18593 None
18594 }
18595 }
18596
18597 #[allow(irrefutable_let_patterns)]
18598 pub fn into_update_attributes(
18599 self,
18600 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
18601 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
18602 Some((payload, responder))
18603 } else {
18604 None
18605 }
18606 }
18607
18608 #[allow(irrefutable_let_patterns)]
18609 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
18610 if let SymlinkRequest::Sync { responder } = self {
18611 Some((responder))
18612 } else {
18613 None
18614 }
18615 }
18616
18617 #[allow(irrefutable_let_patterns)]
18618 pub fn into_list_extended_attributes(
18619 self,
18620 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, SymlinkControlHandle)>
18621 {
18622 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
18623 Some((iterator, control_handle))
18624 } else {
18625 None
18626 }
18627 }
18628
18629 #[allow(irrefutable_let_patterns)]
18630 pub fn into_get_extended_attribute(
18631 self,
18632 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
18633 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
18634 Some((name, responder))
18635 } else {
18636 None
18637 }
18638 }
18639
18640 #[allow(irrefutable_let_patterns)]
18641 pub fn into_set_extended_attribute(
18642 self,
18643 ) -> Option<(
18644 Vec<u8>,
18645 ExtendedAttributeValue,
18646 SetExtendedAttributeMode,
18647 SymlinkSetExtendedAttributeResponder,
18648 )> {
18649 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
18650 Some((name, value, mode, responder))
18651 } else {
18652 None
18653 }
18654 }
18655
18656 #[allow(irrefutable_let_patterns)]
18657 pub fn into_remove_extended_attribute(
18658 self,
18659 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
18660 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
18661 Some((name, responder))
18662 } else {
18663 None
18664 }
18665 }
18666
18667 #[allow(irrefutable_let_patterns)]
18668 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
18669 if let SymlinkRequest::Describe { responder } = self {
18670 Some((responder))
18671 } else {
18672 None
18673 }
18674 }
18675
18676 pub fn method_name(&self) -> &'static str {
18678 match *self {
18679 SymlinkRequest::LinkInto { .. } => "link_into",
18680 SymlinkRequest::Clone { .. } => "clone",
18681 SymlinkRequest::Close { .. } => "close",
18682 SymlinkRequest::Query { .. } => "query",
18683 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
18684 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
18685 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
18686 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
18687 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
18688 SymlinkRequest::GetFlags { .. } => "get_flags",
18689 SymlinkRequest::SetFlags { .. } => "set_flags",
18690 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
18691 SymlinkRequest::GetAttributes { .. } => "get_attributes",
18692 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
18693 SymlinkRequest::Sync { .. } => "sync",
18694 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
18695 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
18696 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
18697 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
18698 SymlinkRequest::Describe { .. } => "describe",
18699 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
18700 "unknown one-way method"
18701 }
18702 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
18703 "unknown two-way method"
18704 }
18705 }
18706 }
18707}
18708
18709#[derive(Debug, Clone)]
18710pub struct SymlinkControlHandle {
18711 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18712}
18713
18714impl fidl::endpoints::ControlHandle for SymlinkControlHandle {
18715 fn shutdown(&self) {
18716 self.inner.shutdown()
18717 }
18718 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
18719 self.inner.shutdown_with_epitaph(status)
18720 }
18721
18722 fn is_closed(&self) -> bool {
18723 self.inner.channel().is_closed()
18724 }
18725 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
18726 self.inner.channel().on_closed()
18727 }
18728
18729 #[cfg(target_os = "fuchsia")]
18730 fn signal_peer(
18731 &self,
18732 clear_mask: zx::Signals,
18733 set_mask: zx::Signals,
18734 ) -> Result<(), zx_status::Status> {
18735 use fidl::Peered;
18736 self.inner.channel().signal_peer(clear_mask, set_mask)
18737 }
18738}
18739
18740impl SymlinkControlHandle {
18741 pub fn send_on_open_(
18742 &self,
18743 mut s: i32,
18744 mut info: Option<NodeInfoDeprecated>,
18745 ) -> Result<(), fidl::Error> {
18746 self.inner.send::<NodeOnOpenRequest>(
18747 (s, info.as_mut()),
18748 0,
18749 0x7fc7bbb1dbfd1972,
18750 fidl::encoding::DynamicFlags::empty(),
18751 )
18752 }
18753
18754 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
18755 self.inner.send::<Representation>(
18756 &mut payload,
18757 0,
18758 0x5cb40567d80a510c,
18759 fidl::encoding::DynamicFlags::empty(),
18760 )
18761 }
18762}
18763
18764#[must_use = "FIDL methods require a response to be sent"]
18765#[derive(Debug)]
18766pub struct SymlinkLinkIntoResponder {
18767 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18768 tx_id: u32,
18769}
18770
18771impl std::ops::Drop for SymlinkLinkIntoResponder {
18775 fn drop(&mut self) {
18776 self.control_handle.shutdown();
18777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18779 }
18780}
18781
18782impl fidl::endpoints::Responder for SymlinkLinkIntoResponder {
18783 type ControlHandle = SymlinkControlHandle;
18784
18785 fn control_handle(&self) -> &SymlinkControlHandle {
18786 &self.control_handle
18787 }
18788
18789 fn drop_without_shutdown(mut self) {
18790 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18792 std::mem::forget(self);
18794 }
18795}
18796
18797impl SymlinkLinkIntoResponder {
18798 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18802 let _result = self.send_raw(result);
18803 if _result.is_err() {
18804 self.control_handle.shutdown();
18805 }
18806 self.drop_without_shutdown();
18807 _result
18808 }
18809
18810 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18812 let _result = self.send_raw(result);
18813 self.drop_without_shutdown();
18814 _result
18815 }
18816
18817 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18818 self.control_handle
18819 .inner
18820 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18821 result,
18822 self.tx_id,
18823 0x54f3949246a03e74,
18824 fidl::encoding::DynamicFlags::empty(),
18825 )
18826 }
18827}
18828
18829#[must_use = "FIDL methods require a response to be sent"]
18830#[derive(Debug)]
18831pub struct SymlinkCloseResponder {
18832 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18833 tx_id: u32,
18834}
18835
18836impl std::ops::Drop for SymlinkCloseResponder {
18840 fn drop(&mut self) {
18841 self.control_handle.shutdown();
18842 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18844 }
18845}
18846
18847impl fidl::endpoints::Responder for SymlinkCloseResponder {
18848 type ControlHandle = SymlinkControlHandle;
18849
18850 fn control_handle(&self) -> &SymlinkControlHandle {
18851 &self.control_handle
18852 }
18853
18854 fn drop_without_shutdown(mut self) {
18855 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18857 std::mem::forget(self);
18859 }
18860}
18861
18862impl SymlinkCloseResponder {
18863 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18867 let _result = self.send_raw(result);
18868 if _result.is_err() {
18869 self.control_handle.shutdown();
18870 }
18871 self.drop_without_shutdown();
18872 _result
18873 }
18874
18875 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18877 let _result = self.send_raw(result);
18878 self.drop_without_shutdown();
18879 _result
18880 }
18881
18882 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18883 self.control_handle
18884 .inner
18885 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18886 result,
18887 self.tx_id,
18888 0x5ac5d459ad7f657e,
18889 fidl::encoding::DynamicFlags::empty(),
18890 )
18891 }
18892}
18893
18894#[must_use = "FIDL methods require a response to be sent"]
18895#[derive(Debug)]
18896pub struct SymlinkQueryResponder {
18897 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18898 tx_id: u32,
18899}
18900
18901impl std::ops::Drop for SymlinkQueryResponder {
18905 fn drop(&mut self) {
18906 self.control_handle.shutdown();
18907 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18909 }
18910}
18911
18912impl fidl::endpoints::Responder for SymlinkQueryResponder {
18913 type ControlHandle = SymlinkControlHandle;
18914
18915 fn control_handle(&self) -> &SymlinkControlHandle {
18916 &self.control_handle
18917 }
18918
18919 fn drop_without_shutdown(mut self) {
18920 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18922 std::mem::forget(self);
18924 }
18925}
18926
18927impl SymlinkQueryResponder {
18928 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
18932 let _result = self.send_raw(protocol);
18933 if _result.is_err() {
18934 self.control_handle.shutdown();
18935 }
18936 self.drop_without_shutdown();
18937 _result
18938 }
18939
18940 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
18942 let _result = self.send_raw(protocol);
18943 self.drop_without_shutdown();
18944 _result
18945 }
18946
18947 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
18948 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
18949 (protocol,),
18950 self.tx_id,
18951 0x2658edee9decfc06,
18952 fidl::encoding::DynamicFlags::empty(),
18953 )
18954 }
18955}
18956
18957#[must_use = "FIDL methods require a response to be sent"]
18958#[derive(Debug)]
18959pub struct SymlinkDeprecatedGetAttrResponder {
18960 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18961 tx_id: u32,
18962}
18963
18964impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
18968 fn drop(&mut self) {
18969 self.control_handle.shutdown();
18970 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18972 }
18973}
18974
18975impl fidl::endpoints::Responder for SymlinkDeprecatedGetAttrResponder {
18976 type ControlHandle = SymlinkControlHandle;
18977
18978 fn control_handle(&self) -> &SymlinkControlHandle {
18979 &self.control_handle
18980 }
18981
18982 fn drop_without_shutdown(mut self) {
18983 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18985 std::mem::forget(self);
18987 }
18988}
18989
18990impl SymlinkDeprecatedGetAttrResponder {
18991 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
18995 let _result = self.send_raw(s, attributes);
18996 if _result.is_err() {
18997 self.control_handle.shutdown();
18998 }
18999 self.drop_without_shutdown();
19000 _result
19001 }
19002
19003 pub fn send_no_shutdown_on_err(
19005 self,
19006 mut s: i32,
19007 mut attributes: &NodeAttributes,
19008 ) -> Result<(), fidl::Error> {
19009 let _result = self.send_raw(s, attributes);
19010 self.drop_without_shutdown();
19011 _result
19012 }
19013
19014 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19015 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
19016 (s, attributes),
19017 self.tx_id,
19018 0x78985e216314dafd,
19019 fidl::encoding::DynamicFlags::empty(),
19020 )
19021 }
19022}
19023
19024#[must_use = "FIDL methods require a response to be sent"]
19025#[derive(Debug)]
19026pub struct SymlinkDeprecatedSetAttrResponder {
19027 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19028 tx_id: u32,
19029}
19030
19031impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
19035 fn drop(&mut self) {
19036 self.control_handle.shutdown();
19037 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19039 }
19040}
19041
19042impl fidl::endpoints::Responder for SymlinkDeprecatedSetAttrResponder {
19043 type ControlHandle = SymlinkControlHandle;
19044
19045 fn control_handle(&self) -> &SymlinkControlHandle {
19046 &self.control_handle
19047 }
19048
19049 fn drop_without_shutdown(mut self) {
19050 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19052 std::mem::forget(self);
19054 }
19055}
19056
19057impl SymlinkDeprecatedSetAttrResponder {
19058 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19062 let _result = self.send_raw(s);
19063 if _result.is_err() {
19064 self.control_handle.shutdown();
19065 }
19066 self.drop_without_shutdown();
19067 _result
19068 }
19069
19070 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19072 let _result = self.send_raw(s);
19073 self.drop_without_shutdown();
19074 _result
19075 }
19076
19077 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19078 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
19079 (s,),
19080 self.tx_id,
19081 0x4186c0f40d938f46,
19082 fidl::encoding::DynamicFlags::empty(),
19083 )
19084 }
19085}
19086
19087#[must_use = "FIDL methods require a response to be sent"]
19088#[derive(Debug)]
19089pub struct SymlinkDeprecatedGetFlagsResponder {
19090 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19091 tx_id: u32,
19092}
19093
19094impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
19098 fn drop(&mut self) {
19099 self.control_handle.shutdown();
19100 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19102 }
19103}
19104
19105impl fidl::endpoints::Responder for SymlinkDeprecatedGetFlagsResponder {
19106 type ControlHandle = SymlinkControlHandle;
19107
19108 fn control_handle(&self) -> &SymlinkControlHandle {
19109 &self.control_handle
19110 }
19111
19112 fn drop_without_shutdown(mut self) {
19113 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19115 std::mem::forget(self);
19117 }
19118}
19119
19120impl SymlinkDeprecatedGetFlagsResponder {
19121 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19125 let _result = self.send_raw(s, flags);
19126 if _result.is_err() {
19127 self.control_handle.shutdown();
19128 }
19129 self.drop_without_shutdown();
19130 _result
19131 }
19132
19133 pub fn send_no_shutdown_on_err(
19135 self,
19136 mut s: i32,
19137 mut flags: OpenFlags,
19138 ) -> Result<(), fidl::Error> {
19139 let _result = self.send_raw(s, flags);
19140 self.drop_without_shutdown();
19141 _result
19142 }
19143
19144 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19145 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
19146 (s, flags),
19147 self.tx_id,
19148 0x5b88fffb8eda3aa1,
19149 fidl::encoding::DynamicFlags::empty(),
19150 )
19151 }
19152}
19153
19154#[must_use = "FIDL methods require a response to be sent"]
19155#[derive(Debug)]
19156pub struct SymlinkDeprecatedSetFlagsResponder {
19157 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19158 tx_id: u32,
19159}
19160
19161impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
19165 fn drop(&mut self) {
19166 self.control_handle.shutdown();
19167 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19169 }
19170}
19171
19172impl fidl::endpoints::Responder for SymlinkDeprecatedSetFlagsResponder {
19173 type ControlHandle = SymlinkControlHandle;
19174
19175 fn control_handle(&self) -> &SymlinkControlHandle {
19176 &self.control_handle
19177 }
19178
19179 fn drop_without_shutdown(mut self) {
19180 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19182 std::mem::forget(self);
19184 }
19185}
19186
19187impl SymlinkDeprecatedSetFlagsResponder {
19188 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19192 let _result = self.send_raw(s);
19193 if _result.is_err() {
19194 self.control_handle.shutdown();
19195 }
19196 self.drop_without_shutdown();
19197 _result
19198 }
19199
19200 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19202 let _result = self.send_raw(s);
19203 self.drop_without_shutdown();
19204 _result
19205 }
19206
19207 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19208 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
19209 (s,),
19210 self.tx_id,
19211 0x5295b76c71fde733,
19212 fidl::encoding::DynamicFlags::empty(),
19213 )
19214 }
19215}
19216
19217#[must_use = "FIDL methods require a response to be sent"]
19218#[derive(Debug)]
19219pub struct SymlinkGetFlagsResponder {
19220 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19221 tx_id: u32,
19222}
19223
19224impl std::ops::Drop for SymlinkGetFlagsResponder {
19228 fn drop(&mut self) {
19229 self.control_handle.shutdown();
19230 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19232 }
19233}
19234
19235impl fidl::endpoints::Responder for SymlinkGetFlagsResponder {
19236 type ControlHandle = SymlinkControlHandle;
19237
19238 fn control_handle(&self) -> &SymlinkControlHandle {
19239 &self.control_handle
19240 }
19241
19242 fn drop_without_shutdown(mut self) {
19243 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19245 std::mem::forget(self);
19247 }
19248}
19249
19250impl SymlinkGetFlagsResponder {
19251 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19255 let _result = self.send_raw(result);
19256 if _result.is_err() {
19257 self.control_handle.shutdown();
19258 }
19259 self.drop_without_shutdown();
19260 _result
19261 }
19262
19263 pub fn send_no_shutdown_on_err(
19265 self,
19266 mut result: Result<Flags, i32>,
19267 ) -> Result<(), fidl::Error> {
19268 let _result = self.send_raw(result);
19269 self.drop_without_shutdown();
19270 _result
19271 }
19272
19273 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19274 self.control_handle
19275 .inner
19276 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
19277 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
19278 self.tx_id,
19279 0x176eb318f64ec23,
19280 fidl::encoding::DynamicFlags::FLEXIBLE,
19281 )
19282 }
19283}
19284
19285#[must_use = "FIDL methods require a response to be sent"]
19286#[derive(Debug)]
19287pub struct SymlinkSetFlagsResponder {
19288 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19289 tx_id: u32,
19290}
19291
19292impl std::ops::Drop for SymlinkSetFlagsResponder {
19296 fn drop(&mut self) {
19297 self.control_handle.shutdown();
19298 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19300 }
19301}
19302
19303impl fidl::endpoints::Responder for SymlinkSetFlagsResponder {
19304 type ControlHandle = SymlinkControlHandle;
19305
19306 fn control_handle(&self) -> &SymlinkControlHandle {
19307 &self.control_handle
19308 }
19309
19310 fn drop_without_shutdown(mut self) {
19311 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19313 std::mem::forget(self);
19315 }
19316}
19317
19318impl SymlinkSetFlagsResponder {
19319 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19323 let _result = self.send_raw(result);
19324 if _result.is_err() {
19325 self.control_handle.shutdown();
19326 }
19327 self.drop_without_shutdown();
19328 _result
19329 }
19330
19331 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19333 let _result = self.send_raw(result);
19334 self.drop_without_shutdown();
19335 _result
19336 }
19337
19338 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19339 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
19340 fidl::encoding::EmptyStruct,
19341 i32,
19342 >>(
19343 fidl::encoding::FlexibleResult::new(result),
19344 self.tx_id,
19345 0x55a8028685791ea8,
19346 fidl::encoding::DynamicFlags::FLEXIBLE,
19347 )
19348 }
19349}
19350
19351#[must_use = "FIDL methods require a response to be sent"]
19352#[derive(Debug)]
19353pub struct SymlinkQueryFilesystemResponder {
19354 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19355 tx_id: u32,
19356}
19357
19358impl std::ops::Drop for SymlinkQueryFilesystemResponder {
19362 fn drop(&mut self) {
19363 self.control_handle.shutdown();
19364 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19366 }
19367}
19368
19369impl fidl::endpoints::Responder for SymlinkQueryFilesystemResponder {
19370 type ControlHandle = SymlinkControlHandle;
19371
19372 fn control_handle(&self) -> &SymlinkControlHandle {
19373 &self.control_handle
19374 }
19375
19376 fn drop_without_shutdown(mut self) {
19377 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19379 std::mem::forget(self);
19381 }
19382}
19383
19384impl SymlinkQueryFilesystemResponder {
19385 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19389 let _result = self.send_raw(s, info);
19390 if _result.is_err() {
19391 self.control_handle.shutdown();
19392 }
19393 self.drop_without_shutdown();
19394 _result
19395 }
19396
19397 pub fn send_no_shutdown_on_err(
19399 self,
19400 mut s: i32,
19401 mut info: Option<&FilesystemInfo>,
19402 ) -> Result<(), fidl::Error> {
19403 let _result = self.send_raw(s, info);
19404 self.drop_without_shutdown();
19405 _result
19406 }
19407
19408 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19409 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
19410 (s, info),
19411 self.tx_id,
19412 0x6f344a1c6b0a0610,
19413 fidl::encoding::DynamicFlags::empty(),
19414 )
19415 }
19416}
19417
19418#[must_use = "FIDL methods require a response to be sent"]
19419#[derive(Debug)]
19420pub struct SymlinkGetAttributesResponder {
19421 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19422 tx_id: u32,
19423}
19424
19425impl std::ops::Drop for SymlinkGetAttributesResponder {
19429 fn drop(&mut self) {
19430 self.control_handle.shutdown();
19431 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19433 }
19434}
19435
19436impl fidl::endpoints::Responder for SymlinkGetAttributesResponder {
19437 type ControlHandle = SymlinkControlHandle;
19438
19439 fn control_handle(&self) -> &SymlinkControlHandle {
19440 &self.control_handle
19441 }
19442
19443 fn drop_without_shutdown(mut self) {
19444 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19446 std::mem::forget(self);
19448 }
19449}
19450
19451impl SymlinkGetAttributesResponder {
19452 pub fn send(
19456 self,
19457 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19458 ) -> Result<(), fidl::Error> {
19459 let _result = self.send_raw(result);
19460 if _result.is_err() {
19461 self.control_handle.shutdown();
19462 }
19463 self.drop_without_shutdown();
19464 _result
19465 }
19466
19467 pub fn send_no_shutdown_on_err(
19469 self,
19470 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19471 ) -> Result<(), fidl::Error> {
19472 let _result = self.send_raw(result);
19473 self.drop_without_shutdown();
19474 _result
19475 }
19476
19477 fn send_raw(
19478 &self,
19479 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19480 ) -> Result<(), fidl::Error> {
19481 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
19482 result,
19483 self.tx_id,
19484 0x3d4396a638ea053b,
19485 fidl::encoding::DynamicFlags::empty(),
19486 )
19487 }
19488}
19489
19490#[must_use = "FIDL methods require a response to be sent"]
19491#[derive(Debug)]
19492pub struct SymlinkUpdateAttributesResponder {
19493 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19494 tx_id: u32,
19495}
19496
19497impl std::ops::Drop for SymlinkUpdateAttributesResponder {
19501 fn drop(&mut self) {
19502 self.control_handle.shutdown();
19503 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19505 }
19506}
19507
19508impl fidl::endpoints::Responder for SymlinkUpdateAttributesResponder {
19509 type ControlHandle = SymlinkControlHandle;
19510
19511 fn control_handle(&self) -> &SymlinkControlHandle {
19512 &self.control_handle
19513 }
19514
19515 fn drop_without_shutdown(mut self) {
19516 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19518 std::mem::forget(self);
19520 }
19521}
19522
19523impl SymlinkUpdateAttributesResponder {
19524 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19528 let _result = self.send_raw(result);
19529 if _result.is_err() {
19530 self.control_handle.shutdown();
19531 }
19532 self.drop_without_shutdown();
19533 _result
19534 }
19535
19536 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19538 let _result = self.send_raw(result);
19539 self.drop_without_shutdown();
19540 _result
19541 }
19542
19543 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19544 self.control_handle
19545 .inner
19546 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19547 result,
19548 self.tx_id,
19549 0x3308c1da5a89bf08,
19550 fidl::encoding::DynamicFlags::empty(),
19551 )
19552 }
19553}
19554
19555#[must_use = "FIDL methods require a response to be sent"]
19556#[derive(Debug)]
19557pub struct SymlinkSyncResponder {
19558 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19559 tx_id: u32,
19560}
19561
19562impl std::ops::Drop for SymlinkSyncResponder {
19566 fn drop(&mut self) {
19567 self.control_handle.shutdown();
19568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19570 }
19571}
19572
19573impl fidl::endpoints::Responder for SymlinkSyncResponder {
19574 type ControlHandle = SymlinkControlHandle;
19575
19576 fn control_handle(&self) -> &SymlinkControlHandle {
19577 &self.control_handle
19578 }
19579
19580 fn drop_without_shutdown(mut self) {
19581 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19583 std::mem::forget(self);
19585 }
19586}
19587
19588impl SymlinkSyncResponder {
19589 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19593 let _result = self.send_raw(result);
19594 if _result.is_err() {
19595 self.control_handle.shutdown();
19596 }
19597 self.drop_without_shutdown();
19598 _result
19599 }
19600
19601 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19603 let _result = self.send_raw(result);
19604 self.drop_without_shutdown();
19605 _result
19606 }
19607
19608 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19609 self.control_handle
19610 .inner
19611 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19612 result,
19613 self.tx_id,
19614 0x2c5c27ca0ab5dc49,
19615 fidl::encoding::DynamicFlags::empty(),
19616 )
19617 }
19618}
19619
19620#[must_use = "FIDL methods require a response to be sent"]
19621#[derive(Debug)]
19622pub struct SymlinkGetExtendedAttributeResponder {
19623 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19624 tx_id: u32,
19625}
19626
19627impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
19631 fn drop(&mut self) {
19632 self.control_handle.shutdown();
19633 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19635 }
19636}
19637
19638impl fidl::endpoints::Responder for SymlinkGetExtendedAttributeResponder {
19639 type ControlHandle = SymlinkControlHandle;
19640
19641 fn control_handle(&self) -> &SymlinkControlHandle {
19642 &self.control_handle
19643 }
19644
19645 fn drop_without_shutdown(mut self) {
19646 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19648 std::mem::forget(self);
19650 }
19651}
19652
19653impl SymlinkGetExtendedAttributeResponder {
19654 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19658 let _result = self.send_raw(result);
19659 if _result.is_err() {
19660 self.control_handle.shutdown();
19661 }
19662 self.drop_without_shutdown();
19663 _result
19664 }
19665
19666 pub fn send_no_shutdown_on_err(
19668 self,
19669 mut result: Result<ExtendedAttributeValue, i32>,
19670 ) -> Result<(), fidl::Error> {
19671 let _result = self.send_raw(result);
19672 self.drop_without_shutdown();
19673 _result
19674 }
19675
19676 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19677 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
19678 result.as_mut().map_err(|e| *e),
19679 self.tx_id,
19680 0x45ffa3ccfdeb76db,
19681 fidl::encoding::DynamicFlags::empty(),
19682 )
19683 }
19684}
19685
19686#[must_use = "FIDL methods require a response to be sent"]
19687#[derive(Debug)]
19688pub struct SymlinkSetExtendedAttributeResponder {
19689 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19690 tx_id: u32,
19691}
19692
19693impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
19697 fn drop(&mut self) {
19698 self.control_handle.shutdown();
19699 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19701 }
19702}
19703
19704impl fidl::endpoints::Responder for SymlinkSetExtendedAttributeResponder {
19705 type ControlHandle = SymlinkControlHandle;
19706
19707 fn control_handle(&self) -> &SymlinkControlHandle {
19708 &self.control_handle
19709 }
19710
19711 fn drop_without_shutdown(mut self) {
19712 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19714 std::mem::forget(self);
19716 }
19717}
19718
19719impl SymlinkSetExtendedAttributeResponder {
19720 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19724 let _result = self.send_raw(result);
19725 if _result.is_err() {
19726 self.control_handle.shutdown();
19727 }
19728 self.drop_without_shutdown();
19729 _result
19730 }
19731
19732 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19734 let _result = self.send_raw(result);
19735 self.drop_without_shutdown();
19736 _result
19737 }
19738
19739 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19740 self.control_handle
19741 .inner
19742 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19743 result,
19744 self.tx_id,
19745 0x4a951362f681f23c,
19746 fidl::encoding::DynamicFlags::empty(),
19747 )
19748 }
19749}
19750
19751#[must_use = "FIDL methods require a response to be sent"]
19752#[derive(Debug)]
19753pub struct SymlinkRemoveExtendedAttributeResponder {
19754 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19755 tx_id: u32,
19756}
19757
19758impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
19762 fn drop(&mut self) {
19763 self.control_handle.shutdown();
19764 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19766 }
19767}
19768
19769impl fidl::endpoints::Responder for SymlinkRemoveExtendedAttributeResponder {
19770 type ControlHandle = SymlinkControlHandle;
19771
19772 fn control_handle(&self) -> &SymlinkControlHandle {
19773 &self.control_handle
19774 }
19775
19776 fn drop_without_shutdown(mut self) {
19777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19779 std::mem::forget(self);
19781 }
19782}
19783
19784impl SymlinkRemoveExtendedAttributeResponder {
19785 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19789 let _result = self.send_raw(result);
19790 if _result.is_err() {
19791 self.control_handle.shutdown();
19792 }
19793 self.drop_without_shutdown();
19794 _result
19795 }
19796
19797 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19799 let _result = self.send_raw(result);
19800 self.drop_without_shutdown();
19801 _result
19802 }
19803
19804 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19805 self.control_handle
19806 .inner
19807 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19808 result,
19809 self.tx_id,
19810 0x7a0b9f3a9bf9032d,
19811 fidl::encoding::DynamicFlags::empty(),
19812 )
19813 }
19814}
19815
19816#[must_use = "FIDL methods require a response to be sent"]
19817#[derive(Debug)]
19818pub struct SymlinkDescribeResponder {
19819 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19820 tx_id: u32,
19821}
19822
19823impl std::ops::Drop for SymlinkDescribeResponder {
19827 fn drop(&mut self) {
19828 self.control_handle.shutdown();
19829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19831 }
19832}
19833
19834impl fidl::endpoints::Responder for SymlinkDescribeResponder {
19835 type ControlHandle = SymlinkControlHandle;
19836
19837 fn control_handle(&self) -> &SymlinkControlHandle {
19838 &self.control_handle
19839 }
19840
19841 fn drop_without_shutdown(mut self) {
19842 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19844 std::mem::forget(self);
19846 }
19847}
19848
19849impl SymlinkDescribeResponder {
19850 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19854 let _result = self.send_raw(payload);
19855 if _result.is_err() {
19856 self.control_handle.shutdown();
19857 }
19858 self.drop_without_shutdown();
19859 _result
19860 }
19861
19862 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19864 let _result = self.send_raw(payload);
19865 self.drop_without_shutdown();
19866 _result
19867 }
19868
19869 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19870 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
19871 fidl::encoding::Flexible::new(payload),
19872 self.tx_id,
19873 0x742c2ea5e89831f3,
19874 fidl::encoding::DynamicFlags::FLEXIBLE,
19875 )
19876 }
19877}
19878
19879#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19880pub struct WritableMarker;
19881
19882impl fidl::endpoints::ProtocolMarker for WritableMarker {
19883 type Proxy = WritableProxy;
19884 type RequestStream = WritableRequestStream;
19885 #[cfg(target_os = "fuchsia")]
19886 type SynchronousProxy = WritableSynchronousProxy;
19887
19888 const DEBUG_NAME: &'static str = "(anonymous) Writable";
19889}
19890pub type WritableWriteResult = Result<u64, i32>;
19891
19892pub trait WritableProxyInterface: Send + Sync {
19893 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
19894 + Send;
19895 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
19896}
19897#[derive(Debug)]
19898#[cfg(target_os = "fuchsia")]
19899pub struct WritableSynchronousProxy {
19900 client: fidl::client::sync::Client,
19901}
19902
19903#[cfg(target_os = "fuchsia")]
19904impl fidl::endpoints::SynchronousProxy for WritableSynchronousProxy {
19905 type Proxy = WritableProxy;
19906 type Protocol = WritableMarker;
19907
19908 fn from_channel(inner: fidl::Channel) -> Self {
19909 Self::new(inner)
19910 }
19911
19912 fn into_channel(self) -> fidl::Channel {
19913 self.client.into_channel()
19914 }
19915
19916 fn as_channel(&self) -> &fidl::Channel {
19917 self.client.as_channel()
19918 }
19919}
19920
19921#[cfg(target_os = "fuchsia")]
19922impl WritableSynchronousProxy {
19923 pub fn new(channel: fidl::Channel) -> Self {
19924 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
19925 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
19926 }
19927
19928 pub fn into_channel(self) -> fidl::Channel {
19929 self.client.into_channel()
19930 }
19931
19932 pub fn wait_for_event(
19935 &self,
19936 deadline: zx::MonotonicInstant,
19937 ) -> Result<WritableEvent, fidl::Error> {
19938 WritableEvent::decode(self.client.wait_for_event(deadline)?)
19939 }
19940
19941 pub fn r#write(
19965 &self,
19966 mut data: &[u8],
19967 ___deadline: zx::MonotonicInstant,
19968 ) -> Result<WritableWriteResult, fidl::Error> {
19969 let _response = self.client.send_query::<
19970 WritableWriteRequest,
19971 fidl::encoding::ResultType<WritableWriteResponse, i32>,
19972 >(
19973 (data,),
19974 0x6a31437832469f82,
19975 fidl::encoding::DynamicFlags::empty(),
19976 ___deadline,
19977 )?;
19978 Ok(_response.map(|x| x.actual_count))
19979 }
19980}
19981
19982#[cfg(target_os = "fuchsia")]
19983impl From<WritableSynchronousProxy> for zx::Handle {
19984 fn from(value: WritableSynchronousProxy) -> Self {
19985 value.into_channel().into()
19986 }
19987}
19988
19989#[cfg(target_os = "fuchsia")]
19990impl From<fidl::Channel> for WritableSynchronousProxy {
19991 fn from(value: fidl::Channel) -> Self {
19992 Self::new(value)
19993 }
19994}
19995
19996#[derive(Debug, Clone)]
19997pub struct WritableProxy {
19998 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
19999}
20000
20001impl fidl::endpoints::Proxy for WritableProxy {
20002 type Protocol = WritableMarker;
20003
20004 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
20005 Self::new(inner)
20006 }
20007
20008 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
20009 self.client.into_channel().map_err(|client| Self { client })
20010 }
20011
20012 fn as_channel(&self) -> &::fidl::AsyncChannel {
20013 self.client.as_channel()
20014 }
20015}
20016
20017impl WritableProxy {
20018 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
20020 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
20021 Self { client: fidl::client::Client::new(channel, protocol_name) }
20022 }
20023
20024 pub fn take_event_stream(&self) -> WritableEventStream {
20030 WritableEventStream { event_receiver: self.client.take_event_receiver() }
20031 }
20032
20033 pub fn r#write(
20057 &self,
20058 mut data: &[u8],
20059 ) -> fidl::client::QueryResponseFut<
20060 WritableWriteResult,
20061 fidl::encoding::DefaultFuchsiaResourceDialect,
20062 > {
20063 WritableProxyInterface::r#write(self, data)
20064 }
20065}
20066
20067impl WritableProxyInterface for WritableProxy {
20068 type WriteResponseFut = fidl::client::QueryResponseFut<
20069 WritableWriteResult,
20070 fidl::encoding::DefaultFuchsiaResourceDialect,
20071 >;
20072 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
20073 fn _decode(
20074 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
20075 ) -> Result<WritableWriteResult, fidl::Error> {
20076 let _response = fidl::client::decode_transaction_body::<
20077 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20078 fidl::encoding::DefaultFuchsiaResourceDialect,
20079 0x6a31437832469f82,
20080 >(_buf?)?;
20081 Ok(_response.map(|x| x.actual_count))
20082 }
20083 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
20084 (data,),
20085 0x6a31437832469f82,
20086 fidl::encoding::DynamicFlags::empty(),
20087 _decode,
20088 )
20089 }
20090}
20091
20092pub struct WritableEventStream {
20093 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
20094}
20095
20096impl std::marker::Unpin for WritableEventStream {}
20097
20098impl futures::stream::FusedStream for WritableEventStream {
20099 fn is_terminated(&self) -> bool {
20100 self.event_receiver.is_terminated()
20101 }
20102}
20103
20104impl futures::Stream for WritableEventStream {
20105 type Item = Result<WritableEvent, fidl::Error>;
20106
20107 fn poll_next(
20108 mut self: std::pin::Pin<&mut Self>,
20109 cx: &mut std::task::Context<'_>,
20110 ) -> std::task::Poll<Option<Self::Item>> {
20111 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
20112 &mut self.event_receiver,
20113 cx
20114 )?) {
20115 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
20116 None => std::task::Poll::Ready(None),
20117 }
20118 }
20119}
20120
20121#[derive(Debug)]
20122pub enum WritableEvent {}
20123
20124impl WritableEvent {
20125 fn decode(
20127 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
20128 ) -> Result<WritableEvent, fidl::Error> {
20129 let (bytes, _handles) = buf.split_mut();
20130 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20131 debug_assert_eq!(tx_header.tx_id, 0);
20132 match tx_header.ordinal {
20133 _ => Err(fidl::Error::UnknownOrdinal {
20134 ordinal: tx_header.ordinal,
20135 protocol_name: <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20136 }),
20137 }
20138 }
20139}
20140
20141pub struct WritableRequestStream {
20143 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20144 is_terminated: bool,
20145}
20146
20147impl std::marker::Unpin for WritableRequestStream {}
20148
20149impl futures::stream::FusedStream for WritableRequestStream {
20150 fn is_terminated(&self) -> bool {
20151 self.is_terminated
20152 }
20153}
20154
20155impl fidl::endpoints::RequestStream for WritableRequestStream {
20156 type Protocol = WritableMarker;
20157 type ControlHandle = WritableControlHandle;
20158
20159 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
20160 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
20161 }
20162
20163 fn control_handle(&self) -> Self::ControlHandle {
20164 WritableControlHandle { inner: self.inner.clone() }
20165 }
20166
20167 fn into_inner(
20168 self,
20169 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
20170 {
20171 (self.inner, self.is_terminated)
20172 }
20173
20174 fn from_inner(
20175 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20176 is_terminated: bool,
20177 ) -> Self {
20178 Self { inner, is_terminated }
20179 }
20180}
20181
20182impl futures::Stream for WritableRequestStream {
20183 type Item = Result<WritableRequest, fidl::Error>;
20184
20185 fn poll_next(
20186 mut self: std::pin::Pin<&mut Self>,
20187 cx: &mut std::task::Context<'_>,
20188 ) -> std::task::Poll<Option<Self::Item>> {
20189 let this = &mut *self;
20190 if this.inner.check_shutdown(cx) {
20191 this.is_terminated = true;
20192 return std::task::Poll::Ready(None);
20193 }
20194 if this.is_terminated {
20195 panic!("polled WritableRequestStream after completion");
20196 }
20197 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
20198 |bytes, handles| {
20199 match this.inner.channel().read_etc(cx, bytes, handles) {
20200 std::task::Poll::Ready(Ok(())) => {}
20201 std::task::Poll::Pending => return std::task::Poll::Pending,
20202 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
20203 this.is_terminated = true;
20204 return std::task::Poll::Ready(None);
20205 }
20206 std::task::Poll::Ready(Err(e)) => {
20207 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
20208 e.into(),
20209 ))))
20210 }
20211 }
20212
20213 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20215
20216 std::task::Poll::Ready(Some(match header.ordinal {
20217 0x6a31437832469f82 => {
20218 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
20219 let mut req = fidl::new_empty!(
20220 WritableWriteRequest,
20221 fidl::encoding::DefaultFuchsiaResourceDialect
20222 );
20223 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
20224 let control_handle = WritableControlHandle { inner: this.inner.clone() };
20225 Ok(WritableRequest::Write {
20226 data: req.data,
20227
20228 responder: WritableWriteResponder {
20229 control_handle: std::mem::ManuallyDrop::new(control_handle),
20230 tx_id: header.tx_id,
20231 },
20232 })
20233 }
20234 _ => Err(fidl::Error::UnknownOrdinal {
20235 ordinal: header.ordinal,
20236 protocol_name:
20237 <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20238 }),
20239 }))
20240 },
20241 )
20242 }
20243}
20244
20245#[derive(Debug)]
20246pub enum WritableRequest {
20247 Write { data: Vec<u8>, responder: WritableWriteResponder },
20271}
20272
20273impl WritableRequest {
20274 #[allow(irrefutable_let_patterns)]
20275 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
20276 if let WritableRequest::Write { data, responder } = self {
20277 Some((data, responder))
20278 } else {
20279 None
20280 }
20281 }
20282
20283 pub fn method_name(&self) -> &'static str {
20285 match *self {
20286 WritableRequest::Write { .. } => "write",
20287 }
20288 }
20289}
20290
20291#[derive(Debug, Clone)]
20292pub struct WritableControlHandle {
20293 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20294}
20295
20296impl fidl::endpoints::ControlHandle for WritableControlHandle {
20297 fn shutdown(&self) {
20298 self.inner.shutdown()
20299 }
20300 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
20301 self.inner.shutdown_with_epitaph(status)
20302 }
20303
20304 fn is_closed(&self) -> bool {
20305 self.inner.channel().is_closed()
20306 }
20307 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
20308 self.inner.channel().on_closed()
20309 }
20310
20311 #[cfg(target_os = "fuchsia")]
20312 fn signal_peer(
20313 &self,
20314 clear_mask: zx::Signals,
20315 set_mask: zx::Signals,
20316 ) -> Result<(), zx_status::Status> {
20317 use fidl::Peered;
20318 self.inner.channel().signal_peer(clear_mask, set_mask)
20319 }
20320}
20321
20322impl WritableControlHandle {}
20323
20324#[must_use = "FIDL methods require a response to be sent"]
20325#[derive(Debug)]
20326pub struct WritableWriteResponder {
20327 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
20328 tx_id: u32,
20329}
20330
20331impl std::ops::Drop for WritableWriteResponder {
20335 fn drop(&mut self) {
20336 self.control_handle.shutdown();
20337 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20339 }
20340}
20341
20342impl fidl::endpoints::Responder for WritableWriteResponder {
20343 type ControlHandle = WritableControlHandle;
20344
20345 fn control_handle(&self) -> &WritableControlHandle {
20346 &self.control_handle
20347 }
20348
20349 fn drop_without_shutdown(mut self) {
20350 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20352 std::mem::forget(self);
20354 }
20355}
20356
20357impl WritableWriteResponder {
20358 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20362 let _result = self.send_raw(result);
20363 if _result.is_err() {
20364 self.control_handle.shutdown();
20365 }
20366 self.drop_without_shutdown();
20367 _result
20368 }
20369
20370 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20372 let _result = self.send_raw(result);
20373 self.drop_without_shutdown();
20374 _result
20375 }
20376
20377 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20378 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
20379 result.map(|actual_count| (actual_count,)),
20380 self.tx_id,
20381 0x6a31437832469f82,
20382 fidl::encoding::DynamicFlags::empty(),
20383 )
20384 }
20385}
20386
20387mod internal {
20388 use super::*;
20389
20390 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
20391 type Borrowed<'a> = &'a mut Self;
20392 fn take_or_borrow<'a>(
20393 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20394 ) -> Self::Borrowed<'a> {
20395 value
20396 }
20397 }
20398
20399 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
20400 type Owned = Self;
20401
20402 #[inline(always)]
20403 fn inline_align(_context: fidl::encoding::Context) -> usize {
20404 8
20405 }
20406
20407 #[inline(always)]
20408 fn inline_size(_context: fidl::encoding::Context) -> usize {
20409 40
20410 }
20411 }
20412
20413 unsafe impl
20414 fidl::encoding::Encode<
20415 DirectoryCreateSymlinkRequest,
20416 fidl::encoding::DefaultFuchsiaResourceDialect,
20417 > for &mut DirectoryCreateSymlinkRequest
20418 {
20419 #[inline]
20420 unsafe fn encode(
20421 self,
20422 encoder: &mut fidl::encoding::Encoder<
20423 '_,
20424 fidl::encoding::DefaultFuchsiaResourceDialect,
20425 >,
20426 offset: usize,
20427 _depth: fidl::encoding::Depth,
20428 ) -> fidl::Result<()> {
20429 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20430 fidl::encoding::Encode::<
20432 DirectoryCreateSymlinkRequest,
20433 fidl::encoding::DefaultFuchsiaResourceDialect,
20434 >::encode(
20435 (
20436 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20437 &self.name,
20438 ),
20439 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
20440 &self.target,
20441 ),
20442 <fidl::encoding::Optional<
20443 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20444 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20445 &mut self.connection
20446 ),
20447 ),
20448 encoder,
20449 offset,
20450 _depth,
20451 )
20452 }
20453 }
20454 unsafe impl<
20455 T0: fidl::encoding::Encode<
20456 fidl::encoding::BoundedString<255>,
20457 fidl::encoding::DefaultFuchsiaResourceDialect,
20458 >,
20459 T1: fidl::encoding::Encode<
20460 fidl::encoding::Vector<u8, 4095>,
20461 fidl::encoding::DefaultFuchsiaResourceDialect,
20462 >,
20463 T2: fidl::encoding::Encode<
20464 fidl::encoding::Optional<
20465 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20466 >,
20467 fidl::encoding::DefaultFuchsiaResourceDialect,
20468 >,
20469 >
20470 fidl::encoding::Encode<
20471 DirectoryCreateSymlinkRequest,
20472 fidl::encoding::DefaultFuchsiaResourceDialect,
20473 > for (T0, T1, T2)
20474 {
20475 #[inline]
20476 unsafe fn encode(
20477 self,
20478 encoder: &mut fidl::encoding::Encoder<
20479 '_,
20480 fidl::encoding::DefaultFuchsiaResourceDialect,
20481 >,
20482 offset: usize,
20483 depth: fidl::encoding::Depth,
20484 ) -> fidl::Result<()> {
20485 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20486 unsafe {
20489 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
20490 (ptr as *mut u64).write_unaligned(0);
20491 }
20492 self.0.encode(encoder, offset + 0, depth)?;
20494 self.1.encode(encoder, offset + 16, depth)?;
20495 self.2.encode(encoder, offset + 32, depth)?;
20496 Ok(())
20497 }
20498 }
20499
20500 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20501 for DirectoryCreateSymlinkRequest
20502 {
20503 #[inline(always)]
20504 fn new_empty() -> Self {
20505 Self {
20506 name: fidl::new_empty!(
20507 fidl::encoding::BoundedString<255>,
20508 fidl::encoding::DefaultFuchsiaResourceDialect
20509 ),
20510 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect),
20511 connection: fidl::new_empty!(
20512 fidl::encoding::Optional<
20513 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20514 >,
20515 fidl::encoding::DefaultFuchsiaResourceDialect
20516 ),
20517 }
20518 }
20519
20520 #[inline]
20521 unsafe fn decode(
20522 &mut self,
20523 decoder: &mut fidl::encoding::Decoder<
20524 '_,
20525 fidl::encoding::DefaultFuchsiaResourceDialect,
20526 >,
20527 offset: usize,
20528 _depth: fidl::encoding::Depth,
20529 ) -> fidl::Result<()> {
20530 decoder.debug_check_bounds::<Self>(offset);
20531 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
20533 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20534 let mask = 0xffffffff00000000u64;
20535 let maskedval = padval & mask;
20536 if maskedval != 0 {
20537 return Err(fidl::Error::NonZeroPadding {
20538 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
20539 });
20540 }
20541 fidl::decode!(
20542 fidl::encoding::BoundedString<255>,
20543 fidl::encoding::DefaultFuchsiaResourceDialect,
20544 &mut self.name,
20545 decoder,
20546 offset + 0,
20547 _depth
20548 )?;
20549 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
20550 fidl::decode!(
20551 fidl::encoding::Optional<
20552 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20553 >,
20554 fidl::encoding::DefaultFuchsiaResourceDialect,
20555 &mut self.connection,
20556 decoder,
20557 offset + 32,
20558 _depth
20559 )?;
20560 Ok(())
20561 }
20562 }
20563
20564 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
20565 type Borrowed<'a> = &'a mut Self;
20566 fn take_or_borrow<'a>(
20567 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20568 ) -> Self::Borrowed<'a> {
20569 value
20570 }
20571 }
20572
20573 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
20574 type Owned = Self;
20575
20576 #[inline(always)]
20577 fn inline_align(_context: fidl::encoding::Context) -> usize {
20578 8
20579 }
20580
20581 #[inline(always)]
20582 fn inline_size(_context: fidl::encoding::Context) -> usize {
20583 32
20584 }
20585 }
20586
20587 unsafe impl
20588 fidl::encoding::Encode<
20589 DirectoryDeprecatedOpenRequest,
20590 fidl::encoding::DefaultFuchsiaResourceDialect,
20591 > for &mut DirectoryDeprecatedOpenRequest
20592 {
20593 #[inline]
20594 unsafe fn encode(
20595 self,
20596 encoder: &mut fidl::encoding::Encoder<
20597 '_,
20598 fidl::encoding::DefaultFuchsiaResourceDialect,
20599 >,
20600 offset: usize,
20601 _depth: fidl::encoding::Depth,
20602 ) -> fidl::Result<()> {
20603 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20604 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
20606 (
20607 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
20608 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
20609 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
20610 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
20611 ),
20612 encoder, offset, _depth
20613 )
20614 }
20615 }
20616 unsafe impl<
20617 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
20618 T1: fidl::encoding::Encode<ModeType, fidl::encoding::DefaultFuchsiaResourceDialect>,
20619 T2: fidl::encoding::Encode<
20620 fidl::encoding::BoundedString<4095>,
20621 fidl::encoding::DefaultFuchsiaResourceDialect,
20622 >,
20623 T3: fidl::encoding::Encode<
20624 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20625 fidl::encoding::DefaultFuchsiaResourceDialect,
20626 >,
20627 >
20628 fidl::encoding::Encode<
20629 DirectoryDeprecatedOpenRequest,
20630 fidl::encoding::DefaultFuchsiaResourceDialect,
20631 > for (T0, T1, T2, T3)
20632 {
20633 #[inline]
20634 unsafe fn encode(
20635 self,
20636 encoder: &mut fidl::encoding::Encoder<
20637 '_,
20638 fidl::encoding::DefaultFuchsiaResourceDialect,
20639 >,
20640 offset: usize,
20641 depth: fidl::encoding::Depth,
20642 ) -> fidl::Result<()> {
20643 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20644 unsafe {
20647 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
20648 (ptr as *mut u64).write_unaligned(0);
20649 }
20650 self.0.encode(encoder, offset + 0, depth)?;
20652 self.1.encode(encoder, offset + 4, depth)?;
20653 self.2.encode(encoder, offset + 8, depth)?;
20654 self.3.encode(encoder, offset + 24, depth)?;
20655 Ok(())
20656 }
20657 }
20658
20659 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20660 for DirectoryDeprecatedOpenRequest
20661 {
20662 #[inline(always)]
20663 fn new_empty() -> Self {
20664 Self {
20665 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
20666 mode: fidl::new_empty!(ModeType, fidl::encoding::DefaultFuchsiaResourceDialect),
20667 path: fidl::new_empty!(
20668 fidl::encoding::BoundedString<4095>,
20669 fidl::encoding::DefaultFuchsiaResourceDialect
20670 ),
20671 object: fidl::new_empty!(
20672 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20673 fidl::encoding::DefaultFuchsiaResourceDialect
20674 ),
20675 }
20676 }
20677
20678 #[inline]
20679 unsafe fn decode(
20680 &mut self,
20681 decoder: &mut fidl::encoding::Decoder<
20682 '_,
20683 fidl::encoding::DefaultFuchsiaResourceDialect,
20684 >,
20685 offset: usize,
20686 _depth: fidl::encoding::Depth,
20687 ) -> fidl::Result<()> {
20688 decoder.debug_check_bounds::<Self>(offset);
20689 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
20691 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20692 let mask = 0xffffffff00000000u64;
20693 let maskedval = padval & mask;
20694 if maskedval != 0 {
20695 return Err(fidl::Error::NonZeroPadding {
20696 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
20697 });
20698 }
20699 fidl::decode!(
20700 OpenFlags,
20701 fidl::encoding::DefaultFuchsiaResourceDialect,
20702 &mut self.flags,
20703 decoder,
20704 offset + 0,
20705 _depth
20706 )?;
20707 fidl::decode!(
20708 ModeType,
20709 fidl::encoding::DefaultFuchsiaResourceDialect,
20710 &mut self.mode,
20711 decoder,
20712 offset + 4,
20713 _depth
20714 )?;
20715 fidl::decode!(
20716 fidl::encoding::BoundedString<4095>,
20717 fidl::encoding::DefaultFuchsiaResourceDialect,
20718 &mut self.path,
20719 decoder,
20720 offset + 8,
20721 _depth
20722 )?;
20723 fidl::decode!(
20724 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20725 fidl::encoding::DefaultFuchsiaResourceDialect,
20726 &mut self.object,
20727 decoder,
20728 offset + 24,
20729 _depth
20730 )?;
20731 Ok(())
20732 }
20733 }
20734
20735 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
20736 type Borrowed<'a> = &'a mut Self;
20737 fn take_or_borrow<'a>(
20738 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20739 ) -> Self::Borrowed<'a> {
20740 value
20741 }
20742 }
20743
20744 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
20745 type Owned = Self;
20746
20747 #[inline(always)]
20748 fn inline_align(_context: fidl::encoding::Context) -> usize {
20749 4
20750 }
20751
20752 #[inline(always)]
20753 fn inline_size(_context: fidl::encoding::Context) -> usize {
20754 8
20755 }
20756 }
20757
20758 unsafe impl
20759 fidl::encoding::Encode<
20760 DirectoryGetTokenResponse,
20761 fidl::encoding::DefaultFuchsiaResourceDialect,
20762 > for &mut DirectoryGetTokenResponse
20763 {
20764 #[inline]
20765 unsafe fn encode(
20766 self,
20767 encoder: &mut fidl::encoding::Encoder<
20768 '_,
20769 fidl::encoding::DefaultFuchsiaResourceDialect,
20770 >,
20771 offset: usize,
20772 _depth: fidl::encoding::Depth,
20773 ) -> fidl::Result<()> {
20774 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20775 fidl::encoding::Encode::<
20777 DirectoryGetTokenResponse,
20778 fidl::encoding::DefaultFuchsiaResourceDialect,
20779 >::encode(
20780 (
20781 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
20782 <fidl::encoding::Optional<
20783 fidl::encoding::HandleType<
20784 fidl::Handle,
20785 { fidl::ObjectType::NONE.into_raw() },
20786 2147483648,
20787 >,
20788 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20789 &mut self.token
20790 ),
20791 ),
20792 encoder,
20793 offset,
20794 _depth,
20795 )
20796 }
20797 }
20798 unsafe impl<
20799 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
20800 T1: fidl::encoding::Encode<
20801 fidl::encoding::Optional<
20802 fidl::encoding::HandleType<
20803 fidl::Handle,
20804 { fidl::ObjectType::NONE.into_raw() },
20805 2147483648,
20806 >,
20807 >,
20808 fidl::encoding::DefaultFuchsiaResourceDialect,
20809 >,
20810 >
20811 fidl::encoding::Encode<
20812 DirectoryGetTokenResponse,
20813 fidl::encoding::DefaultFuchsiaResourceDialect,
20814 > for (T0, T1)
20815 {
20816 #[inline]
20817 unsafe fn encode(
20818 self,
20819 encoder: &mut fidl::encoding::Encoder<
20820 '_,
20821 fidl::encoding::DefaultFuchsiaResourceDialect,
20822 >,
20823 offset: usize,
20824 depth: fidl::encoding::Depth,
20825 ) -> fidl::Result<()> {
20826 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20827 self.0.encode(encoder, offset + 0, depth)?;
20831 self.1.encode(encoder, offset + 4, depth)?;
20832 Ok(())
20833 }
20834 }
20835
20836 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20837 for DirectoryGetTokenResponse
20838 {
20839 #[inline(always)]
20840 fn new_empty() -> Self {
20841 Self {
20842 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
20843 token: fidl::new_empty!(
20844 fidl::encoding::Optional<
20845 fidl::encoding::HandleType<
20846 fidl::Handle,
20847 { fidl::ObjectType::NONE.into_raw() },
20848 2147483648,
20849 >,
20850 >,
20851 fidl::encoding::DefaultFuchsiaResourceDialect
20852 ),
20853 }
20854 }
20855
20856 #[inline]
20857 unsafe fn decode(
20858 &mut self,
20859 decoder: &mut fidl::encoding::Decoder<
20860 '_,
20861 fidl::encoding::DefaultFuchsiaResourceDialect,
20862 >,
20863 offset: usize,
20864 _depth: fidl::encoding::Depth,
20865 ) -> fidl::Result<()> {
20866 decoder.debug_check_bounds::<Self>(offset);
20867 fidl::decode!(
20869 i32,
20870 fidl::encoding::DefaultFuchsiaResourceDialect,
20871 &mut self.s,
20872 decoder,
20873 offset + 0,
20874 _depth
20875 )?;
20876 fidl::decode!(
20877 fidl::encoding::Optional<
20878 fidl::encoding::HandleType<
20879 fidl::Handle,
20880 { fidl::ObjectType::NONE.into_raw() },
20881 2147483648,
20882 >,
20883 >,
20884 fidl::encoding::DefaultFuchsiaResourceDialect,
20885 &mut self.token,
20886 decoder,
20887 offset + 4,
20888 _depth
20889 )?;
20890 Ok(())
20891 }
20892 }
20893
20894 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
20895 type Borrowed<'a> = &'a mut Self;
20896 fn take_or_borrow<'a>(
20897 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20898 ) -> Self::Borrowed<'a> {
20899 value
20900 }
20901 }
20902
20903 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
20904 type Owned = Self;
20905
20906 #[inline(always)]
20907 fn inline_align(_context: fidl::encoding::Context) -> usize {
20908 8
20909 }
20910
20911 #[inline(always)]
20912 fn inline_size(_context: fidl::encoding::Context) -> usize {
20913 40
20914 }
20915 }
20916
20917 unsafe impl
20918 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
20919 for &mut DirectoryLinkRequest
20920 {
20921 #[inline]
20922 unsafe fn encode(
20923 self,
20924 encoder: &mut fidl::encoding::Encoder<
20925 '_,
20926 fidl::encoding::DefaultFuchsiaResourceDialect,
20927 >,
20928 offset: usize,
20929 _depth: fidl::encoding::Depth,
20930 ) -> fidl::Result<()> {
20931 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
20932 fidl::encoding::Encode::<
20934 DirectoryLinkRequest,
20935 fidl::encoding::DefaultFuchsiaResourceDialect,
20936 >::encode(
20937 (
20938 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20939 &self.src,
20940 ),
20941 <fidl::encoding::HandleType<
20942 fidl::Handle,
20943 { fidl::ObjectType::NONE.into_raw() },
20944 2147483648,
20945 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20946 &mut self.dst_parent_token,
20947 ),
20948 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20949 &self.dst,
20950 ),
20951 ),
20952 encoder,
20953 offset,
20954 _depth,
20955 )
20956 }
20957 }
20958 unsafe impl<
20959 T0: fidl::encoding::Encode<
20960 fidl::encoding::BoundedString<255>,
20961 fidl::encoding::DefaultFuchsiaResourceDialect,
20962 >,
20963 T1: fidl::encoding::Encode<
20964 fidl::encoding::HandleType<
20965 fidl::Handle,
20966 { fidl::ObjectType::NONE.into_raw() },
20967 2147483648,
20968 >,
20969 fidl::encoding::DefaultFuchsiaResourceDialect,
20970 >,
20971 T2: fidl::encoding::Encode<
20972 fidl::encoding::BoundedString<255>,
20973 fidl::encoding::DefaultFuchsiaResourceDialect,
20974 >,
20975 >
20976 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
20977 for (T0, T1, T2)
20978 {
20979 #[inline]
20980 unsafe fn encode(
20981 self,
20982 encoder: &mut fidl::encoding::Encoder<
20983 '_,
20984 fidl::encoding::DefaultFuchsiaResourceDialect,
20985 >,
20986 offset: usize,
20987 depth: fidl::encoding::Depth,
20988 ) -> fidl::Result<()> {
20989 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
20990 unsafe {
20993 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
20994 (ptr as *mut u64).write_unaligned(0);
20995 }
20996 self.0.encode(encoder, offset + 0, depth)?;
20998 self.1.encode(encoder, offset + 16, depth)?;
20999 self.2.encode(encoder, offset + 24, depth)?;
21000 Ok(())
21001 }
21002 }
21003
21004 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21005 for DirectoryLinkRequest
21006 {
21007 #[inline(always)]
21008 fn new_empty() -> Self {
21009 Self {
21010 src: fidl::new_empty!(
21011 fidl::encoding::BoundedString<255>,
21012 fidl::encoding::DefaultFuchsiaResourceDialect
21013 ),
21014 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21015 dst: fidl::new_empty!(
21016 fidl::encoding::BoundedString<255>,
21017 fidl::encoding::DefaultFuchsiaResourceDialect
21018 ),
21019 }
21020 }
21021
21022 #[inline]
21023 unsafe fn decode(
21024 &mut self,
21025 decoder: &mut fidl::encoding::Decoder<
21026 '_,
21027 fidl::encoding::DefaultFuchsiaResourceDialect,
21028 >,
21029 offset: usize,
21030 _depth: fidl::encoding::Depth,
21031 ) -> fidl::Result<()> {
21032 decoder.debug_check_bounds::<Self>(offset);
21033 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21035 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21036 let mask = 0xffffffff00000000u64;
21037 let maskedval = padval & mask;
21038 if maskedval != 0 {
21039 return Err(fidl::Error::NonZeroPadding {
21040 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21041 });
21042 }
21043 fidl::decode!(
21044 fidl::encoding::BoundedString<255>,
21045 fidl::encoding::DefaultFuchsiaResourceDialect,
21046 &mut self.src,
21047 decoder,
21048 offset + 0,
21049 _depth
21050 )?;
21051 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
21052 fidl::decode!(
21053 fidl::encoding::BoundedString<255>,
21054 fidl::encoding::DefaultFuchsiaResourceDialect,
21055 &mut self.dst,
21056 decoder,
21057 offset + 24,
21058 _depth
21059 )?;
21060 Ok(())
21061 }
21062 }
21063
21064 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
21065 type Borrowed<'a> = &'a mut Self;
21066 fn take_or_borrow<'a>(
21067 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21068 ) -> Self::Borrowed<'a> {
21069 value
21070 }
21071 }
21072
21073 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
21074 type Owned = Self;
21075
21076 #[inline(always)]
21077 fn inline_align(_context: fidl::encoding::Context) -> usize {
21078 8
21079 }
21080
21081 #[inline(always)]
21082 fn inline_size(_context: fidl::encoding::Context) -> usize {
21083 48
21084 }
21085 }
21086
21087 unsafe impl
21088 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21089 for &mut DirectoryOpenRequest
21090 {
21091 #[inline]
21092 unsafe fn encode(
21093 self,
21094 encoder: &mut fidl::encoding::Encoder<
21095 '_,
21096 fidl::encoding::DefaultFuchsiaResourceDialect,
21097 >,
21098 offset: usize,
21099 _depth: fidl::encoding::Depth,
21100 ) -> fidl::Result<()> {
21101 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21102 fidl::encoding::Encode::<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21104 (
21105 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
21106 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
21107 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21108 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
21109 ),
21110 encoder, offset, _depth
21111 )
21112 }
21113 }
21114 unsafe impl<
21115 T0: fidl::encoding::Encode<
21116 fidl::encoding::BoundedString<4095>,
21117 fidl::encoding::DefaultFuchsiaResourceDialect,
21118 >,
21119 T1: fidl::encoding::Encode<Flags, fidl::encoding::DefaultFuchsiaResourceDialect>,
21120 T2: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
21121 T3: fidl::encoding::Encode<
21122 fidl::encoding::HandleType<
21123 fidl::Channel,
21124 { fidl::ObjectType::CHANNEL.into_raw() },
21125 2147483648,
21126 >,
21127 fidl::encoding::DefaultFuchsiaResourceDialect,
21128 >,
21129 >
21130 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21131 for (T0, T1, T2, T3)
21132 {
21133 #[inline]
21134 unsafe fn encode(
21135 self,
21136 encoder: &mut fidl::encoding::Encoder<
21137 '_,
21138 fidl::encoding::DefaultFuchsiaResourceDialect,
21139 >,
21140 offset: usize,
21141 depth: fidl::encoding::Depth,
21142 ) -> fidl::Result<()> {
21143 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21144 unsafe {
21147 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
21148 (ptr as *mut u64).write_unaligned(0);
21149 }
21150 self.0.encode(encoder, offset + 0, depth)?;
21152 self.1.encode(encoder, offset + 16, depth)?;
21153 self.2.encode(encoder, offset + 24, depth)?;
21154 self.3.encode(encoder, offset + 40, depth)?;
21155 Ok(())
21156 }
21157 }
21158
21159 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21160 for DirectoryOpenRequest
21161 {
21162 #[inline(always)]
21163 fn new_empty() -> Self {
21164 Self {
21165 path: fidl::new_empty!(
21166 fidl::encoding::BoundedString<4095>,
21167 fidl::encoding::DefaultFuchsiaResourceDialect
21168 ),
21169 flags: fidl::new_empty!(Flags, fidl::encoding::DefaultFuchsiaResourceDialect),
21170 options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
21171 object: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21172 }
21173 }
21174
21175 #[inline]
21176 unsafe fn decode(
21177 &mut self,
21178 decoder: &mut fidl::encoding::Decoder<
21179 '_,
21180 fidl::encoding::DefaultFuchsiaResourceDialect,
21181 >,
21182 offset: usize,
21183 _depth: fidl::encoding::Depth,
21184 ) -> fidl::Result<()> {
21185 decoder.debug_check_bounds::<Self>(offset);
21186 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
21188 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21189 let mask = 0xffffffff00000000u64;
21190 let maskedval = padval & mask;
21191 if maskedval != 0 {
21192 return Err(fidl::Error::NonZeroPadding {
21193 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
21194 });
21195 }
21196 fidl::decode!(
21197 fidl::encoding::BoundedString<4095>,
21198 fidl::encoding::DefaultFuchsiaResourceDialect,
21199 &mut self.path,
21200 decoder,
21201 offset + 0,
21202 _depth
21203 )?;
21204 fidl::decode!(
21205 Flags,
21206 fidl::encoding::DefaultFuchsiaResourceDialect,
21207 &mut self.flags,
21208 decoder,
21209 offset + 16,
21210 _depth
21211 )?;
21212 fidl::decode!(
21213 Options,
21214 fidl::encoding::DefaultFuchsiaResourceDialect,
21215 &mut self.options,
21216 decoder,
21217 offset + 24,
21218 _depth
21219 )?;
21220 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
21221 Ok(())
21222 }
21223 }
21224
21225 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
21226 type Borrowed<'a> = &'a mut Self;
21227 fn take_or_borrow<'a>(
21228 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21229 ) -> Self::Borrowed<'a> {
21230 value
21231 }
21232 }
21233
21234 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
21235 type Owned = Self;
21236
21237 #[inline(always)]
21238 fn inline_align(_context: fidl::encoding::Context) -> usize {
21239 8
21240 }
21241
21242 #[inline(always)]
21243 fn inline_size(_context: fidl::encoding::Context) -> usize {
21244 40
21245 }
21246 }
21247
21248 unsafe impl
21249 fidl::encoding::Encode<
21250 DirectoryRenameRequest,
21251 fidl::encoding::DefaultFuchsiaResourceDialect,
21252 > for &mut DirectoryRenameRequest
21253 {
21254 #[inline]
21255 unsafe fn encode(
21256 self,
21257 encoder: &mut fidl::encoding::Encoder<
21258 '_,
21259 fidl::encoding::DefaultFuchsiaResourceDialect,
21260 >,
21261 offset: usize,
21262 _depth: fidl::encoding::Depth,
21263 ) -> fidl::Result<()> {
21264 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21265 fidl::encoding::Encode::<
21267 DirectoryRenameRequest,
21268 fidl::encoding::DefaultFuchsiaResourceDialect,
21269 >::encode(
21270 (
21271 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21272 &self.src,
21273 ),
21274 <fidl::encoding::HandleType<
21275 fidl::Event,
21276 { fidl::ObjectType::EVENT.into_raw() },
21277 2147483648,
21278 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21279 &mut self.dst_parent_token,
21280 ),
21281 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21282 &self.dst,
21283 ),
21284 ),
21285 encoder,
21286 offset,
21287 _depth,
21288 )
21289 }
21290 }
21291 unsafe impl<
21292 T0: fidl::encoding::Encode<
21293 fidl::encoding::BoundedString<255>,
21294 fidl::encoding::DefaultFuchsiaResourceDialect,
21295 >,
21296 T1: fidl::encoding::Encode<
21297 fidl::encoding::HandleType<
21298 fidl::Event,
21299 { fidl::ObjectType::EVENT.into_raw() },
21300 2147483648,
21301 >,
21302 fidl::encoding::DefaultFuchsiaResourceDialect,
21303 >,
21304 T2: fidl::encoding::Encode<
21305 fidl::encoding::BoundedString<255>,
21306 fidl::encoding::DefaultFuchsiaResourceDialect,
21307 >,
21308 >
21309 fidl::encoding::Encode<
21310 DirectoryRenameRequest,
21311 fidl::encoding::DefaultFuchsiaResourceDialect,
21312 > for (T0, T1, T2)
21313 {
21314 #[inline]
21315 unsafe fn encode(
21316 self,
21317 encoder: &mut fidl::encoding::Encoder<
21318 '_,
21319 fidl::encoding::DefaultFuchsiaResourceDialect,
21320 >,
21321 offset: usize,
21322 depth: fidl::encoding::Depth,
21323 ) -> fidl::Result<()> {
21324 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21325 unsafe {
21328 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21329 (ptr as *mut u64).write_unaligned(0);
21330 }
21331 self.0.encode(encoder, offset + 0, depth)?;
21333 self.1.encode(encoder, offset + 16, depth)?;
21334 self.2.encode(encoder, offset + 24, depth)?;
21335 Ok(())
21336 }
21337 }
21338
21339 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21340 for DirectoryRenameRequest
21341 {
21342 #[inline(always)]
21343 fn new_empty() -> Self {
21344 Self {
21345 src: fidl::new_empty!(
21346 fidl::encoding::BoundedString<255>,
21347 fidl::encoding::DefaultFuchsiaResourceDialect
21348 ),
21349 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21350 dst: fidl::new_empty!(
21351 fidl::encoding::BoundedString<255>,
21352 fidl::encoding::DefaultFuchsiaResourceDialect
21353 ),
21354 }
21355 }
21356
21357 #[inline]
21358 unsafe fn decode(
21359 &mut self,
21360 decoder: &mut fidl::encoding::Decoder<
21361 '_,
21362 fidl::encoding::DefaultFuchsiaResourceDialect,
21363 >,
21364 offset: usize,
21365 _depth: fidl::encoding::Depth,
21366 ) -> fidl::Result<()> {
21367 decoder.debug_check_bounds::<Self>(offset);
21368 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21370 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21371 let mask = 0xffffffff00000000u64;
21372 let maskedval = padval & mask;
21373 if maskedval != 0 {
21374 return Err(fidl::Error::NonZeroPadding {
21375 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21376 });
21377 }
21378 fidl::decode!(
21379 fidl::encoding::BoundedString<255>,
21380 fidl::encoding::DefaultFuchsiaResourceDialect,
21381 &mut self.src,
21382 decoder,
21383 offset + 0,
21384 _depth
21385 )?;
21386 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
21387 fidl::decode!(
21388 fidl::encoding::BoundedString<255>,
21389 fidl::encoding::DefaultFuchsiaResourceDialect,
21390 &mut self.dst,
21391 decoder,
21392 offset + 24,
21393 _depth
21394 )?;
21395 Ok(())
21396 }
21397 }
21398
21399 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
21400 type Borrowed<'a> = &'a mut Self;
21401 fn take_or_borrow<'a>(
21402 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21403 ) -> Self::Borrowed<'a> {
21404 value
21405 }
21406 }
21407
21408 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
21409 type Owned = Self;
21410
21411 #[inline(always)]
21412 fn inline_align(_context: fidl::encoding::Context) -> usize {
21413 4
21414 }
21415
21416 #[inline(always)]
21417 fn inline_size(_context: fidl::encoding::Context) -> usize {
21418 12
21419 }
21420 }
21421
21422 unsafe impl
21423 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21424 for &mut DirectoryWatchRequest
21425 {
21426 #[inline]
21427 unsafe fn encode(
21428 self,
21429 encoder: &mut fidl::encoding::Encoder<
21430 '_,
21431 fidl::encoding::DefaultFuchsiaResourceDialect,
21432 >,
21433 offset: usize,
21434 _depth: fidl::encoding::Depth,
21435 ) -> fidl::Result<()> {
21436 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21437 fidl::encoding::Encode::<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21439 (
21440 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
21441 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21442 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
21443 ),
21444 encoder, offset, _depth
21445 )
21446 }
21447 }
21448 unsafe impl<
21449 T0: fidl::encoding::Encode<WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect>,
21450 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
21451 T2: fidl::encoding::Encode<
21452 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21453 fidl::encoding::DefaultFuchsiaResourceDialect,
21454 >,
21455 >
21456 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21457 for (T0, T1, T2)
21458 {
21459 #[inline]
21460 unsafe fn encode(
21461 self,
21462 encoder: &mut fidl::encoding::Encoder<
21463 '_,
21464 fidl::encoding::DefaultFuchsiaResourceDialect,
21465 >,
21466 offset: usize,
21467 depth: fidl::encoding::Depth,
21468 ) -> fidl::Result<()> {
21469 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21470 self.0.encode(encoder, offset + 0, depth)?;
21474 self.1.encode(encoder, offset + 4, depth)?;
21475 self.2.encode(encoder, offset + 8, depth)?;
21476 Ok(())
21477 }
21478 }
21479
21480 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21481 for DirectoryWatchRequest
21482 {
21483 #[inline(always)]
21484 fn new_empty() -> Self {
21485 Self {
21486 mask: fidl::new_empty!(WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect),
21487 options: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
21488 watcher: fidl::new_empty!(
21489 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21490 fidl::encoding::DefaultFuchsiaResourceDialect
21491 ),
21492 }
21493 }
21494
21495 #[inline]
21496 unsafe fn decode(
21497 &mut self,
21498 decoder: &mut fidl::encoding::Decoder<
21499 '_,
21500 fidl::encoding::DefaultFuchsiaResourceDialect,
21501 >,
21502 offset: usize,
21503 _depth: fidl::encoding::Depth,
21504 ) -> fidl::Result<()> {
21505 decoder.debug_check_bounds::<Self>(offset);
21506 fidl::decode!(
21508 WatchMask,
21509 fidl::encoding::DefaultFuchsiaResourceDialect,
21510 &mut self.mask,
21511 decoder,
21512 offset + 0,
21513 _depth
21514 )?;
21515 fidl::decode!(
21516 u32,
21517 fidl::encoding::DefaultFuchsiaResourceDialect,
21518 &mut self.options,
21519 decoder,
21520 offset + 4,
21521 _depth
21522 )?;
21523 fidl::decode!(
21524 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21525 fidl::encoding::DefaultFuchsiaResourceDialect,
21526 &mut self.watcher,
21527 decoder,
21528 offset + 8,
21529 _depth
21530 )?;
21531 Ok(())
21532 }
21533 }
21534
21535 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
21536 type Borrowed<'a> = &'a mut Self;
21537 fn take_or_borrow<'a>(
21538 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21539 ) -> Self::Borrowed<'a> {
21540 value
21541 }
21542 }
21543
21544 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
21545 type Owned = Self;
21546
21547 #[inline(always)]
21548 fn inline_align(_context: fidl::encoding::Context) -> usize {
21549 8
21550 }
21551
21552 #[inline(always)]
21553 fn inline_size(_context: fidl::encoding::Context) -> usize {
21554 24
21555 }
21556 }
21557
21558 unsafe impl
21559 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21560 for &mut FileAllocateRequest
21561 {
21562 #[inline]
21563 unsafe fn encode(
21564 self,
21565 encoder: &mut fidl::encoding::Encoder<
21566 '_,
21567 fidl::encoding::DefaultFuchsiaResourceDialect,
21568 >,
21569 offset: usize,
21570 _depth: fidl::encoding::Depth,
21571 ) -> fidl::Result<()> {
21572 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21573 fidl::encoding::Encode::<
21575 FileAllocateRequest,
21576 fidl::encoding::DefaultFuchsiaResourceDialect,
21577 >::encode(
21578 (
21579 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
21580 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
21581 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
21582 ),
21583 encoder,
21584 offset,
21585 _depth,
21586 )
21587 }
21588 }
21589 unsafe impl<
21590 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21591 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21592 T2: fidl::encoding::Encode<AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect>,
21593 >
21594 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21595 for (T0, T1, T2)
21596 {
21597 #[inline]
21598 unsafe fn encode(
21599 self,
21600 encoder: &mut fidl::encoding::Encoder<
21601 '_,
21602 fidl::encoding::DefaultFuchsiaResourceDialect,
21603 >,
21604 offset: usize,
21605 depth: fidl::encoding::Depth,
21606 ) -> fidl::Result<()> {
21607 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21608 unsafe {
21611 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21612 (ptr as *mut u64).write_unaligned(0);
21613 }
21614 self.0.encode(encoder, offset + 0, depth)?;
21616 self.1.encode(encoder, offset + 8, depth)?;
21617 self.2.encode(encoder, offset + 16, depth)?;
21618 Ok(())
21619 }
21620 }
21621
21622 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21623 for FileAllocateRequest
21624 {
21625 #[inline(always)]
21626 fn new_empty() -> Self {
21627 Self {
21628 offset: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21629 length: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21630 mode: fidl::new_empty!(AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect),
21631 }
21632 }
21633
21634 #[inline]
21635 unsafe fn decode(
21636 &mut self,
21637 decoder: &mut fidl::encoding::Decoder<
21638 '_,
21639 fidl::encoding::DefaultFuchsiaResourceDialect,
21640 >,
21641 offset: usize,
21642 _depth: fidl::encoding::Depth,
21643 ) -> fidl::Result<()> {
21644 decoder.debug_check_bounds::<Self>(offset);
21645 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21647 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21648 let mask = 0xffffffff00000000u64;
21649 let maskedval = padval & mask;
21650 if maskedval != 0 {
21651 return Err(fidl::Error::NonZeroPadding {
21652 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21653 });
21654 }
21655 fidl::decode!(
21656 u64,
21657 fidl::encoding::DefaultFuchsiaResourceDialect,
21658 &mut self.offset,
21659 decoder,
21660 offset + 0,
21661 _depth
21662 )?;
21663 fidl::decode!(
21664 u64,
21665 fidl::encoding::DefaultFuchsiaResourceDialect,
21666 &mut self.length,
21667 decoder,
21668 offset + 8,
21669 _depth
21670 )?;
21671 fidl::decode!(
21672 AllocateMode,
21673 fidl::encoding::DefaultFuchsiaResourceDialect,
21674 &mut self.mode,
21675 decoder,
21676 offset + 16,
21677 _depth
21678 )?;
21679 Ok(())
21680 }
21681 }
21682
21683 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
21684 type Borrowed<'a> = &'a mut Self;
21685 fn take_or_borrow<'a>(
21686 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21687 ) -> Self::Borrowed<'a> {
21688 value
21689 }
21690 }
21691
21692 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
21693 type Owned = Self;
21694
21695 #[inline(always)]
21696 fn inline_align(_context: fidl::encoding::Context) -> usize {
21697 8
21698 }
21699
21700 #[inline(always)]
21701 fn inline_size(_context: fidl::encoding::Context) -> usize {
21702 16
21703 }
21704 }
21705
21706 unsafe impl
21707 fidl::encoding::Encode<
21708 FileEnableVerityRequest,
21709 fidl::encoding::DefaultFuchsiaResourceDialect,
21710 > for &mut FileEnableVerityRequest
21711 {
21712 #[inline]
21713 unsafe fn encode(
21714 self,
21715 encoder: &mut fidl::encoding::Encoder<
21716 '_,
21717 fidl::encoding::DefaultFuchsiaResourceDialect,
21718 >,
21719 offset: usize,
21720 _depth: fidl::encoding::Depth,
21721 ) -> fidl::Result<()> {
21722 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21723 fidl::encoding::Encode::<
21725 FileEnableVerityRequest,
21726 fidl::encoding::DefaultFuchsiaResourceDialect,
21727 >::encode(
21728 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
21729 encoder,
21730 offset,
21731 _depth,
21732 )
21733 }
21734 }
21735 unsafe impl<
21736 T0: fidl::encoding::Encode<
21737 VerificationOptions,
21738 fidl::encoding::DefaultFuchsiaResourceDialect,
21739 >,
21740 >
21741 fidl::encoding::Encode<
21742 FileEnableVerityRequest,
21743 fidl::encoding::DefaultFuchsiaResourceDialect,
21744 > for (T0,)
21745 {
21746 #[inline]
21747 unsafe fn encode(
21748 self,
21749 encoder: &mut fidl::encoding::Encoder<
21750 '_,
21751 fidl::encoding::DefaultFuchsiaResourceDialect,
21752 >,
21753 offset: usize,
21754 depth: fidl::encoding::Depth,
21755 ) -> fidl::Result<()> {
21756 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21757 self.0.encode(encoder, offset + 0, depth)?;
21761 Ok(())
21762 }
21763 }
21764
21765 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21766 for FileEnableVerityRequest
21767 {
21768 #[inline(always)]
21769 fn new_empty() -> Self {
21770 Self {
21771 options: fidl::new_empty!(
21772 VerificationOptions,
21773 fidl::encoding::DefaultFuchsiaResourceDialect
21774 ),
21775 }
21776 }
21777
21778 #[inline]
21779 unsafe fn decode(
21780 &mut self,
21781 decoder: &mut fidl::encoding::Decoder<
21782 '_,
21783 fidl::encoding::DefaultFuchsiaResourceDialect,
21784 >,
21785 offset: usize,
21786 _depth: fidl::encoding::Depth,
21787 ) -> fidl::Result<()> {
21788 decoder.debug_check_bounds::<Self>(offset);
21789 fidl::decode!(
21791 VerificationOptions,
21792 fidl::encoding::DefaultFuchsiaResourceDialect,
21793 &mut self.options,
21794 decoder,
21795 offset + 0,
21796 _depth
21797 )?;
21798 Ok(())
21799 }
21800 }
21801
21802 impl fidl::encoding::ResourceTypeMarker for FileObject {
21803 type Borrowed<'a> = &'a mut Self;
21804 fn take_or_borrow<'a>(
21805 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21806 ) -> Self::Borrowed<'a> {
21807 value
21808 }
21809 }
21810
21811 unsafe impl fidl::encoding::TypeMarker for FileObject {
21812 type Owned = Self;
21813
21814 #[inline(always)]
21815 fn inline_align(_context: fidl::encoding::Context) -> usize {
21816 4
21817 }
21818
21819 #[inline(always)]
21820 fn inline_size(_context: fidl::encoding::Context) -> usize {
21821 8
21822 }
21823 }
21824
21825 unsafe impl fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21826 for &mut FileObject
21827 {
21828 #[inline]
21829 unsafe fn encode(
21830 self,
21831 encoder: &mut fidl::encoding::Encoder<
21832 '_,
21833 fidl::encoding::DefaultFuchsiaResourceDialect,
21834 >,
21835 offset: usize,
21836 _depth: fidl::encoding::Depth,
21837 ) -> fidl::Result<()> {
21838 encoder.debug_check_bounds::<FileObject>(offset);
21839 fidl::encoding::Encode::<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21841 (
21842 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
21843 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
21844 ),
21845 encoder, offset, _depth
21846 )
21847 }
21848 }
21849 unsafe impl<
21850 T0: fidl::encoding::Encode<
21851 fidl::encoding::Optional<
21852 fidl::encoding::HandleType<
21853 fidl::Event,
21854 { fidl::ObjectType::EVENT.into_raw() },
21855 2147483648,
21856 >,
21857 >,
21858 fidl::encoding::DefaultFuchsiaResourceDialect,
21859 >,
21860 T1: fidl::encoding::Encode<
21861 fidl::encoding::Optional<
21862 fidl::encoding::HandleType<
21863 fidl::Stream,
21864 { fidl::ObjectType::STREAM.into_raw() },
21865 2147483648,
21866 >,
21867 >,
21868 fidl::encoding::DefaultFuchsiaResourceDialect,
21869 >,
21870 > fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21871 for (T0, T1)
21872 {
21873 #[inline]
21874 unsafe fn encode(
21875 self,
21876 encoder: &mut fidl::encoding::Encoder<
21877 '_,
21878 fidl::encoding::DefaultFuchsiaResourceDialect,
21879 >,
21880 offset: usize,
21881 depth: fidl::encoding::Depth,
21882 ) -> fidl::Result<()> {
21883 encoder.debug_check_bounds::<FileObject>(offset);
21884 self.0.encode(encoder, offset + 0, depth)?;
21888 self.1.encode(encoder, offset + 4, depth)?;
21889 Ok(())
21890 }
21891 }
21892
21893 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {
21894 #[inline(always)]
21895 fn new_empty() -> Self {
21896 Self {
21897 event: fidl::new_empty!(
21898 fidl::encoding::Optional<
21899 fidl::encoding::HandleType<
21900 fidl::Event,
21901 { fidl::ObjectType::EVENT.into_raw() },
21902 2147483648,
21903 >,
21904 >,
21905 fidl::encoding::DefaultFuchsiaResourceDialect
21906 ),
21907 stream: fidl::new_empty!(
21908 fidl::encoding::Optional<
21909 fidl::encoding::HandleType<
21910 fidl::Stream,
21911 { fidl::ObjectType::STREAM.into_raw() },
21912 2147483648,
21913 >,
21914 >,
21915 fidl::encoding::DefaultFuchsiaResourceDialect
21916 ),
21917 }
21918 }
21919
21920 #[inline]
21921 unsafe fn decode(
21922 &mut self,
21923 decoder: &mut fidl::encoding::Decoder<
21924 '_,
21925 fidl::encoding::DefaultFuchsiaResourceDialect,
21926 >,
21927 offset: usize,
21928 _depth: fidl::encoding::Depth,
21929 ) -> fidl::Result<()> {
21930 decoder.debug_check_bounds::<Self>(offset);
21931 fidl::decode!(
21933 fidl::encoding::Optional<
21934 fidl::encoding::HandleType<
21935 fidl::Event,
21936 { fidl::ObjectType::EVENT.into_raw() },
21937 2147483648,
21938 >,
21939 >,
21940 fidl::encoding::DefaultFuchsiaResourceDialect,
21941 &mut self.event,
21942 decoder,
21943 offset + 0,
21944 _depth
21945 )?;
21946 fidl::decode!(
21947 fidl::encoding::Optional<
21948 fidl::encoding::HandleType<
21949 fidl::Stream,
21950 { fidl::ObjectType::STREAM.into_raw() },
21951 2147483648,
21952 >,
21953 >,
21954 fidl::encoding::DefaultFuchsiaResourceDialect,
21955 &mut self.stream,
21956 decoder,
21957 offset + 4,
21958 _depth
21959 )?;
21960 Ok(())
21961 }
21962 }
21963
21964 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
21965 type Borrowed<'a> = &'a mut Self;
21966 fn take_or_borrow<'a>(
21967 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21968 ) -> Self::Borrowed<'a> {
21969 value
21970 }
21971 }
21972
21973 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
21974 type Owned = Self;
21975
21976 #[inline(always)]
21977 fn inline_align(_context: fidl::encoding::Context) -> usize {
21978 4
21979 }
21980
21981 #[inline(always)]
21982 fn inline_size(_context: fidl::encoding::Context) -> usize {
21983 4
21984 }
21985 }
21986
21987 unsafe impl
21988 fidl::encoding::Encode<
21989 FileGetBackingMemoryResponse,
21990 fidl::encoding::DefaultFuchsiaResourceDialect,
21991 > for &mut FileGetBackingMemoryResponse
21992 {
21993 #[inline]
21994 unsafe fn encode(
21995 self,
21996 encoder: &mut fidl::encoding::Encoder<
21997 '_,
21998 fidl::encoding::DefaultFuchsiaResourceDialect,
21999 >,
22000 offset: usize,
22001 _depth: fidl::encoding::Depth,
22002 ) -> fidl::Result<()> {
22003 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22004 fidl::encoding::Encode::<
22006 FileGetBackingMemoryResponse,
22007 fidl::encoding::DefaultFuchsiaResourceDialect,
22008 >::encode(
22009 (<fidl::encoding::HandleType<
22010 fidl::Vmo,
22011 { fidl::ObjectType::VMO.into_raw() },
22012 2147483648,
22013 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22014 &mut self.vmo
22015 ),),
22016 encoder,
22017 offset,
22018 _depth,
22019 )
22020 }
22021 }
22022 unsafe impl<
22023 T0: fidl::encoding::Encode<
22024 fidl::encoding::HandleType<
22025 fidl::Vmo,
22026 { fidl::ObjectType::VMO.into_raw() },
22027 2147483648,
22028 >,
22029 fidl::encoding::DefaultFuchsiaResourceDialect,
22030 >,
22031 >
22032 fidl::encoding::Encode<
22033 FileGetBackingMemoryResponse,
22034 fidl::encoding::DefaultFuchsiaResourceDialect,
22035 > for (T0,)
22036 {
22037 #[inline]
22038 unsafe fn encode(
22039 self,
22040 encoder: &mut fidl::encoding::Encoder<
22041 '_,
22042 fidl::encoding::DefaultFuchsiaResourceDialect,
22043 >,
22044 offset: usize,
22045 depth: fidl::encoding::Depth,
22046 ) -> fidl::Result<()> {
22047 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22048 self.0.encode(encoder, offset + 0, depth)?;
22052 Ok(())
22053 }
22054 }
22055
22056 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22057 for FileGetBackingMemoryResponse
22058 {
22059 #[inline(always)]
22060 fn new_empty() -> Self {
22061 Self {
22062 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22063 }
22064 }
22065
22066 #[inline]
22067 unsafe fn decode(
22068 &mut self,
22069 decoder: &mut fidl::encoding::Decoder<
22070 '_,
22071 fidl::encoding::DefaultFuchsiaResourceDialect,
22072 >,
22073 offset: usize,
22074 _depth: fidl::encoding::Depth,
22075 ) -> fidl::Result<()> {
22076 decoder.debug_check_bounds::<Self>(offset);
22077 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
22079 Ok(())
22080 }
22081 }
22082
22083 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
22084 type Borrowed<'a> = &'a mut Self;
22085 fn take_or_borrow<'a>(
22086 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22087 ) -> Self::Borrowed<'a> {
22088 value
22089 }
22090 }
22091
22092 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
22093 type Owned = Self;
22094
22095 #[inline(always)]
22096 fn inline_align(_context: fidl::encoding::Context) -> usize {
22097 8
22098 }
22099
22100 #[inline(always)]
22101 fn inline_size(_context: fidl::encoding::Context) -> usize {
22102 24
22103 }
22104 }
22105
22106 unsafe impl
22107 fidl::encoding::Encode<
22108 LinkableLinkIntoRequest,
22109 fidl::encoding::DefaultFuchsiaResourceDialect,
22110 > for &mut LinkableLinkIntoRequest
22111 {
22112 #[inline]
22113 unsafe fn encode(
22114 self,
22115 encoder: &mut fidl::encoding::Encoder<
22116 '_,
22117 fidl::encoding::DefaultFuchsiaResourceDialect,
22118 >,
22119 offset: usize,
22120 _depth: fidl::encoding::Depth,
22121 ) -> fidl::Result<()> {
22122 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22123 fidl::encoding::Encode::<
22125 LinkableLinkIntoRequest,
22126 fidl::encoding::DefaultFuchsiaResourceDialect,
22127 >::encode(
22128 (
22129 <fidl::encoding::HandleType<
22130 fidl::Event,
22131 { fidl::ObjectType::EVENT.into_raw() },
22132 2147483648,
22133 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22134 &mut self.dst_parent_token,
22135 ),
22136 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22137 &self.dst,
22138 ),
22139 ),
22140 encoder,
22141 offset,
22142 _depth,
22143 )
22144 }
22145 }
22146 unsafe impl<
22147 T0: fidl::encoding::Encode<
22148 fidl::encoding::HandleType<
22149 fidl::Event,
22150 { fidl::ObjectType::EVENT.into_raw() },
22151 2147483648,
22152 >,
22153 fidl::encoding::DefaultFuchsiaResourceDialect,
22154 >,
22155 T1: fidl::encoding::Encode<
22156 fidl::encoding::BoundedString<255>,
22157 fidl::encoding::DefaultFuchsiaResourceDialect,
22158 >,
22159 >
22160 fidl::encoding::Encode<
22161 LinkableLinkIntoRequest,
22162 fidl::encoding::DefaultFuchsiaResourceDialect,
22163 > for (T0, T1)
22164 {
22165 #[inline]
22166 unsafe fn encode(
22167 self,
22168 encoder: &mut fidl::encoding::Encoder<
22169 '_,
22170 fidl::encoding::DefaultFuchsiaResourceDialect,
22171 >,
22172 offset: usize,
22173 depth: fidl::encoding::Depth,
22174 ) -> fidl::Result<()> {
22175 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22176 unsafe {
22179 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22180 (ptr as *mut u64).write_unaligned(0);
22181 }
22182 self.0.encode(encoder, offset + 0, depth)?;
22184 self.1.encode(encoder, offset + 8, depth)?;
22185 Ok(())
22186 }
22187 }
22188
22189 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22190 for LinkableLinkIntoRequest
22191 {
22192 #[inline(always)]
22193 fn new_empty() -> Self {
22194 Self {
22195 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22196 dst: fidl::new_empty!(
22197 fidl::encoding::BoundedString<255>,
22198 fidl::encoding::DefaultFuchsiaResourceDialect
22199 ),
22200 }
22201 }
22202
22203 #[inline]
22204 unsafe fn decode(
22205 &mut self,
22206 decoder: &mut fidl::encoding::Decoder<
22207 '_,
22208 fidl::encoding::DefaultFuchsiaResourceDialect,
22209 >,
22210 offset: usize,
22211 _depth: fidl::encoding::Depth,
22212 ) -> fidl::Result<()> {
22213 decoder.debug_check_bounds::<Self>(offset);
22214 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22216 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22217 let mask = 0xffffffff00000000u64;
22218 let maskedval = padval & mask;
22219 if maskedval != 0 {
22220 return Err(fidl::Error::NonZeroPadding {
22221 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22222 });
22223 }
22224 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.dst_parent_token, decoder, offset + 0, _depth)?;
22225 fidl::decode!(
22226 fidl::encoding::BoundedString<255>,
22227 fidl::encoding::DefaultFuchsiaResourceDialect,
22228 &mut self.dst,
22229 decoder,
22230 offset + 8,
22231 _depth
22232 )?;
22233 Ok(())
22234 }
22235 }
22236
22237 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
22238 type Borrowed<'a> = &'a mut Self;
22239 fn take_or_borrow<'a>(
22240 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22241 ) -> Self::Borrowed<'a> {
22242 value
22243 }
22244 }
22245
22246 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
22247 type Owned = Self;
22248
22249 #[inline(always)]
22250 fn inline_align(_context: fidl::encoding::Context) -> usize {
22251 4
22252 }
22253
22254 #[inline(always)]
22255 fn inline_size(_context: fidl::encoding::Context) -> usize {
22256 8
22257 }
22258 }
22259
22260 unsafe impl
22261 fidl::encoding::Encode<
22262 NodeDeprecatedCloneRequest,
22263 fidl::encoding::DefaultFuchsiaResourceDialect,
22264 > for &mut NodeDeprecatedCloneRequest
22265 {
22266 #[inline]
22267 unsafe fn encode(
22268 self,
22269 encoder: &mut fidl::encoding::Encoder<
22270 '_,
22271 fidl::encoding::DefaultFuchsiaResourceDialect,
22272 >,
22273 offset: usize,
22274 _depth: fidl::encoding::Depth,
22275 ) -> fidl::Result<()> {
22276 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22277 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22279 (
22280 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
22281 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
22282 ),
22283 encoder, offset, _depth
22284 )
22285 }
22286 }
22287 unsafe impl<
22288 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
22289 T1: fidl::encoding::Encode<
22290 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22291 fidl::encoding::DefaultFuchsiaResourceDialect,
22292 >,
22293 >
22294 fidl::encoding::Encode<
22295 NodeDeprecatedCloneRequest,
22296 fidl::encoding::DefaultFuchsiaResourceDialect,
22297 > for (T0, T1)
22298 {
22299 #[inline]
22300 unsafe fn encode(
22301 self,
22302 encoder: &mut fidl::encoding::Encoder<
22303 '_,
22304 fidl::encoding::DefaultFuchsiaResourceDialect,
22305 >,
22306 offset: usize,
22307 depth: fidl::encoding::Depth,
22308 ) -> fidl::Result<()> {
22309 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22310 self.0.encode(encoder, offset + 0, depth)?;
22314 self.1.encode(encoder, offset + 4, depth)?;
22315 Ok(())
22316 }
22317 }
22318
22319 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22320 for NodeDeprecatedCloneRequest
22321 {
22322 #[inline(always)]
22323 fn new_empty() -> Self {
22324 Self {
22325 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
22326 object: fidl::new_empty!(
22327 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22328 fidl::encoding::DefaultFuchsiaResourceDialect
22329 ),
22330 }
22331 }
22332
22333 #[inline]
22334 unsafe fn decode(
22335 &mut self,
22336 decoder: &mut fidl::encoding::Decoder<
22337 '_,
22338 fidl::encoding::DefaultFuchsiaResourceDialect,
22339 >,
22340 offset: usize,
22341 _depth: fidl::encoding::Depth,
22342 ) -> fidl::Result<()> {
22343 decoder.debug_check_bounds::<Self>(offset);
22344 fidl::decode!(
22346 OpenFlags,
22347 fidl::encoding::DefaultFuchsiaResourceDialect,
22348 &mut self.flags,
22349 decoder,
22350 offset + 0,
22351 _depth
22352 )?;
22353 fidl::decode!(
22354 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22355 fidl::encoding::DefaultFuchsiaResourceDialect,
22356 &mut self.object,
22357 decoder,
22358 offset + 4,
22359 _depth
22360 )?;
22361 Ok(())
22362 }
22363 }
22364
22365 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
22366 type Borrowed<'a> = &'a mut Self;
22367 fn take_or_borrow<'a>(
22368 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22369 ) -> Self::Borrowed<'a> {
22370 value
22371 }
22372 }
22373
22374 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
22375 type Owned = Self;
22376
22377 #[inline(always)]
22378 fn inline_align(_context: fidl::encoding::Context) -> usize {
22379 4
22380 }
22381
22382 #[inline(always)]
22383 fn inline_size(_context: fidl::encoding::Context) -> usize {
22384 4
22385 }
22386 }
22387
22388 unsafe impl
22389 fidl::encoding::Encode<
22390 NodeListExtendedAttributesRequest,
22391 fidl::encoding::DefaultFuchsiaResourceDialect,
22392 > for &mut NodeListExtendedAttributesRequest
22393 {
22394 #[inline]
22395 unsafe fn encode(
22396 self,
22397 encoder: &mut fidl::encoding::Encoder<
22398 '_,
22399 fidl::encoding::DefaultFuchsiaResourceDialect,
22400 >,
22401 offset: usize,
22402 _depth: fidl::encoding::Depth,
22403 ) -> fidl::Result<()> {
22404 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22405 fidl::encoding::Encode::<
22407 NodeListExtendedAttributesRequest,
22408 fidl::encoding::DefaultFuchsiaResourceDialect,
22409 >::encode(
22410 (<fidl::encoding::Endpoint<
22411 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22412 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22413 &mut self.iterator
22414 ),),
22415 encoder,
22416 offset,
22417 _depth,
22418 )
22419 }
22420 }
22421 unsafe impl<
22422 T0: fidl::encoding::Encode<
22423 fidl::encoding::Endpoint<
22424 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22425 >,
22426 fidl::encoding::DefaultFuchsiaResourceDialect,
22427 >,
22428 >
22429 fidl::encoding::Encode<
22430 NodeListExtendedAttributesRequest,
22431 fidl::encoding::DefaultFuchsiaResourceDialect,
22432 > for (T0,)
22433 {
22434 #[inline]
22435 unsafe fn encode(
22436 self,
22437 encoder: &mut fidl::encoding::Encoder<
22438 '_,
22439 fidl::encoding::DefaultFuchsiaResourceDialect,
22440 >,
22441 offset: usize,
22442 depth: fidl::encoding::Depth,
22443 ) -> fidl::Result<()> {
22444 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22445 self.0.encode(encoder, offset + 0, depth)?;
22449 Ok(())
22450 }
22451 }
22452
22453 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22454 for NodeListExtendedAttributesRequest
22455 {
22456 #[inline(always)]
22457 fn new_empty() -> Self {
22458 Self {
22459 iterator: fidl::new_empty!(
22460 fidl::encoding::Endpoint<
22461 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22462 >,
22463 fidl::encoding::DefaultFuchsiaResourceDialect
22464 ),
22465 }
22466 }
22467
22468 #[inline]
22469 unsafe fn decode(
22470 &mut self,
22471 decoder: &mut fidl::encoding::Decoder<
22472 '_,
22473 fidl::encoding::DefaultFuchsiaResourceDialect,
22474 >,
22475 offset: usize,
22476 _depth: fidl::encoding::Depth,
22477 ) -> fidl::Result<()> {
22478 decoder.debug_check_bounds::<Self>(offset);
22479 fidl::decode!(
22481 fidl::encoding::Endpoint<
22482 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22483 >,
22484 fidl::encoding::DefaultFuchsiaResourceDialect,
22485 &mut self.iterator,
22486 decoder,
22487 offset + 0,
22488 _depth
22489 )?;
22490 Ok(())
22491 }
22492 }
22493
22494 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
22495 type Borrowed<'a> = &'a mut Self;
22496 fn take_or_borrow<'a>(
22497 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22498 ) -> Self::Borrowed<'a> {
22499 value
22500 }
22501 }
22502
22503 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
22504 type Owned = Self;
22505
22506 #[inline(always)]
22507 fn inline_align(_context: fidl::encoding::Context) -> usize {
22508 8
22509 }
22510
22511 #[inline(always)]
22512 fn inline_size(_context: fidl::encoding::Context) -> usize {
22513 24
22514 }
22515 }
22516
22517 unsafe impl
22518 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22519 for &mut NodeOnOpenRequest
22520 {
22521 #[inline]
22522 unsafe fn encode(
22523 self,
22524 encoder: &mut fidl::encoding::Encoder<
22525 '_,
22526 fidl::encoding::DefaultFuchsiaResourceDialect,
22527 >,
22528 offset: usize,
22529 _depth: fidl::encoding::Depth,
22530 ) -> fidl::Result<()> {
22531 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22532 fidl::encoding::Encode::<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22534 (
22535 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
22536 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
22537 ),
22538 encoder, offset, _depth
22539 )
22540 }
22541 }
22542 unsafe impl<
22543 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
22544 T1: fidl::encoding::Encode<
22545 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22546 fidl::encoding::DefaultFuchsiaResourceDialect,
22547 >,
22548 >
22549 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22550 for (T0, T1)
22551 {
22552 #[inline]
22553 unsafe fn encode(
22554 self,
22555 encoder: &mut fidl::encoding::Encoder<
22556 '_,
22557 fidl::encoding::DefaultFuchsiaResourceDialect,
22558 >,
22559 offset: usize,
22560 depth: fidl::encoding::Depth,
22561 ) -> fidl::Result<()> {
22562 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22563 unsafe {
22566 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22567 (ptr as *mut u64).write_unaligned(0);
22568 }
22569 self.0.encode(encoder, offset + 0, depth)?;
22571 self.1.encode(encoder, offset + 8, depth)?;
22572 Ok(())
22573 }
22574 }
22575
22576 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22577 for NodeOnOpenRequest
22578 {
22579 #[inline(always)]
22580 fn new_empty() -> Self {
22581 Self {
22582 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
22583 info: fidl::new_empty!(
22584 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22585 fidl::encoding::DefaultFuchsiaResourceDialect
22586 ),
22587 }
22588 }
22589
22590 #[inline]
22591 unsafe fn decode(
22592 &mut self,
22593 decoder: &mut fidl::encoding::Decoder<
22594 '_,
22595 fidl::encoding::DefaultFuchsiaResourceDialect,
22596 >,
22597 offset: usize,
22598 _depth: fidl::encoding::Depth,
22599 ) -> fidl::Result<()> {
22600 decoder.debug_check_bounds::<Self>(offset);
22601 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22603 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22604 let mask = 0xffffffff00000000u64;
22605 let maskedval = padval & mask;
22606 if maskedval != 0 {
22607 return Err(fidl::Error::NonZeroPadding {
22608 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22609 });
22610 }
22611 fidl::decode!(
22612 i32,
22613 fidl::encoding::DefaultFuchsiaResourceDialect,
22614 &mut self.s,
22615 decoder,
22616 offset + 0,
22617 _depth
22618 )?;
22619 fidl::decode!(
22620 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22621 fidl::encoding::DefaultFuchsiaResourceDialect,
22622 &mut self.info,
22623 decoder,
22624 offset + 8,
22625 _depth
22626 )?;
22627 Ok(())
22628 }
22629 }
22630
22631 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
22632 type Borrowed<'a> = &'a mut Self;
22633 fn take_or_borrow<'a>(
22634 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22635 ) -> Self::Borrowed<'a> {
22636 value
22637 }
22638 }
22639
22640 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
22641 type Owned = Self;
22642
22643 #[inline(always)]
22644 fn inline_align(_context: fidl::encoding::Context) -> usize {
22645 8
22646 }
22647
22648 #[inline(always)]
22649 fn inline_size(_context: fidl::encoding::Context) -> usize {
22650 40
22651 }
22652 }
22653
22654 unsafe impl
22655 fidl::encoding::Encode<
22656 NodeSetExtendedAttributeRequest,
22657 fidl::encoding::DefaultFuchsiaResourceDialect,
22658 > for &mut NodeSetExtendedAttributeRequest
22659 {
22660 #[inline]
22661 unsafe fn encode(
22662 self,
22663 encoder: &mut fidl::encoding::Encoder<
22664 '_,
22665 fidl::encoding::DefaultFuchsiaResourceDialect,
22666 >,
22667 offset: usize,
22668 _depth: fidl::encoding::Depth,
22669 ) -> fidl::Result<()> {
22670 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22671 fidl::encoding::Encode::<
22673 NodeSetExtendedAttributeRequest,
22674 fidl::encoding::DefaultFuchsiaResourceDialect,
22675 >::encode(
22676 (
22677 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
22678 &self.name,
22679 ),
22680 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22681 &mut self.value,
22682 ),
22683 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
22684 &self.mode,
22685 ),
22686 ),
22687 encoder,
22688 offset,
22689 _depth,
22690 )
22691 }
22692 }
22693 unsafe impl<
22694 T0: fidl::encoding::Encode<
22695 fidl::encoding::Vector<u8, 255>,
22696 fidl::encoding::DefaultFuchsiaResourceDialect,
22697 >,
22698 T1: fidl::encoding::Encode<
22699 ExtendedAttributeValue,
22700 fidl::encoding::DefaultFuchsiaResourceDialect,
22701 >,
22702 T2: fidl::encoding::Encode<
22703 SetExtendedAttributeMode,
22704 fidl::encoding::DefaultFuchsiaResourceDialect,
22705 >,
22706 >
22707 fidl::encoding::Encode<
22708 NodeSetExtendedAttributeRequest,
22709 fidl::encoding::DefaultFuchsiaResourceDialect,
22710 > for (T0, T1, T2)
22711 {
22712 #[inline]
22713 unsafe fn encode(
22714 self,
22715 encoder: &mut fidl::encoding::Encoder<
22716 '_,
22717 fidl::encoding::DefaultFuchsiaResourceDialect,
22718 >,
22719 offset: usize,
22720 depth: fidl::encoding::Depth,
22721 ) -> fidl::Result<()> {
22722 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22723 unsafe {
22726 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
22727 (ptr as *mut u64).write_unaligned(0);
22728 }
22729 self.0.encode(encoder, offset + 0, depth)?;
22731 self.1.encode(encoder, offset + 16, depth)?;
22732 self.2.encode(encoder, offset + 32, depth)?;
22733 Ok(())
22734 }
22735 }
22736
22737 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22738 for NodeSetExtendedAttributeRequest
22739 {
22740 #[inline(always)]
22741 fn new_empty() -> Self {
22742 Self {
22743 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect),
22744 value: fidl::new_empty!(
22745 ExtendedAttributeValue,
22746 fidl::encoding::DefaultFuchsiaResourceDialect
22747 ),
22748 mode: fidl::new_empty!(
22749 SetExtendedAttributeMode,
22750 fidl::encoding::DefaultFuchsiaResourceDialect
22751 ),
22752 }
22753 }
22754
22755 #[inline]
22756 unsafe fn decode(
22757 &mut self,
22758 decoder: &mut fidl::encoding::Decoder<
22759 '_,
22760 fidl::encoding::DefaultFuchsiaResourceDialect,
22761 >,
22762 offset: usize,
22763 _depth: fidl::encoding::Depth,
22764 ) -> fidl::Result<()> {
22765 decoder.debug_check_bounds::<Self>(offset);
22766 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
22768 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22769 let mask = 0xffffffff00000000u64;
22770 let maskedval = padval & mask;
22771 if maskedval != 0 {
22772 return Err(fidl::Error::NonZeroPadding {
22773 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
22774 });
22775 }
22776 fidl::decode!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
22777 fidl::decode!(
22778 ExtendedAttributeValue,
22779 fidl::encoding::DefaultFuchsiaResourceDialect,
22780 &mut self.value,
22781 decoder,
22782 offset + 16,
22783 _depth
22784 )?;
22785 fidl::decode!(
22786 SetExtendedAttributeMode,
22787 fidl::encoding::DefaultFuchsiaResourceDialect,
22788 &mut self.mode,
22789 decoder,
22790 offset + 32,
22791 _depth
22792 )?;
22793 Ok(())
22794 }
22795 }
22796
22797 impl ConnectionInfo {
22798 #[inline(always)]
22799 fn max_ordinal_present(&self) -> u64 {
22800 if let Some(_) = self.rights {
22801 return 1;
22802 }
22803 0
22804 }
22805 }
22806
22807 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
22808 type Borrowed<'a> = &'a mut Self;
22809 fn take_or_borrow<'a>(
22810 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22811 ) -> Self::Borrowed<'a> {
22812 value
22813 }
22814 }
22815
22816 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
22817 type Owned = Self;
22818
22819 #[inline(always)]
22820 fn inline_align(_context: fidl::encoding::Context) -> usize {
22821 8
22822 }
22823
22824 #[inline(always)]
22825 fn inline_size(_context: fidl::encoding::Context) -> usize {
22826 16
22827 }
22828 }
22829
22830 unsafe impl
22831 fidl::encoding::Encode<ConnectionInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
22832 for &mut ConnectionInfo
22833 {
22834 unsafe fn encode(
22835 self,
22836 encoder: &mut fidl::encoding::Encoder<
22837 '_,
22838 fidl::encoding::DefaultFuchsiaResourceDialect,
22839 >,
22840 offset: usize,
22841 mut depth: fidl::encoding::Depth,
22842 ) -> fidl::Result<()> {
22843 encoder.debug_check_bounds::<ConnectionInfo>(offset);
22844 let max_ordinal: u64 = self.max_ordinal_present();
22846 encoder.write_num(max_ordinal, offset);
22847 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
22848 if max_ordinal == 0 {
22850 return Ok(());
22851 }
22852 depth.increment()?;
22853 let envelope_size = 8;
22854 let bytes_len = max_ordinal as usize * envelope_size;
22855 #[allow(unused_variables)]
22856 let offset = encoder.out_of_line_offset(bytes_len);
22857 let mut _prev_end_offset: usize = 0;
22858 if 1 > max_ordinal {
22859 return Ok(());
22860 }
22861
22862 let cur_offset: usize = (1 - 1) * envelope_size;
22865
22866 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
22868
22869 fidl::encoding::encode_in_envelope_optional::<
22874 Operations,
22875 fidl::encoding::DefaultFuchsiaResourceDialect,
22876 >(
22877 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
22878 encoder,
22879 offset + cur_offset,
22880 depth,
22881 )?;
22882
22883 _prev_end_offset = cur_offset + envelope_size;
22884
22885 Ok(())
22886 }
22887 }
22888
22889 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22890 for ConnectionInfo
22891 {
22892 #[inline(always)]
22893 fn new_empty() -> Self {
22894 Self::default()
22895 }
22896
22897 unsafe fn decode(
22898 &mut self,
22899 decoder: &mut fidl::encoding::Decoder<
22900 '_,
22901 fidl::encoding::DefaultFuchsiaResourceDialect,
22902 >,
22903 offset: usize,
22904 mut depth: fidl::encoding::Depth,
22905 ) -> fidl::Result<()> {
22906 decoder.debug_check_bounds::<Self>(offset);
22907 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
22908 None => return Err(fidl::Error::NotNullable),
22909 Some(len) => len,
22910 };
22911 if len == 0 {
22913 return Ok(());
22914 };
22915 depth.increment()?;
22916 let envelope_size = 8;
22917 let bytes_len = len * envelope_size;
22918 let offset = decoder.out_of_line_offset(bytes_len)?;
22919 let mut _next_ordinal_to_read = 0;
22921 let mut next_offset = offset;
22922 let end_offset = offset + bytes_len;
22923 _next_ordinal_to_read += 1;
22924 if next_offset >= end_offset {
22925 return Ok(());
22926 }
22927
22928 while _next_ordinal_to_read < 1 {
22930 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
22931 _next_ordinal_to_read += 1;
22932 next_offset += envelope_size;
22933 }
22934
22935 let next_out_of_line = decoder.next_out_of_line();
22936 let handles_before = decoder.remaining_handles();
22937 if let Some((inlined, num_bytes, num_handles)) =
22938 fidl::encoding::decode_envelope_header(decoder, next_offset)?
22939 {
22940 let member_inline_size =
22941 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
22942 if inlined != (member_inline_size <= 4) {
22943 return Err(fidl::Error::InvalidInlineBitInEnvelope);
22944 }
22945 let inner_offset;
22946 let mut inner_depth = depth.clone();
22947 if inlined {
22948 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
22949 inner_offset = next_offset;
22950 } else {
22951 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
22952 inner_depth.increment()?;
22953 }
22954 let val_ref = self.rights.get_or_insert_with(|| {
22955 fidl::new_empty!(Operations, fidl::encoding::DefaultFuchsiaResourceDialect)
22956 });
22957 fidl::decode!(
22958 Operations,
22959 fidl::encoding::DefaultFuchsiaResourceDialect,
22960 val_ref,
22961 decoder,
22962 inner_offset,
22963 inner_depth
22964 )?;
22965 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
22966 {
22967 return Err(fidl::Error::InvalidNumBytesInEnvelope);
22968 }
22969 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
22970 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
22971 }
22972 }
22973
22974 next_offset += envelope_size;
22975
22976 while next_offset < end_offset {
22978 _next_ordinal_to_read += 1;
22979 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
22980 next_offset += envelope_size;
22981 }
22982
22983 Ok(())
22984 }
22985 }
22986
22987 impl FileInfo {
22988 #[inline(always)]
22989 fn max_ordinal_present(&self) -> u64 {
22990 if let Some(_) = self.attributes {
22991 return 4;
22992 }
22993 if let Some(_) = self.stream {
22994 return 3;
22995 }
22996 if let Some(_) = self.observer {
22997 return 2;
22998 }
22999 if let Some(_) = self.is_append {
23000 return 1;
23001 }
23002 0
23003 }
23004 }
23005
23006 impl fidl::encoding::ResourceTypeMarker for FileInfo {
23007 type Borrowed<'a> = &'a mut Self;
23008 fn take_or_borrow<'a>(
23009 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23010 ) -> Self::Borrowed<'a> {
23011 value
23012 }
23013 }
23014
23015 unsafe impl fidl::encoding::TypeMarker for FileInfo {
23016 type Owned = Self;
23017
23018 #[inline(always)]
23019 fn inline_align(_context: fidl::encoding::Context) -> usize {
23020 8
23021 }
23022
23023 #[inline(always)]
23024 fn inline_size(_context: fidl::encoding::Context) -> usize {
23025 16
23026 }
23027 }
23028
23029 unsafe impl fidl::encoding::Encode<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23030 for &mut FileInfo
23031 {
23032 unsafe fn encode(
23033 self,
23034 encoder: &mut fidl::encoding::Encoder<
23035 '_,
23036 fidl::encoding::DefaultFuchsiaResourceDialect,
23037 >,
23038 offset: usize,
23039 mut depth: fidl::encoding::Depth,
23040 ) -> fidl::Result<()> {
23041 encoder.debug_check_bounds::<FileInfo>(offset);
23042 let max_ordinal: u64 = self.max_ordinal_present();
23044 encoder.write_num(max_ordinal, offset);
23045 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23046 if max_ordinal == 0 {
23048 return Ok(());
23049 }
23050 depth.increment()?;
23051 let envelope_size = 8;
23052 let bytes_len = max_ordinal as usize * envelope_size;
23053 #[allow(unused_variables)]
23054 let offset = encoder.out_of_line_offset(bytes_len);
23055 let mut _prev_end_offset: usize = 0;
23056 if 1 > max_ordinal {
23057 return Ok(());
23058 }
23059
23060 let cur_offset: usize = (1 - 1) * envelope_size;
23063
23064 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23066
23067 fidl::encoding::encode_in_envelope_optional::<
23072 bool,
23073 fidl::encoding::DefaultFuchsiaResourceDialect,
23074 >(
23075 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
23076 encoder,
23077 offset + cur_offset,
23078 depth,
23079 )?;
23080
23081 _prev_end_offset = cur_offset + envelope_size;
23082 if 2 > max_ordinal {
23083 return Ok(());
23084 }
23085
23086 let cur_offset: usize = (2 - 1) * envelope_size;
23089
23090 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23092
23093 fidl::encoding::encode_in_envelope_optional::<
23098 fidl::encoding::HandleType<
23099 fidl::Event,
23100 { fidl::ObjectType::EVENT.into_raw() },
23101 2147483648,
23102 >,
23103 fidl::encoding::DefaultFuchsiaResourceDialect,
23104 >(
23105 self.observer.as_mut().map(
23106 <fidl::encoding::HandleType<
23107 fidl::Event,
23108 { fidl::ObjectType::EVENT.into_raw() },
23109 2147483648,
23110 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23111 ),
23112 encoder,
23113 offset + cur_offset,
23114 depth,
23115 )?;
23116
23117 _prev_end_offset = cur_offset + envelope_size;
23118 if 3 > max_ordinal {
23119 return Ok(());
23120 }
23121
23122 let cur_offset: usize = (3 - 1) * envelope_size;
23125
23126 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23128
23129 fidl::encoding::encode_in_envelope_optional::<
23134 fidl::encoding::HandleType<
23135 fidl::Stream,
23136 { fidl::ObjectType::STREAM.into_raw() },
23137 2147483648,
23138 >,
23139 fidl::encoding::DefaultFuchsiaResourceDialect,
23140 >(
23141 self.stream.as_mut().map(
23142 <fidl::encoding::HandleType<
23143 fidl::Stream,
23144 { fidl::ObjectType::STREAM.into_raw() },
23145 2147483648,
23146 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23147 ),
23148 encoder,
23149 offset + cur_offset,
23150 depth,
23151 )?;
23152
23153 _prev_end_offset = cur_offset + envelope_size;
23154 if 4 > max_ordinal {
23155 return Ok(());
23156 }
23157
23158 let cur_offset: usize = (4 - 1) * envelope_size;
23161
23162 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23164
23165 fidl::encoding::encode_in_envelope_optional::<
23170 NodeAttributes2,
23171 fidl::encoding::DefaultFuchsiaResourceDialect,
23172 >(
23173 self.attributes
23174 .as_ref()
23175 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
23176 encoder,
23177 offset + cur_offset,
23178 depth,
23179 )?;
23180
23181 _prev_end_offset = cur_offset + envelope_size;
23182
23183 Ok(())
23184 }
23185 }
23186
23187 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {
23188 #[inline(always)]
23189 fn new_empty() -> Self {
23190 Self::default()
23191 }
23192
23193 unsafe fn decode(
23194 &mut self,
23195 decoder: &mut fidl::encoding::Decoder<
23196 '_,
23197 fidl::encoding::DefaultFuchsiaResourceDialect,
23198 >,
23199 offset: usize,
23200 mut depth: fidl::encoding::Depth,
23201 ) -> fidl::Result<()> {
23202 decoder.debug_check_bounds::<Self>(offset);
23203 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23204 None => return Err(fidl::Error::NotNullable),
23205 Some(len) => len,
23206 };
23207 if len == 0 {
23209 return Ok(());
23210 };
23211 depth.increment()?;
23212 let envelope_size = 8;
23213 let bytes_len = len * envelope_size;
23214 let offset = decoder.out_of_line_offset(bytes_len)?;
23215 let mut _next_ordinal_to_read = 0;
23217 let mut next_offset = offset;
23218 let end_offset = offset + bytes_len;
23219 _next_ordinal_to_read += 1;
23220 if next_offset >= end_offset {
23221 return Ok(());
23222 }
23223
23224 while _next_ordinal_to_read < 1 {
23226 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23227 _next_ordinal_to_read += 1;
23228 next_offset += envelope_size;
23229 }
23230
23231 let next_out_of_line = decoder.next_out_of_line();
23232 let handles_before = decoder.remaining_handles();
23233 if let Some((inlined, num_bytes, num_handles)) =
23234 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23235 {
23236 let member_inline_size =
23237 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23238 if inlined != (member_inline_size <= 4) {
23239 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23240 }
23241 let inner_offset;
23242 let mut inner_depth = depth.clone();
23243 if inlined {
23244 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23245 inner_offset = next_offset;
23246 } else {
23247 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23248 inner_depth.increment()?;
23249 }
23250 let val_ref = self.is_append.get_or_insert_with(|| {
23251 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
23252 });
23253 fidl::decode!(
23254 bool,
23255 fidl::encoding::DefaultFuchsiaResourceDialect,
23256 val_ref,
23257 decoder,
23258 inner_offset,
23259 inner_depth
23260 )?;
23261 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23262 {
23263 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23264 }
23265 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23266 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23267 }
23268 }
23269
23270 next_offset += envelope_size;
23271 _next_ordinal_to_read += 1;
23272 if next_offset >= end_offset {
23273 return Ok(());
23274 }
23275
23276 while _next_ordinal_to_read < 2 {
23278 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23279 _next_ordinal_to_read += 1;
23280 next_offset += envelope_size;
23281 }
23282
23283 let next_out_of_line = decoder.next_out_of_line();
23284 let handles_before = decoder.remaining_handles();
23285 if let Some((inlined, num_bytes, num_handles)) =
23286 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23287 {
23288 let member_inline_size = <fidl::encoding::HandleType<
23289 fidl::Event,
23290 { fidl::ObjectType::EVENT.into_raw() },
23291 2147483648,
23292 > as fidl::encoding::TypeMarker>::inline_size(
23293 decoder.context
23294 );
23295 if inlined != (member_inline_size <= 4) {
23296 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23297 }
23298 let inner_offset;
23299 let mut inner_depth = depth.clone();
23300 if inlined {
23301 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23302 inner_offset = next_offset;
23303 } else {
23304 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23305 inner_depth.increment()?;
23306 }
23307 let val_ref =
23308 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23309 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23310 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23311 {
23312 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23313 }
23314 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23315 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23316 }
23317 }
23318
23319 next_offset += envelope_size;
23320 _next_ordinal_to_read += 1;
23321 if next_offset >= end_offset {
23322 return Ok(());
23323 }
23324
23325 while _next_ordinal_to_read < 3 {
23327 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23328 _next_ordinal_to_read += 1;
23329 next_offset += envelope_size;
23330 }
23331
23332 let next_out_of_line = decoder.next_out_of_line();
23333 let handles_before = decoder.remaining_handles();
23334 if let Some((inlined, num_bytes, num_handles)) =
23335 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23336 {
23337 let member_inline_size = <fidl::encoding::HandleType<
23338 fidl::Stream,
23339 { fidl::ObjectType::STREAM.into_raw() },
23340 2147483648,
23341 > as fidl::encoding::TypeMarker>::inline_size(
23342 decoder.context
23343 );
23344 if inlined != (member_inline_size <= 4) {
23345 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23346 }
23347 let inner_offset;
23348 let mut inner_depth = depth.clone();
23349 if inlined {
23350 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23351 inner_offset = next_offset;
23352 } else {
23353 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23354 inner_depth.increment()?;
23355 }
23356 let val_ref =
23357 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23358 fidl::decode!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23359 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23360 {
23361 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23362 }
23363 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23364 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23365 }
23366 }
23367
23368 next_offset += envelope_size;
23369 _next_ordinal_to_read += 1;
23370 if next_offset >= end_offset {
23371 return Ok(());
23372 }
23373
23374 while _next_ordinal_to_read < 4 {
23376 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23377 _next_ordinal_to_read += 1;
23378 next_offset += envelope_size;
23379 }
23380
23381 let next_out_of_line = decoder.next_out_of_line();
23382 let handles_before = decoder.remaining_handles();
23383 if let Some((inlined, num_bytes, num_handles)) =
23384 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23385 {
23386 let member_inline_size =
23387 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23388 if inlined != (member_inline_size <= 4) {
23389 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23390 }
23391 let inner_offset;
23392 let mut inner_depth = depth.clone();
23393 if inlined {
23394 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23395 inner_offset = next_offset;
23396 } else {
23397 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23398 inner_depth.increment()?;
23399 }
23400 let val_ref = self.attributes.get_or_insert_with(|| {
23401 fidl::new_empty!(NodeAttributes2, fidl::encoding::DefaultFuchsiaResourceDialect)
23402 });
23403 fidl::decode!(
23404 NodeAttributes2,
23405 fidl::encoding::DefaultFuchsiaResourceDialect,
23406 val_ref,
23407 decoder,
23408 inner_offset,
23409 inner_depth
23410 )?;
23411 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23412 {
23413 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23414 }
23415 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23416 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23417 }
23418 }
23419
23420 next_offset += envelope_size;
23421
23422 while next_offset < end_offset {
23424 _next_ordinal_to_read += 1;
23425 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23426 next_offset += envelope_size;
23427 }
23428
23429 Ok(())
23430 }
23431 }
23432
23433 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
23434 type Borrowed<'a> = &'a mut Self;
23435 fn take_or_borrow<'a>(
23436 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23437 ) -> Self::Borrowed<'a> {
23438 value
23439 }
23440 }
23441
23442 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
23443 type Owned = Self;
23444
23445 #[inline(always)]
23446 fn inline_align(_context: fidl::encoding::Context) -> usize {
23447 8
23448 }
23449
23450 #[inline(always)]
23451 fn inline_size(_context: fidl::encoding::Context) -> usize {
23452 16
23453 }
23454 }
23455
23456 unsafe impl
23457 fidl::encoding::Encode<
23458 ExtendedAttributeValue,
23459 fidl::encoding::DefaultFuchsiaResourceDialect,
23460 > for &mut ExtendedAttributeValue
23461 {
23462 #[inline]
23463 unsafe fn encode(
23464 self,
23465 encoder: &mut fidl::encoding::Encoder<
23466 '_,
23467 fidl::encoding::DefaultFuchsiaResourceDialect,
23468 >,
23469 offset: usize,
23470 _depth: fidl::encoding::Depth,
23471 ) -> fidl::Result<()> {
23472 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
23473 encoder.write_num::<u64>(self.ordinal(), offset);
23474 match self {
23475 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
23476 fidl::encoding::Vector<u8, 32768>,
23477 fidl::encoding::DefaultFuchsiaResourceDialect,
23478 >(
23479 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
23480 val,
23481 ),
23482 encoder,
23483 offset + 8,
23484 _depth,
23485 ),
23486 ExtendedAttributeValue::Buffer(ref mut val) => {
23487 fidl::encoding::encode_in_envelope::<
23488 fidl::encoding::HandleType<
23489 fidl::Vmo,
23490 { fidl::ObjectType::VMO.into_raw() },
23491 2147483648,
23492 >,
23493 fidl::encoding::DefaultFuchsiaResourceDialect,
23494 >(
23495 <fidl::encoding::HandleType<
23496 fidl::Vmo,
23497 { fidl::ObjectType::VMO.into_raw() },
23498 2147483648,
23499 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23500 val
23501 ),
23502 encoder,
23503 offset + 8,
23504 _depth,
23505 )
23506 }
23507 ExtendedAttributeValue::__SourceBreaking { .. } => {
23508 Err(fidl::Error::UnknownUnionTag)
23509 }
23510 }
23511 }
23512 }
23513
23514 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23515 for ExtendedAttributeValue
23516 {
23517 #[inline(always)]
23518 fn new_empty() -> Self {
23519 Self::__SourceBreaking { unknown_ordinal: 0 }
23520 }
23521
23522 #[inline]
23523 unsafe fn decode(
23524 &mut self,
23525 decoder: &mut fidl::encoding::Decoder<
23526 '_,
23527 fidl::encoding::DefaultFuchsiaResourceDialect,
23528 >,
23529 offset: usize,
23530 mut depth: fidl::encoding::Depth,
23531 ) -> fidl::Result<()> {
23532 decoder.debug_check_bounds::<Self>(offset);
23533 #[allow(unused_variables)]
23534 let next_out_of_line = decoder.next_out_of_line();
23535 let handles_before = decoder.remaining_handles();
23536 let (ordinal, inlined, num_bytes, num_handles) =
23537 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23538
23539 let member_inline_size = match ordinal {
23540 1 => {
23541 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
23542 decoder.context,
23543 )
23544 }
23545 2 => <fidl::encoding::HandleType<
23546 fidl::Vmo,
23547 { fidl::ObjectType::VMO.into_raw() },
23548 2147483648,
23549 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23550 0 => return Err(fidl::Error::UnknownUnionTag),
23551 _ => num_bytes as usize,
23552 };
23553
23554 if inlined != (member_inline_size <= 4) {
23555 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23556 }
23557 let _inner_offset;
23558 if inlined {
23559 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23560 _inner_offset = offset + 8;
23561 } else {
23562 depth.increment()?;
23563 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23564 }
23565 match ordinal {
23566 1 => {
23567 #[allow(irrefutable_let_patterns)]
23568 if let ExtendedAttributeValue::Bytes(_) = self {
23569 } else {
23571 *self = ExtendedAttributeValue::Bytes(
23573 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect),
23574 );
23575 }
23576 #[allow(irrefutable_let_patterns)]
23577 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
23578 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23579 } else {
23580 unreachable!()
23581 }
23582 }
23583 2 => {
23584 #[allow(irrefutable_let_patterns)]
23585 if let ExtendedAttributeValue::Buffer(_) = self {
23586 } else {
23588 *self = ExtendedAttributeValue::Buffer(
23590 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23591 );
23592 }
23593 #[allow(irrefutable_let_patterns)]
23594 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
23595 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23596 } else {
23597 unreachable!()
23598 }
23599 }
23600 #[allow(deprecated)]
23601 ordinal => {
23602 for _ in 0..num_handles {
23603 decoder.drop_next_handle()?;
23604 }
23605 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
23606 }
23607 }
23608 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23609 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23610 }
23611 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23612 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23613 }
23614 Ok(())
23615 }
23616 }
23617
23618 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
23619 type Borrowed<'a> = &'a mut Self;
23620 fn take_or_borrow<'a>(
23621 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23622 ) -> Self::Borrowed<'a> {
23623 value
23624 }
23625 }
23626
23627 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
23628 type Owned = Self;
23629
23630 #[inline(always)]
23631 fn inline_align(_context: fidl::encoding::Context) -> usize {
23632 8
23633 }
23634
23635 #[inline(always)]
23636 fn inline_size(_context: fidl::encoding::Context) -> usize {
23637 16
23638 }
23639 }
23640
23641 unsafe impl
23642 fidl::encoding::Encode<NodeInfoDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>
23643 for &mut NodeInfoDeprecated
23644 {
23645 #[inline]
23646 unsafe fn encode(
23647 self,
23648 encoder: &mut fidl::encoding::Encoder<
23649 '_,
23650 fidl::encoding::DefaultFuchsiaResourceDialect,
23651 >,
23652 offset: usize,
23653 _depth: fidl::encoding::Depth,
23654 ) -> fidl::Result<()> {
23655 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
23656 encoder.write_num::<u64>(self.ordinal(), offset);
23657 match self {
23658 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
23659 Service,
23660 fidl::encoding::DefaultFuchsiaResourceDialect,
23661 >(
23662 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
23663 encoder,
23664 offset + 8,
23665 _depth,
23666 ),
23667 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
23668 FileObject,
23669 fidl::encoding::DefaultFuchsiaResourceDialect,
23670 >(
23671 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
23672 encoder,
23673 offset + 8,
23674 _depth,
23675 ),
23676 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23677 DirectoryObject,
23678 fidl::encoding::DefaultFuchsiaResourceDialect,
23679 >(
23680 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23681 encoder,
23682 offset + 8,
23683 _depth,
23684 ),
23685 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
23686 SymlinkObject,
23687 fidl::encoding::DefaultFuchsiaResourceDialect,
23688 >(
23689 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23690 encoder,
23691 offset + 8,
23692 _depth,
23693 ),
23694 }
23695 }
23696 }
23697
23698 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23699 for NodeInfoDeprecated
23700 {
23701 #[inline(always)]
23702 fn new_empty() -> Self {
23703 Self::Service(fidl::new_empty!(Service, fidl::encoding::DefaultFuchsiaResourceDialect))
23704 }
23705
23706 #[inline]
23707 unsafe fn decode(
23708 &mut self,
23709 decoder: &mut fidl::encoding::Decoder<
23710 '_,
23711 fidl::encoding::DefaultFuchsiaResourceDialect,
23712 >,
23713 offset: usize,
23714 mut depth: fidl::encoding::Depth,
23715 ) -> fidl::Result<()> {
23716 decoder.debug_check_bounds::<Self>(offset);
23717 #[allow(unused_variables)]
23718 let next_out_of_line = decoder.next_out_of_line();
23719 let handles_before = decoder.remaining_handles();
23720 let (ordinal, inlined, num_bytes, num_handles) =
23721 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23722
23723 let member_inline_size = match ordinal {
23724 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23725 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23726 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23727 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23728 _ => return Err(fidl::Error::UnknownUnionTag),
23729 };
23730
23731 if inlined != (member_inline_size <= 4) {
23732 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23733 }
23734 let _inner_offset;
23735 if inlined {
23736 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23737 _inner_offset = offset + 8;
23738 } else {
23739 depth.increment()?;
23740 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23741 }
23742 match ordinal {
23743 1 => {
23744 #[allow(irrefutable_let_patterns)]
23745 if let NodeInfoDeprecated::Service(_) = self {
23746 } else {
23748 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
23750 Service,
23751 fidl::encoding::DefaultFuchsiaResourceDialect
23752 ));
23753 }
23754 #[allow(irrefutable_let_patterns)]
23755 if let NodeInfoDeprecated::Service(ref mut val) = self {
23756 fidl::decode!(
23757 Service,
23758 fidl::encoding::DefaultFuchsiaResourceDialect,
23759 val,
23760 decoder,
23761 _inner_offset,
23762 depth
23763 )?;
23764 } else {
23765 unreachable!()
23766 }
23767 }
23768 2 => {
23769 #[allow(irrefutable_let_patterns)]
23770 if let NodeInfoDeprecated::File(_) = self {
23771 } else {
23773 *self = NodeInfoDeprecated::File(fidl::new_empty!(
23775 FileObject,
23776 fidl::encoding::DefaultFuchsiaResourceDialect
23777 ));
23778 }
23779 #[allow(irrefutable_let_patterns)]
23780 if let NodeInfoDeprecated::File(ref mut val) = self {
23781 fidl::decode!(
23782 FileObject,
23783 fidl::encoding::DefaultFuchsiaResourceDialect,
23784 val,
23785 decoder,
23786 _inner_offset,
23787 depth
23788 )?;
23789 } else {
23790 unreachable!()
23791 }
23792 }
23793 3 => {
23794 #[allow(irrefutable_let_patterns)]
23795 if let NodeInfoDeprecated::Directory(_) = self {
23796 } else {
23798 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
23800 DirectoryObject,
23801 fidl::encoding::DefaultFuchsiaResourceDialect
23802 ));
23803 }
23804 #[allow(irrefutable_let_patterns)]
23805 if let NodeInfoDeprecated::Directory(ref mut val) = self {
23806 fidl::decode!(
23807 DirectoryObject,
23808 fidl::encoding::DefaultFuchsiaResourceDialect,
23809 val,
23810 decoder,
23811 _inner_offset,
23812 depth
23813 )?;
23814 } else {
23815 unreachable!()
23816 }
23817 }
23818 4 => {
23819 #[allow(irrefutable_let_patterns)]
23820 if let NodeInfoDeprecated::Symlink(_) = self {
23821 } else {
23823 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
23825 SymlinkObject,
23826 fidl::encoding::DefaultFuchsiaResourceDialect
23827 ));
23828 }
23829 #[allow(irrefutable_let_patterns)]
23830 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
23831 fidl::decode!(
23832 SymlinkObject,
23833 fidl::encoding::DefaultFuchsiaResourceDialect,
23834 val,
23835 decoder,
23836 _inner_offset,
23837 depth
23838 )?;
23839 } else {
23840 unreachable!()
23841 }
23842 }
23843 ordinal => panic!("unexpected ordinal {:?}", ordinal),
23844 }
23845 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23846 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23847 }
23848 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23849 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23850 }
23851 Ok(())
23852 }
23853 }
23854
23855 impl fidl::encoding::ResourceTypeMarker for Representation {
23856 type Borrowed<'a> = &'a mut Self;
23857 fn take_or_borrow<'a>(
23858 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23859 ) -> Self::Borrowed<'a> {
23860 value
23861 }
23862 }
23863
23864 unsafe impl fidl::encoding::TypeMarker for Representation {
23865 type Owned = Self;
23866
23867 #[inline(always)]
23868 fn inline_align(_context: fidl::encoding::Context) -> usize {
23869 8
23870 }
23871
23872 #[inline(always)]
23873 fn inline_size(_context: fidl::encoding::Context) -> usize {
23874 16
23875 }
23876 }
23877
23878 unsafe impl
23879 fidl::encoding::Encode<Representation, fidl::encoding::DefaultFuchsiaResourceDialect>
23880 for &mut Representation
23881 {
23882 #[inline]
23883 unsafe fn encode(
23884 self,
23885 encoder: &mut fidl::encoding::Encoder<
23886 '_,
23887 fidl::encoding::DefaultFuchsiaResourceDialect,
23888 >,
23889 offset: usize,
23890 _depth: fidl::encoding::Depth,
23891 ) -> fidl::Result<()> {
23892 encoder.debug_check_bounds::<Representation>(offset);
23893 encoder.write_num::<u64>(self.ordinal(), offset);
23894 match self {
23895 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
23896 NodeInfo,
23897 fidl::encoding::DefaultFuchsiaResourceDialect,
23898 >(
23899 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23900 encoder,
23901 offset + 8,
23902 _depth,
23903 ),
23904 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23905 DirectoryInfo,
23906 fidl::encoding::DefaultFuchsiaResourceDialect,
23907 >(
23908 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23909 encoder,
23910 offset + 8,
23911 _depth,
23912 ),
23913 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
23914 FileInfo,
23915 fidl::encoding::DefaultFuchsiaResourceDialect,
23916 >(
23917 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
23918 encoder,
23919 offset + 8,
23920 _depth,
23921 ),
23922 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
23923 SymlinkInfo,
23924 fidl::encoding::DefaultFuchsiaResourceDialect,
23925 >(
23926 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23927 encoder,
23928 offset + 8,
23929 _depth,
23930 ),
23931 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
23932 }
23933 }
23934 }
23935
23936 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23937 for Representation
23938 {
23939 #[inline(always)]
23940 fn new_empty() -> Self {
23941 Self::__SourceBreaking { unknown_ordinal: 0 }
23942 }
23943
23944 #[inline]
23945 unsafe fn decode(
23946 &mut self,
23947 decoder: &mut fidl::encoding::Decoder<
23948 '_,
23949 fidl::encoding::DefaultFuchsiaResourceDialect,
23950 >,
23951 offset: usize,
23952 mut depth: fidl::encoding::Depth,
23953 ) -> fidl::Result<()> {
23954 decoder.debug_check_bounds::<Self>(offset);
23955 #[allow(unused_variables)]
23956 let next_out_of_line = decoder.next_out_of_line();
23957 let handles_before = decoder.remaining_handles();
23958 let (ordinal, inlined, num_bytes, num_handles) =
23959 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23960
23961 let member_inline_size = match ordinal {
23962 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23963 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23964 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23965 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23966 0 => return Err(fidl::Error::UnknownUnionTag),
23967 _ => num_bytes as usize,
23968 };
23969
23970 if inlined != (member_inline_size <= 4) {
23971 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23972 }
23973 let _inner_offset;
23974 if inlined {
23975 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23976 _inner_offset = offset + 8;
23977 } else {
23978 depth.increment()?;
23979 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23980 }
23981 match ordinal {
23982 1 => {
23983 #[allow(irrefutable_let_patterns)]
23984 if let Representation::Node(_) = self {
23985 } else {
23987 *self = Representation::Node(fidl::new_empty!(
23989 NodeInfo,
23990 fidl::encoding::DefaultFuchsiaResourceDialect
23991 ));
23992 }
23993 #[allow(irrefutable_let_patterns)]
23994 if let Representation::Node(ref mut val) = self {
23995 fidl::decode!(
23996 NodeInfo,
23997 fidl::encoding::DefaultFuchsiaResourceDialect,
23998 val,
23999 decoder,
24000 _inner_offset,
24001 depth
24002 )?;
24003 } else {
24004 unreachable!()
24005 }
24006 }
24007 2 => {
24008 #[allow(irrefutable_let_patterns)]
24009 if let Representation::Directory(_) = self {
24010 } else {
24012 *self = Representation::Directory(fidl::new_empty!(
24014 DirectoryInfo,
24015 fidl::encoding::DefaultFuchsiaResourceDialect
24016 ));
24017 }
24018 #[allow(irrefutable_let_patterns)]
24019 if let Representation::Directory(ref mut val) = self {
24020 fidl::decode!(
24021 DirectoryInfo,
24022 fidl::encoding::DefaultFuchsiaResourceDialect,
24023 val,
24024 decoder,
24025 _inner_offset,
24026 depth
24027 )?;
24028 } else {
24029 unreachable!()
24030 }
24031 }
24032 3 => {
24033 #[allow(irrefutable_let_patterns)]
24034 if let Representation::File(_) = self {
24035 } else {
24037 *self = Representation::File(fidl::new_empty!(
24039 FileInfo,
24040 fidl::encoding::DefaultFuchsiaResourceDialect
24041 ));
24042 }
24043 #[allow(irrefutable_let_patterns)]
24044 if let Representation::File(ref mut val) = self {
24045 fidl::decode!(
24046 FileInfo,
24047 fidl::encoding::DefaultFuchsiaResourceDialect,
24048 val,
24049 decoder,
24050 _inner_offset,
24051 depth
24052 )?;
24053 } else {
24054 unreachable!()
24055 }
24056 }
24057 4 => {
24058 #[allow(irrefutable_let_patterns)]
24059 if let Representation::Symlink(_) = self {
24060 } else {
24062 *self = Representation::Symlink(fidl::new_empty!(
24064 SymlinkInfo,
24065 fidl::encoding::DefaultFuchsiaResourceDialect
24066 ));
24067 }
24068 #[allow(irrefutable_let_patterns)]
24069 if let Representation::Symlink(ref mut val) = self {
24070 fidl::decode!(
24071 SymlinkInfo,
24072 fidl::encoding::DefaultFuchsiaResourceDialect,
24073 val,
24074 decoder,
24075 _inner_offset,
24076 depth
24077 )?;
24078 } else {
24079 unreachable!()
24080 }
24081 }
24082 #[allow(deprecated)]
24083 ordinal => {
24084 for _ in 0..num_handles {
24085 decoder.drop_next_handle()?;
24086 }
24087 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
24088 }
24089 }
24090 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24091 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24092 }
24093 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24094 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24095 }
24096 Ok(())
24097 }
24098 }
24099}