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 DirectoryDeprecatedGetTokenResponse {
32 pub s: i32,
33 pub token: Option<fidl::NullableHandle>,
34}
35
36impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
37 for DirectoryDeprecatedGetTokenResponse
38{
39}
40
41#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42pub struct DirectoryDeprecatedOpenRequest {
43 pub flags: OpenFlags,
44 pub mode: ModeType,
45 pub path: String,
46 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
47}
48
49impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
50 for DirectoryDeprecatedOpenRequest
51{
52}
53
54#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
55pub struct DirectoryLinkRequest {
56 pub src: String,
57 pub dst_parent_token: fidl::NullableHandle,
58 pub dst: String,
59}
60
61impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryLinkRequest {}
62
63#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
64pub struct DirectoryRenameRequest {
65 pub src: String,
66 pub dst_parent_token: fidl::Event,
67 pub dst: String,
68}
69
70impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryRenameRequest {}
71
72#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
73pub struct DirectoryWatchRequest {
74 pub mask: WatchMask,
75 pub options: u32,
76 pub watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
77}
78
79impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryWatchRequest {}
80
81#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
82pub struct FileAllocateRequest {
83 pub offset: u64,
84 pub length: u64,
85 pub mode: AllocateMode,
90}
91
92impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileAllocateRequest {}
93
94#[derive(Debug, PartialEq)]
95pub struct FileEnableVerityRequest {
96 pub options: VerificationOptions,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileEnableVerityRequest {}
100
101#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
102pub struct FileObject {
103 pub event: Option<fidl::Event>,
110 pub stream: Option<fidl::Stream>,
114}
115
116impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {}
117
118#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
119pub struct FileGetBackingMemoryResponse {
120 pub vmo: fidl::Vmo,
121}
122
123impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
124 for FileGetBackingMemoryResponse
125{
126}
127
128#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
129pub struct LinkableLinkIntoRequest {
130 pub dst_parent_token: fidl::Event,
131 pub dst: String,
132}
133
134impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LinkableLinkIntoRequest {}
135
136#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137pub struct NodeListExtendedAttributesRequest {
138 pub iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
142 for NodeListExtendedAttributesRequest
143{
144}
145
146#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147pub struct NodeOnOpenRequest {
148 pub s: i32,
149 pub info: Option<Box<NodeInfoDeprecated>>,
150}
151
152impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeOnOpenRequest {}
153
154#[derive(Debug, PartialEq)]
155pub struct NodeSetExtendedAttributeRequest {
156 pub name: Vec<u8>,
157 pub value: ExtendedAttributeValue,
158 pub mode: SetExtendedAttributeMode,
160}
161
162impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
163 for NodeSetExtendedAttributeRequest
164{
165}
166
167#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
168pub struct NodeGetTokenResponse {
169 pub token: fidl::Event,
170}
171
172impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeGetTokenResponse {}
173
174#[derive(Debug, PartialEq)]
175pub struct OpenableOpenRequest {
176 pub path: String,
177 pub flags: Flags,
178 pub options: Options,
179 pub object: fidl::Channel,
180}
181
182impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for OpenableOpenRequest {}
183
184#[derive(Debug, Default, PartialEq)]
185pub struct ConnectionInfo {
186 pub rights: Option<Operations>,
193 #[doc(hidden)]
194 pub __source_breaking: fidl::marker::SourceBreaking,
195}
196
197impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectionInfo {}
198
199#[derive(Debug, Default, PartialEq)]
201pub struct FileInfo {
202 pub is_append: Option<bool>,
206 pub observer: Option<fidl::Event>,
219 pub stream: Option<fidl::Stream>,
226 pub attributes: Option<NodeAttributes2>,
228 #[doc(hidden)]
229 pub __source_breaking: fidl::marker::SourceBreaking,
230}
231
232impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {}
233
234#[derive(Debug)]
238pub enum ExtendedAttributeValue {
239 Bytes(Vec<u8>),
240 Buffer(fidl::Vmo),
241 #[doc(hidden)]
242 __SourceBreaking {
243 unknown_ordinal: u64,
244 },
245}
246
247#[macro_export]
249macro_rules! ExtendedAttributeValueUnknown {
250 () => {
251 _
252 };
253}
254
255impl PartialEq for ExtendedAttributeValue {
257 fn eq(&self, other: &Self) -> bool {
258 match (self, other) {
259 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
260 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
261 _ => false,
262 }
263 }
264}
265
266impl ExtendedAttributeValue {
267 #[inline]
268 pub fn ordinal(&self) -> u64 {
269 match *self {
270 Self::Bytes(_) => 1,
271 Self::Buffer(_) => 2,
272 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
273 }
274 }
275
276 #[inline]
277 pub fn unknown_variant_for_testing() -> Self {
278 Self::__SourceBreaking { unknown_ordinal: 0 }
279 }
280
281 #[inline]
282 pub fn is_unknown(&self) -> bool {
283 match self {
284 Self::__SourceBreaking { .. } => true,
285 _ => false,
286 }
287 }
288}
289
290impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExtendedAttributeValue {}
291
292#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
293pub enum NodeInfoDeprecated {
294 Service(Service),
296 File(FileObject),
298 Directory(DirectoryObject),
300 Symlink(SymlinkObject),
302}
303
304impl NodeInfoDeprecated {
305 #[inline]
306 pub fn ordinal(&self) -> u64 {
307 match *self {
308 Self::Service(_) => 1,
309 Self::File(_) => 2,
310 Self::Directory(_) => 3,
311 Self::Symlink(_) => 4,
312 }
313 }
314}
315
316impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeInfoDeprecated {}
317
318#[derive(Debug)]
319pub enum Representation {
320 Node(NodeInfo),
322 Directory(DirectoryInfo),
324 File(FileInfo),
326 Symlink(SymlinkInfo),
328 #[doc(hidden)]
329 __SourceBreaking { unknown_ordinal: u64 },
330}
331
332#[macro_export]
334macro_rules! RepresentationUnknown {
335 () => {
336 _
337 };
338}
339
340impl PartialEq for Representation {
342 fn eq(&self, other: &Self) -> bool {
343 match (self, other) {
344 (Self::Node(x), Self::Node(y)) => *x == *y,
345 (Self::Directory(x), Self::Directory(y)) => *x == *y,
346 (Self::File(x), Self::File(y)) => *x == *y,
347 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
348 _ => false,
349 }
350 }
351}
352
353impl Representation {
354 #[inline]
355 pub fn ordinal(&self) -> u64 {
356 match *self {
357 Self::Node(_) => 1,
358 Self::Directory(_) => 2,
359 Self::File(_) => 3,
360 Self::Symlink(_) => 4,
361 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
362 }
363 }
364
365 #[inline]
366 pub fn unknown_variant_for_testing() -> Self {
367 Self::__SourceBreaking { unknown_ordinal: 0 }
368 }
369
370 #[inline]
371 pub fn is_unknown(&self) -> bool {
372 match self {
373 Self::__SourceBreaking { .. } => true,
374 _ => false,
375 }
376 }
377}
378
379impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Representation {}
380
381#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
382pub struct AdvisoryLockingMarker;
383
384impl fidl::endpoints::ProtocolMarker for AdvisoryLockingMarker {
385 type Proxy = AdvisoryLockingProxy;
386 type RequestStream = AdvisoryLockingRequestStream;
387 #[cfg(target_os = "fuchsia")]
388 type SynchronousProxy = AdvisoryLockingSynchronousProxy;
389
390 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
391}
392pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
393
394pub trait AdvisoryLockingProxyInterface: Send + Sync {
395 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
396 + Send;
397 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
398}
399#[derive(Debug)]
400#[cfg(target_os = "fuchsia")]
401pub struct AdvisoryLockingSynchronousProxy {
402 client: fidl::client::sync::Client,
403}
404
405#[cfg(target_os = "fuchsia")]
406impl fidl::endpoints::SynchronousProxy for AdvisoryLockingSynchronousProxy {
407 type Proxy = AdvisoryLockingProxy;
408 type Protocol = AdvisoryLockingMarker;
409
410 fn from_channel(inner: fidl::Channel) -> Self {
411 Self::new(inner)
412 }
413
414 fn into_channel(self) -> fidl::Channel {
415 self.client.into_channel()
416 }
417
418 fn as_channel(&self) -> &fidl::Channel {
419 self.client.as_channel()
420 }
421}
422
423#[cfg(target_os = "fuchsia")]
424impl AdvisoryLockingSynchronousProxy {
425 pub fn new(channel: fidl::Channel) -> Self {
426 Self { client: fidl::client::sync::Client::new(channel) }
427 }
428
429 pub fn into_channel(self) -> fidl::Channel {
430 self.client.into_channel()
431 }
432
433 pub fn wait_for_event(
436 &self,
437 deadline: zx::MonotonicInstant,
438 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
439 AdvisoryLockingEvent::decode(self.client.wait_for_event::<AdvisoryLockingMarker>(deadline)?)
440 }
441
442 pub fn r#advisory_lock(
466 &self,
467 mut request: &AdvisoryLockRequest,
468 ___deadline: zx::MonotonicInstant,
469 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
470 let _response = self.client.send_query::<
471 AdvisoryLockingAdvisoryLockRequest,
472 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
473 AdvisoryLockingMarker,
474 >(
475 (request,),
476 0x6ee9c0ad53ec87aa,
477 fidl::encoding::DynamicFlags::empty(),
478 ___deadline,
479 )?;
480 Ok(_response.map(|x| x))
481 }
482}
483
484#[cfg(target_os = "fuchsia")]
485impl From<AdvisoryLockingSynchronousProxy> for zx::NullableHandle {
486 fn from(value: AdvisoryLockingSynchronousProxy) -> Self {
487 value.into_channel().into()
488 }
489}
490
491#[cfg(target_os = "fuchsia")]
492impl From<fidl::Channel> for AdvisoryLockingSynchronousProxy {
493 fn from(value: fidl::Channel) -> Self {
494 Self::new(value)
495 }
496}
497
498#[cfg(target_os = "fuchsia")]
499impl fidl::endpoints::FromClient for AdvisoryLockingSynchronousProxy {
500 type Protocol = AdvisoryLockingMarker;
501
502 fn from_client(value: fidl::endpoints::ClientEnd<AdvisoryLockingMarker>) -> Self {
503 Self::new(value.into_channel())
504 }
505}
506
507#[derive(Debug, Clone)]
508pub struct AdvisoryLockingProxy {
509 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
510}
511
512impl fidl::endpoints::Proxy for AdvisoryLockingProxy {
513 type Protocol = AdvisoryLockingMarker;
514
515 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
516 Self::new(inner)
517 }
518
519 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
520 self.client.into_channel().map_err(|client| Self { client })
521 }
522
523 fn as_channel(&self) -> &::fidl::AsyncChannel {
524 self.client.as_channel()
525 }
526}
527
528impl AdvisoryLockingProxy {
529 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
531 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
532 Self { client: fidl::client::Client::new(channel, protocol_name) }
533 }
534
535 pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
541 AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
542 }
543
544 pub fn r#advisory_lock(
568 &self,
569 mut request: &AdvisoryLockRequest,
570 ) -> fidl::client::QueryResponseFut<
571 AdvisoryLockingAdvisoryLockResult,
572 fidl::encoding::DefaultFuchsiaResourceDialect,
573 > {
574 AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
575 }
576}
577
578impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
579 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
580 AdvisoryLockingAdvisoryLockResult,
581 fidl::encoding::DefaultFuchsiaResourceDialect,
582 >;
583 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
584 fn _decode(
585 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
586 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
587 let _response = fidl::client::decode_transaction_body::<
588 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
589 fidl::encoding::DefaultFuchsiaResourceDialect,
590 0x6ee9c0ad53ec87aa,
591 >(_buf?)?;
592 Ok(_response.map(|x| x))
593 }
594 self.client.send_query_and_decode::<
595 AdvisoryLockingAdvisoryLockRequest,
596 AdvisoryLockingAdvisoryLockResult,
597 >(
598 (request,),
599 0x6ee9c0ad53ec87aa,
600 fidl::encoding::DynamicFlags::empty(),
601 _decode,
602 )
603 }
604}
605
606pub struct AdvisoryLockingEventStream {
607 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
608}
609
610impl std::marker::Unpin for AdvisoryLockingEventStream {}
611
612impl futures::stream::FusedStream for AdvisoryLockingEventStream {
613 fn is_terminated(&self) -> bool {
614 self.event_receiver.is_terminated()
615 }
616}
617
618impl futures::Stream for AdvisoryLockingEventStream {
619 type Item = Result<AdvisoryLockingEvent, fidl::Error>;
620
621 fn poll_next(
622 mut self: std::pin::Pin<&mut Self>,
623 cx: &mut std::task::Context<'_>,
624 ) -> std::task::Poll<Option<Self::Item>> {
625 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
626 &mut self.event_receiver,
627 cx
628 )?) {
629 Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
630 None => std::task::Poll::Ready(None),
631 }
632 }
633}
634
635#[derive(Debug)]
636pub enum AdvisoryLockingEvent {}
637
638impl AdvisoryLockingEvent {
639 fn decode(
641 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
642 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
643 let (bytes, _handles) = buf.split_mut();
644 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
645 debug_assert_eq!(tx_header.tx_id, 0);
646 match tx_header.ordinal {
647 _ => Err(fidl::Error::UnknownOrdinal {
648 ordinal: tx_header.ordinal,
649 protocol_name:
650 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
651 }),
652 }
653 }
654}
655
656pub struct AdvisoryLockingRequestStream {
658 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
659 is_terminated: bool,
660}
661
662impl std::marker::Unpin for AdvisoryLockingRequestStream {}
663
664impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
665 fn is_terminated(&self) -> bool {
666 self.is_terminated
667 }
668}
669
670impl fidl::endpoints::RequestStream for AdvisoryLockingRequestStream {
671 type Protocol = AdvisoryLockingMarker;
672 type ControlHandle = AdvisoryLockingControlHandle;
673
674 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
675 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
676 }
677
678 fn control_handle(&self) -> Self::ControlHandle {
679 AdvisoryLockingControlHandle { inner: self.inner.clone() }
680 }
681
682 fn into_inner(
683 self,
684 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
685 {
686 (self.inner, self.is_terminated)
687 }
688
689 fn from_inner(
690 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
691 is_terminated: bool,
692 ) -> Self {
693 Self { inner, is_terminated }
694 }
695}
696
697impl futures::Stream for AdvisoryLockingRequestStream {
698 type Item = Result<AdvisoryLockingRequest, fidl::Error>;
699
700 fn poll_next(
701 mut self: std::pin::Pin<&mut Self>,
702 cx: &mut std::task::Context<'_>,
703 ) -> std::task::Poll<Option<Self::Item>> {
704 let this = &mut *self;
705 if this.inner.check_shutdown(cx) {
706 this.is_terminated = true;
707 return std::task::Poll::Ready(None);
708 }
709 if this.is_terminated {
710 panic!("polled AdvisoryLockingRequestStream after completion");
711 }
712 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
713 |bytes, handles| {
714 match this.inner.channel().read_etc(cx, bytes, handles) {
715 std::task::Poll::Ready(Ok(())) => {}
716 std::task::Poll::Pending => return std::task::Poll::Pending,
717 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
718 this.is_terminated = true;
719 return std::task::Poll::Ready(None);
720 }
721 std::task::Poll::Ready(Err(e)) => {
722 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
723 e.into(),
724 ))));
725 }
726 }
727
728 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
730
731 std::task::Poll::Ready(Some(match header.ordinal {
732 0x6ee9c0ad53ec87aa => {
733 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
734 let mut req = fidl::new_empty!(
735 AdvisoryLockingAdvisoryLockRequest,
736 fidl::encoding::DefaultFuchsiaResourceDialect
737 );
738 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
739 let control_handle =
740 AdvisoryLockingControlHandle { inner: this.inner.clone() };
741 Ok(AdvisoryLockingRequest::AdvisoryLock {
742 request: req.request,
743
744 responder: AdvisoryLockingAdvisoryLockResponder {
745 control_handle: std::mem::ManuallyDrop::new(control_handle),
746 tx_id: header.tx_id,
747 },
748 })
749 }
750 _ => Err(fidl::Error::UnknownOrdinal {
751 ordinal: header.ordinal,
752 protocol_name:
753 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
754 }),
755 }))
756 },
757 )
758 }
759}
760
761#[derive(Debug)]
774pub enum AdvisoryLockingRequest {
775 AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
799}
800
801impl AdvisoryLockingRequest {
802 #[allow(irrefutable_let_patterns)]
803 pub fn into_advisory_lock(
804 self,
805 ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
806 if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
807 Some((request, responder))
808 } else {
809 None
810 }
811 }
812
813 pub fn method_name(&self) -> &'static str {
815 match *self {
816 AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
817 }
818 }
819}
820
821#[derive(Debug, Clone)]
822pub struct AdvisoryLockingControlHandle {
823 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
824}
825
826impl AdvisoryLockingControlHandle {
827 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
828 self.inner.shutdown_with_epitaph(status.into())
829 }
830}
831
832impl fidl::endpoints::ControlHandle for AdvisoryLockingControlHandle {
833 fn shutdown(&self) {
834 self.inner.shutdown()
835 }
836
837 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
838 self.inner.shutdown_with_epitaph(status)
839 }
840
841 fn is_closed(&self) -> bool {
842 self.inner.channel().is_closed()
843 }
844 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
845 self.inner.channel().on_closed()
846 }
847
848 #[cfg(target_os = "fuchsia")]
849 fn signal_peer(
850 &self,
851 clear_mask: zx::Signals,
852 set_mask: zx::Signals,
853 ) -> Result<(), zx_status::Status> {
854 use fidl::Peered;
855 self.inner.channel().signal_peer(clear_mask, set_mask)
856 }
857}
858
859impl AdvisoryLockingControlHandle {}
860
861#[must_use = "FIDL methods require a response to be sent"]
862#[derive(Debug)]
863pub struct AdvisoryLockingAdvisoryLockResponder {
864 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
865 tx_id: u32,
866}
867
868impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
872 fn drop(&mut self) {
873 self.control_handle.shutdown();
874 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
876 }
877}
878
879impl fidl::endpoints::Responder for AdvisoryLockingAdvisoryLockResponder {
880 type ControlHandle = AdvisoryLockingControlHandle;
881
882 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
883 &self.control_handle
884 }
885
886 fn drop_without_shutdown(mut self) {
887 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
889 std::mem::forget(self);
891 }
892}
893
894impl AdvisoryLockingAdvisoryLockResponder {
895 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
899 let _result = self.send_raw(result);
900 if _result.is_err() {
901 self.control_handle.shutdown();
902 }
903 self.drop_without_shutdown();
904 _result
905 }
906
907 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
909 let _result = self.send_raw(result);
910 self.drop_without_shutdown();
911 _result
912 }
913
914 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
915 self.control_handle
916 .inner
917 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
918 result,
919 self.tx_id,
920 0x6ee9c0ad53ec87aa,
921 fidl::encoding::DynamicFlags::empty(),
922 )
923 }
924}
925
926#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
927pub struct DirectoryMarker;
928
929impl fidl::endpoints::ProtocolMarker for DirectoryMarker {
930 type Proxy = DirectoryProxy;
931 type RequestStream = DirectoryRequestStream;
932 #[cfg(target_os = "fuchsia")]
933 type SynchronousProxy = DirectorySynchronousProxy;
934
935 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
936}
937impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryMarker {}
938pub type DirectoryUnlinkResult = Result<(), i32>;
939pub type DirectoryRenameResult = Result<(), i32>;
940pub type DirectoryCreateSymlinkResult = Result<(), i32>;
941
942pub trait DirectoryProxyInterface: Send + Sync {
943 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
944 + Send;
945 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
946 fn r#clone(
947 &self,
948 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
949 ) -> Result<(), fidl::Error>;
950 type CloseResponseFut: std::future::Future<
951 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
952 > + Send;
953 fn r#close(&self) -> Self::CloseResponseFut;
954 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
955 fn r#query(&self) -> Self::QueryResponseFut;
956 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
957 + Send;
958 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
959 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
960 fn r#deprecated_set_attr(
961 &self,
962 flags: NodeAttributeFlags,
963 attributes: &NodeAttributes,
964 ) -> Self::DeprecatedSetAttrResponseFut;
965 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
966 + Send;
967 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
968 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
969 + Send;
970 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
971 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
972 + Send;
973 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
974 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
975 + Send;
976 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
977 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
978 + Send;
979 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
980 type GetTokenResponseFut: std::future::Future<Output = Result<NodeGetTokenResult, fidl::Error>>
981 + Send;
982 fn r#get_token(&self) -> Self::GetTokenResponseFut;
983 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
984 + Send;
985 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
986 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
987 + Send;
988 fn r#update_attributes(
989 &self,
990 payload: &MutableNodeAttributes,
991 ) -> Self::UpdateAttributesResponseFut;
992 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
993 fn r#sync(&self) -> Self::SyncResponseFut;
994 fn r#list_extended_attributes(
995 &self,
996 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
997 ) -> Result<(), fidl::Error>;
998 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
999 + Send;
1000 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
1001 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
1002 + Send;
1003 fn r#set_extended_attribute(
1004 &self,
1005 name: &[u8],
1006 value: ExtendedAttributeValue,
1007 mode: SetExtendedAttributeMode,
1008 ) -> Self::SetExtendedAttributeResponseFut;
1009 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
1010 + Send;
1011 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
1012 fn r#open(
1013 &self,
1014 path: &str,
1015 flags: Flags,
1016 options: &Options,
1017 object: fidl::Channel,
1018 ) -> Result<(), fidl::Error>;
1019 fn r#deprecated_open(
1020 &self,
1021 flags: OpenFlags,
1022 mode: ModeType,
1023 path: &str,
1024 object: fidl::endpoints::ServerEnd<NodeMarker>,
1025 ) -> Result<(), fidl::Error>;
1026 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
1027 + Send;
1028 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
1029 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1030 fn r#rewind(&self) -> Self::RewindResponseFut;
1031 type DeprecatedGetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fidl::NullableHandle>), fidl::Error>>
1032 + Send;
1033 fn r#deprecated_get_token(&self) -> Self::DeprecatedGetTokenResponseFut;
1034 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1035 fn r#link(
1036 &self,
1037 src: &str,
1038 dst_parent_token: fidl::NullableHandle,
1039 dst: &str,
1040 ) -> Self::LinkResponseFut;
1041 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
1042 + Send;
1043 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
1044 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
1045 + Send;
1046 fn r#rename(
1047 &self,
1048 src: &str,
1049 dst_parent_token: fidl::Event,
1050 dst: &str,
1051 ) -> Self::RenameResponseFut;
1052 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
1053 + Send;
1054 fn r#create_symlink(
1055 &self,
1056 name: &str,
1057 target: &[u8],
1058 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1059 ) -> Self::CreateSymlinkResponseFut;
1060 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1061 fn r#watch(
1062 &self,
1063 mask: WatchMask,
1064 options: u32,
1065 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1066 ) -> Self::WatchResponseFut;
1067}
1068#[derive(Debug)]
1069#[cfg(target_os = "fuchsia")]
1070pub struct DirectorySynchronousProxy {
1071 client: fidl::client::sync::Client,
1072}
1073
1074#[cfg(target_os = "fuchsia")]
1075impl fidl::endpoints::SynchronousProxy for DirectorySynchronousProxy {
1076 type Proxy = DirectoryProxy;
1077 type Protocol = DirectoryMarker;
1078
1079 fn from_channel(inner: fidl::Channel) -> Self {
1080 Self::new(inner)
1081 }
1082
1083 fn into_channel(self) -> fidl::Channel {
1084 self.client.into_channel()
1085 }
1086
1087 fn as_channel(&self) -> &fidl::Channel {
1088 self.client.as_channel()
1089 }
1090}
1091
1092#[cfg(target_os = "fuchsia")]
1093impl DirectorySynchronousProxy {
1094 pub fn new(channel: fidl::Channel) -> Self {
1095 Self { client: fidl::client::sync::Client::new(channel) }
1096 }
1097
1098 pub fn into_channel(self) -> fidl::Channel {
1099 self.client.into_channel()
1100 }
1101
1102 pub fn wait_for_event(
1105 &self,
1106 deadline: zx::MonotonicInstant,
1107 ) -> Result<DirectoryEvent, fidl::Error> {
1108 DirectoryEvent::decode(self.client.wait_for_event::<DirectoryMarker>(deadline)?)
1109 }
1110
1111 pub fn r#advisory_lock(
1135 &self,
1136 mut request: &AdvisoryLockRequest,
1137 ___deadline: zx::MonotonicInstant,
1138 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1139 let _response = self.client.send_query::<
1140 AdvisoryLockingAdvisoryLockRequest,
1141 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1142 DirectoryMarker,
1143 >(
1144 (request,),
1145 0x6ee9c0ad53ec87aa,
1146 fidl::encoding::DynamicFlags::empty(),
1147 ___deadline,
1148 )?;
1149 Ok(_response.map(|x| x))
1150 }
1151
1152 pub fn r#clone(
1153 &self,
1154 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1155 ) -> Result<(), fidl::Error> {
1156 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1157 (request,),
1158 0x20d8a7aba2168a79,
1159 fidl::encoding::DynamicFlags::empty(),
1160 )
1161 }
1162
1163 pub fn r#close(
1174 &self,
1175 ___deadline: zx::MonotonicInstant,
1176 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1177 let _response = self.client.send_query::<
1178 fidl::encoding::EmptyPayload,
1179 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1180 DirectoryMarker,
1181 >(
1182 (),
1183 0x5ac5d459ad7f657e,
1184 fidl::encoding::DynamicFlags::empty(),
1185 ___deadline,
1186 )?;
1187 Ok(_response.map(|x| x))
1188 }
1189
1190 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
1191 let _response = self.client.send_query::<
1192 fidl::encoding::EmptyPayload,
1193 fidl_fuchsia_unknown::QueryableQueryResponse,
1194 DirectoryMarker,
1195 >(
1196 (),
1197 0x2658edee9decfc06,
1198 fidl::encoding::DynamicFlags::empty(),
1199 ___deadline,
1200 )?;
1201 Ok(_response.protocol)
1202 }
1203
1204 pub fn r#deprecated_get_attr(
1208 &self,
1209 ___deadline: zx::MonotonicInstant,
1210 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1211 let _response = self.client.send_query::<
1212 fidl::encoding::EmptyPayload,
1213 NodeDeprecatedGetAttrResponse,
1214 DirectoryMarker,
1215 >(
1216 (),
1217 0x78985e216314dafd,
1218 fidl::encoding::DynamicFlags::empty(),
1219 ___deadline,
1220 )?;
1221 Ok((_response.s, _response.attributes))
1222 }
1223
1224 pub fn r#deprecated_set_attr(
1226 &self,
1227 mut flags: NodeAttributeFlags,
1228 mut attributes: &NodeAttributes,
1229 ___deadline: zx::MonotonicInstant,
1230 ) -> Result<i32, fidl::Error> {
1231 let _response = self.client.send_query::<
1232 NodeDeprecatedSetAttrRequest,
1233 NodeDeprecatedSetAttrResponse,
1234 DirectoryMarker,
1235 >(
1236 (flags, attributes,),
1237 0x4186c0f40d938f46,
1238 fidl::encoding::DynamicFlags::empty(),
1239 ___deadline,
1240 )?;
1241 Ok(_response.s)
1242 }
1243
1244 pub fn r#deprecated_get_flags(
1246 &self,
1247 ___deadline: zx::MonotonicInstant,
1248 ) -> Result<(i32, OpenFlags), fidl::Error> {
1249 let _response = self.client.send_query::<
1250 fidl::encoding::EmptyPayload,
1251 NodeDeprecatedGetFlagsResponse,
1252 DirectoryMarker,
1253 >(
1254 (),
1255 0x5b88fffb8eda3aa1,
1256 fidl::encoding::DynamicFlags::empty(),
1257 ___deadline,
1258 )?;
1259 Ok((_response.s, _response.flags))
1260 }
1261
1262 pub fn r#deprecated_set_flags(
1264 &self,
1265 mut flags: OpenFlags,
1266 ___deadline: zx::MonotonicInstant,
1267 ) -> Result<i32, fidl::Error> {
1268 let _response = self.client.send_query::<
1269 NodeDeprecatedSetFlagsRequest,
1270 NodeDeprecatedSetFlagsResponse,
1271 DirectoryMarker,
1272 >(
1273 (flags,),
1274 0x5295b76c71fde733,
1275 fidl::encoding::DynamicFlags::empty(),
1276 ___deadline,
1277 )?;
1278 Ok(_response.s)
1279 }
1280
1281 pub fn r#get_flags(
1290 &self,
1291 ___deadline: zx::MonotonicInstant,
1292 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1293 let _response = self.client.send_query::<
1294 fidl::encoding::EmptyPayload,
1295 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1296 DirectoryMarker,
1297 >(
1298 (),
1299 0x176eb318f64ec23,
1300 fidl::encoding::DynamicFlags::FLEXIBLE,
1301 ___deadline,
1302 )?
1303 .into_result::<DirectoryMarker>("get_flags")?;
1304 Ok(_response.map(|x| x.flags))
1305 }
1306
1307 pub fn r#set_flags(
1317 &self,
1318 mut flags: Flags,
1319 ___deadline: zx::MonotonicInstant,
1320 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1321 let _response = self.client.send_query::<
1322 NodeSetFlagsRequest,
1323 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1324 DirectoryMarker,
1325 >(
1326 (flags,),
1327 0x55a8028685791ea8,
1328 fidl::encoding::DynamicFlags::FLEXIBLE,
1329 ___deadline,
1330 )?
1331 .into_result::<DirectoryMarker>("set_flags")?;
1332 Ok(_response.map(|x| x))
1333 }
1334
1335 pub fn r#query_filesystem(
1339 &self,
1340 ___deadline: zx::MonotonicInstant,
1341 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1342 let _response = self.client.send_query::<
1343 fidl::encoding::EmptyPayload,
1344 NodeQueryFilesystemResponse,
1345 DirectoryMarker,
1346 >(
1347 (),
1348 0x6f344a1c6b0a0610,
1349 fidl::encoding::DynamicFlags::empty(),
1350 ___deadline,
1351 )?;
1352 Ok((_response.s, _response.info))
1353 }
1354
1355 pub fn r#get_token(
1362 &self,
1363 ___deadline: zx::MonotonicInstant,
1364 ) -> Result<NodeGetTokenResult, fidl::Error> {
1365 let _response = self.client.send_query::<
1366 fidl::encoding::EmptyPayload,
1367 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
1368 DirectoryMarker,
1369 >(
1370 (),
1371 0x5054f0ade7076cec,
1372 fidl::encoding::DynamicFlags::FLEXIBLE,
1373 ___deadline,
1374 )?
1375 .into_result::<DirectoryMarker>("get_token")?;
1376 Ok(_response.map(|x| x.token))
1377 }
1378
1379 pub fn r#get_attributes(
1393 &self,
1394 mut query: NodeAttributesQuery,
1395 ___deadline: zx::MonotonicInstant,
1396 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1397 let _response = self.client.send_query::<
1398 NodeGetAttributesRequest,
1399 fidl::encoding::ResultType<NodeAttributes2, i32>,
1400 DirectoryMarker,
1401 >(
1402 (query,),
1403 0x3d4396a638ea053b,
1404 fidl::encoding::DynamicFlags::empty(),
1405 ___deadline,
1406 )?;
1407 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1408 }
1409
1410 pub fn r#update_attributes(
1419 &self,
1420 mut payload: &MutableNodeAttributes,
1421 ___deadline: zx::MonotonicInstant,
1422 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1423 let _response = self.client.send_query::<
1424 MutableNodeAttributes,
1425 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1426 DirectoryMarker,
1427 >(
1428 payload,
1429 0x3308c1da5a89bf08,
1430 fidl::encoding::DynamicFlags::empty(),
1431 ___deadline,
1432 )?;
1433 Ok(_response.map(|x| x))
1434 }
1435
1436 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
1446 let _response = self.client.send_query::<
1447 fidl::encoding::EmptyPayload,
1448 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1449 DirectoryMarker,
1450 >(
1451 (),
1452 0x2c5c27ca0ab5dc49,
1453 fidl::encoding::DynamicFlags::empty(),
1454 ___deadline,
1455 )?;
1456 Ok(_response.map(|x| x))
1457 }
1458
1459 pub fn r#list_extended_attributes(
1468 &self,
1469 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1470 ) -> Result<(), fidl::Error> {
1471 self.client.send::<NodeListExtendedAttributesRequest>(
1472 (iterator,),
1473 0x4b61033de007fcd0,
1474 fidl::encoding::DynamicFlags::empty(),
1475 )
1476 }
1477
1478 pub fn r#get_extended_attribute(
1485 &self,
1486 mut name: &[u8],
1487 ___deadline: zx::MonotonicInstant,
1488 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1489 let _response = self.client.send_query::<
1490 NodeGetExtendedAttributeRequest,
1491 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1492 DirectoryMarker,
1493 >(
1494 (name,),
1495 0x45ffa3ccfdeb76db,
1496 fidl::encoding::DynamicFlags::empty(),
1497 ___deadline,
1498 )?;
1499 Ok(_response.map(|x| x))
1500 }
1501
1502 pub fn r#set_extended_attribute(
1510 &self,
1511 mut name: &[u8],
1512 mut value: ExtendedAttributeValue,
1513 mut mode: SetExtendedAttributeMode,
1514 ___deadline: zx::MonotonicInstant,
1515 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1516 let _response = self.client.send_query::<
1517 NodeSetExtendedAttributeRequest,
1518 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1519 DirectoryMarker,
1520 >(
1521 (name, &mut value, mode,),
1522 0x4a951362f681f23c,
1523 fidl::encoding::DynamicFlags::empty(),
1524 ___deadline,
1525 )?;
1526 Ok(_response.map(|x| x))
1527 }
1528
1529 pub fn r#remove_extended_attribute(
1535 &self,
1536 mut name: &[u8],
1537 ___deadline: zx::MonotonicInstant,
1538 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1539 let _response = self.client.send_query::<
1540 NodeRemoveExtendedAttributeRequest,
1541 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1542 DirectoryMarker,
1543 >(
1544 (name,),
1545 0x7a0b9f3a9bf9032d,
1546 fidl::encoding::DynamicFlags::empty(),
1547 ___deadline,
1548 )?;
1549 Ok(_response.map(|x| x))
1550 }
1551
1552 pub fn r#open(
1559 &self,
1560 mut path: &str,
1561 mut flags: Flags,
1562 mut options: &Options,
1563 mut object: fidl::Channel,
1564 ) -> Result<(), fidl::Error> {
1565 self.client.send::<OpenableOpenRequest>(
1566 (path, flags, options, object),
1567 0x568ddcb9a9cbb6d9,
1568 fidl::encoding::DynamicFlags::FLEXIBLE,
1569 )
1570 }
1571
1572 pub fn r#deprecated_open(
1574 &self,
1575 mut flags: OpenFlags,
1576 mut mode: ModeType,
1577 mut path: &str,
1578 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1579 ) -> Result<(), fidl::Error> {
1580 self.client.send::<DirectoryDeprecatedOpenRequest>(
1581 (flags, mode, path, object),
1582 0x2c5044561d685ec0,
1583 fidl::encoding::DynamicFlags::FLEXIBLE,
1584 )
1585 }
1586
1587 pub fn r#read_dirents(
1614 &self,
1615 mut max_bytes: u64,
1616 ___deadline: zx::MonotonicInstant,
1617 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1618 let _response = self.client.send_query::<
1619 DirectoryReadDirentsRequest,
1620 DirectoryReadDirentsResponse,
1621 DirectoryMarker,
1622 >(
1623 (max_bytes,),
1624 0x3582806bf27faa0a,
1625 fidl::encoding::DynamicFlags::empty(),
1626 ___deadline,
1627 )?;
1628 Ok((_response.s, _response.dirents))
1629 }
1630
1631 pub fn r#rewind(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
1637 let _response = self
1638 .client
1639 .send_query::<fidl::encoding::EmptyPayload, DirectoryRewindResponse, DirectoryMarker>(
1640 (),
1641 0x16b1202af0f34c71,
1642 fidl::encoding::DynamicFlags::empty(),
1643 ___deadline,
1644 )?;
1645 Ok(_response.s)
1646 }
1647
1648 pub fn r#deprecated_get_token(
1657 &self,
1658 ___deadline: zx::MonotonicInstant,
1659 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
1660 let _response = self.client.send_query::<
1661 fidl::encoding::EmptyPayload,
1662 DirectoryDeprecatedGetTokenResponse,
1663 DirectoryMarker,
1664 >(
1665 (),
1666 0x26ae9d18763c8655,
1667 fidl::encoding::DynamicFlags::empty(),
1668 ___deadline,
1669 )?;
1670 Ok((_response.s, _response.token))
1671 }
1672
1673 pub fn r#link(
1690 &self,
1691 mut src: &str,
1692 mut dst_parent_token: fidl::NullableHandle,
1693 mut dst: &str,
1694 ___deadline: zx::MonotonicInstant,
1695 ) -> Result<i32, fidl::Error> {
1696 let _response = self
1697 .client
1698 .send_query::<DirectoryLinkRequest, DirectoryLinkResponse, DirectoryMarker>(
1699 (src, dst_parent_token, dst),
1700 0x740604c0c7c930e7,
1701 fidl::encoding::DynamicFlags::empty(),
1702 ___deadline,
1703 )?;
1704 Ok(_response.s)
1705 }
1706
1707 pub fn r#unlink(
1732 &self,
1733 mut name: &str,
1734 mut options: &UnlinkOptions,
1735 ___deadline: zx::MonotonicInstant,
1736 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
1737 let _response = self.client.send_query::<
1738 DirectoryUnlinkRequest,
1739 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1740 DirectoryMarker,
1741 >(
1742 (name, options,),
1743 0x750a0326a78d7bed,
1744 fidl::encoding::DynamicFlags::empty(),
1745 ___deadline,
1746 )?;
1747 Ok(_response.map(|x| x))
1748 }
1749
1750 pub fn r#rename(
1776 &self,
1777 mut src: &str,
1778 mut dst_parent_token: fidl::Event,
1779 mut dst: &str,
1780 ___deadline: zx::MonotonicInstant,
1781 ) -> Result<DirectoryRenameResult, fidl::Error> {
1782 let _response = self.client.send_query::<
1783 DirectoryRenameRequest,
1784 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1785 DirectoryMarker,
1786 >(
1787 (src, dst_parent_token, dst,),
1788 0x7060e7723b9928de,
1789 fidl::encoding::DynamicFlags::empty(),
1790 ___deadline,
1791 )?;
1792 Ok(_response.map(|x| x))
1793 }
1794
1795 pub fn r#create_symlink(
1810 &self,
1811 mut name: &str,
1812 mut target: &[u8],
1813 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1814 ___deadline: zx::MonotonicInstant,
1815 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
1816 let _response = self.client.send_query::<
1817 DirectoryCreateSymlinkRequest,
1818 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1819 DirectoryMarker,
1820 >(
1821 (name, target, connection,),
1822 0x21ce0f19ec043889,
1823 fidl::encoding::DynamicFlags::empty(),
1824 ___deadline,
1825 )?;
1826 Ok(_response.map(|x| x))
1827 }
1828
1829 pub fn r#watch(
1838 &self,
1839 mut mask: WatchMask,
1840 mut options: u32,
1841 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1842 ___deadline: zx::MonotonicInstant,
1843 ) -> Result<i32, fidl::Error> {
1844 let _response = self
1845 .client
1846 .send_query::<DirectoryWatchRequest, DirectoryWatchResponse, DirectoryMarker>(
1847 (mask, options, watcher),
1848 0x5717193a59d66d91,
1849 fidl::encoding::DynamicFlags::empty(),
1850 ___deadline,
1851 )?;
1852 Ok(_response.s)
1853 }
1854}
1855
1856#[cfg(target_os = "fuchsia")]
1857impl From<DirectorySynchronousProxy> for zx::NullableHandle {
1858 fn from(value: DirectorySynchronousProxy) -> Self {
1859 value.into_channel().into()
1860 }
1861}
1862
1863#[cfg(target_os = "fuchsia")]
1864impl From<fidl::Channel> for DirectorySynchronousProxy {
1865 fn from(value: fidl::Channel) -> Self {
1866 Self::new(value)
1867 }
1868}
1869
1870#[cfg(target_os = "fuchsia")]
1871impl fidl::endpoints::FromClient for DirectorySynchronousProxy {
1872 type Protocol = DirectoryMarker;
1873
1874 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryMarker>) -> Self {
1875 Self::new(value.into_channel())
1876 }
1877}
1878
1879#[derive(Debug, Clone)]
1880pub struct DirectoryProxy {
1881 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1882}
1883
1884impl fidl::endpoints::Proxy for DirectoryProxy {
1885 type Protocol = DirectoryMarker;
1886
1887 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1888 Self::new(inner)
1889 }
1890
1891 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1892 self.client.into_channel().map_err(|client| Self { client })
1893 }
1894
1895 fn as_channel(&self) -> &::fidl::AsyncChannel {
1896 self.client.as_channel()
1897 }
1898}
1899
1900impl DirectoryProxy {
1901 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1903 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1904 Self { client: fidl::client::Client::new(channel, protocol_name) }
1905 }
1906
1907 pub fn take_event_stream(&self) -> DirectoryEventStream {
1913 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
1914 }
1915
1916 pub fn r#advisory_lock(
1940 &self,
1941 mut request: &AdvisoryLockRequest,
1942 ) -> fidl::client::QueryResponseFut<
1943 AdvisoryLockingAdvisoryLockResult,
1944 fidl::encoding::DefaultFuchsiaResourceDialect,
1945 > {
1946 DirectoryProxyInterface::r#advisory_lock(self, request)
1947 }
1948
1949 pub fn r#clone(
1950 &self,
1951 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1952 ) -> Result<(), fidl::Error> {
1953 DirectoryProxyInterface::r#clone(self, request)
1954 }
1955
1956 pub fn r#close(
1967 &self,
1968 ) -> fidl::client::QueryResponseFut<
1969 fidl_fuchsia_unknown::CloseableCloseResult,
1970 fidl::encoding::DefaultFuchsiaResourceDialect,
1971 > {
1972 DirectoryProxyInterface::r#close(self)
1973 }
1974
1975 pub fn r#query(
1976 &self,
1977 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1978 {
1979 DirectoryProxyInterface::r#query(self)
1980 }
1981
1982 pub fn r#deprecated_get_attr(
1986 &self,
1987 ) -> fidl::client::QueryResponseFut<
1988 (i32, NodeAttributes),
1989 fidl::encoding::DefaultFuchsiaResourceDialect,
1990 > {
1991 DirectoryProxyInterface::r#deprecated_get_attr(self)
1992 }
1993
1994 pub fn r#deprecated_set_attr(
1996 &self,
1997 mut flags: NodeAttributeFlags,
1998 mut attributes: &NodeAttributes,
1999 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2000 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
2001 }
2002
2003 pub fn r#deprecated_get_flags(
2005 &self,
2006 ) -> fidl::client::QueryResponseFut<
2007 (i32, OpenFlags),
2008 fidl::encoding::DefaultFuchsiaResourceDialect,
2009 > {
2010 DirectoryProxyInterface::r#deprecated_get_flags(self)
2011 }
2012
2013 pub fn r#deprecated_set_flags(
2015 &self,
2016 mut flags: OpenFlags,
2017 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2018 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
2019 }
2020
2021 pub fn r#get_flags(
2030 &self,
2031 ) -> fidl::client::QueryResponseFut<
2032 NodeGetFlagsResult,
2033 fidl::encoding::DefaultFuchsiaResourceDialect,
2034 > {
2035 DirectoryProxyInterface::r#get_flags(self)
2036 }
2037
2038 pub fn r#set_flags(
2048 &self,
2049 mut flags: Flags,
2050 ) -> fidl::client::QueryResponseFut<
2051 NodeSetFlagsResult,
2052 fidl::encoding::DefaultFuchsiaResourceDialect,
2053 > {
2054 DirectoryProxyInterface::r#set_flags(self, flags)
2055 }
2056
2057 pub fn r#query_filesystem(
2061 &self,
2062 ) -> fidl::client::QueryResponseFut<
2063 (i32, Option<Box<FilesystemInfo>>),
2064 fidl::encoding::DefaultFuchsiaResourceDialect,
2065 > {
2066 DirectoryProxyInterface::r#query_filesystem(self)
2067 }
2068
2069 pub fn r#get_token(
2076 &self,
2077 ) -> fidl::client::QueryResponseFut<
2078 NodeGetTokenResult,
2079 fidl::encoding::DefaultFuchsiaResourceDialect,
2080 > {
2081 DirectoryProxyInterface::r#get_token(self)
2082 }
2083
2084 pub fn r#get_attributes(
2098 &self,
2099 mut query: NodeAttributesQuery,
2100 ) -> fidl::client::QueryResponseFut<
2101 NodeGetAttributesResult,
2102 fidl::encoding::DefaultFuchsiaResourceDialect,
2103 > {
2104 DirectoryProxyInterface::r#get_attributes(self, query)
2105 }
2106
2107 pub fn r#update_attributes(
2116 &self,
2117 mut payload: &MutableNodeAttributes,
2118 ) -> fidl::client::QueryResponseFut<
2119 NodeUpdateAttributesResult,
2120 fidl::encoding::DefaultFuchsiaResourceDialect,
2121 > {
2122 DirectoryProxyInterface::r#update_attributes(self, payload)
2123 }
2124
2125 pub fn r#sync(
2135 &self,
2136 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
2137 {
2138 DirectoryProxyInterface::r#sync(self)
2139 }
2140
2141 pub fn r#list_extended_attributes(
2150 &self,
2151 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2152 ) -> Result<(), fidl::Error> {
2153 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
2154 }
2155
2156 pub fn r#get_extended_attribute(
2163 &self,
2164 mut name: &[u8],
2165 ) -> fidl::client::QueryResponseFut<
2166 NodeGetExtendedAttributeResult,
2167 fidl::encoding::DefaultFuchsiaResourceDialect,
2168 > {
2169 DirectoryProxyInterface::r#get_extended_attribute(self, name)
2170 }
2171
2172 pub fn r#set_extended_attribute(
2180 &self,
2181 mut name: &[u8],
2182 mut value: ExtendedAttributeValue,
2183 mut mode: SetExtendedAttributeMode,
2184 ) -> fidl::client::QueryResponseFut<
2185 NodeSetExtendedAttributeResult,
2186 fidl::encoding::DefaultFuchsiaResourceDialect,
2187 > {
2188 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
2189 }
2190
2191 pub fn r#remove_extended_attribute(
2197 &self,
2198 mut name: &[u8],
2199 ) -> fidl::client::QueryResponseFut<
2200 NodeRemoveExtendedAttributeResult,
2201 fidl::encoding::DefaultFuchsiaResourceDialect,
2202 > {
2203 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
2204 }
2205
2206 pub fn r#open(
2213 &self,
2214 mut path: &str,
2215 mut flags: Flags,
2216 mut options: &Options,
2217 mut object: fidl::Channel,
2218 ) -> Result<(), fidl::Error> {
2219 DirectoryProxyInterface::r#open(self, path, flags, options, object)
2220 }
2221
2222 pub fn r#deprecated_open(
2224 &self,
2225 mut flags: OpenFlags,
2226 mut mode: ModeType,
2227 mut path: &str,
2228 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2229 ) -> Result<(), fidl::Error> {
2230 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
2231 }
2232
2233 pub fn r#read_dirents(
2260 &self,
2261 mut max_bytes: u64,
2262 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fidl::encoding::DefaultFuchsiaResourceDialect>
2263 {
2264 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
2265 }
2266
2267 pub fn r#rewind(
2273 &self,
2274 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2275 DirectoryProxyInterface::r#rewind(self)
2276 }
2277
2278 pub fn r#deprecated_get_token(
2287 &self,
2288 ) -> fidl::client::QueryResponseFut<
2289 (i32, Option<fidl::NullableHandle>),
2290 fidl::encoding::DefaultFuchsiaResourceDialect,
2291 > {
2292 DirectoryProxyInterface::r#deprecated_get_token(self)
2293 }
2294
2295 pub fn r#link(
2312 &self,
2313 mut src: &str,
2314 mut dst_parent_token: fidl::NullableHandle,
2315 mut dst: &str,
2316 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2317 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
2318 }
2319
2320 pub fn r#unlink(
2345 &self,
2346 mut name: &str,
2347 mut options: &UnlinkOptions,
2348 ) -> fidl::client::QueryResponseFut<
2349 DirectoryUnlinkResult,
2350 fidl::encoding::DefaultFuchsiaResourceDialect,
2351 > {
2352 DirectoryProxyInterface::r#unlink(self, name, options)
2353 }
2354
2355 pub fn r#rename(
2381 &self,
2382 mut src: &str,
2383 mut dst_parent_token: fidl::Event,
2384 mut dst: &str,
2385 ) -> fidl::client::QueryResponseFut<
2386 DirectoryRenameResult,
2387 fidl::encoding::DefaultFuchsiaResourceDialect,
2388 > {
2389 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
2390 }
2391
2392 pub fn r#create_symlink(
2407 &self,
2408 mut name: &str,
2409 mut target: &[u8],
2410 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2411 ) -> fidl::client::QueryResponseFut<
2412 DirectoryCreateSymlinkResult,
2413 fidl::encoding::DefaultFuchsiaResourceDialect,
2414 > {
2415 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
2416 }
2417
2418 pub fn r#watch(
2427 &self,
2428 mut mask: WatchMask,
2429 mut options: u32,
2430 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2431 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2432 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
2433 }
2434}
2435
2436impl DirectoryProxyInterface for DirectoryProxy {
2437 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
2438 AdvisoryLockingAdvisoryLockResult,
2439 fidl::encoding::DefaultFuchsiaResourceDialect,
2440 >;
2441 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
2442 fn _decode(
2443 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2444 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
2445 let _response = fidl::client::decode_transaction_body::<
2446 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2447 fidl::encoding::DefaultFuchsiaResourceDialect,
2448 0x6ee9c0ad53ec87aa,
2449 >(_buf?)?;
2450 Ok(_response.map(|x| x))
2451 }
2452 self.client.send_query_and_decode::<
2453 AdvisoryLockingAdvisoryLockRequest,
2454 AdvisoryLockingAdvisoryLockResult,
2455 >(
2456 (request,),
2457 0x6ee9c0ad53ec87aa,
2458 fidl::encoding::DynamicFlags::empty(),
2459 _decode,
2460 )
2461 }
2462
2463 fn r#clone(
2464 &self,
2465 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
2466 ) -> Result<(), fidl::Error> {
2467 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
2468 (request,),
2469 0x20d8a7aba2168a79,
2470 fidl::encoding::DynamicFlags::empty(),
2471 )
2472 }
2473
2474 type CloseResponseFut = fidl::client::QueryResponseFut<
2475 fidl_fuchsia_unknown::CloseableCloseResult,
2476 fidl::encoding::DefaultFuchsiaResourceDialect,
2477 >;
2478 fn r#close(&self) -> Self::CloseResponseFut {
2479 fn _decode(
2480 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2481 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
2482 let _response = fidl::client::decode_transaction_body::<
2483 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2484 fidl::encoding::DefaultFuchsiaResourceDialect,
2485 0x5ac5d459ad7f657e,
2486 >(_buf?)?;
2487 Ok(_response.map(|x| x))
2488 }
2489 self.client.send_query_and_decode::<
2490 fidl::encoding::EmptyPayload,
2491 fidl_fuchsia_unknown::CloseableCloseResult,
2492 >(
2493 (),
2494 0x5ac5d459ad7f657e,
2495 fidl::encoding::DynamicFlags::empty(),
2496 _decode,
2497 )
2498 }
2499
2500 type QueryResponseFut =
2501 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
2502 fn r#query(&self) -> Self::QueryResponseFut {
2503 fn _decode(
2504 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2505 ) -> Result<Vec<u8>, fidl::Error> {
2506 let _response = fidl::client::decode_transaction_body::<
2507 fidl_fuchsia_unknown::QueryableQueryResponse,
2508 fidl::encoding::DefaultFuchsiaResourceDialect,
2509 0x2658edee9decfc06,
2510 >(_buf?)?;
2511 Ok(_response.protocol)
2512 }
2513 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
2514 (),
2515 0x2658edee9decfc06,
2516 fidl::encoding::DynamicFlags::empty(),
2517 _decode,
2518 )
2519 }
2520
2521 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
2522 (i32, NodeAttributes),
2523 fidl::encoding::DefaultFuchsiaResourceDialect,
2524 >;
2525 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
2526 fn _decode(
2527 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2528 ) -> Result<(i32, NodeAttributes), fidl::Error> {
2529 let _response = fidl::client::decode_transaction_body::<
2530 NodeDeprecatedGetAttrResponse,
2531 fidl::encoding::DefaultFuchsiaResourceDialect,
2532 0x78985e216314dafd,
2533 >(_buf?)?;
2534 Ok((_response.s, _response.attributes))
2535 }
2536 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
2537 (),
2538 0x78985e216314dafd,
2539 fidl::encoding::DynamicFlags::empty(),
2540 _decode,
2541 )
2542 }
2543
2544 type DeprecatedSetAttrResponseFut =
2545 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2546 fn r#deprecated_set_attr(
2547 &self,
2548 mut flags: NodeAttributeFlags,
2549 mut attributes: &NodeAttributes,
2550 ) -> Self::DeprecatedSetAttrResponseFut {
2551 fn _decode(
2552 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2553 ) -> Result<i32, fidl::Error> {
2554 let _response = fidl::client::decode_transaction_body::<
2555 NodeDeprecatedSetAttrResponse,
2556 fidl::encoding::DefaultFuchsiaResourceDialect,
2557 0x4186c0f40d938f46,
2558 >(_buf?)?;
2559 Ok(_response.s)
2560 }
2561 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
2562 (flags, attributes),
2563 0x4186c0f40d938f46,
2564 fidl::encoding::DynamicFlags::empty(),
2565 _decode,
2566 )
2567 }
2568
2569 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
2570 (i32, OpenFlags),
2571 fidl::encoding::DefaultFuchsiaResourceDialect,
2572 >;
2573 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
2574 fn _decode(
2575 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2576 ) -> Result<(i32, OpenFlags), fidl::Error> {
2577 let _response = fidl::client::decode_transaction_body::<
2578 NodeDeprecatedGetFlagsResponse,
2579 fidl::encoding::DefaultFuchsiaResourceDialect,
2580 0x5b88fffb8eda3aa1,
2581 >(_buf?)?;
2582 Ok((_response.s, _response.flags))
2583 }
2584 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
2585 (),
2586 0x5b88fffb8eda3aa1,
2587 fidl::encoding::DynamicFlags::empty(),
2588 _decode,
2589 )
2590 }
2591
2592 type DeprecatedSetFlagsResponseFut =
2593 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2594 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
2595 fn _decode(
2596 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2597 ) -> Result<i32, fidl::Error> {
2598 let _response = fidl::client::decode_transaction_body::<
2599 NodeDeprecatedSetFlagsResponse,
2600 fidl::encoding::DefaultFuchsiaResourceDialect,
2601 0x5295b76c71fde733,
2602 >(_buf?)?;
2603 Ok(_response.s)
2604 }
2605 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
2606 (flags,),
2607 0x5295b76c71fde733,
2608 fidl::encoding::DynamicFlags::empty(),
2609 _decode,
2610 )
2611 }
2612
2613 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
2614 NodeGetFlagsResult,
2615 fidl::encoding::DefaultFuchsiaResourceDialect,
2616 >;
2617 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
2618 fn _decode(
2619 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2620 ) -> Result<NodeGetFlagsResult, fidl::Error> {
2621 let _response = fidl::client::decode_transaction_body::<
2622 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
2623 fidl::encoding::DefaultFuchsiaResourceDialect,
2624 0x176eb318f64ec23,
2625 >(_buf?)?
2626 .into_result::<DirectoryMarker>("get_flags")?;
2627 Ok(_response.map(|x| x.flags))
2628 }
2629 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
2630 (),
2631 0x176eb318f64ec23,
2632 fidl::encoding::DynamicFlags::FLEXIBLE,
2633 _decode,
2634 )
2635 }
2636
2637 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
2638 NodeSetFlagsResult,
2639 fidl::encoding::DefaultFuchsiaResourceDialect,
2640 >;
2641 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
2642 fn _decode(
2643 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2644 ) -> Result<NodeSetFlagsResult, fidl::Error> {
2645 let _response = fidl::client::decode_transaction_body::<
2646 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2647 fidl::encoding::DefaultFuchsiaResourceDialect,
2648 0x55a8028685791ea8,
2649 >(_buf?)?
2650 .into_result::<DirectoryMarker>("set_flags")?;
2651 Ok(_response.map(|x| x))
2652 }
2653 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
2654 (flags,),
2655 0x55a8028685791ea8,
2656 fidl::encoding::DynamicFlags::FLEXIBLE,
2657 _decode,
2658 )
2659 }
2660
2661 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
2662 (i32, Option<Box<FilesystemInfo>>),
2663 fidl::encoding::DefaultFuchsiaResourceDialect,
2664 >;
2665 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
2666 fn _decode(
2667 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2668 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
2669 let _response = fidl::client::decode_transaction_body::<
2670 NodeQueryFilesystemResponse,
2671 fidl::encoding::DefaultFuchsiaResourceDialect,
2672 0x6f344a1c6b0a0610,
2673 >(_buf?)?;
2674 Ok((_response.s, _response.info))
2675 }
2676 self.client.send_query_and_decode::<
2677 fidl::encoding::EmptyPayload,
2678 (i32, Option<Box<FilesystemInfo>>),
2679 >(
2680 (),
2681 0x6f344a1c6b0a0610,
2682 fidl::encoding::DynamicFlags::empty(),
2683 _decode,
2684 )
2685 }
2686
2687 type GetTokenResponseFut = fidl::client::QueryResponseFut<
2688 NodeGetTokenResult,
2689 fidl::encoding::DefaultFuchsiaResourceDialect,
2690 >;
2691 fn r#get_token(&self) -> Self::GetTokenResponseFut {
2692 fn _decode(
2693 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2694 ) -> Result<NodeGetTokenResult, fidl::Error> {
2695 let _response = fidl::client::decode_transaction_body::<
2696 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
2697 fidl::encoding::DefaultFuchsiaResourceDialect,
2698 0x5054f0ade7076cec,
2699 >(_buf?)?
2700 .into_result::<DirectoryMarker>("get_token")?;
2701 Ok(_response.map(|x| x.token))
2702 }
2703 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetTokenResult>(
2704 (),
2705 0x5054f0ade7076cec,
2706 fidl::encoding::DynamicFlags::FLEXIBLE,
2707 _decode,
2708 )
2709 }
2710
2711 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
2712 NodeGetAttributesResult,
2713 fidl::encoding::DefaultFuchsiaResourceDialect,
2714 >;
2715 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
2716 fn _decode(
2717 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2718 ) -> Result<NodeGetAttributesResult, fidl::Error> {
2719 let _response = fidl::client::decode_transaction_body::<
2720 fidl::encoding::ResultType<NodeAttributes2, i32>,
2721 fidl::encoding::DefaultFuchsiaResourceDialect,
2722 0x3d4396a638ea053b,
2723 >(_buf?)?;
2724 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
2725 }
2726 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
2727 (query,),
2728 0x3d4396a638ea053b,
2729 fidl::encoding::DynamicFlags::empty(),
2730 _decode,
2731 )
2732 }
2733
2734 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
2735 NodeUpdateAttributesResult,
2736 fidl::encoding::DefaultFuchsiaResourceDialect,
2737 >;
2738 fn r#update_attributes(
2739 &self,
2740 mut payload: &MutableNodeAttributes,
2741 ) -> Self::UpdateAttributesResponseFut {
2742 fn _decode(
2743 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2744 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
2745 let _response = fidl::client::decode_transaction_body::<
2746 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2747 fidl::encoding::DefaultFuchsiaResourceDialect,
2748 0x3308c1da5a89bf08,
2749 >(_buf?)?;
2750 Ok(_response.map(|x| x))
2751 }
2752 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
2753 payload,
2754 0x3308c1da5a89bf08,
2755 fidl::encoding::DynamicFlags::empty(),
2756 _decode,
2757 )
2758 }
2759
2760 type SyncResponseFut = fidl::client::QueryResponseFut<
2761 NodeSyncResult,
2762 fidl::encoding::DefaultFuchsiaResourceDialect,
2763 >;
2764 fn r#sync(&self) -> Self::SyncResponseFut {
2765 fn _decode(
2766 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2767 ) -> Result<NodeSyncResult, fidl::Error> {
2768 let _response = fidl::client::decode_transaction_body::<
2769 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2770 fidl::encoding::DefaultFuchsiaResourceDialect,
2771 0x2c5c27ca0ab5dc49,
2772 >(_buf?)?;
2773 Ok(_response.map(|x| x))
2774 }
2775 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
2776 (),
2777 0x2c5c27ca0ab5dc49,
2778 fidl::encoding::DynamicFlags::empty(),
2779 _decode,
2780 )
2781 }
2782
2783 fn r#list_extended_attributes(
2784 &self,
2785 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2786 ) -> Result<(), fidl::Error> {
2787 self.client.send::<NodeListExtendedAttributesRequest>(
2788 (iterator,),
2789 0x4b61033de007fcd0,
2790 fidl::encoding::DynamicFlags::empty(),
2791 )
2792 }
2793
2794 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2795 NodeGetExtendedAttributeResult,
2796 fidl::encoding::DefaultFuchsiaResourceDialect,
2797 >;
2798 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
2799 fn _decode(
2800 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2801 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
2802 let _response = fidl::client::decode_transaction_body::<
2803 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
2804 fidl::encoding::DefaultFuchsiaResourceDialect,
2805 0x45ffa3ccfdeb76db,
2806 >(_buf?)?;
2807 Ok(_response.map(|x| x))
2808 }
2809 self.client.send_query_and_decode::<
2810 NodeGetExtendedAttributeRequest,
2811 NodeGetExtendedAttributeResult,
2812 >(
2813 (name,),
2814 0x45ffa3ccfdeb76db,
2815 fidl::encoding::DynamicFlags::empty(),
2816 _decode,
2817 )
2818 }
2819
2820 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2821 NodeSetExtendedAttributeResult,
2822 fidl::encoding::DefaultFuchsiaResourceDialect,
2823 >;
2824 fn r#set_extended_attribute(
2825 &self,
2826 mut name: &[u8],
2827 mut value: ExtendedAttributeValue,
2828 mut mode: SetExtendedAttributeMode,
2829 ) -> Self::SetExtendedAttributeResponseFut {
2830 fn _decode(
2831 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2832 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
2833 let _response = fidl::client::decode_transaction_body::<
2834 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2835 fidl::encoding::DefaultFuchsiaResourceDialect,
2836 0x4a951362f681f23c,
2837 >(_buf?)?;
2838 Ok(_response.map(|x| x))
2839 }
2840 self.client.send_query_and_decode::<
2841 NodeSetExtendedAttributeRequest,
2842 NodeSetExtendedAttributeResult,
2843 >(
2844 (name, &mut value, mode,),
2845 0x4a951362f681f23c,
2846 fidl::encoding::DynamicFlags::empty(),
2847 _decode,
2848 )
2849 }
2850
2851 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2852 NodeRemoveExtendedAttributeResult,
2853 fidl::encoding::DefaultFuchsiaResourceDialect,
2854 >;
2855 fn r#remove_extended_attribute(
2856 &self,
2857 mut name: &[u8],
2858 ) -> Self::RemoveExtendedAttributeResponseFut {
2859 fn _decode(
2860 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2861 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
2862 let _response = fidl::client::decode_transaction_body::<
2863 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2864 fidl::encoding::DefaultFuchsiaResourceDialect,
2865 0x7a0b9f3a9bf9032d,
2866 >(_buf?)?;
2867 Ok(_response.map(|x| x))
2868 }
2869 self.client.send_query_and_decode::<
2870 NodeRemoveExtendedAttributeRequest,
2871 NodeRemoveExtendedAttributeResult,
2872 >(
2873 (name,),
2874 0x7a0b9f3a9bf9032d,
2875 fidl::encoding::DynamicFlags::empty(),
2876 _decode,
2877 )
2878 }
2879
2880 fn r#open(
2881 &self,
2882 mut path: &str,
2883 mut flags: Flags,
2884 mut options: &Options,
2885 mut object: fidl::Channel,
2886 ) -> Result<(), fidl::Error> {
2887 self.client.send::<OpenableOpenRequest>(
2888 (path, flags, options, object),
2889 0x568ddcb9a9cbb6d9,
2890 fidl::encoding::DynamicFlags::FLEXIBLE,
2891 )
2892 }
2893
2894 fn r#deprecated_open(
2895 &self,
2896 mut flags: OpenFlags,
2897 mut mode: ModeType,
2898 mut path: &str,
2899 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2900 ) -> Result<(), fidl::Error> {
2901 self.client.send::<DirectoryDeprecatedOpenRequest>(
2902 (flags, mode, path, object),
2903 0x2c5044561d685ec0,
2904 fidl::encoding::DynamicFlags::FLEXIBLE,
2905 )
2906 }
2907
2908 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
2909 (i32, Vec<u8>),
2910 fidl::encoding::DefaultFuchsiaResourceDialect,
2911 >;
2912 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
2913 fn _decode(
2914 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2915 ) -> Result<(i32, Vec<u8>), fidl::Error> {
2916 let _response = fidl::client::decode_transaction_body::<
2917 DirectoryReadDirentsResponse,
2918 fidl::encoding::DefaultFuchsiaResourceDialect,
2919 0x3582806bf27faa0a,
2920 >(_buf?)?;
2921 Ok((_response.s, _response.dirents))
2922 }
2923 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
2924 (max_bytes,),
2925 0x3582806bf27faa0a,
2926 fidl::encoding::DynamicFlags::empty(),
2927 _decode,
2928 )
2929 }
2930
2931 type RewindResponseFut =
2932 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2933 fn r#rewind(&self) -> Self::RewindResponseFut {
2934 fn _decode(
2935 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2936 ) -> Result<i32, fidl::Error> {
2937 let _response = fidl::client::decode_transaction_body::<
2938 DirectoryRewindResponse,
2939 fidl::encoding::DefaultFuchsiaResourceDialect,
2940 0x16b1202af0f34c71,
2941 >(_buf?)?;
2942 Ok(_response.s)
2943 }
2944 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2945 (),
2946 0x16b1202af0f34c71,
2947 fidl::encoding::DynamicFlags::empty(),
2948 _decode,
2949 )
2950 }
2951
2952 type DeprecatedGetTokenResponseFut = fidl::client::QueryResponseFut<
2953 (i32, Option<fidl::NullableHandle>),
2954 fidl::encoding::DefaultFuchsiaResourceDialect,
2955 >;
2956 fn r#deprecated_get_token(&self) -> Self::DeprecatedGetTokenResponseFut {
2957 fn _decode(
2958 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2959 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
2960 let _response = fidl::client::decode_transaction_body::<
2961 DirectoryDeprecatedGetTokenResponse,
2962 fidl::encoding::DefaultFuchsiaResourceDialect,
2963 0x26ae9d18763c8655,
2964 >(_buf?)?;
2965 Ok((_response.s, _response.token))
2966 }
2967 self.client.send_query_and_decode::<
2968 fidl::encoding::EmptyPayload,
2969 (i32, Option<fidl::NullableHandle>),
2970 >(
2971 (),
2972 0x26ae9d18763c8655,
2973 fidl::encoding::DynamicFlags::empty(),
2974 _decode,
2975 )
2976 }
2977
2978 type LinkResponseFut =
2979 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2980 fn r#link(
2981 &self,
2982 mut src: &str,
2983 mut dst_parent_token: fidl::NullableHandle,
2984 mut dst: &str,
2985 ) -> Self::LinkResponseFut {
2986 fn _decode(
2987 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2988 ) -> Result<i32, fidl::Error> {
2989 let _response = fidl::client::decode_transaction_body::<
2990 DirectoryLinkResponse,
2991 fidl::encoding::DefaultFuchsiaResourceDialect,
2992 0x740604c0c7c930e7,
2993 >(_buf?)?;
2994 Ok(_response.s)
2995 }
2996 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2997 (src, dst_parent_token, dst),
2998 0x740604c0c7c930e7,
2999 fidl::encoding::DynamicFlags::empty(),
3000 _decode,
3001 )
3002 }
3003
3004 type UnlinkResponseFut = fidl::client::QueryResponseFut<
3005 DirectoryUnlinkResult,
3006 fidl::encoding::DefaultFuchsiaResourceDialect,
3007 >;
3008 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
3009 fn _decode(
3010 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3011 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
3012 let _response = fidl::client::decode_transaction_body::<
3013 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3014 fidl::encoding::DefaultFuchsiaResourceDialect,
3015 0x750a0326a78d7bed,
3016 >(_buf?)?;
3017 Ok(_response.map(|x| x))
3018 }
3019 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
3020 (name, options),
3021 0x750a0326a78d7bed,
3022 fidl::encoding::DynamicFlags::empty(),
3023 _decode,
3024 )
3025 }
3026
3027 type RenameResponseFut = fidl::client::QueryResponseFut<
3028 DirectoryRenameResult,
3029 fidl::encoding::DefaultFuchsiaResourceDialect,
3030 >;
3031 fn r#rename(
3032 &self,
3033 mut src: &str,
3034 mut dst_parent_token: fidl::Event,
3035 mut dst: &str,
3036 ) -> Self::RenameResponseFut {
3037 fn _decode(
3038 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3039 ) -> Result<DirectoryRenameResult, fidl::Error> {
3040 let _response = fidl::client::decode_transaction_body::<
3041 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3042 fidl::encoding::DefaultFuchsiaResourceDialect,
3043 0x7060e7723b9928de,
3044 >(_buf?)?;
3045 Ok(_response.map(|x| x))
3046 }
3047 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
3048 (src, dst_parent_token, dst),
3049 0x7060e7723b9928de,
3050 fidl::encoding::DynamicFlags::empty(),
3051 _decode,
3052 )
3053 }
3054
3055 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
3056 DirectoryCreateSymlinkResult,
3057 fidl::encoding::DefaultFuchsiaResourceDialect,
3058 >;
3059 fn r#create_symlink(
3060 &self,
3061 mut name: &str,
3062 mut target: &[u8],
3063 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
3064 ) -> Self::CreateSymlinkResponseFut {
3065 fn _decode(
3066 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3067 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
3068 let _response = fidl::client::decode_transaction_body::<
3069 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3070 fidl::encoding::DefaultFuchsiaResourceDialect,
3071 0x21ce0f19ec043889,
3072 >(_buf?)?;
3073 Ok(_response.map(|x| x))
3074 }
3075 self.client
3076 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
3077 (name, target, connection),
3078 0x21ce0f19ec043889,
3079 fidl::encoding::DynamicFlags::empty(),
3080 _decode,
3081 )
3082 }
3083
3084 type WatchResponseFut =
3085 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3086 fn r#watch(
3087 &self,
3088 mut mask: WatchMask,
3089 mut options: u32,
3090 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
3091 ) -> Self::WatchResponseFut {
3092 fn _decode(
3093 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3094 ) -> Result<i32, fidl::Error> {
3095 let _response = fidl::client::decode_transaction_body::<
3096 DirectoryWatchResponse,
3097 fidl::encoding::DefaultFuchsiaResourceDialect,
3098 0x5717193a59d66d91,
3099 >(_buf?)?;
3100 Ok(_response.s)
3101 }
3102 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
3103 (mask, options, watcher),
3104 0x5717193a59d66d91,
3105 fidl::encoding::DynamicFlags::empty(),
3106 _decode,
3107 )
3108 }
3109}
3110
3111pub struct DirectoryEventStream {
3112 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3113}
3114
3115impl std::marker::Unpin for DirectoryEventStream {}
3116
3117impl futures::stream::FusedStream for DirectoryEventStream {
3118 fn is_terminated(&self) -> bool {
3119 self.event_receiver.is_terminated()
3120 }
3121}
3122
3123impl futures::Stream for DirectoryEventStream {
3124 type Item = Result<DirectoryEvent, fidl::Error>;
3125
3126 fn poll_next(
3127 mut self: std::pin::Pin<&mut Self>,
3128 cx: &mut std::task::Context<'_>,
3129 ) -> std::task::Poll<Option<Self::Item>> {
3130 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3131 &mut self.event_receiver,
3132 cx
3133 )?) {
3134 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
3135 None => std::task::Poll::Ready(None),
3136 }
3137 }
3138}
3139
3140#[derive(Debug)]
3141pub enum DirectoryEvent {
3142 OnOpen_ {
3143 s: i32,
3144 info: Option<Box<NodeInfoDeprecated>>,
3145 },
3146 OnRepresentation {
3147 payload: Representation,
3148 },
3149 #[non_exhaustive]
3150 _UnknownEvent {
3151 ordinal: u64,
3153 },
3154}
3155
3156impl DirectoryEvent {
3157 #[allow(irrefutable_let_patterns)]
3158 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
3159 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
3160 }
3161 #[allow(irrefutable_let_patterns)]
3162 pub fn into_on_representation(self) -> Option<Representation> {
3163 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
3164 }
3165
3166 fn decode(
3168 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3169 ) -> Result<DirectoryEvent, fidl::Error> {
3170 let (bytes, _handles) = buf.split_mut();
3171 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3172 debug_assert_eq!(tx_header.tx_id, 0);
3173 match tx_header.ordinal {
3174 0x7fc7bbb1dbfd1972 => {
3175 let mut out = fidl::new_empty!(
3176 NodeOnOpenRequest,
3177 fidl::encoding::DefaultFuchsiaResourceDialect
3178 );
3179 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3180 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
3181 }
3182 0x5cb40567d80a510c => {
3183 let mut out =
3184 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
3185 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
3186 Ok((DirectoryEvent::OnRepresentation { payload: out }))
3187 }
3188 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3189 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3190 }
3191 _ => Err(fidl::Error::UnknownOrdinal {
3192 ordinal: tx_header.ordinal,
3193 protocol_name: <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3194 }),
3195 }
3196 }
3197}
3198
3199pub struct DirectoryRequestStream {
3201 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3202 is_terminated: bool,
3203}
3204
3205impl std::marker::Unpin for DirectoryRequestStream {}
3206
3207impl futures::stream::FusedStream for DirectoryRequestStream {
3208 fn is_terminated(&self) -> bool {
3209 self.is_terminated
3210 }
3211}
3212
3213impl fidl::endpoints::RequestStream for DirectoryRequestStream {
3214 type Protocol = DirectoryMarker;
3215 type ControlHandle = DirectoryControlHandle;
3216
3217 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3218 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3219 }
3220
3221 fn control_handle(&self) -> Self::ControlHandle {
3222 DirectoryControlHandle { inner: self.inner.clone() }
3223 }
3224
3225 fn into_inner(
3226 self,
3227 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3228 {
3229 (self.inner, self.is_terminated)
3230 }
3231
3232 fn from_inner(
3233 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3234 is_terminated: bool,
3235 ) -> Self {
3236 Self { inner, is_terminated }
3237 }
3238}
3239
3240impl futures::Stream for DirectoryRequestStream {
3241 type Item = Result<DirectoryRequest, fidl::Error>;
3242
3243 fn poll_next(
3244 mut self: std::pin::Pin<&mut Self>,
3245 cx: &mut std::task::Context<'_>,
3246 ) -> std::task::Poll<Option<Self::Item>> {
3247 let this = &mut *self;
3248 if this.inner.check_shutdown(cx) {
3249 this.is_terminated = true;
3250 return std::task::Poll::Ready(None);
3251 }
3252 if this.is_terminated {
3253 panic!("polled DirectoryRequestStream after completion");
3254 }
3255 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3256 |bytes, handles| {
3257 match this.inner.channel().read_etc(cx, bytes, handles) {
3258 std::task::Poll::Ready(Ok(())) => {}
3259 std::task::Poll::Pending => return std::task::Poll::Pending,
3260 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3261 this.is_terminated = true;
3262 return std::task::Poll::Ready(None);
3263 }
3264 std::task::Poll::Ready(Err(e)) => {
3265 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3266 e.into(),
3267 ))));
3268 }
3269 }
3270
3271 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3273
3274 std::task::Poll::Ready(Some(match header.ordinal {
3275 0x6ee9c0ad53ec87aa => {
3276 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3277 let mut req = fidl::new_empty!(
3278 AdvisoryLockingAdvisoryLockRequest,
3279 fidl::encoding::DefaultFuchsiaResourceDialect
3280 );
3281 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
3282 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3283 Ok(DirectoryRequest::AdvisoryLock {
3284 request: req.request,
3285
3286 responder: DirectoryAdvisoryLockResponder {
3287 control_handle: std::mem::ManuallyDrop::new(control_handle),
3288 tx_id: header.tx_id,
3289 },
3290 })
3291 }
3292 0x20d8a7aba2168a79 => {
3293 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3294 let mut req = fidl::new_empty!(
3295 fidl_fuchsia_unknown::CloneableCloneRequest,
3296 fidl::encoding::DefaultFuchsiaResourceDialect
3297 );
3298 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3299 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3300 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
3301 }
3302 0x5ac5d459ad7f657e => {
3303 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3304 let mut req = fidl::new_empty!(
3305 fidl::encoding::EmptyPayload,
3306 fidl::encoding::DefaultFuchsiaResourceDialect
3307 );
3308 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3309 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3310 Ok(DirectoryRequest::Close {
3311 responder: DirectoryCloseResponder {
3312 control_handle: std::mem::ManuallyDrop::new(control_handle),
3313 tx_id: header.tx_id,
3314 },
3315 })
3316 }
3317 0x2658edee9decfc06 => {
3318 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3319 let mut req = fidl::new_empty!(
3320 fidl::encoding::EmptyPayload,
3321 fidl::encoding::DefaultFuchsiaResourceDialect
3322 );
3323 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3324 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3325 Ok(DirectoryRequest::Query {
3326 responder: DirectoryQueryResponder {
3327 control_handle: std::mem::ManuallyDrop::new(control_handle),
3328 tx_id: header.tx_id,
3329 },
3330 })
3331 }
3332 0x78985e216314dafd => {
3333 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3334 let mut req = fidl::new_empty!(
3335 fidl::encoding::EmptyPayload,
3336 fidl::encoding::DefaultFuchsiaResourceDialect
3337 );
3338 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3339 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3340 Ok(DirectoryRequest::DeprecatedGetAttr {
3341 responder: DirectoryDeprecatedGetAttrResponder {
3342 control_handle: std::mem::ManuallyDrop::new(control_handle),
3343 tx_id: header.tx_id,
3344 },
3345 })
3346 }
3347 0x4186c0f40d938f46 => {
3348 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3349 let mut req = fidl::new_empty!(
3350 NodeDeprecatedSetAttrRequest,
3351 fidl::encoding::DefaultFuchsiaResourceDialect
3352 );
3353 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
3354 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3355 Ok(DirectoryRequest::DeprecatedSetAttr {
3356 flags: req.flags,
3357 attributes: req.attributes,
3358
3359 responder: DirectoryDeprecatedSetAttrResponder {
3360 control_handle: std::mem::ManuallyDrop::new(control_handle),
3361 tx_id: header.tx_id,
3362 },
3363 })
3364 }
3365 0x5b88fffb8eda3aa1 => {
3366 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3367 let mut req = fidl::new_empty!(
3368 fidl::encoding::EmptyPayload,
3369 fidl::encoding::DefaultFuchsiaResourceDialect
3370 );
3371 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3372 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3373 Ok(DirectoryRequest::DeprecatedGetFlags {
3374 responder: DirectoryDeprecatedGetFlagsResponder {
3375 control_handle: std::mem::ManuallyDrop::new(control_handle),
3376 tx_id: header.tx_id,
3377 },
3378 })
3379 }
3380 0x5295b76c71fde733 => {
3381 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3382 let mut req = fidl::new_empty!(
3383 NodeDeprecatedSetFlagsRequest,
3384 fidl::encoding::DefaultFuchsiaResourceDialect
3385 );
3386 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3387 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3388 Ok(DirectoryRequest::DeprecatedSetFlags {
3389 flags: req.flags,
3390
3391 responder: DirectoryDeprecatedSetFlagsResponder {
3392 control_handle: std::mem::ManuallyDrop::new(control_handle),
3393 tx_id: header.tx_id,
3394 },
3395 })
3396 }
3397 0x176eb318f64ec23 => {
3398 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3399 let mut req = fidl::new_empty!(
3400 fidl::encoding::EmptyPayload,
3401 fidl::encoding::DefaultFuchsiaResourceDialect
3402 );
3403 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3404 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3405 Ok(DirectoryRequest::GetFlags {
3406 responder: DirectoryGetFlagsResponder {
3407 control_handle: std::mem::ManuallyDrop::new(control_handle),
3408 tx_id: header.tx_id,
3409 },
3410 })
3411 }
3412 0x55a8028685791ea8 => {
3413 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3414 let mut req = fidl::new_empty!(
3415 NodeSetFlagsRequest,
3416 fidl::encoding::DefaultFuchsiaResourceDialect
3417 );
3418 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3419 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3420 Ok(DirectoryRequest::SetFlags {
3421 flags: req.flags,
3422
3423 responder: DirectorySetFlagsResponder {
3424 control_handle: std::mem::ManuallyDrop::new(control_handle),
3425 tx_id: header.tx_id,
3426 },
3427 })
3428 }
3429 0x6f344a1c6b0a0610 => {
3430 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3431 let mut req = fidl::new_empty!(
3432 fidl::encoding::EmptyPayload,
3433 fidl::encoding::DefaultFuchsiaResourceDialect
3434 );
3435 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3436 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3437 Ok(DirectoryRequest::QueryFilesystem {
3438 responder: DirectoryQueryFilesystemResponder {
3439 control_handle: std::mem::ManuallyDrop::new(control_handle),
3440 tx_id: header.tx_id,
3441 },
3442 })
3443 }
3444 0x5054f0ade7076cec => {
3445 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3446 let mut req = fidl::new_empty!(
3447 fidl::encoding::EmptyPayload,
3448 fidl::encoding::DefaultFuchsiaResourceDialect
3449 );
3450 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3451 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3452 Ok(DirectoryRequest::GetToken {
3453 responder: DirectoryGetTokenResponder {
3454 control_handle: std::mem::ManuallyDrop::new(control_handle),
3455 tx_id: header.tx_id,
3456 },
3457 })
3458 }
3459 0x3d4396a638ea053b => {
3460 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3461 let mut req = fidl::new_empty!(
3462 NodeGetAttributesRequest,
3463 fidl::encoding::DefaultFuchsiaResourceDialect
3464 );
3465 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3466 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3467 Ok(DirectoryRequest::GetAttributes {
3468 query: req.query,
3469
3470 responder: DirectoryGetAttributesResponder {
3471 control_handle: std::mem::ManuallyDrop::new(control_handle),
3472 tx_id: header.tx_id,
3473 },
3474 })
3475 }
3476 0x3308c1da5a89bf08 => {
3477 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3478 let mut req = fidl::new_empty!(
3479 MutableNodeAttributes,
3480 fidl::encoding::DefaultFuchsiaResourceDialect
3481 );
3482 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
3483 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3484 Ok(DirectoryRequest::UpdateAttributes {
3485 payload: req,
3486 responder: DirectoryUpdateAttributesResponder {
3487 control_handle: std::mem::ManuallyDrop::new(control_handle),
3488 tx_id: header.tx_id,
3489 },
3490 })
3491 }
3492 0x2c5c27ca0ab5dc49 => {
3493 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3494 let mut req = fidl::new_empty!(
3495 fidl::encoding::EmptyPayload,
3496 fidl::encoding::DefaultFuchsiaResourceDialect
3497 );
3498 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3499 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3500 Ok(DirectoryRequest::Sync {
3501 responder: DirectorySyncResponder {
3502 control_handle: std::mem::ManuallyDrop::new(control_handle),
3503 tx_id: header.tx_id,
3504 },
3505 })
3506 }
3507 0x4b61033de007fcd0 => {
3508 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3509 let mut req = fidl::new_empty!(
3510 NodeListExtendedAttributesRequest,
3511 fidl::encoding::DefaultFuchsiaResourceDialect
3512 );
3513 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3514 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3515 Ok(DirectoryRequest::ListExtendedAttributes {
3516 iterator: req.iterator,
3517
3518 control_handle,
3519 })
3520 }
3521 0x45ffa3ccfdeb76db => {
3522 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3523 let mut req = fidl::new_empty!(
3524 NodeGetExtendedAttributeRequest,
3525 fidl::encoding::DefaultFuchsiaResourceDialect
3526 );
3527 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3528 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3529 Ok(DirectoryRequest::GetExtendedAttribute {
3530 name: req.name,
3531
3532 responder: DirectoryGetExtendedAttributeResponder {
3533 control_handle: std::mem::ManuallyDrop::new(control_handle),
3534 tx_id: header.tx_id,
3535 },
3536 })
3537 }
3538 0x4a951362f681f23c => {
3539 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3540 let mut req = fidl::new_empty!(
3541 NodeSetExtendedAttributeRequest,
3542 fidl::encoding::DefaultFuchsiaResourceDialect
3543 );
3544 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3545 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3546 Ok(DirectoryRequest::SetExtendedAttribute {
3547 name: req.name,
3548 value: req.value,
3549 mode: req.mode,
3550
3551 responder: DirectorySetExtendedAttributeResponder {
3552 control_handle: std::mem::ManuallyDrop::new(control_handle),
3553 tx_id: header.tx_id,
3554 },
3555 })
3556 }
3557 0x7a0b9f3a9bf9032d => {
3558 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3559 let mut req = fidl::new_empty!(
3560 NodeRemoveExtendedAttributeRequest,
3561 fidl::encoding::DefaultFuchsiaResourceDialect
3562 );
3563 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3564 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3565 Ok(DirectoryRequest::RemoveExtendedAttribute {
3566 name: req.name,
3567
3568 responder: DirectoryRemoveExtendedAttributeResponder {
3569 control_handle: std::mem::ManuallyDrop::new(control_handle),
3570 tx_id: header.tx_id,
3571 },
3572 })
3573 }
3574 0x568ddcb9a9cbb6d9 => {
3575 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3576 let mut req = fidl::new_empty!(
3577 OpenableOpenRequest,
3578 fidl::encoding::DefaultFuchsiaResourceDialect
3579 );
3580 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3581 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3582 Ok(DirectoryRequest::Open {
3583 path: req.path,
3584 flags: req.flags,
3585 options: req.options,
3586 object: req.object,
3587
3588 control_handle,
3589 })
3590 }
3591 0x2c5044561d685ec0 => {
3592 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3593 let mut req = fidl::new_empty!(
3594 DirectoryDeprecatedOpenRequest,
3595 fidl::encoding::DefaultFuchsiaResourceDialect
3596 );
3597 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3598 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3599 Ok(DirectoryRequest::DeprecatedOpen {
3600 flags: req.flags,
3601 mode: req.mode,
3602 path: req.path,
3603 object: req.object,
3604
3605 control_handle,
3606 })
3607 }
3608 0x3582806bf27faa0a => {
3609 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3610 let mut req = fidl::new_empty!(
3611 DirectoryReadDirentsRequest,
3612 fidl::encoding::DefaultFuchsiaResourceDialect
3613 );
3614 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
3615 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3616 Ok(DirectoryRequest::ReadDirents {
3617 max_bytes: req.max_bytes,
3618
3619 responder: DirectoryReadDirentsResponder {
3620 control_handle: std::mem::ManuallyDrop::new(control_handle),
3621 tx_id: header.tx_id,
3622 },
3623 })
3624 }
3625 0x16b1202af0f34c71 => {
3626 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3627 let mut req = fidl::new_empty!(
3628 fidl::encoding::EmptyPayload,
3629 fidl::encoding::DefaultFuchsiaResourceDialect
3630 );
3631 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3632 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3633 Ok(DirectoryRequest::Rewind {
3634 responder: DirectoryRewindResponder {
3635 control_handle: std::mem::ManuallyDrop::new(control_handle),
3636 tx_id: header.tx_id,
3637 },
3638 })
3639 }
3640 0x26ae9d18763c8655 => {
3641 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3642 let mut req = fidl::new_empty!(
3643 fidl::encoding::EmptyPayload,
3644 fidl::encoding::DefaultFuchsiaResourceDialect
3645 );
3646 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3647 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3648 Ok(DirectoryRequest::DeprecatedGetToken {
3649 responder: DirectoryDeprecatedGetTokenResponder {
3650 control_handle: std::mem::ManuallyDrop::new(control_handle),
3651 tx_id: header.tx_id,
3652 },
3653 })
3654 }
3655 0x740604c0c7c930e7 => {
3656 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3657 let mut req = fidl::new_empty!(
3658 DirectoryLinkRequest,
3659 fidl::encoding::DefaultFuchsiaResourceDialect
3660 );
3661 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
3662 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3663 Ok(DirectoryRequest::Link {
3664 src: req.src,
3665 dst_parent_token: req.dst_parent_token,
3666 dst: req.dst,
3667
3668 responder: DirectoryLinkResponder {
3669 control_handle: std::mem::ManuallyDrop::new(control_handle),
3670 tx_id: header.tx_id,
3671 },
3672 })
3673 }
3674 0x750a0326a78d7bed => {
3675 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3676 let mut req = fidl::new_empty!(
3677 DirectoryUnlinkRequest,
3678 fidl::encoding::DefaultFuchsiaResourceDialect
3679 );
3680 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3681 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3682 Ok(DirectoryRequest::Unlink {
3683 name: req.name,
3684 options: req.options,
3685
3686 responder: DirectoryUnlinkResponder {
3687 control_handle: std::mem::ManuallyDrop::new(control_handle),
3688 tx_id: header.tx_id,
3689 },
3690 })
3691 }
3692 0x7060e7723b9928de => {
3693 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3694 let mut req = fidl::new_empty!(
3695 DirectoryRenameRequest,
3696 fidl::encoding::DefaultFuchsiaResourceDialect
3697 );
3698 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
3699 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3700 Ok(DirectoryRequest::Rename {
3701 src: req.src,
3702 dst_parent_token: req.dst_parent_token,
3703 dst: req.dst,
3704
3705 responder: DirectoryRenameResponder {
3706 control_handle: std::mem::ManuallyDrop::new(control_handle),
3707 tx_id: header.tx_id,
3708 },
3709 })
3710 }
3711 0x21ce0f19ec043889 => {
3712 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3713 let mut req = fidl::new_empty!(
3714 DirectoryCreateSymlinkRequest,
3715 fidl::encoding::DefaultFuchsiaResourceDialect
3716 );
3717 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3718 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3719 Ok(DirectoryRequest::CreateSymlink {
3720 name: req.name,
3721 target: req.target,
3722 connection: req.connection,
3723
3724 responder: DirectoryCreateSymlinkResponder {
3725 control_handle: std::mem::ManuallyDrop::new(control_handle),
3726 tx_id: header.tx_id,
3727 },
3728 })
3729 }
3730 0x5717193a59d66d91 => {
3731 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3732 let mut req = fidl::new_empty!(
3733 DirectoryWatchRequest,
3734 fidl::encoding::DefaultFuchsiaResourceDialect
3735 );
3736 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
3737 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3738 Ok(DirectoryRequest::Watch {
3739 mask: req.mask,
3740 options: req.options,
3741 watcher: req.watcher,
3742
3743 responder: DirectoryWatchResponder {
3744 control_handle: std::mem::ManuallyDrop::new(control_handle),
3745 tx_id: header.tx_id,
3746 },
3747 })
3748 }
3749 _ if header.tx_id == 0
3750 && header
3751 .dynamic_flags()
3752 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3753 {
3754 Ok(DirectoryRequest::_UnknownMethod {
3755 ordinal: header.ordinal,
3756 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3757 method_type: fidl::MethodType::OneWay,
3758 })
3759 }
3760 _ if header
3761 .dynamic_flags()
3762 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3763 {
3764 this.inner.send_framework_err(
3765 fidl::encoding::FrameworkErr::UnknownMethod,
3766 header.tx_id,
3767 header.ordinal,
3768 header.dynamic_flags(),
3769 (bytes, handles),
3770 )?;
3771 Ok(DirectoryRequest::_UnknownMethod {
3772 ordinal: header.ordinal,
3773 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3774 method_type: fidl::MethodType::TwoWay,
3775 })
3776 }
3777 _ => Err(fidl::Error::UnknownOrdinal {
3778 ordinal: header.ordinal,
3779 protocol_name:
3780 <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3781 }),
3782 }))
3783 },
3784 )
3785 }
3786}
3787
3788#[derive(Debug)]
3790pub enum DirectoryRequest {
3791 AdvisoryLock {
3815 request: AdvisoryLockRequest,
3816 responder: DirectoryAdvisoryLockResponder,
3817 },
3818 Clone {
3819 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3820 control_handle: DirectoryControlHandle,
3821 },
3822 Close {
3833 responder: DirectoryCloseResponder,
3834 },
3835 Query {
3836 responder: DirectoryQueryResponder,
3837 },
3838 DeprecatedGetAttr {
3842 responder: DirectoryDeprecatedGetAttrResponder,
3843 },
3844 DeprecatedSetAttr {
3846 flags: NodeAttributeFlags,
3847 attributes: NodeAttributes,
3848 responder: DirectoryDeprecatedSetAttrResponder,
3849 },
3850 DeprecatedGetFlags {
3852 responder: DirectoryDeprecatedGetFlagsResponder,
3853 },
3854 DeprecatedSetFlags {
3856 flags: OpenFlags,
3857 responder: DirectoryDeprecatedSetFlagsResponder,
3858 },
3859 GetFlags {
3868 responder: DirectoryGetFlagsResponder,
3869 },
3870 SetFlags {
3880 flags: Flags,
3881 responder: DirectorySetFlagsResponder,
3882 },
3883 QueryFilesystem {
3887 responder: DirectoryQueryFilesystemResponder,
3888 },
3889 GetToken {
3896 responder: DirectoryGetTokenResponder,
3897 },
3898 GetAttributes {
3912 query: NodeAttributesQuery,
3913 responder: DirectoryGetAttributesResponder,
3914 },
3915 UpdateAttributes {
3924 payload: MutableNodeAttributes,
3925 responder: DirectoryUpdateAttributesResponder,
3926 },
3927 Sync {
3937 responder: DirectorySyncResponder,
3938 },
3939 ListExtendedAttributes {
3948 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
3949 control_handle: DirectoryControlHandle,
3950 },
3951 GetExtendedAttribute {
3958 name: Vec<u8>,
3959 responder: DirectoryGetExtendedAttributeResponder,
3960 },
3961 SetExtendedAttribute {
3969 name: Vec<u8>,
3970 value: ExtendedAttributeValue,
3971 mode: SetExtendedAttributeMode,
3972 responder: DirectorySetExtendedAttributeResponder,
3973 },
3974 RemoveExtendedAttribute {
3980 name: Vec<u8>,
3981 responder: DirectoryRemoveExtendedAttributeResponder,
3982 },
3983 Open {
3990 path: String,
3991 flags: Flags,
3992 options: Options,
3993 object: fidl::Channel,
3994 control_handle: DirectoryControlHandle,
3995 },
3996 DeprecatedOpen {
3998 flags: OpenFlags,
3999 mode: ModeType,
4000 path: String,
4001 object: fidl::endpoints::ServerEnd<NodeMarker>,
4002 control_handle: DirectoryControlHandle,
4003 },
4004 ReadDirents {
4031 max_bytes: u64,
4032 responder: DirectoryReadDirentsResponder,
4033 },
4034 Rewind {
4040 responder: DirectoryRewindResponder,
4041 },
4042 DeprecatedGetToken {
4051 responder: DirectoryDeprecatedGetTokenResponder,
4052 },
4053 Link {
4070 src: String,
4071 dst_parent_token: fidl::NullableHandle,
4072 dst: String,
4073 responder: DirectoryLinkResponder,
4074 },
4075 Unlink {
4100 name: String,
4101 options: UnlinkOptions,
4102 responder: DirectoryUnlinkResponder,
4103 },
4104 Rename {
4130 src: String,
4131 dst_parent_token: fidl::Event,
4132 dst: String,
4133 responder: DirectoryRenameResponder,
4134 },
4135 CreateSymlink {
4150 name: String,
4151 target: Vec<u8>,
4152 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4153 responder: DirectoryCreateSymlinkResponder,
4154 },
4155 Watch {
4164 mask: WatchMask,
4165 options: u32,
4166 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4167 responder: DirectoryWatchResponder,
4168 },
4169 #[non_exhaustive]
4171 _UnknownMethod {
4172 ordinal: u64,
4174 control_handle: DirectoryControlHandle,
4175 method_type: fidl::MethodType,
4176 },
4177}
4178
4179impl DirectoryRequest {
4180 #[allow(irrefutable_let_patterns)]
4181 pub fn into_advisory_lock(
4182 self,
4183 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
4184 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
4185 Some((request, responder))
4186 } else {
4187 None
4188 }
4189 }
4190
4191 #[allow(irrefutable_let_patterns)]
4192 pub fn into_clone(
4193 self,
4194 ) -> Option<(
4195 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
4196 DirectoryControlHandle,
4197 )> {
4198 if let DirectoryRequest::Clone { request, control_handle } = self {
4199 Some((request, control_handle))
4200 } else {
4201 None
4202 }
4203 }
4204
4205 #[allow(irrefutable_let_patterns)]
4206 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
4207 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
4208 }
4209
4210 #[allow(irrefutable_let_patterns)]
4211 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
4212 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
4213 }
4214
4215 #[allow(irrefutable_let_patterns)]
4216 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
4217 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
4218 Some((responder))
4219 } else {
4220 None
4221 }
4222 }
4223
4224 #[allow(irrefutable_let_patterns)]
4225 pub fn into_deprecated_set_attr(
4226 self,
4227 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
4228 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
4229 Some((flags, attributes, responder))
4230 } else {
4231 None
4232 }
4233 }
4234
4235 #[allow(irrefutable_let_patterns)]
4236 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
4237 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
4238 Some((responder))
4239 } else {
4240 None
4241 }
4242 }
4243
4244 #[allow(irrefutable_let_patterns)]
4245 pub fn into_deprecated_set_flags(
4246 self,
4247 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
4248 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
4249 Some((flags, responder))
4250 } else {
4251 None
4252 }
4253 }
4254
4255 #[allow(irrefutable_let_patterns)]
4256 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
4257 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
4258 }
4259
4260 #[allow(irrefutable_let_patterns)]
4261 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
4262 if let DirectoryRequest::SetFlags { flags, responder } = self {
4263 Some((flags, responder))
4264 } else {
4265 None
4266 }
4267 }
4268
4269 #[allow(irrefutable_let_patterns)]
4270 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
4271 if let DirectoryRequest::QueryFilesystem { responder } = self {
4272 Some((responder))
4273 } else {
4274 None
4275 }
4276 }
4277
4278 #[allow(irrefutable_let_patterns)]
4279 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
4280 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
4281 }
4282
4283 #[allow(irrefutable_let_patterns)]
4284 pub fn into_get_attributes(
4285 self,
4286 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
4287 if let DirectoryRequest::GetAttributes { query, responder } = self {
4288 Some((query, responder))
4289 } else {
4290 None
4291 }
4292 }
4293
4294 #[allow(irrefutable_let_patterns)]
4295 pub fn into_update_attributes(
4296 self,
4297 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
4298 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
4299 Some((payload, responder))
4300 } else {
4301 None
4302 }
4303 }
4304
4305 #[allow(irrefutable_let_patterns)]
4306 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
4307 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
4308 }
4309
4310 #[allow(irrefutable_let_patterns)]
4311 pub fn into_list_extended_attributes(
4312 self,
4313 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, DirectoryControlHandle)>
4314 {
4315 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
4316 Some((iterator, control_handle))
4317 } else {
4318 None
4319 }
4320 }
4321
4322 #[allow(irrefutable_let_patterns)]
4323 pub fn into_get_extended_attribute(
4324 self,
4325 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
4326 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
4327 Some((name, responder))
4328 } else {
4329 None
4330 }
4331 }
4332
4333 #[allow(irrefutable_let_patterns)]
4334 pub fn into_set_extended_attribute(
4335 self,
4336 ) -> Option<(
4337 Vec<u8>,
4338 ExtendedAttributeValue,
4339 SetExtendedAttributeMode,
4340 DirectorySetExtendedAttributeResponder,
4341 )> {
4342 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
4343 Some((name, value, mode, responder))
4344 } else {
4345 None
4346 }
4347 }
4348
4349 #[allow(irrefutable_let_patterns)]
4350 pub fn into_remove_extended_attribute(
4351 self,
4352 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
4353 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
4354 Some((name, responder))
4355 } else {
4356 None
4357 }
4358 }
4359
4360 #[allow(irrefutable_let_patterns)]
4361 pub fn into_open(
4362 self,
4363 ) -> Option<(String, Flags, Options, fidl::Channel, DirectoryControlHandle)> {
4364 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
4365 Some((path, flags, options, object, control_handle))
4366 } else {
4367 None
4368 }
4369 }
4370
4371 #[allow(irrefutable_let_patterns)]
4372 pub fn into_deprecated_open(
4373 self,
4374 ) -> Option<(
4375 OpenFlags,
4376 ModeType,
4377 String,
4378 fidl::endpoints::ServerEnd<NodeMarker>,
4379 DirectoryControlHandle,
4380 )> {
4381 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
4382 {
4383 Some((flags, mode, path, object, control_handle))
4384 } else {
4385 None
4386 }
4387 }
4388
4389 #[allow(irrefutable_let_patterns)]
4390 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
4391 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
4392 Some((max_bytes, responder))
4393 } else {
4394 None
4395 }
4396 }
4397
4398 #[allow(irrefutable_let_patterns)]
4399 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
4400 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
4401 }
4402
4403 #[allow(irrefutable_let_patterns)]
4404 pub fn into_deprecated_get_token(self) -> Option<(DirectoryDeprecatedGetTokenResponder)> {
4405 if let DirectoryRequest::DeprecatedGetToken { responder } = self {
4406 Some((responder))
4407 } else {
4408 None
4409 }
4410 }
4411
4412 #[allow(irrefutable_let_patterns)]
4413 pub fn into_link(
4414 self,
4415 ) -> Option<(String, fidl::NullableHandle, String, DirectoryLinkResponder)> {
4416 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
4417 Some((src, dst_parent_token, dst, responder))
4418 } else {
4419 None
4420 }
4421 }
4422
4423 #[allow(irrefutable_let_patterns)]
4424 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
4425 if let DirectoryRequest::Unlink { name, options, responder } = self {
4426 Some((name, options, responder))
4427 } else {
4428 None
4429 }
4430 }
4431
4432 #[allow(irrefutable_let_patterns)]
4433 pub fn into_rename(self) -> Option<(String, fidl::Event, String, DirectoryRenameResponder)> {
4434 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
4435 Some((src, dst_parent_token, dst, responder))
4436 } else {
4437 None
4438 }
4439 }
4440
4441 #[allow(irrefutable_let_patterns)]
4442 pub fn into_create_symlink(
4443 self,
4444 ) -> Option<(
4445 String,
4446 Vec<u8>,
4447 Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4448 DirectoryCreateSymlinkResponder,
4449 )> {
4450 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
4451 Some((name, target, connection, responder))
4452 } else {
4453 None
4454 }
4455 }
4456
4457 #[allow(irrefutable_let_patterns)]
4458 pub fn into_watch(
4459 self,
4460 ) -> Option<(
4461 WatchMask,
4462 u32,
4463 fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4464 DirectoryWatchResponder,
4465 )> {
4466 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
4467 Some((mask, options, watcher, responder))
4468 } else {
4469 None
4470 }
4471 }
4472
4473 pub fn method_name(&self) -> &'static str {
4475 match *self {
4476 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
4477 DirectoryRequest::Clone { .. } => "clone",
4478 DirectoryRequest::Close { .. } => "close",
4479 DirectoryRequest::Query { .. } => "query",
4480 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
4481 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
4482 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
4483 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
4484 DirectoryRequest::GetFlags { .. } => "get_flags",
4485 DirectoryRequest::SetFlags { .. } => "set_flags",
4486 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
4487 DirectoryRequest::GetToken { .. } => "get_token",
4488 DirectoryRequest::GetAttributes { .. } => "get_attributes",
4489 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
4490 DirectoryRequest::Sync { .. } => "sync",
4491 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
4492 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
4493 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
4494 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
4495 DirectoryRequest::Open { .. } => "open",
4496 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
4497 DirectoryRequest::ReadDirents { .. } => "read_dirents",
4498 DirectoryRequest::Rewind { .. } => "rewind",
4499 DirectoryRequest::DeprecatedGetToken { .. } => "deprecated_get_token",
4500 DirectoryRequest::Link { .. } => "link",
4501 DirectoryRequest::Unlink { .. } => "unlink",
4502 DirectoryRequest::Rename { .. } => "rename",
4503 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
4504 DirectoryRequest::Watch { .. } => "watch",
4505 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4506 "unknown one-way method"
4507 }
4508 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4509 "unknown two-way method"
4510 }
4511 }
4512 }
4513}
4514
4515#[derive(Debug, Clone)]
4516pub struct DirectoryControlHandle {
4517 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4518}
4519
4520impl DirectoryControlHandle {
4521 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
4522 self.inner.shutdown_with_epitaph(status.into())
4523 }
4524}
4525
4526impl fidl::endpoints::ControlHandle for DirectoryControlHandle {
4527 fn shutdown(&self) {
4528 self.inner.shutdown()
4529 }
4530
4531 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
4532 self.inner.shutdown_with_epitaph(status)
4533 }
4534
4535 fn is_closed(&self) -> bool {
4536 self.inner.channel().is_closed()
4537 }
4538 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4539 self.inner.channel().on_closed()
4540 }
4541
4542 #[cfg(target_os = "fuchsia")]
4543 fn signal_peer(
4544 &self,
4545 clear_mask: zx::Signals,
4546 set_mask: zx::Signals,
4547 ) -> Result<(), zx_status::Status> {
4548 use fidl::Peered;
4549 self.inner.channel().signal_peer(clear_mask, set_mask)
4550 }
4551}
4552
4553impl DirectoryControlHandle {
4554 pub fn send_on_open_(
4555 &self,
4556 mut s: i32,
4557 mut info: Option<NodeInfoDeprecated>,
4558 ) -> Result<(), fidl::Error> {
4559 self.inner.send::<NodeOnOpenRequest>(
4560 (s, info.as_mut()),
4561 0,
4562 0x7fc7bbb1dbfd1972,
4563 fidl::encoding::DynamicFlags::FLEXIBLE,
4564 )
4565 }
4566
4567 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
4568 self.inner.send::<Representation>(
4569 &mut payload,
4570 0,
4571 0x5cb40567d80a510c,
4572 fidl::encoding::DynamicFlags::empty(),
4573 )
4574 }
4575}
4576
4577#[must_use = "FIDL methods require a response to be sent"]
4578#[derive(Debug)]
4579pub struct DirectoryAdvisoryLockResponder {
4580 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4581 tx_id: u32,
4582}
4583
4584impl std::ops::Drop for DirectoryAdvisoryLockResponder {
4588 fn drop(&mut self) {
4589 self.control_handle.shutdown();
4590 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4592 }
4593}
4594
4595impl fidl::endpoints::Responder for DirectoryAdvisoryLockResponder {
4596 type ControlHandle = DirectoryControlHandle;
4597
4598 fn control_handle(&self) -> &DirectoryControlHandle {
4599 &self.control_handle
4600 }
4601
4602 fn drop_without_shutdown(mut self) {
4603 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4605 std::mem::forget(self);
4607 }
4608}
4609
4610impl DirectoryAdvisoryLockResponder {
4611 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4615 let _result = self.send_raw(result);
4616 if _result.is_err() {
4617 self.control_handle.shutdown();
4618 }
4619 self.drop_without_shutdown();
4620 _result
4621 }
4622
4623 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4625 let _result = self.send_raw(result);
4626 self.drop_without_shutdown();
4627 _result
4628 }
4629
4630 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4631 self.control_handle
4632 .inner
4633 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4634 result,
4635 self.tx_id,
4636 0x6ee9c0ad53ec87aa,
4637 fidl::encoding::DynamicFlags::empty(),
4638 )
4639 }
4640}
4641
4642#[must_use = "FIDL methods require a response to be sent"]
4643#[derive(Debug)]
4644pub struct DirectoryCloseResponder {
4645 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4646 tx_id: u32,
4647}
4648
4649impl std::ops::Drop for DirectoryCloseResponder {
4653 fn drop(&mut self) {
4654 self.control_handle.shutdown();
4655 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4657 }
4658}
4659
4660impl fidl::endpoints::Responder for DirectoryCloseResponder {
4661 type ControlHandle = DirectoryControlHandle;
4662
4663 fn control_handle(&self) -> &DirectoryControlHandle {
4664 &self.control_handle
4665 }
4666
4667 fn drop_without_shutdown(mut self) {
4668 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4670 std::mem::forget(self);
4672 }
4673}
4674
4675impl DirectoryCloseResponder {
4676 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4680 let _result = self.send_raw(result);
4681 if _result.is_err() {
4682 self.control_handle.shutdown();
4683 }
4684 self.drop_without_shutdown();
4685 _result
4686 }
4687
4688 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4690 let _result = self.send_raw(result);
4691 self.drop_without_shutdown();
4692 _result
4693 }
4694
4695 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4696 self.control_handle
4697 .inner
4698 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4699 result,
4700 self.tx_id,
4701 0x5ac5d459ad7f657e,
4702 fidl::encoding::DynamicFlags::empty(),
4703 )
4704 }
4705}
4706
4707#[must_use = "FIDL methods require a response to be sent"]
4708#[derive(Debug)]
4709pub struct DirectoryQueryResponder {
4710 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4711 tx_id: u32,
4712}
4713
4714impl std::ops::Drop for DirectoryQueryResponder {
4718 fn drop(&mut self) {
4719 self.control_handle.shutdown();
4720 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4722 }
4723}
4724
4725impl fidl::endpoints::Responder for DirectoryQueryResponder {
4726 type ControlHandle = DirectoryControlHandle;
4727
4728 fn control_handle(&self) -> &DirectoryControlHandle {
4729 &self.control_handle
4730 }
4731
4732 fn drop_without_shutdown(mut self) {
4733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4735 std::mem::forget(self);
4737 }
4738}
4739
4740impl DirectoryQueryResponder {
4741 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4745 let _result = self.send_raw(protocol);
4746 if _result.is_err() {
4747 self.control_handle.shutdown();
4748 }
4749 self.drop_without_shutdown();
4750 _result
4751 }
4752
4753 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4755 let _result = self.send_raw(protocol);
4756 self.drop_without_shutdown();
4757 _result
4758 }
4759
4760 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4761 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4762 (protocol,),
4763 self.tx_id,
4764 0x2658edee9decfc06,
4765 fidl::encoding::DynamicFlags::empty(),
4766 )
4767 }
4768}
4769
4770#[must_use = "FIDL methods require a response to be sent"]
4771#[derive(Debug)]
4772pub struct DirectoryDeprecatedGetAttrResponder {
4773 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4774 tx_id: u32,
4775}
4776
4777impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
4781 fn drop(&mut self) {
4782 self.control_handle.shutdown();
4783 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4785 }
4786}
4787
4788impl fidl::endpoints::Responder for DirectoryDeprecatedGetAttrResponder {
4789 type ControlHandle = DirectoryControlHandle;
4790
4791 fn control_handle(&self) -> &DirectoryControlHandle {
4792 &self.control_handle
4793 }
4794
4795 fn drop_without_shutdown(mut self) {
4796 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4798 std::mem::forget(self);
4800 }
4801}
4802
4803impl DirectoryDeprecatedGetAttrResponder {
4804 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4808 let _result = self.send_raw(s, attributes);
4809 if _result.is_err() {
4810 self.control_handle.shutdown();
4811 }
4812 self.drop_without_shutdown();
4813 _result
4814 }
4815
4816 pub fn send_no_shutdown_on_err(
4818 self,
4819 mut s: i32,
4820 mut attributes: &NodeAttributes,
4821 ) -> Result<(), fidl::Error> {
4822 let _result = self.send_raw(s, attributes);
4823 self.drop_without_shutdown();
4824 _result
4825 }
4826
4827 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4828 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
4829 (s, attributes),
4830 self.tx_id,
4831 0x78985e216314dafd,
4832 fidl::encoding::DynamicFlags::empty(),
4833 )
4834 }
4835}
4836
4837#[must_use = "FIDL methods require a response to be sent"]
4838#[derive(Debug)]
4839pub struct DirectoryDeprecatedSetAttrResponder {
4840 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4841 tx_id: u32,
4842}
4843
4844impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
4848 fn drop(&mut self) {
4849 self.control_handle.shutdown();
4850 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4852 }
4853}
4854
4855impl fidl::endpoints::Responder for DirectoryDeprecatedSetAttrResponder {
4856 type ControlHandle = DirectoryControlHandle;
4857
4858 fn control_handle(&self) -> &DirectoryControlHandle {
4859 &self.control_handle
4860 }
4861
4862 fn drop_without_shutdown(mut self) {
4863 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4865 std::mem::forget(self);
4867 }
4868}
4869
4870impl DirectoryDeprecatedSetAttrResponder {
4871 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4875 let _result = self.send_raw(s);
4876 if _result.is_err() {
4877 self.control_handle.shutdown();
4878 }
4879 self.drop_without_shutdown();
4880 _result
4881 }
4882
4883 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4885 let _result = self.send_raw(s);
4886 self.drop_without_shutdown();
4887 _result
4888 }
4889
4890 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4891 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
4892 (s,),
4893 self.tx_id,
4894 0x4186c0f40d938f46,
4895 fidl::encoding::DynamicFlags::empty(),
4896 )
4897 }
4898}
4899
4900#[must_use = "FIDL methods require a response to be sent"]
4901#[derive(Debug)]
4902pub struct DirectoryDeprecatedGetFlagsResponder {
4903 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4904 tx_id: u32,
4905}
4906
4907impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
4911 fn drop(&mut self) {
4912 self.control_handle.shutdown();
4913 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4915 }
4916}
4917
4918impl fidl::endpoints::Responder for DirectoryDeprecatedGetFlagsResponder {
4919 type ControlHandle = DirectoryControlHandle;
4920
4921 fn control_handle(&self) -> &DirectoryControlHandle {
4922 &self.control_handle
4923 }
4924
4925 fn drop_without_shutdown(mut self) {
4926 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4928 std::mem::forget(self);
4930 }
4931}
4932
4933impl DirectoryDeprecatedGetFlagsResponder {
4934 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4938 let _result = self.send_raw(s, flags);
4939 if _result.is_err() {
4940 self.control_handle.shutdown();
4941 }
4942 self.drop_without_shutdown();
4943 _result
4944 }
4945
4946 pub fn send_no_shutdown_on_err(
4948 self,
4949 mut s: i32,
4950 mut flags: OpenFlags,
4951 ) -> Result<(), fidl::Error> {
4952 let _result = self.send_raw(s, flags);
4953 self.drop_without_shutdown();
4954 _result
4955 }
4956
4957 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4958 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
4959 (s, flags),
4960 self.tx_id,
4961 0x5b88fffb8eda3aa1,
4962 fidl::encoding::DynamicFlags::empty(),
4963 )
4964 }
4965}
4966
4967#[must_use = "FIDL methods require a response to be sent"]
4968#[derive(Debug)]
4969pub struct DirectoryDeprecatedSetFlagsResponder {
4970 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4971 tx_id: u32,
4972}
4973
4974impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4978 fn drop(&mut self) {
4979 self.control_handle.shutdown();
4980 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4982 }
4983}
4984
4985impl fidl::endpoints::Responder for DirectoryDeprecatedSetFlagsResponder {
4986 type ControlHandle = DirectoryControlHandle;
4987
4988 fn control_handle(&self) -> &DirectoryControlHandle {
4989 &self.control_handle
4990 }
4991
4992 fn drop_without_shutdown(mut self) {
4993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4995 std::mem::forget(self);
4997 }
4998}
4999
5000impl DirectoryDeprecatedSetFlagsResponder {
5001 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5005 let _result = self.send_raw(s);
5006 if _result.is_err() {
5007 self.control_handle.shutdown();
5008 }
5009 self.drop_without_shutdown();
5010 _result
5011 }
5012
5013 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5015 let _result = self.send_raw(s);
5016 self.drop_without_shutdown();
5017 _result
5018 }
5019
5020 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5021 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
5022 (s,),
5023 self.tx_id,
5024 0x5295b76c71fde733,
5025 fidl::encoding::DynamicFlags::empty(),
5026 )
5027 }
5028}
5029
5030#[must_use = "FIDL methods require a response to be sent"]
5031#[derive(Debug)]
5032pub struct DirectoryGetFlagsResponder {
5033 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5034 tx_id: u32,
5035}
5036
5037impl std::ops::Drop for DirectoryGetFlagsResponder {
5041 fn drop(&mut self) {
5042 self.control_handle.shutdown();
5043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5045 }
5046}
5047
5048impl fidl::endpoints::Responder for DirectoryGetFlagsResponder {
5049 type ControlHandle = DirectoryControlHandle;
5050
5051 fn control_handle(&self) -> &DirectoryControlHandle {
5052 &self.control_handle
5053 }
5054
5055 fn drop_without_shutdown(mut self) {
5056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5058 std::mem::forget(self);
5060 }
5061}
5062
5063impl DirectoryGetFlagsResponder {
5064 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5068 let _result = self.send_raw(result);
5069 if _result.is_err() {
5070 self.control_handle.shutdown();
5071 }
5072 self.drop_without_shutdown();
5073 _result
5074 }
5075
5076 pub fn send_no_shutdown_on_err(
5078 self,
5079 mut result: Result<Flags, i32>,
5080 ) -> Result<(), fidl::Error> {
5081 let _result = self.send_raw(result);
5082 self.drop_without_shutdown();
5083 _result
5084 }
5085
5086 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5087 self.control_handle
5088 .inner
5089 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
5090 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
5091 self.tx_id,
5092 0x176eb318f64ec23,
5093 fidl::encoding::DynamicFlags::FLEXIBLE,
5094 )
5095 }
5096}
5097
5098#[must_use = "FIDL methods require a response to be sent"]
5099#[derive(Debug)]
5100pub struct DirectorySetFlagsResponder {
5101 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5102 tx_id: u32,
5103}
5104
5105impl std::ops::Drop for DirectorySetFlagsResponder {
5109 fn drop(&mut self) {
5110 self.control_handle.shutdown();
5111 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5113 }
5114}
5115
5116impl fidl::endpoints::Responder for DirectorySetFlagsResponder {
5117 type ControlHandle = DirectoryControlHandle;
5118
5119 fn control_handle(&self) -> &DirectoryControlHandle {
5120 &self.control_handle
5121 }
5122
5123 fn drop_without_shutdown(mut self) {
5124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5126 std::mem::forget(self);
5128 }
5129}
5130
5131impl DirectorySetFlagsResponder {
5132 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5136 let _result = self.send_raw(result);
5137 if _result.is_err() {
5138 self.control_handle.shutdown();
5139 }
5140 self.drop_without_shutdown();
5141 _result
5142 }
5143
5144 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5146 let _result = self.send_raw(result);
5147 self.drop_without_shutdown();
5148 _result
5149 }
5150
5151 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5152 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5153 fidl::encoding::EmptyStruct,
5154 i32,
5155 >>(
5156 fidl::encoding::FlexibleResult::new(result),
5157 self.tx_id,
5158 0x55a8028685791ea8,
5159 fidl::encoding::DynamicFlags::FLEXIBLE,
5160 )
5161 }
5162}
5163
5164#[must_use = "FIDL methods require a response to be sent"]
5165#[derive(Debug)]
5166pub struct DirectoryQueryFilesystemResponder {
5167 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5168 tx_id: u32,
5169}
5170
5171impl std::ops::Drop for DirectoryQueryFilesystemResponder {
5175 fn drop(&mut self) {
5176 self.control_handle.shutdown();
5177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5179 }
5180}
5181
5182impl fidl::endpoints::Responder for DirectoryQueryFilesystemResponder {
5183 type ControlHandle = DirectoryControlHandle;
5184
5185 fn control_handle(&self) -> &DirectoryControlHandle {
5186 &self.control_handle
5187 }
5188
5189 fn drop_without_shutdown(mut self) {
5190 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5192 std::mem::forget(self);
5194 }
5195}
5196
5197impl DirectoryQueryFilesystemResponder {
5198 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5202 let _result = self.send_raw(s, info);
5203 if _result.is_err() {
5204 self.control_handle.shutdown();
5205 }
5206 self.drop_without_shutdown();
5207 _result
5208 }
5209
5210 pub fn send_no_shutdown_on_err(
5212 self,
5213 mut s: i32,
5214 mut info: Option<&FilesystemInfo>,
5215 ) -> Result<(), fidl::Error> {
5216 let _result = self.send_raw(s, info);
5217 self.drop_without_shutdown();
5218 _result
5219 }
5220
5221 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5222 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
5223 (s, info),
5224 self.tx_id,
5225 0x6f344a1c6b0a0610,
5226 fidl::encoding::DynamicFlags::empty(),
5227 )
5228 }
5229}
5230
5231#[must_use = "FIDL methods require a response to be sent"]
5232#[derive(Debug)]
5233pub struct DirectoryGetTokenResponder {
5234 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5235 tx_id: u32,
5236}
5237
5238impl std::ops::Drop for DirectoryGetTokenResponder {
5242 fn drop(&mut self) {
5243 self.control_handle.shutdown();
5244 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5246 }
5247}
5248
5249impl fidl::endpoints::Responder for DirectoryGetTokenResponder {
5250 type ControlHandle = DirectoryControlHandle;
5251
5252 fn control_handle(&self) -> &DirectoryControlHandle {
5253 &self.control_handle
5254 }
5255
5256 fn drop_without_shutdown(mut self) {
5257 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5259 std::mem::forget(self);
5261 }
5262}
5263
5264impl DirectoryGetTokenResponder {
5265 pub fn send(self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
5269 let _result = self.send_raw(result);
5270 if _result.is_err() {
5271 self.control_handle.shutdown();
5272 }
5273 self.drop_without_shutdown();
5274 _result
5275 }
5276
5277 pub fn send_no_shutdown_on_err(
5279 self,
5280 mut result: Result<fidl::Event, i32>,
5281 ) -> Result<(), fidl::Error> {
5282 let _result = self.send_raw(result);
5283 self.drop_without_shutdown();
5284 _result
5285 }
5286
5287 fn send_raw(&self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
5288 self.control_handle
5289 .inner
5290 .send::<fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>>(
5291 fidl::encoding::FlexibleResult::new(result.map(|token| (token,))),
5292 self.tx_id,
5293 0x5054f0ade7076cec,
5294 fidl::encoding::DynamicFlags::FLEXIBLE,
5295 )
5296 }
5297}
5298
5299#[must_use = "FIDL methods require a response to be sent"]
5300#[derive(Debug)]
5301pub struct DirectoryGetAttributesResponder {
5302 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5303 tx_id: u32,
5304}
5305
5306impl std::ops::Drop for DirectoryGetAttributesResponder {
5310 fn drop(&mut self) {
5311 self.control_handle.shutdown();
5312 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5314 }
5315}
5316
5317impl fidl::endpoints::Responder for DirectoryGetAttributesResponder {
5318 type ControlHandle = DirectoryControlHandle;
5319
5320 fn control_handle(&self) -> &DirectoryControlHandle {
5321 &self.control_handle
5322 }
5323
5324 fn drop_without_shutdown(mut self) {
5325 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5327 std::mem::forget(self);
5329 }
5330}
5331
5332impl DirectoryGetAttributesResponder {
5333 pub fn send(
5337 self,
5338 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5339 ) -> Result<(), fidl::Error> {
5340 let _result = self.send_raw(result);
5341 if _result.is_err() {
5342 self.control_handle.shutdown();
5343 }
5344 self.drop_without_shutdown();
5345 _result
5346 }
5347
5348 pub fn send_no_shutdown_on_err(
5350 self,
5351 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5352 ) -> Result<(), fidl::Error> {
5353 let _result = self.send_raw(result);
5354 self.drop_without_shutdown();
5355 _result
5356 }
5357
5358 fn send_raw(
5359 &self,
5360 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5361 ) -> Result<(), fidl::Error> {
5362 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
5363 result,
5364 self.tx_id,
5365 0x3d4396a638ea053b,
5366 fidl::encoding::DynamicFlags::empty(),
5367 )
5368 }
5369}
5370
5371#[must_use = "FIDL methods require a response to be sent"]
5372#[derive(Debug)]
5373pub struct DirectoryUpdateAttributesResponder {
5374 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5375 tx_id: u32,
5376}
5377
5378impl std::ops::Drop for DirectoryUpdateAttributesResponder {
5382 fn drop(&mut self) {
5383 self.control_handle.shutdown();
5384 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5386 }
5387}
5388
5389impl fidl::endpoints::Responder for DirectoryUpdateAttributesResponder {
5390 type ControlHandle = DirectoryControlHandle;
5391
5392 fn control_handle(&self) -> &DirectoryControlHandle {
5393 &self.control_handle
5394 }
5395
5396 fn drop_without_shutdown(mut self) {
5397 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5399 std::mem::forget(self);
5401 }
5402}
5403
5404impl DirectoryUpdateAttributesResponder {
5405 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5409 let _result = self.send_raw(result);
5410 if _result.is_err() {
5411 self.control_handle.shutdown();
5412 }
5413 self.drop_without_shutdown();
5414 _result
5415 }
5416
5417 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5419 let _result = self.send_raw(result);
5420 self.drop_without_shutdown();
5421 _result
5422 }
5423
5424 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5425 self.control_handle
5426 .inner
5427 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5428 result,
5429 self.tx_id,
5430 0x3308c1da5a89bf08,
5431 fidl::encoding::DynamicFlags::empty(),
5432 )
5433 }
5434}
5435
5436#[must_use = "FIDL methods require a response to be sent"]
5437#[derive(Debug)]
5438pub struct DirectorySyncResponder {
5439 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5440 tx_id: u32,
5441}
5442
5443impl std::ops::Drop for DirectorySyncResponder {
5447 fn drop(&mut self) {
5448 self.control_handle.shutdown();
5449 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5451 }
5452}
5453
5454impl fidl::endpoints::Responder for DirectorySyncResponder {
5455 type ControlHandle = DirectoryControlHandle;
5456
5457 fn control_handle(&self) -> &DirectoryControlHandle {
5458 &self.control_handle
5459 }
5460
5461 fn drop_without_shutdown(mut self) {
5462 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5464 std::mem::forget(self);
5466 }
5467}
5468
5469impl DirectorySyncResponder {
5470 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5474 let _result = self.send_raw(result);
5475 if _result.is_err() {
5476 self.control_handle.shutdown();
5477 }
5478 self.drop_without_shutdown();
5479 _result
5480 }
5481
5482 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5484 let _result = self.send_raw(result);
5485 self.drop_without_shutdown();
5486 _result
5487 }
5488
5489 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5490 self.control_handle
5491 .inner
5492 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5493 result,
5494 self.tx_id,
5495 0x2c5c27ca0ab5dc49,
5496 fidl::encoding::DynamicFlags::empty(),
5497 )
5498 }
5499}
5500
5501#[must_use = "FIDL methods require a response to be sent"]
5502#[derive(Debug)]
5503pub struct DirectoryGetExtendedAttributeResponder {
5504 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5505 tx_id: u32,
5506}
5507
5508impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
5512 fn drop(&mut self) {
5513 self.control_handle.shutdown();
5514 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5516 }
5517}
5518
5519impl fidl::endpoints::Responder for DirectoryGetExtendedAttributeResponder {
5520 type ControlHandle = DirectoryControlHandle;
5521
5522 fn control_handle(&self) -> &DirectoryControlHandle {
5523 &self.control_handle
5524 }
5525
5526 fn drop_without_shutdown(mut self) {
5527 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5529 std::mem::forget(self);
5531 }
5532}
5533
5534impl DirectoryGetExtendedAttributeResponder {
5535 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5539 let _result = self.send_raw(result);
5540 if _result.is_err() {
5541 self.control_handle.shutdown();
5542 }
5543 self.drop_without_shutdown();
5544 _result
5545 }
5546
5547 pub fn send_no_shutdown_on_err(
5549 self,
5550 mut result: Result<ExtendedAttributeValue, i32>,
5551 ) -> Result<(), fidl::Error> {
5552 let _result = self.send_raw(result);
5553 self.drop_without_shutdown();
5554 _result
5555 }
5556
5557 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5558 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
5559 result.as_mut().map_err(|e| *e),
5560 self.tx_id,
5561 0x45ffa3ccfdeb76db,
5562 fidl::encoding::DynamicFlags::empty(),
5563 )
5564 }
5565}
5566
5567#[must_use = "FIDL methods require a response to be sent"]
5568#[derive(Debug)]
5569pub struct DirectorySetExtendedAttributeResponder {
5570 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5571 tx_id: u32,
5572}
5573
5574impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
5578 fn drop(&mut self) {
5579 self.control_handle.shutdown();
5580 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5582 }
5583}
5584
5585impl fidl::endpoints::Responder for DirectorySetExtendedAttributeResponder {
5586 type ControlHandle = DirectoryControlHandle;
5587
5588 fn control_handle(&self) -> &DirectoryControlHandle {
5589 &self.control_handle
5590 }
5591
5592 fn drop_without_shutdown(mut self) {
5593 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5595 std::mem::forget(self);
5597 }
5598}
5599
5600impl DirectorySetExtendedAttributeResponder {
5601 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5605 let _result = self.send_raw(result);
5606 if _result.is_err() {
5607 self.control_handle.shutdown();
5608 }
5609 self.drop_without_shutdown();
5610 _result
5611 }
5612
5613 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5615 let _result = self.send_raw(result);
5616 self.drop_without_shutdown();
5617 _result
5618 }
5619
5620 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5621 self.control_handle
5622 .inner
5623 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5624 result,
5625 self.tx_id,
5626 0x4a951362f681f23c,
5627 fidl::encoding::DynamicFlags::empty(),
5628 )
5629 }
5630}
5631
5632#[must_use = "FIDL methods require a response to be sent"]
5633#[derive(Debug)]
5634pub struct DirectoryRemoveExtendedAttributeResponder {
5635 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5636 tx_id: u32,
5637}
5638
5639impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
5643 fn drop(&mut self) {
5644 self.control_handle.shutdown();
5645 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5647 }
5648}
5649
5650impl fidl::endpoints::Responder for DirectoryRemoveExtendedAttributeResponder {
5651 type ControlHandle = DirectoryControlHandle;
5652
5653 fn control_handle(&self) -> &DirectoryControlHandle {
5654 &self.control_handle
5655 }
5656
5657 fn drop_without_shutdown(mut self) {
5658 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5660 std::mem::forget(self);
5662 }
5663}
5664
5665impl DirectoryRemoveExtendedAttributeResponder {
5666 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5670 let _result = self.send_raw(result);
5671 if _result.is_err() {
5672 self.control_handle.shutdown();
5673 }
5674 self.drop_without_shutdown();
5675 _result
5676 }
5677
5678 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5680 let _result = self.send_raw(result);
5681 self.drop_without_shutdown();
5682 _result
5683 }
5684
5685 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5686 self.control_handle
5687 .inner
5688 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5689 result,
5690 self.tx_id,
5691 0x7a0b9f3a9bf9032d,
5692 fidl::encoding::DynamicFlags::empty(),
5693 )
5694 }
5695}
5696
5697#[must_use = "FIDL methods require a response to be sent"]
5698#[derive(Debug)]
5699pub struct DirectoryReadDirentsResponder {
5700 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5701 tx_id: u32,
5702}
5703
5704impl std::ops::Drop for DirectoryReadDirentsResponder {
5708 fn drop(&mut self) {
5709 self.control_handle.shutdown();
5710 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5712 }
5713}
5714
5715impl fidl::endpoints::Responder for DirectoryReadDirentsResponder {
5716 type ControlHandle = DirectoryControlHandle;
5717
5718 fn control_handle(&self) -> &DirectoryControlHandle {
5719 &self.control_handle
5720 }
5721
5722 fn drop_without_shutdown(mut self) {
5723 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5725 std::mem::forget(self);
5727 }
5728}
5729
5730impl DirectoryReadDirentsResponder {
5731 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5735 let _result = self.send_raw(s, dirents);
5736 if _result.is_err() {
5737 self.control_handle.shutdown();
5738 }
5739 self.drop_without_shutdown();
5740 _result
5741 }
5742
5743 pub fn send_no_shutdown_on_err(
5745 self,
5746 mut s: i32,
5747 mut dirents: &[u8],
5748 ) -> Result<(), fidl::Error> {
5749 let _result = self.send_raw(s, dirents);
5750 self.drop_without_shutdown();
5751 _result
5752 }
5753
5754 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5755 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
5756 (s, dirents),
5757 self.tx_id,
5758 0x3582806bf27faa0a,
5759 fidl::encoding::DynamicFlags::empty(),
5760 )
5761 }
5762}
5763
5764#[must_use = "FIDL methods require a response to be sent"]
5765#[derive(Debug)]
5766pub struct DirectoryRewindResponder {
5767 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5768 tx_id: u32,
5769}
5770
5771impl std::ops::Drop for DirectoryRewindResponder {
5775 fn drop(&mut self) {
5776 self.control_handle.shutdown();
5777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5779 }
5780}
5781
5782impl fidl::endpoints::Responder for DirectoryRewindResponder {
5783 type ControlHandle = DirectoryControlHandle;
5784
5785 fn control_handle(&self) -> &DirectoryControlHandle {
5786 &self.control_handle
5787 }
5788
5789 fn drop_without_shutdown(mut self) {
5790 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5792 std::mem::forget(self);
5794 }
5795}
5796
5797impl DirectoryRewindResponder {
5798 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5802 let _result = self.send_raw(s);
5803 if _result.is_err() {
5804 self.control_handle.shutdown();
5805 }
5806 self.drop_without_shutdown();
5807 _result
5808 }
5809
5810 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5812 let _result = self.send_raw(s);
5813 self.drop_without_shutdown();
5814 _result
5815 }
5816
5817 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5818 self.control_handle.inner.send::<DirectoryRewindResponse>(
5819 (s,),
5820 self.tx_id,
5821 0x16b1202af0f34c71,
5822 fidl::encoding::DynamicFlags::empty(),
5823 )
5824 }
5825}
5826
5827#[must_use = "FIDL methods require a response to be sent"]
5828#[derive(Debug)]
5829pub struct DirectoryDeprecatedGetTokenResponder {
5830 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5831 tx_id: u32,
5832}
5833
5834impl std::ops::Drop for DirectoryDeprecatedGetTokenResponder {
5838 fn drop(&mut self) {
5839 self.control_handle.shutdown();
5840 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5842 }
5843}
5844
5845impl fidl::endpoints::Responder for DirectoryDeprecatedGetTokenResponder {
5846 type ControlHandle = DirectoryControlHandle;
5847
5848 fn control_handle(&self) -> &DirectoryControlHandle {
5849 &self.control_handle
5850 }
5851
5852 fn drop_without_shutdown(mut self) {
5853 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5855 std::mem::forget(self);
5857 }
5858}
5859
5860impl DirectoryDeprecatedGetTokenResponder {
5861 pub fn send(
5865 self,
5866 mut s: i32,
5867 mut token: Option<fidl::NullableHandle>,
5868 ) -> Result<(), fidl::Error> {
5869 let _result = self.send_raw(s, token);
5870 if _result.is_err() {
5871 self.control_handle.shutdown();
5872 }
5873 self.drop_without_shutdown();
5874 _result
5875 }
5876
5877 pub fn send_no_shutdown_on_err(
5879 self,
5880 mut s: i32,
5881 mut token: Option<fidl::NullableHandle>,
5882 ) -> Result<(), fidl::Error> {
5883 let _result = self.send_raw(s, token);
5884 self.drop_without_shutdown();
5885 _result
5886 }
5887
5888 fn send_raw(
5889 &self,
5890 mut s: i32,
5891 mut token: Option<fidl::NullableHandle>,
5892 ) -> Result<(), fidl::Error> {
5893 self.control_handle.inner.send::<DirectoryDeprecatedGetTokenResponse>(
5894 (s, token),
5895 self.tx_id,
5896 0x26ae9d18763c8655,
5897 fidl::encoding::DynamicFlags::empty(),
5898 )
5899 }
5900}
5901
5902#[must_use = "FIDL methods require a response to be sent"]
5903#[derive(Debug)]
5904pub struct DirectoryLinkResponder {
5905 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5906 tx_id: u32,
5907}
5908
5909impl std::ops::Drop for DirectoryLinkResponder {
5913 fn drop(&mut self) {
5914 self.control_handle.shutdown();
5915 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5917 }
5918}
5919
5920impl fidl::endpoints::Responder for DirectoryLinkResponder {
5921 type ControlHandle = DirectoryControlHandle;
5922
5923 fn control_handle(&self) -> &DirectoryControlHandle {
5924 &self.control_handle
5925 }
5926
5927 fn drop_without_shutdown(mut self) {
5928 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5930 std::mem::forget(self);
5932 }
5933}
5934
5935impl DirectoryLinkResponder {
5936 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5940 let _result = self.send_raw(s);
5941 if _result.is_err() {
5942 self.control_handle.shutdown();
5943 }
5944 self.drop_without_shutdown();
5945 _result
5946 }
5947
5948 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5950 let _result = self.send_raw(s);
5951 self.drop_without_shutdown();
5952 _result
5953 }
5954
5955 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5956 self.control_handle.inner.send::<DirectoryLinkResponse>(
5957 (s,),
5958 self.tx_id,
5959 0x740604c0c7c930e7,
5960 fidl::encoding::DynamicFlags::empty(),
5961 )
5962 }
5963}
5964
5965#[must_use = "FIDL methods require a response to be sent"]
5966#[derive(Debug)]
5967pub struct DirectoryUnlinkResponder {
5968 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5969 tx_id: u32,
5970}
5971
5972impl std::ops::Drop for DirectoryUnlinkResponder {
5976 fn drop(&mut self) {
5977 self.control_handle.shutdown();
5978 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5980 }
5981}
5982
5983impl fidl::endpoints::Responder for DirectoryUnlinkResponder {
5984 type ControlHandle = DirectoryControlHandle;
5985
5986 fn control_handle(&self) -> &DirectoryControlHandle {
5987 &self.control_handle
5988 }
5989
5990 fn drop_without_shutdown(mut self) {
5991 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5993 std::mem::forget(self);
5995 }
5996}
5997
5998impl DirectoryUnlinkResponder {
5999 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6003 let _result = self.send_raw(result);
6004 if _result.is_err() {
6005 self.control_handle.shutdown();
6006 }
6007 self.drop_without_shutdown();
6008 _result
6009 }
6010
6011 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6013 let _result = self.send_raw(result);
6014 self.drop_without_shutdown();
6015 _result
6016 }
6017
6018 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6019 self.control_handle
6020 .inner
6021 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6022 result,
6023 self.tx_id,
6024 0x750a0326a78d7bed,
6025 fidl::encoding::DynamicFlags::empty(),
6026 )
6027 }
6028}
6029
6030#[must_use = "FIDL methods require a response to be sent"]
6031#[derive(Debug)]
6032pub struct DirectoryRenameResponder {
6033 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
6034 tx_id: u32,
6035}
6036
6037impl std::ops::Drop for DirectoryRenameResponder {
6041 fn drop(&mut self) {
6042 self.control_handle.shutdown();
6043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6045 }
6046}
6047
6048impl fidl::endpoints::Responder for DirectoryRenameResponder {
6049 type ControlHandle = DirectoryControlHandle;
6050
6051 fn control_handle(&self) -> &DirectoryControlHandle {
6052 &self.control_handle
6053 }
6054
6055 fn drop_without_shutdown(mut self) {
6056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6058 std::mem::forget(self);
6060 }
6061}
6062
6063impl DirectoryRenameResponder {
6064 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6068 let _result = self.send_raw(result);
6069 if _result.is_err() {
6070 self.control_handle.shutdown();
6071 }
6072 self.drop_without_shutdown();
6073 _result
6074 }
6075
6076 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6078 let _result = self.send_raw(result);
6079 self.drop_without_shutdown();
6080 _result
6081 }
6082
6083 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6084 self.control_handle
6085 .inner
6086 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6087 result,
6088 self.tx_id,
6089 0x7060e7723b9928de,
6090 fidl::encoding::DynamicFlags::empty(),
6091 )
6092 }
6093}
6094
6095#[must_use = "FIDL methods require a response to be sent"]
6096#[derive(Debug)]
6097pub struct DirectoryCreateSymlinkResponder {
6098 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
6099 tx_id: u32,
6100}
6101
6102impl std::ops::Drop for DirectoryCreateSymlinkResponder {
6106 fn drop(&mut self) {
6107 self.control_handle.shutdown();
6108 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6110 }
6111}
6112
6113impl fidl::endpoints::Responder for DirectoryCreateSymlinkResponder {
6114 type ControlHandle = DirectoryControlHandle;
6115
6116 fn control_handle(&self) -> &DirectoryControlHandle {
6117 &self.control_handle
6118 }
6119
6120 fn drop_without_shutdown(mut self) {
6121 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6123 std::mem::forget(self);
6125 }
6126}
6127
6128impl DirectoryCreateSymlinkResponder {
6129 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6133 let _result = self.send_raw(result);
6134 if _result.is_err() {
6135 self.control_handle.shutdown();
6136 }
6137 self.drop_without_shutdown();
6138 _result
6139 }
6140
6141 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6143 let _result = self.send_raw(result);
6144 self.drop_without_shutdown();
6145 _result
6146 }
6147
6148 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6149 self.control_handle
6150 .inner
6151 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6152 result,
6153 self.tx_id,
6154 0x21ce0f19ec043889,
6155 fidl::encoding::DynamicFlags::empty(),
6156 )
6157 }
6158}
6159
6160#[must_use = "FIDL methods require a response to be sent"]
6161#[derive(Debug)]
6162pub struct DirectoryWatchResponder {
6163 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
6164 tx_id: u32,
6165}
6166
6167impl std::ops::Drop for DirectoryWatchResponder {
6171 fn drop(&mut self) {
6172 self.control_handle.shutdown();
6173 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6175 }
6176}
6177
6178impl fidl::endpoints::Responder for DirectoryWatchResponder {
6179 type ControlHandle = DirectoryControlHandle;
6180
6181 fn control_handle(&self) -> &DirectoryControlHandle {
6182 &self.control_handle
6183 }
6184
6185 fn drop_without_shutdown(mut self) {
6186 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6188 std::mem::forget(self);
6190 }
6191}
6192
6193impl DirectoryWatchResponder {
6194 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
6198 let _result = self.send_raw(s);
6199 if _result.is_err() {
6200 self.control_handle.shutdown();
6201 }
6202 self.drop_without_shutdown();
6203 _result
6204 }
6205
6206 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
6208 let _result = self.send_raw(s);
6209 self.drop_without_shutdown();
6210 _result
6211 }
6212
6213 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
6214 self.control_handle.inner.send::<DirectoryWatchResponse>(
6215 (s,),
6216 self.tx_id,
6217 0x5717193a59d66d91,
6218 fidl::encoding::DynamicFlags::empty(),
6219 )
6220 }
6221}
6222
6223#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6224pub struct DirectoryWatcherMarker;
6225
6226impl fidl::endpoints::ProtocolMarker for DirectoryWatcherMarker {
6227 type Proxy = DirectoryWatcherProxy;
6228 type RequestStream = DirectoryWatcherRequestStream;
6229 #[cfg(target_os = "fuchsia")]
6230 type SynchronousProxy = DirectoryWatcherSynchronousProxy;
6231
6232 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
6233}
6234
6235pub trait DirectoryWatcherProxyInterface: Send + Sync {}
6236#[derive(Debug)]
6237#[cfg(target_os = "fuchsia")]
6238pub struct DirectoryWatcherSynchronousProxy {
6239 client: fidl::client::sync::Client,
6240}
6241
6242#[cfg(target_os = "fuchsia")]
6243impl fidl::endpoints::SynchronousProxy for DirectoryWatcherSynchronousProxy {
6244 type Proxy = DirectoryWatcherProxy;
6245 type Protocol = DirectoryWatcherMarker;
6246
6247 fn from_channel(inner: fidl::Channel) -> Self {
6248 Self::new(inner)
6249 }
6250
6251 fn into_channel(self) -> fidl::Channel {
6252 self.client.into_channel()
6253 }
6254
6255 fn as_channel(&self) -> &fidl::Channel {
6256 self.client.as_channel()
6257 }
6258}
6259
6260#[cfg(target_os = "fuchsia")]
6261impl DirectoryWatcherSynchronousProxy {
6262 pub fn new(channel: fidl::Channel) -> Self {
6263 Self { client: fidl::client::sync::Client::new(channel) }
6264 }
6265
6266 pub fn into_channel(self) -> fidl::Channel {
6267 self.client.into_channel()
6268 }
6269
6270 pub fn wait_for_event(
6273 &self,
6274 deadline: zx::MonotonicInstant,
6275 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6276 DirectoryWatcherEvent::decode(
6277 self.client.wait_for_event::<DirectoryWatcherMarker>(deadline)?,
6278 )
6279 }
6280}
6281
6282#[cfg(target_os = "fuchsia")]
6283impl From<DirectoryWatcherSynchronousProxy> for zx::NullableHandle {
6284 fn from(value: DirectoryWatcherSynchronousProxy) -> Self {
6285 value.into_channel().into()
6286 }
6287}
6288
6289#[cfg(target_os = "fuchsia")]
6290impl From<fidl::Channel> for DirectoryWatcherSynchronousProxy {
6291 fn from(value: fidl::Channel) -> Self {
6292 Self::new(value)
6293 }
6294}
6295
6296#[cfg(target_os = "fuchsia")]
6297impl fidl::endpoints::FromClient for DirectoryWatcherSynchronousProxy {
6298 type Protocol = DirectoryWatcherMarker;
6299
6300 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryWatcherMarker>) -> Self {
6301 Self::new(value.into_channel())
6302 }
6303}
6304
6305#[derive(Debug, Clone)]
6306pub struct DirectoryWatcherProxy {
6307 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6308}
6309
6310impl fidl::endpoints::Proxy for DirectoryWatcherProxy {
6311 type Protocol = DirectoryWatcherMarker;
6312
6313 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6314 Self::new(inner)
6315 }
6316
6317 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6318 self.client.into_channel().map_err(|client| Self { client })
6319 }
6320
6321 fn as_channel(&self) -> &::fidl::AsyncChannel {
6322 self.client.as_channel()
6323 }
6324}
6325
6326impl DirectoryWatcherProxy {
6327 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6329 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6330 Self { client: fidl::client::Client::new(channel, protocol_name) }
6331 }
6332
6333 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
6339 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
6340 }
6341}
6342
6343impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
6344
6345pub struct DirectoryWatcherEventStream {
6346 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6347}
6348
6349impl std::marker::Unpin for DirectoryWatcherEventStream {}
6350
6351impl futures::stream::FusedStream for DirectoryWatcherEventStream {
6352 fn is_terminated(&self) -> bool {
6353 self.event_receiver.is_terminated()
6354 }
6355}
6356
6357impl futures::Stream for DirectoryWatcherEventStream {
6358 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
6359
6360 fn poll_next(
6361 mut self: std::pin::Pin<&mut Self>,
6362 cx: &mut std::task::Context<'_>,
6363 ) -> std::task::Poll<Option<Self::Item>> {
6364 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6365 &mut self.event_receiver,
6366 cx
6367 )?) {
6368 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
6369 None => std::task::Poll::Ready(None),
6370 }
6371 }
6372}
6373
6374#[derive(Debug)]
6375pub enum DirectoryWatcherEvent {}
6376
6377impl DirectoryWatcherEvent {
6378 fn decode(
6380 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6381 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6382 let (bytes, _handles) = buf.split_mut();
6383 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6384 debug_assert_eq!(tx_header.tx_id, 0);
6385 match tx_header.ordinal {
6386 _ => Err(fidl::Error::UnknownOrdinal {
6387 ordinal: tx_header.ordinal,
6388 protocol_name:
6389 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6390 }),
6391 }
6392 }
6393}
6394
6395pub struct DirectoryWatcherRequestStream {
6397 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6398 is_terminated: bool,
6399}
6400
6401impl std::marker::Unpin for DirectoryWatcherRequestStream {}
6402
6403impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
6404 fn is_terminated(&self) -> bool {
6405 self.is_terminated
6406 }
6407}
6408
6409impl fidl::endpoints::RequestStream for DirectoryWatcherRequestStream {
6410 type Protocol = DirectoryWatcherMarker;
6411 type ControlHandle = DirectoryWatcherControlHandle;
6412
6413 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6414 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6415 }
6416
6417 fn control_handle(&self) -> Self::ControlHandle {
6418 DirectoryWatcherControlHandle { inner: self.inner.clone() }
6419 }
6420
6421 fn into_inner(
6422 self,
6423 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6424 {
6425 (self.inner, self.is_terminated)
6426 }
6427
6428 fn from_inner(
6429 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6430 is_terminated: bool,
6431 ) -> Self {
6432 Self { inner, is_terminated }
6433 }
6434}
6435
6436impl futures::Stream for DirectoryWatcherRequestStream {
6437 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
6438
6439 fn poll_next(
6440 mut self: std::pin::Pin<&mut Self>,
6441 cx: &mut std::task::Context<'_>,
6442 ) -> std::task::Poll<Option<Self::Item>> {
6443 let this = &mut *self;
6444 if this.inner.check_shutdown(cx) {
6445 this.is_terminated = true;
6446 return std::task::Poll::Ready(None);
6447 }
6448 if this.is_terminated {
6449 panic!("polled DirectoryWatcherRequestStream after completion");
6450 }
6451 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6452 |bytes, handles| {
6453 match this.inner.channel().read_etc(cx, bytes, handles) {
6454 std::task::Poll::Ready(Ok(())) => {}
6455 std::task::Poll::Pending => return std::task::Poll::Pending,
6456 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6457 this.is_terminated = true;
6458 return std::task::Poll::Ready(None);
6459 }
6460 std::task::Poll::Ready(Err(e)) => {
6461 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6462 e.into(),
6463 ))));
6464 }
6465 }
6466
6467 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6469
6470 std::task::Poll::Ready(Some(match header.ordinal {
6471 _ => Err(fidl::Error::UnknownOrdinal {
6472 ordinal: header.ordinal,
6473 protocol_name:
6474 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6475 }),
6476 }))
6477 },
6478 )
6479 }
6480}
6481
6482#[derive(Debug)]
6500pub enum DirectoryWatcherRequest {}
6501
6502impl DirectoryWatcherRequest {
6503 pub fn method_name(&self) -> &'static str {
6505 match *self {}
6506 }
6507}
6508
6509#[derive(Debug, Clone)]
6510pub struct DirectoryWatcherControlHandle {
6511 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6512}
6513
6514impl DirectoryWatcherControlHandle {
6515 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6516 self.inner.shutdown_with_epitaph(status.into())
6517 }
6518}
6519
6520impl fidl::endpoints::ControlHandle for DirectoryWatcherControlHandle {
6521 fn shutdown(&self) {
6522 self.inner.shutdown()
6523 }
6524
6525 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6526 self.inner.shutdown_with_epitaph(status)
6527 }
6528
6529 fn is_closed(&self) -> bool {
6530 self.inner.channel().is_closed()
6531 }
6532 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6533 self.inner.channel().on_closed()
6534 }
6535
6536 #[cfg(target_os = "fuchsia")]
6537 fn signal_peer(
6538 &self,
6539 clear_mask: zx::Signals,
6540 set_mask: zx::Signals,
6541 ) -> Result<(), zx_status::Status> {
6542 use fidl::Peered;
6543 self.inner.channel().signal_peer(clear_mask, set_mask)
6544 }
6545}
6546
6547impl DirectoryWatcherControlHandle {}
6548
6549#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6550pub struct ExtendedAttributeIteratorMarker;
6551
6552impl fidl::endpoints::ProtocolMarker for ExtendedAttributeIteratorMarker {
6553 type Proxy = ExtendedAttributeIteratorProxy;
6554 type RequestStream = ExtendedAttributeIteratorRequestStream;
6555 #[cfg(target_os = "fuchsia")]
6556 type SynchronousProxy = ExtendedAttributeIteratorSynchronousProxy;
6557
6558 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
6559}
6560pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
6561
6562pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
6563 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
6564 + Send;
6565 fn r#get_next(&self) -> Self::GetNextResponseFut;
6566}
6567#[derive(Debug)]
6568#[cfg(target_os = "fuchsia")]
6569pub struct ExtendedAttributeIteratorSynchronousProxy {
6570 client: fidl::client::sync::Client,
6571}
6572
6573#[cfg(target_os = "fuchsia")]
6574impl fidl::endpoints::SynchronousProxy for ExtendedAttributeIteratorSynchronousProxy {
6575 type Proxy = ExtendedAttributeIteratorProxy;
6576 type Protocol = ExtendedAttributeIteratorMarker;
6577
6578 fn from_channel(inner: fidl::Channel) -> Self {
6579 Self::new(inner)
6580 }
6581
6582 fn into_channel(self) -> fidl::Channel {
6583 self.client.into_channel()
6584 }
6585
6586 fn as_channel(&self) -> &fidl::Channel {
6587 self.client.as_channel()
6588 }
6589}
6590
6591#[cfg(target_os = "fuchsia")]
6592impl ExtendedAttributeIteratorSynchronousProxy {
6593 pub fn new(channel: fidl::Channel) -> Self {
6594 Self { client: fidl::client::sync::Client::new(channel) }
6595 }
6596
6597 pub fn into_channel(self) -> fidl::Channel {
6598 self.client.into_channel()
6599 }
6600
6601 pub fn wait_for_event(
6604 &self,
6605 deadline: zx::MonotonicInstant,
6606 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6607 ExtendedAttributeIteratorEvent::decode(
6608 self.client.wait_for_event::<ExtendedAttributeIteratorMarker>(deadline)?,
6609 )
6610 }
6611
6612 pub fn r#get_next(
6616 &self,
6617 ___deadline: zx::MonotonicInstant,
6618 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6619 let _response = self.client.send_query::<
6620 fidl::encoding::EmptyPayload,
6621 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6622 ExtendedAttributeIteratorMarker,
6623 >(
6624 (),
6625 0x3ba664a1c2e45a7,
6626 fidl::encoding::DynamicFlags::empty(),
6627 ___deadline,
6628 )?;
6629 Ok(_response.map(|x| (x.attributes, x.last)))
6630 }
6631}
6632
6633#[cfg(target_os = "fuchsia")]
6634impl From<ExtendedAttributeIteratorSynchronousProxy> for zx::NullableHandle {
6635 fn from(value: ExtendedAttributeIteratorSynchronousProxy) -> Self {
6636 value.into_channel().into()
6637 }
6638}
6639
6640#[cfg(target_os = "fuchsia")]
6641impl From<fidl::Channel> for ExtendedAttributeIteratorSynchronousProxy {
6642 fn from(value: fidl::Channel) -> Self {
6643 Self::new(value)
6644 }
6645}
6646
6647#[cfg(target_os = "fuchsia")]
6648impl fidl::endpoints::FromClient for ExtendedAttributeIteratorSynchronousProxy {
6649 type Protocol = ExtendedAttributeIteratorMarker;
6650
6651 fn from_client(value: fidl::endpoints::ClientEnd<ExtendedAttributeIteratorMarker>) -> Self {
6652 Self::new(value.into_channel())
6653 }
6654}
6655
6656#[derive(Debug, Clone)]
6657pub struct ExtendedAttributeIteratorProxy {
6658 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6659}
6660
6661impl fidl::endpoints::Proxy for ExtendedAttributeIteratorProxy {
6662 type Protocol = ExtendedAttributeIteratorMarker;
6663
6664 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6665 Self::new(inner)
6666 }
6667
6668 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6669 self.client.into_channel().map_err(|client| Self { client })
6670 }
6671
6672 fn as_channel(&self) -> &::fidl::AsyncChannel {
6673 self.client.as_channel()
6674 }
6675}
6676
6677impl ExtendedAttributeIteratorProxy {
6678 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6680 let protocol_name =
6681 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6682 Self { client: fidl::client::Client::new(channel, protocol_name) }
6683 }
6684
6685 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
6691 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6692 }
6693
6694 pub fn r#get_next(
6698 &self,
6699 ) -> fidl::client::QueryResponseFut<
6700 ExtendedAttributeIteratorGetNextResult,
6701 fidl::encoding::DefaultFuchsiaResourceDialect,
6702 > {
6703 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
6704 }
6705}
6706
6707impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
6708 type GetNextResponseFut = fidl::client::QueryResponseFut<
6709 ExtendedAttributeIteratorGetNextResult,
6710 fidl::encoding::DefaultFuchsiaResourceDialect,
6711 >;
6712 fn r#get_next(&self) -> Self::GetNextResponseFut {
6713 fn _decode(
6714 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6715 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6716 let _response = fidl::client::decode_transaction_body::<
6717 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6718 fidl::encoding::DefaultFuchsiaResourceDialect,
6719 0x3ba664a1c2e45a7,
6720 >(_buf?)?;
6721 Ok(_response.map(|x| (x.attributes, x.last)))
6722 }
6723 self.client.send_query_and_decode::<
6724 fidl::encoding::EmptyPayload,
6725 ExtendedAttributeIteratorGetNextResult,
6726 >(
6727 (),
6728 0x3ba664a1c2e45a7,
6729 fidl::encoding::DynamicFlags::empty(),
6730 _decode,
6731 )
6732 }
6733}
6734
6735pub struct ExtendedAttributeIteratorEventStream {
6736 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6737}
6738
6739impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
6740
6741impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
6742 fn is_terminated(&self) -> bool {
6743 self.event_receiver.is_terminated()
6744 }
6745}
6746
6747impl futures::Stream for ExtendedAttributeIteratorEventStream {
6748 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
6749
6750 fn poll_next(
6751 mut self: std::pin::Pin<&mut Self>,
6752 cx: &mut std::task::Context<'_>,
6753 ) -> std::task::Poll<Option<Self::Item>> {
6754 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6755 &mut self.event_receiver,
6756 cx
6757 )?) {
6758 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
6759 None => std::task::Poll::Ready(None),
6760 }
6761 }
6762}
6763
6764#[derive(Debug)]
6765pub enum ExtendedAttributeIteratorEvent {}
6766
6767impl ExtendedAttributeIteratorEvent {
6768 fn decode(
6770 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6771 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6772 let (bytes, _handles) = buf.split_mut();
6773 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6774 debug_assert_eq!(tx_header.tx_id, 0);
6775 match tx_header.ordinal {
6776 _ => Err(fidl::Error::UnknownOrdinal {
6777 ordinal: tx_header.ordinal,
6778 protocol_name:
6779 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6780 }),
6781 }
6782 }
6783}
6784
6785pub struct ExtendedAttributeIteratorRequestStream {
6787 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6788 is_terminated: bool,
6789}
6790
6791impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
6792
6793impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
6794 fn is_terminated(&self) -> bool {
6795 self.is_terminated
6796 }
6797}
6798
6799impl fidl::endpoints::RequestStream for ExtendedAttributeIteratorRequestStream {
6800 type Protocol = ExtendedAttributeIteratorMarker;
6801 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6802
6803 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6804 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6805 }
6806
6807 fn control_handle(&self) -> Self::ControlHandle {
6808 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
6809 }
6810
6811 fn into_inner(
6812 self,
6813 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6814 {
6815 (self.inner, self.is_terminated)
6816 }
6817
6818 fn from_inner(
6819 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6820 is_terminated: bool,
6821 ) -> Self {
6822 Self { inner, is_terminated }
6823 }
6824}
6825
6826impl futures::Stream for ExtendedAttributeIteratorRequestStream {
6827 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
6828
6829 fn poll_next(
6830 mut self: std::pin::Pin<&mut Self>,
6831 cx: &mut std::task::Context<'_>,
6832 ) -> std::task::Poll<Option<Self::Item>> {
6833 let this = &mut *self;
6834 if this.inner.check_shutdown(cx) {
6835 this.is_terminated = true;
6836 return std::task::Poll::Ready(None);
6837 }
6838 if this.is_terminated {
6839 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
6840 }
6841 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6842 |bytes, handles| {
6843 match this.inner.channel().read_etc(cx, bytes, handles) {
6844 std::task::Poll::Ready(Ok(())) => {}
6845 std::task::Poll::Pending => return std::task::Poll::Pending,
6846 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6847 this.is_terminated = true;
6848 return std::task::Poll::Ready(None);
6849 }
6850 std::task::Poll::Ready(Err(e)) => {
6851 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6852 e.into(),
6853 ))));
6854 }
6855 }
6856
6857 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6859
6860 std::task::Poll::Ready(Some(match header.ordinal {
6861 0x3ba664a1c2e45a7 => {
6862 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6863 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
6864 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6865 let control_handle = ExtendedAttributeIteratorControlHandle {
6866 inner: this.inner.clone(),
6867 };
6868 Ok(ExtendedAttributeIteratorRequest::GetNext {
6869 responder: ExtendedAttributeIteratorGetNextResponder {
6870 control_handle: std::mem::ManuallyDrop::new(control_handle),
6871 tx_id: header.tx_id,
6872 },
6873 })
6874 }
6875 _ => Err(fidl::Error::UnknownOrdinal {
6876 ordinal: header.ordinal,
6877 protocol_name: <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6878 }),
6879 }))
6880 },
6881 )
6882 }
6883}
6884
6885#[derive(Debug)]
6886pub enum ExtendedAttributeIteratorRequest {
6887 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
6891}
6892
6893impl ExtendedAttributeIteratorRequest {
6894 #[allow(irrefutable_let_patterns)]
6895 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
6896 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
6897 Some((responder))
6898 } else {
6899 None
6900 }
6901 }
6902
6903 pub fn method_name(&self) -> &'static str {
6905 match *self {
6906 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
6907 }
6908 }
6909}
6910
6911#[derive(Debug, Clone)]
6912pub struct ExtendedAttributeIteratorControlHandle {
6913 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6914}
6915
6916impl ExtendedAttributeIteratorControlHandle {
6917 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6918 self.inner.shutdown_with_epitaph(status.into())
6919 }
6920}
6921
6922impl fidl::endpoints::ControlHandle for ExtendedAttributeIteratorControlHandle {
6923 fn shutdown(&self) {
6924 self.inner.shutdown()
6925 }
6926
6927 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6928 self.inner.shutdown_with_epitaph(status)
6929 }
6930
6931 fn is_closed(&self) -> bool {
6932 self.inner.channel().is_closed()
6933 }
6934 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6935 self.inner.channel().on_closed()
6936 }
6937
6938 #[cfg(target_os = "fuchsia")]
6939 fn signal_peer(
6940 &self,
6941 clear_mask: zx::Signals,
6942 set_mask: zx::Signals,
6943 ) -> Result<(), zx_status::Status> {
6944 use fidl::Peered;
6945 self.inner.channel().signal_peer(clear_mask, set_mask)
6946 }
6947}
6948
6949impl ExtendedAttributeIteratorControlHandle {}
6950
6951#[must_use = "FIDL methods require a response to be sent"]
6952#[derive(Debug)]
6953pub struct ExtendedAttributeIteratorGetNextResponder {
6954 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
6955 tx_id: u32,
6956}
6957
6958impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
6962 fn drop(&mut self) {
6963 self.control_handle.shutdown();
6964 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6966 }
6967}
6968
6969impl fidl::endpoints::Responder for ExtendedAttributeIteratorGetNextResponder {
6970 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6971
6972 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
6973 &self.control_handle
6974 }
6975
6976 fn drop_without_shutdown(mut self) {
6977 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6979 std::mem::forget(self);
6981 }
6982}
6983
6984impl ExtendedAttributeIteratorGetNextResponder {
6985 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6989 let _result = self.send_raw(result);
6990 if _result.is_err() {
6991 self.control_handle.shutdown();
6992 }
6993 self.drop_without_shutdown();
6994 _result
6995 }
6996
6997 pub fn send_no_shutdown_on_err(
6999 self,
7000 mut result: Result<(&[Vec<u8>], bool), i32>,
7001 ) -> Result<(), fidl::Error> {
7002 let _result = self.send_raw(result);
7003 self.drop_without_shutdown();
7004 _result
7005 }
7006
7007 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
7008 self.control_handle.inner.send::<fidl::encoding::ResultType<
7009 ExtendedAttributeIteratorGetNextResponse,
7010 i32,
7011 >>(
7012 result,
7013 self.tx_id,
7014 0x3ba664a1c2e45a7,
7015 fidl::encoding::DynamicFlags::empty(),
7016 )
7017 }
7018}
7019
7020#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7021pub struct FileMarker;
7022
7023impl fidl::endpoints::ProtocolMarker for FileMarker {
7024 type Proxy = FileProxy;
7025 type RequestStream = FileRequestStream;
7026 #[cfg(target_os = "fuchsia")]
7027 type SynchronousProxy = FileSynchronousProxy;
7028
7029 const DEBUG_NAME: &'static str = "fuchsia.io.File";
7030}
7031impl fidl::endpoints::DiscoverableProtocolMarker for FileMarker {}
7032pub type FileSeekResult = Result<u64, i32>;
7033pub type FileReadAtResult = Result<Vec<u8>, i32>;
7034pub type FileWriteAtResult = Result<u64, i32>;
7035pub type FileResizeResult = Result<(), i32>;
7036pub type FileGetBackingMemoryResult = Result<fidl::Vmo, i32>;
7037pub type FileAllocateResult = Result<(), i32>;
7038pub type FileEnableVerityResult = Result<(), i32>;
7039
7040pub trait FileProxyInterface: Send + Sync {
7041 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
7042 + Send;
7043 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
7044 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
7045 + Send;
7046 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
7047 fn r#clone(
7048 &self,
7049 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7050 ) -> Result<(), fidl::Error>;
7051 type CloseResponseFut: std::future::Future<
7052 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
7053 > + Send;
7054 fn r#close(&self) -> Self::CloseResponseFut;
7055 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
7056 fn r#query(&self) -> Self::QueryResponseFut;
7057 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
7058 + Send;
7059 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
7060 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7061 fn r#deprecated_set_attr(
7062 &self,
7063 flags: NodeAttributeFlags,
7064 attributes: &NodeAttributes,
7065 ) -> Self::DeprecatedSetAttrResponseFut;
7066 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
7067 + Send;
7068 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
7069 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
7070 + Send;
7071 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
7072 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
7073 + Send;
7074 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
7075 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
7076 + Send;
7077 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
7078 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
7079 + Send;
7080 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
7081 type GetTokenResponseFut: std::future::Future<Output = Result<NodeGetTokenResult, fidl::Error>>
7082 + Send;
7083 fn r#get_token(&self) -> Self::GetTokenResponseFut;
7084 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
7085 + Send;
7086 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
7087 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
7088 + Send;
7089 fn r#update_attributes(
7090 &self,
7091 payload: &MutableNodeAttributes,
7092 ) -> Self::UpdateAttributesResponseFut;
7093 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
7094 fn r#sync(&self) -> Self::SyncResponseFut;
7095 fn r#list_extended_attributes(
7096 &self,
7097 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7098 ) -> Result<(), fidl::Error>;
7099 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
7100 + Send;
7101 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
7102 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
7103 + Send;
7104 fn r#set_extended_attribute(
7105 &self,
7106 name: &[u8],
7107 value: ExtendedAttributeValue,
7108 mode: SetExtendedAttributeMode,
7109 ) -> Self::SetExtendedAttributeResponseFut;
7110 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
7111 + Send;
7112 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
7113 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
7114 + Send;
7115 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
7116 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
7117 + Send;
7118 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
7119 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
7120 fn r#describe(&self) -> Self::DescribeResponseFut;
7121 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
7122 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
7123 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
7124 + Send;
7125 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
7126 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
7127 + Send;
7128 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
7129 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
7130 + Send;
7131 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
7132 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
7133 + Send;
7134 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
7135 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
7136 + Send;
7137 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
7138 -> Self::AllocateResponseFut;
7139 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
7140 + Send;
7141 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
7142}
7143#[derive(Debug)]
7144#[cfg(target_os = "fuchsia")]
7145pub struct FileSynchronousProxy {
7146 client: fidl::client::sync::Client,
7147}
7148
7149#[cfg(target_os = "fuchsia")]
7150impl fidl::endpoints::SynchronousProxy for FileSynchronousProxy {
7151 type Proxy = FileProxy;
7152 type Protocol = FileMarker;
7153
7154 fn from_channel(inner: fidl::Channel) -> Self {
7155 Self::new(inner)
7156 }
7157
7158 fn into_channel(self) -> fidl::Channel {
7159 self.client.into_channel()
7160 }
7161
7162 fn as_channel(&self) -> &fidl::Channel {
7163 self.client.as_channel()
7164 }
7165}
7166
7167#[cfg(target_os = "fuchsia")]
7168impl FileSynchronousProxy {
7169 pub fn new(channel: fidl::Channel) -> Self {
7170 Self { client: fidl::client::sync::Client::new(channel) }
7171 }
7172
7173 pub fn into_channel(self) -> fidl::Channel {
7174 self.client.into_channel()
7175 }
7176
7177 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<FileEvent, fidl::Error> {
7180 FileEvent::decode(self.client.wait_for_event::<FileMarker>(deadline)?)
7181 }
7182
7183 pub fn r#advisory_lock(
7207 &self,
7208 mut request: &AdvisoryLockRequest,
7209 ___deadline: zx::MonotonicInstant,
7210 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
7211 let _response = self.client.send_query::<
7212 AdvisoryLockingAdvisoryLockRequest,
7213 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7214 FileMarker,
7215 >(
7216 (request,),
7217 0x6ee9c0ad53ec87aa,
7218 fidl::encoding::DynamicFlags::empty(),
7219 ___deadline,
7220 )?;
7221 Ok(_response.map(|x| x))
7222 }
7223
7224 pub fn r#link_into(
7247 &self,
7248 mut dst_parent_token: fidl::Event,
7249 mut dst: &str,
7250 ___deadline: zx::MonotonicInstant,
7251 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
7252 let _response = self.client.send_query::<
7253 LinkableLinkIntoRequest,
7254 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7255 FileMarker,
7256 >(
7257 (dst_parent_token, dst,),
7258 0x54f3949246a03e74,
7259 fidl::encoding::DynamicFlags::empty(),
7260 ___deadline,
7261 )?;
7262 Ok(_response.map(|x| x))
7263 }
7264
7265 pub fn r#clone(
7266 &self,
7267 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7268 ) -> Result<(), fidl::Error> {
7269 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
7270 (request,),
7271 0x20d8a7aba2168a79,
7272 fidl::encoding::DynamicFlags::empty(),
7273 )
7274 }
7275
7276 pub fn r#close(
7287 &self,
7288 ___deadline: zx::MonotonicInstant,
7289 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
7290 let _response = self.client.send_query::<
7291 fidl::encoding::EmptyPayload,
7292 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7293 FileMarker,
7294 >(
7295 (),
7296 0x5ac5d459ad7f657e,
7297 fidl::encoding::DynamicFlags::empty(),
7298 ___deadline,
7299 )?;
7300 Ok(_response.map(|x| x))
7301 }
7302
7303 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
7304 let _response = self.client.send_query::<
7305 fidl::encoding::EmptyPayload,
7306 fidl_fuchsia_unknown::QueryableQueryResponse,
7307 FileMarker,
7308 >(
7309 (),
7310 0x2658edee9decfc06,
7311 fidl::encoding::DynamicFlags::empty(),
7312 ___deadline,
7313 )?;
7314 Ok(_response.protocol)
7315 }
7316
7317 pub fn r#deprecated_get_attr(
7321 &self,
7322 ___deadline: zx::MonotonicInstant,
7323 ) -> Result<(i32, NodeAttributes), fidl::Error> {
7324 let _response = self
7325 .client
7326 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse, FileMarker>(
7327 (),
7328 0x78985e216314dafd,
7329 fidl::encoding::DynamicFlags::empty(),
7330 ___deadline,
7331 )?;
7332 Ok((_response.s, _response.attributes))
7333 }
7334
7335 pub fn r#deprecated_set_attr(
7337 &self,
7338 mut flags: NodeAttributeFlags,
7339 mut attributes: &NodeAttributes,
7340 ___deadline: zx::MonotonicInstant,
7341 ) -> Result<i32, fidl::Error> {
7342 let _response = self
7343 .client
7344 .send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse, FileMarker>(
7345 (flags, attributes),
7346 0x4186c0f40d938f46,
7347 fidl::encoding::DynamicFlags::empty(),
7348 ___deadline,
7349 )?;
7350 Ok(_response.s)
7351 }
7352
7353 pub fn r#deprecated_get_flags(
7355 &self,
7356 ___deadline: zx::MonotonicInstant,
7357 ) -> Result<(i32, OpenFlags), fidl::Error> {
7358 let _response = self
7359 .client
7360 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse, FileMarker>(
7361 (),
7362 0x5b88fffb8eda3aa1,
7363 fidl::encoding::DynamicFlags::empty(),
7364 ___deadline,
7365 )?;
7366 Ok((_response.s, _response.flags))
7367 }
7368
7369 pub fn r#deprecated_set_flags(
7371 &self,
7372 mut flags: OpenFlags,
7373 ___deadline: zx::MonotonicInstant,
7374 ) -> Result<i32, fidl::Error> {
7375 let _response = self.client.send_query::<
7376 NodeDeprecatedSetFlagsRequest,
7377 NodeDeprecatedSetFlagsResponse,
7378 FileMarker,
7379 >(
7380 (flags,),
7381 0x5295b76c71fde733,
7382 fidl::encoding::DynamicFlags::empty(),
7383 ___deadline,
7384 )?;
7385 Ok(_response.s)
7386 }
7387
7388 pub fn r#get_flags(
7397 &self,
7398 ___deadline: zx::MonotonicInstant,
7399 ) -> Result<NodeGetFlagsResult, fidl::Error> {
7400 let _response = self.client.send_query::<
7401 fidl::encoding::EmptyPayload,
7402 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
7403 FileMarker,
7404 >(
7405 (),
7406 0x176eb318f64ec23,
7407 fidl::encoding::DynamicFlags::FLEXIBLE,
7408 ___deadline,
7409 )?
7410 .into_result::<FileMarker>("get_flags")?;
7411 Ok(_response.map(|x| x.flags))
7412 }
7413
7414 pub fn r#set_flags(
7424 &self,
7425 mut flags: Flags,
7426 ___deadline: zx::MonotonicInstant,
7427 ) -> Result<NodeSetFlagsResult, fidl::Error> {
7428 let _response = self.client.send_query::<
7429 NodeSetFlagsRequest,
7430 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7431 FileMarker,
7432 >(
7433 (flags,),
7434 0x55a8028685791ea8,
7435 fidl::encoding::DynamicFlags::FLEXIBLE,
7436 ___deadline,
7437 )?
7438 .into_result::<FileMarker>("set_flags")?;
7439 Ok(_response.map(|x| x))
7440 }
7441
7442 pub fn r#query_filesystem(
7446 &self,
7447 ___deadline: zx::MonotonicInstant,
7448 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
7449 let _response = self
7450 .client
7451 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, FileMarker>(
7452 (),
7453 0x6f344a1c6b0a0610,
7454 fidl::encoding::DynamicFlags::empty(),
7455 ___deadline,
7456 )?;
7457 Ok((_response.s, _response.info))
7458 }
7459
7460 pub fn r#get_token(
7467 &self,
7468 ___deadline: zx::MonotonicInstant,
7469 ) -> Result<NodeGetTokenResult, fidl::Error> {
7470 let _response = self.client.send_query::<
7471 fidl::encoding::EmptyPayload,
7472 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
7473 FileMarker,
7474 >(
7475 (),
7476 0x5054f0ade7076cec,
7477 fidl::encoding::DynamicFlags::FLEXIBLE,
7478 ___deadline,
7479 )?
7480 .into_result::<FileMarker>("get_token")?;
7481 Ok(_response.map(|x| x.token))
7482 }
7483
7484 pub fn r#get_attributes(
7498 &self,
7499 mut query: NodeAttributesQuery,
7500 ___deadline: zx::MonotonicInstant,
7501 ) -> Result<NodeGetAttributesResult, fidl::Error> {
7502 let _response = self.client.send_query::<
7503 NodeGetAttributesRequest,
7504 fidl::encoding::ResultType<NodeAttributes2, i32>,
7505 FileMarker,
7506 >(
7507 (query,),
7508 0x3d4396a638ea053b,
7509 fidl::encoding::DynamicFlags::empty(),
7510 ___deadline,
7511 )?;
7512 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
7513 }
7514
7515 pub fn r#update_attributes(
7524 &self,
7525 mut payload: &MutableNodeAttributes,
7526 ___deadline: zx::MonotonicInstant,
7527 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
7528 let _response = self.client.send_query::<
7529 MutableNodeAttributes,
7530 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7531 FileMarker,
7532 >(
7533 payload,
7534 0x3308c1da5a89bf08,
7535 fidl::encoding::DynamicFlags::empty(),
7536 ___deadline,
7537 )?;
7538 Ok(_response.map(|x| x))
7539 }
7540
7541 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
7551 let _response = self.client.send_query::<
7552 fidl::encoding::EmptyPayload,
7553 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7554 FileMarker,
7555 >(
7556 (),
7557 0x2c5c27ca0ab5dc49,
7558 fidl::encoding::DynamicFlags::empty(),
7559 ___deadline,
7560 )?;
7561 Ok(_response.map(|x| x))
7562 }
7563
7564 pub fn r#list_extended_attributes(
7573 &self,
7574 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7575 ) -> Result<(), fidl::Error> {
7576 self.client.send::<NodeListExtendedAttributesRequest>(
7577 (iterator,),
7578 0x4b61033de007fcd0,
7579 fidl::encoding::DynamicFlags::empty(),
7580 )
7581 }
7582
7583 pub fn r#get_extended_attribute(
7590 &self,
7591 mut name: &[u8],
7592 ___deadline: zx::MonotonicInstant,
7593 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
7594 let _response = self.client.send_query::<
7595 NodeGetExtendedAttributeRequest,
7596 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
7597 FileMarker,
7598 >(
7599 (name,),
7600 0x45ffa3ccfdeb76db,
7601 fidl::encoding::DynamicFlags::empty(),
7602 ___deadline,
7603 )?;
7604 Ok(_response.map(|x| x))
7605 }
7606
7607 pub fn r#set_extended_attribute(
7615 &self,
7616 mut name: &[u8],
7617 mut value: ExtendedAttributeValue,
7618 mut mode: SetExtendedAttributeMode,
7619 ___deadline: zx::MonotonicInstant,
7620 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
7621 let _response = self.client.send_query::<
7622 NodeSetExtendedAttributeRequest,
7623 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7624 FileMarker,
7625 >(
7626 (name, &mut value, mode,),
7627 0x4a951362f681f23c,
7628 fidl::encoding::DynamicFlags::empty(),
7629 ___deadline,
7630 )?;
7631 Ok(_response.map(|x| x))
7632 }
7633
7634 pub fn r#remove_extended_attribute(
7640 &self,
7641 mut name: &[u8],
7642 ___deadline: zx::MonotonicInstant,
7643 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
7644 let _response = self.client.send_query::<
7645 NodeRemoveExtendedAttributeRequest,
7646 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7647 FileMarker,
7648 >(
7649 (name,),
7650 0x7a0b9f3a9bf9032d,
7651 fidl::encoding::DynamicFlags::empty(),
7652 ___deadline,
7653 )?;
7654 Ok(_response.map(|x| x))
7655 }
7656
7657 pub fn r#read(
7676 &self,
7677 mut count: u64,
7678 ___deadline: zx::MonotonicInstant,
7679 ) -> Result<ReadableReadResult, fidl::Error> {
7680 let _response = self.client.send_query::<
7681 ReadableReadRequest,
7682 fidl::encoding::ResultType<ReadableReadResponse, i32>,
7683 FileMarker,
7684 >(
7685 (count,),
7686 0x57e419a298c8ede,
7687 fidl::encoding::DynamicFlags::empty(),
7688 ___deadline,
7689 )?;
7690 Ok(_response.map(|x| x.data))
7691 }
7692
7693 pub fn r#write(
7717 &self,
7718 mut data: &[u8],
7719 ___deadline: zx::MonotonicInstant,
7720 ) -> Result<WritableWriteResult, fidl::Error> {
7721 let _response = self.client.send_query::<
7722 WritableWriteRequest,
7723 fidl::encoding::ResultType<WritableWriteResponse, i32>,
7724 FileMarker,
7725 >(
7726 (data,),
7727 0x6a31437832469f82,
7728 fidl::encoding::DynamicFlags::empty(),
7729 ___deadline,
7730 )?;
7731 Ok(_response.map(|x| x.actual_count))
7732 }
7733
7734 pub fn r#describe(&self, ___deadline: zx::MonotonicInstant) -> Result<FileInfo, fidl::Error> {
7735 let _response =
7736 self.client.send_query::<fidl::encoding::EmptyPayload, FileInfo, FileMarker>(
7737 (),
7738 0x68b5ac00c62906bc,
7739 fidl::encoding::DynamicFlags::empty(),
7740 ___deadline,
7741 )?;
7742 Ok(_response)
7743 }
7744
7745 pub fn r#seek(
7755 &self,
7756 mut origin: SeekOrigin,
7757 mut offset: i64,
7758 ___deadline: zx::MonotonicInstant,
7759 ) -> Result<FileSeekResult, fidl::Error> {
7760 let _response = self.client.send_query::<
7761 FileSeekRequest,
7762 fidl::encoding::ResultType<FileSeekResponse, i32>,
7763 FileMarker,
7764 >(
7765 (origin, offset,),
7766 0x78079168162c5207,
7767 fidl::encoding::DynamicFlags::empty(),
7768 ___deadline,
7769 )?;
7770 Ok(_response.map(|x| x.offset_from_start))
7771 }
7772
7773 pub fn r#read_at(
7791 &self,
7792 mut count: u64,
7793 mut offset: u64,
7794 ___deadline: zx::MonotonicInstant,
7795 ) -> Result<FileReadAtResult, fidl::Error> {
7796 let _response = self.client.send_query::<
7797 FileReadAtRequest,
7798 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7799 FileMarker,
7800 >(
7801 (count, offset,),
7802 0x1607a293a60d723e,
7803 fidl::encoding::DynamicFlags::empty(),
7804 ___deadline,
7805 )?;
7806 Ok(_response.map(|x| x.data))
7807 }
7808
7809 pub fn r#write_at(
7831 &self,
7832 mut data: &[u8],
7833 mut offset: u64,
7834 ___deadline: zx::MonotonicInstant,
7835 ) -> Result<FileWriteAtResult, fidl::Error> {
7836 let _response = self.client.send_query::<
7837 FileWriteAtRequest,
7838 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7839 FileMarker,
7840 >(
7841 (data, offset,),
7842 0x793eefc0045e792b,
7843 fidl::encoding::DynamicFlags::empty(),
7844 ___deadline,
7845 )?;
7846 Ok(_response.map(|x| x.actual_count))
7847 }
7848
7849 pub fn r#resize(
7858 &self,
7859 mut length: u64,
7860 ___deadline: zx::MonotonicInstant,
7861 ) -> Result<FileResizeResult, fidl::Error> {
7862 let _response = self.client.send_query::<
7863 FileResizeRequest,
7864 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7865 FileMarker,
7866 >(
7867 (length,),
7868 0x2b80825f0535743a,
7869 fidl::encoding::DynamicFlags::empty(),
7870 ___deadline,
7871 )?;
7872 Ok(_response.map(|x| x))
7873 }
7874
7875 pub fn r#get_backing_memory(
7896 &self,
7897 mut flags: VmoFlags,
7898 ___deadline: zx::MonotonicInstant,
7899 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7900 let _response = self.client.send_query::<
7901 FileGetBackingMemoryRequest,
7902 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7903 FileMarker,
7904 >(
7905 (flags,),
7906 0xa6a9e654cbf62b,
7907 fidl::encoding::DynamicFlags::empty(),
7908 ___deadline,
7909 )?;
7910 Ok(_response.map(|x| x.vmo))
7911 }
7912
7913 pub fn r#allocate(
7915 &self,
7916 mut offset: u64,
7917 mut length: u64,
7918 mut mode: AllocateMode,
7919 ___deadline: zx::MonotonicInstant,
7920 ) -> Result<FileAllocateResult, fidl::Error> {
7921 let _response = self.client.send_query::<
7922 FileAllocateRequest,
7923 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7924 FileMarker,
7925 >(
7926 (offset, length, mode,),
7927 0x77fa0c330b57fd2e,
7928 fidl::encoding::DynamicFlags::FLEXIBLE,
7929 ___deadline,
7930 )?
7931 .into_result::<FileMarker>("allocate")?;
7932 Ok(_response.map(|x| x))
7933 }
7934
7935 pub fn r#enable_verity(
7947 &self,
7948 mut options: &VerificationOptions,
7949 ___deadline: zx::MonotonicInstant,
7950 ) -> Result<FileEnableVerityResult, fidl::Error> {
7951 let _response = self.client.send_query::<
7952 FileEnableVerityRequest,
7953 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7954 FileMarker,
7955 >(
7956 (options,),
7957 0x2c421ec3faaeb8bb,
7958 fidl::encoding::DynamicFlags::FLEXIBLE,
7959 ___deadline,
7960 )?
7961 .into_result::<FileMarker>("enable_verity")?;
7962 Ok(_response.map(|x| x))
7963 }
7964}
7965
7966#[cfg(target_os = "fuchsia")]
7967impl From<FileSynchronousProxy> for zx::NullableHandle {
7968 fn from(value: FileSynchronousProxy) -> Self {
7969 value.into_channel().into()
7970 }
7971}
7972
7973#[cfg(target_os = "fuchsia")]
7974impl From<fidl::Channel> for FileSynchronousProxy {
7975 fn from(value: fidl::Channel) -> Self {
7976 Self::new(value)
7977 }
7978}
7979
7980#[cfg(target_os = "fuchsia")]
7981impl fidl::endpoints::FromClient for FileSynchronousProxy {
7982 type Protocol = FileMarker;
7983
7984 fn from_client(value: fidl::endpoints::ClientEnd<FileMarker>) -> Self {
7985 Self::new(value.into_channel())
7986 }
7987}
7988
7989#[derive(Debug, Clone)]
7990pub struct FileProxy {
7991 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7992}
7993
7994impl fidl::endpoints::Proxy for FileProxy {
7995 type Protocol = FileMarker;
7996
7997 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7998 Self::new(inner)
7999 }
8000
8001 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8002 self.client.into_channel().map_err(|client| Self { client })
8003 }
8004
8005 fn as_channel(&self) -> &::fidl::AsyncChannel {
8006 self.client.as_channel()
8007 }
8008}
8009
8010impl FileProxy {
8011 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8013 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8014 Self { client: fidl::client::Client::new(channel, protocol_name) }
8015 }
8016
8017 pub fn take_event_stream(&self) -> FileEventStream {
8023 FileEventStream { event_receiver: self.client.take_event_receiver() }
8024 }
8025
8026 pub fn r#advisory_lock(
8050 &self,
8051 mut request: &AdvisoryLockRequest,
8052 ) -> fidl::client::QueryResponseFut<
8053 AdvisoryLockingAdvisoryLockResult,
8054 fidl::encoding::DefaultFuchsiaResourceDialect,
8055 > {
8056 FileProxyInterface::r#advisory_lock(self, request)
8057 }
8058
8059 pub fn r#link_into(
8082 &self,
8083 mut dst_parent_token: fidl::Event,
8084 mut dst: &str,
8085 ) -> fidl::client::QueryResponseFut<
8086 LinkableLinkIntoResult,
8087 fidl::encoding::DefaultFuchsiaResourceDialect,
8088 > {
8089 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
8090 }
8091
8092 pub fn r#clone(
8093 &self,
8094 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8095 ) -> Result<(), fidl::Error> {
8096 FileProxyInterface::r#clone(self, request)
8097 }
8098
8099 pub fn r#close(
8110 &self,
8111 ) -> fidl::client::QueryResponseFut<
8112 fidl_fuchsia_unknown::CloseableCloseResult,
8113 fidl::encoding::DefaultFuchsiaResourceDialect,
8114 > {
8115 FileProxyInterface::r#close(self)
8116 }
8117
8118 pub fn r#query(
8119 &self,
8120 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
8121 {
8122 FileProxyInterface::r#query(self)
8123 }
8124
8125 pub fn r#deprecated_get_attr(
8129 &self,
8130 ) -> fidl::client::QueryResponseFut<
8131 (i32, NodeAttributes),
8132 fidl::encoding::DefaultFuchsiaResourceDialect,
8133 > {
8134 FileProxyInterface::r#deprecated_get_attr(self)
8135 }
8136
8137 pub fn r#deprecated_set_attr(
8139 &self,
8140 mut flags: NodeAttributeFlags,
8141 mut attributes: &NodeAttributes,
8142 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
8143 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
8144 }
8145
8146 pub fn r#deprecated_get_flags(
8148 &self,
8149 ) -> fidl::client::QueryResponseFut<
8150 (i32, OpenFlags),
8151 fidl::encoding::DefaultFuchsiaResourceDialect,
8152 > {
8153 FileProxyInterface::r#deprecated_get_flags(self)
8154 }
8155
8156 pub fn r#deprecated_set_flags(
8158 &self,
8159 mut flags: OpenFlags,
8160 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
8161 FileProxyInterface::r#deprecated_set_flags(self, flags)
8162 }
8163
8164 pub fn r#get_flags(
8173 &self,
8174 ) -> fidl::client::QueryResponseFut<
8175 NodeGetFlagsResult,
8176 fidl::encoding::DefaultFuchsiaResourceDialect,
8177 > {
8178 FileProxyInterface::r#get_flags(self)
8179 }
8180
8181 pub fn r#set_flags(
8191 &self,
8192 mut flags: Flags,
8193 ) -> fidl::client::QueryResponseFut<
8194 NodeSetFlagsResult,
8195 fidl::encoding::DefaultFuchsiaResourceDialect,
8196 > {
8197 FileProxyInterface::r#set_flags(self, flags)
8198 }
8199
8200 pub fn r#query_filesystem(
8204 &self,
8205 ) -> fidl::client::QueryResponseFut<
8206 (i32, Option<Box<FilesystemInfo>>),
8207 fidl::encoding::DefaultFuchsiaResourceDialect,
8208 > {
8209 FileProxyInterface::r#query_filesystem(self)
8210 }
8211
8212 pub fn r#get_token(
8219 &self,
8220 ) -> fidl::client::QueryResponseFut<
8221 NodeGetTokenResult,
8222 fidl::encoding::DefaultFuchsiaResourceDialect,
8223 > {
8224 FileProxyInterface::r#get_token(self)
8225 }
8226
8227 pub fn r#get_attributes(
8241 &self,
8242 mut query: NodeAttributesQuery,
8243 ) -> fidl::client::QueryResponseFut<
8244 NodeGetAttributesResult,
8245 fidl::encoding::DefaultFuchsiaResourceDialect,
8246 > {
8247 FileProxyInterface::r#get_attributes(self, query)
8248 }
8249
8250 pub fn r#update_attributes(
8259 &self,
8260 mut payload: &MutableNodeAttributes,
8261 ) -> fidl::client::QueryResponseFut<
8262 NodeUpdateAttributesResult,
8263 fidl::encoding::DefaultFuchsiaResourceDialect,
8264 > {
8265 FileProxyInterface::r#update_attributes(self, payload)
8266 }
8267
8268 pub fn r#sync(
8278 &self,
8279 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8280 {
8281 FileProxyInterface::r#sync(self)
8282 }
8283
8284 pub fn r#list_extended_attributes(
8293 &self,
8294 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8295 ) -> Result<(), fidl::Error> {
8296 FileProxyInterface::r#list_extended_attributes(self, iterator)
8297 }
8298
8299 pub fn r#get_extended_attribute(
8306 &self,
8307 mut name: &[u8],
8308 ) -> fidl::client::QueryResponseFut<
8309 NodeGetExtendedAttributeResult,
8310 fidl::encoding::DefaultFuchsiaResourceDialect,
8311 > {
8312 FileProxyInterface::r#get_extended_attribute(self, name)
8313 }
8314
8315 pub fn r#set_extended_attribute(
8323 &self,
8324 mut name: &[u8],
8325 mut value: ExtendedAttributeValue,
8326 mut mode: SetExtendedAttributeMode,
8327 ) -> fidl::client::QueryResponseFut<
8328 NodeSetExtendedAttributeResult,
8329 fidl::encoding::DefaultFuchsiaResourceDialect,
8330 > {
8331 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
8332 }
8333
8334 pub fn r#remove_extended_attribute(
8340 &self,
8341 mut name: &[u8],
8342 ) -> fidl::client::QueryResponseFut<
8343 NodeRemoveExtendedAttributeResult,
8344 fidl::encoding::DefaultFuchsiaResourceDialect,
8345 > {
8346 FileProxyInterface::r#remove_extended_attribute(self, name)
8347 }
8348
8349 pub fn r#read(
8368 &self,
8369 mut count: u64,
8370 ) -> fidl::client::QueryResponseFut<
8371 ReadableReadResult,
8372 fidl::encoding::DefaultFuchsiaResourceDialect,
8373 > {
8374 FileProxyInterface::r#read(self, count)
8375 }
8376
8377 pub fn r#write(
8401 &self,
8402 mut data: &[u8],
8403 ) -> fidl::client::QueryResponseFut<
8404 WritableWriteResult,
8405 fidl::encoding::DefaultFuchsiaResourceDialect,
8406 > {
8407 FileProxyInterface::r#write(self, data)
8408 }
8409
8410 pub fn r#describe(
8411 &self,
8412 ) -> fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
8413 {
8414 FileProxyInterface::r#describe(self)
8415 }
8416
8417 pub fn r#seek(
8427 &self,
8428 mut origin: SeekOrigin,
8429 mut offset: i64,
8430 ) -> fidl::client::QueryResponseFut<FileSeekResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8431 {
8432 FileProxyInterface::r#seek(self, origin, offset)
8433 }
8434
8435 pub fn r#read_at(
8453 &self,
8454 mut count: u64,
8455 mut offset: u64,
8456 ) -> fidl::client::QueryResponseFut<
8457 FileReadAtResult,
8458 fidl::encoding::DefaultFuchsiaResourceDialect,
8459 > {
8460 FileProxyInterface::r#read_at(self, count, offset)
8461 }
8462
8463 pub fn r#write_at(
8485 &self,
8486 mut data: &[u8],
8487 mut offset: u64,
8488 ) -> fidl::client::QueryResponseFut<
8489 FileWriteAtResult,
8490 fidl::encoding::DefaultFuchsiaResourceDialect,
8491 > {
8492 FileProxyInterface::r#write_at(self, data, offset)
8493 }
8494
8495 pub fn r#resize(
8504 &self,
8505 mut length: u64,
8506 ) -> fidl::client::QueryResponseFut<
8507 FileResizeResult,
8508 fidl::encoding::DefaultFuchsiaResourceDialect,
8509 > {
8510 FileProxyInterface::r#resize(self, length)
8511 }
8512
8513 pub fn r#get_backing_memory(
8534 &self,
8535 mut flags: VmoFlags,
8536 ) -> fidl::client::QueryResponseFut<
8537 FileGetBackingMemoryResult,
8538 fidl::encoding::DefaultFuchsiaResourceDialect,
8539 > {
8540 FileProxyInterface::r#get_backing_memory(self, flags)
8541 }
8542
8543 pub fn r#allocate(
8545 &self,
8546 mut offset: u64,
8547 mut length: u64,
8548 mut mode: AllocateMode,
8549 ) -> fidl::client::QueryResponseFut<
8550 FileAllocateResult,
8551 fidl::encoding::DefaultFuchsiaResourceDialect,
8552 > {
8553 FileProxyInterface::r#allocate(self, offset, length, mode)
8554 }
8555
8556 pub fn r#enable_verity(
8568 &self,
8569 mut options: &VerificationOptions,
8570 ) -> fidl::client::QueryResponseFut<
8571 FileEnableVerityResult,
8572 fidl::encoding::DefaultFuchsiaResourceDialect,
8573 > {
8574 FileProxyInterface::r#enable_verity(self, options)
8575 }
8576}
8577
8578impl FileProxyInterface for FileProxy {
8579 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
8580 AdvisoryLockingAdvisoryLockResult,
8581 fidl::encoding::DefaultFuchsiaResourceDialect,
8582 >;
8583 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
8584 fn _decode(
8585 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8586 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
8587 let _response = fidl::client::decode_transaction_body::<
8588 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8589 fidl::encoding::DefaultFuchsiaResourceDialect,
8590 0x6ee9c0ad53ec87aa,
8591 >(_buf?)?;
8592 Ok(_response.map(|x| x))
8593 }
8594 self.client.send_query_and_decode::<
8595 AdvisoryLockingAdvisoryLockRequest,
8596 AdvisoryLockingAdvisoryLockResult,
8597 >(
8598 (request,),
8599 0x6ee9c0ad53ec87aa,
8600 fidl::encoding::DynamicFlags::empty(),
8601 _decode,
8602 )
8603 }
8604
8605 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
8606 LinkableLinkIntoResult,
8607 fidl::encoding::DefaultFuchsiaResourceDialect,
8608 >;
8609 fn r#link_into(
8610 &self,
8611 mut dst_parent_token: fidl::Event,
8612 mut dst: &str,
8613 ) -> Self::LinkIntoResponseFut {
8614 fn _decode(
8615 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8616 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
8617 let _response = fidl::client::decode_transaction_body::<
8618 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8619 fidl::encoding::DefaultFuchsiaResourceDialect,
8620 0x54f3949246a03e74,
8621 >(_buf?)?;
8622 Ok(_response.map(|x| x))
8623 }
8624 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
8625 (dst_parent_token, dst),
8626 0x54f3949246a03e74,
8627 fidl::encoding::DynamicFlags::empty(),
8628 _decode,
8629 )
8630 }
8631
8632 fn r#clone(
8633 &self,
8634 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8635 ) -> Result<(), fidl::Error> {
8636 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
8637 (request,),
8638 0x20d8a7aba2168a79,
8639 fidl::encoding::DynamicFlags::empty(),
8640 )
8641 }
8642
8643 type CloseResponseFut = fidl::client::QueryResponseFut<
8644 fidl_fuchsia_unknown::CloseableCloseResult,
8645 fidl::encoding::DefaultFuchsiaResourceDialect,
8646 >;
8647 fn r#close(&self) -> Self::CloseResponseFut {
8648 fn _decode(
8649 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8650 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
8651 let _response = fidl::client::decode_transaction_body::<
8652 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8653 fidl::encoding::DefaultFuchsiaResourceDialect,
8654 0x5ac5d459ad7f657e,
8655 >(_buf?)?;
8656 Ok(_response.map(|x| x))
8657 }
8658 self.client.send_query_and_decode::<
8659 fidl::encoding::EmptyPayload,
8660 fidl_fuchsia_unknown::CloseableCloseResult,
8661 >(
8662 (),
8663 0x5ac5d459ad7f657e,
8664 fidl::encoding::DynamicFlags::empty(),
8665 _decode,
8666 )
8667 }
8668
8669 type QueryResponseFut =
8670 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8671 fn r#query(&self) -> Self::QueryResponseFut {
8672 fn _decode(
8673 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8674 ) -> Result<Vec<u8>, fidl::Error> {
8675 let _response = fidl::client::decode_transaction_body::<
8676 fidl_fuchsia_unknown::QueryableQueryResponse,
8677 fidl::encoding::DefaultFuchsiaResourceDialect,
8678 0x2658edee9decfc06,
8679 >(_buf?)?;
8680 Ok(_response.protocol)
8681 }
8682 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
8683 (),
8684 0x2658edee9decfc06,
8685 fidl::encoding::DynamicFlags::empty(),
8686 _decode,
8687 )
8688 }
8689
8690 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
8691 (i32, NodeAttributes),
8692 fidl::encoding::DefaultFuchsiaResourceDialect,
8693 >;
8694 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
8695 fn _decode(
8696 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8697 ) -> Result<(i32, NodeAttributes), fidl::Error> {
8698 let _response = fidl::client::decode_transaction_body::<
8699 NodeDeprecatedGetAttrResponse,
8700 fidl::encoding::DefaultFuchsiaResourceDialect,
8701 0x78985e216314dafd,
8702 >(_buf?)?;
8703 Ok((_response.s, _response.attributes))
8704 }
8705 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
8706 (),
8707 0x78985e216314dafd,
8708 fidl::encoding::DynamicFlags::empty(),
8709 _decode,
8710 )
8711 }
8712
8713 type DeprecatedSetAttrResponseFut =
8714 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8715 fn r#deprecated_set_attr(
8716 &self,
8717 mut flags: NodeAttributeFlags,
8718 mut attributes: &NodeAttributes,
8719 ) -> Self::DeprecatedSetAttrResponseFut {
8720 fn _decode(
8721 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8722 ) -> Result<i32, fidl::Error> {
8723 let _response = fidl::client::decode_transaction_body::<
8724 NodeDeprecatedSetAttrResponse,
8725 fidl::encoding::DefaultFuchsiaResourceDialect,
8726 0x4186c0f40d938f46,
8727 >(_buf?)?;
8728 Ok(_response.s)
8729 }
8730 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
8731 (flags, attributes),
8732 0x4186c0f40d938f46,
8733 fidl::encoding::DynamicFlags::empty(),
8734 _decode,
8735 )
8736 }
8737
8738 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
8739 (i32, OpenFlags),
8740 fidl::encoding::DefaultFuchsiaResourceDialect,
8741 >;
8742 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
8743 fn _decode(
8744 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8745 ) -> Result<(i32, OpenFlags), fidl::Error> {
8746 let _response = fidl::client::decode_transaction_body::<
8747 NodeDeprecatedGetFlagsResponse,
8748 fidl::encoding::DefaultFuchsiaResourceDialect,
8749 0x5b88fffb8eda3aa1,
8750 >(_buf?)?;
8751 Ok((_response.s, _response.flags))
8752 }
8753 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
8754 (),
8755 0x5b88fffb8eda3aa1,
8756 fidl::encoding::DynamicFlags::empty(),
8757 _decode,
8758 )
8759 }
8760
8761 type DeprecatedSetFlagsResponseFut =
8762 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8763 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
8764 fn _decode(
8765 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8766 ) -> Result<i32, fidl::Error> {
8767 let _response = fidl::client::decode_transaction_body::<
8768 NodeDeprecatedSetFlagsResponse,
8769 fidl::encoding::DefaultFuchsiaResourceDialect,
8770 0x5295b76c71fde733,
8771 >(_buf?)?;
8772 Ok(_response.s)
8773 }
8774 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
8775 (flags,),
8776 0x5295b76c71fde733,
8777 fidl::encoding::DynamicFlags::empty(),
8778 _decode,
8779 )
8780 }
8781
8782 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
8783 NodeGetFlagsResult,
8784 fidl::encoding::DefaultFuchsiaResourceDialect,
8785 >;
8786 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
8787 fn _decode(
8788 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8789 ) -> Result<NodeGetFlagsResult, fidl::Error> {
8790 let _response = fidl::client::decode_transaction_body::<
8791 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
8792 fidl::encoding::DefaultFuchsiaResourceDialect,
8793 0x176eb318f64ec23,
8794 >(_buf?)?
8795 .into_result::<FileMarker>("get_flags")?;
8796 Ok(_response.map(|x| x.flags))
8797 }
8798 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
8799 (),
8800 0x176eb318f64ec23,
8801 fidl::encoding::DynamicFlags::FLEXIBLE,
8802 _decode,
8803 )
8804 }
8805
8806 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
8807 NodeSetFlagsResult,
8808 fidl::encoding::DefaultFuchsiaResourceDialect,
8809 >;
8810 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
8811 fn _decode(
8812 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8813 ) -> Result<NodeSetFlagsResult, fidl::Error> {
8814 let _response = fidl::client::decode_transaction_body::<
8815 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8816 fidl::encoding::DefaultFuchsiaResourceDialect,
8817 0x55a8028685791ea8,
8818 >(_buf?)?
8819 .into_result::<FileMarker>("set_flags")?;
8820 Ok(_response.map(|x| x))
8821 }
8822 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
8823 (flags,),
8824 0x55a8028685791ea8,
8825 fidl::encoding::DynamicFlags::FLEXIBLE,
8826 _decode,
8827 )
8828 }
8829
8830 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
8831 (i32, Option<Box<FilesystemInfo>>),
8832 fidl::encoding::DefaultFuchsiaResourceDialect,
8833 >;
8834 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
8835 fn _decode(
8836 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8837 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
8838 let _response = fidl::client::decode_transaction_body::<
8839 NodeQueryFilesystemResponse,
8840 fidl::encoding::DefaultFuchsiaResourceDialect,
8841 0x6f344a1c6b0a0610,
8842 >(_buf?)?;
8843 Ok((_response.s, _response.info))
8844 }
8845 self.client.send_query_and_decode::<
8846 fidl::encoding::EmptyPayload,
8847 (i32, Option<Box<FilesystemInfo>>),
8848 >(
8849 (),
8850 0x6f344a1c6b0a0610,
8851 fidl::encoding::DynamicFlags::empty(),
8852 _decode,
8853 )
8854 }
8855
8856 type GetTokenResponseFut = fidl::client::QueryResponseFut<
8857 NodeGetTokenResult,
8858 fidl::encoding::DefaultFuchsiaResourceDialect,
8859 >;
8860 fn r#get_token(&self) -> Self::GetTokenResponseFut {
8861 fn _decode(
8862 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8863 ) -> Result<NodeGetTokenResult, fidl::Error> {
8864 let _response = fidl::client::decode_transaction_body::<
8865 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
8866 fidl::encoding::DefaultFuchsiaResourceDialect,
8867 0x5054f0ade7076cec,
8868 >(_buf?)?
8869 .into_result::<FileMarker>("get_token")?;
8870 Ok(_response.map(|x| x.token))
8871 }
8872 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetTokenResult>(
8873 (),
8874 0x5054f0ade7076cec,
8875 fidl::encoding::DynamicFlags::FLEXIBLE,
8876 _decode,
8877 )
8878 }
8879
8880 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
8881 NodeGetAttributesResult,
8882 fidl::encoding::DefaultFuchsiaResourceDialect,
8883 >;
8884 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
8885 fn _decode(
8886 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8887 ) -> Result<NodeGetAttributesResult, fidl::Error> {
8888 let _response = fidl::client::decode_transaction_body::<
8889 fidl::encoding::ResultType<NodeAttributes2, i32>,
8890 fidl::encoding::DefaultFuchsiaResourceDialect,
8891 0x3d4396a638ea053b,
8892 >(_buf?)?;
8893 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
8894 }
8895 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
8896 (query,),
8897 0x3d4396a638ea053b,
8898 fidl::encoding::DynamicFlags::empty(),
8899 _decode,
8900 )
8901 }
8902
8903 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
8904 NodeUpdateAttributesResult,
8905 fidl::encoding::DefaultFuchsiaResourceDialect,
8906 >;
8907 fn r#update_attributes(
8908 &self,
8909 mut payload: &MutableNodeAttributes,
8910 ) -> Self::UpdateAttributesResponseFut {
8911 fn _decode(
8912 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8913 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
8914 let _response = fidl::client::decode_transaction_body::<
8915 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8916 fidl::encoding::DefaultFuchsiaResourceDialect,
8917 0x3308c1da5a89bf08,
8918 >(_buf?)?;
8919 Ok(_response.map(|x| x))
8920 }
8921 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
8922 payload,
8923 0x3308c1da5a89bf08,
8924 fidl::encoding::DynamicFlags::empty(),
8925 _decode,
8926 )
8927 }
8928
8929 type SyncResponseFut = fidl::client::QueryResponseFut<
8930 NodeSyncResult,
8931 fidl::encoding::DefaultFuchsiaResourceDialect,
8932 >;
8933 fn r#sync(&self) -> Self::SyncResponseFut {
8934 fn _decode(
8935 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8936 ) -> Result<NodeSyncResult, fidl::Error> {
8937 let _response = fidl::client::decode_transaction_body::<
8938 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8939 fidl::encoding::DefaultFuchsiaResourceDialect,
8940 0x2c5c27ca0ab5dc49,
8941 >(_buf?)?;
8942 Ok(_response.map(|x| x))
8943 }
8944 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
8945 (),
8946 0x2c5c27ca0ab5dc49,
8947 fidl::encoding::DynamicFlags::empty(),
8948 _decode,
8949 )
8950 }
8951
8952 fn r#list_extended_attributes(
8953 &self,
8954 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8955 ) -> Result<(), fidl::Error> {
8956 self.client.send::<NodeListExtendedAttributesRequest>(
8957 (iterator,),
8958 0x4b61033de007fcd0,
8959 fidl::encoding::DynamicFlags::empty(),
8960 )
8961 }
8962
8963 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8964 NodeGetExtendedAttributeResult,
8965 fidl::encoding::DefaultFuchsiaResourceDialect,
8966 >;
8967 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
8968 fn _decode(
8969 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8970 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
8971 let _response = fidl::client::decode_transaction_body::<
8972 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
8973 fidl::encoding::DefaultFuchsiaResourceDialect,
8974 0x45ffa3ccfdeb76db,
8975 >(_buf?)?;
8976 Ok(_response.map(|x| x))
8977 }
8978 self.client.send_query_and_decode::<
8979 NodeGetExtendedAttributeRequest,
8980 NodeGetExtendedAttributeResult,
8981 >(
8982 (name,),
8983 0x45ffa3ccfdeb76db,
8984 fidl::encoding::DynamicFlags::empty(),
8985 _decode,
8986 )
8987 }
8988
8989 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8990 NodeSetExtendedAttributeResult,
8991 fidl::encoding::DefaultFuchsiaResourceDialect,
8992 >;
8993 fn r#set_extended_attribute(
8994 &self,
8995 mut name: &[u8],
8996 mut value: ExtendedAttributeValue,
8997 mut mode: SetExtendedAttributeMode,
8998 ) -> Self::SetExtendedAttributeResponseFut {
8999 fn _decode(
9000 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9001 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
9002 let _response = fidl::client::decode_transaction_body::<
9003 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9004 fidl::encoding::DefaultFuchsiaResourceDialect,
9005 0x4a951362f681f23c,
9006 >(_buf?)?;
9007 Ok(_response.map(|x| x))
9008 }
9009 self.client.send_query_and_decode::<
9010 NodeSetExtendedAttributeRequest,
9011 NodeSetExtendedAttributeResult,
9012 >(
9013 (name, &mut value, mode,),
9014 0x4a951362f681f23c,
9015 fidl::encoding::DynamicFlags::empty(),
9016 _decode,
9017 )
9018 }
9019
9020 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
9021 NodeRemoveExtendedAttributeResult,
9022 fidl::encoding::DefaultFuchsiaResourceDialect,
9023 >;
9024 fn r#remove_extended_attribute(
9025 &self,
9026 mut name: &[u8],
9027 ) -> Self::RemoveExtendedAttributeResponseFut {
9028 fn _decode(
9029 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9030 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
9031 let _response = fidl::client::decode_transaction_body::<
9032 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9033 fidl::encoding::DefaultFuchsiaResourceDialect,
9034 0x7a0b9f3a9bf9032d,
9035 >(_buf?)?;
9036 Ok(_response.map(|x| x))
9037 }
9038 self.client.send_query_and_decode::<
9039 NodeRemoveExtendedAttributeRequest,
9040 NodeRemoveExtendedAttributeResult,
9041 >(
9042 (name,),
9043 0x7a0b9f3a9bf9032d,
9044 fidl::encoding::DynamicFlags::empty(),
9045 _decode,
9046 )
9047 }
9048
9049 type ReadResponseFut = fidl::client::QueryResponseFut<
9050 ReadableReadResult,
9051 fidl::encoding::DefaultFuchsiaResourceDialect,
9052 >;
9053 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
9054 fn _decode(
9055 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9056 ) -> Result<ReadableReadResult, fidl::Error> {
9057 let _response = fidl::client::decode_transaction_body::<
9058 fidl::encoding::ResultType<ReadableReadResponse, i32>,
9059 fidl::encoding::DefaultFuchsiaResourceDialect,
9060 0x57e419a298c8ede,
9061 >(_buf?)?;
9062 Ok(_response.map(|x| x.data))
9063 }
9064 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
9065 (count,),
9066 0x57e419a298c8ede,
9067 fidl::encoding::DynamicFlags::empty(),
9068 _decode,
9069 )
9070 }
9071
9072 type WriteResponseFut = fidl::client::QueryResponseFut<
9073 WritableWriteResult,
9074 fidl::encoding::DefaultFuchsiaResourceDialect,
9075 >;
9076 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
9077 fn _decode(
9078 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9079 ) -> Result<WritableWriteResult, fidl::Error> {
9080 let _response = fidl::client::decode_transaction_body::<
9081 fidl::encoding::ResultType<WritableWriteResponse, i32>,
9082 fidl::encoding::DefaultFuchsiaResourceDialect,
9083 0x6a31437832469f82,
9084 >(_buf?)?;
9085 Ok(_response.map(|x| x.actual_count))
9086 }
9087 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
9088 (data,),
9089 0x6a31437832469f82,
9090 fidl::encoding::DynamicFlags::empty(),
9091 _decode,
9092 )
9093 }
9094
9095 type DescribeResponseFut =
9096 fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
9097 fn r#describe(&self) -> Self::DescribeResponseFut {
9098 fn _decode(
9099 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9100 ) -> Result<FileInfo, fidl::Error> {
9101 let _response = fidl::client::decode_transaction_body::<
9102 FileInfo,
9103 fidl::encoding::DefaultFuchsiaResourceDialect,
9104 0x68b5ac00c62906bc,
9105 >(_buf?)?;
9106 Ok(_response)
9107 }
9108 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
9109 (),
9110 0x68b5ac00c62906bc,
9111 fidl::encoding::DynamicFlags::empty(),
9112 _decode,
9113 )
9114 }
9115
9116 type SeekResponseFut = fidl::client::QueryResponseFut<
9117 FileSeekResult,
9118 fidl::encoding::DefaultFuchsiaResourceDialect,
9119 >;
9120 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
9121 fn _decode(
9122 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9123 ) -> Result<FileSeekResult, fidl::Error> {
9124 let _response = fidl::client::decode_transaction_body::<
9125 fidl::encoding::ResultType<FileSeekResponse, i32>,
9126 fidl::encoding::DefaultFuchsiaResourceDialect,
9127 0x78079168162c5207,
9128 >(_buf?)?;
9129 Ok(_response.map(|x| x.offset_from_start))
9130 }
9131 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
9132 (origin, offset),
9133 0x78079168162c5207,
9134 fidl::encoding::DynamicFlags::empty(),
9135 _decode,
9136 )
9137 }
9138
9139 type ReadAtResponseFut = fidl::client::QueryResponseFut<
9140 FileReadAtResult,
9141 fidl::encoding::DefaultFuchsiaResourceDialect,
9142 >;
9143 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
9144 fn _decode(
9145 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9146 ) -> Result<FileReadAtResult, fidl::Error> {
9147 let _response = fidl::client::decode_transaction_body::<
9148 fidl::encoding::ResultType<FileReadAtResponse, i32>,
9149 fidl::encoding::DefaultFuchsiaResourceDialect,
9150 0x1607a293a60d723e,
9151 >(_buf?)?;
9152 Ok(_response.map(|x| x.data))
9153 }
9154 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
9155 (count, offset),
9156 0x1607a293a60d723e,
9157 fidl::encoding::DynamicFlags::empty(),
9158 _decode,
9159 )
9160 }
9161
9162 type WriteAtResponseFut = fidl::client::QueryResponseFut<
9163 FileWriteAtResult,
9164 fidl::encoding::DefaultFuchsiaResourceDialect,
9165 >;
9166 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
9167 fn _decode(
9168 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9169 ) -> Result<FileWriteAtResult, fidl::Error> {
9170 let _response = fidl::client::decode_transaction_body::<
9171 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
9172 fidl::encoding::DefaultFuchsiaResourceDialect,
9173 0x793eefc0045e792b,
9174 >(_buf?)?;
9175 Ok(_response.map(|x| x.actual_count))
9176 }
9177 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
9178 (data, offset),
9179 0x793eefc0045e792b,
9180 fidl::encoding::DynamicFlags::empty(),
9181 _decode,
9182 )
9183 }
9184
9185 type ResizeResponseFut = fidl::client::QueryResponseFut<
9186 FileResizeResult,
9187 fidl::encoding::DefaultFuchsiaResourceDialect,
9188 >;
9189 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
9190 fn _decode(
9191 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9192 ) -> Result<FileResizeResult, fidl::Error> {
9193 let _response = fidl::client::decode_transaction_body::<
9194 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9195 fidl::encoding::DefaultFuchsiaResourceDialect,
9196 0x2b80825f0535743a,
9197 >(_buf?)?;
9198 Ok(_response.map(|x| x))
9199 }
9200 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
9201 (length,),
9202 0x2b80825f0535743a,
9203 fidl::encoding::DynamicFlags::empty(),
9204 _decode,
9205 )
9206 }
9207
9208 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
9209 FileGetBackingMemoryResult,
9210 fidl::encoding::DefaultFuchsiaResourceDialect,
9211 >;
9212 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
9213 fn _decode(
9214 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9215 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
9216 let _response = fidl::client::decode_transaction_body::<
9217 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
9218 fidl::encoding::DefaultFuchsiaResourceDialect,
9219 0xa6a9e654cbf62b,
9220 >(_buf?)?;
9221 Ok(_response.map(|x| x.vmo))
9222 }
9223 self.client
9224 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
9225 (flags,),
9226 0xa6a9e654cbf62b,
9227 fidl::encoding::DynamicFlags::empty(),
9228 _decode,
9229 )
9230 }
9231
9232 type AllocateResponseFut = fidl::client::QueryResponseFut<
9233 FileAllocateResult,
9234 fidl::encoding::DefaultFuchsiaResourceDialect,
9235 >;
9236 fn r#allocate(
9237 &self,
9238 mut offset: u64,
9239 mut length: u64,
9240 mut mode: AllocateMode,
9241 ) -> Self::AllocateResponseFut {
9242 fn _decode(
9243 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9244 ) -> Result<FileAllocateResult, fidl::Error> {
9245 let _response = fidl::client::decode_transaction_body::<
9246 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9247 fidl::encoding::DefaultFuchsiaResourceDialect,
9248 0x77fa0c330b57fd2e,
9249 >(_buf?)?
9250 .into_result::<FileMarker>("allocate")?;
9251 Ok(_response.map(|x| x))
9252 }
9253 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
9254 (offset, length, mode),
9255 0x77fa0c330b57fd2e,
9256 fidl::encoding::DynamicFlags::FLEXIBLE,
9257 _decode,
9258 )
9259 }
9260
9261 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
9262 FileEnableVerityResult,
9263 fidl::encoding::DefaultFuchsiaResourceDialect,
9264 >;
9265 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
9266 fn _decode(
9267 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9268 ) -> Result<FileEnableVerityResult, fidl::Error> {
9269 let _response = fidl::client::decode_transaction_body::<
9270 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9271 fidl::encoding::DefaultFuchsiaResourceDialect,
9272 0x2c421ec3faaeb8bb,
9273 >(_buf?)?
9274 .into_result::<FileMarker>("enable_verity")?;
9275 Ok(_response.map(|x| x))
9276 }
9277 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
9278 (options,),
9279 0x2c421ec3faaeb8bb,
9280 fidl::encoding::DynamicFlags::FLEXIBLE,
9281 _decode,
9282 )
9283 }
9284}
9285
9286pub struct FileEventStream {
9287 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9288}
9289
9290impl std::marker::Unpin for FileEventStream {}
9291
9292impl futures::stream::FusedStream for FileEventStream {
9293 fn is_terminated(&self) -> bool {
9294 self.event_receiver.is_terminated()
9295 }
9296}
9297
9298impl futures::Stream for FileEventStream {
9299 type Item = Result<FileEvent, fidl::Error>;
9300
9301 fn poll_next(
9302 mut self: std::pin::Pin<&mut Self>,
9303 cx: &mut std::task::Context<'_>,
9304 ) -> std::task::Poll<Option<Self::Item>> {
9305 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9306 &mut self.event_receiver,
9307 cx
9308 )?) {
9309 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
9310 None => std::task::Poll::Ready(None),
9311 }
9312 }
9313}
9314
9315#[derive(Debug)]
9316pub enum FileEvent {
9317 OnOpen_ {
9318 s: i32,
9319 info: Option<Box<NodeInfoDeprecated>>,
9320 },
9321 OnRepresentation {
9322 payload: Representation,
9323 },
9324 #[non_exhaustive]
9325 _UnknownEvent {
9326 ordinal: u64,
9328 },
9329}
9330
9331impl FileEvent {
9332 #[allow(irrefutable_let_patterns)]
9333 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
9334 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
9335 }
9336 #[allow(irrefutable_let_patterns)]
9337 pub fn into_on_representation(self) -> Option<Representation> {
9338 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
9339 }
9340
9341 fn decode(
9343 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9344 ) -> Result<FileEvent, fidl::Error> {
9345 let (bytes, _handles) = buf.split_mut();
9346 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9347 debug_assert_eq!(tx_header.tx_id, 0);
9348 match tx_header.ordinal {
9349 0x7fc7bbb1dbfd1972 => {
9350 let mut out = fidl::new_empty!(
9351 NodeOnOpenRequest,
9352 fidl::encoding::DefaultFuchsiaResourceDialect
9353 );
9354 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
9355 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
9356 }
9357 0x5cb40567d80a510c => {
9358 let mut out =
9359 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
9360 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
9361 Ok((FileEvent::OnRepresentation { payload: out }))
9362 }
9363 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9364 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9365 }
9366 _ => Err(fidl::Error::UnknownOrdinal {
9367 ordinal: tx_header.ordinal,
9368 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9369 }),
9370 }
9371 }
9372}
9373
9374pub struct FileRequestStream {
9376 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9377 is_terminated: bool,
9378}
9379
9380impl std::marker::Unpin for FileRequestStream {}
9381
9382impl futures::stream::FusedStream for FileRequestStream {
9383 fn is_terminated(&self) -> bool {
9384 self.is_terminated
9385 }
9386}
9387
9388impl fidl::endpoints::RequestStream for FileRequestStream {
9389 type Protocol = FileMarker;
9390 type ControlHandle = FileControlHandle;
9391
9392 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9393 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9394 }
9395
9396 fn control_handle(&self) -> Self::ControlHandle {
9397 FileControlHandle { inner: self.inner.clone() }
9398 }
9399
9400 fn into_inner(
9401 self,
9402 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9403 {
9404 (self.inner, self.is_terminated)
9405 }
9406
9407 fn from_inner(
9408 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9409 is_terminated: bool,
9410 ) -> Self {
9411 Self { inner, is_terminated }
9412 }
9413}
9414
9415impl futures::Stream for FileRequestStream {
9416 type Item = Result<FileRequest, fidl::Error>;
9417
9418 fn poll_next(
9419 mut self: std::pin::Pin<&mut Self>,
9420 cx: &mut std::task::Context<'_>,
9421 ) -> std::task::Poll<Option<Self::Item>> {
9422 let this = &mut *self;
9423 if this.inner.check_shutdown(cx) {
9424 this.is_terminated = true;
9425 return std::task::Poll::Ready(None);
9426 }
9427 if this.is_terminated {
9428 panic!("polled FileRequestStream after completion");
9429 }
9430 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9431 |bytes, handles| {
9432 match this.inner.channel().read_etc(cx, bytes, handles) {
9433 std::task::Poll::Ready(Ok(())) => {}
9434 std::task::Poll::Pending => return std::task::Poll::Pending,
9435 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9436 this.is_terminated = true;
9437 return std::task::Poll::Ready(None);
9438 }
9439 std::task::Poll::Ready(Err(e)) => {
9440 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9441 e.into(),
9442 ))));
9443 }
9444 }
9445
9446 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9448
9449 std::task::Poll::Ready(Some(match header.ordinal {
9450 0x6ee9c0ad53ec87aa => {
9451 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9452 let mut req = fidl::new_empty!(
9453 AdvisoryLockingAdvisoryLockRequest,
9454 fidl::encoding::DefaultFuchsiaResourceDialect
9455 );
9456 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
9457 let control_handle = FileControlHandle { inner: this.inner.clone() };
9458 Ok(FileRequest::AdvisoryLock {
9459 request: req.request,
9460
9461 responder: FileAdvisoryLockResponder {
9462 control_handle: std::mem::ManuallyDrop::new(control_handle),
9463 tx_id: header.tx_id,
9464 },
9465 })
9466 }
9467 0x54f3949246a03e74 => {
9468 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9469 let mut req = fidl::new_empty!(
9470 LinkableLinkIntoRequest,
9471 fidl::encoding::DefaultFuchsiaResourceDialect
9472 );
9473 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
9474 let control_handle = FileControlHandle { inner: this.inner.clone() };
9475 Ok(FileRequest::LinkInto {
9476 dst_parent_token: req.dst_parent_token,
9477 dst: req.dst,
9478
9479 responder: FileLinkIntoResponder {
9480 control_handle: std::mem::ManuallyDrop::new(control_handle),
9481 tx_id: header.tx_id,
9482 },
9483 })
9484 }
9485 0x20d8a7aba2168a79 => {
9486 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9487 let mut req = fidl::new_empty!(
9488 fidl_fuchsia_unknown::CloneableCloneRequest,
9489 fidl::encoding::DefaultFuchsiaResourceDialect
9490 );
9491 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9492 let control_handle = FileControlHandle { inner: this.inner.clone() };
9493 Ok(FileRequest::Clone { request: req.request, control_handle })
9494 }
9495 0x5ac5d459ad7f657e => {
9496 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9497 let mut req = fidl::new_empty!(
9498 fidl::encoding::EmptyPayload,
9499 fidl::encoding::DefaultFuchsiaResourceDialect
9500 );
9501 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9502 let control_handle = FileControlHandle { inner: this.inner.clone() };
9503 Ok(FileRequest::Close {
9504 responder: FileCloseResponder {
9505 control_handle: std::mem::ManuallyDrop::new(control_handle),
9506 tx_id: header.tx_id,
9507 },
9508 })
9509 }
9510 0x2658edee9decfc06 => {
9511 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9512 let mut req = fidl::new_empty!(
9513 fidl::encoding::EmptyPayload,
9514 fidl::encoding::DefaultFuchsiaResourceDialect
9515 );
9516 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9517 let control_handle = FileControlHandle { inner: this.inner.clone() };
9518 Ok(FileRequest::Query {
9519 responder: FileQueryResponder {
9520 control_handle: std::mem::ManuallyDrop::new(control_handle),
9521 tx_id: header.tx_id,
9522 },
9523 })
9524 }
9525 0x78985e216314dafd => {
9526 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9527 let mut req = fidl::new_empty!(
9528 fidl::encoding::EmptyPayload,
9529 fidl::encoding::DefaultFuchsiaResourceDialect
9530 );
9531 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9532 let control_handle = FileControlHandle { inner: this.inner.clone() };
9533 Ok(FileRequest::DeprecatedGetAttr {
9534 responder: FileDeprecatedGetAttrResponder {
9535 control_handle: std::mem::ManuallyDrop::new(control_handle),
9536 tx_id: header.tx_id,
9537 },
9538 })
9539 }
9540 0x4186c0f40d938f46 => {
9541 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9542 let mut req = fidl::new_empty!(
9543 NodeDeprecatedSetAttrRequest,
9544 fidl::encoding::DefaultFuchsiaResourceDialect
9545 );
9546 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
9547 let control_handle = FileControlHandle { inner: this.inner.clone() };
9548 Ok(FileRequest::DeprecatedSetAttr {
9549 flags: req.flags,
9550 attributes: req.attributes,
9551
9552 responder: FileDeprecatedSetAttrResponder {
9553 control_handle: std::mem::ManuallyDrop::new(control_handle),
9554 tx_id: header.tx_id,
9555 },
9556 })
9557 }
9558 0x5b88fffb8eda3aa1 => {
9559 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9560 let mut req = fidl::new_empty!(
9561 fidl::encoding::EmptyPayload,
9562 fidl::encoding::DefaultFuchsiaResourceDialect
9563 );
9564 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9565 let control_handle = FileControlHandle { inner: this.inner.clone() };
9566 Ok(FileRequest::DeprecatedGetFlags {
9567 responder: FileDeprecatedGetFlagsResponder {
9568 control_handle: std::mem::ManuallyDrop::new(control_handle),
9569 tx_id: header.tx_id,
9570 },
9571 })
9572 }
9573 0x5295b76c71fde733 => {
9574 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9575 let mut req = fidl::new_empty!(
9576 NodeDeprecatedSetFlagsRequest,
9577 fidl::encoding::DefaultFuchsiaResourceDialect
9578 );
9579 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9580 let control_handle = FileControlHandle { inner: this.inner.clone() };
9581 Ok(FileRequest::DeprecatedSetFlags {
9582 flags: req.flags,
9583
9584 responder: FileDeprecatedSetFlagsResponder {
9585 control_handle: std::mem::ManuallyDrop::new(control_handle),
9586 tx_id: header.tx_id,
9587 },
9588 })
9589 }
9590 0x176eb318f64ec23 => {
9591 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9592 let mut req = fidl::new_empty!(
9593 fidl::encoding::EmptyPayload,
9594 fidl::encoding::DefaultFuchsiaResourceDialect
9595 );
9596 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9597 let control_handle = FileControlHandle { inner: this.inner.clone() };
9598 Ok(FileRequest::GetFlags {
9599 responder: FileGetFlagsResponder {
9600 control_handle: std::mem::ManuallyDrop::new(control_handle),
9601 tx_id: header.tx_id,
9602 },
9603 })
9604 }
9605 0x55a8028685791ea8 => {
9606 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9607 let mut req = fidl::new_empty!(
9608 NodeSetFlagsRequest,
9609 fidl::encoding::DefaultFuchsiaResourceDialect
9610 );
9611 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9612 let control_handle = FileControlHandle { inner: this.inner.clone() };
9613 Ok(FileRequest::SetFlags {
9614 flags: req.flags,
9615
9616 responder: FileSetFlagsResponder {
9617 control_handle: std::mem::ManuallyDrop::new(control_handle),
9618 tx_id: header.tx_id,
9619 },
9620 })
9621 }
9622 0x6f344a1c6b0a0610 => {
9623 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9624 let mut req = fidl::new_empty!(
9625 fidl::encoding::EmptyPayload,
9626 fidl::encoding::DefaultFuchsiaResourceDialect
9627 );
9628 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9629 let control_handle = FileControlHandle { inner: this.inner.clone() };
9630 Ok(FileRequest::QueryFilesystem {
9631 responder: FileQueryFilesystemResponder {
9632 control_handle: std::mem::ManuallyDrop::new(control_handle),
9633 tx_id: header.tx_id,
9634 },
9635 })
9636 }
9637 0x5054f0ade7076cec => {
9638 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9639 let mut req = fidl::new_empty!(
9640 fidl::encoding::EmptyPayload,
9641 fidl::encoding::DefaultFuchsiaResourceDialect
9642 );
9643 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9644 let control_handle = FileControlHandle { inner: this.inner.clone() };
9645 Ok(FileRequest::GetToken {
9646 responder: FileGetTokenResponder {
9647 control_handle: std::mem::ManuallyDrop::new(control_handle),
9648 tx_id: header.tx_id,
9649 },
9650 })
9651 }
9652 0x3d4396a638ea053b => {
9653 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9654 let mut req = fidl::new_empty!(
9655 NodeGetAttributesRequest,
9656 fidl::encoding::DefaultFuchsiaResourceDialect
9657 );
9658 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9659 let control_handle = FileControlHandle { inner: this.inner.clone() };
9660 Ok(FileRequest::GetAttributes {
9661 query: req.query,
9662
9663 responder: FileGetAttributesResponder {
9664 control_handle: std::mem::ManuallyDrop::new(control_handle),
9665 tx_id: header.tx_id,
9666 },
9667 })
9668 }
9669 0x3308c1da5a89bf08 => {
9670 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9671 let mut req = fidl::new_empty!(
9672 MutableNodeAttributes,
9673 fidl::encoding::DefaultFuchsiaResourceDialect
9674 );
9675 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
9676 let control_handle = FileControlHandle { inner: this.inner.clone() };
9677 Ok(FileRequest::UpdateAttributes {
9678 payload: req,
9679 responder: FileUpdateAttributesResponder {
9680 control_handle: std::mem::ManuallyDrop::new(control_handle),
9681 tx_id: header.tx_id,
9682 },
9683 })
9684 }
9685 0x2c5c27ca0ab5dc49 => {
9686 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9687 let mut req = fidl::new_empty!(
9688 fidl::encoding::EmptyPayload,
9689 fidl::encoding::DefaultFuchsiaResourceDialect
9690 );
9691 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9692 let control_handle = FileControlHandle { inner: this.inner.clone() };
9693 Ok(FileRequest::Sync {
9694 responder: FileSyncResponder {
9695 control_handle: std::mem::ManuallyDrop::new(control_handle),
9696 tx_id: header.tx_id,
9697 },
9698 })
9699 }
9700 0x4b61033de007fcd0 => {
9701 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9702 let mut req = fidl::new_empty!(
9703 NodeListExtendedAttributesRequest,
9704 fidl::encoding::DefaultFuchsiaResourceDialect
9705 );
9706 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9707 let control_handle = FileControlHandle { inner: this.inner.clone() };
9708 Ok(FileRequest::ListExtendedAttributes {
9709 iterator: req.iterator,
9710
9711 control_handle,
9712 })
9713 }
9714 0x45ffa3ccfdeb76db => {
9715 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9716 let mut req = fidl::new_empty!(
9717 NodeGetExtendedAttributeRequest,
9718 fidl::encoding::DefaultFuchsiaResourceDialect
9719 );
9720 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9721 let control_handle = FileControlHandle { inner: this.inner.clone() };
9722 Ok(FileRequest::GetExtendedAttribute {
9723 name: req.name,
9724
9725 responder: FileGetExtendedAttributeResponder {
9726 control_handle: std::mem::ManuallyDrop::new(control_handle),
9727 tx_id: header.tx_id,
9728 },
9729 })
9730 }
9731 0x4a951362f681f23c => {
9732 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9733 let mut req = fidl::new_empty!(
9734 NodeSetExtendedAttributeRequest,
9735 fidl::encoding::DefaultFuchsiaResourceDialect
9736 );
9737 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9738 let control_handle = FileControlHandle { inner: this.inner.clone() };
9739 Ok(FileRequest::SetExtendedAttribute {
9740 name: req.name,
9741 value: req.value,
9742 mode: req.mode,
9743
9744 responder: FileSetExtendedAttributeResponder {
9745 control_handle: std::mem::ManuallyDrop::new(control_handle),
9746 tx_id: header.tx_id,
9747 },
9748 })
9749 }
9750 0x7a0b9f3a9bf9032d => {
9751 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9752 let mut req = fidl::new_empty!(
9753 NodeRemoveExtendedAttributeRequest,
9754 fidl::encoding::DefaultFuchsiaResourceDialect
9755 );
9756 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9757 let control_handle = FileControlHandle { inner: this.inner.clone() };
9758 Ok(FileRequest::RemoveExtendedAttribute {
9759 name: req.name,
9760
9761 responder: FileRemoveExtendedAttributeResponder {
9762 control_handle: std::mem::ManuallyDrop::new(control_handle),
9763 tx_id: header.tx_id,
9764 },
9765 })
9766 }
9767 0x57e419a298c8ede => {
9768 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9769 let mut req = fidl::new_empty!(
9770 ReadableReadRequest,
9771 fidl::encoding::DefaultFuchsiaResourceDialect
9772 );
9773 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
9774 let control_handle = FileControlHandle { inner: this.inner.clone() };
9775 Ok(FileRequest::Read {
9776 count: req.count,
9777
9778 responder: FileReadResponder {
9779 control_handle: std::mem::ManuallyDrop::new(control_handle),
9780 tx_id: header.tx_id,
9781 },
9782 })
9783 }
9784 0x6a31437832469f82 => {
9785 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9786 let mut req = fidl::new_empty!(
9787 WritableWriteRequest,
9788 fidl::encoding::DefaultFuchsiaResourceDialect
9789 );
9790 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
9791 let control_handle = FileControlHandle { inner: this.inner.clone() };
9792 Ok(FileRequest::Write {
9793 data: req.data,
9794
9795 responder: FileWriteResponder {
9796 control_handle: std::mem::ManuallyDrop::new(control_handle),
9797 tx_id: header.tx_id,
9798 },
9799 })
9800 }
9801 0x68b5ac00c62906bc => {
9802 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9803 let mut req = fidl::new_empty!(
9804 fidl::encoding::EmptyPayload,
9805 fidl::encoding::DefaultFuchsiaResourceDialect
9806 );
9807 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9808 let control_handle = FileControlHandle { inner: this.inner.clone() };
9809 Ok(FileRequest::Describe {
9810 responder: FileDescribeResponder {
9811 control_handle: std::mem::ManuallyDrop::new(control_handle),
9812 tx_id: header.tx_id,
9813 },
9814 })
9815 }
9816 0x78079168162c5207 => {
9817 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9818 let mut req = fidl::new_empty!(
9819 FileSeekRequest,
9820 fidl::encoding::DefaultFuchsiaResourceDialect
9821 );
9822 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
9823 let control_handle = FileControlHandle { inner: this.inner.clone() };
9824 Ok(FileRequest::Seek {
9825 origin: req.origin,
9826 offset: req.offset,
9827
9828 responder: FileSeekResponder {
9829 control_handle: std::mem::ManuallyDrop::new(control_handle),
9830 tx_id: header.tx_id,
9831 },
9832 })
9833 }
9834 0x1607a293a60d723e => {
9835 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9836 let mut req = fidl::new_empty!(
9837 FileReadAtRequest,
9838 fidl::encoding::DefaultFuchsiaResourceDialect
9839 );
9840 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
9841 let control_handle = FileControlHandle { inner: this.inner.clone() };
9842 Ok(FileRequest::ReadAt {
9843 count: req.count,
9844 offset: req.offset,
9845
9846 responder: FileReadAtResponder {
9847 control_handle: std::mem::ManuallyDrop::new(control_handle),
9848 tx_id: header.tx_id,
9849 },
9850 })
9851 }
9852 0x793eefc0045e792b => {
9853 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9854 let mut req = fidl::new_empty!(
9855 FileWriteAtRequest,
9856 fidl::encoding::DefaultFuchsiaResourceDialect
9857 );
9858 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
9859 let control_handle = FileControlHandle { inner: this.inner.clone() };
9860 Ok(FileRequest::WriteAt {
9861 data: req.data,
9862 offset: req.offset,
9863
9864 responder: FileWriteAtResponder {
9865 control_handle: std::mem::ManuallyDrop::new(control_handle),
9866 tx_id: header.tx_id,
9867 },
9868 })
9869 }
9870 0x2b80825f0535743a => {
9871 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9872 let mut req = fidl::new_empty!(
9873 FileResizeRequest,
9874 fidl::encoding::DefaultFuchsiaResourceDialect
9875 );
9876 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
9877 let control_handle = FileControlHandle { inner: this.inner.clone() };
9878 Ok(FileRequest::Resize {
9879 length: req.length,
9880
9881 responder: FileResizeResponder {
9882 control_handle: std::mem::ManuallyDrop::new(control_handle),
9883 tx_id: header.tx_id,
9884 },
9885 })
9886 }
9887 0xa6a9e654cbf62b => {
9888 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9889 let mut req = fidl::new_empty!(
9890 FileGetBackingMemoryRequest,
9891 fidl::encoding::DefaultFuchsiaResourceDialect
9892 );
9893 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
9894 let control_handle = FileControlHandle { inner: this.inner.clone() };
9895 Ok(FileRequest::GetBackingMemory {
9896 flags: req.flags,
9897
9898 responder: FileGetBackingMemoryResponder {
9899 control_handle: std::mem::ManuallyDrop::new(control_handle),
9900 tx_id: header.tx_id,
9901 },
9902 })
9903 }
9904 0x77fa0c330b57fd2e => {
9905 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9906 let mut req = fidl::new_empty!(
9907 FileAllocateRequest,
9908 fidl::encoding::DefaultFuchsiaResourceDialect
9909 );
9910 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
9911 let control_handle = FileControlHandle { inner: this.inner.clone() };
9912 Ok(FileRequest::Allocate {
9913 offset: req.offset,
9914 length: req.length,
9915 mode: req.mode,
9916
9917 responder: FileAllocateResponder {
9918 control_handle: std::mem::ManuallyDrop::new(control_handle),
9919 tx_id: header.tx_id,
9920 },
9921 })
9922 }
9923 0x2c421ec3faaeb8bb => {
9924 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9925 let mut req = fidl::new_empty!(
9926 FileEnableVerityRequest,
9927 fidl::encoding::DefaultFuchsiaResourceDialect
9928 );
9929 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
9930 let control_handle = FileControlHandle { inner: this.inner.clone() };
9931 Ok(FileRequest::EnableVerity {
9932 options: req.options,
9933
9934 responder: FileEnableVerityResponder {
9935 control_handle: std::mem::ManuallyDrop::new(control_handle),
9936 tx_id: header.tx_id,
9937 },
9938 })
9939 }
9940 _ if header.tx_id == 0
9941 && header
9942 .dynamic_flags()
9943 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9944 {
9945 Ok(FileRequest::_UnknownMethod {
9946 ordinal: header.ordinal,
9947 control_handle: FileControlHandle { inner: this.inner.clone() },
9948 method_type: fidl::MethodType::OneWay,
9949 })
9950 }
9951 _ if header
9952 .dynamic_flags()
9953 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9954 {
9955 this.inner.send_framework_err(
9956 fidl::encoding::FrameworkErr::UnknownMethod,
9957 header.tx_id,
9958 header.ordinal,
9959 header.dynamic_flags(),
9960 (bytes, handles),
9961 )?;
9962 Ok(FileRequest::_UnknownMethod {
9963 ordinal: header.ordinal,
9964 control_handle: FileControlHandle { inner: this.inner.clone() },
9965 method_type: fidl::MethodType::TwoWay,
9966 })
9967 }
9968 _ => Err(fidl::Error::UnknownOrdinal {
9969 ordinal: header.ordinal,
9970 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9971 }),
9972 }))
9973 },
9974 )
9975 }
9976}
9977
9978#[derive(Debug)]
9983pub enum FileRequest {
9984 AdvisoryLock {
10008 request: AdvisoryLockRequest,
10009 responder: FileAdvisoryLockResponder,
10010 },
10011 LinkInto {
10034 dst_parent_token: fidl::Event,
10035 dst: String,
10036 responder: FileLinkIntoResponder,
10037 },
10038 Clone {
10039 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10040 control_handle: FileControlHandle,
10041 },
10042 Close {
10053 responder: FileCloseResponder,
10054 },
10055 Query {
10056 responder: FileQueryResponder,
10057 },
10058 DeprecatedGetAttr {
10062 responder: FileDeprecatedGetAttrResponder,
10063 },
10064 DeprecatedSetAttr {
10066 flags: NodeAttributeFlags,
10067 attributes: NodeAttributes,
10068 responder: FileDeprecatedSetAttrResponder,
10069 },
10070 DeprecatedGetFlags {
10072 responder: FileDeprecatedGetFlagsResponder,
10073 },
10074 DeprecatedSetFlags {
10076 flags: OpenFlags,
10077 responder: FileDeprecatedSetFlagsResponder,
10078 },
10079 GetFlags {
10088 responder: FileGetFlagsResponder,
10089 },
10090 SetFlags {
10100 flags: Flags,
10101 responder: FileSetFlagsResponder,
10102 },
10103 QueryFilesystem {
10107 responder: FileQueryFilesystemResponder,
10108 },
10109 GetToken {
10116 responder: FileGetTokenResponder,
10117 },
10118 GetAttributes {
10132 query: NodeAttributesQuery,
10133 responder: FileGetAttributesResponder,
10134 },
10135 UpdateAttributes {
10144 payload: MutableNodeAttributes,
10145 responder: FileUpdateAttributesResponder,
10146 },
10147 Sync {
10157 responder: FileSyncResponder,
10158 },
10159 ListExtendedAttributes {
10168 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
10169 control_handle: FileControlHandle,
10170 },
10171 GetExtendedAttribute {
10178 name: Vec<u8>,
10179 responder: FileGetExtendedAttributeResponder,
10180 },
10181 SetExtendedAttribute {
10189 name: Vec<u8>,
10190 value: ExtendedAttributeValue,
10191 mode: SetExtendedAttributeMode,
10192 responder: FileSetExtendedAttributeResponder,
10193 },
10194 RemoveExtendedAttribute {
10200 name: Vec<u8>,
10201 responder: FileRemoveExtendedAttributeResponder,
10202 },
10203 Read {
10222 count: u64,
10223 responder: FileReadResponder,
10224 },
10225 Write {
10249 data: Vec<u8>,
10250 responder: FileWriteResponder,
10251 },
10252 Describe {
10253 responder: FileDescribeResponder,
10254 },
10255 Seek {
10265 origin: SeekOrigin,
10266 offset: i64,
10267 responder: FileSeekResponder,
10268 },
10269 ReadAt {
10287 count: u64,
10288 offset: u64,
10289 responder: FileReadAtResponder,
10290 },
10291 WriteAt {
10313 data: Vec<u8>,
10314 offset: u64,
10315 responder: FileWriteAtResponder,
10316 },
10317 Resize {
10326 length: u64,
10327 responder: FileResizeResponder,
10328 },
10329 GetBackingMemory {
10350 flags: VmoFlags,
10351 responder: FileGetBackingMemoryResponder,
10352 },
10353 Allocate {
10355 offset: u64,
10356 length: u64,
10357 mode: AllocateMode,
10358 responder: FileAllocateResponder,
10359 },
10360 EnableVerity {
10372 options: VerificationOptions,
10373 responder: FileEnableVerityResponder,
10374 },
10375 #[non_exhaustive]
10377 _UnknownMethod {
10378 ordinal: u64,
10380 control_handle: FileControlHandle,
10381 method_type: fidl::MethodType,
10382 },
10383}
10384
10385impl FileRequest {
10386 #[allow(irrefutable_let_patterns)]
10387 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
10388 if let FileRequest::AdvisoryLock { request, responder } = self {
10389 Some((request, responder))
10390 } else {
10391 None
10392 }
10393 }
10394
10395 #[allow(irrefutable_let_patterns)]
10396 pub fn into_link_into(self) -> Option<(fidl::Event, String, FileLinkIntoResponder)> {
10397 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
10398 Some((dst_parent_token, dst, responder))
10399 } else {
10400 None
10401 }
10402 }
10403
10404 #[allow(irrefutable_let_patterns)]
10405 pub fn into_clone(
10406 self,
10407 ) -> Option<(
10408 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10409 FileControlHandle,
10410 )> {
10411 if let FileRequest::Clone { request, control_handle } = self {
10412 Some((request, control_handle))
10413 } else {
10414 None
10415 }
10416 }
10417
10418 #[allow(irrefutable_let_patterns)]
10419 pub fn into_close(self) -> Option<(FileCloseResponder)> {
10420 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
10421 }
10422
10423 #[allow(irrefutable_let_patterns)]
10424 pub fn into_query(self) -> Option<(FileQueryResponder)> {
10425 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
10426 }
10427
10428 #[allow(irrefutable_let_patterns)]
10429 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
10430 if let FileRequest::DeprecatedGetAttr { responder } = self {
10431 Some((responder))
10432 } else {
10433 None
10434 }
10435 }
10436
10437 #[allow(irrefutable_let_patterns)]
10438 pub fn into_deprecated_set_attr(
10439 self,
10440 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
10441 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
10442 Some((flags, attributes, responder))
10443 } else {
10444 None
10445 }
10446 }
10447
10448 #[allow(irrefutable_let_patterns)]
10449 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
10450 if let FileRequest::DeprecatedGetFlags { responder } = self {
10451 Some((responder))
10452 } else {
10453 None
10454 }
10455 }
10456
10457 #[allow(irrefutable_let_patterns)]
10458 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
10459 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
10460 Some((flags, responder))
10461 } else {
10462 None
10463 }
10464 }
10465
10466 #[allow(irrefutable_let_patterns)]
10467 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
10468 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
10469 }
10470
10471 #[allow(irrefutable_let_patterns)]
10472 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
10473 if let FileRequest::SetFlags { flags, responder } = self {
10474 Some((flags, responder))
10475 } else {
10476 None
10477 }
10478 }
10479
10480 #[allow(irrefutable_let_patterns)]
10481 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
10482 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
10483 }
10484
10485 #[allow(irrefutable_let_patterns)]
10486 pub fn into_get_token(self) -> Option<(FileGetTokenResponder)> {
10487 if let FileRequest::GetToken { responder } = self { Some((responder)) } else { None }
10488 }
10489
10490 #[allow(irrefutable_let_patterns)]
10491 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
10492 if let FileRequest::GetAttributes { query, responder } = self {
10493 Some((query, responder))
10494 } else {
10495 None
10496 }
10497 }
10498
10499 #[allow(irrefutable_let_patterns)]
10500 pub fn into_update_attributes(
10501 self,
10502 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
10503 if let FileRequest::UpdateAttributes { payload, responder } = self {
10504 Some((payload, responder))
10505 } else {
10506 None
10507 }
10508 }
10509
10510 #[allow(irrefutable_let_patterns)]
10511 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
10512 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
10513 }
10514
10515 #[allow(irrefutable_let_patterns)]
10516 pub fn into_list_extended_attributes(
10517 self,
10518 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
10519 {
10520 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
10521 Some((iterator, control_handle))
10522 } else {
10523 None
10524 }
10525 }
10526
10527 #[allow(irrefutable_let_patterns)]
10528 pub fn into_get_extended_attribute(
10529 self,
10530 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
10531 if let FileRequest::GetExtendedAttribute { name, responder } = self {
10532 Some((name, responder))
10533 } else {
10534 None
10535 }
10536 }
10537
10538 #[allow(irrefutable_let_patterns)]
10539 pub fn into_set_extended_attribute(
10540 self,
10541 ) -> Option<(
10542 Vec<u8>,
10543 ExtendedAttributeValue,
10544 SetExtendedAttributeMode,
10545 FileSetExtendedAttributeResponder,
10546 )> {
10547 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
10548 Some((name, value, mode, responder))
10549 } else {
10550 None
10551 }
10552 }
10553
10554 #[allow(irrefutable_let_patterns)]
10555 pub fn into_remove_extended_attribute(
10556 self,
10557 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
10558 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
10559 Some((name, responder))
10560 } else {
10561 None
10562 }
10563 }
10564
10565 #[allow(irrefutable_let_patterns)]
10566 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
10567 if let FileRequest::Read { count, responder } = self {
10568 Some((count, responder))
10569 } else {
10570 None
10571 }
10572 }
10573
10574 #[allow(irrefutable_let_patterns)]
10575 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
10576 if let FileRequest::Write { data, responder } = self {
10577 Some((data, responder))
10578 } else {
10579 None
10580 }
10581 }
10582
10583 #[allow(irrefutable_let_patterns)]
10584 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
10585 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
10586 }
10587
10588 #[allow(irrefutable_let_patterns)]
10589 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
10590 if let FileRequest::Seek { origin, offset, responder } = self {
10591 Some((origin, offset, responder))
10592 } else {
10593 None
10594 }
10595 }
10596
10597 #[allow(irrefutable_let_patterns)]
10598 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
10599 if let FileRequest::ReadAt { count, offset, responder } = self {
10600 Some((count, offset, responder))
10601 } else {
10602 None
10603 }
10604 }
10605
10606 #[allow(irrefutable_let_patterns)]
10607 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
10608 if let FileRequest::WriteAt { data, offset, responder } = self {
10609 Some((data, offset, responder))
10610 } else {
10611 None
10612 }
10613 }
10614
10615 #[allow(irrefutable_let_patterns)]
10616 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
10617 if let FileRequest::Resize { length, responder } = self {
10618 Some((length, responder))
10619 } else {
10620 None
10621 }
10622 }
10623
10624 #[allow(irrefutable_let_patterns)]
10625 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
10626 if let FileRequest::GetBackingMemory { flags, responder } = self {
10627 Some((flags, responder))
10628 } else {
10629 None
10630 }
10631 }
10632
10633 #[allow(irrefutable_let_patterns)]
10634 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
10635 if let FileRequest::Allocate { offset, length, mode, responder } = self {
10636 Some((offset, length, mode, responder))
10637 } else {
10638 None
10639 }
10640 }
10641
10642 #[allow(irrefutable_let_patterns)]
10643 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
10644 if let FileRequest::EnableVerity { options, responder } = self {
10645 Some((options, responder))
10646 } else {
10647 None
10648 }
10649 }
10650
10651 pub fn method_name(&self) -> &'static str {
10653 match *self {
10654 FileRequest::AdvisoryLock { .. } => "advisory_lock",
10655 FileRequest::LinkInto { .. } => "link_into",
10656 FileRequest::Clone { .. } => "clone",
10657 FileRequest::Close { .. } => "close",
10658 FileRequest::Query { .. } => "query",
10659 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
10660 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
10661 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
10662 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
10663 FileRequest::GetFlags { .. } => "get_flags",
10664 FileRequest::SetFlags { .. } => "set_flags",
10665 FileRequest::QueryFilesystem { .. } => "query_filesystem",
10666 FileRequest::GetToken { .. } => "get_token",
10667 FileRequest::GetAttributes { .. } => "get_attributes",
10668 FileRequest::UpdateAttributes { .. } => "update_attributes",
10669 FileRequest::Sync { .. } => "sync",
10670 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
10671 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
10672 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
10673 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
10674 FileRequest::Read { .. } => "read",
10675 FileRequest::Write { .. } => "write",
10676 FileRequest::Describe { .. } => "describe",
10677 FileRequest::Seek { .. } => "seek",
10678 FileRequest::ReadAt { .. } => "read_at",
10679 FileRequest::WriteAt { .. } => "write_at",
10680 FileRequest::Resize { .. } => "resize",
10681 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
10682 FileRequest::Allocate { .. } => "allocate",
10683 FileRequest::EnableVerity { .. } => "enable_verity",
10684 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10685 "unknown one-way method"
10686 }
10687 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10688 "unknown two-way method"
10689 }
10690 }
10691 }
10692}
10693
10694#[derive(Debug, Clone)]
10695pub struct FileControlHandle {
10696 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10697}
10698
10699impl FileControlHandle {
10700 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
10701 self.inner.shutdown_with_epitaph(status.into())
10702 }
10703}
10704
10705impl fidl::endpoints::ControlHandle for FileControlHandle {
10706 fn shutdown(&self) {
10707 self.inner.shutdown()
10708 }
10709
10710 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
10711 self.inner.shutdown_with_epitaph(status)
10712 }
10713
10714 fn is_closed(&self) -> bool {
10715 self.inner.channel().is_closed()
10716 }
10717 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10718 self.inner.channel().on_closed()
10719 }
10720
10721 #[cfg(target_os = "fuchsia")]
10722 fn signal_peer(
10723 &self,
10724 clear_mask: zx::Signals,
10725 set_mask: zx::Signals,
10726 ) -> Result<(), zx_status::Status> {
10727 use fidl::Peered;
10728 self.inner.channel().signal_peer(clear_mask, set_mask)
10729 }
10730}
10731
10732impl FileControlHandle {
10733 pub fn send_on_open_(
10734 &self,
10735 mut s: i32,
10736 mut info: Option<NodeInfoDeprecated>,
10737 ) -> Result<(), fidl::Error> {
10738 self.inner.send::<NodeOnOpenRequest>(
10739 (s, info.as_mut()),
10740 0,
10741 0x7fc7bbb1dbfd1972,
10742 fidl::encoding::DynamicFlags::FLEXIBLE,
10743 )
10744 }
10745
10746 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
10747 self.inner.send::<Representation>(
10748 &mut payload,
10749 0,
10750 0x5cb40567d80a510c,
10751 fidl::encoding::DynamicFlags::empty(),
10752 )
10753 }
10754}
10755
10756#[must_use = "FIDL methods require a response to be sent"]
10757#[derive(Debug)]
10758pub struct FileAdvisoryLockResponder {
10759 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10760 tx_id: u32,
10761}
10762
10763impl std::ops::Drop for FileAdvisoryLockResponder {
10767 fn drop(&mut self) {
10768 self.control_handle.shutdown();
10769 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10771 }
10772}
10773
10774impl fidl::endpoints::Responder for FileAdvisoryLockResponder {
10775 type ControlHandle = FileControlHandle;
10776
10777 fn control_handle(&self) -> &FileControlHandle {
10778 &self.control_handle
10779 }
10780
10781 fn drop_without_shutdown(mut self) {
10782 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10784 std::mem::forget(self);
10786 }
10787}
10788
10789impl FileAdvisoryLockResponder {
10790 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10794 let _result = self.send_raw(result);
10795 if _result.is_err() {
10796 self.control_handle.shutdown();
10797 }
10798 self.drop_without_shutdown();
10799 _result
10800 }
10801
10802 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10804 let _result = self.send_raw(result);
10805 self.drop_without_shutdown();
10806 _result
10807 }
10808
10809 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10810 self.control_handle
10811 .inner
10812 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10813 result,
10814 self.tx_id,
10815 0x6ee9c0ad53ec87aa,
10816 fidl::encoding::DynamicFlags::empty(),
10817 )
10818 }
10819}
10820
10821#[must_use = "FIDL methods require a response to be sent"]
10822#[derive(Debug)]
10823pub struct FileLinkIntoResponder {
10824 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10825 tx_id: u32,
10826}
10827
10828impl std::ops::Drop for FileLinkIntoResponder {
10832 fn drop(&mut self) {
10833 self.control_handle.shutdown();
10834 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10836 }
10837}
10838
10839impl fidl::endpoints::Responder for FileLinkIntoResponder {
10840 type ControlHandle = FileControlHandle;
10841
10842 fn control_handle(&self) -> &FileControlHandle {
10843 &self.control_handle
10844 }
10845
10846 fn drop_without_shutdown(mut self) {
10847 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10849 std::mem::forget(self);
10851 }
10852}
10853
10854impl FileLinkIntoResponder {
10855 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10859 let _result = self.send_raw(result);
10860 if _result.is_err() {
10861 self.control_handle.shutdown();
10862 }
10863 self.drop_without_shutdown();
10864 _result
10865 }
10866
10867 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10869 let _result = self.send_raw(result);
10870 self.drop_without_shutdown();
10871 _result
10872 }
10873
10874 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10875 self.control_handle
10876 .inner
10877 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10878 result,
10879 self.tx_id,
10880 0x54f3949246a03e74,
10881 fidl::encoding::DynamicFlags::empty(),
10882 )
10883 }
10884}
10885
10886#[must_use = "FIDL methods require a response to be sent"]
10887#[derive(Debug)]
10888pub struct FileCloseResponder {
10889 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10890 tx_id: u32,
10891}
10892
10893impl std::ops::Drop for FileCloseResponder {
10897 fn drop(&mut self) {
10898 self.control_handle.shutdown();
10899 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10901 }
10902}
10903
10904impl fidl::endpoints::Responder for FileCloseResponder {
10905 type ControlHandle = FileControlHandle;
10906
10907 fn control_handle(&self) -> &FileControlHandle {
10908 &self.control_handle
10909 }
10910
10911 fn drop_without_shutdown(mut self) {
10912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10914 std::mem::forget(self);
10916 }
10917}
10918
10919impl FileCloseResponder {
10920 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10924 let _result = self.send_raw(result);
10925 if _result.is_err() {
10926 self.control_handle.shutdown();
10927 }
10928 self.drop_without_shutdown();
10929 _result
10930 }
10931
10932 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10934 let _result = self.send_raw(result);
10935 self.drop_without_shutdown();
10936 _result
10937 }
10938
10939 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10940 self.control_handle
10941 .inner
10942 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10943 result,
10944 self.tx_id,
10945 0x5ac5d459ad7f657e,
10946 fidl::encoding::DynamicFlags::empty(),
10947 )
10948 }
10949}
10950
10951#[must_use = "FIDL methods require a response to be sent"]
10952#[derive(Debug)]
10953pub struct FileQueryResponder {
10954 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10955 tx_id: u32,
10956}
10957
10958impl std::ops::Drop for FileQueryResponder {
10962 fn drop(&mut self) {
10963 self.control_handle.shutdown();
10964 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10966 }
10967}
10968
10969impl fidl::endpoints::Responder for FileQueryResponder {
10970 type ControlHandle = FileControlHandle;
10971
10972 fn control_handle(&self) -> &FileControlHandle {
10973 &self.control_handle
10974 }
10975
10976 fn drop_without_shutdown(mut self) {
10977 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10979 std::mem::forget(self);
10981 }
10982}
10983
10984impl FileQueryResponder {
10985 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10989 let _result = self.send_raw(protocol);
10990 if _result.is_err() {
10991 self.control_handle.shutdown();
10992 }
10993 self.drop_without_shutdown();
10994 _result
10995 }
10996
10997 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10999 let _result = self.send_raw(protocol);
11000 self.drop_without_shutdown();
11001 _result
11002 }
11003
11004 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
11005 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
11006 (protocol,),
11007 self.tx_id,
11008 0x2658edee9decfc06,
11009 fidl::encoding::DynamicFlags::empty(),
11010 )
11011 }
11012}
11013
11014#[must_use = "FIDL methods require a response to be sent"]
11015#[derive(Debug)]
11016pub struct FileDeprecatedGetAttrResponder {
11017 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11018 tx_id: u32,
11019}
11020
11021impl std::ops::Drop for FileDeprecatedGetAttrResponder {
11025 fn drop(&mut self) {
11026 self.control_handle.shutdown();
11027 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11029 }
11030}
11031
11032impl fidl::endpoints::Responder for FileDeprecatedGetAttrResponder {
11033 type ControlHandle = FileControlHandle;
11034
11035 fn control_handle(&self) -> &FileControlHandle {
11036 &self.control_handle
11037 }
11038
11039 fn drop_without_shutdown(mut self) {
11040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11042 std::mem::forget(self);
11044 }
11045}
11046
11047impl FileDeprecatedGetAttrResponder {
11048 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
11052 let _result = self.send_raw(s, attributes);
11053 if _result.is_err() {
11054 self.control_handle.shutdown();
11055 }
11056 self.drop_without_shutdown();
11057 _result
11058 }
11059
11060 pub fn send_no_shutdown_on_err(
11062 self,
11063 mut s: i32,
11064 mut attributes: &NodeAttributes,
11065 ) -> Result<(), fidl::Error> {
11066 let _result = self.send_raw(s, attributes);
11067 self.drop_without_shutdown();
11068 _result
11069 }
11070
11071 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
11072 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
11073 (s, attributes),
11074 self.tx_id,
11075 0x78985e216314dafd,
11076 fidl::encoding::DynamicFlags::empty(),
11077 )
11078 }
11079}
11080
11081#[must_use = "FIDL methods require a response to be sent"]
11082#[derive(Debug)]
11083pub struct FileDeprecatedSetAttrResponder {
11084 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11085 tx_id: u32,
11086}
11087
11088impl std::ops::Drop for FileDeprecatedSetAttrResponder {
11092 fn drop(&mut self) {
11093 self.control_handle.shutdown();
11094 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11096 }
11097}
11098
11099impl fidl::endpoints::Responder for FileDeprecatedSetAttrResponder {
11100 type ControlHandle = FileControlHandle;
11101
11102 fn control_handle(&self) -> &FileControlHandle {
11103 &self.control_handle
11104 }
11105
11106 fn drop_without_shutdown(mut self) {
11107 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11109 std::mem::forget(self);
11111 }
11112}
11113
11114impl FileDeprecatedSetAttrResponder {
11115 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
11119 let _result = self.send_raw(s);
11120 if _result.is_err() {
11121 self.control_handle.shutdown();
11122 }
11123 self.drop_without_shutdown();
11124 _result
11125 }
11126
11127 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
11129 let _result = self.send_raw(s);
11130 self.drop_without_shutdown();
11131 _result
11132 }
11133
11134 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11135 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
11136 (s,),
11137 self.tx_id,
11138 0x4186c0f40d938f46,
11139 fidl::encoding::DynamicFlags::empty(),
11140 )
11141 }
11142}
11143
11144#[must_use = "FIDL methods require a response to be sent"]
11145#[derive(Debug)]
11146pub struct FileDeprecatedGetFlagsResponder {
11147 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11148 tx_id: u32,
11149}
11150
11151impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
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 FileDeprecatedGetFlagsResponder {
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 FileDeprecatedGetFlagsResponder {
11178 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
11182 let _result = self.send_raw(s, flags);
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 flags: OpenFlags,
11195 ) -> Result<(), fidl::Error> {
11196 let _result = self.send_raw(s, flags);
11197 self.drop_without_shutdown();
11198 _result
11199 }
11200
11201 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
11202 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
11203 (s, flags),
11204 self.tx_id,
11205 0x5b88fffb8eda3aa1,
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 FileDeprecatedSetFlagsResponder {
11214 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11215 tx_id: u32,
11216}
11217
11218impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
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 FileDeprecatedSetFlagsResponder {
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 FileDeprecatedSetFlagsResponder {
11245 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
11249 let _result = self.send_raw(s);
11250 if _result.is_err() {
11251 self.control_handle.shutdown();
11252 }
11253 self.drop_without_shutdown();
11254 _result
11255 }
11256
11257 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
11259 let _result = self.send_raw(s);
11260 self.drop_without_shutdown();
11261 _result
11262 }
11263
11264 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11265 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
11266 (s,),
11267 self.tx_id,
11268 0x5295b76c71fde733,
11269 fidl::encoding::DynamicFlags::empty(),
11270 )
11271 }
11272}
11273
11274#[must_use = "FIDL methods require a response to be sent"]
11275#[derive(Debug)]
11276pub struct FileGetFlagsResponder {
11277 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11278 tx_id: u32,
11279}
11280
11281impl std::ops::Drop for FileGetFlagsResponder {
11285 fn drop(&mut self) {
11286 self.control_handle.shutdown();
11287 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11289 }
11290}
11291
11292impl fidl::endpoints::Responder for FileGetFlagsResponder {
11293 type ControlHandle = FileControlHandle;
11294
11295 fn control_handle(&self) -> &FileControlHandle {
11296 &self.control_handle
11297 }
11298
11299 fn drop_without_shutdown(mut self) {
11300 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11302 std::mem::forget(self);
11304 }
11305}
11306
11307impl FileGetFlagsResponder {
11308 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11312 let _result = self.send_raw(result);
11313 if _result.is_err() {
11314 self.control_handle.shutdown();
11315 }
11316 self.drop_without_shutdown();
11317 _result
11318 }
11319
11320 pub fn send_no_shutdown_on_err(
11322 self,
11323 mut result: Result<Flags, i32>,
11324 ) -> Result<(), fidl::Error> {
11325 let _result = self.send_raw(result);
11326 self.drop_without_shutdown();
11327 _result
11328 }
11329
11330 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11331 self.control_handle
11332 .inner
11333 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
11334 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
11335 self.tx_id,
11336 0x176eb318f64ec23,
11337 fidl::encoding::DynamicFlags::FLEXIBLE,
11338 )
11339 }
11340}
11341
11342#[must_use = "FIDL methods require a response to be sent"]
11343#[derive(Debug)]
11344pub struct FileSetFlagsResponder {
11345 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11346 tx_id: u32,
11347}
11348
11349impl std::ops::Drop for FileSetFlagsResponder {
11353 fn drop(&mut self) {
11354 self.control_handle.shutdown();
11355 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11357 }
11358}
11359
11360impl fidl::endpoints::Responder for FileSetFlagsResponder {
11361 type ControlHandle = FileControlHandle;
11362
11363 fn control_handle(&self) -> &FileControlHandle {
11364 &self.control_handle
11365 }
11366
11367 fn drop_without_shutdown(mut self) {
11368 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11370 std::mem::forget(self);
11372 }
11373}
11374
11375impl FileSetFlagsResponder {
11376 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11380 let _result = self.send_raw(result);
11381 if _result.is_err() {
11382 self.control_handle.shutdown();
11383 }
11384 self.drop_without_shutdown();
11385 _result
11386 }
11387
11388 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11390 let _result = self.send_raw(result);
11391 self.drop_without_shutdown();
11392 _result
11393 }
11394
11395 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11396 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
11397 fidl::encoding::EmptyStruct,
11398 i32,
11399 >>(
11400 fidl::encoding::FlexibleResult::new(result),
11401 self.tx_id,
11402 0x55a8028685791ea8,
11403 fidl::encoding::DynamicFlags::FLEXIBLE,
11404 )
11405 }
11406}
11407
11408#[must_use = "FIDL methods require a response to be sent"]
11409#[derive(Debug)]
11410pub struct FileQueryFilesystemResponder {
11411 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11412 tx_id: u32,
11413}
11414
11415impl std::ops::Drop for FileQueryFilesystemResponder {
11419 fn drop(&mut self) {
11420 self.control_handle.shutdown();
11421 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11423 }
11424}
11425
11426impl fidl::endpoints::Responder for FileQueryFilesystemResponder {
11427 type ControlHandle = FileControlHandle;
11428
11429 fn control_handle(&self) -> &FileControlHandle {
11430 &self.control_handle
11431 }
11432
11433 fn drop_without_shutdown(mut self) {
11434 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11436 std::mem::forget(self);
11438 }
11439}
11440
11441impl FileQueryFilesystemResponder {
11442 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11446 let _result = self.send_raw(s, info);
11447 if _result.is_err() {
11448 self.control_handle.shutdown();
11449 }
11450 self.drop_without_shutdown();
11451 _result
11452 }
11453
11454 pub fn send_no_shutdown_on_err(
11456 self,
11457 mut s: i32,
11458 mut info: Option<&FilesystemInfo>,
11459 ) -> Result<(), fidl::Error> {
11460 let _result = self.send_raw(s, info);
11461 self.drop_without_shutdown();
11462 _result
11463 }
11464
11465 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11466 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
11467 (s, info),
11468 self.tx_id,
11469 0x6f344a1c6b0a0610,
11470 fidl::encoding::DynamicFlags::empty(),
11471 )
11472 }
11473}
11474
11475#[must_use = "FIDL methods require a response to be sent"]
11476#[derive(Debug)]
11477pub struct FileGetTokenResponder {
11478 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11479 tx_id: u32,
11480}
11481
11482impl std::ops::Drop for FileGetTokenResponder {
11486 fn drop(&mut self) {
11487 self.control_handle.shutdown();
11488 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11490 }
11491}
11492
11493impl fidl::endpoints::Responder for FileGetTokenResponder {
11494 type ControlHandle = FileControlHandle;
11495
11496 fn control_handle(&self) -> &FileControlHandle {
11497 &self.control_handle
11498 }
11499
11500 fn drop_without_shutdown(mut self) {
11501 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11503 std::mem::forget(self);
11505 }
11506}
11507
11508impl FileGetTokenResponder {
11509 pub fn send(self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
11513 let _result = self.send_raw(result);
11514 if _result.is_err() {
11515 self.control_handle.shutdown();
11516 }
11517 self.drop_without_shutdown();
11518 _result
11519 }
11520
11521 pub fn send_no_shutdown_on_err(
11523 self,
11524 mut result: Result<fidl::Event, i32>,
11525 ) -> Result<(), fidl::Error> {
11526 let _result = self.send_raw(result);
11527 self.drop_without_shutdown();
11528 _result
11529 }
11530
11531 fn send_raw(&self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
11532 self.control_handle
11533 .inner
11534 .send::<fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>>(
11535 fidl::encoding::FlexibleResult::new(result.map(|token| (token,))),
11536 self.tx_id,
11537 0x5054f0ade7076cec,
11538 fidl::encoding::DynamicFlags::FLEXIBLE,
11539 )
11540 }
11541}
11542
11543#[must_use = "FIDL methods require a response to be sent"]
11544#[derive(Debug)]
11545pub struct FileGetAttributesResponder {
11546 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11547 tx_id: u32,
11548}
11549
11550impl std::ops::Drop for FileGetAttributesResponder {
11554 fn drop(&mut self) {
11555 self.control_handle.shutdown();
11556 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11558 }
11559}
11560
11561impl fidl::endpoints::Responder for FileGetAttributesResponder {
11562 type ControlHandle = FileControlHandle;
11563
11564 fn control_handle(&self) -> &FileControlHandle {
11565 &self.control_handle
11566 }
11567
11568 fn drop_without_shutdown(mut self) {
11569 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11571 std::mem::forget(self);
11573 }
11574}
11575
11576impl FileGetAttributesResponder {
11577 pub fn send(
11581 self,
11582 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11583 ) -> Result<(), fidl::Error> {
11584 let _result = self.send_raw(result);
11585 if _result.is_err() {
11586 self.control_handle.shutdown();
11587 }
11588 self.drop_without_shutdown();
11589 _result
11590 }
11591
11592 pub fn send_no_shutdown_on_err(
11594 self,
11595 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11596 ) -> Result<(), fidl::Error> {
11597 let _result = self.send_raw(result);
11598 self.drop_without_shutdown();
11599 _result
11600 }
11601
11602 fn send_raw(
11603 &self,
11604 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11605 ) -> Result<(), fidl::Error> {
11606 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
11607 result,
11608 self.tx_id,
11609 0x3d4396a638ea053b,
11610 fidl::encoding::DynamicFlags::empty(),
11611 )
11612 }
11613}
11614
11615#[must_use = "FIDL methods require a response to be sent"]
11616#[derive(Debug)]
11617pub struct FileUpdateAttributesResponder {
11618 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11619 tx_id: u32,
11620}
11621
11622impl std::ops::Drop for FileUpdateAttributesResponder {
11626 fn drop(&mut self) {
11627 self.control_handle.shutdown();
11628 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11630 }
11631}
11632
11633impl fidl::endpoints::Responder for FileUpdateAttributesResponder {
11634 type ControlHandle = FileControlHandle;
11635
11636 fn control_handle(&self) -> &FileControlHandle {
11637 &self.control_handle
11638 }
11639
11640 fn drop_without_shutdown(mut self) {
11641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11643 std::mem::forget(self);
11645 }
11646}
11647
11648impl FileUpdateAttributesResponder {
11649 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11653 let _result = self.send_raw(result);
11654 if _result.is_err() {
11655 self.control_handle.shutdown();
11656 }
11657 self.drop_without_shutdown();
11658 _result
11659 }
11660
11661 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11663 let _result = self.send_raw(result);
11664 self.drop_without_shutdown();
11665 _result
11666 }
11667
11668 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11669 self.control_handle
11670 .inner
11671 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11672 result,
11673 self.tx_id,
11674 0x3308c1da5a89bf08,
11675 fidl::encoding::DynamicFlags::empty(),
11676 )
11677 }
11678}
11679
11680#[must_use = "FIDL methods require a response to be sent"]
11681#[derive(Debug)]
11682pub struct FileSyncResponder {
11683 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11684 tx_id: u32,
11685}
11686
11687impl std::ops::Drop for FileSyncResponder {
11691 fn drop(&mut self) {
11692 self.control_handle.shutdown();
11693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11695 }
11696}
11697
11698impl fidl::endpoints::Responder for FileSyncResponder {
11699 type ControlHandle = FileControlHandle;
11700
11701 fn control_handle(&self) -> &FileControlHandle {
11702 &self.control_handle
11703 }
11704
11705 fn drop_without_shutdown(mut self) {
11706 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11708 std::mem::forget(self);
11710 }
11711}
11712
11713impl FileSyncResponder {
11714 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11718 let _result = self.send_raw(result);
11719 if _result.is_err() {
11720 self.control_handle.shutdown();
11721 }
11722 self.drop_without_shutdown();
11723 _result
11724 }
11725
11726 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11728 let _result = self.send_raw(result);
11729 self.drop_without_shutdown();
11730 _result
11731 }
11732
11733 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11734 self.control_handle
11735 .inner
11736 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11737 result,
11738 self.tx_id,
11739 0x2c5c27ca0ab5dc49,
11740 fidl::encoding::DynamicFlags::empty(),
11741 )
11742 }
11743}
11744
11745#[must_use = "FIDL methods require a response to be sent"]
11746#[derive(Debug)]
11747pub struct FileGetExtendedAttributeResponder {
11748 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11749 tx_id: u32,
11750}
11751
11752impl std::ops::Drop for FileGetExtendedAttributeResponder {
11756 fn drop(&mut self) {
11757 self.control_handle.shutdown();
11758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11760 }
11761}
11762
11763impl fidl::endpoints::Responder for FileGetExtendedAttributeResponder {
11764 type ControlHandle = FileControlHandle;
11765
11766 fn control_handle(&self) -> &FileControlHandle {
11767 &self.control_handle
11768 }
11769
11770 fn drop_without_shutdown(mut self) {
11771 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11773 std::mem::forget(self);
11775 }
11776}
11777
11778impl FileGetExtendedAttributeResponder {
11779 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11783 let _result = self.send_raw(result);
11784 if _result.is_err() {
11785 self.control_handle.shutdown();
11786 }
11787 self.drop_without_shutdown();
11788 _result
11789 }
11790
11791 pub fn send_no_shutdown_on_err(
11793 self,
11794 mut result: Result<ExtendedAttributeValue, i32>,
11795 ) -> Result<(), fidl::Error> {
11796 let _result = self.send_raw(result);
11797 self.drop_without_shutdown();
11798 _result
11799 }
11800
11801 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11802 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
11803 result.as_mut().map_err(|e| *e),
11804 self.tx_id,
11805 0x45ffa3ccfdeb76db,
11806 fidl::encoding::DynamicFlags::empty(),
11807 )
11808 }
11809}
11810
11811#[must_use = "FIDL methods require a response to be sent"]
11812#[derive(Debug)]
11813pub struct FileSetExtendedAttributeResponder {
11814 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11815 tx_id: u32,
11816}
11817
11818impl std::ops::Drop for FileSetExtendedAttributeResponder {
11822 fn drop(&mut self) {
11823 self.control_handle.shutdown();
11824 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11826 }
11827}
11828
11829impl fidl::endpoints::Responder for FileSetExtendedAttributeResponder {
11830 type ControlHandle = FileControlHandle;
11831
11832 fn control_handle(&self) -> &FileControlHandle {
11833 &self.control_handle
11834 }
11835
11836 fn drop_without_shutdown(mut self) {
11837 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11839 std::mem::forget(self);
11841 }
11842}
11843
11844impl FileSetExtendedAttributeResponder {
11845 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11849 let _result = self.send_raw(result);
11850 if _result.is_err() {
11851 self.control_handle.shutdown();
11852 }
11853 self.drop_without_shutdown();
11854 _result
11855 }
11856
11857 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11859 let _result = self.send_raw(result);
11860 self.drop_without_shutdown();
11861 _result
11862 }
11863
11864 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11865 self.control_handle
11866 .inner
11867 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11868 result,
11869 self.tx_id,
11870 0x4a951362f681f23c,
11871 fidl::encoding::DynamicFlags::empty(),
11872 )
11873 }
11874}
11875
11876#[must_use = "FIDL methods require a response to be sent"]
11877#[derive(Debug)]
11878pub struct FileRemoveExtendedAttributeResponder {
11879 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11880 tx_id: u32,
11881}
11882
11883impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
11887 fn drop(&mut self) {
11888 self.control_handle.shutdown();
11889 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11891 }
11892}
11893
11894impl fidl::endpoints::Responder for FileRemoveExtendedAttributeResponder {
11895 type ControlHandle = FileControlHandle;
11896
11897 fn control_handle(&self) -> &FileControlHandle {
11898 &self.control_handle
11899 }
11900
11901 fn drop_without_shutdown(mut self) {
11902 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11904 std::mem::forget(self);
11906 }
11907}
11908
11909impl FileRemoveExtendedAttributeResponder {
11910 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11914 let _result = self.send_raw(result);
11915 if _result.is_err() {
11916 self.control_handle.shutdown();
11917 }
11918 self.drop_without_shutdown();
11919 _result
11920 }
11921
11922 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11924 let _result = self.send_raw(result);
11925 self.drop_without_shutdown();
11926 _result
11927 }
11928
11929 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11930 self.control_handle
11931 .inner
11932 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11933 result,
11934 self.tx_id,
11935 0x7a0b9f3a9bf9032d,
11936 fidl::encoding::DynamicFlags::empty(),
11937 )
11938 }
11939}
11940
11941#[must_use = "FIDL methods require a response to be sent"]
11942#[derive(Debug)]
11943pub struct FileReadResponder {
11944 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11945 tx_id: u32,
11946}
11947
11948impl std::ops::Drop for FileReadResponder {
11952 fn drop(&mut self) {
11953 self.control_handle.shutdown();
11954 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11956 }
11957}
11958
11959impl fidl::endpoints::Responder for FileReadResponder {
11960 type ControlHandle = FileControlHandle;
11961
11962 fn control_handle(&self) -> &FileControlHandle {
11963 &self.control_handle
11964 }
11965
11966 fn drop_without_shutdown(mut self) {
11967 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11969 std::mem::forget(self);
11971 }
11972}
11973
11974impl FileReadResponder {
11975 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11979 let _result = self.send_raw(result);
11980 if _result.is_err() {
11981 self.control_handle.shutdown();
11982 }
11983 self.drop_without_shutdown();
11984 _result
11985 }
11986
11987 pub fn send_no_shutdown_on_err(
11989 self,
11990 mut result: Result<&[u8], i32>,
11991 ) -> Result<(), fidl::Error> {
11992 let _result = self.send_raw(result);
11993 self.drop_without_shutdown();
11994 _result
11995 }
11996
11997 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11998 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
11999 result.map(|data| (data,)),
12000 self.tx_id,
12001 0x57e419a298c8ede,
12002 fidl::encoding::DynamicFlags::empty(),
12003 )
12004 }
12005}
12006
12007#[must_use = "FIDL methods require a response to be sent"]
12008#[derive(Debug)]
12009pub struct FileWriteResponder {
12010 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12011 tx_id: u32,
12012}
12013
12014impl std::ops::Drop for FileWriteResponder {
12018 fn drop(&mut self) {
12019 self.control_handle.shutdown();
12020 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12022 }
12023}
12024
12025impl fidl::endpoints::Responder for FileWriteResponder {
12026 type ControlHandle = FileControlHandle;
12027
12028 fn control_handle(&self) -> &FileControlHandle {
12029 &self.control_handle
12030 }
12031
12032 fn drop_without_shutdown(mut self) {
12033 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12035 std::mem::forget(self);
12037 }
12038}
12039
12040impl FileWriteResponder {
12041 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12045 let _result = self.send_raw(result);
12046 if _result.is_err() {
12047 self.control_handle.shutdown();
12048 }
12049 self.drop_without_shutdown();
12050 _result
12051 }
12052
12053 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12055 let _result = self.send_raw(result);
12056 self.drop_without_shutdown();
12057 _result
12058 }
12059
12060 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12061 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
12062 result.map(|actual_count| (actual_count,)),
12063 self.tx_id,
12064 0x6a31437832469f82,
12065 fidl::encoding::DynamicFlags::empty(),
12066 )
12067 }
12068}
12069
12070#[must_use = "FIDL methods require a response to be sent"]
12071#[derive(Debug)]
12072pub struct FileDescribeResponder {
12073 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12074 tx_id: u32,
12075}
12076
12077impl std::ops::Drop for FileDescribeResponder {
12081 fn drop(&mut self) {
12082 self.control_handle.shutdown();
12083 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12085 }
12086}
12087
12088impl fidl::endpoints::Responder for FileDescribeResponder {
12089 type ControlHandle = FileControlHandle;
12090
12091 fn control_handle(&self) -> &FileControlHandle {
12092 &self.control_handle
12093 }
12094
12095 fn drop_without_shutdown(mut self) {
12096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12098 std::mem::forget(self);
12100 }
12101}
12102
12103impl FileDescribeResponder {
12104 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
12108 let _result = self.send_raw(payload);
12109 if _result.is_err() {
12110 self.control_handle.shutdown();
12111 }
12112 self.drop_without_shutdown();
12113 _result
12114 }
12115
12116 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
12118 let _result = self.send_raw(payload);
12119 self.drop_without_shutdown();
12120 _result
12121 }
12122
12123 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
12124 self.control_handle.inner.send::<FileInfo>(
12125 &mut payload,
12126 self.tx_id,
12127 0x68b5ac00c62906bc,
12128 fidl::encoding::DynamicFlags::empty(),
12129 )
12130 }
12131}
12132
12133#[must_use = "FIDL methods require a response to be sent"]
12134#[derive(Debug)]
12135pub struct FileSeekResponder {
12136 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12137 tx_id: u32,
12138}
12139
12140impl std::ops::Drop for FileSeekResponder {
12144 fn drop(&mut self) {
12145 self.control_handle.shutdown();
12146 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12148 }
12149}
12150
12151impl fidl::endpoints::Responder for FileSeekResponder {
12152 type ControlHandle = FileControlHandle;
12153
12154 fn control_handle(&self) -> &FileControlHandle {
12155 &self.control_handle
12156 }
12157
12158 fn drop_without_shutdown(mut self) {
12159 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12161 std::mem::forget(self);
12163 }
12164}
12165
12166impl FileSeekResponder {
12167 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12171 let _result = self.send_raw(result);
12172 if _result.is_err() {
12173 self.control_handle.shutdown();
12174 }
12175 self.drop_without_shutdown();
12176 _result
12177 }
12178
12179 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12181 let _result = self.send_raw(result);
12182 self.drop_without_shutdown();
12183 _result
12184 }
12185
12186 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12187 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
12188 result.map(|offset_from_start| (offset_from_start,)),
12189 self.tx_id,
12190 0x78079168162c5207,
12191 fidl::encoding::DynamicFlags::empty(),
12192 )
12193 }
12194}
12195
12196#[must_use = "FIDL methods require a response to be sent"]
12197#[derive(Debug)]
12198pub struct FileReadAtResponder {
12199 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12200 tx_id: u32,
12201}
12202
12203impl std::ops::Drop for FileReadAtResponder {
12207 fn drop(&mut self) {
12208 self.control_handle.shutdown();
12209 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12211 }
12212}
12213
12214impl fidl::endpoints::Responder for FileReadAtResponder {
12215 type ControlHandle = FileControlHandle;
12216
12217 fn control_handle(&self) -> &FileControlHandle {
12218 &self.control_handle
12219 }
12220
12221 fn drop_without_shutdown(mut self) {
12222 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12224 std::mem::forget(self);
12226 }
12227}
12228
12229impl FileReadAtResponder {
12230 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
12234 let _result = self.send_raw(result);
12235 if _result.is_err() {
12236 self.control_handle.shutdown();
12237 }
12238 self.drop_without_shutdown();
12239 _result
12240 }
12241
12242 pub fn send_no_shutdown_on_err(
12244 self,
12245 mut result: Result<&[u8], i32>,
12246 ) -> Result<(), fidl::Error> {
12247 let _result = self.send_raw(result);
12248 self.drop_without_shutdown();
12249 _result
12250 }
12251
12252 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
12253 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
12254 result.map(|data| (data,)),
12255 self.tx_id,
12256 0x1607a293a60d723e,
12257 fidl::encoding::DynamicFlags::empty(),
12258 )
12259 }
12260}
12261
12262#[must_use = "FIDL methods require a response to be sent"]
12263#[derive(Debug)]
12264pub struct FileWriteAtResponder {
12265 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12266 tx_id: u32,
12267}
12268
12269impl std::ops::Drop for FileWriteAtResponder {
12273 fn drop(&mut self) {
12274 self.control_handle.shutdown();
12275 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12277 }
12278}
12279
12280impl fidl::endpoints::Responder for FileWriteAtResponder {
12281 type ControlHandle = FileControlHandle;
12282
12283 fn control_handle(&self) -> &FileControlHandle {
12284 &self.control_handle
12285 }
12286
12287 fn drop_without_shutdown(mut self) {
12288 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12290 std::mem::forget(self);
12292 }
12293}
12294
12295impl FileWriteAtResponder {
12296 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12300 let _result = self.send_raw(result);
12301 if _result.is_err() {
12302 self.control_handle.shutdown();
12303 }
12304 self.drop_without_shutdown();
12305 _result
12306 }
12307
12308 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12310 let _result = self.send_raw(result);
12311 self.drop_without_shutdown();
12312 _result
12313 }
12314
12315 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12316 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
12317 result.map(|actual_count| (actual_count,)),
12318 self.tx_id,
12319 0x793eefc0045e792b,
12320 fidl::encoding::DynamicFlags::empty(),
12321 )
12322 }
12323}
12324
12325#[must_use = "FIDL methods require a response to be sent"]
12326#[derive(Debug)]
12327pub struct FileResizeResponder {
12328 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12329 tx_id: u32,
12330}
12331
12332impl std::ops::Drop for FileResizeResponder {
12336 fn drop(&mut self) {
12337 self.control_handle.shutdown();
12338 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12340 }
12341}
12342
12343impl fidl::endpoints::Responder for FileResizeResponder {
12344 type ControlHandle = FileControlHandle;
12345
12346 fn control_handle(&self) -> &FileControlHandle {
12347 &self.control_handle
12348 }
12349
12350 fn drop_without_shutdown(mut self) {
12351 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12353 std::mem::forget(self);
12355 }
12356}
12357
12358impl FileResizeResponder {
12359 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12363 let _result = self.send_raw(result);
12364 if _result.is_err() {
12365 self.control_handle.shutdown();
12366 }
12367 self.drop_without_shutdown();
12368 _result
12369 }
12370
12371 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12373 let _result = self.send_raw(result);
12374 self.drop_without_shutdown();
12375 _result
12376 }
12377
12378 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12379 self.control_handle
12380 .inner
12381 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12382 result,
12383 self.tx_id,
12384 0x2b80825f0535743a,
12385 fidl::encoding::DynamicFlags::empty(),
12386 )
12387 }
12388}
12389
12390#[must_use = "FIDL methods require a response to be sent"]
12391#[derive(Debug)]
12392pub struct FileGetBackingMemoryResponder {
12393 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12394 tx_id: u32,
12395}
12396
12397impl std::ops::Drop for FileGetBackingMemoryResponder {
12401 fn drop(&mut self) {
12402 self.control_handle.shutdown();
12403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12405 }
12406}
12407
12408impl fidl::endpoints::Responder for FileGetBackingMemoryResponder {
12409 type ControlHandle = FileControlHandle;
12410
12411 fn control_handle(&self) -> &FileControlHandle {
12412 &self.control_handle
12413 }
12414
12415 fn drop_without_shutdown(mut self) {
12416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12418 std::mem::forget(self);
12420 }
12421}
12422
12423impl FileGetBackingMemoryResponder {
12424 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12428 let _result = self.send_raw(result);
12429 if _result.is_err() {
12430 self.control_handle.shutdown();
12431 }
12432 self.drop_without_shutdown();
12433 _result
12434 }
12435
12436 pub fn send_no_shutdown_on_err(
12438 self,
12439 mut result: Result<fidl::Vmo, i32>,
12440 ) -> Result<(), fidl::Error> {
12441 let _result = self.send_raw(result);
12442 self.drop_without_shutdown();
12443 _result
12444 }
12445
12446 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12447 self.control_handle
12448 .inner
12449 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
12450 result.map(|vmo| (vmo,)),
12451 self.tx_id,
12452 0xa6a9e654cbf62b,
12453 fidl::encoding::DynamicFlags::empty(),
12454 )
12455 }
12456}
12457
12458#[must_use = "FIDL methods require a response to be sent"]
12459#[derive(Debug)]
12460pub struct FileAllocateResponder {
12461 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12462 tx_id: u32,
12463}
12464
12465impl std::ops::Drop for FileAllocateResponder {
12469 fn drop(&mut self) {
12470 self.control_handle.shutdown();
12471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12473 }
12474}
12475
12476impl fidl::endpoints::Responder for FileAllocateResponder {
12477 type ControlHandle = FileControlHandle;
12478
12479 fn control_handle(&self) -> &FileControlHandle {
12480 &self.control_handle
12481 }
12482
12483 fn drop_without_shutdown(mut self) {
12484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12486 std::mem::forget(self);
12488 }
12489}
12490
12491impl FileAllocateResponder {
12492 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12496 let _result = self.send_raw(result);
12497 if _result.is_err() {
12498 self.control_handle.shutdown();
12499 }
12500 self.drop_without_shutdown();
12501 _result
12502 }
12503
12504 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12506 let _result = self.send_raw(result);
12507 self.drop_without_shutdown();
12508 _result
12509 }
12510
12511 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12512 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12513 fidl::encoding::EmptyStruct,
12514 i32,
12515 >>(
12516 fidl::encoding::FlexibleResult::new(result),
12517 self.tx_id,
12518 0x77fa0c330b57fd2e,
12519 fidl::encoding::DynamicFlags::FLEXIBLE,
12520 )
12521 }
12522}
12523
12524#[must_use = "FIDL methods require a response to be sent"]
12525#[derive(Debug)]
12526pub struct FileEnableVerityResponder {
12527 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12528 tx_id: u32,
12529}
12530
12531impl std::ops::Drop for FileEnableVerityResponder {
12535 fn drop(&mut self) {
12536 self.control_handle.shutdown();
12537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12539 }
12540}
12541
12542impl fidl::endpoints::Responder for FileEnableVerityResponder {
12543 type ControlHandle = FileControlHandle;
12544
12545 fn control_handle(&self) -> &FileControlHandle {
12546 &self.control_handle
12547 }
12548
12549 fn drop_without_shutdown(mut self) {
12550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12552 std::mem::forget(self);
12554 }
12555}
12556
12557impl FileEnableVerityResponder {
12558 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12562 let _result = self.send_raw(result);
12563 if _result.is_err() {
12564 self.control_handle.shutdown();
12565 }
12566 self.drop_without_shutdown();
12567 _result
12568 }
12569
12570 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12572 let _result = self.send_raw(result);
12573 self.drop_without_shutdown();
12574 _result
12575 }
12576
12577 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12578 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12579 fidl::encoding::EmptyStruct,
12580 i32,
12581 >>(
12582 fidl::encoding::FlexibleResult::new(result),
12583 self.tx_id,
12584 0x2c421ec3faaeb8bb,
12585 fidl::encoding::DynamicFlags::FLEXIBLE,
12586 )
12587 }
12588}
12589
12590#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12591pub struct LinkableMarker;
12592
12593impl fidl::endpoints::ProtocolMarker for LinkableMarker {
12594 type Proxy = LinkableProxy;
12595 type RequestStream = LinkableRequestStream;
12596 #[cfg(target_os = "fuchsia")]
12597 type SynchronousProxy = LinkableSynchronousProxy;
12598
12599 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
12600}
12601pub type LinkableLinkIntoResult = Result<(), i32>;
12602
12603pub trait LinkableProxyInterface: Send + Sync {
12604 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
12605 + Send;
12606 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
12607}
12608#[derive(Debug)]
12609#[cfg(target_os = "fuchsia")]
12610pub struct LinkableSynchronousProxy {
12611 client: fidl::client::sync::Client,
12612}
12613
12614#[cfg(target_os = "fuchsia")]
12615impl fidl::endpoints::SynchronousProxy for LinkableSynchronousProxy {
12616 type Proxy = LinkableProxy;
12617 type Protocol = LinkableMarker;
12618
12619 fn from_channel(inner: fidl::Channel) -> Self {
12620 Self::new(inner)
12621 }
12622
12623 fn into_channel(self) -> fidl::Channel {
12624 self.client.into_channel()
12625 }
12626
12627 fn as_channel(&self) -> &fidl::Channel {
12628 self.client.as_channel()
12629 }
12630}
12631
12632#[cfg(target_os = "fuchsia")]
12633impl LinkableSynchronousProxy {
12634 pub fn new(channel: fidl::Channel) -> Self {
12635 Self { client: fidl::client::sync::Client::new(channel) }
12636 }
12637
12638 pub fn into_channel(self) -> fidl::Channel {
12639 self.client.into_channel()
12640 }
12641
12642 pub fn wait_for_event(
12645 &self,
12646 deadline: zx::MonotonicInstant,
12647 ) -> Result<LinkableEvent, fidl::Error> {
12648 LinkableEvent::decode(self.client.wait_for_event::<LinkableMarker>(deadline)?)
12649 }
12650
12651 pub fn r#link_into(
12674 &self,
12675 mut dst_parent_token: fidl::Event,
12676 mut dst: &str,
12677 ___deadline: zx::MonotonicInstant,
12678 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12679 let _response = self.client.send_query::<
12680 LinkableLinkIntoRequest,
12681 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12682 LinkableMarker,
12683 >(
12684 (dst_parent_token, dst,),
12685 0x54f3949246a03e74,
12686 fidl::encoding::DynamicFlags::empty(),
12687 ___deadline,
12688 )?;
12689 Ok(_response.map(|x| x))
12690 }
12691}
12692
12693#[cfg(target_os = "fuchsia")]
12694impl From<LinkableSynchronousProxy> for zx::NullableHandle {
12695 fn from(value: LinkableSynchronousProxy) -> Self {
12696 value.into_channel().into()
12697 }
12698}
12699
12700#[cfg(target_os = "fuchsia")]
12701impl From<fidl::Channel> for LinkableSynchronousProxy {
12702 fn from(value: fidl::Channel) -> Self {
12703 Self::new(value)
12704 }
12705}
12706
12707#[cfg(target_os = "fuchsia")]
12708impl fidl::endpoints::FromClient for LinkableSynchronousProxy {
12709 type Protocol = LinkableMarker;
12710
12711 fn from_client(value: fidl::endpoints::ClientEnd<LinkableMarker>) -> Self {
12712 Self::new(value.into_channel())
12713 }
12714}
12715
12716#[derive(Debug, Clone)]
12717pub struct LinkableProxy {
12718 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
12719}
12720
12721impl fidl::endpoints::Proxy for LinkableProxy {
12722 type Protocol = LinkableMarker;
12723
12724 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
12725 Self::new(inner)
12726 }
12727
12728 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
12729 self.client.into_channel().map_err(|client| Self { client })
12730 }
12731
12732 fn as_channel(&self) -> &::fidl::AsyncChannel {
12733 self.client.as_channel()
12734 }
12735}
12736
12737impl LinkableProxy {
12738 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
12740 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12741 Self { client: fidl::client::Client::new(channel, protocol_name) }
12742 }
12743
12744 pub fn take_event_stream(&self) -> LinkableEventStream {
12750 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
12751 }
12752
12753 pub fn r#link_into(
12776 &self,
12777 mut dst_parent_token: fidl::Event,
12778 mut dst: &str,
12779 ) -> fidl::client::QueryResponseFut<
12780 LinkableLinkIntoResult,
12781 fidl::encoding::DefaultFuchsiaResourceDialect,
12782 > {
12783 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
12784 }
12785}
12786
12787impl LinkableProxyInterface for LinkableProxy {
12788 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
12789 LinkableLinkIntoResult,
12790 fidl::encoding::DefaultFuchsiaResourceDialect,
12791 >;
12792 fn r#link_into(
12793 &self,
12794 mut dst_parent_token: fidl::Event,
12795 mut dst: &str,
12796 ) -> Self::LinkIntoResponseFut {
12797 fn _decode(
12798 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
12799 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12800 let _response = fidl::client::decode_transaction_body::<
12801 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12802 fidl::encoding::DefaultFuchsiaResourceDialect,
12803 0x54f3949246a03e74,
12804 >(_buf?)?;
12805 Ok(_response.map(|x| x))
12806 }
12807 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
12808 (dst_parent_token, dst),
12809 0x54f3949246a03e74,
12810 fidl::encoding::DynamicFlags::empty(),
12811 _decode,
12812 )
12813 }
12814}
12815
12816pub struct LinkableEventStream {
12817 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
12818}
12819
12820impl std::marker::Unpin for LinkableEventStream {}
12821
12822impl futures::stream::FusedStream for LinkableEventStream {
12823 fn is_terminated(&self) -> bool {
12824 self.event_receiver.is_terminated()
12825 }
12826}
12827
12828impl futures::Stream for LinkableEventStream {
12829 type Item = Result<LinkableEvent, fidl::Error>;
12830
12831 fn poll_next(
12832 mut self: std::pin::Pin<&mut Self>,
12833 cx: &mut std::task::Context<'_>,
12834 ) -> std::task::Poll<Option<Self::Item>> {
12835 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
12836 &mut self.event_receiver,
12837 cx
12838 )?) {
12839 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
12840 None => std::task::Poll::Ready(None),
12841 }
12842 }
12843}
12844
12845#[derive(Debug)]
12846pub enum LinkableEvent {}
12847
12848impl LinkableEvent {
12849 fn decode(
12851 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
12852 ) -> Result<LinkableEvent, fidl::Error> {
12853 let (bytes, _handles) = buf.split_mut();
12854 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12855 debug_assert_eq!(tx_header.tx_id, 0);
12856 match tx_header.ordinal {
12857 _ => Err(fidl::Error::UnknownOrdinal {
12858 ordinal: tx_header.ordinal,
12859 protocol_name: <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12860 }),
12861 }
12862 }
12863}
12864
12865pub struct LinkableRequestStream {
12867 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12868 is_terminated: bool,
12869}
12870
12871impl std::marker::Unpin for LinkableRequestStream {}
12872
12873impl futures::stream::FusedStream for LinkableRequestStream {
12874 fn is_terminated(&self) -> bool {
12875 self.is_terminated
12876 }
12877}
12878
12879impl fidl::endpoints::RequestStream for LinkableRequestStream {
12880 type Protocol = LinkableMarker;
12881 type ControlHandle = LinkableControlHandle;
12882
12883 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
12884 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
12885 }
12886
12887 fn control_handle(&self) -> Self::ControlHandle {
12888 LinkableControlHandle { inner: self.inner.clone() }
12889 }
12890
12891 fn into_inner(
12892 self,
12893 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
12894 {
12895 (self.inner, self.is_terminated)
12896 }
12897
12898 fn from_inner(
12899 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12900 is_terminated: bool,
12901 ) -> Self {
12902 Self { inner, is_terminated }
12903 }
12904}
12905
12906impl futures::Stream for LinkableRequestStream {
12907 type Item = Result<LinkableRequest, fidl::Error>;
12908
12909 fn poll_next(
12910 mut self: std::pin::Pin<&mut Self>,
12911 cx: &mut std::task::Context<'_>,
12912 ) -> std::task::Poll<Option<Self::Item>> {
12913 let this = &mut *self;
12914 if this.inner.check_shutdown(cx) {
12915 this.is_terminated = true;
12916 return std::task::Poll::Ready(None);
12917 }
12918 if this.is_terminated {
12919 panic!("polled LinkableRequestStream after completion");
12920 }
12921 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
12922 |bytes, handles| {
12923 match this.inner.channel().read_etc(cx, bytes, handles) {
12924 std::task::Poll::Ready(Ok(())) => {}
12925 std::task::Poll::Pending => return std::task::Poll::Pending,
12926 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
12927 this.is_terminated = true;
12928 return std::task::Poll::Ready(None);
12929 }
12930 std::task::Poll::Ready(Err(e)) => {
12931 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
12932 e.into(),
12933 ))));
12934 }
12935 }
12936
12937 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12939
12940 std::task::Poll::Ready(Some(match header.ordinal {
12941 0x54f3949246a03e74 => {
12942 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12943 let mut req = fidl::new_empty!(
12944 LinkableLinkIntoRequest,
12945 fidl::encoding::DefaultFuchsiaResourceDialect
12946 );
12947 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
12948 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
12949 Ok(LinkableRequest::LinkInto {
12950 dst_parent_token: req.dst_parent_token,
12951 dst: req.dst,
12952
12953 responder: LinkableLinkIntoResponder {
12954 control_handle: std::mem::ManuallyDrop::new(control_handle),
12955 tx_id: header.tx_id,
12956 },
12957 })
12958 }
12959 _ => Err(fidl::Error::UnknownOrdinal {
12960 ordinal: header.ordinal,
12961 protocol_name:
12962 <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12963 }),
12964 }))
12965 },
12966 )
12967 }
12968}
12969
12970#[derive(Debug)]
12971pub enum LinkableRequest {
12972 LinkInto { dst_parent_token: fidl::Event, dst: String, responder: LinkableLinkIntoResponder },
12995}
12996
12997impl LinkableRequest {
12998 #[allow(irrefutable_let_patterns)]
12999 pub fn into_link_into(self) -> Option<(fidl::Event, String, LinkableLinkIntoResponder)> {
13000 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
13001 Some((dst_parent_token, dst, responder))
13002 } else {
13003 None
13004 }
13005 }
13006
13007 pub fn method_name(&self) -> &'static str {
13009 match *self {
13010 LinkableRequest::LinkInto { .. } => "link_into",
13011 }
13012 }
13013}
13014
13015#[derive(Debug, Clone)]
13016pub struct LinkableControlHandle {
13017 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
13018}
13019
13020impl LinkableControlHandle {
13021 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
13022 self.inner.shutdown_with_epitaph(status.into())
13023 }
13024}
13025
13026impl fidl::endpoints::ControlHandle for LinkableControlHandle {
13027 fn shutdown(&self) {
13028 self.inner.shutdown()
13029 }
13030
13031 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
13032 self.inner.shutdown_with_epitaph(status)
13033 }
13034
13035 fn is_closed(&self) -> bool {
13036 self.inner.channel().is_closed()
13037 }
13038 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
13039 self.inner.channel().on_closed()
13040 }
13041
13042 #[cfg(target_os = "fuchsia")]
13043 fn signal_peer(
13044 &self,
13045 clear_mask: zx::Signals,
13046 set_mask: zx::Signals,
13047 ) -> Result<(), zx_status::Status> {
13048 use fidl::Peered;
13049 self.inner.channel().signal_peer(clear_mask, set_mask)
13050 }
13051}
13052
13053impl LinkableControlHandle {}
13054
13055#[must_use = "FIDL methods require a response to be sent"]
13056#[derive(Debug)]
13057pub struct LinkableLinkIntoResponder {
13058 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
13059 tx_id: u32,
13060}
13061
13062impl std::ops::Drop for LinkableLinkIntoResponder {
13066 fn drop(&mut self) {
13067 self.control_handle.shutdown();
13068 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13070 }
13071}
13072
13073impl fidl::endpoints::Responder for LinkableLinkIntoResponder {
13074 type ControlHandle = LinkableControlHandle;
13075
13076 fn control_handle(&self) -> &LinkableControlHandle {
13077 &self.control_handle
13078 }
13079
13080 fn drop_without_shutdown(mut self) {
13081 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13083 std::mem::forget(self);
13085 }
13086}
13087
13088impl LinkableLinkIntoResponder {
13089 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13093 let _result = self.send_raw(result);
13094 if _result.is_err() {
13095 self.control_handle.shutdown();
13096 }
13097 self.drop_without_shutdown();
13098 _result
13099 }
13100
13101 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13103 let _result = self.send_raw(result);
13104 self.drop_without_shutdown();
13105 _result
13106 }
13107
13108 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13109 self.control_handle
13110 .inner
13111 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13112 result,
13113 self.tx_id,
13114 0x54f3949246a03e74,
13115 fidl::encoding::DynamicFlags::empty(),
13116 )
13117 }
13118}
13119
13120#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13121pub struct NodeMarker;
13122
13123impl fidl::endpoints::ProtocolMarker for NodeMarker {
13124 type Proxy = NodeProxy;
13125 type RequestStream = NodeRequestStream;
13126 #[cfg(target_os = "fuchsia")]
13127 type SynchronousProxy = NodeSynchronousProxy;
13128
13129 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
13130}
13131impl fidl::endpoints::DiscoverableProtocolMarker for NodeMarker {}
13132pub type NodeGetFlagsResult = Result<Flags, i32>;
13133pub type NodeSetFlagsResult = Result<(), i32>;
13134pub type NodeGetTokenResult = Result<fidl::Event, i32>;
13135pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
13136pub type NodeUpdateAttributesResult = Result<(), i32>;
13137pub type NodeSyncResult = Result<(), i32>;
13138pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
13139pub type NodeSetExtendedAttributeResult = Result<(), i32>;
13140pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
13141
13142pub trait NodeProxyInterface: Send + Sync {
13143 fn r#clone(
13144 &self,
13145 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13146 ) -> Result<(), fidl::Error>;
13147 type CloseResponseFut: std::future::Future<
13148 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
13149 > + Send;
13150 fn r#close(&self) -> Self::CloseResponseFut;
13151 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
13152 fn r#query(&self) -> Self::QueryResponseFut;
13153 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
13154 + Send;
13155 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
13156 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
13157 fn r#deprecated_set_attr(
13158 &self,
13159 flags: NodeAttributeFlags,
13160 attributes: &NodeAttributes,
13161 ) -> Self::DeprecatedSetAttrResponseFut;
13162 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
13163 + Send;
13164 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
13165 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
13166 + Send;
13167 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
13168 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
13169 + Send;
13170 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
13171 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
13172 + Send;
13173 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
13174 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
13175 + Send;
13176 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
13177 type GetTokenResponseFut: std::future::Future<Output = Result<NodeGetTokenResult, fidl::Error>>
13178 + Send;
13179 fn r#get_token(&self) -> Self::GetTokenResponseFut;
13180 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
13181 + Send;
13182 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
13183 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
13184 + Send;
13185 fn r#update_attributes(
13186 &self,
13187 payload: &MutableNodeAttributes,
13188 ) -> Self::UpdateAttributesResponseFut;
13189 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
13190 fn r#sync(&self) -> Self::SyncResponseFut;
13191 fn r#list_extended_attributes(
13192 &self,
13193 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13194 ) -> Result<(), fidl::Error>;
13195 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
13196 + Send;
13197 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
13198 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
13199 + Send;
13200 fn r#set_extended_attribute(
13201 &self,
13202 name: &[u8],
13203 value: ExtendedAttributeValue,
13204 mode: SetExtendedAttributeMode,
13205 ) -> Self::SetExtendedAttributeResponseFut;
13206 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
13207 + Send;
13208 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
13209}
13210#[derive(Debug)]
13211#[cfg(target_os = "fuchsia")]
13212pub struct NodeSynchronousProxy {
13213 client: fidl::client::sync::Client,
13214}
13215
13216#[cfg(target_os = "fuchsia")]
13217impl fidl::endpoints::SynchronousProxy for NodeSynchronousProxy {
13218 type Proxy = NodeProxy;
13219 type Protocol = NodeMarker;
13220
13221 fn from_channel(inner: fidl::Channel) -> Self {
13222 Self::new(inner)
13223 }
13224
13225 fn into_channel(self) -> fidl::Channel {
13226 self.client.into_channel()
13227 }
13228
13229 fn as_channel(&self) -> &fidl::Channel {
13230 self.client.as_channel()
13231 }
13232}
13233
13234#[cfg(target_os = "fuchsia")]
13235impl NodeSynchronousProxy {
13236 pub fn new(channel: fidl::Channel) -> Self {
13237 Self { client: fidl::client::sync::Client::new(channel) }
13238 }
13239
13240 pub fn into_channel(self) -> fidl::Channel {
13241 self.client.into_channel()
13242 }
13243
13244 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<NodeEvent, fidl::Error> {
13247 NodeEvent::decode(self.client.wait_for_event::<NodeMarker>(deadline)?)
13248 }
13249
13250 pub fn r#clone(
13251 &self,
13252 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13253 ) -> Result<(), fidl::Error> {
13254 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13255 (request,),
13256 0x20d8a7aba2168a79,
13257 fidl::encoding::DynamicFlags::empty(),
13258 )
13259 }
13260
13261 pub fn r#close(
13272 &self,
13273 ___deadline: zx::MonotonicInstant,
13274 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13275 let _response = self.client.send_query::<
13276 fidl::encoding::EmptyPayload,
13277 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13278 NodeMarker,
13279 >(
13280 (),
13281 0x5ac5d459ad7f657e,
13282 fidl::encoding::DynamicFlags::empty(),
13283 ___deadline,
13284 )?;
13285 Ok(_response.map(|x| x))
13286 }
13287
13288 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
13289 let _response = self.client.send_query::<
13290 fidl::encoding::EmptyPayload,
13291 fidl_fuchsia_unknown::QueryableQueryResponse,
13292 NodeMarker,
13293 >(
13294 (),
13295 0x2658edee9decfc06,
13296 fidl::encoding::DynamicFlags::empty(),
13297 ___deadline,
13298 )?;
13299 Ok(_response.protocol)
13300 }
13301
13302 pub fn r#deprecated_get_attr(
13306 &self,
13307 ___deadline: zx::MonotonicInstant,
13308 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13309 let _response = self
13310 .client
13311 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse, NodeMarker>(
13312 (),
13313 0x78985e216314dafd,
13314 fidl::encoding::DynamicFlags::empty(),
13315 ___deadline,
13316 )?;
13317 Ok((_response.s, _response.attributes))
13318 }
13319
13320 pub fn r#deprecated_set_attr(
13322 &self,
13323 mut flags: NodeAttributeFlags,
13324 mut attributes: &NodeAttributes,
13325 ___deadline: zx::MonotonicInstant,
13326 ) -> Result<i32, fidl::Error> {
13327 let _response = self
13328 .client
13329 .send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse, NodeMarker>(
13330 (flags, attributes),
13331 0x4186c0f40d938f46,
13332 fidl::encoding::DynamicFlags::empty(),
13333 ___deadline,
13334 )?;
13335 Ok(_response.s)
13336 }
13337
13338 pub fn r#deprecated_get_flags(
13340 &self,
13341 ___deadline: zx::MonotonicInstant,
13342 ) -> Result<(i32, OpenFlags), fidl::Error> {
13343 let _response = self
13344 .client
13345 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse, NodeMarker>(
13346 (),
13347 0x5b88fffb8eda3aa1,
13348 fidl::encoding::DynamicFlags::empty(),
13349 ___deadline,
13350 )?;
13351 Ok((_response.s, _response.flags))
13352 }
13353
13354 pub fn r#deprecated_set_flags(
13356 &self,
13357 mut flags: OpenFlags,
13358 ___deadline: zx::MonotonicInstant,
13359 ) -> Result<i32, fidl::Error> {
13360 let _response = self.client.send_query::<
13361 NodeDeprecatedSetFlagsRequest,
13362 NodeDeprecatedSetFlagsResponse,
13363 NodeMarker,
13364 >(
13365 (flags,),
13366 0x5295b76c71fde733,
13367 fidl::encoding::DynamicFlags::empty(),
13368 ___deadline,
13369 )?;
13370 Ok(_response.s)
13371 }
13372
13373 pub fn r#get_flags(
13382 &self,
13383 ___deadline: zx::MonotonicInstant,
13384 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13385 let _response = self.client.send_query::<
13386 fidl::encoding::EmptyPayload,
13387 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13388 NodeMarker,
13389 >(
13390 (),
13391 0x176eb318f64ec23,
13392 fidl::encoding::DynamicFlags::FLEXIBLE,
13393 ___deadline,
13394 )?
13395 .into_result::<NodeMarker>("get_flags")?;
13396 Ok(_response.map(|x| x.flags))
13397 }
13398
13399 pub fn r#set_flags(
13409 &self,
13410 mut flags: Flags,
13411 ___deadline: zx::MonotonicInstant,
13412 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13413 let _response = self.client.send_query::<
13414 NodeSetFlagsRequest,
13415 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13416 NodeMarker,
13417 >(
13418 (flags,),
13419 0x55a8028685791ea8,
13420 fidl::encoding::DynamicFlags::FLEXIBLE,
13421 ___deadline,
13422 )?
13423 .into_result::<NodeMarker>("set_flags")?;
13424 Ok(_response.map(|x| x))
13425 }
13426
13427 pub fn r#query_filesystem(
13431 &self,
13432 ___deadline: zx::MonotonicInstant,
13433 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13434 let _response = self
13435 .client
13436 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, NodeMarker>(
13437 (),
13438 0x6f344a1c6b0a0610,
13439 fidl::encoding::DynamicFlags::empty(),
13440 ___deadline,
13441 )?;
13442 Ok((_response.s, _response.info))
13443 }
13444
13445 pub fn r#get_token(
13452 &self,
13453 ___deadline: zx::MonotonicInstant,
13454 ) -> Result<NodeGetTokenResult, fidl::Error> {
13455 let _response = self.client.send_query::<
13456 fidl::encoding::EmptyPayload,
13457 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
13458 NodeMarker,
13459 >(
13460 (),
13461 0x5054f0ade7076cec,
13462 fidl::encoding::DynamicFlags::FLEXIBLE,
13463 ___deadline,
13464 )?
13465 .into_result::<NodeMarker>("get_token")?;
13466 Ok(_response.map(|x| x.token))
13467 }
13468
13469 pub fn r#get_attributes(
13483 &self,
13484 mut query: NodeAttributesQuery,
13485 ___deadline: zx::MonotonicInstant,
13486 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13487 let _response = self.client.send_query::<
13488 NodeGetAttributesRequest,
13489 fidl::encoding::ResultType<NodeAttributes2, i32>,
13490 NodeMarker,
13491 >(
13492 (query,),
13493 0x3d4396a638ea053b,
13494 fidl::encoding::DynamicFlags::empty(),
13495 ___deadline,
13496 )?;
13497 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13498 }
13499
13500 pub fn r#update_attributes(
13509 &self,
13510 mut payload: &MutableNodeAttributes,
13511 ___deadline: zx::MonotonicInstant,
13512 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13513 let _response = self.client.send_query::<
13514 MutableNodeAttributes,
13515 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13516 NodeMarker,
13517 >(
13518 payload,
13519 0x3308c1da5a89bf08,
13520 fidl::encoding::DynamicFlags::empty(),
13521 ___deadline,
13522 )?;
13523 Ok(_response.map(|x| x))
13524 }
13525
13526 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
13536 let _response = self.client.send_query::<
13537 fidl::encoding::EmptyPayload,
13538 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13539 NodeMarker,
13540 >(
13541 (),
13542 0x2c5c27ca0ab5dc49,
13543 fidl::encoding::DynamicFlags::empty(),
13544 ___deadline,
13545 )?;
13546 Ok(_response.map(|x| x))
13547 }
13548
13549 pub fn r#list_extended_attributes(
13558 &self,
13559 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13560 ) -> Result<(), fidl::Error> {
13561 self.client.send::<NodeListExtendedAttributesRequest>(
13562 (iterator,),
13563 0x4b61033de007fcd0,
13564 fidl::encoding::DynamicFlags::empty(),
13565 )
13566 }
13567
13568 pub fn r#get_extended_attribute(
13575 &self,
13576 mut name: &[u8],
13577 ___deadline: zx::MonotonicInstant,
13578 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13579 let _response = self.client.send_query::<
13580 NodeGetExtendedAttributeRequest,
13581 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13582 NodeMarker,
13583 >(
13584 (name,),
13585 0x45ffa3ccfdeb76db,
13586 fidl::encoding::DynamicFlags::empty(),
13587 ___deadline,
13588 )?;
13589 Ok(_response.map(|x| x))
13590 }
13591
13592 pub fn r#set_extended_attribute(
13600 &self,
13601 mut name: &[u8],
13602 mut value: ExtendedAttributeValue,
13603 mut mode: SetExtendedAttributeMode,
13604 ___deadline: zx::MonotonicInstant,
13605 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13606 let _response = self.client.send_query::<
13607 NodeSetExtendedAttributeRequest,
13608 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13609 NodeMarker,
13610 >(
13611 (name, &mut value, mode,),
13612 0x4a951362f681f23c,
13613 fidl::encoding::DynamicFlags::empty(),
13614 ___deadline,
13615 )?;
13616 Ok(_response.map(|x| x))
13617 }
13618
13619 pub fn r#remove_extended_attribute(
13625 &self,
13626 mut name: &[u8],
13627 ___deadline: zx::MonotonicInstant,
13628 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13629 let _response = self.client.send_query::<
13630 NodeRemoveExtendedAttributeRequest,
13631 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13632 NodeMarker,
13633 >(
13634 (name,),
13635 0x7a0b9f3a9bf9032d,
13636 fidl::encoding::DynamicFlags::empty(),
13637 ___deadline,
13638 )?;
13639 Ok(_response.map(|x| x))
13640 }
13641}
13642
13643#[cfg(target_os = "fuchsia")]
13644impl From<NodeSynchronousProxy> for zx::NullableHandle {
13645 fn from(value: NodeSynchronousProxy) -> Self {
13646 value.into_channel().into()
13647 }
13648}
13649
13650#[cfg(target_os = "fuchsia")]
13651impl From<fidl::Channel> for NodeSynchronousProxy {
13652 fn from(value: fidl::Channel) -> Self {
13653 Self::new(value)
13654 }
13655}
13656
13657#[cfg(target_os = "fuchsia")]
13658impl fidl::endpoints::FromClient for NodeSynchronousProxy {
13659 type Protocol = NodeMarker;
13660
13661 fn from_client(value: fidl::endpoints::ClientEnd<NodeMarker>) -> Self {
13662 Self::new(value.into_channel())
13663 }
13664}
13665
13666#[derive(Debug, Clone)]
13667pub struct NodeProxy {
13668 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
13669}
13670
13671impl fidl::endpoints::Proxy for NodeProxy {
13672 type Protocol = NodeMarker;
13673
13674 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
13675 Self::new(inner)
13676 }
13677
13678 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
13679 self.client.into_channel().map_err(|client| Self { client })
13680 }
13681
13682 fn as_channel(&self) -> &::fidl::AsyncChannel {
13683 self.client.as_channel()
13684 }
13685}
13686
13687impl NodeProxy {
13688 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
13690 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
13691 Self { client: fidl::client::Client::new(channel, protocol_name) }
13692 }
13693
13694 pub fn take_event_stream(&self) -> NodeEventStream {
13700 NodeEventStream { event_receiver: self.client.take_event_receiver() }
13701 }
13702
13703 pub fn r#clone(
13704 &self,
13705 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13706 ) -> Result<(), fidl::Error> {
13707 NodeProxyInterface::r#clone(self, request)
13708 }
13709
13710 pub fn r#close(
13721 &self,
13722 ) -> fidl::client::QueryResponseFut<
13723 fidl_fuchsia_unknown::CloseableCloseResult,
13724 fidl::encoding::DefaultFuchsiaResourceDialect,
13725 > {
13726 NodeProxyInterface::r#close(self)
13727 }
13728
13729 pub fn r#query(
13730 &self,
13731 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
13732 {
13733 NodeProxyInterface::r#query(self)
13734 }
13735
13736 pub fn r#deprecated_get_attr(
13740 &self,
13741 ) -> fidl::client::QueryResponseFut<
13742 (i32, NodeAttributes),
13743 fidl::encoding::DefaultFuchsiaResourceDialect,
13744 > {
13745 NodeProxyInterface::r#deprecated_get_attr(self)
13746 }
13747
13748 pub fn r#deprecated_set_attr(
13750 &self,
13751 mut flags: NodeAttributeFlags,
13752 mut attributes: &NodeAttributes,
13753 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13754 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
13755 }
13756
13757 pub fn r#deprecated_get_flags(
13759 &self,
13760 ) -> fidl::client::QueryResponseFut<
13761 (i32, OpenFlags),
13762 fidl::encoding::DefaultFuchsiaResourceDialect,
13763 > {
13764 NodeProxyInterface::r#deprecated_get_flags(self)
13765 }
13766
13767 pub fn r#deprecated_set_flags(
13769 &self,
13770 mut flags: OpenFlags,
13771 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13772 NodeProxyInterface::r#deprecated_set_flags(self, flags)
13773 }
13774
13775 pub fn r#get_flags(
13784 &self,
13785 ) -> fidl::client::QueryResponseFut<
13786 NodeGetFlagsResult,
13787 fidl::encoding::DefaultFuchsiaResourceDialect,
13788 > {
13789 NodeProxyInterface::r#get_flags(self)
13790 }
13791
13792 pub fn r#set_flags(
13802 &self,
13803 mut flags: Flags,
13804 ) -> fidl::client::QueryResponseFut<
13805 NodeSetFlagsResult,
13806 fidl::encoding::DefaultFuchsiaResourceDialect,
13807 > {
13808 NodeProxyInterface::r#set_flags(self, flags)
13809 }
13810
13811 pub fn r#query_filesystem(
13815 &self,
13816 ) -> fidl::client::QueryResponseFut<
13817 (i32, Option<Box<FilesystemInfo>>),
13818 fidl::encoding::DefaultFuchsiaResourceDialect,
13819 > {
13820 NodeProxyInterface::r#query_filesystem(self)
13821 }
13822
13823 pub fn r#get_token(
13830 &self,
13831 ) -> fidl::client::QueryResponseFut<
13832 NodeGetTokenResult,
13833 fidl::encoding::DefaultFuchsiaResourceDialect,
13834 > {
13835 NodeProxyInterface::r#get_token(self)
13836 }
13837
13838 pub fn r#get_attributes(
13852 &self,
13853 mut query: NodeAttributesQuery,
13854 ) -> fidl::client::QueryResponseFut<
13855 NodeGetAttributesResult,
13856 fidl::encoding::DefaultFuchsiaResourceDialect,
13857 > {
13858 NodeProxyInterface::r#get_attributes(self, query)
13859 }
13860
13861 pub fn r#update_attributes(
13870 &self,
13871 mut payload: &MutableNodeAttributes,
13872 ) -> fidl::client::QueryResponseFut<
13873 NodeUpdateAttributesResult,
13874 fidl::encoding::DefaultFuchsiaResourceDialect,
13875 > {
13876 NodeProxyInterface::r#update_attributes(self, payload)
13877 }
13878
13879 pub fn r#sync(
13889 &self,
13890 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
13891 {
13892 NodeProxyInterface::r#sync(self)
13893 }
13894
13895 pub fn r#list_extended_attributes(
13904 &self,
13905 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13906 ) -> Result<(), fidl::Error> {
13907 NodeProxyInterface::r#list_extended_attributes(self, iterator)
13908 }
13909
13910 pub fn r#get_extended_attribute(
13917 &self,
13918 mut name: &[u8],
13919 ) -> fidl::client::QueryResponseFut<
13920 NodeGetExtendedAttributeResult,
13921 fidl::encoding::DefaultFuchsiaResourceDialect,
13922 > {
13923 NodeProxyInterface::r#get_extended_attribute(self, name)
13924 }
13925
13926 pub fn r#set_extended_attribute(
13934 &self,
13935 mut name: &[u8],
13936 mut value: ExtendedAttributeValue,
13937 mut mode: SetExtendedAttributeMode,
13938 ) -> fidl::client::QueryResponseFut<
13939 NodeSetExtendedAttributeResult,
13940 fidl::encoding::DefaultFuchsiaResourceDialect,
13941 > {
13942 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
13943 }
13944
13945 pub fn r#remove_extended_attribute(
13951 &self,
13952 mut name: &[u8],
13953 ) -> fidl::client::QueryResponseFut<
13954 NodeRemoveExtendedAttributeResult,
13955 fidl::encoding::DefaultFuchsiaResourceDialect,
13956 > {
13957 NodeProxyInterface::r#remove_extended_attribute(self, name)
13958 }
13959}
13960
13961impl NodeProxyInterface for NodeProxy {
13962 fn r#clone(
13963 &self,
13964 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13965 ) -> Result<(), fidl::Error> {
13966 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13967 (request,),
13968 0x20d8a7aba2168a79,
13969 fidl::encoding::DynamicFlags::empty(),
13970 )
13971 }
13972
13973 type CloseResponseFut = fidl::client::QueryResponseFut<
13974 fidl_fuchsia_unknown::CloseableCloseResult,
13975 fidl::encoding::DefaultFuchsiaResourceDialect,
13976 >;
13977 fn r#close(&self) -> Self::CloseResponseFut {
13978 fn _decode(
13979 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13980 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13981 let _response = fidl::client::decode_transaction_body::<
13982 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13983 fidl::encoding::DefaultFuchsiaResourceDialect,
13984 0x5ac5d459ad7f657e,
13985 >(_buf?)?;
13986 Ok(_response.map(|x| x))
13987 }
13988 self.client.send_query_and_decode::<
13989 fidl::encoding::EmptyPayload,
13990 fidl_fuchsia_unknown::CloseableCloseResult,
13991 >(
13992 (),
13993 0x5ac5d459ad7f657e,
13994 fidl::encoding::DynamicFlags::empty(),
13995 _decode,
13996 )
13997 }
13998
13999 type QueryResponseFut =
14000 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
14001 fn r#query(&self) -> Self::QueryResponseFut {
14002 fn _decode(
14003 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14004 ) -> Result<Vec<u8>, fidl::Error> {
14005 let _response = fidl::client::decode_transaction_body::<
14006 fidl_fuchsia_unknown::QueryableQueryResponse,
14007 fidl::encoding::DefaultFuchsiaResourceDialect,
14008 0x2658edee9decfc06,
14009 >(_buf?)?;
14010 Ok(_response.protocol)
14011 }
14012 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14013 (),
14014 0x2658edee9decfc06,
14015 fidl::encoding::DynamicFlags::empty(),
14016 _decode,
14017 )
14018 }
14019
14020 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
14021 (i32, NodeAttributes),
14022 fidl::encoding::DefaultFuchsiaResourceDialect,
14023 >;
14024 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
14025 fn _decode(
14026 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14027 ) -> Result<(i32, NodeAttributes), fidl::Error> {
14028 let _response = fidl::client::decode_transaction_body::<
14029 NodeDeprecatedGetAttrResponse,
14030 fidl::encoding::DefaultFuchsiaResourceDialect,
14031 0x78985e216314dafd,
14032 >(_buf?)?;
14033 Ok((_response.s, _response.attributes))
14034 }
14035 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14036 (),
14037 0x78985e216314dafd,
14038 fidl::encoding::DynamicFlags::empty(),
14039 _decode,
14040 )
14041 }
14042
14043 type DeprecatedSetAttrResponseFut =
14044 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
14045 fn r#deprecated_set_attr(
14046 &self,
14047 mut flags: NodeAttributeFlags,
14048 mut attributes: &NodeAttributes,
14049 ) -> Self::DeprecatedSetAttrResponseFut {
14050 fn _decode(
14051 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14052 ) -> Result<i32, fidl::Error> {
14053 let _response = fidl::client::decode_transaction_body::<
14054 NodeDeprecatedSetAttrResponse,
14055 fidl::encoding::DefaultFuchsiaResourceDialect,
14056 0x4186c0f40d938f46,
14057 >(_buf?)?;
14058 Ok(_response.s)
14059 }
14060 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14061 (flags, attributes),
14062 0x4186c0f40d938f46,
14063 fidl::encoding::DynamicFlags::empty(),
14064 _decode,
14065 )
14066 }
14067
14068 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14069 (i32, OpenFlags),
14070 fidl::encoding::DefaultFuchsiaResourceDialect,
14071 >;
14072 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14073 fn _decode(
14074 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14075 ) -> Result<(i32, OpenFlags), fidl::Error> {
14076 let _response = fidl::client::decode_transaction_body::<
14077 NodeDeprecatedGetFlagsResponse,
14078 fidl::encoding::DefaultFuchsiaResourceDialect,
14079 0x5b88fffb8eda3aa1,
14080 >(_buf?)?;
14081 Ok((_response.s, _response.flags))
14082 }
14083 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14084 (),
14085 0x5b88fffb8eda3aa1,
14086 fidl::encoding::DynamicFlags::empty(),
14087 _decode,
14088 )
14089 }
14090
14091 type DeprecatedSetFlagsResponseFut =
14092 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
14093 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14094 fn _decode(
14095 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14096 ) -> Result<i32, fidl::Error> {
14097 let _response = fidl::client::decode_transaction_body::<
14098 NodeDeprecatedSetFlagsResponse,
14099 fidl::encoding::DefaultFuchsiaResourceDialect,
14100 0x5295b76c71fde733,
14101 >(_buf?)?;
14102 Ok(_response.s)
14103 }
14104 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14105 (flags,),
14106 0x5295b76c71fde733,
14107 fidl::encoding::DynamicFlags::empty(),
14108 _decode,
14109 )
14110 }
14111
14112 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14113 NodeGetFlagsResult,
14114 fidl::encoding::DefaultFuchsiaResourceDialect,
14115 >;
14116 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14117 fn _decode(
14118 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14119 ) -> Result<NodeGetFlagsResult, fidl::Error> {
14120 let _response = fidl::client::decode_transaction_body::<
14121 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14122 fidl::encoding::DefaultFuchsiaResourceDialect,
14123 0x176eb318f64ec23,
14124 >(_buf?)?
14125 .into_result::<NodeMarker>("get_flags")?;
14126 Ok(_response.map(|x| x.flags))
14127 }
14128 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14129 (),
14130 0x176eb318f64ec23,
14131 fidl::encoding::DynamicFlags::FLEXIBLE,
14132 _decode,
14133 )
14134 }
14135
14136 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14137 NodeSetFlagsResult,
14138 fidl::encoding::DefaultFuchsiaResourceDialect,
14139 >;
14140 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14141 fn _decode(
14142 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14143 ) -> Result<NodeSetFlagsResult, fidl::Error> {
14144 let _response = fidl::client::decode_transaction_body::<
14145 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14146 fidl::encoding::DefaultFuchsiaResourceDialect,
14147 0x55a8028685791ea8,
14148 >(_buf?)?
14149 .into_result::<NodeMarker>("set_flags")?;
14150 Ok(_response.map(|x| x))
14151 }
14152 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14153 (flags,),
14154 0x55a8028685791ea8,
14155 fidl::encoding::DynamicFlags::FLEXIBLE,
14156 _decode,
14157 )
14158 }
14159
14160 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14161 (i32, Option<Box<FilesystemInfo>>),
14162 fidl::encoding::DefaultFuchsiaResourceDialect,
14163 >;
14164 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14165 fn _decode(
14166 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14167 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14168 let _response = fidl::client::decode_transaction_body::<
14169 NodeQueryFilesystemResponse,
14170 fidl::encoding::DefaultFuchsiaResourceDialect,
14171 0x6f344a1c6b0a0610,
14172 >(_buf?)?;
14173 Ok((_response.s, _response.info))
14174 }
14175 self.client.send_query_and_decode::<
14176 fidl::encoding::EmptyPayload,
14177 (i32, Option<Box<FilesystemInfo>>),
14178 >(
14179 (),
14180 0x6f344a1c6b0a0610,
14181 fidl::encoding::DynamicFlags::empty(),
14182 _decode,
14183 )
14184 }
14185
14186 type GetTokenResponseFut = fidl::client::QueryResponseFut<
14187 NodeGetTokenResult,
14188 fidl::encoding::DefaultFuchsiaResourceDialect,
14189 >;
14190 fn r#get_token(&self) -> Self::GetTokenResponseFut {
14191 fn _decode(
14192 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14193 ) -> Result<NodeGetTokenResult, fidl::Error> {
14194 let _response = fidl::client::decode_transaction_body::<
14195 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
14196 fidl::encoding::DefaultFuchsiaResourceDialect,
14197 0x5054f0ade7076cec,
14198 >(_buf?)?
14199 .into_result::<NodeMarker>("get_token")?;
14200 Ok(_response.map(|x| x.token))
14201 }
14202 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetTokenResult>(
14203 (),
14204 0x5054f0ade7076cec,
14205 fidl::encoding::DynamicFlags::FLEXIBLE,
14206 _decode,
14207 )
14208 }
14209
14210 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14211 NodeGetAttributesResult,
14212 fidl::encoding::DefaultFuchsiaResourceDialect,
14213 >;
14214 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14215 fn _decode(
14216 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14217 ) -> Result<NodeGetAttributesResult, fidl::Error> {
14218 let _response = fidl::client::decode_transaction_body::<
14219 fidl::encoding::ResultType<NodeAttributes2, i32>,
14220 fidl::encoding::DefaultFuchsiaResourceDialect,
14221 0x3d4396a638ea053b,
14222 >(_buf?)?;
14223 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14224 }
14225 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14226 (query,),
14227 0x3d4396a638ea053b,
14228 fidl::encoding::DynamicFlags::empty(),
14229 _decode,
14230 )
14231 }
14232
14233 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14234 NodeUpdateAttributesResult,
14235 fidl::encoding::DefaultFuchsiaResourceDialect,
14236 >;
14237 fn r#update_attributes(
14238 &self,
14239 mut payload: &MutableNodeAttributes,
14240 ) -> Self::UpdateAttributesResponseFut {
14241 fn _decode(
14242 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14243 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14244 let _response = fidl::client::decode_transaction_body::<
14245 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14246 fidl::encoding::DefaultFuchsiaResourceDialect,
14247 0x3308c1da5a89bf08,
14248 >(_buf?)?;
14249 Ok(_response.map(|x| x))
14250 }
14251 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14252 payload,
14253 0x3308c1da5a89bf08,
14254 fidl::encoding::DynamicFlags::empty(),
14255 _decode,
14256 )
14257 }
14258
14259 type SyncResponseFut = fidl::client::QueryResponseFut<
14260 NodeSyncResult,
14261 fidl::encoding::DefaultFuchsiaResourceDialect,
14262 >;
14263 fn r#sync(&self) -> Self::SyncResponseFut {
14264 fn _decode(
14265 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14266 ) -> Result<NodeSyncResult, fidl::Error> {
14267 let _response = fidl::client::decode_transaction_body::<
14268 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14269 fidl::encoding::DefaultFuchsiaResourceDialect,
14270 0x2c5c27ca0ab5dc49,
14271 >(_buf?)?;
14272 Ok(_response.map(|x| x))
14273 }
14274 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14275 (),
14276 0x2c5c27ca0ab5dc49,
14277 fidl::encoding::DynamicFlags::empty(),
14278 _decode,
14279 )
14280 }
14281
14282 fn r#list_extended_attributes(
14283 &self,
14284 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14285 ) -> Result<(), fidl::Error> {
14286 self.client.send::<NodeListExtendedAttributesRequest>(
14287 (iterator,),
14288 0x4b61033de007fcd0,
14289 fidl::encoding::DynamicFlags::empty(),
14290 )
14291 }
14292
14293 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14294 NodeGetExtendedAttributeResult,
14295 fidl::encoding::DefaultFuchsiaResourceDialect,
14296 >;
14297 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14298 fn _decode(
14299 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14300 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14301 let _response = fidl::client::decode_transaction_body::<
14302 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14303 fidl::encoding::DefaultFuchsiaResourceDialect,
14304 0x45ffa3ccfdeb76db,
14305 >(_buf?)?;
14306 Ok(_response.map(|x| x))
14307 }
14308 self.client.send_query_and_decode::<
14309 NodeGetExtendedAttributeRequest,
14310 NodeGetExtendedAttributeResult,
14311 >(
14312 (name,),
14313 0x45ffa3ccfdeb76db,
14314 fidl::encoding::DynamicFlags::empty(),
14315 _decode,
14316 )
14317 }
14318
14319 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14320 NodeSetExtendedAttributeResult,
14321 fidl::encoding::DefaultFuchsiaResourceDialect,
14322 >;
14323 fn r#set_extended_attribute(
14324 &self,
14325 mut name: &[u8],
14326 mut value: ExtendedAttributeValue,
14327 mut mode: SetExtendedAttributeMode,
14328 ) -> Self::SetExtendedAttributeResponseFut {
14329 fn _decode(
14330 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14331 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14332 let _response = fidl::client::decode_transaction_body::<
14333 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14334 fidl::encoding::DefaultFuchsiaResourceDialect,
14335 0x4a951362f681f23c,
14336 >(_buf?)?;
14337 Ok(_response.map(|x| x))
14338 }
14339 self.client.send_query_and_decode::<
14340 NodeSetExtendedAttributeRequest,
14341 NodeSetExtendedAttributeResult,
14342 >(
14343 (name, &mut value, mode,),
14344 0x4a951362f681f23c,
14345 fidl::encoding::DynamicFlags::empty(),
14346 _decode,
14347 )
14348 }
14349
14350 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14351 NodeRemoveExtendedAttributeResult,
14352 fidl::encoding::DefaultFuchsiaResourceDialect,
14353 >;
14354 fn r#remove_extended_attribute(
14355 &self,
14356 mut name: &[u8],
14357 ) -> Self::RemoveExtendedAttributeResponseFut {
14358 fn _decode(
14359 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14360 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14361 let _response = fidl::client::decode_transaction_body::<
14362 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14363 fidl::encoding::DefaultFuchsiaResourceDialect,
14364 0x7a0b9f3a9bf9032d,
14365 >(_buf?)?;
14366 Ok(_response.map(|x| x))
14367 }
14368 self.client.send_query_and_decode::<
14369 NodeRemoveExtendedAttributeRequest,
14370 NodeRemoveExtendedAttributeResult,
14371 >(
14372 (name,),
14373 0x7a0b9f3a9bf9032d,
14374 fidl::encoding::DynamicFlags::empty(),
14375 _decode,
14376 )
14377 }
14378}
14379
14380pub struct NodeEventStream {
14381 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
14382}
14383
14384impl std::marker::Unpin for NodeEventStream {}
14385
14386impl futures::stream::FusedStream for NodeEventStream {
14387 fn is_terminated(&self) -> bool {
14388 self.event_receiver.is_terminated()
14389 }
14390}
14391
14392impl futures::Stream for NodeEventStream {
14393 type Item = Result<NodeEvent, fidl::Error>;
14394
14395 fn poll_next(
14396 mut self: std::pin::Pin<&mut Self>,
14397 cx: &mut std::task::Context<'_>,
14398 ) -> std::task::Poll<Option<Self::Item>> {
14399 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14400 &mut self.event_receiver,
14401 cx
14402 )?) {
14403 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
14404 None => std::task::Poll::Ready(None),
14405 }
14406 }
14407}
14408
14409#[derive(Debug)]
14410pub enum NodeEvent {
14411 OnOpen_ {
14412 s: i32,
14413 info: Option<Box<NodeInfoDeprecated>>,
14414 },
14415 OnRepresentation {
14416 payload: Representation,
14417 },
14418 #[non_exhaustive]
14419 _UnknownEvent {
14420 ordinal: u64,
14422 },
14423}
14424
14425impl NodeEvent {
14426 #[allow(irrefutable_let_patterns)]
14427 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14428 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14429 }
14430 #[allow(irrefutable_let_patterns)]
14431 pub fn into_on_representation(self) -> Option<Representation> {
14432 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14433 }
14434
14435 fn decode(
14437 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14438 ) -> Result<NodeEvent, fidl::Error> {
14439 let (bytes, _handles) = buf.split_mut();
14440 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14441 debug_assert_eq!(tx_header.tx_id, 0);
14442 match tx_header.ordinal {
14443 0x7fc7bbb1dbfd1972 => {
14444 let mut out = fidl::new_empty!(
14445 NodeOnOpenRequest,
14446 fidl::encoding::DefaultFuchsiaResourceDialect
14447 );
14448 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14449 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
14450 }
14451 0x5cb40567d80a510c => {
14452 let mut out =
14453 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
14454 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14455 Ok((NodeEvent::OnRepresentation { payload: out }))
14456 }
14457 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14458 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14459 }
14460 _ => Err(fidl::Error::UnknownOrdinal {
14461 ordinal: tx_header.ordinal,
14462 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14463 }),
14464 }
14465 }
14466}
14467
14468pub struct NodeRequestStream {
14470 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14471 is_terminated: bool,
14472}
14473
14474impl std::marker::Unpin for NodeRequestStream {}
14475
14476impl futures::stream::FusedStream for NodeRequestStream {
14477 fn is_terminated(&self) -> bool {
14478 self.is_terminated
14479 }
14480}
14481
14482impl fidl::endpoints::RequestStream for NodeRequestStream {
14483 type Protocol = NodeMarker;
14484 type ControlHandle = NodeControlHandle;
14485
14486 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
14487 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14488 }
14489
14490 fn control_handle(&self) -> Self::ControlHandle {
14491 NodeControlHandle { inner: self.inner.clone() }
14492 }
14493
14494 fn into_inner(
14495 self,
14496 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
14497 {
14498 (self.inner, self.is_terminated)
14499 }
14500
14501 fn from_inner(
14502 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14503 is_terminated: bool,
14504 ) -> Self {
14505 Self { inner, is_terminated }
14506 }
14507}
14508
14509impl futures::Stream for NodeRequestStream {
14510 type Item = Result<NodeRequest, fidl::Error>;
14511
14512 fn poll_next(
14513 mut self: std::pin::Pin<&mut Self>,
14514 cx: &mut std::task::Context<'_>,
14515 ) -> std::task::Poll<Option<Self::Item>> {
14516 let this = &mut *self;
14517 if this.inner.check_shutdown(cx) {
14518 this.is_terminated = true;
14519 return std::task::Poll::Ready(None);
14520 }
14521 if this.is_terminated {
14522 panic!("polled NodeRequestStream after completion");
14523 }
14524 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
14525 |bytes, handles| {
14526 match this.inner.channel().read_etc(cx, bytes, handles) {
14527 std::task::Poll::Ready(Ok(())) => {}
14528 std::task::Poll::Pending => return std::task::Poll::Pending,
14529 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
14530 this.is_terminated = true;
14531 return std::task::Poll::Ready(None);
14532 }
14533 std::task::Poll::Ready(Err(e)) => {
14534 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14535 e.into(),
14536 ))));
14537 }
14538 }
14539
14540 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14542
14543 std::task::Poll::Ready(Some(match header.ordinal {
14544 0x20d8a7aba2168a79 => {
14545 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14546 let mut req = fidl::new_empty!(
14547 fidl_fuchsia_unknown::CloneableCloneRequest,
14548 fidl::encoding::DefaultFuchsiaResourceDialect
14549 );
14550 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14551 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14552 Ok(NodeRequest::Clone { request: req.request, control_handle })
14553 }
14554 0x5ac5d459ad7f657e => {
14555 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14556 let mut req = fidl::new_empty!(
14557 fidl::encoding::EmptyPayload,
14558 fidl::encoding::DefaultFuchsiaResourceDialect
14559 );
14560 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14561 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14562 Ok(NodeRequest::Close {
14563 responder: NodeCloseResponder {
14564 control_handle: std::mem::ManuallyDrop::new(control_handle),
14565 tx_id: header.tx_id,
14566 },
14567 })
14568 }
14569 0x2658edee9decfc06 => {
14570 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14571 let mut req = fidl::new_empty!(
14572 fidl::encoding::EmptyPayload,
14573 fidl::encoding::DefaultFuchsiaResourceDialect
14574 );
14575 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14576 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14577 Ok(NodeRequest::Query {
14578 responder: NodeQueryResponder {
14579 control_handle: std::mem::ManuallyDrop::new(control_handle),
14580 tx_id: header.tx_id,
14581 },
14582 })
14583 }
14584 0x78985e216314dafd => {
14585 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14586 let mut req = fidl::new_empty!(
14587 fidl::encoding::EmptyPayload,
14588 fidl::encoding::DefaultFuchsiaResourceDialect
14589 );
14590 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14591 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14592 Ok(NodeRequest::DeprecatedGetAttr {
14593 responder: NodeDeprecatedGetAttrResponder {
14594 control_handle: std::mem::ManuallyDrop::new(control_handle),
14595 tx_id: header.tx_id,
14596 },
14597 })
14598 }
14599 0x4186c0f40d938f46 => {
14600 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14601 let mut req = fidl::new_empty!(
14602 NodeDeprecatedSetAttrRequest,
14603 fidl::encoding::DefaultFuchsiaResourceDialect
14604 );
14605 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14606 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14607 Ok(NodeRequest::DeprecatedSetAttr {
14608 flags: req.flags,
14609 attributes: req.attributes,
14610
14611 responder: NodeDeprecatedSetAttrResponder {
14612 control_handle: std::mem::ManuallyDrop::new(control_handle),
14613 tx_id: header.tx_id,
14614 },
14615 })
14616 }
14617 0x5b88fffb8eda3aa1 => {
14618 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14619 let mut req = fidl::new_empty!(
14620 fidl::encoding::EmptyPayload,
14621 fidl::encoding::DefaultFuchsiaResourceDialect
14622 );
14623 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14624 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14625 Ok(NodeRequest::DeprecatedGetFlags {
14626 responder: NodeDeprecatedGetFlagsResponder {
14627 control_handle: std::mem::ManuallyDrop::new(control_handle),
14628 tx_id: header.tx_id,
14629 },
14630 })
14631 }
14632 0x5295b76c71fde733 => {
14633 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14634 let mut req = fidl::new_empty!(
14635 NodeDeprecatedSetFlagsRequest,
14636 fidl::encoding::DefaultFuchsiaResourceDialect
14637 );
14638 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14639 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14640 Ok(NodeRequest::DeprecatedSetFlags {
14641 flags: req.flags,
14642
14643 responder: NodeDeprecatedSetFlagsResponder {
14644 control_handle: std::mem::ManuallyDrop::new(control_handle),
14645 tx_id: header.tx_id,
14646 },
14647 })
14648 }
14649 0x176eb318f64ec23 => {
14650 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14651 let mut req = fidl::new_empty!(
14652 fidl::encoding::EmptyPayload,
14653 fidl::encoding::DefaultFuchsiaResourceDialect
14654 );
14655 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14656 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14657 Ok(NodeRequest::GetFlags {
14658 responder: NodeGetFlagsResponder {
14659 control_handle: std::mem::ManuallyDrop::new(control_handle),
14660 tx_id: header.tx_id,
14661 },
14662 })
14663 }
14664 0x55a8028685791ea8 => {
14665 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14666 let mut req = fidl::new_empty!(
14667 NodeSetFlagsRequest,
14668 fidl::encoding::DefaultFuchsiaResourceDialect
14669 );
14670 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14671 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14672 Ok(NodeRequest::SetFlags {
14673 flags: req.flags,
14674
14675 responder: NodeSetFlagsResponder {
14676 control_handle: std::mem::ManuallyDrop::new(control_handle),
14677 tx_id: header.tx_id,
14678 },
14679 })
14680 }
14681 0x6f344a1c6b0a0610 => {
14682 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14683 let mut req = fidl::new_empty!(
14684 fidl::encoding::EmptyPayload,
14685 fidl::encoding::DefaultFuchsiaResourceDialect
14686 );
14687 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14688 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14689 Ok(NodeRequest::QueryFilesystem {
14690 responder: NodeQueryFilesystemResponder {
14691 control_handle: std::mem::ManuallyDrop::new(control_handle),
14692 tx_id: header.tx_id,
14693 },
14694 })
14695 }
14696 0x5054f0ade7076cec => {
14697 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14698 let mut req = fidl::new_empty!(
14699 fidl::encoding::EmptyPayload,
14700 fidl::encoding::DefaultFuchsiaResourceDialect
14701 );
14702 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14703 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14704 Ok(NodeRequest::GetToken {
14705 responder: NodeGetTokenResponder {
14706 control_handle: std::mem::ManuallyDrop::new(control_handle),
14707 tx_id: header.tx_id,
14708 },
14709 })
14710 }
14711 0x3d4396a638ea053b => {
14712 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14713 let mut req = fidl::new_empty!(
14714 NodeGetAttributesRequest,
14715 fidl::encoding::DefaultFuchsiaResourceDialect
14716 );
14717 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14718 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14719 Ok(NodeRequest::GetAttributes {
14720 query: req.query,
14721
14722 responder: NodeGetAttributesResponder {
14723 control_handle: std::mem::ManuallyDrop::new(control_handle),
14724 tx_id: header.tx_id,
14725 },
14726 })
14727 }
14728 0x3308c1da5a89bf08 => {
14729 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14730 let mut req = fidl::new_empty!(
14731 MutableNodeAttributes,
14732 fidl::encoding::DefaultFuchsiaResourceDialect
14733 );
14734 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
14735 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14736 Ok(NodeRequest::UpdateAttributes {
14737 payload: req,
14738 responder: NodeUpdateAttributesResponder {
14739 control_handle: std::mem::ManuallyDrop::new(control_handle),
14740 tx_id: header.tx_id,
14741 },
14742 })
14743 }
14744 0x2c5c27ca0ab5dc49 => {
14745 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14746 let mut req = fidl::new_empty!(
14747 fidl::encoding::EmptyPayload,
14748 fidl::encoding::DefaultFuchsiaResourceDialect
14749 );
14750 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14751 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14752 Ok(NodeRequest::Sync {
14753 responder: NodeSyncResponder {
14754 control_handle: std::mem::ManuallyDrop::new(control_handle),
14755 tx_id: header.tx_id,
14756 },
14757 })
14758 }
14759 0x4b61033de007fcd0 => {
14760 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14761 let mut req = fidl::new_empty!(
14762 NodeListExtendedAttributesRequest,
14763 fidl::encoding::DefaultFuchsiaResourceDialect
14764 );
14765 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14766 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14767 Ok(NodeRequest::ListExtendedAttributes {
14768 iterator: req.iterator,
14769
14770 control_handle,
14771 })
14772 }
14773 0x45ffa3ccfdeb76db => {
14774 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14775 let mut req = fidl::new_empty!(
14776 NodeGetExtendedAttributeRequest,
14777 fidl::encoding::DefaultFuchsiaResourceDialect
14778 );
14779 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14780 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14781 Ok(NodeRequest::GetExtendedAttribute {
14782 name: req.name,
14783
14784 responder: NodeGetExtendedAttributeResponder {
14785 control_handle: std::mem::ManuallyDrop::new(control_handle),
14786 tx_id: header.tx_id,
14787 },
14788 })
14789 }
14790 0x4a951362f681f23c => {
14791 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14792 let mut req = fidl::new_empty!(
14793 NodeSetExtendedAttributeRequest,
14794 fidl::encoding::DefaultFuchsiaResourceDialect
14795 );
14796 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14797 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14798 Ok(NodeRequest::SetExtendedAttribute {
14799 name: req.name,
14800 value: req.value,
14801 mode: req.mode,
14802
14803 responder: NodeSetExtendedAttributeResponder {
14804 control_handle: std::mem::ManuallyDrop::new(control_handle),
14805 tx_id: header.tx_id,
14806 },
14807 })
14808 }
14809 0x7a0b9f3a9bf9032d => {
14810 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14811 let mut req = fidl::new_empty!(
14812 NodeRemoveExtendedAttributeRequest,
14813 fidl::encoding::DefaultFuchsiaResourceDialect
14814 );
14815 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14816 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14817 Ok(NodeRequest::RemoveExtendedAttribute {
14818 name: req.name,
14819
14820 responder: NodeRemoveExtendedAttributeResponder {
14821 control_handle: std::mem::ManuallyDrop::new(control_handle),
14822 tx_id: header.tx_id,
14823 },
14824 })
14825 }
14826 _ if header.tx_id == 0
14827 && header
14828 .dynamic_flags()
14829 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14830 {
14831 Ok(NodeRequest::_UnknownMethod {
14832 ordinal: header.ordinal,
14833 control_handle: NodeControlHandle { inner: this.inner.clone() },
14834 method_type: fidl::MethodType::OneWay,
14835 })
14836 }
14837 _ if header
14838 .dynamic_flags()
14839 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14840 {
14841 this.inner.send_framework_err(
14842 fidl::encoding::FrameworkErr::UnknownMethod,
14843 header.tx_id,
14844 header.ordinal,
14845 header.dynamic_flags(),
14846 (bytes, handles),
14847 )?;
14848 Ok(NodeRequest::_UnknownMethod {
14849 ordinal: header.ordinal,
14850 control_handle: NodeControlHandle { inner: this.inner.clone() },
14851 method_type: fidl::MethodType::TwoWay,
14852 })
14853 }
14854 _ => Err(fidl::Error::UnknownOrdinal {
14855 ordinal: header.ordinal,
14856 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14857 }),
14858 }))
14859 },
14860 )
14861 }
14862}
14863
14864#[derive(Debug)]
14866pub enum NodeRequest {
14867 Clone {
14868 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14869 control_handle: NodeControlHandle,
14870 },
14871 Close {
14882 responder: NodeCloseResponder,
14883 },
14884 Query {
14885 responder: NodeQueryResponder,
14886 },
14887 DeprecatedGetAttr {
14891 responder: NodeDeprecatedGetAttrResponder,
14892 },
14893 DeprecatedSetAttr {
14895 flags: NodeAttributeFlags,
14896 attributes: NodeAttributes,
14897 responder: NodeDeprecatedSetAttrResponder,
14898 },
14899 DeprecatedGetFlags {
14901 responder: NodeDeprecatedGetFlagsResponder,
14902 },
14903 DeprecatedSetFlags {
14905 flags: OpenFlags,
14906 responder: NodeDeprecatedSetFlagsResponder,
14907 },
14908 GetFlags {
14917 responder: NodeGetFlagsResponder,
14918 },
14919 SetFlags {
14929 flags: Flags,
14930 responder: NodeSetFlagsResponder,
14931 },
14932 QueryFilesystem {
14936 responder: NodeQueryFilesystemResponder,
14937 },
14938 GetToken {
14945 responder: NodeGetTokenResponder,
14946 },
14947 GetAttributes {
14961 query: NodeAttributesQuery,
14962 responder: NodeGetAttributesResponder,
14963 },
14964 UpdateAttributes {
14973 payload: MutableNodeAttributes,
14974 responder: NodeUpdateAttributesResponder,
14975 },
14976 Sync {
14986 responder: NodeSyncResponder,
14987 },
14988 ListExtendedAttributes {
14997 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14998 control_handle: NodeControlHandle,
14999 },
15000 GetExtendedAttribute {
15007 name: Vec<u8>,
15008 responder: NodeGetExtendedAttributeResponder,
15009 },
15010 SetExtendedAttribute {
15018 name: Vec<u8>,
15019 value: ExtendedAttributeValue,
15020 mode: SetExtendedAttributeMode,
15021 responder: NodeSetExtendedAttributeResponder,
15022 },
15023 RemoveExtendedAttribute {
15029 name: Vec<u8>,
15030 responder: NodeRemoveExtendedAttributeResponder,
15031 },
15032 #[non_exhaustive]
15034 _UnknownMethod {
15035 ordinal: u64,
15037 control_handle: NodeControlHandle,
15038 method_type: fidl::MethodType,
15039 },
15040}
15041
15042impl NodeRequest {
15043 #[allow(irrefutable_let_patterns)]
15044 pub fn into_clone(
15045 self,
15046 ) -> Option<(
15047 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
15048 NodeControlHandle,
15049 )> {
15050 if let NodeRequest::Clone { request, control_handle } = self {
15051 Some((request, control_handle))
15052 } else {
15053 None
15054 }
15055 }
15056
15057 #[allow(irrefutable_let_patterns)]
15058 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
15059 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
15060 }
15061
15062 #[allow(irrefutable_let_patterns)]
15063 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
15064 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
15065 }
15066
15067 #[allow(irrefutable_let_patterns)]
15068 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
15069 if let NodeRequest::DeprecatedGetAttr { responder } = self {
15070 Some((responder))
15071 } else {
15072 None
15073 }
15074 }
15075
15076 #[allow(irrefutable_let_patterns)]
15077 pub fn into_deprecated_set_attr(
15078 self,
15079 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
15080 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15081 Some((flags, attributes, responder))
15082 } else {
15083 None
15084 }
15085 }
15086
15087 #[allow(irrefutable_let_patterns)]
15088 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
15089 if let NodeRequest::DeprecatedGetFlags { responder } = self {
15090 Some((responder))
15091 } else {
15092 None
15093 }
15094 }
15095
15096 #[allow(irrefutable_let_patterns)]
15097 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
15098 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
15099 Some((flags, responder))
15100 } else {
15101 None
15102 }
15103 }
15104
15105 #[allow(irrefutable_let_patterns)]
15106 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
15107 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
15108 }
15109
15110 #[allow(irrefutable_let_patterns)]
15111 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
15112 if let NodeRequest::SetFlags { flags, responder } = self {
15113 Some((flags, responder))
15114 } else {
15115 None
15116 }
15117 }
15118
15119 #[allow(irrefutable_let_patterns)]
15120 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
15121 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
15122 }
15123
15124 #[allow(irrefutable_let_patterns)]
15125 pub fn into_get_token(self) -> Option<(NodeGetTokenResponder)> {
15126 if let NodeRequest::GetToken { responder } = self { Some((responder)) } else { None }
15127 }
15128
15129 #[allow(irrefutable_let_patterns)]
15130 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
15131 if let NodeRequest::GetAttributes { query, responder } = self {
15132 Some((query, responder))
15133 } else {
15134 None
15135 }
15136 }
15137
15138 #[allow(irrefutable_let_patterns)]
15139 pub fn into_update_attributes(
15140 self,
15141 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
15142 if let NodeRequest::UpdateAttributes { payload, responder } = self {
15143 Some((payload, responder))
15144 } else {
15145 None
15146 }
15147 }
15148
15149 #[allow(irrefutable_let_patterns)]
15150 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
15151 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
15152 }
15153
15154 #[allow(irrefutable_let_patterns)]
15155 pub fn into_list_extended_attributes(
15156 self,
15157 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
15158 {
15159 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
15160 Some((iterator, control_handle))
15161 } else {
15162 None
15163 }
15164 }
15165
15166 #[allow(irrefutable_let_patterns)]
15167 pub fn into_get_extended_attribute(
15168 self,
15169 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
15170 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
15171 Some((name, responder))
15172 } else {
15173 None
15174 }
15175 }
15176
15177 #[allow(irrefutable_let_patterns)]
15178 pub fn into_set_extended_attribute(
15179 self,
15180 ) -> Option<(
15181 Vec<u8>,
15182 ExtendedAttributeValue,
15183 SetExtendedAttributeMode,
15184 NodeSetExtendedAttributeResponder,
15185 )> {
15186 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
15187 Some((name, value, mode, responder))
15188 } else {
15189 None
15190 }
15191 }
15192
15193 #[allow(irrefutable_let_patterns)]
15194 pub fn into_remove_extended_attribute(
15195 self,
15196 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
15197 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
15198 Some((name, responder))
15199 } else {
15200 None
15201 }
15202 }
15203
15204 pub fn method_name(&self) -> &'static str {
15206 match *self {
15207 NodeRequest::Clone { .. } => "clone",
15208 NodeRequest::Close { .. } => "close",
15209 NodeRequest::Query { .. } => "query",
15210 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
15211 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
15212 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
15213 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
15214 NodeRequest::GetFlags { .. } => "get_flags",
15215 NodeRequest::SetFlags { .. } => "set_flags",
15216 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
15217 NodeRequest::GetToken { .. } => "get_token",
15218 NodeRequest::GetAttributes { .. } => "get_attributes",
15219 NodeRequest::UpdateAttributes { .. } => "update_attributes",
15220 NodeRequest::Sync { .. } => "sync",
15221 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15222 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15223 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15224 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15225 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15226 "unknown one-way method"
15227 }
15228 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15229 "unknown two-way method"
15230 }
15231 }
15232 }
15233}
15234
15235#[derive(Debug, Clone)]
15236pub struct NodeControlHandle {
15237 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
15238}
15239
15240impl NodeControlHandle {
15241 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
15242 self.inner.shutdown_with_epitaph(status.into())
15243 }
15244}
15245
15246impl fidl::endpoints::ControlHandle for NodeControlHandle {
15247 fn shutdown(&self) {
15248 self.inner.shutdown()
15249 }
15250
15251 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
15252 self.inner.shutdown_with_epitaph(status)
15253 }
15254
15255 fn is_closed(&self) -> bool {
15256 self.inner.channel().is_closed()
15257 }
15258 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
15259 self.inner.channel().on_closed()
15260 }
15261
15262 #[cfg(target_os = "fuchsia")]
15263 fn signal_peer(
15264 &self,
15265 clear_mask: zx::Signals,
15266 set_mask: zx::Signals,
15267 ) -> Result<(), zx_status::Status> {
15268 use fidl::Peered;
15269 self.inner.channel().signal_peer(clear_mask, set_mask)
15270 }
15271}
15272
15273impl NodeControlHandle {
15274 pub fn send_on_open_(
15275 &self,
15276 mut s: i32,
15277 mut info: Option<NodeInfoDeprecated>,
15278 ) -> Result<(), fidl::Error> {
15279 self.inner.send::<NodeOnOpenRequest>(
15280 (s, info.as_mut()),
15281 0,
15282 0x7fc7bbb1dbfd1972,
15283 fidl::encoding::DynamicFlags::FLEXIBLE,
15284 )
15285 }
15286
15287 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15288 self.inner.send::<Representation>(
15289 &mut payload,
15290 0,
15291 0x5cb40567d80a510c,
15292 fidl::encoding::DynamicFlags::empty(),
15293 )
15294 }
15295}
15296
15297#[must_use = "FIDL methods require a response to be sent"]
15298#[derive(Debug)]
15299pub struct NodeCloseResponder {
15300 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15301 tx_id: u32,
15302}
15303
15304impl std::ops::Drop for NodeCloseResponder {
15308 fn drop(&mut self) {
15309 self.control_handle.shutdown();
15310 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15312 }
15313}
15314
15315impl fidl::endpoints::Responder for NodeCloseResponder {
15316 type ControlHandle = NodeControlHandle;
15317
15318 fn control_handle(&self) -> &NodeControlHandle {
15319 &self.control_handle
15320 }
15321
15322 fn drop_without_shutdown(mut self) {
15323 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15325 std::mem::forget(self);
15327 }
15328}
15329
15330impl NodeCloseResponder {
15331 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15335 let _result = self.send_raw(result);
15336 if _result.is_err() {
15337 self.control_handle.shutdown();
15338 }
15339 self.drop_without_shutdown();
15340 _result
15341 }
15342
15343 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15345 let _result = self.send_raw(result);
15346 self.drop_without_shutdown();
15347 _result
15348 }
15349
15350 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15351 self.control_handle
15352 .inner
15353 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15354 result,
15355 self.tx_id,
15356 0x5ac5d459ad7f657e,
15357 fidl::encoding::DynamicFlags::empty(),
15358 )
15359 }
15360}
15361
15362#[must_use = "FIDL methods require a response to be sent"]
15363#[derive(Debug)]
15364pub struct NodeQueryResponder {
15365 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15366 tx_id: u32,
15367}
15368
15369impl std::ops::Drop for NodeQueryResponder {
15373 fn drop(&mut self) {
15374 self.control_handle.shutdown();
15375 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15377 }
15378}
15379
15380impl fidl::endpoints::Responder for NodeQueryResponder {
15381 type ControlHandle = NodeControlHandle;
15382
15383 fn control_handle(&self) -> &NodeControlHandle {
15384 &self.control_handle
15385 }
15386
15387 fn drop_without_shutdown(mut self) {
15388 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15390 std::mem::forget(self);
15392 }
15393}
15394
15395impl NodeQueryResponder {
15396 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15400 let _result = self.send_raw(protocol);
15401 if _result.is_err() {
15402 self.control_handle.shutdown();
15403 }
15404 self.drop_without_shutdown();
15405 _result
15406 }
15407
15408 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15410 let _result = self.send_raw(protocol);
15411 self.drop_without_shutdown();
15412 _result
15413 }
15414
15415 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15416 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
15417 (protocol,),
15418 self.tx_id,
15419 0x2658edee9decfc06,
15420 fidl::encoding::DynamicFlags::empty(),
15421 )
15422 }
15423}
15424
15425#[must_use = "FIDL methods require a response to be sent"]
15426#[derive(Debug)]
15427pub struct NodeDeprecatedGetAttrResponder {
15428 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15429 tx_id: u32,
15430}
15431
15432impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
15436 fn drop(&mut self) {
15437 self.control_handle.shutdown();
15438 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15440 }
15441}
15442
15443impl fidl::endpoints::Responder for NodeDeprecatedGetAttrResponder {
15444 type ControlHandle = NodeControlHandle;
15445
15446 fn control_handle(&self) -> &NodeControlHandle {
15447 &self.control_handle
15448 }
15449
15450 fn drop_without_shutdown(mut self) {
15451 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15453 std::mem::forget(self);
15455 }
15456}
15457
15458impl NodeDeprecatedGetAttrResponder {
15459 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15463 let _result = self.send_raw(s, attributes);
15464 if _result.is_err() {
15465 self.control_handle.shutdown();
15466 }
15467 self.drop_without_shutdown();
15468 _result
15469 }
15470
15471 pub fn send_no_shutdown_on_err(
15473 self,
15474 mut s: i32,
15475 mut attributes: &NodeAttributes,
15476 ) -> Result<(), fidl::Error> {
15477 let _result = self.send_raw(s, attributes);
15478 self.drop_without_shutdown();
15479 _result
15480 }
15481
15482 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15483 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15484 (s, attributes),
15485 self.tx_id,
15486 0x78985e216314dafd,
15487 fidl::encoding::DynamicFlags::empty(),
15488 )
15489 }
15490}
15491
15492#[must_use = "FIDL methods require a response to be sent"]
15493#[derive(Debug)]
15494pub struct NodeDeprecatedSetAttrResponder {
15495 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15496 tx_id: u32,
15497}
15498
15499impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
15503 fn drop(&mut self) {
15504 self.control_handle.shutdown();
15505 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15507 }
15508}
15509
15510impl fidl::endpoints::Responder for NodeDeprecatedSetAttrResponder {
15511 type ControlHandle = NodeControlHandle;
15512
15513 fn control_handle(&self) -> &NodeControlHandle {
15514 &self.control_handle
15515 }
15516
15517 fn drop_without_shutdown(mut self) {
15518 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15520 std::mem::forget(self);
15522 }
15523}
15524
15525impl NodeDeprecatedSetAttrResponder {
15526 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15530 let _result = self.send_raw(s);
15531 if _result.is_err() {
15532 self.control_handle.shutdown();
15533 }
15534 self.drop_without_shutdown();
15535 _result
15536 }
15537
15538 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15540 let _result = self.send_raw(s);
15541 self.drop_without_shutdown();
15542 _result
15543 }
15544
15545 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15546 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
15547 (s,),
15548 self.tx_id,
15549 0x4186c0f40d938f46,
15550 fidl::encoding::DynamicFlags::empty(),
15551 )
15552 }
15553}
15554
15555#[must_use = "FIDL methods require a response to be sent"]
15556#[derive(Debug)]
15557pub struct NodeDeprecatedGetFlagsResponder {
15558 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15559 tx_id: u32,
15560}
15561
15562impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
15566 fn drop(&mut self) {
15567 self.control_handle.shutdown();
15568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15570 }
15571}
15572
15573impl fidl::endpoints::Responder for NodeDeprecatedGetFlagsResponder {
15574 type ControlHandle = NodeControlHandle;
15575
15576 fn control_handle(&self) -> &NodeControlHandle {
15577 &self.control_handle
15578 }
15579
15580 fn drop_without_shutdown(mut self) {
15581 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15583 std::mem::forget(self);
15585 }
15586}
15587
15588impl NodeDeprecatedGetFlagsResponder {
15589 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15593 let _result = self.send_raw(s, flags);
15594 if _result.is_err() {
15595 self.control_handle.shutdown();
15596 }
15597 self.drop_without_shutdown();
15598 _result
15599 }
15600
15601 pub fn send_no_shutdown_on_err(
15603 self,
15604 mut s: i32,
15605 mut flags: OpenFlags,
15606 ) -> Result<(), fidl::Error> {
15607 let _result = self.send_raw(s, flags);
15608 self.drop_without_shutdown();
15609 _result
15610 }
15611
15612 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15613 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
15614 (s, flags),
15615 self.tx_id,
15616 0x5b88fffb8eda3aa1,
15617 fidl::encoding::DynamicFlags::empty(),
15618 )
15619 }
15620}
15621
15622#[must_use = "FIDL methods require a response to be sent"]
15623#[derive(Debug)]
15624pub struct NodeDeprecatedSetFlagsResponder {
15625 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15626 tx_id: u32,
15627}
15628
15629impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
15633 fn drop(&mut self) {
15634 self.control_handle.shutdown();
15635 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15637 }
15638}
15639
15640impl fidl::endpoints::Responder for NodeDeprecatedSetFlagsResponder {
15641 type ControlHandle = NodeControlHandle;
15642
15643 fn control_handle(&self) -> &NodeControlHandle {
15644 &self.control_handle
15645 }
15646
15647 fn drop_without_shutdown(mut self) {
15648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15650 std::mem::forget(self);
15652 }
15653}
15654
15655impl NodeDeprecatedSetFlagsResponder {
15656 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15660 let _result = self.send_raw(s);
15661 if _result.is_err() {
15662 self.control_handle.shutdown();
15663 }
15664 self.drop_without_shutdown();
15665 _result
15666 }
15667
15668 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15670 let _result = self.send_raw(s);
15671 self.drop_without_shutdown();
15672 _result
15673 }
15674
15675 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15676 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
15677 (s,),
15678 self.tx_id,
15679 0x5295b76c71fde733,
15680 fidl::encoding::DynamicFlags::empty(),
15681 )
15682 }
15683}
15684
15685#[must_use = "FIDL methods require a response to be sent"]
15686#[derive(Debug)]
15687pub struct NodeGetFlagsResponder {
15688 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15689 tx_id: u32,
15690}
15691
15692impl std::ops::Drop for NodeGetFlagsResponder {
15696 fn drop(&mut self) {
15697 self.control_handle.shutdown();
15698 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15700 }
15701}
15702
15703impl fidl::endpoints::Responder for NodeGetFlagsResponder {
15704 type ControlHandle = NodeControlHandle;
15705
15706 fn control_handle(&self) -> &NodeControlHandle {
15707 &self.control_handle
15708 }
15709
15710 fn drop_without_shutdown(mut self) {
15711 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15713 std::mem::forget(self);
15715 }
15716}
15717
15718impl NodeGetFlagsResponder {
15719 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15723 let _result = self.send_raw(result);
15724 if _result.is_err() {
15725 self.control_handle.shutdown();
15726 }
15727 self.drop_without_shutdown();
15728 _result
15729 }
15730
15731 pub fn send_no_shutdown_on_err(
15733 self,
15734 mut result: Result<Flags, i32>,
15735 ) -> Result<(), fidl::Error> {
15736 let _result = self.send_raw(result);
15737 self.drop_without_shutdown();
15738 _result
15739 }
15740
15741 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15742 self.control_handle
15743 .inner
15744 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
15745 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
15746 self.tx_id,
15747 0x176eb318f64ec23,
15748 fidl::encoding::DynamicFlags::FLEXIBLE,
15749 )
15750 }
15751}
15752
15753#[must_use = "FIDL methods require a response to be sent"]
15754#[derive(Debug)]
15755pub struct NodeSetFlagsResponder {
15756 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15757 tx_id: u32,
15758}
15759
15760impl std::ops::Drop for NodeSetFlagsResponder {
15764 fn drop(&mut self) {
15765 self.control_handle.shutdown();
15766 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15768 }
15769}
15770
15771impl fidl::endpoints::Responder for NodeSetFlagsResponder {
15772 type ControlHandle = NodeControlHandle;
15773
15774 fn control_handle(&self) -> &NodeControlHandle {
15775 &self.control_handle
15776 }
15777
15778 fn drop_without_shutdown(mut self) {
15779 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15781 std::mem::forget(self);
15783 }
15784}
15785
15786impl NodeSetFlagsResponder {
15787 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15791 let _result = self.send_raw(result);
15792 if _result.is_err() {
15793 self.control_handle.shutdown();
15794 }
15795 self.drop_without_shutdown();
15796 _result
15797 }
15798
15799 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15801 let _result = self.send_raw(result);
15802 self.drop_without_shutdown();
15803 _result
15804 }
15805
15806 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15807 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
15808 fidl::encoding::EmptyStruct,
15809 i32,
15810 >>(
15811 fidl::encoding::FlexibleResult::new(result),
15812 self.tx_id,
15813 0x55a8028685791ea8,
15814 fidl::encoding::DynamicFlags::FLEXIBLE,
15815 )
15816 }
15817}
15818
15819#[must_use = "FIDL methods require a response to be sent"]
15820#[derive(Debug)]
15821pub struct NodeQueryFilesystemResponder {
15822 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15823 tx_id: u32,
15824}
15825
15826impl std::ops::Drop for NodeQueryFilesystemResponder {
15830 fn drop(&mut self) {
15831 self.control_handle.shutdown();
15832 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15834 }
15835}
15836
15837impl fidl::endpoints::Responder for NodeQueryFilesystemResponder {
15838 type ControlHandle = NodeControlHandle;
15839
15840 fn control_handle(&self) -> &NodeControlHandle {
15841 &self.control_handle
15842 }
15843
15844 fn drop_without_shutdown(mut self) {
15845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15847 std::mem::forget(self);
15849 }
15850}
15851
15852impl NodeQueryFilesystemResponder {
15853 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15857 let _result = self.send_raw(s, info);
15858 if _result.is_err() {
15859 self.control_handle.shutdown();
15860 }
15861 self.drop_without_shutdown();
15862 _result
15863 }
15864
15865 pub fn send_no_shutdown_on_err(
15867 self,
15868 mut s: i32,
15869 mut info: Option<&FilesystemInfo>,
15870 ) -> Result<(), fidl::Error> {
15871 let _result = self.send_raw(s, info);
15872 self.drop_without_shutdown();
15873 _result
15874 }
15875
15876 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15877 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
15878 (s, info),
15879 self.tx_id,
15880 0x6f344a1c6b0a0610,
15881 fidl::encoding::DynamicFlags::empty(),
15882 )
15883 }
15884}
15885
15886#[must_use = "FIDL methods require a response to be sent"]
15887#[derive(Debug)]
15888pub struct NodeGetTokenResponder {
15889 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15890 tx_id: u32,
15891}
15892
15893impl std::ops::Drop for NodeGetTokenResponder {
15897 fn drop(&mut self) {
15898 self.control_handle.shutdown();
15899 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15901 }
15902}
15903
15904impl fidl::endpoints::Responder for NodeGetTokenResponder {
15905 type ControlHandle = NodeControlHandle;
15906
15907 fn control_handle(&self) -> &NodeControlHandle {
15908 &self.control_handle
15909 }
15910
15911 fn drop_without_shutdown(mut self) {
15912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15914 std::mem::forget(self);
15916 }
15917}
15918
15919impl NodeGetTokenResponder {
15920 pub fn send(self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
15924 let _result = self.send_raw(result);
15925 if _result.is_err() {
15926 self.control_handle.shutdown();
15927 }
15928 self.drop_without_shutdown();
15929 _result
15930 }
15931
15932 pub fn send_no_shutdown_on_err(
15934 self,
15935 mut result: Result<fidl::Event, i32>,
15936 ) -> Result<(), fidl::Error> {
15937 let _result = self.send_raw(result);
15938 self.drop_without_shutdown();
15939 _result
15940 }
15941
15942 fn send_raw(&self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
15943 self.control_handle
15944 .inner
15945 .send::<fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>>(
15946 fidl::encoding::FlexibleResult::new(result.map(|token| (token,))),
15947 self.tx_id,
15948 0x5054f0ade7076cec,
15949 fidl::encoding::DynamicFlags::FLEXIBLE,
15950 )
15951 }
15952}
15953
15954#[must_use = "FIDL methods require a response to be sent"]
15955#[derive(Debug)]
15956pub struct NodeGetAttributesResponder {
15957 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15958 tx_id: u32,
15959}
15960
15961impl std::ops::Drop for NodeGetAttributesResponder {
15965 fn drop(&mut self) {
15966 self.control_handle.shutdown();
15967 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15969 }
15970}
15971
15972impl fidl::endpoints::Responder for NodeGetAttributesResponder {
15973 type ControlHandle = NodeControlHandle;
15974
15975 fn control_handle(&self) -> &NodeControlHandle {
15976 &self.control_handle
15977 }
15978
15979 fn drop_without_shutdown(mut self) {
15980 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15982 std::mem::forget(self);
15984 }
15985}
15986
15987impl NodeGetAttributesResponder {
15988 pub fn send(
15992 self,
15993 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15994 ) -> Result<(), fidl::Error> {
15995 let _result = self.send_raw(result);
15996 if _result.is_err() {
15997 self.control_handle.shutdown();
15998 }
15999 self.drop_without_shutdown();
16000 _result
16001 }
16002
16003 pub fn send_no_shutdown_on_err(
16005 self,
16006 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16007 ) -> Result<(), fidl::Error> {
16008 let _result = self.send_raw(result);
16009 self.drop_without_shutdown();
16010 _result
16011 }
16012
16013 fn send_raw(
16014 &self,
16015 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16016 ) -> Result<(), fidl::Error> {
16017 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16018 result,
16019 self.tx_id,
16020 0x3d4396a638ea053b,
16021 fidl::encoding::DynamicFlags::empty(),
16022 )
16023 }
16024}
16025
16026#[must_use = "FIDL methods require a response to be sent"]
16027#[derive(Debug)]
16028pub struct NodeUpdateAttributesResponder {
16029 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
16030 tx_id: u32,
16031}
16032
16033impl std::ops::Drop for NodeUpdateAttributesResponder {
16037 fn drop(&mut self) {
16038 self.control_handle.shutdown();
16039 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16041 }
16042}
16043
16044impl fidl::endpoints::Responder for NodeUpdateAttributesResponder {
16045 type ControlHandle = NodeControlHandle;
16046
16047 fn control_handle(&self) -> &NodeControlHandle {
16048 &self.control_handle
16049 }
16050
16051 fn drop_without_shutdown(mut self) {
16052 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16054 std::mem::forget(self);
16056 }
16057}
16058
16059impl NodeUpdateAttributesResponder {
16060 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16064 let _result = self.send_raw(result);
16065 if _result.is_err() {
16066 self.control_handle.shutdown();
16067 }
16068 self.drop_without_shutdown();
16069 _result
16070 }
16071
16072 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16074 let _result = self.send_raw(result);
16075 self.drop_without_shutdown();
16076 _result
16077 }
16078
16079 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16080 self.control_handle
16081 .inner
16082 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16083 result,
16084 self.tx_id,
16085 0x3308c1da5a89bf08,
16086 fidl::encoding::DynamicFlags::empty(),
16087 )
16088 }
16089}
16090
16091#[must_use = "FIDL methods require a response to be sent"]
16092#[derive(Debug)]
16093pub struct NodeSyncResponder {
16094 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
16095 tx_id: u32,
16096}
16097
16098impl std::ops::Drop for NodeSyncResponder {
16102 fn drop(&mut self) {
16103 self.control_handle.shutdown();
16104 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16106 }
16107}
16108
16109impl fidl::endpoints::Responder for NodeSyncResponder {
16110 type ControlHandle = NodeControlHandle;
16111
16112 fn control_handle(&self) -> &NodeControlHandle {
16113 &self.control_handle
16114 }
16115
16116 fn drop_without_shutdown(mut self) {
16117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16119 std::mem::forget(self);
16121 }
16122}
16123
16124impl NodeSyncResponder {
16125 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16129 let _result = self.send_raw(result);
16130 if _result.is_err() {
16131 self.control_handle.shutdown();
16132 }
16133 self.drop_without_shutdown();
16134 _result
16135 }
16136
16137 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16139 let _result = self.send_raw(result);
16140 self.drop_without_shutdown();
16141 _result
16142 }
16143
16144 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16145 self.control_handle
16146 .inner
16147 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16148 result,
16149 self.tx_id,
16150 0x2c5c27ca0ab5dc49,
16151 fidl::encoding::DynamicFlags::empty(),
16152 )
16153 }
16154}
16155
16156#[must_use = "FIDL methods require a response to be sent"]
16157#[derive(Debug)]
16158pub struct NodeGetExtendedAttributeResponder {
16159 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
16160 tx_id: u32,
16161}
16162
16163impl std::ops::Drop for NodeGetExtendedAttributeResponder {
16167 fn drop(&mut self) {
16168 self.control_handle.shutdown();
16169 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16171 }
16172}
16173
16174impl fidl::endpoints::Responder for NodeGetExtendedAttributeResponder {
16175 type ControlHandle = NodeControlHandle;
16176
16177 fn control_handle(&self) -> &NodeControlHandle {
16178 &self.control_handle
16179 }
16180
16181 fn drop_without_shutdown(mut self) {
16182 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16184 std::mem::forget(self);
16186 }
16187}
16188
16189impl NodeGetExtendedAttributeResponder {
16190 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16194 let _result = self.send_raw(result);
16195 if _result.is_err() {
16196 self.control_handle.shutdown();
16197 }
16198 self.drop_without_shutdown();
16199 _result
16200 }
16201
16202 pub fn send_no_shutdown_on_err(
16204 self,
16205 mut result: Result<ExtendedAttributeValue, i32>,
16206 ) -> Result<(), fidl::Error> {
16207 let _result = self.send_raw(result);
16208 self.drop_without_shutdown();
16209 _result
16210 }
16211
16212 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16213 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
16214 result.as_mut().map_err(|e| *e),
16215 self.tx_id,
16216 0x45ffa3ccfdeb76db,
16217 fidl::encoding::DynamicFlags::empty(),
16218 )
16219 }
16220}
16221
16222#[must_use = "FIDL methods require a response to be sent"]
16223#[derive(Debug)]
16224pub struct NodeSetExtendedAttributeResponder {
16225 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
16226 tx_id: u32,
16227}
16228
16229impl std::ops::Drop for NodeSetExtendedAttributeResponder {
16233 fn drop(&mut self) {
16234 self.control_handle.shutdown();
16235 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16237 }
16238}
16239
16240impl fidl::endpoints::Responder for NodeSetExtendedAttributeResponder {
16241 type ControlHandle = NodeControlHandle;
16242
16243 fn control_handle(&self) -> &NodeControlHandle {
16244 &self.control_handle
16245 }
16246
16247 fn drop_without_shutdown(mut self) {
16248 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16250 std::mem::forget(self);
16252 }
16253}
16254
16255impl NodeSetExtendedAttributeResponder {
16256 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16260 let _result = self.send_raw(result);
16261 if _result.is_err() {
16262 self.control_handle.shutdown();
16263 }
16264 self.drop_without_shutdown();
16265 _result
16266 }
16267
16268 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16270 let _result = self.send_raw(result);
16271 self.drop_without_shutdown();
16272 _result
16273 }
16274
16275 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16276 self.control_handle
16277 .inner
16278 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16279 result,
16280 self.tx_id,
16281 0x4a951362f681f23c,
16282 fidl::encoding::DynamicFlags::empty(),
16283 )
16284 }
16285}
16286
16287#[must_use = "FIDL methods require a response to be sent"]
16288#[derive(Debug)]
16289pub struct NodeRemoveExtendedAttributeResponder {
16290 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
16291 tx_id: u32,
16292}
16293
16294impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
16298 fn drop(&mut self) {
16299 self.control_handle.shutdown();
16300 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16302 }
16303}
16304
16305impl fidl::endpoints::Responder for NodeRemoveExtendedAttributeResponder {
16306 type ControlHandle = NodeControlHandle;
16307
16308 fn control_handle(&self) -> &NodeControlHandle {
16309 &self.control_handle
16310 }
16311
16312 fn drop_without_shutdown(mut self) {
16313 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16315 std::mem::forget(self);
16317 }
16318}
16319
16320impl NodeRemoveExtendedAttributeResponder {
16321 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16325 let _result = self.send_raw(result);
16326 if _result.is_err() {
16327 self.control_handle.shutdown();
16328 }
16329 self.drop_without_shutdown();
16330 _result
16331 }
16332
16333 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16335 let _result = self.send_raw(result);
16336 self.drop_without_shutdown();
16337 _result
16338 }
16339
16340 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16341 self.control_handle
16342 .inner
16343 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16344 result,
16345 self.tx_id,
16346 0x7a0b9f3a9bf9032d,
16347 fidl::encoding::DynamicFlags::empty(),
16348 )
16349 }
16350}
16351
16352#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16353pub struct OpenableMarker;
16354
16355impl fidl::endpoints::ProtocolMarker for OpenableMarker {
16356 type Proxy = OpenableProxy;
16357 type RequestStream = OpenableRequestStream;
16358 #[cfg(target_os = "fuchsia")]
16359 type SynchronousProxy = OpenableSynchronousProxy;
16360
16361 const DEBUG_NAME: &'static str = "(anonymous) Openable";
16362}
16363
16364pub trait OpenableProxyInterface: Send + Sync {
16365 fn r#open(
16366 &self,
16367 path: &str,
16368 flags: Flags,
16369 options: &Options,
16370 object: fidl::Channel,
16371 ) -> Result<(), fidl::Error>;
16372}
16373#[derive(Debug)]
16374#[cfg(target_os = "fuchsia")]
16375pub struct OpenableSynchronousProxy {
16376 client: fidl::client::sync::Client,
16377}
16378
16379#[cfg(target_os = "fuchsia")]
16380impl fidl::endpoints::SynchronousProxy for OpenableSynchronousProxy {
16381 type Proxy = OpenableProxy;
16382 type Protocol = OpenableMarker;
16383
16384 fn from_channel(inner: fidl::Channel) -> Self {
16385 Self::new(inner)
16386 }
16387
16388 fn into_channel(self) -> fidl::Channel {
16389 self.client.into_channel()
16390 }
16391
16392 fn as_channel(&self) -> &fidl::Channel {
16393 self.client.as_channel()
16394 }
16395}
16396
16397#[cfg(target_os = "fuchsia")]
16398impl OpenableSynchronousProxy {
16399 pub fn new(channel: fidl::Channel) -> Self {
16400 Self { client: fidl::client::sync::Client::new(channel) }
16401 }
16402
16403 pub fn into_channel(self) -> fidl::Channel {
16404 self.client.into_channel()
16405 }
16406
16407 pub fn wait_for_event(
16410 &self,
16411 deadline: zx::MonotonicInstant,
16412 ) -> Result<OpenableEvent, fidl::Error> {
16413 OpenableEvent::decode(self.client.wait_for_event::<OpenableMarker>(deadline)?)
16414 }
16415
16416 pub fn r#open(
16423 &self,
16424 mut path: &str,
16425 mut flags: Flags,
16426 mut options: &Options,
16427 mut object: fidl::Channel,
16428 ) -> Result<(), fidl::Error> {
16429 self.client.send::<OpenableOpenRequest>(
16430 (path, flags, options, object),
16431 0x568ddcb9a9cbb6d9,
16432 fidl::encoding::DynamicFlags::FLEXIBLE,
16433 )
16434 }
16435}
16436
16437#[cfg(target_os = "fuchsia")]
16438impl From<OpenableSynchronousProxy> for zx::NullableHandle {
16439 fn from(value: OpenableSynchronousProxy) -> Self {
16440 value.into_channel().into()
16441 }
16442}
16443
16444#[cfg(target_os = "fuchsia")]
16445impl From<fidl::Channel> for OpenableSynchronousProxy {
16446 fn from(value: fidl::Channel) -> Self {
16447 Self::new(value)
16448 }
16449}
16450
16451#[cfg(target_os = "fuchsia")]
16452impl fidl::endpoints::FromClient for OpenableSynchronousProxy {
16453 type Protocol = OpenableMarker;
16454
16455 fn from_client(value: fidl::endpoints::ClientEnd<OpenableMarker>) -> Self {
16456 Self::new(value.into_channel())
16457 }
16458}
16459
16460#[derive(Debug, Clone)]
16461pub struct OpenableProxy {
16462 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16463}
16464
16465impl fidl::endpoints::Proxy for OpenableProxy {
16466 type Protocol = OpenableMarker;
16467
16468 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16469 Self::new(inner)
16470 }
16471
16472 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16473 self.client.into_channel().map_err(|client| Self { client })
16474 }
16475
16476 fn as_channel(&self) -> &::fidl::AsyncChannel {
16477 self.client.as_channel()
16478 }
16479}
16480
16481impl OpenableProxy {
16482 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16484 let protocol_name = <OpenableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16485 Self { client: fidl::client::Client::new(channel, protocol_name) }
16486 }
16487
16488 pub fn take_event_stream(&self) -> OpenableEventStream {
16494 OpenableEventStream { event_receiver: self.client.take_event_receiver() }
16495 }
16496
16497 pub fn r#open(
16504 &self,
16505 mut path: &str,
16506 mut flags: Flags,
16507 mut options: &Options,
16508 mut object: fidl::Channel,
16509 ) -> Result<(), fidl::Error> {
16510 OpenableProxyInterface::r#open(self, path, flags, options, object)
16511 }
16512}
16513
16514impl OpenableProxyInterface for OpenableProxy {
16515 fn r#open(
16516 &self,
16517 mut path: &str,
16518 mut flags: Flags,
16519 mut options: &Options,
16520 mut object: fidl::Channel,
16521 ) -> Result<(), fidl::Error> {
16522 self.client.send::<OpenableOpenRequest>(
16523 (path, flags, options, object),
16524 0x568ddcb9a9cbb6d9,
16525 fidl::encoding::DynamicFlags::FLEXIBLE,
16526 )
16527 }
16528}
16529
16530pub struct OpenableEventStream {
16531 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16532}
16533
16534impl std::marker::Unpin for OpenableEventStream {}
16535
16536impl futures::stream::FusedStream for OpenableEventStream {
16537 fn is_terminated(&self) -> bool {
16538 self.event_receiver.is_terminated()
16539 }
16540}
16541
16542impl futures::Stream for OpenableEventStream {
16543 type Item = Result<OpenableEvent, fidl::Error>;
16544
16545 fn poll_next(
16546 mut self: std::pin::Pin<&mut Self>,
16547 cx: &mut std::task::Context<'_>,
16548 ) -> std::task::Poll<Option<Self::Item>> {
16549 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16550 &mut self.event_receiver,
16551 cx
16552 )?) {
16553 Some(buf) => std::task::Poll::Ready(Some(OpenableEvent::decode(buf))),
16554 None => std::task::Poll::Ready(None),
16555 }
16556 }
16557}
16558
16559#[derive(Debug)]
16560pub enum OpenableEvent {
16561 #[non_exhaustive]
16562 _UnknownEvent {
16563 ordinal: u64,
16565 },
16566}
16567
16568impl OpenableEvent {
16569 fn decode(
16571 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16572 ) -> Result<OpenableEvent, fidl::Error> {
16573 let (bytes, _handles) = buf.split_mut();
16574 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16575 debug_assert_eq!(tx_header.tx_id, 0);
16576 match tx_header.ordinal {
16577 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
16578 Ok(OpenableEvent::_UnknownEvent { ordinal: tx_header.ordinal })
16579 }
16580 _ => Err(fidl::Error::UnknownOrdinal {
16581 ordinal: tx_header.ordinal,
16582 protocol_name: <OpenableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16583 }),
16584 }
16585 }
16586}
16587
16588pub struct OpenableRequestStream {
16590 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16591 is_terminated: bool,
16592}
16593
16594impl std::marker::Unpin for OpenableRequestStream {}
16595
16596impl futures::stream::FusedStream for OpenableRequestStream {
16597 fn is_terminated(&self) -> bool {
16598 self.is_terminated
16599 }
16600}
16601
16602impl fidl::endpoints::RequestStream for OpenableRequestStream {
16603 type Protocol = OpenableMarker;
16604 type ControlHandle = OpenableControlHandle;
16605
16606 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16607 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16608 }
16609
16610 fn control_handle(&self) -> Self::ControlHandle {
16611 OpenableControlHandle { inner: self.inner.clone() }
16612 }
16613
16614 fn into_inner(
16615 self,
16616 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16617 {
16618 (self.inner, self.is_terminated)
16619 }
16620
16621 fn from_inner(
16622 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16623 is_terminated: bool,
16624 ) -> Self {
16625 Self { inner, is_terminated }
16626 }
16627}
16628
16629impl futures::Stream for OpenableRequestStream {
16630 type Item = Result<OpenableRequest, fidl::Error>;
16631
16632 fn poll_next(
16633 mut self: std::pin::Pin<&mut Self>,
16634 cx: &mut std::task::Context<'_>,
16635 ) -> std::task::Poll<Option<Self::Item>> {
16636 let this = &mut *self;
16637 if this.inner.check_shutdown(cx) {
16638 this.is_terminated = true;
16639 return std::task::Poll::Ready(None);
16640 }
16641 if this.is_terminated {
16642 panic!("polled OpenableRequestStream after completion");
16643 }
16644 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16645 |bytes, handles| {
16646 match this.inner.channel().read_etc(cx, bytes, handles) {
16647 std::task::Poll::Ready(Ok(())) => {}
16648 std::task::Poll::Pending => return std::task::Poll::Pending,
16649 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16650 this.is_terminated = true;
16651 return std::task::Poll::Ready(None);
16652 }
16653 std::task::Poll::Ready(Err(e)) => {
16654 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16655 e.into(),
16656 ))));
16657 }
16658 }
16659
16660 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16662
16663 std::task::Poll::Ready(Some(match header.ordinal {
16664 0x568ddcb9a9cbb6d9 => {
16665 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
16666 let mut req = fidl::new_empty!(
16667 OpenableOpenRequest,
16668 fidl::encoding::DefaultFuchsiaResourceDialect
16669 );
16670 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
16671 let control_handle = OpenableControlHandle { inner: this.inner.clone() };
16672 Ok(OpenableRequest::Open {
16673 path: req.path,
16674 flags: req.flags,
16675 options: req.options,
16676 object: req.object,
16677
16678 control_handle,
16679 })
16680 }
16681 _ if header.tx_id == 0
16682 && header
16683 .dynamic_flags()
16684 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
16685 {
16686 Ok(OpenableRequest::_UnknownMethod {
16687 ordinal: header.ordinal,
16688 control_handle: OpenableControlHandle { inner: this.inner.clone() },
16689 method_type: fidl::MethodType::OneWay,
16690 })
16691 }
16692 _ if header
16693 .dynamic_flags()
16694 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
16695 {
16696 this.inner.send_framework_err(
16697 fidl::encoding::FrameworkErr::UnknownMethod,
16698 header.tx_id,
16699 header.ordinal,
16700 header.dynamic_flags(),
16701 (bytes, handles),
16702 )?;
16703 Ok(OpenableRequest::_UnknownMethod {
16704 ordinal: header.ordinal,
16705 control_handle: OpenableControlHandle { inner: this.inner.clone() },
16706 method_type: fidl::MethodType::TwoWay,
16707 })
16708 }
16709 _ => Err(fidl::Error::UnknownOrdinal {
16710 ordinal: header.ordinal,
16711 protocol_name:
16712 <OpenableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16713 }),
16714 }))
16715 },
16716 )
16717 }
16718}
16719
16720#[derive(Debug)]
16722pub enum OpenableRequest {
16723 Open {
16730 path: String,
16731 flags: Flags,
16732 options: Options,
16733 object: fidl::Channel,
16734 control_handle: OpenableControlHandle,
16735 },
16736 #[non_exhaustive]
16738 _UnknownMethod {
16739 ordinal: u64,
16741 control_handle: OpenableControlHandle,
16742 method_type: fidl::MethodType,
16743 },
16744}
16745
16746impl OpenableRequest {
16747 #[allow(irrefutable_let_patterns)]
16748 pub fn into_open(
16749 self,
16750 ) -> Option<(String, Flags, Options, fidl::Channel, OpenableControlHandle)> {
16751 if let OpenableRequest::Open { path, flags, options, object, control_handle } = self {
16752 Some((path, flags, options, object, control_handle))
16753 } else {
16754 None
16755 }
16756 }
16757
16758 pub fn method_name(&self) -> &'static str {
16760 match *self {
16761 OpenableRequest::Open { .. } => "open",
16762 OpenableRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
16763 "unknown one-way method"
16764 }
16765 OpenableRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
16766 "unknown two-way method"
16767 }
16768 }
16769 }
16770}
16771
16772#[derive(Debug, Clone)]
16773pub struct OpenableControlHandle {
16774 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16775}
16776
16777impl OpenableControlHandle {
16778 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
16779 self.inner.shutdown_with_epitaph(status.into())
16780 }
16781}
16782
16783impl fidl::endpoints::ControlHandle for OpenableControlHandle {
16784 fn shutdown(&self) {
16785 self.inner.shutdown()
16786 }
16787
16788 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
16789 self.inner.shutdown_with_epitaph(status)
16790 }
16791
16792 fn is_closed(&self) -> bool {
16793 self.inner.channel().is_closed()
16794 }
16795 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16796 self.inner.channel().on_closed()
16797 }
16798
16799 #[cfg(target_os = "fuchsia")]
16800 fn signal_peer(
16801 &self,
16802 clear_mask: zx::Signals,
16803 set_mask: zx::Signals,
16804 ) -> Result<(), zx_status::Status> {
16805 use fidl::Peered;
16806 self.inner.channel().signal_peer(clear_mask, set_mask)
16807 }
16808}
16809
16810impl OpenableControlHandle {}
16811
16812#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16813pub struct ReadableMarker;
16814
16815impl fidl::endpoints::ProtocolMarker for ReadableMarker {
16816 type Proxy = ReadableProxy;
16817 type RequestStream = ReadableRequestStream;
16818 #[cfg(target_os = "fuchsia")]
16819 type SynchronousProxy = ReadableSynchronousProxy;
16820
16821 const DEBUG_NAME: &'static str = "(anonymous) Readable";
16822}
16823pub type ReadableReadResult = Result<Vec<u8>, i32>;
16824
16825pub trait ReadableProxyInterface: Send + Sync {
16826 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
16827 + Send;
16828 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
16829}
16830#[derive(Debug)]
16831#[cfg(target_os = "fuchsia")]
16832pub struct ReadableSynchronousProxy {
16833 client: fidl::client::sync::Client,
16834}
16835
16836#[cfg(target_os = "fuchsia")]
16837impl fidl::endpoints::SynchronousProxy for ReadableSynchronousProxy {
16838 type Proxy = ReadableProxy;
16839 type Protocol = ReadableMarker;
16840
16841 fn from_channel(inner: fidl::Channel) -> Self {
16842 Self::new(inner)
16843 }
16844
16845 fn into_channel(self) -> fidl::Channel {
16846 self.client.into_channel()
16847 }
16848
16849 fn as_channel(&self) -> &fidl::Channel {
16850 self.client.as_channel()
16851 }
16852}
16853
16854#[cfg(target_os = "fuchsia")]
16855impl ReadableSynchronousProxy {
16856 pub fn new(channel: fidl::Channel) -> Self {
16857 Self { client: fidl::client::sync::Client::new(channel) }
16858 }
16859
16860 pub fn into_channel(self) -> fidl::Channel {
16861 self.client.into_channel()
16862 }
16863
16864 pub fn wait_for_event(
16867 &self,
16868 deadline: zx::MonotonicInstant,
16869 ) -> Result<ReadableEvent, fidl::Error> {
16870 ReadableEvent::decode(self.client.wait_for_event::<ReadableMarker>(deadline)?)
16871 }
16872
16873 pub fn r#read(
16892 &self,
16893 mut count: u64,
16894 ___deadline: zx::MonotonicInstant,
16895 ) -> Result<ReadableReadResult, fidl::Error> {
16896 let _response = self.client.send_query::<
16897 ReadableReadRequest,
16898 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16899 ReadableMarker,
16900 >(
16901 (count,),
16902 0x57e419a298c8ede,
16903 fidl::encoding::DynamicFlags::empty(),
16904 ___deadline,
16905 )?;
16906 Ok(_response.map(|x| x.data))
16907 }
16908}
16909
16910#[cfg(target_os = "fuchsia")]
16911impl From<ReadableSynchronousProxy> for zx::NullableHandle {
16912 fn from(value: ReadableSynchronousProxy) -> Self {
16913 value.into_channel().into()
16914 }
16915}
16916
16917#[cfg(target_os = "fuchsia")]
16918impl From<fidl::Channel> for ReadableSynchronousProxy {
16919 fn from(value: fidl::Channel) -> Self {
16920 Self::new(value)
16921 }
16922}
16923
16924#[cfg(target_os = "fuchsia")]
16925impl fidl::endpoints::FromClient for ReadableSynchronousProxy {
16926 type Protocol = ReadableMarker;
16927
16928 fn from_client(value: fidl::endpoints::ClientEnd<ReadableMarker>) -> Self {
16929 Self::new(value.into_channel())
16930 }
16931}
16932
16933#[derive(Debug, Clone)]
16934pub struct ReadableProxy {
16935 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16936}
16937
16938impl fidl::endpoints::Proxy for ReadableProxy {
16939 type Protocol = ReadableMarker;
16940
16941 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16942 Self::new(inner)
16943 }
16944
16945 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16946 self.client.into_channel().map_err(|client| Self { client })
16947 }
16948
16949 fn as_channel(&self) -> &::fidl::AsyncChannel {
16950 self.client.as_channel()
16951 }
16952}
16953
16954impl ReadableProxy {
16955 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16957 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16958 Self { client: fidl::client::Client::new(channel, protocol_name) }
16959 }
16960
16961 pub fn take_event_stream(&self) -> ReadableEventStream {
16967 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
16968 }
16969
16970 pub fn r#read(
16989 &self,
16990 mut count: u64,
16991 ) -> fidl::client::QueryResponseFut<
16992 ReadableReadResult,
16993 fidl::encoding::DefaultFuchsiaResourceDialect,
16994 > {
16995 ReadableProxyInterface::r#read(self, count)
16996 }
16997}
16998
16999impl ReadableProxyInterface for ReadableProxy {
17000 type ReadResponseFut = fidl::client::QueryResponseFut<
17001 ReadableReadResult,
17002 fidl::encoding::DefaultFuchsiaResourceDialect,
17003 >;
17004 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
17005 fn _decode(
17006 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17007 ) -> Result<ReadableReadResult, fidl::Error> {
17008 let _response = fidl::client::decode_transaction_body::<
17009 fidl::encoding::ResultType<ReadableReadResponse, i32>,
17010 fidl::encoding::DefaultFuchsiaResourceDialect,
17011 0x57e419a298c8ede,
17012 >(_buf?)?;
17013 Ok(_response.map(|x| x.data))
17014 }
17015 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
17016 (count,),
17017 0x57e419a298c8ede,
17018 fidl::encoding::DynamicFlags::empty(),
17019 _decode,
17020 )
17021 }
17022}
17023
17024pub struct ReadableEventStream {
17025 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
17026}
17027
17028impl std::marker::Unpin for ReadableEventStream {}
17029
17030impl futures::stream::FusedStream for ReadableEventStream {
17031 fn is_terminated(&self) -> bool {
17032 self.event_receiver.is_terminated()
17033 }
17034}
17035
17036impl futures::Stream for ReadableEventStream {
17037 type Item = Result<ReadableEvent, fidl::Error>;
17038
17039 fn poll_next(
17040 mut self: std::pin::Pin<&mut Self>,
17041 cx: &mut std::task::Context<'_>,
17042 ) -> std::task::Poll<Option<Self::Item>> {
17043 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17044 &mut self.event_receiver,
17045 cx
17046 )?) {
17047 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
17048 None => std::task::Poll::Ready(None),
17049 }
17050 }
17051}
17052
17053#[derive(Debug)]
17054pub enum ReadableEvent {}
17055
17056impl ReadableEvent {
17057 fn decode(
17059 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17060 ) -> Result<ReadableEvent, fidl::Error> {
17061 let (bytes, _handles) = buf.split_mut();
17062 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17063 debug_assert_eq!(tx_header.tx_id, 0);
17064 match tx_header.ordinal {
17065 _ => Err(fidl::Error::UnknownOrdinal {
17066 ordinal: tx_header.ordinal,
17067 protocol_name: <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
17068 }),
17069 }
17070 }
17071}
17072
17073pub struct ReadableRequestStream {
17075 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17076 is_terminated: bool,
17077}
17078
17079impl std::marker::Unpin for ReadableRequestStream {}
17080
17081impl futures::stream::FusedStream for ReadableRequestStream {
17082 fn is_terminated(&self) -> bool {
17083 self.is_terminated
17084 }
17085}
17086
17087impl fidl::endpoints::RequestStream for ReadableRequestStream {
17088 type Protocol = ReadableMarker;
17089 type ControlHandle = ReadableControlHandle;
17090
17091 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
17092 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17093 }
17094
17095 fn control_handle(&self) -> Self::ControlHandle {
17096 ReadableControlHandle { inner: self.inner.clone() }
17097 }
17098
17099 fn into_inner(
17100 self,
17101 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
17102 {
17103 (self.inner, self.is_terminated)
17104 }
17105
17106 fn from_inner(
17107 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17108 is_terminated: bool,
17109 ) -> Self {
17110 Self { inner, is_terminated }
17111 }
17112}
17113
17114impl futures::Stream for ReadableRequestStream {
17115 type Item = Result<ReadableRequest, fidl::Error>;
17116
17117 fn poll_next(
17118 mut self: std::pin::Pin<&mut Self>,
17119 cx: &mut std::task::Context<'_>,
17120 ) -> std::task::Poll<Option<Self::Item>> {
17121 let this = &mut *self;
17122 if this.inner.check_shutdown(cx) {
17123 this.is_terminated = true;
17124 return std::task::Poll::Ready(None);
17125 }
17126 if this.is_terminated {
17127 panic!("polled ReadableRequestStream after completion");
17128 }
17129 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
17130 |bytes, handles| {
17131 match this.inner.channel().read_etc(cx, bytes, handles) {
17132 std::task::Poll::Ready(Ok(())) => {}
17133 std::task::Poll::Pending => return std::task::Poll::Pending,
17134 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
17135 this.is_terminated = true;
17136 return std::task::Poll::Ready(None);
17137 }
17138 std::task::Poll::Ready(Err(e)) => {
17139 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17140 e.into(),
17141 ))));
17142 }
17143 }
17144
17145 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17147
17148 std::task::Poll::Ready(Some(match header.ordinal {
17149 0x57e419a298c8ede => {
17150 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17151 let mut req = fidl::new_empty!(
17152 ReadableReadRequest,
17153 fidl::encoding::DefaultFuchsiaResourceDialect
17154 );
17155 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
17156 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
17157 Ok(ReadableRequest::Read {
17158 count: req.count,
17159
17160 responder: ReadableReadResponder {
17161 control_handle: std::mem::ManuallyDrop::new(control_handle),
17162 tx_id: header.tx_id,
17163 },
17164 })
17165 }
17166 _ => Err(fidl::Error::UnknownOrdinal {
17167 ordinal: header.ordinal,
17168 protocol_name:
17169 <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
17170 }),
17171 }))
17172 },
17173 )
17174 }
17175}
17176
17177#[derive(Debug)]
17178pub enum ReadableRequest {
17179 Read { count: u64, responder: ReadableReadResponder },
17198}
17199
17200impl ReadableRequest {
17201 #[allow(irrefutable_let_patterns)]
17202 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
17203 if let ReadableRequest::Read { count, responder } = self {
17204 Some((count, responder))
17205 } else {
17206 None
17207 }
17208 }
17209
17210 pub fn method_name(&self) -> &'static str {
17212 match *self {
17213 ReadableRequest::Read { .. } => "read",
17214 }
17215 }
17216}
17217
17218#[derive(Debug, Clone)]
17219pub struct ReadableControlHandle {
17220 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17221}
17222
17223impl ReadableControlHandle {
17224 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
17225 self.inner.shutdown_with_epitaph(status.into())
17226 }
17227}
17228
17229impl fidl::endpoints::ControlHandle for ReadableControlHandle {
17230 fn shutdown(&self) {
17231 self.inner.shutdown()
17232 }
17233
17234 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
17235 self.inner.shutdown_with_epitaph(status)
17236 }
17237
17238 fn is_closed(&self) -> bool {
17239 self.inner.channel().is_closed()
17240 }
17241 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
17242 self.inner.channel().on_closed()
17243 }
17244
17245 #[cfg(target_os = "fuchsia")]
17246 fn signal_peer(
17247 &self,
17248 clear_mask: zx::Signals,
17249 set_mask: zx::Signals,
17250 ) -> Result<(), zx_status::Status> {
17251 use fidl::Peered;
17252 self.inner.channel().signal_peer(clear_mask, set_mask)
17253 }
17254}
17255
17256impl ReadableControlHandle {}
17257
17258#[must_use = "FIDL methods require a response to be sent"]
17259#[derive(Debug)]
17260pub struct ReadableReadResponder {
17261 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
17262 tx_id: u32,
17263}
17264
17265impl std::ops::Drop for ReadableReadResponder {
17269 fn drop(&mut self) {
17270 self.control_handle.shutdown();
17271 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17273 }
17274}
17275
17276impl fidl::endpoints::Responder for ReadableReadResponder {
17277 type ControlHandle = ReadableControlHandle;
17278
17279 fn control_handle(&self) -> &ReadableControlHandle {
17280 &self.control_handle
17281 }
17282
17283 fn drop_without_shutdown(mut self) {
17284 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17286 std::mem::forget(self);
17288 }
17289}
17290
17291impl ReadableReadResponder {
17292 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
17296 let _result = self.send_raw(result);
17297 if _result.is_err() {
17298 self.control_handle.shutdown();
17299 }
17300 self.drop_without_shutdown();
17301 _result
17302 }
17303
17304 pub fn send_no_shutdown_on_err(
17306 self,
17307 mut result: Result<&[u8], i32>,
17308 ) -> Result<(), fidl::Error> {
17309 let _result = self.send_raw(result);
17310 self.drop_without_shutdown();
17311 _result
17312 }
17313
17314 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
17315 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
17316 result.map(|data| (data,)),
17317 self.tx_id,
17318 0x57e419a298c8ede,
17319 fidl::encoding::DynamicFlags::empty(),
17320 )
17321 }
17322}
17323
17324#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17325pub struct SymlinkMarker;
17326
17327impl fidl::endpoints::ProtocolMarker for SymlinkMarker {
17328 type Proxy = SymlinkProxy;
17329 type RequestStream = SymlinkRequestStream;
17330 #[cfg(target_os = "fuchsia")]
17331 type SynchronousProxy = SymlinkSynchronousProxy;
17332
17333 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
17334}
17335impl fidl::endpoints::DiscoverableProtocolMarker for SymlinkMarker {}
17336
17337pub trait SymlinkProxyInterface: Send + Sync {
17338 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
17339 + Send;
17340 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
17341 fn r#clone(
17342 &self,
17343 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17344 ) -> Result<(), fidl::Error>;
17345 type CloseResponseFut: std::future::Future<
17346 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
17347 > + Send;
17348 fn r#close(&self) -> Self::CloseResponseFut;
17349 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
17350 fn r#query(&self) -> Self::QueryResponseFut;
17351 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
17352 + Send;
17353 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
17354 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
17355 fn r#deprecated_set_attr(
17356 &self,
17357 flags: NodeAttributeFlags,
17358 attributes: &NodeAttributes,
17359 ) -> Self::DeprecatedSetAttrResponseFut;
17360 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
17361 + Send;
17362 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
17363 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
17364 + Send;
17365 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
17366 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
17367 + Send;
17368 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
17369 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
17370 + Send;
17371 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
17372 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
17373 + Send;
17374 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
17375 type GetTokenResponseFut: std::future::Future<Output = Result<NodeGetTokenResult, fidl::Error>>
17376 + Send;
17377 fn r#get_token(&self) -> Self::GetTokenResponseFut;
17378 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
17379 + Send;
17380 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
17381 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
17382 + Send;
17383 fn r#update_attributes(
17384 &self,
17385 payload: &MutableNodeAttributes,
17386 ) -> Self::UpdateAttributesResponseFut;
17387 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
17388 fn r#sync(&self) -> Self::SyncResponseFut;
17389 fn r#list_extended_attributes(
17390 &self,
17391 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17392 ) -> Result<(), fidl::Error>;
17393 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
17394 + Send;
17395 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
17396 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
17397 + Send;
17398 fn r#set_extended_attribute(
17399 &self,
17400 name: &[u8],
17401 value: ExtendedAttributeValue,
17402 mode: SetExtendedAttributeMode,
17403 ) -> Self::SetExtendedAttributeResponseFut;
17404 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
17405 + Send;
17406 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
17407 fn r#open(
17408 &self,
17409 path: &str,
17410 flags: Flags,
17411 options: &Options,
17412 object: fidl::Channel,
17413 ) -> Result<(), fidl::Error>;
17414 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
17415 fn r#describe(&self) -> Self::DescribeResponseFut;
17416}
17417#[derive(Debug)]
17418#[cfg(target_os = "fuchsia")]
17419pub struct SymlinkSynchronousProxy {
17420 client: fidl::client::sync::Client,
17421}
17422
17423#[cfg(target_os = "fuchsia")]
17424impl fidl::endpoints::SynchronousProxy for SymlinkSynchronousProxy {
17425 type Proxy = SymlinkProxy;
17426 type Protocol = SymlinkMarker;
17427
17428 fn from_channel(inner: fidl::Channel) -> Self {
17429 Self::new(inner)
17430 }
17431
17432 fn into_channel(self) -> fidl::Channel {
17433 self.client.into_channel()
17434 }
17435
17436 fn as_channel(&self) -> &fidl::Channel {
17437 self.client.as_channel()
17438 }
17439}
17440
17441#[cfg(target_os = "fuchsia")]
17442impl SymlinkSynchronousProxy {
17443 pub fn new(channel: fidl::Channel) -> Self {
17444 Self { client: fidl::client::sync::Client::new(channel) }
17445 }
17446
17447 pub fn into_channel(self) -> fidl::Channel {
17448 self.client.into_channel()
17449 }
17450
17451 pub fn wait_for_event(
17454 &self,
17455 deadline: zx::MonotonicInstant,
17456 ) -> Result<SymlinkEvent, fidl::Error> {
17457 SymlinkEvent::decode(self.client.wait_for_event::<SymlinkMarker>(deadline)?)
17458 }
17459
17460 pub fn r#link_into(
17483 &self,
17484 mut dst_parent_token: fidl::Event,
17485 mut dst: &str,
17486 ___deadline: zx::MonotonicInstant,
17487 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
17488 let _response = self.client.send_query::<
17489 LinkableLinkIntoRequest,
17490 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17491 SymlinkMarker,
17492 >(
17493 (dst_parent_token, dst,),
17494 0x54f3949246a03e74,
17495 fidl::encoding::DynamicFlags::empty(),
17496 ___deadline,
17497 )?;
17498 Ok(_response.map(|x| x))
17499 }
17500
17501 pub fn r#clone(
17502 &self,
17503 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17504 ) -> Result<(), fidl::Error> {
17505 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
17506 (request,),
17507 0x20d8a7aba2168a79,
17508 fidl::encoding::DynamicFlags::empty(),
17509 )
17510 }
17511
17512 pub fn r#close(
17523 &self,
17524 ___deadline: zx::MonotonicInstant,
17525 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
17526 let _response = self.client.send_query::<
17527 fidl::encoding::EmptyPayload,
17528 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17529 SymlinkMarker,
17530 >(
17531 (),
17532 0x5ac5d459ad7f657e,
17533 fidl::encoding::DynamicFlags::empty(),
17534 ___deadline,
17535 )?;
17536 Ok(_response.map(|x| x))
17537 }
17538
17539 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
17540 let _response = self.client.send_query::<
17541 fidl::encoding::EmptyPayload,
17542 fidl_fuchsia_unknown::QueryableQueryResponse,
17543 SymlinkMarker,
17544 >(
17545 (),
17546 0x2658edee9decfc06,
17547 fidl::encoding::DynamicFlags::empty(),
17548 ___deadline,
17549 )?;
17550 Ok(_response.protocol)
17551 }
17552
17553 pub fn r#deprecated_get_attr(
17557 &self,
17558 ___deadline: zx::MonotonicInstant,
17559 ) -> Result<(i32, NodeAttributes), fidl::Error> {
17560 let _response = self.client.send_query::<
17561 fidl::encoding::EmptyPayload,
17562 NodeDeprecatedGetAttrResponse,
17563 SymlinkMarker,
17564 >(
17565 (),
17566 0x78985e216314dafd,
17567 fidl::encoding::DynamicFlags::empty(),
17568 ___deadline,
17569 )?;
17570 Ok((_response.s, _response.attributes))
17571 }
17572
17573 pub fn r#deprecated_set_attr(
17575 &self,
17576 mut flags: NodeAttributeFlags,
17577 mut attributes: &NodeAttributes,
17578 ___deadline: zx::MonotonicInstant,
17579 ) -> Result<i32, fidl::Error> {
17580 let _response = self.client.send_query::<
17581 NodeDeprecatedSetAttrRequest,
17582 NodeDeprecatedSetAttrResponse,
17583 SymlinkMarker,
17584 >(
17585 (flags, attributes,),
17586 0x4186c0f40d938f46,
17587 fidl::encoding::DynamicFlags::empty(),
17588 ___deadline,
17589 )?;
17590 Ok(_response.s)
17591 }
17592
17593 pub fn r#deprecated_get_flags(
17595 &self,
17596 ___deadline: zx::MonotonicInstant,
17597 ) -> Result<(i32, OpenFlags), fidl::Error> {
17598 let _response = self.client.send_query::<
17599 fidl::encoding::EmptyPayload,
17600 NodeDeprecatedGetFlagsResponse,
17601 SymlinkMarker,
17602 >(
17603 (),
17604 0x5b88fffb8eda3aa1,
17605 fidl::encoding::DynamicFlags::empty(),
17606 ___deadline,
17607 )?;
17608 Ok((_response.s, _response.flags))
17609 }
17610
17611 pub fn r#deprecated_set_flags(
17613 &self,
17614 mut flags: OpenFlags,
17615 ___deadline: zx::MonotonicInstant,
17616 ) -> Result<i32, fidl::Error> {
17617 let _response = self.client.send_query::<
17618 NodeDeprecatedSetFlagsRequest,
17619 NodeDeprecatedSetFlagsResponse,
17620 SymlinkMarker,
17621 >(
17622 (flags,),
17623 0x5295b76c71fde733,
17624 fidl::encoding::DynamicFlags::empty(),
17625 ___deadline,
17626 )?;
17627 Ok(_response.s)
17628 }
17629
17630 pub fn r#get_flags(
17639 &self,
17640 ___deadline: zx::MonotonicInstant,
17641 ) -> Result<NodeGetFlagsResult, fidl::Error> {
17642 let _response = self.client.send_query::<
17643 fidl::encoding::EmptyPayload,
17644 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
17645 SymlinkMarker,
17646 >(
17647 (),
17648 0x176eb318f64ec23,
17649 fidl::encoding::DynamicFlags::FLEXIBLE,
17650 ___deadline,
17651 )?
17652 .into_result::<SymlinkMarker>("get_flags")?;
17653 Ok(_response.map(|x| x.flags))
17654 }
17655
17656 pub fn r#set_flags(
17666 &self,
17667 mut flags: Flags,
17668 ___deadline: zx::MonotonicInstant,
17669 ) -> Result<NodeSetFlagsResult, fidl::Error> {
17670 let _response = self.client.send_query::<
17671 NodeSetFlagsRequest,
17672 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
17673 SymlinkMarker,
17674 >(
17675 (flags,),
17676 0x55a8028685791ea8,
17677 fidl::encoding::DynamicFlags::FLEXIBLE,
17678 ___deadline,
17679 )?
17680 .into_result::<SymlinkMarker>("set_flags")?;
17681 Ok(_response.map(|x| x))
17682 }
17683
17684 pub fn r#query_filesystem(
17688 &self,
17689 ___deadline: zx::MonotonicInstant,
17690 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
17691 let _response = self
17692 .client
17693 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, SymlinkMarker>(
17694 (),
17695 0x6f344a1c6b0a0610,
17696 fidl::encoding::DynamicFlags::empty(),
17697 ___deadline,
17698 )?;
17699 Ok((_response.s, _response.info))
17700 }
17701
17702 pub fn r#get_token(
17709 &self,
17710 ___deadline: zx::MonotonicInstant,
17711 ) -> Result<NodeGetTokenResult, fidl::Error> {
17712 let _response = self.client.send_query::<
17713 fidl::encoding::EmptyPayload,
17714 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
17715 SymlinkMarker,
17716 >(
17717 (),
17718 0x5054f0ade7076cec,
17719 fidl::encoding::DynamicFlags::FLEXIBLE,
17720 ___deadline,
17721 )?
17722 .into_result::<SymlinkMarker>("get_token")?;
17723 Ok(_response.map(|x| x.token))
17724 }
17725
17726 pub fn r#get_attributes(
17740 &self,
17741 mut query: NodeAttributesQuery,
17742 ___deadline: zx::MonotonicInstant,
17743 ) -> Result<NodeGetAttributesResult, fidl::Error> {
17744 let _response = self.client.send_query::<
17745 NodeGetAttributesRequest,
17746 fidl::encoding::ResultType<NodeAttributes2, i32>,
17747 SymlinkMarker,
17748 >(
17749 (query,),
17750 0x3d4396a638ea053b,
17751 fidl::encoding::DynamicFlags::empty(),
17752 ___deadline,
17753 )?;
17754 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
17755 }
17756
17757 pub fn r#update_attributes(
17766 &self,
17767 mut payload: &MutableNodeAttributes,
17768 ___deadline: zx::MonotonicInstant,
17769 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
17770 let _response = self.client.send_query::<
17771 MutableNodeAttributes,
17772 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17773 SymlinkMarker,
17774 >(
17775 payload,
17776 0x3308c1da5a89bf08,
17777 fidl::encoding::DynamicFlags::empty(),
17778 ___deadline,
17779 )?;
17780 Ok(_response.map(|x| x))
17781 }
17782
17783 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
17793 let _response = self.client.send_query::<
17794 fidl::encoding::EmptyPayload,
17795 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17796 SymlinkMarker,
17797 >(
17798 (),
17799 0x2c5c27ca0ab5dc49,
17800 fidl::encoding::DynamicFlags::empty(),
17801 ___deadline,
17802 )?;
17803 Ok(_response.map(|x| x))
17804 }
17805
17806 pub fn r#list_extended_attributes(
17815 &self,
17816 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17817 ) -> Result<(), fidl::Error> {
17818 self.client.send::<NodeListExtendedAttributesRequest>(
17819 (iterator,),
17820 0x4b61033de007fcd0,
17821 fidl::encoding::DynamicFlags::empty(),
17822 )
17823 }
17824
17825 pub fn r#get_extended_attribute(
17832 &self,
17833 mut name: &[u8],
17834 ___deadline: zx::MonotonicInstant,
17835 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
17836 let _response = self.client.send_query::<
17837 NodeGetExtendedAttributeRequest,
17838 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
17839 SymlinkMarker,
17840 >(
17841 (name,),
17842 0x45ffa3ccfdeb76db,
17843 fidl::encoding::DynamicFlags::empty(),
17844 ___deadline,
17845 )?;
17846 Ok(_response.map(|x| x))
17847 }
17848
17849 pub fn r#set_extended_attribute(
17857 &self,
17858 mut name: &[u8],
17859 mut value: ExtendedAttributeValue,
17860 mut mode: SetExtendedAttributeMode,
17861 ___deadline: zx::MonotonicInstant,
17862 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17863 let _response = self.client.send_query::<
17864 NodeSetExtendedAttributeRequest,
17865 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17866 SymlinkMarker,
17867 >(
17868 (name, &mut value, mode,),
17869 0x4a951362f681f23c,
17870 fidl::encoding::DynamicFlags::empty(),
17871 ___deadline,
17872 )?;
17873 Ok(_response.map(|x| x))
17874 }
17875
17876 pub fn r#remove_extended_attribute(
17882 &self,
17883 mut name: &[u8],
17884 ___deadline: zx::MonotonicInstant,
17885 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17886 let _response = self.client.send_query::<
17887 NodeRemoveExtendedAttributeRequest,
17888 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17889 SymlinkMarker,
17890 >(
17891 (name,),
17892 0x7a0b9f3a9bf9032d,
17893 fidl::encoding::DynamicFlags::empty(),
17894 ___deadline,
17895 )?;
17896 Ok(_response.map(|x| x))
17897 }
17898
17899 pub fn r#open(
17906 &self,
17907 mut path: &str,
17908 mut flags: Flags,
17909 mut options: &Options,
17910 mut object: fidl::Channel,
17911 ) -> Result<(), fidl::Error> {
17912 self.client.send::<OpenableOpenRequest>(
17913 (path, flags, options, object),
17914 0x568ddcb9a9cbb6d9,
17915 fidl::encoding::DynamicFlags::FLEXIBLE,
17916 )
17917 }
17918
17919 pub fn r#describe(
17920 &self,
17921 ___deadline: zx::MonotonicInstant,
17922 ) -> Result<SymlinkInfo, fidl::Error> {
17923 let _response = self.client.send_query::<
17924 fidl::encoding::EmptyPayload,
17925 fidl::encoding::FlexibleType<SymlinkInfo>,
17926 SymlinkMarker,
17927 >(
17928 (),
17929 0x742c2ea5e89831f3,
17930 fidl::encoding::DynamicFlags::FLEXIBLE,
17931 ___deadline,
17932 )?
17933 .into_result::<SymlinkMarker>("describe")?;
17934 Ok(_response)
17935 }
17936}
17937
17938#[cfg(target_os = "fuchsia")]
17939impl From<SymlinkSynchronousProxy> for zx::NullableHandle {
17940 fn from(value: SymlinkSynchronousProxy) -> Self {
17941 value.into_channel().into()
17942 }
17943}
17944
17945#[cfg(target_os = "fuchsia")]
17946impl From<fidl::Channel> for SymlinkSynchronousProxy {
17947 fn from(value: fidl::Channel) -> Self {
17948 Self::new(value)
17949 }
17950}
17951
17952#[cfg(target_os = "fuchsia")]
17953impl fidl::endpoints::FromClient for SymlinkSynchronousProxy {
17954 type Protocol = SymlinkMarker;
17955
17956 fn from_client(value: fidl::endpoints::ClientEnd<SymlinkMarker>) -> Self {
17957 Self::new(value.into_channel())
17958 }
17959}
17960
17961#[derive(Debug, Clone)]
17962pub struct SymlinkProxy {
17963 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
17964}
17965
17966impl fidl::endpoints::Proxy for SymlinkProxy {
17967 type Protocol = SymlinkMarker;
17968
17969 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
17970 Self::new(inner)
17971 }
17972
17973 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
17974 self.client.into_channel().map_err(|client| Self { client })
17975 }
17976
17977 fn as_channel(&self) -> &::fidl::AsyncChannel {
17978 self.client.as_channel()
17979 }
17980}
17981
17982impl SymlinkProxy {
17983 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
17985 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
17986 Self { client: fidl::client::Client::new(channel, protocol_name) }
17987 }
17988
17989 pub fn take_event_stream(&self) -> SymlinkEventStream {
17995 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
17996 }
17997
17998 pub fn r#link_into(
18021 &self,
18022 mut dst_parent_token: fidl::Event,
18023 mut dst: &str,
18024 ) -> fidl::client::QueryResponseFut<
18025 LinkableLinkIntoResult,
18026 fidl::encoding::DefaultFuchsiaResourceDialect,
18027 > {
18028 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
18029 }
18030
18031 pub fn r#clone(
18032 &self,
18033 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18034 ) -> Result<(), fidl::Error> {
18035 SymlinkProxyInterface::r#clone(self, request)
18036 }
18037
18038 pub fn r#close(
18049 &self,
18050 ) -> fidl::client::QueryResponseFut<
18051 fidl_fuchsia_unknown::CloseableCloseResult,
18052 fidl::encoding::DefaultFuchsiaResourceDialect,
18053 > {
18054 SymlinkProxyInterface::r#close(self)
18055 }
18056
18057 pub fn r#query(
18058 &self,
18059 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
18060 {
18061 SymlinkProxyInterface::r#query(self)
18062 }
18063
18064 pub fn r#deprecated_get_attr(
18068 &self,
18069 ) -> fidl::client::QueryResponseFut<
18070 (i32, NodeAttributes),
18071 fidl::encoding::DefaultFuchsiaResourceDialect,
18072 > {
18073 SymlinkProxyInterface::r#deprecated_get_attr(self)
18074 }
18075
18076 pub fn r#deprecated_set_attr(
18078 &self,
18079 mut flags: NodeAttributeFlags,
18080 mut attributes: &NodeAttributes,
18081 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
18082 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
18083 }
18084
18085 pub fn r#deprecated_get_flags(
18087 &self,
18088 ) -> fidl::client::QueryResponseFut<
18089 (i32, OpenFlags),
18090 fidl::encoding::DefaultFuchsiaResourceDialect,
18091 > {
18092 SymlinkProxyInterface::r#deprecated_get_flags(self)
18093 }
18094
18095 pub fn r#deprecated_set_flags(
18097 &self,
18098 mut flags: OpenFlags,
18099 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
18100 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
18101 }
18102
18103 pub fn r#get_flags(
18112 &self,
18113 ) -> fidl::client::QueryResponseFut<
18114 NodeGetFlagsResult,
18115 fidl::encoding::DefaultFuchsiaResourceDialect,
18116 > {
18117 SymlinkProxyInterface::r#get_flags(self)
18118 }
18119
18120 pub fn r#set_flags(
18130 &self,
18131 mut flags: Flags,
18132 ) -> fidl::client::QueryResponseFut<
18133 NodeSetFlagsResult,
18134 fidl::encoding::DefaultFuchsiaResourceDialect,
18135 > {
18136 SymlinkProxyInterface::r#set_flags(self, flags)
18137 }
18138
18139 pub fn r#query_filesystem(
18143 &self,
18144 ) -> fidl::client::QueryResponseFut<
18145 (i32, Option<Box<FilesystemInfo>>),
18146 fidl::encoding::DefaultFuchsiaResourceDialect,
18147 > {
18148 SymlinkProxyInterface::r#query_filesystem(self)
18149 }
18150
18151 pub fn r#get_token(
18158 &self,
18159 ) -> fidl::client::QueryResponseFut<
18160 NodeGetTokenResult,
18161 fidl::encoding::DefaultFuchsiaResourceDialect,
18162 > {
18163 SymlinkProxyInterface::r#get_token(self)
18164 }
18165
18166 pub fn r#get_attributes(
18180 &self,
18181 mut query: NodeAttributesQuery,
18182 ) -> fidl::client::QueryResponseFut<
18183 NodeGetAttributesResult,
18184 fidl::encoding::DefaultFuchsiaResourceDialect,
18185 > {
18186 SymlinkProxyInterface::r#get_attributes(self, query)
18187 }
18188
18189 pub fn r#update_attributes(
18198 &self,
18199 mut payload: &MutableNodeAttributes,
18200 ) -> fidl::client::QueryResponseFut<
18201 NodeUpdateAttributesResult,
18202 fidl::encoding::DefaultFuchsiaResourceDialect,
18203 > {
18204 SymlinkProxyInterface::r#update_attributes(self, payload)
18205 }
18206
18207 pub fn r#sync(
18217 &self,
18218 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
18219 {
18220 SymlinkProxyInterface::r#sync(self)
18221 }
18222
18223 pub fn r#list_extended_attributes(
18232 &self,
18233 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18234 ) -> Result<(), fidl::Error> {
18235 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
18236 }
18237
18238 pub fn r#get_extended_attribute(
18245 &self,
18246 mut name: &[u8],
18247 ) -> fidl::client::QueryResponseFut<
18248 NodeGetExtendedAttributeResult,
18249 fidl::encoding::DefaultFuchsiaResourceDialect,
18250 > {
18251 SymlinkProxyInterface::r#get_extended_attribute(self, name)
18252 }
18253
18254 pub fn r#set_extended_attribute(
18262 &self,
18263 mut name: &[u8],
18264 mut value: ExtendedAttributeValue,
18265 mut mode: SetExtendedAttributeMode,
18266 ) -> fidl::client::QueryResponseFut<
18267 NodeSetExtendedAttributeResult,
18268 fidl::encoding::DefaultFuchsiaResourceDialect,
18269 > {
18270 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
18271 }
18272
18273 pub fn r#remove_extended_attribute(
18279 &self,
18280 mut name: &[u8],
18281 ) -> fidl::client::QueryResponseFut<
18282 NodeRemoveExtendedAttributeResult,
18283 fidl::encoding::DefaultFuchsiaResourceDialect,
18284 > {
18285 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
18286 }
18287
18288 pub fn r#open(
18295 &self,
18296 mut path: &str,
18297 mut flags: Flags,
18298 mut options: &Options,
18299 mut object: fidl::Channel,
18300 ) -> Result<(), fidl::Error> {
18301 SymlinkProxyInterface::r#open(self, path, flags, options, object)
18302 }
18303
18304 pub fn r#describe(
18305 &self,
18306 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
18307 {
18308 SymlinkProxyInterface::r#describe(self)
18309 }
18310}
18311
18312impl SymlinkProxyInterface for SymlinkProxy {
18313 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
18314 LinkableLinkIntoResult,
18315 fidl::encoding::DefaultFuchsiaResourceDialect,
18316 >;
18317 fn r#link_into(
18318 &self,
18319 mut dst_parent_token: fidl::Event,
18320 mut dst: &str,
18321 ) -> Self::LinkIntoResponseFut {
18322 fn _decode(
18323 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18324 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
18325 let _response = fidl::client::decode_transaction_body::<
18326 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18327 fidl::encoding::DefaultFuchsiaResourceDialect,
18328 0x54f3949246a03e74,
18329 >(_buf?)?;
18330 Ok(_response.map(|x| x))
18331 }
18332 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
18333 (dst_parent_token, dst),
18334 0x54f3949246a03e74,
18335 fidl::encoding::DynamicFlags::empty(),
18336 _decode,
18337 )
18338 }
18339
18340 fn r#clone(
18341 &self,
18342 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18343 ) -> Result<(), fidl::Error> {
18344 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
18345 (request,),
18346 0x20d8a7aba2168a79,
18347 fidl::encoding::DynamicFlags::empty(),
18348 )
18349 }
18350
18351 type CloseResponseFut = fidl::client::QueryResponseFut<
18352 fidl_fuchsia_unknown::CloseableCloseResult,
18353 fidl::encoding::DefaultFuchsiaResourceDialect,
18354 >;
18355 fn r#close(&self) -> Self::CloseResponseFut {
18356 fn _decode(
18357 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18358 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
18359 let _response = fidl::client::decode_transaction_body::<
18360 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18361 fidl::encoding::DefaultFuchsiaResourceDialect,
18362 0x5ac5d459ad7f657e,
18363 >(_buf?)?;
18364 Ok(_response.map(|x| x))
18365 }
18366 self.client.send_query_and_decode::<
18367 fidl::encoding::EmptyPayload,
18368 fidl_fuchsia_unknown::CloseableCloseResult,
18369 >(
18370 (),
18371 0x5ac5d459ad7f657e,
18372 fidl::encoding::DynamicFlags::empty(),
18373 _decode,
18374 )
18375 }
18376
18377 type QueryResponseFut =
18378 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
18379 fn r#query(&self) -> Self::QueryResponseFut {
18380 fn _decode(
18381 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18382 ) -> Result<Vec<u8>, fidl::Error> {
18383 let _response = fidl::client::decode_transaction_body::<
18384 fidl_fuchsia_unknown::QueryableQueryResponse,
18385 fidl::encoding::DefaultFuchsiaResourceDialect,
18386 0x2658edee9decfc06,
18387 >(_buf?)?;
18388 Ok(_response.protocol)
18389 }
18390 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
18391 (),
18392 0x2658edee9decfc06,
18393 fidl::encoding::DynamicFlags::empty(),
18394 _decode,
18395 )
18396 }
18397
18398 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
18399 (i32, NodeAttributes),
18400 fidl::encoding::DefaultFuchsiaResourceDialect,
18401 >;
18402 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
18403 fn _decode(
18404 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18405 ) -> Result<(i32, NodeAttributes), fidl::Error> {
18406 let _response = fidl::client::decode_transaction_body::<
18407 NodeDeprecatedGetAttrResponse,
18408 fidl::encoding::DefaultFuchsiaResourceDialect,
18409 0x78985e216314dafd,
18410 >(_buf?)?;
18411 Ok((_response.s, _response.attributes))
18412 }
18413 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
18414 (),
18415 0x78985e216314dafd,
18416 fidl::encoding::DynamicFlags::empty(),
18417 _decode,
18418 )
18419 }
18420
18421 type DeprecatedSetAttrResponseFut =
18422 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
18423 fn r#deprecated_set_attr(
18424 &self,
18425 mut flags: NodeAttributeFlags,
18426 mut attributes: &NodeAttributes,
18427 ) -> Self::DeprecatedSetAttrResponseFut {
18428 fn _decode(
18429 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18430 ) -> Result<i32, fidl::Error> {
18431 let _response = fidl::client::decode_transaction_body::<
18432 NodeDeprecatedSetAttrResponse,
18433 fidl::encoding::DefaultFuchsiaResourceDialect,
18434 0x4186c0f40d938f46,
18435 >(_buf?)?;
18436 Ok(_response.s)
18437 }
18438 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
18439 (flags, attributes),
18440 0x4186c0f40d938f46,
18441 fidl::encoding::DynamicFlags::empty(),
18442 _decode,
18443 )
18444 }
18445
18446 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
18447 (i32, OpenFlags),
18448 fidl::encoding::DefaultFuchsiaResourceDialect,
18449 >;
18450 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
18451 fn _decode(
18452 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18453 ) -> Result<(i32, OpenFlags), fidl::Error> {
18454 let _response = fidl::client::decode_transaction_body::<
18455 NodeDeprecatedGetFlagsResponse,
18456 fidl::encoding::DefaultFuchsiaResourceDialect,
18457 0x5b88fffb8eda3aa1,
18458 >(_buf?)?;
18459 Ok((_response.s, _response.flags))
18460 }
18461 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
18462 (),
18463 0x5b88fffb8eda3aa1,
18464 fidl::encoding::DynamicFlags::empty(),
18465 _decode,
18466 )
18467 }
18468
18469 type DeprecatedSetFlagsResponseFut =
18470 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
18471 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
18472 fn _decode(
18473 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18474 ) -> Result<i32, fidl::Error> {
18475 let _response = fidl::client::decode_transaction_body::<
18476 NodeDeprecatedSetFlagsResponse,
18477 fidl::encoding::DefaultFuchsiaResourceDialect,
18478 0x5295b76c71fde733,
18479 >(_buf?)?;
18480 Ok(_response.s)
18481 }
18482 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
18483 (flags,),
18484 0x5295b76c71fde733,
18485 fidl::encoding::DynamicFlags::empty(),
18486 _decode,
18487 )
18488 }
18489
18490 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
18491 NodeGetFlagsResult,
18492 fidl::encoding::DefaultFuchsiaResourceDialect,
18493 >;
18494 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
18495 fn _decode(
18496 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18497 ) -> Result<NodeGetFlagsResult, fidl::Error> {
18498 let _response = fidl::client::decode_transaction_body::<
18499 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
18500 fidl::encoding::DefaultFuchsiaResourceDialect,
18501 0x176eb318f64ec23,
18502 >(_buf?)?
18503 .into_result::<SymlinkMarker>("get_flags")?;
18504 Ok(_response.map(|x| x.flags))
18505 }
18506 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
18507 (),
18508 0x176eb318f64ec23,
18509 fidl::encoding::DynamicFlags::FLEXIBLE,
18510 _decode,
18511 )
18512 }
18513
18514 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
18515 NodeSetFlagsResult,
18516 fidl::encoding::DefaultFuchsiaResourceDialect,
18517 >;
18518 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
18519 fn _decode(
18520 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18521 ) -> Result<NodeSetFlagsResult, fidl::Error> {
18522 let _response = fidl::client::decode_transaction_body::<
18523 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
18524 fidl::encoding::DefaultFuchsiaResourceDialect,
18525 0x55a8028685791ea8,
18526 >(_buf?)?
18527 .into_result::<SymlinkMarker>("set_flags")?;
18528 Ok(_response.map(|x| x))
18529 }
18530 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
18531 (flags,),
18532 0x55a8028685791ea8,
18533 fidl::encoding::DynamicFlags::FLEXIBLE,
18534 _decode,
18535 )
18536 }
18537
18538 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
18539 (i32, Option<Box<FilesystemInfo>>),
18540 fidl::encoding::DefaultFuchsiaResourceDialect,
18541 >;
18542 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
18543 fn _decode(
18544 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18545 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
18546 let _response = fidl::client::decode_transaction_body::<
18547 NodeQueryFilesystemResponse,
18548 fidl::encoding::DefaultFuchsiaResourceDialect,
18549 0x6f344a1c6b0a0610,
18550 >(_buf?)?;
18551 Ok((_response.s, _response.info))
18552 }
18553 self.client.send_query_and_decode::<
18554 fidl::encoding::EmptyPayload,
18555 (i32, Option<Box<FilesystemInfo>>),
18556 >(
18557 (),
18558 0x6f344a1c6b0a0610,
18559 fidl::encoding::DynamicFlags::empty(),
18560 _decode,
18561 )
18562 }
18563
18564 type GetTokenResponseFut = fidl::client::QueryResponseFut<
18565 NodeGetTokenResult,
18566 fidl::encoding::DefaultFuchsiaResourceDialect,
18567 >;
18568 fn r#get_token(&self) -> Self::GetTokenResponseFut {
18569 fn _decode(
18570 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18571 ) -> Result<NodeGetTokenResult, fidl::Error> {
18572 let _response = fidl::client::decode_transaction_body::<
18573 fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>,
18574 fidl::encoding::DefaultFuchsiaResourceDialect,
18575 0x5054f0ade7076cec,
18576 >(_buf?)?
18577 .into_result::<SymlinkMarker>("get_token")?;
18578 Ok(_response.map(|x| x.token))
18579 }
18580 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetTokenResult>(
18581 (),
18582 0x5054f0ade7076cec,
18583 fidl::encoding::DynamicFlags::FLEXIBLE,
18584 _decode,
18585 )
18586 }
18587
18588 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
18589 NodeGetAttributesResult,
18590 fidl::encoding::DefaultFuchsiaResourceDialect,
18591 >;
18592 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
18593 fn _decode(
18594 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18595 ) -> Result<NodeGetAttributesResult, fidl::Error> {
18596 let _response = fidl::client::decode_transaction_body::<
18597 fidl::encoding::ResultType<NodeAttributes2, i32>,
18598 fidl::encoding::DefaultFuchsiaResourceDialect,
18599 0x3d4396a638ea053b,
18600 >(_buf?)?;
18601 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
18602 }
18603 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
18604 (query,),
18605 0x3d4396a638ea053b,
18606 fidl::encoding::DynamicFlags::empty(),
18607 _decode,
18608 )
18609 }
18610
18611 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
18612 NodeUpdateAttributesResult,
18613 fidl::encoding::DefaultFuchsiaResourceDialect,
18614 >;
18615 fn r#update_attributes(
18616 &self,
18617 mut payload: &MutableNodeAttributes,
18618 ) -> Self::UpdateAttributesResponseFut {
18619 fn _decode(
18620 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18621 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
18622 let _response = fidl::client::decode_transaction_body::<
18623 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18624 fidl::encoding::DefaultFuchsiaResourceDialect,
18625 0x3308c1da5a89bf08,
18626 >(_buf?)?;
18627 Ok(_response.map(|x| x))
18628 }
18629 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
18630 payload,
18631 0x3308c1da5a89bf08,
18632 fidl::encoding::DynamicFlags::empty(),
18633 _decode,
18634 )
18635 }
18636
18637 type SyncResponseFut = fidl::client::QueryResponseFut<
18638 NodeSyncResult,
18639 fidl::encoding::DefaultFuchsiaResourceDialect,
18640 >;
18641 fn r#sync(&self) -> Self::SyncResponseFut {
18642 fn _decode(
18643 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18644 ) -> Result<NodeSyncResult, fidl::Error> {
18645 let _response = fidl::client::decode_transaction_body::<
18646 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18647 fidl::encoding::DefaultFuchsiaResourceDialect,
18648 0x2c5c27ca0ab5dc49,
18649 >(_buf?)?;
18650 Ok(_response.map(|x| x))
18651 }
18652 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
18653 (),
18654 0x2c5c27ca0ab5dc49,
18655 fidl::encoding::DynamicFlags::empty(),
18656 _decode,
18657 )
18658 }
18659
18660 fn r#list_extended_attributes(
18661 &self,
18662 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18663 ) -> Result<(), fidl::Error> {
18664 self.client.send::<NodeListExtendedAttributesRequest>(
18665 (iterator,),
18666 0x4b61033de007fcd0,
18667 fidl::encoding::DynamicFlags::empty(),
18668 )
18669 }
18670
18671 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
18672 NodeGetExtendedAttributeResult,
18673 fidl::encoding::DefaultFuchsiaResourceDialect,
18674 >;
18675 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
18676 fn _decode(
18677 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18678 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
18679 let _response = fidl::client::decode_transaction_body::<
18680 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
18681 fidl::encoding::DefaultFuchsiaResourceDialect,
18682 0x45ffa3ccfdeb76db,
18683 >(_buf?)?;
18684 Ok(_response.map(|x| x))
18685 }
18686 self.client.send_query_and_decode::<
18687 NodeGetExtendedAttributeRequest,
18688 NodeGetExtendedAttributeResult,
18689 >(
18690 (name,),
18691 0x45ffa3ccfdeb76db,
18692 fidl::encoding::DynamicFlags::empty(),
18693 _decode,
18694 )
18695 }
18696
18697 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
18698 NodeSetExtendedAttributeResult,
18699 fidl::encoding::DefaultFuchsiaResourceDialect,
18700 >;
18701 fn r#set_extended_attribute(
18702 &self,
18703 mut name: &[u8],
18704 mut value: ExtendedAttributeValue,
18705 mut mode: SetExtendedAttributeMode,
18706 ) -> Self::SetExtendedAttributeResponseFut {
18707 fn _decode(
18708 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18709 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
18710 let _response = fidl::client::decode_transaction_body::<
18711 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18712 fidl::encoding::DefaultFuchsiaResourceDialect,
18713 0x4a951362f681f23c,
18714 >(_buf?)?;
18715 Ok(_response.map(|x| x))
18716 }
18717 self.client.send_query_and_decode::<
18718 NodeSetExtendedAttributeRequest,
18719 NodeSetExtendedAttributeResult,
18720 >(
18721 (name, &mut value, mode,),
18722 0x4a951362f681f23c,
18723 fidl::encoding::DynamicFlags::empty(),
18724 _decode,
18725 )
18726 }
18727
18728 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
18729 NodeRemoveExtendedAttributeResult,
18730 fidl::encoding::DefaultFuchsiaResourceDialect,
18731 >;
18732 fn r#remove_extended_attribute(
18733 &self,
18734 mut name: &[u8],
18735 ) -> Self::RemoveExtendedAttributeResponseFut {
18736 fn _decode(
18737 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18738 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
18739 let _response = fidl::client::decode_transaction_body::<
18740 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18741 fidl::encoding::DefaultFuchsiaResourceDialect,
18742 0x7a0b9f3a9bf9032d,
18743 >(_buf?)?;
18744 Ok(_response.map(|x| x))
18745 }
18746 self.client.send_query_and_decode::<
18747 NodeRemoveExtendedAttributeRequest,
18748 NodeRemoveExtendedAttributeResult,
18749 >(
18750 (name,),
18751 0x7a0b9f3a9bf9032d,
18752 fidl::encoding::DynamicFlags::empty(),
18753 _decode,
18754 )
18755 }
18756
18757 fn r#open(
18758 &self,
18759 mut path: &str,
18760 mut flags: Flags,
18761 mut options: &Options,
18762 mut object: fidl::Channel,
18763 ) -> Result<(), fidl::Error> {
18764 self.client.send::<OpenableOpenRequest>(
18765 (path, flags, options, object),
18766 0x568ddcb9a9cbb6d9,
18767 fidl::encoding::DynamicFlags::FLEXIBLE,
18768 )
18769 }
18770
18771 type DescribeResponseFut =
18772 fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
18773 fn r#describe(&self) -> Self::DescribeResponseFut {
18774 fn _decode(
18775 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18776 ) -> Result<SymlinkInfo, fidl::Error> {
18777 let _response = fidl::client::decode_transaction_body::<
18778 fidl::encoding::FlexibleType<SymlinkInfo>,
18779 fidl::encoding::DefaultFuchsiaResourceDialect,
18780 0x742c2ea5e89831f3,
18781 >(_buf?)?
18782 .into_result::<SymlinkMarker>("describe")?;
18783 Ok(_response)
18784 }
18785 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
18786 (),
18787 0x742c2ea5e89831f3,
18788 fidl::encoding::DynamicFlags::FLEXIBLE,
18789 _decode,
18790 )
18791 }
18792}
18793
18794pub struct SymlinkEventStream {
18795 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
18796}
18797
18798impl std::marker::Unpin for SymlinkEventStream {}
18799
18800impl futures::stream::FusedStream for SymlinkEventStream {
18801 fn is_terminated(&self) -> bool {
18802 self.event_receiver.is_terminated()
18803 }
18804}
18805
18806impl futures::Stream for SymlinkEventStream {
18807 type Item = Result<SymlinkEvent, fidl::Error>;
18808
18809 fn poll_next(
18810 mut self: std::pin::Pin<&mut Self>,
18811 cx: &mut std::task::Context<'_>,
18812 ) -> std::task::Poll<Option<Self::Item>> {
18813 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
18814 &mut self.event_receiver,
18815 cx
18816 )?) {
18817 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
18818 None => std::task::Poll::Ready(None),
18819 }
18820 }
18821}
18822
18823#[derive(Debug)]
18824pub enum SymlinkEvent {
18825 OnOpen_ {
18826 s: i32,
18827 info: Option<Box<NodeInfoDeprecated>>,
18828 },
18829 OnRepresentation {
18830 payload: Representation,
18831 },
18832 #[non_exhaustive]
18833 _UnknownEvent {
18834 ordinal: u64,
18836 },
18837}
18838
18839impl SymlinkEvent {
18840 #[allow(irrefutable_let_patterns)]
18841 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
18842 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
18843 }
18844 #[allow(irrefutable_let_patterns)]
18845 pub fn into_on_representation(self) -> Option<Representation> {
18846 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
18847 }
18848
18849 fn decode(
18851 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
18852 ) -> Result<SymlinkEvent, fidl::Error> {
18853 let (bytes, _handles) = buf.split_mut();
18854 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
18855 debug_assert_eq!(tx_header.tx_id, 0);
18856 match tx_header.ordinal {
18857 0x7fc7bbb1dbfd1972 => {
18858 let mut out = fidl::new_empty!(
18859 NodeOnOpenRequest,
18860 fidl::encoding::DefaultFuchsiaResourceDialect
18861 );
18862 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
18863 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
18864 }
18865 0x5cb40567d80a510c => {
18866 let mut out =
18867 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
18868 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
18869 Ok((SymlinkEvent::OnRepresentation { payload: out }))
18870 }
18871 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
18872 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
18873 }
18874 _ => Err(fidl::Error::UnknownOrdinal {
18875 ordinal: tx_header.ordinal,
18876 protocol_name: <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
18877 }),
18878 }
18879 }
18880}
18881
18882pub struct SymlinkRequestStream {
18884 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18885 is_terminated: bool,
18886}
18887
18888impl std::marker::Unpin for SymlinkRequestStream {}
18889
18890impl futures::stream::FusedStream for SymlinkRequestStream {
18891 fn is_terminated(&self) -> bool {
18892 self.is_terminated
18893 }
18894}
18895
18896impl fidl::endpoints::RequestStream for SymlinkRequestStream {
18897 type Protocol = SymlinkMarker;
18898 type ControlHandle = SymlinkControlHandle;
18899
18900 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
18901 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
18902 }
18903
18904 fn control_handle(&self) -> Self::ControlHandle {
18905 SymlinkControlHandle { inner: self.inner.clone() }
18906 }
18907
18908 fn into_inner(
18909 self,
18910 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
18911 {
18912 (self.inner, self.is_terminated)
18913 }
18914
18915 fn from_inner(
18916 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18917 is_terminated: bool,
18918 ) -> Self {
18919 Self { inner, is_terminated }
18920 }
18921}
18922
18923impl futures::Stream for SymlinkRequestStream {
18924 type Item = Result<SymlinkRequest, fidl::Error>;
18925
18926 fn poll_next(
18927 mut self: std::pin::Pin<&mut Self>,
18928 cx: &mut std::task::Context<'_>,
18929 ) -> std::task::Poll<Option<Self::Item>> {
18930 let this = &mut *self;
18931 if this.inner.check_shutdown(cx) {
18932 this.is_terminated = true;
18933 return std::task::Poll::Ready(None);
18934 }
18935 if this.is_terminated {
18936 panic!("polled SymlinkRequestStream after completion");
18937 }
18938 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
18939 |bytes, handles| {
18940 match this.inner.channel().read_etc(cx, bytes, handles) {
18941 std::task::Poll::Ready(Ok(())) => {}
18942 std::task::Poll::Pending => return std::task::Poll::Pending,
18943 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
18944 this.is_terminated = true;
18945 return std::task::Poll::Ready(None);
18946 }
18947 std::task::Poll::Ready(Err(e)) => {
18948 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
18949 e.into(),
18950 ))));
18951 }
18952 }
18953
18954 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
18956
18957 std::task::Poll::Ready(Some(match header.ordinal {
18958 0x54f3949246a03e74 => {
18959 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18960 let mut req = fidl::new_empty!(
18961 LinkableLinkIntoRequest,
18962 fidl::encoding::DefaultFuchsiaResourceDialect
18963 );
18964 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
18965 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18966 Ok(SymlinkRequest::LinkInto {
18967 dst_parent_token: req.dst_parent_token,
18968 dst: req.dst,
18969
18970 responder: SymlinkLinkIntoResponder {
18971 control_handle: std::mem::ManuallyDrop::new(control_handle),
18972 tx_id: header.tx_id,
18973 },
18974 })
18975 }
18976 0x20d8a7aba2168a79 => {
18977 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18978 let mut req = fidl::new_empty!(
18979 fidl_fuchsia_unknown::CloneableCloneRequest,
18980 fidl::encoding::DefaultFuchsiaResourceDialect
18981 );
18982 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18983 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18984 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
18985 }
18986 0x5ac5d459ad7f657e => {
18987 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18988 let mut req = fidl::new_empty!(
18989 fidl::encoding::EmptyPayload,
18990 fidl::encoding::DefaultFuchsiaResourceDialect
18991 );
18992 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18993 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18994 Ok(SymlinkRequest::Close {
18995 responder: SymlinkCloseResponder {
18996 control_handle: std::mem::ManuallyDrop::new(control_handle),
18997 tx_id: header.tx_id,
18998 },
18999 })
19000 }
19001 0x2658edee9decfc06 => {
19002 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19003 let mut req = fidl::new_empty!(
19004 fidl::encoding::EmptyPayload,
19005 fidl::encoding::DefaultFuchsiaResourceDialect
19006 );
19007 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19008 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19009 Ok(SymlinkRequest::Query {
19010 responder: SymlinkQueryResponder {
19011 control_handle: std::mem::ManuallyDrop::new(control_handle),
19012 tx_id: header.tx_id,
19013 },
19014 })
19015 }
19016 0x78985e216314dafd => {
19017 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19018 let mut req = fidl::new_empty!(
19019 fidl::encoding::EmptyPayload,
19020 fidl::encoding::DefaultFuchsiaResourceDialect
19021 );
19022 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19023 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19024 Ok(SymlinkRequest::DeprecatedGetAttr {
19025 responder: SymlinkDeprecatedGetAttrResponder {
19026 control_handle: std::mem::ManuallyDrop::new(control_handle),
19027 tx_id: header.tx_id,
19028 },
19029 })
19030 }
19031 0x4186c0f40d938f46 => {
19032 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19033 let mut req = fidl::new_empty!(
19034 NodeDeprecatedSetAttrRequest,
19035 fidl::encoding::DefaultFuchsiaResourceDialect
19036 );
19037 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
19038 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19039 Ok(SymlinkRequest::DeprecatedSetAttr {
19040 flags: req.flags,
19041 attributes: req.attributes,
19042
19043 responder: SymlinkDeprecatedSetAttrResponder {
19044 control_handle: std::mem::ManuallyDrop::new(control_handle),
19045 tx_id: header.tx_id,
19046 },
19047 })
19048 }
19049 0x5b88fffb8eda3aa1 => {
19050 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19051 let mut req = fidl::new_empty!(
19052 fidl::encoding::EmptyPayload,
19053 fidl::encoding::DefaultFuchsiaResourceDialect
19054 );
19055 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19056 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19057 Ok(SymlinkRequest::DeprecatedGetFlags {
19058 responder: SymlinkDeprecatedGetFlagsResponder {
19059 control_handle: std::mem::ManuallyDrop::new(control_handle),
19060 tx_id: header.tx_id,
19061 },
19062 })
19063 }
19064 0x5295b76c71fde733 => {
19065 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19066 let mut req = fidl::new_empty!(
19067 NodeDeprecatedSetFlagsRequest,
19068 fidl::encoding::DefaultFuchsiaResourceDialect
19069 );
19070 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
19071 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19072 Ok(SymlinkRequest::DeprecatedSetFlags {
19073 flags: req.flags,
19074
19075 responder: SymlinkDeprecatedSetFlagsResponder {
19076 control_handle: std::mem::ManuallyDrop::new(control_handle),
19077 tx_id: header.tx_id,
19078 },
19079 })
19080 }
19081 0x176eb318f64ec23 => {
19082 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19083 let mut req = fidl::new_empty!(
19084 fidl::encoding::EmptyPayload,
19085 fidl::encoding::DefaultFuchsiaResourceDialect
19086 );
19087 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19088 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19089 Ok(SymlinkRequest::GetFlags {
19090 responder: SymlinkGetFlagsResponder {
19091 control_handle: std::mem::ManuallyDrop::new(control_handle),
19092 tx_id: header.tx_id,
19093 },
19094 })
19095 }
19096 0x55a8028685791ea8 => {
19097 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19098 let mut req = fidl::new_empty!(
19099 NodeSetFlagsRequest,
19100 fidl::encoding::DefaultFuchsiaResourceDialect
19101 );
19102 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
19103 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19104 Ok(SymlinkRequest::SetFlags {
19105 flags: req.flags,
19106
19107 responder: SymlinkSetFlagsResponder {
19108 control_handle: std::mem::ManuallyDrop::new(control_handle),
19109 tx_id: header.tx_id,
19110 },
19111 })
19112 }
19113 0x6f344a1c6b0a0610 => {
19114 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19115 let mut req = fidl::new_empty!(
19116 fidl::encoding::EmptyPayload,
19117 fidl::encoding::DefaultFuchsiaResourceDialect
19118 );
19119 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19120 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19121 Ok(SymlinkRequest::QueryFilesystem {
19122 responder: SymlinkQueryFilesystemResponder {
19123 control_handle: std::mem::ManuallyDrop::new(control_handle),
19124 tx_id: header.tx_id,
19125 },
19126 })
19127 }
19128 0x5054f0ade7076cec => {
19129 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19130 let mut req = fidl::new_empty!(
19131 fidl::encoding::EmptyPayload,
19132 fidl::encoding::DefaultFuchsiaResourceDialect
19133 );
19134 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19135 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19136 Ok(SymlinkRequest::GetToken {
19137 responder: SymlinkGetTokenResponder {
19138 control_handle: std::mem::ManuallyDrop::new(control_handle),
19139 tx_id: header.tx_id,
19140 },
19141 })
19142 }
19143 0x3d4396a638ea053b => {
19144 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19145 let mut req = fidl::new_empty!(
19146 NodeGetAttributesRequest,
19147 fidl::encoding::DefaultFuchsiaResourceDialect
19148 );
19149 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
19150 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19151 Ok(SymlinkRequest::GetAttributes {
19152 query: req.query,
19153
19154 responder: SymlinkGetAttributesResponder {
19155 control_handle: std::mem::ManuallyDrop::new(control_handle),
19156 tx_id: header.tx_id,
19157 },
19158 })
19159 }
19160 0x3308c1da5a89bf08 => {
19161 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19162 let mut req = fidl::new_empty!(
19163 MutableNodeAttributes,
19164 fidl::encoding::DefaultFuchsiaResourceDialect
19165 );
19166 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
19167 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19168 Ok(SymlinkRequest::UpdateAttributes {
19169 payload: req,
19170 responder: SymlinkUpdateAttributesResponder {
19171 control_handle: std::mem::ManuallyDrop::new(control_handle),
19172 tx_id: header.tx_id,
19173 },
19174 })
19175 }
19176 0x2c5c27ca0ab5dc49 => {
19177 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19178 let mut req = fidl::new_empty!(
19179 fidl::encoding::EmptyPayload,
19180 fidl::encoding::DefaultFuchsiaResourceDialect
19181 );
19182 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19183 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19184 Ok(SymlinkRequest::Sync {
19185 responder: SymlinkSyncResponder {
19186 control_handle: std::mem::ManuallyDrop::new(control_handle),
19187 tx_id: header.tx_id,
19188 },
19189 })
19190 }
19191 0x4b61033de007fcd0 => {
19192 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
19193 let mut req = fidl::new_empty!(
19194 NodeListExtendedAttributesRequest,
19195 fidl::encoding::DefaultFuchsiaResourceDialect
19196 );
19197 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
19198 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19199 Ok(SymlinkRequest::ListExtendedAttributes {
19200 iterator: req.iterator,
19201
19202 control_handle,
19203 })
19204 }
19205 0x45ffa3ccfdeb76db => {
19206 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19207 let mut req = fidl::new_empty!(
19208 NodeGetExtendedAttributeRequest,
19209 fidl::encoding::DefaultFuchsiaResourceDialect
19210 );
19211 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
19212 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19213 Ok(SymlinkRequest::GetExtendedAttribute {
19214 name: req.name,
19215
19216 responder: SymlinkGetExtendedAttributeResponder {
19217 control_handle: std::mem::ManuallyDrop::new(control_handle),
19218 tx_id: header.tx_id,
19219 },
19220 })
19221 }
19222 0x4a951362f681f23c => {
19223 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19224 let mut req = fidl::new_empty!(
19225 NodeSetExtendedAttributeRequest,
19226 fidl::encoding::DefaultFuchsiaResourceDialect
19227 );
19228 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
19229 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19230 Ok(SymlinkRequest::SetExtendedAttribute {
19231 name: req.name,
19232 value: req.value,
19233 mode: req.mode,
19234
19235 responder: SymlinkSetExtendedAttributeResponder {
19236 control_handle: std::mem::ManuallyDrop::new(control_handle),
19237 tx_id: header.tx_id,
19238 },
19239 })
19240 }
19241 0x7a0b9f3a9bf9032d => {
19242 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19243 let mut req = fidl::new_empty!(
19244 NodeRemoveExtendedAttributeRequest,
19245 fidl::encoding::DefaultFuchsiaResourceDialect
19246 );
19247 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
19248 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19249 Ok(SymlinkRequest::RemoveExtendedAttribute {
19250 name: req.name,
19251
19252 responder: SymlinkRemoveExtendedAttributeResponder {
19253 control_handle: std::mem::ManuallyDrop::new(control_handle),
19254 tx_id: header.tx_id,
19255 },
19256 })
19257 }
19258 0x568ddcb9a9cbb6d9 => {
19259 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
19260 let mut req = fidl::new_empty!(
19261 OpenableOpenRequest,
19262 fidl::encoding::DefaultFuchsiaResourceDialect
19263 );
19264 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
19265 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19266 Ok(SymlinkRequest::Open {
19267 path: req.path,
19268 flags: req.flags,
19269 options: req.options,
19270 object: req.object,
19271
19272 control_handle,
19273 })
19274 }
19275 0x742c2ea5e89831f3 => {
19276 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
19277 let mut req = fidl::new_empty!(
19278 fidl::encoding::EmptyPayload,
19279 fidl::encoding::DefaultFuchsiaResourceDialect
19280 );
19281 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
19282 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
19283 Ok(SymlinkRequest::Describe {
19284 responder: SymlinkDescribeResponder {
19285 control_handle: std::mem::ManuallyDrop::new(control_handle),
19286 tx_id: header.tx_id,
19287 },
19288 })
19289 }
19290 _ if header.tx_id == 0
19291 && header
19292 .dynamic_flags()
19293 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
19294 {
19295 Ok(SymlinkRequest::_UnknownMethod {
19296 ordinal: header.ordinal,
19297 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
19298 method_type: fidl::MethodType::OneWay,
19299 })
19300 }
19301 _ if header
19302 .dynamic_flags()
19303 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
19304 {
19305 this.inner.send_framework_err(
19306 fidl::encoding::FrameworkErr::UnknownMethod,
19307 header.tx_id,
19308 header.ordinal,
19309 header.dynamic_flags(),
19310 (bytes, handles),
19311 )?;
19312 Ok(SymlinkRequest::_UnknownMethod {
19313 ordinal: header.ordinal,
19314 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
19315 method_type: fidl::MethodType::TwoWay,
19316 })
19317 }
19318 _ => Err(fidl::Error::UnknownOrdinal {
19319 ordinal: header.ordinal,
19320 protocol_name:
19321 <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
19322 }),
19323 }))
19324 },
19325 )
19326 }
19327}
19328
19329#[derive(Debug)]
19331pub enum SymlinkRequest {
19332 LinkInto {
19355 dst_parent_token: fidl::Event,
19356 dst: String,
19357 responder: SymlinkLinkIntoResponder,
19358 },
19359 Clone {
19360 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
19361 control_handle: SymlinkControlHandle,
19362 },
19363 Close {
19374 responder: SymlinkCloseResponder,
19375 },
19376 Query {
19377 responder: SymlinkQueryResponder,
19378 },
19379 DeprecatedGetAttr {
19383 responder: SymlinkDeprecatedGetAttrResponder,
19384 },
19385 DeprecatedSetAttr {
19387 flags: NodeAttributeFlags,
19388 attributes: NodeAttributes,
19389 responder: SymlinkDeprecatedSetAttrResponder,
19390 },
19391 DeprecatedGetFlags {
19393 responder: SymlinkDeprecatedGetFlagsResponder,
19394 },
19395 DeprecatedSetFlags {
19397 flags: OpenFlags,
19398 responder: SymlinkDeprecatedSetFlagsResponder,
19399 },
19400 GetFlags {
19409 responder: SymlinkGetFlagsResponder,
19410 },
19411 SetFlags {
19421 flags: Flags,
19422 responder: SymlinkSetFlagsResponder,
19423 },
19424 QueryFilesystem {
19428 responder: SymlinkQueryFilesystemResponder,
19429 },
19430 GetToken {
19437 responder: SymlinkGetTokenResponder,
19438 },
19439 GetAttributes {
19453 query: NodeAttributesQuery,
19454 responder: SymlinkGetAttributesResponder,
19455 },
19456 UpdateAttributes {
19465 payload: MutableNodeAttributes,
19466 responder: SymlinkUpdateAttributesResponder,
19467 },
19468 Sync {
19478 responder: SymlinkSyncResponder,
19479 },
19480 ListExtendedAttributes {
19489 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
19490 control_handle: SymlinkControlHandle,
19491 },
19492 GetExtendedAttribute {
19499 name: Vec<u8>,
19500 responder: SymlinkGetExtendedAttributeResponder,
19501 },
19502 SetExtendedAttribute {
19510 name: Vec<u8>,
19511 value: ExtendedAttributeValue,
19512 mode: SetExtendedAttributeMode,
19513 responder: SymlinkSetExtendedAttributeResponder,
19514 },
19515 RemoveExtendedAttribute {
19521 name: Vec<u8>,
19522 responder: SymlinkRemoveExtendedAttributeResponder,
19523 },
19524 Open {
19531 path: String,
19532 flags: Flags,
19533 options: Options,
19534 object: fidl::Channel,
19535 control_handle: SymlinkControlHandle,
19536 },
19537 Describe {
19538 responder: SymlinkDescribeResponder,
19539 },
19540 #[non_exhaustive]
19542 _UnknownMethod {
19543 ordinal: u64,
19545 control_handle: SymlinkControlHandle,
19546 method_type: fidl::MethodType,
19547 },
19548}
19549
19550impl SymlinkRequest {
19551 #[allow(irrefutable_let_patterns)]
19552 pub fn into_link_into(self) -> Option<(fidl::Event, String, SymlinkLinkIntoResponder)> {
19553 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
19554 Some((dst_parent_token, dst, responder))
19555 } else {
19556 None
19557 }
19558 }
19559
19560 #[allow(irrefutable_let_patterns)]
19561 pub fn into_clone(
19562 self,
19563 ) -> Option<(
19564 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
19565 SymlinkControlHandle,
19566 )> {
19567 if let SymlinkRequest::Clone { request, control_handle } = self {
19568 Some((request, control_handle))
19569 } else {
19570 None
19571 }
19572 }
19573
19574 #[allow(irrefutable_let_patterns)]
19575 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
19576 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
19577 }
19578
19579 #[allow(irrefutable_let_patterns)]
19580 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
19581 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
19582 }
19583
19584 #[allow(irrefutable_let_patterns)]
19585 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
19586 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
19587 Some((responder))
19588 } else {
19589 None
19590 }
19591 }
19592
19593 #[allow(irrefutable_let_patterns)]
19594 pub fn into_deprecated_set_attr(
19595 self,
19596 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
19597 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
19598 Some((flags, attributes, responder))
19599 } else {
19600 None
19601 }
19602 }
19603
19604 #[allow(irrefutable_let_patterns)]
19605 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
19606 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
19607 Some((responder))
19608 } else {
19609 None
19610 }
19611 }
19612
19613 #[allow(irrefutable_let_patterns)]
19614 pub fn into_deprecated_set_flags(
19615 self,
19616 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
19617 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
19618 Some((flags, responder))
19619 } else {
19620 None
19621 }
19622 }
19623
19624 #[allow(irrefutable_let_patterns)]
19625 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
19626 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
19627 }
19628
19629 #[allow(irrefutable_let_patterns)]
19630 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
19631 if let SymlinkRequest::SetFlags { flags, responder } = self {
19632 Some((flags, responder))
19633 } else {
19634 None
19635 }
19636 }
19637
19638 #[allow(irrefutable_let_patterns)]
19639 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
19640 if let SymlinkRequest::QueryFilesystem { responder } = self {
19641 Some((responder))
19642 } else {
19643 None
19644 }
19645 }
19646
19647 #[allow(irrefutable_let_patterns)]
19648 pub fn into_get_token(self) -> Option<(SymlinkGetTokenResponder)> {
19649 if let SymlinkRequest::GetToken { responder } = self { Some((responder)) } else { None }
19650 }
19651
19652 #[allow(irrefutable_let_patterns)]
19653 pub fn into_get_attributes(
19654 self,
19655 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
19656 if let SymlinkRequest::GetAttributes { query, responder } = self {
19657 Some((query, responder))
19658 } else {
19659 None
19660 }
19661 }
19662
19663 #[allow(irrefutable_let_patterns)]
19664 pub fn into_update_attributes(
19665 self,
19666 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
19667 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
19668 Some((payload, responder))
19669 } else {
19670 None
19671 }
19672 }
19673
19674 #[allow(irrefutable_let_patterns)]
19675 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
19676 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
19677 }
19678
19679 #[allow(irrefutable_let_patterns)]
19680 pub fn into_list_extended_attributes(
19681 self,
19682 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, SymlinkControlHandle)>
19683 {
19684 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
19685 Some((iterator, control_handle))
19686 } else {
19687 None
19688 }
19689 }
19690
19691 #[allow(irrefutable_let_patterns)]
19692 pub fn into_get_extended_attribute(
19693 self,
19694 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
19695 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
19696 Some((name, responder))
19697 } else {
19698 None
19699 }
19700 }
19701
19702 #[allow(irrefutable_let_patterns)]
19703 pub fn into_set_extended_attribute(
19704 self,
19705 ) -> Option<(
19706 Vec<u8>,
19707 ExtendedAttributeValue,
19708 SetExtendedAttributeMode,
19709 SymlinkSetExtendedAttributeResponder,
19710 )> {
19711 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
19712 Some((name, value, mode, responder))
19713 } else {
19714 None
19715 }
19716 }
19717
19718 #[allow(irrefutable_let_patterns)]
19719 pub fn into_remove_extended_attribute(
19720 self,
19721 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
19722 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
19723 Some((name, responder))
19724 } else {
19725 None
19726 }
19727 }
19728
19729 #[allow(irrefutable_let_patterns)]
19730 pub fn into_open(
19731 self,
19732 ) -> Option<(String, Flags, Options, fidl::Channel, SymlinkControlHandle)> {
19733 if let SymlinkRequest::Open { path, flags, options, object, control_handle } = self {
19734 Some((path, flags, options, object, control_handle))
19735 } else {
19736 None
19737 }
19738 }
19739
19740 #[allow(irrefutable_let_patterns)]
19741 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
19742 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
19743 }
19744
19745 pub fn method_name(&self) -> &'static str {
19747 match *self {
19748 SymlinkRequest::LinkInto { .. } => "link_into",
19749 SymlinkRequest::Clone { .. } => "clone",
19750 SymlinkRequest::Close { .. } => "close",
19751 SymlinkRequest::Query { .. } => "query",
19752 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
19753 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
19754 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
19755 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
19756 SymlinkRequest::GetFlags { .. } => "get_flags",
19757 SymlinkRequest::SetFlags { .. } => "set_flags",
19758 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
19759 SymlinkRequest::GetToken { .. } => "get_token",
19760 SymlinkRequest::GetAttributes { .. } => "get_attributes",
19761 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
19762 SymlinkRequest::Sync { .. } => "sync",
19763 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
19764 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
19765 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
19766 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
19767 SymlinkRequest::Open { .. } => "open",
19768 SymlinkRequest::Describe { .. } => "describe",
19769 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
19770 "unknown one-way method"
19771 }
19772 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
19773 "unknown two-way method"
19774 }
19775 }
19776 }
19777}
19778
19779#[derive(Debug, Clone)]
19780pub struct SymlinkControlHandle {
19781 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
19782}
19783
19784impl SymlinkControlHandle {
19785 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
19786 self.inner.shutdown_with_epitaph(status.into())
19787 }
19788}
19789
19790impl fidl::endpoints::ControlHandle for SymlinkControlHandle {
19791 fn shutdown(&self) {
19792 self.inner.shutdown()
19793 }
19794
19795 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
19796 self.inner.shutdown_with_epitaph(status)
19797 }
19798
19799 fn is_closed(&self) -> bool {
19800 self.inner.channel().is_closed()
19801 }
19802 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
19803 self.inner.channel().on_closed()
19804 }
19805
19806 #[cfg(target_os = "fuchsia")]
19807 fn signal_peer(
19808 &self,
19809 clear_mask: zx::Signals,
19810 set_mask: zx::Signals,
19811 ) -> Result<(), zx_status::Status> {
19812 use fidl::Peered;
19813 self.inner.channel().signal_peer(clear_mask, set_mask)
19814 }
19815}
19816
19817impl SymlinkControlHandle {
19818 pub fn send_on_open_(
19819 &self,
19820 mut s: i32,
19821 mut info: Option<NodeInfoDeprecated>,
19822 ) -> Result<(), fidl::Error> {
19823 self.inner.send::<NodeOnOpenRequest>(
19824 (s, info.as_mut()),
19825 0,
19826 0x7fc7bbb1dbfd1972,
19827 fidl::encoding::DynamicFlags::FLEXIBLE,
19828 )
19829 }
19830
19831 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
19832 self.inner.send::<Representation>(
19833 &mut payload,
19834 0,
19835 0x5cb40567d80a510c,
19836 fidl::encoding::DynamicFlags::empty(),
19837 )
19838 }
19839}
19840
19841#[must_use = "FIDL methods require a response to be sent"]
19842#[derive(Debug)]
19843pub struct SymlinkLinkIntoResponder {
19844 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19845 tx_id: u32,
19846}
19847
19848impl std::ops::Drop for SymlinkLinkIntoResponder {
19852 fn drop(&mut self) {
19853 self.control_handle.shutdown();
19854 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19856 }
19857}
19858
19859impl fidl::endpoints::Responder for SymlinkLinkIntoResponder {
19860 type ControlHandle = SymlinkControlHandle;
19861
19862 fn control_handle(&self) -> &SymlinkControlHandle {
19863 &self.control_handle
19864 }
19865
19866 fn drop_without_shutdown(mut self) {
19867 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19869 std::mem::forget(self);
19871 }
19872}
19873
19874impl SymlinkLinkIntoResponder {
19875 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19879 let _result = self.send_raw(result);
19880 if _result.is_err() {
19881 self.control_handle.shutdown();
19882 }
19883 self.drop_without_shutdown();
19884 _result
19885 }
19886
19887 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19889 let _result = self.send_raw(result);
19890 self.drop_without_shutdown();
19891 _result
19892 }
19893
19894 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19895 self.control_handle
19896 .inner
19897 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19898 result,
19899 self.tx_id,
19900 0x54f3949246a03e74,
19901 fidl::encoding::DynamicFlags::empty(),
19902 )
19903 }
19904}
19905
19906#[must_use = "FIDL methods require a response to be sent"]
19907#[derive(Debug)]
19908pub struct SymlinkCloseResponder {
19909 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19910 tx_id: u32,
19911}
19912
19913impl std::ops::Drop for SymlinkCloseResponder {
19917 fn drop(&mut self) {
19918 self.control_handle.shutdown();
19919 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19921 }
19922}
19923
19924impl fidl::endpoints::Responder for SymlinkCloseResponder {
19925 type ControlHandle = SymlinkControlHandle;
19926
19927 fn control_handle(&self) -> &SymlinkControlHandle {
19928 &self.control_handle
19929 }
19930
19931 fn drop_without_shutdown(mut self) {
19932 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19934 std::mem::forget(self);
19936 }
19937}
19938
19939impl SymlinkCloseResponder {
19940 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19944 let _result = self.send_raw(result);
19945 if _result.is_err() {
19946 self.control_handle.shutdown();
19947 }
19948 self.drop_without_shutdown();
19949 _result
19950 }
19951
19952 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19954 let _result = self.send_raw(result);
19955 self.drop_without_shutdown();
19956 _result
19957 }
19958
19959 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19960 self.control_handle
19961 .inner
19962 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19963 result,
19964 self.tx_id,
19965 0x5ac5d459ad7f657e,
19966 fidl::encoding::DynamicFlags::empty(),
19967 )
19968 }
19969}
19970
19971#[must_use = "FIDL methods require a response to be sent"]
19972#[derive(Debug)]
19973pub struct SymlinkQueryResponder {
19974 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19975 tx_id: u32,
19976}
19977
19978impl std::ops::Drop for SymlinkQueryResponder {
19982 fn drop(&mut self) {
19983 self.control_handle.shutdown();
19984 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19986 }
19987}
19988
19989impl fidl::endpoints::Responder for SymlinkQueryResponder {
19990 type ControlHandle = SymlinkControlHandle;
19991
19992 fn control_handle(&self) -> &SymlinkControlHandle {
19993 &self.control_handle
19994 }
19995
19996 fn drop_without_shutdown(mut self) {
19997 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19999 std::mem::forget(self);
20001 }
20002}
20003
20004impl SymlinkQueryResponder {
20005 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
20009 let _result = self.send_raw(protocol);
20010 if _result.is_err() {
20011 self.control_handle.shutdown();
20012 }
20013 self.drop_without_shutdown();
20014 _result
20015 }
20016
20017 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
20019 let _result = self.send_raw(protocol);
20020 self.drop_without_shutdown();
20021 _result
20022 }
20023
20024 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
20025 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
20026 (protocol,),
20027 self.tx_id,
20028 0x2658edee9decfc06,
20029 fidl::encoding::DynamicFlags::empty(),
20030 )
20031 }
20032}
20033
20034#[must_use = "FIDL methods require a response to be sent"]
20035#[derive(Debug)]
20036pub struct SymlinkDeprecatedGetAttrResponder {
20037 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20038 tx_id: u32,
20039}
20040
20041impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
20045 fn drop(&mut self) {
20046 self.control_handle.shutdown();
20047 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20049 }
20050}
20051
20052impl fidl::endpoints::Responder for SymlinkDeprecatedGetAttrResponder {
20053 type ControlHandle = SymlinkControlHandle;
20054
20055 fn control_handle(&self) -> &SymlinkControlHandle {
20056 &self.control_handle
20057 }
20058
20059 fn drop_without_shutdown(mut self) {
20060 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20062 std::mem::forget(self);
20064 }
20065}
20066
20067impl SymlinkDeprecatedGetAttrResponder {
20068 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
20072 let _result = self.send_raw(s, attributes);
20073 if _result.is_err() {
20074 self.control_handle.shutdown();
20075 }
20076 self.drop_without_shutdown();
20077 _result
20078 }
20079
20080 pub fn send_no_shutdown_on_err(
20082 self,
20083 mut s: i32,
20084 mut attributes: &NodeAttributes,
20085 ) -> Result<(), fidl::Error> {
20086 let _result = self.send_raw(s, attributes);
20087 self.drop_without_shutdown();
20088 _result
20089 }
20090
20091 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
20092 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
20093 (s, attributes),
20094 self.tx_id,
20095 0x78985e216314dafd,
20096 fidl::encoding::DynamicFlags::empty(),
20097 )
20098 }
20099}
20100
20101#[must_use = "FIDL methods require a response to be sent"]
20102#[derive(Debug)]
20103pub struct SymlinkDeprecatedSetAttrResponder {
20104 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20105 tx_id: u32,
20106}
20107
20108impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
20112 fn drop(&mut self) {
20113 self.control_handle.shutdown();
20114 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20116 }
20117}
20118
20119impl fidl::endpoints::Responder for SymlinkDeprecatedSetAttrResponder {
20120 type ControlHandle = SymlinkControlHandle;
20121
20122 fn control_handle(&self) -> &SymlinkControlHandle {
20123 &self.control_handle
20124 }
20125
20126 fn drop_without_shutdown(mut self) {
20127 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20129 std::mem::forget(self);
20131 }
20132}
20133
20134impl SymlinkDeprecatedSetAttrResponder {
20135 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
20139 let _result = self.send_raw(s);
20140 if _result.is_err() {
20141 self.control_handle.shutdown();
20142 }
20143 self.drop_without_shutdown();
20144 _result
20145 }
20146
20147 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
20149 let _result = self.send_raw(s);
20150 self.drop_without_shutdown();
20151 _result
20152 }
20153
20154 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
20155 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
20156 (s,),
20157 self.tx_id,
20158 0x4186c0f40d938f46,
20159 fidl::encoding::DynamicFlags::empty(),
20160 )
20161 }
20162}
20163
20164#[must_use = "FIDL methods require a response to be sent"]
20165#[derive(Debug)]
20166pub struct SymlinkDeprecatedGetFlagsResponder {
20167 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20168 tx_id: u32,
20169}
20170
20171impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
20175 fn drop(&mut self) {
20176 self.control_handle.shutdown();
20177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20179 }
20180}
20181
20182impl fidl::endpoints::Responder for SymlinkDeprecatedGetFlagsResponder {
20183 type ControlHandle = SymlinkControlHandle;
20184
20185 fn control_handle(&self) -> &SymlinkControlHandle {
20186 &self.control_handle
20187 }
20188
20189 fn drop_without_shutdown(mut self) {
20190 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20192 std::mem::forget(self);
20194 }
20195}
20196
20197impl SymlinkDeprecatedGetFlagsResponder {
20198 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
20202 let _result = self.send_raw(s, flags);
20203 if _result.is_err() {
20204 self.control_handle.shutdown();
20205 }
20206 self.drop_without_shutdown();
20207 _result
20208 }
20209
20210 pub fn send_no_shutdown_on_err(
20212 self,
20213 mut s: i32,
20214 mut flags: OpenFlags,
20215 ) -> Result<(), fidl::Error> {
20216 let _result = self.send_raw(s, flags);
20217 self.drop_without_shutdown();
20218 _result
20219 }
20220
20221 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
20222 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
20223 (s, flags),
20224 self.tx_id,
20225 0x5b88fffb8eda3aa1,
20226 fidl::encoding::DynamicFlags::empty(),
20227 )
20228 }
20229}
20230
20231#[must_use = "FIDL methods require a response to be sent"]
20232#[derive(Debug)]
20233pub struct SymlinkDeprecatedSetFlagsResponder {
20234 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20235 tx_id: u32,
20236}
20237
20238impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
20242 fn drop(&mut self) {
20243 self.control_handle.shutdown();
20244 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20246 }
20247}
20248
20249impl fidl::endpoints::Responder for SymlinkDeprecatedSetFlagsResponder {
20250 type ControlHandle = SymlinkControlHandle;
20251
20252 fn control_handle(&self) -> &SymlinkControlHandle {
20253 &self.control_handle
20254 }
20255
20256 fn drop_without_shutdown(mut self) {
20257 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20259 std::mem::forget(self);
20261 }
20262}
20263
20264impl SymlinkDeprecatedSetFlagsResponder {
20265 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
20269 let _result = self.send_raw(s);
20270 if _result.is_err() {
20271 self.control_handle.shutdown();
20272 }
20273 self.drop_without_shutdown();
20274 _result
20275 }
20276
20277 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
20279 let _result = self.send_raw(s);
20280 self.drop_without_shutdown();
20281 _result
20282 }
20283
20284 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
20285 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
20286 (s,),
20287 self.tx_id,
20288 0x5295b76c71fde733,
20289 fidl::encoding::DynamicFlags::empty(),
20290 )
20291 }
20292}
20293
20294#[must_use = "FIDL methods require a response to be sent"]
20295#[derive(Debug)]
20296pub struct SymlinkGetFlagsResponder {
20297 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20298 tx_id: u32,
20299}
20300
20301impl std::ops::Drop for SymlinkGetFlagsResponder {
20305 fn drop(&mut self) {
20306 self.control_handle.shutdown();
20307 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20309 }
20310}
20311
20312impl fidl::endpoints::Responder for SymlinkGetFlagsResponder {
20313 type ControlHandle = SymlinkControlHandle;
20314
20315 fn control_handle(&self) -> &SymlinkControlHandle {
20316 &self.control_handle
20317 }
20318
20319 fn drop_without_shutdown(mut self) {
20320 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20322 std::mem::forget(self);
20324 }
20325}
20326
20327impl SymlinkGetFlagsResponder {
20328 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
20332 let _result = self.send_raw(result);
20333 if _result.is_err() {
20334 self.control_handle.shutdown();
20335 }
20336 self.drop_without_shutdown();
20337 _result
20338 }
20339
20340 pub fn send_no_shutdown_on_err(
20342 self,
20343 mut result: Result<Flags, i32>,
20344 ) -> Result<(), fidl::Error> {
20345 let _result = self.send_raw(result);
20346 self.drop_without_shutdown();
20347 _result
20348 }
20349
20350 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
20351 self.control_handle
20352 .inner
20353 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
20354 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
20355 self.tx_id,
20356 0x176eb318f64ec23,
20357 fidl::encoding::DynamicFlags::FLEXIBLE,
20358 )
20359 }
20360}
20361
20362#[must_use = "FIDL methods require a response to be sent"]
20363#[derive(Debug)]
20364pub struct SymlinkSetFlagsResponder {
20365 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20366 tx_id: u32,
20367}
20368
20369impl std::ops::Drop for SymlinkSetFlagsResponder {
20373 fn drop(&mut self) {
20374 self.control_handle.shutdown();
20375 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20377 }
20378}
20379
20380impl fidl::endpoints::Responder for SymlinkSetFlagsResponder {
20381 type ControlHandle = SymlinkControlHandle;
20382
20383 fn control_handle(&self) -> &SymlinkControlHandle {
20384 &self.control_handle
20385 }
20386
20387 fn drop_without_shutdown(mut self) {
20388 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20390 std::mem::forget(self);
20392 }
20393}
20394
20395impl SymlinkSetFlagsResponder {
20396 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20400 let _result = self.send_raw(result);
20401 if _result.is_err() {
20402 self.control_handle.shutdown();
20403 }
20404 self.drop_without_shutdown();
20405 _result
20406 }
20407
20408 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20410 let _result = self.send_raw(result);
20411 self.drop_without_shutdown();
20412 _result
20413 }
20414
20415 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20416 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
20417 fidl::encoding::EmptyStruct,
20418 i32,
20419 >>(
20420 fidl::encoding::FlexibleResult::new(result),
20421 self.tx_id,
20422 0x55a8028685791ea8,
20423 fidl::encoding::DynamicFlags::FLEXIBLE,
20424 )
20425 }
20426}
20427
20428#[must_use = "FIDL methods require a response to be sent"]
20429#[derive(Debug)]
20430pub struct SymlinkQueryFilesystemResponder {
20431 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20432 tx_id: u32,
20433}
20434
20435impl std::ops::Drop for SymlinkQueryFilesystemResponder {
20439 fn drop(&mut self) {
20440 self.control_handle.shutdown();
20441 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20443 }
20444}
20445
20446impl fidl::endpoints::Responder for SymlinkQueryFilesystemResponder {
20447 type ControlHandle = SymlinkControlHandle;
20448
20449 fn control_handle(&self) -> &SymlinkControlHandle {
20450 &self.control_handle
20451 }
20452
20453 fn drop_without_shutdown(mut self) {
20454 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20456 std::mem::forget(self);
20458 }
20459}
20460
20461impl SymlinkQueryFilesystemResponder {
20462 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
20466 let _result = self.send_raw(s, info);
20467 if _result.is_err() {
20468 self.control_handle.shutdown();
20469 }
20470 self.drop_without_shutdown();
20471 _result
20472 }
20473
20474 pub fn send_no_shutdown_on_err(
20476 self,
20477 mut s: i32,
20478 mut info: Option<&FilesystemInfo>,
20479 ) -> Result<(), fidl::Error> {
20480 let _result = self.send_raw(s, info);
20481 self.drop_without_shutdown();
20482 _result
20483 }
20484
20485 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
20486 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
20487 (s, info),
20488 self.tx_id,
20489 0x6f344a1c6b0a0610,
20490 fidl::encoding::DynamicFlags::empty(),
20491 )
20492 }
20493}
20494
20495#[must_use = "FIDL methods require a response to be sent"]
20496#[derive(Debug)]
20497pub struct SymlinkGetTokenResponder {
20498 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20499 tx_id: u32,
20500}
20501
20502impl std::ops::Drop for SymlinkGetTokenResponder {
20506 fn drop(&mut self) {
20507 self.control_handle.shutdown();
20508 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20510 }
20511}
20512
20513impl fidl::endpoints::Responder for SymlinkGetTokenResponder {
20514 type ControlHandle = SymlinkControlHandle;
20515
20516 fn control_handle(&self) -> &SymlinkControlHandle {
20517 &self.control_handle
20518 }
20519
20520 fn drop_without_shutdown(mut self) {
20521 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20523 std::mem::forget(self);
20525 }
20526}
20527
20528impl SymlinkGetTokenResponder {
20529 pub fn send(self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
20533 let _result = self.send_raw(result);
20534 if _result.is_err() {
20535 self.control_handle.shutdown();
20536 }
20537 self.drop_without_shutdown();
20538 _result
20539 }
20540
20541 pub fn send_no_shutdown_on_err(
20543 self,
20544 mut result: Result<fidl::Event, i32>,
20545 ) -> Result<(), fidl::Error> {
20546 let _result = self.send_raw(result);
20547 self.drop_without_shutdown();
20548 _result
20549 }
20550
20551 fn send_raw(&self, mut result: Result<fidl::Event, i32>) -> Result<(), fidl::Error> {
20552 self.control_handle
20553 .inner
20554 .send::<fidl::encoding::FlexibleResultType<NodeGetTokenResponse, i32>>(
20555 fidl::encoding::FlexibleResult::new(result.map(|token| (token,))),
20556 self.tx_id,
20557 0x5054f0ade7076cec,
20558 fidl::encoding::DynamicFlags::FLEXIBLE,
20559 )
20560 }
20561}
20562
20563#[must_use = "FIDL methods require a response to be sent"]
20564#[derive(Debug)]
20565pub struct SymlinkGetAttributesResponder {
20566 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20567 tx_id: u32,
20568}
20569
20570impl std::ops::Drop for SymlinkGetAttributesResponder {
20574 fn drop(&mut self) {
20575 self.control_handle.shutdown();
20576 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20578 }
20579}
20580
20581impl fidl::endpoints::Responder for SymlinkGetAttributesResponder {
20582 type ControlHandle = SymlinkControlHandle;
20583
20584 fn control_handle(&self) -> &SymlinkControlHandle {
20585 &self.control_handle
20586 }
20587
20588 fn drop_without_shutdown(mut self) {
20589 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20591 std::mem::forget(self);
20593 }
20594}
20595
20596impl SymlinkGetAttributesResponder {
20597 pub fn send(
20601 self,
20602 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
20603 ) -> Result<(), fidl::Error> {
20604 let _result = self.send_raw(result);
20605 if _result.is_err() {
20606 self.control_handle.shutdown();
20607 }
20608 self.drop_without_shutdown();
20609 _result
20610 }
20611
20612 pub fn send_no_shutdown_on_err(
20614 self,
20615 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
20616 ) -> Result<(), fidl::Error> {
20617 let _result = self.send_raw(result);
20618 self.drop_without_shutdown();
20619 _result
20620 }
20621
20622 fn send_raw(
20623 &self,
20624 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
20625 ) -> Result<(), fidl::Error> {
20626 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
20627 result,
20628 self.tx_id,
20629 0x3d4396a638ea053b,
20630 fidl::encoding::DynamicFlags::empty(),
20631 )
20632 }
20633}
20634
20635#[must_use = "FIDL methods require a response to be sent"]
20636#[derive(Debug)]
20637pub struct SymlinkUpdateAttributesResponder {
20638 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20639 tx_id: u32,
20640}
20641
20642impl std::ops::Drop for SymlinkUpdateAttributesResponder {
20646 fn drop(&mut self) {
20647 self.control_handle.shutdown();
20648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20650 }
20651}
20652
20653impl fidl::endpoints::Responder for SymlinkUpdateAttributesResponder {
20654 type ControlHandle = SymlinkControlHandle;
20655
20656 fn control_handle(&self) -> &SymlinkControlHandle {
20657 &self.control_handle
20658 }
20659
20660 fn drop_without_shutdown(mut self) {
20661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20663 std::mem::forget(self);
20665 }
20666}
20667
20668impl SymlinkUpdateAttributesResponder {
20669 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20673 let _result = self.send_raw(result);
20674 if _result.is_err() {
20675 self.control_handle.shutdown();
20676 }
20677 self.drop_without_shutdown();
20678 _result
20679 }
20680
20681 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20683 let _result = self.send_raw(result);
20684 self.drop_without_shutdown();
20685 _result
20686 }
20687
20688 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20689 self.control_handle
20690 .inner
20691 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20692 result,
20693 self.tx_id,
20694 0x3308c1da5a89bf08,
20695 fidl::encoding::DynamicFlags::empty(),
20696 )
20697 }
20698}
20699
20700#[must_use = "FIDL methods require a response to be sent"]
20701#[derive(Debug)]
20702pub struct SymlinkSyncResponder {
20703 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20704 tx_id: u32,
20705}
20706
20707impl std::ops::Drop for SymlinkSyncResponder {
20711 fn drop(&mut self) {
20712 self.control_handle.shutdown();
20713 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20715 }
20716}
20717
20718impl fidl::endpoints::Responder for SymlinkSyncResponder {
20719 type ControlHandle = SymlinkControlHandle;
20720
20721 fn control_handle(&self) -> &SymlinkControlHandle {
20722 &self.control_handle
20723 }
20724
20725 fn drop_without_shutdown(mut self) {
20726 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20728 std::mem::forget(self);
20730 }
20731}
20732
20733impl SymlinkSyncResponder {
20734 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20738 let _result = self.send_raw(result);
20739 if _result.is_err() {
20740 self.control_handle.shutdown();
20741 }
20742 self.drop_without_shutdown();
20743 _result
20744 }
20745
20746 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20748 let _result = self.send_raw(result);
20749 self.drop_without_shutdown();
20750 _result
20751 }
20752
20753 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20754 self.control_handle
20755 .inner
20756 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20757 result,
20758 self.tx_id,
20759 0x2c5c27ca0ab5dc49,
20760 fidl::encoding::DynamicFlags::empty(),
20761 )
20762 }
20763}
20764
20765#[must_use = "FIDL methods require a response to be sent"]
20766#[derive(Debug)]
20767pub struct SymlinkGetExtendedAttributeResponder {
20768 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20769 tx_id: u32,
20770}
20771
20772impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
20776 fn drop(&mut self) {
20777 self.control_handle.shutdown();
20778 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20780 }
20781}
20782
20783impl fidl::endpoints::Responder for SymlinkGetExtendedAttributeResponder {
20784 type ControlHandle = SymlinkControlHandle;
20785
20786 fn control_handle(&self) -> &SymlinkControlHandle {
20787 &self.control_handle
20788 }
20789
20790 fn drop_without_shutdown(mut self) {
20791 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20793 std::mem::forget(self);
20795 }
20796}
20797
20798impl SymlinkGetExtendedAttributeResponder {
20799 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
20803 let _result = self.send_raw(result);
20804 if _result.is_err() {
20805 self.control_handle.shutdown();
20806 }
20807 self.drop_without_shutdown();
20808 _result
20809 }
20810
20811 pub fn send_no_shutdown_on_err(
20813 self,
20814 mut result: Result<ExtendedAttributeValue, i32>,
20815 ) -> Result<(), fidl::Error> {
20816 let _result = self.send_raw(result);
20817 self.drop_without_shutdown();
20818 _result
20819 }
20820
20821 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
20822 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
20823 result.as_mut().map_err(|e| *e),
20824 self.tx_id,
20825 0x45ffa3ccfdeb76db,
20826 fidl::encoding::DynamicFlags::empty(),
20827 )
20828 }
20829}
20830
20831#[must_use = "FIDL methods require a response to be sent"]
20832#[derive(Debug)]
20833pub struct SymlinkSetExtendedAttributeResponder {
20834 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20835 tx_id: u32,
20836}
20837
20838impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
20842 fn drop(&mut self) {
20843 self.control_handle.shutdown();
20844 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20846 }
20847}
20848
20849impl fidl::endpoints::Responder for SymlinkSetExtendedAttributeResponder {
20850 type ControlHandle = SymlinkControlHandle;
20851
20852 fn control_handle(&self) -> &SymlinkControlHandle {
20853 &self.control_handle
20854 }
20855
20856 fn drop_without_shutdown(mut self) {
20857 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20859 std::mem::forget(self);
20861 }
20862}
20863
20864impl SymlinkSetExtendedAttributeResponder {
20865 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20869 let _result = self.send_raw(result);
20870 if _result.is_err() {
20871 self.control_handle.shutdown();
20872 }
20873 self.drop_without_shutdown();
20874 _result
20875 }
20876
20877 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20879 let _result = self.send_raw(result);
20880 self.drop_without_shutdown();
20881 _result
20882 }
20883
20884 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20885 self.control_handle
20886 .inner
20887 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20888 result,
20889 self.tx_id,
20890 0x4a951362f681f23c,
20891 fidl::encoding::DynamicFlags::empty(),
20892 )
20893 }
20894}
20895
20896#[must_use = "FIDL methods require a response to be sent"]
20897#[derive(Debug)]
20898pub struct SymlinkRemoveExtendedAttributeResponder {
20899 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20900 tx_id: u32,
20901}
20902
20903impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
20907 fn drop(&mut self) {
20908 self.control_handle.shutdown();
20909 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20911 }
20912}
20913
20914impl fidl::endpoints::Responder for SymlinkRemoveExtendedAttributeResponder {
20915 type ControlHandle = SymlinkControlHandle;
20916
20917 fn control_handle(&self) -> &SymlinkControlHandle {
20918 &self.control_handle
20919 }
20920
20921 fn drop_without_shutdown(mut self) {
20922 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20924 std::mem::forget(self);
20926 }
20927}
20928
20929impl SymlinkRemoveExtendedAttributeResponder {
20930 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20934 let _result = self.send_raw(result);
20935 if _result.is_err() {
20936 self.control_handle.shutdown();
20937 }
20938 self.drop_without_shutdown();
20939 _result
20940 }
20941
20942 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20944 let _result = self.send_raw(result);
20945 self.drop_without_shutdown();
20946 _result
20947 }
20948
20949 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20950 self.control_handle
20951 .inner
20952 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20953 result,
20954 self.tx_id,
20955 0x7a0b9f3a9bf9032d,
20956 fidl::encoding::DynamicFlags::empty(),
20957 )
20958 }
20959}
20960
20961#[must_use = "FIDL methods require a response to be sent"]
20962#[derive(Debug)]
20963pub struct SymlinkDescribeResponder {
20964 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20965 tx_id: u32,
20966}
20967
20968impl std::ops::Drop for SymlinkDescribeResponder {
20972 fn drop(&mut self) {
20973 self.control_handle.shutdown();
20974 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20976 }
20977}
20978
20979impl fidl::endpoints::Responder for SymlinkDescribeResponder {
20980 type ControlHandle = SymlinkControlHandle;
20981
20982 fn control_handle(&self) -> &SymlinkControlHandle {
20983 &self.control_handle
20984 }
20985
20986 fn drop_without_shutdown(mut self) {
20987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20989 std::mem::forget(self);
20991 }
20992}
20993
20994impl SymlinkDescribeResponder {
20995 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
20999 let _result = self.send_raw(payload);
21000 if _result.is_err() {
21001 self.control_handle.shutdown();
21002 }
21003 self.drop_without_shutdown();
21004 _result
21005 }
21006
21007 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
21009 let _result = self.send_raw(payload);
21010 self.drop_without_shutdown();
21011 _result
21012 }
21013
21014 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
21015 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
21016 fidl::encoding::Flexible::new(payload),
21017 self.tx_id,
21018 0x742c2ea5e89831f3,
21019 fidl::encoding::DynamicFlags::FLEXIBLE,
21020 )
21021 }
21022}
21023
21024#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21025pub struct WritableMarker;
21026
21027impl fidl::endpoints::ProtocolMarker for WritableMarker {
21028 type Proxy = WritableProxy;
21029 type RequestStream = WritableRequestStream;
21030 #[cfg(target_os = "fuchsia")]
21031 type SynchronousProxy = WritableSynchronousProxy;
21032
21033 const DEBUG_NAME: &'static str = "(anonymous) Writable";
21034}
21035pub type WritableWriteResult = Result<u64, i32>;
21036
21037pub trait WritableProxyInterface: Send + Sync {
21038 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
21039 + Send;
21040 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
21041}
21042#[derive(Debug)]
21043#[cfg(target_os = "fuchsia")]
21044pub struct WritableSynchronousProxy {
21045 client: fidl::client::sync::Client,
21046}
21047
21048#[cfg(target_os = "fuchsia")]
21049impl fidl::endpoints::SynchronousProxy for WritableSynchronousProxy {
21050 type Proxy = WritableProxy;
21051 type Protocol = WritableMarker;
21052
21053 fn from_channel(inner: fidl::Channel) -> Self {
21054 Self::new(inner)
21055 }
21056
21057 fn into_channel(self) -> fidl::Channel {
21058 self.client.into_channel()
21059 }
21060
21061 fn as_channel(&self) -> &fidl::Channel {
21062 self.client.as_channel()
21063 }
21064}
21065
21066#[cfg(target_os = "fuchsia")]
21067impl WritableSynchronousProxy {
21068 pub fn new(channel: fidl::Channel) -> Self {
21069 Self { client: fidl::client::sync::Client::new(channel) }
21070 }
21071
21072 pub fn into_channel(self) -> fidl::Channel {
21073 self.client.into_channel()
21074 }
21075
21076 pub fn wait_for_event(
21079 &self,
21080 deadline: zx::MonotonicInstant,
21081 ) -> Result<WritableEvent, fidl::Error> {
21082 WritableEvent::decode(self.client.wait_for_event::<WritableMarker>(deadline)?)
21083 }
21084
21085 pub fn r#write(
21109 &self,
21110 mut data: &[u8],
21111 ___deadline: zx::MonotonicInstant,
21112 ) -> Result<WritableWriteResult, fidl::Error> {
21113 let _response = self.client.send_query::<
21114 WritableWriteRequest,
21115 fidl::encoding::ResultType<WritableWriteResponse, i32>,
21116 WritableMarker,
21117 >(
21118 (data,),
21119 0x6a31437832469f82,
21120 fidl::encoding::DynamicFlags::empty(),
21121 ___deadline,
21122 )?;
21123 Ok(_response.map(|x| x.actual_count))
21124 }
21125}
21126
21127#[cfg(target_os = "fuchsia")]
21128impl From<WritableSynchronousProxy> for zx::NullableHandle {
21129 fn from(value: WritableSynchronousProxy) -> Self {
21130 value.into_channel().into()
21131 }
21132}
21133
21134#[cfg(target_os = "fuchsia")]
21135impl From<fidl::Channel> for WritableSynchronousProxy {
21136 fn from(value: fidl::Channel) -> Self {
21137 Self::new(value)
21138 }
21139}
21140
21141#[cfg(target_os = "fuchsia")]
21142impl fidl::endpoints::FromClient for WritableSynchronousProxy {
21143 type Protocol = WritableMarker;
21144
21145 fn from_client(value: fidl::endpoints::ClientEnd<WritableMarker>) -> Self {
21146 Self::new(value.into_channel())
21147 }
21148}
21149
21150#[derive(Debug, Clone)]
21151pub struct WritableProxy {
21152 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
21153}
21154
21155impl fidl::endpoints::Proxy for WritableProxy {
21156 type Protocol = WritableMarker;
21157
21158 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
21159 Self::new(inner)
21160 }
21161
21162 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
21163 self.client.into_channel().map_err(|client| Self { client })
21164 }
21165
21166 fn as_channel(&self) -> &::fidl::AsyncChannel {
21167 self.client.as_channel()
21168 }
21169}
21170
21171impl WritableProxy {
21172 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
21174 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
21175 Self { client: fidl::client::Client::new(channel, protocol_name) }
21176 }
21177
21178 pub fn take_event_stream(&self) -> WritableEventStream {
21184 WritableEventStream { event_receiver: self.client.take_event_receiver() }
21185 }
21186
21187 pub fn r#write(
21211 &self,
21212 mut data: &[u8],
21213 ) -> fidl::client::QueryResponseFut<
21214 WritableWriteResult,
21215 fidl::encoding::DefaultFuchsiaResourceDialect,
21216 > {
21217 WritableProxyInterface::r#write(self, data)
21218 }
21219}
21220
21221impl WritableProxyInterface for WritableProxy {
21222 type WriteResponseFut = fidl::client::QueryResponseFut<
21223 WritableWriteResult,
21224 fidl::encoding::DefaultFuchsiaResourceDialect,
21225 >;
21226 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
21227 fn _decode(
21228 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
21229 ) -> Result<WritableWriteResult, fidl::Error> {
21230 let _response = fidl::client::decode_transaction_body::<
21231 fidl::encoding::ResultType<WritableWriteResponse, i32>,
21232 fidl::encoding::DefaultFuchsiaResourceDialect,
21233 0x6a31437832469f82,
21234 >(_buf?)?;
21235 Ok(_response.map(|x| x.actual_count))
21236 }
21237 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
21238 (data,),
21239 0x6a31437832469f82,
21240 fidl::encoding::DynamicFlags::empty(),
21241 _decode,
21242 )
21243 }
21244}
21245
21246pub struct WritableEventStream {
21247 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
21248}
21249
21250impl std::marker::Unpin for WritableEventStream {}
21251
21252impl futures::stream::FusedStream for WritableEventStream {
21253 fn is_terminated(&self) -> bool {
21254 self.event_receiver.is_terminated()
21255 }
21256}
21257
21258impl futures::Stream for WritableEventStream {
21259 type Item = Result<WritableEvent, fidl::Error>;
21260
21261 fn poll_next(
21262 mut self: std::pin::Pin<&mut Self>,
21263 cx: &mut std::task::Context<'_>,
21264 ) -> std::task::Poll<Option<Self::Item>> {
21265 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
21266 &mut self.event_receiver,
21267 cx
21268 )?) {
21269 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
21270 None => std::task::Poll::Ready(None),
21271 }
21272 }
21273}
21274
21275#[derive(Debug)]
21276pub enum WritableEvent {}
21277
21278impl WritableEvent {
21279 fn decode(
21281 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
21282 ) -> Result<WritableEvent, fidl::Error> {
21283 let (bytes, _handles) = buf.split_mut();
21284 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
21285 debug_assert_eq!(tx_header.tx_id, 0);
21286 match tx_header.ordinal {
21287 _ => Err(fidl::Error::UnknownOrdinal {
21288 ordinal: tx_header.ordinal,
21289 protocol_name: <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
21290 }),
21291 }
21292 }
21293}
21294
21295pub struct WritableRequestStream {
21297 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
21298 is_terminated: bool,
21299}
21300
21301impl std::marker::Unpin for WritableRequestStream {}
21302
21303impl futures::stream::FusedStream for WritableRequestStream {
21304 fn is_terminated(&self) -> bool {
21305 self.is_terminated
21306 }
21307}
21308
21309impl fidl::endpoints::RequestStream for WritableRequestStream {
21310 type Protocol = WritableMarker;
21311 type ControlHandle = WritableControlHandle;
21312
21313 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
21314 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
21315 }
21316
21317 fn control_handle(&self) -> Self::ControlHandle {
21318 WritableControlHandle { inner: self.inner.clone() }
21319 }
21320
21321 fn into_inner(
21322 self,
21323 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
21324 {
21325 (self.inner, self.is_terminated)
21326 }
21327
21328 fn from_inner(
21329 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
21330 is_terminated: bool,
21331 ) -> Self {
21332 Self { inner, is_terminated }
21333 }
21334}
21335
21336impl futures::Stream for WritableRequestStream {
21337 type Item = Result<WritableRequest, fidl::Error>;
21338
21339 fn poll_next(
21340 mut self: std::pin::Pin<&mut Self>,
21341 cx: &mut std::task::Context<'_>,
21342 ) -> std::task::Poll<Option<Self::Item>> {
21343 let this = &mut *self;
21344 if this.inner.check_shutdown(cx) {
21345 this.is_terminated = true;
21346 return std::task::Poll::Ready(None);
21347 }
21348 if this.is_terminated {
21349 panic!("polled WritableRequestStream after completion");
21350 }
21351 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
21352 |bytes, handles| {
21353 match this.inner.channel().read_etc(cx, bytes, handles) {
21354 std::task::Poll::Ready(Ok(())) => {}
21355 std::task::Poll::Pending => return std::task::Poll::Pending,
21356 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
21357 this.is_terminated = true;
21358 return std::task::Poll::Ready(None);
21359 }
21360 std::task::Poll::Ready(Err(e)) => {
21361 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
21362 e.into(),
21363 ))));
21364 }
21365 }
21366
21367 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
21369
21370 std::task::Poll::Ready(Some(match header.ordinal {
21371 0x6a31437832469f82 => {
21372 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
21373 let mut req = fidl::new_empty!(
21374 WritableWriteRequest,
21375 fidl::encoding::DefaultFuchsiaResourceDialect
21376 );
21377 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
21378 let control_handle = WritableControlHandle { inner: this.inner.clone() };
21379 Ok(WritableRequest::Write {
21380 data: req.data,
21381
21382 responder: WritableWriteResponder {
21383 control_handle: std::mem::ManuallyDrop::new(control_handle),
21384 tx_id: header.tx_id,
21385 },
21386 })
21387 }
21388 _ => Err(fidl::Error::UnknownOrdinal {
21389 ordinal: header.ordinal,
21390 protocol_name:
21391 <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
21392 }),
21393 }))
21394 },
21395 )
21396 }
21397}
21398
21399#[derive(Debug)]
21400pub enum WritableRequest {
21401 Write { data: Vec<u8>, responder: WritableWriteResponder },
21425}
21426
21427impl WritableRequest {
21428 #[allow(irrefutable_let_patterns)]
21429 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
21430 if let WritableRequest::Write { data, responder } = self {
21431 Some((data, responder))
21432 } else {
21433 None
21434 }
21435 }
21436
21437 pub fn method_name(&self) -> &'static str {
21439 match *self {
21440 WritableRequest::Write { .. } => "write",
21441 }
21442 }
21443}
21444
21445#[derive(Debug, Clone)]
21446pub struct WritableControlHandle {
21447 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
21448}
21449
21450impl WritableControlHandle {
21451 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
21452 self.inner.shutdown_with_epitaph(status.into())
21453 }
21454}
21455
21456impl fidl::endpoints::ControlHandle for WritableControlHandle {
21457 fn shutdown(&self) {
21458 self.inner.shutdown()
21459 }
21460
21461 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
21462 self.inner.shutdown_with_epitaph(status)
21463 }
21464
21465 fn is_closed(&self) -> bool {
21466 self.inner.channel().is_closed()
21467 }
21468 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
21469 self.inner.channel().on_closed()
21470 }
21471
21472 #[cfg(target_os = "fuchsia")]
21473 fn signal_peer(
21474 &self,
21475 clear_mask: zx::Signals,
21476 set_mask: zx::Signals,
21477 ) -> Result<(), zx_status::Status> {
21478 use fidl::Peered;
21479 self.inner.channel().signal_peer(clear_mask, set_mask)
21480 }
21481}
21482
21483impl WritableControlHandle {}
21484
21485#[must_use = "FIDL methods require a response to be sent"]
21486#[derive(Debug)]
21487pub struct WritableWriteResponder {
21488 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
21489 tx_id: u32,
21490}
21491
21492impl std::ops::Drop for WritableWriteResponder {
21496 fn drop(&mut self) {
21497 self.control_handle.shutdown();
21498 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
21500 }
21501}
21502
21503impl fidl::endpoints::Responder for WritableWriteResponder {
21504 type ControlHandle = WritableControlHandle;
21505
21506 fn control_handle(&self) -> &WritableControlHandle {
21507 &self.control_handle
21508 }
21509
21510 fn drop_without_shutdown(mut self) {
21511 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
21513 std::mem::forget(self);
21515 }
21516}
21517
21518impl WritableWriteResponder {
21519 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
21523 let _result = self.send_raw(result);
21524 if _result.is_err() {
21525 self.control_handle.shutdown();
21526 }
21527 self.drop_without_shutdown();
21528 _result
21529 }
21530
21531 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
21533 let _result = self.send_raw(result);
21534 self.drop_without_shutdown();
21535 _result
21536 }
21537
21538 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
21539 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
21540 result.map(|actual_count| (actual_count,)),
21541 self.tx_id,
21542 0x6a31437832469f82,
21543 fidl::encoding::DynamicFlags::empty(),
21544 )
21545 }
21546}
21547
21548mod internal {
21549 use super::*;
21550
21551 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
21552 type Borrowed<'a> = &'a mut Self;
21553 fn take_or_borrow<'a>(
21554 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21555 ) -> Self::Borrowed<'a> {
21556 value
21557 }
21558 }
21559
21560 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
21561 type Owned = Self;
21562
21563 #[inline(always)]
21564 fn inline_align(_context: fidl::encoding::Context) -> usize {
21565 8
21566 }
21567
21568 #[inline(always)]
21569 fn inline_size(_context: fidl::encoding::Context) -> usize {
21570 40
21571 }
21572 }
21573
21574 unsafe impl
21575 fidl::encoding::Encode<
21576 DirectoryCreateSymlinkRequest,
21577 fidl::encoding::DefaultFuchsiaResourceDialect,
21578 > for &mut DirectoryCreateSymlinkRequest
21579 {
21580 #[inline]
21581 unsafe fn encode(
21582 self,
21583 encoder: &mut fidl::encoding::Encoder<
21584 '_,
21585 fidl::encoding::DefaultFuchsiaResourceDialect,
21586 >,
21587 offset: usize,
21588 _depth: fidl::encoding::Depth,
21589 ) -> fidl::Result<()> {
21590 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
21591 fidl::encoding::Encode::<
21593 DirectoryCreateSymlinkRequest,
21594 fidl::encoding::DefaultFuchsiaResourceDialect,
21595 >::encode(
21596 (
21597 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21598 &self.name,
21599 ),
21600 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
21601 &self.target,
21602 ),
21603 <fidl::encoding::Optional<
21604 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21605 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21606 &mut self.connection
21607 ),
21608 ),
21609 encoder,
21610 offset,
21611 _depth,
21612 )
21613 }
21614 }
21615 unsafe impl<
21616 T0: fidl::encoding::Encode<
21617 fidl::encoding::BoundedString<255>,
21618 fidl::encoding::DefaultFuchsiaResourceDialect,
21619 >,
21620 T1: fidl::encoding::Encode<
21621 fidl::encoding::Vector<u8, 4095>,
21622 fidl::encoding::DefaultFuchsiaResourceDialect,
21623 >,
21624 T2: fidl::encoding::Encode<
21625 fidl::encoding::Optional<
21626 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21627 >,
21628 fidl::encoding::DefaultFuchsiaResourceDialect,
21629 >,
21630 >
21631 fidl::encoding::Encode<
21632 DirectoryCreateSymlinkRequest,
21633 fidl::encoding::DefaultFuchsiaResourceDialect,
21634 > for (T0, T1, T2)
21635 {
21636 #[inline]
21637 unsafe fn encode(
21638 self,
21639 encoder: &mut fidl::encoding::Encoder<
21640 '_,
21641 fidl::encoding::DefaultFuchsiaResourceDialect,
21642 >,
21643 offset: usize,
21644 depth: fidl::encoding::Depth,
21645 ) -> fidl::Result<()> {
21646 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
21647 unsafe {
21650 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
21651 (ptr as *mut u64).write_unaligned(0);
21652 }
21653 self.0.encode(encoder, offset + 0, depth)?;
21655 self.1.encode(encoder, offset + 16, depth)?;
21656 self.2.encode(encoder, offset + 32, depth)?;
21657 Ok(())
21658 }
21659 }
21660
21661 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21662 for DirectoryCreateSymlinkRequest
21663 {
21664 #[inline(always)]
21665 fn new_empty() -> Self {
21666 Self {
21667 name: fidl::new_empty!(
21668 fidl::encoding::BoundedString<255>,
21669 fidl::encoding::DefaultFuchsiaResourceDialect
21670 ),
21671 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect),
21672 connection: fidl::new_empty!(
21673 fidl::encoding::Optional<
21674 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21675 >,
21676 fidl::encoding::DefaultFuchsiaResourceDialect
21677 ),
21678 }
21679 }
21680
21681 #[inline]
21682 unsafe fn decode(
21683 &mut self,
21684 decoder: &mut fidl::encoding::Decoder<
21685 '_,
21686 fidl::encoding::DefaultFuchsiaResourceDialect,
21687 >,
21688 offset: usize,
21689 _depth: fidl::encoding::Depth,
21690 ) -> fidl::Result<()> {
21691 decoder.debug_check_bounds::<Self>(offset);
21692 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
21694 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21695 let mask = 0xffffffff00000000u64;
21696 let maskedval = padval & mask;
21697 if maskedval != 0 {
21698 return Err(fidl::Error::NonZeroPadding {
21699 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
21700 });
21701 }
21702 fidl::decode!(
21703 fidl::encoding::BoundedString<255>,
21704 fidl::encoding::DefaultFuchsiaResourceDialect,
21705 &mut self.name,
21706 decoder,
21707 offset + 0,
21708 _depth
21709 )?;
21710 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
21711 fidl::decode!(
21712 fidl::encoding::Optional<
21713 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21714 >,
21715 fidl::encoding::DefaultFuchsiaResourceDialect,
21716 &mut self.connection,
21717 decoder,
21718 offset + 32,
21719 _depth
21720 )?;
21721 Ok(())
21722 }
21723 }
21724
21725 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedGetTokenResponse {
21726 type Borrowed<'a> = &'a mut Self;
21727 fn take_or_borrow<'a>(
21728 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21729 ) -> Self::Borrowed<'a> {
21730 value
21731 }
21732 }
21733
21734 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedGetTokenResponse {
21735 type Owned = Self;
21736
21737 #[inline(always)]
21738 fn inline_align(_context: fidl::encoding::Context) -> usize {
21739 4
21740 }
21741
21742 #[inline(always)]
21743 fn inline_size(_context: fidl::encoding::Context) -> usize {
21744 8
21745 }
21746 }
21747
21748 unsafe impl
21749 fidl::encoding::Encode<
21750 DirectoryDeprecatedGetTokenResponse,
21751 fidl::encoding::DefaultFuchsiaResourceDialect,
21752 > for &mut DirectoryDeprecatedGetTokenResponse
21753 {
21754 #[inline]
21755 unsafe fn encode(
21756 self,
21757 encoder: &mut fidl::encoding::Encoder<
21758 '_,
21759 fidl::encoding::DefaultFuchsiaResourceDialect,
21760 >,
21761 offset: usize,
21762 _depth: fidl::encoding::Depth,
21763 ) -> fidl::Result<()> {
21764 encoder.debug_check_bounds::<DirectoryDeprecatedGetTokenResponse>(offset);
21765 fidl::encoding::Encode::<
21767 DirectoryDeprecatedGetTokenResponse,
21768 fidl::encoding::DefaultFuchsiaResourceDialect,
21769 >::encode(
21770 (
21771 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
21772 <fidl::encoding::Optional<
21773 fidl::encoding::HandleType<
21774 fidl::NullableHandle,
21775 { fidl::ObjectType::NONE.into_raw() },
21776 2147483648,
21777 >,
21778 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21779 &mut self.token
21780 ),
21781 ),
21782 encoder,
21783 offset,
21784 _depth,
21785 )
21786 }
21787 }
21788 unsafe impl<
21789 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
21790 T1: fidl::encoding::Encode<
21791 fidl::encoding::Optional<
21792 fidl::encoding::HandleType<
21793 fidl::NullableHandle,
21794 { fidl::ObjectType::NONE.into_raw() },
21795 2147483648,
21796 >,
21797 >,
21798 fidl::encoding::DefaultFuchsiaResourceDialect,
21799 >,
21800 >
21801 fidl::encoding::Encode<
21802 DirectoryDeprecatedGetTokenResponse,
21803 fidl::encoding::DefaultFuchsiaResourceDialect,
21804 > for (T0, T1)
21805 {
21806 #[inline]
21807 unsafe fn encode(
21808 self,
21809 encoder: &mut fidl::encoding::Encoder<
21810 '_,
21811 fidl::encoding::DefaultFuchsiaResourceDialect,
21812 >,
21813 offset: usize,
21814 depth: fidl::encoding::Depth,
21815 ) -> fidl::Result<()> {
21816 encoder.debug_check_bounds::<DirectoryDeprecatedGetTokenResponse>(offset);
21817 self.0.encode(encoder, offset + 0, depth)?;
21821 self.1.encode(encoder, offset + 4, depth)?;
21822 Ok(())
21823 }
21824 }
21825
21826 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21827 for DirectoryDeprecatedGetTokenResponse
21828 {
21829 #[inline(always)]
21830 fn new_empty() -> Self {
21831 Self {
21832 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
21833 token: fidl::new_empty!(
21834 fidl::encoding::Optional<
21835 fidl::encoding::HandleType<
21836 fidl::NullableHandle,
21837 { fidl::ObjectType::NONE.into_raw() },
21838 2147483648,
21839 >,
21840 >,
21841 fidl::encoding::DefaultFuchsiaResourceDialect
21842 ),
21843 }
21844 }
21845
21846 #[inline]
21847 unsafe fn decode(
21848 &mut self,
21849 decoder: &mut fidl::encoding::Decoder<
21850 '_,
21851 fidl::encoding::DefaultFuchsiaResourceDialect,
21852 >,
21853 offset: usize,
21854 _depth: fidl::encoding::Depth,
21855 ) -> fidl::Result<()> {
21856 decoder.debug_check_bounds::<Self>(offset);
21857 fidl::decode!(
21859 i32,
21860 fidl::encoding::DefaultFuchsiaResourceDialect,
21861 &mut self.s,
21862 decoder,
21863 offset + 0,
21864 _depth
21865 )?;
21866 fidl::decode!(
21867 fidl::encoding::Optional<
21868 fidl::encoding::HandleType<
21869 fidl::NullableHandle,
21870 { fidl::ObjectType::NONE.into_raw() },
21871 2147483648,
21872 >,
21873 >,
21874 fidl::encoding::DefaultFuchsiaResourceDialect,
21875 &mut self.token,
21876 decoder,
21877 offset + 4,
21878 _depth
21879 )?;
21880 Ok(())
21881 }
21882 }
21883
21884 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
21885 type Borrowed<'a> = &'a mut Self;
21886 fn take_or_borrow<'a>(
21887 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21888 ) -> Self::Borrowed<'a> {
21889 value
21890 }
21891 }
21892
21893 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
21894 type Owned = Self;
21895
21896 #[inline(always)]
21897 fn inline_align(_context: fidl::encoding::Context) -> usize {
21898 8
21899 }
21900
21901 #[inline(always)]
21902 fn inline_size(_context: fidl::encoding::Context) -> usize {
21903 32
21904 }
21905 }
21906
21907 unsafe impl
21908 fidl::encoding::Encode<
21909 DirectoryDeprecatedOpenRequest,
21910 fidl::encoding::DefaultFuchsiaResourceDialect,
21911 > for &mut DirectoryDeprecatedOpenRequest
21912 {
21913 #[inline]
21914 unsafe fn encode(
21915 self,
21916 encoder: &mut fidl::encoding::Encoder<
21917 '_,
21918 fidl::encoding::DefaultFuchsiaResourceDialect,
21919 >,
21920 offset: usize,
21921 _depth: fidl::encoding::Depth,
21922 ) -> fidl::Result<()> {
21923 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
21924 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21926 (
21927 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
21928 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
21929 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
21930 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
21931 ),
21932 encoder, offset, _depth
21933 )
21934 }
21935 }
21936 unsafe impl<
21937 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
21938 T1: fidl::encoding::Encode<ModeType, fidl::encoding::DefaultFuchsiaResourceDialect>,
21939 T2: fidl::encoding::Encode<
21940 fidl::encoding::BoundedString<4095>,
21941 fidl::encoding::DefaultFuchsiaResourceDialect,
21942 >,
21943 T3: fidl::encoding::Encode<
21944 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
21945 fidl::encoding::DefaultFuchsiaResourceDialect,
21946 >,
21947 >
21948 fidl::encoding::Encode<
21949 DirectoryDeprecatedOpenRequest,
21950 fidl::encoding::DefaultFuchsiaResourceDialect,
21951 > for (T0, T1, T2, T3)
21952 {
21953 #[inline]
21954 unsafe fn encode(
21955 self,
21956 encoder: &mut fidl::encoding::Encoder<
21957 '_,
21958 fidl::encoding::DefaultFuchsiaResourceDialect,
21959 >,
21960 offset: usize,
21961 depth: fidl::encoding::Depth,
21962 ) -> fidl::Result<()> {
21963 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
21964 unsafe {
21967 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
21968 (ptr as *mut u64).write_unaligned(0);
21969 }
21970 self.0.encode(encoder, offset + 0, depth)?;
21972 self.1.encode(encoder, offset + 4, depth)?;
21973 self.2.encode(encoder, offset + 8, depth)?;
21974 self.3.encode(encoder, offset + 24, depth)?;
21975 Ok(())
21976 }
21977 }
21978
21979 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21980 for DirectoryDeprecatedOpenRequest
21981 {
21982 #[inline(always)]
21983 fn new_empty() -> Self {
21984 Self {
21985 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
21986 mode: fidl::new_empty!(ModeType, fidl::encoding::DefaultFuchsiaResourceDialect),
21987 path: fidl::new_empty!(
21988 fidl::encoding::BoundedString<4095>,
21989 fidl::encoding::DefaultFuchsiaResourceDialect
21990 ),
21991 object: fidl::new_empty!(
21992 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
21993 fidl::encoding::DefaultFuchsiaResourceDialect
21994 ),
21995 }
21996 }
21997
21998 #[inline]
21999 unsafe fn decode(
22000 &mut self,
22001 decoder: &mut fidl::encoding::Decoder<
22002 '_,
22003 fidl::encoding::DefaultFuchsiaResourceDialect,
22004 >,
22005 offset: usize,
22006 _depth: fidl::encoding::Depth,
22007 ) -> fidl::Result<()> {
22008 decoder.debug_check_bounds::<Self>(offset);
22009 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
22011 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22012 let mask = 0xffffffff00000000u64;
22013 let maskedval = padval & mask;
22014 if maskedval != 0 {
22015 return Err(fidl::Error::NonZeroPadding {
22016 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
22017 });
22018 }
22019 fidl::decode!(
22020 OpenFlags,
22021 fidl::encoding::DefaultFuchsiaResourceDialect,
22022 &mut self.flags,
22023 decoder,
22024 offset + 0,
22025 _depth
22026 )?;
22027 fidl::decode!(
22028 ModeType,
22029 fidl::encoding::DefaultFuchsiaResourceDialect,
22030 &mut self.mode,
22031 decoder,
22032 offset + 4,
22033 _depth
22034 )?;
22035 fidl::decode!(
22036 fidl::encoding::BoundedString<4095>,
22037 fidl::encoding::DefaultFuchsiaResourceDialect,
22038 &mut self.path,
22039 decoder,
22040 offset + 8,
22041 _depth
22042 )?;
22043 fidl::decode!(
22044 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22045 fidl::encoding::DefaultFuchsiaResourceDialect,
22046 &mut self.object,
22047 decoder,
22048 offset + 24,
22049 _depth
22050 )?;
22051 Ok(())
22052 }
22053 }
22054
22055 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
22056 type Borrowed<'a> = &'a mut Self;
22057 fn take_or_borrow<'a>(
22058 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22059 ) -> Self::Borrowed<'a> {
22060 value
22061 }
22062 }
22063
22064 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
22065 type Owned = Self;
22066
22067 #[inline(always)]
22068 fn inline_align(_context: fidl::encoding::Context) -> usize {
22069 8
22070 }
22071
22072 #[inline(always)]
22073 fn inline_size(_context: fidl::encoding::Context) -> usize {
22074 40
22075 }
22076 }
22077
22078 unsafe impl
22079 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22080 for &mut DirectoryLinkRequest
22081 {
22082 #[inline]
22083 unsafe fn encode(
22084 self,
22085 encoder: &mut fidl::encoding::Encoder<
22086 '_,
22087 fidl::encoding::DefaultFuchsiaResourceDialect,
22088 >,
22089 offset: usize,
22090 _depth: fidl::encoding::Depth,
22091 ) -> fidl::Result<()> {
22092 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
22093 fidl::encoding::Encode::<
22095 DirectoryLinkRequest,
22096 fidl::encoding::DefaultFuchsiaResourceDialect,
22097 >::encode(
22098 (
22099 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22100 &self.src,
22101 ),
22102 <fidl::encoding::HandleType<
22103 fidl::NullableHandle,
22104 { fidl::ObjectType::NONE.into_raw() },
22105 2147483648,
22106 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22107 &mut self.dst_parent_token,
22108 ),
22109 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22110 &self.dst,
22111 ),
22112 ),
22113 encoder,
22114 offset,
22115 _depth,
22116 )
22117 }
22118 }
22119 unsafe impl<
22120 T0: fidl::encoding::Encode<
22121 fidl::encoding::BoundedString<255>,
22122 fidl::encoding::DefaultFuchsiaResourceDialect,
22123 >,
22124 T1: fidl::encoding::Encode<
22125 fidl::encoding::HandleType<
22126 fidl::NullableHandle,
22127 { fidl::ObjectType::NONE.into_raw() },
22128 2147483648,
22129 >,
22130 fidl::encoding::DefaultFuchsiaResourceDialect,
22131 >,
22132 T2: fidl::encoding::Encode<
22133 fidl::encoding::BoundedString<255>,
22134 fidl::encoding::DefaultFuchsiaResourceDialect,
22135 >,
22136 >
22137 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22138 for (T0, T1, T2)
22139 {
22140 #[inline]
22141 unsafe fn encode(
22142 self,
22143 encoder: &mut fidl::encoding::Encoder<
22144 '_,
22145 fidl::encoding::DefaultFuchsiaResourceDialect,
22146 >,
22147 offset: usize,
22148 depth: fidl::encoding::Depth,
22149 ) -> fidl::Result<()> {
22150 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
22151 unsafe {
22154 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
22155 (ptr as *mut u64).write_unaligned(0);
22156 }
22157 self.0.encode(encoder, offset + 0, depth)?;
22159 self.1.encode(encoder, offset + 16, depth)?;
22160 self.2.encode(encoder, offset + 24, depth)?;
22161 Ok(())
22162 }
22163 }
22164
22165 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22166 for DirectoryLinkRequest
22167 {
22168 #[inline(always)]
22169 fn new_empty() -> Self {
22170 Self {
22171 src: fidl::new_empty!(
22172 fidl::encoding::BoundedString<255>,
22173 fidl::encoding::DefaultFuchsiaResourceDialect
22174 ),
22175 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22176 dst: fidl::new_empty!(
22177 fidl::encoding::BoundedString<255>,
22178 fidl::encoding::DefaultFuchsiaResourceDialect
22179 ),
22180 }
22181 }
22182
22183 #[inline]
22184 unsafe fn decode(
22185 &mut self,
22186 decoder: &mut fidl::encoding::Decoder<
22187 '_,
22188 fidl::encoding::DefaultFuchsiaResourceDialect,
22189 >,
22190 offset: usize,
22191 _depth: fidl::encoding::Depth,
22192 ) -> fidl::Result<()> {
22193 decoder.debug_check_bounds::<Self>(offset);
22194 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
22196 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22197 let mask = 0xffffffff00000000u64;
22198 let maskedval = padval & mask;
22199 if maskedval != 0 {
22200 return Err(fidl::Error::NonZeroPadding {
22201 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
22202 });
22203 }
22204 fidl::decode!(
22205 fidl::encoding::BoundedString<255>,
22206 fidl::encoding::DefaultFuchsiaResourceDialect,
22207 &mut self.src,
22208 decoder,
22209 offset + 0,
22210 _depth
22211 )?;
22212 fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
22213 fidl::decode!(
22214 fidl::encoding::BoundedString<255>,
22215 fidl::encoding::DefaultFuchsiaResourceDialect,
22216 &mut self.dst,
22217 decoder,
22218 offset + 24,
22219 _depth
22220 )?;
22221 Ok(())
22222 }
22223 }
22224
22225 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
22226 type Borrowed<'a> = &'a mut Self;
22227 fn take_or_borrow<'a>(
22228 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22229 ) -> Self::Borrowed<'a> {
22230 value
22231 }
22232 }
22233
22234 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
22235 type Owned = Self;
22236
22237 #[inline(always)]
22238 fn inline_align(_context: fidl::encoding::Context) -> usize {
22239 8
22240 }
22241
22242 #[inline(always)]
22243 fn inline_size(_context: fidl::encoding::Context) -> usize {
22244 40
22245 }
22246 }
22247
22248 unsafe impl
22249 fidl::encoding::Encode<
22250 DirectoryRenameRequest,
22251 fidl::encoding::DefaultFuchsiaResourceDialect,
22252 > for &mut DirectoryRenameRequest
22253 {
22254 #[inline]
22255 unsafe fn encode(
22256 self,
22257 encoder: &mut fidl::encoding::Encoder<
22258 '_,
22259 fidl::encoding::DefaultFuchsiaResourceDialect,
22260 >,
22261 offset: usize,
22262 _depth: fidl::encoding::Depth,
22263 ) -> fidl::Result<()> {
22264 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
22265 fidl::encoding::Encode::<
22267 DirectoryRenameRequest,
22268 fidl::encoding::DefaultFuchsiaResourceDialect,
22269 >::encode(
22270 (
22271 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22272 &self.src,
22273 ),
22274 <fidl::encoding::HandleType<
22275 fidl::Event,
22276 { fidl::ObjectType::EVENT.into_raw() },
22277 2147483648,
22278 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22279 &mut self.dst_parent_token,
22280 ),
22281 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22282 &self.dst,
22283 ),
22284 ),
22285 encoder,
22286 offset,
22287 _depth,
22288 )
22289 }
22290 }
22291 unsafe impl<
22292 T0: fidl::encoding::Encode<
22293 fidl::encoding::BoundedString<255>,
22294 fidl::encoding::DefaultFuchsiaResourceDialect,
22295 >,
22296 T1: fidl::encoding::Encode<
22297 fidl::encoding::HandleType<
22298 fidl::Event,
22299 { fidl::ObjectType::EVENT.into_raw() },
22300 2147483648,
22301 >,
22302 fidl::encoding::DefaultFuchsiaResourceDialect,
22303 >,
22304 T2: fidl::encoding::Encode<
22305 fidl::encoding::BoundedString<255>,
22306 fidl::encoding::DefaultFuchsiaResourceDialect,
22307 >,
22308 >
22309 fidl::encoding::Encode<
22310 DirectoryRenameRequest,
22311 fidl::encoding::DefaultFuchsiaResourceDialect,
22312 > for (T0, T1, T2)
22313 {
22314 #[inline]
22315 unsafe fn encode(
22316 self,
22317 encoder: &mut fidl::encoding::Encoder<
22318 '_,
22319 fidl::encoding::DefaultFuchsiaResourceDialect,
22320 >,
22321 offset: usize,
22322 depth: fidl::encoding::Depth,
22323 ) -> fidl::Result<()> {
22324 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
22325 unsafe {
22328 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
22329 (ptr as *mut u64).write_unaligned(0);
22330 }
22331 self.0.encode(encoder, offset + 0, depth)?;
22333 self.1.encode(encoder, offset + 16, depth)?;
22334 self.2.encode(encoder, offset + 24, depth)?;
22335 Ok(())
22336 }
22337 }
22338
22339 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22340 for DirectoryRenameRequest
22341 {
22342 #[inline(always)]
22343 fn new_empty() -> Self {
22344 Self {
22345 src: fidl::new_empty!(
22346 fidl::encoding::BoundedString<255>,
22347 fidl::encoding::DefaultFuchsiaResourceDialect
22348 ),
22349 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22350 dst: fidl::new_empty!(
22351 fidl::encoding::BoundedString<255>,
22352 fidl::encoding::DefaultFuchsiaResourceDialect
22353 ),
22354 }
22355 }
22356
22357 #[inline]
22358 unsafe fn decode(
22359 &mut self,
22360 decoder: &mut fidl::encoding::Decoder<
22361 '_,
22362 fidl::encoding::DefaultFuchsiaResourceDialect,
22363 >,
22364 offset: usize,
22365 _depth: fidl::encoding::Depth,
22366 ) -> fidl::Result<()> {
22367 decoder.debug_check_bounds::<Self>(offset);
22368 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
22370 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22371 let mask = 0xffffffff00000000u64;
22372 let maskedval = padval & mask;
22373 if maskedval != 0 {
22374 return Err(fidl::Error::NonZeroPadding {
22375 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
22376 });
22377 }
22378 fidl::decode!(
22379 fidl::encoding::BoundedString<255>,
22380 fidl::encoding::DefaultFuchsiaResourceDialect,
22381 &mut self.src,
22382 decoder,
22383 offset + 0,
22384 _depth
22385 )?;
22386 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)?;
22387 fidl::decode!(
22388 fidl::encoding::BoundedString<255>,
22389 fidl::encoding::DefaultFuchsiaResourceDialect,
22390 &mut self.dst,
22391 decoder,
22392 offset + 24,
22393 _depth
22394 )?;
22395 Ok(())
22396 }
22397 }
22398
22399 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
22400 type Borrowed<'a> = &'a mut Self;
22401 fn take_or_borrow<'a>(
22402 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22403 ) -> Self::Borrowed<'a> {
22404 value
22405 }
22406 }
22407
22408 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
22409 type Owned = Self;
22410
22411 #[inline(always)]
22412 fn inline_align(_context: fidl::encoding::Context) -> usize {
22413 4
22414 }
22415
22416 #[inline(always)]
22417 fn inline_size(_context: fidl::encoding::Context) -> usize {
22418 12
22419 }
22420 }
22421
22422 unsafe impl
22423 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22424 for &mut DirectoryWatchRequest
22425 {
22426 #[inline]
22427 unsafe fn encode(
22428 self,
22429 encoder: &mut fidl::encoding::Encoder<
22430 '_,
22431 fidl::encoding::DefaultFuchsiaResourceDialect,
22432 >,
22433 offset: usize,
22434 _depth: fidl::encoding::Depth,
22435 ) -> fidl::Result<()> {
22436 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
22437 fidl::encoding::Encode::<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22439 (
22440 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
22441 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
22442 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
22443 ),
22444 encoder, offset, _depth
22445 )
22446 }
22447 }
22448 unsafe impl<
22449 T0: fidl::encoding::Encode<WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect>,
22450 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
22451 T2: fidl::encoding::Encode<
22452 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
22453 fidl::encoding::DefaultFuchsiaResourceDialect,
22454 >,
22455 >
22456 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22457 for (T0, T1, T2)
22458 {
22459 #[inline]
22460 unsafe fn encode(
22461 self,
22462 encoder: &mut fidl::encoding::Encoder<
22463 '_,
22464 fidl::encoding::DefaultFuchsiaResourceDialect,
22465 >,
22466 offset: usize,
22467 depth: fidl::encoding::Depth,
22468 ) -> fidl::Result<()> {
22469 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
22470 self.0.encode(encoder, offset + 0, depth)?;
22474 self.1.encode(encoder, offset + 4, depth)?;
22475 self.2.encode(encoder, offset + 8, depth)?;
22476 Ok(())
22477 }
22478 }
22479
22480 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22481 for DirectoryWatchRequest
22482 {
22483 #[inline(always)]
22484 fn new_empty() -> Self {
22485 Self {
22486 mask: fidl::new_empty!(WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect),
22487 options: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
22488 watcher: fidl::new_empty!(
22489 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
22490 fidl::encoding::DefaultFuchsiaResourceDialect
22491 ),
22492 }
22493 }
22494
22495 #[inline]
22496 unsafe fn decode(
22497 &mut self,
22498 decoder: &mut fidl::encoding::Decoder<
22499 '_,
22500 fidl::encoding::DefaultFuchsiaResourceDialect,
22501 >,
22502 offset: usize,
22503 _depth: fidl::encoding::Depth,
22504 ) -> fidl::Result<()> {
22505 decoder.debug_check_bounds::<Self>(offset);
22506 fidl::decode!(
22508 WatchMask,
22509 fidl::encoding::DefaultFuchsiaResourceDialect,
22510 &mut self.mask,
22511 decoder,
22512 offset + 0,
22513 _depth
22514 )?;
22515 fidl::decode!(
22516 u32,
22517 fidl::encoding::DefaultFuchsiaResourceDialect,
22518 &mut self.options,
22519 decoder,
22520 offset + 4,
22521 _depth
22522 )?;
22523 fidl::decode!(
22524 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
22525 fidl::encoding::DefaultFuchsiaResourceDialect,
22526 &mut self.watcher,
22527 decoder,
22528 offset + 8,
22529 _depth
22530 )?;
22531 Ok(())
22532 }
22533 }
22534
22535 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
22536 type Borrowed<'a> = &'a mut Self;
22537 fn take_or_borrow<'a>(
22538 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22539 ) -> Self::Borrowed<'a> {
22540 value
22541 }
22542 }
22543
22544 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
22545 type Owned = Self;
22546
22547 #[inline(always)]
22548 fn inline_align(_context: fidl::encoding::Context) -> usize {
22549 8
22550 }
22551
22552 #[inline(always)]
22553 fn inline_size(_context: fidl::encoding::Context) -> usize {
22554 24
22555 }
22556 }
22557
22558 unsafe impl
22559 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22560 for &mut FileAllocateRequest
22561 {
22562 #[inline]
22563 unsafe fn encode(
22564 self,
22565 encoder: &mut fidl::encoding::Encoder<
22566 '_,
22567 fidl::encoding::DefaultFuchsiaResourceDialect,
22568 >,
22569 offset: usize,
22570 _depth: fidl::encoding::Depth,
22571 ) -> fidl::Result<()> {
22572 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
22573 fidl::encoding::Encode::<
22575 FileAllocateRequest,
22576 fidl::encoding::DefaultFuchsiaResourceDialect,
22577 >::encode(
22578 (
22579 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
22580 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
22581 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
22582 ),
22583 encoder,
22584 offset,
22585 _depth,
22586 )
22587 }
22588 }
22589 unsafe impl<
22590 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
22591 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
22592 T2: fidl::encoding::Encode<AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect>,
22593 > fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22594 for (T0, T1, T2)
22595 {
22596 #[inline]
22597 unsafe fn encode(
22598 self,
22599 encoder: &mut fidl::encoding::Encoder<
22600 '_,
22601 fidl::encoding::DefaultFuchsiaResourceDialect,
22602 >,
22603 offset: usize,
22604 depth: fidl::encoding::Depth,
22605 ) -> fidl::Result<()> {
22606 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
22607 unsafe {
22610 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
22611 (ptr as *mut u64).write_unaligned(0);
22612 }
22613 self.0.encode(encoder, offset + 0, depth)?;
22615 self.1.encode(encoder, offset + 8, depth)?;
22616 self.2.encode(encoder, offset + 16, depth)?;
22617 Ok(())
22618 }
22619 }
22620
22621 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22622 for FileAllocateRequest
22623 {
22624 #[inline(always)]
22625 fn new_empty() -> Self {
22626 Self {
22627 offset: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
22628 length: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
22629 mode: fidl::new_empty!(AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect),
22630 }
22631 }
22632
22633 #[inline]
22634 unsafe fn decode(
22635 &mut self,
22636 decoder: &mut fidl::encoding::Decoder<
22637 '_,
22638 fidl::encoding::DefaultFuchsiaResourceDialect,
22639 >,
22640 offset: usize,
22641 _depth: fidl::encoding::Depth,
22642 ) -> fidl::Result<()> {
22643 decoder.debug_check_bounds::<Self>(offset);
22644 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
22646 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22647 let mask = 0xffffffff00000000u64;
22648 let maskedval = padval & mask;
22649 if maskedval != 0 {
22650 return Err(fidl::Error::NonZeroPadding {
22651 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
22652 });
22653 }
22654 fidl::decode!(
22655 u64,
22656 fidl::encoding::DefaultFuchsiaResourceDialect,
22657 &mut self.offset,
22658 decoder,
22659 offset + 0,
22660 _depth
22661 )?;
22662 fidl::decode!(
22663 u64,
22664 fidl::encoding::DefaultFuchsiaResourceDialect,
22665 &mut self.length,
22666 decoder,
22667 offset + 8,
22668 _depth
22669 )?;
22670 fidl::decode!(
22671 AllocateMode,
22672 fidl::encoding::DefaultFuchsiaResourceDialect,
22673 &mut self.mode,
22674 decoder,
22675 offset + 16,
22676 _depth
22677 )?;
22678 Ok(())
22679 }
22680 }
22681
22682 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
22683 type Borrowed<'a> = &'a mut Self;
22684 fn take_or_borrow<'a>(
22685 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22686 ) -> Self::Borrowed<'a> {
22687 value
22688 }
22689 }
22690
22691 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
22692 type Owned = Self;
22693
22694 #[inline(always)]
22695 fn inline_align(_context: fidl::encoding::Context) -> usize {
22696 8
22697 }
22698
22699 #[inline(always)]
22700 fn inline_size(_context: fidl::encoding::Context) -> usize {
22701 16
22702 }
22703 }
22704
22705 unsafe impl
22706 fidl::encoding::Encode<
22707 FileEnableVerityRequest,
22708 fidl::encoding::DefaultFuchsiaResourceDialect,
22709 > for &mut FileEnableVerityRequest
22710 {
22711 #[inline]
22712 unsafe fn encode(
22713 self,
22714 encoder: &mut fidl::encoding::Encoder<
22715 '_,
22716 fidl::encoding::DefaultFuchsiaResourceDialect,
22717 >,
22718 offset: usize,
22719 _depth: fidl::encoding::Depth,
22720 ) -> fidl::Result<()> {
22721 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
22722 fidl::encoding::Encode::<
22724 FileEnableVerityRequest,
22725 fidl::encoding::DefaultFuchsiaResourceDialect,
22726 >::encode(
22727 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
22728 encoder,
22729 offset,
22730 _depth,
22731 )
22732 }
22733 }
22734 unsafe impl<
22735 T0: fidl::encoding::Encode<VerificationOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
22736 >
22737 fidl::encoding::Encode<
22738 FileEnableVerityRequest,
22739 fidl::encoding::DefaultFuchsiaResourceDialect,
22740 > for (T0,)
22741 {
22742 #[inline]
22743 unsafe fn encode(
22744 self,
22745 encoder: &mut fidl::encoding::Encoder<
22746 '_,
22747 fidl::encoding::DefaultFuchsiaResourceDialect,
22748 >,
22749 offset: usize,
22750 depth: fidl::encoding::Depth,
22751 ) -> fidl::Result<()> {
22752 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
22753 self.0.encode(encoder, offset + 0, depth)?;
22757 Ok(())
22758 }
22759 }
22760
22761 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22762 for FileEnableVerityRequest
22763 {
22764 #[inline(always)]
22765 fn new_empty() -> Self {
22766 Self {
22767 options: fidl::new_empty!(
22768 VerificationOptions,
22769 fidl::encoding::DefaultFuchsiaResourceDialect
22770 ),
22771 }
22772 }
22773
22774 #[inline]
22775 unsafe fn decode(
22776 &mut self,
22777 decoder: &mut fidl::encoding::Decoder<
22778 '_,
22779 fidl::encoding::DefaultFuchsiaResourceDialect,
22780 >,
22781 offset: usize,
22782 _depth: fidl::encoding::Depth,
22783 ) -> fidl::Result<()> {
22784 decoder.debug_check_bounds::<Self>(offset);
22785 fidl::decode!(
22787 VerificationOptions,
22788 fidl::encoding::DefaultFuchsiaResourceDialect,
22789 &mut self.options,
22790 decoder,
22791 offset + 0,
22792 _depth
22793 )?;
22794 Ok(())
22795 }
22796 }
22797
22798 impl fidl::encoding::ResourceTypeMarker for FileObject {
22799 type Borrowed<'a> = &'a mut Self;
22800 fn take_or_borrow<'a>(
22801 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22802 ) -> Self::Borrowed<'a> {
22803 value
22804 }
22805 }
22806
22807 unsafe impl fidl::encoding::TypeMarker for FileObject {
22808 type Owned = Self;
22809
22810 #[inline(always)]
22811 fn inline_align(_context: fidl::encoding::Context) -> usize {
22812 4
22813 }
22814
22815 #[inline(always)]
22816 fn inline_size(_context: fidl::encoding::Context) -> usize {
22817 8
22818 }
22819 }
22820
22821 unsafe impl fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
22822 for &mut FileObject
22823 {
22824 #[inline]
22825 unsafe fn encode(
22826 self,
22827 encoder: &mut fidl::encoding::Encoder<
22828 '_,
22829 fidl::encoding::DefaultFuchsiaResourceDialect,
22830 >,
22831 offset: usize,
22832 _depth: fidl::encoding::Depth,
22833 ) -> fidl::Result<()> {
22834 encoder.debug_check_bounds::<FileObject>(offset);
22835 fidl::encoding::Encode::<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22837 (
22838 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
22839 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
22840 ),
22841 encoder, offset, _depth
22842 )
22843 }
22844 }
22845 unsafe impl<
22846 T0: fidl::encoding::Encode<
22847 fidl::encoding::Optional<
22848 fidl::encoding::HandleType<
22849 fidl::Event,
22850 { fidl::ObjectType::EVENT.into_raw() },
22851 2147483648,
22852 >,
22853 >,
22854 fidl::encoding::DefaultFuchsiaResourceDialect,
22855 >,
22856 T1: fidl::encoding::Encode<
22857 fidl::encoding::Optional<
22858 fidl::encoding::HandleType<
22859 fidl::Stream,
22860 { fidl::ObjectType::STREAM.into_raw() },
22861 2147483648,
22862 >,
22863 >,
22864 fidl::encoding::DefaultFuchsiaResourceDialect,
22865 >,
22866 > fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
22867 for (T0, T1)
22868 {
22869 #[inline]
22870 unsafe fn encode(
22871 self,
22872 encoder: &mut fidl::encoding::Encoder<
22873 '_,
22874 fidl::encoding::DefaultFuchsiaResourceDialect,
22875 >,
22876 offset: usize,
22877 depth: fidl::encoding::Depth,
22878 ) -> fidl::Result<()> {
22879 encoder.debug_check_bounds::<FileObject>(offset);
22880 self.0.encode(encoder, offset + 0, depth)?;
22884 self.1.encode(encoder, offset + 4, depth)?;
22885 Ok(())
22886 }
22887 }
22888
22889 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {
22890 #[inline(always)]
22891 fn new_empty() -> Self {
22892 Self {
22893 event: fidl::new_empty!(
22894 fidl::encoding::Optional<
22895 fidl::encoding::HandleType<
22896 fidl::Event,
22897 { fidl::ObjectType::EVENT.into_raw() },
22898 2147483648,
22899 >,
22900 >,
22901 fidl::encoding::DefaultFuchsiaResourceDialect
22902 ),
22903 stream: fidl::new_empty!(
22904 fidl::encoding::Optional<
22905 fidl::encoding::HandleType<
22906 fidl::Stream,
22907 { fidl::ObjectType::STREAM.into_raw() },
22908 2147483648,
22909 >,
22910 >,
22911 fidl::encoding::DefaultFuchsiaResourceDialect
22912 ),
22913 }
22914 }
22915
22916 #[inline]
22917 unsafe fn decode(
22918 &mut self,
22919 decoder: &mut fidl::encoding::Decoder<
22920 '_,
22921 fidl::encoding::DefaultFuchsiaResourceDialect,
22922 >,
22923 offset: usize,
22924 _depth: fidl::encoding::Depth,
22925 ) -> fidl::Result<()> {
22926 decoder.debug_check_bounds::<Self>(offset);
22927 fidl::decode!(
22929 fidl::encoding::Optional<
22930 fidl::encoding::HandleType<
22931 fidl::Event,
22932 { fidl::ObjectType::EVENT.into_raw() },
22933 2147483648,
22934 >,
22935 >,
22936 fidl::encoding::DefaultFuchsiaResourceDialect,
22937 &mut self.event,
22938 decoder,
22939 offset + 0,
22940 _depth
22941 )?;
22942 fidl::decode!(
22943 fidl::encoding::Optional<
22944 fidl::encoding::HandleType<
22945 fidl::Stream,
22946 { fidl::ObjectType::STREAM.into_raw() },
22947 2147483648,
22948 >,
22949 >,
22950 fidl::encoding::DefaultFuchsiaResourceDialect,
22951 &mut self.stream,
22952 decoder,
22953 offset + 4,
22954 _depth
22955 )?;
22956 Ok(())
22957 }
22958 }
22959
22960 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
22961 type Borrowed<'a> = &'a mut Self;
22962 fn take_or_borrow<'a>(
22963 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22964 ) -> Self::Borrowed<'a> {
22965 value
22966 }
22967 }
22968
22969 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
22970 type Owned = Self;
22971
22972 #[inline(always)]
22973 fn inline_align(_context: fidl::encoding::Context) -> usize {
22974 4
22975 }
22976
22977 #[inline(always)]
22978 fn inline_size(_context: fidl::encoding::Context) -> usize {
22979 4
22980 }
22981 }
22982
22983 unsafe impl
22984 fidl::encoding::Encode<
22985 FileGetBackingMemoryResponse,
22986 fidl::encoding::DefaultFuchsiaResourceDialect,
22987 > for &mut FileGetBackingMemoryResponse
22988 {
22989 #[inline]
22990 unsafe fn encode(
22991 self,
22992 encoder: &mut fidl::encoding::Encoder<
22993 '_,
22994 fidl::encoding::DefaultFuchsiaResourceDialect,
22995 >,
22996 offset: usize,
22997 _depth: fidl::encoding::Depth,
22998 ) -> fidl::Result<()> {
22999 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
23000 fidl::encoding::Encode::<
23002 FileGetBackingMemoryResponse,
23003 fidl::encoding::DefaultFuchsiaResourceDialect,
23004 >::encode(
23005 (<fidl::encoding::HandleType<
23006 fidl::Vmo,
23007 { fidl::ObjectType::VMO.into_raw() },
23008 2147483648,
23009 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23010 &mut self.vmo
23011 ),),
23012 encoder,
23013 offset,
23014 _depth,
23015 )
23016 }
23017 }
23018 unsafe impl<
23019 T0: fidl::encoding::Encode<
23020 fidl::encoding::HandleType<
23021 fidl::Vmo,
23022 { fidl::ObjectType::VMO.into_raw() },
23023 2147483648,
23024 >,
23025 fidl::encoding::DefaultFuchsiaResourceDialect,
23026 >,
23027 >
23028 fidl::encoding::Encode<
23029 FileGetBackingMemoryResponse,
23030 fidl::encoding::DefaultFuchsiaResourceDialect,
23031 > for (T0,)
23032 {
23033 #[inline]
23034 unsafe fn encode(
23035 self,
23036 encoder: &mut fidl::encoding::Encoder<
23037 '_,
23038 fidl::encoding::DefaultFuchsiaResourceDialect,
23039 >,
23040 offset: usize,
23041 depth: fidl::encoding::Depth,
23042 ) -> fidl::Result<()> {
23043 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
23044 self.0.encode(encoder, offset + 0, depth)?;
23048 Ok(())
23049 }
23050 }
23051
23052 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23053 for FileGetBackingMemoryResponse
23054 {
23055 #[inline(always)]
23056 fn new_empty() -> Self {
23057 Self {
23058 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23059 }
23060 }
23061
23062 #[inline]
23063 unsafe fn decode(
23064 &mut self,
23065 decoder: &mut fidl::encoding::Decoder<
23066 '_,
23067 fidl::encoding::DefaultFuchsiaResourceDialect,
23068 >,
23069 offset: usize,
23070 _depth: fidl::encoding::Depth,
23071 ) -> fidl::Result<()> {
23072 decoder.debug_check_bounds::<Self>(offset);
23073 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
23075 Ok(())
23076 }
23077 }
23078
23079 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
23080 type Borrowed<'a> = &'a mut Self;
23081 fn take_or_borrow<'a>(
23082 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23083 ) -> Self::Borrowed<'a> {
23084 value
23085 }
23086 }
23087
23088 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
23089 type Owned = Self;
23090
23091 #[inline(always)]
23092 fn inline_align(_context: fidl::encoding::Context) -> usize {
23093 8
23094 }
23095
23096 #[inline(always)]
23097 fn inline_size(_context: fidl::encoding::Context) -> usize {
23098 24
23099 }
23100 }
23101
23102 unsafe impl
23103 fidl::encoding::Encode<
23104 LinkableLinkIntoRequest,
23105 fidl::encoding::DefaultFuchsiaResourceDialect,
23106 > for &mut LinkableLinkIntoRequest
23107 {
23108 #[inline]
23109 unsafe fn encode(
23110 self,
23111 encoder: &mut fidl::encoding::Encoder<
23112 '_,
23113 fidl::encoding::DefaultFuchsiaResourceDialect,
23114 >,
23115 offset: usize,
23116 _depth: fidl::encoding::Depth,
23117 ) -> fidl::Result<()> {
23118 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
23119 fidl::encoding::Encode::<
23121 LinkableLinkIntoRequest,
23122 fidl::encoding::DefaultFuchsiaResourceDialect,
23123 >::encode(
23124 (
23125 <fidl::encoding::HandleType<
23126 fidl::Event,
23127 { fidl::ObjectType::EVENT.into_raw() },
23128 2147483648,
23129 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23130 &mut self.dst_parent_token,
23131 ),
23132 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
23133 &self.dst,
23134 ),
23135 ),
23136 encoder,
23137 offset,
23138 _depth,
23139 )
23140 }
23141 }
23142 unsafe impl<
23143 T0: fidl::encoding::Encode<
23144 fidl::encoding::HandleType<
23145 fidl::Event,
23146 { fidl::ObjectType::EVENT.into_raw() },
23147 2147483648,
23148 >,
23149 fidl::encoding::DefaultFuchsiaResourceDialect,
23150 >,
23151 T1: fidl::encoding::Encode<
23152 fidl::encoding::BoundedString<255>,
23153 fidl::encoding::DefaultFuchsiaResourceDialect,
23154 >,
23155 >
23156 fidl::encoding::Encode<
23157 LinkableLinkIntoRequest,
23158 fidl::encoding::DefaultFuchsiaResourceDialect,
23159 > for (T0, T1)
23160 {
23161 #[inline]
23162 unsafe fn encode(
23163 self,
23164 encoder: &mut fidl::encoding::Encoder<
23165 '_,
23166 fidl::encoding::DefaultFuchsiaResourceDialect,
23167 >,
23168 offset: usize,
23169 depth: fidl::encoding::Depth,
23170 ) -> fidl::Result<()> {
23171 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
23172 unsafe {
23175 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23176 (ptr as *mut u64).write_unaligned(0);
23177 }
23178 self.0.encode(encoder, offset + 0, depth)?;
23180 self.1.encode(encoder, offset + 8, depth)?;
23181 Ok(())
23182 }
23183 }
23184
23185 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23186 for LinkableLinkIntoRequest
23187 {
23188 #[inline(always)]
23189 fn new_empty() -> Self {
23190 Self {
23191 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23192 dst: fidl::new_empty!(
23193 fidl::encoding::BoundedString<255>,
23194 fidl::encoding::DefaultFuchsiaResourceDialect
23195 ),
23196 }
23197 }
23198
23199 #[inline]
23200 unsafe fn decode(
23201 &mut self,
23202 decoder: &mut fidl::encoding::Decoder<
23203 '_,
23204 fidl::encoding::DefaultFuchsiaResourceDialect,
23205 >,
23206 offset: usize,
23207 _depth: fidl::encoding::Depth,
23208 ) -> fidl::Result<()> {
23209 decoder.debug_check_bounds::<Self>(offset);
23210 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23212 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23213 let mask = 0xffffffff00000000u64;
23214 let maskedval = padval & mask;
23215 if maskedval != 0 {
23216 return Err(fidl::Error::NonZeroPadding {
23217 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23218 });
23219 }
23220 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)?;
23221 fidl::decode!(
23222 fidl::encoding::BoundedString<255>,
23223 fidl::encoding::DefaultFuchsiaResourceDialect,
23224 &mut self.dst,
23225 decoder,
23226 offset + 8,
23227 _depth
23228 )?;
23229 Ok(())
23230 }
23231 }
23232
23233 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
23234 type Borrowed<'a> = &'a mut Self;
23235 fn take_or_borrow<'a>(
23236 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23237 ) -> Self::Borrowed<'a> {
23238 value
23239 }
23240 }
23241
23242 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
23243 type Owned = Self;
23244
23245 #[inline(always)]
23246 fn inline_align(_context: fidl::encoding::Context) -> usize {
23247 4
23248 }
23249
23250 #[inline(always)]
23251 fn inline_size(_context: fidl::encoding::Context) -> usize {
23252 4
23253 }
23254 }
23255
23256 unsafe impl
23257 fidl::encoding::Encode<
23258 NodeListExtendedAttributesRequest,
23259 fidl::encoding::DefaultFuchsiaResourceDialect,
23260 > for &mut NodeListExtendedAttributesRequest
23261 {
23262 #[inline]
23263 unsafe fn encode(
23264 self,
23265 encoder: &mut fidl::encoding::Encoder<
23266 '_,
23267 fidl::encoding::DefaultFuchsiaResourceDialect,
23268 >,
23269 offset: usize,
23270 _depth: fidl::encoding::Depth,
23271 ) -> fidl::Result<()> {
23272 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
23273 fidl::encoding::Encode::<
23275 NodeListExtendedAttributesRequest,
23276 fidl::encoding::DefaultFuchsiaResourceDialect,
23277 >::encode(
23278 (<fidl::encoding::Endpoint<
23279 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23280 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23281 &mut self.iterator
23282 ),),
23283 encoder,
23284 offset,
23285 _depth,
23286 )
23287 }
23288 }
23289 unsafe impl<
23290 T0: fidl::encoding::Encode<
23291 fidl::encoding::Endpoint<
23292 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23293 >,
23294 fidl::encoding::DefaultFuchsiaResourceDialect,
23295 >,
23296 >
23297 fidl::encoding::Encode<
23298 NodeListExtendedAttributesRequest,
23299 fidl::encoding::DefaultFuchsiaResourceDialect,
23300 > for (T0,)
23301 {
23302 #[inline]
23303 unsafe fn encode(
23304 self,
23305 encoder: &mut fidl::encoding::Encoder<
23306 '_,
23307 fidl::encoding::DefaultFuchsiaResourceDialect,
23308 >,
23309 offset: usize,
23310 depth: fidl::encoding::Depth,
23311 ) -> fidl::Result<()> {
23312 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
23313 self.0.encode(encoder, offset + 0, depth)?;
23317 Ok(())
23318 }
23319 }
23320
23321 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23322 for NodeListExtendedAttributesRequest
23323 {
23324 #[inline(always)]
23325 fn new_empty() -> Self {
23326 Self {
23327 iterator: fidl::new_empty!(
23328 fidl::encoding::Endpoint<
23329 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23330 >,
23331 fidl::encoding::DefaultFuchsiaResourceDialect
23332 ),
23333 }
23334 }
23335
23336 #[inline]
23337 unsafe fn decode(
23338 &mut self,
23339 decoder: &mut fidl::encoding::Decoder<
23340 '_,
23341 fidl::encoding::DefaultFuchsiaResourceDialect,
23342 >,
23343 offset: usize,
23344 _depth: fidl::encoding::Depth,
23345 ) -> fidl::Result<()> {
23346 decoder.debug_check_bounds::<Self>(offset);
23347 fidl::decode!(
23349 fidl::encoding::Endpoint<
23350 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23351 >,
23352 fidl::encoding::DefaultFuchsiaResourceDialect,
23353 &mut self.iterator,
23354 decoder,
23355 offset + 0,
23356 _depth
23357 )?;
23358 Ok(())
23359 }
23360 }
23361
23362 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
23363 type Borrowed<'a> = &'a mut Self;
23364 fn take_or_borrow<'a>(
23365 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23366 ) -> Self::Borrowed<'a> {
23367 value
23368 }
23369 }
23370
23371 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
23372 type Owned = Self;
23373
23374 #[inline(always)]
23375 fn inline_align(_context: fidl::encoding::Context) -> usize {
23376 8
23377 }
23378
23379 #[inline(always)]
23380 fn inline_size(_context: fidl::encoding::Context) -> usize {
23381 24
23382 }
23383 }
23384
23385 unsafe impl
23386 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23387 for &mut NodeOnOpenRequest
23388 {
23389 #[inline]
23390 unsafe fn encode(
23391 self,
23392 encoder: &mut fidl::encoding::Encoder<
23393 '_,
23394 fidl::encoding::DefaultFuchsiaResourceDialect,
23395 >,
23396 offset: usize,
23397 _depth: fidl::encoding::Depth,
23398 ) -> fidl::Result<()> {
23399 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
23400 fidl::encoding::Encode::<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
23402 (
23403 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
23404 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
23405 ),
23406 encoder, offset, _depth
23407 )
23408 }
23409 }
23410 unsafe impl<
23411 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
23412 T1: fidl::encoding::Encode<
23413 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
23414 fidl::encoding::DefaultFuchsiaResourceDialect,
23415 >,
23416 > fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23417 for (T0, T1)
23418 {
23419 #[inline]
23420 unsafe fn encode(
23421 self,
23422 encoder: &mut fidl::encoding::Encoder<
23423 '_,
23424 fidl::encoding::DefaultFuchsiaResourceDialect,
23425 >,
23426 offset: usize,
23427 depth: fidl::encoding::Depth,
23428 ) -> fidl::Result<()> {
23429 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
23430 unsafe {
23433 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23434 (ptr as *mut u64).write_unaligned(0);
23435 }
23436 self.0.encode(encoder, offset + 0, depth)?;
23438 self.1.encode(encoder, offset + 8, depth)?;
23439 Ok(())
23440 }
23441 }
23442
23443 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23444 for NodeOnOpenRequest
23445 {
23446 #[inline(always)]
23447 fn new_empty() -> Self {
23448 Self {
23449 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
23450 info: fidl::new_empty!(
23451 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
23452 fidl::encoding::DefaultFuchsiaResourceDialect
23453 ),
23454 }
23455 }
23456
23457 #[inline]
23458 unsafe fn decode(
23459 &mut self,
23460 decoder: &mut fidl::encoding::Decoder<
23461 '_,
23462 fidl::encoding::DefaultFuchsiaResourceDialect,
23463 >,
23464 offset: usize,
23465 _depth: fidl::encoding::Depth,
23466 ) -> fidl::Result<()> {
23467 decoder.debug_check_bounds::<Self>(offset);
23468 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23470 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23471 let mask = 0xffffffff00000000u64;
23472 let maskedval = padval & mask;
23473 if maskedval != 0 {
23474 return Err(fidl::Error::NonZeroPadding {
23475 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23476 });
23477 }
23478 fidl::decode!(
23479 i32,
23480 fidl::encoding::DefaultFuchsiaResourceDialect,
23481 &mut self.s,
23482 decoder,
23483 offset + 0,
23484 _depth
23485 )?;
23486 fidl::decode!(
23487 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
23488 fidl::encoding::DefaultFuchsiaResourceDialect,
23489 &mut self.info,
23490 decoder,
23491 offset + 8,
23492 _depth
23493 )?;
23494 Ok(())
23495 }
23496 }
23497
23498 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
23499 type Borrowed<'a> = &'a mut Self;
23500 fn take_or_borrow<'a>(
23501 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23502 ) -> Self::Borrowed<'a> {
23503 value
23504 }
23505 }
23506
23507 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
23508 type Owned = Self;
23509
23510 #[inline(always)]
23511 fn inline_align(_context: fidl::encoding::Context) -> usize {
23512 8
23513 }
23514
23515 #[inline(always)]
23516 fn inline_size(_context: fidl::encoding::Context) -> usize {
23517 40
23518 }
23519 }
23520
23521 unsafe impl
23522 fidl::encoding::Encode<
23523 NodeSetExtendedAttributeRequest,
23524 fidl::encoding::DefaultFuchsiaResourceDialect,
23525 > for &mut NodeSetExtendedAttributeRequest
23526 {
23527 #[inline]
23528 unsafe fn encode(
23529 self,
23530 encoder: &mut fidl::encoding::Encoder<
23531 '_,
23532 fidl::encoding::DefaultFuchsiaResourceDialect,
23533 >,
23534 offset: usize,
23535 _depth: fidl::encoding::Depth,
23536 ) -> fidl::Result<()> {
23537 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
23538 fidl::encoding::Encode::<
23540 NodeSetExtendedAttributeRequest,
23541 fidl::encoding::DefaultFuchsiaResourceDialect,
23542 >::encode(
23543 (
23544 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
23545 &self.name,
23546 ),
23547 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23548 &mut self.value,
23549 ),
23550 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
23551 &self.mode,
23552 ),
23553 ),
23554 encoder,
23555 offset,
23556 _depth,
23557 )
23558 }
23559 }
23560 unsafe impl<
23561 T0: fidl::encoding::Encode<
23562 fidl::encoding::Vector<u8, 255>,
23563 fidl::encoding::DefaultFuchsiaResourceDialect,
23564 >,
23565 T1: fidl::encoding::Encode<
23566 ExtendedAttributeValue,
23567 fidl::encoding::DefaultFuchsiaResourceDialect,
23568 >,
23569 T2: fidl::encoding::Encode<
23570 SetExtendedAttributeMode,
23571 fidl::encoding::DefaultFuchsiaResourceDialect,
23572 >,
23573 >
23574 fidl::encoding::Encode<
23575 NodeSetExtendedAttributeRequest,
23576 fidl::encoding::DefaultFuchsiaResourceDialect,
23577 > for (T0, T1, T2)
23578 {
23579 #[inline]
23580 unsafe fn encode(
23581 self,
23582 encoder: &mut fidl::encoding::Encoder<
23583 '_,
23584 fidl::encoding::DefaultFuchsiaResourceDialect,
23585 >,
23586 offset: usize,
23587 depth: fidl::encoding::Depth,
23588 ) -> fidl::Result<()> {
23589 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
23590 unsafe {
23593 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
23594 (ptr as *mut u64).write_unaligned(0);
23595 }
23596 self.0.encode(encoder, offset + 0, depth)?;
23598 self.1.encode(encoder, offset + 16, depth)?;
23599 self.2.encode(encoder, offset + 32, depth)?;
23600 Ok(())
23601 }
23602 }
23603
23604 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23605 for NodeSetExtendedAttributeRequest
23606 {
23607 #[inline(always)]
23608 fn new_empty() -> Self {
23609 Self {
23610 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect),
23611 value: fidl::new_empty!(
23612 ExtendedAttributeValue,
23613 fidl::encoding::DefaultFuchsiaResourceDialect
23614 ),
23615 mode: fidl::new_empty!(
23616 SetExtendedAttributeMode,
23617 fidl::encoding::DefaultFuchsiaResourceDialect
23618 ),
23619 }
23620 }
23621
23622 #[inline]
23623 unsafe fn decode(
23624 &mut self,
23625 decoder: &mut fidl::encoding::Decoder<
23626 '_,
23627 fidl::encoding::DefaultFuchsiaResourceDialect,
23628 >,
23629 offset: usize,
23630 _depth: fidl::encoding::Depth,
23631 ) -> fidl::Result<()> {
23632 decoder.debug_check_bounds::<Self>(offset);
23633 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
23635 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23636 let mask = 0xffffffff00000000u64;
23637 let maskedval = padval & mask;
23638 if maskedval != 0 {
23639 return Err(fidl::Error::NonZeroPadding {
23640 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
23641 });
23642 }
23643 fidl::decode!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
23644 fidl::decode!(
23645 ExtendedAttributeValue,
23646 fidl::encoding::DefaultFuchsiaResourceDialect,
23647 &mut self.value,
23648 decoder,
23649 offset + 16,
23650 _depth
23651 )?;
23652 fidl::decode!(
23653 SetExtendedAttributeMode,
23654 fidl::encoding::DefaultFuchsiaResourceDialect,
23655 &mut self.mode,
23656 decoder,
23657 offset + 32,
23658 _depth
23659 )?;
23660 Ok(())
23661 }
23662 }
23663
23664 impl fidl::encoding::ResourceTypeMarker for NodeGetTokenResponse {
23665 type Borrowed<'a> = &'a mut Self;
23666 fn take_or_borrow<'a>(
23667 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23668 ) -> Self::Borrowed<'a> {
23669 value
23670 }
23671 }
23672
23673 unsafe impl fidl::encoding::TypeMarker for NodeGetTokenResponse {
23674 type Owned = Self;
23675
23676 #[inline(always)]
23677 fn inline_align(_context: fidl::encoding::Context) -> usize {
23678 4
23679 }
23680
23681 #[inline(always)]
23682 fn inline_size(_context: fidl::encoding::Context) -> usize {
23683 4
23684 }
23685 }
23686
23687 unsafe impl
23688 fidl::encoding::Encode<NodeGetTokenResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
23689 for &mut NodeGetTokenResponse
23690 {
23691 #[inline]
23692 unsafe fn encode(
23693 self,
23694 encoder: &mut fidl::encoding::Encoder<
23695 '_,
23696 fidl::encoding::DefaultFuchsiaResourceDialect,
23697 >,
23698 offset: usize,
23699 _depth: fidl::encoding::Depth,
23700 ) -> fidl::Result<()> {
23701 encoder.debug_check_bounds::<NodeGetTokenResponse>(offset);
23702 fidl::encoding::Encode::<
23704 NodeGetTokenResponse,
23705 fidl::encoding::DefaultFuchsiaResourceDialect,
23706 >::encode(
23707 (<fidl::encoding::HandleType<
23708 fidl::Event,
23709 { fidl::ObjectType::EVENT.into_raw() },
23710 2147483648,
23711 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23712 &mut self.token
23713 ),),
23714 encoder,
23715 offset,
23716 _depth,
23717 )
23718 }
23719 }
23720 unsafe impl<
23721 T0: fidl::encoding::Encode<
23722 fidl::encoding::HandleType<
23723 fidl::Event,
23724 { fidl::ObjectType::EVENT.into_raw() },
23725 2147483648,
23726 >,
23727 fidl::encoding::DefaultFuchsiaResourceDialect,
23728 >,
23729 >
23730 fidl::encoding::Encode<NodeGetTokenResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
23731 for (T0,)
23732 {
23733 #[inline]
23734 unsafe fn encode(
23735 self,
23736 encoder: &mut fidl::encoding::Encoder<
23737 '_,
23738 fidl::encoding::DefaultFuchsiaResourceDialect,
23739 >,
23740 offset: usize,
23741 depth: fidl::encoding::Depth,
23742 ) -> fidl::Result<()> {
23743 encoder.debug_check_bounds::<NodeGetTokenResponse>(offset);
23744 self.0.encode(encoder, offset + 0, depth)?;
23748 Ok(())
23749 }
23750 }
23751
23752 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23753 for NodeGetTokenResponse
23754 {
23755 #[inline(always)]
23756 fn new_empty() -> Self {
23757 Self {
23758 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23759 }
23760 }
23761
23762 #[inline]
23763 unsafe fn decode(
23764 &mut self,
23765 decoder: &mut fidl::encoding::Decoder<
23766 '_,
23767 fidl::encoding::DefaultFuchsiaResourceDialect,
23768 >,
23769 offset: usize,
23770 _depth: fidl::encoding::Depth,
23771 ) -> fidl::Result<()> {
23772 decoder.debug_check_bounds::<Self>(offset);
23773 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 0, _depth)?;
23775 Ok(())
23776 }
23777 }
23778
23779 impl fidl::encoding::ResourceTypeMarker for OpenableOpenRequest {
23780 type Borrowed<'a> = &'a mut Self;
23781 fn take_or_borrow<'a>(
23782 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23783 ) -> Self::Borrowed<'a> {
23784 value
23785 }
23786 }
23787
23788 unsafe impl fidl::encoding::TypeMarker for OpenableOpenRequest {
23789 type Owned = Self;
23790
23791 #[inline(always)]
23792 fn inline_align(_context: fidl::encoding::Context) -> usize {
23793 8
23794 }
23795
23796 #[inline(always)]
23797 fn inline_size(_context: fidl::encoding::Context) -> usize {
23798 48
23799 }
23800 }
23801
23802 unsafe impl
23803 fidl::encoding::Encode<OpenableOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23804 for &mut OpenableOpenRequest
23805 {
23806 #[inline]
23807 unsafe fn encode(
23808 self,
23809 encoder: &mut fidl::encoding::Encoder<
23810 '_,
23811 fidl::encoding::DefaultFuchsiaResourceDialect,
23812 >,
23813 offset: usize,
23814 _depth: fidl::encoding::Depth,
23815 ) -> fidl::Result<()> {
23816 encoder.debug_check_bounds::<OpenableOpenRequest>(offset);
23817 fidl::encoding::Encode::<OpenableOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
23819 (
23820 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
23821 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
23822 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
23823 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
23824 ),
23825 encoder, offset, _depth
23826 )
23827 }
23828 }
23829 unsafe impl<
23830 T0: fidl::encoding::Encode<
23831 fidl::encoding::BoundedString<4095>,
23832 fidl::encoding::DefaultFuchsiaResourceDialect,
23833 >,
23834 T1: fidl::encoding::Encode<Flags, fidl::encoding::DefaultFuchsiaResourceDialect>,
23835 T2: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
23836 T3: fidl::encoding::Encode<
23837 fidl::encoding::HandleType<
23838 fidl::Channel,
23839 { fidl::ObjectType::CHANNEL.into_raw() },
23840 2147483648,
23841 >,
23842 fidl::encoding::DefaultFuchsiaResourceDialect,
23843 >,
23844 > fidl::encoding::Encode<OpenableOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23845 for (T0, T1, T2, T3)
23846 {
23847 #[inline]
23848 unsafe fn encode(
23849 self,
23850 encoder: &mut fidl::encoding::Encoder<
23851 '_,
23852 fidl::encoding::DefaultFuchsiaResourceDialect,
23853 >,
23854 offset: usize,
23855 depth: fidl::encoding::Depth,
23856 ) -> fidl::Result<()> {
23857 encoder.debug_check_bounds::<OpenableOpenRequest>(offset);
23858 unsafe {
23861 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
23862 (ptr as *mut u64).write_unaligned(0);
23863 }
23864 self.0.encode(encoder, offset + 0, depth)?;
23866 self.1.encode(encoder, offset + 16, depth)?;
23867 self.2.encode(encoder, offset + 24, depth)?;
23868 self.3.encode(encoder, offset + 40, depth)?;
23869 Ok(())
23870 }
23871 }
23872
23873 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23874 for OpenableOpenRequest
23875 {
23876 #[inline(always)]
23877 fn new_empty() -> Self {
23878 Self {
23879 path: fidl::new_empty!(
23880 fidl::encoding::BoundedString<4095>,
23881 fidl::encoding::DefaultFuchsiaResourceDialect
23882 ),
23883 flags: fidl::new_empty!(Flags, fidl::encoding::DefaultFuchsiaResourceDialect),
23884 options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
23885 object: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23886 }
23887 }
23888
23889 #[inline]
23890 unsafe fn decode(
23891 &mut self,
23892 decoder: &mut fidl::encoding::Decoder<
23893 '_,
23894 fidl::encoding::DefaultFuchsiaResourceDialect,
23895 >,
23896 offset: usize,
23897 _depth: fidl::encoding::Depth,
23898 ) -> fidl::Result<()> {
23899 decoder.debug_check_bounds::<Self>(offset);
23900 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
23902 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23903 let mask = 0xffffffff00000000u64;
23904 let maskedval = padval & mask;
23905 if maskedval != 0 {
23906 return Err(fidl::Error::NonZeroPadding {
23907 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
23908 });
23909 }
23910 fidl::decode!(
23911 fidl::encoding::BoundedString<4095>,
23912 fidl::encoding::DefaultFuchsiaResourceDialect,
23913 &mut self.path,
23914 decoder,
23915 offset + 0,
23916 _depth
23917 )?;
23918 fidl::decode!(
23919 Flags,
23920 fidl::encoding::DefaultFuchsiaResourceDialect,
23921 &mut self.flags,
23922 decoder,
23923 offset + 16,
23924 _depth
23925 )?;
23926 fidl::decode!(
23927 Options,
23928 fidl::encoding::DefaultFuchsiaResourceDialect,
23929 &mut self.options,
23930 decoder,
23931 offset + 24,
23932 _depth
23933 )?;
23934 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
23935 Ok(())
23936 }
23937 }
23938
23939 impl ConnectionInfo {
23940 #[inline(always)]
23941 fn max_ordinal_present(&self) -> u64 {
23942 if let Some(_) = self.rights {
23943 return 1;
23944 }
23945 0
23946 }
23947 }
23948
23949 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
23950 type Borrowed<'a> = &'a mut Self;
23951 fn take_or_borrow<'a>(
23952 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23953 ) -> Self::Borrowed<'a> {
23954 value
23955 }
23956 }
23957
23958 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
23959 type Owned = Self;
23960
23961 #[inline(always)]
23962 fn inline_align(_context: fidl::encoding::Context) -> usize {
23963 8
23964 }
23965
23966 #[inline(always)]
23967 fn inline_size(_context: fidl::encoding::Context) -> usize {
23968 16
23969 }
23970 }
23971
23972 unsafe impl
23973 fidl::encoding::Encode<ConnectionInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23974 for &mut ConnectionInfo
23975 {
23976 unsafe fn encode(
23977 self,
23978 encoder: &mut fidl::encoding::Encoder<
23979 '_,
23980 fidl::encoding::DefaultFuchsiaResourceDialect,
23981 >,
23982 offset: usize,
23983 mut depth: fidl::encoding::Depth,
23984 ) -> fidl::Result<()> {
23985 encoder.debug_check_bounds::<ConnectionInfo>(offset);
23986 let max_ordinal: u64 = self.max_ordinal_present();
23988 encoder.write_num(max_ordinal, offset);
23989 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23990 if max_ordinal == 0 {
23992 return Ok(());
23993 }
23994 depth.increment()?;
23995 let envelope_size = 8;
23996 let bytes_len = max_ordinal as usize * envelope_size;
23997 #[allow(unused_variables)]
23998 let offset = encoder.out_of_line_offset(bytes_len);
23999 let mut _prev_end_offset: usize = 0;
24000 if 1 > max_ordinal {
24001 return Ok(());
24002 }
24003
24004 let cur_offset: usize = (1 - 1) * envelope_size;
24007
24008 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
24010
24011 fidl::encoding::encode_in_envelope_optional::<
24016 Operations,
24017 fidl::encoding::DefaultFuchsiaResourceDialect,
24018 >(
24019 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
24020 encoder,
24021 offset + cur_offset,
24022 depth,
24023 )?;
24024
24025 _prev_end_offset = cur_offset + envelope_size;
24026
24027 Ok(())
24028 }
24029 }
24030
24031 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24032 for ConnectionInfo
24033 {
24034 #[inline(always)]
24035 fn new_empty() -> Self {
24036 Self::default()
24037 }
24038
24039 unsafe fn decode(
24040 &mut self,
24041 decoder: &mut fidl::encoding::Decoder<
24042 '_,
24043 fidl::encoding::DefaultFuchsiaResourceDialect,
24044 >,
24045 offset: usize,
24046 mut depth: fidl::encoding::Depth,
24047 ) -> fidl::Result<()> {
24048 decoder.debug_check_bounds::<Self>(offset);
24049 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
24050 None => return Err(fidl::Error::NotNullable),
24051 Some(len) => len,
24052 };
24053 if len == 0 {
24055 return Ok(());
24056 };
24057 depth.increment()?;
24058 let envelope_size = 8;
24059 let bytes_len = len * envelope_size;
24060 let offset = decoder.out_of_line_offset(bytes_len)?;
24061 let mut _next_ordinal_to_read = 0;
24063 let mut next_offset = offset;
24064 let end_offset = offset + bytes_len;
24065 _next_ordinal_to_read += 1;
24066 if next_offset >= end_offset {
24067 return Ok(());
24068 }
24069
24070 while _next_ordinal_to_read < 1 {
24072 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24073 _next_ordinal_to_read += 1;
24074 next_offset += envelope_size;
24075 }
24076
24077 let next_out_of_line = decoder.next_out_of_line();
24078 let handles_before = decoder.remaining_handles();
24079 if let Some((inlined, num_bytes, num_handles)) =
24080 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24081 {
24082 let member_inline_size =
24083 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
24084 if inlined != (member_inline_size <= 4) {
24085 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24086 }
24087 let inner_offset;
24088 let mut inner_depth = depth.clone();
24089 if inlined {
24090 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24091 inner_offset = next_offset;
24092 } else {
24093 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24094 inner_depth.increment()?;
24095 }
24096 let val_ref = self.rights.get_or_insert_with(|| {
24097 fidl::new_empty!(Operations, fidl::encoding::DefaultFuchsiaResourceDialect)
24098 });
24099 fidl::decode!(
24100 Operations,
24101 fidl::encoding::DefaultFuchsiaResourceDialect,
24102 val_ref,
24103 decoder,
24104 inner_offset,
24105 inner_depth
24106 )?;
24107 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24108 {
24109 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24110 }
24111 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24112 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24113 }
24114 }
24115
24116 next_offset += envelope_size;
24117
24118 while next_offset < end_offset {
24120 _next_ordinal_to_read += 1;
24121 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24122 next_offset += envelope_size;
24123 }
24124
24125 Ok(())
24126 }
24127 }
24128
24129 impl FileInfo {
24130 #[inline(always)]
24131 fn max_ordinal_present(&self) -> u64 {
24132 if let Some(_) = self.attributes {
24133 return 4;
24134 }
24135 if let Some(_) = self.stream {
24136 return 3;
24137 }
24138 if let Some(_) = self.observer {
24139 return 2;
24140 }
24141 if let Some(_) = self.is_append {
24142 return 1;
24143 }
24144 0
24145 }
24146 }
24147
24148 impl fidl::encoding::ResourceTypeMarker for FileInfo {
24149 type Borrowed<'a> = &'a mut Self;
24150 fn take_or_borrow<'a>(
24151 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
24152 ) -> Self::Borrowed<'a> {
24153 value
24154 }
24155 }
24156
24157 unsafe impl fidl::encoding::TypeMarker for FileInfo {
24158 type Owned = Self;
24159
24160 #[inline(always)]
24161 fn inline_align(_context: fidl::encoding::Context) -> usize {
24162 8
24163 }
24164
24165 #[inline(always)]
24166 fn inline_size(_context: fidl::encoding::Context) -> usize {
24167 16
24168 }
24169 }
24170
24171 unsafe impl fidl::encoding::Encode<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
24172 for &mut FileInfo
24173 {
24174 unsafe fn encode(
24175 self,
24176 encoder: &mut fidl::encoding::Encoder<
24177 '_,
24178 fidl::encoding::DefaultFuchsiaResourceDialect,
24179 >,
24180 offset: usize,
24181 mut depth: fidl::encoding::Depth,
24182 ) -> fidl::Result<()> {
24183 encoder.debug_check_bounds::<FileInfo>(offset);
24184 let max_ordinal: u64 = self.max_ordinal_present();
24186 encoder.write_num(max_ordinal, offset);
24187 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
24188 if max_ordinal == 0 {
24190 return Ok(());
24191 }
24192 depth.increment()?;
24193 let envelope_size = 8;
24194 let bytes_len = max_ordinal as usize * envelope_size;
24195 #[allow(unused_variables)]
24196 let offset = encoder.out_of_line_offset(bytes_len);
24197 let mut _prev_end_offset: usize = 0;
24198 if 1 > max_ordinal {
24199 return Ok(());
24200 }
24201
24202 let cur_offset: usize = (1 - 1) * envelope_size;
24205
24206 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
24208
24209 fidl::encoding::encode_in_envelope_optional::<
24214 bool,
24215 fidl::encoding::DefaultFuchsiaResourceDialect,
24216 >(
24217 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
24218 encoder,
24219 offset + cur_offset,
24220 depth,
24221 )?;
24222
24223 _prev_end_offset = cur_offset + envelope_size;
24224 if 2 > max_ordinal {
24225 return Ok(());
24226 }
24227
24228 let cur_offset: usize = (2 - 1) * envelope_size;
24231
24232 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
24234
24235 fidl::encoding::encode_in_envelope_optional::<
24240 fidl::encoding::HandleType<
24241 fidl::Event,
24242 { fidl::ObjectType::EVENT.into_raw() },
24243 2147483648,
24244 >,
24245 fidl::encoding::DefaultFuchsiaResourceDialect,
24246 >(
24247 self.observer.as_mut().map(
24248 <fidl::encoding::HandleType<
24249 fidl::Event,
24250 { fidl::ObjectType::EVENT.into_raw() },
24251 2147483648,
24252 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
24253 ),
24254 encoder,
24255 offset + cur_offset,
24256 depth,
24257 )?;
24258
24259 _prev_end_offset = cur_offset + envelope_size;
24260 if 3 > max_ordinal {
24261 return Ok(());
24262 }
24263
24264 let cur_offset: usize = (3 - 1) * envelope_size;
24267
24268 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
24270
24271 fidl::encoding::encode_in_envelope_optional::<
24276 fidl::encoding::HandleType<
24277 fidl::Stream,
24278 { fidl::ObjectType::STREAM.into_raw() },
24279 2147483648,
24280 >,
24281 fidl::encoding::DefaultFuchsiaResourceDialect,
24282 >(
24283 self.stream.as_mut().map(
24284 <fidl::encoding::HandleType<
24285 fidl::Stream,
24286 { fidl::ObjectType::STREAM.into_raw() },
24287 2147483648,
24288 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
24289 ),
24290 encoder,
24291 offset + cur_offset,
24292 depth,
24293 )?;
24294
24295 _prev_end_offset = cur_offset + envelope_size;
24296 if 4 > max_ordinal {
24297 return Ok(());
24298 }
24299
24300 let cur_offset: usize = (4 - 1) * envelope_size;
24303
24304 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
24306
24307 fidl::encoding::encode_in_envelope_optional::<
24312 NodeAttributes2,
24313 fidl::encoding::DefaultFuchsiaResourceDialect,
24314 >(
24315 self.attributes
24316 .as_ref()
24317 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
24318 encoder,
24319 offset + cur_offset,
24320 depth,
24321 )?;
24322
24323 _prev_end_offset = cur_offset + envelope_size;
24324
24325 Ok(())
24326 }
24327 }
24328
24329 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {
24330 #[inline(always)]
24331 fn new_empty() -> Self {
24332 Self::default()
24333 }
24334
24335 unsafe fn decode(
24336 &mut self,
24337 decoder: &mut fidl::encoding::Decoder<
24338 '_,
24339 fidl::encoding::DefaultFuchsiaResourceDialect,
24340 >,
24341 offset: usize,
24342 mut depth: fidl::encoding::Depth,
24343 ) -> fidl::Result<()> {
24344 decoder.debug_check_bounds::<Self>(offset);
24345 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
24346 None => return Err(fidl::Error::NotNullable),
24347 Some(len) => len,
24348 };
24349 if len == 0 {
24351 return Ok(());
24352 };
24353 depth.increment()?;
24354 let envelope_size = 8;
24355 let bytes_len = len * envelope_size;
24356 let offset = decoder.out_of_line_offset(bytes_len)?;
24357 let mut _next_ordinal_to_read = 0;
24359 let mut next_offset = offset;
24360 let end_offset = offset + bytes_len;
24361 _next_ordinal_to_read += 1;
24362 if next_offset >= end_offset {
24363 return Ok(());
24364 }
24365
24366 while _next_ordinal_to_read < 1 {
24368 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24369 _next_ordinal_to_read += 1;
24370 next_offset += envelope_size;
24371 }
24372
24373 let next_out_of_line = decoder.next_out_of_line();
24374 let handles_before = decoder.remaining_handles();
24375 if let Some((inlined, num_bytes, num_handles)) =
24376 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24377 {
24378 let member_inline_size =
24379 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
24380 if inlined != (member_inline_size <= 4) {
24381 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24382 }
24383 let inner_offset;
24384 let mut inner_depth = depth.clone();
24385 if inlined {
24386 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24387 inner_offset = next_offset;
24388 } else {
24389 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24390 inner_depth.increment()?;
24391 }
24392 let val_ref = self.is_append.get_or_insert_with(|| {
24393 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
24394 });
24395 fidl::decode!(
24396 bool,
24397 fidl::encoding::DefaultFuchsiaResourceDialect,
24398 val_ref,
24399 decoder,
24400 inner_offset,
24401 inner_depth
24402 )?;
24403 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24404 {
24405 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24406 }
24407 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24408 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24409 }
24410 }
24411
24412 next_offset += envelope_size;
24413 _next_ordinal_to_read += 1;
24414 if next_offset >= end_offset {
24415 return Ok(());
24416 }
24417
24418 while _next_ordinal_to_read < 2 {
24420 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24421 _next_ordinal_to_read += 1;
24422 next_offset += envelope_size;
24423 }
24424
24425 let next_out_of_line = decoder.next_out_of_line();
24426 let handles_before = decoder.remaining_handles();
24427 if let Some((inlined, num_bytes, num_handles)) =
24428 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24429 {
24430 let member_inline_size = <fidl::encoding::HandleType<
24431 fidl::Event,
24432 { fidl::ObjectType::EVENT.into_raw() },
24433 2147483648,
24434 > as fidl::encoding::TypeMarker>::inline_size(
24435 decoder.context
24436 );
24437 if inlined != (member_inline_size <= 4) {
24438 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24439 }
24440 let inner_offset;
24441 let mut inner_depth = depth.clone();
24442 if inlined {
24443 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24444 inner_offset = next_offset;
24445 } else {
24446 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24447 inner_depth.increment()?;
24448 }
24449 let val_ref =
24450 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
24451 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
24452 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24453 {
24454 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24455 }
24456 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24457 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24458 }
24459 }
24460
24461 next_offset += envelope_size;
24462 _next_ordinal_to_read += 1;
24463 if next_offset >= end_offset {
24464 return Ok(());
24465 }
24466
24467 while _next_ordinal_to_read < 3 {
24469 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24470 _next_ordinal_to_read += 1;
24471 next_offset += envelope_size;
24472 }
24473
24474 let next_out_of_line = decoder.next_out_of_line();
24475 let handles_before = decoder.remaining_handles();
24476 if let Some((inlined, num_bytes, num_handles)) =
24477 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24478 {
24479 let member_inline_size = <fidl::encoding::HandleType<
24480 fidl::Stream,
24481 { fidl::ObjectType::STREAM.into_raw() },
24482 2147483648,
24483 > as fidl::encoding::TypeMarker>::inline_size(
24484 decoder.context
24485 );
24486 if inlined != (member_inline_size <= 4) {
24487 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24488 }
24489 let inner_offset;
24490 let mut inner_depth = depth.clone();
24491 if inlined {
24492 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24493 inner_offset = next_offset;
24494 } else {
24495 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24496 inner_depth.increment()?;
24497 }
24498 let val_ref =
24499 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
24500 fidl::decode!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
24501 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24502 {
24503 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24504 }
24505 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24506 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24507 }
24508 }
24509
24510 next_offset += envelope_size;
24511 _next_ordinal_to_read += 1;
24512 if next_offset >= end_offset {
24513 return Ok(());
24514 }
24515
24516 while _next_ordinal_to_read < 4 {
24518 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24519 _next_ordinal_to_read += 1;
24520 next_offset += envelope_size;
24521 }
24522
24523 let next_out_of_line = decoder.next_out_of_line();
24524 let handles_before = decoder.remaining_handles();
24525 if let Some((inlined, num_bytes, num_handles)) =
24526 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24527 {
24528 let member_inline_size =
24529 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
24530 if inlined != (member_inline_size <= 4) {
24531 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24532 }
24533 let inner_offset;
24534 let mut inner_depth = depth.clone();
24535 if inlined {
24536 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24537 inner_offset = next_offset;
24538 } else {
24539 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24540 inner_depth.increment()?;
24541 }
24542 let val_ref = self.attributes.get_or_insert_with(|| {
24543 fidl::new_empty!(NodeAttributes2, fidl::encoding::DefaultFuchsiaResourceDialect)
24544 });
24545 fidl::decode!(
24546 NodeAttributes2,
24547 fidl::encoding::DefaultFuchsiaResourceDialect,
24548 val_ref,
24549 decoder,
24550 inner_offset,
24551 inner_depth
24552 )?;
24553 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24554 {
24555 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24556 }
24557 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24558 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24559 }
24560 }
24561
24562 next_offset += envelope_size;
24563
24564 while next_offset < end_offset {
24566 _next_ordinal_to_read += 1;
24567 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24568 next_offset += envelope_size;
24569 }
24570
24571 Ok(())
24572 }
24573 }
24574
24575 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
24576 type Borrowed<'a> = &'a mut Self;
24577 fn take_or_borrow<'a>(
24578 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
24579 ) -> Self::Borrowed<'a> {
24580 value
24581 }
24582 }
24583
24584 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
24585 type Owned = Self;
24586
24587 #[inline(always)]
24588 fn inline_align(_context: fidl::encoding::Context) -> usize {
24589 8
24590 }
24591
24592 #[inline(always)]
24593 fn inline_size(_context: fidl::encoding::Context) -> usize {
24594 16
24595 }
24596 }
24597
24598 unsafe impl
24599 fidl::encoding::Encode<
24600 ExtendedAttributeValue,
24601 fidl::encoding::DefaultFuchsiaResourceDialect,
24602 > for &mut ExtendedAttributeValue
24603 {
24604 #[inline]
24605 unsafe fn encode(
24606 self,
24607 encoder: &mut fidl::encoding::Encoder<
24608 '_,
24609 fidl::encoding::DefaultFuchsiaResourceDialect,
24610 >,
24611 offset: usize,
24612 _depth: fidl::encoding::Depth,
24613 ) -> fidl::Result<()> {
24614 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
24615 encoder.write_num::<u64>(self.ordinal(), offset);
24616 match self {
24617 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
24618 fidl::encoding::Vector<u8, 32768>,
24619 fidl::encoding::DefaultFuchsiaResourceDialect,
24620 >(
24621 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
24622 val,
24623 ),
24624 encoder,
24625 offset + 8,
24626 _depth,
24627 ),
24628 ExtendedAttributeValue::Buffer(ref mut val) => {
24629 fidl::encoding::encode_in_envelope::<
24630 fidl::encoding::HandleType<
24631 fidl::Vmo,
24632 { fidl::ObjectType::VMO.into_raw() },
24633 2147483648,
24634 >,
24635 fidl::encoding::DefaultFuchsiaResourceDialect,
24636 >(
24637 <fidl::encoding::HandleType<
24638 fidl::Vmo,
24639 { fidl::ObjectType::VMO.into_raw() },
24640 2147483648,
24641 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
24642 val
24643 ),
24644 encoder,
24645 offset + 8,
24646 _depth,
24647 )
24648 }
24649 ExtendedAttributeValue::__SourceBreaking { .. } => {
24650 Err(fidl::Error::UnknownUnionTag)
24651 }
24652 }
24653 }
24654 }
24655
24656 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24657 for ExtendedAttributeValue
24658 {
24659 #[inline(always)]
24660 fn new_empty() -> Self {
24661 Self::__SourceBreaking { unknown_ordinal: 0 }
24662 }
24663
24664 #[inline]
24665 unsafe fn decode(
24666 &mut self,
24667 decoder: &mut fidl::encoding::Decoder<
24668 '_,
24669 fidl::encoding::DefaultFuchsiaResourceDialect,
24670 >,
24671 offset: usize,
24672 mut depth: fidl::encoding::Depth,
24673 ) -> fidl::Result<()> {
24674 decoder.debug_check_bounds::<Self>(offset);
24675 #[allow(unused_variables)]
24676 let next_out_of_line = decoder.next_out_of_line();
24677 let handles_before = decoder.remaining_handles();
24678 let (ordinal, inlined, num_bytes, num_handles) =
24679 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24680
24681 let member_inline_size = match ordinal {
24682 1 => {
24683 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
24684 decoder.context,
24685 )
24686 }
24687 2 => <fidl::encoding::HandleType<
24688 fidl::Vmo,
24689 { fidl::ObjectType::VMO.into_raw() },
24690 2147483648,
24691 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24692 0 => return Err(fidl::Error::UnknownUnionTag),
24693 _ => num_bytes as usize,
24694 };
24695
24696 if inlined != (member_inline_size <= 4) {
24697 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24698 }
24699 let _inner_offset;
24700 if inlined {
24701 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24702 _inner_offset = offset + 8;
24703 } else {
24704 depth.increment()?;
24705 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24706 }
24707 match ordinal {
24708 1 => {
24709 #[allow(irrefutable_let_patterns)]
24710 if let ExtendedAttributeValue::Bytes(_) = self {
24711 } else {
24713 *self = ExtendedAttributeValue::Bytes(
24715 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect),
24716 );
24717 }
24718 #[allow(irrefutable_let_patterns)]
24719 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
24720 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
24721 } else {
24722 unreachable!()
24723 }
24724 }
24725 2 => {
24726 #[allow(irrefutable_let_patterns)]
24727 if let ExtendedAttributeValue::Buffer(_) = self {
24728 } else {
24730 *self = ExtendedAttributeValue::Buffer(
24732 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
24733 );
24734 }
24735 #[allow(irrefutable_let_patterns)]
24736 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
24737 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
24738 } else {
24739 unreachable!()
24740 }
24741 }
24742 #[allow(deprecated)]
24743 ordinal => {
24744 for _ in 0..num_handles {
24745 decoder.drop_next_handle()?;
24746 }
24747 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
24748 }
24749 }
24750 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24751 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24752 }
24753 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24754 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24755 }
24756 Ok(())
24757 }
24758 }
24759
24760 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
24761 type Borrowed<'a> = &'a mut Self;
24762 fn take_or_borrow<'a>(
24763 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
24764 ) -> Self::Borrowed<'a> {
24765 value
24766 }
24767 }
24768
24769 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
24770 type Owned = Self;
24771
24772 #[inline(always)]
24773 fn inline_align(_context: fidl::encoding::Context) -> usize {
24774 8
24775 }
24776
24777 #[inline(always)]
24778 fn inline_size(_context: fidl::encoding::Context) -> usize {
24779 16
24780 }
24781 }
24782
24783 unsafe impl
24784 fidl::encoding::Encode<NodeInfoDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>
24785 for &mut NodeInfoDeprecated
24786 {
24787 #[inline]
24788 unsafe fn encode(
24789 self,
24790 encoder: &mut fidl::encoding::Encoder<
24791 '_,
24792 fidl::encoding::DefaultFuchsiaResourceDialect,
24793 >,
24794 offset: usize,
24795 _depth: fidl::encoding::Depth,
24796 ) -> fidl::Result<()> {
24797 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
24798 encoder.write_num::<u64>(self.ordinal(), offset);
24799 match self {
24800 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
24801 Service,
24802 fidl::encoding::DefaultFuchsiaResourceDialect,
24803 >(
24804 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
24805 encoder,
24806 offset + 8,
24807 _depth,
24808 ),
24809 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
24810 FileObject,
24811 fidl::encoding::DefaultFuchsiaResourceDialect,
24812 >(
24813 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
24814 encoder,
24815 offset + 8,
24816 _depth,
24817 ),
24818 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
24819 DirectoryObject,
24820 fidl::encoding::DefaultFuchsiaResourceDialect,
24821 >(
24822 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
24823 encoder,
24824 offset + 8,
24825 _depth,
24826 ),
24827 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
24828 SymlinkObject,
24829 fidl::encoding::DefaultFuchsiaResourceDialect,
24830 >(
24831 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
24832 encoder,
24833 offset + 8,
24834 _depth,
24835 ),
24836 }
24837 }
24838 }
24839
24840 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24841 for NodeInfoDeprecated
24842 {
24843 #[inline(always)]
24844 fn new_empty() -> Self {
24845 Self::Service(fidl::new_empty!(Service, fidl::encoding::DefaultFuchsiaResourceDialect))
24846 }
24847
24848 #[inline]
24849 unsafe fn decode(
24850 &mut self,
24851 decoder: &mut fidl::encoding::Decoder<
24852 '_,
24853 fidl::encoding::DefaultFuchsiaResourceDialect,
24854 >,
24855 offset: usize,
24856 mut depth: fidl::encoding::Depth,
24857 ) -> fidl::Result<()> {
24858 decoder.debug_check_bounds::<Self>(offset);
24859 #[allow(unused_variables)]
24860 let next_out_of_line = decoder.next_out_of_line();
24861 let handles_before = decoder.remaining_handles();
24862 let (ordinal, inlined, num_bytes, num_handles) =
24863 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24864
24865 let member_inline_size = match ordinal {
24866 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24867 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24868 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24869 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24870 _ => return Err(fidl::Error::UnknownUnionTag),
24871 };
24872
24873 if inlined != (member_inline_size <= 4) {
24874 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24875 }
24876 let _inner_offset;
24877 if inlined {
24878 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24879 _inner_offset = offset + 8;
24880 } else {
24881 depth.increment()?;
24882 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24883 }
24884 match ordinal {
24885 1 => {
24886 #[allow(irrefutable_let_patterns)]
24887 if let NodeInfoDeprecated::Service(_) = self {
24888 } else {
24890 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
24892 Service,
24893 fidl::encoding::DefaultFuchsiaResourceDialect
24894 ));
24895 }
24896 #[allow(irrefutable_let_patterns)]
24897 if let NodeInfoDeprecated::Service(ref mut val) = self {
24898 fidl::decode!(
24899 Service,
24900 fidl::encoding::DefaultFuchsiaResourceDialect,
24901 val,
24902 decoder,
24903 _inner_offset,
24904 depth
24905 )?;
24906 } else {
24907 unreachable!()
24908 }
24909 }
24910 2 => {
24911 #[allow(irrefutable_let_patterns)]
24912 if let NodeInfoDeprecated::File(_) = self {
24913 } else {
24915 *self = NodeInfoDeprecated::File(fidl::new_empty!(
24917 FileObject,
24918 fidl::encoding::DefaultFuchsiaResourceDialect
24919 ));
24920 }
24921 #[allow(irrefutable_let_patterns)]
24922 if let NodeInfoDeprecated::File(ref mut val) = self {
24923 fidl::decode!(
24924 FileObject,
24925 fidl::encoding::DefaultFuchsiaResourceDialect,
24926 val,
24927 decoder,
24928 _inner_offset,
24929 depth
24930 )?;
24931 } else {
24932 unreachable!()
24933 }
24934 }
24935 3 => {
24936 #[allow(irrefutable_let_patterns)]
24937 if let NodeInfoDeprecated::Directory(_) = self {
24938 } else {
24940 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
24942 DirectoryObject,
24943 fidl::encoding::DefaultFuchsiaResourceDialect
24944 ));
24945 }
24946 #[allow(irrefutable_let_patterns)]
24947 if let NodeInfoDeprecated::Directory(ref mut val) = self {
24948 fidl::decode!(
24949 DirectoryObject,
24950 fidl::encoding::DefaultFuchsiaResourceDialect,
24951 val,
24952 decoder,
24953 _inner_offset,
24954 depth
24955 )?;
24956 } else {
24957 unreachable!()
24958 }
24959 }
24960 4 => {
24961 #[allow(irrefutable_let_patterns)]
24962 if let NodeInfoDeprecated::Symlink(_) = self {
24963 } else {
24965 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
24967 SymlinkObject,
24968 fidl::encoding::DefaultFuchsiaResourceDialect
24969 ));
24970 }
24971 #[allow(irrefutable_let_patterns)]
24972 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
24973 fidl::decode!(
24974 SymlinkObject,
24975 fidl::encoding::DefaultFuchsiaResourceDialect,
24976 val,
24977 decoder,
24978 _inner_offset,
24979 depth
24980 )?;
24981 } else {
24982 unreachable!()
24983 }
24984 }
24985 ordinal => panic!("unexpected ordinal {:?}", ordinal),
24986 }
24987 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24988 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24989 }
24990 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24991 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24992 }
24993 Ok(())
24994 }
24995 }
24996
24997 impl fidl::encoding::ResourceTypeMarker for Representation {
24998 type Borrowed<'a> = &'a mut Self;
24999 fn take_or_borrow<'a>(
25000 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
25001 ) -> Self::Borrowed<'a> {
25002 value
25003 }
25004 }
25005
25006 unsafe impl fidl::encoding::TypeMarker for Representation {
25007 type Owned = Self;
25008
25009 #[inline(always)]
25010 fn inline_align(_context: fidl::encoding::Context) -> usize {
25011 8
25012 }
25013
25014 #[inline(always)]
25015 fn inline_size(_context: fidl::encoding::Context) -> usize {
25016 16
25017 }
25018 }
25019
25020 unsafe impl
25021 fidl::encoding::Encode<Representation, fidl::encoding::DefaultFuchsiaResourceDialect>
25022 for &mut Representation
25023 {
25024 #[inline]
25025 unsafe fn encode(
25026 self,
25027 encoder: &mut fidl::encoding::Encoder<
25028 '_,
25029 fidl::encoding::DefaultFuchsiaResourceDialect,
25030 >,
25031 offset: usize,
25032 _depth: fidl::encoding::Depth,
25033 ) -> fidl::Result<()> {
25034 encoder.debug_check_bounds::<Representation>(offset);
25035 encoder.write_num::<u64>(self.ordinal(), offset);
25036 match self {
25037 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
25038 NodeInfo,
25039 fidl::encoding::DefaultFuchsiaResourceDialect,
25040 >(
25041 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
25042 encoder,
25043 offset + 8,
25044 _depth,
25045 ),
25046 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
25047 DirectoryInfo,
25048 fidl::encoding::DefaultFuchsiaResourceDialect,
25049 >(
25050 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
25051 encoder,
25052 offset + 8,
25053 _depth,
25054 ),
25055 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
25056 FileInfo,
25057 fidl::encoding::DefaultFuchsiaResourceDialect,
25058 >(
25059 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
25060 encoder,
25061 offset + 8,
25062 _depth,
25063 ),
25064 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
25065 SymlinkInfo,
25066 fidl::encoding::DefaultFuchsiaResourceDialect,
25067 >(
25068 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
25069 encoder,
25070 offset + 8,
25071 _depth,
25072 ),
25073 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
25074 }
25075 }
25076 }
25077
25078 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
25079 for Representation
25080 {
25081 #[inline(always)]
25082 fn new_empty() -> Self {
25083 Self::__SourceBreaking { unknown_ordinal: 0 }
25084 }
25085
25086 #[inline]
25087 unsafe fn decode(
25088 &mut self,
25089 decoder: &mut fidl::encoding::Decoder<
25090 '_,
25091 fidl::encoding::DefaultFuchsiaResourceDialect,
25092 >,
25093 offset: usize,
25094 mut depth: fidl::encoding::Depth,
25095 ) -> fidl::Result<()> {
25096 decoder.debug_check_bounds::<Self>(offset);
25097 #[allow(unused_variables)]
25098 let next_out_of_line = decoder.next_out_of_line();
25099 let handles_before = decoder.remaining_handles();
25100 let (ordinal, inlined, num_bytes, num_handles) =
25101 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
25102
25103 let member_inline_size = match ordinal {
25104 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
25105 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
25106 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
25107 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
25108 0 => return Err(fidl::Error::UnknownUnionTag),
25109 _ => num_bytes as usize,
25110 };
25111
25112 if inlined != (member_inline_size <= 4) {
25113 return Err(fidl::Error::InvalidInlineBitInEnvelope);
25114 }
25115 let _inner_offset;
25116 if inlined {
25117 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
25118 _inner_offset = offset + 8;
25119 } else {
25120 depth.increment()?;
25121 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
25122 }
25123 match ordinal {
25124 1 => {
25125 #[allow(irrefutable_let_patterns)]
25126 if let Representation::Node(_) = self {
25127 } else {
25129 *self = Representation::Node(fidl::new_empty!(
25131 NodeInfo,
25132 fidl::encoding::DefaultFuchsiaResourceDialect
25133 ));
25134 }
25135 #[allow(irrefutable_let_patterns)]
25136 if let Representation::Node(ref mut val) = self {
25137 fidl::decode!(
25138 NodeInfo,
25139 fidl::encoding::DefaultFuchsiaResourceDialect,
25140 val,
25141 decoder,
25142 _inner_offset,
25143 depth
25144 )?;
25145 } else {
25146 unreachable!()
25147 }
25148 }
25149 2 => {
25150 #[allow(irrefutable_let_patterns)]
25151 if let Representation::Directory(_) = self {
25152 } else {
25154 *self = Representation::Directory(fidl::new_empty!(
25156 DirectoryInfo,
25157 fidl::encoding::DefaultFuchsiaResourceDialect
25158 ));
25159 }
25160 #[allow(irrefutable_let_patterns)]
25161 if let Representation::Directory(ref mut val) = self {
25162 fidl::decode!(
25163 DirectoryInfo,
25164 fidl::encoding::DefaultFuchsiaResourceDialect,
25165 val,
25166 decoder,
25167 _inner_offset,
25168 depth
25169 )?;
25170 } else {
25171 unreachable!()
25172 }
25173 }
25174 3 => {
25175 #[allow(irrefutable_let_patterns)]
25176 if let Representation::File(_) = self {
25177 } else {
25179 *self = Representation::File(fidl::new_empty!(
25181 FileInfo,
25182 fidl::encoding::DefaultFuchsiaResourceDialect
25183 ));
25184 }
25185 #[allow(irrefutable_let_patterns)]
25186 if let Representation::File(ref mut val) = self {
25187 fidl::decode!(
25188 FileInfo,
25189 fidl::encoding::DefaultFuchsiaResourceDialect,
25190 val,
25191 decoder,
25192 _inner_offset,
25193 depth
25194 )?;
25195 } else {
25196 unreachable!()
25197 }
25198 }
25199 4 => {
25200 #[allow(irrefutable_let_patterns)]
25201 if let Representation::Symlink(_) = self {
25202 } else {
25204 *self = Representation::Symlink(fidl::new_empty!(
25206 SymlinkInfo,
25207 fidl::encoding::DefaultFuchsiaResourceDialect
25208 ));
25209 }
25210 #[allow(irrefutable_let_patterns)]
25211 if let Representation::Symlink(ref mut val) = self {
25212 fidl::decode!(
25213 SymlinkInfo,
25214 fidl::encoding::DefaultFuchsiaResourceDialect,
25215 val,
25216 decoder,
25217 _inner_offset,
25218 depth
25219 )?;
25220 } else {
25221 unreachable!()
25222 }
25223 }
25224 #[allow(deprecated)]
25225 ordinal => {
25226 for _ in 0..num_handles {
25227 decoder.drop_next_handle()?;
25228 }
25229 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
25230 }
25231 }
25232 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
25233 return Err(fidl::Error::InvalidNumBytesInEnvelope);
25234 }
25235 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
25236 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
25237 }
25238 Ok(())
25239 }
25240 }
25241}